From e63345f53196b39f6068684016b000a370d07fa5 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 22 Jun 2024 17:53:00 +0200 Subject: [PATCH 01/80] remove old workflows --- .github/workflows/build.yml | 34 -------------------------- .github/workflows/python-publish.yml | 36 ---------------------------- .github/workflows/stale.yml | 22 ----------------- 3 files changed, 92 deletions(-) delete mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/python-publish.yml delete mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 0b32e23..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Build and Test - -on: [push] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - max-parallel: 4 - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] - - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python3 -m pip install --upgrade pip - pip3 install python-copasi - pip3 install -e .[test,dataverse] - - name: Test with pytest - run: | - python3 -m pytest - - name: Lint with flake8 - run: | - pip install flake8 - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=13 --max-line-length=127 --statistics diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml deleted file mode 100644 index bc1a4f6..0000000 --- a/.github/workflows/python-publish.yml +++ /dev/null @@ -1,36 +0,0 @@ -# This workflow will upload a Python Package using Twine when a release is created -# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: Upload Python Package - -on: - release: - types: [published] - -jobs: - deploy: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.9' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build - - name: Build package - run: python -m build - - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 246c34d..0000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Close inactive issues -on: - schedule: - - cron: "30 1 * * *" - -jobs: - close-issues: - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - steps: - - uses: actions/stale@v3 - with: - days-before-issue-stale: 30 - days-before-issue-close: 14 - stale-issue-label: "stale" - stale-issue-message: "This issue is stale because it has been open for 30 days with no activity." - close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale." - days-before-pr-stale: -1 - days-before-pr-close: -1 - repo-token: ${{ secrets.GITHUB_TOKEN }} From 71db8a1d765c8d819cef810952fee3bc9a3cc2ba Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 22 Jun 2024 17:53:37 +0200 Subject: [PATCH 02/80] fix spelling --- docs/_examples/01_KineticModeling_PySCeS.ipynb | 14 +++++++------- docs/_examples/01_KineticModeling_PySCeS.rst | 18 +++++++++--------- docs/_getstarted/01_BasicUsage.ipynb | 12 ++++++------ docs/_getstarted/01_BasicUsage.rst | 16 ++++++++-------- docs/_getstarted/02_Validation.ipynb | 4 ++-- docs/_getstarted/02_Validation.rst | 4 ++-- docs/_getstarted/03_Visualisation.ipynb | 8 ++++---- docs/_getstarted/04_UploadToDataverse.ipynb | 2 +- docs/_getstarted/04_UploadToDataverse.rst | 2 +- .../EnzymeML_Validation_Template.yaml | 6 +++--- .../EnzymeML_Validation_Template_Example.yaml | 6 +++--- examples/Basic example/CreateEnzymeML.ipynb | 12 ++++++------ examples/Dataverse/UploadToDataverse.ipynb | 2 +- examples/ThinLayers/COPASI/Untitled.ipynb | 6 +++--- examples/ThinLayers/TL_BioCatNet.py | 2 +- .../EnzymeML_Validation_Template.yaml | 6 +++--- .../EnzymeML_Validation_Template_Example.yaml | 6 +++--- examples/Validation/ValidateEnzymeML.ipynb | 4 ++-- examples/Visualisation/Visualisation.ipynb | 8 ++++---- 19 files changed, 69 insertions(+), 69 deletions(-) diff --git a/docs/_examples/01_KineticModeling_PySCeS.ipynb b/docs/_examples/01_KineticModeling_PySCeS.ipynb index 291de8d..49f3dbb 100644 --- a/docs/_examples/01_KineticModeling_PySCeS.ipynb +++ b/docs/_examples/01_KineticModeling_PySCeS.ipynb @@ -7,7 +7,7 @@ "source": [ "# Modeling a reaction by mass action cascades using PySCeS\n", "\n", - "This notebook is part of the publication \"EnzymeML at Work\" from Lauterbach et al. 2022 and adds a given micro-kinetic model to an EnzymeML document. Prior to this, experimental data was collected using the EnzymeML spreadsheet and converted to EnzymeML. The following notebook adresses the following key procedures using PyEnzyme:\n", + "This notebook is part of the publication \"EnzymeML at Work\" from Lauterbach et al. 2022 and adds a given micro-kinetic model to an EnzymeML document. Prior to this, experimental data was collected using the EnzymeML spreadsheet and converted to EnzymeML. The following notebook addresses the following key procedures using PyEnzyme:\n", "\n", "- Editing existing species\n", "- Adding new species from scratch or by DB-fetch\n", @@ -196,7 +196,7 @@ "\n", "```s0 * vmax / (Km + s0)```\n", "\n", - "which requires an equation string for each model. This can become quite tedious and for models, where most reactions share the same rate law quite error prone if done manually. Hence, the ```createGenerator```-initializer of the ```KineticModel``` offers a convinient way to generalize models and ensure consistency as well as re-usability.\n", + "which requires an equation string for each model. This can become quite tedious and for models, where most reactions share the same rate law quite error prone if done manually. Hence, the ```createGenerator```-initializer of the ```KineticModel``` offers a convenient way to generalize models and ensure consistency as well as re-usability.\n", "\n", "
" ] @@ -208,9 +208,9 @@ "source": [ "#### Excursion: Setting up a model generator\n", "\n", - "In order to set up a model generator it requires a ```name```, an ```equation``` and an explicit description of the used parameters occuring in the equation. For instance, lets set up an ```Example-Model``` with equation ```param * substrate``` and parameter ```param``` for simplicity.\n", + "In order to set up a model generator it requires a ```name```, an ```equation``` and an explicit description of the used parameters occurring in the equation. For instance, lets set up an ```Example-Model``` with equation ```param * substrate``` and parameter ```param``` for simplicity.\n", "\n", - "The algorithm will detect parameters based on the keyword arguments passed to the generator. In addtion, these keyword arguments should include a dicitonary that can optionally be equipped with all prossible attributes the ```KineticParameter``` class can hold." + "The algorithm will detect parameters based on the keyword arguments passed to the generator. In addition, these keyword arguments should include a dictionary that can optionally be equipped with all prossible attributes the ```KineticParameter``` class can hold." ] }, { @@ -276,7 +276,7 @@ "source": [ "### Adding rate laws\n", "\n", - "As previously discussed, all rate laws will be set up as generator objects that are assigned to each reaction using the corrsponding educts/products. In addition, parameters that occur in more than one reaction, are defined as gobal parameters.\n", + "As previously discussed, all rate laws will be set up as generator objects that are assigned to each reaction using the corresponding educts/products. In addition, parameters that occur in more than one reaction, are defined as global parameters.\n", "\n", "Finally, after that has been done, all reactions will be added to the ```EnzymeMLDocument``` object and an overview generated to control the assignment using the ```printReactionSchemes``` method of the EnzymeML document." ] @@ -548,9 +548,9 @@ "\n", "Now that the EnzymeMLDocument has been adapted to the micro-kinetic model, it can be modeled and optimized using PySCeS and COPASI. Since both modeling package interfaces are an integral part of PyEnzyme, called Thin Layer, a simple call to the corresponding Thin Layer object is necessary.\n", "\n", - "But before optimization, it might be necessary to define initial values. Since manipulating the KineticParameter initial_values attributes inside the script that generates the EnzymeMLDocument can get quite tedious, PyEnzyme offers an external data structure from within initial values can be applied. This way, the EnzymeML document is only modifed at optimization and remains untouched until then.\n", + "But before optimization, it might be necessary to define initial values. Since manipulating the KineticParameter initial_values attributes inside the script that generates the EnzymeMLDocument can get quite tedious, PyEnzyme offers an external data structure from within initial values can be applied. This way, the EnzymeML document is only modified at optimization and remains untouched until then.\n", "\n", - "The initialization file is in the YAML format and contains all reactions and their parameters. In addtion, PyEnzyme offers a method to generate such a YAML file, which can be edited manually with the initial parameter values for the optimization." + "The initialization file is in the YAML format and contains all reactions and their parameters. In addition, PyEnzyme offers a method to generate such a YAML file, which can be edited manually with the initial parameter values for the optimization." ] }, { diff --git a/docs/_examples/01_KineticModeling_PySCeS.rst b/docs/_examples/01_KineticModeling_PySCeS.rst index efb1097..7fc4d20 100644 --- a/docs/_examples/01_KineticModeling_PySCeS.rst +++ b/docs/_examples/01_KineticModeling_PySCeS.rst @@ -5,7 +5,7 @@ This notebook is part of the publication “EnzymeML at Work” from Lauterbach et al. 2022 and adds a given micro-kinetic model to an EnzymeML document. Prior to this, experimental data was collected using the EnzymeML spreadsheet and converted to EnzymeML. The following -notebook adresses the following key procedures using PyEnzyme: +notebook addresses the following key procedures using PyEnzyme: - Editing existing species - Adding new species from scratch or by DB-fetch @@ -184,20 +184,20 @@ which requires an equation string for each model. This can become quite tedious and for models, where most reactions share the same rate law quite error prone if done manually. Hence, the ``createGenerator``-initializer of the ``KineticModel`` offers a -convinient way to generalize models and ensure consistency as well as +convenient way to generalize models and ensure consistency as well as re-usability. Excursion: Setting up a model generator ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ In order to set up a model generator it requires a ``name``, an -``equation`` and an explicit description of the used parameters occuring +``equation`` and an explicit description of the used parameters occurring in the equation. For instance, lets set up an ``Example-Model`` with equation ``param * substrate`` and parameter ``param`` for simplicity. The algorithm will detect parameters based on the keyword arguments -passed to the generator. In addtion, these keyword arguments should -include a dicitonary that can optionally be equipped with all prossible +passed to the generator. In addition, these keyword arguments should +include a dictionary that can optionally be equipped with all prossible attributes the ``KineticParameter`` class can hold. .. code:: ipython3 @@ -238,9 +238,9 @@ Adding rate laws ~~~~~~~~~~~~~~~~ As previously discussed, all rate laws will be set up as generator -objects that are assigned to each reaction using the corrsponding +objects that are assigned to each reaction using the corresponding educts/products. In addition, parameters that occur in more than one -reaction, are defined as gobal parameters. +reaction, are defined as global parameters. Finally, after that has been done, all reactions will be added to the ``EnzymeMLDocument`` object and an overview generated to control the @@ -446,11 +446,11 @@ But before optimization, it might be necessary to define initial values. Since manipulating the KineticParameter initial_values attributes inside the script that generates the EnzymeMLDocument can get quite tedious, PyEnzyme offers an external data structure from within initial values -can be applied. This way, the EnzymeML document is only modifed at +can be applied. This way, the EnzymeML document is only modified at optimization and remains untouched until then. The initialization file is in the YAML format and contains all reactions -and their parameters. In addtion, PyEnzyme offers a method to generate +and their parameters. In addition, PyEnzyme offers a method to generate such a YAML file, which can be edited manually with the initial parameter values for the optimization. diff --git a/docs/_getstarted/01_BasicUsage.ipynb b/docs/_getstarted/01_BasicUsage.ipynb index cf58a66..1b9b28f 100644 --- a/docs/_getstarted/01_BasicUsage.ipynb +++ b/docs/_getstarted/01_BasicUsage.ipynb @@ -340,9 +340,9 @@ "source": [ "## Documenting measurement setups\n", "\n", - "Now that the theoretical foundation of the experiment has been layed out, it is time to specify the setup of teh measurement. PyEnzyme offers a lab-like system to document such setups. Typically, experiments involve multiple runs with varying initial concentrations of every element that occurs in the reaction network or/and varying conditions such as temperature and pH. Hence, PyEnzyme builts on top of a **measurement** system, where each of these represent a 'run'.\n", + "Now that the theoretical foundation of the experiment has been laid out, it is time to specify the setup of the measurement. PyEnzyme offers a lab-like system to document such setups. Typically, experiments involve multiple runs with varying initial concentrations of every element that occurs in the reaction network or/and varying conditions such as temperature and pH. Hence, PyEnzyme builts on top of a **measurement** system, where each of these represent a 'run'.\n", "\n", - "In this example, the following setups will be tracked including changing inital concentrations and temperatures:\n", + "In this example, the following setups will be tracked including changing initial concentrations and temperatures:\n", "\n", "| Measurement Name | Species | Initial concentration | Unit | Temperature | pH |\n", "|------------------|-----------|-----------------------|-----------|-------------|-----|\n", @@ -588,7 +588,7 @@ "source": [ "## Saving and distributing an EnzymeML document\n", "\n", - "Finally, the experiment has been finished and meta- as well as raw-data been documented. In order to make the data exchangable, PyEnzyme offers several options for data export. First and foremost, the complete experiment can be exported to EnzymeML which is SBML compatible and thus accessible by SBML-based modeling tools (e.g. COPASI, PySCeS). Furthermore, in regard of the web, PyEnzyme offers a JSON export too.\n", + "Finally, the experiment has been finished and meta- as well as raw-data been documented. In order to make the data exchangeable, PyEnzyme offers several options for data export. First and foremost, the complete experiment can be exported to EnzymeML which is SBML compatible and thus accessible by SBML-based modeling tools (e.g. COPASI, PySCeS). Furthermore, in regard of the web, PyEnzyme offers a JSON export too.\n", "\n", "Apart from raw exports, PyEnzyme can also interface with the federated databases system Dataverse by providing a simple upload method that automatically uploads and processes the document contents to a Dataverse compatible format. Please note, the Dataverse must support the 'EnzymeML' metadatablock for a successful upload.\n" ] @@ -676,7 +676,7 @@ "\n", "**Tips and hints:**\n", "\n", - "- PyEnzyme stores a history in the document, which keeps track of what has been changed and added in the course of an experiment. This is done, to spot potential errors and facilitate teh documentation of an experiment's lifeline." + "- PyEnzyme stores a history in the document, which keeps track of what has been changed and added in the course of an experiment. This is done, to spot potential errors and facilitate the documentation of an experiment's lifeline." ] }, { @@ -732,7 +732,7 @@ "source": [ "#### Special case: From the EnzymeML spreadsheet template\n", "\n", - "Apart from programmatic creation of an EnzymeML document, PyEnzyme offers a way to convert the 'EnzymeML spreadhseet template' to an OMEX file. Since spreadsheets are the bread and butter of current lab documentation, the template widely covers teh data model and thus provides an easy access to EnzymeML's capabilities." + "Apart from programmatic creation of an EnzymeML document, PyEnzyme offers a way to convert the 'EnzymeML spreadsheet template' to an OMEX file. Since spreadsheets are the bread and butter of current lab documentation, the template widely covers the data model and thus provides an easy access to EnzymeML's capabilities." ] }, { @@ -754,7 +754,7 @@ "source": [ "#### Adding a kinetic model\n", "\n", - "Building on top of the previous section about loading an EnzymeML document, this example will demonstrate how to interact with an already created EnzymeML document using the OMEX loader. Since the purpose of an experiment is to generate data from a theory, modeling takes care of the interpretation of an experiment outcome. However, PyEnzyme and EnzymeML are no modeling platforms, but provides a convinient way to interface to such. Hence, this example will demonstrate how such an interfacing could look like.\n", + "Building on top of the previous section about loading an EnzymeML document, this example will demonstrate how to interact with an already created EnzymeML document using the OMEX loader. Since the purpose of an experiment is to generate data from a theory, modeling takes care of the interpretation of an experiment outcome. However, PyEnzyme and EnzymeML are no modeling platforms, but provides a convenient way to interface to such. Hence, this example will demonstrate how such an interfacing could look like.\n", "\n", "The enzyme-catalyzed reaction that has been reported in the course of this example obviously follows a simple Michaelis-Menten-Kinetic and thus will be reported as such. But first of all, the next part will demonstrate how measurement data can be exported to be used by a modeling framework/platform.\n", "\n", diff --git a/docs/_getstarted/01_BasicUsage.rst b/docs/_getstarted/01_BasicUsage.rst index b25e2eb..dd484dc 100644 --- a/docs/_getstarted/01_BasicUsage.rst +++ b/docs/_getstarted/01_BasicUsage.rst @@ -238,8 +238,8 @@ Adding the reaction to the document Documenting measurement setups ------------------------------ -Now that the theoretical foundation of the experiment has been layed -out, it is time to specify the setup of teh measurement. PyEnzyme offers +Now that the theoretical foundation of the experiment has been laid +out, it is time to specify the setup of the measurement. PyEnzyme offers a lab-like system to document such setups. Typically, experiments involve multiple runs with varying initial concentrations of every element that occurs in the reaction network or/and varying conditions @@ -247,7 +247,7 @@ such as temperature and pH. Hence, PyEnzyme builts on top of a **measurement** system, where each of these represent a ‘run’. In this example, the following setups will be tracked including changing -inital concentrations and temperatures: +initial concentrations and temperatures: +------------------+-----------+-----------------------+-----------+-------------+-----+ | Measurement Name | Species | Initial concentration | Unit | Temperature | pH | @@ -427,7 +427,7 @@ Saving and distributing an EnzymeML document -------------------------------------------- Finally, the experiment has been finished and meta- as well as raw-data -been documented. In order to make the data exchangable, PyEnzyme offers +been documented. In order to make the data exchangeable, PyEnzyme offers several options for data export. First and foremost, the complete experiment can be exported to EnzymeML which is SBML compatible and thus accessible by SBML-based modeling tools (e.g. COPASI, PySCeS). @@ -499,7 +499,7 @@ In addition, it is also possible to use the aforementioned JSON - PyEnzyme stores a history in the document, which keeps track of what has been changed and added in the course of an experiment. This is - done, to spot potential errors and facilitate teh documentation of an + done, to spot potential errors and facilitate the documentation of an experiment’s lifeline. .. code:: ipython3 @@ -544,9 +544,9 @@ Special case: From the EnzymeML spreadsheet template ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Apart from programmatic creation of an EnzymeML document, PyEnzyme -offers a way to convert the ‘EnzymeML spreadhseet template’ to an OMEX +offers a way to convert the ‘EnzymeML spreadsheet template’ to an OMEX file. Since spreadsheets are the bread and butter of current lab -documentation, the template widely covers teh data model and thus +documentation, the template widely covers the data model and thus provides an easy access to EnzymeML’s capabilities. .. code:: ipython3 @@ -563,7 +563,7 @@ document, this example will demonstrate how to interact with an already created EnzymeML document using the OMEX loader. Since the purpose of an experiment is to generate data from a theory, modeling takes care of the interpretation of an experiment outcome. However, PyEnzyme and EnzymeML -are no modeling platforms, but provides a convinient way to interface to +are no modeling platforms, but provides a convenient way to interface to such. Hence, this example will demonstrate how such an interfacing could look like. diff --git a/docs/_getstarted/02_Validation.ipynb b/docs/_getstarted/02_Validation.ipynb index 92cd295..e3f9a57 100644 --- a/docs/_getstarted/02_Validation.ipynb +++ b/docs/_getstarted/02_Validation.ipynb @@ -70,7 +70,7 @@ "metadata": {}, "source": [ "### Using an example spreadsheet\n", - "Since the blank validation YAML wont demonstrate all types of checks, we are going to use an example that has been provided in this directory and convert it to YAML." + "Since the blank validation YAML won't demonstrate all types of checks, we are going to use an example that has been provided in this directory and convert it to YAML." ] }, { @@ -94,7 +94,7 @@ "source": [ "### Performing validation\n", "\n", - "Once the YAML file is ready, validation can be done for an example `EnzymeMLDocument` found in this directory. The validation for this example will fail by intention and thus return a report taht will be shown here. Such a report is returned as `Dict` and can be inspected either manually or programmatically. This was done to allow automation workflows to utilize validation." + "Once the YAML file is ready, validation can be done for an example `EnzymeMLDocument` found in this directory. The validation for this example will fail by intention and thus return a report that will be shown here. Such a report is returned as `Dict` and can be inspected either manually or programmatically. This was done to allow automation workflows to utilize validation." ] }, { diff --git a/docs/_getstarted/02_Validation.rst b/docs/_getstarted/02_Validation.rst index 82a84c5..f1df2da 100644 --- a/docs/_getstarted/02_Validation.rst +++ b/docs/_getstarted/02_Validation.rst @@ -57,7 +57,7 @@ is extended, the spreadsheet will be updated too. Using an example spreadsheet ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Since the blank validation YAML wont demonstrate all types of checks, we +Since the blank validation YAML won't demonstrate all types of checks, we are going to use an example that has been provided in this directory and convert it to YAML. @@ -74,7 +74,7 @@ Performing validation Once the YAML file is ready, validation can be done for an example ``EnzymeMLDocument`` found in this directory. The validation for this -example will fail by intention and thus return a report taht will be +example will fail by intention and thus return a report that will be shown here. Such a report is returned as ``Dict`` and can be inspected either manually or programmatically. This was done to allow automation workflows to utilize validation. diff --git a/docs/_getstarted/03_Visualisation.ipynb b/docs/_getstarted/03_Visualisation.ipynb index d291abd..fe7ea14 100644 --- a/docs/_getstarted/03_Visualisation.ipynb +++ b/docs/_getstarted/03_Visualisation.ipynb @@ -52,7 +52,7 @@ "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAA1cAAAHsCAYAAAA+UFdvAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAADJoUlEQVR4nOzdd5wkdZ3/8den88SNM5uXzSy7RFlAQRQEBJVkBu8UI+hxJkwYfsbjznDq6SkemMAIqKiAgCJIkJxhFzYnNs5snNixvr8/qnqmZ6YnbvfMzuz7+Xj0o2JXfau7v9X1qW8oc84hIiIiIiIiByY00gkQEREREREZCxRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5ERERERERKQMGViIiIiIhICSi4GkXM7DQzO7lE26o2s2vMbJ2ZrTCz+83spCFu614zWzaI9eeY2fIh7ut8M7tyKO89EGZ2oZktKZge1DH3sd3bzWz8ANd9a/BdeaXY91imvHLI55VvmdlKM3vOzP440PcdapRPDvl88rUgjzxjZn8zs+kHuv+xSPnk0M4nBe/5pJk5M5vc37oKrobIzCIjsNvTgJJkcOAnwB5goXNuKfBuoN8fzEhzzt3inPv6COz6QmBJfysNlnPu9c65fQNcfTnwJuD+UqejnJRXRsYhnlfuAo50zh0NrAY+W+r0lJryycg4xPPJt5xzRzvnjgVuA75Y6vSUmvLJyDjE8wlmNgs4C9g80B0c9C9gDrAS/0e5HPg1cCbwILAGODFYrwr4GfA48DRwQcH7HwCeCl4nB/On4V+oPhNs99RgfkvBvt8CXBeMXwd8B/gH8G1gPnAn8GSw/cUF6/0oWG898OogXS/mtxWs91rg4SBNvwOqg/kbga8E858HFgfHsAPYGqT31AP4POcDG4BwL8v/FXgs2M81+fWAluC4nwLuBuqC+fcC3wjes7rgc+ztc58DLA/Gw8C3gu/sOeCyYP4VwM+C8aOC76cS/0T0g4LP+fvAQ8Hn/JYix1IF/AV4NtjG24EzgD8WrHMWcHPBMV4VrP8IMAX/pLon+MyeCT6/3o65t+Pp7be2Ef/E2iOdfXx/9wLLlFeUV5RX+s4rwfveCPxa+UT5BOWTvr7DzwI/Uj5RPkH5pNh383vgmPz7+v2uh/ojGc5X8IPIBl90CD9D/Qww4ALgT8F6/wn8azA+Pvjgq4IfRiKYvxB4Ihj/BPD5gi+mZgAZ/DY6f/B34999ADgJuKdgvRsK0tfULe3HBl/q/UBV8J7PAF8s+NI/HIz/G/CTYPzLwCd7+YxOD3483V8PFVn3fAp+4N2WHQHcCkSD6auBdwXjDviXYPyLdGa0e4FvB+OvB/4ejPf2uc+hM4NfCnwhGI8DTwBzg8/qfvwLoyeAU4J13k3XDP67YN0lwNoix/Nm4McF0+OC72UlnSeo3wDnFRxjfvybBWm7joITSB/H3Nvx9PZb24j/W+iRzj7yw730HVwpryivgPJKfvmtBL915RPlE5RPuh/PVcBL+BeWdconyiconxT73r5X+L5i32HhaySKV4dqg3PueQAzWwHc7ZxzZvY8/g8G/LsR55vZJ4PpBDAb2Ab8wMyOBXLAomD548DPzCyKf5J4ZgDp+J1zLmdm1fhR9e/MLL8sXrDerQXp29kt7XOAmfg/ygeD98fw76Tk3RwMn8SvCtYn59w/8E8cB+oM4Hjg8SBdFUBDsMwDbgzGf1WQRuia3jnBeJTin3uh1wJHm9lbgulx+CfNDWb2bvw7ENc45x7sJb1/cs55wAtmNqXI8ueB/zazbwC3OeceADCzXwL/amY/B14BvCtYP41/Es8fy1m97Le3Yy56PPT/WyuaziFSXumD8sqhk1fM7PP4F4e/LrJY+aQPyieHRj5xzn0e+LyZfRb4d+BL3VZRPumD8snYzidmVgl8Ptj+gI2m4CpVMO4VTHt0HocBb3bOrSp8o5l9GdiJX6QXApIAzrn7zexVwBuAX5rZt5xzv8CPoPMS3dLRGgxDwD7n11XuK72FaS1Mbw64yzl3cT/vzzGA78nMTge+W2RRm3Oue13hFcAxZhYKMkeXTQHXO+cG0kah8HMqlt6PU+RzL7K/Dzvn/lpk2UL8ouK+GtkWfrbWfaFzbrWZHY9/h+O/zOxvzrmvAj/Hv0uUxD9pZ4O3ZFxwe4L+P/tix9zr8fTyW+svnUOhvNIH5ZWObXVN4BjLK2Z2CXAucEZBOoulCZRPelA+6dhW1wSOsXxS4Df41aO6B1fKJ31QPunYVtcEjp18Mh+/BOzZIOidCTxlZic653b0lsCx1qHFX4EPW/AJmNlxwfxxwPbgx/xO/KJBzOwwoME592Pgp8DLgvV3mtkRZhbCLxrtwTnXBGwws7cG2zIzO2YQaX0EOMXMFgTvrzSzYncXCjUDNb2k5x/OuWOLvHo0wnTOrcMvMv1KwWe10MwuwC9uf4uZ1QfzJwafE/i/l/xdgXcA/+wnvUU/927+CnwouKuAmS0ysyozGwd8D3gVMKngbsSgmN/7UZtz7lfAfxN8x865bfh31b6AX+zcn14/+256O57efmt9prOMlFeUV7oYS3nFzM7Br+5zvnOubQBp6SuNyifKJx3GWD5ZWDB5Pn6VraFQPlE+6WKs5BPn3PPOuXrn3Bzn3BxgC/CyvgIrGF0lVwPxNeB/gOeCH+5G/DuXVwN/CDLjP+i8A3Ia8Ckzy+BH6fniySvxiyfz9ZCre9nfvwA/MrMv4BfD3oDfKK5fzrlG84tef2tm+SLtL+DXVe7NrcDvg4z4YXdgVcfej99Acq2ZtQG7gU85514IjudvwQkuA1wObML/3Jaa2ZPAfvwGin3p7XMv9BP8Yt2ngu+sEb93mO8CVwd3Fd4H/MPMhtJL3lHAt8zMC47lQwXLfo1f9/eFAWznBuDHZvYROk9yxfR2PKdR/Lc2kHQCYGZvBP4XqAP+YmbPOOfOHkDai1FeGTjllVGWV4Af4FcVuiu4hnnEOffBAaS9O+WTgVM+GX355Otmdjh+qc4mYCh5BJRPBkP5ZPTlk0EzV7S2hEhPZtbinOvtZDfqmNkPgKedcz8d6bTI2KK8ItI/5ROR/imfjD4KrmTAxlIGD+4AtQJnOedS/a0vMhjKKyL9Uz4R6Z/yyeij4EpERERERKQExlqHFiIiIiIiIiNCwZWIiIiIiEgJjOrg6pxzznH4/f3rpdeh8Boy5RW9DrHXkCif6HWIvYZE+USvQ+w1aKM6uNq1a9dIJ0FkVFBeEemf8olI/5RPRPo2qoMrERERERGRg4WCKxERERERkRJQcCUiIiIiIlICZQuuzOxnZtZgZsuLLPukmTkzm1ww77NmttbMVpnZ2eVKl4iIiIiISDmUs+TqOuCc7jPNbBZwFrC5YN4S4CJgafCeq80sXMa0iYiIiIiIlFTZgivn3P3AniKLvgt8mq7dG14A3OCcSznnNgBrgRPLlTYREREREZFSG9Y2V2Z2PrDVOfdst0UzgJcKprcE84pt41Ize8LMnmhsbCxTSkVGP+UVkf4pn4j0T/lEZOCGLbgys0rg88AXiy0uMq/og7ucc9c655Y555bV1dWVMokiY4ryikj/lE9E+qd8IjJwkWHc13xgLvCsmQHMBJ4ysxPxS6pmFaw7E9g2jGkTERERERE5IMNWcuWce945V++cm+Ocm4MfUL3MObcDuAW4yMziZjYXWAg8NlxpExEREREROVDl7Ir9t8DDwOFmtsXM3tfbus65FcBNwAvAncDlzrlcudImIiIiIiJSamWrFuicu7if5XO6TV8FXFWu9IiIiIiIiJTTsPYWKCIiIiIiMlYpuBIRERERESkBBVciIiIiIiIloOBKRERERESkBBRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5ERERERERKQMGViIiIiIhICSi4EhERERERKQEFVyIiIiIiIiWg4EpERERERKQEFFyJiIiIiIiUQNmCKzP7mZk1mNnygnnfMrOVZvacmf3RzMYXLPusma01s1Vmdna50iUiIiIiIlIO5Sy5ug44p9u8u4AjnXNHA6uBzwKY2RLgImBp8J6rzSxcxrSJiIiIiIiUVNmCK+fc/cCebvP+5pzLBpOPADOD8QuAG5xzKefcBmAtcGK50iYiIiIiIlJqI9nm6r3AHcH4DOClgmVbgnk9mNmlZvaEmT3R2NhY5iSKjF7KKyL9Uz4R6Z/yicjAjUhwZWafB7LAr/Oziqzmir3XOXetc26Zc25ZXV1duZIoMuopr4j0T/lEpH/KJyIDFxnuHZrZJcC5wBnOuXwAtQWYVbDaTGDbcKdNRERERERkqIa15MrMzgE+A5zvnGsrWHQLcJGZxc1sLrAQeGw40yYiIiIiInIgylZyZWa/BU4DJpvZFuBL+L0DxoG7zAzgEefcB51zK8zsJuAF/OqClzvncuVKm4iIiIiISKmVLbhyzl1cZPZP+1j/KuCqcqVHRERERESknEayt0AREREREZExQ8GViIiIiIhICSi4EhERERERKQEFVyIiIiIiIiWg4EpERERERKQEFFyJiIiIiIiUgIIrERERERGRElBwJSIiIiIiUgIKrkREREREREpAwZWIiIiIiEgJKLgSEREREREpAQVXIiIiIiIiJaDgSkREREREpATKFlyZ2c/MrMHMlhfMm2hmd5nZmmA4oWDZZ81srZmtMrOzy5UuERERERGRcihnydV1wDnd5l0J3O2cWwjcHUxjZkuAi4ClwXuuNrNwGdMmIiIiIiJSUmULrpxz9wN7us2+ALg+GL8euLBg/g3OuZRzbgOwFjixXGkTEREREREpteFuczXFObcdIBjWB/NnAC8VrLclmNeDmV1qZk+Y2RONjY1lTazIaKa8ItI/5ROR/imfiAzcwdKhhRWZ54qt6Jy71jm3zDm3rK6urszJEhm9lFdE+qd8ItI/5RORgRvu4GqnmU0DCIYNwfwtwKyC9WYC24Y5bSIiIiIiIkM23MHVLcAlwfglwJ8L5l9kZnEzmwssBB4b5rSJiIiIiIgMWaRcGzaz3wKnAZPNbAvwJeDrwE1m9j5gM/BWAOfcCjO7CXgByAKXO+dy5UqbiIiIiIhIqZUtuHLOXdzLojN6Wf8q4KpypUdERERERKScDpYOLUREREREREY1BVciIiIiIiIloOBKRERERESkBBRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5ERERERERKQMGViIiIiIhICSi4EhERERERKQEFVyIiIiIiIiWg4EpERERERKQEFFyJiIiIiIiUgIIrERERERGREhiR4MrMPm5mK8xsuZn91swSZjbRzO4yszXBcMJIpE1ERERERGQohj24MrMZwEeAZc65I4EwcBFwJXC3c24hcHcwLSIiIiIiMiqMVLXACFBhZhGgEtgGXABcHyy/HrhwZJImIiIiIiIyeP0GV2Y2xcx+amZ3BNNLzOx9Q92hc24r8N/AZmA7sN859zdginNue7DOdqC+l/RcamZPmNkTjY2NQ02GyJinvCLSP+UTkf4pn4gM3EBKrq4D/gpMD6ZXAx8b6g6DtlQXAHODbVaZ2b8O9P3OuWudc8ucc8vq6uqGmgyRMU95RaR/yici/VM+ERm4gQRXk51zNwEegHMuC+QOYJ9nAhucc43OuQxwM3AysNPMpgEEw4YD2IeIiIiIiMiwGkhw1WpmkwAHYGYvB/YfwD43Ay83s0ozM+AM4EXgFuCSYJ1LgD8fwD5ERERERESGVWQA61yBH/jMN7MHgTrgLUPdoXPuUTP7PfAUkAWeBq4FqoGbgvZcm4G3DnUfIiIiIiIiw63f4Mo595SZvRo4HDBgVVCdb8icc18CvtRtdgq/FEtERERERGTU6Te4MrN3dZv1MjPDOfeLMqVJRERERERk1BlItcATCsYT+KVLTwEKrkRERERERAIDqRb44cJpMxsH/LJsKRIRERERERmFBtJbYHdtwMJSJ0RERERERGQ0G0ibq1sJumHHD8aWADeVM1EiIiIiIiKjzUDaXP13wXgW2OSc21Km9IiIiIiIiIxKA2lzdd9wJERERERERGQ06zW4MrNmOqsDdlkEOOdcbdlSJSIiIiIiMsr0Glw552qGMyEiIiIiIiKj2UDaXAFgZvX4z7kCwDm3uSwpEhERERERGYX67YrdzM43szXABuA+YCNwR5nTJSIiIiIiMqoM5DlXXwNeDqx2zs0FzgAeLGuqRERERERERpmBBFcZ59xuIGRmIefcP4BjD2SnZjbezH5vZivN7EUze4WZTTSzu8xsTTCccCD7EBEREZFh4nmwaw1seMAfet5Ip0hkRAwkuNpnZtXAA8Cvzex7+M+7OhDfA+50zi0GjgFeBK4E7nbOLQTuDqZFRERE5GDmebDyVrjmVLj+XH+48lYFWHJIGkhwdT8wHvgocCewDjhvqDs0s1rgVcBPAZxzaefcPuAC4PpgteuBC4e6DxEREREZJnvWwR8vg0y7P51p96f3rBvZdImMgIEEVwb8FbgXqAZuDKoJDtU8oBH4uZk9bWY/MbMqYIpzbjtAMKwvmhizS83sCTN7orGx8QCSITK2Ka+I9E/5RKR//eaT5h2dgVVeph1adgxPAkUOIv0GV865rzjnlgKXA9OB+8zs7wewzwjwMuBHzrnjgFYGUQXQOXetc26Zc25ZXV3dASRDZGxTXhHpn/KJSP/6zSc1UyFa0XP+83+AVIvaYskhZcDPuQIagB3AbnopVRqgLcAW59yjwfTv8YOrnWY2zTm33cymBfsTERERkYPZxPnwxms6qwZGEjBzGTz5c7/tVbIJcmk/AHvjNbD4PAgNpPKUyOgzkOdcfcjM7sXvZGIy8AHn3NFD3aFzbgfwkpkdHsw6A3gBuAW4JJh3CfDnoe5DRERERIZJKOQHTJc9AO++DT74T3jXrX4g1brbD6xAbbHkkDCQkqvDgI85554p4X4/jN/zYAxYD7wHP9C7yczeB2wG3lrC/YmIiIhIuYRCMHmh/8qrnQG4rutl2qFpa9f1RMaQfoMr51zJu0QPArVlRRadUep9iYiIiMgIyLfF6t7Zxe2fgguuhorxfmcYNVP9qoWqKihjwGDaXImIiIiIDEyxtlgnfgCe/x389Cw/mPJyaoslw8vz/KqpZQrsFVyJiIiISOl1tMVa4nfLXh1cyB75ZvjJGX5gBX7g9Yf3+222Ji8q64WvHOLyD7y++VLIJv2A/03XljSwV3AlIiIiIuVRrC1WqqUzsMrLpeH6N8DsV8Cav0E2pRKtQ8VQS5Kcg3QLtO+F9n2Q3Fdk2G1ZayPsf6lzG9mkX7J62ZKStQNUcCUiIiIiw6dYW6xwDCbOgxdv7ZyXaYebPwAffFAdYIxVuRws/z3c+mE/oA7H4KQPwqSFkNrfe5CU3AfJ/eBle9+2hf12fYnx/rBiAsSquwZX0PnAawVXIiIiIjLqdG+LlS+hqpgI15/bdd1sCn75Rjj67XDEeTDtGDDzl5W57cxBYbiPcaj7yyT9ACgf/AxkPLkP2vd0LcXMpeGh73dOW6gzOMoPxx/mB0qF87oP84FU/reSt2sNXHNq18A+WuFXWS0RBVciIiIiMnx6a4u1Z13PEq1QFKqnwD+/Aw/8N4yb7QdZi98ALQ3w5w91DdDKWYVwJAKdlbf2DEJLdYzO+cFMNukHsek2WH0n/P2LnaVIy94LE+b6pUTFSpDywVI22ceODBK1fsCTD37GzfTHU81+yVV3b/4pLHwtxGt6BkgHorfAfuL8ku1CwZWIiIiIDK9ibbF6u/BdfJ5/Eb/qdr/a4OM/hkd+2HV7mXb4w/vgtVfBhDl+YBCOQSQO4SiEg2Ek3rksvzwU7j+9pQh0nPOrseXSwSsTvNKdQ69g3p4N8Jcruj6E+ffvg1M+4gcd2VRnYNTnsI9lfcml4dH/65yOVXcNkCYv6FpS1Nt4vLb3z3jXGlj1l54lSdOO8QOyUustsC9hkGzOuf7XOkgtW7bMPfHEEyOdDJHhMuRbN8orcogZUl5RPpFDzMGZT/KlQ31d+Cab/Kpj93+rNPu0UBB8xSAS6xZ8BUPnwfZn/WHh+6YdC6FIEBgNIHAqtXDM7/EuEj/w4d7N8ND3eu7jol/DwrP94LTUyl06d+AGnU9UciUiIiIiB4diJVrdJWr9NlgP/6BriUckDm/5uV9lL5uGXMoPbLKpgqAnHUxn+lieHy9Y3trYNbACfzqXhsQ4CI8PArKoPwxFO8fD3ce7Ly+yTigaVHu83E9HxzEm4N23w5QlfkBYygBk1xp4/NqepUiTDy9PYAXDUpI03BRciYiIiMjo0lsVwkWvK8+FeW8dIbz1uvL1ZOh5fslZ92Ocflx5jnEY2iMVNZCAehRRcCUiIiIio8twl3iMROAx3Mc4BkuRRoKCKxEREREZfYazxGOkAo/hLtUZY6VII0HBlYiIiIhIfxR4yACMWDmfmYXN7Gkzuy2Ynmhmd5nZmmA4YaTSJiIi0sHz/PYWGx7wh57X/3tEROSQNJKVKD8KvFgwfSVwt3NuIXB3MC0iIjJy8t0EX3MqXH+uP1x5qwIsEREpakSCKzObCbwB+EnB7AuA64Px64ELhzlZIiIiXe1Z19mAHfzhHy/z54uIiHQzUiVX/wN8Gii89TfFObcdIBjWF3ujmV1qZk+Y2RONjY1lT6jIaKW8ItK/fvNJ846uXS+DP92yY3gSKHIQ0P+JyMANe3BlZucCDc65J4fyfufctc65Zc65ZXV1dSVOncjYobwi0r9+80nNVL/L5e5eehxyObXFkkOC/k9EBm4kegs8BTjfzF4PJIBaM/sVsNPMpjnntpvZNKBhBNImIiLSqfuzbSJxGD8H7v4KrPgj7FoF2VTnM28Wn6dnwoiIHMKG/R/AOfdZ59xM59wc4CLgHufcvwK3AJcEq10C/Hm40yYiItJFx7NtHoB33wYffBA+9BCc+knY8ZwfWIHaYsnBQT1bioy4g+n22teBs8xsDXBWMC0iIjKy8s+2mXOqPwxHYN5pPdfLtEPTVl3gyshQz5YiB4URfYiwc+5e4N5gfDdwxkimR0REZEDybbG6d3Zxy4fh8NfDk9dBNqnqgoc6z/NLM5t3+L+ZifNL9ztwDtKtkGqCVDPsXOGXnubS/vJ8aeplS/TQW5FhNKLBlYiIyKjUoy1WAk66DFb+BR79v871Mu1w86V+VULnleciWwamnIFOb/tbeWvnb6Qw0PayQVDUBMkgOMoHSckmSO0vGO++rKlz2vVTKpXv2VLBlciwUXAlIiIyWB1tsZb4F6/VwcX6/DPgF+d3XTeXhps/4LfRymX8QOxN16o0azj1Fej09R04B5k2SLdBpjUYtkG6pWC8tfi8lp2w9u+dAVCmHW56F4TjkEv1n+ZwHOI1kKj1h/FamDi3c7z7slQz3PHpzpIr8I+zeuqBfXYiMigKrkRERIYi3xarsFSgdnrP6oL1S2BrwdNHskn43bvhuHfC/NNh2rEwYQ6Yda4zEqUsw7m/Uu+zIwhqDYKcVki1dE7vWQ//+E/wMv76mXb43XtgwZkQChcESK0F40GghBt4OkIRiFZBrBIsVLxk6Yhzof4IiI/rGSDFayARzI/EB/cZeB5UTuwZQE6cP7jtiMgBUXAlIiJSKt2rC0Yr4NRPwO/f03U958Ezv4anrvenE+Nh+rF+oDXtGGjbDX/7wvC02xpqqc5gOOdXhcul/R4WM0lYfTv89XP+dDgGJ38YphzZGeDkg6Si083dlrUyqCAIwOX80sTKyX4wFKuG6ikQq4JoZcEwWJYfj1b5yzrG8+tWQSTWuf1da/xOJQoD7WgFnPbZ8lTT6600VaWjIsNKwZWIiEipFLvAda5naVa0At5/tx9YbH8Gtj3jDx/+YWfpSl6mHW66BOoO9y/iQ5HgFQ6G0W7TBcvD0SLr598TTLfv7brfTDv8/r1wwvv9oCKX7gyKCof9zculIZv2q8BlU/QZ/OTS8MC3i3yeET8NseogoAletTMLpoNl8equ04XjrY3wm7f7wWrhd3DJreVrj1Qs0C53SVKx0lQRGVYKrkREREqp+wWu5xW/yK47wl93xss635tNwdO/hr98vNtGXWeVMS8LuawfuHht/rSXC4a9vQqW5zL0W8rjZf2OOSzkt/2JxPzSpY7xbvMStQNbLz9v32Z45Ic993vh1TDnVZ2BUWFJ0IHwPL+d23AHOipJEjnkKLgSEREpp8FcZEfiMPfU4iVdF/6odCUSntcZbO1aBT87p2upTiQBl97rtw0qh11r4Mmf9TzGmSfC+Fml399IBToqSRI55Oj2iYiISLl1fxBxXxf1+epk0Qp/uhylLKGQXyoUq4Spx/ilOoX7e9O1MPnw0u2vu+E4xu4G8x2IiAyRSq5EREQOJsNdyjISpTqqMiciY5SCKxERkYPNcFcnG4nqa6oyJyJjkIIrkQLO80hv2kS2oYFIfT2xww7DynwndST2KSIiIiKlp+BKJOA8j+a77mLbZ67EJZNYIsH0b3ydmrPOKmmw4zwPl07jkklyySQtd9/Nzm98E9Lpsu1TRERERMpPwZUc1MpdquM8D5dM4rW1kVy1mq2f+jSk0/6yZJKtn/wUdR/5COHaWlwqhUun8FIpXLJgPJXGpfLj/stLF85Pdoy7VAqXyfSenmSSbZ+5krmLFhGfO7dkxyky2qmEV0RERoNhD67MbBbwC2Aq4AHXOue+Z2YTgRuBOcBG4G3Oub1D3Y/nOTbubmVnU5IptQnmTKoiFLIDP4BD2HBf3HQvSSIeZ+oX/x+VJ5yAa0/itbXi2tvx2tqCV+F4G157G67XZf60a2vrOxGZDI3fLvJgy2iUUCyGxeNYIk4oFvfH43FCsRjh6hpscoJQPIZ1LIsRisexeKJjPL1tG3uvu77rcSeTZBsbhyW48nI5WrevJte0nXDtNKqmLSIUDpd9vyKDMVylyr3R/4lI/5RPRHwjUXKVBT7hnHvKzGqAJ83sLuDdwN3Oua+b2ZXAlcBnhrIDz3PcuWIHV9z0DMmMRyIa4jtvO5Zzlk5VRh+ioV7cuFwOr7UVr6WFXEsLXsHLn/aXea3dpltayO7dS2bz5s6NpVLs+PwXBpReSyQIVVYSqqjwh5WVWGUF0YkTO6Y7llVVYhUVeK1tNH7/+1BYshSLMetHPyK+YH4QGMWxWAwrUQCS2rCBfTfc6AePBWmP1NWVZPt98XI52p/7EzW3X97xUM3W1/+QiqMvVIAl/SrnzRbnnF9ttrkZr6WV5OrVbPvUpzry5nCW8Or/RKR/yicinYY9uHLObQe2B+PNZvYiMAO4ADgtWO164F6GGFxt3N3akcEBkhmPK256hsUfOZV5ddUHdgCHIJfJ0Pb0Mz2rzF3xCWrf8AYsFCoaHOVaW/svGQIwI1RVRai6mlB1FeGqakLV1URi0a7BVWDiBz5AxdKlhKoquwRKVllJqLKKUEViSMGP8zxis2f1CCCrXvHyst0djx12GNO/8fUe+4wddlhZ9leodftqam6/nOeTU8hZiGMz66m6/XKa65ZQM/1w2LMOmndAjbpIlq76utniMhn/HNDcTK7jfNBccH5o7ry50tzS48ZLfpxcru80DFMJr/5PZDQZqeqzyicinUa0zZWZzQGOAx4FpgSBF8657WZW38t7LgUuBZg9e3bR7e5sSnZk8LxkxqOhOTmmMvmBnkSd55Hbs4dsQwOZhgayOxvINnS+Mo0NZBsaye3eDc713EAuR/Pf/054/LiOgCg8fjyxWTMJBdOh6irC1cF4fp3qfCAVvCori6Y7tWEDG974ph6lOuPf9MayXFBZKETNWWcxd9Eiso2NROrqyv7HVM599pdXck3bIdNO1sIcF1oHQDadInb/VVC/EB65GrLJzod7Lj5PAdZBqpQXVC6dJtfU5L/278frGG8i17Qfb38T6W1babn7HvD886xLJtn60Y9BJALZbL/7sFiMUE1NcH6oIVRdTXTmzM5zRXU14ZrO84bX2sqO//zPjps7EJTwTp48pGPskpZ+8smh8n8io185q88qn4gM3IgFV2ZWDfwB+JhzrslsYMXGzrlrgWsBli1bVuSKH6bUJkhEQ10yuhkk096YqRPc10kUM3L79pFtaOwMlhobOoOo/Pxdu3peCJkRnjSJSH0d0bp6KpYeSaS+HkIhdv3f/3WtMhePM/cPvy/bneORKNWxUIj43LnD2plEufbZX14J106DaAVHpddzQ/bVbHDTeXX4WU5a+1dYfWvnipl2+ONl8MEjwXkqzTrIFDsXTPuPr1F5wgl+6VFhkLQ/CJSCICkfRHUEUE1NuPb2PvdnlZWEEomOwKpQ7TlnE1+4iFBNdddAKT9eU+OXUkfCkGqCVDMkg2HH9P5gfFvHMpfaTs2/hMhu30Vyb5gdz05j+mcuJVZb9C9gcJ9fP/mk2P9JLGLU1yQOeN8y9pW6JMllsx1thvOvfNvj1MZNNHzzmx3/66WsPjuUfGIUPU2IjHkjElyZWRQ/sPq1c+7mYPZOM5sWlFpNAxqGuv05k6r4ztuO7SiijoaNWDjEZb96kguOnc6fn9lKKutGdZ3g5MqVPavpfezjROrrye3diyu4w5sXHjeOSH09kfp64vPnB+N1ROrriQbzI5MnY9Foj/c6zyO+YP6wBzrDXZJ0KKmatojW1/+Qqtsv56LMfawKLeDj8S+zbm+WD4dv5v2RO0hYEEx7Odyj12BPXa/SrAE4kAsq53l+O8XmZnLNLXjNTUHboxY/EGpuIdfcFFSpayazs4H2p57qKF12ySTbPvmpPvcRqqoiNK6WcO04wrW1xOYcRqg2mB5X22U8XFNDqGDczCO1ejlbL7sE85KEox6hqCNcGabutHFEqvdAcqMfIO1qgq3dAqhkE2Ra+/8gLAzxGkjUYhYinN6GzZ5FaP5U5r7xlcTW/S/WciRMnj+gz3Wouv+fAEyuijNFwdWoM5xV5lw6Ta61laa//pWd//lf/n91NMqk97yb+OGH+73UtnZ2ruS1B4FSvvOlXuYX+2/vMx3DVH22ez6JhY1wOMRHb3yGn19yApXx8Ki/qS0yUOaKVfcq5w79IqrrgT3OuY8VzP8WsLugQ4uJzrlP97WtZcuWuSeeeKLosnwJVUNzkvqaBJXRMB+58Rke27Cny3qJaIjbD/I6wV4qRWrlStqfX05y+XKSK5aTWruuaFW9ypNPpmLJER1BVMerro5QPH5A6ej4Y1KgM1KG/G/UW17p3ltgrH4B//uXx7nm0UbG0cJ3oj/iVeHnITEekvu6vjlaAZc94JdgqX1WB+d57L/1Vrb/vy92XFBN+Jd3EJ8zB6+11Q+UmprJtTR3CZQ6A6aW4tVwC1gs5gdA1dVgRnrDhh7rTLjkXVQec0xnYFRb65cixRyWa/NLiJJNnSVFHdP7uk13W55L9f8hRKsgUQvx2o4AiXhNMF3bbbqmYN2CZdFKv8oBwK41cM2pfilqxz6C39/khUU/ov4T2VOv+aTg/2TT7jY+84fnueiEWXz9zUcPZTcSGNZgp1gJ79f/i+rTTsO1t3f2PNveHgQ9PUuGuvQ621swFIzTxyM3egiHu3SyZJVBZ0sV3TpfqgzaFufnd6znD7N79rDlYx/vUX127h9v7i24Kls+qa9JkM56vOe6x9nbmibnHJnc6L6pLYesQf9QRyK4eiXwAPA8flfsAJ/Db3d1EzAb2Ay81Tm3p+hGAn0FV8U8tLaRd/zksR7zb7j0JF4+78Dr7peCS6dJrllDcvkKksuX0758Oak1azqK+cMTJ5I46kiiM2ey76bfdTmB93MSldGv5MFVMU9u3MWe5X/n2w/tY6U3i/dH/8qHzz+FcX+5tOfKSy7wg6lDpH2Wc86vcrtjB5kdO8jubCCz0x9md+wgs3Mnme3b++7IJRQiVFPjlwjV1PhV5oJAKVRbG7Q1qiFcW0MoaI8UrkoQihvheIhQDEKk/ZKgdCuZTSvZfe3/EXJpQlFHKOoRrghRfdLRhCOua4CUaur/IKOVQZAzzg90EuN6Trc04p69gey0M8hmKwlXholuuR07/3uw8LUQKnFvk54HK2/1q6cGPVv28zsr6UVjd9+8cyVX37uO7110LBccO2MouzrkDbZ9kHPOf25gPoBpbfWDoLY2vLbWrvPbCh7D0erPy+7ZQ3L58n5vXPQpEunsRKlYMNQt8Mk0NrLv17/psZlp//WfVJ10ElZRQaiqCotGGWjTiL4Moc1VWfMJwKPrd3PRtY9Q+KmPhpvaMrYN8sbOoPPJSPQW+E96T+gZ5dz31HEVPeoER0LGpKoDK9EZKpfNklq/nuTzfmlU+/IVpFau7Cj2D40bR8XSpVS/970kjjqSiiOPJDJ1KmaG8zyqTjxxRHqZk7FtQlWCT75Yx2Wn1vP3dS38ZMvZ3PX3EL8Iz+awXEHvjRaCVXd2LcnItMPv3wdv+A4seA3UzugsfcjzvGEt6XLZLOm1K8ju3ElkylRiC5ZgkZ6nPpfNkt21KwiSGsju3EFmx06yO3d2BlA7d/aslhMKEZk8mcjUqcTnzSM2dw6t99yFRRyh/CvqqLv0EioXz8EshWXaINUC6VZI54eNndNtrbC3YLnrvee8KDD1mOAYPPCyIaxqPJZsgNppMHFu8QCpx3QwHu5ZLbiHXWuwp64juuH3dKwdrYBJC0ofWIH/+1h8Hly2BFp2QPXIlpBecdYiHtuwh8/d/DzjK6LEIqFRX92pXKVILpcLqrg2B9Va/WFq/QZ2/eAHXdoHbf34FVQuOx4cPYIlr61t4A14zDqDnaoqQpWVuFyuaGA17i1vIbFoYecjOyoq/F5ni5QMWSw2qGNPbdjA/j/c3KNTpopjjyU6ffqgtjUQB2NVes85un/q6uhCuhuuUmznHF5bG0133MGOr37NL+WNx5nxzW+U9LmJw15yVUqDLbnq/hyGkIHn4JT5k7jitYtIZ70h/0H298Nwnkd64yaSK/yqfe3PLyf54osdjcdDVVUkli4lceSRVBzpD6OzZvV5N0vV9A45w1Jy1T2fRMNGNBzCvCz/FbmW87mv85lYNeMI/erNvW8sVu1X26pbDJMX+a+mrXDXF4elpMtlszTf8We2fuFrkEpBLMaEN59PZOpMso27/AAqKHXK7trV4+LNolEik8YRnVhNZFwFkXExotVhIlUQrcgRSaSIRNqwdPPgSof8rfufT6yq8xWv6TodK5yuhnh11+lYNbQ24m79KOnZbyabTBCpzBHb/HvsHTf2VmXuwA2+JGm4lf2O/JY9bZz9P/fTls7hYFRXd+qzgyTn/PZ+zc1BxyfNfhXWLsNgWXOz31lKwTyvdQDt6wrE5szxq7Hnn0FYWFJUlQ96qgrmdV9WiSUSPf47e+t9tpy1PUb64dcDUPZ8sr6xhdd//4EeHV1c/S8v4+ylU8dEB2NjzXB351+0yu5//SdVp5yCa0/i2tsKqt52a4vYUY23SBvF9q5Vdl2+ym6RuKfU1WcPqeAKutYJrquO88j6PXzplhVkPf9zGMofZPcfBvE4Uz7zacLjxpN8YYVfxW/FCr8tBf6XmDjiiI7SqMSRRxKbM+dgOdnKwWtYgivoWXd+x/4k77nuMVJZx6une5w5v4qfveC45eLp1Fx/ete2MJEEnPc9v9Rl12poXAmNq6F5W+87rJ7ivy8chVAUwpFgWGw64g/Dsc7xYJkjRHpPitSOFlLb95PcuIP2VVvIpazHxxeKh4nUhIlWQaQiRzSRJhJrJ5JI+YFTpUc45vUoeMPCRUp/xnVMu2QzqW172fvXR8m15XChOBPffgGVxx2DzXlFZ0AVqShNIDJSgU6+BPIgKEkqYlguGs/+n/vJ5Dr/Q0dLdSeXTpNtbCSz0y+ZbX/hBfb87Oc9ni1mlZX9P6vQrLOaa22+A5QawjW1ftXWbsNwrd9hSm7fPjZfepl/0yO/qTIGOyMV6BzkN0HLnk+K3ayrikdoSWZ5w9HTuHP59lHVwZjnPDY1baKxrZH6ynpm184mZOX9PodznwPNJy6Xw8sHPu3tnePJJF5bOy7Z3jHfaw+CoI7xpL8s2Y5raye7fx/pXvoRGCirqOhsm9ilum6VP10wL7d7t9+sppvZv7ieqhNPLLr5waZnRJ9zVVa9VD0KhYx5ddUdf35m5l8PBDdVkhmPj9/4NIs/+qoB/0GmN21i66c/0/knkUqx86tf87cfjRJfvJja886l4sijSBx5JPH584pWS5KDwDBXWRuxffajez7Z2ZQklfVPfPdtC3HfNj+Yer59Iq+48P+wP32w48LeXfh/2BHn9zyG5H547ndw+yd67nDa0VAxCbwM5DLgZf1hLu2Pp9uCZVnwMrhsmmxThuSuHKndOVJ7HKl9Rnp/CJfrPA9Gq7JUTM4QH5clVp0lWpkjFPWITq4hMnlKH1XlugZMXdYp7GihCNu1hvhv3s7E976PbHuESEXWL0ma/QGYOO8Av5kiRqrKXCjkl4yVq3TsILezKdklsILSVnca6t1jr7W1s1rrzp1kd+zs2i6woYHcrl0DSkP1K19JfOHCokFSx7C6ekjBgvM8ZnzzG8NWtX2kqsyNxOM9DiahkHHO0qks/sipHTfrJlTG+NiNz/DnZzpvuI2Ghw57zuPvm/7O5//5eZK5JIlwgqteeRVnHnZm2YIdz3k8sPl+dq9dzrhmj621YTbNX8qps181qH166XTHg9q91tbOB7a3tgXz/Pnprdtouu22jhst+Z6oo9OnBwGV3/nLYHuthCAASiQIVVT4gU8iCHoqKosGVuMvvojE4YcXVNcN2jRWVXYNmCoqBpWPUxs2sP+WW3uUYkfq6gZ9TL0Zm1f4g7iTu7MpSTrb9UtNZR03P7WFj5+5iE172notsna5HK0PP8LuH/+4y923vKlf/QrjL7xw0PW0pcBwBh7DVQKQy/rtlLIpyCRh9e3w18/50wdf9Sqg+DNMAC7/7bO84ah5HHvCb5li+9lt46kNLeY0jB6pT4yDea/2j7F7r29n/1fRi3TnHNnGRtJr15Jas4bkmjWk1qwhvXYdXmv+xBgmMmUK8SULqVq4kPjChcQXzCN+2Gwym1ex6b2X0r4rCc7IZQyLVzD3huuILD6mpJ9Rh4nzsTO/RPyPlxEv/B1NLGOX4Yd4oDMSessTv3pkM0umjWNXS2rI1Z1669mu8oQTyDU0dARN2YadPdoFes3NPbYXHjeOyJQpRKZOIbF0CZEpU4lMqSc6dSqR+il4qSSb3vmuHqVIdR//WNmCgpF6aPuhHOiMlO436wAue9Vc7lvd2GW9/M2JOZOqBlxd8EBKdZxztGZaaUo3+a9UU5/jje2NrN+3nphFCBMik8vwyfs+SSKSIGIRzIywhXsMQxYiZKGiy4xgnVCIEKEe63rtSWLbGqlatZWKthxVmRCJ6TNZU3UNE3Jx4imPeNIjlswSS+WItGeItKcJt6cJtacItSahPYll+n+4O2ZYItGjBBvniM6YQXTmTD84qqwIAqUKf7wjSEp0liAFr/y0xeO95u3equxOfNe7ypJXh+MZqmOzWmCxbnsjCfjgP3t0G72JqZz9vX/2eOCwc3DE1BpeX+843LWyr7KWyYcv4LTFU8hu3sS+P/6J/X/+M9kdOwhVV/v1OAt+kOq5rwRKHex4nt/OJ5v0t9d9uHst3PFpv7QkLxSBEy/z28LkUpBNdwZGuXTvwx7zCt7r+mmU3XsX08NWLbC77lU7EtEQl5+2gL+9sJPnt+7vsm6fVaM8D7fmb6RXPUu21YhUQezwo7GFr/Ubua9ZQyoIpFKr/UAqt79z++EJE4gvWkR8wQI/iFq0kPiCBYRra4um229zdSvb/t9XO0+iX/siNa87r7ylxwd3lblDwbBXd4pHjFMX1nH3ygYmVMZoTma6dD199hH1ZF/a3GdJVK6lhfTGTbQ9/jgN3/52z4e8d1fQmUp0Sn2PoCk6dQqR+npCFRV9biaXy9J4x63s+0JnPhn/H1+k7nXnEQ6XL5+MRBUr6aLs+aQ3xdpiAbzl+BksO2wiX751Rcd/TW/VBfMlSZ974HOkvBSxUIz3HvleFk5YSHO6ud+gqTndTK6PzoLCFqYmVkNtrJbaWC0GVO1LUfPUWiraclgkTPYVx5GbUcfkyjpyLofnvC6vnMth6SyRliTR1jTR1iSxtjTRljSxNv8VbcsQb80Qb8sQb8uSaMuQaMuRaM8SyfZ/jZ6MQnsM2uP5ofnDYF5bHJIxo63LOtAeMzLxMLmqOF5FHEskCDsjtHk7sYwjmoWI5wi7MJXHv4yq2klEQhEioQjRULRjmB8vnD+Q8fx7zRnNDz9I+/evJdKeIhKJM/lTn2DqmW8gEasgGop2BJul0L00cH9NiEkLjuyrNFBtrgDY8ABcf27P+XNfBRPmwHM3dpQSuAv/j4eiL6dx80omu73ssolUT1vEim1NXHvvGlKZHG/Y8DBv2PIE0195ItGN6/GefxZCIapOfSXj3/hGqk47jdb77juYG62WRjlLkZyDfA9qqWZIN0PDSrj1Iz2DnePfHZR+JCHbHgx7CZgy7Z3rDOT5PH0JRSES99v6dB8WmxeJQzgOkVi3YcHyfZv9bsy7e/dtMOfU7nNHLLiCnu2w5kyq4pH1u4o+3uCqC5fyjpMO63EydJ5H0x13sO2zn/N76QmHiS+YT27PXrKNnXcxQ9XVfvC00A+e4ov88cikSYNL8+BPoiWhi8YRNywXjcXyxG3PbeOKm54l6zmOqYETp1fxbLvxozltNH7uc/7d2ViMie98J+Hx48ls3kR6w0ZSmzaSa+y7ut74f3kHVSee5AdSU6f6D33v5SaBc46MlyGdS5P20qRzaTK5TMd44byXml/i/579P06tOJKKpCOVCHN/+3Ncfty/M7t2NrFwjFgoRjwcJxqOEg/HiYVi/vxwjEho8AHYSFWxUr7sYsSCq+43J2IR4/jZE3l0w26cg+PmxDhmbpqa2DhueSLFz959EnMnV7GtdRur96xmzb41PN3wNA9ufZCe/RF2ClvYD47itR1BUo/pXsarolVd/sN2vfAMjRe/u2tNpUiEqre+kVg0gbe/idz+/eSamvyOXfY3kWtqwhWp2VQoVBO0RSx4sHv+Ye6pfXto/cOferxn4rf+k8mvPgOrqCAbcqRyqc5XNtV1Ongls0nSuTTJXLdhwfydrTvJNjaSXbeBdMgjGzGyM+vJVcYJhyNkvSxZL0vGy/QY7ytQPVCGEQvHiIaiHeecWChGNOwHaPnxWChGJBwsC0U75uXfFw1Fac20cvOam8m6zptXiXCCm867ibnj1KHF4EquLAyVE6C1259X7XTcGV/BbvtIlzYj273FbHrv+/jr1GOoa9/HyduXk8hlaKubxox/uYhJb7yQ6JT6js0c5I1WD1yxUqQL/w8WnNnZXXSqqSA4Kjbd3PnqmC4Ipvor0SkUSfivaEUwrIRowu8kINp9WcEwWlGwTrdh6y740wf9wLtwP++/G+qXlKfkYXAPRx3R4KqY9Y0tXPn7p7jymBhrNu/mzt1x7tuSwnOweGoNb102iwuPmkLlxjW0PvYYLffeS9uTT3UciAekY0bo5S/DW7KA7JzpZA6bSnbyOLIuRy7/8vw7gvkTeLFxz3lkXbZzXZdlb3Ivt667tctJP2IR3rX0XcyonkFFpIJEJEEinKAiUtExXTg/EUkMrm77CFw0Sg/DctFYrF3UU5v2kPvn/fz5zw9yz9SjqW/fy8uT2zlp1UNMbdnVI2HhSZOIHXaY36nRrOk0Ta1mfXYnL976K7aPy5GMQSYM2VgYO+FYqIj7QVE/gVPWG0A1oBIJW7gj0CoMuroHYYVBWiqX4u7Nd/fImx84+gPMqJ5BPBKnIlxBPBInEU4QD8e7jCci/nCggd1I5cuDPKAbseAKIJvL8eKu9exsa2BKZT1HTJ7H7c9v55qHnmLFljTh+E4iNSuYXZ+ioqKFxtRmWjItHe+fXDGZ5lQzJ1YdwYxsDV5FnLtanuSjx3+Uk6efTG28lspIZb8lHi6d9h/D0dhIpqHBDy4KXw3+MLd7d6+dLoSqq4MAaRzhcV0DpHDhg9zz48E6oZoaLNz74yuSGzawsUiVuTk3/4HEvNK34d24fyP//vfLuWTca5nYYuypdly//2/875k/6C3w6JD/L84HXMUCsGLjL+x+ge8//f0e27vo8IuYVj2t43yXyWU6tlt4Dsx4/rkvm8v2mJc/L2a9bJdzZLGA/Gdn/4wTpp5Q7NAUXAG9VydLTIBfnNdjdReKkJt4DJmKxYTGTyGy6U80pN/Kvut+6S8HNtRO44ZFZ/DAjGOoqYjyxuNmcNEJs1ky3a+O5OWybNr9Ao2tO6mvmsLsSUsIlbE6RcdxHmhJkpfzOxpo3wvt+yCZH+4rmLcP9m+BDfcPLgDqYH6nAPHqoKvpYBiv9ud3ma7xu5+O1/jpuu2jPYOdyx6AukVDSEc/RqLXtcHt86ALrjKZDI133krT//taR6mtfeFzPNUWZfP9dzN9/YssbdxBRca/gNo2Ocxzsz1emG1smGo0jANXhp6hIhYhZCHMjNSBllhCR5A1kGAsnUv3uCsWDUX5+qlfZ/HExVTHqqmJ1hAdyPOkBuggv4AbCWW/aCzWS2z9FR+nfe9+mq+9pke3/rsS49hUU0/IUsRDu2ivaqPxXa9n5/QoW5q3sKV5C7uTu7u8pyIFVUlH1DMiEycRqamhNj6uI0jJ35XNBy75u7PF5hUu6/6+XW27uPKBK0l7nbUEYqEY//HK/2BSYhJpL00qlyKTy5DKpTqDuJw/Pz/eY37BdPd5LZkW9qe6Vikeikgo0iPgyo8nwomOgCzjZbj3pXt7BHPvP+r9TK+e3vG+eCTeOV74Kph/MAd0gzwXjFzJVZHP5orjr2Bz0zZ+vfJ6POc6+g1yuQReairTK+fxillHct7i41ladzi7W3fR/Pe7CP/HDzv+f3JfuJzqM8/ksPFz8JLJrgFS0cCpgdy+fT0TGAoRmTSJSF0dkfp6v7ODaJR9N93UtbpuPM7cP/yexIIFB/R59Ga4e7kcid/sxv0beeutbyWZ6wwg+ylJOuD9veWWt5DyOq8NVHJVoM8MXqzNw551PUoJ3JI3kd30IuGmlXhpY8/aKvatqyaXNEIxj1DEI5cKeiBLVND4g19w85Ysty/fQTrrcczMcVy0bCZVNU/ztaf/s/PHeOLnOHP+eeULsDwPb83f2NT4HI0GU9MpZtYeRmjqUX4wlNznB0btezvHuwdM7fv6fyZPpAIqxvvdXe/b3HP5yy6BqUcFwVFh4FTw6qd3tb6OcUSCneFuKzPwfY5ocJXLZdm39kXSDTuI1U9l/IIj2LNmBU9d/i42jUsTcsbkJsesRqgMrtG2TIIVs40XZlby3JQ6khVTWbBlPydu2MLU1hbCHoQjUaqu/DhT5y7taPwbCUU6GvXmxyMWIRwa2PK8YifteCjOda+7jimVU0hmk7Rl20jmkiSzSdqz7R3D9mw7yVyRedlkr/Pz431VU+lIRzhOdbSamlgNNbEaqqPVfuBVMF4bq+2cH63pGNbE/PFIKKKSsuJKetFYrIQqtW4dG978Fr96ay8csLsG1r/9FfylZRVrpmfJxgu7Njcmxacwb/wsZtXOYlbNLGZWzyRkIb77xHd4z7hzmNQaGtTd46E4WC6o4qE417z2Guor60lmkx1VmVK5FMlcsqO6U348metcp/u87sub0k3sSe4pSdrDFu4/GAvHyXgZHtr2UJeALmxhLl58MVOrpnapttQl8C0IkIutEwv76+U7Ucgbwvc4YsHVhv0beNutb+vy/edFLMIrqo/iiFw9FTUTuX7HcxxbeSmPr3XsaEpSHY/w+oUTeEOkkclXfY5QprDpQIjojBnk9u/HaypyfRON+u0U6+qCwKmuc7yujmgQSIUnTuxRonSodOefD9B3te9icsVkDqs9rOylu8N5/hmOfDJ2g6tiijSmd7NPZcM7L/M7Gwg+isSkDHXH5aiatLcjJsh6sDcxnj21E9hTOYGd0QRr0rCmPcMOz6MlkqMt2kYmnCJsHhFgRmU9NZFKYhYiQZiYGXGMuMsPIQ7Enet4xbwcCc8j5nkkvBwxL0c8lyXuZf1hNk08myaWSUKmlUy2nQrPo/dCZfz2PYnxfpBUMaFzPBFMd4wXWR5N+NsYXPW10lHHAIVGLLjKN3jf+4WvsLE2xcq5Udrnz6B21VaOWpuhPrgBvasWdo6D7KuWUXfuhcw87Ehm1cwiYgnufnEnP3toFU9uaMHDmJBsYm5LA4ctncq8YxZy+uHzWVBfTSLa5695UEbionHDvg289da3drkrFgvF+NQJn6IqWkVTuomWdAstmRaa0820ZFpoSbfQnGn2p4Nl7dn2Pvbiy5ee7U3u7RLQhS3M+fPPZ0b1jC4BW5cgLtoZoA3FQV5aVrKLxvwFVcfjNiIR4vPmkd64sWh3xJO+eRV//+mXuf/wHMsPM/ZX+0mZaNUsXtnKjG1R9kTms2bhmazcP4WcF2FSVYzXLK7nrCVTOHVhHfGojViJx1i9oOotmPvx2T9mauXUou1QerRb6aUtS2/z96f2s7NtZ8mPJc+wzhLJcIyQhdjdvrvLuaDUd+RhCG0Tu50rZtXM4roV13H1M1eT9tIYxuzYFPa4Fr768q8y7alNhL72g44Hv3vnnk5s/EQqGprZu3Yj6S1bqGzZ13UfGJ4ZYecRP/54qhYv7ihx6gii6usJjxt3QIHJmG8CMkJG4vwziP0puOqL8zya//Y3tl35Wb8aRyRCePz4Ls/8aI3Bpimw56Nv5bd776DaRdjrtbOfHK7Ixxt1jkm5HJNyOSbnPGo8jyyQNCNtRsqMVCgYBq+0Gclg3DuQ3k+cIxKkIeocEYx5NbOoq5pGTWI8NYmJ1FbWU1MxkZp4TZfGnPk739HQAKsmFZaUhYx6D2bXHUVo4WsP5WBnuA1bcNW9lGp7cie3fe8KmuJZFm2Dozc4KtKQjYbYV+mIpxw1wTWLJRLU3fgLJh1+VI/tPr5xF49vf5RVL+6mcU+Uzak4O9riZIMbuyGDOZOrWDy1hsVTazl8ag2Lp9Ywa0LlkB8sOVovGjNehtZ0K82ZzoCrR2CWbmH9/vU8sPWBHu+PhWJdqnn1piJS0SPgKgzE8ueKwunKSCXPNT7Ht5/4NikvdTCWlpXsorFYN8GYUXP22TTffTdkMgBsmwj3Hhfl/lPGsSezj5o2OGa9x9LtEY5/82VcE3mYN1Qs69KO4b9O+R6bGiq564Wd3LOygeZklngkxCsXTGbmxAriiT1UVLRiXg1H1i/gNYdPOagfsDpYw5k3D6bSud+84TdMr57epb1cvo1IYRXLwjYi3duZdF8nk8uwtWUrD257sEc6StmWBAbZq2ZBp0JVTRn+GV7Po6lVbG/bzgSr4nUPtPOaJ9LUZqN4Z55CZQqS/7ivZ9umUIjotGlEZ84kOmsmoekzeHJ3ln88u5l7ph/LnopxYEbUyzJjfAULZkxkXl0VcyZVMXey/5pSGy9Zj3NySNFDhPOKVeNoX7mSrZ/6dMefIdksyRisWBDmviUeK2eF2F0bfIa7/whAI3T5WD+09L2cOPNUJlVMYlLFJGoi1ax+6TE+cc8HyXg59qWmk85MJp2ZSnXocLa1hEi7CCkXwSIxZk0ex9wpE5g/dSKHT6thXl0Fk2tCfp323u6KFdwZy99ZW797FTdvuJUskDUjf497XDhCY6qR5ub1NKWaurT7KKYyUtlRLakw8KqN+8OaqD9eHa1mdft6frrhRtJemngoztemH8nZRs/nGZXQQX53fEzKl1Jt+dpXeGJmiv3VIQ7b6XjDZkfEg2SEjhsNdVd/j7r9zX4XznR24Tx+wRFFtz2pKsFN/0xw3rJ5zFnYzPHZGm55PMlXzj+a1nSOVTuaWLmjmRXbmrhj+Y6O/9fKWJiFU2pYPKXGD7im+cHXxKr+nyEXshBzx80tS3Wq3vZ35mFnsnDCwgO6aIyGooxPjGd8Ynyf623cv5HHdzxetL76zJqZfjAWlIwVDvMBWr70LB+sNaeb2dayraNErVi1ne6SuSSfvO+TLJm0hOnV05kQn8D4xHgmJiZ2GR8f94ex8OCf/TdS54JsQ0PXwArAOSre8Vb2nbKEx2/6AX85JseqWf6z3Y6bMI9w02YunX4eddMi7Kl2XJN8hLcuuYgvP/Rl/8K+xb+wXzplHkdNDXHu0dPJ5Dwe27CHu17Yye3Pb+fulQ0FO9xPyJ7kohNmsXTGOKaPr2BG8KqKj96/8eHMm6XKl4Mxu3Y2V73yqh4B3YIJC4atdC4RTjC5YnLJ91VMseuul5o2M+mxNTx3y4+56eU5PIOX76zlM8njmXrb44Ry+baJGUJ33Eu6trZopxGzfvJjqk8+ucu8pY3NzL7rLi76zrdYH5/ItvHTeOk159EwrpbNe1q5f00j6Wxn28fKWJjDJlUxb3IVcyZXMndyNXMnVzJnUhUTq2IKvKRkxmTJVY+GxtEoiSVLSL74AqQzJCPw9Hz40ytCbJjmn+Dq98OiLR5zdkeYcda5zHr5mXzigU/1bPB27k3MHd/1j2Dz7iaWN9zFl578escJ9CvHX8mR9WdRV1PFusYWVu1oZvXOZlYGw+37O09+1fEIi6ZUc/jUGhZNqeHwKTUsmlrD5Op4r8e+cf8G3tqtvnL39DnnaM+2dzzvIX8hVfiMh+7zO8ZTTTRnej6MsrtoKEp1tJrKaCVV0SqqolX+eKSq63S0iqpIVZf1uq9bGa3s8oczChoDD7eSl1wV+zPcft9dPPL1TxDO5FiwzQ+eW8cnsFSGyvauz3Kru/EXjF9wRFDKtZNY/RTGLzii12fjFHteVm/PMGlLZ1m9s4WV2/2Aa9WOZlbtbGZPa2dpTF1NnMVT/Txz+NQajphW26NqYb677KE+0PVgV+58kvEyPQK0pxqe4ofP/LDHuosmLCLrZdmX2se+1D68XjrAqYpWdQRaExITuoxPiE/whwXjlZFK7t5894i0JentAZfu+u/wruc/RTKXoi40jqOrF/FcegPfPu07NLY39kjra2a/hpeaXxrQhf1DaxuLPuIgbEau23/2uIooM8ZXBAFXghkTKroEX5Or4wP6vY/1fDJSDvLSuZJXny1sjzTlC5+noXUn999yNbGMY9EWx/h8k8P8A0W7mf2rX/LS+z/QI78Ve26o5znuXbmTxlVrmdDWxN7KWuqC55GGQobnObbtb2fjrjY27GphQzDcuLuNl/a0kfU691+biHSUcM2ZXNVlvDYR7bJP5ZNDzuivFmhm5wDfA8LAT5xzX+9t3d4uGFMbNrD+wjd2eRaBZ7Dx5Dn8dsZmls+B2Y3G4VscR+yMUPnB9xH2XJfqGj8484es3rt6QCcpz3M8uHYnzttIKrebeHgSFprDKQt6r8Kxvz3Dmp3+xeLqHX7QtWpnM/vaMh3rTKqKdQZcwXDRlGpqElGyuRx/Wfc3/uOxL3ak7wsnfpU3zH8tkT669RyMnJejNdtKU6qJh7c9zFcf+WqPdV4353XUxmtpzbTSmmmlLdPmj2c7p9uybb1eZHVXEanoCLwiFmH9/vU92pK8fu7rqa+s97v5Dbr7zTcqjoVjxENdGxnHwjES4UTnusErHOr6OY1UxwAd3dG2NjClyu+OtpfvsKTBVY+2JOEw2foJRLb71WR3jIdYBia0QmTKFCZ/7CM0fOVrB/yQ0WLPBhron5NzjsaWlB9oBflm5Y4m1uxsIRXcoSysWriovoa2TI7rHtpAOuv6DOZKabj/gDu7NG5kSmVdX7+hkhhI7045L0dTuom9qb3sTQavfsZ769kxYpEepfDD1Zak2EXjpq9ewlVtN7M3tbdomg6rPeyALqiLPWA1EQ1x67+/kppElK372ti6L8nWve1s2+e/tgav5mTXzykWDjFtfILp4yoKAq8EM8ZXMn18gunjK4iFQwO+6VFKw51PRuLC+CA/F5S3+myBljhUpTp3OO2aq9nx0St6djH+pz+SXrVqwJ1GDPX/JJPz2LK3nY27Wlm/q5WNu1rZELy27W/vEvdNro4xd3IVh02qIp31uGP5djI5RyxifOX8I3nDUdOoikcIl+l7VT4Z8f2N7uDKzMLAauAsYAvwOHCxc+6FYuv3Fly1Pvoomy95N+A/H+T+pcYvzzDaE2FODi/ibT9Zy7QdKf/u4xc+wrZlM7nyn5/rcUENDPgP8kAuGPPyF46rd7R0BF2rdvolXW3pzhKDGeMrmDmhghe37+ekhTGqKpKYq+ThVRm+fP6RzJlcRSwcIhoOEYuE/PFIiGjYiIVDQyr63rB/I28rdjFVpCSv2HG1Z9tpy7Z1BGHdA7GO8YJlW1u28tyu53psryJS0fF8hAMRsUiX4CxEiO2t27sEcyFCHD/leGrjtR0903V/2njEIp3j3ZYXvqdjmXW+1wjx2Pan+eWLPyXtpUmEE3z+xK9ybvEguaTBVXL9eja+6c0df24OWDkTViypYsHGNMesznTs0BIJ6n/3a5yXG1AJ1XDLBfkvH3Dlqxdu3t1WtN++GeMrGF8ZpSoeoToeCYZhqmKRLvOqeswLdyyrjBV/YvxgSudKYbj3B/4F3G3r/sZVBTd3+vjdDkj+PJEPtPYk97AvtY+9yb2s2LWCOzbe0eM9P33tTzlx2onFNleyi8bCNiOJphS/yz3KE60vsmD8As6ffz5XP3N1yW/GHMh32pTMdAZce9v9IGxfZxC2symJ1y1TTKiMsq890+WCMhyC954yl2njKkhEwySioc5hJEy8y7wwiUjn+EAuMg+FfDIKjrFk+aTwussBm+vg/iONptkTef3dzczd0lnjoL8gChjRTiOSmRyb97SxvrGVjbtbOwKwdQ0t7G7tvR1rLBKiIhqmMhamIhqmotuwMpYfj1ARC1EZi5Aosn5lLNwxPx4J8fC63Xz+T8+TGoYbhMonpcknB1tw9Qrgy865s4PpzwI45/6r2Pq9BVe7Vz3PtovfyZ+PTXPbiSFaK4yXrzYue8s3aJ1Ywe61yxnX7LG/JsSkBUdyyqxXDri6xkjwPMfWfe0d1aJW72zm6c372Lynrf83FxENW0fgFQ37wVcsCL56m5/OeuxK7mRN09PkXJpwKMzSCcczq2YmNYnBt58YiN3t+7jnpbt6dGP7mllnMaliPM55eGTJkSbn0nhkyLkMHulgmCHn0uTI4HUMM8H6ncvz67dkm2ls3wbmAR4WDKtjVURCITxyOHJ4Locji9cxnsMji+PAnk6eS00iHN9NIpzgZ2f9hqOmlPchwrsevI/G932QF2bC44uMh5YYp7wA//bO/yW6e7/fjuoAS6lG2j9W7uQ91/U8R5w8fxIV0TAtqSyt6SytqZw/nsp2uZHRFzOCwCvcGXzFIpjBI+t3d7mADYfg3KOmU1tRumdb5TW1Z7jt+W3kCgqHy7m//D7vWbmTOfVhLJTGeTE2NuR4zeIpZdln4bkgFN1DbNIDfeUTKOFFY7Euo8MW5sZzb2ThhIVlq/JViht2xWRyHjv2dw24ntq8l3tWNpYg1b5o2IhH/OArP+wIwoLgLOs5HljTOObzyXDus9j+EtEQt3/kVObVVRd7S8nyye5Vz9P49nfREEvy/QvCrJppvHqFceV7f07tpl0HZRA1WA+v28XFP360x/x/ffls6qoTtGdytKeztGdytKVzJIOhPz/XOT+doy2TI9f9LscgJKL+dVo4ZERCFgz96XDHdOcw1G29ULfl+fe0p3Pc/eJOcsOUL2Fs5pOD7UppBvBSwfQW4KTCFczsUuBSgNmzZxfdyEvjMoSu/Dce3/i/HPGSx9seizDz0svxpk3l1CnHsGn8Yexq38W8gj/D4WzwPlihkDFrYiWzJlZy5pIpgF9t5HXfu59UtjMHRMPGl85bwqSqOOmcRzrrkck50tmcP+yY57/SWY90zhWZ54+3pbPsb3dkch772zM0NIVIxJZhzuGc8fRex+p4I9FweU6GmZyHeSeQzbXh3wszIuFK/rmqlUi4t26qw0BF8Brs/rK0Z5qhS1mHEYrWEO0lqLDgFYKgxMsDyxUMc0GwlvOng3EXLMu6NMlcM+ARrthMOP4QyVySnW2NHMWBdXHfX15JTajCEgnuPyrNS3XGZ2/KMbcpQfjfa6k78VVEFy44KEupBuOwSVUkoqEe1av+48IjezuJkvMcbd0CrtZUtiMQa0nlus5LdV23oTnVo2Qg58E9qxrKklcyOa/Ln0S595ffZ3Mqx/Mv5QNR/25uOY8xfy4IVWymtv5xPnDE50i1TzjgbfeXTxrbGnt06pFzfpXHcv53hELGvLrqXn+nQxUNhzr+T/LWN7bw0Lqu1RDjEeOP/3YK08dXkMx4JDM5ktlc53jGH09lO8c7hsG8VNafl+r2/n1tGfa2pQ+JfDKc+yy2v2TGo6E5ecC/o/7yyUvjMoQ//2/s+fkP2Topy0dvD3HSW/6d3eNDzFh0FnMXLSoaRMXnzu3RlupgNaU2UfT/5L2nzB305+ucf02WTHu0ZbK0p4sHZMu37ecnD2zo8f4zjqinviZBznNkPYcXDLtOex3TuYJl7ZlcMM//veQ8r2Od1lS2S2AFyidDcbBdLRWLDrt8zc65a4Frwb97Umwj4ysm8u/hP3PxsZcwtS3GntMdn93/J/634syDPpAaqDmTqvju248btmLUfBuA1lT+F+kXT//58lNK/udfuM/3Xvco5y0bTyjSjJet4dYnUvzs3SeVZZ8bdzVz16a7ufbFqzqq+Vx6xOc567BXMmdyTcn3B/D8zjW896539KhuOaWy7oC33V9eyU2vI/eFy3nv139ApCVFOHi6fWb6ZMLhiN+VepHu1EeTOZOq+M7bju2RT+ZMqur1PeGQUZOIUpMY2h2z3trLlCuvDPf+RmKfXc8FNXjZ7/Kbe1Kc+e7EAW+7v3xSX1lPIpwYsR7YhkNv+WTx1NqyVQVSPhm+Y6yvKX8+GV8xkX8P/YlLrngPX2jO0PaBaMd1l4VCoyqI6s1Q/k96Y+aX7sYjYcbR+3/N0TPH8atHNvX4Tj9x1uHKJyXeXynySd6YrBY4Uh0TDLdyVRvpbV+HQj3ce1btZHnDWlyoeVieLTPItislrRZY2JaksJrsqbNfpXxygPs7yOuPj7p9jmRbEv2flG9/B/lvaNTtU/mk/JRPSm8UHOOob3MVwe/Q4gxgK36HFu9wzq0otn5fD7Ib7geHHgqG+6QyEvsciWMcRO9OJe+KXfmkPA6F3+1BfowlfTiq8kl5HOS/oVG5T+WTsecg/w2Nyn2WO58cVMEVgJm9Hvgf/MYzP3POXdXbuoN5SrjIGFDy4EpkjCrpRaPIGKV8ItK/Ud+hBc6524HbRzodIiIiIiIig6HyWhERERERkRJQcCUiIiIiIlICB12bq8Ews0ZgUz+rTQZ2DUNyRpKOcWzo7xh3OefOGcqGB5BX9PmODTpG35DyivIJoGMcK5RPykvHODaUJZ+M6uBqIMzsCefcspFORznpGMeGkTxGfb5jg45x7O57uOgYxwblk/LSMY4N5TpGVQsUEREREREpAQVXIiIiIiIiJXAoBFfXjnQChoGOcWwYyWPU5zs26BjH7r6Hi45xbFA+KS8d49hQlmMc822uREREREREhsOhUHIlIiIiIiJSdgquRERERERESkDBlYiIiIiISAkouBIRERERESkBBVciIiIiIiIloOBKRERERESkBBRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5GETM7zcxOLtG2qs3sGjNbZ2YrzOx+MztpiNu618yWDWL9OWa2fIj7Ot/MrhzKew+EmV1oZksKpgd1zH1s93YzGz/Adb9sZlvN7Jng9foD3f9YpbxyaOeVYP0Pm9mq4Dv75oHufyxSPjm084mZ3Vjwf7LRzJ450P2PRconh3w+OdbMHgnyyRNmdmJ/74kcaAIPVWYWcc5lh3m3pwEtwEMl2NZPgA3AQuecZ2bzgCNKsN2ycs7dAtwyAru+ELgNeKGUG3XODTZA+q5z7r9LmYZyU14ZGYdyXjGz04ELgKOdcykzqy9lWspB+WRkHMr5xDn39vy4mX0b2F/KtJSD8snIOJTzCfBN4CvOuTuCm9rfxP9N9LmDg/4FzAFW4v8olwO/Bs4EHgTWACcG61UBPwMeB54GLih4/wPAU8Hr5GD+NOB+4Jlgu6cG81sK9v0W4Lpg/DrgO8A/gG8D84E7gSeD7S8uWO9HwXrrgVcH6Xoxv61gvdcCDwdp+h1QHczfCHwlmP88sDg4hh3A1iC9px7A5zkfP3OHe1n+r8BjwX6uya+Hf3L5dpCuu4G6YP69wDeC96wu+Bx7+9znAMuD8TDwreA7ew64LJh/BfCzYPyo4PupBN4N/KDgc/4+/glvPfCWIsdSBfwFeDbYxtuBM4A/FqxzFnBzwTFeFaz/CDAFOBnYE3xmzwSfX2/H3Nvx9PZb2whMLpbOIsfyZeCTyivKKyiv9JdXbgLOVD5RPkH5pNd8UpBeA17Cv+BXPlE+UT7peix/zc8HLgZ+0+93PdQfyXC+gh9ENviiQ/gZ6mf4J4QLgD8F6/0n8K/B+Pjgg68KfhiJYP5C4Ilg/BPA5wu+mJoBZPDb6PzB301wMgJOAu4pWO+GgvQ1dUv7scGXej9QFbznM8AXC770Dwfj/wb8JBj/Mr1cXAOnBz+e7q+Hiqx7PgU/8G7LjgBuBaLB9NXAu4JxB/xLMP5FOjPavcC3g/HXA38Pxnv73OfQmcEvBb4QjMeBJ4C5wWd1P/DGYN4pwTrvpmsG/12w7hJgbZHjeTPw44LpccH3spLOE9RvgPMKjjE//s2CtF1HwQmkj2Pu7Xh6+61txP8t9EhnkWP5crD+c/i//wnKK8orKK8UyyvP4F8kPQrcB5ygfKJ8gvJJb9dYr8p/lsonyiconxT7bjbj34DYChzWW17Kv0ZTtcANzrnnAcxsBXC3c86Z2fP4Pxjw70acb2afDKYTwGxgG/ADMzsWyAGLguWPAz8zsyj+SeKZAaTjd865nJlV40fVvzOz/LJ4wXq3FqRvZ7e0zwFm4v8oHwzeH8O/k5J3czB8EnhTf4lyzv0D/8RxoM4AjgceD9JVATQEyzzgxmD8VwVphK7pnROMRyn+uRd6LXC0mb0lmB6Hf9LcYGbvxg8krnHOPdhLev/knPOAF8xsSpHlzwP/bWbfAG5zzj0AYGa/BP7VzH4OvAJ4V7B+Gv8knj+Ws3rZb2/HXPR46P+3VjSd3fwI+Br+Sehr+Hey3ltkPeWVPiivHBJ5JQJMAF4OnADcZGbzXPBPGVA+6YPyySGRT/IuBn7byzLlkz4onxwS+eRDwMedc38ws7cBP8Uvwe3VaAquUgXjXsG0R+dxGPBm59yqwjea2ZeBncAx+JF2EsA5d7+ZvQp4A/BLM/uWc+4X+BeveYlu6WgNhiFgn3Pu2H7SW5jWwvTmgLuccxf38/4cA/iegjYG3y2yqM05170h5grgGDMLBZmjy6aA651zn+1vn3T9nIql9+MU+dyL7O/Dzrm/Flm2EL+oeHofaSj8bK37QufcajM7Hv8Ox3+Z2d+cc18Ffo5/lyiJf9LO1+HOFFyA9ffZFzvmXo+nl99af+ksPJadBdv6MZ0not7SBcorPSivdGyrawLHUF4BtuBXN3HAY2bm4d+lbOzl81A+6Ub5pGNbXRM4tvIJZhbBDyKO7ydNoHzSg/JJx7a6JnBs5ZNLgI8G47/Drybbp7HWW+BfgQ9bEPab2XHB/HHA9uDH/E78okHM7DCgwTn3Y/xI9GXB+jvN7AgzC+EXjfbgnGsCNpjZW4NtmZkdM4i0PgKcYmYLgvdXmlmxuwuFmoGaXtLzD+fcsUVePXq4cc6twy8y/UrBZ7XQzC7AL25/iwUNwM1sYvA5gf97yd8VeAfwz37SW/Rz7+avwIeCuwqY2SIzqzKzccD38KsrTCq4GzEoZjYd/yT3K+C/Cb5j59w2/LtqX8Avdu5Pr599N70dT2+/tT7T2W2daQWTb8SvHzxUyivKK12MpbwC/Al4TX67+Hendw0gTcXSqHyifNJhjOUT8O/Ar3TObRlAWvpKo/KJ8kmHMZZPtuG33wP/f2VNf4kZTSVXA/E14H+A54If7kbgXPy6q38IMuM/6LwDchrwKTPL4Efp+eLJK/FLBV7Cv4Ct7mV//wL8yMy+gF8MewN+o7h+OecazS96/a2Z5Yu0v4BfV7k3twK/DzLih13fxfz9eT9+tbK1ZtYG7AY+5Zx7ITievwUnuAxwObAJ/3NbamZP4vcq9Pbim+7Q2+de6Cf4xbpPBd9ZI37vMN8Frg7uKrwP+IeZ3T+E4zwK+Jb5d64z+MW7eb/Gr/s7kF5obgB+bGYfofMkV0xvx3MaxX9rA0ln3jfNL+Z3+L/tywaQ7t4orwyc8sroyys/w68Kshy/usklBXdFB0P5ZOCUT0ZfPgG4iN6rBA6U8snAKZ+MvnzyAeB75pfyJvHbd/XJhvZ/I4ciM2txzvV2sht1zOwHwNPOuZ+OdFpkbFFeEemf8olI/5RPRh8FVzJgYymDB3eAWoGznHOp/tYXGQzlFZH+KZ+I9E/5ZPRRcCUiIiIiIlICY61DCxERERERkRGh4EpERERERKQERnVwdc455zj8ntP00utQeA2Z8opeh9hrSJRP9DrEXkOifKLXIfYatFEdXO3aNZTHlogcepRXRPqnfCLSP+UTkb6N6uBKRERERETkYKHgSkREREREpAQUXImIiIiIiJRA2YIrM/uZmTWY2fIiyz5pZs7MJhfM+6yZrTWzVWZ2drnSJSIiIiKl5XmO9Y0tPLxuF+sbW/C8IfUFIDLqRcq47euAHwC/KJxpZrOAs4DNBfOWABcBS4HpwN/NbJFzLlfG9ImIiIjIAfI8x50rdvDxG58mlXUkoiG+87ZjOWfpVEIhG+nkiQyrspVcOefuB/YUWfRd4NN07d7wAuAG51zKObcBWAucWK60iYiIiEhpbNzdyhU3PUMq61/aJTMeH73haVbvbFaJlhxyylly1YOZnQ9sdc49a9blTsYM4JGC6S3BvGLbuBS4FGD27NllSqnI6Ke8ItI/5ROR/vWXT3Y2JUlmvC7zMjnHm3/0EMfMGs/jG/eQyalESw4Nw9ahhZlVAp8HvlhscZF5RW9tOOeudc4tc84tq6urK2USRcYU5RWR/imfiPSvv3wypTZBItr1kjIaNk6cO5GH1u0mk+ss0fr4jU+zcXerSrRkzBrOkqv5wFwgX2o1E3jKzE7EL6maVbDuTGDbMKZNRERERIZgzqQqvvO2Y7nipmdIZryOEqoJlVH+saqxy7qprOOLf17OSfMm8YN71qiNlow5wxZcOeeeB+rz02a2EVjmnNtlZrcAvzGz7+B3aLEQeGy40iYiIiIiQxMKGecsncrij5xKQ3OS+poEcyZVsXF3K4loqEuVwXAInt68j3+u3d0xL1+itfijr+p4386mJFNq/e0o4JLRpGzBlZn9FjgNmGxmW4AvOed+Wmxd59wKM7sJeAHIAperp0ARERGR0SEUMubVVTOvrrpjXm8lWhXREO+57oku709lHR+74RlmT6rkryt2qI2WjFplC66ccxf3s3xOt+mrgKvKlR4RERERGT6DLdFqSma47bntHfOSGY9//81TvP2EWbx83iQOn1rDvMnVxCJ++y7PcyrlkoPOsPYWKCIiIiKHjsGUaE2ojHLxjx/t8n7PwU2Pb+G3j70E+B1lzK+rZtGUGszg9ue3k8k54hHju28/TqVcMuIUXImIiIjIsBlMiVYiGuLPl5+CA1btaObF7c2s2tHEI+t309Cc6lgvlXX826+fYt7kKmZPqmTauARTayuYOi7O1HEV/vS4BDXxCN0eByRSUgquRERERGRYDaZEa2F9DaGQsXhqLRcc66/78LpdPUq5ACZURtnVkmL51v3sakn3WF4ZCzN1XKJn8FXrB19TxyWYWBkrWvqlaogyEAquRERERGTE9VaiVSyAyT9bq3sp17feekxHwJbK5mhoSrGjKcn2/Ul27G9n+/4kO4Pph9btoqE5Ra7bM7Zi4RBTxsWZWpvoKPWaUhNne1OSXzy0kXRQDfE7bzuW1x05rawBlgK60UfBlYiIiIgcFIqVaBXTWynXnElVHevEI2FmTaxk1sTKXreT8xy7WlIdwdeO/Um2NyX94f4kz23Zx19XJElnvS7vS2Udl//macZXLGdCVYzaiijjKqLUJiKMy48HQ39+wXhFhJpElHA/QZLnOe5csaPHMapd2cFNwZWIiIiIjCqDKeXqSzhkTKlNMKU2AbPGF13HOcffXtjBZb98qseyZXMmkIiG2d+eYX97hpf2tHWMdy8R664mEekIumorIj0CsUzO40f3rSOT87eTfx7Y3H87hcXTasvSdkwlZQdOwZWIiIiIjDoDLeU6UGbGwvqaotUQP/f6I4ru3zlHWzrH/vYMTckM+9sywXjWHwYBWFN+eXuGDbtaaWr3l7dnij/uNZV1vO77/yQWDlFbEaE2CMZqg1KzzulIR6BWbFk8Eu6x7ZEqKRtrAZ2CKxERERGRPgykGmIhM6MqHqEqHmE6FYPeXzrr8fzWfVz840dIZztLwCIh490nzyESDtGU7AzS9rdn2LKnrSNQy5d29SYRDfUIvEJm3Le6gVwQPyYzHh+54Wk+edYiZk6sJB4JE4uEiHe8wsSjIWLhEPFoMB0sG2ip2lis+qjgSkRERESkD6WqhjhQsUiI42ZN4H/eftygAw/nHMmM1xF8+cNsR+DVFJSgFS7b3ZKmoTnZEVjlZXOOr9+5avDpDwcBWEHQFSsSlGU8j3+u2UW+BmUy4/GR3z7Nv79mAXMmVVEVj1AdvKriYaoT/nhFNDzkapHlLilTcCUiIiIi0o/hqoZYuL+hBHRmRkUsTEUs7LclG6D1jS28/vsPdKn6GI8YP7nkBKbWJkhlPVLZHKmMRyrn+cNsjlTWI531uixPd1vurxOMZzxaU1n25jz2tmbo3jQt6zn+5+9r+v5sjG6BV/dxPxCrikeoCeZVxSNUxcI8t3U///P31aSz5Xn4tIIrEREREZGD0HAGdL1VfTxl/uSyldD1FtD9+v0vZ1J1nJZklpaU/2pNFRlPZmlNZ2lO+vMam1Md67Sksv12KpLKOq646RkWf+TUkn3GCq5ERERERA5xw131EXoP6F42e8IB79c5RyrrdQRhLaksj23YzVdve7HLesmMR0NzUsGViIiIiIiUzmip+jgQZkYiGiYRDTO5Og5AZSzMN/+6qkevj/U1A68+2Z9QybbUjZn9zMwazGx5wbxvmdlKM3vOzP5oZuMLln3WzNaa2SozO7tc6RIRERERkYNDPqB7+bzJzKurHpaSskTUD4H66/VxKMpZcnUd8APgFwXz7gI+65zLmtk3gM8CnzGzJcBFwFJgOvB3M1vknCveyb+IiIiIiMggDEfVx7KVXDnn7gf2dJv3N+dcNph8BJgZjF8A3OCcSznnNgBrgRPLlTYRERERETn0lLukrGzB1QC8F7gjGJ8BvFSwbEswrwczu9TMnjCzJxobG8ucRJHRS3lFpH/KJyL9Uz4RGbgRCa7M7PNAFvh1flaR1Yr2neicu9Y5t8w5t6yurq5cSRQZ9ZRXRPqnfCLSP+UTkYEb9t4CzewS4FzgDOdcPoDaAswqWG0msG240yYiIiIiIjJUw1pyZWbnAJ8BznfOtRUsugW4yMziZjYXWAg8NpxpExERERERORBlK7kys98CpwGTzWwL8CX83gHjwF1mBvCIc+6DzrkVZnYT8AJ+dcHL1VOgiIiIiIiMJmULrpxzFxeZ/dM+1r8KuKpc6RERERERESmnkewtUEREREREZMxQcCUiIiIiIlICCq5ERERERERKQMGViIiIiIhICSi4EhERERERKQEFVyIiIiIiIiWg4EpERERERKQEFFyJiIiIiIiUgIIrERERERGRElBwJSIiIiIiUgIKrkREREREREpAwZWIiIiIiEgJlC24MrOfmVmDmS0vmDfRzO4yszXBcELBss+a2VozW2VmZ5crXSIiIiIiIuVQzpKr64Bzus27ErjbObcQuDuYxsyWABcBS4P3XG1m4TKmTUREREREpKTKFlw55+4H9nSbfQFwfTB+PXBhwfwbnHMp59wGYC1wYrnSJiIiIiIiUmrD3eZqinNuO0AwrA/mzwBeKlhvSzBPRERERERkVDhYOrSwIvNc0RXNLjWzJ8zsicbGxjInS2T0Ul4R6Z/yiUj/lE9EBm64g6udZjYNIBg2BPO3ALMK1psJbCu2Aefctc65Zc65ZXV1dWVNrMhoprwi0j/lE5H+KZ+IDNxwB1e3AJcE45cAfy6Yf5GZxc1sLrAQeGyY0yYiIiIiIjJkkXJt2Mx+C5wGTDazLcCXgK8DN5nZ+4DNwFsBnHMrzOwm4AUgC1zunMuVK20iIiIiIiKlVrbgyjl3cS+Lzuhl/auAq8qVHhERERERkXI6WDq0EBERERERGdUUXImIiIiIiJSAgisREREREZESUHAlIiIiIiJSAgquRERERERESkDBlYiIiIiISAkouBIRERERESkBBVciIiIiIiIloOBKRERERESkBBRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5ERERERERKYESCKzP7uJmtMLPlZvZbM0uY2UQzu8vM1gTDCSORNhERERERkaEY9uDKzGYAHwGWOeeOBMLARcCVwN3OuYXA3cG0iIiIiIjIqDBS1QIjQIWZRYBKYBtwAXB9sPx64MKRSZqIiIiIiMjgDXtw5ZzbCvw3sBnYDux3zv0NmOKc2x6ssx2oL/Z+M7vUzJ4wsycaGxuHK9kio47yikj/lE9E+qd8IjJw/QZXZjbFzH5qZncE00vM7H1D3WHQluoCYC4wHagys38d6Pudc9c655Y555bV1dUNNRkiY57yikj/lE9E+qd8IjJwAym5ug74K34gBLAa+NgB7PNMYINzrtE5lwFuBk4GdprZNIBg2HAA+xARESkJz3Osb2zh4XW7WN/Ygue5kU6SiIgcpCIDWGeyc+4mM/ssgHMua2a5A9jnZuDlZlYJtANnAE8ArcAlwNeD4Z8PYB8iIiIHzPMcd67YwcdvfJpU1pGIhvjO247lnKVTCYVspJMnIiIHmYGUXLWa2STAAZjZy4H9Q92hc+5R4PfAU8DzQRquxQ+qzjKzNcBZwbSIiMiI2bi7lStueoZU1i+tSmY8Pn7j02zc3TrCKRMRkYPRQEqurgBuAeab2YNAHfCWA9mpc+5LwJe6zU7hl2KJiIgcFHY2JUlmvC7zUlnH7598iY+dsYgt+9rZ2ZRkSm2COZOqVJolInKI6ze4cs49ZWavBg4HDFgVtJUSEREZ06bUJkhEQ10CLAOuvnc9v39yK3vb0mRyqi4oIiK+gfQW+C7gHcDxwMuAi4N5IiIiY9qcSVV8523Hkoj6f5eJaIgfvOM4vnLeUhqbU2RyndUFr7jpGVUXFBE5xA2kWuAJBeMJ/Kp7TwG/KEuKREREDhKhkHHO0qks/sipNDQnqa/xq/89umE33fsMTGY8GpqTzKurHpG0iojIyBtItcAPF06b2Tjgl2VLkYiIyEEkFDLm1VV3CZqKVRcE+PsLDSybPZHNe9vUFktE5BA0kJKr7tqAhaVOiIiIyGiRry54xU3PkMx4xCPGUTPG85N/buCxjXtYtaNJXbeLiByC+g2uzOxW6Kj9EAKWADeVM1EiIiIHs2LVBQ+bWMl3/76aH/xjXcd6+bZYiz9yqqoLiogcAgZScvXfBeNZYJNzbkuZ0iMiIjIqFKsueMqCyV2CK1BbLBGRQ8lA2lzdNxwJERERGe2KtcUKGYTNWN/YonZYIiJjXK/BlZk1Q4/OkMB/xIdzztWWLVUiIiKjUPe2WJGwETLj3T9/nHTO0zOxRETGuF6DK+dczXAmREREZLQr1hZr85423nPd47jgdqXaYYmIjF0D7i3QzOrxn3MFgHNuc1lSJCIiMop1b4u1synZEVjlJTMe63e1KLgSERljQv2tYGbnm9kaYANwH7ARuKPM6RIRERkT8u2wuvvoDc/wv3evoSWVHYFUiYhIOfQbXAFfA14OrHbOzQXOAB4sa6pERETGiHw7rHyAlYiG+NzrF/OKeZP49l2redU3/8FPHlhPMpMb4ZSKiMiBGki1wIxzbreZhcws5Jz7h5l940B2ambjgZ8AR+J3mvFeYBVwIzAHv3Tsbc65vQeyHxERkZFWrB3WnElVXPqq+Ty9eS/fuWs1//GXF/nxA+v58GsW8rZls4iEjI27W9W7oIjIKDOQ4GqfmVUDDwC/NrMG/OddHYjvAXc6595iZjGgEvgccLdz7utmdiVwJfCZA9yPiIjIiCv2TCyA42ZP4JfvO4lH1u/mv/+6ii/8aTnX3LeO0xfXc+Pjm0ll1bugiMhoMpBqgfcD44GPAncC64DzhrpDM6sFXgX8FMA5l3bO7QMuAK4PVrseuHCo+xARERlNXj5vEr/74Cv4+XtOIBEN84uHN5HK+r1g5HsX3Li7dYRTKSIi/RlIcGXAX4F7gWrgRufc7gPY5zygEfi5mT1tZj8xsypginNuO0AwrC+aGLNLzewJM3uisbHxAJIhMrYpr4j072DKJ2bG6YfX85Xzl/RYlsx47GxqH4FUiRxc+UTkYNdvcOWc+4pzbilwOTAduM/M/n4A+4wALwN+5Jw7DmjFrwI4IM65a51zy5xzy+rq6g4gGSJjm/KKSP8OxnwydVxF0d4Fv/jnF7hn5U5c937dRcrsYMwnIgergZRc5TUAO4Dd9FKqNEBbgC3OuUeD6d/jB1s7zWwaQDBsOIB9iIiIjErdexeMR4x3veIwkpkc773uCd549UM8sKZRQZaIyEGo3w4tzOxDwNuBOvxA6APOuReGukPn3A4ze8nMDnfOrcLv2v2F4HUJ8PVg+Oeh7kNERGS06q13wf937hJ+/+QW/vfuNbzzp49x4pyJfPysRbxi/qSRTrKIiAQG0lvgYcDHnHPPlHC/H8bveTAGrAfeg1+KdpOZvQ/YDLy1hPsTEREZNYr1LhjCuPjE2bzpZTO48fGX+ME9a7n4x49w8vxJfOK1izj+sIkjmGIREYEBBFfOuQG3hxqoIFBbVmTRGaXel4iIyFgSj4R51yvm8LZls/j1o5v50b1refOPHubVi+q44qxFHDNr/EgnUUTkkDWYNlciIiJykEhEw7zvlXO5/9Onc+XrFvPcln1c8MMHef/1j7Ni2/6RTp6IyCFJwZWIiMgoVhmL8MFXz+eBz7yGT5y1iMc27OEN3/8nH/rVk6ze2TzSyRMROaQouBIRERkDquMRPnzGQh74zGv4yBkLeWDNLs7+n/v5yG+fZl1jy0gnT0TkkKDgSkREZAwZVxHlirMW8cCnT+eDr57PXS/s5Kzv3McVNz3Dpt2tI508EZExTcGViIjIGDShKsZnzlnMA585nfe9ci5/eW47r/n2fVz5h+fYsrdtpJMnIjImKbgSEREZwyZXx/n8G5bwwKdP550vP4ybn9rK6f99L1/40/Ps2J8c6eSJiIwpA3nOlYiIiIxy9bUJvnz+Ui591Tx+8I+13PDYS9z0xBb+5aTZfPBV82lNZ9nZlGRKrf/Q4lDIRjrJIiKjjoIrERGRQ8j08RX85xuP4kOvns//3rOGXzy8iV89sgnPOXIeJKIhvvO2Yzln6VQFWCIig6RqgSIiIoegWRMr+eZbjuHn715GzvMDK4BkxuOjNzzNizuaRjaBIiKjkIIrERGRQ1g0HMJzXedlco43Xf0Ql//mKe5cvp1kJjcyiRMRGWVULVBEROQQNqU2QSIaIpnxOubFwsbZS6fy4Npd/OW57VTHI5y1ZArnHj2NUxfWEYvo3qyISDFjN7jyPNizDpp3QM1UmDgfQvozEOlC+UTkkDdnUhXfeduxXHHTMyQzXpc2V55zPLx+N7c9u507V+zgj09vpTYR4eylUznvmOmcPH8SkbDOGSIieWMzuPI8WHkr/PEyyLRDtALeeA0sPk8XjiJ5+Xxy86WQTSqfiByiQiHjnKVTWfyRU2loTlJf09lbYAjj1IV1nLqwjq9deCQPrt3Frc9u447lO/jdk1uYWBXjnCOncu7R0zhp7iTC6gBjRDnPI71pE9mGBiL19cQOOwzT+VxkWI1YcGVmYeAJYKtz7lwzmwjcCMwBNgJvc87tHdLG96zrvGAEP8D642Vw2RKYvLAEqRcZA/as8/OF8olI3w6BEt5QyJhXV828uupe14lFQpy+uJ7TF9eTzOS4b3Ujtz23nT8+tZXfPLqZupo4bzhqGucePY2XzZ6gngaHmfM8mu+6i22fuRKXTGKJBNO/8XVqzjpreAKsQyCfiAzESJZcfRR4EagNpq8E7nbOfd3MrgymPzOkLTfv6LxgzMu0Q8sOXTSKBLzmHYQy7V1nZtr9+conIj7VhCgqEQ1z9tKpnL10Km3pLPesbOC2Z7fz28c2c91DG5k2LsEbjprGecdM5+iZ4zBToFUuzvPIbNlCy4MPsvOq/4Rs1p+fTLLtM1cyd9Ei4nPnljcRyiciHUYkuDKzmcAbgKuAK4LZFwCnBePXA/cy1OCqZqqfsbtfOG59CmadDHvX686KHPJao5OpiVZwb3IhUbKcEn4BgPY926gq8/+wyKiRL+HN/59k2v2aER/8p///oTv1VMYinHv0dM49ejotqSx/f2Entz23jesf3shP/rmB2RMrecPRfonWkmm1HYGW5zk27m7Vg4sHyHkema1bSa1ZS2rtWlJr15Bau5b0+g24ZLL4e5JJso2N5Q+ulE9EOoxUydX/AJ8GagrmTXHObQdwzm03s/pibzSzS4FLAWbPnl186xPn+3dM8hk9Eodxs+GuL8KLt8KO59XGRMa8/vLK6mwdE0/9Djf+bQ13ZJdxbfh7nF6xnsrb/g2y+2De6dCyU3+GMqb1+5/SvKPnjbpsEv76WZi8CB7/qf5PClTHI1x43AwuPG4G+9sy/PWFHdz23HauvX89P7p3HfPqqjj36Om84ciprNvVWrQTjUM9wHKeR2bbNlJrguBp7To/mFq/Htfe+VuMTJ1KfMECqk48ifjCBVhlJduu/CykUh3rWCJBpK7ugNM05HzyqzfBhLmw+SHIZSCSgDdd6+cTUNAlY5I55/pfq5Q7NDsXeL1z7t/M7DTgk0Gbq33OufEF6+11zk3oa1vLli1zTzzxRPGF+bq/LTugeiqMnwN3fxke/kHX9aIVcNkDqi4oo8GQrziK5ZX1jS2877pHuexI41fPt7JiT4g5VWn+MvOXVG66GywMLqeLRhmNhpRXiv6n7FoD15za9cLRwn6+SLd0XTeS0J36XuxuSXHnih3c9ux2HtmwG+f8L6nwCiQRDXH7R07ts93XaNNXBxN+ELWd1No1pNet6yyRWr8e19bWsY3IlCnEFywgvmA+sQULgvEFhGtqeuxrkG2uyptPQhGYcTy89Gi3vYbgZZdAvBoeuxayqa7/MzDw/KN2XlJ+g84nIxFc/RfwTiALJPDbXN0MnACcFpRaTQPudc4d3te2+gyuitnwAFx/bs/5F/3GvwOpzCkHt5IGV57nuHPFjo47x2b+Dq4+dyrn3P1a8LKdK+cvGnUTQkaH0l009taWJD4OfnlBz42c+kmoXwK3XK62J71oaE5y9T/Wct1Dm3os+8w5h/OeU+aSiIZHIGWllQ92tn76M35pUjRK7etfh1mI1Lp1pNat6xpE1dURX7igIIBaSHzBfMK1tX3spec+05s2kW1sJFJX119vgeXPJxUTi1935W/edZ93ykf94Ovh/+0ZdHU/DrXzkuFx8AdXXXbeteTqW8Dugg4tJjrnPt3X+wcdXBW7swL+3RXndJdeDnYlDa6gs81DQ3OS6niEL/xpBSu27uPH4a9zWvi5ritf8EOYdZJuQshoULqLRuhZEyJfMtXj/6R7WUxANSR6WN/Ywuu//0CXBxfnJaIhTp4/mdMX1/OaxfXMGF8xAikcPJfL+W2i1q4jvX4dbc88S8vdd/vXFwXCEyYQX3x4EDz5JVLxBQsIjxs33EkemXwSrYA3/Rhu/NeB73TifP9/JzEeKiZAxXhwHjz2Y/AynetF4vDOP8O0Y/z9lLojFZWUHYpGdXA1CbgJmA1sBt7qnNvT1/sHHVwVu8vx+m/DrR8Gr+AOSjgK77sLph6jTCTlN/CTdcmDq+72t2d4x4/uY21DMz+PfpOTg04usBDOOcxCugkho0FpLxqLKfZ/cuH/wd6N8Pcv9Vz/PXdC1WT9nwS6l5wnoiG+8eajGZeIcu/qRu5Z2cDmPX6pzuFTajh9cT1nHFHPcbPGj/hDi10mQ3rzZlLr1vnV+db6pVDpDRtwBe2dwuPHk9u3r8f7Z//ieqpOPHEYU9yrkcknb7wG6o6Aa1/VM+g673/h5vf33M7sV/g3wtv3dr4ybT3XKxSKQqIW4rUFw3H+q8e8wvXGdc6LxPs/lnL/DyqgG2mjK7g6UIMOrqDnnZXmHcWLrMNxmLkMtjwOubQuJg8Vw30SG9yDfMseXAE8u3kPH/3FP9nZkuWa6Hd4VWItLa//EdW3vq/rTYhIHD74oNqXyMGo/BeNMIgSLaB6CrTt9qvb6v8E6FpyXvjgYgDnHOsaW/nHygbuWdnA4xv3kPUc4yqivHpRHa9ZXM+rFtUxsSo24P0N9gG7XipFeuNGv1OJfBC1fh3pjZs6ujsHiE6fTmzBfOLzFxCfP4/Y/PnE588nu3s3G974pi49+Vkiwdw/3lz+3vsGZuTyCQwu6CpW8rtzBfz4NV0fvROOwqmf8K/hUk2QbOocJvd3nZdq6j/t4Xhn4BWJQ+NKv8QsLxSB498NtdP96vORhJ/eHsM4RCogmug6DEf7Ll0biYBuJIK5kbj2Gvj+FFwNWrGqguE4LDwLVt7Wdd1QFC7+LSw4s/RFzVLccGa4vk5iOEi3+nfK0q3+8o7xNn+6y/Lu89qCefnxYBup5p6N4nuvQjQswdXD63bxsRuewrwsO1odp8yM8KHFSV75z3f1XLl+Ccx5JTz1C/WYJgeT4bloLKb7eSSSgBMv9TtT6n5RdvEN+j8ZoKZkhn+u2cU9Kxu4d1UDu1rShAyOmz2B1yyu5/TD6zliWk2vz9Pqq7MH195Oav0GUuuCIGrdelLr1pJ5aYv/fQKEQsRmzfLbQ82fHwRRC4jPm0uosnLQ+xyWh/r2b+TyCQwu6CpHmysv5/8Hdw/CUkEg1j0Y27sRtj5ZZEO9VAceCAv1HpRFEv4546VHup07wnD0xVBdD+GYH6CFY0XGI73MLxgPdVsnFIE1f4M/fWj4/tOHO4Ac/P4UXA3aYBthgn8Hcs4rg9epMGmBX6dad+9La7AZwPMKApjWrsFO0fGWzqAn3QKtjbC520kM/JNOLj24tFsIolUQq/TT3TEevPLjyX3+4wG6e/dt/m+r21YHl4hOg8krxdpC1FUa1/AfvMxb0bliKOL/1vdv6boBdX4hI+/gumjsrYYE+N1ULzrbfx12Smc1JFUF6pXnOZ7bup97Vjbwj5UNPL91PwDTxiU47XC/ndYpCyZRGet82kxqwwbWX/jGLt2UEwoRmTyJbENj57xolPicw/zAqSCIis05jFC8oIrYAA2yg4nhNrL5pDfFgq7+egscyLoHqtjN+GgFXHo/TDjMn59NdhumINsOmWTxYTZVsH6RdVobYfeanmmJxP3gsLDjqXIKx/3rGjM6fjb58Y4bGlbwi7IBrBvM87LQtqvbDg3GzfSP00LBK9yZhlC4YP4gl6XbYN09XTtU6btdrIKrIRlo1Y5I3O8Jatdq2PhPaN7uz6+e4v9Bbn3Sb1gZScCFV8OSN46tP8NS/dk7VxDoBAFOx3hr5/i+TfDIj7qePCwEM5bRUZLUvbRoMMIxiFV1Bj7OFT+JHflmmHx4kUCpyp/OjxcGT5H4wO5G93ayHsGSq+5tIaJhozYRZW9big9Gb+djdgOxWIzW1/+QinGTCf3i/J4bOfptcMrHYcqSoSZZ5EAcXBeNxfJ5JO7nkW1Pw4b7grvEVTD/dFhwln8Ed16pXtAGoKEpyb2r/HZa/1y7i5ZUllgkxBn1Yc6xRpbuf4nQ44+QWrWqx3srT34FVSeeGFTlW0Bs1kwsGh2BoxgRB1c+OdiNRBW9/q4RnPOfH5ZLB68i416ml3W6z8vArlXw5HU903Hkm6B2RtfOWZyjo8QuP96xvNh4L+s2b/dLy7qb92qonOzf8PZy/jDf+ZzzOl+9LfMK1ytYlm7peVMYerupDQquSqi/TOQc7FkPGx+AVXfC6jt6biNWBZWTgp5tJgbDCVBZMN59fmK8X5Q70DSW885mLhvcPWmHVCusvh3+/hXIpfzA5IT3+0FHJqjmlm7tGhwVHQ9eQy1CB6g/AmqmBSVAVUGA1Nt4EPQUG+/+OQ8u0CmNwZ2shyW48pPVtS1ESzLLO37yCC2pHLOrHRctreB3a+GWi6dTc/3p3Z4BFKTbeVC/FI56sx+gTpjTecy6Iy/ldXBdNPaXz9Nt/n/J6jth9d+gqcgffyQOl97nn/+kB5dOk1y5kuYnn2bbw4+Tff55qvY2AJCxMFsnzaSFMDWpFmY0NxLBYYkEc27+A4l580Y49SPm4Mono8FwlpTl9zecAd1IXAcN9z4Hvz8FVyU10EzU2/Ozjjjfv9Bv39PZu03bHr8qWPeqZ4XitX43o30FZIlx0PAC3P9Nv1g5EodXfQqmvQxyyc42QUWHA5w32Kpw+ZKgWHVncNNjurpr8NN9WeF48w746ZldG6uWM8ONdE9A/Z+shy246u7hdbu4+MeP9ph/8wdP4mVtD/b8zGaeBC/eAst/3/kAyZkn+kFWrBLu+LTuyEs5HXwXjQPN587B07+CW/6957JwDKYe5XcznX/VL+nao9khIrN9O+3PPkv7M8/S/swzJF94AZf2/7Mi06ZRccwxVBxzDPvmHs79biJ/WbmLZzbvJeuMRDbFov1bOXzxbI49+RjOPmoak6sPvc+QgzGfSE/DGdCNVAcaanN18DhoMvhgo2DP8xtHdgm6CroX7R6M5cf7C8r6E81Xa8sPKwY+b98WePC7Pbf51p/DvNP9kqDIwHttGpCR7CVnuO5KDc6IBVe9PZPmLcfP4KoLlpJuWEuuaTvh2mlUTVtEKFzwANC9m2D5H/zXzuU9Nx6J+3XW6xcPOX0i3Yzui8aiHS1F4ai3wb7NsP05SPntjAhF/B7WCgOuqUf6N6nGCC+ZJLlihR9IPeu/sjt3AmDxOImlS6k49lg/oDr2GKJTpvTYxsPrdvHxG57izCkRtu5tZ3V7iK1tneez2RMredns8Rw3ewIvmz2BxdNqiI5wl+/DYHTnEymPkbgOGokSwYHvT8HViBiuIMDz/D/U9r2w9h64/RM913ndN2H2y3sGSJHEgfVINRJFxXCwBzvDbcSCq+7tsOIR4xXzJ3Pvqkbm11WxZW8bqawjEQ3xnbcdyzlLp3Z0qdzFU7+CWy7vOT8ShylH+nfhpxwJU5b6r8qJQ06zjC2D7EZ7dF80DqRa+t6NsP3Zrq+ORuHmn5c7gq2jYdrRfs2Hg0ix7xQzMlu2dJRItT/7LMmVKzu6Po/OmtVRKlVx7LEkDl+Exf5/e3ceJ1dZJnr895w6tfaepNcknT0QspGwCkYUUcDBjRnEfZm5Os5V0dEZdRS8oyiKuIxXuderIwOMC27ouODIokhARAiJJCEJ2bdOel+qu/Y67/3jVHVXdVdv6eo1z/fzqc855z2nzlLdb9V5zruN/mCv0AMivy188a830hyO8ezRLp491klL2O3wIuC12LCwkk39AVclNeWByfkgps/szidKnaHJ/j3R4KpYpjoImOpgZ7qqzKlc0xZcQeExab7z+GE+98CevO0CXosHbtrC8urSoTsZ7on8ur+BnpNwepdbcptV1jAQaGWDrgWr3Peos8YZdGk9+28ax/ubYozbMDwv4Houv/1W5ZL8Eq76jW53zrnHm6K2kNm/6cmPfsztwc+2CZx7LslTp0i3twMgoRDBdevcUqnzNxLcsAF7wYIzOl6hQYsHPwgyxtDUHWP7sU6ePdrF9uOd7D7ZQyLtBmQLK4Nsaqxkc2MVm5dUcV59OT57Vv/+zf58ouaE8Y5Bdyb7N/E4TiyGE43S+8jvaL7jDkgkwO9n4RdvL+rviQZXs5VWmTsbTWtwVchwbbHue88lXLq8wE3QWJ7I9za71Qebdw+8Wve5PR6BO95c9bk5QVcm8CqtKVw6qx1oTIpi/BgaYzDRKOlwL064h3Q4jNPbS7qnByfcSzrsTpMnT9Lzm98MjDnEqIOx6k1jVl9bfsB1+jm3M6assnq3ZMsbgH2/cdva2gG4/luT8nuSbGoisn07vY/+gZ5f/Sq/9zERSl/+ckpffDnB88/Hv3IlYo+xg6cxGGnQ4uHEkml2N/Ww/Vgn2491sf1YJ03dbjtgn22xfmEFmxZXsnlJFZsaK6mvCBY8ZnNPjNrysR1zCmk+UUNMdqCTPYaJxdxgpy9C+HeP0PLlr7jBjtfLvHe8ncC552LiCZx4DBOLY+IxnHgcE4vnp8Xi7r7i7tQk4gXSRu5DoNi/JxpczWYa7JxtZlxwNVxbrBsuWMQn/2oNlaEC1XXO5P82lXC7yW/enQm8nnfnw00D24QWDAq41sL81XDwYS1xLbIhpQ4+H9U3fYDA2rU4vb04/cFSgWlPD+negWm2utewbBsrGMQJh4esarznbkouuaTQu/SmcSSxbji9cyDgOvF0fsCVVbse5q9wx5upWJyZLnTnQ/NHrWpuUilie/cR3b6d6PZniTy7ndTp04DbVsrkjjmV0XjvPZRcfHFRLnOynM6WbmUCrudOdpNIud+B9RWB/tKtjYsqaeqO8rGfPjdsadk003wyC0xFsJN7rJ7f/pamj/9L/3d7zYc+RHDT+W7JTzTqBi3RGE4sislOc9MiUZxYDBOLZtJimGg0f1og74+JZSGBAJbfnzcVvw/LH0AC/sw0gBXwI/6Bqfj9WAE/yaZTdNx995Bdj/Ddo8GVUnPYjAuuCrXF2rxkHn861E55wMsHrlzJ2160BL/tGX1nZyLSkVPClSntatnjDiEAbrfwueNrgFvy9fL/BdWrwV/m9s4ZKHen/jJ3kMGJmuoqVqkUiQO7STU3Y9fW4Vt53hk/8XdiMVJt7aQ72km1tZNqbyPd3p6Xljx1iuTx42Pan1VSglVWhqesbOg06MMTtLF8gscPlu3g8aawrASWJ45HIkiqB9NxgvjuHVh2mni3zckn5rlPGu+7G/+5GwsdVm8ax2O4Hm/rN7pDZ3SfyO+1FdzSrYpF7tg3mcAr7Z1P9GSc6OF2Is8fIrprNybijj9o19UR2ryJ4PmbCG7ejAT8HPmbGzCxgf2O8vR4xkqkHPac6ukPtp491smJzmjBbX0e4RfvfzHn1pdPyrk4xuFoz1FaI63UhGpoLG/EkjnaNnEaTGWgkz3eWKpEG2PcAKe313141RdxH3RF+nLS+nB6+zLTzHJfL+mctHQ43J9nx0N8PiQYxAoEsAKB/nkJBrACQaxgAAnkpAVDmbSAG+x85ztD9ln/+c8TuujCvEAKrxeZSP8BuAOKH3799eP57tHgSqk5bMYFV1C4qs2+5jC3PbCHrfvbaJwX4uPXnsu16+om/KU4thNKQ8dhaNntVnP6yw/G935f6dCAKzvfnzbc+gr3/ft/O2WlZSaVIvyb/6Lpls8O/PjeejNl174WsW2MMTh9faTb2ki1t5Nqb+8PlvoDp/YOd76tHaevr+BxrNJS7Pnz8SxYACJEn3kGMIjHYNkGy3aY9/Y3EFregOVJ4LHiWBJBEj0Q7XJ7O412uaUmscx0pN5PxeN+nsFKjNikow6RF04R67DoOFRNw0ffTdnlm5EllxZ895l8lmftb8pYBiqNtLtBVuZluo6RPHqI6N5jRA53ED2VIt5tAwJi8FcmCdVZBJdWETqnEW/j8kypl1sKZkrqCD/+FE2fuq3g/+1s1xKOcd+fj/H/HjtIZUhoDadJZAppLYHVtWWcV1/OeQ3lrG2o4Lz6cipCE2tL6hiHh48+zCcf/ySxdIyAJ8DnXvw5rlpy1XABluaTcTiDtp9D95FKuVXhIpH+0p6BEp7okLTkqSY6v/8DSKcHdmJZ+M85B1LJvMAot9r0sCwLq7QUq6QET2kJVok7n01zesOEH3xoyNuqP/Jhghs3YvUHTZlpNnDynPlDyTMIdiZkKtrwanCl1OwxI4OrkfzhhVZu+/Ue9jWH2dxYySf/6jw2La6cujYIhW4a7QDc+F13vLh4N8TDEOtxh0eI9bjL8e6BtMHrU4WfSI9MoLLR7b3Tst3SMcvOeY1v2UlDOpIiHUkRP9VKz+//hBN3MCnBSQvG8SBllTjRNKmeGCZV+EfXE/Jgl3jwBC3skAdPCOxM56KegIMdSGP703j8KSxJgpMCJ4VJJSCdGL0DUo/PHRg9EyQRqByYFkoLZtIDlW7Qmj1A237M928k0fg3pKI2djCF79hPkDf/sGiDPsJZ/JviOJj9D5LY9xdSfYJdAr5zNiCrXtn/QMAkEsT27CHy7Haizz5LZMd20q1u74RWSQnBjRsInreS0IoaAvU+PMnWvGCM7pMD3cdnGABvOY6nFHxBrFgLsvZ17t80tABKFmSm892pr2RCvd466RRH25+nta+ZmpJaGuefhzV4MPkiOtIW5qGjj/CtPZ8jmorjS9fx0gXvI2SWcbIzxu6mnkzvhAZIs3Ceh9V1fpbXBFiywGbRfJvSgCGWjhFLxQamufM5ae2xdv7U9CccBvJ7wBPgR6/+Ecsq5mbbxMksSTKOgxMOk+7pId3dQ2zfXk7/66chmRzYyOOh/JprEK83r9rbQJW53LRY/nsnILB2Ld6GhrzAyCotwVOaEyyF3KkbRLnzEgiM+JBzqgMdKE7QeibHTBw9Sqq1Fbu6evb3Figii4F7gTrAAb5ljPmaiMwDfggsBY4AbzDGdI60r5Ey+AxvRKrUmZh1wRVA2jH8+JnjfPmhF2gNx9ncWMmupm4SY+m6faImo+OXdDITcHUPDb7iYTj1HGb3/ThlK3FSYHnSWD0HkMUXuV1hO+n+IAUnhUmncGJJ0r0JUn0JN2jqS5GKpElH06QjDqmoIR0zpKPuGOFOapjPSgy238kERg52SPAEwQ5Z2CELT4ntBlOlXuwSH+L1utUkPd6B4M2TTbOHXWd6W0g0tdHzxA7S0TSO8VP56msJbtyALL18IFjyBic2BETWFAz6CDPrpnEqGcch/OBDNH184Oam9pZb8FRWENvxFyLbnyW2c1d/OwnvwoUEN292q/lt3ux2PDGWJ9exbjfI6j4Bhx6FP905dBvLdvNGIXYgP9gaHHz1Ly9w24QFKvr//5x0iocP/pJP/vm2gVKdiz/BVStePWqAZYwh6SSJJCNEU9H+VyQVGZgmo3nroqkoLZEWHjz6IE5OCa0gLCpdhIOT2S5GPBXLC4jGyhKLoB3E7/ETtINub4d9TUO2u+vqu7io7qJCu5iR+WSsAdNYbsqzJfdOdzfp7u7+QCnd051J63HThiz34PT05He4MgyrrAyrrNSt/jZSlbhg7ny2XVCBtJzSoeTp01NafXY6Ap3scccR7Ey1WRFc1QP1xphnRaQM2Aa8Dngn0GGM+YKIfByoMsZ8bKR9DZfBx9LlqlKz0KwMrrL64ilu/++93Pvk0bz0EbtuL4Yp7vjFtB2k+1e/4tRX7urv+ajiFZfjrV9IOgbpzg5SnZ2kOzpJd3SQ6uoa9mmmBAJ45lVhV1bhmTfPna+qwlOVmZ83D6e7naZPfw6SA70hiT84UnukiRt/SdLETfKgjzAz8sl0iB8+zKHXvd5twD6YbRM47zxCm84nuGkzwU2b8NbWTPygw1VFfM9jbjvFSBv0tWembTnT9pzlzPpk4TYiKctLd8l8ukqqaPZ6eaLvBM0eocuyiFgWcY+H1fPXgb+EqHGImjQRJ0nUSRJ14kRTsf5AKW3SBY9RiCAE7SC2ZdOT6Bmy/sLaC2kobSDgCRCwA/3BUXZejI/2sOFUV5qTHSmOtiU51pYkkbLBeAl4ApxTO4+19VWsbahkbUM559SVcSpynDf88gZi6YEb8YAnwI+u+xHLKmdeyVXBcc5gxJt7Ywzpri5SLS1Ed/yF07femt8pjmXhX7USE4u7wVQ4nF+lbjDbxlNe7r4qKrAqyvGUV7jLlRVY5ZnlinLSkQinPnmz+72eoaU6Z4WZH1wNOQGR/wK+kXm91BhzKhOAPWqMOWek9w6XwQ+19nLt1x4jnhq4tkm/gVNq8s3q4AqG77r9A1eu4ANXrp4VY8YYY3C6u0k2NZE4eZJUU1P/fLKpieTxEwV7tgOwysvd4GjePDxVVZlgaV5muRJ73jw3cKqqwp5XhRUKjX4+o7S5mhQzf9w7Da5GYdJpos89R9/Wx+n57/8mcWhob4E1n/gXqm64ASsYLLCHCXIcnP0PcrT1OVotocaBxur1WDlVEXOlnTQ9iR464510xbrojHfSHe+mM9ZJV6SVzr5muqJtdMW76Ir30Jnqo8cZuUeyoOMQNIagYwgah5BjMstuegghKF6CHi8hy0/QDhC0gwTtEEFvCSFfGUFfKUF/BcFABUF/JcHgfALBKiRQzol4F+969CbaTZIkgMhowc6wEimHAy29PH+qh91N3exu6mFPUw/huBtYeCxhcVWQ8tJeDsYfwvEdo6Ssifet+yQvW3wlSxeUFdrtlOST8QRRvmXLOPw3N+QFMFgWgfPWkO7uIdXSMmpPc4F16/A1LsaqqBgIlCrKB5YrBoIpCYXG3BZYS3XOWrMruBKRpcBjwDrgmDGmMmddpzFmyHDyIvIe4D0AjY2NFxw9enTwJuMfe0ep2WFcGXwseWWqFeq6XXBbHFSX+XnrJUt48yWNVJf5i3bM8dbJN8aQbm8nmQ2Wmprc+ZMD886g3pQkFMLbUI+3oQGxvfT+7ndD9rv4ru9QetllRbuuvHPO6y2wFt/KtZPfKcDMHgpizHllJuaTyZJsaaHv8Sfo3foYfX98Eqe7u79xfHz//rwSgMl+Ip9MJ/nZgZ9x+59vJ+EksMXm6qVXUx2qdoOmTBDVFXcDqZ54D4bC9yt+j5+qQBVV/ioq/ZXuK1DpLmemsWgHt277MgkngWUMIccwX7x880WfZlFJvVulN9GbaXPZC4lwznw2PZyzXSYtWbgDmMFSQMyy8HpL8AUqkGy1WW/IbUs2ZL4EfCE3zRsqMF+CYwc42Wexuy3JrlNRnjzUztGWTtpigs9yeODaPdjeVXTUbWHz0oL3PpOeT4YLSHwrV3L49dfnB1Ei7ndIgZIm/zmr8a9chV1bi7e2Bru2FpNO0/SJT+aVuE5FSZIGOmed2RNciUgp8Afgc8aY+0WkayzBVa6RSq4G38B5LHjwQy9hRU3BpzdKzQazvuSqUJXdL92wkZDXw71/Osqj+1rxeoTrNjTwjsuWcv7iygkdr9APe/3nbyO4YQOp06cLBk7JU6eGPBm1ysvxNjTgXbjQnTY04F3YgLdhId6FDXgqK/uffk5Hg+Bxdr98NtCSK9xOKCI7dtC3dSu9Wx8nvncvAJ7qBZS+eAulW15M6EUvwlNRUdQn8sYYuuJdnO47zam+U5zuO83pyGl3mnk1R5rz2iJleS3vQKCUDZAywVKlv7JgetAevWRtIm2uRtmx2119XtDV486f2Iaz7S66GjYSM2lKUnHKTz/vtr/0lbnvS0bcVyKSP++Ms+MD8WDsAJLsI22EGD5KJA7eIOF3/J6yRWsKvutMLnk8+aTQ9yEi7jhnsdiQ7cuvu46e3/42r6r0cN+f01WSpM46syO4EhEv8Cvgt8aYr2TS9lGkaoGDb+A8FqQduH7TQj5//XpOdkW1ows1Y4yjZGXWB1dQuOv2bB481NrLvU8e5SfbTtAbT3H+4kreedlSXrW+/oyqDPZt28axd75r1B6aPPPmDQqcFg5MFzbgKR17deJ0OkXrb35J182f6f/Br/zsp6i+9tV4JqFnsjPofrlox53KgE7H7xmb5MmT9G59nN7HtxJ58k9u1/q2TWjTJkpesoXSLVvwn3POkKpQ6XSKrgN7SLQ046uppXLlmmH/X/uSfXmB0unIaU71nuJ05DTNfc2c7jud1+4H3KCpNlRLfWk9daE6HOPw68O/HrLv77zyO1xcPzmDCGd7C2zra2ZBSS1LJrm3wFG7uB9JOlk46Er2ufvLm3eDNNN2ANnzX0N25bzjV1jLthQ6yqTnk76nnuLYO945JL30qpfT++gfhpSWLv35z0js2zfmgElLktQUmPnBlbjf6Pfgdl7xoZz0O4D2nA4t5hljPjrSvsbSW2BLOEZ1qZ9fPXeKrz68n/PqyznYGiY+FT2VqVlnpg4QmDEngqux6I2n+Om2E9zz5BEOtfaxoNTPWy5p5C2XNFJTHij4HmMMyWPHiDyzjcgzzxDZto3ksWMFt6165zsouexFOHXVODXzSfqEeCpOPF34lUgniKVj7jTlTofbtivWxZ72Pcz3lGM7kLagLd3NssrlhGy3DZUlFiKChQUCFu6yiCCIu56xLfcl+9h6cmteKYBHPFy3/DrmB+djWza2ZeO1vHgtr7ssmTSPt38+u03B7Qets8TiiZNPcOuTtxJ34vgtP7dtuW3SAjodv2d4TjxO5Oln3NKpxx8ncfAgAHZDPaVbXuKWTl166YgPCAZ/vj7Lx/9Y/z9oKG2gJdIyEEBlSqHCifw2hYJQHaymrrSOulAddSV11JfUU1dS1/+aF5iX97c60n2EGwp1vjB8t+Gzz1S3TRx/MDep+cSkUpz+3Ofo+sF9+QcdJYgCNGBSM8msCK5eDGwFdkJ/36OfAJ4CfgQ0AseAG4wxHSPta7w/hF9/ZD9ffuiFvDTt6EJljbeKgUmn3cH+ohGcaNR9RSLu4ID9y1GcaGY5kknLWU51dhB7bmded68jVCE7a4KrLMcxbD3Qxj1/PMLv97VgW8Kr1te7VQYbykjs3+8GU9u2Edn2TP+4O1JZQXLtCo7X2+w4tY3tSw3t5ULChqQtJIM2STNMd89j5LW8+D1+fB4fAU/AndoBEukEh7qHdg6wZt4ayn3lODhupxiZYMgxDgaDMQaDGXnZmP73Z9OiqSit0dYhx/N7/P1dSA/XVqXYAp4AXs9AUJYboA2eLzQtuM7jJZwI88O9PySV8zc7W8fvMcaQPHrULZ3a+hiRPz/tfl/5fIQuuojSl2yhZMsWfMuWjdpQP5FOsK9jH4+eeJR/3/nvBavpAVT6K90gKVRHbUltXuBUX1JPdagarzW+AXCnq8R1yk1l28RpHrIg938Wj4fWr/1vok8/TeiSS4js2AHxuAZRajYadz6Z8mHQjTGPM/yJvnwyj33h0qFNuGJJh5ZwTIOrGaqYJUkmmcTp68uMaN6L0+u+0r29OL19JI4do+Puu/sb05pYjJP/+GECa9eCMQOBUSZIGq3HoiG83sw4F+5LQkFIpYeMo2FiMVKtrZPWPmc2sSzhitXVXLG6msNNnTzwk99z+qffY9f/PQidRwkm3Ce0yeoKWlbOZ+/LKvljTRe7Sjsx8hwAJasCNJ6Is+a4g8948GzegHfxIhaXNw4JjHKX/R7/wLqcNL/tx2f58FiFx/UZ7on87S+5fVKeyI+lBCDtpEmZFMl0kpSTImVSpBx3OWkyaU6KpDMwP3g5O590khzsOsj3935/yLm8ZNFLWBBcMOz7stOkkySSihRML/SeQmLpGG3RtrlTypFj8IMe/H7mvf3tOL1h+h5/guTx4wD4li6l8oYb3NKpiy4asVc/xzgc7j7MrrZd7Gzbya62Xezr3Dfs5wu4wU7jVYS8o/daOV6WWFy15CpWVa2iLdrGguAClpQvmVuBFbhBzYJVkzdEweBjnftq+PvzpryjmSH/s4D4fNR/4fNUvOY1wwZR/mXL9LdOzTlTHlxNp9ryAAGvNaSnsq5IkkOtvdoOaxTTVWXu5Ec/5vYG5PNRfdMHCKxbh4lE8gKjbKDk9PW6wVNvTvDU5y4Xajw7KsfBJBLYtTV4gwvdwCgUdAcJDIaGLocygdOgZSsYRHy+IbsfrvMDu7p6Ih/dnJDu7SO6fTuRbc8QeeYZYs89x5UJt+1US3WQJ9YIzy/2sLcR2ir68FkpVlQuZ1XVBl5ZuYpVVasIeAJ86vFbuOGSq5nXK3SUGu7pfpCvb7x10m7KG8sb+dyLPzfkifyS8iXTdjyP5cGDB7+nOL0wHuk+wv377x8S0L1/0/uL/rkaYzjYdZA3/uqNxHO61g54AiwIzs3eX+NHjnDynz860JNaPE7Ht7+NBAKUvOhFzHvXOyndsgXf4sUF32+MoTnS3B9E7Wrbxe723fRlerYL2SHWLVjH2857G+sXrKfSV8k/PPwPQz7f9QvWT0pglWWJxbKKZXMyQJ42UxnM5UgcPZoXWIHbC2xw40bEsjSIUmeVsyq4Wjq/hK+84fz+ji68HiHks/mH7z2LJW6nF9oOq7Az7ZXHOI5bVS4cJt0Txgn3kA6HB5Z7c9N7cXpy1nd1ke7qGthZIkHrl75c+EC2jae0FKv/VYK9YAHW0qX9y57SUqyS0vzl7KuklFR7G0fe9OYh3bou/LevTtqPgm/JEhpu/8LQbmqXTM6N+Eww0HD+NL6auv6G86n2dvqeeYb2P22l75mn8Rw8jjiGtAVHai2eP9+wd7HFC4s9VNUuZEXlCsqdhVSdKOXowSDR1AJq1y/k+g1L2NxYhYjgGIcPXvihgcCjd3IDHZj6J/LTUQIwlQGkiLC8cjm3bbltygLW6WASCSLPPEP40UcJ//dv87uozlh05zcovfzyIend8W52t+1mV/tAqVRb1K0ia1s251Sdw3XLr2PdgnWsX7CepeVL80peHePM+c9XTa5US8vQB5iJhNbCUGelaR9EeCLOpH784J7KwrEU1//fJ0jnVDX328JvPviSGV9VcKp66zKJBJGdOzn2rr/N/8G3bSrf8AbE43GDoWxQFA67QVJvrzuYqlO4Hn+W+P1Y5WV4ysqxykrxlJXjKS/DiUTpffTRIdvXfPzjhC68EE9pCVZZGVZpKeLzjXkgwGGvc+YPEDjr21xle9Lr/OSniZg4XRU2VuNCQic7KT/dA0DChhcahL2L4fSKKmTDGpbWnsuqqlWsrFrJiooVBOz8Ti2OtUe498kj/PCZ44RjKdYtLOedly3jug312BbsaTtEc6SV2lA1axYsx/YUrtKnxi77/TNVAd04jzfj2lwVKvlPd3TQ+9hWeh99lL4nnsDp60P8foIbNxB5dnvBcafM4nr2dux1S6Ta3VKpoz0DYw4tLV/K+gXr+wOp1fNWj6nEcqr/nmpGKFo+mY4hKJSaIjO/Q4tiKsYP4XADDn/gyhV88MrVHOuMjKm64HR0S7z12GO0H9hFRdihp9zDvBVr2dL4kmGPa4zBRCKku7pIdXb1lwz1vzo7Cy4PHjB1MKusrD8oyg2OrNIyN2jKTrPry8vxlJVl3leGVaC6HEzPl/UM79Z11gZXxhiO9Rzj6Z9/i8SPfs6SZod5ve663gAcWOyh45w6zMbzmL/xIlbWnMuqylVUBirHdZy+eIqfbT/JPX88wv6WXuaFfFy8bB6/39esPYSeXaY1uBocSHkXL6b3kUcGqjjbNt6FC93eLI3Brq2l9KUvpfSlV1By6aUYn5fW3/yS9ls+zYmSOAeX+Dj26s0cKuljf+f+/o49aoI1bhBV7QZT580/j3Jf+YTPX501ipZPdMwpNYdpcDVehQYcFty6wouqgjT3xEimR74pK2avR8m029A7mooSS8WIpqL9r1gq1r+uKdxE3/O7sH//FP5YmmDawr9sOaWhSipiFr7eON7eGN5wDDscxROOYPdEkNTQkc+zTGkIKsqgohypKMeqLMeqqMSqrHAHhfze9yCRwjJgp8Hr9bH0Jz8huGpy6nbrl/UQMzK4KvRgQRCOh4/z9Kk/c2DbIwR+/wznP9dLTTckPXC0GvoC4E1BTTes+PL/puElryjaORljePJgO3f+/gBPHGzPW2dbwh03bOAlq6qZX1qcNkhqxpm24KpQZxQ1H/wgLV/+cn9nOe4ZClVveyuVr389/nPP7S95b4u28fP9P+fbO79NOp0ibhKZCxI2VG/gorqLWLdgHevmr6O2pHZC56rOepPTW+DMfDip1JnS4Gq8Bg84HPBafOmGjTR1Rvnib/eRcgzV5XBufYAjLYZ7/vbSIdUFD3cf5oZf3JDXGNgWmzee+0aCdjAvQMoNlAotZ59I+hOGeWGYHzbM72FgPgzzMmnlUQpKC4SDEA65096gZKbQExR6g5n1mfmekHuj64zzSb4g+D1+gnYQv+32rJbtTS07H7Azadnthlkf8ATw2/4h8ztO76D36AEW9Fr0ltksWLV+xNK5iZrqEshxmnHBVbYEtW3/TpLdXezyNtPk7SN2+CDnPNvOZXscFrW7/1t956/Af8lF+O76KcQHqpdKIED1D+9l/jnri35+w5VMZ80r8bGyupQVNaWsrCllVWZaXxGYcDVTNa2mJLgqVNUvcfQoh173+ry2m8NpvPceAhdewK72XWw9sZWtJ7fyfPvzw25/19V3cVHdRWM+P6VGMeOqzyo1A838rthnGssSrllbx7k3belvh7V0fgnbjrXzkdfHufPJ/6a9YxNb9y1GxPCRH2/jry7wUjOvkyPhgxzoOsDutt15gRVAyqT47p7v4hEPQTtIwA4QtIMEPQEqU34aeoX5YR9VPTaV3UFKuxKUdsUIdkTwd/Rh9xXo2a6yHKmpxl5dg2MJicf+iCcnNnaAeV//EhUvfRmOcUibdH93yGmTJu2kSZokaSc9sOwk++ezXTRn1+cu7+/cz8/2389loXX44w49vhR/juzl8oWXUxWoIpaKEU/HiaVj/YOxhhPh/oFVc9eP1PXviHqAk+6YKyXeEvfzzHy2AU9g4DO2gwQ8AYLeYMH0vOXMe4PeIH7Lz6PHH+XmJ26e0nFXZnhA169QRxR7O/byzB9/wiNNfyBmGy7bY7hxDzQ2OxgRrE3rqfnA9ZRffTV2VZXb5mrFerpu/kx/aWTlZz9F5co1k3LOhXoI9dvCZ167jnAsxcHWXg609PKbXafoiiT7tynxeVhZkxt0lbGyppTFVUFsz8z726ipV6iEqvJ1ryX+wv4hgVXpVVfRu3Vrf3o4CM+t9nFX27386UcfoSvehSUWG6s3ctOmm1hRsYKPPvbRs6Z3RKXUzDEd9yTT0bRmMo931pdcQeEPeXfLQT629Sa2BNbS2dvGPqeLw7FWjNUL4t6oCRb1oUZWVC6irjXFkp88xcLTSUodL97rXklp/RKqwg6p5mZSzadJnm4mdfp0wTZMnuoFeGvrsOtqB6Z1ddi1mWlNDVZgoBF/7PBhjhRoj7T0/p8SWL58wp/JYGMZS2es0k46LxCLpWNDgrNYOsae9j18Z9d3hrz/ikVXUOYrc0v70lGiyWj/PrKlgLG0Oz9RgrCkfAllvjJ8Hh8+yx3ryOvx9pfI5Q4mmx0LKW/eGj7dtmyeOvUUt//5duJOfLSAbtpKrrIdUXTd/BmcWIyDS/08/ua1tBzazZpDCS7Yb2jozJ6lEHjXW1j0jnfjra0puC83SGvGV1Pb31vgZChUMl2oeq8xhva+BAdaeoe8TvcM/M/7PBbLFpSwsraUldWZwKu2lGULSvDbnrzjHmnv0+Edps+kDY6aLaGKHzrE4ev/ekivfp7qatIdHXlVAO3GRnjvm3ng519h6zlpXmgQjAXlvnKuWHQFWxZt4bKGy6jwVwBn0QC7arppydUsMJWBx3R890z1Mc/geFotcLwGf8g+y8e1y67lUNch9rY/TxL3B7K2CxbNX0Z941rqZB1NO6I0b2+luquNc2NtrDr1AvOj3VgM+jwty23QXFuLXVeHt64WuzYzratz06urC46BNJKpbo80HRluogGdMaY/6OqvhpmO5i+n3MAsmoxyoOsAPzvwsyH72VSziZAdIuEkiKfjJNIJEumceWdg2TEj94w4FiNc45QFV4NvJvsSvTS/4a3srE1wYoGwuB3OOWHwpt32iYNPrPqub7LgsivO9HSLanAPoeMNdHpiSQ4ODrpaeznWEekf/9kSaJwXcku7qkuJJtPc9+djJNIGvy189cZN2onG1Jq0hvp4vQTXrye+bx9OX9+QfSz+7n/Se/r4wIOIJX7+8K6NPBjfjsHQYM1jZckSdiWO8sUrvsgl9ZcUPBftvU9NAQ2uxmk6SljO5N7LGINjnP7aR9mB4/NqJmVqNeXWUjoePs6nnvgUCWfgoZHX8vKRCz/C/OB8HMetFZU26f4aUrm1ofrTcrdxBuZTTipvG8c4dMW6ePTEo3n3TxYWF9RegN/292+f3ZdjHByc/nPJXZ+3rUkX3CblpPLuK2HUe0sNrkYzOGMYY3jvQ+9lmVXNnr6DdBi3C7PFgXo2P3aKi55PsawFvGnAsvDU1ZJubsl7KtkTquBwaAEnSmtIeGx86SShZIzGt9zI+r+6kkXVZXgm4aZqqhuPTkfXy1MZ0BWjdC7lpAoGX0OCskxAtrd9L3ftvmvIfoZpW1H04KrQE3kgf/Bm2yZ6zmLYf5hg5vu2JwjBONR++MN0fP3OIWODTVYJ6kwSS6Y51NrHgdZeDjSH3WlLL4da+0g5Q79Xs9UKa8oC1Jb7qS4PUFPmp6bMT215gAWlfnz2mf1fa0nZEJPaxTRAyRVX0PfHP0JyoDpptv3g23Z+lPV2IzvCe2lyOvBa3v4f96wzLflXqohmfXA1FcGOMYaEkyCSjPDgkQf54tNfJOEk8Fk+3r3+3Wys2UjapEmmk/1BTNJJutNMWu60f52TP19o2pvoZXf7bkzOg3tBqA3VIiL5gVMmUMqmzRQe8WCJhW3ZWGLhEU9/msfykHJSdMQ6hryvsayRMl9Z/7bZ7S3cecuyBvYz3NQamt4SaeHBow8OOd4IbVq1zdVIcrsvL+1J8ZD3BDud45yKNNHTd5KrtztsPmyxqKKRkrY+nOZB/5yOg2/hQkKvfS3+ZcvwLVuOb9lSTh06QeLdf88+byN/rl3D8bIaevyl8ALwwlZ8tsXyBSWsqC5lebU7zc6X+M/8TzDVo55bYrGsYtmU3QxM9eCoxRgY1bZsbMsm5A2Nafs189bw/b3fHxLQTUXbikKln3X/61Okwz203H7HwAOEVIrwicO8sFKoChvWHHc7U5FAAO8Vl7NwceOQElT/0qWTfv7TLeD1cF5DOec15Hd9vXV/C2/7ztNDti8L2LSE4+xq6qG9N06B+It5JT434MoJvLLBV025n5qyANVlfgLe/CqIY6n6qM5MwcFRgfl//x4qr3993v9+7LMf5NaT/87xvhMc50T/tpX+Sv7xgn/kM09+RgfpVSpjuMBorAHT4AewfsvPxy7+GBfWXUg8HXdrpySj/bVWcpezTQf609KDOh5L5m9TqFZKwklw51/uHPd1e8TTf6/gtbwjTpNOMi+wAjAYllUsoyZUg23Z/fvzWB5ssfvn+48jg5Yz7/FYOeszy+3Rdm79060knYGHRj7Lxx1X3EFjWSOWZWFLTpCUE7xkj5EbPFlijdo51HAPtr/x8m9Myv3mke4jPHbisUm975qzJVeFnsgf6zlG60MP8OvffZM/LU9T3wkXnPCxeXecij4zEJqKELjwQmLbCw/iODiYOdIaJvzQQ3i/eGv/j2z7h2+hc8PFRJKGg629mVcfxzoipHPuquorAplgq4TlmaBrRU0JdeWj91amT6uLb4aXzhW15Gq4J/LgVvU7WA+PbLQ4VAdXHCvlza/4MN2f/kJeRxTV174aSyztfjdHoeEdAl6LB27a0t/TaCrt0N6XoKUnTks4Rks4TnOPO23pidMajtHcE6e1N573fZFVEfRmgjA/IZ/N7/Y25w2E7vMI33zbBaxtqKA84CXgHf0Hbrxm+PfPpA+OuvT+n/KU5xjN+//C0Y5D/CH9PEcTp/Fa3v7qJ1kBT4Afv/rHGIxW81MzyZSUXBUKloCCv31XNl7J7479jk9s/QRxJ47P8vGWNW+hsbyRrngXnbFOOmOddMQ7aO5r5kDXgTO5BGyx+zu2ynZ+1b+c2wlZzqsl0sJ9++4bsq+PXfQx1i1Yh9fjxRYbr8eLV7zucoGAaTz5vpjt3cdC21xpm6sRqzoNeSL/qVvY3vQMe//wc5adNixpzWxs23kBVFbj975Luq1tTG2aHMfw6N5mWvcdoCrSQ2eonOpzVvLSc2uH3GzEU2mOtUc42NqXF3QdauklHB84jxKfJxNs5QddS+eXEPB69Gn1HDKOgK6owVXfU09x7B3vHLLtqQ+/gX9N/JRwEF7zlOE1TzmUSIDKH96NF2tKOqKYzYqZNx3H0BFJ9AderZlgrDknKDveEaGtNzHifnwei/KgTXnAS1nQS3nApjzopTzg7U8vz6RXBL1D1uWWlBX7GsfzWYwjmJv0wVE7Ll7N9b/667wnvLbY3HPtPZzuO62dUajZYNKDq+FuZJdXLOfGX92Y17bHwmJx+WKO9hwddn9BO0iVv4qqQBWWWOxs2zlkm3evfzdr56/tD5z6exDOWfZa3nFf91QHOjB9wc5Ut/ecjgfb4zje7A+uROQa4GuAB/h3Y8wXhtt2uAweP3w4b5wRR0CM++kkPJC0oSTTRGTeu99N53/+55Cnkst+dn//mCVjeSI/0Ubzxhhaw3EOZIOtzPRgSy8nuwZ6vROBxVUh6isCPHO0Y8jT6jvfspnVtWUEfR5CPpug11O09l7T8aR6qo85w69xUkuuYl74z1d4eWijoVHmc9O9XTSeiCOBAOmb30fpVVexpHLpmZ7CWWWi3wfjcai1l2u/9hjx1MB3udcjfPyacwn4PHRHk/REU/TEkvREk/TEUplpJj2aJJEeuSMWn23lBVtej7DtaGde1UbbEv728qU0VAbxez0EvBZ+e2Dqty0C3vyp3/bg91r47ZFL1s4gmCvqTePgHi7bFni5+Y+3sLdj75Bt77r6Li6ovUA7o1CzQVHzSaESqqM9R4eMAypIf5W3wc6bdx7Pdwwd6+2LL/kiL138UoJ2sD/tbCjVyR5Xv0+m1ewOrkTEg9tS6RXACeBp4E3GmIKjKg6XwXOfyDsCLzTAX5YLizZcxsX/8TTeyMCTEruxkZqbPsCpm2+Zkl73zkQ0keZQ20CwdbC1l50nuznaPrRL90L8tkUoG2z5PIR8HgJeTybNQ9BrD8z3T21C3oG0gO1hx4kuvvLQPhIp0z9W0FVrarE9FrYleLIvkaLcSE710/Hpeho/jmMWNbjK7V79hXkxvvEam9NVwlvXvJXNCzbRc3gfFWGH7jKL+SvXTergzerMFeP/NpZM9wdc3SMFYpn0pq4oB1uH9pQ3EW6wlQm8BgVmxhh2HO/KC+YGV7UcpGg3jYNvqDzink/IGyKWiuU1HNdOKtQsM2n5xG/5uX719RzoOsDTp4e2Qb16ydU8cuyRIfnnP67+D97123eNKWA6W0p11LSb9cHVi4B/NcZcnVn+FwBjzOcLbT9ccNW+bycn3/w27rs4wX9faFHXAe972OZF3/g+9qHjQ6p3lL785SSPH59VbUaGe1r9iVetoSzgJZpIEUmkiSTSRJNpIpnlWDI9kJ5w06OJNJFMeiI18a7EwS1h80h+wOXxSH7aoIBscFoy5bD7VA+5/6KWwKbFlQR9xa+OFk2k2D7oBm4yjzfcMUe4aSxqcHW4+zAfePj9LJNqHgs/S5mnhIA3xLev+XeWlC/RH5BZZCpLyqBwuzK/Ldz/Py+nviJIPJUmlnQGpsk08ZRDbNA0b74/bdB7U2nawnH2NfcOOY/73nMJly4v2Ai5aDeNh7sP84ZfviHvZs8jHu699l6t/qdmu0nNJwAVvgp6k71Desr88at/zAudLwzb5mqs+UqDHTUFZn1vgQuB4znLJ4C8QUBE5D3AewAaGxsL7uR4RRLrY/+TU7u+wWufTHP9s174l/dxvCzOhle8gmWrVw8JpKay171iWDq/hK/euKnopSyptEM06QZe0ZxAbNvRDm57YGgVmHdctoTFVSHSjiFtDI5jSDkD07QxpNOZqeO+HGNIDUrLW5eZ70glGBz7Owa3bVqRG+eDu9/BfQdM5vGGO2Ys6dASjg33RH7MRssrrZFWjvYe4yjHAOhO99Kd7qUt2tbfK6Q+gZ8dLEtYXl064f+ZsVo6v4SvvOH8Id8/a+rKJyWoG66TkJqywAjvGpux5JPBN4xp4w6EPpW9mSo1nc4knwB87WVfoz3WPiRYaixvpLG8sWD+GU++mupejJUai5kWXBX6Vc679TTGfAv4FrhPTwrtpDI4j/d7/ou3b/lb5vdZ7H2j4Z7un/P14FWzMpAqxLKEa9bWce5NW4r6tNr2WJR5LMoC+Y09q0JevvLQC0Nubt7xoqWTdkM33A3VN996waQcc6qPN9Ixi3HTOFpeqQnVEPAEpqUbeDW7Tdb3z3CGC+aWzi+Z8L4nkk/0xk6dLc40n8wLzmNT7aZhg6VC+UfzlZrtZtojthPA4pzlRUDTeHfSWN7ITRd8kDuav8eHur/NF09/l5su+OCcG1Mk+7T60uULWF5dOqnVgLI3NwGv+y9TzJubmXLMs+Eac2XH9Qp43EBOx95R4zGV3z/ZYO6Bm7Zw33su4YGbtkxZz6iaT5Qa3Uj5JBssXVR3EcsqlmnprprzZlqbKxu3Q4uXAydxO7R4szFmd6HtR+oOVOvhFt9Ut+uYjmPO8Gssapsr0Hyi5qxJ6QVN84maYzSfKDW62d3myhiTEpH3A7/F7Yr9ruECq9FosXLxTXW7juk45tlwjXnH1nyi1Kg0nyg1Os0nSrlmVHAFYIx5AHhgus9DKaWUUkoppcZDy2uVUkoppZRSqgg0uFJKKaWUUkqpIphRHVqMl4i0AkdH2WwB0DYFpzOd9BrnhtGusc0Yc82Z7HgMeUU/37lBr9F1RnlF8wmg1zhXaD6ZXHqNc8Ok5JNZHVyNhYg8Y4y5cLrPYzLpNc4N03mN+vnODXqNc/fYU0WvcW7QfDK59Brnhsm6Rq0WqJRSSimllFJFoMGVUkoppZRSShXB2RBcfWu6T2AK6DXODdN5jfr5zg16jXP32FNFr3Fu0HwyufQa54ZJucY53+ZKKaWUUkoppabC2VBypZRSSimllFKTToMrpZRSSimllCqCORtcicg1IrJPRA6IyMen+3yKRUTuEpEWEdmVkzZPRB4Skf2ZadV0nuNEiMhiEfm9iOwRkd0i8sFM+ly6xoCI/FlE/pK5xk9n0qflGudiXtF8MieuUfPJJJvr+QQ0r0z1NWo+mZ00nxT3GudkcCUiHuBO4FrgPOBNInLe9J5V0dwNDB7M7OPAI8aYVcAjmeXZKgV8xBizBrgUeF/mbzeXrjEOXGmM2QicD1wjIpcyDdc4h/PK3Wg+me3XqPlk8t3N3M4noHllyq5R88mspvmkiNc4J4Mr4GLggDHmkDEmAdwHvHaaz6kojDGPAR2Dkl8L3JOZvwd43VSeUzEZY04ZY57NzIeBPcBC5tY1GmNMb2bRm3kZpuca52Re0XwCzP5r1HwyyeZ6PgHNK0ztNWo+maU0nxT3GudqcLUQOJ6zfCKTNlfVGmNOgZtBgJppPp+iEJGlwCbgKebYNYqIR0R2AC3AQ8aY6brGsymvzKn/oSzNJ5pPimxO/Q/l0rwy6deo+WQO0Hwy8Wucq8GVFEjTPudnEREpBX4KfMgY0zPd51Nsxpi0MeZ8YBFwsYism6ZT0bwyi2k+mTKaT2Y5zStTQvPJLKf5pDjmanB1Alics7wIaJqmc5kKzSJSD5CZtkzz+UyIiHhxM/f3jDH3Z5Ln1DVmGWO6gEdx63NPxzWeTXllTv0PaT7RfDJJ5tz/kOaVKbtGzSezmOaT4l3jXA2ungZWicgyEfEBbwR+Mc3nNJl+AbwjM/8O4L+m8VwmREQE+A6wxxjzlZxVc+kaq0WkMjMfBK4C9jI913g25ZW59D+k+cSl+aT45sz/EGheYWqvUfPJLKX5pMjXaIyZky/gVcALwEHgk9N9PkW8rh8Ap4Ak7lOivwPm4/Zwsj8znTfd5zmB63sxbjWC54Admder5tg1bgC2Z65xF/CpTPq0XONczCuaT+bENWo+mfxrmtP5JHONmlem8Bo1n8zOl+aT4l6jZHaslFJKKaWUUmoC5mq1QKWUUkoppZSaUhpcKaWUUkoppVQRaHCllFJKKaWUUkWgwZVSSimllFJKFYEGV0oppZRSSilVBBpcKQBEpFJE/mdmvkFEfjLd56TUTKR5RanRaT5RanSaT+Ym7YpdASAiS4FfGWPWTfe5KDWTaV5RanSaT5QaneaTucme7hNQM8YXgBUisgN3ILU1xph1IvJO4HWAB1gHfBnwAW8D4sCrjDEdIrICuBOoBiLAu40xe6f6IpSaAppXlBqd5hOlRqf5ZA7SaoEq6+PAQWPM+cA/D1q3DngzcDHwOSBijNkEPAm8PbPNt4APGGMuAP4J+D9TcdJKTQPNK0qNTvOJUqPTfDIHacmVGovfG2PCQFhEuoFfZtJ3AhtEpBS4DPixiGTf45/601Rq2mleUWp0mk+UGp3mk1lKgys1FvGceSdn2cH9H7KArsyTF6XOZppXlBqd5hOlRqf5ZJbSaoEqKwyUnckbjTE9wGERuQFAXBuLeXJKzSCaV5QaneYTpUan+WQO0uBKAWCMaQeeEJFdwB1nsIu3AH8nIn8BdgOvLeb5KTVTaF5RanSaT5QaneaTuUm7YldKKaWUUkqpItCSK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKzQgi8oCIVE73eSillFJnSowx030OSimllFJKKTXracmVUkqpMROREhH5tYj8RUR2iciNInJERG4XkT9nXisz21aLyE9F5OnM6/JMeqmI/IeI7BSR50TkrzPpR0RkQWb+rZl97RCR/ycinszr7sxxd4rIP07fJ6GUUkoNZU/3CSillJpVrgGajDF/BSAiFcDtQI8x5mIReTvwb8B1wNeArxpjHheRRuC3wBrgFqDbGLM+s4+q3AOIyBrgRuByY0xSRP4P8BZgN7DQGLMus13lZF+sUkopNR4aXCmllBqPncCXROR24FfGmK0iAvCDzPofAF/NzF8FnJdZD1AuImWZ9DdmE40xnYOO8XLgAuDpzHuDQAvwS2C5iHwd+DXwYHEvTSmllJoYDa6UUkqNmTHmBRG5AHgV8HkRyQY4uQ14s/MW8CJjTDR3H+JGTCM1+BXgHmPMvwxZIbIRuBp4H/AG4G/P6EKUUkqpSaBtrpRSSo2ZiDQAEWPMd4EvAZszq27MmT6ZmX8QeH/Oe88fJj2vWiDwCPA3IlKTWT9PRJZk2mNZxpif4lYt3IxSSik1g2jJlVJKqfFYD9whIg6QBP4B+AngF5GncB/avSmz7U3AnSLyHO7vzWPAe4HPZtJ3AWng08D92QMYY54XkZuBB0XEyhznfUAU+I9MGsCQki2llFJqOmlX7EoppSZERI4AFxpj2qb7XJRSSqnppNUClVJKKaWUUqoItORKKaWUUkoppYpAS66UUkoppZRSqgg0uFJKKaWUUkqpItDgSimllFJKKaWKQIMrpZRSSimllCoCDa6UUmoOE5G0iOwQkV0i8mMRCWXSa0Xk+yJySES2iciTIvL6zLqXiogRkb/L2c+mTNo/ZZbvFpHDmX3vEJE/Ts8VTh8RqROR+0TkoIg8LyIPiMhqEYnmfC47ROTtIlKW2W5V5r1eEdkpIpdM93UopZQqHh1EWCmlZohwLNm451T41uaeWENdeeDUufVlN5cFvMcmuNuoMeZ8ABH5HvBeEfkq8HPgHmPMmzPrlgCvyXnfTuBG4DuZ5TcCfxm07382xvxkguc36cKJcOMLnS/c2hppbagJ1ZxaVbXq5jJf2YQ+VxER4Ge4n+EbM2nnA7XAwexnPug9/wLcCbwS+Cfgj8aYpyZyHkoppWYWDa6UUmoGCMeSjb/ZefrhT/1i16pY0iHgtfjMa9Zdeu36uquKEGBlbQU2AFcCCWPMN7MrjDFHga/nbHsMKBeRWqAFuAZ4oEjnMWXCiXDjw0cffvi2p25bFUvHCHgCfOKST1x61ZKrrppggPUyIDnoM9whIkuHe4Mx5kci8rci8lHgvcCmCRxfKaXUDKTVApVSagbYcyp8azawAoglHT71i12r9pwK31qM/YuIDVyLWyK1Fnh2DG/7CXADcFlm+/ig9XfkVH37XjHOs9he6Hzh1mxgBRBLx7jtqdtWvdD5wkQ/13XAtmHWrRhULXBLzroPAbcDnzXGdEzwHJRSSs0wWnKllFIzQHNPrCEbWGXFkg4tPbGGCe46KCI7MvNbcav5vTd3AxG5E3gxbmnWRTmrfgT8EDgX+AFukJVrxlcLbI20NmQDq6xYOkZrpHWin+tIClYLzLgGOIUbnCmllJpjtORKKaVmgLrywKmAN/8rOeC1qCkPNE1w11FjzPmZ1weMMQlgN7A5u4Ex5n3Ay4Hq3DcaY04DSeAVwCMTPI9pUROqORXwBPLSAp4A1aHqiX6uu4ELxvMGEWkAbgIuBl4lIhsmeA5KKaVmGA2ulFJqBji3vuzmz7xm3f5sgJVpc7V/TX3ZLZNwuN8BARH5h5y00DDbfgr4mDEmPQnnMelWVa26+ROXfGJ/NsDKtLnav7pq9UQ/198BfhF5dzZBRC4Clozwnq8CtxljTgAfBu7MdIyhlFJqjhBjzHSfg1JKKQZ6C2zpiTXUlAea1tSX3TLRzixEpNcYU1ogvR73Zv8SoBXoA75pjPmhiLwU+CdjzHWD3vOvQK8x5ksicjdwBdCds8nFmZKxGSW3t8DqUHXT6qrVt0y0t0DoL4n6N9wSrBhwBLdN1XPAvpxN7wL2AJ8BLjOZH14R+QXwU2PMPRM9F6WUUjODBldKKaWUUkopVQRaLVAppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJqDhORc0RkR86rR0Q+NMy2XxORkyJi5aS9U0RaRWS7iOwXkd+KyGWD3vdPIrJXRHaJyF9E5O0566pFJCkifz9pFzkNRCSd+Tx3iciPRSSUSa8Vke+LyCER2SYiT4rI66f7fJVSSk0NDa6UUmqmiPU0cvSP97Dr/oc4+uS9xHoaJ7pLY8w+Y8z5xpjzcQe7jQA/G7xdJqB6PXAceMmg1T80xmwyxqwCvgDcLyJrMu97L/AK3AGE12XeKznvvQH4E/CmiV7LmUqHw42RZ565p+eBBx6KbNt2bzocnvDnCkQzn+s6IAG8V0QE+DnwmDFmuTHmAuCNwKIiHE8ppdQsYE/3CSillMINrPb818M88M+rSEbBG4RX3XEpa157FYHyY0U6ysuBg8aYowXWvQzYBfwQNxB6tNAOjDG/F5FvAe8B/hH4BPAyY0xPZn03cE/OW94EfAT4vogsNMacLNK1jEk6HG4MP/jgw6dv/ewqE4shgQB1t9x8adkrX3mVp6ysWJ/rVmADcCWQMMZ8M7si81l/vUjHUUopNcNpyZVSSs0Ezbtu7Q+sAJJReOCfV9G869YiHuWNwA+GWfemzLqfAdeJiHeE/TwLnCsiZUCZMeZgoY1EZDFQZ4z5M/Aj4MYzPvMzFN+379ZsYAVgYjFO3/rZVfF9+4ryuYqIDVwL7ATW4n42SimlzlIaXCml1EwQPt3QH1hlJaNuehGIiA94DfDjYda9Cvh5pgTqKeCVI+0uZ2pG2O6NuEEVwH1MQ9XAVEtLQzawyjKxGKmW1ol+rkER2QE8AxwDvjN4AxG5M9MG7ekJHksppdQsodUClVJqJiirP4U3SF6A5Q1CWV1TkY5wLfCsMaY5U6L0y0z6N4EmoALY6TYbIoTbNuvXw+xrE7DHGNMjIn0istwYc6jAdm8CakXkLZnlBhFZZYzZX6RrGpVdW3tKAgFyAywJBLBrqif6uUYz7dgG9iuyG/jr7LIx5n0isgA3AFNKKXUW0JIrpZSaCWrX3syr7tiPN+guu22u9lO77pYiHSFb7Q9jzPFsJxeZ9kFvAv6HMWapMWYpsAx4ZbYHvFwicgVue6tvZ5I+D9wpIuWZ9eUi8h4ROQcoMcYszNnv53FLs6aMf/Xqm+tuuXm/BALu+bttrvb7zzmnWJ9rrt8BARH5h5y0IZ+hUkqpuUuMGalGh1JKqSkT62mkedethE83UFbXRO26W4rRmUUmSDoOLM90ODF43QlgabZTikz6/bidWwSBO4CTuIHCYeAzxpgnMtsJ8M/A3wHJzOvLwEogYIz5eM4+NwD3GWPOm+g1jUc6HG6M79t3a6qltcGuqW7yn3POLRPtzEJEeo0xpQXS64GvApcArUAf8E1jzA8ncjyllFKzgwZXSimllFJKKVUEWi1QKaWUUkoppYpAgyullFJKKaWUKgINrpRSSimllFKqCDS4UkoppZRSSqki0OBKKaWUUkoppYpAgyullFJKKaWUKgINrpRSSimllFKqCDS4UkoppZRSSqki0OBKKaWUUkoppYpAgyullFJKKaWUKgINrpRSSimllFKqCP4/TwLWrAvIo1wAAAAASUVORK5CYII=\n", + "image/png": "iVBORw0KGgoAAAANSUhEUgAAA1cAAAHsCAYAAAA+UFdvAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAADJoUlEQVR4nOzdd5wkdZ3/8den88SNM5uXzSy7RFlAQRQEBJVkBu8UI+hxJkwYfsbjznDq6SkemMAIqKiAgCJIkJxhFzYnNs5snNixvr8/qnqmZ6YnbvfMzuz7+Xj0o2JXfau7v9X1qW8oc84hIiIiIiIiByY00gkQEREREREZCxRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5ERERERERKQMGViIiIiIhICSi4GkXM7DQzO7lE26o2s2vMbJ2ZrTCz+83spCFu614zWzaI9eeY2fIh7ut8M7tyKO89EGZ2oZktKZge1DH3sd3bzWz8ANd9a/BdeaXY91imvHLI55VvmdlKM3vOzP440PcdapRPDvl88rUgjzxjZn8zs+kHuv+xSPnk0M4nBe/5pJk5M5vc37oKrobIzCIjsNvTgJJkcOAnwB5goXNuKfBuoN8fzEhzzt3inPv6COz6QmBJfysNlnPu9c65fQNcfTnwJuD+UqejnJRXRsYhnlfuAo50zh0NrAY+W+r0lJryycg4xPPJt5xzRzvnjgVuA75Y6vSUmvLJyDjE8wlmNgs4C9g80B0c9C9gDrAS/0e5HPg1cCbwILAGODFYrwr4GfA48DRwQcH7HwCeCl4nB/On4V+oPhNs99RgfkvBvt8CXBeMXwd8B/gH8G1gPnAn8GSw/cUF6/0oWG898OogXS/mtxWs91rg4SBNvwOqg/kbga8E858HFgfHsAPYGqT31AP4POcDG4BwL8v/FXgs2M81+fWAluC4nwLuBuqC+fcC3wjes7rgc+ztc58DLA/Gw8C3gu/sOeCyYP4VwM+C8aOC76cS/0T0g4LP+fvAQ8Hn/JYix1IF/AV4NtjG24EzgD8WrHMWcHPBMV4VrP8IMAX/pLon+MyeCT6/3o65t+Pp7be2Ef/E2iOdfXx/9wLLlFeUV5RX+s4rwfveCPxa+UT5BOWTvr7DzwI/Uj5RPkH5pNh383vgmPz7+v2uh/ojGc5X8IPIBl90CD9D/Qww4ALgT8F6/wn8azA+Pvjgq4IfRiKYvxB4Ihj/BPD5gi+mZgAZ/DY6f/B34999ADgJuKdgvRsK0tfULe3HBl/q/UBV8J7PAF8s+NI/HIz/G/CTYPzLwCd7+YxOD3483V8PFVn3fAp+4N2WHQHcCkSD6auBdwXjDviXYPyLdGa0e4FvB+OvB/4ejPf2uc+hM4NfCnwhGI8DTwBzg8/qfvwLoyeAU4J13k3XDP67YN0lwNoix/Nm4McF0+OC72UlnSeo3wDnFRxjfvybBWm7joITSB/H3Nvx9PZb24j/W+iRzj7yw730HVwpryivgPJKfvmtBL915RPlE5RPuh/PVcBL+BeWdconyiconxT73r5X+L5i32HhaySKV4dqg3PueQAzWwHc7ZxzZvY8/g8G/LsR55vZJ4PpBDAb2Ab8wMyOBXLAomD548DPzCyKf5J4ZgDp+J1zLmdm1fhR9e/MLL8sXrDerQXp29kt7XOAmfg/ygeD98fw76Tk3RwMn8SvCtYn59w/8E8cB+oM4Hjg8SBdFUBDsMwDbgzGf1WQRuia3jnBeJTin3uh1wJHm9lbgulx+CfNDWb2bvw7ENc45x7sJb1/cs55wAtmNqXI8ueB/zazbwC3OeceADCzXwL/amY/B14BvCtYP41/Es8fy1m97Le3Yy56PPT/WyuaziFSXumD8sqhk1fM7PP4F4e/LrJY+aQPyieHRj5xzn0e+LyZfRb4d+BL3VZRPumD8snYzidmVgl8Ptj+gI2m4CpVMO4VTHt0HocBb3bOrSp8o5l9GdiJX6QXApIAzrn7zexVwBuAX5rZt5xzv8CPoPMS3dLRGgxDwD7n11XuK72FaS1Mbw64yzl3cT/vzzGA78nMTge+W2RRm3Oue13hFcAxZhYKMkeXTQHXO+cG0kah8HMqlt6PU+RzL7K/Dzvn/lpk2UL8ouK+GtkWfrbWfaFzbrWZHY9/h+O/zOxvzrmvAj/Hv0uUxD9pZ4O3ZFxwe4L+P/tix9zr8fTyW+svnUOhvNIH5ZWObXVN4BjLK2Z2CXAucEZBOoulCZRPelA+6dhW1wSOsXxS4Df41aO6B1fKJ31QPunYVtcEjp18Mh+/BOzZIOidCTxlZic653b0lsCx1qHFX4EPW/AJmNlxwfxxwPbgx/xO/KJBzOwwoME592Pgp8DLgvV3mtkRZhbCLxrtwTnXBGwws7cG2zIzO2YQaX0EOMXMFgTvrzSzYncXCjUDNb2k5x/OuWOLvHo0wnTOrcMvMv1KwWe10MwuwC9uf4uZ1QfzJwafE/i/l/xdgXcA/+wnvUU/927+CnwouKuAmS0ysyozGwd8D3gVMKngbsSgmN/7UZtz7lfAfxN8x865bfh31b6AX+zcn14/+256O57efmt9prOMlFeUV7oYS3nFzM7Br+5zvnOubQBp6SuNyifKJx3GWD5ZWDB5Pn6VraFQPlE+6WKs5BPn3PPOuXrn3Bzn3BxgC/CyvgIrGF0lVwPxNeB/gOeCH+5G/DuXVwN/CDLjP+i8A3Ia8Ckzy+BH6fniySvxiyfz9ZCre9nfvwA/MrMv4BfD3oDfKK5fzrlG84tef2tm+SLtL+DXVe7NrcDvg4z4YXdgVcfej99Acq2ZtQG7gU85514IjudvwQkuA1wObML/3Jaa2ZPAfvwGin3p7XMv9BP8Yt2ngu+sEb93mO8CVwd3Fd4H/MPMhtJL3lHAt8zMC47lQwXLfo1f9/eFAWznBuDHZvYROk9yxfR2PKdR/Lc2kHQCYGZvBP4XqAP+YmbPOOfOHkDai1FeGTjllVGWV4Af4FcVuiu4hnnEOffBAaS9O+WTgVM+GX355Otmdjh+qc4mYCh5BJRPBkP5ZPTlk0EzV7S2hEhPZtbinOvtZDfqmNkPgKedcz8d6bTI2KK8ItI/5ROR/imfjD4KrmTAxlIGD+4AtQJnOedS/a0vMhjKKyL9Uz4R6Z/yyeij4EpERERERKQExlqHFiIiIiIiIiNCwZWIiIiIiEgJjOrg6pxzznH4/f3rpdeh8Boy5RW9DrHXkCif6HWIvYZE+USvQ+w1aKM6uNq1a9dIJ0FkVFBeEemf8olI/5RPRPo2qoMrERERERGRg4WCKxERERERkRJQcCUiIiIiIlICZQuuzOxnZtZgZsuLLPukmTkzm1ww77NmttbMVpnZ2eVKl4iIiIiISDmUs+TqOuCc7jPNbBZwFrC5YN4S4CJgafCeq80sXMa0iYiIiIiIlFTZgivn3P3AniKLvgt8mq7dG14A3OCcSznnNgBrgRPLlTYREREREZFSG9Y2V2Z2PrDVOfdst0UzgJcKprcE84pt41Ize8LMnmhsbCxTSkVGP+UVkf4pn4j0T/lEZOCGLbgys0rg88AXiy0uMq/og7ucc9c655Y555bV1dWVMokiY4ryikj/lE9E+qd8IjJwkWHc13xgLvCsmQHMBJ4ysxPxS6pmFaw7E9g2jGkTERERERE5IMNWcuWce945V++cm+Ocm4MfUL3MObcDuAW4yMziZjYXWAg8NlxpExEREREROVDl7Ir9t8DDwOFmtsXM3tfbus65FcBNwAvAncDlzrlcudImIiIiIiJSamWrFuicu7if5XO6TV8FXFWu9IiIiIiIiJTTsPYWKCIiIiIiMlYpuBIRERERESkBBVciIiIiIiIloOBKRERERESkBBRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5ERERERERKQMGViIiIiIhICSi4EhERERERKQEFVyIiIiIiIiWg4EpERERERKQEFFyJiIiIiIiUQNmCKzP7mZk1mNnygnnfMrOVZvacmf3RzMYXLPusma01s1Vmdna50iUiIiIiIlIO5Sy5ug44p9u8u4AjnXNHA6uBzwKY2RLgImBp8J6rzSxcxrSJiIiIiIiUVNmCK+fc/cCebvP+5pzLBpOPADOD8QuAG5xzKefcBmAtcGK50iYiIiIiIlJqI9nm6r3AHcH4DOClgmVbgnk9mNmlZvaEmT3R2NhY5iSKjF7KKyL9Uz4R6Z/yicjAjUhwZWafB7LAr/Oziqzmir3XOXetc26Zc25ZXV1duZIoMuopr4j0T/lEpH/KJyIDFxnuHZrZJcC5wBnOuXwAtQWYVbDaTGDbcKdNRERERERkqIa15MrMzgE+A5zvnGsrWHQLcJGZxc1sLrAQeGw40yYiIiIiInIgylZyZWa/BU4DJpvZFuBL+L0DxoG7zAzgEefcB51zK8zsJuAF/OqClzvncuVKm4iIiIiISKmVLbhyzl1cZPZP+1j/KuCqcqVHRERERESknEayt0AREREREZExQ8GViIiIiIhICSi4EhERERERKQEFVyIiIiIiIiWg4EpERERERKQEFFyJiIiIiIiUgIIrERERERGRElBwJSIiIiIiUgIKrkREREREREpAwZWIiIiIiEgJKLgSEREREREpAQVXIiIiIiIiJaDgSkREREREpATKFlyZ2c/MrMHMlhfMm2hmd5nZmmA4oWDZZ81srZmtMrOzy5UuERERERGRcihnydV1wDnd5l0J3O2cWwjcHUxjZkuAi4ClwXuuNrNwGdMmIiIiIiJSUmULrpxz9wN7us2+ALg+GL8euLBg/g3OuZRzbgOwFjixXGkTEREREREpteFuczXFObcdIBjWB/NnAC8VrLclmNeDmV1qZk+Y2RONjY1lTazIaKa8ItI/5ROR/imfiAzcwdKhhRWZ54qt6Jy71jm3zDm3rK6urszJEhm9lFdE+qd8ItI/5RORgRvu4GqnmU0DCIYNwfwtwKyC9WYC24Y5bSIiIiIiIkM23MHVLcAlwfglwJ8L5l9kZnEzmwssBB4b5rSJiIiIiIgMWaRcGzaz3wKnAZPNbAvwJeDrwE1m9j5gM/BWAOfcCjO7CXgByAKXO+dy5UqbiIiIiIhIqZUtuHLOXdzLojN6Wf8q4KpypUdERERERKScDpYOLUREREREREY1BVciIiIiIiIloOBKRERERESkBBRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5ERERERERKQMGViIiIiIhICSi4EhERERERKQEFVyIiIiIiIiWg4EpERERERKQEFFyJiIiIiIiUgIIrERERERGREhiR4MrMPm5mK8xsuZn91swSZjbRzO4yszXBcMJIpE1ERERERGQohj24MrMZwEeAZc65I4EwcBFwJXC3c24hcHcwLSIiIiIiMiqMVLXACFBhZhGgEtgGXABcHyy/HrhwZJImIiIiIiIyeP0GV2Y2xcx+amZ3BNNLzOx9Q92hc24r8N/AZmA7sN859zdginNue7DOdqC+l/RcamZPmNkTjY2NQ02GyJinvCLSP+UTkf4pn4gM3EBKrq4D/gpMD6ZXAx8b6g6DtlQXAHODbVaZ2b8O9P3OuWudc8ucc8vq6uqGmgyRMU95RaR/yici/VM+ERm4gQRXk51zNwEegHMuC+QOYJ9nAhucc43OuQxwM3AysNPMpgEEw4YD2IeIiIiIiMiwGkhw1WpmkwAHYGYvB/YfwD43Ay83s0ozM+AM4EXgFuCSYJ1LgD8fwD5ERERERESGVWQA61yBH/jMN7MHgTrgLUPdoXPuUTP7PfAUkAWeBq4FqoGbgvZcm4G3DnUfIiIiIiIiw63f4Mo595SZvRo4HDBgVVCdb8icc18CvtRtdgq/FEtERERERGTU6Te4MrN3dZv1MjPDOfeLMqVJRERERERk1BlItcATCsYT+KVLTwEKrkRERERERAIDqRb44cJpMxsH/LJsKRIRERERERmFBtJbYHdtwMJSJ0RERERERGQ0G0ibq1sJumHHD8aWADeVM1EiIiIiIiKjzUDaXP13wXgW2OSc21Km9IiIiIiIiIxKA2lzdd9wJERERERERGQ06zW4MrNmOqsDdlkEOOdcbdlSJSIiIiIiMsr0Glw552qGMyEiIiIiIiKj2UDaXAFgZvX4z7kCwDm3uSwpEhERERERGYX67YrdzM43szXABuA+YCNwR5nTJSIiIiIiMqoM5DlXXwNeDqx2zs0FzgAeLGuqRERERERERpmBBFcZ59xuIGRmIefcP4BjD2SnZjbezH5vZivN7EUze4WZTTSzu8xsTTCccCD7EBEREZFh4nmwaw1seMAfet5Ip0hkRAwkuNpnZtXAA8Cvzex7+M+7OhDfA+50zi0GjgFeBK4E7nbOLQTuDqZFRERE5GDmebDyVrjmVLj+XH+48lYFWHJIGkhwdT8wHvgocCewDjhvqDs0s1rgVcBPAZxzaefcPuAC4PpgteuBC4e6DxEREREZJnvWwR8vg0y7P51p96f3rBvZdImMgIEEVwb8FbgXqAZuDKoJDtU8oBH4uZk9bWY/MbMqYIpzbjtAMKwvmhizS83sCTN7orGx8QCSITK2Ka+I9E/5RKR//eaT5h2dgVVeph1adgxPAkUOIv0GV865rzjnlgKXA9OB+8zs7wewzwjwMuBHzrnjgFYGUQXQOXetc26Zc25ZXV3dASRDZGxTXhHpn/KJSP/6zSc1UyFa0XP+83+AVIvaYskhZcDPuQIagB3AbnopVRqgLcAW59yjwfTv8YOrnWY2zTm33cymBfsTERERkYPZxPnwxms6qwZGEjBzGTz5c7/tVbIJcmk/AHvjNbD4PAgNpPKUyOgzkOdcfcjM7sXvZGIy8AHn3NFD3aFzbgfwkpkdHsw6A3gBuAW4JJh3CfDnoe5DRERERIZJKOQHTJc9AO++DT74T3jXrX4g1brbD6xAbbHkkDCQkqvDgI85554p4X4/jN/zYAxYD7wHP9C7yczeB2wG3lrC/YmIiIhIuYRCMHmh/8qrnQG4rutl2qFpa9f1RMaQfoMr51zJu0QPArVlRRadUep9iYiIiMgIyLfF6t7Zxe2fgguuhorxfmcYNVP9qoWqKihjwGDaXImIiIiIDEyxtlgnfgCe/x389Cw/mPJyaoslw8vz/KqpZQrsFVyJiIiISOl1tMVa4nfLXh1cyB75ZvjJGX5gBX7g9Yf3+222Ji8q64WvHOLyD7y++VLIJv2A/03XljSwV3AlIiIiIuVRrC1WqqUzsMrLpeH6N8DsV8Cav0E2pRKtQ8VQS5Kcg3QLtO+F9n2Q3Fdk2G1ZayPsf6lzG9mkX7J62ZKStQNUcCUiIiIiw6dYW6xwDCbOgxdv7ZyXaYebPwAffFAdYIxVuRws/z3c+mE/oA7H4KQPwqSFkNrfe5CU3AfJ/eBle9+2hf12fYnx/rBiAsSquwZX0PnAawVXIiIiIjLqdG+LlS+hqpgI15/bdd1sCn75Rjj67XDEeTDtGDDzl5W57cxBYbiPcaj7yyT9ACgf/AxkPLkP2vd0LcXMpeGh73dOW6gzOMoPxx/mB0qF87oP84FU/reSt2sNXHNq18A+WuFXWS0RBVciIiIiMnx6a4u1Z13PEq1QFKqnwD+/Aw/8N4yb7QdZi98ALQ3w5w91DdDKWYVwJAKdlbf2DEJLdYzO+cFMNukHsek2WH0n/P2LnaVIy94LE+b6pUTFSpDywVI22ceODBK1fsCTD37GzfTHU81+yVV3b/4pLHwtxGt6BkgHorfAfuL8ku1CwZWIiIiIDK9ibbF6u/BdfJ5/Eb/qdr/a4OM/hkd+2HV7mXb4w/vgtVfBhDl+YBCOQSQO4SiEg2Ek3rksvzwU7j+9pQh0nPOrseXSwSsTvNKdQ69g3p4N8Jcruj6E+ffvg1M+4gcd2VRnYNTnsI9lfcml4dH/65yOVXcNkCYv6FpS1Nt4vLb3z3jXGlj1l54lSdOO8QOyUustsC9hkGzOuf7XOkgtW7bMPfHEEyOdDJHhMuRbN8orcogZUl5RPpFDzMGZT/KlQ31d+Cab/Kpj93+rNPu0UBB8xSAS6xZ8BUPnwfZn/WHh+6YdC6FIEBgNIHAqtXDM7/EuEj/w4d7N8ND3eu7jol/DwrP94LTUyl06d+AGnU9UciUiIiIiB4diJVrdJWr9NlgP/6BriUckDm/5uV9lL5uGXMoPbLKpgqAnHUxn+lieHy9Y3trYNbACfzqXhsQ4CI8PArKoPwxFO8fD3ce7Ly+yTigaVHu83E9HxzEm4N23w5QlfkBYygBk1xp4/NqepUiTDy9PYAXDUpI03BRciYiIiMjo0lsVwkWvK8+FeW8dIbz1uvL1ZOh5fslZ92Ocflx5jnEY2iMVNZCAehRRcCUiIiIio8twl3iMROAx3Mc4BkuRRoKCKxEREREZfYazxGOkAo/hLtUZY6VII0HBlYiIiIhIfxR4yACMWDmfmYXN7Gkzuy2Ynmhmd5nZmmA4YaTSJiIi0sHz/PYWGx7wh57X/3tEROSQNJKVKD8KvFgwfSVwt3NuIXB3MC0iIjJy8t0EX3MqXH+uP1x5qwIsEREpakSCKzObCbwB+EnB7AuA64Px64ELhzlZIiIiXe1Z19mAHfzhHy/z54uIiHQzUiVX/wN8Gii89TfFObcdIBjWF3ujmV1qZk+Y2RONjY1lT6jIaKW8ItK/fvNJ846uXS+DP92yY3gSKHIQ0P+JyMANe3BlZucCDc65J4fyfufctc65Zc65ZXV1dSVOncjYobwi0r9+80nNVL/L5e5eehxyObXFkkOC/k9EBm4kegs8BTjfzF4PJIBaM/sVsNPMpjnntpvZNKBhBNImIiLSqfuzbSJxGD8H7v4KrPgj7FoF2VTnM28Wn6dnwoiIHMKG/R/AOfdZ59xM59wc4CLgHufcvwK3AJcEq10C/Hm40yYiItJFx7NtHoB33wYffBA+9BCc+knY8ZwfWIHaYsnBQT1bioy4g+n22teBs8xsDXBWMC0iIjKy8s+2mXOqPwxHYN5pPdfLtEPTVl3gyshQz5YiB4URfYiwc+5e4N5gfDdwxkimR0REZEDybbG6d3Zxy4fh8NfDk9dBNqnqgoc6z/NLM5t3+L+ZifNL9ztwDtKtkGqCVDPsXOGXnubS/vJ8aeplS/TQW5FhNKLBlYiIyKjUoy1WAk66DFb+BR79v871Mu1w86V+VULnleciWwamnIFOb/tbeWvnb6Qw0PayQVDUBMkgOMoHSckmSO0vGO++rKlz2vVTKpXv2VLBlciwUXAlIiIyWB1tsZb4F6/VwcX6/DPgF+d3XTeXhps/4LfRymX8QOxN16o0azj1Fej09R04B5k2SLdBpjUYtkG6pWC8tfi8lp2w9u+dAVCmHW56F4TjkEv1n+ZwHOI1kKj1h/FamDi3c7z7slQz3PHpzpIr8I+zeuqBfXYiMigKrkRERIYi3xarsFSgdnrP6oL1S2BrwdNHskn43bvhuHfC/NNh2rEwYQ6Yda4zEqUsw7m/Uu+zIwhqDYKcVki1dE7vWQ//+E/wMv76mXb43XtgwZkQChcESK0F40GghBt4OkIRiFZBrBIsVLxk6Yhzof4IiI/rGSDFayARzI/EB/cZeB5UTuwZQE6cP7jtiMgBUXAlIiJSKt2rC0Yr4NRPwO/f03U958Ezv4anrvenE+Nh+rF+oDXtGGjbDX/7wvC02xpqqc5gOOdXhcul/R4WM0lYfTv89XP+dDgGJ38YphzZGeDkg6Si083dlrUyqCAIwOX80sTKyX4wFKuG6ikQq4JoZcEwWJYfj1b5yzrG8+tWQSTWuf1da/xOJQoD7WgFnPbZ8lTT6600VaWjIsNKwZWIiEipFLvAda5naVa0At5/tx9YbH8Gtj3jDx/+YWfpSl6mHW66BOoO9y/iQ5HgFQ6G0W7TBcvD0SLr598TTLfv7brfTDv8/r1wwvv9oCKX7gyKCof9zculIZv2q8BlU/QZ/OTS8MC3i3yeET8NseogoAletTMLpoNl8equ04XjrY3wm7f7wWrhd3DJreVrj1Qs0C53SVKx0lQRGVYKrkREREqp+wWu5xW/yK47wl93xss635tNwdO/hr98vNtGXWeVMS8LuawfuHht/rSXC4a9vQqW5zL0W8rjZf2OOSzkt/2JxPzSpY7xbvMStQNbLz9v32Z45Ic993vh1TDnVZ2BUWFJ0IHwPL+d23AHOipJEjnkKLgSEREpp8FcZEfiMPfU4iVdF/6odCUSntcZbO1aBT87p2upTiQBl97rtw0qh11r4Mmf9TzGmSfC+Fml399IBToqSRI55Oj2iYiISLl1fxBxXxf1+epk0Qp/uhylLKGQXyoUq4Spx/ilOoX7e9O1MPnw0u2vu+E4xu4G8x2IiAyRSq5EREQOJsNdyjISpTqqMiciY5SCKxERkYPNcFcnG4nqa6oyJyJjkIIrkQLO80hv2kS2oYFIfT2xww7DynwndST2KSIiIiKlp+BKJOA8j+a77mLbZ67EJZNYIsH0b3ydmrPOKmmw4zwPl07jkklyySQtd9/Nzm98E9Lpsu1TRERERMpPwZUc1MpdquM8D5dM4rW1kVy1mq2f+jSk0/6yZJKtn/wUdR/5COHaWlwqhUun8FIpXLJgPJXGpfLj/stLF85Pdoy7VAqXyfSenmSSbZ+5krmLFhGfO7dkxyky2qmEV0RERoNhD67MbBbwC2Aq4AHXOue+Z2YTgRuBOcBG4G3Oub1D3Y/nOTbubmVnU5IptQnmTKoiFLIDP4BD2HBf3HQvSSIeZ+oX/x+VJ5yAa0/itbXi2tvx2tqCV+F4G157G67XZf60a2vrOxGZDI3fLvJgy2iUUCyGxeNYIk4oFvfH43FCsRjh6hpscoJQPIZ1LIsRisexeKJjPL1tG3uvu77rcSeTZBsbhyW48nI5WrevJte0nXDtNKqmLSIUDpd9vyKDMVylyr3R/4lI/5RPRHwjUXKVBT7hnHvKzGqAJ83sLuDdwN3Oua+b2ZXAlcBnhrIDz3PcuWIHV9z0DMmMRyIa4jtvO5Zzlk5VRh+ioV7cuFwOr7UVr6WFXEsLXsHLn/aXea3dpltayO7dS2bz5s6NpVLs+PwXBpReSyQIVVYSqqjwh5WVWGUF0YkTO6Y7llVVYhUVeK1tNH7/+1BYshSLMetHPyK+YH4QGMWxWAwrUQCS2rCBfTfc6AePBWmP1NWVZPt98XI52p/7EzW3X97xUM3W1/+QiqMvVIAl/SrnzRbnnF9ttrkZr6WV5OrVbPvUpzry5nCW8Or/RKR/yicinYY9uHLObQe2B+PNZvYiMAO4ADgtWO164F6GGFxt3N3akcEBkhmPK256hsUfOZV5ddUHdgCHIJfJ0Pb0Mz2rzF3xCWrf8AYsFCoaHOVaW/svGQIwI1RVRai6mlB1FeGqakLV1URi0a7BVWDiBz5AxdKlhKoquwRKVllJqLKKUEViSMGP8zxis2f1CCCrXvHyst0djx12GNO/8fUe+4wddlhZ9leodftqam6/nOeTU8hZiGMz66m6/XKa65ZQM/1w2LMOmndAjbpIlq76utniMhn/HNDcTK7jfNBccH5o7ry50tzS48ZLfpxcru80DFMJr/5PZDQZqeqzyicinUa0zZWZzQGOAx4FpgSBF8657WZW38t7LgUuBZg9e3bR7e5sSnZk8LxkxqOhOTmmMvmBnkSd55Hbs4dsQwOZhgayOxvINnS+Mo0NZBsaye3eDc713EAuR/Pf/054/LiOgCg8fjyxWTMJBdOh6irC1cF4fp3qfCAVvCori6Y7tWEDG974ph6lOuPf9MayXFBZKETNWWcxd9Eiso2NROrqyv7HVM599pdXck3bIdNO1sIcF1oHQDadInb/VVC/EB65GrLJzod7Lj5PAdZBqpQXVC6dJtfU5L/278frGG8i17Qfb38T6W1babn7HvD886xLJtn60Y9BJALZbL/7sFiMUE1NcH6oIVRdTXTmzM5zRXU14ZrO84bX2sqO//zPjps7EJTwTp48pGPskpZ+8smh8n8io185q88qn4gM3IgFV2ZWDfwB+JhzrslsYMXGzrlrgWsBli1bVuSKH6bUJkhEQ10yuhkk096YqRPc10kUM3L79pFtaOwMlhobOoOo/Pxdu3peCJkRnjSJSH0d0bp6KpYeSaS+HkIhdv3f/3WtMhePM/cPvy/bneORKNWxUIj43LnD2plEufbZX14J106DaAVHpddzQ/bVbHDTeXX4WU5a+1dYfWvnipl2+ONl8MEjwXkqzTrIFDsXTPuPr1F5wgl+6VFhkLQ/CJSCICkfRHUEUE1NuPb2PvdnlZWEEomOwKpQ7TlnE1+4iFBNdddAKT9eU+OXUkfCkGqCVDMkg2HH9P5gfFvHMpfaTs2/hMhu30Vyb5gdz05j+mcuJVZb9C9gcJ9fP/mk2P9JLGLU1yQOeN8y9pW6JMllsx1thvOvfNvj1MZNNHzzmx3/66WsPjuUfGIUPU2IjHkjElyZWRQ/sPq1c+7mYPZOM5sWlFpNAxqGuv05k6r4ztuO7SiijoaNWDjEZb96kguOnc6fn9lKKutGdZ3g5MqVPavpfezjROrrye3diyu4w5sXHjeOSH09kfp64vPnB+N1ROrriQbzI5MnY9Foj/c6zyO+YP6wBzrDXZJ0KKmatojW1/+Qqtsv56LMfawKLeDj8S+zbm+WD4dv5v2RO0hYEEx7Odyj12BPXa/SrAE4kAsq53l+O8XmZnLNLXjNTUHboxY/EGpuIdfcFFSpayazs4H2p57qKF12ySTbPvmpPvcRqqoiNK6WcO04wrW1xOYcRqg2mB5X22U8XFNDqGDczCO1ejlbL7sE85KEox6hqCNcGabutHFEqvdAcqMfIO1qgq3dAqhkE2Ra+/8gLAzxGkjUYhYinN6GzZ5FaP5U5r7xlcTW/S/WciRMnj+gz3Wouv+fAEyuijNFwdWoM5xV5lw6Ta61laa//pWd//lf/n91NMqk97yb+OGH+73UtnZ2ruS1B4FSvvOlXuYX+2/vMx3DVH22ez6JhY1wOMRHb3yGn19yApXx8Ki/qS0yUOaKVfcq5w79IqrrgT3OuY8VzP8WsLugQ4uJzrlP97WtZcuWuSeeeKLosnwJVUNzkvqaBJXRMB+58Rke27Cny3qJaIjbD/I6wV4qRWrlStqfX05y+XKSK5aTWruuaFW9ypNPpmLJER1BVMerro5QPH5A6ej4Y1KgM1KG/G/UW17p3ltgrH4B//uXx7nm0UbG0cJ3oj/iVeHnITEekvu6vjlaAZc94JdgqX1WB+d57L/1Vrb/vy92XFBN+Jd3EJ8zB6+11Q+UmprJtTR3CZQ6A6aW4tVwC1gs5gdA1dVgRnrDhh7rTLjkXVQec0xnYFRb65cixRyWa/NLiJJNnSVFHdP7uk13W55L9f8hRKsgUQvx2o4AiXhNMF3bbbqmYN2CZdFKv8oBwK41cM2pfilqxz6C39/khUU/ov4T2VOv+aTg/2TT7jY+84fnueiEWXz9zUcPZTcSGNZgp1gJ79f/i+rTTsO1t3f2PNveHgQ9PUuGuvQ621swFIzTxyM3egiHu3SyZJVBZ0sV3TpfqgzaFufnd6znD7N79rDlYx/vUX127h9v7i24Kls+qa9JkM56vOe6x9nbmibnHJnc6L6pLYesQf9QRyK4eiXwAPA8flfsAJ/Db3d1EzAb2Ay81Tm3p+hGAn0FV8U8tLaRd/zksR7zb7j0JF4+78Dr7peCS6dJrllDcvkKksuX0758Oak1azqK+cMTJ5I46kiiM2ey76bfdTmB93MSldGv5MFVMU9u3MWe5X/n2w/tY6U3i/dH/8qHzz+FcX+5tOfKSy7wg6lDpH2Wc86vcrtjB5kdO8jubCCz0x9md+wgs3Mnme3b++7IJRQiVFPjlwjV1PhV5oJAKVRbG7Q1qiFcW0MoaI8UrkoQihvheIhQDEKk/ZKgdCuZTSvZfe3/EXJpQlFHKOoRrghRfdLRhCOua4CUaur/IKOVQZAzzg90EuN6Trc04p69gey0M8hmKwlXholuuR07/3uw8LUQKnFvk54HK2/1q6cGPVv28zsr6UVjd9+8cyVX37uO7110LBccO2MouzrkDbZ9kHPOf25gPoBpbfWDoLY2vLbWrvPbCh7D0erPy+7ZQ3L58n5vXPQpEunsRKlYMNQt8Mk0NrLv17/psZlp//WfVJ10ElZRQaiqCotGGWjTiL4Moc1VWfMJwKPrd3PRtY9Q+KmPhpvaMrYN8sbOoPPJSPQW+E96T+gZ5dz31HEVPeoER0LGpKoDK9EZKpfNklq/nuTzfmlU+/IVpFau7Cj2D40bR8XSpVS/970kjjqSiiOPJDJ1KmaG8zyqTjxxRHqZk7FtQlWCT75Yx2Wn1vP3dS38ZMvZ3PX3EL8Iz+awXEHvjRaCVXd2LcnItMPv3wdv+A4seA3UzugsfcjzvGEt6XLZLOm1K8ju3ElkylRiC5ZgkZ6nPpfNkt21KwiSGsju3EFmx06yO3d2BlA7d/aslhMKEZk8mcjUqcTnzSM2dw6t99yFRRyh/CvqqLv0EioXz8EshWXaINUC6VZI54eNndNtrbC3YLnrvee8KDD1mOAYPPCyIaxqPJZsgNppMHFu8QCpx3QwHu5ZLbiHXWuwp64juuH3dKwdrYBJC0ofWIH/+1h8Hly2BFp2QPXIlpBecdYiHtuwh8/d/DzjK6LEIqFRX92pXKVILpcLqrg2B9Va/WFq/QZ2/eAHXdoHbf34FVQuOx4cPYIlr61t4A14zDqDnaoqQpWVuFyuaGA17i1vIbFoYecjOyoq/F5ni5QMWSw2qGNPbdjA/j/c3KNTpopjjyU6ffqgtjUQB2NVes85un/q6uhCuhuuUmznHF5bG0133MGOr37NL+WNx5nxzW+U9LmJw15yVUqDLbnq/hyGkIHn4JT5k7jitYtIZ70h/0H298Nwnkd64yaSK/yqfe3PLyf54osdjcdDVVUkli4lceSRVBzpD6OzZvV5N0vV9A45w1Jy1T2fRMNGNBzCvCz/FbmW87mv85lYNeMI/erNvW8sVu1X26pbDJMX+a+mrXDXF4elpMtlszTf8We2fuFrkEpBLMaEN59PZOpMso27/AAqKHXK7trV4+LNolEik8YRnVhNZFwFkXExotVhIlUQrcgRSaSIRNqwdPPgSof8rfufT6yq8xWv6TodK5yuhnh11+lYNbQ24m79KOnZbyabTBCpzBHb/HvsHTf2VmXuwA2+JGm4lf2O/JY9bZz9P/fTls7hYFRXd+qzgyTn/PZ+zc1BxyfNfhXWLsNgWXOz31lKwTyvdQDt6wrE5szxq7Hnn0FYWFJUlQ96qgrmdV9WiSUSPf47e+t9tpy1PUb64dcDUPZ8sr6xhdd//4EeHV1c/S8v4+ylU8dEB2NjzXB351+0yu5//SdVp5yCa0/i2tsKqt52a4vYUY23SBvF9q5Vdl2+ym6RuKfU1WcPqeAKutYJrquO88j6PXzplhVkPf9zGMofZPcfBvE4Uz7zacLjxpN8YYVfxW/FCr8tBf6XmDjiiI7SqMSRRxKbM+dgOdnKwWtYgivoWXd+x/4k77nuMVJZx6une5w5v4qfveC45eLp1Fx/ete2MJEEnPc9v9Rl12poXAmNq6F5W+87rJ7ivy8chVAUwpFgWGw64g/Dsc7xYJkjRHpPitSOFlLb95PcuIP2VVvIpazHxxeKh4nUhIlWQaQiRzSRJhJrJ5JI+YFTpUc45vUoeMPCRUp/xnVMu2QzqW172fvXR8m15XChOBPffgGVxx2DzXlFZ0AVqShNIDJSgU6+BPIgKEkqYlguGs/+n/vJ5Dr/Q0dLdSeXTpNtbCSz0y+ZbX/hBfb87Oc9ni1mlZX9P6vQrLOaa22+A5QawjW1ftXWbsNwrd9hSm7fPjZfepl/0yO/qTIGOyMV6BzkN0HLnk+K3ayrikdoSWZ5w9HTuHP59lHVwZjnPDY1baKxrZH6ynpm184mZOX9PodznwPNJy6Xw8sHPu3tnePJJF5bOy7Z3jHfaw+CoI7xpL8s2Y5raye7fx/pXvoRGCirqOhsm9ilum6VP10wL7d7t9+sppvZv7ieqhNPLLr5waZnRJ9zVVa9VD0KhYx5ddUdf35m5l8PBDdVkhmPj9/4NIs/+qoB/0GmN21i66c/0/knkUqx86tf87cfjRJfvJja886l4sijSBx5JPH584pWS5KDwDBXWRuxffajez7Z2ZQklfVPfPdtC3HfNj+Yer59Iq+48P+wP32w48LeXfh/2BHn9zyG5H547ndw+yd67nDa0VAxCbwM5DLgZf1hLu2Pp9uCZVnwMrhsmmxThuSuHKndOVJ7HKl9Rnp/CJfrPA9Gq7JUTM4QH5clVp0lWpkjFPWITq4hMnlKH1XlugZMXdYp7GihCNu1hvhv3s7E976PbHuESEXWL0ma/QGYOO8Av5kiRqrKXCjkl4yVq3TsILezKdklsILSVnca6t1jr7W1s1rrzp1kd+zs2i6woYHcrl0DSkP1K19JfOHCokFSx7C6ekjBgvM8ZnzzG8NWtX2kqsyNxOM9DiahkHHO0qks/sipHTfrJlTG+NiNz/DnZzpvuI2Ghw57zuPvm/7O5//5eZK5JIlwgqteeRVnHnZm2YIdz3k8sPl+dq9dzrhmj621YTbNX8qps181qH166XTHg9q91tbOB7a3tgXz/Pnprdtouu22jhst+Z6oo9OnBwGV3/nLYHuthCAASiQIVVT4gU8iCHoqKosGVuMvvojE4YcXVNcN2jRWVXYNmCoqBpWPUxs2sP+WW3uUYkfq6gZ9TL0Zm1f4g7iTu7MpSTrb9UtNZR03P7WFj5+5iE172notsna5HK0PP8LuH/+4y923vKlf/QrjL7xw0PW0pcBwBh7DVQKQy/rtlLIpyCRh9e3w18/50wdf9Sqg+DNMAC7/7bO84ah5HHvCb5li+9lt46kNLeY0jB6pT4yDea/2j7F7r29n/1fRi3TnHNnGRtJr15Jas4bkmjWk1qwhvXYdXmv+xBgmMmUK8SULqVq4kPjChcQXzCN+2Gwym1ex6b2X0r4rCc7IZQyLVzD3huuILD6mpJ9Rh4nzsTO/RPyPlxEv/B1NLGOX4Yd4oDMSessTv3pkM0umjWNXS2rI1Z1669mu8oQTyDU0dARN2YadPdoFes3NPbYXHjeOyJQpRKZOIbF0CZEpU4lMqSc6dSqR+il4qSSb3vmuHqVIdR//WNmCgpF6aPuhHOiMlO436wAue9Vc7lvd2GW9/M2JOZOqBlxd8EBKdZxztGZaaUo3+a9UU5/jje2NrN+3nphFCBMik8vwyfs+SSKSIGIRzIywhXsMQxYiZKGiy4xgnVCIEKEe63rtSWLbGqlatZWKthxVmRCJ6TNZU3UNE3Jx4imPeNIjlswSS+WItGeItKcJt6cJtacItSahPYll+n+4O2ZYItGjBBvniM6YQXTmTD84qqwIAqUKf7wjSEp0liAFr/y0xeO95u3equxOfNe7ypJXh+MZqmOzWmCxbnsjCfjgP3t0G72JqZz9vX/2eOCwc3DE1BpeX+843LWyr7KWyYcv4LTFU8hu3sS+P/6J/X/+M9kdOwhVV/v1OAt+kOq5rwRKHex4nt/OJ5v0t9d9uHst3PFpv7QkLxSBEy/z28LkUpBNdwZGuXTvwx7zCt7r+mmU3XsX08NWLbC77lU7EtEQl5+2gL+9sJPnt+7vsm6fVaM8D7fmb6RXPUu21YhUQezwo7GFr/Ubua9ZQyoIpFKr/UAqt79z++EJE4gvWkR8wQI/iFq0kPiCBYRra4um229zdSvb/t9XO0+iX/siNa87r7ylxwd3lblDwbBXd4pHjFMX1nH3ygYmVMZoTma6dD199hH1ZF/a3GdJVK6lhfTGTbQ9/jgN3/52z4e8d1fQmUp0Sn2PoCk6dQqR+npCFRV9biaXy9J4x63s+0JnPhn/H1+k7nXnEQ6XL5+MRBUr6aLs+aQ3xdpiAbzl+BksO2wiX751Rcd/TW/VBfMlSZ974HOkvBSxUIz3HvleFk5YSHO6ud+gqTndTK6PzoLCFqYmVkNtrJbaWC0GVO1LUfPUWiraclgkTPYVx5GbUcfkyjpyLofnvC6vnMth6SyRliTR1jTR1iSxtjTRljSxNv8VbcsQb80Qb8sQb8uSaMuQaMuRaM8SyfZ/jZ6MQnsM2uP5ofnDYF5bHJIxo63LOtAeMzLxMLmqOF5FHEskCDsjtHk7sYwjmoWI5wi7MJXHv4yq2klEQhEioQjRULRjmB8vnD+Q8fx7zRnNDz9I+/evJdKeIhKJM/lTn2DqmW8gEasgGop2BJul0L00cH9NiEkLjuyrNFBtrgDY8ABcf27P+XNfBRPmwHM3dpQSuAv/j4eiL6dx80omu73ssolUT1vEim1NXHvvGlKZHG/Y8DBv2PIE0195ItGN6/GefxZCIapOfSXj3/hGqk47jdb77juYG62WRjlLkZyDfA9qqWZIN0PDSrj1Iz2DnePfHZR+JCHbHgx7CZgy7Z3rDOT5PH0JRSES99v6dB8WmxeJQzgOkVi3YcHyfZv9bsy7e/dtMOfU7nNHLLiCnu2w5kyq4pH1u4o+3uCqC5fyjpMO63EydJ5H0x13sO2zn/N76QmHiS+YT27PXrKNnXcxQ9XVfvC00A+e4ov88cikSYNL8+BPoiWhi8YRNywXjcXyxG3PbeOKm54l6zmOqYETp1fxbLvxozltNH7uc/7d2ViMie98J+Hx48ls3kR6w0ZSmzaSa+y7ut74f3kHVSee5AdSU6f6D33v5SaBc46MlyGdS5P20qRzaTK5TMd44byXml/i/579P06tOJKKpCOVCHN/+3Ncfty/M7t2NrFwjFgoRjwcJxqOEg/HiYVi/vxwjEho8AHYSFWxUr7sYsSCq+43J2IR4/jZE3l0w26cg+PmxDhmbpqa2DhueSLFz959EnMnV7GtdRur96xmzb41PN3wNA9ufZCe/RF2ClvYD47itR1BUo/pXsarolVd/sN2vfAMjRe/u2tNpUiEqre+kVg0gbe/idz+/eSamvyOXfY3kWtqwhWp2VQoVBO0RSx4sHv+Ye6pfXto/cOferxn4rf+k8mvPgOrqCAbcqRyqc5XNtV1Ongls0nSuTTJXLdhwfydrTvJNjaSXbeBdMgjGzGyM+vJVcYJhyNkvSxZL0vGy/QY7ytQPVCGEQvHiIaiHeecWChGNOwHaPnxWChGJBwsC0U75uXfFw1Fac20cvOam8m6zptXiXCCm867ibnj1KHF4EquLAyVE6C1259X7XTcGV/BbvtIlzYj273FbHrv+/jr1GOoa9/HyduXk8hlaKubxox/uYhJb7yQ6JT6js0c5I1WD1yxUqQL/w8WnNnZXXSqqSA4Kjbd3PnqmC4Ipvor0SkUSfivaEUwrIRowu8kINp9WcEwWlGwTrdh6y740wf9wLtwP++/G+qXlKfkYXAPRx3R4KqY9Y0tXPn7p7jymBhrNu/mzt1x7tuSwnOweGoNb102iwuPmkLlxjW0PvYYLffeS9uTT3UciAekY0bo5S/DW7KA7JzpZA6bSnbyOLIuRy7/8vw7gvkTeLFxz3lkXbZzXZdlb3Ivt667tctJP2IR3rX0XcyonkFFpIJEJEEinKAiUtExXTg/EUkMrm77CFw0Sg/DctFYrF3UU5v2kPvn/fz5zw9yz9SjqW/fy8uT2zlp1UNMbdnVI2HhSZOIHXaY36nRrOk0Ta1mfXYnL976K7aPy5GMQSYM2VgYO+FYqIj7QVE/gVPWG0A1oBIJW7gj0CoMuroHYYVBWiqX4u7Nd/fImx84+gPMqJ5BPBKnIlxBPBInEU4QD8e7jCci/nCggd1I5cuDPKAbseAKIJvL8eKu9exsa2BKZT1HTJ7H7c9v55qHnmLFljTh+E4iNSuYXZ+ioqKFxtRmWjItHe+fXDGZ5lQzJ1YdwYxsDV5FnLtanuSjx3+Uk6efTG28lspIZb8lHi6d9h/D0dhIpqHBDy4KXw3+MLd7d6+dLoSqq4MAaRzhcV0DpHDhg9zz48E6oZoaLNz74yuSGzawsUiVuTk3/4HEvNK34d24fyP//vfLuWTca5nYYuypdly//2/875k/6C3w6JD/L84HXMUCsGLjL+x+ge8//f0e27vo8IuYVj2t43yXyWU6tlt4Dsx4/rkvm8v2mJc/L2a9bJdzZLGA/Gdn/4wTpp5Q7NAUXAG9VydLTIBfnNdjdReKkJt4DJmKxYTGTyGy6U80pN/Kvut+6S8HNtRO44ZFZ/DAjGOoqYjyxuNmcNEJs1ky3a+O5OWybNr9Ao2tO6mvmsLsSUsIlbE6RcdxHmhJkpfzOxpo3wvt+yCZH+4rmLcP9m+BDfcPLgDqYH6nAPHqoKvpYBiv9ud3ma7xu5+O1/jpuu2jPYOdyx6AukVDSEc/RqLXtcHt86ALrjKZDI133krT//taR6mtfeFzPNUWZfP9dzN9/YssbdxBRca/gNo2Ocxzsz1emG1smGo0jANXhp6hIhYhZCHMjNSBllhCR5A1kGAsnUv3uCsWDUX5+qlfZ/HExVTHqqmJ1hAdyPOkBuggv4AbCWW/aCzWS2z9FR+nfe9+mq+9pke3/rsS49hUU0/IUsRDu2ivaqPxXa9n5/QoW5q3sKV5C7uTu7u8pyIFVUlH1DMiEycRqamhNj6uI0jJ35XNBy75u7PF5hUu6/6+XW27uPKBK0l7nbUEYqEY//HK/2BSYhJpL00qlyKTy5DKpTqDuJw/Pz/eY37BdPd5LZkW9qe6Vikeikgo0iPgyo8nwomOgCzjZbj3pXt7BHPvP+r9TK+e3vG+eCTeOV74Kph/MAd0gzwXjFzJVZHP5orjr2Bz0zZ+vfJ6POc6+g1yuQReairTK+fxillHct7i41ladzi7W3fR/Pe7CP/HDzv+f3JfuJzqM8/ksPFz8JLJrgFS0cCpgdy+fT0TGAoRmTSJSF0dkfp6v7ODaJR9N93UtbpuPM7cP/yexIIFB/R59Ga4e7kcid/sxv0beeutbyWZ6wwg+ylJOuD9veWWt5DyOq8NVHJVoM8MXqzNw551PUoJ3JI3kd30IuGmlXhpY8/aKvatqyaXNEIxj1DEI5cKeiBLVND4g19w85Ysty/fQTrrcczMcVy0bCZVNU/ztaf/s/PHeOLnOHP+eeULsDwPb83f2NT4HI0GU9MpZtYeRmjqUX4wlNznB0btezvHuwdM7fv6fyZPpAIqxvvdXe/b3HP5yy6BqUcFwVFh4FTw6qd3tb6OcUSCneFuKzPwfY5ocJXLZdm39kXSDTuI1U9l/IIj2LNmBU9d/i42jUsTcsbkJsesRqgMrtG2TIIVs40XZlby3JQ6khVTWbBlPydu2MLU1hbCHoQjUaqu/DhT5y7taPwbCUU6GvXmxyMWIRwa2PK8YifteCjOda+7jimVU0hmk7Rl20jmkiSzSdqz7R3D9mw7yVyRedlkr/Pz431VU+lIRzhOdbSamlgNNbEaqqPVfuBVMF4bq+2cH63pGNbE/PFIKKKSsuJKetFYrIQqtW4dG978Fr96ay8csLsG1r/9FfylZRVrpmfJxgu7Njcmxacwb/wsZtXOYlbNLGZWzyRkIb77xHd4z7hzmNQaGtTd46E4WC6o4qE417z2Guor60lmkx1VmVK5FMlcsqO6U348metcp/u87sub0k3sSe4pSdrDFu4/GAvHyXgZHtr2UJeALmxhLl58MVOrpnapttQl8C0IkIutEwv76+U7Ucgbwvc4YsHVhv0beNutb+vy/edFLMIrqo/iiFw9FTUTuX7HcxxbeSmPr3XsaEpSHY/w+oUTeEOkkclXfY5QprDpQIjojBnk9u/HaypyfRON+u0U6+qCwKmuc7yujmgQSIUnTuxRonSodOefD9B3te9icsVkDqs9rOylu8N5/hmOfDJ2g6tiijSmd7NPZcM7L/M7Gwg+isSkDHXH5aiatLcjJsh6sDcxnj21E9hTOYGd0QRr0rCmPcMOz6MlkqMt2kYmnCJsHhFgRmU9NZFKYhYiQZiYGXGMuMsPIQ7Enet4xbwcCc8j5nkkvBwxL0c8lyXuZf1hNk08myaWSUKmlUy2nQrPo/dCZfz2PYnxfpBUMaFzPBFMd4wXWR5N+NsYXPW10lHHAIVGLLjKN3jf+4WvsLE2xcq5Udrnz6B21VaOWpuhPrgBvasWdo6D7KuWUXfuhcw87Ehm1cwiYgnufnEnP3toFU9uaMHDmJBsYm5LA4ctncq8YxZy+uHzWVBfTSLa5695UEbionHDvg289da3drkrFgvF+NQJn6IqWkVTuomWdAstmRaa0820ZFpoSbfQnGn2p4Nl7dn2Pvbiy5ee7U3u7RLQhS3M+fPPZ0b1jC4BW5cgLtoZoA3FQV5aVrKLxvwFVcfjNiIR4vPmkd64sWh3xJO+eRV//+mXuf/wHMsPM/ZX+0mZaNUsXtnKjG1R9kTms2bhmazcP4WcF2FSVYzXLK7nrCVTOHVhHfGojViJx1i9oOotmPvx2T9mauXUou1QerRb6aUtS2/z96f2s7NtZ8mPJc+wzhLJcIyQhdjdvrvLuaDUd+RhCG0Tu50rZtXM4roV13H1M1eT9tIYxuzYFPa4Fr768q8y7alNhL72g44Hv3vnnk5s/EQqGprZu3Yj6S1bqGzZ13UfGJ4ZYecRP/54qhYv7ihx6gii6usJjxt3QIHJmG8CMkJG4vwziP0puOqL8zya//Y3tl35Wb8aRyRCePz4Ls/8aI3Bpimw56Nv5bd776DaRdjrtbOfHK7Ixxt1jkm5HJNyOSbnPGo8jyyQNCNtRsqMVCgYBq+0Gclg3DuQ3k+cIxKkIeocEYx5NbOoq5pGTWI8NYmJ1FbWU1MxkZp4TZfGnPk739HQAKsmFZaUhYx6D2bXHUVo4WsP5WBnuA1bcNW9lGp7cie3fe8KmuJZFm2Dozc4KtKQjYbYV+mIpxw1wTWLJRLU3fgLJh1+VI/tPr5xF49vf5RVL+6mcU+Uzak4O9riZIMbuyGDOZOrWDy1hsVTazl8ag2Lp9Ywa0LlkB8sOVovGjNehtZ0K82ZzoCrR2CWbmH9/vU8sPWBHu+PhWJdqnn1piJS0SPgKgzE8ueKwunKSCXPNT7Ht5/4NikvdTCWlpXsorFYN8GYUXP22TTffTdkMgBsmwj3Hhfl/lPGsSezj5o2OGa9x9LtEY5/82VcE3mYN1Qs69KO4b9O+R6bGiq564Wd3LOygeZklngkxCsXTGbmxAriiT1UVLRiXg1H1i/gNYdPOagfsDpYw5k3D6bSud+84TdMr57epb1cvo1IYRXLwjYi3duZdF8nk8uwtWUrD257sEc6StmWBAbZq2ZBp0JVTRn+GV7Po6lVbG/bzgSr4nUPtPOaJ9LUZqN4Z55CZQqS/7ivZ9umUIjotGlEZ84kOmsmoekzeHJ3ln88u5l7ph/LnopxYEbUyzJjfAULZkxkXl0VcyZVMXey/5pSGy9Zj3NySNFDhPOKVeNoX7mSrZ/6dMefIdksyRisWBDmviUeK2eF2F0bfIa7/whAI3T5WD+09L2cOPNUJlVMYlLFJGoi1ax+6TE+cc8HyXg59qWmk85MJp2ZSnXocLa1hEi7CCkXwSIxZk0ex9wpE5g/dSKHT6thXl0Fk2tCfp323u6KFdwZy99ZW797FTdvuJUskDUjf497XDhCY6qR5ub1NKWaurT7KKYyUtlRLakw8KqN+8OaqD9eHa1mdft6frrhRtJemngoztemH8nZRs/nGZXQQX53fEzKl1Jt+dpXeGJmiv3VIQ7b6XjDZkfEg2SEjhsNdVd/j7r9zX4XznR24Tx+wRFFtz2pKsFN/0xw3rJ5zFnYzPHZGm55PMlXzj+a1nSOVTuaWLmjmRXbmrhj+Y6O/9fKWJiFU2pYPKXGD7im+cHXxKr+nyEXshBzx80tS3Wq3vZ35mFnsnDCwgO6aIyGooxPjGd8Ynyf623cv5HHdzxetL76zJqZfjAWlIwVDvMBWr70LB+sNaeb2dayraNErVi1ne6SuSSfvO+TLJm0hOnV05kQn8D4xHgmJiZ2GR8f94ex8OCf/TdS54JsQ0PXwArAOSre8Vb2nbKEx2/6AX85JseqWf6z3Y6bMI9w02YunX4eddMi7Kl2XJN8hLcuuYgvP/Rl/8K+xb+wXzplHkdNDXHu0dPJ5Dwe27CHu17Yye3Pb+fulQ0FO9xPyJ7kohNmsXTGOKaPr2BG8KqKj96/8eHMm6XKl4Mxu3Y2V73yqh4B3YIJC4atdC4RTjC5YnLJ91VMseuul5o2M+mxNTx3y4+56eU5PIOX76zlM8njmXrb44Ry+baJGUJ33Eu6trZopxGzfvJjqk8+ucu8pY3NzL7rLi76zrdYH5/ItvHTeOk159EwrpbNe1q5f00j6Wxn28fKWJjDJlUxb3IVcyZXMndyNXMnVzJnUhUTq2IKvKRkxmTJVY+GxtEoiSVLSL74AqQzJCPw9Hz40ytCbJjmn+Dq98OiLR5zdkeYcda5zHr5mXzigU/1bPB27k3MHd/1j2Dz7iaWN9zFl578escJ9CvHX8mR9WdRV1PFusYWVu1oZvXOZlYGw+37O09+1fEIi6ZUc/jUGhZNqeHwKTUsmlrD5Op4r8e+cf8G3tqtvnL39DnnaM+2dzzvIX8hVfiMh+7zO8ZTTTRnej6MsrtoKEp1tJrKaCVV0SqqolX+eKSq63S0iqpIVZf1uq9bGa3s8oczChoDD7eSl1wV+zPcft9dPPL1TxDO5FiwzQ+eW8cnsFSGyvauz3Kru/EXjF9wRFDKtZNY/RTGLzii12fjFHteVm/PMGlLZ1m9s4WV2/2Aa9WOZlbtbGZPa2dpTF1NnMVT/Txz+NQajphW26NqYb677KE+0PVgV+58kvEyPQK0pxqe4ofP/LDHuosmLCLrZdmX2se+1D68XjrAqYpWdQRaExITuoxPiE/whwXjlZFK7t5894i0JentAZfu+u/wruc/RTKXoi40jqOrF/FcegPfPu07NLY39kjra2a/hpeaXxrQhf1DaxuLPuIgbEau23/2uIooM8ZXBAFXghkTKroEX5Or4wP6vY/1fDJSDvLSuZJXny1sjzTlC5+noXUn999yNbGMY9EWx/h8k8P8A0W7mf2rX/LS+z/QI78Ve26o5znuXbmTxlVrmdDWxN7KWuqC55GGQobnObbtb2fjrjY27GphQzDcuLuNl/a0kfU691+biHSUcM2ZXNVlvDYR7bJP5ZNDzuivFmhm5wDfA8LAT5xzX+9t3d4uGFMbNrD+wjd2eRaBZ7Dx5Dn8dsZmls+B2Y3G4VscR+yMUPnB9xH2XJfqGj8484es3rt6QCcpz3M8uHYnzttIKrebeHgSFprDKQt6r8Kxvz3Dmp3+xeLqHX7QtWpnM/vaMh3rTKqKdQZcwXDRlGpqElGyuRx/Wfc3/uOxL3ak7wsnfpU3zH8tkT669RyMnJejNdtKU6qJh7c9zFcf+WqPdV4353XUxmtpzbTSmmmlLdPmj2c7p9uybb1eZHVXEanoCLwiFmH9/vU92pK8fu7rqa+s97v5Dbr7zTcqjoVjxENdGxnHwjES4UTnusErHOr6OY1UxwAd3dG2NjClyu+OtpfvsKTBVY+2JOEw2foJRLb71WR3jIdYBia0QmTKFCZ/7CM0fOVrB/yQ0WLPBhron5NzjsaWlB9oBflm5Y4m1uxsIRXcoSysWriovoa2TI7rHtpAOuv6DOZKabj/gDu7NG5kSmVdX7+hkhhI7045L0dTuom9qb3sTQavfsZ769kxYpEepfDD1Zak2EXjpq9ewlVtN7M3tbdomg6rPeyALqiLPWA1EQ1x67+/kppElK372ti6L8nWve1s2+e/tgav5mTXzykWDjFtfILp4yoKAq8EM8ZXMn18gunjK4iFQwO+6VFKw51PRuLC+CA/F5S3+myBljhUpTp3OO2aq9nx0St6djH+pz+SXrVqwJ1GDPX/JJPz2LK3nY27Wlm/q5WNu1rZELy27W/vEvdNro4xd3IVh02qIp31uGP5djI5RyxifOX8I3nDUdOoikcIl+l7VT4Z8f2N7uDKzMLAauAsYAvwOHCxc+6FYuv3Fly1Pvoomy95N+A/H+T+pcYvzzDaE2FODi/ibT9Zy7QdKf/u4xc+wrZlM7nyn5/rcUENDPgP8kAuGPPyF46rd7R0BF2rdvolXW3pzhKDGeMrmDmhghe37+ekhTGqKpKYq+ThVRm+fP6RzJlcRSwcIhoOEYuE/PFIiGjYiIVDQyr63rB/I28rdjFVpCSv2HG1Z9tpy7Z1BGHdA7GO8YJlW1u28tyu53psryJS0fF8hAMRsUiX4CxEiO2t27sEcyFCHD/leGrjtR0903V/2njEIp3j3ZYXvqdjmXW+1wjx2Pan+eWLPyXtpUmEE3z+xK9ybvEguaTBVXL9eja+6c0df24OWDkTViypYsHGNMesznTs0BIJ6n/3a5yXG1AJ1XDLBfkvH3Dlqxdu3t1WtN++GeMrGF8ZpSoeoToeCYZhqmKRLvOqeswLdyyrjBV/YvxgSudKYbj3B/4F3G3r/sZVBTd3+vjdDkj+PJEPtPYk97AvtY+9yb2s2LWCOzbe0eM9P33tTzlx2onFNleyi8bCNiOJphS/yz3KE60vsmD8As6ffz5XP3N1yW/GHMh32pTMdAZce9v9IGxfZxC2symJ1y1TTKiMsq890+WCMhyC954yl2njKkhEwySioc5hJEy8y7wwiUjn+EAuMg+FfDIKjrFk+aTwussBm+vg/iONptkTef3dzczd0lnjoL8gChjRTiOSmRyb97SxvrGVjbtbOwKwdQ0t7G7tvR1rLBKiIhqmMhamIhqmotuwMpYfj1ARC1EZi5Aosn5lLNwxPx4J8fC63Xz+T8+TGoYbhMonpcknB1tw9Qrgy865s4PpzwI45/6r2Pq9BVe7Vz3PtovfyZ+PTXPbiSFaK4yXrzYue8s3aJ1Ywe61yxnX7LG/JsSkBUdyyqxXDri6xkjwPMfWfe0d1aJW72zm6c372Lynrf83FxENW0fgFQ37wVcsCL56m5/OeuxK7mRN09PkXJpwKMzSCcczq2YmNYnBt58YiN3t+7jnpbt6dGP7mllnMaliPM55eGTJkSbn0nhkyLkMHulgmCHn0uTI4HUMM8H6ncvz67dkm2ls3wbmAR4WDKtjVURCITxyOHJ4Locji9cxnsMji+PAnk6eS00iHN9NIpzgZ2f9hqOmlPchwrsevI/G932QF2bC44uMh5YYp7wA//bO/yW6e7/fjuoAS6lG2j9W7uQ91/U8R5w8fxIV0TAtqSyt6SytqZw/nsp2uZHRFzOCwCvcGXzFIpjBI+t3d7mADYfg3KOmU1tRumdb5TW1Z7jt+W3kCgqHy7m//D7vWbmTOfVhLJTGeTE2NuR4zeIpZdln4bkgFN1DbNIDfeUTKOFFY7Euo8MW5sZzb2ThhIVlq/JViht2xWRyHjv2dw24ntq8l3tWNpYg1b5o2IhH/OArP+wIwoLgLOs5HljTOObzyXDus9j+EtEQt3/kVObVVRd7S8nyye5Vz9P49nfREEvy/QvCrJppvHqFceV7f07tpl0HZRA1WA+v28XFP360x/x/ffls6qoTtGdytKeztGdytKVzJIOhPz/XOT+doy2TI9f9LscgJKL+dVo4ZERCFgz96XDHdOcw1G29ULfl+fe0p3Pc/eJOcsOUL2Fs5pOD7UppBvBSwfQW4KTCFczsUuBSgNmzZxfdyEvjMoSu/Dce3/i/HPGSx9seizDz0svxpk3l1CnHsGn8Yexq38W8gj/D4WzwPlihkDFrYiWzJlZy5pIpgF9t5HXfu59UtjMHRMPGl85bwqSqOOmcRzrrkck50tmcP+yY57/SWY90zhWZ54+3pbPsb3dkch772zM0NIVIxJZhzuGc8fRex+p4I9FweU6GmZyHeSeQzbXh3wszIuFK/rmqlUi4t26qw0BF8Brs/rK0Z5qhS1mHEYrWEO0lqLDgFYKgxMsDyxUMc0GwlvOng3EXLMu6NMlcM+ARrthMOP4QyVySnW2NHMWBdXHfX15JTajCEgnuPyrNS3XGZ2/KMbcpQfjfa6k78VVEFy44KEupBuOwSVUkoqEe1av+48IjezuJkvMcbd0CrtZUtiMQa0nlus5LdV23oTnVo2Qg58E9qxrKklcyOa/Ln0S595ffZ3Mqx/Mv5QNR/25uOY8xfy4IVWymtv5xPnDE50i1TzjgbfeXTxrbGnt06pFzfpXHcv53hELGvLrqXn+nQxUNhzr+T/LWN7bw0Lqu1RDjEeOP/3YK08dXkMx4JDM5ktlc53jGH09lO8c7hsG8VNafl+r2/n1tGfa2pQ+JfDKc+yy2v2TGo6E5ecC/o/7yyUvjMoQ//2/s+fkP2Topy0dvD3HSW/6d3eNDzFh0FnMXLSoaRMXnzu3RlupgNaU2UfT/5L2nzB305+ucf02WTHu0ZbK0p4sHZMu37ecnD2zo8f4zjqinviZBznNkPYcXDLtOex3TuYJl7ZlcMM//veQ8r2Od1lS2S2AFyidDcbBdLRWLDrt8zc65a4Frwb97Umwj4ysm8u/hP3PxsZcwtS3GntMdn93/J/634syDPpAaqDmTqvju248btmLUfBuA1lT+F+kXT//58lNK/udfuM/3Xvco5y0bTyjSjJet4dYnUvzs3SeVZZ8bdzVz16a7ufbFqzqq+Vx6xOc567BXMmdyTcn3B/D8zjW896539KhuOaWy7oC33V9eyU2vI/eFy3nv139ApCVFOHi6fWb6ZMLhiN+VepHu1EeTOZOq+M7bju2RT+ZMqur1PeGQUZOIUpMY2h2z3trLlCuvDPf+RmKfXc8FNXjZ7/Kbe1Kc+e7EAW+7v3xSX1lPIpwYsR7YhkNv+WTx1NqyVQVSPhm+Y6yvKX8+GV8xkX8P/YlLrngPX2jO0PaBaMd1l4VCoyqI6s1Q/k96Y+aX7sYjYcbR+3/N0TPH8atHNvX4Tj9x1uHKJyXeXynySd6YrBY4Uh0TDLdyVRvpbV+HQj3ce1btZHnDWlyoeVieLTPItislrRZY2JaksJrsqbNfpXxygPs7yOuPj7p9jmRbEv2flG9/B/lvaNTtU/mk/JRPSm8UHOOob3MVwe/Q4gxgK36HFu9wzq0otn5fD7Ib7geHHgqG+6QyEvsciWMcRO9OJe+KXfmkPA6F3+1BfowlfTiq8kl5HOS/oVG5T+WTsecg/w2Nyn2WO58cVMEVgJm9Hvgf/MYzP3POXdXbuoN5SrjIGFDy4EpkjCrpRaPIGKV8ItK/Ud+hBc6524HbRzodIiIiIiIig6HyWhERERERkRJQcCUiIiIiIlICB12bq8Ews0ZgUz+rTQZ2DUNyRpKOcWzo7xh3OefOGcqGB5BX9PmODTpG35DyivIJoGMcK5RPykvHODaUJZ+M6uBqIMzsCefcspFORznpGMeGkTxGfb5jg45x7O57uOgYxwblk/LSMY4N5TpGVQsUEREREREpAQVXIiIiIiIiJXAoBFfXjnQChoGOcWwYyWPU5zs26BjH7r6Hi45xbFA+KS8d49hQlmMc822uREREREREhsOhUHIlIiIiIiJSdgquRERERERESkDBlYiIiIiISAkouBIRERERESkBBVciIiIiIiIloOBKRERERESkBBRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5GETM7zcxOLtG2qs3sGjNbZ2YrzOx+MztpiNu618yWDWL9OWa2fIj7Ot/MrhzKew+EmV1oZksKpgd1zH1s93YzGz/Adb9sZlvN7Jng9foD3f9YpbxyaOeVYP0Pm9mq4Dv75oHufyxSPjm084mZ3Vjwf7LRzJ450P2PRconh3w+OdbMHgnyyRNmdmJ/74kcaAIPVWYWcc5lh3m3pwEtwEMl2NZPgA3AQuecZ2bzgCNKsN2ycs7dAtwyAru+ELgNeKGUG3XODTZA+q5z7r9LmYZyU14ZGYdyXjGz04ELgKOdcykzqy9lWspB+WRkHMr5xDn39vy4mX0b2F/KtJSD8snIOJTzCfBN4CvOuTuCm9rfxP9N9LmDg/4FzAFW4v8olwO/Bs4EHgTWACcG61UBPwMeB54GLih4/wPAU8Hr5GD+NOB+4Jlgu6cG81sK9v0W4Lpg/DrgO8A/gG8D84E7gSeD7S8uWO9HwXrrgVcH6Xoxv61gvdcCDwdp+h1QHczfCHwlmP88sDg4hh3A1iC9px7A5zkfP3OHe1n+r8BjwX6uya+Hf3L5dpCuu4G6YP69wDeC96wu+Bx7+9znAMuD8TDwreA7ew64LJh/BfCzYPyo4PupBN4N/KDgc/4+/glvPfCWIsdSBfwFeDbYxtuBM4A/FqxzFnBzwTFeFaz/CDAFOBnYE3xmzwSfX2/H3Nvx9PZb2whMLpbOIsfyZeCTyivKKyiv9JdXbgLOVD5RPkH5pNd8UpBeA17Cv+BXPlE+UT7peix/zc8HLgZ+0+93PdQfyXC+gh9ENviiQ/gZ6mf4J4QLgD8F6/0n8K/B+Pjgg68KfhiJYP5C4Ilg/BPA5wu+mJoBZPDb6PzB301wMgJOAu4pWO+GgvQ1dUv7scGXej9QFbznM8AXC770Dwfj/wb8JBj/Mr1cXAOnBz+e7q+Hiqx7PgU/8G7LjgBuBaLB9NXAu4JxB/xLMP5FOjPavcC3g/HXA38Pxnv73OfQmcEvBb4QjMeBJ4C5wWd1P/DGYN4pwTrvpmsG/12w7hJgbZHjeTPw44LpccH3spLOE9RvgPMKjjE//s2CtF1HwQmkj2Pu7Xh6+61txP8t9EhnkWP5crD+c/i//wnKK8orKK8UyyvP4F8kPQrcB5ygfKJ8gvJJb9dYr8p/lsonyiconxT7bjbj34DYChzWW17Kv0ZTtcANzrnnAcxsBXC3c86Z2fP4Pxjw70acb2afDKYTwGxgG/ADMzsWyAGLguWPAz8zsyj+SeKZAaTjd865nJlV40fVvzOz/LJ4wXq3FqRvZ7e0zwFm4v8oHwzeH8O/k5J3czB8EnhTf4lyzv0D/8RxoM4AjgceD9JVATQEyzzgxmD8VwVphK7pnROMRyn+uRd6LXC0mb0lmB6Hf9LcYGbvxg8krnHOPdhLev/knPOAF8xsSpHlzwP/bWbfAG5zzj0AYGa/BP7VzH4OvAJ4V7B+Gv8knj+Ws3rZb2/HXPR46P+3VjSd3fwI+Br+Sehr+Hey3ltkPeWVPiivHBJ5JQJMAF4OnADcZGbzXPBPGVA+6YPyySGRT/IuBn7byzLlkz4onxwS+eRDwMedc38ws7cBP8Uvwe3VaAquUgXjXsG0R+dxGPBm59yqwjea2ZeBncAx+JF2EsA5d7+ZvQp4A/BLM/uWc+4X+BeveYlu6WgNhiFgn3Pu2H7SW5jWwvTmgLuccxf38/4cA/iegjYG3y2yqM05170h5grgGDMLBZmjy6aA651zn+1vn3T9nIql9+MU+dyL7O/Dzrm/Flm2EL+oeHofaSj8bK37QufcajM7Hv8Ox3+Z2d+cc18Ffo5/lyiJf9LO1+HOFFyA9ffZFzvmXo+nl99af+ksPJadBdv6MZ0not7SBcorPSivdGyrawLHUF4BtuBXN3HAY2bm4d+lbOzl81A+6Ub5pGNbXRM4tvIJZhbBDyKO7ydNoHzSg/JJx7a6JnBs5ZNLgI8G47/Drybbp7HWW+BfgQ9bEPab2XHB/HHA9uDH/E78okHM7DCgwTn3Y/xI9GXB+jvN7AgzC+EXjfbgnGsCNpjZW4NtmZkdM4i0PgKcYmYLgvdXmlmxuwuFmoGaXtLzD+fcsUVePXq4cc6twy8y/UrBZ7XQzC7AL25/iwUNwM1sYvA5gf97yd8VeAfwz37SW/Rz7+avwIeCuwqY2SIzqzKzccD38KsrTCq4GzEoZjYd/yT3K+C/Cb5j59w2/LtqX8Avdu5Pr599N70dT2+/tT7T2W2daQWTb8SvHzxUyivKK12MpbwC/Al4TX67+Hendw0gTcXSqHyifNJhjOUT8O/Ar3TObRlAWvpKo/KJ8kmHMZZPtuG33wP/f2VNf4kZTSVXA/E14H+A54If7kbgXPy6q38IMuM/6LwDchrwKTPL4Efp+eLJK/FLBV7Cv4Ct7mV//wL8yMy+gF8MewN+o7h+OecazS96/a2Z5Yu0v4BfV7k3twK/DzLih13fxfz9eT9+tbK1ZtYG7AY+5Zx7ITievwUnuAxwObAJ/3NbamZP4vcq9Pbim+7Q2+de6Cf4xbpPBd9ZI37vMN8Frg7uKrwP+IeZ3T+E4zwK+Jb5d64z+MW7eb/Gr/s7kF5obgB+bGYfofMkV0xvx3MaxX9rA0ln3jfNL+Z3+L/tywaQ7t4orwyc8sroyys/w68Kshy/usklBXdFB0P5ZOCUT0ZfPgG4iN6rBA6U8snAKZ+MvnzyAeB75pfyJvHbd/XJhvZ/I4ciM2txzvV2sht1zOwHwNPOuZ+OdFpkbFFeEemf8olI/5RPRh8FVzJgYymDB3eAWoGznHOp/tYXGQzlFZH+KZ+I9E/5ZPRRcCUiIiIiIlICY61DCxERERERkRGh4EpERERERKQERnVwdc455zj8ntP00utQeA2Z8opeh9hrSJRP9DrEXkOifKLXIfYatFEdXO3aNZTHlogcepRXRPqnfCLSP+UTkb6N6uBKRERERETkYKHgSkREREREpAQUXImIiIiIiJRA2YIrM/uZmTWY2fIiyz5pZs7MJhfM+6yZrTWzVWZ2drnSJSIiIiKl5XmO9Y0tPLxuF+sbW/C8IfUFIDLqRcq47euAHwC/KJxpZrOAs4DNBfOWABcBS4HpwN/NbJFzLlfG9ImIiIjIAfI8x50rdvDxG58mlXUkoiG+87ZjOWfpVEIhG+nkiQyrspVcOefuB/YUWfRd4NN07d7wAuAG51zKObcBWAucWK60iYiIiEhpbNzdyhU3PUMq61/aJTMeH73haVbvbFaJlhxyylly1YOZnQ9sdc49a9blTsYM4JGC6S3BvGLbuBS4FGD27NllSqnI6Ke8ItI/5ROR/vWXT3Y2JUlmvC7zMjnHm3/0EMfMGs/jG/eQyalESw4Nw9ahhZlVAp8HvlhscZF5RW9tOOeudc4tc84tq6urK2USRcYU5RWR/imfiPSvv3wypTZBItr1kjIaNk6cO5GH1u0mk+ss0fr4jU+zcXerSrRkzBrOkqv5wFwgX2o1E3jKzE7EL6maVbDuTGDbMKZNRERERIZgzqQqvvO2Y7nipmdIZryOEqoJlVH+saqxy7qprOOLf17OSfMm8YN71qiNlow5wxZcOeeeB+rz02a2EVjmnNtlZrcAvzGz7+B3aLEQeGy40iYiIiIiQxMKGecsncrij5xKQ3OS+poEcyZVsXF3K4loqEuVwXAInt68j3+u3d0xL1+itfijr+p4386mJFNq/e0o4JLRpGzBlZn9FjgNmGxmW4AvOed+Wmxd59wKM7sJeAHIAperp0ARERGR0SEUMubVVTOvrrpjXm8lWhXREO+57oku709lHR+74RlmT6rkryt2qI2WjFplC66ccxf3s3xOt+mrgKvKlR4RERERGT6DLdFqSma47bntHfOSGY9//81TvP2EWbx83iQOn1rDvMnVxCJ++y7PcyrlkoPOsPYWKCIiIiKHjsGUaE2ojHLxjx/t8n7PwU2Pb+G3j70E+B1lzK+rZtGUGszg9ue3k8k54hHju28/TqVcMuIUXImIiIjIsBlMiVYiGuLPl5+CA1btaObF7c2s2tHEI+t309Cc6lgvlXX826+fYt7kKmZPqmTauARTayuYOi7O1HEV/vS4BDXxCN0eByRSUgquRERERGRYDaZEa2F9DaGQsXhqLRcc66/78LpdPUq5ACZURtnVkmL51v3sakn3WF4ZCzN1XKJn8FXrB19TxyWYWBkrWvqlaogyEAquRERERGTE9VaiVSyAyT9bq3sp17feekxHwJbK5mhoSrGjKcn2/Ul27G9n+/4kO4Pph9btoqE5Ra7bM7Zi4RBTxsWZWpvoKPWaUhNne1OSXzy0kXRQDfE7bzuW1x05rawBlgK60UfBlYiIiIgcFIqVaBXTWynXnElVHevEI2FmTaxk1sTKXreT8xy7WlIdwdeO/Um2NyX94f4kz23Zx19XJElnvS7vS2Udl//macZXLGdCVYzaiijjKqLUJiKMy48HQ39+wXhFhJpElHA/QZLnOe5csaPHMapd2cFNwZWIiIiIjCqDKeXqSzhkTKlNMKU2AbPGF13HOcffXtjBZb98qseyZXMmkIiG2d+eYX97hpf2tHWMdy8R664mEekIumorIj0CsUzO40f3rSOT87eTfx7Y3H87hcXTasvSdkwlZQdOwZWIiIiIjDoDLeU6UGbGwvqaotUQP/f6I4ru3zlHWzrH/vYMTckM+9sywXjWHwYBWFN+eXuGDbtaaWr3l7dnij/uNZV1vO77/yQWDlFbEaE2CMZqg1KzzulIR6BWbFk8Eu6x7ZEqKRtrAZ2CKxERERGRPgykGmIhM6MqHqEqHmE6FYPeXzrr8fzWfVz840dIZztLwCIh490nzyESDtGU7AzS9rdn2LKnrSNQy5d29SYRDfUIvEJm3Le6gVwQPyYzHh+54Wk+edYiZk6sJB4JE4uEiHe8wsSjIWLhEPFoMB0sG2ip2lis+qjgSkRERESkD6WqhjhQsUiI42ZN4H/eftygAw/nHMmM1xF8+cNsR+DVFJSgFS7b3ZKmoTnZEVjlZXOOr9+5avDpDwcBWEHQFSsSlGU8j3+u2UW+BmUy4/GR3z7Nv79mAXMmVVEVj1AdvKriYaoT/nhFNDzkapHlLilTcCUiIiIi0o/hqoZYuL+hBHRmRkUsTEUs7LclG6D1jS28/vsPdKn6GI8YP7nkBKbWJkhlPVLZHKmMRyrn+cNsjlTWI531uixPd1vurxOMZzxaU1n25jz2tmbo3jQt6zn+5+9r+v5sjG6BV/dxPxCrikeoCeZVxSNUxcI8t3U///P31aSz5Xn4tIIrEREREZGD0HAGdL1VfTxl/uSyldD1FtD9+v0vZ1J1nJZklpaU/2pNFRlPZmlNZ2lO+vMam1Md67Sksv12KpLKOq646RkWf+TUkn3GCq5ERERERA5xw131EXoP6F42e8IB79c5RyrrdQRhLaksj23YzVdve7HLesmMR0NzUsGViIiIiIiUzmip+jgQZkYiGiYRDTO5Og5AZSzMN/+6qkevj/U1A68+2Z9QybbUjZn9zMwazGx5wbxvmdlKM3vOzP5oZuMLln3WzNaa2SozO7tc6RIRERERkYNDPqB7+bzJzKurHpaSskTUD4H66/VxKMpZcnUd8APgFwXz7gI+65zLmtk3gM8CnzGzJcBFwFJgOvB3M1vknCveyb+IiIiIiMggDEfVx7KVXDnn7gf2dJv3N+dcNph8BJgZjF8A3OCcSznnNgBrgRPLlTYRERERETn0lLukrGzB1QC8F7gjGJ8BvFSwbEswrwczu9TMnjCzJxobG8ucRJHRS3lFpH/KJyL9Uz4RGbgRCa7M7PNAFvh1flaR1Yr2neicu9Y5t8w5t6yurq5cSRQZ9ZRXRPqnfCLSP+UTkYEb9t4CzewS4FzgDOdcPoDaAswqWG0msG240yYiIiIiIjJUw1pyZWbnAJ8BznfOtRUsugW4yMziZjYXWAg8NpxpExERERERORBlK7kys98CpwGTzWwL8CX83gHjwF1mBvCIc+6DzrkVZnYT8AJ+dcHL1VOgiIiIiIiMJmULrpxzFxeZ/dM+1r8KuKpc6RERERERESmnkewtUEREREREZMxQcCUiIiIiIlICCq5ERERERERKQMGViIiIiIhICSi4EhERERERKQEFVyIiIiIiIiWg4EpERERERKQEFFyJiIiIiIiUgIIrERERERGRElBwJSIiIiIiUgIKrkREREREREpAwZWIiIiIiEgJlC24MrOfmVmDmS0vmDfRzO4yszXBcELBss+a2VozW2VmZ5crXSIiIiIiIuVQzpKr64Bzus27ErjbObcQuDuYxsyWABcBS4P3XG1m4TKmTUREREREpKTKFlw55+4H9nSbfQFwfTB+PXBhwfwbnHMp59wGYC1wYrnSJiIiIiIiUmrD3eZqinNuO0AwrA/mzwBeKlhvSzBPRERERERkVDhYOrSwIvNc0RXNLjWzJ8zsicbGxjInS2T0Ul4R6Z/yiUj/lE9EBm64g6udZjYNIBg2BPO3ALMK1psJbCu2Aefctc65Zc65ZXV1dWVNrMhoprwi0j/lE5H+KZ+IDNxwB1e3AJcE45cAfy6Yf5GZxc1sLrAQeGyY0yYiIiIiIjJkkXJt2Mx+C5wGTDazLcCXgK8DN5nZ+4DNwFsBnHMrzOwm4AUgC1zunMuVK20iIiIiIiKlVrbgyjl3cS+Lzuhl/auAq8qVHhERERERkXI6WDq0EBERERERGdUUXImIiIiIiJSAgisREREREZESUHAlIiIiIiJSAgquRERERERESkDBlYiIiIiISAkouBIRERERESkBBVciIiIiIiIloOBKRERERESkBBRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5ERERERERKYESCKzP7uJmtMLPlZvZbM0uY2UQzu8vM1gTDCSORNhERERERkaEY9uDKzGYAHwGWOeeOBMLARcCVwN3OuYXA3cG0iIiIiIjIqDBS1QIjQIWZRYBKYBtwAXB9sPx64MKRSZqIiIiIiMjgDXtw5ZzbCvw3sBnYDux3zv0NmOKc2x6ssx2oL/Z+M7vUzJ4wsycaGxuHK9kio47yikj/lE9E+qd8IjJw/QZXZjbFzH5qZncE00vM7H1D3WHQluoCYC4wHagys38d6Pudc9c655Y555bV1dUNNRkiY57yikj/lE9E+qd8IjJwAym5ug74K34gBLAa+NgB7PNMYINzrtE5lwFuBk4GdprZNIBg2HAA+xARESkJz3Osb2zh4XW7WN/Ygue5kU6SiIgcpCIDWGeyc+4mM/ssgHMua2a5A9jnZuDlZlYJtANnAE8ArcAlwNeD4Z8PYB8iIiIHzPMcd67YwcdvfJpU1pGIhvjO247lnKVTCYVspJMnIiIHmYGUXLWa2STAAZjZy4H9Q92hc+5R4PfAU8DzQRquxQ+qzjKzNcBZwbSIiMiI2bi7lStueoZU1i+tSmY8Pn7j02zc3TrCKRMRkYPRQEqurgBuAeab2YNAHfCWA9mpc+5LwJe6zU7hl2KJiIgcFHY2JUlmvC7zUlnH7598iY+dsYgt+9rZ2ZRkSm2COZOqVJolInKI6ze4cs49ZWavBg4HDFgVtJUSEREZ06bUJkhEQ10CLAOuvnc9v39yK3vb0mRyqi4oIiK+gfQW+C7gHcDxwMuAi4N5IiIiY9qcSVV8523Hkoj6f5eJaIgfvOM4vnLeUhqbU2RyndUFr7jpGVUXFBE5xA2kWuAJBeMJ/Kp7TwG/KEuKREREDhKhkHHO0qks/sipNDQnqa/xq/89umE33fsMTGY8GpqTzKurHpG0iojIyBtItcAPF06b2Tjgl2VLkYiIyEEkFDLm1VV3CZqKVRcE+PsLDSybPZHNe9vUFktE5BA0kJKr7tqAhaVOiIiIyGiRry54xU3PkMx4xCPGUTPG85N/buCxjXtYtaNJXbeLiByC+g2uzOxW6Kj9EAKWADeVM1EiIiIHs2LVBQ+bWMl3/76aH/xjXcd6+bZYiz9yqqoLiogcAgZScvXfBeNZYJNzbkuZ0iMiIjIqFKsueMqCyV2CK1BbLBGRQ8lA2lzdNxwJERERGe2KtcUKGYTNWN/YonZYIiJjXK/BlZk1Q4/OkMB/xIdzztWWLVUiIiKjUPe2WJGwETLj3T9/nHTO0zOxRETGuF6DK+dczXAmREREZLQr1hZr85423nPd47jgdqXaYYmIjF0D7i3QzOrxn3MFgHNuc1lSJCIiMop1b4u1synZEVjlJTMe63e1KLgSERljQv2tYGbnm9kaYANwH7ARuKPM6RIRERkT8u2wuvvoDc/wv3evoSWVHYFUiYhIOfQbXAFfA14OrHbOzQXOAB4sa6pERETGiHw7rHyAlYiG+NzrF/OKeZP49l2redU3/8FPHlhPMpMb4ZSKiMiBGki1wIxzbreZhcws5Jz7h5l940B2ambjgZ8AR+J3mvFeYBVwIzAHv3Tsbc65vQeyHxERkZFWrB3WnElVXPqq+Ty9eS/fuWs1//GXF/nxA+v58GsW8rZls4iEjI27W9W7oIjIKDOQ4GqfmVUDDwC/NrMG/OddHYjvAXc6595iZjGgEvgccLdz7utmdiVwJfCZA9yPiIjIiCv2TCyA42ZP4JfvO4lH1u/mv/+6ii/8aTnX3LeO0xfXc+Pjm0ll1bugiMhoMpBqgfcD44GPAncC64DzhrpDM6sFXgX8FMA5l3bO7QMuAK4PVrseuHCo+xARERlNXj5vEr/74Cv4+XtOIBEN84uHN5HK+r1g5HsX3Li7dYRTKSIi/RlIcGXAX4F7gWrgRufc7gPY5zygEfi5mT1tZj8xsypginNuO0AwrC+aGLNLzewJM3uisbHxAJIhMrYpr4j072DKJ2bG6YfX85Xzl/RYlsx47GxqH4FUiRxc+UTkYNdvcOWc+4pzbilwOTAduM/M/n4A+4wALwN+5Jw7DmjFrwI4IM65a51zy5xzy+rq6g4gGSJjm/KKSP8OxnwydVxF0d4Fv/jnF7hn5U5c937dRcrsYMwnIgergZRc5TUAO4Dd9FKqNEBbgC3OuUeD6d/jB1s7zWwaQDBsOIB9iIiIjErdexeMR4x3veIwkpkc773uCd549UM8sKZRQZaIyEGo3w4tzOxDwNuBOvxA6APOuReGukPn3A4ze8nMDnfOrcLv2v2F4HUJ8PVg+Oeh7kNERGS06q13wf937hJ+/+QW/vfuNbzzp49x4pyJfPysRbxi/qSRTrKIiAQG0lvgYcDHnHPPlHC/H8bveTAGrAfeg1+KdpOZvQ/YDLy1hPsTEREZNYr1LhjCuPjE2bzpZTO48fGX+ME9a7n4x49w8vxJfOK1izj+sIkjmGIREYEBBFfOuQG3hxqoIFBbVmTRGaXel4iIyFgSj4R51yvm8LZls/j1o5v50b1refOPHubVi+q44qxFHDNr/EgnUUTkkDWYNlciIiJykEhEw7zvlXO5/9Onc+XrFvPcln1c8MMHef/1j7Ni2/6RTp6IyCFJwZWIiMgoVhmL8MFXz+eBz7yGT5y1iMc27OEN3/8nH/rVk6ze2TzSyRMROaQouBIRERkDquMRPnzGQh74zGv4yBkLeWDNLs7+n/v5yG+fZl1jy0gnT0TkkKDgSkREZAwZVxHlirMW8cCnT+eDr57PXS/s5Kzv3McVNz3Dpt2tI508EZExTcGViIjIGDShKsZnzlnMA585nfe9ci5/eW47r/n2fVz5h+fYsrdtpJMnIjImKbgSEREZwyZXx/n8G5bwwKdP550vP4ybn9rK6f99L1/40/Ps2J8c6eSJiIwpA3nOlYiIiIxy9bUJvnz+Ui591Tx+8I+13PDYS9z0xBb+5aTZfPBV82lNZ9nZlGRKrf/Q4lDIRjrJIiKjjoIrERGRQ8j08RX85xuP4kOvns//3rOGXzy8iV89sgnPOXIeJKIhvvO2Yzln6VQFWCIig6RqgSIiIoegWRMr+eZbjuHn715GzvMDK4BkxuOjNzzNizuaRjaBIiKjkIIrERGRQ1g0HMJzXedlco43Xf0Ql//mKe5cvp1kJjcyiRMRGWVULVBEROQQNqU2QSIaIpnxOubFwsbZS6fy4Npd/OW57VTHI5y1ZArnHj2NUxfWEYvo3qyISDFjN7jyPNizDpp3QM1UmDgfQvozEOlC+UTkkDdnUhXfeduxXHHTMyQzXpc2V55zPLx+N7c9u507V+zgj09vpTYR4eylUznvmOmcPH8SkbDOGSIieWMzuPI8WHkr/PEyyLRDtALeeA0sPk8XjiJ5+Xxy86WQTSqfiByiQiHjnKVTWfyRU2loTlJf09lbYAjj1IV1nLqwjq9deCQPrt3Frc9u447lO/jdk1uYWBXjnCOncu7R0zhp7iTC6gBjRDnPI71pE9mGBiL19cQOOwzT+VxkWI1YcGVmYeAJYKtz7lwzmwjcCMwBNgJvc87tHdLG96zrvGAEP8D642Vw2RKYvLAEqRcZA/as8/OF8olI3w6BEt5QyJhXV828uupe14lFQpy+uJ7TF9eTzOS4b3Ujtz23nT8+tZXfPLqZupo4bzhqGucePY2XzZ6gngaHmfM8mu+6i22fuRKXTGKJBNO/8XVqzjpreAKsQyCfiAzESJZcfRR4EagNpq8E7nbOfd3MrgymPzOkLTfv6LxgzMu0Q8sOXTSKBLzmHYQy7V1nZtr9+conIj7VhCgqEQ1z9tKpnL10Km3pLPesbOC2Z7fz28c2c91DG5k2LsEbjprGecdM5+iZ4zBToFUuzvPIbNlCy4MPsvOq/4Rs1p+fTLLtM1cyd9Ei4nPnljcRyiciHUYkuDKzmcAbgKuAK4LZFwCnBePXA/cy1OCqZqqfsbtfOG59CmadDHvX686KHPJao5OpiVZwb3IhUbKcEn4BgPY926gq8/+wyKiRL+HN/59k2v2aER/8p///oTv1VMYinHv0dM49ejotqSx/f2Entz23jesf3shP/rmB2RMrecPRfonWkmm1HYGW5zk27m7Vg4sHyHkema1bSa1ZS2rtWlJr15Bau5b0+g24ZLL4e5JJso2N5Q+ulE9EOoxUydX/AJ8GagrmTXHObQdwzm03s/pibzSzS4FLAWbPnl186xPn+3dM8hk9Eodxs+GuL8KLt8KO59XGRMa8/vLK6mwdE0/9Djf+bQ13ZJdxbfh7nF6xnsrb/g2y+2De6dCyU3+GMqb1+5/SvKPnjbpsEv76WZi8CB7/qf5PClTHI1x43AwuPG4G+9sy/PWFHdz23HauvX89P7p3HfPqqjj36Om84ciprNvVWrQTjUM9wHKeR2bbNlJrguBp7To/mFq/Htfe+VuMTJ1KfMECqk48ifjCBVhlJduu/CykUh3rWCJBpK7ugNM05HzyqzfBhLmw+SHIZSCSgDdd6+cTUNAlY5I55/pfq5Q7NDsXeL1z7t/M7DTgk0Gbq33OufEF6+11zk3oa1vLli1zTzzxRPGF+bq/LTugeiqMnwN3fxke/kHX9aIVcNkDqi4oo8GQrziK5ZX1jS2877pHuexI41fPt7JiT4g5VWn+MvOXVG66GywMLqeLRhmNhpRXiv6n7FoD15za9cLRwn6+SLd0XTeS0J36XuxuSXHnih3c9ux2HtmwG+f8L6nwCiQRDXH7R07ts93XaNNXBxN+ELWd1No1pNet6yyRWr8e19bWsY3IlCnEFywgvmA+sQULgvEFhGtqeuxrkG2uyptPQhGYcTy89Gi3vYbgZZdAvBoeuxayqa7/MzDw/KN2XlJ+g84nIxFc/RfwTiALJPDbXN0MnACcFpRaTQPudc4d3te2+gyuitnwAFx/bs/5F/3GvwOpzCkHt5IGV57nuHPFjo47x2b+Dq4+dyrn3P1a8LKdK+cvGnUTQkaH0l009taWJD4OfnlBz42c+kmoXwK3XK62J71oaE5y9T/Wct1Dm3os+8w5h/OeU+aSiIZHIGWllQ92tn76M35pUjRK7etfh1mI1Lp1pNat6xpE1dURX7igIIBaSHzBfMK1tX3spec+05s2kW1sJFJX119vgeXPJxUTi1935W/edZ93ykf94Ovh/+0ZdHU/DrXzkuFx8AdXXXbeteTqW8Dugg4tJjrnPt3X+wcdXBW7swL+3RXndJdeDnYlDa6gs81DQ3OS6niEL/xpBSu27uPH4a9zWvi5ritf8EOYdZJuQshoULqLRuhZEyJfMtXj/6R7WUxANSR6WN/Ywuu//0CXBxfnJaIhTp4/mdMX1/OaxfXMGF8xAikcPJfL+W2i1q4jvX4dbc88S8vdd/vXFwXCEyYQX3x4EDz5JVLxBQsIjxs33EkemXwSrYA3/Rhu/NeB73TifP9/JzEeKiZAxXhwHjz2Y/AynetF4vDOP8O0Y/z9lLojFZWUHYpGdXA1CbgJmA1sBt7qnNvT1/sHHVwVu8vx+m/DrR8Gr+AOSjgK77sLph6jTCTlN/CTdcmDq+72t2d4x4/uY21DMz+PfpOTg04usBDOOcxCugkho0FpLxqLKfZ/cuH/wd6N8Pcv9Vz/PXdC1WT9nwS6l5wnoiG+8eajGZeIcu/qRu5Z2cDmPX6pzuFTajh9cT1nHFHPcbPGj/hDi10mQ3rzZlLr1vnV+db6pVDpDRtwBe2dwuPHk9u3r8f7Z//ieqpOPHEYU9yrkcknb7wG6o6Aa1/VM+g673/h5vf33M7sV/g3wtv3dr4ybT3XKxSKQqIW4rUFw3H+q8e8wvXGdc6LxPs/lnL/DyqgG2mjK7g6UIMOrqDnnZXmHcWLrMNxmLkMtjwOubQuJg8Vw30SG9yDfMseXAE8u3kPH/3FP9nZkuWa6Hd4VWItLa//EdW3vq/rTYhIHD74oNqXyMGo/BeNMIgSLaB6CrTt9qvb6v8E6FpyXvjgYgDnHOsaW/nHygbuWdnA4xv3kPUc4yqivHpRHa9ZXM+rFtUxsSo24P0N9gG7XipFeuNGv1OJfBC1fh3pjZs6ujsHiE6fTmzBfOLzFxCfP4/Y/PnE588nu3s3G974pi49+Vkiwdw/3lz+3vsGZuTyCQwu6CpW8rtzBfz4NV0fvROOwqmf8K/hUk2QbOocJvd3nZdq6j/t4Xhn4BWJQ+NKv8QsLxSB498NtdP96vORhJ/eHsM4RCogmug6DEf7Ll0biYBuJIK5kbj2Gvj+FFwNWrGqguE4LDwLVt7Wdd1QFC7+LSw4s/RFzVLccGa4vk5iOEi3+nfK0q3+8o7xNn+6y/Lu89qCefnxYBup5p6N4nuvQjQswdXD63bxsRuewrwsO1odp8yM8KHFSV75z3f1XLl+Ccx5JTz1C/WYJgeT4bloLKb7eSSSgBMv9TtT6n5RdvEN+j8ZoKZkhn+u2cU9Kxu4d1UDu1rShAyOmz2B1yyu5/TD6zliWk2vz9Pqq7MH195Oav0GUuuCIGrdelLr1pJ5aYv/fQKEQsRmzfLbQ82fHwRRC4jPm0uosnLQ+xyWh/r2b+TyCQwu6CpHmysv5/8Hdw/CUkEg1j0Y27sRtj5ZZEO9VAceCAv1HpRFEv4546VHup07wnD0xVBdD+GYH6CFY0XGI73MLxgPdVsnFIE1f4M/fWj4/tOHO4Ac/P4UXA3aYBthgn8Hcs4rg9epMGmBX6dad+9La7AZwPMKApjWrsFO0fGWzqAn3QKtjbC520kM/JNOLj24tFsIolUQq/TT3TEevPLjyX3+4wG6e/dt/m+r21YHl4hOg8krxdpC1FUa1/AfvMxb0bliKOL/1vdv6boBdX4hI+/gumjsrYYE+N1ULzrbfx12Smc1JFUF6pXnOZ7bup97Vjbwj5UNPL91PwDTxiU47XC/ndYpCyZRGet82kxqwwbWX/jGLt2UEwoRmTyJbENj57xolPicw/zAqSCIis05jFC8oIrYAA2yg4nhNrL5pDfFgq7+egscyLoHqtjN+GgFXHo/TDjMn59NdhumINsOmWTxYTZVsH6RdVobYfeanmmJxP3gsLDjqXIKx/3rGjM6fjb58Y4bGlbwi7IBrBvM87LQtqvbDg3GzfSP00LBK9yZhlC4YP4gl6XbYN09XTtU6btdrIKrIRlo1Y5I3O8Jatdq2PhPaN7uz6+e4v9Bbn3Sb1gZScCFV8OSN46tP8NS/dk7VxDoBAFOx3hr5/i+TfDIj7qePCwEM5bRUZLUvbRoMMIxiFV1Bj7OFT+JHflmmHx4kUCpyp/OjxcGT5H4wO5G93ayHsGSq+5tIaJhozYRZW9big9Gb+djdgOxWIzW1/+QinGTCf3i/J4bOfptcMrHYcqSoSZZ5EAcXBeNxfJ5JO7nkW1Pw4b7grvEVTD/dFhwln8Ed16pXtAGoKEpyb2r/HZa/1y7i5ZUllgkxBn1Yc6xRpbuf4nQ44+QWrWqx3srT34FVSeeGFTlW0Bs1kwsGh2BoxgRB1c+OdiNRBW9/q4RnPOfH5ZLB68i416ml3W6z8vArlXw5HU903Hkm6B2RtfOWZyjo8QuP96xvNh4L+s2b/dLy7qb92qonOzf8PZy/jDf+ZzzOl+9LfMK1ytYlm7peVMYerupDQquSqi/TOQc7FkPGx+AVXfC6jt6biNWBZWTgp5tJgbDCVBZMN59fmK8X5Q70DSW885mLhvcPWmHVCusvh3+/hXIpfzA5IT3+0FHJqjmlm7tGhwVHQ9eQy1CB6g/AmqmBSVAVUGA1Nt4EPQUG+/+OQ8u0CmNwZ2shyW48pPVtS1ESzLLO37yCC2pHLOrHRctreB3a+GWi6dTc/3p3Z4BFKTbeVC/FI56sx+gTpjTecy6Iy/ldXBdNPaXz9Nt/n/J6jth9d+gqcgffyQOl97nn/+kB5dOk1y5kuYnn2bbw4+Tff55qvY2AJCxMFsnzaSFMDWpFmY0NxLBYYkEc27+A4l580Y49SPm4Mono8FwlpTl9zecAd1IXAcN9z4Hvz8FVyU10EzU2/Ozjjjfv9Bv39PZu03bHr8qWPeqZ4XitX43o30FZIlx0PAC3P9Nv1g5EodXfQqmvQxyyc42QUWHA5w32Kpw+ZKgWHVncNNjurpr8NN9WeF48w746ZldG6uWM8ONdE9A/Z+shy246u7hdbu4+MeP9ph/8wdP4mVtD/b8zGaeBC/eAst/3/kAyZkn+kFWrBLu+LTuyEs5HXwXjQPN587B07+CW/6957JwDKYe5XcznX/VL+nao9khIrN9O+3PPkv7M8/S/swzJF94AZf2/7Mi06ZRccwxVBxzDPvmHs79biJ/WbmLZzbvJeuMRDbFov1bOXzxbI49+RjOPmoak6sPvc+QgzGfSE/DGdCNVAcaanN18DhoMvhgo2DP8xtHdgm6CroX7R6M5cf7C8r6E81Xa8sPKwY+b98WePC7Pbf51p/DvNP9kqDIwHttGpCR7CVnuO5KDc6IBVe9PZPmLcfP4KoLlpJuWEuuaTvh2mlUTVtEKFzwANC9m2D5H/zXzuU9Nx6J+3XW6xcPOX0i3Yzui8aiHS1F4ai3wb7NsP05SPntjAhF/B7WCgOuqUf6N6nGCC+ZJLlihR9IPeu/sjt3AmDxOImlS6k49lg/oDr2GKJTpvTYxsPrdvHxG57izCkRtu5tZ3V7iK1tneez2RMredns8Rw3ewIvmz2BxdNqiI5wl+/DYHTnEymPkbgOGokSwYHvT8HViBiuIMDz/D/U9r2w9h64/RM913ndN2H2y3sGSJHEgfVINRJFxXCwBzvDbcSCq+7tsOIR4xXzJ3Pvqkbm11WxZW8bqawjEQ3xnbcdyzlLp3Z0qdzFU7+CWy7vOT8ShylH+nfhpxwJU5b6r8qJQ06zjC2D7EZ7dF80DqRa+t6NsP3Zrq+ORuHmn5c7gq2jYdrRfs2Hg0ix7xQzMlu2dJRItT/7LMmVKzu6Po/OmtVRKlVx7LEkDl+Exf5/e3ceJ1dZJnr895w6tfaepNcknT0QspGwCkYUUcDBjRnEfZm5Os5V0dEZdRS8oyiKuIxXuderIwOMC27ouODIokhARAiJJCEJ2bdOel+qu/Y67/3jVHVXdVdv6eo1z/fzqc855z2nzlLdb9V5zruN/mCv0AMivy188a830hyO8ezRLp491klL2O3wIuC12LCwkk39AVclNeWByfkgps/szidKnaHJ/j3R4KpYpjoImOpgZ7qqzKlc0xZcQeExab7z+GE+98CevO0CXosHbtrC8urSoTsZ7on8ur+BnpNwepdbcptV1jAQaGWDrgWr3Peos8YZdGk9+28ax/ubYozbMDwv4Houv/1W5ZL8Eq76jW53zrnHm6K2kNm/6cmPfsztwc+2CZx7LslTp0i3twMgoRDBdevcUqnzNxLcsAF7wYIzOl6hQYsHPwgyxtDUHWP7sU6ePdrF9uOd7D7ZQyLtBmQLK4Nsaqxkc2MVm5dUcV59OT57Vv/+zf58ouaE8Y5Bdyb7N/E4TiyGE43S+8jvaL7jDkgkwO9n4RdvL+rviQZXs5VWmTsbTWtwVchwbbHue88lXLq8wE3QWJ7I9za71Qebdw+8Wve5PR6BO95c9bk5QVcm8CqtKVw6qx1oTIpi/BgaYzDRKOlwL064h3Q4jNPbS7qnByfcSzrsTpMnT9Lzm98MjDnEqIOx6k1jVl9bfsB1+jm3M6assnq3ZMsbgH2/cdva2gG4/luT8nuSbGoisn07vY/+gZ5f/Sq/9zERSl/+ckpffDnB88/Hv3IlYo+xg6cxGGnQ4uHEkml2N/Ww/Vgn2491sf1YJ03dbjtgn22xfmEFmxZXsnlJFZsaK6mvCBY8ZnNPjNrysR1zCmk+UUNMdqCTPYaJxdxgpy9C+HeP0PLlr7jBjtfLvHe8ncC552LiCZx4DBOLY+IxnHgcE4vnp8Xi7r7i7tQk4gXSRu5DoNi/JxpczWYa7JxtZlxwNVxbrBsuWMQn/2oNlaEC1XXO5P82lXC7yW/enQm8nnfnw00D24QWDAq41sL81XDwYS1xLbIhpQ4+H9U3fYDA2rU4vb04/cFSgWlPD+negWm2utewbBsrGMQJh4esarznbkouuaTQu/SmcSSxbji9cyDgOvF0fsCVVbse5q9wx5upWJyZLnTnQ/NHrWpuUilie/cR3b6d6PZniTy7ndTp04DbVsrkjjmV0XjvPZRcfHFRLnOynM6WbmUCrudOdpNIud+B9RWB/tKtjYsqaeqO8rGfPjdsadk003wyC0xFsJN7rJ7f/pamj/9L/3d7zYc+RHDT+W7JTzTqBi3RGE4sislOc9MiUZxYDBOLZtJimGg0f1og74+JZSGBAJbfnzcVvw/LH0AC/sw0gBXwI/6Bqfj9WAE/yaZTdNx995Bdj/Ddo8GVUnPYjAuuCrXF2rxkHn861E55wMsHrlzJ2160BL/tGX1nZyLSkVPClSntatnjDiEAbrfwueNrgFvy9fL/BdWrwV/m9s4ZKHen/jJ3kMGJmuoqVqkUiQO7STU3Y9fW4Vt53hk/8XdiMVJt7aQ72km1tZNqbyPd3p6Xljx1iuTx42Pan1VSglVWhqesbOg06MMTtLF8gscPlu3g8aawrASWJ45HIkiqB9NxgvjuHVh2mni3zckn5rlPGu+7G/+5GwsdVm8ax2O4Hm/rN7pDZ3SfyO+1FdzSrYpF7tg3mcAr7Z1P9GSc6OF2Is8fIrprNybijj9o19UR2ryJ4PmbCG7ejAT8HPmbGzCxgf2O8vR4xkqkHPac6ukPtp491smJzmjBbX0e4RfvfzHn1pdPyrk4xuFoz1FaI63UhGpoLG/EkjnaNnEaTGWgkz3eWKpEG2PcAKe313141RdxH3RF+nLS+nB6+zLTzHJfL+mctHQ43J9nx0N8PiQYxAoEsAKB/nkJBrACQaxgAAnkpAVDmbSAG+x85ztD9ln/+c8TuujCvEAKrxeZSP8BuAOKH3799eP57tHgSqk5bMYFV1C4qs2+5jC3PbCHrfvbaJwX4uPXnsu16+om/KU4thNKQ8dhaNntVnP6yw/G935f6dCAKzvfnzbc+gr3/ft/O2WlZSaVIvyb/6Lpls8O/PjeejNl174WsW2MMTh9faTb2ki1t5Nqb+8PlvoDp/YOd76tHaevr+BxrNJS7Pnz8SxYACJEn3kGMIjHYNkGy3aY9/Y3EFregOVJ4LHiWBJBEj0Q7XJ7O412uaUmscx0pN5PxeN+nsFKjNikow6RF04R67DoOFRNw0ffTdnlm5EllxZ895l8lmftb8pYBiqNtLtBVuZluo6RPHqI6N5jRA53ED2VIt5tAwJi8FcmCdVZBJdWETqnEW/j8kypl1sKZkrqCD/+FE2fuq3g/+1s1xKOcd+fj/H/HjtIZUhoDadJZAppLYHVtWWcV1/OeQ3lrG2o4Lz6cipCE2tL6hiHh48+zCcf/ySxdIyAJ8DnXvw5rlpy1XABluaTcTiDtp9D95FKuVXhIpH+0p6BEp7okLTkqSY6v/8DSKcHdmJZ+M85B1LJvMAot9r0sCwLq7QUq6QET2kJVok7n01zesOEH3xoyNuqP/Jhghs3YvUHTZlpNnDynPlDyTMIdiZkKtrwanCl1OwxI4OrkfzhhVZu+/Ue9jWH2dxYySf/6jw2La6cujYIhW4a7QDc+F13vLh4N8TDEOtxh0eI9bjL8e6BtMHrU4WfSI9MoLLR7b3Tst3SMcvOeY1v2UlDOpIiHUkRP9VKz+//hBN3MCnBSQvG8SBllTjRNKmeGCZV+EfXE/Jgl3jwBC3skAdPCOxM56KegIMdSGP703j8KSxJgpMCJ4VJJSCdGL0DUo/PHRg9EyQRqByYFkoLZtIDlW7Qmj1A237M928k0fg3pKI2djCF79hPkDf/sGiDPsJZ/JviOJj9D5LY9xdSfYJdAr5zNiCrXtn/QMAkEsT27CHy7Haizz5LZMd20q1u74RWSQnBjRsInreS0IoaAvU+PMnWvGCM7pMD3cdnGABvOY6nFHxBrFgLsvZ17t80tABKFmSm892pr2RCvd466RRH25+nta+ZmpJaGuefhzV4MPkiOtIW5qGjj/CtPZ8jmorjS9fx0gXvI2SWcbIzxu6mnkzvhAZIs3Ceh9V1fpbXBFiywGbRfJvSgCGWjhFLxQamufM5ae2xdv7U9CccBvJ7wBPgR6/+Ecsq5mbbxMksSTKOgxMOk+7pId3dQ2zfXk7/66chmRzYyOOh/JprEK83r9rbQJW53LRY/nsnILB2Ld6GhrzAyCotwVOaEyyF3KkbRLnzEgiM+JBzqgMdKE7QeibHTBw9Sqq1Fbu6evb3Figii4F7gTrAAb5ljPmaiMwDfggsBY4AbzDGdI60r5Ey+AxvRKrUmZh1wRVA2jH8+JnjfPmhF2gNx9ncWMmupm4SY+m6faImo+OXdDITcHUPDb7iYTj1HGb3/ThlK3FSYHnSWD0HkMUXuV1hO+n+IAUnhUmncGJJ0r0JUn0JN2jqS5GKpElH06QjDqmoIR0zpKPuGOFOapjPSgy238kERg52SPAEwQ5Z2CELT4ntBlOlXuwSH+L1utUkPd6B4M2TTbOHXWd6W0g0tdHzxA7S0TSO8VP56msJbtyALL18IFjyBic2BETWFAz6CDPrpnEqGcch/OBDNH184Oam9pZb8FRWENvxFyLbnyW2c1d/OwnvwoUEN292q/lt3ux2PDGWJ9exbjfI6j4Bhx6FP905dBvLdvNGIXYgP9gaHHz1Ly9w24QFKvr//5x0iocP/pJP/vm2gVKdiz/BVStePWqAZYwh6SSJJCNEU9H+VyQVGZgmo3nroqkoLZEWHjz6IE5OCa0gLCpdhIOT2S5GPBXLC4jGyhKLoB3E7/ETtINub4d9TUO2u+vqu7io7qJCu5iR+WSsAdNYbsqzJfdOdzfp7u7+QCnd051J63HThiz34PT05He4MgyrrAyrrNSt/jZSlbhg7ny2XVCBtJzSoeTp01NafXY6Ap3scccR7Ey1WRFc1QP1xphnRaQM2Aa8Dngn0GGM+YKIfByoMsZ8bKR9DZfBx9LlqlKz0KwMrrL64ilu/++93Pvk0bz0EbtuL4Yp7vjFtB2k+1e/4tRX7urv+ajiFZfjrV9IOgbpzg5SnZ2kOzpJd3SQ6uoa9mmmBAJ45lVhV1bhmTfPna+qwlOVmZ83D6e7naZPfw6SA70hiT84UnukiRt/SdLETfKgjzAz8sl0iB8+zKHXvd5twD6YbRM47zxCm84nuGkzwU2b8NbWTPygw1VFfM9jbjvFSBv0tWembTnT9pzlzPpk4TYiKctLd8l8ukqqaPZ6eaLvBM0eocuyiFgWcY+H1fPXgb+EqHGImjQRJ0nUSRJ14kRTsf5AKW3SBY9RiCAE7SC2ZdOT6Bmy/sLaC2kobSDgCRCwA/3BUXZejI/2sOFUV5qTHSmOtiU51pYkkbLBeAl4ApxTO4+19VWsbahkbUM559SVcSpynDf88gZi6YEb8YAnwI+u+xHLKmdeyVXBcc5gxJt7Ywzpri5SLS1Ed/yF07femt8pjmXhX7USE4u7wVQ4nF+lbjDbxlNe7r4qKrAqyvGUV7jLlRVY5ZnlinLSkQinPnmz+72eoaU6Z4WZH1wNOQGR/wK+kXm91BhzKhOAPWqMOWek9w6XwQ+19nLt1x4jnhq4tkm/gVNq8s3q4AqG77r9A1eu4ANXrp4VY8YYY3C6u0k2NZE4eZJUU1P/fLKpieTxEwV7tgOwysvd4GjePDxVVZlgaV5muRJ73jw3cKqqwp5XhRUKjX4+o7S5mhQzf9w7Da5GYdJpos89R9/Wx+n57/8mcWhob4E1n/gXqm64ASsYLLCHCXIcnP0PcrT1OVotocaBxur1WDlVEXOlnTQ9iR464510xbrojHfSHe+mM9ZJV6SVzr5muqJtdMW76Ir30Jnqo8cZuUeyoOMQNIagYwgah5BjMstuegghKF6CHi8hy0/QDhC0gwTtEEFvCSFfGUFfKUF/BcFABUF/JcHgfALBKiRQzol4F+969CbaTZIkgMhowc6wEimHAy29PH+qh91N3exu6mFPUw/huBtYeCxhcVWQ8tJeDsYfwvEdo6Ssifet+yQvW3wlSxeUFdrtlOST8QRRvmXLOPw3N+QFMFgWgfPWkO7uIdXSMmpPc4F16/A1LsaqqBgIlCrKB5YrBoIpCYXG3BZYS3XOWrMruBKRpcBjwDrgmDGmMmddpzFmyHDyIvIe4D0AjY2NFxw9enTwJuMfe0ep2WFcGXwseWWqFeq6XXBbHFSX+XnrJUt48yWNVJf5i3bM8dbJN8aQbm8nmQ2Wmprc+ZMD886g3pQkFMLbUI+3oQGxvfT+7ndD9rv4ru9QetllRbuuvHPO6y2wFt/KtZPfKcDMHgpizHllJuaTyZJsaaHv8Sfo3foYfX98Eqe7u79xfHz//rwSgMl+Ip9MJ/nZgZ9x+59vJ+EksMXm6qVXUx2qdoOmTBDVFXcDqZ54D4bC9yt+j5+qQBVV/ioq/ZXuK1DpLmemsWgHt277MgkngWUMIccwX7x880WfZlFJvVulN9GbaXPZC4lwznw2PZyzXSYtWbgDmMFSQMyy8HpL8AUqkGy1WW/IbUs2ZL4EfCE3zRsqMF+CYwc42Wexuy3JrlNRnjzUztGWTtpigs9yeODaPdjeVXTUbWHz0oL3PpOeT4YLSHwrV3L49dfnB1Ei7ndIgZIm/zmr8a9chV1bi7e2Bru2FpNO0/SJT+aVuE5FSZIGOmed2RNciUgp8Afgc8aY+0WkayzBVa6RSq4G38B5LHjwQy9hRU3BpzdKzQazvuSqUJXdL92wkZDXw71/Osqj+1rxeoTrNjTwjsuWcv7iygkdr9APe/3nbyO4YQOp06cLBk7JU6eGPBm1ysvxNjTgXbjQnTY04F3YgLdhId6FDXgqK/uffk5Hg+Bxdr98NtCSK9xOKCI7dtC3dSu9Wx8nvncvAJ7qBZS+eAulW15M6EUvwlNRUdQn8sYYuuJdnO47zam+U5zuO83pyGl3mnk1R5rz2iJleS3vQKCUDZAywVKlv7JgetAevWRtIm2uRtmx2119XtDV486f2Iaz7S66GjYSM2lKUnHKTz/vtr/0lbnvS0bcVyKSP++Ms+MD8WDsAJLsI22EGD5KJA7eIOF3/J6yRWsKvutMLnk8+aTQ9yEi7jhnsdiQ7cuvu46e3/42r6r0cN+f01WSpM46syO4EhEv8Cvgt8aYr2TS9lGkaoGDb+A8FqQduH7TQj5//XpOdkW1ows1Y4yjZGXWB1dQuOv2bB481NrLvU8e5SfbTtAbT3H+4kreedlSXrW+/oyqDPZt28axd75r1B6aPPPmDQqcFg5MFzbgKR17deJ0OkXrb35J182f6f/Br/zsp6i+9tV4JqFnsjPofrlox53KgE7H7xmb5MmT9G59nN7HtxJ58k9u1/q2TWjTJkpesoXSLVvwn3POkKpQ6XSKrgN7SLQ046uppXLlmmH/X/uSfXmB0unIaU71nuJ05DTNfc2c7jud1+4H3KCpNlRLfWk9daE6HOPw68O/HrLv77zyO1xcPzmDCGd7C2zra2ZBSS1LJrm3wFG7uB9JOlk46Er2ufvLm3eDNNN2ANnzX0N25bzjV1jLthQ6yqTnk76nnuLYO945JL30qpfT++gfhpSWLv35z0js2zfmgElLktQUmPnBlbjf6Pfgdl7xoZz0O4D2nA4t5hljPjrSvsbSW2BLOEZ1qZ9fPXeKrz68n/PqyznYGiY+FT2VqVlnpg4QmDEngqux6I2n+Om2E9zz5BEOtfaxoNTPWy5p5C2XNFJTHij4HmMMyWPHiDyzjcgzzxDZto3ksWMFt6165zsouexFOHXVODXzSfqEeCpOPF34lUgniKVj7jTlTofbtivWxZ72Pcz3lGM7kLagLd3NssrlhGy3DZUlFiKChQUCFu6yiCCIu56xLfcl+9h6cmteKYBHPFy3/DrmB+djWza2ZeO1vHgtr7ssmTSPt38+u03B7Qets8TiiZNPcOuTtxJ34vgtP7dtuW3SAjodv2d4TjxO5Oln3NKpxx8ncfAgAHZDPaVbXuKWTl166YgPCAZ/vj7Lx/9Y/z9oKG2gJdIyEEBlSqHCifw2hYJQHaymrrSOulAddSV11JfUU1dS1/+aF5iX97c60n2EGwp1vjB8t+Gzz1S3TRx/MDep+cSkUpz+3Ofo+sF9+QcdJYgCNGBSM8msCK5eDGwFdkJ/36OfAJ4CfgQ0AseAG4wxHSPta7w/hF9/ZD9ffuiFvDTt6EJljbeKgUmn3cH+ohGcaNR9RSLu4ID9y1GcaGY5kknLWU51dhB7bmded68jVCE7a4KrLMcxbD3Qxj1/PMLv97VgW8Kr1te7VQYbykjs3+8GU9u2Edn2TP+4O1JZQXLtCo7X2+w4tY3tSw3t5ULChqQtJIM2STNMd89j5LW8+D1+fB4fAU/AndoBEukEh7qHdg6wZt4ayn3lODhupxiZYMgxDgaDMQaDGXnZmP73Z9OiqSit0dYhx/N7/P1dSA/XVqXYAp4AXs9AUJYboA2eLzQtuM7jJZwI88O9PySV8zc7W8fvMcaQPHrULZ3a+hiRPz/tfl/5fIQuuojSl2yhZMsWfMuWjdpQP5FOsK9jH4+eeJR/3/nvBavpAVT6K90gKVRHbUltXuBUX1JPdagarzW+AXCnq8R1yk1l28RpHrIg938Wj4fWr/1vok8/TeiSS4js2AHxuAZRajYadz6Z8mHQjTGPM/yJvnwyj33h0qFNuGJJh5ZwTIOrGaqYJUkmmcTp68uMaN6L0+u+0r29OL19JI4do+Puu/sb05pYjJP/+GECa9eCMQOBUSZIGq3HoiG83sw4F+5LQkFIpYeMo2FiMVKtrZPWPmc2sSzhitXVXLG6msNNnTzwk99z+qffY9f/PQidRwkm3Ce0yeoKWlbOZ+/LKvljTRe7Sjsx8hwAJasCNJ6Is+a4g8948GzegHfxIhaXNw4JjHKX/R7/wLqcNL/tx2f58FiFx/UZ7on87S+5fVKeyI+lBCDtpEmZFMl0kpSTImVSpBx3OWkyaU6KpDMwP3g5O590khzsOsj3935/yLm8ZNFLWBBcMOz7stOkkySSihRML/SeQmLpGG3RtrlTypFj8IMe/H7mvf3tOL1h+h5/guTx4wD4li6l8oYb3NKpiy4asVc/xzgc7j7MrrZd7Gzbya62Xezr3Dfs5wu4wU7jVYS8o/daOV6WWFy15CpWVa2iLdrGguAClpQvmVuBFbhBzYJVkzdEweBjnftq+PvzpryjmSH/s4D4fNR/4fNUvOY1wwZR/mXL9LdOzTlTHlxNp9ryAAGvNaSnsq5IkkOtvdoOaxTTVWXu5Ec/5vYG5PNRfdMHCKxbh4lE8gKjbKDk9PW6wVNvTvDU5y4Xajw7KsfBJBLYtTV4gwvdwCgUdAcJDIaGLocygdOgZSsYRHy+IbsfrvMDu7p6Ih/dnJDu7SO6fTuRbc8QeeYZYs89x5UJt+1US3WQJ9YIzy/2sLcR2ir68FkpVlQuZ1XVBl5ZuYpVVasIeAJ86vFbuOGSq5nXK3SUGu7pfpCvb7x10m7KG8sb+dyLPzfkifyS8iXTdjyP5cGDB7+nOL0wHuk+wv377x8S0L1/0/uL/rkaYzjYdZA3/uqNxHO61g54AiwIzs3eX+NHjnDynz860JNaPE7Ht7+NBAKUvOhFzHvXOyndsgXf4sUF32+MoTnS3B9E7Wrbxe723fRlerYL2SHWLVjH2857G+sXrKfSV8k/PPwPQz7f9QvWT0pglWWJxbKKZXMyQJ42UxnM5UgcPZoXWIHbC2xw40bEsjSIUmeVsyq4Wjq/hK+84fz+ji68HiHks/mH7z2LJW6nF9oOq7Az7ZXHOI5bVS4cJt0Txgn3kA6HB5Z7c9N7cXpy1nd1ke7qGthZIkHrl75c+EC2jae0FKv/VYK9YAHW0qX9y57SUqyS0vzl7KuklFR7G0fe9OYh3bou/LevTtqPgm/JEhpu/8LQbmqXTM6N+Eww0HD+NL6auv6G86n2dvqeeYb2P22l75mn8Rw8jjiGtAVHai2eP9+wd7HFC4s9VNUuZEXlCsqdhVSdKOXowSDR1AJq1y/k+g1L2NxYhYjgGIcPXvihgcCjd3IDHZj6J/LTUQIwlQGkiLC8cjm3bbltygLW6WASCSLPPEP40UcJ//dv87uozlh05zcovfzyIend8W52t+1mV/tAqVRb1K0ia1s251Sdw3XLr2PdgnWsX7CepeVL80peHePM+c9XTa5US8vQB5iJhNbCUGelaR9EeCLOpH784J7KwrEU1//fJ0jnVDX328JvPviSGV9VcKp66zKJBJGdOzn2rr/N/8G3bSrf8AbE43GDoWxQFA67QVJvrzuYqlO4Hn+W+P1Y5WV4ysqxykrxlJXjKS/DiUTpffTRIdvXfPzjhC68EE9pCVZZGVZpKeLzjXkgwGGvc+YPEDjr21xle9Lr/OSniZg4XRU2VuNCQic7KT/dA0DChhcahL2L4fSKKmTDGpbWnsuqqlWsrFrJiooVBOz8Ti2OtUe498kj/PCZ44RjKdYtLOedly3jug312BbsaTtEc6SV2lA1axYsx/YUrtKnxi77/TNVAd04jzfj2lwVKvlPd3TQ+9hWeh99lL4nnsDp60P8foIbNxB5dnvBcafM4nr2dux1S6Ta3VKpoz0DYw4tLV/K+gXr+wOp1fNWj6nEcqr/nmpGKFo+mY4hKJSaIjO/Q4tiKsYP4XADDn/gyhV88MrVHOuMjKm64HR0S7z12GO0H9hFRdihp9zDvBVr2dL4kmGPa4zBRCKku7pIdXb1lwz1vzo7Cy4PHjB1MKusrD8oyg2OrNIyN2jKTrPry8vxlJVl3leGVaC6HEzPl/UM79Z11gZXxhiO9Rzj6Z9/i8SPfs6SZod5ve663gAcWOyh45w6zMbzmL/xIlbWnMuqylVUBirHdZy+eIqfbT/JPX88wv6WXuaFfFy8bB6/39esPYSeXaY1uBocSHkXL6b3kUcGqjjbNt6FC93eLI3Brq2l9KUvpfSlV1By6aUYn5fW3/yS9ls+zYmSOAeX+Dj26s0cKuljf+f+/o49aoI1bhBV7QZT580/j3Jf+YTPX501ipZPdMwpNYdpcDVehQYcFty6wouqgjT3xEimR74pK2avR8m029A7mooSS8WIpqL9r1gq1r+uKdxE3/O7sH//FP5YmmDawr9sOaWhSipiFr7eON7eGN5wDDscxROOYPdEkNTQkc+zTGkIKsqgohypKMeqLMeqqMSqrHAHhfze9yCRwjJgp8Hr9bH0Jz8huGpy6nbrl/UQMzK4KvRgQRCOh4/z9Kk/c2DbIwR+/wznP9dLTTckPXC0GvoC4E1BTTes+PL/puElryjaORljePJgO3f+/gBPHGzPW2dbwh03bOAlq6qZX1qcNkhqxpm24KpQZxQ1H/wgLV/+cn9nOe4ZClVveyuVr389/nPP7S95b4u28fP9P+fbO79NOp0ibhKZCxI2VG/gorqLWLdgHevmr6O2pHZC56rOepPTW+DMfDip1JnS4Gq8Bg84HPBafOmGjTR1Rvnib/eRcgzV5XBufYAjLYZ7/vbSIdUFD3cf5oZf3JDXGNgWmzee+0aCdjAvQMoNlAotZ59I+hOGeWGYHzbM72FgPgzzMmnlUQpKC4SDEA65096gZKbQExR6g5n1mfmekHuj64zzSb4g+D1+gnYQv+32rJbtTS07H7Azadnthlkf8ATw2/4h8ztO76D36AEW9Fr0ltksWLV+xNK5iZrqEshxmnHBVbYEtW3/TpLdXezyNtPk7SN2+CDnPNvOZXscFrW7/1t956/Af8lF+O76KcQHqpdKIED1D+9l/jnri35+w5VMZ80r8bGyupQVNaWsrCllVWZaXxGYcDVTNa2mJLgqVNUvcfQoh173+ry2m8NpvPceAhdewK72XWw9sZWtJ7fyfPvzw25/19V3cVHdRWM+P6VGMeOqzyo1A838rthnGssSrllbx7k3belvh7V0fgnbjrXzkdfHufPJ/6a9YxNb9y1GxPCRH2/jry7wUjOvkyPhgxzoOsDutt15gRVAyqT47p7v4hEPQTtIwA4QtIMEPQEqU34aeoX5YR9VPTaV3UFKuxKUdsUIdkTwd/Rh9xXo2a6yHKmpxl5dg2MJicf+iCcnNnaAeV//EhUvfRmOcUibdH93yGmTJu2kSZokaSc9sOwk++ezXTRn1+cu7+/cz8/2389loXX44w49vhR/juzl8oWXUxWoIpaKEU/HiaVj/YOxhhPh/oFVc9eP1PXviHqAk+6YKyXeEvfzzHy2AU9g4DO2gwQ8AYLeYMH0vOXMe4PeIH7Lz6PHH+XmJ26e0nFXZnhA169QRxR7O/byzB9/wiNNfyBmGy7bY7hxDzQ2OxgRrE3rqfnA9ZRffTV2VZXb5mrFerpu/kx/aWTlZz9F5co1k3LOhXoI9dvCZ167jnAsxcHWXg609PKbXafoiiT7tynxeVhZkxt0lbGyppTFVUFsz8z726ipV6iEqvJ1ryX+wv4hgVXpVVfRu3Vrf3o4CM+t9nFX27386UcfoSvehSUWG6s3ctOmm1hRsYKPPvbRs6Z3RKXUzDEd9yTT0bRmMo931pdcQeEPeXfLQT629Sa2BNbS2dvGPqeLw7FWjNUL4t6oCRb1oUZWVC6irjXFkp88xcLTSUodL97rXklp/RKqwg6p5mZSzadJnm4mdfp0wTZMnuoFeGvrsOtqB6Z1ddi1mWlNDVZgoBF/7PBhjhRoj7T0/p8SWL58wp/JYGMZS2es0k46LxCLpWNDgrNYOsae9j18Z9d3hrz/ikVXUOYrc0v70lGiyWj/PrKlgLG0Oz9RgrCkfAllvjJ8Hh8+yx3ryOvx9pfI5Q4mmx0LKW/eGj7dtmyeOvUUt//5duJOfLSAbtpKrrIdUXTd/BmcWIyDS/08/ua1tBzazZpDCS7Yb2jozJ6lEHjXW1j0jnfjra0puC83SGvGV1Pb31vgZChUMl2oeq8xhva+BAdaeoe8TvcM/M/7PBbLFpSwsraUldWZwKu2lGULSvDbnrzjHmnv0+Edps+kDY6aLaGKHzrE4ev/ekivfp7qatIdHXlVAO3GRnjvm3ng519h6zlpXmgQjAXlvnKuWHQFWxZt4bKGy6jwVwBn0QC7arppydUsMJWBx3R890z1Mc/geFotcLwGf8g+y8e1y67lUNch9rY/TxL3B7K2CxbNX0Z941rqZB1NO6I0b2+luquNc2NtrDr1AvOj3VgM+jwty23QXFuLXVeHt64WuzYzratz06urC46BNJKpbo80HRluogGdMaY/6OqvhpmO5i+n3MAsmoxyoOsAPzvwsyH72VSziZAdIuEkiKfjJNIJEumceWdg2TEj94w4FiNc45QFV4NvJvsSvTS/4a3srE1wYoGwuB3OOWHwpt32iYNPrPqub7LgsivO9HSLanAPoeMNdHpiSQ4ODrpaeznWEekf/9kSaJwXcku7qkuJJtPc9+djJNIGvy189cZN2onG1Jq0hvp4vQTXrye+bx9OX9+QfSz+7n/Se/r4wIOIJX7+8K6NPBjfjsHQYM1jZckSdiWO8sUrvsgl9ZcUPBftvU9NAQ2uxmk6SljO5N7LGINjnP7aR9mB4/NqJmVqNeXWUjoePs6nnvgUCWfgoZHX8vKRCz/C/OB8HMetFZU26f4aUrm1ofrTcrdxBuZTTipvG8c4dMW6ePTEo3n3TxYWF9RegN/292+f3ZdjHByc/nPJXZ+3rUkX3CblpPLuK2HUe0sNrkYzOGMYY3jvQ+9lmVXNnr6DdBi3C7PFgXo2P3aKi55PsawFvGnAsvDU1ZJubsl7KtkTquBwaAEnSmtIeGx86SShZIzGt9zI+r+6kkXVZXgm4aZqqhuPTkfXy1MZ0BWjdC7lpAoGX0OCskxAtrd9L3ftvmvIfoZpW1H04KrQE3kgf/Bm2yZ6zmLYf5hg5vu2JwjBONR++MN0fP3OIWODTVYJ6kwSS6Y51NrHgdZeDjSH3WlLL4da+0g5Q79Xs9UKa8oC1Jb7qS4PUFPmp6bMT215gAWlfnz2mf1fa0nZEJPaxTRAyRVX0PfHP0JyoDpptv3g23Z+lPV2IzvCe2lyOvBa3v4f96wzLflXqohmfXA1FcGOMYaEkyCSjPDgkQf54tNfJOEk8Fk+3r3+3Wys2UjapEmmk/1BTNJJutNMWu60f52TP19o2pvoZXf7bkzOg3tBqA3VIiL5gVMmUMqmzRQe8WCJhW3ZWGLhEU9/msfykHJSdMQ6hryvsayRMl9Z/7bZ7S3cecuyBvYz3NQamt4SaeHBow8OOd4IbVq1zdVIcrsvL+1J8ZD3BDud45yKNNHTd5KrtztsPmyxqKKRkrY+nOZB/5yOg2/hQkKvfS3+ZcvwLVuOb9lSTh06QeLdf88+byN/rl3D8bIaevyl8ALwwlZ8tsXyBSWsqC5lebU7zc6X+M/8TzDVo55bYrGsYtmU3QxM9eCoxRgY1bZsbMsm5A2Nafs189bw/b3fHxLQTUXbikKln3X/61Okwz203H7HwAOEVIrwicO8sFKoChvWHHc7U5FAAO8Vl7NwceOQElT/0qWTfv7TLeD1cF5DOec15Hd9vXV/C2/7ztNDti8L2LSE4+xq6qG9N06B+It5JT434MoJvLLBV025n5qyANVlfgLe/CqIY6n6qM5MwcFRgfl//x4qr3993v9+7LMf5NaT/87xvhMc50T/tpX+Sv7xgn/kM09+RgfpVSpjuMBorAHT4AewfsvPxy7+GBfWXUg8HXdrpySj/bVWcpezTQf609KDOh5L5m9TqFZKwklw51/uHPd1e8TTf6/gtbwjTpNOMi+wAjAYllUsoyZUg23Z/fvzWB5ssfvn+48jg5Yz7/FYOeszy+3Rdm79060knYGHRj7Lxx1X3EFjWSOWZWFLTpCUE7xkj5EbPFlijdo51HAPtr/x8m9Myv3mke4jPHbisUm975qzJVeFnsgf6zlG60MP8OvffZM/LU9T3wkXnPCxeXecij4zEJqKELjwQmLbCw/iODiYOdIaJvzQQ3i/eGv/j2z7h2+hc8PFRJKGg629mVcfxzoipHPuquorAplgq4TlmaBrRU0JdeWj91amT6uLb4aXzhW15Gq4J/LgVvU7WA+PbLQ4VAdXHCvlza/4MN2f/kJeRxTV174aSyztfjdHoeEdAl6LB27a0t/TaCrt0N6XoKUnTks4Rks4TnOPO23pidMajtHcE6e1N573fZFVEfRmgjA/IZ/N7/Y25w2E7vMI33zbBaxtqKA84CXgHf0Hbrxm+PfPpA+OuvT+n/KU5xjN+//C0Y5D/CH9PEcTp/Fa3v7qJ1kBT4Afv/rHGIxW81MzyZSUXBUKloCCv31XNl7J7479jk9s/QRxJ47P8vGWNW+hsbyRrngXnbFOOmOddMQ7aO5r5kDXgTO5BGyx+zu2ynZ+1b+c2wlZzqsl0sJ9++4bsq+PXfQx1i1Yh9fjxRYbr8eLV7zucoGAaTz5vpjt3cdC21xpm6sRqzoNeSL/qVvY3vQMe//wc5adNixpzWxs23kBVFbj975Luq1tTG2aHMfw6N5mWvcdoCrSQ2eonOpzVvLSc2uH3GzEU2mOtUc42NqXF3QdauklHB84jxKfJxNs5QddS+eXEPB69Gn1HDKOgK6owVXfU09x7B3vHLLtqQ+/gX9N/JRwEF7zlOE1TzmUSIDKH96NF2tKOqKYzYqZNx3H0BFJ9AderZlgrDknKDveEaGtNzHifnwei/KgTXnAS1nQS3nApjzopTzg7U8vz6RXBL1D1uWWlBX7GsfzWYwjmJv0wVE7Ll7N9b/667wnvLbY3HPtPZzuO62dUajZYNKDq+FuZJdXLOfGX92Y17bHwmJx+WKO9hwddn9BO0iVv4qqQBWWWOxs2zlkm3evfzdr56/tD5z6exDOWfZa3nFf91QHOjB9wc5Ut/ecjgfb4zje7A+uROQa4GuAB/h3Y8wXhtt2uAweP3w4b5wRR0CM++kkPJC0oSTTRGTeu99N53/+55Cnkst+dn//mCVjeSI/0Ubzxhhaw3EOZIOtzPRgSy8nuwZ6vROBxVUh6isCPHO0Y8jT6jvfspnVtWUEfR5CPpug11O09l7T8aR6qo85w69xUkuuYl74z1d4eWijoVHmc9O9XTSeiCOBAOmb30fpVVexpHLpmZ7CWWWi3wfjcai1l2u/9hjx1MB3udcjfPyacwn4PHRHk/REU/TEkvREk/TEUplpJj2aJJEeuSMWn23lBVtej7DtaGde1UbbEv728qU0VAbxez0EvBZ+e2Dqty0C3vyp3/bg91r47ZFL1s4gmCvqTePgHi7bFni5+Y+3sLdj75Bt77r6Li6ovUA7o1CzQVHzSaESqqM9R4eMAypIf5W3wc6bdx7Pdwwd6+2LL/kiL138UoJ2sD/tbCjVyR5Xv0+m1ewOrkTEg9tS6RXACeBp4E3GmIKjKg6XwXOfyDsCLzTAX5YLizZcxsX/8TTeyMCTEruxkZqbPsCpm2+Zkl73zkQ0keZQ20CwdbC1l50nuznaPrRL90L8tkUoG2z5PIR8HgJeTybNQ9BrD8z3T21C3oG0gO1hx4kuvvLQPhIp0z9W0FVrarE9FrYleLIvkaLcSE710/Hpeho/jmMWNbjK7V79hXkxvvEam9NVwlvXvJXNCzbRc3gfFWGH7jKL+SvXTergzerMFeP/NpZM9wdc3SMFYpn0pq4oB1uH9pQ3EW6wlQm8BgVmxhh2HO/KC+YGV7UcpGg3jYNvqDzink/IGyKWiuU1HNdOKtQsM2n5xG/5uX719RzoOsDTp4e2Qb16ydU8cuyRIfnnP67+D97123eNKWA6W0p11LSb9cHVi4B/NcZcnVn+FwBjzOcLbT9ccNW+bycn3/w27rs4wX9faFHXAe972OZF3/g+9qHjQ6p3lL785SSPH59VbUaGe1r9iVetoSzgJZpIEUmkiSTSRJNpIpnlWDI9kJ5w06OJNJFMeiI18a7EwS1h80h+wOXxSH7aoIBscFoy5bD7VA+5/6KWwKbFlQR9xa+OFk2k2D7oBm4yjzfcMUe4aSxqcHW4+zAfePj9LJNqHgs/S5mnhIA3xLev+XeWlC/RH5BZZCpLyqBwuzK/Ldz/Py+nviJIPJUmlnQGpsk08ZRDbNA0b74/bdB7U2nawnH2NfcOOY/73nMJly4v2Ai5aDeNh7sP84ZfviHvZs8jHu699l6t/qdmu0nNJwAVvgp6k71Desr88at/zAudLwzb5mqs+UqDHTUFZn1vgQuB4znLJ4C8QUBE5D3AewAaGxsL7uR4RRLrY/+TU7u+wWufTHP9s174l/dxvCzOhle8gmWrVw8JpKay171iWDq/hK/euKnopSyptEM06QZe0ZxAbNvRDm57YGgVmHdctoTFVSHSjiFtDI5jSDkD07QxpNOZqeO+HGNIDUrLW5eZ70glGBz7Owa3bVqRG+eDu9/BfQdM5vGGO2Ys6dASjg33RH7MRssrrZFWjvYe4yjHAOhO99Kd7qUt2tbfK6Q+gZ8dLEtYXl064f+ZsVo6v4SvvOH8Id8/a+rKJyWoG66TkJqywAjvGpux5JPBN4xp4w6EPpW9mSo1nc4knwB87WVfoz3WPiRYaixvpLG8sWD+GU++mupejJUai5kWXBX6Vc679TTGfAv4FrhPTwrtpDI4j/d7/ou3b/lb5vdZ7H2j4Z7un/P14FWzMpAqxLKEa9bWce5NW4r6tNr2WJR5LMoC+Y09q0JevvLQC0Nubt7xoqWTdkM33A3VN996waQcc6qPN9Ixi3HTOFpeqQnVEPAEpqUbeDW7Tdb3z3CGC+aWzi+Z8L4nkk/0xk6dLc40n8wLzmNT7aZhg6VC+UfzlZrtZtojthPA4pzlRUDTeHfSWN7ITRd8kDuav8eHur/NF09/l5su+OCcG1Mk+7T60uULWF5dOqnVgLI3NwGv+y9TzJubmXLMs+Eac2XH9Qp43EBOx95R4zGV3z/ZYO6Bm7Zw33su4YGbtkxZz6iaT5Qa3Uj5JBssXVR3EcsqlmnprprzZlqbKxu3Q4uXAydxO7R4szFmd6HtR+oOVOvhFt9Ut+uYjmPO8Gssapsr0Hyi5qxJ6QVN84maYzSfKDW62d3myhiTEpH3A7/F7Yr9ruECq9FosXLxTXW7juk45tlwjXnH1nyi1Kg0nyg1Os0nSrlmVHAFYIx5AHhgus9DKaWUUkoppcZDy2uVUkoppZRSqgg0uFJKKaWUUkqpIphRHVqMl4i0AkdH2WwB0DYFpzOd9BrnhtGusc0Yc82Z7HgMeUU/37lBr9F1RnlF8wmg1zhXaD6ZXHqNc8Ok5JNZHVyNhYg8Y4y5cLrPYzLpNc4N03mN+vnODXqNc/fYU0WvcW7QfDK59Brnhsm6Rq0WqJRSSimllFJFoMGVUkoppZRSShXB2RBcfWu6T2AK6DXODdN5jfr5zg16jXP32FNFr3Fu0HwyufQa54ZJucY53+ZKKaWUUkoppabC2VBypZRSSimllFKTToMrpZRSSimllCqCORtcicg1IrJPRA6IyMen+3yKRUTuEpEWEdmVkzZPRB4Skf2ZadV0nuNEiMhiEfm9iOwRkd0i8sFM+ly6xoCI/file/pK5xk9n0qflGudiXtF8MieuUfPJJJvr+QQ0r0z1NWo+mZ00nxT3GudkcCUiHuBO4FrgPOBNInLe9J5V0dwNDB7M7OPAI8aYVcAjmeXZKgV8xBizBrgUeF/mbzeXrjEOXGmM2QicD1wjIpcyDdc4h/PK3Wg+me3XqPlk8t3N3M4noHllyq5R88mspvmkiNc4J4Mr4GLggDHmkDEmAdwHvHaaz6kojDGPAR2Dkl8L3JOZvwd43VSeUzEZY04ZY57NzIeBPcBC5tY1GmNMb2bRm3kZpuca52Re0XwCzP5r1HwyyeZ6PgHNK0ztNWo+maU0nxT3GudqcLUQOJ6zfCKTNlfVGmNOgZtBgJppPp+iEJGlwCbgKebYNYqIR0R2AC3AQ8aY6brGsymvzKn/oSzNJ5pPimxO/Q/l0rwy6deo+WQO0Hwy8Wucq8GVFEjTPudnEREpBX4KfMgY0zPd51Nsxpi0MeZ8YBFwsYism6ZT0bwyi2k+mTKaT2Y5zStTQvPJLKf5pDjmanB1Alics7wIaJqmc5kKzSJSD5CZtkzz+UyIiHhxM/f3jDH3Z5Ln1DVmGWO6gEdx63NPxzWeTXllTv0PaT7RfDJJ5tz/kOaVKbtGzSezmOaT4l3jXA2ungZWicgyEfEBbwR+Mc3nNJl+AbwjM/8O4L+m8VwmREQE+A6wxxjzlZxVc+kaq0WkMjMfBK4C9jI913g25ZW59D+k+cSl+aT45sz/EGheYWqvUfPJLKX5pMjXaIyZky/gVcALwEHgk9N9PkW8rh8Ap4Ak7lOivwPm4/Zwsj8znTfd5zmB63sxbjWC54Admder5tg1bgC2Z65xF/CpTPq0XONczCuaT+bENWo+mfxrmtP5JHONmlem8Bo1n8zOl+aT4l6jZHaslFJKKaWUUmoC5mq1QKWUUkoppZSaUhpcKaWUUkoppVQRaHCllFJKKaWUUkWgwZVSSimllFJKFYEGV0oppZRSSilVBBpcKQBEpFJE/mdmvkFEfjLd56TUTKR5RanRaT5RanSaT+Ym7YpdASAiS4FfGWPWTfe5KDWTaV5RanSaT5QaneaTucme7hNQM8YXgBUisgN3ILU1xph1IvJO4HWAB1gHfBnwAW8D4sCrjDEdIrICuBOoBiLAu40xe6f6IpSaAppXlBqd5hOlRqf5ZA7SaoEq6+PAQWPM+cA/D1q3DngzcDHwOSBijNkEPAm8PbPNt4APGGMuAP4J+D9TcdJKTQPNK0qNTvOJUqPTfDIHacmVGovfG2PCQFhEuoFfZtJ3AhtEpBS4DPixiGTf45/601Rq2mleUWp0mk+UGp3mk1lKgys1FvGceSdn2cH9H7KArsyTF6XOZppXlBqd5hOlRqf5ZJbSaoEqKwyUnckbjTE9wGERuQFAXBuLeXJKzSCaV5QaneYTpUan+WQO0uBKAWCMaQeeEJFdwB1nsIu3AH8nIn8BdgOvLeb5KTVTaF5RanSaT5QaneaTuUm7YldKKaWUUkqpItCSK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKzQgi8oCIVE73eSillFJnSowx030OSimllFJKKTXracmVUkqpMROREhH5tYj8RUR2iciNInJERG4XkT9nXisz21aLyE9F5OnM6/JMeqmI/IeI7BSR50TkrzPpR0RkQWb+rZl97RCR/ycinszr7sxxd4rIP07fJ6GUUkoNZU/3CSillJpVrgGajDF/BSAiFcDtQI8x5mIReTvwb8B1wNeArxpjHheRRuC3wBrgFqDbGLM+s4+q3AOIyBrgRuByY0xSRP4P8BZgN7DQGLMus13lZF+sUkopNR4aXCmllBqPncCXROR24FfGmK0iAvCDzPofAF/NzF8FnJdZD1AuImWZ9DdmE40xnYOO8XLgAuDpzHuDQAvwS2C5iHwd+DXwYHEvTSmllJoYDa6UUkqNmTHmBRG5AHgV8HkRyQY4uQ14s/MW8CJjTDR3H+JGTCM1+BXgHmPMvwxZIbIRuBp4H/AG4G/P6EKUUkqpSaBtrpRSSo2ZiDQAEWPMd4EvAZszq27MmT6ZmX8QeH/Oe88fJj2vWiDwCPA3IlKTWT9PRJZk2mNZxpif4lYt3IxSSik1g2jJlVJKqfFYD9whIg6QBP4B+AngF5GncB/avSmz7U3AnSLyHO7vzWPAe4HPZtJ3AWng08D92QMYY54XkZuBB0XEyhznfUAU+I9MGsCQki2llFJqOmlX7EoppSZERI4AFxpj2qb7XJRSSqnppNUClVJKKaWUUqoItORKKaWUUkoppYpAS66UUkoppZRSqgg0uFJKKaWUUkqpItDgSimllFJKKaWKQIMrpZRSSimllCoCDa6UUmoOE5G0iOwQkV0i8mMRCWXSa0Xk+yJySES2iciTIvL6zLqXiogRkb/L2c+mTNo/ZZbvFpHDmX3vEJE/Ts8VTh8RqROR+0TkoIg8LyIPiMhqEYnmfC47ROTtIlKW2W5V5r1eEdkpIpdM93UopZQqHh1EWCmlZohwLNm451T41uaeWENdeeDUufVlN5cFvMcmuNuoMeZ8ABH5HvBeEfkq8HPgHmPMmzPrlgCvyXnfTuBG4DuZ5TcCfxm07382xvxkguc36cKJcOMLnS/c2hppbagJ1ZxaVbXq5jJf2YQ+VxER4Ge4n+EbM2nnA7XAwexnPug9/wLcCbwS+Cfgj8aYpyZyHkoppWYWDa6UUmoGCMeSjb/ZefrhT/1i16pY0iHgtfjMa9Zdeu36uquKEGBlbQU2AFcCCWPMN7MrjDFHga/nbHsMKBeRWqAFuAZ4oEjnMWXCiXDjw0cffvi2p25bFUvHCHgCfOKST1x61ZKrrppggPUyIDnoM9whIkuHe4Mx5kci8rci8lHgvcCmCRxfKaXUDKTVApVSagbYcyp8azawAoglHT71i12r9pwK31qM/YuIDVyLWyK1Fnh2DG/7CXADcFlm+/ig9XfkVH37XjHOs9he6Hzh1mxgBRBLx7jtqdtWvdD5wkQ/13XAtmHWrRhULXBLzroPAbcDnzXGdEzwHJRSSs0wWnKllFIzQHNPrCEbWGXFkg4tPbGGCe46KCI7MvNbcav5vTd3AxG5E3gxbmnWRTmrfgT8EDgX+AFukJVrxlcLbI20NmQDq6xYOkZrpHWin+tIClYLzLgGOIUbnCmllJpjtORKKaVmgLrywKmAN/8rOeC1qCkPNE1w11FjzPmZ1weMMQlgN7A5u4Ex5n3Ay4Hq3DcaY04DSeAVwCMTPI9pUROqORXwBPLSAp4A1aHqiX6uu4ELxvMGEWkAbgIuBl4lIhsmeA5KKaVmGA2ulFJqBji3vuzmz7xm3f5sgJVpc7V/TX3ZLZNwuN8BARH5h5y00DDbfgr4mDEmPQnnMelWVa26+ROXfGJ/NsDKtLnav7pq9UQ/198BfhF5dzZBRC4Clozwnq8CtxljTgAfBu7MdIyhlFJqjhBjzHSfg1JKKQZ6C2zpiTXUlAea1tSX3TLRzixEpNcYU1ogvR73Zv8SoBXoA75pjPmhiLwU+CdjzHWD3vOvQK8x5ksicjdwBdCds8nFmZKxGSW3t8DqUHXT6qrVt0y0t0DoL4n6N9wSrBhwBLdN1XPAvpxN7wL2AJ8BLjOZH14R+QXwU2PMPRM9F6WUUjODBldKKaWUUkopVQRaLVAppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJqDhORc0RkR86rR0Q+NMy2XxORkyJi5aS9U0RaRWS7iOwXkd+KyGWD3vdPIrJXRHaJyF9E5O0566pFJCkifz9pFzkNRCSd+Tx3iciPRSSUSa8Vke+LyCER2SYiT4rI66f7fJVSSk0NDa6UUmqmiPU0cvSP97Dr/oc4+uS9xHoaJ7pLY8w+Y8z5xpjzcQe7jQA/G7xdJqB6PXAceMmg1T80xmwyxqwCvgDcLyJrMu97L/AK3AGE12XeKznvvQH4E/CmiV7LmUqHw42RZ565p+eBBx6KbNt2bzocnvDnCkQzn+s6IAG8V0QE+DnwmDFmuTHmAuCNwKIiHE8ppdQsYE/3CSillMINrPb818M88M+rSEbBG4RX3XEpa157FYHyY0U6ysuBg8aYowXWvQzYBfwQNxB6tNAOjDG/F5FvAe8B/hH4BPAyY0xPZn03cE/OW94EfAT4vogsNMacLNK1jEk6HG4MP/jgw6dv/ewqE4shgQB1t9x8adkrX3mVp6ysWJ/rVmADcCWQMMZ8M7si81l/vUjHUUopNcNpyZVSSs0Ezbtu7Q+sAJJReOCfV9G869YiHuWNwA+GWfemzLqfAdeJiHeE/TwLnCsiZUCZMeZgoY1EZDFQZ4z5M/Aj4MYzPvMzFN+379ZsYAVgYjFO3/rZVfF9+4ryuYqIDVwL7ATW4n42SimlzlIaXCml1EwQPt3QH1hlJaNuehGIiA94DfDjYda9Cvh5pgTqKeCVI+0uZ2pG2O6NuEEVwH1MQ9XAVEtLQzawyjKxGKmW1ol+rkER2QE8AxwDvjN4AxG5M9MG7ekJHksppdQsodUClVJqJiirP4U3SF6A5Q1CWV1TkY5wLfCsMaY5U6L0y0z6N4EmoALY6TYbIoTbNuvXw+xrE7DHGNMjIn0istwYc6jAdm8CakXkLZnlBhFZZYzZX6RrGpVdW3tKAgFyAywJBLBrqif6uUYz7dgG9iuyG/jr7LIx5n0isgA3AFNKKXUW0JIrpZSaCWrX3syr7tiPN+guu22u9lO77pYiHSFb7Q9jzPFsJxeZ9kFvAv6HMWapMWYpsAx4ZbYHvFwicgVue6tvZ5I+D9wpIuWZ9eUi8h4ROQcoMcYszNnv53FLs6aMf/Xqm+tuuXm/BALu+bttrvb7zzmnWJ9rrt8BARH5h5y0IZ+hUkqpuUuMGalGh1JKqSkT62mkedethE83UFbXRO26W4rRmUUmSDoOLM90ODF43QlgabZTikz6/bidWwSBO4CTuIHCYeAzxpgnMtsJ8M/A3wHJzOvLwEogYIz5eM4+NwD3GWPOm+g1jUc6HG6M79t3a6qltcGuqW7yn3POLRPtzEJEeo0xpQXS64GvApcArUAf8E1jzA8ncjyllFKzgwZXSimllFJKKVUEWi1QKaWUUkoppYpAgyullFJKKaWUKgINrpRSSimllFKqCDS4UkoppZRSSqki0OBKKaWUUkoppYpAgyullFJKKaWUKgINrpRSSimllFKqCDS4UkoppZRSSqki0OBKKaWUUkoppYpAgyullFJKKaWUKgINrpRSSimllFKqCP4/TwLWrAvIo1wAAAAASUVORK5CYII=\n", "text/plain": [ "
" ] @@ -111,7 +111,7 @@ " * @author Feross Aboukhadijeh \n", " * @license MIT\n", " */\n", - "\"use strict\";var e=t(\"base64-js\"),n=t(\"ieee754\");r.Buffer=a,r.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},r.INSPECT_MAX_BYTES=50;function i(t){if(t>2147483647)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"');var e=new Uint8Array(t);return e.__proto__=a.prototype,e}function a(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 l(t)}return o(t,e,r)}function o(t,e,r){if(\"string\"==typeof t)return function(t,e){\"string\"==typeof e&&\"\"!==e||(e=\"utf8\");if(!a.isEncoding(e))throw new TypeError(\"Unknown encoding: \"+e);var r=0|f(t,e),n=i(r),o=n.write(t,e);o!==r&&(n=n.slice(0,o));return n}(t,e);if(ArrayBuffer.isView(t))return c(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(B(t,ArrayBuffer)||t&&B(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength=2147483647)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+2147483647..toString(16)+\" bytes\");return 0|t}function f(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||B(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 D(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return R(t).length;default:if(i)return n?-1:D(t).length;e=(\"\"+e).toLowerCase(),i=!0}}function h(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 M(this,e,r);case\"utf8\":case\"utf-8\":return T(this,e,r);case\"ascii\":return k(this,e,r);case\"latin1\":case\"binary\":return A(this,e,r);case\"base64\":return w(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return S(this,e,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),n=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(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),N(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=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:g(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):g(t,[e],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function g(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;as&&(r=s-l),a=r;a>=0;a--){for(var f=!0,h=0;hi&&(n=i):n=i;var a=e.length;n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function w(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?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<=4096)return String.fromCharCode.apply(String,t);var r=\"\",n=0;for(;ne&&(t+=\" ... \"),\"\"},a.prototype.compare=function(t,e,r,n,i){if(B(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.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 o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),l=Math.min(o,s),c=this.slice(n,i),u=t.slice(e,r),f=0;f>>=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 v(this,t,e,r);case\"ascii\":return y(this,t,e,r);case\"latin1\":case\"binary\":return x(this,t,e,r);case\"base64\":return b(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return _(this,t,e,r);default:if(a)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};function k(t,e,r){var n=\"\";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i=\"\",a=e;ar)throw new RangeError(\"Trying to access beyond buffer length\")}function L(t,e,r,n,i,o){if(!a.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError(\"Index out of range\")}function C(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 P(t,e,r,i,a){return e=+e,r>>>=0,a||C(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function I(t,e,r,i,a){return e=+e,r>>>=0,a||C(t,0,r,8),n.write(t,e,r,i,52,8),r+8}a.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>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||E(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},a.prototype.readInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,n)||L(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},a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(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},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return I(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return I(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.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=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=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},a.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&&!a.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>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),\"number\"==typeof t)for(o=e;o55295&&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 R(t){return e.toByteArray(function(t){if((t=(t=t.split(\"=\")[0]).trim().replace(O,\"\")).length<2)return\"\";for(;t.length%4!=0;)t+=\"=\";return t}(t))}function F(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function B(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function N(t){return t!=t}}).call(this)}).call(this,t(\"buffer\").Buffer)},{\"base64-js\":79,buffer:85,ieee754:230}],86:[function(t,e,r){e.exports=function(t,e,r){return er?r:t:te?e:t}},{}],87:[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:86}],88:[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]}},{}],89:[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:86,\"color-rgba\":91,dtype:127}],90:[function(t,e,r){(function(r){(function(){\"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=(p=t.slice(1)).length;c=1,u<=4?(l=[parseInt(p[0]+p[0],16),parseInt(p[1]+p[1],16),parseInt(p[2]+p[2],16)],4===u&&(c=parseInt(p[3]+p[3],16)/255)):(l=[parseInt(p[0]+p[1],16),parseInt(p[2]+p[3],16),parseInt(p[4]+p[5],16)],8===u&&(c=parseInt(p[6]+p[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 f=e[1],h=\"rgb\"===f,p=f.replace(/a$/,\"\");s=p;u=\"cmyk\"===p?4:\"gray\"===p?1:3;l=e[2].trim().split(/\\s*,\\s*/).map((function(t,e){if(/%$/.test(t))return e===u?parseFloat(t)/100:\"rgb\"===p?255*parseFloat(t)/100:parseFloat(t);if(\"h\"===p[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)})),f===p&&l.push(1),c=h||void 0===l[u]?1:l[u],l=l.slice(0,u)}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)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"color-name\":88,defined:124,\"is-plain-obj\":236}],91:[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:86,\"color-parse\":90,\"color-space/hsl\":92}],92:[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\":93}],93:[function(t,e,r){\"use strict\";e.exports={name:\"rgb\",min:[0,0,0],max:[255,255,255],channel:[\"red\",\"green\",\"blue\"],alias:[\"RGB\"]}},{}],94:[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\"}},{}],95:[function(t,e,r){e.exports=[\"xx-small\",\"x-small\",\"small\",\"medium\",\"large\",\"x-large\",\"xx-large\",\"larger\",\"smaller\"]},{}],96:[function(t,e,r){e.exports=[\"normal\",\"condensed\",\"semi-condensed\",\"extra-condensed\",\"ultra-condensed\",\"expanded\",\"semi-expanded\",\"extra-expanded\",\"ultra-expanded\"]},{}],97:[function(t,e,r){e.exports=[\"normal\",\"italic\",\"oblique\"]},{}],98:[function(t,e,r){e.exports=[\"normal\",\"bold\",\"bolder\",\"lighter\",\"100\",\"200\",\"300\",\"400\",\"500\",\"600\",\"700\",\"800\",\"900\"]},{}],99:[function(t,e,r){\"use strict\";e.exports={parse:t(\"./parse\"),stringify:t(\"./stringify\")}},{\"./parse\":101,\"./stringify\":102}],100:[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\":95}],101:[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\":100,\"css-font-stretch-keywords\":96,\"css-font-style-keywords\":97,\"css-font-weight-keywords\":98,\"css-global-keywords\":103,\"css-system-font-keywords\":104,\"string-split-by\":305,unquote:328}],102:[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;re?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>>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>>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(;++o1)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=r)for(n=i=r;++or&&(n=r),i=r)for(n=i=r;++or&&(n=r),i=0?(a>=v?10:a>=y?5:a>=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=v?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>=v?i*=10:a>=y?i*=5:a>=x&&(i*=2),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 k(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a=r)for(n=r;++ar&&(n=r)}else for(;++a=r)for(n=r;++ar&&(n=r);return n}function A(t){if(!(i=t.length))return[];for(var e=-1,r=k(t,M),n=new Array(r);++et?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;af;)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=r)for(n=r;++an&&(n=r)}else for(;++a=r)for(n=r;++an&&(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=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r},t.min=k,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);r0)return[t];if((n=e0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s=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(),m=a();++hl.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})}))},{}],109:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(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,8})$/,l=new RegExp(\"^rgb\\\\(\"+[i,i,i]+\"\\\\)$\"),c=new RegExp(\"^rgb\\\\(\"+[o,o,o]+\"\\\\)$\"),u=new RegExp(\"^rgba\\\\(\"+[i,i,i,a]+\"\\\\)$\"),f=new RegExp(\"^rgba\\\\(\"+[o,o,o,a]+\"\\\\)$\"),h=new RegExp(\"^hsl\\\\(\"+[a,o,o]+\"\\\\)$\"),p=new RegExp(\"^hsla\\\\(\"+[a,o,o,a]+\"\\\\)$\"),d={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 g(){return this.rgb().formatHex()}function m(){return this.rgb().formatRgb()}function v(t){var e,r;return t=(t+\"\").trim().toLowerCase(),(e=s.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?y(e):3===r?new w(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?x(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?x(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=l.exec(t))?new w(e[1],e[2],e[3],1):(e=c.exec(t))?new w(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=u.exec(t))?x(e[1],e[2],e[3],e[4]):(e=f.exec(t))?x(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=h.exec(t))?M(e[1],e[2]/100,e[3]/100,1):(e=p.exec(t))?M(e[1],e[2]/100,e[3]/100,e[4]):d.hasOwnProperty(t)?y(d[t]):\"transparent\"===t?new w(NaN,NaN,NaN,0):null}function y(t){return new w(t>>16&255,t>>8&255,255&t,1)}function x(t,e,r,n){return n<=0&&(t=e=r=NaN),new w(t,e,r,n)}function b(t){return t instanceof n||(t=v(t)),t?new w((t=t.rgb()).r,t.g,t.b,t.opacity):new w}function _(t,e,r,n){return 1===arguments.length?b(t):new w(t,e,r,null==n?1:n)}function w(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function T(){return\"#\"+A(this.r)+A(this.g)+A(this.b)}function k(){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+\")\")}function A(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?\"0\":\"\")+t.toString(16)}function M(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new L(t,e,r,n)}function S(t){if(t instanceof L)return new L(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=v(t)),!t)return new L;if(t instanceof L)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*(r0&&c<1?0:s,new L(s,l,c,t.opacity)}function E(t,e,r,n){return 1===arguments.length?S(t):new L(t,e,r,null==n?1:n)}function L(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function C(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,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:g,formatHex:g,formatHsl:function(){return S(this).formatHsl()},formatRgb:m,toString:m}),e(w,_,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new w(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new w(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:T,formatHex:T,formatRgb:k,toString:k})),e(L,E,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new L(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new L(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 w(C(t>=240?t-240:t+120,i,n),C(t,i,n),C(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},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?\"hsl(\":\"hsla(\")+(this.h||0)+\", \"+100*(this.s||0)+\"%, \"+100*(this.l||0)+\"%\"+(1===t?\")\":\", \"+t+\")\")}}));var P=Math.PI/180,I=180/Math.PI,O=6/29,z=3*O*O;function D(t){if(t instanceof F)return new F(t.l,t.a,t.b,t.opacity);if(t instanceof q)return G(t);t instanceof w||(t=b(t));var e,r,n=U(t.r),i=U(t.g),a=U(t.b),o=B((.2225045*n+.7168786*i+.0606169*a)/1);return n===i&&i===a?e=r=o:(e=B((.4360747*n+.3850649*i+.1430804*a)/.96422),r=B((.0139322*n+.0971045*i+.7141733*a)/.82521)),new F(116*o-16,500*(e-o),200*(o-r),t.opacity)}function R(t,e,r,n){return 1===arguments.length?D(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 B(t){return t>.008856451679035631?Math.pow(t,1/3):t/z+4/29}function N(t){return t>O?t*t*t:z*(t-4/29)}function j(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 V(t){if(t instanceof q)return new q(t.h,t.c,t.l,t.opacity);if(t instanceof F||(t=D(t)),0===t.a&&0===t.b)return new q(NaN,0=0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);return{type:t,name:r}}))}function a(t,e){for(var r,n=0,i=t.length;n0)for(var r,n,i=new Array(r),a=0;ah+c||np+c||au.index){var f=h-s.x-s.vx,m=p-s.y-s.vy,v=f*f+m*m;vt.r&&(t.r=t[e].r)}function h(){if(r){var e,i,a=r.length;for(n=new Array(a),e=0;e=c)){(t.data!==r||t.next)&&(0===f&&(d+=(f=o())*f),0===h&&(d+=(h=o())*h),d1?(null==r?u.remove(t):u.set(t,v(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;c1?(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;a1?n[0]+n.slice(2):n,+t.slice(r+1)]}function r(t){return(t=e(Math.abs(t)))?t[1]:NaN}var n,i=/^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;function a(t){if(!(e=i.exec(t)))throw new Error(\"invalid format: \"+t);var e;return new o({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function o(t){this.fill=void 0===t.fill?\" \":t.fill+\"\",this.align=void 0===t.align?\">\":t.align+\"\",this.sign=void 0===t.sign?\"-\":t.sign+\"\",this.symbol=void 0===t.symbol?\"\":t.symbol+\"\",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?\"\":t.type+\"\"}function s(t,r){var n=e(t,r);if(!n)return t+\"\";var i=n[0],a=n[1];return a<0?\"0.\"+new Array(-a).join(\"0\")+i:i.length>a+1?i.slice(0,a+1)+\".\"+i.slice(a+1):i+new Array(a-i.length+2).join(\"0\")}a.prototype=o.prototype,o.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\"0\":\"\")+(void 0===this.width?\"\":Math.max(1,0|this.width))+(this.comma?\",\":\"\")+(void 0===this.precision?\"\":\".\"+Math.max(0,0|this.precision))+(this.trim?\"~\":\"\")+this.type};var l={\"%\":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+\"\"},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString(\"en\").replace(/,/g,\"\"):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return s(100*t,e)},r:s,s:function(t,r){var i=e(t,r);if(!i)return t+\"\";var a=i[0],o=i[1],s=o-(n=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+new Array(s-l+1).join(\"0\"):s>0?a.slice(0,s)+\".\"+a.slice(s):\"0.\"+new Array(1-s).join(\"0\")+e(t,Math.max(0,r+s-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function c(t){return t}var u,f=Array.prototype.map,h=[\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\\xb5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];function p(t){var e,i,o=void 0===t.grouping||void 0===t.thousands?c:(e=f.call(t.grouping,Number),i=t.thousands+\"\",function(t,r){for(var n=t.length,a=[],o=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(t.substring(n-=s,n+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(i)}),s=void 0===t.currency?\"\":t.currency[0]+\"\",u=void 0===t.currency?\"\":t.currency[1]+\"\",p=void 0===t.decimal?\".\":t.decimal+\"\",d=void 0===t.numerals?c:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(f.call(t.numerals,String)),g=void 0===t.percent?\"%\":t.percent+\"\",m=void 0===t.minus?\"-\":t.minus+\"\",v=void 0===t.nan?\"NaN\":t.nan+\"\";function y(t){var e=(t=a(t)).fill,r=t.align,i=t.sign,c=t.symbol,f=t.zero,y=t.width,x=t.comma,b=t.precision,_=t.trim,w=t.type;\"n\"===w?(x=!0,w=\"g\"):l[w]||(void 0===b&&(b=12),_=!0,w=\"g\"),(f||\"0\"===e&&\"=\"===r)&&(f=!0,e=\"0\",r=\"=\");var T=\"$\"===c?s:\"#\"===c&&/[boxX]/.test(w)?\"0\"+w.toLowerCase():\"\",k=\"$\"===c?u:/[%p]/.test(w)?g:\"\",A=l[w],M=/[defgprs%]/.test(w);function S(t){var a,s,l,c=T,u=k;if(\"c\"===w)u=A(t)+u,t=\"\";else{var g=(t=+t)<0||1/t<0;if(t=isNaN(t)?v:A(Math.abs(t),b),_&&(t=function(t){t:for(var e,r=t.length,n=1,i=-1;n0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),g&&0==+t&&\"+\"!==i&&(g=!1),c=(g?\"(\"===i?i:m:\"-\"===i||\"(\"===i?\"\":i)+c,u=(\"s\"===w?h[8+n/3]:\"\")+u+(g&&\"(\"===i?\")\":\"\"),M)for(a=-1,s=t.length;++a(l=t.charCodeAt(a))||l>57){u=(46===l?p+t.slice(a+1):t.slice(a))+u,t=t.slice(0,a);break}}x&&!f&&(t=o(t,1/0));var S=c.length+t.length+u.length,E=S>1)+c+t+u+E.slice(S);break;default:t=E+c+t+u}return d(t)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return t+\"\"},S}return{format:y,formatPrefix:function(t,e){var n=y(((t=a(t)).type=\"f\",t)),i=3*Math.max(-8,Math.min(8,Math.floor(r(e)/3))),o=Math.pow(10,-i),s=h[8+i/3];return function(t){return n(o*t)+s}}}}function d(e){return u=p(e),t.format=u.format,t.formatPrefix=u.formatPrefix,u}d({decimal:\".\",thousands:\",\",grouping:[3],currency:[\"$\",\"\"],minus:\"-\"}),t.FormatSpecifier=o,t.formatDefaultLocale=d,t.formatLocale=p,t.formatSpecifier=a,t.precisionFixed=function(t){return Math.max(0,-r(Math.abs(t)))},t.precisionPrefix=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(r(e)/3)))-r(Math.abs(t)))},t.precisionRound=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,r(e)-r(t))+1},Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],113:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-geo\"),t(\"d3-array\")):i(n.d3=n.d3||{},n.d3,n.d3)}(this,(function(t,e,r){\"use strict\";var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,c=Math.log,u=Math.max,f=Math.min,h=Math.pow,p=Math.round,d=Math.sign||function(t){return t>0?1:t<0?-1:0},g=Math.sin,m=Math.tan,v=1e-6,y=Math.PI,x=y/2,b=y/4,_=Math.SQRT1_2,w=L(2),T=L(y),k=2*y,A=180/y,M=y/180;function S(t){return t>1?x:t<-1?-x:Math.asin(t)}function E(t){return t>1?0:t<-1?y:Math.acos(t)}function L(t){return t>0?Math.sqrt(t):0}function C(t){return(s(t)-s(-t))/2}function P(t){return(s(t)+s(-t))/2}function I(t){var e=m(t/2),r=2*c(o(t/2))/(e*e);function i(t,e){var n=o(t),i=o(e),a=g(e),s=i*n,l=-((1-s?c((1+s)/2)/(1-s):-.5)+r/(1+s));return[l*i*g(t),l*a]}return i.invert=function(e,i){var s,l=L(e*e+i*i),u=-t/2,f=50;if(!l)return[0,0];do{var h=u/2,p=o(h),d=g(h),m=d/p,y=-c(n(p));u-=s=(2/m*y-r*m-l)/(-y/(d*d)+1-r/(2*p*p))*(p<0?.7:1)}while(n(s)>v&&--f>0);var x=g(u);return[a(e*x,l*o(u)),S(i*x/l)]},i}function O(t,e){var r=o(e),n=function(t){return t?t/Math.sin(t):1}(E(r*o(t/=2)));return[2*r*g(t)*n,g(e)*n]}function z(t){var e=g(t),r=o(t),i=t>=0?1:-1,s=m(i*t),l=(1+e-r)/2;function c(t,n){var c=o(n),u=o(t/=2);return[(1+c)*g(t),(i*n>-a(u,s)-.001?0:10*-i)+l+g(n)*r-(1+c)*e*u]}return c.invert=function(t,c){var u=0,f=0,h=50;do{var p=o(u),d=g(u),m=o(f),y=g(f),x=1+m,b=x*d-t,_=l+y*r-x*e*p-c,w=x*p/2,T=-d*y,k=e*x*d/2,A=r*m+e*p*y,M=T*k-A*w,S=(_*T-b*A)/M/2,E=(b*k-_*w)/M;n(E)>2&&(E/=2),u-=S,f-=E}while((n(S)>v||n(E)>v)&&--h>0);return i*f>-a(o(u),s)-.001?[2*u,f]:null},c}function D(t,e){var r=m(e/2),n=L(1-r*r),i=1+n*o(t/=2),a=g(t)*n/i,s=r/i,l=a*a,c=s*s;return[4/3*a*(3+l-3*c),4/3*s*(3+3*l-c)]}O.invert=function(t,e){if(!(t*t+4*e*e>y*y+v)){var r=t,i=e,a=25;do{var s,l=g(r),c=g(r/2),u=o(r/2),f=g(i),h=o(i),p=g(2*i),d=f*f,m=h*h,x=c*c,b=1-m*u*u,_=b?E(h*u)*L(s=1/b):s=0,w=2*_*h*c-t,T=_*f-e,k=s*(m*x+_*h*u*d),A=s*(.5*l*p-2*_*f*c),M=.25*s*(p*c-_*f*m*l),S=s*(d*u+_*x*h),C=A*M-S*k;if(!C)break;var P=(T*A-w*S)/C,I=(w*M-T*k)/C;r-=P,i-=I}while((n(P)>v||n(I)>v)&&--a>0);return[r,i]}},D.invert=function(t,e){if(e*=3/8,!(t*=3/8)&&n(e)>1)return null;var r=1+t*t+e*e,i=L((r-L(r*r-4*e*e))/2),s=S(i)/3,l=i?function(t){return c(t+L(t*t-1))}(n(e/i))/3:function(t){return c(t+L(t*t+1))}(n(t))/3,u=o(s),f=P(l),h=f*f-u*u;return[2*d(t)*a(C(l)*u,.25-h),2*d(e)*a(f*g(s),.25+h)]};var R=L(8),F=c(1+w);function B(t,e){var r=n(e);return rx){var l=a(s[1],s[0]),c=L(s[0]*s[0]+s[1]*s[1]),u=r*p((l-x)/r)+x,f=a(g(l-=u),2-o(l));l=u+S(y/c*g(f))-f,s[0]=c*o(l),s[1]=c*g(l)}return s}return s.invert=function(t,n){var s=L(t*t+n*n);if(s>x){var l=a(n,t),c=r*p((l-x)/r)+x,u=l>c?-1:1,f=s*o(c-l),h=1/m(u*E((f-y)/L(y*(y-2*f)+s*s)));l=c+2*i((h+u*L(h*h-3))/3),t=s*o(l),n=s*g(l)}return e.geoAzimuthalEquidistantRaw.invert(t,n)},s}function j(t,r){if(arguments.length<2&&(r=t),1===r)return e.geoAzimuthalEqualAreaRaw;if(r===1/0)return U;function n(n,i){var a=e.geoAzimuthalEqualAreaRaw(n/r,i);return a[0]*=t,a}return n.invert=function(n,i){var a=e.geoAzimuthalEqualAreaRaw.invert(n/t,i);return a[0]*=r,a},n}function U(t,e){return[t*o(e)/o(e/=2),2*g(e)]}function V(t,e,r){var i,a,o,s=100;r=void 0===r?0:+r,e=+e;do{(a=t(r))===(o=t(r+v))&&(o=a+v),r-=i=-1*v*(a-e)/(a-o)}while(s-- >0&&n(i)>v);return s<0?NaN:r}function H(t,e,r){return void 0===e&&(e=40),void 0===r&&(r=1e-12),function(i,a,o,s){var l,c,u;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var f=0;fl)o-=c/=2,s-=u/=2;else{l=g;var m=(o>0?-1:1)*r,v=(s>0?-1:1)*r,y=t(o+m,s),x=t(o,s+v),b=(y[0]-h[0])/m,_=(y[1]-h[1])/m,w=(x[0]-h[0])/v,T=(x[1]-h[1])/v,k=T*b-_*w,A=(n(k)<.5?.5:1)/k;if(o+=c=(d*w-p*T)*A,s+=u=(p*_-d*b)*A,n(c)0&&(i[1]*=1+a/1.5*i[0]*i[0]),i}return e.invert=H(e),e}function G(t,e){var r,i=t*g(e),a=30;do{e-=r=(e+g(e)-i)/(1+o(e))}while(n(r)>v&&--a>0);return e/2}function Y(t,e,r){function n(n,i){return[t*n*o(i=G(r,i)),e*g(i)]}return n.invert=function(n,i){return i=S(i/e),[n/(t*o(i)),S((2*i+g(2*i))/r)]},n}B.invert=function(t,e){if((a=n(e))1e-12&&--u>0);return[t/(o(l)*(R-1/g(l))),d(e)*l]},U.invert=function(t,e){var r=2*S(e/2);return[t*o(r/2)/o(r),r]};var W=Y(w/x,w,y);var X=2.00276,Z=1.11072;function J(t,e){var r=G(y,e);return[X*t/(1/o(e)+Z/o(r)),(e+w*g(r))/X]}function K(t){var r=0,n=e.geoProjectionMutator(t),i=n(r);return i.parallel=function(t){return arguments.length?n(r=t*M):r*A},i}function Q(t,e){return[t*o(e),e]}function $(t){if(!t)return Q;var e=1/m(t);function r(r,n){var i=e+t-n,a=i?r*o(n)/i:i;return[i*g(a),e-i*o(a)]}return r.invert=function(r,n){var i=L(r*r+(n=e-n)*n),s=e+t-i;return[i/o(s)*a(r,n),s]},r}function tt(t){function e(e,r){var n=x-r,i=n?e*t*g(n)/n:n;return[n*g(i)/t,x-n*o(i)]}return e.invert=function(e,r){var n=e*t,i=x-r,o=L(n*n+i*i),s=a(n,i);return[(o?o/g(o):1)*s/t,x-o]},e}J.invert=function(t,e){var r,i,a=X*e,s=e<0?-b:b,l=25;do{i=a-w*g(s),s-=r=(g(2*s)+2*s-y*g(i))/(2*o(2*s)+2+y*o(i)*w*o(s))}while(n(r)>v&&--l>0);return i=a-w*g(s),[t*(1/o(i)+Z/o(s))/X,i]},Q.invert=function(t,e){return[t/o(e),e]};var et=Y(1,4/y,y);function rt(t,e,r,i,s,l){var c,u=o(l);if(n(t)>1||n(l)>1)c=E(r*s+e*i*u);else{var f=g(t/2),h=g(l/2);c=2*S(L(f*f+e*i*h*h))}return n(c)>v?[c,a(i*g(l),e*s-r*i*u)]:[0,0]}function nt(t,e,r){return E((t*t+e*e-r*r)/(2*t*e))}function it(t){return t-2*y*l((t+y)/(2*y))}function at(t,e,r){for(var n,i=[[t[0],t[1],g(t[1]),o(t[1])],[e[0],e[1],g(e[1]),o(e[1])],[r[0],r[1],g(r[1]),o(r[1])]],a=i[2],s=0;s<3;++s,a=n)n=i[s],a.v=rt(n[1]-a[1],a[3],a[2],n[3],n[2],n[0]-a[0]),a.point=[0,0];var l=nt(i[0].v[0],i[2].v[0],i[1].v[0]),c=nt(i[0].v[0],i[1].v[0],i[2].v[0]),u=y-l;i[2].point[1]=0,i[0].point[0]=-(i[1].point[0]=i[0].v[0]/2);var f=[i[2].point[0]=i[0].point[0]+i[2].v[0]*o(l),2*(i[0].point[1]=i[1].point[1]=i[2].v[0]*g(l))];return function(t,e){var r,n=g(e),a=o(e),s=new Array(3);for(r=0;r<3;++r){var l=i[r];if(s[r]=rt(e-l[1],l[3],l[2],a,n,t-l[0]),!s[r][0])return l.point;s[r][1]=it(s[r][1]-l.v[1])}var h=f.slice();for(r=0;r<3;++r){var p=2==r?0:r+1,d=nt(i[r].v[0],s[r][0],s[p][0]);s[r][1]<0&&(d=-d),r?1==r?(d=c-d,h[0]-=s[r][0]*o(d),h[1]-=s[r][0]*g(d)):(d=u-d,h[0]+=s[r][0]*o(d),h[1]+=s[r][0]*g(d)):(h[0]+=s[r][0]*o(d),h[1]-=s[r][0]*g(d))}return h[0]/=3,h[1]/=3,h}}function ot(t){return t[0]*=M,t[1]*=M,t}function st(t,r,n){var i=e.geoCentroid({type:\"MultiPoint\",coordinates:[t,r,n]}),a=[-i[0],-i[1]],o=e.geoRotation(a),s=at(ot(o(t)),ot(o(r)),ot(o(n)));s.invert=H(s);var l=e.geoProjection(s).rotate(a),c=l.center;return delete l.rotate,l.center=function(t){return arguments.length?c(o(t)):o.invert(c())},l.clipAngle(90)}function lt(t,e){var r=L(1-g(e));return[2/T*t*r,T*(1-r)]}function ct(t){var e=m(t);function r(t,r){return[t,(t?t/g(t):1)*(g(r)*o(t)-e*o(r))]}return r.invert=e?function(t,r){t&&(r*=g(t)/t);var n=o(t);return[t,2*a(L(n*n+e*e-r*r)-n,e-r)]}:function(t,e){return[t,S(t?e*m(t)/t:e)]},r}lt.invert=function(t,e){var r=(r=e/T-1)*r;return[r>0?t*L(y/r)/2:0,S(1-r)]};var ut=L(3);function ft(t,e){return[ut*t*(2*o(2*e/3)-1)/T,ut*T*g(e/3)]}function ht(t){var e=o(t);function r(t,r){return[t*e,g(r)/e]}return r.invert=function(t,r){return[t/e,S(r*e)]},r}function pt(t){var e=o(t);function r(t,r){return[t*e,(1+e)*m(r/2)]}return r.invert=function(t,r){return[t/e,2*i(r/(1+e))]},r}function dt(t,e){var r=L(8/(3*y));return[r*t*(1-n(e)/y),r*e]}function gt(t,e){var r=L(4-3*g(n(e)));return[2/L(6*y)*t*r,d(e)*L(2*y/3)*(2-r)]}function mt(t,e){var r=L(y*(4+y));return[2/r*t*(1+L(1-4*e*e/(y*y))),4/r*e]}function vt(t,e){var r=(2+x)*g(e);e/=2;for(var i=0,a=1/0;i<10&&n(a)>v;i++){var s=o(e);e-=a=(e+g(e)*(s+2)-r)/(2*s*(1+s))}return[2/L(y*(4+y))*t*(1+o(e)),2*L(y/(4+y))*g(e)]}function yt(t,e){return[t*(1+o(e))/L(2+y),2*e/L(2+y)]}function xt(t,e){for(var r=(1+x)*g(e),i=0,a=1/0;i<10&&n(a)>v;i++)e-=a=(e+g(e)-r)/(1+o(e));return r=L(2+y),[t*(1+o(e))/r,2*e/r]}ft.invert=function(t,e){var r=3*S(e/(ut*T));return[T*t/(ut*(2*o(2*r/3)-1)),r]},dt.invert=function(t,e){var r=L(8/(3*y)),i=e/r;return[t/(r*(1-n(i)/y)),i]},gt.invert=function(t,e){var r=2-n(e)/L(2*y/3);return[t*L(6*y)/(2*r),d(e)*S((4-r*r)/3)]},mt.invert=function(t,e){var r=L(y*(4+y))/2;return[t*r/(1+L(1-e*e*(4+y)/(4*y))),e*r/2]},vt.invert=function(t,e){var r=e*L((4+y)/y)/2,n=S(r),i=o(n);return[t/(2/L(y*(4+y))*(1+i)),S((n+r*(i+2))/(2+x))]},yt.invert=function(t,e){var r=L(2+y),n=e*r/2;return[r*t/(1+o(n)),n]},xt.invert=function(t,e){var r=1+x,n=L(r/2);return[2*t*n/(1+o(e*=n)),S((e+g(e))/r)]};var bt=3+2*w;function _t(t,e){var r=g(t/=2),n=o(t),a=L(o(e)),s=o(e/=2),l=g(e)/(s+w*n*a),u=L(2/(1+l*l)),f=L((w*s+(n+r)*a)/(w*s+(n-r)*a));return[bt*(u*(f-1/f)-2*c(f)),bt*(u*l*(f+1/f)-2*i(l))]}_t.invert=function(t,e){if(!(r=D.invert(t/1.2,1.065*e)))return null;var r,a=r[0],s=r[1],l=20;t/=bt,e/=bt;do{var h=a/2,p=s/2,d=g(h),m=o(h),y=g(p),b=o(p),T=o(s),k=L(T),A=y/(b+w*m*k),M=A*A,S=L(2/(1+M)),E=(w*b+(m+d)*k)/(w*b+(m-d)*k),C=L(E),P=C-1/C,I=C+1/C,O=S*P-2*c(C)-t,z=S*A*I-2*i(A)-e,R=y&&_*k*d*M/y,F=(w*m*b+k)/(2*(b+w*m*k)*(b+w*m*k)*k),B=-.5*A*S*S*S,N=B*R,j=B*F,U=(U=2*b+w*k*(m-d))*U*C,V=(w*m*b*k+T)/U,H=-w*d*y/(k*U),q=P*N-2*V/C+S*(V+V/E),G=P*j-2*H/C+S*(H+H/E),Y=A*I*N-2*R/(1+M)+S*I*R+S*A*(V-V/E),W=A*I*j-2*F/(1+M)+S*I*F+S*A*(H-H/E),X=G*Y-W*q;if(!X)break;var Z=(z*G-O*W)/X,J=(O*Y-z*q)/X;a-=Z,s=u(-x,f(x,s-J))}while((n(Z)>v||n(J)>v)&&--l>0);return n(n(s)-x)s){var d=L(h),m=a(f,u),b=i*p(m/i),_=m-b,w=t*o(_),T=(t*g(_)-_*g(w))/(x-w),k=Lt(_,T),A=(y-t)/Ct(k,w,y);u=d;var M,S=50;do{u-=M=(t+Ct(k,w,u)*A-d)/(k(u)*A)}while(n(M)>v&&--S>0);f=_*g(u),us){var u=L(c),f=a(l,r),h=i*p(f/i),d=f-h;r=u*o(d),l=u*g(d);for(var m=r-x,v=g(r),b=l/v,_=rv||n(p)>v)&&--x>0);return[d,m]},u}Tt.invert=function(t,e){var r=e/(1+wt);return[t&&t/(wt*L(1-r*r)),2*i(r)]},kt.invert=function(t,e){var r=i(e/T),n=o(r),a=2*r;return[t*T/2/(o(a)*n*n),a]};var It=Pt(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);var Ot=Pt(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);var zt=Pt(5/6*y,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Dt(t,e){var r=t*t,n=e*e;return[t*(1-.162388*n)*(.87-952426e-9*r*r),e*(1+n/12)]}Dt.invert=function(t,e){var r,i=t,a=e,o=50;do{var s=a*a;a-=r=(a*(1+s/12)-e)/(1+s/4)}while(n(r)>v&&--o>0);o=50,t/=1-.162388*s;do{var l=(l=i*i)*l;i-=r=(i*(.87-952426e-9*l)-t)/(.87-.00476213*l)}while(n(r)>v&&--o>0);return[i,a]};var Rt=Pt(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Ft(t){var e=t(x,0)[0]-t(-x,0)[0];function r(r,n){var i=r>0?-.5:.5,a=t(r+i*y,n);return a[0]-=i*e,a}return t.invert&&(r.invert=function(r,n){var i=r>0?-.5:.5,a=t.invert(r+i*e,n),o=a[0]-i*y;return o<-y?o+=2*y:o>y&&(o-=2*y),a[0]=o,a}),r}function Bt(t,e){var r=d(t),i=d(e),s=o(e),l=o(t)*s,c=g(t)*s,u=g(i*e);t=n(a(c,u)),e=S(l),n(t-x)>v&&(t%=x);var f=function(t,e){if(e===x)return[0,0];var r,i,a=g(e),s=a*a,l=s*s,c=1+l,u=1+3*l,f=1-l,h=S(1/L(c)),p=f+s*c*h,d=(1-a)/p,m=L(d),b=d*c,_=L(b),w=m*f;if(0===t)return[0,-(w+s*_)];var T,k=o(e),A=1/k,M=2*a*k,E=(-p*k-(-3*s+h*u)*M*(1-a))/(p*p),C=-A*M,P=-A*(s*c*E+d*u*M),I=-2*A*(f*(.5*E/m)-2*s*m*M),O=4*t/y;if(t>.222*y||e.175*y){if(r=(w+s*L(b*(1+l)-w*w))/(1+l),t>y/4)return[r,r];var z=r,D=.5*r;r=.5*(D+z),i=50;do{var R=L(b-r*r),F=r*(I+C*R)+P*S(r/_)-O;if(!F)break;F<0?D=r:z=r,r=.5*(D+z)}while(n(z-D)>v&&--i>0)}else{r=v,i=25;do{var B=r*r,N=L(b-B),j=I+C*N,U=r*j+P*S(r/_)-O,V=j+(P-C*B)/N;r-=T=N?U/V:0}while(n(T)>v&&--i>0)}return[r,-w-s*L(b-r*r)]}(t>y/4?x-t:t,e);return t>y/4&&(u=f[0],f[0]=-f[1],f[1]=-u),f[0]*=r,f[1]*=-i,f}function Nt(t,e){var r,a,l,c,u,f;if(e=1-v)return r=(1-e)/4,l=1/(a=P(t)),[(c=((f=s(2*(f=t)))-1)/(f+1))+r*((u=a*C(t))-t)/(a*a),l-r*c*l*(u-t),l+r*c*l*(u+t),2*i(s(t))-x+r*(u-t)/a];var h=[1,0,0,0,0,0,0,0,0],p=[L(e),0,0,0,0,0,0,0,0],d=0;for(a=L(1-e),u=1;n(p[d]/h[d])>v&&d<8;)r=h[d++],p[d]=(r-a)/2,h[d]=(r+a)/2,a=L(r*a),u*=2;l=u*h[d]*t;do{l=(S(c=p[d]*g(a=l)/h[d])+l)/2}while(--d);return[g(l),c=o(l),c/o(l-a),l]}function jt(t,e){if(!e)return t;if(1===e)return c(m(t/2+b));for(var r=1,a=L(1-e),o=L(e),s=0;n(o)>v;s++){if(t%y){var l=i(a*m(t)/r);l<0&&(l+=y),t+=l+~~(t/y)*y}else t+=t;o=(r+a)/2,a=L(r*a),o=((r=o)-a)/2}return t/(h(2,s)*r)}function Ut(t,e){var r=(w-1)/(w+1),l=L(1-r*r),u=jt(x,l*l),f=c(m(y/4+n(e)/2)),h=s(-1*f)/L(r),p=function(t,e){var r=t*t,n=e+1,i=1-r-e*e;return[.5*((t>=0?x:-x)-a(i,2*t)),-.25*c(i*i+4*r)+.5*c(n*n+r)]}(h*o(-1*t),h*g(-1*t)),v=function(t,e,r){var a=n(t),o=C(n(e));if(a){var s=1/g(a),l=1/(m(a)*m(a)),c=-(l+r*(o*o*s*s)-1+r),u=(-c+L(c*c-4*((r-1)*l)))/2;return[jt(i(1/L(u)),r)*d(t),jt(i(L((u/l-1)/r)),1-r)*d(e)]}return[0,jt(i(o),1-r)*d(e)]}(p[0],p[1],l*l);return[-v[1],(e>=0?1:-1)*(.5*u-v[0])]}function Vt(t){var e=g(t),r=o(t),i=Ht(t);function s(t,a){var s=i(t,a);t=s[0],a=s[1];var l=g(a),c=o(a),u=o(t),f=E(e*l+r*c*u),h=g(f),p=n(h)>v?f/h:1;return[p*r*g(t),(n(t)>x?p:-p)*(e*c-r*l*u)]}return i.invert=Ht(-t),s.invert=function(t,r){var n=L(t*t+r*r),s=-g(n),l=o(n),c=n*l,u=-r*s,f=n*e,h=L(c*c+u*u-f*f),p=a(c*f+u*h,u*f-c*h),d=(n>x?-1:1)*a(t*s,n*o(p)*l+r*g(p)*s);return i.invert(d,p)},s}function Ht(t){var e=g(t),r=o(t);return function(t,n){var i=o(n),s=o(t)*i,l=g(t)*i,c=g(n);return[a(l,s*r-c*e),S(c*r+s*e)]}}Bt.invert=function(t,e){n(t)>1&&(t=2*d(t)-t),n(e)>1&&(e=2*d(e)-e);var r=d(t),i=d(e),s=-r*t,l=-i*e,c=l/s<1,u=function(t,e){var r=0,i=1,a=.5,s=50;for(;;){var l=a*a,c=L(a),u=S(1/L(1+l)),f=1-l+a*(1+l)*u,h=(1-c)/f,p=L(h),d=h*(1+l),g=p*(1-l),m=L(d-t*t),v=e+g+a*m;if(n(i-r)<1e-12||0==--s||0===v)break;v>0?r=a:i=a,a=.5*(r+i)}if(!s)return null;var x=S(c),b=o(x),_=1/b,w=2*c*b,T=(-f*b-(-3*a+u*(1+3*l))*w*(1-c))/(f*f);return[y/4*(t*(-2*_*(.5*T/p*(1-l)-2*a*p*w)+-_*w*m)+-_*(a*(1+l)*T+h*(1+3*l)*w)*S(t/L(d))),x]}(c?l:s,c?s:l),f=u[0],h=u[1],p=o(h);return c&&(f=-x-f),[r*(a(g(f)*p,-g(h))+y),i*S(o(f)*p)]},Ut.invert=function(t,e){var r,n,o,l,u,f,h=(w-1)/(w+1),p=L(1-h*h),d=jt(x,p*p),g=(n=-t,o=p*p,(r=.5*d-e)?(l=Nt(r,o),n?(f=(u=Nt(n,1-o))[1]*u[1]+o*l[0]*l[0]*u[0]*u[0],[[l[0]*u[2]/f,l[1]*l[2]*u[0]*u[1]/f],[l[1]*u[1]/f,-l[0]*l[2]*u[0]*u[2]/f],[l[2]*u[1]*u[2]/f,-o*l[0]*l[1]*u[0]/f]]):[[l[0],0],[l[1],0],[l[2],0]]):[[0,(u=Nt(n,1-o))[0]/u[1]],[1/u[1],0],[u[2]/u[1],0]]),m=function(t,e){var r=e[0]*e[0]+e[1]*e[1];return[(t[0]*e[0]+t[1]*e[1])/r,(t[1]*e[0]-t[0]*e[1])/r]}(g[0],g[1]);return[a(m[1],m[0])/-1,2*i(s(-.5*c(h*m[0]*m[0]+h*m[1]*m[1])))-x]};var qt=S(1-1/3)*A,Gt=ht(0);function Yt(t){var e=qt*M,r=lt(y,e)[0]-lt(-y,e)[0],i=Gt(0,e)[1],a=lt(0,e)[1],o=T-a,s=k/t,c=4/k,h=i+o*o*4/k;function p(p,d){var g,m=n(d);if(m>e){var v=f(t-1,u(0,l((p+y)/s)));(g=lt(p+=y*(t-1)/t-v*s,m))[0]=g[0]*k/r-k*(t-1)/(2*t)+v*k/t,g[1]=i+4*(g[1]-a)*o/k,d<0&&(g[1]=-g[1])}else g=Gt(p,d);return g[0]*=c,g[1]/=h,g}return p.invert=function(e,p){e/=c;var d=n(p*=h);if(d>i){var g=f(t-1,u(0,l((e+y)/s)));e=(e+y*(t-1)/t-g*s)*r/k;var m=lt.invert(e,.25*(d-i)*k/o+a);return m[0]-=y*(t-1)/t-g*s,p<0&&(m[1]=-m[1]),m}return Gt.invert(e,p)},p}function Wt(t,e){return[t,1&e?90-v:qt]}function Xt(t,e){return[t,1&e?-90+v:-qt]}function Zt(t){return[t[0]*(1-v),t[1]]}function Jt(t){var e,r=1+t,i=S(g(1/r)),s=2*L(y/(e=y+4*i*r)),l=.5*s*(r+L(t*(2+t))),c=t*t,u=r*r;function f(f,h){var p,d,m=1-g(h);if(m&&m<2){var v,b=x-h,_=25;do{var w=g(b),T=o(b),k=i+a(w,r-T),A=1+u-2*r*T;b-=v=(b-c*i-r*w+A*k-.5*m*e)/(2*r*w*k)}while(n(v)>1e-12&&--_>0);p=s*L(A),d=f*k/y}else p=s*(t+m),d=f*i/y;return[p*g(d),l-p*o(d)]}return f.invert=function(t,n){var o=t*t+(n-=l)*n,f=(1+u-o/(s*s))/(2*r),h=E(f),p=g(h),d=i+a(p,r-f);return[S(t/L(o))*y/d,S(1-2*(h-c*i-r*p+(1+u-2*r*f)*d)/e)]},f}function Kt(t,e){return e>-.7109889596207567?((t=W(t,e))[1]+=.0528035274542,t):Q(t,e)}function Qt(t,e){return n(e)>.7109889596207567?((t=W(t,e))[1]-=e>0?.0528035274542:-.0528035274542,t):Q(t,e)}function $t(t,e,r,n){var i=L(4*y/(2*r+(1+t-e/2)*g(2*r)+(t+e)/2*g(4*r)+e/2*g(6*r))),a=L(n*g(r)*L((1+t*o(2*r)+e*o(4*r))/(1+t+e))),s=r*c(1);function l(r){return L(1+t*o(2*r)+e*o(4*r))}function c(n){var i=n*r;return(2*i+(1+t-e/2)*g(2*i)+(t+e)/2*g(4*i)+e/2*g(6*i))/r}function u(t){return l(t)*g(t)}var f=function(t,e){var n=r*V(c,s*g(e)/r,e/y);isNaN(n)&&(n=r*d(e));var u=i*l(n);return[u*a*t/y*o(n),u/a*g(n)]};return f.invert=function(t,e){var n=V(u,e*a/i);return[t*y/(o(n)*i*a*l(n)),S(r*c(n/r)/s)]},0===r&&(i=L(n/y),(f=function(t,e){return[t*i,g(e)/i]}).invert=function(t,e){return[t/i,S(e*i)]}),f}function te(t,e,r,n,i){void 0===n&&(n=1e-8),void 0===i&&(i=20);var a=t(e),o=t(.5*(e+r)),s=t(r);return function t(e,r,n,i,a,o,s,l,c,u,f){if(f.nanEncountered)return NaN;var h,p,d,g,m,v,y,x,b,_;if(p=e(r+.25*(h=n-r)),d=e(n-.25*h),isNaN(p))f.nanEncountered=!0;else{if(!isNaN(d))return _=((v=(g=h*(i+4*p+a)/12)+(m=h*(a+4*d+o)/12))-s)/15,u>c?(f.maxDepthCount++,v+_):Math.abs(_)t?r=n:e=n,n=e+r>>1}while(n>e);var i=c[n+1]-c[n];return i&&(i=(t-c[n+1])/i),(n+1+i)/s}var p=2*f(1)/y*o/r,m=function(t,e){var r=f(n(g(e))),a=i(r)*t;return r/=p,[a,e>=0?r:-r]};return m.invert=function(t,e){var r;return n(e*=p)<1&&(r=d(e)*S(a(n(e))*o)),[t/i(n(e)),r]},m}function re(t,e){return n(t[0]-e[0])=0;--l)n=(e=t[1][l])[0][0],i=e[0][1],a=e[1][1],o=e[2][0],s=e[2][1],c.push(ne([[o-v,s-v],[o-v,a+v],[n+v,a+v],[n+v,i-v]],30));return{type:\"Polygon\",coordinates:[r.merge(c)]}}function ae(t,r,n){var i,a;function o(e,n){for(var i=n<0?-1:1,a=r[+(n<0)],o=0,s=a.length-1;oa[o][2][0];++o);var l=t(e-a[o][1][0],n);return l[0]+=t(a[o][1][0],i*n>i*a[o][0][1]?a[o][0][1]:n)[0],l}n?o.invert=n(o):t.invert&&(o.invert=function(e,n){for(var i=a[+(n<0)],s=r[+(n<0)],l=0,c=i.length;lo&&(r=a,a=o,o=r),[[n,a],[i,o]]}))})),s):r.map((function(t){return t.map((function(t){return[[t[0][0]*A,t[0][1]*A],[t[1][0]*A,t[1][1]*A],[t[2][0]*A,t[2][1]*A]]}))}))},null!=r&&s.lobes(r),s}Kt.invert=function(t,e){return e>-.7109889596207567?W.invert(t,e-.0528035274542):Q.invert(t,e)},Qt.invert=function(t,e){return n(e)>.7109889596207567?W.invert(t,e+(e>0?.0528035274542:-.0528035274542)):Q.invert(t,e)};var oe=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var se=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var le=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var ce=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];var ue=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];var fe=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function he(t,e){return[3/k*t*L(y*y/3-e*e),e]}function pe(t){function e(e,r){if(n(n(r)-x)2)return null;var o=(e/=2)*e,s=(r/=2)*r,l=2*r/(1+o+s);return l=h((1+l)/(1-l),1/t),[a(2*e,1-o-s)/t,S((l-1)/(l+1))]},e}he.invert=function(t,e){return[k/3*t/L(y*y/3-e*e),e]};var de=y/w;function ge(t,e){return[t*(1+L(o(e)))/2,e/(o(e/2)*o(t/6))]}function me(t,e){var r=t*t,n=e*e;return[t*(.975534+n*(-.0143059*r-.119161+-.0547009*n)),e*(1.00384+r*(.0802894+-.02855*n+199025e-9*r)+n*(.0998909+-.0491032*n))]}function ve(t,e){return[g(t)/o(e),m(e)*o(t)]}function ye(t){var e=o(t),r=m(b+t/2);function i(i,a){var o=a-t,s=n(o)=0;)h=(f=t[u])[0]+l*(i=h)-c*p,p=f[1]+l*p+c*i;return[h=l*(i=h)-c*p,p=l*p+c*i]}return r.invert=function(r,s){var l=20,c=r,u=s;do{for(var f,h=e,p=t[h],d=p[0],m=p[1],v=0,y=0;--h>=0;)v=d+c*(f=v)-u*y,y=m+c*y+u*f,d=(p=t[h])[0]+c*(f=d)-u*m,m=p[1]+c*m+u*f;var x,b,_=(v=d+c*(f=v)-u*y)*v+(y=m+c*y+u*f)*y;c-=x=((d=c*(f=d)-u*m-r)*v+(m=c*m+u*f-s)*y)/_,u-=b=(m*v-d*y)/_}while(n(x)+n(b)>1e-12&&--l>0);if(l){var w=L(c*c+u*u),T=2*i(.5*w),k=g(T);return[a(c*k,w*o(T)),w?S(u*k/w):0]}},r}ge.invert=function(t,e){var r=n(t),i=n(e),a=v,s=x;iv||n(b)>v)&&--a>0);return a&&[r,i]},ve.invert=function(t,e){var r=t*t,n=e*e+1,i=r+n,a=t?_*L((i-L(i*i-4*r))/r):1/L(n);return[S(t*a),d(e)*E(a)]},xe.invert=function(t,e){return[t,2.5*i(s(.8*e))-.625*y]};var _e=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],we=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Te=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ke=[[.9245,0],[0,0],[.01943,0]],Ae=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Me(t,r){var n=e.geoProjection(be(t)).rotate(r).clipAngle(90),i=e.geoRotation(r),a=n.center;return delete n.rotate,n.center=function(t){return arguments.length?a(i(t)):i.invert(a())},n}var Se=L(6),Ee=L(7);function Le(t,e){var r=S(7*g(e)/(3*Se));return[Se*t*(2*o(2*r/3)-1)/Ee,9*g(r/3)/Ee]}function Ce(t,e){for(var r,i=(1+_)*g(e),a=e,s=0;s<25&&(a-=r=(g(a/2)+g(a)-i)/(.5*o(a/2)+o(a)),!(n(r)1e-12&&--l>0);return[t/(.84719-.13063*(i=s*s)+(o=i*(a=i*i))*o*(.05494*i-.04515-.02326*a+.00331*o)),s]},Oe.invert=function(t,e){for(var r=e/2,i=0,a=1/0;i<10&&n(a)>v;++i){var s=o(e/2);e-=a=(e-m(e/2)-r)/(1-.5/(s*s))}return[2*t/(1+o(e)),e]};var ze=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function De(t,e){var r=g(e),i=o(e),a=d(t);if(0===t||n(e)===x)return[0,e];if(0===e)return[t,0];if(n(t)===x)return[t*i,x*r];var s=y/(2*t)-2*t/y,l=2*e/y,c=(1-l*l)/(r-l),u=s*s,f=c*c,h=1+u/f,p=1+f/u,m=(s*r/c-s/2)/h,v=(f*r/u+c/2)/p,b=v*v-(f*r*r/u+c*r-1)/p;return[x*(m+L(m*m+i*i/h)*a),x*(v+L(b<0?0:b)*d(-e*s)*a)]}De.invert=function(t,e){var r=(t/=x)*t,n=r+(e/=x)*e,i=y*y;return[t?(n-1+L((1-n)*(1-n)+4*r))/(2*t)*x:0,V((function(t){return n*(y*g(t)-2*t)*y+4*t*t*(e-g(t))+2*y*t-i*e}),0)]};function Re(t,e){var r=e*e;return[t,e*(1.0148+r*r*(.23185+r*(.02406*r-.14499)))]}function Fe(t,e){if(n(e)=0;)if(n=e[s],r[0]===n[0]&&r[1]===n[1]){if(a)return[a,r];a=r}}}(e.face,r.face),i=Be(n.map(r.project),n.map(e.project));e.transform=r.transform?Ne(r.transform,i):i;for(var a=r.edges,o=0,s=a.length;o1.790857183?e=1.790857183:e<-1.790857183&&(e=-1.790857183);var r,i=e;do{var a=i*i;i-=r=(i*(1.0148+a*a*(.23185+a*(.02406*a-.14499)))-e)/(1.0148+a*a*(5*.23185+a*(.21654*a-1.01493)))}while(n(r)>v);return[t,i]},Fe.invert=function(t,e){if(n(e)v&&--s>0);return l=m(a),[(n(e)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])})),nr=[],t.length?t.length>1?{type:\"MultiPolygon\",coordinates:t}:{type:\"Polygon\",coordinates:t[0]}:null}};function sr(t){var r=t(x,0)[0]-t(-x,0)[0];function i(e,i){var a=n(e)0?e-y:e+y,i),s=(o[0]-o[1])*_,l=(o[0]+o[1])*_;if(a)return[s,l];var c=r*_,u=s>0^l>0?-1:1;return[u*s-d(l)*c,u*l-d(s)*c]}return t.invert&&(i.invert=function(e,i){var a=(e+i)*_,o=(i-e)*_,s=n(a)<.5*r&&n(o)<.5*r;if(!s){var l=r*_,c=a>0^o>0?-1:1,u=-c*e+(o>0?1:-1)*l,f=-c*i+(a>0?1:-1)*l;a=(-u-f)*_,o=(u-f)*_}var h=t.invert(a,o);return s||(h[0]+=a>0?y:-y),h}),e.geoProjection(i).rotate([-90,-90,45]).clipAngle(179.999)}function lr(){return sr(Ut).scale(111.48)}function cr(t){var e=g(t);function r(r,n){var a=e?m(r*e/2)/e:r/2;if(!n)return[2*a,-t];var s=2*i(a*g(n)),l=1/m(n);return[g(s)*l,n+(1-o(s))*l-t]}return r.invert=function(r,a){if(n(a+=t)v&&--u>0);var d=r*(f=m(c)),x=m(n(a)0?x:-x)*(h+o*(d-c)/2+o*o*(d-2*h+c)/2)]}function hr(t,e){var r=function(t){function e(e,r){var n=o(r),i=(t-1)/(t-n*o(e));return[i*n*g(e),i*g(r)]}return e.invert=function(e,r){var n=e*e+r*r,i=L(n),o=(t-L(1-n*(t+1)/(t-1)))/((t-1)/i+i/(t-1));return[a(e*o,i*L(1-o*o)),i?S(r*o/i):0]},e}(t);if(!e)return r;var n=o(e),i=g(e);function s(e,a){var o=r(e,a),s=o[1],l=s*i/(t-1)+n;return[o[0]*n/l,s/l]}return s.invert=function(e,a){var o=(t-1)/(t-1-a*i);return r.invert(o*e,o*a*n)},s}ur.forEach((function(t){t[1]*=1.0144})),fr.invert=function(t,e){var r=e/x,i=90*r,a=f(18,n(i/5)),o=u(0,l(a));do{var s=ur[o][1],c=ur[o+1][1],h=ur[f(19,o+2)][1],p=h-s,d=h-2*c+s,g=2*(n(r)-c)/p,m=d/p,v=g*(1-m*g*(1-2*m*g));if(v>=0||1===o){i=(e>=0?5:-5)*(v+a);var y,b=50;do{v=(a=f(18,n(i)/5))-(o=l(a)),s=ur[o][1],c=ur[o+1][1],h=ur[f(19,o+2)][1],i-=(y=(e>=0?x:-x)*(c+v*(h-s)/2+v*v*(h-2*c+s)/2)-e)*A}while(n(y)>1e-12&&--b>0);break}}while(--o>=0);var _=ur[o][0],w=ur[o+1][0],T=ur[f(19,o+2)][0];return[t/(w+v*(T-_)/2+v*v*(T-2*w+_)/2),i*M]};var pr=-179.9999,dr=179.9999,gr=-89.9999;function mr(t){return t.length>0}function vr(t){return-90===t||90===t?[0,t]:[-180,(e=t,Math.floor(1e4*e)/1e4)];var e}function yr(t){var e=t[0],r=t[1],n=!1;return e<=pr?(e=-180,n=!0):e>=dr&&(e=180,n=!0),r<=gr?(r=-90,n=!0):r>=89.9999&&(r=90,n=!0),n?[e,r]:t}function xr(t){return t.map(yr)}function br(t,e,r){for(var n=0,i=t.length;n=dr||u<=gr||u>=89.9999){a[o]=yr(l);for(var f=o+1;fpr&&pgr&&d<89.9999)break}if(f===o+1)continue;if(o){var g={index:-1,polygon:e,ring:a.slice(0,o+1)};g.ring[g.ring.length-1]=vr(u),r[r.length-1]=g}else r.pop();if(f>=s)break;r.push({index:-1,polygon:e,ring:a=a.slice(f-1)}),a[0]=vr(a[0][1]),o=-1,s=a.length}}}}function _r(t){var e,r,n,i,a,o,s=t.length,l={},c={};for(e=0;e0?y-l:l)*A],u=e.geoProjection(t(s)).rotate(c),f=e.geoRotation(c),h=u.center;return delete u.rotate,u.center=function(t){return arguments.length?h(f(t)):f.invert(h())},u.clipAngle(90)}function Mr(t){var r=o(t);function n(t,n){var i=e.geoGnomonicRaw(t,n);return i[0]*=r,i}return n.invert=function(t,n){return e.geoGnomonicRaw.invert(t/r,n)},n}function Sr(t,e){return Ar(Mr,t,e)}function Er(t){if(!(t*=2))return e.geoAzimuthalEquidistantRaw;var r=-t/2,n=-r,i=t*t,s=m(n),l=.5/g(n);function c(e,a){var s=E(o(a)*o(e-r)),l=E(o(a)*o(e-n));return[((s*=s)-(l*=l))/(2*t),(a<0?-1:1)*L(4*i*l-(i-s+l)*(i-s+l))/(2*t)]}return c.invert=function(t,e){var i,c,u=e*e,f=o(L(u+(i=t+r)*i)),h=o(L(u+(i=t+n)*i));return[a(c=f-h,i=(f+h)*s),(e<0?-1:1)*E(L(i*i+c*c)*l)]},c}function Lr(t,e){return Ar(Er,t,e)}function Cr(t,e){if(n(e)v&&--l>0);return[d(t)*(L(a*a+4)+a)*y/4,x*s]};var Rr=4*y+3*L(3),Fr=2*L(2*y*L(3)/Rr),Br=Y(Fr*L(3)/y,Fr,Rr/6);function Nr(t,e){return[t*L(1-3*e*e/(y*y)),e]}function jr(t,e){var r=o(e),n=o(t)*r,i=1-n,s=o(t=a(g(t)*r,-g(e))),l=g(t);return[l*(r=L(1-n*n))-s*i,-s*r-l*i]}function Ur(t,e){var r=O(t,e);return[(r[0]+t/x)/2,(r[1]+e)/2]}Nr.invert=function(t,e){return[t/L(1-3*e*e/(y*y)),e]},jr.invert=function(t,e){var r=(t*t+e*e)/-2,n=L(-r*(2+r)),i=e*r+t*n,o=t*r-e*n,s=L(o*o+i*i);return[a(n*i,s*(1+r)),s?-S(n*o/s):0]},Ur.invert=function(t,e){var r=t,i=e,a=25;do{var s,l=o(i),c=g(i),u=g(2*i),f=c*c,h=l*l,p=g(r),d=o(r/2),m=g(r/2),y=m*m,b=1-h*d*d,_=b?E(l*d)*L(s=1/b):s=0,w=.5*(2*_*l*m+r/x)-t,T=.5*(_*c+i)-e,k=.5*s*(h*y+_*l*d*f)+.5/x,A=s*(p*u/4-_*c*m),M=.125*s*(u*m-_*c*h*p),S=.5*s*(f*d+_*y*l)+.5,C=A*M-S*k,P=(T*A-w*S)/C,I=(w*M-T*k)/C;r-=P,i-=I}while((n(P)>v||n(I)>v)&&--a>0);return[r,i]},t.geoNaturalEarth=e.geoNaturalEarth1,t.geoNaturalEarthRaw=e.geoNaturalEarth1Raw,t.geoAiry=function(){var t=x,r=e.geoProjectionMutator(I),n=r(t);return n.radius=function(e){return arguments.length?r(t=e*M):t*A},n.scale(179.976).clipAngle(147)},t.geoAiryRaw=I,t.geoAitoff=function(){return e.geoProjection(O).scale(152.63)},t.geoAitoffRaw=O,t.geoArmadillo=function(){var t=20*M,r=t>=0?1:-1,n=m(r*t),i=e.geoProjectionMutator(z),s=i(t),l=s.stream;return s.parallel=function(e){return arguments.length?(n=m((r=(t=e*M)>=0?1:-1)*t),i(t)):t*A},s.stream=function(e){var i=s.rotate(),c=l(e),u=(s.rotate([0,0]),l(e)),f=s.precision();return s.rotate(i),c.sphere=function(){u.polygonStart(),u.lineStart();for(var e=-180*r;r*e<180;e+=90*r)u.point(e,90*r);if(t)for(;r*(e-=3*r*f)>=-180;)u.point(e,r*-a(o(e*M/2),n)*A);u.lineEnd(),u.polygonEnd()},c},s.scale(218.695).center([0,28.0974])},t.geoArmadilloRaw=z,t.geoAugust=function(){return e.geoProjection(D).scale(66.1603)},t.geoAugustRaw=D,t.geoBaker=function(){return e.geoProjection(B).scale(112.314)},t.geoBakerRaw=B,t.geoBerghaus=function(){var t=5,r=e.geoProjectionMutator(N),n=r(t),i=n.stream,s=-o(.01*M),l=g(.01*M);return n.lobes=function(e){return arguments.length?r(t=+e):t},n.stream=function(e){var r=n.rotate(),c=i(e),u=(n.rotate([0,0]),i(e));return n.rotate(r),c.sphere=function(){u.polygonStart(),u.lineStart();for(var e=0,r=360/t,n=2*y/t,i=90-180/t,c=x;e=0;)t.point((e=r[i])[0],e[1]);t.lineEnd(),t.polygonEnd()},t},n.scale(79.4187).parallel(45).clipAngle(179.999)},t.geoHammerRetroazimuthalRaw=Vt,t.geoHealpix=function(){var t=4,n=e.geoProjectionMutator(Yt),i=n(t),a=i.stream;return i.lobes=function(e){return arguments.length?n(t=+e):t},i.stream=function(n){var o=i.rotate(),s=a(n),l=(i.rotate([0,0]),a(n));return i.rotate(o),s.sphere=function(){var n,i;e.geoStream((n=180/t,i=[].concat(r.range(-180,180+n/2,n).map(Wt),r.range(180,-180-n/2,-n).map(Xt)),{type:\"Polygon\",coordinates:[180===n?i.map(Zt):i]}),l)},s},i.scale(239.75)},t.geoHealpixRaw=Yt,t.geoHill=function(){var t=1,r=e.geoProjectionMutator(Jt),n=r(t);return n.ratio=function(e){return arguments.length?r(t=+e):t},n.scale(167.774).center([0,18.67])},t.geoHillRaw=Jt,t.geoHomolosine=function(){return e.geoProjection(Qt).scale(152.63)},t.geoHomolosineRaw=Qt,t.geoHufnagel=function(){var t=1,r=0,n=45*M,i=2,a=e.geoProjectionMutator($t),o=a(t,r,n,i);return o.a=function(e){return arguments.length?a(t=+e,r,n,i):t},o.b=function(e){return arguments.length?a(t,r=+e,n,i):r},o.psiMax=function(e){return arguments.length?a(t,r,n=+e*M,i):n*A},o.ratio=function(e){return arguments.length?a(t,r,n,i=+e):i},o.scale(180.739)},t.geoHufnagelRaw=$t,t.geoHyperelliptical=function(){var t=0,r=2.5,n=1.183136,i=e.geoProjectionMutator(ee),a=i(t,r,n);return a.alpha=function(e){return arguments.length?i(t=+e,r,n):t},a.k=function(e){return arguments.length?i(t,r=+e,n):r},a.gamma=function(e){return arguments.length?i(t,r,n=+e):n},a.scale(152.63)},t.geoHyperellipticalRaw=ee,t.geoInterrupt=ae,t.geoInterruptedBoggs=function(){return ae(J,oe).scale(160.857)},t.geoInterruptedHomolosine=function(){return ae(Qt,se).scale(152.63)},t.geoInterruptedMollweide=function(){return ae(W,le).scale(169.529)},t.geoInterruptedMollweideHemispheres=function(){return ae(W,ce).scale(169.529).rotate([20,0])},t.geoInterruptedSinuMollweide=function(){return ae(Kt,ue,H).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},t.geoInterruptedSinusoidal=function(){return ae(Q,fe).scale(152.63).rotate([-20,0])},t.geoKavrayskiy7=function(){return e.geoProjection(he).scale(158.837)},t.geoKavrayskiy7Raw=he,t.geoLagrange=function(){var t=.5,r=e.geoProjectionMutator(pe),n=r(t);return n.spacing=function(e){return arguments.length?r(t=+e):t},n.scale(124.75)},t.geoLagrangeRaw=pe,t.geoLarrivee=function(){return e.geoProjection(ge).scale(97.2672)},t.geoLarriveeRaw=ge,t.geoLaskowski=function(){return e.geoProjection(me).scale(139.98)},t.geoLaskowskiRaw=me,t.geoLittrow=function(){return e.geoProjection(ve).scale(144.049).clipAngle(89.999)},t.geoLittrowRaw=ve,t.geoLoximuthal=function(){return K(ye).parallel(40).scale(158.837)},t.geoLoximuthalRaw=ye,t.geoMiller=function(){return e.geoProjection(xe).scale(108.318)},t.geoMillerRaw=xe,t.geoModifiedStereographic=Me,t.geoModifiedStereographicRaw=be,t.geoModifiedStereographicAlaska=function(){return Me(_e,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},t.geoModifiedStereographicGs48=function(){return Me(we,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},t.geoModifiedStereographicGs50=function(){return Me(Te,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},t.geoModifiedStereographicMiller=function(){return Me(ke,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},t.geoModifiedStereographicLee=function(){return Me(Ae,[165,10]).scale(250).clipAngle(130).center([-165,-10])},t.geoMollweide=function(){return e.geoProjection(W).scale(169.529)},t.geoMollweideRaw=W,t.geoMtFlatPolarParabolic=function(){return e.geoProjection(Le).scale(164.859)},t.geoMtFlatPolarParabolicRaw=Le,t.geoMtFlatPolarQuartic=function(){return e.geoProjection(Ce).scale(188.209)},t.geoMtFlatPolarQuarticRaw=Ce,t.geoMtFlatPolarSinusoidal=function(){return e.geoProjection(Pe).scale(166.518)},t.geoMtFlatPolarSinusoidalRaw=Pe,t.geoNaturalEarth2=function(){return e.geoProjection(Ie).scale(175.295)},t.geoNaturalEarth2Raw=Ie,t.geoNellHammer=function(){return e.geoProjection(Oe).scale(152.63)},t.geoNellHammerRaw=Oe,t.geoInterruptedQuarticAuthalic=function(){return ae(j(1/0),ze).rotate([20,0]).scale(152.63)},t.geoNicolosi=function(){return e.geoProjection(De).scale(127.267)},t.geoNicolosiRaw=De,t.geoPatterson=function(){return e.geoProjection(Re).scale(139.319)},t.geoPattersonRaw=Re,t.geoPolyconic=function(){return e.geoProjection(Fe).scale(103.74)},t.geoPolyconicRaw=Fe,t.geoPolyhedral=Ve,t.geoPolyhedralButterfly=function(t){t=t||function(t){var r=e.geoCentroid({type:\"MultiPoint\",coordinates:t});return e.geoGnomonic().scale(1).translate([0,0]).rotate([-r[0],-r[1]])};var r=Ye.map((function(e){return{face:e,project:t(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var n=r[t];n&&(n.children||(n.children=[])).push(r[e])})),Ve(r[0],(function(t,e){return r[t<-y/2?e<0?6:4:t<0?e<0?2:0:t0?[-r[0],0]:[180-r[0],180])};var r=Ye.map((function(e){return{face:e,project:t(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var n=r[t];n&&(n.children||(n.children=[])).push(r[e])})),Ve(r[0],(function(t,e){return r[t<-y/2?e<0?6:4:t<0?e<0?2:0:t2||a[0]!=e[0]||a[1]!=e[1])&&(n.push(a),e=a)}return 1===n.length&&t.length>1&&n.push(r(t[t.length-1])),n}function a(t){return t.map(i)}function o(t){if(null==t)return t;var e;switch(t.type){case\"GeometryCollection\":e={type:\"GeometryCollection\",geometries:t.geometries.map(o)};break;case\"Point\":e={type:\"Point\",coordinates:r(t.coordinates)};break;case\"MultiPoint\":e={type:t.type,coordinates:n(t.coordinates)};break;case\"LineString\":e={type:t.type,coordinates:i(t.coordinates)};break;case\"MultiLineString\":case\"Polygon\":e={type:t.type,coordinates:a(t.coordinates)};break;case\"MultiPolygon\":e={type:\"MultiPolygon\",coordinates:t.coordinates.map(a)};break;default:return t}return null!=t.bbox&&(e.bbox=t.bbox),e}function s(t){var e={type:\"Feature\",properties:t.properties,geometry:o(t.geometry)};return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),e}if(null!=t)switch(t.type){case\"Feature\":return s(t);case\"FeatureCollection\":var l={type:\"FeatureCollection\",features:t.features.map(s)};return null!=t.bbox&&(l.bbox=t.bbox),l;default:return o(t)}return t},t.geoQuincuncial=sr,t.geoRectangularPolyconic=function(){return K(cr).scale(131.215)},t.geoRectangularPolyconicRaw=cr,t.geoRobinson=function(){return e.geoProjection(fr).scale(152.63)},t.geoRobinsonRaw=fr,t.geoSatellite=function(){var t=2,r=0,n=e.geoProjectionMutator(hr),i=n(t,r);return i.distance=function(e){return arguments.length?n(t=+e,r):t},i.tilt=function(e){return arguments.length?n(t,r=e*M):r*A},i.scale(432.147).clipAngle(E(1/t)*A-1e-6)},t.geoSatelliteRaw=hr,t.geoSinuMollweide=function(){return e.geoProjection(Kt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},t.geoSinuMollweideRaw=Kt,t.geoSinusoidal=function(){return e.geoProjection(Q).scale(152.63)},t.geoSinusoidalRaw=Q,t.geoStitch=function(t){if(null==t)return t;switch(t.type){case\"Feature\":return wr(t);case\"FeatureCollection\":var e={type:\"FeatureCollection\",features:t.features.map(wr)};return null!=t.bbox&&(e.bbox=t.bbox),e;default:return Tr(t)}},t.geoTimes=function(){return e.geoProjection(kr).scale(146.153)},t.geoTimesRaw=kr,t.geoTwoPointAzimuthal=Sr,t.geoTwoPointAzimuthalRaw=Mr,t.geoTwoPointAzimuthalUsa=function(){return Sr([-158,21.5],[-77,39]).clipAngle(60).scale(400)},t.geoTwoPointEquidistant=Lr,t.geoTwoPointEquidistantRaw=Er,t.geoTwoPointEquidistantUsa=function(){return Lr([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},t.geoVanDerGrinten=function(){return e.geoProjection(Cr).scale(79.4183)},t.geoVanDerGrintenRaw=Cr,t.geoVanDerGrinten2=function(){return e.geoProjection(Pr).scale(79.4183)},t.geoVanDerGrinten2Raw=Pr,t.geoVanDerGrinten3=function(){return e.geoProjection(Ir).scale(79.4183)},t.geoVanDerGrinten3Raw=Ir,t.geoVanDerGrinten4=function(){return e.geoProjection(Or).scale(127.16)},t.geoVanDerGrinten4Raw=Or,t.geoWagner=Dr,t.geoWagner7=function(){return Dr().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},t.geoWagnerRaw=zr,t.geoWagner4=function(){return e.geoProjection(Br).scale(176.84)},t.geoWagner4Raw=Br,t.geoWagner6=function(){return e.geoProjection(Nr).scale(152.63)},t.geoWagner6Raw=Nr,t.geoWiechel=function(){return e.geoProjection(jr).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},t.geoWiechelRaw=jr,t.geoWinkel3=function(){return e.geoProjection(Ur).scale(158.837)},t.geoWinkel3Raw=Ur,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{\"d3-array\":107,\"d3-geo\":114}],114:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-array\")):i((n=n||self).d3=n.d3||{},n.d3)}(this,(function(t,e){\"use strict\";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(t){a(i,t,this.t),a(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new n;function a(t,e,r){var n=t.s=e+r,i=n-e,a=n-i;t.t=e-a+(r-i)}var o=1e-6,s=Math.PI,l=s/2,c=s/4,u=2*s,f=180/s,h=s/180,p=Math.abs,d=Math.atan,g=Math.atan2,m=Math.cos,v=Math.ceil,y=Math.exp,x=Math.log,b=Math.pow,_=Math.sin,w=Math.sign||function(t){return t>0?1:t<0?-1:0},T=Math.sqrt,k=Math.tan;function A(t){return t>1?0:t<-1?s:Math.acos(t)}function M(t){return t>1?l:t<-1?-l:Math.asin(t)}function S(t){return(t=_(t/2))*t}function E(){}function L(t,e){t&&P.hasOwnProperty(t.type)&&P[t.type](t,e)}var C={Feature:function(t,e){L(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n=0?1:-1,i=n*r,a=m(e=(e*=h)/2+c),o=_(e),s=N*o,l=B*a+s*m(i),u=s*n*_(i);j.add(g(u,l)),F=t,B=a,N=o}function W(t){return[g(t[1],t[0]),M(t[2])]}function X(t){var e=t[0],r=t[1],n=m(r);return[n*m(e),n*_(e),_(r)]}function Z(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function J(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 K(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Q(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function $(t){var e=T(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var tt,et,rt,nt,it,at,ot,st,lt,ct,ut,ft,ht,pt,dt,gt,mt,vt,yt,xt,bt,_t,wt,Tt,kt,At,Mt=r(),St={point:Et,lineStart:Ct,lineEnd:Pt,polygonStart:function(){St.point=It,St.lineStart=Ot,St.lineEnd=zt,Mt.reset(),V.polygonStart()},polygonEnd:function(){V.polygonEnd(),St.point=Et,St.lineStart=Ct,St.lineEnd=Pt,j<0?(tt=-(rt=180),et=-(nt=90)):Mt>o?nt=90:Mt<-o&&(et=-90),ct[0]=tt,ct[1]=rt},sphere:function(){tt=-(rt=180),et=-(nt=90)}};function Et(t,e){lt.push(ct=[tt=t,rt=t]),ent&&(nt=e)}function Lt(t,e){var r=X([t*h,e*h]);if(st){var n=J(st,r),i=J([n[1],-n[0],0],n);$(i),i=W(i);var a,o=t-it,s=o>0?1:-1,l=i[0]*f*s,c=p(o)>180;c^(s*itnt&&(nt=a):c^(s*it<(l=(l+360)%360-180)&&lnt&&(nt=e)),c?tDt(tt,rt)&&(rt=t):Dt(t,rt)>Dt(tt,rt)&&(tt=t):rt>=tt?(trt&&(rt=t)):t>it?Dt(tt,t)>Dt(tt,rt)&&(rt=t):Dt(t,rt)>Dt(tt,rt)&&(tt=t)}else lt.push(ct=[tt=t,rt=t]);ent&&(nt=e),st=r,it=t}function Ct(){St.point=Lt}function Pt(){ct[0]=tt,ct[1]=rt,St.point=Et,st=null}function It(t,e){if(st){var r=t-it;Mt.add(p(r)>180?r+(r>0?360:-360):r)}else at=t,ot=e;V.point(t,e),Lt(t,e)}function Ot(){V.lineStart()}function zt(){It(at,ot),V.lineEnd(),p(Mt)>o&&(tt=-(rt=180)),ct[0]=tt,ct[1]=rt,st=null}function Dt(t,e){return(e-=t)<0?e+360:e}function Rt(t,e){return t[0]-e[0]}function Ft(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:es?t+Math.round(-t/u)*u:t,e]}function Qt(t,e,r){return(t%=u)?e||r?Jt(te(t),ee(e,r)):te(t):e||r?ee(e,r):Kt}function $t(t){return function(e,r){return[(e+=t)>s?e-u:e<-s?e+u:e,r]}}function te(t){var e=$t(t);return e.invert=$t(-t),e}function ee(t,e){var r=m(t),n=_(t),i=m(e),a=_(e);function o(t,e){var o=m(e),s=m(t)*o,l=_(t)*o,c=_(e),u=c*r+s*n;return[g(l*i-u*a,s*r-c*n),M(u*i+l*a)]}return o.invert=function(t,e){var o=m(e),s=m(t)*o,l=_(t)*o,c=_(e),u=c*i-l*a;return[g(l*i+c*a,s*r+u*n),M(u*r-s*n)]},o}function re(t){function e(e){return(e=t(e[0]*h,e[1]*h))[0]*=f,e[1]*=f,e}return t=Qt(t[0]*h,t[1]*h,t.length>2?t[2]*h:0),e.invert=function(e){return(e=t.invert(e[0]*h,e[1]*h))[0]*=f,e[1]*=f,e},e}function ne(t,e,r,n,i,a){if(r){var o=m(e),s=_(e),l=n*r;null==i?(i=e+n*u,a=e-l/2):(i=ie(o,i),a=ie(o,a),(n>0?ia)&&(i+=n*u));for(var c,f=i;n>0?f>a:f1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}function oe(t,e){return p(t[0]-e[0])=0;--a)i.point((f=u[a])[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 ce(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n=0?1:-1,z=O*I,D=z>s,R=T*C;if(ue.add(g(R*O*_(z),k*P+R*m(z))),f+=D?I+O*u:I,D^b>=r^E>=r){var F=J(X(x),X(S));$(F);var B=J(a,F);$(B);var N=(D^I>=0?-1:1)*M(B[2]);(n>N||n===N&&(F[0]||F[1]))&&(h+=D^I>=0?1:-1)}}return(f<-o||f0){for(h||(a.polygonStart(),h=!0),a.lineStart(),t=0;t1&&2&i&&c.push(c.pop().concat(c.shift())),s.push(c.filter(de))}return p}}function de(t){return t.length>1}function ge(t,e){return((t=t.x)[0]<0?t[1]-l-o:l-t[1])-((e=e.x)[0]<0?e[1]-l-o:l-e[1])}var me=pe((function(){return!0}),(function(t){var e,r=NaN,n=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,c){var u=a>0?s:-s,f=p(a-r);p(f-s)0?l:-l),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(u,n),t.point(a,n),e=0):i!==u&&f>=s&&(p(r-i)o?d((_(e)*(a=m(n))*_(r)-_(n)*(i=m(e))*_(t))/(i*a*s)):(e+n)/2}(r,n,a,c),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(u,n),e=0),t.point(r=a,n=c),i=u},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}}),(function(t,e,r,n){var i;if(null==t)i=r*l,n.point(-s,i),n.point(0,i),n.point(s,i),n.point(s,0),n.point(s,-i),n.point(0,-i),n.point(-s,-i),n.point(-s,0),n.point(-s,i);else if(p(t[0]-e[0])>o){var a=t[0]0,i=p(e)>o;function a(t,r){return m(t)*m(r)>e}function l(t,r,n){var i=[1,0,0],a=J(X(t),X(r)),l=Z(a,a),c=a[0],u=l-c*c;if(!u)return!n&&t;var f=e*l/u,h=-e*c/u,d=J(i,a),g=Q(i,f);K(g,Q(a,h));var m=d,v=Z(g,m),y=Z(m,m),x=v*v-y*(Z(g,g)-1);if(!(x<0)){var b=T(x),_=Q(m,(-v-b)/y);if(K(_,g),_=W(_),!n)return _;var w,k=t[0],A=r[0],M=t[1],S=r[1];A0^_[1]<(p(_[0]-k)s^(k<=_[0]&&_[0]<=A)){var C=Q(m,(-v+b)/y);return K(C,g),[_,W(C)]}}}function c(e,r){var i=n?t:s-t,a=0;return e<-i?a|=1:e>i&&(a|=2),r<-i?a|=4:r>i&&(a|=8),a}return pe(a,(function(t){var e,r,o,u,f;return{lineStart:function(){u=o=!1,f=1},point:function(h,p){var d,g=[h,p],m=a(h,p),v=n?m?0:c(h,p):m?c(h+(h<0?s:-s),p):0;if(!e&&(u=o=m)&&t.lineStart(),m!==o&&(!(d=l(e,g))||oe(e,d)||oe(g,d))&&(g[2]=1),m!==o)f=0,m?(t.lineStart(),d=l(g,e),t.point(d[0],d[1])):(d=l(e,g),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&n^m){var y;v&r||!(y=l(g,e,!0))||(f=0,n?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!m||e&&oe(e,g)||t.point(g[0],g[1]),e=g,o=m,r=v},lineEnd:function(){o&&t.lineEnd(),e=null},clean:function(){return f|(u&&o)<<1}}}),(function(e,n,i,a){ne(a,t,r,i,e,n)}),n?[0,-t]:[-s,t-s])}function ye(t,r,n,i){function a(e,a){return t<=e&&e<=n&&r<=a&&a<=i}function s(e,a,o,s){var c=0,f=0;if(null==e||(c=l(e,o))!==(f=l(a,o))||u(e,a)<0^o>0)do{s.point(0===c||3===c?t:n,c>1?i:r)}while((c=(c+o+4)%4)!==f);else s.point(a[0],a[1])}function l(e,i){return p(e[0]-t)0?0:3:p(e[0]-n)0?2:1:p(e[1]-r)0?1:0:i>0?3:2}function c(t,e){return u(t.x,e.x)}function u(t,e){var r=l(t,1),n=l(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]}return function(o){var l,u,f,h,p,d,g,m,v,y,x,b=o,_=ae(),w={point:T,lineStart:function(){w.point=k,u&&u.push(f=[]);y=!0,v=!1,g=m=NaN},lineEnd:function(){l&&(k(h,p),d&&v&&_.rejoin(),l.push(_.result()));w.point=T,v&&b.lineEnd()},polygonStart:function(){b=_,l=[],u=[],x=!0},polygonEnd:function(){var r=function(){for(var e=0,r=0,n=u.length;ri&&(h-a)*(i-o)>(p-o)*(t-a)&&++e:p<=i&&(h-a)*(i-o)<(p-o)*(t-a)&&--e;return e}(),n=x&&r,a=(l=e.merge(l)).length;(n||a)&&(o.polygonStart(),n&&(o.lineStart(),s(null,null,1,o),o.lineEnd()),a&&le(l,c,r,s,o),o.polygonEnd());b=o,l=u=f=null}};function T(t,e){a(t,e)&&b.point(t,e)}function k(e,o){var s=a(e,o);if(u&&f.push([e,o]),y)h=e,p=o,d=s,y=!1,s&&(b.lineStart(),b.point(e,o));else if(s&&v)b.point(e,o);else{var l=[g=Math.max(-1e9,Math.min(1e9,g)),m=Math.max(-1e9,Math.min(1e9,m))],c=[e=Math.max(-1e9,Math.min(1e9,e)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,r,n,i,a){var o,s=t[0],l=t[1],c=0,u=1,f=e[0]-s,h=e[1]-l;if(o=r-s,f||!(o>0)){if(o/=f,f<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=i-s,f||!(o<0)){if(o/=f,f<0){if(o>u)return;o>c&&(c=o)}else if(f>0){if(o0)){if(o/=h,h<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=a-l,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>c&&(c=o)}else if(h>0){if(o0&&(t[0]=s+c*f,t[1]=l+c*h),u<1&&(e[0]=s+u*f,e[1]=l+u*h),!0}}}}}(l,c,t,r,n,i)?s&&(b.lineStart(),b.point(e,o),x=!1):(v||(b.lineStart(),b.point(l[0],l[1])),b.point(c[0],c[1]),s||b.lineEnd(),x=!1)}g=e,m=o,v=s}return w}}var xe,be,_e,we=r(),Te={sphere:E,point:E,lineStart:function(){Te.point=Ae,Te.lineEnd=ke},lineEnd:E,polygonStart:E,polygonEnd:E};function ke(){Te.point=Te.lineEnd=E}function Ae(t,e){xe=t*=h,be=_(e*=h),_e=m(e),Te.point=Me}function Me(t,e){t*=h;var r=_(e*=h),n=m(e),i=p(t-xe),a=m(i),o=n*_(i),s=_e*r-be*n*a,l=be*r+_e*n*a;we.add(g(T(o*o+s*s),l)),xe=t,be=r,_e=n}function Se(t){return we.reset(),z(t,Te),+we}var Ee=[null,null],Le={type:\"LineString\",coordinates:Ee};function Ce(t,e){return Ee[0]=t,Ee[1]=e,Se(Le)}var Pe={Feature:function(t,e){return Oe(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n0&&(i=Ce(t[a],t[a-1]))>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))<1e-12*i)return!0;r=n}return!1}function Re(t,e){return!!he(t.map(Fe),Be(e))}function Fe(t){return(t=t.map(Be)).pop(),t}function Be(t){return[t[0]*h,t[1]*h]}function Ne(t,r,n){var i=e.range(t,r-o,n).concat(r);return function(t){return i.map((function(e){return[t,e]}))}}function je(t,r,n){var i=e.range(t,r-o,n).concat(r);return function(t){return i.map((function(e){return[e,t]}))}}function Ue(){var t,r,n,i,a,s,l,c,u,f,h,d,g=10,m=g,y=90,x=360,b=2.5;function _(){return{type:\"MultiLineString\",coordinates:w()}}function w(){return e.range(v(i/y)*y,n,y).map(h).concat(e.range(v(c/x)*x,l,x).map(d)).concat(e.range(v(r/g)*g,t,g).filter((function(t){return p(t%y)>o})).map(u)).concat(e.range(v(s/m)*m,a,m).filter((function(t){return p(t%x)>o})).map(f))}return _.lines=function(){return w().map((function(t){return{type:\"LineString\",coordinates:t}}))},_.outline=function(){return{type:\"Polygon\",coordinates:[h(i).concat(d(l).slice(1),h(n).reverse().slice(1),d(c).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],c=+t[0][1],l=+t[1][1],i>n&&(t=i,i=n,n=t),c>l&&(t=c,c=l,l=t),_.precision(b)):[[i,c],[n,l]]},_.extentMinor=function(e){return arguments.length?(r=+e[0][0],t=+e[1][0],s=+e[0][1],a=+e[1][1],r>t&&(e=r,r=t,t=e),s>a&&(e=s,s=a,a=e),_.precision(b)):[[r,s],[t,a]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(y=+t[0],x=+t[1],_):[y,x]},_.stepMinor=function(t){return arguments.length?(g=+t[0],m=+t[1],_):[g,m]},_.precision=function(e){return arguments.length?(b=+e,u=Ne(s,a,90),f=je(r,t,b),h=Ne(c,l,90),d=je(i,n,b),_):b},_.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function Ve(t){return t}var He,qe,Ge,Ye,We=r(),Xe=r(),Ze={point:E,lineStart:E,lineEnd:E,polygonStart:function(){Ze.lineStart=Je,Ze.lineEnd=$e},polygonEnd:function(){Ze.lineStart=Ze.lineEnd=Ze.point=E,We.add(p(Xe)),Xe.reset()},result:function(){var t=We/2;return We.reset(),t}};function Je(){Ze.point=Ke}function Ke(t,e){Ze.point=Qe,He=Ge=t,qe=Ye=e}function Qe(t,e){Xe.add(Ye*t-Ge*e),Ge=t,Ye=e}function $e(){Qe(He,qe)}var tr=1/0,er=tr,rr=-tr,nr=rr,ir={point:function(t,e){trr&&(rr=t);enr&&(nr=e)},lineStart:E,lineEnd:E,polygonStart:E,polygonEnd:E,result:function(){var t=[[tr,er],[rr,nr]];return rr=nr=-(er=tr=1/0),t}};var ar,or,sr,lr,cr=0,ur=0,fr=0,hr=0,pr=0,dr=0,gr=0,mr=0,vr=0,yr={point:xr,lineStart:br,lineEnd:Tr,polygonStart:function(){yr.lineStart=kr,yr.lineEnd=Ar},polygonEnd:function(){yr.point=xr,yr.lineStart=br,yr.lineEnd=Tr},result:function(){var t=vr?[gr/vr,mr/vr]:dr?[hr/dr,pr/dr]:fr?[cr/fr,ur/fr]:[NaN,NaN];return cr=ur=fr=hr=pr=dr=gr=mr=vr=0,t}};function xr(t,e){cr+=t,ur+=e,++fr}function br(){yr.point=_r}function _r(t,e){yr.point=wr,xr(sr=t,lr=e)}function wr(t,e){var r=t-sr,n=e-lr,i=T(r*r+n*n);hr+=i*(sr+t)/2,pr+=i*(lr+e)/2,dr+=i,xr(sr=t,lr=e)}function Tr(){yr.point=xr}function kr(){yr.point=Mr}function Ar(){Sr(ar,or)}function Mr(t,e){yr.point=Sr,xr(ar=sr=t,or=lr=e)}function Sr(t,e){var r=t-sr,n=e-lr,i=T(r*r+n*n);hr+=i*(sr+t)/2,pr+=i*(lr+e)/2,dr+=i,gr+=(i=lr*t-sr*e)*(sr+t),mr+=i*(lr+e),vr+=3*i,xr(sr=t,lr=e)}function Er(t){this._context=t}Er.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,u)}},result:E};var Lr,Cr,Pr,Ir,Or,zr=r(),Dr={point:E,lineStart:function(){Dr.point=Rr},lineEnd:function(){Lr&&Fr(Cr,Pr),Dr.point=E},polygonStart:function(){Lr=!0},polygonEnd:function(){Lr=null},result:function(){var t=+zr;return zr.reset(),t}};function Rr(t,e){Dr.point=Fr,Cr=Ir=t,Pr=Or=e}function Fr(t,e){Ir-=t,Or-=e,zr.add(T(Ir*Ir+Or*Or)),Ir=t,Or=e}function Br(){this._string=[]}function Nr(t){return\"m0,\"+t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+-2*t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+2*t+\"z\"}function jr(t){return function(e){var r=new Ur;for(var n in t)r[n]=t[n];return r.stream=e,r}}function Ur(){}function Vr(t,e,r){var n=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=n&&t.clipExtent(null),z(r,t.stream(ir)),e(ir.result()),null!=n&&t.clipExtent(n),t}function Hr(t,e,r){return Vr(t,(function(r){var n=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(n/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),o=+e[0][0]+(n-a*(r[1][0]+r[0][0]))/2,s=+e[0][1]+(i-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([o,s])}),r)}function qr(t,e,r){return Hr(t,[[0,0],e],r)}function Gr(t,e,r){return Vr(t,(function(r){var n=+e,i=n/(r[1][0]-r[0][0]),a=(n-i*(r[1][0]+r[0][0]))/2,o=-i*r[0][1];t.scale(150*i).translate([a,o])}),r)}function Yr(t,e,r){return Vr(t,(function(r){var n=+e,i=n/(r[1][1]-r[0][1]),a=-i*r[0][0],o=(n-i*(r[1][1]+r[0][1]))/2;t.scale(150*i).translate([a,o])}),r)}Br.prototype={_radius:4.5,_circle:Nr(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push(\"Z\"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push(\"M\",t,\",\",e),this._point=1;break;case 1:this._string.push(\"L\",t,\",\",e);break;default:null==this._circle&&(this._circle=Nr(this._radius)),this._string.push(\"M\",t,\",\",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join(\"\");return this._string=[],t}return null}},Ur.prototype={constructor:Ur,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()}};var Wr=m(30*h);function Xr(t,e){return+e?function(t,e){function r(n,i,a,s,l,c,u,f,h,d,m,v,y,x){var b=u-n,_=f-i,w=b*b+_*_;if(w>4*e&&y--){var k=s+d,A=l+m,S=c+v,E=T(k*k+A*A+S*S),L=M(S/=E),C=p(p(S)-1)e||p((b*z+_*D)/w-.5)>.3||s*d+l*m+c*v2?t[2]%360*h:0,I()):[y*f,x*f,b*f]},C.angle=function(t){return arguments.length?(_=t%360*h,I()):_*f},C.reflectX=function(t){return arguments.length?(w=t?-1:1,I()):w<0},C.reflectY=function(t){return arguments.length?(k=t?-1:1,I()):k<0},C.precision=function(t){return arguments.length?(o=Xr(s,L=t*t),O()):T(L)},C.fitExtent=function(t,e){return Hr(C,t,e)},C.fitSize=function(t,e){return qr(C,t,e)},C.fitWidth=function(t,e){return Gr(C,t,e)},C.fitHeight=function(t,e){return Yr(C,t,e)},function(){return e=t.apply(this,arguments),C.invert=e.invert&&P,I()}}function tn(t){var e=0,r=s/3,n=$r(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*h,r=t[1]*h):[e*f,r*f]},i}function en(t,e){var r=_(t),n=(r+_(e))/2;if(p(n)0?e<-l+o&&(e=-l+o):e>l-o&&(e=l-o);var r=i/b(fn(e),n);return[r*_(n*t),i-r*m(n*t)]}return a.invert=function(t,e){var r=i-e,a=w(n)*T(t*t+r*r),o=g(t,p(r))*w(r);return r*n<0&&(o-=s*w(t)*w(r)),[o/n,2*d(b(i/a,1/n))-l]},a}function pn(t,e){return[t,e]}function dn(t,e){var r=m(t),n=t===e?_(t):(r-m(e))/(e-t),i=r/n+t;if(p(n)o&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},Tn.invert=on(M),kn.invert=on((function(t){return 2*d(t)})),An.invert=function(t,e){return[-e,2*d(y(t))-l]},t.geoAlbers=nn,t.geoAlbersUsa=function(){var t,e,r,n,i,a,s=nn(),l=rn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=rn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){a=[t,e]}};function f(t){var e=t[0],o=t[1];return a=null,r.point(e,o),a||(n.point(e,o),a)||(i.point(e,o),a)}function h(){return t=e=null,f}return f.invert=function(t){var e=s.scale(),r=s.translate(),n=(t[0]-r[0])/e,i=(t[1]-r[1])/e;return(i>=.12&&i<.234&&n>=-.425&&n<-.214?l:i>=.166&&i<.234&&n>=-.214&&n<-.115?c:s).invert(t)},f.stream=function(r){return t&&e===r?t:(n=[s.stream(e=r),l.stream(r),c.stream(r)],i=n.length,t={point:function(t,e){for(var r=-1;++rDt(n[0],n[1])&&(n[1]=i[1]),Dt(i[0],n[1])>Dt(n[0],n[1])&&(n[0]=i[0])):a.push(n=i);for(o=-1/0,e=0,n=a[r=a.length-1];e<=r;n=i,++e)i=a[e],(s=Dt(n[1],i[0]))>o&&(o=s,tt=i[0],rt=n[1])}return lt=ct=null,tt===1/0||et===1/0?[[NaN,NaN],[NaN,NaN]]:[[tt,et],[rt,nt]]},t.geoCentroid=function(t){ut=ft=ht=pt=dt=gt=mt=vt=yt=xt=bt=0,z(t,Bt);var e=yt,r=xt,n=bt,i=e*e+r*r+n*n;return i<1e-12&&(e=gt,r=mt,n=vt,ft2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90]).scale(159.155)},t.geoTransverseMercatorRaw=An,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{\"d3-array\":107}],115:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){\"use strict\";function e(t,e){return t.parent===e.parent?1:2}function r(t,e){return t+e.x}function n(t,e){return Math.max(t,e.y)}function i(t){var e=0,r=t.children,n=r&&r.length;if(n)for(;--n>=0;)e+=r[n].value;else e=1;t.value=e}function a(t,e){var r,n,i,a,s,u=new c(t),f=+t.value&&(u.value=t.value),h=[u];for(null==e&&(e=o);r=h.pop();)if(f&&(r.value=+r.data.value),(i=e(r.data))&&(s=i.length))for(r.children=new Array(s),a=s-1;a>=0;--a)h.push(n=r.children[a]=new c(i[a])),n.parent=r,n.depth=r.depth+1;return u.eachBefore(l)}function o(t){return t.children}function s(t){t.data=t.data.data}function l(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function c(t){this.data=t,this.depth=this.height=0,this.parent=null}c.prototype=a.prototype={constructor:c,count:function(){return this.eachAfter(i)},each:function(t){var e,r,n,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),r=a.children)for(n=0,i=r.length;n=0;--r)i.push(e[r]);return this},sum:function(t){return this.eachAfter((function(e){for(var r=+t(e.data)||0,n=e.children,i=n&&n.length;--i>=0;)r+=n[i].value;e.value=r}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),i=null;t=r.pop(),e=n.pop();for(;t===e;)i=t,t=r.pop(),e=n.pop();return i}(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var i=n.length;t!==r;)n.splice(i,0,t),t=t.parent;return n},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(r){r!==t&&e.push({source:r.parent,target:r})})),e},copy:function(){return a(this).eachBefore(s)}};var u=Array.prototype.slice;function f(t){for(var e,r,n=0,i=(t=function(t){for(var e,r,n=t.length;n;)r=Math.random()*n--|0,e=t[n],t[n]=t[r],t[r]=e;return t}(u.call(t))).length,a=[];n0&&r*r>n*n+i*i}function g(t,e){for(var r=0;r(o*=o)?(n=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-n*n)),r.x=t.x-n*s-a*l,r.y=t.y-n*l+a*s):(n=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-n*n)),r.x=e.x+n*s-a*l,r.y=e.y+n*l+a*s)):(r.x=e.x+r.r,r.y=e.y)}function b(t,e){var r=t.r+e.r-1e-6,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function _(t){var e=t._,r=t.next._,n=e.r+r.r,i=(e.x*r.r+r.x*e.r)/n,a=(e.y*r.r+r.y*e.r)/n;return i*i+a*a}function w(t){this._=t,this.next=null,this.previous=null}function T(t){if(!(i=t.length))return 0;var e,r,n,i,a,o,s,l,c,u,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(r=t[1],e.x=-r.r,r.x=e.r,r.y=0,!(i>2))return e.r+r.r;x(r,e,n=t[2]),e=new w(e),r=new w(r),n=new w(n),e.next=n.previous=r,r.next=e.previous=n,n.next=r.previous=e;t:for(s=3;sh&&(h=s),m=u*u*g,(p=Math.max(h/m,m/f))>d){u-=s;break}d=p}v.push(o={value:u,dice:l1?e:1)},r}(G);var X=function t(e){function r(t,r,n,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,l,c,u,f=-1,h=o.length,p=t.value;++f1?e:1)},r}(G);t.cluster=function(){var t=e,i=1,a=1,o=!1;function s(e){var s,l=0;e.eachAfter((function(e){var i=e.children;i?(e.x=function(t){return t.reduce(r,0)/t.length}(i),e.y=function(t){return 1+t.reduce(n,0)}(i)):(e.x=s?l+=t(e,s):0,e.y=0,s=e)}));var c=function(t){for(var e;e=t.children;)t=e[0];return t}(e),u=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),f=c.x-t(c,u)/2,h=u.x+t(u,c)/2;return e.eachAfter(o?function(t){t.x=(t.x-e.x)*i,t.y=(e.y-t.y)*a}:function(t){t.x=(t.x-f)/(h-f)*i,t.y=(1-(e.y?t.y/e.y:1))*a})}return s.separation=function(e){return arguments.length?(t=e,s):t},s.size=function(t){return arguments.length?(o=!1,i=+t[0],a=+t[1],s):o?null:[i,a]},s.nodeSize=function(t){return arguments.length?(o=!0,i=+t[0],a=+t[1],s):o?[i,a]:null},s},t.hierarchy=a,t.pack=function(){var t=null,e=1,r=1,n=M;function i(i){return i.x=e/2,i.y=r/2,t?i.eachBefore(L(t)).eachAfter(C(n,.5)).eachBefore(P(1)):i.eachBefore(L(E)).eachAfter(C(M,1)).eachAfter(C(n,i.r/Math.min(e,r))).eachBefore(P(Math.min(e,r)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=k(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],r=+t[1],i):[e,r]},i.padding=function(t){return arguments.length?(n=\"function\"==typeof t?t:S(+t),i):n},i},t.packEnclose=f,t.packSiblings=function(t){return T(t),t},t.partition=function(){var t=1,e=1,r=0,n=!1;function i(i){var a=i.height+1;return i.x0=i.y0=r,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(n){n.children&&O(n,n.x0,t*(n.depth+1)/e,n.x1,t*(n.depth+2)/e);var i=n.x0,a=n.y0,o=n.x1-r,s=n.y1-r;o0)throw new Error(\"cycle\");return a}return r.id=function(e){return arguments.length?(t=A(e),r):t},r.parentId=function(t){return arguments.length?(e=A(t),r):e},r},t.tree=function(){var t=B,e=1,r=1,n=null;function i(i){var l=function(t){for(var e,r,n,i,a,o=new H(t,0),s=[o];e=s.pop();)if(n=e._.children)for(e.children=new Array(a=n.length),i=a-1;i>=0;--i)s.push(r=e.children[i]=new H(n[i],i)),r.parent=e;return(o.parent=new H(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),n)i.eachBefore(s);else{var c=i,u=i,f=i;i.eachBefore((function(t){t.xu.x&&(u=t),t.depth>f.depth&&(f=t)}));var h=c===u?1:t(c,u)/2,p=h-c.x,d=e/(u.x+h+p),g=r/(f.depth||1);i.eachBefore((function(t){t.x=(t.x+p)*d,t.y=t.depth*g}))}return i}function a(e){var r=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(r){!function(t){for(var e,r=0,n=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(e);var a=(r[0].z+r[r.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,r,n){if(r){for(var i,a=e,o=e,s=r,l=a.parent.children[0],c=a.m,u=o.m,f=s.m,h=l.m;s=j(s),a=N(a),s&&a;)l=N(l),(o=j(o)).a=e,(i=s.z+f-a.z-c+t(s._,a._))>0&&(U(V(s,e,n),e,i),c+=i,u+=i),f+=s.m,c+=a.m,h+=l.m,u+=o.m;s&&!j(o)&&(o.t=s,o.m+=f-u),a&&!N(l)&&(l.t=a,l.m+=c-h,n=e)}return n}(e,i,e.parent.A||n[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*r}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(n=!1,e=+t[0],r=+t[1],i):n?null:[e,r]},i.nodeSize=function(t){return arguments.length?(n=!0,e=+t[0],r=+t[1],i):n?[e,r]:null},i},t.treemap=function(){var t=W,e=!1,r=1,n=1,i=[0],a=M,o=M,s=M,l=M,c=M;function u(t){return t.x0=t.y0=0,t.x1=r,t.y1=n,t.eachBefore(f),i=[0],e&&t.eachBefore(I),t}function f(e){var r=i[e.depth],n=e.x0+r,u=e.y0+r,f=e.x1-r,h=e.y1-r;f=r-1){var u=s[e];return u.x0=i,u.y0=a,u.x1=o,void(u.y1=l)}var f=c[e],h=n/2+f,p=e+1,d=r-1;for(;p>>1;c[g]l-a){var y=(i*v+o*m)/n;t(e,p,m,i,a,y,l),t(p,r,v,y,a,o,l)}else{var x=(a*v+l*m)/n;t(e,p,m,i,a,o,x),t(p,r,v,i,x,o,l)}}(0,l,t.value,e,r,n,i)},t.treemapDice=O,t.treemapResquarify=X,t.treemapSlice=q,t.treemapSliceDice=function(t,e,r,n,i){(1&t.depth?q:O)(t,e,r,n,i)},t.treemapSquarify=W,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],116:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-color\")):i((n=n||self).d3=n.d3||{},n.d3)}(this,(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=i180||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;na&&(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:y(r,n)})),a=_.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+\"rotate(\",null,n)-2,x:y(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:y(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:y(t,r)},{i:s-2,x:y(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;++r1e-6)if(Math.abs(f*l-c*u)>1e-6&&a){var p=n-o,d=i-s,g=l*l+c*c,m=p*p+d*d,v=Math.sqrt(g),y=Math.sqrt(h),x=a*Math.tan((e-Math.acos((g+h-m)/(2*v*y)))/2),b=x/y,_=x/v;Math.abs(b-1)>1e-6&&(this._+=\"L\"+(t+b*u)+\",\"+(r+b*f)),this._+=\"A\"+a+\",\"+a+\",0,0,\"+ +(f*p>u*d)+\",\"+(this._x1=t+_*l)+\",\"+(this._y1=r+_*c)}else this._+=\"L\"+(this._x1=t)+\",\"+(this._y1=r);else;},arc:function(t,i,a,o,s,l){t=+t,i=+i,l=!!l;var c=(a=+a)*Math.cos(o),u=a*Math.sin(o),f=t+c,h=i+u,p=1^l,d=l?o-s:s-o;if(a<0)throw new Error(\"negative radius: \"+a);null===this._x1?this._+=\"M\"+f+\",\"+h:(Math.abs(this._x1-f)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+=\"L\"+f+\",\"+h),a&&(d<0&&(d=d%r+r),d>n?this._+=\"A\"+a+\",\"+a+\",0,1,\"+p+\",\"+(t-c)+\",\"+(i-u)+\"A\"+a+\",\"+a+\",0,1,\"+p+\",\"+(this._x1=f)+\",\"+(this._y1=h):d>1e-6&&(this._+=\"A\"+a+\",\"+a+\",0,\"+ +(d>=e)+\",\"+p+\",\"+(this._x1=t+a*Math.cos(s))+\",\"+(this._y1=i+a*Math.sin(s))))},rect:function(t,e,r,n){this._+=\"M\"+(this._x0=this._x1=+t)+\",\"+(this._y0=this._y1=+e)+\"h\"+ +r+\"v\"+ +n+\"h\"+-r+\"Z\"},toString:function(){return this._}},t.path=a,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],118:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(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,m=t._y0,v=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(a=(g+v)/2))?g=a:v=a,(u=r>=(o=(m+y)/2))?m=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+v)/2))?g=a:v=a,(u=r>=(o=(m+y)/2))?m=o:y=o}while((f=u<<1|c)==(h=(l>=o)<<1|s>=a));return i[h]=p,i[f]=d,t}function r(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;nf&&(f=i),ah&&(h=a));if(c>f||u>h)return this;for(this.cover(c,u).cover(f,h),n=0;nt||t>=i||n>e||e>=a;)switch(s=(ep||(o=c.y0)>d||(s=c.x1)=y)<<1|t>=v)&&(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,m.data),b=e-+this._y.call(null,m.data),_=x*x+b*b;if(_=(s=(d+m)/2))?d=s:m=s,(u=o>=(l=(g+v)/2))?g=l:v=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;e1?0:t<-1?u:Math.acos(t)}function d(t){return t>=1?f:t<=-1?-f:Math.asin(t)}function g(t){return t.innerRadius}function m(t){return t.outerRadius}function v(t){return t.startAngle}function y(t){return t.endAngle}function x(t){return t&&t.padAngle}function b(t,e,r,n,i,a,o,s){var l=r-t,c=n-e,u=o-i,f=s-a,h=f*l-u*c;if(!(h*h<1e-12))return[t+(h=(u*(e-a)-f*(t-i))/h)*l,e+h*c]}function _(t,e,r,n,i,a,s){var l=t-r,u=e-n,f=(s?a:-a)/c(l*l+u*u),h=f*u,p=-f*l,d=t+h,g=e+p,m=r+h,v=n+p,y=(d+m)/2,x=(g+v)/2,b=m-d,_=v-g,w=b*b+_*_,T=i-a,k=d*v-m*g,A=(_<0?-1:1)*c(o(0,T*T*w-k*k)),M=(k*_-b*A)/w,S=(-k*b-_*A)/w,E=(k*_+b*A)/w,L=(-k*b+_*A)/w,C=M-y,P=S-x,I=E-y,O=L-x;return C*C+P*P>I*I+O*O&&(M=E,S=L),{cx:M,cy:S,x01:-h,y01:-p,x11:M*(i/T-1),y11:S*(i/T-1)}}function w(t){this._context=t}function T(t){return new w(t)}function k(t){return t[0]}function A(t){return t[1]}function M(){var t=k,n=A,i=r(!0),a=null,o=T,s=null;function l(r){var l,c,u,f=r.length,h=!1;for(null==a&&(s=o(u=e.path())),l=0;l<=f;++l)!(l=f;--h)c.point(v[h],y[h]);c.lineEnd(),c.areaEnd()}m&&(v[u]=+t(p,u,r),y[u]=+i(p,u,r),c.point(n?+n(p,u,r):v[u],a?+a(p,u,r):y[u]))}if(d)return c=null,d+\"\"||null}function f(){return M().defined(o).curve(l).context(s)}return u.x=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),n=null,u):t},u.x0=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),u):t},u.x1=function(t){return arguments.length?(n=null==t?null:\"function\"==typeof t?t:r(+t),u):n},u.y=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),a=null,u):i},u.y0=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),u):i},u.y1=function(t){return arguments.length?(a=null==t?null:\"function\"==typeof t?t:r(+t),u):a},u.lineX0=u.lineY0=function(){return f().x(t).y(i)},u.lineY1=function(){return f().x(t).y(a)},u.lineX1=function(){return f().x(n).y(i)},u.defined=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(!!t),u):o},u.curve=function(t){return arguments.length?(l=t,null!=s&&(c=l(s)),u):l},u.context=function(t){return arguments.length?(null==t?s=c=null:c=l(s=t),u):s},u}function E(t,e){return et?1:e>=t?0:NaN}function L(t){return t}w.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var C=I(T);function P(t){this._curve=t}function I(t){function e(e){return new P(t(e))}return e._curve=t,e}function O(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(I(t)):e()._curve},t}function z(){return O(M().curve(C))}function D(){var t=S().curve(C),e=t.curve,r=t.lineX0,n=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return O(r())},delete t.lineX0,t.lineEndAngle=function(){return O(n())},delete t.lineX1,t.lineInnerRadius=function(){return O(i())},delete t.lineY0,t.lineOuterRadius=function(){return O(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(I(t)):e()._curve},t}function R(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var F=Array.prototype.slice;function B(t){return t.source}function N(t){return t.target}function j(t){var n=B,i=N,a=k,o=A,s=null;function l(){var r,l=F.call(arguments),c=n.apply(this,l),u=i.apply(this,l);if(s||(s=r=e.path()),t(s,+a.apply(this,(l[0]=c,l)),+o.apply(this,l),+a.apply(this,(l[0]=u,l)),+o.apply(this,l)),r)return s=null,r+\"\"||null}return l.source=function(t){return arguments.length?(n=t,l):n},l.target=function(t){return arguments.length?(i=t,l):i},l.x=function(t){return arguments.length?(a=\"function\"==typeof t?t:r(+t),l):a},l.y=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(+t),l):o},l.context=function(t){return arguments.length?(s=null==t?null:t,l):s},l}function U(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function V(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e,r=(r+i)/2,n,r,n,i)}function H(t,e,r,n,i){var a=R(e,r),o=R(e,r=(r+i)/2),s=R(n,r),l=R(n,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],l[0],l[1])}var q={draw:function(t,e){var r=Math.sqrt(e/u);t.moveTo(r,0),t.arc(0,0,r,0,h)}},G={draw:function(t,e){var r=Math.sqrt(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Y=Math.sqrt(1/3),W=2*Y,X={draw:function(t,e){var r=Math.sqrt(e/W),n=r*Y;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},Z=Math.sin(u/10)/Math.sin(7*u/10),J=Math.sin(h/10)*Z,K=-Math.cos(h/10)*Z,Q={draw:function(t,e){var r=Math.sqrt(.8908130915292852*e),n=J*r,i=K*r;t.moveTo(0,-r),t.lineTo(n,i);for(var a=1;a<5;++a){var o=h*a/5,s=Math.cos(o),l=Math.sin(o);t.lineTo(l*r,-s*r),t.lineTo(s*n-l*i,l*n+s*i)}t.closePath()}},$={draw:function(t,e){var r=Math.sqrt(e),n=-r/2;t.rect(n,n,r,r)}},tt=Math.sqrt(3),et={draw:function(t,e){var r=-Math.sqrt(e/(3*tt));t.moveTo(0,2*r),t.lineTo(-tt*r,-r),t.lineTo(tt*r,-r),t.closePath()}},rt=-.5,nt=Math.sqrt(3)/2,it=1/Math.sqrt(12),at=3*(it/2+1),ot={draw:function(t,e){var r=Math.sqrt(e/at),n=r/2,i=r*it,a=n,o=r*it+r,s=-a,l=o;t.moveTo(n,i),t.lineTo(a,o),t.lineTo(s,l),t.lineTo(rt*n-nt*i,nt*n+rt*i),t.lineTo(rt*a-nt*o,nt*a+rt*o),t.lineTo(rt*s-nt*l,nt*s+rt*l),t.lineTo(rt*n+nt*i,rt*i-nt*n),t.lineTo(rt*a+nt*o,rt*o-nt*a),t.lineTo(rt*s+nt*l,rt*l-nt*s),t.closePath()}},st=[q,G,X,$,Q,et,ot];function lt(){}function ct(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function ut(t){this._context=t}function ft(t){this._context=t}function ht(t){this._context=t}function pt(t,e){this._basis=new ut(t),this._beta=e}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ct(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ft.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ht.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},pt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n,i=t[0],a=e[0],o=t[r]-i,s=e[r]-a,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+n*o),this._beta*e[l]+(1-this._beta)*(a+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var dt=function t(e){function r(t){return 1===e?new ut(t):new pt(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function gt(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function mt(t,e){this._context=t,this._k=(1-e)/6}mt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:gt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var vt=function t(e){function r(t){return new mt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function yt(t,e){this._context=t,this._k=(1-e)/6}yt.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var xt=function t(e){function r(t){return new yt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function bt(t,e){this._context=t,this._k=(1-e)/6}bt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var _t=function t(e){function r(t){return new bt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function wt(t,e,r){var n=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>1e-12){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*c+t._y1*t._l23_2a-r*t._l12_2a)/u}t._context.bezierCurveTo(n,i,a,o,t._x2,t._y2)}function Tt(t,e){this._context=t,this._alpha=e}Tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var kt=function t(e){function r(t){return e?new Tt(t,e):new mt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function At(t,e){this._context=t,this._alpha=e}At.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Mt=function t(e){function r(t){return e?new At(t,e):new yt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function St(t,e){this._context=t,this._alpha=e}St.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Et=function t(e){function r(t){return e?new St(t,e):new bt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Lt(t){this._context=t}function Ct(t){return t<0?-1:1}function Pt(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),o=(r-t._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Ct(a)+Ct(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function It(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Ot(t,e,r){var n=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-n)/3;t._context.bezierCurveTo(n+s,i+s*e,a-s,o-s*r,a,o)}function zt(t){this._context=t}function Dt(t){this._context=new Rt(t)}function Rt(t){this._context=t}function Ft(t){this._context=t}function Bt(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[n-1]=(t[n]+i[n-1])/2,e=0;e1)for(var r,n,i,a=1,o=t[e[0]],s=o.length;a=0;)r[e]=e;return r}function Vt(t,e){return t[e]}function Ht(t){var e=t.map(qt);return Ut(t).sort((function(t,r){return e[t]-e[r]}))}function qt(t){for(var e,r=-1,n=0,i=t.length,a=-1/0;++ra&&(a=e,n=r);return n}function Gt(t){var e=t.map(Yt);return Ut(t).sort((function(t,r){return e[t]-e[r]}))}function Yt(t){for(var e,r=0,n=-1,i=t.length;++n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},t.arc=function(){var t=g,o=m,w=r(0),T=null,k=v,A=y,M=x,S=null;function E(){var r,g,m=+t.apply(this,arguments),v=+o.apply(this,arguments),y=k.apply(this,arguments)-f,x=A.apply(this,arguments)-f,E=n(x-y),L=x>y;if(S||(S=r=e.path()),v1e-12)if(E>h-1e-12)S.moveTo(v*a(y),v*l(y)),S.arc(0,0,v,y,x,!L),m>1e-12&&(S.moveTo(m*a(x),m*l(x)),S.arc(0,0,m,x,y,L));else{var C,P,I=y,O=x,z=y,D=x,R=E,F=E,B=M.apply(this,arguments)/2,N=B>1e-12&&(T?+T.apply(this,arguments):c(m*m+v*v)),j=s(n(v-m)/2,+w.apply(this,arguments)),U=j,V=j;if(N>1e-12){var H=d(N/m*l(B)),q=d(N/v*l(B));(R-=2*H)>1e-12?(z+=H*=L?1:-1,D-=H):(R=0,z=D=(y+x)/2),(F-=2*q)>1e-12?(I+=q*=L?1:-1,O-=q):(F=0,I=O=(y+x)/2)}var G=v*a(I),Y=v*l(I),W=m*a(D),X=m*l(D);if(j>1e-12){var Z,J=v*a(O),K=v*l(O),Q=m*a(z),$=m*l(z);if(E1e-12?V>1e-12?(C=_(Q,$,G,Y,v,V,L),P=_(J,K,W,X,v,V,L),S.moveTo(C.cx+C.x01,C.cy+C.y01),V1e-12&&R>1e-12?U>1e-12?(C=_(W,X,J,K,m,-U,L),P=_(G,Y,Q,$,m,-U,L),S.lineTo(C.cx+C.x01,C.cy+C.y01),U0&&(d+=f);for(null!=e?g.sort((function(t,r){return e(m[t],m[r])})):null!=n&&g.sort((function(t,e){return n(r[t],r[e])})),s=0,c=d?(y-p*b)/d:0;s0?f*c:0)+b,m[l]={data:r[l],index:s,value:f,startAngle:v,endAngle:u,padAngle:x};return m}return s.value=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),s):i},s.endAngle=function(t){return arguments.length?(a=\"function\"==typeof t?t:r(+t),s):a},s.padAngle=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(+t),s):o},s},t.pointRadial=R,t.radialArea=D,t.radialLine=z,t.stack=function(){var t=r([]),e=Ut,n=jt,i=Vt;function a(r){var a,o,s=t.apply(this,arguments),l=r.length,c=s.length,u=new Array(c);for(a=0;a0)for(var r,n,i,a,o,s,l=0,c=t[e[0]].length;l0?(n[0]=a,n[1]=a+=i):i<0?(n[1]=o,n[0]=o+=i):(n[0]=0,n[1]=i)},t.stackOffsetExpand=function(t,e){if((n=t.length)>0){for(var r,n,i,a=0,o=t[0].length;a0){for(var r,n=0,i=t[e[0]],a=i.length;n0&&(n=(r=t[e[0]]).length)>0){for(var r,n,i,a=0,o=1;o=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:mt,s:vt,S:H,u:q,U:G,V:Y,w:W,W:X,x:null,X:null,y:Z,Y:J,Z:K,\"%\":gt},Ct={a:function(t){return f[t.getUTCDay()]},A:function(t){return u[t.getUTCDay()]},b:function(t){return yt[t.getUTCMonth()]},B:function(t){return h[t.getUTCMonth()]},c:null,d:Q,e:Q,f:nt,H:$,I:tt,j:et,L:rt,m:it,M:at,p:function(t){return c[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:mt,s:vt,S:ot,u:st,U:lt,V:ct,w:ut,W:ft,x:null,X:null,y:ht,Y:pt,Z:dt,\"%\":gt},Pt={a:function(t,e,r){var n=Tt.exec(e.slice(r));return n?(t.w=kt[n[0].toLowerCase()],r+n[0].length):-1},A:function(t,e,r){var n=_t.exec(e.slice(r));return n?(t.w=wt[n[0].toLowerCase()],r+n[0].length):-1},b:function(t,e,r){var n=St.exec(e.slice(r));return n?(t.m=Et[n[0].toLowerCase()],r+n[0].length):-1},B:function(t,e,r){var n=At.exec(e.slice(r));return n?(t.m=Mt[n[0].toLowerCase()],r+n[0].length):-1},c:function(t,e,r){return zt(t,a,e,r)},d:A,e:A,f:P,H:S,I:S,j:M,L:C,m:k,M:E,p:function(t,e,r){var n=xt.exec(e.slice(r));return n?(t.p=bt[n[0].toLowerCase()],r+n[0].length):-1},q:T,Q:O,s:z,S:L,u:m,U:v,V:y,w:g,W:x,x:function(t,e,r){return zt(t,o,e,r)},X:function(t,e,r){return zt(t,l,e,r)},y:_,Y:b,Z:w,\"%\":I};function It(t,e){return function(r){var n,i,a,o=[],l=-1,c=0,u=t.length;for(r instanceof Date||(r=new Date(+r));++l53)return null;\"w\"in c||(c.w=1),\"Z\"in c?(l=(s=n(i(c.y,0,1))).getUTCDay(),s=l>4||0===l?e.utcMonday.ceil(s):e.utcMonday(s),s=e.utcDay.offset(s,7*(c.V-1)),c.y=s.getUTCFullYear(),c.m=s.getUTCMonth(),c.d=s.getUTCDate()+(c.w+6)%7):(l=(s=r(i(c.y,0,1))).getDay(),s=l>4||0===l?e.timeMonday.ceil(s):e.timeMonday(s),s=e.timeDay.offset(s,7*(c.V-1)),c.y=s.getFullYear(),c.m=s.getMonth(),c.d=s.getDate()+(c.w+6)%7)}else(\"W\"in c||\"U\"in c)&&(\"w\"in c||(c.w=\"u\"in c?c.u%7:\"W\"in c?1:0),l=\"Z\"in c?n(i(c.y,0,1)).getUTCDay():r(i(c.y,0,1)).getDay(),c.m=0,c.d=\"W\"in c?(c.w+6)%7+7*c.W-(l+5)%7:c.w+7*c.U-(l+6)%7);return\"Z\"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,n(c)):r(c)}}function zt(t,e,r,n){for(var i,a,o=0,l=e.length,c=r.length;o=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=Pt[i in s?e.charAt(o++):i])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return Lt.x=It(o,Lt),Lt.X=It(l,Lt),Lt.c=It(a,Lt),Ct.x=It(o,Ct),Ct.X=It(l,Ct),Ct.c=It(a,Ct),{format:function(t){var e=It(t+=\"\",Lt);return e.toString=function(){return t},e},parse:function(t){var e=Ot(t+=\"\",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=It(t+=\"\",Ct);return e.toString=function(){return t},e},utcParse:function(t){var e=Ot(t+=\"\",!0);return e.toString=function(){return t},e}}}var o,s={\"-\":\"\",_:\" \",0:\"0\"},l=/^\\s*\\d+/,c=/^%/,u=/[\\\\^$*+?|[\\]().{}]/g;function f(t,e,r){var n=t<0?\"-\":\"\",i=(n?-t:t)+\"\",a=i.length;return n+(a68?1900:2e3),r+n[0].length):-1}function w(t,e,r){var n=/^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||\"00\")),r+n[0].length):-1}function T(t,e,r){var n=l.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function k(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function A(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function M(t,e,r){var n=l.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function S(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function E(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function L(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function C(t,e,r){var n=l.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function P(t,e,r){var n=l.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function I(t,e,r){var n=c.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function O(t,e,r){var n=l.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function z(t,e,r){var n=l.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function D(t,e){return f(t.getDate(),e,2)}function R(t,e){return f(t.getHours(),e,2)}function F(t,e){return f(t.getHours()%12||12,e,2)}function B(t,r){return f(1+e.timeDay.count(e.timeYear(t),t),r,3)}function N(t,e){return f(t.getMilliseconds(),e,3)}function j(t,e){return N(t,e)+\"000\"}function U(t,e){return f(t.getMonth()+1,e,2)}function V(t,e){return f(t.getMinutes(),e,2)}function H(t,e){return f(t.getSeconds(),e,2)}function q(t){var e=t.getDay();return 0===e?7:e}function G(t,r){return f(e.timeSunday.count(e.timeYear(t)-1,t),r,2)}function Y(t,r){var n=t.getDay();return t=n>=4||0===n?e.timeThursday(t):e.timeThursday.ceil(t),f(e.timeThursday.count(e.timeYear(t),t)+(4===e.timeYear(t).getDay()),r,2)}function W(t){return t.getDay()}function X(t,r){return f(e.timeMonday.count(e.timeYear(t)-1,t),r,2)}function Z(t,e){return f(t.getFullYear()%100,e,2)}function J(t,e){return f(t.getFullYear()%1e4,e,4)}function K(t){var e=t.getTimezoneOffset();return(e>0?\"-\":(e*=-1,\"+\"))+f(e/60|0,\"0\",2)+f(e%60,\"0\",2)}function Q(t,e){return f(t.getUTCDate(),e,2)}function $(t,e){return f(t.getUTCHours(),e,2)}function tt(t,e){return f(t.getUTCHours()%12||12,e,2)}function et(t,r){return f(1+e.utcDay.count(e.utcYear(t),t),r,3)}function rt(t,e){return f(t.getUTCMilliseconds(),e,3)}function nt(t,e){return rt(t,e)+\"000\"}function it(t,e){return f(t.getUTCMonth()+1,e,2)}function at(t,e){return f(t.getUTCMinutes(),e,2)}function ot(t,e){return f(t.getUTCSeconds(),e,2)}function st(t){var e=t.getUTCDay();return 0===e?7:e}function lt(t,r){return f(e.utcSunday.count(e.utcYear(t)-1,t),r,2)}function ct(t,r){var n=t.getUTCDay();return t=n>=4||0===n?e.utcThursday(t):e.utcThursday.ceil(t),f(e.utcThursday.count(e.utcYear(t),t)+(4===e.utcYear(t).getUTCDay()),r,2)}function ut(t){return t.getUTCDay()}function ft(t,r){return f(e.utcMonday.count(e.utcYear(t)-1,t),r,2)}function ht(t,e){return f(t.getUTCFullYear()%100,e,2)}function pt(t,e){return f(t.getUTCFullYear()%1e4,e,4)}function dt(){return\"+0000\"}function gt(){return\"%\"}function mt(t){return+t}function vt(t){return Math.floor(+t/1e3)}function yt(e){return o=a(e),t.timeFormat=o.format,t.timeParse=o.parse,t.utcFormat=o.utcFormat,t.utcParse=o.utcParse,o}yt({dateTime:\"%x, %X\",date:\"%-m/%-d/%Y\",time:\"%-I:%M:%S %p\",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\"]});var xt=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat(\"%Y-%m-%dT%H:%M:%S.%LZ\");var bt=+new Date(\"2000-01-01T00:00:00.000Z\")?function(t){var e=new Date(t);return isNaN(e)?null:e}:t.utcParse(\"%Y-%m-%dT%H:%M:%S.%LZ\");t.isoFormat=xt,t.isoParse=bt,t.timeFormatDefaultLocale=yt,t.timeFormatLocale=a,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{\"d3-time\":121}],121:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){\"use strict\";var e=new Date,r=new Date;function n(t,i,a,o){function s(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return s.floor=function(e){return t(e=new Date(+e)),e},s.ceil=function(e){return t(e=new Date(e-1)),i(e,1),t(e),e},s.round=function(t){var e=s(t),r=s.ceil(t);return t-e0))return o;do{o.push(a=new Date(+e)),i(e,n),t(e)}while(a=r)for(;t(r),!e(r);)r.setTime(r-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;i(t,-1),!e(t););else for(;--r>=0;)for(;i(t,1),!e(t););}))},a&&(s.count=function(n,i){return e.setTime(+n),r.setTime(+i),t(e),t(r),Math.floor(a(e,r))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(o?function(e){return o(e)%t==0}:function(e){return s.count(0,e)%t==0}):s:null}),s}var i=n((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?n((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,r){e.setTime(+e+r*t)}),(function(e,r){return(r-e)/t})):i:null};var a=i.range,o=n((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),s=o.range,l=n((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),c=l.range,u=n((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),f=u.range,h=n((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),p=h.range;function d(t){return n((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var g=d(0),m=d(1),v=d(2),y=d(3),x=d(4),b=d(5),_=d(6),w=g.range,T=m.range,k=v.range,A=y.range,M=x.range,S=b.range,E=_.range,L=n((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),C=L.range,P=n((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));P.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,r){e.setFullYear(e.getFullYear()+r*t)})):null};var I=P.range,O=n((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()})),z=O.range,D=n((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()})),R=D.range,F=n((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1})),B=F.range;function N(t){return n((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var j=N(0),U=N(1),V=N(2),H=N(3),q=N(4),G=N(5),Y=N(6),W=j.range,X=U.range,Z=V.range,J=H.range,K=q.range,Q=G.range,$=Y.range,tt=n((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),et=tt.range,rt=n((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));rt.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null};var nt=rt.range;t.timeDay=h,t.timeDays=p,t.timeFriday=b,t.timeFridays=S,t.timeHour=u,t.timeHours=f,t.timeInterval=n,t.timeMillisecond=i,t.timeMilliseconds=a,t.timeMinute=l,t.timeMinutes=c,t.timeMonday=m,t.timeMondays=T,t.timeMonth=L,t.timeMonths=C,t.timeSaturday=_,t.timeSaturdays=E,t.timeSecond=o,t.timeSeconds=s,t.timeSunday=g,t.timeSundays=w,t.timeThursday=x,t.timeThursdays=M,t.timeTuesday=v,t.timeTuesdays=k,t.timeWednesday=y,t.timeWednesdays=A,t.timeWeek=g,t.timeWeeks=w,t.timeYear=P,t.timeYears=I,t.utcDay=F,t.utcDays=B,t.utcFriday=G,t.utcFridays=Q,t.utcHour=D,t.utcHours=R,t.utcMillisecond=i,t.utcMilliseconds=a,t.utcMinute=O,t.utcMinutes=z,t.utcMonday=U,t.utcMondays=X,t.utcMonth=tt,t.utcMonths=et,t.utcSaturday=Y,t.utcSaturdays=$,t.utcSecond=o,t.utcSeconds=s,t.utcSunday=j,t.utcSundays=W,t.utcThursday=q,t.utcThursdays=K,t.utcTuesday=V,t.utcTuesdays=Z,t.utcWednesday=H,t.utcWednesdays=J,t.utcWeek=j,t.utcWeeks=W,t.utcYear=rt,t.utcYears=nt,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],122:[function(t,e,r){arguments[4][121][0].apply(r,arguments)},{dup:121}],123:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){\"use strict\";var e,r,n=0,i=0,a=0,o=0,s=0,l=0,c=\"object\"==typeof performance&&performance.now?performance:Date,u=\"object\"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function f(){return s||(u(h),s=c.now()+l)}function h(){s=0}function p(){this._call=this._time=this._next=null}function d(t,e,r){var n=new p;return n.restart(t,e,r),n}function g(){f(),++n;for(var t,r=e;r;)(t=s-r._time)>=0&&r._call.call(null,t),r=r._next;--n}function m(){s=(o=c.now())+l,n=i=0;try{g()}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,y(a)}(),s=0}}function v(){var t=c.now(),e=t-o;e>1e3&&(l-=e,o=t)}function y(t){n||(i&&(i=clearTimeout(i)),t-s>24?(t<1/0&&(i=setTimeout(m,t-c.now()-l)),a&&(a=clearInterval(a))):(a||(o=c.now(),a=setInterval(v,1e3)),n=1,u(m)))}p.prototype=d.prototype={constructor:p,restart:function(t,n,i){if(\"function\"!=typeof t)throw new TypeError(\"callback is not a function\");i=(null==i?f():+i)+(null==n?0:+n),this._next||r===this||(r?r._next=this:e=this,r=this),this._call=t,this._time=i,y()},stop:function(){this._call&&(this._call=null,this._time=1/0,y())}},t.interval=function(t,e,r){var n=new p,i=e;return null==e?(n.restart(t,e,r),n):(e=+e,r=null==r?f():+r,n.restart((function a(o){o+=i,n.restart(a,i+=e,r),t(o)}),e,r),n)},t.now=f,t.timeout=function(t,e,r){var n=new p;return e=null==e?0:+e,n.restart((function(r){n.stop(),t(r+e)}),e,r),n},t.timer=d,t.timerFlush=g,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],124:[function(t,e,r){e.exports=function(){for(var t=0;ts*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];i0)return function(t,e){var r,n;for(r=new Array(t),n=0;n80*r){n=l=t[0],s=c=t[1];for(var b=r;bl&&(l=u),p>c&&(c=p);d=0!==(d=Math.max(l-n,c-s))?1/d:0}return o(y,x,r,n,s,d),x}function i(t,e,r,n,i){var a,o;if(i===E(t,e,r,n)>0)for(a=e;a=e;a-=n)o=A(a,t[a],t[a+1],o);return o&&x(o,o.next)&&(M(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||!x(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(M(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=d(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;e0||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 p,g,m=t;t.prev!==t.next;)if(p=t.prev,g=t.next,f?l(t,n,i,f):s(t))e.push(p.i/r),e.push(t.i/r),e.push(g.i/r),M(t),t=g.next,m=g.next;else if((t=g)===m){h?1===h?o(t=c(a(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(y(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(m(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&y(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(y(i,a,o)>=0)return!1;for(var s=i.xa.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=d(s,l,e,r,n),h=d(c,u,e,r,n),p=t.prevZ,g=t.nextZ;p&&p.z>=f&&g&&g.z<=h;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,g!==t.prev&&g!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;g&&g.z<=h;){if(g!==t.prev&&g!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function c(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!x(i,o)&&b(i,n,n.next,o)&&T(i,o)&&T(o,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(o.i/r),M(n),M(n.next),n=t=o),n=n.next}while(n!==t);return a(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=k(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.x&&n.x>=u&&i!==n.x&&m(ar.x||n.x===r.x&&p(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(t,e)){var r=k(e,t);a(e,e.next),a(r,r.next)}}function p(t,e){return y(t.prev,t,e.prev)<0&&y(e.next,t,t.next)<0}function d(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 g(t){var e=t,r=t;do{(e.x=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&&b(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(T(t,e)&&T(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)&&(y(t.prev,t,e.prev)||y(t,e.prev,e))||x(t,e)&&y(t.prev,t,t.next)>0&&y(e.prev,e,e.next)>0)}function y(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,r,n){var i=w(y(t,e,r)),a=w(y(t,e,n)),o=w(y(r,n,t)),s=w(y(r,n,e));return i!==a&&o!==s||(!(0!==i||!_(t,r,e))||(!(0!==a||!_(t,n,e))||(!(0!==o||!_(r,t,n))||!(0!==s||!_(r,e,n)))))}function _(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function w(t){return t>0?1:t<0?-1:0}function T(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function k(t,e){var r=new S(t.i,t.x,t.y),n=new S(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 A(t,e,r,n){var i=new S(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 M(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 S(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 E(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],130:[function(t,e,r){var n=t(\"strongly-connected-components\");e.exports=function(t,e){var r,i=[],a=[],o=[],s={},l=[];function c(t){var e,n,i=!1;for(a.push(t),o[t]=!0,e=0;e=e}))}(e);for(var r,i=n(t).components.filter((function(t){return t.length>1})),a=1/0,o=0;o=55296&&y<=56319&&(w+=t[++r]),w=T?h.call(T,k,w,g):w,e?(p.value=w,d(m,g,p)):m[g]=w,++g;v=g}if(void 0===v)for(v=o(t.length),e&&(m=new e(v)),r=0;r0?1:-1}},{}],141:[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\":138}],142:[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\":141}],143:[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\":160,\"./valid-value\":162}],144:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?Object.assign:t(\"./shim\")},{\"./is-implemented\":145,\"./shim\":146}],145:[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\")}},{}],146:[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-1}},{}],166:[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}},{}],167:[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}},{}],168:[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\"))},{\"./\":171,d:106,\"es5-ext/object/set-prototype-of\":157,\"es5-ext/string/#/contains\":163,\"es6-symbol\":175}],169:[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,m,v=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,v,u.value,f),h)return;u=t.next()}else for(d=t.length,p=0;p=55296&&m<=56319&&(g+=t[++p]),l.call(e,v,g,f),!h);++p);else c.call(t,(function(t){return l.call(e,v,t,f),h}))}},{\"./get\":170,\"es5-ext/function/is-arguments\":135,\"es5-ext/object/valid-callable\":160,\"es5-ext/string/is-string\":166}],170:[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\":168,\"./string\":173,\"./valid-iterable\":174,\"es5-ext/function/is-arguments\":135,\"es5-ext/string/is-string\":166,\"es6-symbol\":175}],171:[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.__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:106,\"d/auto-bind\":105,\"es5-ext/array/#/clear\":131,\"es5-ext/object/assign\":144,\"es5-ext/object/valid-callable\":160,\"es5-ext/object/valid-value\":162,\"es6-symbol\":175}],172:[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\":135,\"es5-ext/object/is-value\":151,\"es5-ext/string/is-string\":166,\"es6-symbol\":175}],173:[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__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,o.toStringTag,a(\"c\",\"String Iterator\"))},{\"./\":171,d:106,\"es5-ext/object/set-prototype-of\":157,\"es6-symbol\":175}],174:[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\":172}],175:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?t(\"ext/global-this\").Symbol:t(\"./polyfill\")},{\"./is-implemented\":176,\"./polyfill\":181,\"ext/global-this\":188}],176:[function(t,e,r){\"use strict\";var n=t(\"ext/global-this\"),i={object:!0,symbol:!0};e.exports=function(){var t,e=n.Symbol;if(\"function\"!=typeof e)return!1;t=e(\"test symbol\");try{String(t)}catch(t){return!1}return!!i[typeof e.iterator]&&(!!i[typeof e.toPrimitive]&&!!i[typeof e.toStringTag])}},{\"ext/global-this\":188}],177:[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]))}},{}],178:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=Object.create,a=Object.defineProperty,o=Object.prototype,s=i(null);e.exports=function(t){for(var e,r,i=0;s[t+(i||\"\")];)++i;return s[t+=i||\"\"]=!0,a(o,e=\"@@\"+t,n.gs(null,(function(t){r||(r=!0,a(this,e,n(t)),r=!1)}))),e}},{d:106}],179:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=t(\"ext/global-this\").Symbol;e.exports=function(t){return Object.defineProperties(t,{hasInstance:n(\"\",i&&i.hasInstance||t(\"hasInstance\")),isConcatSpreadable:n(\"\",i&&i.isConcatSpreadable||t(\"isConcatSpreadable\")),iterator:n(\"\",i&&i.iterator||t(\"iterator\")),match:n(\"\",i&&i.match||t(\"match\")),replace:n(\"\",i&&i.replace||t(\"replace\")),search:n(\"\",i&&i.search||t(\"search\")),species:n(\"\",i&&i.species||t(\"species\")),split:n(\"\",i&&i.split||t(\"split\")),toPrimitive:n(\"\",i&&i.toPrimitive||t(\"toPrimitive\")),toStringTag:n(\"\",i&&i.toStringTag||t(\"toStringTag\")),unscopables:n(\"\",i&&i.unscopables||t(\"unscopables\"))})}},{d:106,\"ext/global-this\":188}],180:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=t(\"../../../validate-symbol\"),a=Object.create(null);e.exports=function(t){return Object.defineProperties(t,{for:n((function(e){return a[e]?a[e]:a[e]=t(String(e))})),keyFor:n((function(t){var e;for(e in i(t),a)if(a[e]===t)return e}))})}},{\"../../../validate-symbol\":182,d:106}],181:[function(t,e,r){\"use strict\";var n,i,a,o=t(\"d\"),s=t(\"./validate-symbol\"),l=t(\"ext/global-this\").Symbol,c=t(\"./lib/private/generate-name\"),u=t(\"./lib/private/setup/standard-symbols\"),f=t(\"./lib/private/setup/symbol-registry\"),h=Object.create,p=Object.defineProperties,d=Object.defineProperty;if(\"function\"==typeof l)try{String(l()),a=!0}catch(t){}else l=null;i=function(t){if(this instanceof i)throw new TypeError(\"Symbol is not a constructor\");return n(t)},e.exports=n=function t(e){var r;if(this instanceof t)throw new TypeError(\"Symbol is not a constructor\");return a?l(e):(r=h(i.prototype),e=void 0===e?\"\":String(e),p(r,{__description__:o(\"\",e),__name__:o(\"\",c(e))}))},u(n),f(n),p(i.prototype,{constructor:o(n),toString:o(\"\",(function(){return this.__name__}))}),p(n.prototype,{toString:o((function(){return\"Symbol (\"+s(this).__description__+\")\"})),valueOf:o((function(){return s(this)}))}),d(n.prototype,n.toPrimitive,o(\"\",(function(){var t=s(this);return\"symbol\"==typeof t?t:t.toString()}))),d(n.prototype,n.toStringTag,o(\"c\",\"Symbol\")),d(i.prototype,n.toStringTag,o(\"c\",n.prototype[n.toStringTag])),d(i.prototype,n.toPrimitive,o(\"c\",n.prototype[n.toPrimitive]))},{\"./lib/private/generate-name\":178,\"./lib/private/setup/standard-symbols\":179,\"./lib/private/setup/symbol-registry\":180,\"./validate-symbol\":182,d:106,\"ext/global-this\":188}],182:[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\":177}],183:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?WeakMap:t(\"./polyfill\")},{\"./is-implemented\":184,\"./polyfill\":186}],184:[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)))))}},{}],185:[function(t,e,r){\"use strict\";e.exports=\"function\"==typeof WeakMap&&\"[object WeakMap]\"===Object.prototype.toString.call(new WeakMap)},{}],186:[function(t,e,r){\"use strict\";var n,i=t(\"es5-ext/object/is-value\"),a=t(\"es5-ext/object/set-prototype-of\"),o=t(\"es5-ext/object/valid-object\"),s=t(\"es5-ext/object/valid-value\"),l=t(\"es5-ext/string/random-uniq\"),c=t(\"d\"),u=t(\"es6-iterator/get\"),f=t(\"es6-iterator/for-of\"),h=t(\"es6-symbol\").toStringTag,p=t(\"./is-native-implemented\"),d=Array.isArray,g=Object.defineProperty,m=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=p&&a&&WeakMap!==n?a(new WeakMap,v(this)):this,i(e)&&(d(e)||(e=u(e))),g(t,\"__weakMapData__\",c(\"c\",\"$weakMap$\"+l())),e?(f(e,(function(e){s(e),t.set(e[0],e[1])})),t):t},p&&(a&&a(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:c(n)})),Object.defineProperties(n.prototype,{delete:c((function(t){return!!m.call(o(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)})),get:c((function(t){if(m.call(o(t),this.__weakMapData__))return t[this.__weakMapData__]})),has:c((function(t){return m.call(o(t),this.__weakMapData__)})),set:c((function(t,e){return g(o(t),this.__weakMapData__,c(\"c\",e)),this})),toString:c((function(){return\"[object WeakMap]\"}))}),g(n.prototype,h,c(\"c\",\"WeakMap\"))},{\"./is-native-implemented\":185,d:106,\"es5-ext/object/is-value\":151,\"es5-ext/object/set-prototype-of\":157,\"es5-ext/object/valid-object\":161,\"es5-ext/object/valid-value\":162,\"es5-ext/string/random-uniq\":167,\"es6-iterator/for-of\":169,\"es6-iterator/get\":170,\"es6-symbol\":175}],187:[function(t,e,r){var n=function(){if(\"object\"==typeof self&&self)return self;if(\"object\"==typeof window&&window)return window;throw new Error(\"Unable to resolve global `this`\")};e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,\"__global__\",{get:function(){return this},configurable:!0})}catch(t){return n()}try{return __global__||n()}finally{delete Object.prototype.__global__}}()},{}],188:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?globalThis:t(\"./implementation\")},{\"./implementation\":187,\"./is-implemented\":189}],189:[function(t,e,r){\"use strict\";e.exports=function(){return\"object\"==typeof globalThis&&(!!globalThis&&globalThis.Array===Array)}},{}],190:[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\":237}],191:[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;ie[0]-o[0]/2&&(h=o[0]/2,p+=o[1]);return r}},{\"css-font/stringify\":102}],193:[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 m=a(f.getImageData(0,0,p,p));d.lineHeight=d.bottom=p-m+g,f.clearRect(0,0,p,p),f.textBaseline=\"alphabetic\",f.fillText(\"H\",0,p);var v=p-a(f.getImageData(0,0,p,p))-1+g;d.baseline=d.alphabetic=v,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=_-v}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;n0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}e.exports=n,n.canvas=document.createElement(\"canvas\"),n.cache={}},{}],194:[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 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:{}}},T.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),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=T.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(T.baseFontSize+\"px \"+t)}else t=n.parse(n.stringify(t));var i=n.stringify({size:T.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]=T.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:v(c,{origin:\"top\",fontSize:T.baseFontSize,fontStyle:u.join(\" \")})},T.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;h2){for(var w=!t.position[0].length,k=u.mallocFloat(2*this.count),A=0,M=0;A1?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],i*=-1}))),null!=t.color)if(t.color||(t.color=\"transparent\"),\"string\"!=typeof t.color&&isNaN(t.color)){var q;if(\"number\"==typeof t.color[0]&&t.color.length>this.counts.length){var G=t.color.length;q=u.mallocUint8(G);for(var Y=(t.color.subarray||t.color.slice).bind(t.color),W=0;W4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var J=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(J);for(var K=0;K1?this.counts[K]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[K]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*K,4*K+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[K]:this.opacity,baseline:null!=this.baselineOffset[K]?this.baselineOffset[K]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[K]?this.alignOffset[K]:this.alignOffset[0]:0,atlas:this.fontAtlas[K]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*K,2*K+2):this.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=[]},T.prototype.destroy=function(){},T.prototype.kerning=!0,T.prototype.position={constant:new Float32Array(2)},T.prototype.translate=null,T.prototype.scale=null,T.prototype.font=null,T.prototype.text=\"\",T.prototype.positionOffset=[0,0],T.prototype.opacity=1,T.prototype.color=new Uint8Array([0,0,0,255]),T.prototype.alignOffset=[0,0],T.maxAtlasSize=1024,T.atlasCanvas=document.createElement(\"canvas\"),T.atlasContext=T.atlasCanvas.getContext(\"2d\",{alpha:!1}),T.baseFontSize=64,T.fonts={},e.exports=T},{\"bit-twiddle\":81,\"color-normalize\":89,\"css-font\":99,\"detect-kerning\":125,\"es6-weak-map\":183,\"flatten-vertex-data\":191,\"font-atlas\":192,\"font-measure\":193,\"gl-util/context\":226,\"is-plain-obj\":236,\"object-assign\":247,\"parse-rect\":249,\"parse-unit\":251,\"pick-by-alias\":253,regl:283,\"to-px\":314,\"typedarray-pool\":327}],226:[function(t,e,r){(function(r){(function(){\"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*r.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*r.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}function o(){var t=document.createElement(\"canvas\");return t.style.position=\"absolute\",t.style.top=0,t.style.left=0,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\",width:\"w width\",height:\"h height\"},!0),t.pixelRatio||(t.pixelRatio=r.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(\"string\"==typeof t.container){var s=document.querySelector(t.container);if(!s)throw Error(\"Element \"+t.container+\" is not found\");t.container=s}a(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=o(),t.container.appendChild(t.canvas),i(t))}else if(!t.canvas){if(\"undefined\"==typeof document)throw Error(\"Not DOM environment. Use headless-gl.\");t.container=document.body||document.documentElement,t.canvas=o(),t.container.appendChild(t.canvas),i(t)}return t.gl||[\"webgl\",\"experimental-webgl\",\"webgl-experimental\"].some((function(e){try{t.gl=t.canvas.getContext(e,t.attrs)}catch(t){}return t.gl})),t.gl}}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"pick-by-alias\":253}],227:[function(t,e,r){e.exports=function(t){\"string\"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n>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<>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<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g}},{}],231:[function(t,e,r){\"function\"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},{}],232:[function(t,e,r){e.exports=!0},{}],233:[function(t,e,r){\"use strict\";e.exports=\"undefined\"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\\//.test(navigator.appVersion))},{}],234:[function(t,e,r){\"use strict\";e.exports=a,e.exports.isMobile=a,e.exports.default=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[46]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[46]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;if(e||\"undefined\"==typeof navigator||(e=navigator.userAgent),e&&e.headers&&\"string\"==typeof e.headers[\"user-agent\"]&&(e=e.headers[\"user-agent\"]),\"string\"!=typeof e)return!1;var r=t.tablet?i.test(e):n.test(e);return!r&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==e.indexOf(\"Macintosh\")&&-1!==e.indexOf(\"Safari\")&&(r=!0),r}},{}],235:[function(t,e,r){\"use strict\";e.exports=function(t){var e=typeof t;return null!==t&&(\"object\"===e||\"function\"===e)}},{}],236:[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({}))}},{}],237:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e,r=t.length,n=0;n13)&&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}},{}],238:[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))}},{}],239:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?e.exports=n():(t=t||self).mapboxgl=n()}(this,(function(){\"use strict\";var t,e,r;function n(n,i){if(t)if(e){var a=\"var sharedChunk = {}; (\"+t+\")(sharedChunk); (\"+e+\")(sharedChunk);\",o={};t(o),(r=i(o)).workerUrl=window.URL.createObjectURL(new Blob([a],{type:\"text/javascript\"}))}else e=i;else t=i}return n(0,(function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r=n;function n(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}n.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},n.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},n.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},n.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)(n=1))return n;for(;ra?r=i:n=i,i=.5*(n-r)+r}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var i=a;function a(t,e){this.x=t,this.y=e}function o(t,e,n,i){var a=new r(t,e,n,i);return function(t){return a.solve(t)}}a.prototype={clone:function(){return new a(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}},a.convert=function(t){return t instanceof a?t:Array.isArray(t)?new a(t[0],t[1]):t};var s=o(.25,.1,.25,1);function l(t,e,r){return Math.min(r,Math.max(e,t))}function c(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i}function u(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function d(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function g(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e))}))}function m(t,e){return-1!==t.indexOf(e,t.length-e.length)}function v(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?v(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 T(t){for(var e=0,r=0,n=t.length,i=n-1,a=void 0,o=void 0;r@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\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}var M=null;function S(t){if(null==M){var e=t.navigator?t.navigator.userAgent:null;M=!!t.safari||!(!e||!(/\\b(iPad|iPhone|iPod)\\b/.test(e)||e.match(\"Safari\")&&!e.match(\"Chrome\")))}return M}function E(t){try{var e=self[t];return e.setItem(\"_mapbox_test_\",1),e.removeItem(\"_mapbox_test_\"),!0}catch(t){return!1}}var L,C,P,I,O=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),z=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,D=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,R={now:O,frame:function(t){var e=z(t);return{cancel:function(){return D(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var r=self.document.createElement(\"canvas\"),n=r.getContext(\"2d\");if(!n)throw new Error(\"failed to create canvas 2d context\");return r.width=t.width,r.height=t.height,n.drawImage(t,0,0,t.width,t.height),n.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:function(t){return L||(L=self.document.createElement(\"a\")),L.href=t,L.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==C&&(C=self.matchMedia(\"(prefers-reduced-motion: reduce)\")),C.matches)}},F={API_URL:\"https://api.mapbox.com\",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf(\"https://api.mapbox.cn\")?\"https://events.mapbox.cn/events/v2\":0===this.API_URL.indexOf(\"https://api.mapbox.com\")?\"https://events.mapbox.com/events/v2\":null:null},FEEDBACK_URL:\"https://apps.mapbox.com/feedback\",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},B={supported:!1,testSupport:function(t){if(N||!I)return;j?U(t):P=t}},N=!1,j=!1;function U(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,I),t.isContextLost())return;B.supported=!0}catch(t){}t.deleteTexture(e),N=!0}self.document&&((I=self.document.createElement(\"img\")).onload=function(){P&&U(P),P=null,j=!0},I.onerror=function(){N=!0,P=null},I.src=\"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\");var V=\"01\";var H=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function q(t){return 0===t.indexOf(\"mapbox:\")}H.prototype._createSkuToken=function(){var t=function(){for(var t=\"\",e=0;e<10;e++)t+=\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"[Math.floor(62*Math.random())];return{token:[\"1\",V,t].join(\"\"),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},H.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},H.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},H.prototype.normalizeStyleURL=function(t,e){if(!q(t))return t;var r=X(t);return r.path=\"/styles/v1\"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeGlyphsURL=function(t,e){if(!q(t))return t;var r=X(t);return r.path=\"/fonts/v1\"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeSourceURL=function(t,e){if(!q(t))return t;var r=X(t);return r.path=\"/v4/\"+r.authority+\".json\",r.params.push(\"secure\"),this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeSpriteURL=function(t,e,r,n){var i=X(t);return q(t)?(i.path=\"/styles/v1\"+i.path+\"/sprite\"+e+r,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=\"\"+e+r,Z(i))},H.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!q(t))return t;var r=X(t),n=R.devicePixelRatio>=2||512===e?\"@2x\":\"\",i=B.supported?\".webp\":\"$1\";r.path=r.path.replace(/(\\.(png|jpg)\\d*)(?=$)/,\"\"+n+i),r.path=r.path.replace(/^.+\\/v4\\//,\"/\"),r.path=\"/v4\"+r.path;var a=this._customAccessToken||function(t){for(var e=0,r=t;e=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){_(\"Unable to write to LocalStorage\")}},K.prototype.processRequests=function(t){},K.prototype.postEvent=function(t,e,r,n){var i=this;if(F.EVENTS_URL){var a=X(F.EVENTS_URL);a.params.push(\"access_token=\"+(n||F.ACCESS_TOKEN||\"\"));var o={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:\"mapbox-gl-js\",sdkVersion:\"1.10.1\",skuId:V,userId:this.anonId},s=e?u(o,e):o,l={url:Z(a),headers:{\"Content-Type\":\"text/plain\"},body:JSON.stringify([s])};this.pendingRequest=bt(l,(function(t){i.pendingRequest=null,r(t),i.saveEventData(),i.processRequests(n)}))}},K.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var Q,$,tt=function(t){function e(){t.call(this,\"map.load\"),this.success={},this.skuToken=\"\"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postMapLoadEvent=function(t,e,r,n){this.skuToken=r,(F.EVENTS_URL&&n||F.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return q(t)||Y(t)})))&&this.queueRequest({id:e,timestamp:Date.now()},n)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var r=this.queue.shift(),n=r.id,i=r.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),d(this.anonId)||(this.anonId=p()),this.postEvent(i,{skuToken:this.skuToken},(function(t){t||n&&(e.success[n]=!0)}),t))}},e}(K),et=new(function(t){function e(e){t.call(this,\"appUserTurnstile\"),this._customAccessToken=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postTurnstileEvent=function(t,e){F.EVENTS_URL&&F.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return q(t)||Y(t)}))&&this.queueRequest(Date.now(),e)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var r=J(F.ACCESS_TOKEN),n=r?r.u:F.ACCESS_TOKEN,i=n!==this.eventData.tokenU;d(this.anonId)||(this.anonId=p(),i=!0);var a=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(a),l=(a-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||o.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(a,{\"enabled.telemetry\":!1},(function(t){t||(e.eventData.lastSuccess=a,e.eventData.tokenU=n)}),t)}},e}(K)),rt=et.postTurnstileEvent.bind(et),nt=new tt,it=nt.postMapLoadEvent.bind(nt),at=500,ot=50;function st(){self.caches&&!Q&&(Q=self.caches.open(\"mapbox-tiles\"))}function lt(t,e,r){if(st(),Q){var n={status:e.status,statusText:e.statusText,headers:new self.Headers};e.headers.forEach((function(t,e){return n.headers.set(e,t)}));var i=A(e.headers.get(\"Cache-Control\")||\"\");if(!i[\"no-store\"])i[\"max-age\"]&&n.headers.set(\"Expires\",new Date(r+1e3*i[\"max-age\"]).toUTCString()),new Date(n.headers.get(\"Expires\")).getTime()-r<42e4||function(t,e){if(void 0===$)try{new Response(new ReadableStream),$=!0}catch(t){$=!1}$?e(t.body):t.blob().then(e)}(e,(function(e){var r=new self.Response(e,n);st(),Q&&Q.then((function(e){return e.put(ct(t.url),r)})).catch((function(t){return _(t.message)}))}))}}function ct(t){var e=t.indexOf(\"?\");return e<0?t:t.slice(0,e)}function ut(t,e){if(st(),!Q)return e(null);var r=ct(t.url);Q.then((function(t){t.match(r).then((function(n){var i=function(t){if(!t)return!1;var e=new Date(t.headers.get(\"Expires\")||0),r=A(t.headers.get(\"Cache-Control\")||\"\");return e>Date.now()&&!r[\"no-cache\"]}(n);t.delete(r),i&&t.put(r,n.clone()),e(null,n,i)})).catch(e)})).catch(e)}var ft,ht=1/0;function pt(){return null==ft&&(ft=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext(\"2d\")&&\"function\"==typeof self.createImageBitmap),ft}var dt={Unknown:\"Unknown\",Style:\"Style\",Source:\"Source\",Tile:\"Tile\",Glyphs:\"Glyphs\",SpriteImage:\"SpriteImage\",SpriteJSON:\"SpriteJSON\",Image:\"Image\"};\"function\"==typeof Object.freeze&&Object.freeze(dt);var gt=function(t){function e(e,r,n){401===r&&Y(n)&&(e+=\": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes\"),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),mt=k()?function(){return self.worker&&self.worker.referrer}:function(){return(\"blob:\"===self.location.protocol?self.parent:self).location.href};function vt(t,e){var r,n=new self.AbortController,i=new self.Request(t.url,{method:t.method||\"GET\",body:t.body,credentials:t.credentials,headers:t.headers,referrer:mt(),signal:n.signal}),a=!1,o=!1,s=(r=i.url).indexOf(\"sku=\")>0&&Y(r);\"json\"===t.type&&i.headers.set(\"Accept\",\"application/json\");var l=function(r,n,a){if(!o){if(r&&\"SecurityError\"!==r.message&&_(r),n&&a)return c(n);var l=Date.now();self.fetch(i).then((function(r){if(r.ok){var n=s?r.clone():null;return c(r,n,l)}return e(new gt(r.statusText,r.status,t.url))})).catch((function(t){20!==t.code&&e(new Error(t.message))}))}},c=function(r,n,s){(\"arrayBuffer\"===t.type?r.arrayBuffer():\"json\"===t.type?r.json():r.text()).then((function(t){o||(n&&s&<(i,n,s),a=!0,e(null,t,r.headers.get(\"Cache-Control\"),r.headers.get(\"Expires\")))})).catch((function(t){o||e(new Error(t.message))}))};return s?ut(i,l):l(null,null),{cancel:function(){o=!0,a||n.abort()}}}var yt=function(t,e){if(r=t.url,!(/^file:/.test(r)||/^file:/.test(mt())&&!/^\\w+:/.test(r))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty(\"signal\"))return vt(t,e);if(k()&&self.worker&&self.worker.actor){return self.worker.actor.send(\"getResource\",t,e,void 0,!0)}}var r;return function(t,e){var r=new self.XMLHttpRequest;for(var n in r.open(t.method||\"GET\",t.url,!0),\"arrayBuffer\"===t.type&&(r.responseType=\"arraybuffer\"),t.headers)r.setRequestHeader(n,t.headers[n]);return\"json\"===t.type&&(r.responseType=\"text\",r.setRequestHeader(\"Accept\",\"application/json\")),r.withCredentials=\"include\"===t.credentials,r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if(\"json\"===t.type)try{n=JSON.parse(r.response)}catch(t){return e(t)}e(null,n,r.getResponseHeader(\"Cache-Control\"),r.getResponseHeader(\"Expires\"))}else e(new gt(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},xt=function(t,e){return yt(u(t,{type:\"arrayBuffer\"}),e)},bt=function(t,e){return yt(u(t,{method:\"POST\"}),e)};var _t,wt;_t=[],wt=0;var Tt=function(t,e){if(B.supported&&(t.headers||(t.headers={}),t.headers.accept=\"image/webp,*/*\"),wt>=F.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return _t.push(r),r}wt++;var n=!1,i=function(){if(!n)for(n=!0,wt--;_t.length&&wt0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},Et.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var Lt={$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.051129,180,85.051129]},scheme:{type:\"enum\",values:{xyz:{},tms:{}},default:\"xyz\"},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},attribution:{type:\"string\"},promoteId:{type:\"promoteId\"},\"*\":{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.051129,180,85.051129]},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.051129,180,85.051129]},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},attribution:{type:\"string\"},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\"},clusterProperties:{type:\"*\"},lineMetrics:{type:\"boolean\",default:!1},generateId:{type:\"boolean\",default:!1},promoteId:{type:\"promoteId\"}},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\",\"property-type\":\"constant\"}},layout_fill:{\"fill-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_circle:{\"circle-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_heatmap:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},\"layout_fill-extrusion\":{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_line:{\"line-cap\":{type:\"enum\",values:{butt:{},round:{},square:{}},default:\"butt\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-join\":{type:\"enum\",values:{bevel:{},round:{},miter:{}},default:\"miter\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"line-miter-limit\":{type:\"number\",default:2,requires:[{\"line-join\":\"miter\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-round-limit\":{type:\"number\",default:1.05,requires:[{\"line-join\":\"round\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_symbol:{\"symbol-placement\":{type:\"enum\",values:{point:{},line:{},\"line-center\":{}},default:\"point\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-spacing\":{type:\"number\",default:250,minimum:1,units:\"pixels\",requires:[{\"symbol-placement\":\"line\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-avoid-edges\":{type:\"boolean\",default:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"symbol-z-order\":{type:\"enum\",values:{auto:{},\"viewport-y\":{},source:{}},default:\"auto\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-optional\":{type:\"boolean\",default:!1,requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-size\":{type:\"number\",default:1,minimum:0,units:\"factor of the original icon size\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-text-fit\":{type:\"enum\",values:{none:{},width:{},height:{},both:{}},default:\"none\",requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-text-fit-padding\":{type:\"array\",value:\"number\",length:4,default:[0,0,0,0],units:\"pixels\",requires:[\"icon-image\",\"text-field\",{\"icon-text-fit\":[\"both\",\"width\",\"height\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-image\":{type:\"resolvedImage\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-keep-upright\":{type:\"boolean\",default:!1,requires:[\"icon-image\",{\"icon-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-offset\":{type:\"array\",value:\"number\",length:2,default:[0,0],requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-field\":{type:\"formatted\",default:\"\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-font\":{type:\"array\",value:\"string\",default:[\"Open Sans Regular\",\"Arial Unicode MS Regular\"],requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-size\":{type:\"number\",default:16,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-width\":{type:\"number\",default:10,minimum:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-line-height\":{type:\"number\",default:1.2,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-letter-spacing\":{type:\"number\",default:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-justify\":{type:\"enum\",values:{auto:{},left:{},center:{},right:{}},default:\"center\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-radial-offset\":{type:\"number\",units:\"ems\",default:0,requires:[\"text-field\"],\"property-type\":\"data-driven\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]}},\"text-variable-anchor\":{type:\"array\",value:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"text-field\",{\"!\":\"text-variable-anchor\"}],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-angle\":{type:\"number\",default:45,units:\"degrees\",requires:[\"text-field\",{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-writing-mode\":{type:\"array\",value:\"enum\",values:{horizontal:{},vertical:{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-keep-upright\":{type:\"boolean\",default:!0,requires:[\"text-field\",{\"text-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-transform\":{type:\"enum\",values:{none:{},uppercase:{},lowercase:{}},default:\"none\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-offset\":{type:\"array\",value:\"number\",units:\"ems\",length:2,default:[0,0],requires:[\"text-field\",{\"!\":\"text-radial-offset\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-optional\":{type:\"boolean\",default:!1,requires:[\"text-field\",\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_raster:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_hillshade:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},filter:{type:\"array\",value:\"*\"},filter_operator:{type:\"enum\",values:{\"==\":{},\"!=\":{},\">\":{},\">=\":{},\"<\":{},\"<=\":{},in:{},\"!in\":{},all:{},any:{},none:{},has:{},\"!has\":{},within:{}}},geometry_type:{type:\"enum\",values:{Point:{},LineString:{},Polygon:{}}},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}},function_stop:{type:\"array\",minimum:0,maximum:24,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\"},in:{group:\"Lookup\"},\"index-of\":{group:\"Lookup\"},slice:{group:\"Lookup\"},case:{group:\"Decision\"},match:{group:\"Decision\"},coalesce:{group:\"Decision\"},step:{group:\"Ramps, scales, curves\"},interpolate:{group:\"Ramps, scales, curves\"},\"interpolate-hcl\":{group:\"Ramps, scales, curves\"},\"interpolate-lab\":{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\"},format:{group:\"Types\"},image:{group:\"Types\"},\"number-format\":{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\"},\"feature-state\":{group:\"Feature data\"},\"geometry-type\":{group:\"Feature data\"},id:{group:\"Feature data\"},zoom:{group:\"Zoom\"},\"heatmap-density\":{group:\"Heatmap\"},\"line-progress\":{group:\"Feature data\"},accumulated:{group:\"Feature data\"},\"+\":{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\"},distance:{group:\"Math\"},\"==\":{group:\"Decision\"},\"!=\":{group:\"Decision\"},\">\":{group:\"Decision\"},\"<\":{group:\"Decision\"},\">=\":{group:\"Decision\"},\"<=\":{group:\"Decision\"},all:{group:\"Decision\"},any:{group:\"Decision\"},\"!\":{group:\"Decision\"},within:{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:{}},\"property-type\":\"data-constant\",transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]}},position:{type:\"array\",default:[1.15,210,30],length:3,value:\"number\",\"property-type\":\"data-constant\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]}},color:{type:\"color\",\"property-type\":\"data-constant\",default:\"#ffffff\",expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},intensity:{type:\"number\",\"property-type\":\"data-constant\",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:[\"zoom\"]},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\",default:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-outline-color\":{type:\"color\",transition:!0,requires:[{\"!\":\"fill-pattern\"},{\"fill-antialias\":!0}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"}},\"paint_fill-extrusion\":{\"fill-extrusion-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-extrusion-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-extrusion-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"fill-extrusion-height\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-base\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,requires:[\"fill-extrusion-height\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-vertical-gradient\":{type:\"boolean\",default:!0,transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_line:{\"line-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"line-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-width\":{type:\"number\",default:1,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-gap-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-offset\":{type:\"number\",default:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-dasharray\":{type:\"array\",value:\"number\",minimum:0,transition:!0,units:\"line widths\",requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"line-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"line-gradient\":{type:\"color\",transition:!1,requires:[{\"!\":\"line-dasharray\"},{\"!\":\"line-pattern\"},{source:\"geojson\",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:[\"line-progress\"]},\"property-type\":\"color-ramp\"}},paint_circle:{\"circle-radius\":{type:\"number\",default:5,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-blur\":{type:\"number\",default:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"circle-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-scale\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-stroke-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"}},paint_heatmap:{\"heatmap-radius\":{type:\"number\",default:30,minimum:1,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-weight\":{type:\"number\",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-intensity\":{type:\"number\",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"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\"],transition:!1,expression:{interpolated:!0,parameters:[\"heatmap-density\"]},\"property-type\":\"color-ramp\"},\"heatmap-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_symbol:{\"icon-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"icon-image\",\"icon-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-color\":{type:\"color\",default:\"#000000\",transition:!0,overridable:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"text-field\",\"text-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_raster:{\"raster-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-hue-rotate\":{type:\"number\",default:0,period:360,transition:!0,units:\"degrees\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-min\":{type:\"number\",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-max\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-saturation\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-contrast\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-resampling\":{type:\"enum\",values:{linear:{},nearest:{}},default:\"linear\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-fade-duration\":{type:\"number\",default:300,minimum:0,transition:!1,units:\"milliseconds\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_hillshade:{\"hillshade-illumination-direction\":{type:\"number\",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-illumination-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-exaggeration\":{type:\"number\",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-shadow-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-highlight-color\":{type:\"color\",default:\"#FFFFFF\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-accent-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_background:{\"background-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"background-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"background-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"background-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},transition:{duration:{type:\"number\",default:300,minimum:0,units:\"milliseconds\"},delay:{type:\"number\",default:0,minimum:0,units:\"milliseconds\"}},\"property-type\":{\"data-driven\":{type:\"property-type\"},\"cross-faded\":{type:\"property-type\"},\"cross-faded-data-driven\":{type:\"property-type\"},\"color-ramp\":{type:\"property-type\"},\"data-constant\":{type:\"property-type\"},constant:{type:\"property-type\"}},promoteId:{\"*\":{type:\"string\"}}},Ct=function(t,e,r,n){this.message=(t?t+\": \":\"\")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function Pt(t){var e=t.key,r=t.value;return r?[new Ct(e,r,\"constants have been deprecated as of v8\")]:[]}function It(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n\":\"value\"===t.itemType.kind?\"array\":\"array<\"+e+\">\"}return t.kind}var Zt=[Ft,Bt,Nt,jt,Ut,Gt,Vt,Wt(Ht),Yt];function Jt(t,e){if(\"error\"===e.kind)return null;if(\"array\"===t.kind){if(\"array\"===e.kind&&(0===e.N&&\"value\"===e.itemType.kind||!Jt(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=Zt;r255?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]),m=g<=.5?g*(d+1):g+d-g*d,v=2*g-m;return[n(255*s(v,m,p+1/3)),n(255*s(v,m,p)),n(255*s(v,m,p-1/3)),h];default:return null}}return null}}catch(t){}})).parseCSSColor,te=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};te.parse=function(t){if(t){if(t instanceof te)return t;if(\"string\"==typeof t){var e=$t(t);if(e)return new te(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},te.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+\")\"},te.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]},te.black=new te(0,0,0,1),te.white=new te(1,1,1,1),te.transparent=new te(0,0,0,0),te.red=new te(1,0,0,1);var ee=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\"})};ee.prototype.compare=function(t,e){return this.collator.compare(t,e)},ee.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var re=function(t,e,r,n,i){this.text=t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i},ne=function(t){this.sections=t};ne.fromString=function(t){return new ne([new re(t,null,null,null,null)])},ne.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},ne.factory=function(t){return t instanceof ne?t:ne.fromString(t)},ne.prototype.toString=function(){return 0===this.sections.length?\"\":this.sections.map((function(t){return t.text})).join(\"\")},ne.prototype.serialize=function(){for(var t=[\"format\"],e=0,r=this.sections;e=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 oe(t){if(null===t)return!0;if(\"string\"==typeof t)return!0;if(\"boolean\"==typeof t)return!0;if(\"number\"==typeof t)return!0;if(t instanceof te)return!0;if(t instanceof ee)return!0;if(t instanceof ne)return!0;if(t instanceof ie)return!0;if(Array.isArray(t)){for(var e=0,r=t;e2){var s=t[1];if(\"string\"!=typeof s||!(s in fe)||\"object\"===s)return e.error('The item type argument of \"array\" must be one of string, number, boolean',1);a=fe[s],n++}else a=Ht;if(t.length>3){if(null!==t[2]&&(\"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);o=t[2],n++}r=Wt(a,o)}else r=fe[i];for(var l=[];n1)&&e.push(n)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var pe=function(t){this.type=Gt,this.sections=t};pe.parse=function(t,e){if(t.length<2)return e.error(\"Expected at least one argument.\");var r=t[1];if(!Array.isArray(r)&&\"object\"==typeof r)return e.error(\"First argument must be an image or text section.\");for(var n=[],i=!1,a=1;a<=t.length-1;++a){var o=t[a];if(i&&\"object\"==typeof o&&!Array.isArray(o)){i=!1;var s=null;if(o[\"font-scale\"]&&!(s=e.parse(o[\"font-scale\"],1,Bt)))return null;var l=null;if(o[\"text-font\"]&&!(l=e.parse(o[\"text-font\"],1,Wt(Nt))))return null;var c=null;if(o[\"text-color\"]&&!(c=e.parse(o[\"text-color\"],1,Ut)))return null;var u=n[n.length-1];u.scale=s,u.font=l,u.textColor=c}else{var f=e.parse(t[a],1,Ht);if(!f)return null;var h=f.type.kind;if(\"string\"!==h&&\"value\"!==h&&\"null\"!==h&&\"resolvedImage\"!==h)return e.error(\"Formatted text type must be 'string', 'value', 'image' or 'null'.\");i=!0,n.push({content:f,scale:null,font:null,textColor:null})}}return new pe(n)},pe.prototype.evaluate=function(t){return new ne(this.sections.map((function(e){var r=e.content.evaluate(t);return se(r)===Yt?new re(\"\",r,null,null,null):new re(le(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(\",\"):null,e.textColor?e.textColor.evaluate(t):null)})))},pe.prototype.eachChild=function(t){for(var e=0,r=this.sections;e-1),r},de.prototype.eachChild=function(t){t(this.input)},de.prototype.outputDefined=function(){return!1},de.prototype.serialize=function(){return[\"image\",this.input.serialize()]};var ge={\"to-boolean\":jt,\"to-color\":Ut,\"to-number\":Bt,\"to-string\":Nt},me=function(t,e){this.type=t,this.args=e};me.parse=function(t,e){if(t.length<2)return e.error(\"Expected at least one argument.\");var r=t[0];if((\"to-boolean\"===r||\"to-string\"===r)&&2!==t.length)return e.error(\"Expected one argument.\");for(var n=ge[r],i=[],a=1;a4?\"Invalid rbga value \"+JSON.stringify(e)+\": expected an array containing either three or four numeric values.\":ae(e[0],e[1],e[2],e[3])))return new te(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ue(r||\"Could not parse color from value '\"+(\"string\"==typeof e?e:String(JSON.stringify(e)))+\"'\")}if(\"number\"===this.type.kind){for(var o=null,s=0,l=this.args;s=e[2])&&(!(t[1]<=e[1])&&!(t[3]>=e[3])))}function Te(t,e){var r,n=(180+t[0])/360,i=(r=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360),a=Math.pow(2,e.z);return[Math.round(n*a*8192),Math.round(i*a*8192)]}function ke(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function Ae(t,e){for(var r,n,i,a,o,s,l,c=!1,u=0,f=e.length;u0&&f<0||u<0&&f>0}function Ee(t,e,r){for(var n=0,i=r;nr[2]){var i=.5*n,a=t[0]-r[0]>i?-n:r[0]-t[0]>i?n:0;0===a&&(a=t[0]-r[2]>i?-n:r[2]-t[0]>i?n:0),t[0]+=a}_e(e,t)}function ze(t,e,r,n){for(var i=8192*Math.pow(2,n.z),a=[8192*n.x,8192*n.y],o=[],s=0,l=t;s=0)return!1;var r=!0;return t.eachChild((function(t){r&&!Ne(t,e)&&(r=!1)})),r}Re.parse=function(t,e){if(2!==t.length)return e.error(\"'within' expression requires exactly one argument, but found \"+(t.length-1)+\" instead.\");if(oe(t[1])){var r=t[1];if(\"FeatureCollection\"===r.type)for(var n=0;ne))throw new ue(\"Input is not a number.\");o=s-1}return 0}Ue.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)},Ue.prototype._parse=function(t,e){function r(t,e,r){return\"assert\"===r?new he(e,[t]):\"coerce\"===r?new me(e,[t]):t}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 n=t[0];if(\"string\"!=typeof n)return this.error(\"Expression name must be a string, but found \"+typeof n+' instead. If you wanted a literal array, use [\"literal\", [...]].',0),null;var i=this.registry[n];if(i){var a=i.parse(t,this);if(!a)return null;if(this.expectedType){var o=this.expectedType,s=a.type;if(\"string\"!==o.kind&&\"number\"!==o.kind&&\"boolean\"!==o.kind&&\"object\"!==o.kind&&\"array\"!==o.kind||\"value\"!==s.kind)if(\"color\"!==o.kind&&\"formatted\"!==o.kind&&\"resolvedImage\"!==o.kind||\"value\"!==s.kind&&\"string\"!==s.kind){if(this.checkSubtype(o,s))return null}else a=r(a,o,e.typeAnnotation||\"coerce\");else a=r(a,o,e.typeAnnotation||\"assert\")}if(!(a instanceof ce)&&\"resolvedImage\"!==a.type.kind&&function t(e){if(e instanceof je)return t(e.boundExpression);if(e instanceof xe&&\"error\"===e.name)return!1;if(e instanceof be)return!1;if(e instanceof Re)return!1;var r=e instanceof me||e instanceof he,n=!0;if(e.eachChild((function(e){n=r?n&&t(e):n&&e instanceof ce})),!n)return!1;return Fe(e)&&Ne(e,[\"zoom\",\"heatmap-density\",\"line-progress\",\"accumulated\",\"is-supported-script\"])}(a)){var l=new ye;try{a=new ce(a.type,a.evaluate(l))}catch(t){return this.error(t.message),null}}return a}return this.error('Unknown expression \"'+n+'\". 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.\")},Ue.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 Ue(this.registry,n,e||null,i,this.errors)},Ue.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 Dt(n,t))},Ue.prototype.checkSubtype=function(t,e){var r=Jt(t,e);return r&&this.error(r),r};var He=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n=o)return e.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.',l);var u=e.parse(s,c,i);if(!u)return null;i=i||u.type,n.push([o,u])}return new He(i,r,n)},He.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[Ve(e,n)].evaluate(t)},He.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Ge=Object.freeze({__proto__:null,number:qe,color:function(t,e,r){return new te(qe(t.r,e.r,r),qe(t.g,e.g,r),qe(t.b,e.b,r),qe(t.a,e.a,r))},array:function(t,e,r){return t.map((function(t,n){return qe(t,e[n],r)}))}}),Ye=6/29,We=3*Ye*Ye,Xe=Math.PI/180,Ze=180/Math.PI;function Je(t){return t>.008856451679035631?Math.pow(t,1/3):t/We+4/29}function Ke(t){return t>Ye?t*t*t:We*(t-4/29)}function Qe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function $e(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function tr(t){var e=$e(t.r),r=$e(t.g),n=$e(t.b),i=Je((.4124564*e+.3575761*r+.1804375*n)/.95047),a=Je((.2126729*e+.7151522*r+.072175*n)/1);return{l:116*a-16,a:500*(i-a),b:200*(a-Je((.0193339*e+.119192*r+.9503041*n)/1.08883)),alpha:t.a}}function er(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=1*Ke(e),r=.95047*Ke(r),n=1.08883*Ke(n),new te(Qe(3.2404542*r-1.5371385*e-.4985314*n),Qe(-.969266*r+1.8760108*e+.041556*n),Qe(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function rr(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var nr={forward:tr,reverse:er,interpolate:function(t,e,r){return{l:qe(t.l,e.l,r),a:qe(t.a,e.a,r),b:qe(t.b,e.b,r),alpha:qe(t.alpha,e.alpha,r)}}},ir={forward:function(t){var e=tr(t),r=e.l,n=e.a,i=e.b,a=Math.atan2(i,n)*Ze;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*Xe,r=t.c;return er({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:rr(t.h,e.h,r),c:qe(t.c,e.c,r),l:qe(t.l,e.l,r),alpha:qe(t.alpha,e.alpha,r)}}},ar=Object.freeze({__proto__:null,lab:nr,hcl:ir}),or=function(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var a=0,o=i;a1})))return e.error(\"Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.\",1);n={name:\"cubic-bezier\",controlPoints:s}}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(!(i=e.parse(i,2,Bt)))return null;var l=[],c=null;\"interpolate-hcl\"===r||\"interpolate-lab\"===r?c=Ut:e.expectedType&&\"value\"!==e.expectedType.kind&&(c=e.expectedType);for(var u=0;u=f)return e.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.',p);var g=e.parse(h,d,c);if(!g)return null;c=c||g.type,l.push([f,g])}return\"number\"===c.kind||\"color\"===c.kind||\"array\"===c.kind&&\"number\"===c.itemType.kind&&\"number\"==typeof c.N?new or(c,r,n,i,l):e.error(\"Type \"+Xt(c)+\" is not interpolatable.\")},or.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=Ve(e,n),o=e[a],s=e[a+1],l=or.interpolationFactor(this.interpolation,n,o,s),c=r[a].evaluate(t),u=r[a+1].evaluate(t);return\"interpolate\"===this.operator?Ge[this.type.kind.toLowerCase()](c,u,l):\"interpolate-hcl\"===this.operator?ir.reverse(ir.interpolate(ir.forward(c),ir.forward(u),l)):nr.reverse(nr.interpolate(nr.forward(c),nr.forward(u),l))},or.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e=r.length)throw new ue(\"Array index out of bounds: \"+e+\" > \"+(r.length-1)+\".\");if(e!==Math.floor(e))throw new ue(\"Array index must be an integer, but found \"+e+\" instead.\");return r[e]},ur.prototype.eachChild=function(t){t(this.index),t(this.input)},ur.prototype.outputDefined=function(){return!1},ur.prototype.serialize=function(){return[\"at\",this.index.serialize(),this.input.serialize()]};var fr=function(t,e){this.type=jt,this.needle=t,this.haystack=e};fr.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,Ht),n=e.parse(t[2],2,Ht);return r&&n?Kt(r.type,[jt,Nt,Bt,Ft,Ht])?new fr(r,n):e.error(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(r.type)+\" instead\"):null},fr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!r)return!1;if(!Qt(e,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ue(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(se(e))+\" instead.\");if(!Qt(r,[\"string\",\"array\"]))throw new ue(\"Expected second argument to be of type array or string, but found \"+Xt(se(r))+\" instead.\");return r.indexOf(e)>=0},fr.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},fr.prototype.outputDefined=function(){return!0},fr.prototype.serialize=function(){return[\"in\",this.needle.serialize(),this.haystack.serialize()]};var hr=function(t,e,r){this.type=Bt,this.needle=t,this.haystack=e,this.fromIndex=r};hr.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error(\"Expected 3 or 4 arguments, but found \"+(t.length-1)+\" instead.\");var r=e.parse(t[1],1,Ht),n=e.parse(t[2],2,Ht);if(!r||!n)return null;if(!Kt(r.type,[jt,Nt,Bt,Ft,Ht]))return e.error(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(r.type)+\" instead\");if(4===t.length){var i=e.parse(t[3],3,Bt);return i?new hr(r,n,i):null}return new hr(r,n)},hr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!Qt(e,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ue(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(se(e))+\" instead.\");if(!Qt(r,[\"string\",\"array\"]))throw new ue(\"Expected second argument to be of type array or string, but found \"+Xt(se(r))+\" instead.\");if(this.fromIndex){var n=this.fromIndex.evaluate(t);return r.indexOf(e,n)}return r.indexOf(e)},hr.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},hr.prototype.outputDefined=function(){return!1},hr.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return[\"index-of\",this.needle.serialize(),this.haystack.serialize(),t]}return[\"index-of\",this.needle.serialize(),this.haystack.serialize()]};var pr=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};pr.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;oNumber.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,se(h)))return null}else r=se(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,Ht);if(!d)return null;var g=e.parse(t[t.length-1],t.length-1,n);return g?\"value\"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new pr(r,n,d,i,a,g):null},pr.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(se(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},pr.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},pr.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},pr.prototype.serialize=function(){for(var t=this,e=[\"match\",this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();i=5)return e.error(\"Expected 3 or 4 arguments, but found \"+(t.length-1)+\" instead.\");var r=e.parse(t[1],1,Ht),n=e.parse(t[2],2,Bt);if(!r||!n)return null;if(!Kt(r.type,[Wt(Ht),Nt,Ht]))return e.error(\"Expected first argument to be of type array or string, but found \"+Xt(r.type)+\" instead\");if(4===t.length){var i=e.parse(t[3],3,Bt);return i?new gr(r.type,r,n,i):null}return new gr(r.type,r,n)},gr.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!Qt(e,[\"string\",\"array\"]))throw new ue(\"Expected first argument to be of type array or string, but found \"+Xt(se(e))+\" instead.\");if(this.endIndex){var n=this.endIndex.evaluate(t);return e.slice(r,n)}return e.slice(r)},gr.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},gr.prototype.outputDefined=function(){return!1},gr.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return[\"slice\",this.input.serialize(),this.beginIndex.serialize(),t]}return[\"slice\",this.input.serialize(),this.beginIndex.serialize()]};var xr=yr(\"==\",(function(t,e,r){return e===r}),vr),br=yr(\"!=\",(function(t,e,r){return e!==r}),(function(t,e,r,n){return!vr(0,e,r,n)})),_r=yr(\"<\",(function(t,e,r){return e\",(function(t,e,r){return e>r}),(function(t,e,r,n){return n.compare(e,r)>0})),Tr=yr(\"<=\",(function(t,e,r){return e<=r}),(function(t,e,r,n){return n.compare(e,r)<=0})),kr=yr(\">=\",(function(t,e,r){return e>=r}),(function(t,e,r,n){return n.compare(e,r)>=0})),Ar=function(t,e,r,n,i){this.type=Nt,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};Ar.parse=function(t,e){if(3!==t.length)return e.error(\"Expected two arguments.\");var r=e.parse(t[1],1,Bt);if(!r)return null;var n=t[2];if(\"object\"!=typeof n||Array.isArray(n))return e.error(\"NumberFormat options argument must be an object.\");var i=null;if(n.locale&&!(i=e.parse(n.locale,1,Nt)))return null;var a=null;if(n.currency&&!(a=e.parse(n.currency,1,Nt)))return null;var o=null;if(n[\"min-fraction-digits\"]&&!(o=e.parse(n[\"min-fraction-digits\"],1,Bt)))return null;var s=null;return n[\"max-fraction-digits\"]&&!(s=e.parse(n[\"max-fraction-digits\"],1,Bt))?null:new Ar(r,i,a,o,s)},Ar.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?\"currency\":\"decimal\",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},Ar.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},Ar.prototype.outputDefined=function(){return!1},Ar.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t[\"min-fraction-digits\"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t[\"max-fraction-digits\"]=this.maxFractionDigits.serialize()),[\"number-format\",this.number.serialize(),t]};var Mr=function(t){this.type=Bt,this.input=t};Mr.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 \"+Xt(r.type)+\" instead.\"):new Mr(r):null},Mr.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 ue(\"Expected value to be of type string or array, but found \"+Xt(se(e))+\" instead.\")},Mr.prototype.eachChild=function(t){t(this.input)},Mr.prototype.outputDefined=function(){return!1},Mr.prototype.serialize=function(){var t=[\"length\"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Sr={\"==\":xr,\"!=\":br,\">\":wr,\"<\":_r,\">=\":kr,\"<=\":Tr,array:he,at:ur,boolean:he,case:dr,coalesce:lr,collator:be,format:pe,image:de,in:fr,\"index-of\":hr,interpolate:or,\"interpolate-hcl\":or,\"interpolate-lab\":or,length:Mr,let:cr,literal:ce,match:pr,number:he,\"number-format\":Ar,object:he,slice:gr,step:He,string:he,\"to-boolean\":me,\"to-color\":me,\"to-number\":me,\"to-string\":me,var:je,within:Re};function Er(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=ae(r,n,i,o);if(s)throw new ue(s);return new te(r/255*o,n/255*o,i/255*o,o)}function Lr(t,e){return t in e}function Cr(t,e){var r=e[t];return void 0===r?null:r}function Pr(t){return{type:t}}function Ir(t){return{result:\"success\",value:t}}function Or(t){return{result:\"error\",value:t}}function zr(t){return\"data-driven\"===t[\"property-type\"]||\"cross-faded-data-driven\"===t[\"property-type\"]}function Dr(t){return!!t.expression&&t.expression.parameters.indexOf(\"zoom\")>-1}function Rr(t){return!!t.expression&&t.expression.interpolated}function Fr(t){return t instanceof Number?\"number\":t instanceof String?\"string\":t instanceof Boolean?\"boolean\":Array.isArray(t)?\"array\":null===t?\"null\":typeof t}function Br(t){return\"object\"==typeof t&&null!==t&&!Array.isArray(t)}function Nr(t){return t}function jr(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function Ur(t,e,r,n,i){return jr(typeof r===i?n[r]:void 0,t.default,e.default)}function Vr(t,e,r){if(\"number\"!==Fr(r))return jr(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=Ve(t.stops.map((function(t){return t[0]})),r);return t.stops[i][1]}function Hr(t,e,r){var n=void 0!==t.base?t.base:1;if(\"number\"!==Fr(r))return jr(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=Ve(t.stops.map((function(t){return t[0]})),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=Ge[e.type]||Nr;if(t.colorSpace&&\"rgb\"!==t.colorSpace){var u=ar[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 qr(t,e,r){return\"color\"===e.type?r=te.parse(r):\"formatted\"===e.type?r=ne.fromString(r.toString()):\"resolvedImage\"===e.type?r=ie.fromString(r.toString()):Fr(r)===e.type||\"enum\"===e.type&&e.values[r]||(r=void 0),jr(r,t.default,e.default)}xe.register(Sr,{error:[{kind:\"error\"},[Nt],function(t,e){var r=e[0];throw new ue(r.evaluate(t))}],typeof:[Nt,[Ht],function(t,e){return Xt(se(e[0].evaluate(t)))}],\"to-rgba\":[Wt(Bt,4),[Ut],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Ut,[Bt,Bt,Bt],Er],rgba:[Ut,[Bt,Bt,Bt,Bt],Er],has:{type:jt,overloads:[[[Nt],function(t,e){return Lr(e[0].evaluate(t),t.properties())}],[[Nt,Vt],function(t,e){var r=e[0],n=e[1];return Lr(r.evaluate(t),n.evaluate(t))}]]},get:{type:Ht,overloads:[[[Nt],function(t,e){return Cr(e[0].evaluate(t),t.properties())}],[[Nt,Vt],function(t,e){var r=e[0],n=e[1];return Cr(r.evaluate(t),n.evaluate(t))}]]},\"feature-state\":[Ht,[Nt],function(t,e){return Cr(e[0].evaluate(t),t.featureState||{})}],properties:[Vt,[],function(t){return t.properties()}],\"geometry-type\":[Nt,[],function(t){return t.geometryType()}],id:[Ht,[],function(t){return t.id()}],zoom:[Bt,[],function(t){return t.globals.zoom}],\"heatmap-density\":[Bt,[],function(t){return t.globals.heatmapDensity||0}],\"line-progress\":[Bt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Ht,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],\"+\":[Bt,Pr(Bt),function(t,e){for(var r=0,n=0,i=e;n\":[jt,[Nt,Ht],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->\":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],\"filter-<=\":[jt,[Nt,Ht],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-<=\":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],\"filter->=\":[jt,[Nt,Ht],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->=\":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],\"filter-has\":[jt,[Ht],function(t,e){return e[0].value in t.properties()}],\"filter-has-id\":[jt,[],function(t){return null!==t.id()&&void 0!==t.id()}],\"filter-type-in\":[jt,[Wt(Nt)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],\"filter-id-in\":[jt,[Wt(Ht)],function(t,e){return e[0].value.indexOf(t.id())>=0}],\"filter-in-small\":[jt,[Nt,Wt(Ht)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],\"filter-in-large\":[jt,[Nt,Wt(Ht)],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)}],all:{type:jt,overloads:[[[jt,jt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[Pr(jt),function(t,e){for(var r=0,n=e;r0&&\"string\"==typeof t[0]&&t[0]in Sr}function Wr(t,e){var r=new Ue(Sr,[],e?function(t){var e={color:Ut,string:Nt,number:Bt,enum:Nt,boolean:jt,formatted:Gt,resolvedImage:Yt};if(\"array\"===t.type)return Wt(e[t.value]||Ht,t.length);return e[t.type]}(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&\"string\"===e.type?{typeAnnotation:\"coerce\"}:void 0);return n?Ir(new Gr(n,e)):Or(r.errors)}Gr.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)},Gr.prototype.evaluate=function(t,e,r,n,i,a){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||\"number\"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new ue(\"Expected value to be one of \"+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(\", \")+\", but found \"+JSON.stringify(o)+\" instead.\");return o}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,\"undefined\"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Xr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent=\"constant\"!==t&&!Be(e.expression)};Xr.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,a)},Xr.prototype.evaluate=function(t,e,r,n,i,a){return this._styleExpression.evaluate(t,e,r,n,i,a)};var Zr=function(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent=\"camera\"!==t&&!Be(e.expression),this.interpolationType=n};function Jr(t,e){if(\"error\"===(t=Wr(t,e)).result)return t;var r=t.value.expression,n=Fe(r);if(!n&&!zr(e))return Or([new Dt(\"\",\"data expressions not supported\")]);var i=Ne(r,[\"zoom\"]);if(!i&&!Dr(e))return Or([new Dt(\"\",\"zoom expressions not supported\")]);var a=function t(e){var r=null;if(e instanceof cr)r=t(e.result);else if(e instanceof lr)for(var n=0,i=e.args;nn.maximum?[new Ct(e,r,r+\" is greater than the maximum value \"+n.maximum)]:[]}function en(t){var e,r,n,i=t.valueSpec,a=Ot(t.value.type),o={},s=\"categorical\"!==a&&void 0===t.value.property,l=!s,c=\"array\"===Fr(t.value.stops)&&\"array\"===Fr(t.value.stops[0])&&\"object\"===Fr(t.value.stops[0][0]),u=Qr({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 Ct(t.key,t.value,'identity function may not have a \"stops\" property')];var e=[],r=t.value;e=e.concat($r({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:f})),\"array\"===Fr(r)&&0===r.length&&e.push(new Ct(t.key,r,\"array must have at least one stop\"));return e},default:function(t){return kn({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return\"identity\"===a&&s&&u.push(new Ct(t.key,t.value,'missing required property \"property\"')),\"identity\"===a||t.value.stops||u.push(new Ct(t.key,t.value,'missing required property \"stops\"')),\"exponential\"===a&&t.valueSpec.expression&&!Rr(t.valueSpec)&&u.push(new Ct(t.key,t.value,\"exponential functions not supported\")),t.styleSpec.$version>=8&&(l&&!zr(t.valueSpec)?u.push(new Ct(t.key,t.value,\"property functions not supported\")):s&&!Dr(t.valueSpec)&&u.push(new Ct(t.key,t.value,\"zoom functions not supported\"))),\"categorical\"!==a&&!c||void 0!==t.value.property||u.push(new Ct(t.key,t.value,'\"property\" property is required')),u;function f(t){var e=[],a=t.value,s=t.key;if(\"array\"!==Fr(a))return[new Ct(s,a,\"array expected, \"+Fr(a)+\" found\")];if(2!==a.length)return[new Ct(s,a,\"array length 2 expected, length \"+a.length+\" found\")];if(c){if(\"object\"!==Fr(a[0]))return[new Ct(s,a,\"object expected, \"+Fr(a[0])+\" found\")];if(void 0===a[0].zoom)return[new Ct(s,a,\"object stop key must have zoom\")];if(void 0===a[0].value)return[new Ct(s,a,\"object stop key must have value\")];if(n&&n>Ot(a[0].zoom))return[new Ct(s,a[0].zoom,\"stop zoom values must appear in ascending order\")];Ot(a[0].zoom)!==n&&(n=Ot(a[0].zoom),r=void 0,o={}),e=e.concat(Qr({key:s+\"[0]\",value:a[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:tn,value:h}}))}else e=e.concat(h({key:s+\"[0]\",value:a[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},a));return Yr(zt(a[1]))?e.concat([new Ct(s+\"[1]\",a[1],\"expressions are not allowed in function stops.\")]):e.concat(kn({key:s+\"[1]\",value:a[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,n){var s=Fr(t.value),l=Ot(t.value),c=null!==t.value?t.value:n;if(e){if(s!==e)return[new Ct(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 Ct(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 zr(i)&&void 0===a&&(u+='\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.'),[new Ct(t.key,c,u)]}return\"categorical\"!==a||\"number\"!==s||isFinite(l)&&Math.floor(l)===l?\"categorical\"!==a&&\"number\"===s&&void 0!==r&&l=2&&\"$id\"!==t[1]&&\"$type\"!==t[1];case\"in\":return t.length>=3&&(\"string\"!=typeof t[1]||Array.isArray(t[2]));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);ee?1:0}function cn(t){if(!t)return!0;var e,r=t[0];return t.length<=1?\"any\"!==r:\"==\"===r?un(t[1],t[2],\"==\"):\"!=\"===r?pn(un(t[1],t[2],\"==\")):\"<\"===r||\">\"===r||\"<=\"===r||\">=\"===r?un(t[1],t[2],r):\"any\"===r?(e=t.slice(1),[\"any\"].concat(e.map(cn))):\"all\"===r?[\"all\"].concat(t.slice(1).map(cn)):\"none\"===r?[\"all\"].concat(t.slice(1).map(cn).map(pn)):\"in\"===r?fn(t[1],t.slice(2)):\"!in\"===r?pn(fn(t[1],t.slice(2))):\"has\"===r?hn(t[1]):\"!has\"===r?pn(hn(t[1])):\"within\"!==r||t}function un(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 fn(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(ln)]]:[\"filter-in-small\",t,[\"literal\",e]]}}function hn(t){switch(t){case\"$type\":return!0;case\"$id\":return[\"filter-has-id\"];default:return[\"filter-has\",t]}}function pn(t){return[\"!\",t]}function dn(t){return an(zt(t.value))?rn(It({},t,{expressionContext:\"filter\",valueSpec:{value:\"boolean\"}})):function t(e){var r=e.value,n=e.key;if(\"array\"!==Fr(r))return[new Ct(n,r,\"array expected, \"+Fr(r)+\" found\")];var i,a=e.styleSpec,o=[];if(r.length<1)return[new Ct(n,r,\"filter array must have at least 1 element\")];switch(o=o.concat(nn({key:n+\"[0]\",value:r[0],valueSpec:a.filter_operator,style:e.style,styleSpec:e.styleSpec})),Ot(r[0])){case\"<\":case\"<=\":case\">\":case\">=\":r.length>=2&&\"$type\"===Ot(r[1])&&o.push(new Ct(n,r,'\"$type\" cannot be use with operator \"'+r[0]+'\"'));case\"==\":case\"!=\":3!==r.length&&o.push(new Ct(n,r,'filter array for operator \"'+r[0]+'\" must have 3 elements'));case\"in\":case\"!in\":r.length>=2&&\"string\"!==(i=Fr(r[1]))&&o.push(new Ct(n+\"[1]\",r[1],\"string expected, \"+i+\" found\"));for(var s=2;s=u[p+0]&&n>=u[p+1])?(o[h]=!0,a.push(c[h])):o[h]=!1}}},Dn.prototype._forEachCell=function(t,e,r,n,i,a,o,s){for(var l=this._convertToCellCoord(t),c=this._convertToCellCoord(e),u=this._convertToCellCoord(r),f=this._convertToCellCoord(n),h=l;h<=u;h++)for(var p=c;p<=f;p++){var d=this.d*p+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(p),this._convertFromCellCoord(h+1),this._convertFromCellCoord(p+1)))&&i.call(this,t,e,r,n,d,a,o,s))return}},Dn.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},Dn.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Dn.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+this.cells.length+1+1,r=0,n=0;n=0)){var f=t[u];c[u]=Bn[l].shallow.indexOf(u)>=0?f:Hn(f,e)}t instanceof Error&&(c.message=t.message)}if(c.$name)throw new Error(\"$name property is reserved for worker serialization logic.\");return\"Object\"!==l&&(c.$name=l),c}throw new Error(\"can't serialize object of type \"+typeof t)}function qn(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||Un(t)||Vn(t)||ArrayBuffer.isView(t)||t instanceof Rn)return t;if(Array.isArray(t))return t.map(qn);if(\"object\"==typeof t){var e=t.$name||\"Object\",r=Bn[e].klass;if(!r)throw new Error(\"can't deserialize unregistered class \"+e);if(r.deserialize)return r.deserialize(t);for(var n=Object.create(r.prototype),i=0,a=Object.keys(t);i=0?s:qn(s)}}return n}throw new Error(\"can't deserialize object of type \"+typeof t)}var Gn=function(){this.first=!0};Gn.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=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 Wn(t){for(var e=0,r=t;e=65097&&t<=65103)||(!!Yn[\"CJK Compatibility Ideographs\"](t)||(!!Yn[\"CJK Compatibility\"](t)||(!!Yn[\"CJK Radicals Supplement\"](t)||(!!Yn[\"CJK Strokes\"](t)||(!(!Yn[\"CJK Symbols and Punctuation\"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||(!!Yn[\"CJK Unified Ideographs Extension A\"](t)||(!!Yn[\"CJK Unified Ideographs\"](t)||(!!Yn[\"Enclosed CJK Letters and Months\"](t)||(!!Yn[\"Hangul Compatibility Jamo\"](t)||(!!Yn[\"Hangul Jamo Extended-A\"](t)||(!!Yn[\"Hangul Jamo Extended-B\"](t)||(!!Yn[\"Hangul Jamo\"](t)||(!!Yn[\"Hangul Syllables\"](t)||(!!Yn.Hiragana(t)||(!!Yn[\"Ideographic Description Characters\"](t)||(!!Yn.Kanbun(t)||(!!Yn[\"Kangxi Radicals\"](t)||(!!Yn[\"Katakana Phonetic Extensions\"](t)||(!(!Yn.Katakana(t)||12540===t)||(!(!Yn[\"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)||(!(!Yn[\"Small Form Variants\"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||(!!Yn[\"Unified Canadian Aboriginal Syllabics\"](t)||(!!Yn[\"Unified Canadian Aboriginal Syllabics Extended\"](t)||(!!Yn[\"Vertical Forms\"](t)||(!!Yn[\"Yijing Hexagram Symbols\"](t)||(!!Yn[\"Yi Syllables\"](t)||!!Yn[\"Yi Radicals\"](t))))))))))))))))))))))))))))))}function Jn(t){return!(Zn(t)||function(t){return!(!Yn[\"Latin-1 Supplement\"](t)||167!==t&&169!==t&&174!==t&&177!==t&&188!==t&&189!==t&&190!==t&&215!==t&&247!==t)||(!(!Yn[\"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)||(!!Yn[\"Letterlike Symbols\"](t)||(!!Yn[\"Number Forms\"](t)||(!(!Yn[\"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))||(!(!Yn[\"Control Pictures\"](t)||9251===t)||(!!Yn[\"Optical Character Recognition\"](t)||(!!Yn[\"Enclosed Alphanumerics\"](t)||(!!Yn[\"Geometric Shapes\"](t)||(!(!Yn[\"Miscellaneous Symbols\"](t)||t>=9754&&t<=9759)||(!(!Yn[\"Miscellaneous Symbols and Arrows\"](t)||!(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243))||(!!Yn[\"CJK Symbols and Punctuation\"](t)||(!!Yn.Katakana(t)||(!!Yn[\"Private Use Area\"](t)||(!!Yn[\"CJK Compatibility Forms\"](t)||(!!Yn[\"Small Form Variants\"](t)||(!!Yn[\"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 Kn(t){return t>=1424&&t<=2303||Yn[\"Arabic Presentation Forms-A\"](t)||Yn[\"Arabic Presentation Forms-B\"](t)}function Qn(t,e){return!(!e&&Kn(t))&&!(t>=2304&&t<=3583||t>=3840&&t<=4255||Yn.Khmer(t))}function $n(t){for(var e=0,r=t;e-1&&(ai=ni),ii&&ii(t)};function li(){ci.fire(new Mt(\"pluginStateChange\",{pluginStatus:ai,pluginURL:oi}))}var ci=new Et,ui=function(){return ai},fi=function(){if(ai!==ti||!oi)throw new Error(\"rtl-text-plugin cannot be downloaded unless a pluginURL is specified\");ai=ei,li(),oi&&xt({url:oi},(function(t){t?si(t):(ai=ri,li())}))},hi={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return ai===ri||null!=hi.applyArabicShaping},isLoading:function(){return ai===ei},setState:function(t){ai=t.pluginStatus,oi=t.pluginURL},isParsed:function(){return null!=hi.applyArabicShaping&&null!=hi.processBidirectionalText&&null!=hi.processStyledBidirectionalText},getPluginURL:function(){return oi}},pi=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 Gn,this.transition={})};pi.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,n=t;rthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}};var di=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(Br(t))return new Kr(t,e);if(Yr(t)){var r=Jr(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=te.parse(t)),{kind:\"constant\",evaluate:function(){return n}}}(void 0===e?t.specification.default:e,t.specification)};di.prototype.isDataDriven=function(){return\"source\"===this.expression.kind||\"composite\"===this.expression.kind},di.prototype.possiblyEvaluate=function(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)};var gi=function(t){this.property=t,this.value=new di(t,void 0)};gi.prototype.transitioned=function(t,e){return new vi(this.property,this.value,e,u({},t.transition,this.transition),t.now)},gi.prototype.untransitioned=function(){return new vi(this.property,this.value,null,{},0)};var mi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};mi.prototype.getValue=function(t){return x(this._values[t].value.value)},mi.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new gi(this._values[t].property)),this._values[t].value=new di(this._values[t].property,null===e?void 0:x(e))},mi.prototype.getTransition=function(t){return x(this._values[t].transition)},mi.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new gi(this._values[t].property)),this._values[t].transition=x(e)||void 0},mi.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);ethis.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(n=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}(o))}return i};var yi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};yi.prototype.possiblyEvaluate=function(t,e,r){for(var n=new _i(this._properties),i=0,a=Object.keys(this._values);in.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(Ti),Ai=function(t){this.specification=t};Ai.prototype.possiblyEvaluate=function(t,e,r,n){if(void 0!==t.value){if(\"constant\"===t.expression.kind){var i=t.expression.evaluate(e,null,{},r,n);return this._calculate(i,i,i,e)}return this._calculate(t.expression.evaluate(new pi(Math.floor(e.zoom-1),e)),t.expression.evaluate(new pi(Math.floor(e.zoom),e)),t.expression.evaluate(new pi(Math.floor(e.zoom+1),e)),e)}},Ai.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},Ai.prototype.interpolate=function(t){return t};var Mi=function(t){this.specification=t};Mi.prototype.possiblyEvaluate=function(t,e,r,n){return!!t.expression.evaluate(e,null,{},r,n)},Mi.prototype.interpolate=function(){return!1};var Si=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var r=t[e];r.specification.overridable&&this.overridableProperties.push(e);var n=this.defaultPropertyValues[e]=new di(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new gi(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};Nn(\"DataDrivenProperty\",Ti),Nn(\"DataConstantProperty\",wi),Nn(\"CrossFadedDataDrivenProperty\",ki),Nn(\"CrossFadedProperty\",Ai),Nn(\"ColorRampProperty\",Mi);var Ei=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},\"custom\"!==e.type&&(e=e,this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,\"background\"!==e.type&&(this.source=e.source,this.sourceLayer=e[\"source-layer\"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new xi(r.layout)),r.paint)){for(var n in this._transitionablePaint=new mi(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(),this.paint=new _i(r.paint)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return\"visibility\"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n=\"layers.\"+this.id+\".layout.\"+t;if(this._validate(In,n,t,e,r))return}\"visibility\"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e},e.prototype.getPaintProperty=function(t){return m(t,\"-transition\")?this._transitionablePaint.getTransition(t.slice(0,-\"-transition\".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n=\"layers.\"+this.id+\".paint.\"+t;if(this._validate(Pn,n,t,e,r))return!1}if(m(t,\"-transition\"))return this._transitionablePaint.setTransition(t.slice(0,-\"-transition\".length),e||void 0),!1;var i=this._transitionablePaint._values[t],a=\"cross-faded-data-driven\"===i.property.specification[\"property-type\"],o=i.value.isDataDriven(),s=i.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var l=this._transitionablePaint._values[t].value;return l.isDataDriven()||o||a||this._handleOverridablePaintPropertyUpdate(t,s,l)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype._handleOverridablePaintPropertyUpdate=function(t,e,r){return!1},e.prototype.isHidden=function(t){return!!(this.minzoom&&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,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)},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 this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),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 void 0===i&&(i={}),(!i||!1!==i.validate)&&On(this,t.call(Ln,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:Lt,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof bi&&zr(e.property.specification)&&((\"source\"===e.value.kind||\"composite\"===e.value.kind)&&e.value.isStateDependent))return!0}return!1},e}(Et),Li={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Ci=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},Pi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Ii(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map((function(t){var i,a=(i=t.type,Li[i].BYTES_PER_ELEMENT),o=r=Oi(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:Oi(r,Math.max(n,e)),alignment:e}}function Oi(t,e){return Math.ceil(t/e)*e}Pi.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Pi.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},Pi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Pi.prototype.clear=function(){this.length=0},Pi.prototype.resize=function(t){this.reserve(t),this.length=t},Pi.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)}},Pi.prototype._refreshViews=function(){throw new Error(\"_refreshViews() must be implemented by each concrete StructArray layout\")};var zi=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;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.int16[n+0]=e,this.int16[n+1]=r,t},e}(Pi);zi.prototype.bytesPerElement=4,Nn(\"StructArrayLayout2i4\",zi);var Di=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;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,t},e}(Pi);Di.prototype.bytesPerElement=8,Nn(\"StructArrayLayout4i8\",Di);var Ri=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;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(Pi);Ri.prototype.bytesPerElement=12,Nn(\"StructArrayLayout2i4i12\",Ri);var Fi=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;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=4*t,l=8*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=a,this.uint8[l+7]=o,t},e}(Pi);Fi.prototype.bytesPerElement=8,Nn(\"StructArrayLayout2i4ub8\",Fi);var Bi=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,n,i,a,o,s,l,c){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,n,i,a,o,s,l,c)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u){var f=9*t,h=18*t;return this.uint16[f+0]=e,this.uint16[f+1]=r,this.uint16[f+2]=n,this.uint16[f+3]=i,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.uint8[h+16]=c,this.uint8[h+17]=u,t},e}(Pi);Bi.prototype.bytesPerElement=18,Nn(\"StructArrayLayout8ui2ub18\",Bi);var Ni=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,l,c,u,f){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,n,i,a,o,s,l,c,u,f)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h){var p=12*t;return this.int16[p+0]=e,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=i,this.uint16[p+4]=a,this.uint16[p+5]=o,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=c,this.int16[p+9]=u,this.int16[p+10]=f,this.int16[p+11]=h,t},e}(Pi);Ni.prototype.bytesPerElement=24,Nn(\"StructArrayLayout4i4ui4i24\",Ni);var ji=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.float32[i+0]=e,this.float32[i+1]=r,this.float32[i+2]=n,t},e}(Pi);ji.prototype.bytesPerElement=12,Nn(\"StructArrayLayout3f12\",ji);var Ui=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;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint32[r+0]=e,t},e}(Pi);Ui.prototype.bytesPerElement=4,Nn(\"StructArrayLayout1ul4\",Ui);var Vi=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){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,r,n,i,a,o,s,l)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c){var u=10*t,f=5*t;return this.int16[u+0]=e,this.int16[u+1]=r,this.int16[u+2]=n,this.int16[u+3]=i,this.int16[u+4]=a,this.int16[u+5]=o,this.uint32[f+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,t},e}(Pi);Vi.prototype.bytesPerElement=20,Nn(\"StructArrayLayout6i1ul2ui20\",Vi);var Hi=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;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(Pi);Hi.prototype.bytesPerElement=12,Nn(\"StructArrayLayout2i2i2i12\",Hi);var qi=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),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i)},e.prototype.emplace=function(t,e,r,n,i,a){var o=4*t,s=8*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=n,this.int16[s+6]=i,this.int16[s+7]=a,t},e}(Pi);qi.prototype.bytesPerElement=16,Nn(\"StructArrayLayout2f1f2i16\",qi);var Gi=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;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=12*t,o=3*t;return this.uint8[a+0]=e,this.uint8[a+1]=r,this.float32[o+1]=n,this.float32[o+2]=i,t},e}(Pi);Gi.prototype.bytesPerElement=12,Nn(\"StructArrayLayout2ub2f12\",Gi);var Yi=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,this.uint16[i+2]=n,t},e}(Pi);Yi.prototype.bytesPerElement=6,Nn(\"StructArrayLayout3ui6\",Yi);var Wi=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,d,g,m){var v=this.length;return this.resize(v+1),this.emplace(v,t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v){var y=24*t,x=12*t,b=48*t;return this.int16[y+0]=e,this.int16[y+1]=r,this.uint16[y+2]=n,this.uint16[y+3]=i,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[y+10]=l,this.uint16[y+11]=c,this.uint16[y+12]=u,this.float32[x+7]=f,this.float32[x+8]=h,this.uint8[b+36]=p,this.uint8[b+37]=d,this.uint8[b+38]=g,this.uint32[x+10]=m,this.int16[y+22]=v,t},e}(Pi);Wi.prototype.bytesPerElement=48,Nn(\"StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48\",Wi);var Xi=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,d,g,m,v,y,x,b,_,w,T,k,A,M,S){var E=this.length;return this.resize(E+1),this.emplace(E,t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,w,T,k,A,M,S)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,w,T,k,A,M,S,E){var L=34*t,C=17*t;return this.int16[L+0]=e,this.int16[L+1]=r,this.int16[L+2]=n,this.int16[L+3]=i,this.int16[L+4]=a,this.int16[L+5]=o,this.int16[L+6]=s,this.int16[L+7]=l,this.uint16[L+8]=c,this.uint16[L+9]=u,this.uint16[L+10]=f,this.uint16[L+11]=h,this.uint16[L+12]=p,this.uint16[L+13]=d,this.uint16[L+14]=g,this.uint16[L+15]=m,this.uint16[L+16]=v,this.uint16[L+17]=y,this.uint16[L+18]=x,this.uint16[L+19]=b,this.uint16[L+20]=_,this.uint16[L+21]=w,this.uint16[L+22]=T,this.uint32[C+12]=k,this.float32[C+13]=A,this.float32[C+14]=M,this.float32[C+15]=S,this.float32[C+16]=E,t},e}(Pi);Xi.prototype.bytesPerElement=68,Nn(\"StructArrayLayout8i15ui1ul4f68\",Xi);var Zi=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;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.float32[r+0]=e,t},e}(Pi);Zi.prototype.bytesPerElement=4,Nn(\"StructArrayLayout1f4\",Zi);var Ji=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.int16[i+0]=e,this.int16[i+1]=r,this.int16[i+2]=n,t},e}(Pi);Ji.prototype.bytesPerElement=6,Nn(\"StructArrayLayout3i6\",Ji);var Ki=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=2*t,a=4*t;return this.uint32[i+0]=e,this.uint16[a+2]=r,this.uint16[a+3]=n,t},e}(Pi);Ki.prototype.bytesPerElement=8,Nn(\"StructArrayLayout1ul2ui8\",Ki);var Qi=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;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,t},e}(Pi);Qi.prototype.bytesPerElement=4,Nn(\"StructArrayLayout2ui4\",Qi);var $i=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){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint16[r+0]=e,t},e}(Pi);$i.prototype.bytesPerElement=2,Nn(\"StructArrayLayout1ui2\",$i);var ta=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;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.float32[n+0]=e,this.float32[n+1]=r,t},e}(Pi);ta.prototype.bytesPerElement=8,Nn(\"StructArrayLayout2f8\",ta);var ea=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;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,t},e}(Pi);ea.prototype.bytesPerElement=16,Nn(\"StructArrayLayout4f16\",ea);var ra=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},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Ci);ra.prototype.size=20;var na=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 ra(this,t)},e}(Vi);Nn(\"CollisionBoxArray\",na);var ia=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},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,r),e}(Ci);ia.prototype.size=48;var aa=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 ia(this,t)},e}(Wi);Nn(\"PlacedSymbolArray\",aa);var oa=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},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+12]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},r.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,r),e}(Ci);oa.prototype.size=68;var sa=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 oa(this,t)},e}(Xi);Nn(\"SymbolInstanceArray\",sa);var la=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}(Zi);Nn(\"GlyphOffsetArray\",la);var ca=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}(Ji);Nn(\"SymbolLineVertexArray\",ca);var ua=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.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,r),e}(Ci);ua.prototype.size=8;var fa=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 ua(this,t)},e}(Ki);Nn(\"FeatureIndexArray\",fa);var ha=Ii([{name:\"a_pos\",components:2,type:\"Int16\"}],4).members,pa=function(t){void 0===t&&(t=[]),this.segments=t};function da(t,e){return 256*(t=l(Math.floor(t),0,255))+(e=l(Math.floor(e),0,255))}pa.prototype.prepareSegment=function(t,e,r,n){var i=this.segments[this.segments.length-1];return t>pa.MAX_VERTEX_ARRAY_LENGTH&&_(\"Max vertices per segment is \"+pa.MAX_VERTEX_ARRAY_LENGTH+\": bucket requested \"+t),(!i||i.vertexLength+t>pa.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},pa.prototype.get=function(){return this.segments},pa.prototype.destroy=function(){for(var t=0,e=this.segments;t>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(a>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&t.charCodeAt(c+2))<<16;case 2:l^=(255&t.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(c)))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}})),va=e((function(t){t.exports=function(t,e){for(var r,n=t.length,i=e^n,a=0;n>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(a)|(255&t.charCodeAt(++a))<<8|(255&t.charCodeAt(++a))<<16|(255&t.charCodeAt(++a))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++a;switch(n){case 3:i^=(255&t.charCodeAt(a+2))<<16;case 2:i^=(255&t.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(a)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}})),ya=ma,xa=ma,ba=va;ya.murmur3=xa,ya.murmur2=ba;var _a=function(){this.ids=[],this.positions=[],this.indexed=!1};_a.prototype.add=function(t,e,r,n){this.ids.push(Ta(t)),this.positions.push(e,r,n)},_a.prototype.getPositions=function(t){for(var e=Ta(t),r=0,n=this.ids.length-1;r>1;this.ids[i]>=e?n=i:r=i+1}for(var a=[];this.ids[r]===e;){var o=this.positions[3*r],s=this.positions[3*r+1],l=this.positions[3*r+2];a.push({index:o,start:s,end:l}),r++}return a},_a.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return function t(e,r,n,i){for(;n>1],o=n-1,s=i+1;;){do{o++}while(e[o]a);if(o>=s)break;ka(e,o,s),ka(r,3*o,3*s),ka(r,3*o+1,3*s+1),ka(r,3*o+2,3*s+2)}s-nGa.max||o.yGa.max)&&(_(\"Geometry exceeds allowed extent, reduce your vector tile buffer size\"),o.x=l(o.x,Ga.min,Ga.max),o.y=l(o.y,Ga.min,Ga.max))}return r}function Wa(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var Xa=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.hasPattern=!1,this.layoutVertexArray=new zi,this.indexArray=new Yi,this.segments=new pa,this.programConfigurations=new Ua(ha,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function Za(t,e){for(var r=0;r1){if($a(t,e))return!0;for(var n=0;n1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function no(t,e){for(var r,n,i,a=!1,o=0;oe.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 io(t,e){for(var r=!1,n=0,i=t.length-1;ne.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 ao(t,e,r){var n=r[0],i=r[2];if(t.xi.x&&e.x>i.x||t.yi.y&&e.y>i.y)return!1;var a=w(t,e,r[0]);return a!==w(t,e,r[1])||a!==w(t,e,r[2])||a!==w(t,e,r[3])}function oo(t,e,r){var n=e.paint.get(t).value;return\"constant\"===n.kind?n.value:r.programConfigurations.get(e.id).getMaxValue(t)}function so(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function lo(t,e,r,n,a){if(!e[0]&&!e[1])return t;var o=i.convert(e)._mult(a);\"viewport\"===r&&o._rotate(-n);for(var s=[],l=0;l=8192||u<0||u>=8192)){var f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),h=f.vertexLength;Wa(this.layoutVertexArray,c,u,-1,-1),Wa(this.layoutVertexArray,c,u,1,-1),Wa(this.layoutVertexArray,c,u,1,1),Wa(this.layoutVertexArray,c,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),f.vertexLength+=4,f.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{},n)},Nn(\"CircleBucket\",Xa,{omit:[\"layers\"]});var co=new Si({\"circle-sort-key\":new Ti(Lt.layout_circle[\"circle-sort-key\"])}),uo={paint:new Si({\"circle-radius\":new Ti(Lt.paint_circle[\"circle-radius\"]),\"circle-color\":new Ti(Lt.paint_circle[\"circle-color\"]),\"circle-blur\":new Ti(Lt.paint_circle[\"circle-blur\"]),\"circle-opacity\":new Ti(Lt.paint_circle[\"circle-opacity\"]),\"circle-translate\":new wi(Lt.paint_circle[\"circle-translate\"]),\"circle-translate-anchor\":new wi(Lt.paint_circle[\"circle-translate-anchor\"]),\"circle-pitch-scale\":new wi(Lt.paint_circle[\"circle-pitch-scale\"]),\"circle-pitch-alignment\":new wi(Lt.paint_circle[\"circle-pitch-alignment\"]),\"circle-stroke-width\":new Ti(Lt.paint_circle[\"circle-stroke-width\"]),\"circle-stroke-color\":new Ti(Lt.paint_circle[\"circle-stroke-color\"]),\"circle-stroke-opacity\":new Ti(Lt.paint_circle[\"circle-stroke-opacity\"])}),layout:co},fo=\"undefined\"!=typeof Float32Array?Float32Array:Array;function ho(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}function po(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],m=e[13],v=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*m,t[2]=x*a+b*c+_*p+w*v,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*m,t[6]=x*a+b*c+_*p+w*v,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*m,t[10]=x*a+b*c+_*p+w*v,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*m,t[14]=x*a+b*c+_*p+w*v,t[15]=x*o+b*u+_*d+w*y,t}Math.hypot||(Math.hypot=function(){for(var t=arguments,e=0,r=arguments.length;r--;)e+=t[r]*t[r];return Math.sqrt(e)});var go=po;var mo,vo,yo=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t};mo=new fo(3),fo!=Float32Array&&(mo[0]=0,mo[1]=0,mo[2]=0),vo=mo;function xo(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}!function(){var t=function(){var t=new fo(4);return fo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}()}();var bo=function(t){var e=t[0],r=t[1];return e*e+r*r},_o=(function(){var t=function(){var t=new fo(2);return fo!=Float32Array&&(t[0]=0,t[1]=0),t}()}(),function(t){function e(e){t.call(this,e,uo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Xa(t)},e.prototype.queryRadius=function(t){var e=t;return oo(\"circle-radius\",this,e)+oo(\"circle-stroke-width\",this,e)+so(this.paint.get(\"circle-translate\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o,s){for(var l=lo(t,this.paint.get(\"circle-translate\"),this.paint.get(\"circle-translate-anchor\"),a.angle,o),c=this.paint.get(\"circle-radius\").evaluate(e,r)+this.paint.get(\"circle-stroke-width\").evaluate(e,r),u=\"map\"===this.paint.get(\"circle-pitch-alignment\"),f=u?l:function(t,e){return t.map((function(t){return wo(t,e)}))}(l,s),h=u?c*o:c,p=0,d=n;pt.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;l80*r){n=a=t[0],i=o=t[1];for(var d=r;da&&(a=s),l>o&&(o=l);c=0!==(c=Math.max(a-n,o-i))?1/c:0}return jo(h,p,r,n,i,c),p}function Bo(t,e,r,n,i){var a,o;if(i===ls(t,e,r,n)>0)for(a=e;a=e;a-=n)o=as(a,t[a],t[a+1],o);return o&&$o(o,o.next)&&(os(o),o=o.next),o}function No(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!$o(n,n.next)&&0!==Qo(n.prev,n,n.next))n=n.next;else{if(os(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function jo(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=Xo(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;e0||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?Vo(t,n,i,a):Uo(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),os(t),t=l.next,c=l.next;else if((t=l)===c){o?1===o?jo(t=Ho(No(t),e,r),e,r,n,i,a,2):2===o&&qo(t,e,r,n,i,a):jo(No(t),e,r,n,i,a,1);break}}}function Uo(t){var e=t.prev,r=t,n=t.next;if(Qo(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Jo(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&Qo(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Vo(t,e,r,n){var i=t.prev,a=t,o=t.next;if(Qo(i,a,o)>=0)return!1;for(var s=i.xa.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=Xo(s,l,e,r,n),h=Xo(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&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=h;){if(d!==t.prev&&d!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Ho(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!$o(i,a)&&ts(i,n,n.next,a)&&ns(i,a)&&ns(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),os(n),os(n.next),n=t=a),n=n.next}while(n!==t);return No(n)}function qo(t,e,r,n,i,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&Ko(o,s)){var l=is(o,s);return o=No(o,o.next),l=No(l,l.next),jo(o,e,r,n,i,a),void jo(l,e,r,n,i,a)}s=s.next}o=o.next}while(o!==t)}function Go(t,e){return t.x-e.x}function Yo(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.x&&n.x>=u&&i!==n.x&&Jo(ar.x||n.x===r.x&&Wo(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(t,e)){var r=is(e,t);No(e,e.next),No(r,r.next)}}function Wo(t,e){return Qo(t.prev,t,e.prev)<0&&Qo(e.next,t,t.next)<0}function Xo(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 Zo(t){var e=t,r=t;do{(e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function Ko(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&&ts(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(ns(t,e)&&ns(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)&&(Qo(t.prev,t,e.prev)||Qo(t,e.prev,e))||$o(t,e)&&Qo(t.prev,t,t.next)>0&&Qo(e.prev,e,e.next)>0)}function Qo(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function $o(t,e){return t.x===e.x&&t.y===e.y}function ts(t,e,r,n){var i=rs(Qo(t,e,r)),a=rs(Qo(t,e,n)),o=rs(Qo(r,n,t)),s=rs(Qo(r,n,e));return i!==a&&o!==s||(!(0!==i||!es(t,r,e))||(!(0!==a||!es(t,n,e))||(!(0!==o||!es(r,t,n))||!(0!==s||!es(r,e,n)))))}function es(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function rs(t){return t>0?1:t<0?-1:0}function ns(t,e){return Qo(t.prev,t,t.next)<0?Qo(t,e,t.next)>=0&&Qo(t,t.prev,e)>=0:Qo(t,e,t.prev)<0||Qo(t,t.next,e)<0}function is(t,e){var r=new ss(t.i,t.x,t.y),n=new ss(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 as(t,e,r,n){var i=new ss(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 os(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 ss(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 ls(t,e,r,n){for(var i=0,a=e,o=r-n;an;){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),f=Math.max(n,Math.floor(r-s*c/o+u)),h=Math.min(i,Math.floor(r+(o-s)*c/o+u));t(e,r,f,h,a)}var p=e[r],d=n,g=i;for(us(e,n,r),a(e[i],p)>0&&us(e,n,i);d0;)g--}0===a(e[n],p)?us(e,n,g):(g++,us(e,g,i)),g<=r&&(n=g+1),r<=g&&(i=g-1)}}(t,e,r||0,n||t.length-1,i||fs)}function us(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function fs(t,e){return te?1:0}function hs(t,e){var r=t.length;if(r<=1)return[t];for(var n,i,a=[],o=0;o1)for(var l=0;l0&&(n+=t[i-1].length,r.holes.push(n))}return r},Do.default=Ro;var ms=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.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new zi,this.indexArray=new Yi,this.indexArray2=new Qi,this.programConfigurations=new Ua(zo,t.layers,t.zoom),this.segments=new pa,this.segments2=new pa,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};ms.prototype.populate=function(t,e,r){this.hasPattern=ds(\"fill\",this.layers,e);for(var n=this.layers[0].layout.get(\"fill-sort-key\"),i=[],a=0,o=t;a>3}if(a--,1===n||2===n)o+=t.readSVarint(),s+=t.readSVarint(),1===n&&(e&&l.push(e),e=[]),e.push(new i(o,s));else{if(7!==n)throw new Error(\"unknown command \"+n);e&&e.push(e[0].clone())}}return e&&l.push(e),l},ws.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>3}if(n--,1===r||2===r)(i+=t.readSVarint())s&&(s=i),(a+=t.readSVarint())c&&(c=a);else if(7!==r)throw new Error(\"unknown command \"+r)}return[o,l,s,c]},ws.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=ws.types[this.type];function u(t){for(var e=0;e>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 Es(t,e,r){if(3===t){var n=new As(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}Ms.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 _s(this._pbf,e,this.extent,this._keys,this._values)};var Ls={VectorTile:function(t,e){this.layers=t.readFields(Es,{},e)},VectorTileFeature:_s,VectorTileLayer:As},Cs=Ls.VectorTileFeature.types,Ps=Math.pow(2,13);function Is(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,2*Math.floor(n*Ps)+o,i*Ps*2,a*Ps*2,Math.round(s))}var Os=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.hasPattern=!1,this.layoutVertexArray=new Ri,this.indexArray=new Yi,this.programConfigurations=new Ua(bs,t.layers,t.zoom),this.segments=new pa,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function zs(t,e){return t.x===e.x&&(t.x<0||t.x>8192)||t.y===e.y&&(t.y<0||t.y>8192)}function Ds(t){return t.every((function(t){return t.x<0}))||t.every((function(t){return t.x>8192}))||t.every((function(t){return t.y<0}))||t.every((function(t){return t.y>8192}))}Os.prototype.populate=function(t,e,r){this.features=[],this.hasPattern=ds(\"fill-extrusion\",this.layers,e);for(var n=0,i=t;n=1){var y=d[m-1];if(!zs(v,y)){f.vertexLength+4>pa.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var x=v.sub(y)._perp()._unit(),b=y.dist(v);g+b>32768&&(g=0),Is(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,0,g),Is(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,1,g),g+=b,Is(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,0,g),Is(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,1,g);var _=f.vertexLength;this.indexArray.emplaceBack(_,_+2,_+1),this.indexArray.emplaceBack(_+1,_+2,_+3),f.vertexLength+=4,f.primitiveLength+=2}}}}if(f.vertexLength+l>pa.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),\"Polygon\"===Cs[t.type]){for(var w=[],T=[],k=f.vertexLength,A=0,M=s;A=2&&t[l-1].equals(t[l-2]);)l--;for(var c=0;c0;if(T&&v>c){var A=u.dist(p);if(A>2*f){var M=u.sub(u.sub(p)._mult(f/A)._round());this.updateDistance(p,M),this.addCurrentVertex(M,g,0,0,h),p=M}}var S=p&&d,E=S?r:s?\"butt\":n;if(S&&\"round\"===E&&(_i&&(E=\"bevel\"),\"bevel\"===E&&(_>2&&(E=\"flipbevel\"),_100)y=m.mult(-1);else{var L=_*g.add(m).mag()/g.sub(m).mag();y._perp()._mult(L*(k?-1:1))}this.addCurrentVertex(u,y,0,0,h),this.addCurrentVertex(u,y.mult(-1),0,0,h)}else if(\"bevel\"===E||\"fakeround\"===E){var C=-Math.sqrt(_*_-1),P=k?C:0,I=k?0:C;if(p&&this.addCurrentVertex(u,g,P,I,h),\"fakeround\"===E)for(var O=Math.round(180*w/Math.PI/20),z=1;z2*f){var j=u.add(d.sub(u)._mult(f/N)._round());this.updateDistance(u,j),this.addCurrentVertex(j,m,0,0,h),u=j}}}}},qs.prototype.addCurrentVertex=function(t,e,r,n,i,a){void 0===a&&(a=!1);var o=e.x+e.y*r,s=e.y-e.x*r,l=-e.x+e.y*n,c=-e.y-e.x*n;this.addHalfVertex(t,o,s,a,!1,r,i),this.addHalfVertex(t,l,c,a,!0,-n,i),this.distance>Hs/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,n,i,a))},qs.prototype.addHalfVertex=function(t,e,r,n,i,a,o){var s=t.x,l=t.y,c=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(i?1:0),Math.round(63*e)+128,Math.round(63*r)+128,1+(0===a?0:a<0?-1:1)|(63&c)<<2,c>>6);var u=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,u),o.primitiveLength++),i?this.e2=u:this.e1=u},qs.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(Hs-1):this.distance},qs.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},Nn(\"LineBucket\",qs,{omit:[\"layers\",\"patternFeatures\"]});var Gs=new Si({\"line-cap\":new wi(Lt.layout_line[\"line-cap\"]),\"line-join\":new Ti(Lt.layout_line[\"line-join\"]),\"line-miter-limit\":new wi(Lt.layout_line[\"line-miter-limit\"]),\"line-round-limit\":new wi(Lt.layout_line[\"line-round-limit\"]),\"line-sort-key\":new Ti(Lt.layout_line[\"line-sort-key\"])}),Ys={paint:new Si({\"line-opacity\":new Ti(Lt.paint_line[\"line-opacity\"]),\"line-color\":new Ti(Lt.paint_line[\"line-color\"]),\"line-translate\":new wi(Lt.paint_line[\"line-translate\"]),\"line-translate-anchor\":new wi(Lt.paint_line[\"line-translate-anchor\"]),\"line-width\":new Ti(Lt.paint_line[\"line-width\"]),\"line-gap-width\":new Ti(Lt.paint_line[\"line-gap-width\"]),\"line-offset\":new Ti(Lt.paint_line[\"line-offset\"]),\"line-blur\":new Ti(Lt.paint_line[\"line-blur\"]),\"line-dasharray\":new Ai(Lt.paint_line[\"line-dasharray\"]),\"line-pattern\":new ki(Lt.paint_line[\"line-pattern\"]),\"line-gradient\":new Mi(Lt.paint_line[\"line-gradient\"])}),layout:Gs},Ws=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 pi(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,i){return r=u({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,i)},e}(Ti))(Ys.paint.properties[\"line-width\"].specification);Ws.useIntegerZoom=!0;var Xs=function(t){function e(e){t.call(this,e,Ys)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){\"line-gradient\"===t&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values[\"line-gradient\"].value.expression;this.gradient=Co(t,\"lineProgress\"),this.gradientTexture=null},e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r),this.paint._values[\"line-floorwidth\"]=Ws.possiblyEvaluate(this._transitioningPaint._values[\"line-width\"].value,e)},e.prototype.createBucket=function(t){return new qs(t)},e.prototype.queryRadius=function(t){var e=t,r=Zs(oo(\"line-width\",this,e),oo(\"line-gap-width\",this,e)),n=oo(\"line-offset\",this,e);return r/2+Math.abs(n)+so(this.paint.get(\"line-translate\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,a,o,s){var l=lo(t,this.paint.get(\"line-translate\"),this.paint.get(\"line-translate-anchor\"),o.angle,s),c=s/2*Zs(this.paint.get(\"line-width\").evaluate(e,r),this.paint.get(\"line-gap-width\").evaluate(e,r)),u=this.paint.get(\"line-offset\").evaluate(e,r);return u&&(n=function(t,e){for(var r=[],n=new i(0,0),a=0;a=3)for(var a=0;a0?e+2*t:t}var Js=Ii([{name:\"a_pos_offset\",components:4,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint16\"},{name:\"a_pixeloffset\",components:4,type:\"Int16\"}],4),Ks=Ii([{name:\"a_projected_pos\",components:3,type:\"Float32\"}],4),Qs=(Ii([{name:\"a_fade_opacity\",components:1,type:\"Uint32\"}],4),Ii([{name:\"a_placed\",components:2,type:\"Uint8\"},{name:\"a_shift\",components:2,type:\"Float32\"}])),$s=(Ii([{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\"}]),Ii([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_anchor_pos\",components:2,type:\"Int16\"},{name:\"a_extrude\",components:2,type:\"Int16\"}],4)),tl=Ii([{name:\"a_pos\",components:2,type:\"Float32\"},{name:\"a_radius\",components:1,type:\"Float32\"},{name:\"a_flags\",components:2,type:\"Int16\"}],4);Ii([{name:\"triangle\",components:3,type:\"Uint16\"}]),Ii([{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:\"placedOrientation\"},{type:\"Uint8\",name:\"hidden\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Int16\",name:\"associatedIconIndex\"}]),Ii([{type:\"Int16\",name:\"anchorX\"},{type:\"Int16\",name:\"anchorY\"},{type:\"Int16\",name:\"rightJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"centerJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"leftJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedTextSymbolIndex\"},{type:\"Int16\",name:\"placedIconSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedIconSymbolIndex\"},{type:\"Uint16\",name:\"key\"},{type:\"Uint16\",name:\"textBoxStartIndex\"},{type:\"Uint16\",name:\"textBoxEndIndex\"},{type:\"Uint16\",name:\"verticalTextBoxStartIndex\"},{type:\"Uint16\",name:\"verticalTextBoxEndIndex\"},{type:\"Uint16\",name:\"iconBoxStartIndex\"},{type:\"Uint16\",name:\"iconBoxEndIndex\"},{type:\"Uint16\",name:\"verticalIconBoxStartIndex\"},{type:\"Uint16\",name:\"verticalIconBoxEndIndex\"},{type:\"Uint16\",name:\"featureIndex\"},{type:\"Uint16\",name:\"numHorizontalGlyphVertices\"},{type:\"Uint16\",name:\"numVerticalGlyphVertices\"},{type:\"Uint16\",name:\"numIconVertices\"},{type:\"Uint16\",name:\"numVerticalIconVertices\"},{type:\"Uint16\",name:\"useRuntimeCollisionCircles\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Float32\",name:\"textBoxScale\"},{type:\"Float32\",components:2,name:\"textOffset\"},{type:\"Float32\",name:\"collisionCircleDiameter\"}]),Ii([{type:\"Float32\",name:\"offsetX\"}]),Ii([{type:\"Int16\",name:\"x\"},{type:\"Int16\",name:\"y\"},{type:\"Int16\",name:\"tileUnitDistanceFromAnchor\"}]);function el(t,e,r){return t.sections.forEach((function(t){t.text=function(t,e,r){var n=e.layout.get(\"text-transform\").evaluate(r,{});return\"uppercase\"===n?t=t.toLocaleUpperCase():\"lowercase\"===n&&(t=t.toLocaleLowerCase()),hi.applyArabicShaping&&(t=hi.applyArabicShaping(t)),t}(t.text,e,r)})),t}var rl={\"!\":\"\\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\"};var nl=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<>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)},il=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>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<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g},al=ol;function ol(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}ol.Varint=0,ol.Fixed64=1,ol.Bytes=2,ol.Fixed32=5;var sl=\"undefined\"==typeof TextDecoder?null:new TextDecoder(\"utf8\");function ll(t){return t.type===ol.Bytes?t.readVarint()+t.pos:t.pos+1}function cl(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function ul(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(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 fl(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function wl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}ol.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos>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=bl(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=wl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=bl(this.buf,this.pos)+4294967296*bl(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=bl(this.buf,this.pos)+4294967296*wl(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=nl(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=nl(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(i=a[r.pos++],n=(112&i)>>4,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<3,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<10,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<17,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<24,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(1&i)<<31,i<128)return cl(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=this.pos;return this.pos=t,t-e>=12&&sl?function(t,e,r){return sl.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){var n=\"\",i=e;for(;i239?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,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==ol.Bytes)return t.push(this.readVarint(e));var r=ll(this);for(t=t||[];this.pos127;);else if(e===ol.Bytes)this.pos=this.readVarint()+this.pos;else if(e===ol.Fixed32)this.pos+=4;else{if(e!==ol.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;e268435455||t<0?function(t,e){var r,n;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));if(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;if(e.buf[e.pos++]|=r|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;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;a55295&&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&&ul(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),il(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),il(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=128&&ul(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,ol.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,fl,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,hl,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,gl,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,pl,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,dl,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,ml,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,vl,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,yl,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,xl,e)},writeBytesField:function(t,e){this.writeTag(t,ol.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,ol.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,ol.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,ol.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,ol.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,ol.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,ol.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,ol.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,ol.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,ol.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};function Tl(t,e,r){1===t&&r.readMessage(kl,e)}function kl(t,e,r){if(3===t){var n=r.readMessage(Al,{}),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 So({width:o+6,height:s+6},a),metrics:{width:o,height:s,left:l,top:c,advance:u}})}}function Al(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())}function Ml(t){for(var e=0,r=0,n=0,i=t;n=0;h--){var p=o[h];if(!(f.w>p.w||f.h>p.h)){if(f.x=p.x,f.y=p.y,l=Math.max(l,f.y+f.h),s=Math.max(s,f.x+f.w),f.w===p.w&&f.h===p.h){var d=o.pop();h0&&N>A&&(A=N)}else{var j=r[S.fontStack],U=j&&j[L];if(U&&U.rect)I=U.rect,P=U.metrics;else{var V=e[S.fontStack],H=V&&V[L];if(!H)continue;P=H.metrics}C=24*(_-S.scale)}D?(t.verticalizable=!0,k.push({glyph:L,imageName:O,x:h,y:p+C,vertical:D,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:I}),h+=z*S.scale+c):(k.push({glyph:L,imageName:O,x:h,y:p+C,vertical:D,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:I}),h+=P.advance*S.scale+c)}if(0!==k.length){var q=h-c;d=Math.max(q,d),Vl(k,0,k.length-1,m,A)}h=0;var G=a*_+A;T.lineOffset=Math.max(A,w),p+=G,g=Math.max(G,g),++v}else p+=a,++v}var Y;var W=p- -17,X=Ul(o),Z=X.horizontalAlign,J=X.verticalAlign;(function(t,e,r,n,i,a,o,s,l){var c=(e-r)*i,u=0;u=a!==o?-s*n- -17:(-n*l+.5)*o;for(var f=0,h=t;f=0&&n>=t&&zl[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},Il.prototype.substring=function(t,e){var r=new Il;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},Il.prototype.toString=function(){return this.text},Il.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce((function(e,r){return Math.max(e,t.sections[r].scale)}),0)},Il.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(Pl.forText(t.scale,t.fontStack||e));for(var r=this.sections.length-1,n=0;n=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var zl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Dl={};function Rl(t,e,r,n,i,a){if(e.imageName){var o=n[e.imageName];return o?o.displaySize[0]*e.scale*24/a+i:0}var s=r[e.fontStack],l=s&&s[t];return l?l.metrics.advance*e.scale+i:0}function Fl(t,e,r,n){var i=Math.pow(t-e,2);return n?t=0,f=0,h=0;h-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;sn;)c-=l.shift().angleDelta;if(c>i)return!1;o++,s+=f.dist(h)}return!0}function Jl(t){for(var e=0,r=0;rc){var d=(c-l)/p,g=qe(f.x,h.x,d),m=qe(f.y,h.y,d),v=new ql(g,m,h.angleTo(f),u);return v._round(),!o||Zl(t,v,s,o,e)?v:void 0}l+=p}}function tc(t,e,r,n,i,a,o,s,l){var c=Kl(n,a,o),u=Ql(n,i),f=u*o,h=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-f=0&&_=0&&w=0&&p+u<=f){var T=new ql(_,w,x,g);T._round(),i&&!Zl(e,T,o,i,a)||d.push(T)}}h+=y}l||d.length||s||(d=t(e,h/2,n,i,a,o,s,!0,c));return d}(t,h?e/2*s%e:(u/2+2*a)*o*s%e,e,c,r,f,h,!1,l)}function ec(t,e,r,n,a){for(var o=[],s=0;s=n&&h.x>=n||(f.x>=n?f=new i(n,f.y+(h.y-f.y)*((n-f.x)/(h.x-f.x)))._round():h.x>=n&&(h=new i(n,f.y+(h.y-f.y)*((n-f.x)/(h.x-f.x)))._round()),f.y>=a&&h.y>=a||(f.y>=a?f=new i(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round():h.y>=a&&(h=new i(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}function rc(t,e,r,n){var a=[],o=t.image,s=o.pixelRatio,l=o.paddedRect.w-2,c=o.paddedRect.h-2,u=t.right-t.left,f=t.bottom-t.top,h=o.stretchX||[[0,l]],p=o.stretchY||[[0,c]],d=function(t,e){return t+e[1]-e[0]},g=h.reduce(d,0),m=p.reduce(d,0),v=l-g,y=c-m,x=0,b=g,_=0,w=m,T=0,k=v,A=0,M=y;if(o.content&&n){var S=o.content;x=nc(h,0,S[0]),_=nc(p,0,S[1]),b=nc(h,S[0],S[2]),w=nc(p,S[1],S[3]),T=S[0]-x,A=S[1]-_,k=S[2]-S[0]-b,M=S[3]-S[1]-w}var E=function(n,a,l,c){var h=ac(n.stretch-x,b,u,t.left),p=oc(n.fixed-T,k,n.stretch,g),d=ac(a.stretch-_,w,f,t.top),v=oc(a.fixed-A,M,a.stretch,m),y=ac(l.stretch-x,b,u,t.left),S=oc(l.fixed-T,k,l.stretch,g),E=ac(c.stretch-_,w,f,t.top),L=oc(c.fixed-A,M,c.stretch,m),C=new i(h,d),P=new i(y,d),I=new i(y,E),O=new i(h,E),z=new i(p/s,v/s),D=new i(S/s,L/s),R=e*Math.PI/180;if(R){var F=Math.sin(R),B=Math.cos(R),N=[B,-F,F,B];C._matMult(N),P._matMult(N),O._matMult(N),I._matMult(N)}var j=n.stretch+n.fixed,U=l.stretch+l.fixed,V=a.stretch+a.fixed,H=c.stretch+c.fixed;return{tl:C,tr:P,bl:O,br:I,tex:{x:o.paddedRect.x+1+j,y:o.paddedRect.y+1+V,w:U-j,h:H-V},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:z,pixelOffsetBR:D,minFontScaleX:k/s/u,minFontScaleY:M/s/f,isSDF:r}};if(n&&(o.stretchX||o.stretchY))for(var L=ic(h,v,g),C=ic(p,y,m),P=0;P0&&(d=Math.max(10,d),this.circleDiameter=d)}else{var g=o.top*s-l,m=o.bottom*s+l,v=o.left*s-l,y=o.right*s+l,x=o.collisionPadding;if(x&&(v-=x[0]*s,g-=x[1]*s,y+=x[2]*s,m+=x[3]*s),u){var b=new i(v,g),_=new i(y,g),w=new i(v,m),T=new i(y,m),k=u*Math.PI/180;b._rotate(k),_._rotate(k),w._rotate(k),T._rotate(k),v=Math.min(b.x,_.x,w.x,T.x),y=Math.max(b.x,_.x,w.x,T.x),g=Math.min(b.y,_.y,w.y,T.y),m=Math.max(b.y,_.y,w.y,T.y)}t.emplaceBack(e.x,e.y,v,g,y,m,r,n,a)}this.boxEndIndex=t.length},lc=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=cc),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function cc(t,e){return te?1:0}function uc(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var n=1/0,a=1/0,o=-1/0,s=-1/0,l=t[0],c=0;co)&&(o=u.x),(!c||u.y>s)&&(s=u.y)}var f=o-n,h=s-a,p=Math.min(f,h),d=p/2,g=new lc([],fc);if(0===p)return new i(n,a);for(var m=n;my.d||!y.d)&&(y=b,r&&console.log(\"found best %d after %d probes\",Math.round(1e4*b.d)/1e4,x)),b.max-y.d<=e||(d=b.h/2,g.push(new hc(b.p.x-d,b.p.y-d,d,t)),g.push(new hc(b.p.x+d,b.p.y-d,d,t)),g.push(new hc(b.p.x-d,b.p.y+d,d,t)),g.push(new hc(b.p.x+d,b.p.y+d,d,t)),x+=4)}return r&&(console.log(\"num probes: \"+x),console.log(\"best distance: \"+y.d)),y.p}function fc(t,e){return e.max-t.max}function hc(t,e,r,n){this.p=new i(t,e),this.h=r,this.d=function(t,e){for(var r=!1,n=1/0,i=0;it.y!=u.y>t.y&&t.x<(u.x-c.x)*(t.y-c.y)/(u.y-c.y)+c.x&&(r=!r),n=Math.min(n,ro(t,c,u))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}lc.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},lc.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}},lc.prototype.peek=function(){return this.data[0]},lc.prototype._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},lc.prototype._down=function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];t=0)break;e[t]=o,t=a}e[t]=i};var pc=Number.POSITIVE_INFINITY;function dc(t,e){return e[1]!==pc?function(t,e,r){var n=0,i=0;switch(e=Math.abs(e),r=Math.abs(r),t){case\"top-right\":case\"top-left\":case\"top\":i=r-7;break;case\"bottom-right\":case\"bottom-left\":case\"bottom\":i=7-r}switch(t){case\"top-right\":case\"bottom-right\":case\"right\":n=-e;break;case\"top-left\":case\"bottom-left\":case\"left\":n=e}return[n,i]}(t,e[0],e[1]):function(t,e){var r=0,n=0;e<0&&(e=0);var i=e/Math.sqrt(2);switch(t){case\"top-right\":case\"top-left\":n=i-7;break;case\"bottom-right\":case\"bottom-left\":n=7-i;break;case\"bottom\":n=7-e;break;case\"top\":n=e-7}switch(t){case\"top-right\":case\"bottom-right\":r=-i;break;case\"top-left\":case\"bottom-left\":r=i;break;case\"left\":r=e;break;case\"right\":r=-e}return[r,n]}(t,e[0])}function gc(t){switch(t){case\"right\":case\"top-right\":case\"bottom-right\":return\"right\";case\"left\":case\"top-left\":case\"bottom-left\":return\"left\"}return\"center\"}function mc(t,e,r,n,a,o,s,l,c,u,f,h,p,d,g){var m=function(t,e,r,n,a,o,s,l){for(var c=n.layout.get(\"text-rotate\").evaluate(o,{})*Math.PI/180,u=[],f=0,h=e.positionedLines;f32640&&_(t.layerIds[0]+': Value for \"text-size\" is >= 255. Reduce your \"text-size\".'):\"composite\"===v.kind&&((y=[128*d.compositeTextSizes[0].evaluate(s,{},g),128*d.compositeTextSizes[1].evaluate(s,{},g)])[0]>32640||y[1]>32640)&&_(t.layerIds[0]+': Value for \"text-size\" is >= 255. Reduce your \"text-size\".'),t.addSymbols(t.text,m,y,l,o,s,u,e,c.lineStartIndex,c.lineLength,p,g);for(var x=0,b=f;x=0;o--)if(n.dist(a[o])0)&&(\"constant\"!==a.value.kind||a.value.value.length>0),c=\"constant\"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,u=i.get(\"symbol-sort-key\");if(this.features=[],l||c){for(var f=e.iconDependencies,h=e.glyphDependencies,p=e.availableImages,d=new pi(this.zoom),g=0,m=t;g=0;for(var O=0,z=k.sections;O=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;l0},Mc.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Mc.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Mc.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Mc.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Mc.prototype.addIndicesForPlacedSymbol=function(t,e){for(var r=t.placedSymbolArray.get(e),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r=0&&n.indexOf(t)===r&&e.addIndicesForPlacedSymbol(e.text,t)})),a.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,a.verticalPlacedTextSymbolIndex),a.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.placedIconSymbolIndex),a.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Nn(\"SymbolBucket\",Mc,{omit:[\"layers\",\"collisionBoxArray\",\"features\",\"compareText\"]}),Mc.MAX_GLYPHS=65535,Mc.addDynamicAttributes=wc;var Sc=new Si({\"symbol-placement\":new wi(Lt.layout_symbol[\"symbol-placement\"]),\"symbol-spacing\":new wi(Lt.layout_symbol[\"symbol-spacing\"]),\"symbol-avoid-edges\":new wi(Lt.layout_symbol[\"symbol-avoid-edges\"]),\"symbol-sort-key\":new Ti(Lt.layout_symbol[\"symbol-sort-key\"]),\"symbol-z-order\":new wi(Lt.layout_symbol[\"symbol-z-order\"]),\"icon-allow-overlap\":new wi(Lt.layout_symbol[\"icon-allow-overlap\"]),\"icon-ignore-placement\":new wi(Lt.layout_symbol[\"icon-ignore-placement\"]),\"icon-optional\":new wi(Lt.layout_symbol[\"icon-optional\"]),\"icon-rotation-alignment\":new wi(Lt.layout_symbol[\"icon-rotation-alignment\"]),\"icon-size\":new Ti(Lt.layout_symbol[\"icon-size\"]),\"icon-text-fit\":new wi(Lt.layout_symbol[\"icon-text-fit\"]),\"icon-text-fit-padding\":new wi(Lt.layout_symbol[\"icon-text-fit-padding\"]),\"icon-image\":new Ti(Lt.layout_symbol[\"icon-image\"]),\"icon-rotate\":new Ti(Lt.layout_symbol[\"icon-rotate\"]),\"icon-padding\":new wi(Lt.layout_symbol[\"icon-padding\"]),\"icon-keep-upright\":new wi(Lt.layout_symbol[\"icon-keep-upright\"]),\"icon-offset\":new Ti(Lt.layout_symbol[\"icon-offset\"]),\"icon-anchor\":new Ti(Lt.layout_symbol[\"icon-anchor\"]),\"icon-pitch-alignment\":new wi(Lt.layout_symbol[\"icon-pitch-alignment\"]),\"text-pitch-alignment\":new wi(Lt.layout_symbol[\"text-pitch-alignment\"]),\"text-rotation-alignment\":new wi(Lt.layout_symbol[\"text-rotation-alignment\"]),\"text-field\":new Ti(Lt.layout_symbol[\"text-field\"]),\"text-font\":new Ti(Lt.layout_symbol[\"text-font\"]),\"text-size\":new Ti(Lt.layout_symbol[\"text-size\"]),\"text-max-width\":new Ti(Lt.layout_symbol[\"text-max-width\"]),\"text-line-height\":new wi(Lt.layout_symbol[\"text-line-height\"]),\"text-letter-spacing\":new Ti(Lt.layout_symbol[\"text-letter-spacing\"]),\"text-justify\":new Ti(Lt.layout_symbol[\"text-justify\"]),\"text-radial-offset\":new Ti(Lt.layout_symbol[\"text-radial-offset\"]),\"text-variable-anchor\":new wi(Lt.layout_symbol[\"text-variable-anchor\"]),\"text-anchor\":new Ti(Lt.layout_symbol[\"text-anchor\"]),\"text-max-angle\":new wi(Lt.layout_symbol[\"text-max-angle\"]),\"text-writing-mode\":new wi(Lt.layout_symbol[\"text-writing-mode\"]),\"text-rotate\":new Ti(Lt.layout_symbol[\"text-rotate\"]),\"text-padding\":new wi(Lt.layout_symbol[\"text-padding\"]),\"text-keep-upright\":new wi(Lt.layout_symbol[\"text-keep-upright\"]),\"text-transform\":new Ti(Lt.layout_symbol[\"text-transform\"]),\"text-offset\":new Ti(Lt.layout_symbol[\"text-offset\"]),\"text-allow-overlap\":new wi(Lt.layout_symbol[\"text-allow-overlap\"]),\"text-ignore-placement\":new wi(Lt.layout_symbol[\"text-ignore-placement\"]),\"text-optional\":new wi(Lt.layout_symbol[\"text-optional\"])}),Ec={paint:new Si({\"icon-opacity\":new Ti(Lt.paint_symbol[\"icon-opacity\"]),\"icon-color\":new Ti(Lt.paint_symbol[\"icon-color\"]),\"icon-halo-color\":new Ti(Lt.paint_symbol[\"icon-halo-color\"]),\"icon-halo-width\":new Ti(Lt.paint_symbol[\"icon-halo-width\"]),\"icon-halo-blur\":new Ti(Lt.paint_symbol[\"icon-halo-blur\"]),\"icon-translate\":new wi(Lt.paint_symbol[\"icon-translate\"]),\"icon-translate-anchor\":new wi(Lt.paint_symbol[\"icon-translate-anchor\"]),\"text-opacity\":new Ti(Lt.paint_symbol[\"text-opacity\"]),\"text-color\":new Ti(Lt.paint_symbol[\"text-color\"],{runtimeType:Ut,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),\"text-halo-color\":new Ti(Lt.paint_symbol[\"text-halo-color\"]),\"text-halo-width\":new Ti(Lt.paint_symbol[\"text-halo-width\"]),\"text-halo-blur\":new Ti(Lt.paint_symbol[\"text-halo-blur\"]),\"text-translate\":new wi(Lt.paint_symbol[\"text-translate\"]),\"text-translate-anchor\":new wi(Lt.paint_symbol[\"text-translate-anchor\"])}),layout:Sc},Lc=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Ft,this.defaultValue=t};Lc.prototype.evaluate=function(t){if(t.formattedSection){var e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default},Lc.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},Lc.prototype.outputDefined=function(){return!1},Lc.prototype.serialize=function(){return null},Nn(\"FormatSectionOverride\",Lc,{omit:[\"defaultValue\"]});var Cc=function(t){function e(e){t.call(this,e,Ec)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e,r){if(t.prototype.recalculate.call(this,e,r),\"auto\"===this.layout.get(\"icon-rotation-alignment\")&&(\"point\"!==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\")&&(\"point\"!==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\")),\"point\"===this.layout.get(\"symbol-placement\")){var n=this.layout.get(\"text-writing-mode\");if(n){for(var i=[],a=0,o=n;a\",targetMapId:n,sourceMapId:a.mapId})}}},qc.prototype.receive=function(t){var e=t.data,r=e.id;if(r&&(!e.targetMapId||this.mapId===e.targetMapId))if(\"\"===e.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else k()||e.mustQueue?(this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,e)},qc.prototype.process=function(){if(this.taskQueue.length){var t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}},qc.prototype.processTask=function(t,e){var r=this;if(\"\"===e.type){var n=this.callbacks[t];delete this.callbacks[t],n&&(e.error?n(qn(e.error)):n(null,qn(e.data)))}else{var i=!1,a=S(this.globalScope)?void 0:[],o=e.hasCallback?function(e,n){i=!0,delete r.cancelCallbacks[t],r.target.postMessage({id:t,type:\"\",sourceMapId:r.mapId,error:e?Hn(e):null,data:Hn(n,a)},a)}:function(t){i=!0},s=null,l=qn(e.data);if(this.parent[e.type])s=this.parent[e.type](e.sourceMapId,l,o);else if(this.parent.getWorkerSource){var c=e.type.split(\".\");s=this.parent.getWorkerSource(e.sourceMapId,c[0],l.source)[c[1]](l,o)}else o(new Error(\"Could not find function \"+e.type));!i&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},qc.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener(\"message\",this.receive,!1)};var Yc=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]))};Yc.prototype.setNorthEast=function(t){return this._ne=t instanceof Wc?new Wc(t.lng,t.lat):Wc.convert(t),this},Yc.prototype.setSouthWest=function(t){return this._sw=t instanceof Wc?new Wc(t.lng,t.lat):Wc.convert(t),this},Yc.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof Wc)e=t,r=t;else{if(!(t instanceof Yc)){if(Array.isArray(t)){if(4===t.length||t.every(Array.isArray)){var a=t;return this.extend(Yc.convert(a))}var o=t;return this.extend(Wc.convert(o))}return 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 Wc(e.lng,e.lat),this._ne=new Wc(r.lng,r.lat)),this},Yc.prototype.getCenter=function(){return new Wc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Yc.prototype.getSouthWest=function(){return this._sw},Yc.prototype.getNorthEast=function(){return this._ne},Yc.prototype.getNorthWest=function(){return new Wc(this.getWest(),this.getNorth())},Yc.prototype.getSouthEast=function(){return new Wc(this.getEast(),this.getSouth())},Yc.prototype.getWest=function(){return this._sw.lng},Yc.prototype.getSouth=function(){return this._sw.lat},Yc.prototype.getEast=function(){return this._ne.lng},Yc.prototype.getNorth=function(){return this._ne.lat},Yc.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Yc.prototype.toString=function(){return\"LngLatBounds(\"+this._sw.toString()+\", \"+this._ne.toString()+\")\"},Yc.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Yc.prototype.contains=function(t){var e=Wc.convert(t),r=e.lng,n=e.lat,i=this._sw.lat<=n&&n<=this._ne.lat,a=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=r&&r>=this._ne.lng),i&&a},Yc.convert=function(t){return!t||t instanceof Yc?t:new Yc(t)};var Wc=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\")};Wc.prototype.wrap=function(){return new Wc(c(this.lng,-180,180),this.lat)},Wc.prototype.toArray=function(){return[this.lng,this.lat]},Wc.prototype.toString=function(){return\"LngLat(\"+this.lng+\", \"+this.lat+\")\"},Wc.prototype.distanceTo=function(t){var e=Math.PI/180,r=this.lat*e,n=t.lat*e,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((t.lng-this.lng)*e);return 6371008.8*Math.acos(Math.min(i,1))},Wc.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new Yc(new Wc(this.lng-r,this.lat-e),new Wc(this.lng+r,this.lat+e))},Wc.convert=function(t){if(t instanceof Wc)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Wc(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&\"object\"==typeof t&&null!==t)return new Wc(Number(\"lng\"in t?t.lng:t.lon),Number(t.lat));throw new Error(\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]\")};var Xc=2*Math.PI*6371008.8;function Zc(t){return Xc*Math.cos(t*Math.PI/180)}function Jc(t){return(180+t)/360}function Kc(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Qc(t,e){return t/Zc(e)}function $c(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}var tu=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};tu.fromLngLat=function(t,e){void 0===e&&(e=0);var r=Wc.convert(t);return new tu(Jc(r.lng),Kc(r.lat),Qc(e,r.lat))},tu.prototype.toLngLat=function(){return new Wc(360*this.x-180,$c(this.y))},tu.prototype.toAltitude=function(){return t=this.z,e=this.y,t*Zc($c(e));var t,e},tu.prototype.meterInMercatorCoordinateUnits=function(){return 1/Xc*(t=$c(this.y),1/Math.cos(t*Math.PI/180));var t};var eu=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=iu(0,t,t,e,r)};eu.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},eu.prototype.url=function(t,e){var r,n,i,a,o,s=(r=this.x,n=this.y,i=this.z,a=Gc(256*r,256*(n=Math.pow(2,i)-n-1),i),o=Gc(256*(r+1),256*(n+1),i),a[0]+\",\"+a[1]+\",\"+o[0]+\",\"+o[1]),l=function(t,e,r){for(var n,i=\"\",a=t;a>0;a--)i+=(e&(n=1<this.canonical.z?new nu(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new nu(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},nu.prototype.calculateScaledKey=function(t,e){var r=this.canonical.z-t;return t>this.canonical.z?iu(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):iu(this.wrap*+e,t,t,this.canonical.x>>r,this.canonical.y>>r)},nu.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ>e&&t.canonical.y===this.canonical.y>>e},nu.prototype.children=function(t){if(this.overscaledZ>=t)return[new nu(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 nu(e,this.wrap,e,r,n),new nu(e,this.wrap,e,r+1,n),new nu(e,this.wrap,e,r,n+1),new nu(e,this.wrap,e,r+1,n+1)]},nu.prototype.isLessThan=function(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.y=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError(\"out of range source coordinates for DEM data\");return(e+1)*this.stride+(t+1)},au.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},au.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},au.prototype.getPixels=function(){return new Eo({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},au.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw new Error(\"dem dimension mismatch\");var n=e*this.dim,i=e*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(e){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:a=o-1;break;case 1:o=a+1}for(var s=-e*this.dim,l=-r*this.dim,c=a;c=0&&u[3]>=0&&s.insert(o,u[0],u[1],u[2],u[3])}},uu.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ls.VectorTile(new al(this.rawTileData)).layers,this.sourceLayerCoder=new ou(this.vtLayers?Object.keys(this.vtLayers).sort():[\"_geojsonTileLayer\"])),this.vtLayers},uu.prototype.query=function(t,e,r,n){var a=this;this.loadVTLayers();for(var o=t.params||{},s=8192/t.tileSize/t.scale,l=sn(o.filter),c=t.queryGeometry,u=t.queryPadding*s,f=hu(c),h=this.grid.query(f.minX-u,f.minY-u,f.maxX+u,f.maxY+u),p=hu(t.cameraQueryGeometry),d=this.grid3D.query(p.minX-u,p.minY-u,p.maxX+u,p.maxY+u,(function(e,r,n,a){return function(t,e,r,n,a){for(var o=0,s=t;o=l.x&&a>=l.y)return!0}var c=[new i(e,r),new i(e,a),new i(n,a),new i(n,r)];if(t.length>2)for(var u=0,f=c;u=0)return!0;return!1}(a,f)){var h=this.sourceLayerCoder.decode(r),p=this.vtLayers[h].feature(n);if(i.filter(new pi(this.tileID.overscaledZ),p))for(var d=this.getId(p,h),g=0;gn)i=!1;else if(e)if(this.expirationTimeot&&(t.getActor().send(\"enforceCacheSizeLimit\",at),ht=0)},t.clamp=l,t.clearTileCache=function(t){var e=self.caches.delete(\"mapbox-tiles\");t&&e.catch(t).then((function(){return t()}))},t.clipLine=ec,t.clone=function(t){var e=new fo(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},t.clone$1=x,t.clone$2=function(t){var e=new fo(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=tl,t.config=F,t.create=function(){var t=new fo(16);return fo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=function(){var t=new fo(9);return fo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},t.create$2=function(){var t=new fo(4);return fo!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=Wr,t.createLayout=Ii,t.createStyleLayer=function(t){return\"custom\"===t.type?new Dc(t):new Rc[t.type](t)},t.cross=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},t.deepEqual=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var n=0;n0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t},t.number=qe,t.offscreenCanvasSupported=pt,t.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},t.parseGlyphPBF=function(t){return new al(t).readFields(Tl,[])},t.pbf=al,t.performSymbolLayout=function(t,e,r,n,i,a,o){t.createArrays();var s=512*t.overscaling;t.tilePixelRatio=8192/s,t.compareText={},t.iconsNeedLinear=!1;var l=t.layers[0].layout,c=t.layers[0]._unevaluatedLayout._values,u={};if(\"composite\"===t.textSizeData.kind){var f=t.textSizeData,h=f.minZoom,p=f.maxZoom;u.compositeTextSizes=[c[\"text-size\"].possiblyEvaluate(new pi(h),o),c[\"text-size\"].possiblyEvaluate(new pi(p),o)]}if(\"composite\"===t.iconSizeData.kind){var d=t.iconSizeData,g=d.minZoom,m=d.maxZoom;u.compositeIconSizes=[c[\"icon-size\"].possiblyEvaluate(new pi(g),o),c[\"icon-size\"].possiblyEvaluate(new pi(m),o)]}u.layoutTextSize=c[\"text-size\"].possiblyEvaluate(new pi(t.zoom+1),o),u.layoutIconSize=c[\"icon-size\"].possiblyEvaluate(new pi(t.zoom+1),o),u.textMaxSize=c[\"text-size\"].possiblyEvaluate(new pi(18));for(var v=24*l.get(\"text-line-height\"),y=\"map\"===l.get(\"text-rotation-alignment\")&&\"point\"!==l.get(\"symbol-placement\"),x=l.get(\"text-keep-upright\"),b=l.get(\"text-size\"),w=function(){var a=k[T],s=l.get(\"text-font\").evaluate(a,{},o).join(\",\"),c=b.evaluate(a,{},o),f=u.layoutTextSize.evaluate(a,{},o),h=u.layoutIconSize.evaluate(a,{},o),p={horizontal:{},vertical:void 0},d=a.text,g=[0,0];if(d){var m=d.toString(),w=24*l.get(\"text-letter-spacing\").evaluate(a,{},o),A=function(t){for(var e=0,r=t;e=8192||f.y<0||f.y>=8192||function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,w,T,k,A){var M,S,E,L,C,P=t.addToLineVertexArray(e,r),I=0,O=0,z=0,D=0,R=-1,F=-1,B={},N=ya(\"\"),j=0,U=0;void 0===s._unevaluatedLayout.getValue(\"text-radial-offset\")?(M=s.layout.get(\"text-offset\").evaluate(b,{},k).map((function(t){return 24*t})),j=M[0],U=M[1]):(j=24*s.layout.get(\"text-radial-offset\").evaluate(b,{},k),U=pc);if(t.allowVerticalPlacement&&n.vertical){var V=s.layout.get(\"text-rotate\").evaluate(b,{},k)+90,H=n.vertical;L=new sc(l,e,c,u,f,H,h,p,d,V),o&&(C=new sc(l,e,c,u,f,o,m,v,d,V))}if(i){var q=s.layout.get(\"icon-rotate\").evaluate(b,{}),G=\"none\"!==s.layout.get(\"icon-text-fit\"),Y=rc(i,q,T,G),W=o?rc(o,q,T,G):void 0;E=new sc(l,e,c,u,f,i,m,v,!1,q),I=4*Y.length;var X=t.iconSizeData,Z=null;\"source\"===X.kind?(Z=[128*s.layout.get(\"icon-size\").evaluate(b,{})])[0]>32640&&_(t.layerIds[0]+': Value for \"icon-size\" is >= 255. Reduce your \"icon-size\".'):\"composite\"===X.kind&&((Z=[128*w.compositeIconSizes[0].evaluate(b,{},k),128*w.compositeIconSizes[1].evaluate(b,{},k)])[0]>32640||Z[1]>32640)&&_(t.layerIds[0]+': Value for \"icon-size\" is >= 255. Reduce your \"icon-size\".'),t.addSymbols(t.icon,Y,Z,x,y,b,!1,e,P.lineStartIndex,P.lineLength,-1,k),R=t.icon.placedSymbolArray.length-1,W&&(O=4*W.length,t.addSymbols(t.icon,W,Z,x,y,b,Cl.vertical,e,P.lineStartIndex,P.lineLength,-1,k),F=t.icon.placedSymbolArray.length-1)}for(var J in n.horizontal){var K=n.horizontal[J];if(!S){N=ya(K.text);var Q=s.layout.get(\"text-rotate\").evaluate(b,{},k);S=new sc(l,e,c,u,f,K,h,p,d,Q)}var $=1===K.positionedLines.length;if(z+=mc(t,e,K,a,s,d,b,g,P,n.vertical?Cl.horizontal:Cl.horizontalOnly,$?Object.keys(n.horizontal):[J],B,R,w,k),$)break}n.vertical&&(D+=mc(t,e,n.vertical,a,s,d,b,g,P,Cl.vertical,[\"vertical\"],B,F,w,k));var tt=S?S.boxStartIndex:t.collisionBoxArray.length,et=S?S.boxEndIndex:t.collisionBoxArray.length,rt=L?L.boxStartIndex:t.collisionBoxArray.length,nt=L?L.boxEndIndex:t.collisionBoxArray.length,it=E?E.boxStartIndex:t.collisionBoxArray.length,at=E?E.boxEndIndex:t.collisionBoxArray.length,ot=C?C.boxStartIndex:t.collisionBoxArray.length,st=C?C.boxEndIndex:t.collisionBoxArray.length,lt=-1,ct=function(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e};lt=ct(S,lt),lt=ct(L,lt),lt=ct(E,lt);var ut=(lt=ct(C,lt))>-1?1:0;ut&&(lt*=A/24);t.glyphOffsetArray.length>=Mc.MAX_GLYPHS&&_(\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\");void 0!==b.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey);t.symbolInstances.emplaceBack(e.x,e.y,B.right>=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,R,F,N,tt,et,rt,nt,it,at,ot,st,c,z,D,I,O,ut,0,h,j,U,lt)}(t,f,s,r,n,i,h,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,v,w,A,l,x,T,M,d,e,a,c,u,o)};if(\"line\"===S)for(var P=0,I=ec(e.geometry,0,0,8192,8192);P1){var V=$l(U,k,r.vertical||g,n,24,y);V&&C(U,V)}}else if(\"Polygon\"===e.type)for(var H=0,q=hs(e.geometry,0);H=E.maxzoom))if(\"none\"!==E.visibility)o(S,this.zoom,n),(g[E.id]=E.createBucket({index:u.bucketLayerIDs.length,layers:S,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:b,sourceID:this.source})).populate(_,m,this.tileID.canonical),u.bucketLayerIDs.push(S.map((function(t){return t.id})))}}}var L=t.mapObject(m.glyphDependencies,(function(t){return Object.keys(t).map(Number)}));Object.keys(L).length?a.send(\"getGlyphs\",{uid:this.uid,stacks:L},(function(t,e){f||(f=t,h=e,I.call(l))})):h={};var C=Object.keys(m.iconDependencies);C.length?a.send(\"getImages\",{icons:C,source:this.source,tileID:this.tileID,type:\"icons\"},(function(t,e){f||(f=t,p=e,I.call(l))})):p={};var P=Object.keys(m.patternDependencies);function I(){if(f)return s(f);if(h&&p&&d){var e=new i(h),r=new t.ImageAtlas(p,d);for(var a in g){var l=g[a];l instanceof t.SymbolBucket?(o(l.layers,this.zoom,n),t.performSymbolLayout(l,h,e.positions,p,r.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof t.LineBucket||l instanceof t.FillBucket||l instanceof t.FillExtrusionBucket)&&(o(l.layers,this.zoom,n),l.addFeatures(m,this.tileID.canonical,r.patternPositions))}this.status=\"done\",s(null,{buckets:t.values(g).filter((function(t){return!t.isEmpty()})),featureIndex:u,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?e.positions:null})}}P.length?a.send(\"getImages\",{icons:P,source:this.source,tileID:this.tileID,type:\"patterns\"},(function(t,e){f||(f=t,d=e,I.call(l))})):d={},I.call(this)};var l=function(t,e,r,n){this.actor=t,this.layerIndex=e,this.availableImages=r,this.loadVectorData=n||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(e,r){var n=this,i=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request),s=this.loading[i]=new a(e);s.abort=this.loadVectorData(e,(function(e,a){if(delete n.loading[i],e||!a)return s.status=\"done\",n.loaded[i]=s,r(e);var l=a.rawData,c={};a.expires&&(c.expires=a.expires),a.cacheControl&&(c.cacheControl=a.cacheControl);var u={};if(o){var f=o.finish();f&&(u.resourceTiming=JSON.parse(JSON.stringify(f)))}s.vectorTile=a.vectorTile,s.parse(a.vectorTile,n.layerIndex,n.availableImages,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]=s}))},l.prototype.reloadTile=function(t,e){var r=this,n=this.loaded,i=t.uid,a=this;if(n&&n[i]){var o=n[i];o.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,n){var i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,a.layerIndex,r.availableImages,a.actor,i)),e(t,n)};\"parsing\"===o.status?o.reloadCallback=s:\"done\"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.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()},l.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var c=t.window.ImageBitmap,u=function(){this.loaded={}};u.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,a=e.rawImageData,o=c&&a instanceof c?this.getImageData(a):a,s=new t.DEMData(n,o,i);this.loaded=this.loaded||{},this.loaded[n]=s,r(null,s)},u.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext(\"2d\")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var r=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:r.width,height:r.height},r.data)},u.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var f=function t(e,r){var n,i=e&&e.type;if(\"FeatureCollection\"===i)for(n=0;n=0!=!!e&&t.reverse()}var d=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,g=function(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,\"id\"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};g.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r>31}function P(t,e){for(var r=t.loadGeometry(),n=t.type,i=0,a=0,o=r.length,s=0;s>1;!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),h=Math.max(i,Math.floor(n-l*u/s+f)),p=Math.min(a,Math.floor(n+(s-l)*u/s+f));t(e,r,n,h,p,o)}var d=r[2*n+o],g=i,m=a;for(z(e,r,i,n),r[2*a+o]>d&&z(e,r,i,a);gd;)m--}r[2*i+o]===d?z(e,r,i,m):(m++,z(e,r,m,a)),m<=n&&(i=m+1),n<=m&&(a=m-1)}}(t,e,o,n,i,a%2),O(t,e,r,n,o-1,a+1),O(t,e,r,o+1,i,a+1)}}function z(t,e,r,n){D(t,r,n),D(e,2*r,2*n),D(e,2*r+1,2*n+1)}function D(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function R(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}_.fromVectorTileJs=w,_.fromGeojsonVt=T,_.GeoJSONWrapper=k;var F=function(t){return t[0]},B=function(t){return t[1]},N=function(t,e,r,n,i){void 0===e&&(e=F),void 0===r&&(r=B),void 0===n&&(n=64),void 0===i&&(i=Float64Array),this.nodeSize=n,this.points=t;for(var a=t.length<65536?Uint16Array:Uint32Array,o=this.ids=new a(t.length),s=this.coords=new i(2*t.length),l=0;l=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 m=(f+1)%2;(0===f?r<=s:n<=l)&&(c.push(p),c.push(g-1),c.push(m)),(0===f?i>=s:a>=l)&&(c.push(g+1),c.push(h),c.push(m))}}return u}(this.ids,this.coords,t,e,r,n,this.nodeSize)},N.prototype.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++)R(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];R(d,g,r,n)<=l&&s.push(t[p]);var m=(c+1)%2;(0===c?r-i<=d:n-i<=g)&&(o.push(f),o.push(p-1),o.push(m)),(0===c?r+i>=d:n+i>=g)&&(o.push(p+1),o.push(u),o.push(m))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var j={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},U=function(t){this.options=X(Object.create(j),t),this.trees=new Array(this.options.maxZoom+1)};function V(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function H(t,e){var r=t.geometry.coordinates,n=r[0],i=r[1];return{x:Y(n),y:W(i),zoom:1/0,index:e,parentId:-1}}function q(t){return{type:\"Feature\",id:t.id,properties:G(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 G(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+\"k\":e>=1e3?Math.round(e/100)/10+\"k\":e;return X(X({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function Y(t){return t/360+.5}function W(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 X(t,e){for(var r in e)t[r]=e[r];return t}function Z(t){return t.x}function J(t){return t.y}function K(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 Q(t,e,r,n){var i={id:void 0===t?null:t,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)$(t,e);else if(\"Polygon\"===r||\"MultiLineString\"===r)for(var n=0;n0&&(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=n-r>>1,l=n-r,c=e[r],u=e[r+1],f=e[n],h=e[n+1],p=r+3;po)a=p,o=d;else if(d===o){var g=Math.abs(p-s);gi&&(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 nt(t,e,r,n){for(var i=0;i1?1:r}function ot(t,e,r,n,i,a,o,s){if(n/=e,a>=(r/=e)&&o=n)return null;for(var l=[],c=0;c=r&&d=n)){var g=[];if(\"Point\"===h||\"MultiPoint\"===h)st(f,g,r,n,i);else if(\"LineString\"===h)lt(f,g,r,n,i,!1,s.lineMetrics);else if(\"MultiLineString\"===h)ut(f,g,r,n,i,!1);else if(\"Polygon\"===h)ut(f,g,r,n,i,!0);else if(\"MultiPolygon\"===h)for(var m=0;m=r&&o<=n&&(e.push(t[a]),e.push(t[a+1]),e.push(t[a+2]))}}function lt(t,e,r,n,i,a,o){for(var s,l,c=ct(t),u=0===i?ht:pt,f=t.start,h=0;hr&&(l=u(c,p,d,m,v,r),o&&(c.start=f+s*l)):y>n?x=r&&(l=u(c,p,d,m,v,r),b=!0),x>n&&y<=n&&(l=u(c,p,d,m,v,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&&ft(c,p,d,g),_=c.length-3,a&&_>=3&&(c[_]!==c[0]||c[_+1]!==c[1])&&ft(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 ut(t,e,r,n,i,a){for(var o=0;oo.maxX&&(o.maxX=u),f>o.maxY&&(o.maxY=f)}return o}function xt(t,e,r,n){var i=e.geometry,a=e.type,o=[];if(\"Point\"===a||\"MultiPoint\"===a)for(var s=0;s0&&e.size<(i?o:n))r.numPoints+=e.length/3;else{for(var s=[],l=0;lo)&&(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;n0===e)for(n=0,i=t.length;n24)throw new Error(\"maxZoom should be in the 0-24 range\");if(e.promoteId&&e.generateId)throw new Error(\"promoteId and generateId cannot be used together.\");var n=function(t,e){var r=[];if(\"FeatureCollection\"===t.type)for(var n=0;n=n;c--){var u=+Date.now();s=this._cluster(s,c),this.trees[c]=new N(s,Z,J,a,Float32Array),r&&console.log(\"z%d: %d clusters in %dms\",c,s.length,+Date.now()-u)}return r&&console.timeEnd(\"total time\"),this},U.prototype.getClusters=function(t,e){var r=((t[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,i=180;else if(r>i){var o=this.getClusters([r,n,180,a],e),s=this.getClusters([-180,n,i,a],e);return o.concat(s)}for(var l=this.trees[this._limitZoom(e)],c=[],u=0,f=l.range(Y(r),W(a),Y(i),W(n));u1?this._map(c,!0):null,m=(l<<5)+(e+1)+this.points.length,v=0,y=f;v>5},U.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},U.prototype._map=function(t,e){if(t.numPoints)return e?X({},t.properties):t.properties;var r=this.points[t.index].properties,n=this.options.map(r);return e&&n===r?X({},n):n},_t.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},_t.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<1&&console.time(\"creation\"),h=this.tiles[f]=yt(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<1&&console.time(\"clipping\");var g,m,v,y,x,b,_=.5*l.buffer/l.extent,w=.5-_,T=.5+_,k=1+_;g=m=v=y=null,x=ot(t,u,r-_,r+T,0,h.minX,h.maxX,l),b=ot(t,u,r+w,r+k,0,h.minX,h.maxX,l),t=null,x&&(g=ot(x,u,n-_,n+T,1,h.minY,h.maxY,l),m=ot(x,u,n+w,n+k,1,h.minY,h.maxY,l),x=null),b&&(v=ot(b,u,n-_,n+T,1,h.minY,h.maxY,l),y=ot(b,u,n+w,n+k,1,h.minY,h.maxY,l),b=null),c>1&&console.timeEnd(\"clipping\"),s.push(g||[],e+1,2*r,2*n),s.push(m||[],e+1,2*r,2*n+1),s.push(v||[],e+1,2*r+1,2*n),s.push(y||[],e+1,2*r+1,2*n+1)}}},_t.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<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[wt(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]?mt(this.tiles[s],i):null):null};var kt=function(e){function r(t,r,n,i){e.call(this,t,r,n,Tt),i&&(this.loadGeoJSON=i)}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 e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(n&&n.request&&n.request.collectResourceTiming)&&new t.RequestPerformance(n.request);this.loadGeoJSON(n,(function(a,o){if(a||!o)return r(a);if(\"object\"!=typeof o)return r(new Error(\"Input data given to '\"+n.source+\"' is not a valid GeoJSON object.\"));f(o,!0);try{e._geoJSONIndex=n.cluster?new U(function(e){var r=e.superclusterOptions,n=e.clusterProperties;if(!n||!r)return r;for(var i={},a={},o={accumulated:null,zoom:0},s={properties:null},l=Object.keys(n),c=0,u=l;c=0?0:e.button},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var h=function(e){function r(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requestors;e=0?1.2:1))}function v(t,e,r,n,i,a,o){for(var s=0;s65535)e(new Error(\"glyphs > 65535 not supported\"));else if(a.ranges[s])e(null,{stack:r,id:i,glyph:o});else{var l=a.requests[s];l||(l=a.requests[s]=[],x.loadGlyphRange(r,s,n.url,n.requestManager,(function(t,e){if(e){for(var r in e)n._doesCharSupportLocalGlyph(+r)||(a.glyphs[+r]=e[+r]);a.ranges[s]=!0}for(var i=0,o=l;i1&&(l=t[++s]);var u=Math.abs(c-l.left),f=Math.abs(c-l.right),h=Math.min(u,f),p=void 0,d=i/r*(n+1);if(l.isDash){var g=n-Math.abs(d);p=Math.sqrt(h*h+g*g)}else p=n-Math.sqrt(h*h+d*d);this.data[o+c]=Math.max(0,Math.min(255,p+128))}},T.prototype.addRegularDash=function(t){for(var e=t.length-1;e>=0;--e){var r=t[e],n=t[e+1];r.zeroLength?t.splice(e,1):n&&n.isDash===r.isDash&&(n.left=r.left,t.splice(e,1))}var i=t[0],a=t[t.length-1];i.isDash===a.isDash&&(i.left=a.left-this.width,a.right=i.right+this.width);for(var o=this.width*this.nextRow,s=0,l=t[s],c=0;c1&&(l=t[++s]);var u=Math.abs(c-l.left),f=Math.abs(c-l.right),h=Math.min(u,f),p=l.isDash?h:-h;this.data[o+c]=Math.max(0,Math.min(255,p+128))}},T.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=n&&e.x=i&&e.y0&&(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+10&&(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)r.fire(new t.ErrorEvent(e));else{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.getClusterExpansionZoom=function(t,e){return this.actor.send(\"geojson.getClusterExpansionZoom\",{clusterId:t,source:this.id},e),this},r.prototype.getClusterChildren=function(t,e){return this.actor.send(\"geojson.getClusterChildren\",{clusterId:t,source:this.id},e),this},r.prototype.getClusterLeaves=function(t,e,r,n){return this.actor.send(\"geojson.getClusterLeaves\",{source:this.id,clusterId:t,limit:e,offset:r},n),this},r.prototype._updateWorkerData=function(e){var r=this;this._loaded=!1;var n=t.extend({},this.workerOptions),i=this._data;\"string\"==typeof i?(n.request=this.map._requestManager.transformRequest(t.browser.resolveURL(i),t.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(i),this.actor.send(this.type+\".loadData\",n,(function(t,i){r._removed||i&&i.abandoned||(r._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[r.id]&&(r._resourceTiming=i.resourceTiming[r.id].slice(0)),r.actor.send(r.type+\".coalesce\",{source:n.source},null),e(t))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(e,r){var n=this,i=e.actor?\"reloadTile\":\"loadTile\";e.actor=this.actor;var a={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};e.request=this.actor.send(i,a,(function(t,a){return delete e.request,e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(a,n.map.painter,\"reloadTile\"===i),r(null))}))},r.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.actor.send(\"removeTile\",{uid:t.uid,type:this.type,source:this.id})},r.prototype.onRemove=function(){this._removed=!0,this.actor.send(\"removeSource\",{type:this.type,source:this.id})},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),P=t.createLayout([{name:\"a_pos\",type:\"Int16\",components:2},{name:\"a_texture_pos\",type:\"Int16\",components:2}]),I=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._loaded=!1,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(e,r){var n=this;this._loaded=!1,this.fire(new t.Event(\"dataloading\",{dataType:\"source\"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),(function(i,a){n._loaded=!0,i?n.fire(new t.ErrorEvent(i)):a&&(n.image=a,e&&(n.coordinates=e),r&&r(),n._finishLoading())}))},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,(function(){e.texture=null})),this):this},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){var r=this;this.coordinates=e;var n=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var r=1/0,n=1/0,i=-1/0,a=-1/0,o=0,s=e;or.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+this.id,null,\"Playback for this video can be set only between the \"+r.start(0)+\" and \"+r.end(0)+\"-second mark.\"))):this.video.currentTime=e}},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 e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,P.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,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:\"video\",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(I),z=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.ValidationError(\"sources.\"+r,null,'\"coordinates\" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+r,null,'missing required property \"coordinates\"'))),n.animate&&\"boolean\"!=typeof n.animate&&this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+r,null,'optional \"animate\" property must be a boolean value'))),n.canvas?\"string\"==typeof n.canvas||n.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError(\"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.ValidationError(\"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._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.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.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),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 e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,P.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var a=this.tiles[i];\"loaded\"!==a.state&&(a.state=\"loaded\",a.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];tthis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},N.prototype.has=function(t){return t.wrapped().key in this.data},N.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},N.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},N.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},N.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},N.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},N.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},N.prototype.filter=function(t){var e=[];for(var r in this.data)for(var n=0,i=this.data[r];n1||(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._retainLoadedChildren=function(t,e,r,n){for(var i in this._tiles){var a=this._tiles[i];if(!(n[i]||!a.hasData()||a.tileID.overscaledZ<=e||a.tileID.overscaledZ>r)){for(var o=a.tileID;a&&a.tileID.overscaledZ>e+1;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);(a=this._tiles[s.key])&&a.hasData()&&(o=s)}for(var l=o;l.overscaledZ>e;)if(t[(l=l.scaledTo(l.overscaledZ-1)).key]){n[o.key]=o;break}}}},r.prototype.findLoadedParent=function(t,e){if(t.key in this._loadedParentTiles){var r=this._loadedParentTiles[t.key];return r&&r.tileID.overscaledZ>=e?r:null}for(var n=t.overscaledZ-1;n>=e;n--){var i=t.scaledTo(n),a=this._getLoadedTile(i);if(a)return a}},r.prototype._getLoadedTile=function(t){var e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},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 a=e.coveringZoomLevel(this._source),o=Math.max(a-r.maxOverzooming,this._source.minzoom),s=Math.max(a+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,a);if(It(this._source.type)){for(var c={},u={},f=0,h=Object.keys(l);fthis._source.maxzoom){var m=d.children(this._source.maxzoom)[0],v=this.getTile(m);if(v&&v.hasData()){n[m.key]=m;continue}}else{var y=d.children(this._source.maxzoom);if(n[y[0].key]&&n[y[1].key]&&n[y[2].key]&&n[y[3].key])continue}for(var x=g.wasRequested(),b=d.overscaledZ-1;b>=a;--b){var _=d.scaledTo(b);if(i[_.key])break;if(i[_.key]=!0,!(g=this.getTile(_))&&x&&(g=this._addTile(_)),g&&(n[_.key]=_,x=g.wasRequested(),g.hasData()))break}}}return n},r.prototype._updateLoadedParentTileCache=function(){for(var t in this._loadedParentTiles={},this._tiles){for(var e=[],r=void 0,n=this._tiles[t].tileID;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}e.push(n.key);var i=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(i))break;n=i}for(var a=0,o=e;a0||(e.hasData()&&\"reloading\"!==e.state?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,n){var i=this,a=[],o=this.transform;if(!o)return a;for(var s=n?o.getCameraQueryGeometry(e):e,l=e.map((function(t){return o.pointCoordinate(t)})),c=s.map((function(t){return o.pointCoordinate(t)})),u=this.getIds(),f=1/0,h=1/0,p=-1/0,d=-1/0,g=0,m=c;g=0&&v[1].y+m>=0){var y=l.map((function(t){return s.getTilePoint(t)})),x=c.map((function(t){return s.getTilePoint(t)}));a.push({tile:n,tileID:s,queryGeometry:y,cameraQueryGeometry:x,scale:g})}}},x=0;x=t.browser.now())return!0}return!1},r.prototype.setFeatureState=function(t,e,r){t=t||\"_geojsonTileLayer\",this._state.updateState(t,e,r)},r.prototype.removeFeatureState=function(t,e,r){t=t||\"_geojsonTileLayer\",this._state.removeFeatureState(t,e,r)},r.prototype.getFeatureState=function(t,e){return t=t||\"_geojsonTileLayer\",this._state.getState(t,e)},r.prototype.setDependencies=function(t,e,r){var n=this._tiles[t];n&&n.setDependencies(e,r)},r.prototype.reloadTilesForDependencies=function(t,e){for(var r in this._tiles){this._tiles[r].hasDependency(t,e)&&this._reloadTile(r,\"reloading\")}this._cache.filter((function(r){return!r.hasDependency(t,e)}))},r}(t.Evented);function Pt(t,e){var r=Math.abs(2*t.wrap)-+(t.wrap<0),n=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||n-r||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function It(t){return\"raster\"===t||\"image\"===t||\"video\"===t}function Ot(){return new t.window.Worker(Zi.workerUrl)}Ct.maxOverzooming=10,Ct.maxUnderzooming=3;var zt=\"mapboxgl_preloaded_worker_pool\",Dt=function(){this.active={}};Dt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length0?(i-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))};var Kt=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=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function ne(e,r,n,i,a,o,s,l){var c=i?e.textSizeData:e.iconSizeData,u=t.evaluateSizeForZoom(c,n.transform.zoom),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,m=!1,v=0;vMath.abs(n.x-r.x)*i)return{useVertical:!0};return(e===t.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function oe(e,r,n,i,a,o,s,l,c,u,f,h,p,d){var g,m=r/24,v=e.lineOffsetX*m,y=e.lineOffsetY*m;if(e.numGlyphs>1){var x=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,_=e.lineStartIndex+e.lineLength,w=ie(m,l,v,y,n,f,h,e,c,o,p);if(!w)return{notEnoughRoom:!0};var T=te(w.first.point,s).point,k=te(w.last.point,s).point;if(i&&!n){var A=ae(e.writingMode,T,k,d);if(A)return A}g=[w.first];for(var M=e.glyphStartIndex+1;M0?C.point:se(h,L,S,1,a),I=ae(e.writingMode,S,P,d);if(I)return I}var O=le(m*l.getoffsetX(e.glyphStartIndex),v,y,n,f,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,c,o,p);if(!O)return{notEnoughRoom:!0};g=[O]}for(var z=0,D=g;z0?1:-1,g=0;i&&(d*=-1,g=Math.PI),d<0&&(g+=Math.PI);for(var m=d>0?l+s:l+s+1,v=a,y=a,x=0,b=0,_=Math.abs(p),w=[];x+b<=_;){if((m+=d)=c)return null;if(y=v,w.push(v),void 0===(v=h[m])){var T=new t.Point(u.getx(m),u.gety(m)),k=te(T,f);if(k.signedDistanceFromCamera>0)v=h[m]=k.point;else{var A=m-d;v=se(0===x?o:new t.Point(u.getx(A),u.gety(A)),T,y,_-x+1,f)}}x+=b,b=y.dist(v)}var M=(_-x)/b,S=v.sub(y),E=S.mult(M)._add(y);E._add(S._unit()._perp()._mult(n*d));var L=g+Math.atan2(v.y-y.y,v.x-y.x);return w.push(E),{point:E,angle:L,path:w}}Kt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Kt.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)},Kt.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)},Kt.prototype._insertBoxCell=function(t,e,r,n,i,a){this.boxCells[i].push(a)},Kt.prototype._insertCircleCell=function(t,e,r,n,i,a){this.circleCells[i].push(a)},Kt.prototype._query=function(t,e,r,n,i,a){if(r<0||t>this.width||n<0||e>this.height)return!i&&[];var o=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var s=0;s0:o},Kt.prototype._queryCircle=function(t,e,r,n,i){var a=t-r,o=t+r,s=e-r,l=e+r;if(o<0||a>this.width||l<0||s>this.height)return!n&&[];var c=[],u={hitTest:n,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(a,s,o,l,this._queryCellCircle,c,u,i),n?c.length>0:c},Kt.prototype.query=function(t,e,r,n,i){return this._query(t,e,r,n,!1,i)},Kt.prototype.hitTest=function(t,e,r,n,i){return this._query(t,e,r,n,!0,i)},Kt.prototype.hitTestCircle=function(t,e,r,n){return this._queryCircle(t,e,r,!0,n)},Kt.prototype._queryCell=function(t,e,r,n,i,a,o,s){var l=o.seenUids,c=this.boxCells[i];if(null!==c)for(var u=this.bboxes,f=0,h=c;f=u[d+0]&&n>=u[d+1]&&(!s||s(this.boxKeys[p]))){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[p],x1:u[d],y1:u[d+1],x2:u[d+2],y2:u[d+3]})}}}var g=this.circleCells[i];if(null!==g)for(var m=this.circles,v=0,y=g;vo*o+s*s},Kt.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 ce=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ue(t,e){for(var r=0;r=1;P--)C.push(E.path[P]);for(var I=1;I0){for(var R=C[0].clone(),F=C[0].clone(),B=1;B=A.x&&F.x<=M.x&&R.y>=A.y&&F.y<=M.y?[C]:F.xM.x||F.yM.y?[]:t.clipLine([C],A.x,A.y,M.x,M.y)}for(var N=0,j=D;N=this.screenRightBoundary||n<100||e>this.screenBottomBoundary},he.prototype.isInsideGrid=function(t,e,r,n){return r>=0&&t=0&&e0)return this.prevPlacement&&this.prevPlacement.variableOffsets[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID].text&&(g=this.prevPlacement.variableOffsets[f.crossTileID].anchor),this.variableOffsets[f.crossTileID]={textOffset:m,width:r,height:n,anchor:t,textBoxScale:i,prevAnchor:g},this.markUsedJustification(h,t,f,p),h.allowVerticalPlacement&&(this.markUsedOrientation(h,p,f),this.placedOrientations[f.crossTileID]=p),{shift:v,placedGlyphBoxes:y}},we.prototype.placeLayerBucketPart=function(e,r,n){var i=this,a=e.parameters,o=a.bucket,s=a.layout,l=a.posMatrix,c=a.textLabelPlaneMatrix,u=a.labelToScreenMatrix,f=a.textPixelRatio,h=a.holdingForFade,p=a.collisionBoxArray,d=a.partiallyEvaluatedTextSize,g=a.collisionGroup,m=s.get(\"text-optional\"),v=s.get(\"icon-optional\"),y=s.get(\"text-allow-overlap\"),x=s.get(\"icon-allow-overlap\"),b=\"map\"===s.get(\"text-rotation-alignment\"),_=\"map\"===s.get(\"text-pitch-alignment\"),w=\"none\"!==s.get(\"icon-text-fit\"),T=\"viewport-y\"===s.get(\"symbol-z-order\"),k=y&&(x||!o.hasIconData()||v),A=x&&(y||!o.hasTextData()||m);!o.collisionArrays&&p&&o.deserializeCollisionBoxes(p);var M=function(e,a){if(!r[e.crossTileID])if(h)i.placements[e.crossTileID]=new me(!1,!1,!1);else{var p,T=!1,M=!1,S=!0,E=null,L={box:null,offscreen:null},C={box:null,offscreen:null},P=null,I=null,O=0,z=0,D=0;a.textFeatureIndex?O=a.textFeatureIndex:e.useRuntimeCollisionCircles&&(O=e.featureIndex),a.verticalTextFeatureIndex&&(z=a.verticalTextFeatureIndex);var R=a.textBox;if(R){var F=function(r){var n=t.WritingMode.horizontal;if(o.allowVerticalPlacement&&!r&&i.prevPlacement){var a=i.prevPlacement.placedOrientations[e.crossTileID];a&&(i.placedOrientations[e.crossTileID]=a,n=a,i.markUsedOrientation(o,n,e))}return n},B=function(r,n){if(o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&a.verticalTextBox)for(var i=0,s=o.writingModes;i0&&(N=N.filter((function(t){return t!==j.anchor}))).unshift(j.anchor)}var U=function(t,r,n){for(var a=t.x2-t.x1,s=t.y2-t.y1,c=e.textBoxScale,u=w&&!x?r:null,h={box:[],offscreen:!1},p=y?2*N.length:N.length,d=0;d=N.length,k=i.attemptAnchorPlacement(m,t,a,s,c,b,_,f,l,g,v,e,o,n,u);if(k&&(h=k.placedGlyphBoxes)&&h.box&&h.box.length){T=!0,E=k.shift;break}}return h};B((function(){return U(R,a.iconBox,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox,n=L&&L.box&&L.box.length;return o.allowVerticalPlacement&&!n&&e.numVerticalGlyphVertices>0&&r?U(r,a.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}})),L&&(T=L.box,S=L.offscreen);var V=F(L&&L.box);if(!T&&i.prevPlacement){var H=i.prevPlacement.variableOffsets[e.crossTileID];H&&(i.variableOffsets[e.crossTileID]=H,i.markUsedJustification(o,H.anchor,e,V))}}else{var q=function(t,r){var n=i.collisionIndex.placeCollisionBox(t,y,f,l,g.predicate);return n&&n.box&&n.box.length&&(i.markUsedOrientation(o,r,e),i.placedOrientations[e.crossTileID]=r),n};B((function(){return q(R,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox;return o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?q(r,t.WritingMode.vertical):{box:null,offscreen:null}})),F(L&&L.box&&L.box.length)}}if(T=(p=L)&&p.box&&p.box.length>0,S=p&&p.offscreen,e.useRuntimeCollisionCircles){var G=o.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),Y=t.evaluateSizeForFeature(o.textSizeData,d,G),W=s.get(\"text-padding\"),X=e.collisionCircleDiameter;P=i.collisionIndex.placeCollisionCircles(y,G,o.lineVertexArray,o.glyphOffsetArray,Y,l,c,u,n,_,g.predicate,X,W),T=y||P.circles.length>0&&!P.collisionDetected,S=S&&P.offscreen}if(a.iconFeatureIndex&&(D=a.iconFeatureIndex),a.iconBox){var Z=function(t){var e=w&&E?_e(t,E.x,E.y,b,_,i.transform.angle):t;return i.collisionIndex.placeCollisionBox(e,x,f,l,g.predicate)};M=C&&C.box&&C.box.length&&a.verticalIconBox?(I=Z(a.verticalIconBox)).box.length>0:(I=Z(a.iconBox)).box.length>0,S=S&&I.offscreen}var J=m||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,K=v||0===e.numIconVertices;if(J||K?K?J||(M=M&&T):T=M&&T:M=T=M&&T,T&&p&&p.box&&(C&&C.box&&z?i.collisionIndex.insertCollisionBox(p.box,s.get(\"text-ignore-placement\"),o.bucketInstanceId,z,g.ID):i.collisionIndex.insertCollisionBox(p.box,s.get(\"text-ignore-placement\"),o.bucketInstanceId,O,g.ID)),M&&I&&i.collisionIndex.insertCollisionBox(I.box,s.get(\"icon-ignore-placement\"),o.bucketInstanceId,D,g.ID),P&&(T&&i.collisionIndex.insertCollisionCircles(P.circles,s.get(\"text-ignore-placement\"),o.bucketInstanceId,O,g.ID),n)){var Q=o.bucketInstanceId,$=i.collisionCircleArrays[Q];void 0===$&&($=i.collisionCircleArrays[Q]=new ve);for(var tt=0;tt=0;--E){var L=S[E];M(o.symbolInstances.get(L),o.collisionArrays[L])}else for(var C=e.symbolInstanceStart;C=0&&(e.text.placedSymbolArray.get(c).crossTileID=a>=0&&c!==a?0:n.crossTileID)}},we.prototype.markUsedOrientation=function(e,r,n){for(var i=r===t.WritingMode.horizontal||r===t.WritingMode.horizontalOnly?r:0,a=r===t.WritingMode.vertical?r:0,o=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];o0||l>0,x=a.numIconVertices>0,b=i.placedOrientations[a.crossTileID],_=b===t.WritingMode.vertical,w=b===t.WritingMode.horizontal||b===t.WritingMode.horizontalOnly;if(y){var T=Pe(v.text),k=_?Ie:T;d(e.text,s,k);var A=w?Ie:T;d(e.text,l,A);var M=v.text.isHidden();[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach((function(t){t>=0&&(e.text.placedSymbolArray.get(t).hidden=M||_?1:0)})),a.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).hidden=M||w?1:0);var S=i.variableOffsets[a.crossTileID];S&&i.markUsedJustification(e,S.anchor,a,b);var E=i.placedOrientations[a.crossTileID];E&&(i.markUsedJustification(e,\"left\",a,E),i.markUsedOrientation(e,E,a))}if(x){var L=Pe(v.icon),C=!(h&&a.verticalPlacedIconSymbolIndex&&_);if(a.placedIconSymbolIndex>=0){var P=C?L:Ie;d(e.icon,a.numIconVertices,P),e.icon.placedSymbolArray.get(a.placedIconSymbolIndex).hidden=v.icon.isHidden()}if(a.verticalPlacedIconSymbolIndex>=0){var I=C?Ie:L;d(e.icon,a.numVerticalIconVertices,I),e.icon.placedSymbolArray.get(a.verticalPlacedIconSymbolIndex).hidden=v.icon.isHidden()}}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var O=e.collisionArrays[n];if(O){var z=new t.Point(0,0);if(O.textBox||O.verticalTextBox){var D=!0;if(c){var R=i.variableOffsets[g];R?(z=be(R.anchor,R.width,R.height,R.textOffset,R.textBoxScale),u&&z._rotate(f?i.transform.angle:-i.transform.angle)):D=!1}O.textBox&&Te(e.textCollisionBox.collisionVertexArray,v.text.placed,!D||_,z.x,z.y),O.verticalTextBox&&Te(e.textCollisionBox.collisionVertexArray,v.text.placed,!D||w,z.x,z.y)}var F=Boolean(!w&&O.verticalIconBox);O.iconBox&&Te(e.iconCollisionBox.collisionVertexArray,v.icon.placed,F,h?z.x:0,h?z.y:0),O.verticalIconBox&&Te(e.iconCollisionBox.collisionVertexArray,v.icon.placed,!F,h?z.x:0,h?z.y:0)}}},m=0;mt},we.prototype.setStale=function(){this.stale=!0};var ke=Math.pow(2,25),Ae=Math.pow(2,24),Me=Math.pow(2,17),Se=Math.pow(2,16),Ee=Math.pow(2,9),Le=Math.pow(2,8),Ce=Math.pow(2,1);function Pe(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*ke+e*Ae+r*Me+e*Se+r*Ee+e*Le+r*Ce+e}var Ie=0,Oe=function(t){this._sortAcrossTiles=\"viewport-y\"!==t.layout.get(\"symbol-z-order\")&&void 0!==t.layout.get(\"symbol-sort-key\").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Oe.prototype.continuePlacement=function(t,e,r,n,i){for(var a=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=r[e[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if(\"symbol\"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new Oe(s)),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},ze.prototype.commit=function(t){return this.placement.commit(t),this.placement};var De=512/t.EXTENT/2,Re=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;nt.overscaledZ)for(var s in o){var l=o[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,i)}else{var c=o[t.scaledTo(Number(a)).key];c&&c.findMatches(e.symbolInstances,t,i)}}for(var u=0;u1?\"@2x\":\"\",l=t.getJSON(r.transformRequest(r.normalizeSpriteURL(e,s,\".json\"),t.ResourceType.SpriteJSON),(function(t,e){l=null,o||(o=t,i=e,u())})),c=t.getImage(r.transformRequest(r.normalizeSpriteURL(e,s,\".png\"),t.ResourceType.SpriteImage),(function(t,e){c=null,o||(o=t,a=e,u())}));function u(){if(o)n(o);else if(i&&a){var e=t.browser.getImageData(a),r={};for(var s in i){var l=i[s],c=l.width,u=l.height,f=l.x,h=l.y,p=l.sdf,d=l.pixelRatio,g=l.stretchX,m=l.stretchY,v=l.content,y=new t.RGBAImage({width:c,height:u});t.RGBAImage.copy(e,y,{x:f,y:h},{x:0,y:0},{width:c,height:u}),r[s]={data:y,pixelRatio:d,sdf:p,stretchX:g,stretchY:m,content:v}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(e,this.map._requestManager,(function(e,n){if(r._spriteRequest=null,e)r.fire(new t.ErrorEvent(e));else if(n)for(var i in n)r.imageManager.addImage(i,n[i]);r.imageManager.setLoaded(!0),r._availableImages=r.imageManager.listImages(),r.dispatcher.broadcast(\"setImages\",r._availableImages),r.fire(new t.Event(\"data\",{dataType:\"style\"}))}))},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){for(var e=[],r=0,n=t;r0)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._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event(\"data\",{dataType:\"style\"}))},r.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},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._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event(\"data\",{dataType:\"style\"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(e,r,n){var i=this;if(void 0===n&&(n={}),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 Ct(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){void 0===n&&(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{var a;if(\"custom\"===e.type){if(je(this,t.validateCustomStyleLayer(e)))return;a=t.createStyleLayer(e)}else{if(\"object\"==typeof e.source&&(this.addSource(i,e.source),e=t.clone$1(e),e=t.extend(e,{source:i})),this._validate(t.validateStyle.layer,\"layers.\"+i,e,{arrayIndex:-1},n))return;a=t.createStyleLayer(e),this._validateLayer(a),a.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[a.id]=a.serialize()}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&&\"custom\"!==a.type){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),a.onAdd&&a.onAdd(this.map)}}},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._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}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.hasLayer=function(t){return t in this._layers},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,n){void 0===n&&(n={}),this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.deepEqual(i.filter,r))return null==r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(t.validateStyle.filter,\"layers.\"+i.id+\".filter\",r,null,n)||(i.filter=t.clone$1(r),this._updateLayer(i)))}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$1(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getLayoutProperty(r),n)||(a.setLayoutProperty(r,n,i),this._updateLayer(a)):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(e,r){var n=this.getLayer(e);if(n)return n.getLayoutProperty(r);this.fire(new t.ErrorEvent(new Error(\"The layer '\"+e+\"' does not exist in the map's style.\")))},r.prototype.setPaintProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getPaintProperty(r),n)||(a.setPaintProperty(r,n,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[e]=!0):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.setFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=e.sourceLayer,a=this.sourceCaches[n];if(void 0!==a){var o=a.getSource().type;\"geojson\"===o&&i?this.fire(new t.ErrorEvent(new Error(\"GeoJSON sources cannot have a sourceLayer parameter.\"))):\"vector\"!==o||i?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error(\"The feature id parameter must be provided.\"))),a.setFeatureState(i,e.id,r)):this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+n+\"' does not exist in the map's style.\")))},r.prototype.removeFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=this.sourceCaches[n];if(void 0!==i){var a=i.getSource().type,o=\"vector\"===a?e.sourceLayer:void 0;\"vector\"!==a||o?r&&\"string\"!=typeof e.id&&\"number\"!=typeof e.id?this.fire(new t.ErrorEvent(new Error(\"A feature id is requred to remove its specific state property.\"))):i.removeFeatureState(o,e.id,r):this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+n+\"' does not exist in the map's style.\")))},r.prototype.getFeatureState=function(e){this._checkLoaded();var r=e.source,n=e.sourceLayer,i=this.sourceCaches[r];if(void 0!==i){if(\"vector\"!==i.getSource().type||n)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error(\"The feature id parameter must be provided.\"))),i.getFeatureState(n,e.id);this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+r+\"' does not exist in the map's style.\")))},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){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._serializeLayers(this._order)},(function(t){return void 0!==t}))},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&\"raster\"!==this.sourceCaches[t.source].getSource().type&&(this._updatedSources[t.source]=\"reload\",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,r=function(t){return\"fill-extrusion\"===e._layers[t].type},n={},i=[],a=this._order.length-1;a>=0;a--){var o=this._order[a];if(r(o)){n[o]=a;for(var s=0,l=t;s=0;d--){var g=this._order[d];if(r(g))for(var m=i.length-1;m>=0;m--){var v=i[m].feature;if(n[v.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}\",\"attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}\"),tr=yr(\"varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}\",\"attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}\"),er=yr(\"uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}\",\"attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}\"),rr=yr(\"#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float opacity\\ngl_FragColor=color*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"attribute vec2 a_pos;uniform mat4 u_matrix;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float opacity\\ngl_Position=u_matrix*vec4(a_pos,0,1);}\"),nr=yr(\"varying vec2 v_pos;\\n#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 outline_color\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\\n#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 outline_color\\n#pragma mapbox: initialize lowp float opacity\\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}\"),ir=yr(\"uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}\"),ar=yr(\"uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}\"),or=yr(\"varying vec4 v_color;void main() {gl_FragColor=v_color;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\\n#pragma mapbox: define highp float base\\n#pragma mapbox: define highp float height\\n#pragma mapbox: define highp vec4 color\\nvoid main() {\\n#pragma mapbox: initialize highp float base\\n#pragma mapbox: initialize highp float height\\n#pragma mapbox: initialize highp vec4 color\\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}\"),sr=yr(\"uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float base\\n#pragma mapbox: initialize lowp float height\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float base\\n#pragma mapbox: initialize lowp float height\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\\n? a_pos\\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}\"),lr=yr(\"#ifdef GL_ES\\nprecision highp float;\\n#endif\\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}\"),cr=yr(\"uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\\n#define PI 3.141592653589793\\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}\"),ur=yr(\"uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\\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\\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\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}\"),fr=yr(\"uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define MAX_LINE_DISTANCE 32767.0\\n#define scale 0.015873016\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\\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\\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\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}\"),hr=yr(\"uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\\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#pragma mapbox: define lowp float floorwidth\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\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#pragma mapbox: initialize lowp float floorwidth\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}\"),pr=yr(\"uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\\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\\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\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\\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\\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\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}\"),dr=yr(\"uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}\"),gr=yr(\"uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}\"),mr=yr(\"#define SDF_PX 8.0\\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\\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\\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\\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\\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\\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\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}\"),vr=yr(\"#define SDF_PX 8.0\\n#define SDF 1.0\\n#define ICON 0.0\\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\\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\\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\\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\\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\\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\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}\");function yr(t,e){var r=/#pragma mapbox: ([\\w]+) ([\\w]+) ([\\w]+) ([\\w]+)/g,n={};return{fragmentSource:t=t.replace(r,(function(t,e,r,i,a){return n[a]=!0,\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nvarying \"+r+\" \"+i+\" \"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"\\n#ifdef HAS_UNIFORM_u_\"+a+\"\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\"})),vertexSource:e=e.replace(r,(function(t,e,r,i,a){var o=\"float\"===i?\"vec2\":\"vec4\",s=a.match(/color/)?\"color\":o;return n[a]?\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nuniform lowp float u_\"+a+\"_t;\\nattribute \"+r+\" \"+o+\" a_\"+a+\";\\nvarying \"+r+\" \"+i+\" \"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"vec4\"===s?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+a+\" = a_\"+a+\";\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+a+\" = unpack_mix_\"+s+\"(a_\"+a+\", u_\"+a+\"_t);\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nuniform lowp float u_\"+a+\"_t;\\nattribute \"+r+\" \"+o+\" a_\"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"vec4\"===s?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+r+\" \"+i+\" \"+a+\" = a_\"+a+\";\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+r+\" \"+i+\" \"+a+\" = unpack_mix_\"+s+\"(a_\"+a+\", u_\"+a+\"_t);\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\"}))}}var xr=Object.freeze({__proto__:null,prelude:Ye,background:We,backgroundPattern:Xe,circle:Ze,clippingMask:Je,heatmap:Ke,heatmapTexture:Qe,collisionBox:$e,collisionCircle:tr,debug:er,fill:rr,fillOutline:nr,fillOutlinePattern:ir,fillPattern:ar,fillExtrusion:or,fillExtrusionPattern:sr,hillshadePrepare:lr,hillshade:cr,line:ur,lineGradient:fr,linePattern:hr,lineSDF:pr,raster:dr,symbolIcon:gr,symbolSDF:mr,symbolTextAndIcon:vr}),br=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};br.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>16,s>>16],u_pixel_coord_lower:[65535&o,65535&s]}}_r.prototype.draw=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g){var m,v=t.gl;if(!this.failedToCreate){for(var y in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(n),t.setColorMode(i),t.setCullFace(a),this.fixedUniforms)this.fixedUniforms[y].set(o[y]);p&&p.setUniforms(t,this.binderUniforms,f,{zoom:h});for(var x=(m={},m[v.LINES]=2,m[v.TRIANGLES]=3,m[v.LINE_STRIP]=1,m)[e],b=0,_=u.get();b<_.length;b+=1){var w=_[b],T=w.vaos||(w.vaos={});(T[s]||(T[s]=new br)).bind(t,this,l,p?p.getPaintVertexBuffers():[],c,w.vertexOffset,d,g),v.drawElements(e,w.primitiveLength*x,v.UNSIGNED_SHORT,w.primitiveOffset*x*2)}}};var Tr=function(e,r,n,i){var a=r.style.light,o=a.properties.get(\"position\"),s=[o.x,o.y,o.z],l=t.create$1();\"viewport\"===a.properties.get(\"anchor\")&&t.fromRotation(l,-r.transform.angle),t.transformMat3(s,s,l);var c=a.properties.get(\"color\");return{u_matrix:e,u_lightpos:s,u_lightintensity:a.properties.get(\"intensity\"),u_lightcolor:[c.r,c.g,c.b],u_vertical_gradient:+n,u_opacity:i}},kr=function(e,r,n,i,a,o,s){return t.extend(Tr(e,r,n,i),wr(o,r,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8})},Ar=function(t){return{u_matrix:t}},Mr=function(e,r,n,i){return t.extend(Ar(e),wr(n,r,i))},Sr=function(t,e){return{u_matrix:t,u_world:e}},Er=function(e,r,n,i,a){return t.extend(Mr(e,r,n,i),{u_world:a})},Lr=function(e,r,n,i){var a,o,s=e.transform;if(\"map\"===i.paint.get(\"circle-pitch-alignment\")){var l=pe(n,1,s.zoom);a=!0,o=[l,l]}else a=!1,o=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+(\"map\"===i.paint.get(\"circle-pitch-scale\")),u_matrix:e.translatePosMatrix(r.posMatrix,n,i.paint.get(\"circle-translate\"),i.paint.get(\"circle-translate-anchor\")),u_pitch_with_map:+a,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:o}},Cr=function(t,e,r){var n=pe(r,1,e.zoom),i=Math.pow(2,e.zoom-r.tileID.overscaledZ),a=r.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:n,u_extrude_scale:[e.pixelsToGLUnits[0]/(n*i),e.pixelsToGLUnits[1]/(n*i)],u_overscale_factor:a}},Pr=function(t,e,r){return{u_matrix:t,u_inv_matrix:e,u_camera_to_center_distance:r.cameraToCenterDistance,u_viewport_size:[r.width,r.height]}},Ir=function(t,e,r){return void 0===r&&(r=1),{u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:r}},Or=function(t){return{u_matrix:t}},zr=function(t,e,r,n){return{u_matrix:t,u_extrude_scale:pe(e,1,r),u_intensity:n}};function Dr(e,r){var n=Math.pow(2,r.canonical.z),i=r.canonical.y;return[new t.MercatorCoordinate(0,i/n).toLngLat().lat,new t.MercatorCoordinate(0,(i+1)/n).toLngLat().lat]}var Rr=function(e,r,n){var i=e.transform;return{u_matrix:Ur(e,r,n),u_ratio:1/pe(r,1,i.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Fr=function(e,r,n){return t.extend(Rr(e,r,n),{u_image:0})},Br=function(e,r,n,i){var a=e.transform,o=jr(r,a);return{u_matrix:Ur(e,r,n),u_texsize:r.imageAtlasTexture.size,u_ratio:1/pe(r,1,a.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[o,i.fromScale,i.toScale],u_fade:i.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},Nr=function(e,r,n,i,a){var o=e.transform,s=e.lineAtlas,l=jr(r,o),c=\"round\"===n.layout.get(\"line-cap\"),u=s.getDash(i.from,c),f=s.getDash(i.to,c),h=u.width*a.fromScale,p=f.width*a.toScale;return t.extend(Rr(e,r,n),{u_patternscale_a:[l/h,-u.height/2],u_patternscale_b:[l/p,-f.height/2],u_sdfgamma:s.width/(256*Math.min(h,p)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:f.y,u_mix:a.t})};function jr(t,e){return 1/pe(t,1,e.tileZoom)}function Ur(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get(\"line-translate\"),r.paint.get(\"line-translate-anchor\"))}var Vr=function(t,e,r,n,i){return{u_matrix:t,u_tl_parent:e,u_scale_parent:r,u_buffer_scale:1,u_fade_t:n.mix,u_opacity:n.opacity*i.paint.get(\"raster-opacity\"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get(\"raster-brightness-min\"),u_brightness_high:i.paint.get(\"raster-brightness-max\"),u_saturation_factor:(o=i.paint.get(\"raster-saturation\"),o>0?1-1/(1.001-o):-o),u_contrast_factor:(a=i.paint.get(\"raster-contrast\"),a>0?1/(1-a):1+a),u_spin_weights:Hr(i.paint.get(\"raster-hue-rotate\"))};var a,o};function Hr(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]}var qr,Gr=function(t,e,r,n,i,a,o,s,l,c){var u=i.transform;return{u_is_size_zoom_constant:+(\"constant\"===t||\"source\"===t),u_is_size_feature_constant:+(\"constant\"===t||\"camera\"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:u.cameraToCenterDistance,u_pitch:u.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:u.width/u.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:a,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:c,u_texture:0}},Yr=function(e,r,n,i,a,o,s,l,c,u,f){var h=a.transform;return t.extend(Gr(e,r,n,i,a,o,s,l,c,u),{u_gamma_scale:i?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+f})},Wr=function(e,r,n,i,a,o,s,l,c,u){return t.extend(Yr(e,r,n,i,a,o,s,l,!0,c,!0),{u_texsize_icon:u,u_texture_icon:1})},Xr=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Zr=function(e,r,n,i,a,o){return t.extend(function(t,e,r,n){var i=r.imageManager.getPattern(t.from.toString()),a=r.imageManager.getPattern(t.to.toString()),o=r.imageManager.getPixelSize(),s=o.width,l=o.height,c=Math.pow(2,n.tileID.overscaledZ),u=n.tileSize*Math.pow(2,r.transform.tileZoom)/c,f=u*(n.tileID.canonical.x+n.tileID.wrap*c),h=u*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[s,l],u_mix:e.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/pe(n,1,r.transform.tileZoom),u_pixel_coord_upper:[f>>16,h>>16],u_pixel_coord_lower:[65535&f,65535&h]}}(i,o,n,a),{u_matrix:e,u_opacity:r})},Jr={fillExtrusion:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fillExtrusionPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,r.u_height_factor),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fill:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},fillPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},fillOutline:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world)}},fillOutlinePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},circle:function(e,r){return{u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,r.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},collisionBox:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,r.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,r.u_overscale_factor)}},collisionCircle:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,r.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,r.u_viewport_size)}},debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_overlay:new t.Uniform1i(e,r.u_overlay),u_overlay_scale:new t.Uniform1f(e,r.u_overlay_scale)}},clippingMask:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmap:function(e,r){return{u_extrude_scale:new t.Uniform1f(e,r.u_extrude_scale),u_intensity:new t.Uniform1f(e,r.u_intensity),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmapTexture:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_color_ramp:new t.Uniform1i(e,r.u_color_ramp),u_opacity:new t.Uniform1f(e,r.u_opacity)}},hillshade:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_latrange:new t.Uniform2f(e,r.u_latrange),u_light:new t.Uniform2f(e,r.u_light),u_shadow:new t.UniformColor(e,r.u_shadow),u_highlight:new t.UniformColor(e,r.u_highlight),u_accent:new t.UniformColor(e,r.u_accent)}},hillshadePrepare:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_dimension:new t.Uniform2f(e,r.u_dimension),u_zoom:new t.Uniform1f(e,r.u_zoom),u_maxzoom:new t.Uniform1f(e,r.u_maxzoom),u_unpack:new t.Uniform4f(e,r.u_unpack)}},line:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels)}},lineGradient:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_image:new t.Uniform1i(e,r.u_image)}},linePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_texsize:new t.Uniform2f(e,r.u_texsize),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_image:new t.Uniform1i(e,r.u_image),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},lineSDF:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,r.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,r.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,r.u_sdfgamma),u_image:new t.Uniform1i(e,r.u_image),u_tex_y_a:new t.Uniform1f(e,r.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,r.u_tex_y_b),u_mix:new t.Uniform1f(e,r.u_mix)}},raster:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_tl_parent:new t.Uniform2f(e,r.u_tl_parent),u_scale_parent:new t.Uniform1f(e,r.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,r.u_buffer_scale),u_fade_t:new t.Uniform1f(e,r.u_fade_t),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image0:new t.Uniform1i(e,r.u_image0),u_image1:new t.Uniform1i(e,r.u_image1),u_brightness_low:new t.Uniform1f(e,r.u_brightness_low),u_brightness_high:new t.Uniform1f(e,r.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,r.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,r.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,r.u_spin_weights)}},symbolIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture)}},symbolSDF:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},symbolTextAndIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texsize_icon:new t.Uniform2f(e,r.u_texsize_icon),u_texture:new t.Uniform1i(e,r.u_texture),u_texture_icon:new t.Uniform1i(e,r.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},background:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_color:new t.UniformColor(e,r.u_color)}},backgroundPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image:new t.Uniform1i(e,r.u_image),u_pattern_tl_a:new t.Uniform2f(e,r.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,r.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,r.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,r.u_pattern_br_b),u_texsize:new t.Uniform2f(e,r.u_texsize),u_mix:new t.Uniform1f(e,r.u_mix),u_pattern_size_a:new t.Uniform2f(e,r.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,r.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,r.u_scale_a),u_scale_b:new t.Uniform1f(e,r.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,r.u_tile_units_to_pixels)}}};function Kr(e,r,n,i,a,o,s){for(var l=e.context,c=l.gl,u=e.useProgram(\"collisionBox\"),f=[],h=0,p=0,d=0;d0){var _=t.create(),w=y;t.mul(_,v.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(_,_,v.placementViewportMatrix),f.push({circleArray:b,circleOffset:p,transform:w,invTransform:_}),p=h+=b.length/4}x&&u.draw(l,c.LINES,At.disabled,Mt.disabled,e.colorModeForRenderPass(),Et.disabled,Cr(y,e.transform,m),n.id,x.layoutVertexBuffer,x.indexBuffer,x.segments,null,e.transform.zoom,null,null,x.collisionVertexBuffer)}}if(s&&f.length){var T=e.useProgram(\"collisionCircle\"),k=new t.StructArrayLayout2f1f2i16;k.resize(4*h),k._trim();for(var A=0,M=0,S=f;M=0&&(g[v.associatedIconIndex]={shiftedAnchor:S,angle:E})}else ue(v.numGlyphs,p)}if(f){d.clear();for(var C=e.icon.placedSymbolArray,P=0;P0){var s=t.browser.now(),l=(s-e.timeAdded)/o,c=r?(s-r.timeAdded)/o:-1,u=n.getSource(),f=a.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),h=!r||Math.abs(r.tileID.overscaledZ-f)>Math.abs(e.tileID.overscaledZ-f),p=h&&e.refreshedUponExpiration?1:t.clamp(h?l:1-c,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-p}:{opacity:p,mix:0}}return{opacity:1,mix:0}}var un=new t.Color(1,0,0,1),fn=new t.Color(0,1,0,1),hn=new t.Color(0,0,1,1),pn=new t.Color(1,0,1,1),dn=new t.Color(0,1,1,1);function gn(t){var e=t.transform.padding;mn(t,t.transform.height-(e.top||0),3,un),mn(t,e.bottom||0,3,fn),vn(t,e.left||0,3,hn),vn(t,t.transform.width-(e.right||0),3,pn);var r=t.transform.centerPoint;!function(t,e,r,n){yn(t,e-1,r-10,2,20,n),yn(t,e-10,r-1,20,2,n)}(t,r.x,t.transform.height-r.y,dn)}function mn(t,e,r,n){yn(t,0,e+r/2,t.transform.width,r,n)}function vn(t,e,r,n){yn(t,e-r/2,0,r,t.transform.height,n)}function yn(e,r,n,i,a,o){var s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*t.browser.devicePixelRatio,n*t.browser.devicePixelRatio,i*t.browser.devicePixelRatio,a*t.browser.devicePixelRatio),s.clear({color:o}),l.disable(l.SCISSOR_TEST)}function xn(e,r,n){var i=e.context,a=i.gl,o=n.posMatrix,s=e.useProgram(\"debug\"),l=At.disabled,c=Mt.disabled,u=e.colorModeForRenderPass();i.activeTexture.set(a.TEXTURE0),e.emptyTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE),s.draw(i,a.LINE_STRIP,l,c,u,Et.disabled,Ir(o,t.Color.red),\"$debug\",e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);var f=r.getTileByID(n.key).latestRawTileData,h=f&&f.byteLength||0,p=Math.floor(h/1024),d=r.getTile(n).tileSize,g=512/Math.min(d,512)*(n.overscaledZ/e.transform.zoom)*.5,m=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(m+=\" => \"+n.overscaledZ),function(t,e){t.initDebugOverlayCanvas();var r=t.debugOverlayCanvas,n=t.context.gl,i=t.debugOverlayCanvas.getContext(\"2d\");i.clearRect(0,0,r.width,r.height),i.shadowColor=\"white\",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle=\"white\",i.textBaseline=\"top\",i.font=\"bold 36px Open Sans, sans-serif\",i.fillText(e,5,5),i.strokeText(e,5,5),t.debugOverlayTexture.update(r),t.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}(e,m+\" \"+p+\"kb\"),s.draw(i,a.TRIANGLES,l,c,St.alphaBlended,Et.disabled,Ir(o,t.Color.transparent,g),\"$debug\",e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}var bn={symbol:function(e,r,n,i,a){if(\"translucent\"===e.renderPass){var o=Mt.disabled,s=e.colorModeForRenderPass();n.layout.get(\"text-variable-anchor\")&&function(e,r,n,i,a,o,s){for(var l=r.transform,c=\"map\"===a,u=\"map\"===o,f=0,h=e;f256&&this.clearStencil(),r.setColorMode(St.disabled),r.setDepthMode(At.disabled);var i=this.useProgram(\"clippingMask\");this._tileClippingMaskIDs={};for(var a=0,o=e;a256&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new Mt({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},_n.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Mt({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},_n.prototype.stencilConfigForOverlap=function(t){var e,r=this.context.gl,n=t.sort((function(t,e){return e.overscaledZ-t.overscaledZ})),i=n[n.length-1].overscaledZ,a=n[0].overscaledZ-i+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();for(var o={},s=0;s=0;this.currentLayer--){var w=this.style._layers[i[this.currentLayer]],T=a[w.source],k=u[w.source];this._renderTileClippingMasks(w,k),this.renderLayer(this,T,w,k)}for(this.renderPass=\"translucent\",this.currentLayer=0;this.currentLayer0?e.pop():null},_n.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),r=this.imageManager.getPattern(t.to.toString());return!e||!r},_n.prototype.useProgram=function(t,e){this.cache=this.cache||{};var r=\"\"+t+(e?e.cacheKey:\"\")+(this._showOverdrawInspector?\"/overdraw\":\"\");return this.cache[r]||(this.cache[r]=new _r(this.context,xr[t],e,Jr[t],this._showOverdrawInspector)),this.cache[r]},_n.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},_n.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)},_n.prototype.initDebugOverlayCanvas=function(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=t.window.document.createElement(\"canvas\"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var e=this.context.gl;this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,e.RGBA)}},_n.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var wn=function(t,e){this.points=t,this.planes=e};wn.fromInvProjectionMatrix=function(e,r,n){var i=Math.pow(2,n),a=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((function(r){return t.transformMat4([],r,e)})).map((function(e){return t.scale$1([],e,1/e[3]/r*i)})),o=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(e){var r=t.sub([],a[e[0]],a[e[1]]),n=t.sub([],a[e[2]],a[e[1]]),i=t.normalize([],t.cross([],r,n)),o=-t.dot(i,a[e[1]]);return i.concat(o)}));return new wn(a,o)};var Tn=function(e,r){this.min=e,this.max=r,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};Tn.prototype.quadrant=function(e){for(var r=[e%2==0,e<2],n=t.clone$2(this.min),i=t.clone$2(this.max),a=0;a=0;if(0===o)return 0;o!==r.length&&(n=!1)}if(n)return 2;for(var l=0;l<3;l++){for(var c=Number.MAX_VALUE,u=-Number.MAX_VALUE,f=0;fthis.max[l]-this.min[l])return 0}return 1};var kn=function(t,e,r,n){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),isNaN(t)||t<0||isNaN(e)||e<0||isNaN(r)||r<0||isNaN(n)||n<0)throw new Error(\"Invalid value for edge-insets, top, bottom, left and right must all be numbers\");this.top=t,this.bottom=e,this.left=r,this.right=n};kn.prototype.interpolate=function(e,r,n){return null!=r.top&&null!=e.top&&(this.top=t.number(e.top,r.top,n)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,r.bottom,n)),null!=r.left&&null!=e.left&&(this.left=t.number(e.left,r.left,n)),null!=r.right&&null!=e.right&&(this.right=t.number(e.right,r.right,n)),this},kn.prototype.getCenter=function(e,r){var n=t.clamp((this.left+e-this.right)/2,0,e),i=t.clamp((this.top+r-this.bottom)/2,0,r);return new t.Point(n,i)},kn.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},kn.prototype.clone=function(){return new kn(this.top,this.bottom,this.left,this.right)},kn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var An=function(e,r,n,i,a){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===a||a,this._minZoom=e||0,this._maxZoom=r||22,this._minPitch=null==n?0:n,this._maxPitch=null==i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new kn,this._posMatrixCache={},this._alignedPosMatrixCache={}},Mn={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};An.prototype.clone=function(){var t=new An(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,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._edgeInsets=this._edgeInsets.clone(),t._calcMatrices(),t},Mn.minZoom.get=function(){return this._minZoom},Mn.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Mn.maxZoom.get=function(){return this._maxZoom},Mn.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Mn.minPitch.get=function(){return this._minPitch},Mn.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},Mn.maxPitch.get=function(){return this._maxPitch},Mn.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},Mn.renderWorldCopies.get=function(){return this._renderWorldCopies},Mn.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},Mn.worldSize.get=function(){return this.tileSize*this.scale},Mn.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Mn.size.get=function(){return new t.Point(this.width,this.height)},Mn.bearing.get=function(){return-this.angle/Math.PI*180},Mn.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=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Mn.pitch.get=function(){return this._pitch/Math.PI*180},Mn.pitch.set=function(e){var r=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},Mn.fov.get=function(){return this._fov/Math.PI*180},Mn.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())},Mn.zoom.get=function(){return this._zoom},Mn.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())},Mn.center.get=function(){return this._center},Mn.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Mn.padding.get=function(){return this._edgeInsets.toJSON()},Mn.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},Mn.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},An.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},An.prototype.interpolatePadding=function(t,e,r){this._unmodified=!1,this._edgeInsets.interpolate(t,e,r),this._constrain(),this._calcMatrices()},An.prototype.coveringZoomLevel=function(t){var e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)},An.prototype.getVisibleUnwrappedCoordinates=function(e){var r=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new t.Point(0,0)),i=this.pointCoordinate(new t.Point(this.width,0)),a=this.pointCoordinate(new t.Point(this.width,this.height)),o=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(n.x,i.x,a.x,o.x)),l=Math.floor(Math.max(n.x,i.x,a.x,o.x)),c=s-1;c<=l+1;c++)0!==c&&r.push(new t.UnwrappedTileID(c,e));return r},An.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&&re.maxzoom&&(r=e.maxzoom);var i=t.MercatorCoordinate.fromLngLat(this.center),a=Math.pow(2,r),o=[a*i.x,a*i.y,0],s=wn.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),l=e.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=r);var c=function(t){return{aabb:new Tn([t*a,0,0],[(t+1)*a,a,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}},u=[],f=[],h=r,p=e.reparseOverscaled?n:r;if(this._renderWorldCopies)for(var d=1;d<=3;d++)u.push(c(-d)),u.push(c(d));for(u.push(c(0));u.length>0;){var g=u.pop(),m=g.x,v=g.y,y=g.fullyVisible;if(!y){var x=g.aabb.intersects(s);if(0===x)continue;y=2===x}var b=g.aabb.distanceX(o),_=g.aabb.distanceY(o),w=Math.max(Math.abs(b),Math.abs(_)),T=3+(1<T&&g.zoom>=l)f.push({tileID:new t.OverscaledTileID(g.zoom===h?p:g.zoom,g.wrap,g.zoom,m,v),distanceSq:t.sqrLen([o[0]-.5-m,o[1]-.5-v])});else for(var k=0;k<4;k++){var A=(m<<1)+k%2,M=(v<<1)+(k>>1);u.push({aabb:g.aabb.quadrant(k),zoom:g.zoom+1,x:A,y:M,wrap:g.wrap,fullyVisible:y})}}return f.sort((function(t,e){return t.distanceSq-e.distanceSq})).map((function(t){return t.tileID}))},An.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Mn.unmodified.get=function(){return this._unmodified},An.prototype.zoomScale=function(t){return Math.pow(2,t)},An.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},An.prototype.project=function(e){var r=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(r)*this.worldSize)},An.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},Mn.point.get=function(){return this.project(this.center)},An.prototype.setLocationAtPoint=function(e,r){var n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),a=this.locationCoordinate(e),o=new t.MercatorCoordinate(a.x-(n.x-i.x),a.y-(n.y-i.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())},An.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},An.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},An.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},An.prototype.coordinateLocation=function(t){return t.toLngLat()},An.prototype.pointCoordinate=function(e){var r=[e.x,e.y,0,1],n=[e.x,e.y,1,1];t.transformMat4(r,r,this.pixelMatrixInverse),t.transformMat4(n,n,this.pixelMatrixInverse);var i=r[3],a=n[3],o=r[0]/i,s=n[0]/a,l=r[1]/i,c=n[1]/a,u=r[2]/i,f=n[2]/a,h=u===f?0:(0-u)/(f-u);return new t.MercatorCoordinate(t.number(o,s,h)/this.worldSize,t.number(l,c,h)/this.worldSize)},An.prototype.coordinatePoint=function(e){var r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix),new t.Point(r[0]/r[3],r[1]/r[3])},An.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},An.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},An.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},An.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=t.identity(new Float64Array(16));return t.translate(l,l,[s*o,a.y*o,0]),t.scale(l,l,[o/t.EXTENT,o/t.EXTENT,1]),t.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},An.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},An.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=t.mercatorYfromLat(f[1])*this.worldSize,e=(o=t.mercatorYfromLat(f[0])*this.worldSize)-ao&&(i=o-m)}if(this.lngRange){var v=p.x,y=c.x/2;v-yl&&(n=l-y)}void 0===n&&void 0===i||(this.center=this.unproject(new t.Point(void 0!==n?n:p.x,void 0!==i?i:p.y))),this._unmodified=u,this._constraining=!1}},An.prototype._calcMatrices=function(){if(this.height){var e=this._fov/2,r=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(e)*this.height;var n=Math.PI/2+this._pitch,i=this._fov*(.5+r.y/this.height),a=Math.sin(i)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-n-i,.01,Math.PI-.01)),o=this.point,s=o.x,l=o.y,c=1.01*(Math.cos(Math.PI/2-this._pitch)*a+this.cameraToCenterDistance),u=this.height/50,f=new Float64Array(16);t.perspective(f,this._fov,this.width/this.height,u,c),f[8]=2*-r.x/this.width,f[9]=2*r.y/this.height,t.scale(f,f,[1,-1,1]),t.translate(f,f,[0,0,-this.cameraToCenterDistance]),t.rotateX(f,f,this._pitch),t.rotateZ(f,f,this.angle),t.translate(f,f,[-s,-l,0]),this.mercatorMatrix=t.scale([],f,[this.worldSize,this.worldSize,this.worldSize]),t.scale(f,f,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=f,this.invProjMatrix=t.invert([],this.projMatrix);var h=this.width%2/2,p=this.height%2/2,d=Math.cos(this.angle),g=Math.sin(this.angle),m=s-Math.round(s)+d*h+g*p,v=l-Math.round(l)+d*p+g*h,y=new Float64Array(f);if(t.translate(y,y,[m>.5?m-1:m,v>.5?v-1:v,0]),this.alignedProjMatrix=y,f=t.create(),t.scale(f,f,[this.width/2,-this.height/2,1]),t.translate(f,f,[1,-1,0]),this.labelPlaneMatrix=f,f=t.create(),t.scale(f,f,[1,-1,1]),t.translate(f,f,[-1,-1,0]),t.scale(f,f,[2/this.width,2/this.height,1]),this.glCoordMatrix=f,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(f=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error(\"failed to invert matrix\");this.pixelMatrixInverse=f,this._posMatrixCache={},this._alignedPosMatrixCache={}}},An.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},An.prototype.getCameraPoint=function(){var e=this._pitch,r=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,r))},An.prototype.getCameraQueryGeometry=function(e){var r=this.getCameraPoint();if(1===e.length)return[e[0],r];for(var n=r.x,i=r.y,a=r.x,o=r.y,s=0,l=e;s=3&&!t.some((function(t){return isNaN(t)}))){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0}return!1},Sn.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,\"\",e)}catch(t){}};var En={linearity:.3,easing:t.bezier(0,0,.3,1)},Ln=t.extend({deceleration:2500,maxSpeed:1400},En),Cn=t.extend({deceleration:20,maxSpeed:1400},En),Pn=t.extend({deceleration:1e3,maxSpeed:360},En),In=t.extend({deceleration:1e3,maxSpeed:90},En),On=function(t){this._map=t,this.clear()};function zn(t,e){(!t.duration||t.duration0&&r-e[0].time>160;)e.shift()},On.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var r={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},n=0,i=this._inertiaBuffer;n=this._clickTolerance||this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.dblclick=function(t){return this._firePreventable(new Rn(t.type,this._map,t))},Nn.prototype.mouseover=function(t){this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.mouseout=function(t){this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.touchstart=function(t){return this._firePreventable(new Fn(t.type,this._map,t))},Nn.prototype.touchmove=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype.touchend=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype.touchcancel=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Nn.prototype.isEnabled=function(){return!0},Nn.prototype.isActive=function(){return!1},Nn.prototype.enable=function(){},Nn.prototype.disable=function(){};var jn=function(t){this._map=t};jn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},jn.prototype.mousemove=function(t){this._map.fire(new Rn(t.type,this._map,t))},jn.prototype.mousedown=function(){this._delayContextMenu=!0},jn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Rn(\"contextmenu\",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},jn.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new Rn(t.type,this._map,t)),this._map.listens(\"contextmenu\")&&t.preventDefault()},jn.prototype.isEnabled=function(){return!0},jn.prototype.isActive=function(){return!1},jn.prototype.enable=function(){},jn.prototype.disable=function(){};var Un=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1};function Vn(t,e){for(var r={},n=0;nthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),n.length===this.numTouches&&(this.centroid=function(e){for(var r=new t.Point(0,0),n=0,i=e;n30)&&(this.aborted=!0)}}},Hn.prototype.touchend=function(t,e,r){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){var n=!this.aborted&&this.centroid;if(this.reset(),n)return n}};var qn=function(t){this.singleTap=new Hn(t),this.numTaps=t.numTaps,this.reset()};qn.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},qn.prototype.touchstart=function(t,e,r){this.singleTap.touchstart(t,e,r)},qn.prototype.touchmove=function(t,e,r){this.singleTap.touchmove(t,e,r)},qn.prototype.touchend=function(t,e,r){var n=this.singleTap.touchend(t,e,r);if(n){var i=t.timeStamp-this.lastTime<500,a=!this.lastTap||this.lastTap.dist(n)<30;if(i&&a||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}};var Gn=function(){this._zoomIn=new qn({numTouches:1,numTaps:2}),this._zoomOut=new qn({numTouches:2,numTaps:1}),this.reset()};Gn.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Gn.prototype.touchstart=function(t,e,r){this._zoomIn.touchstart(t,e,r),this._zoomOut.touchstart(t,e,r)},Gn.prototype.touchmove=function(t,e,r){this._zoomIn.touchmove(t,e,r),this._zoomOut.touchmove(t,e,r)},Gn.prototype.touchend=function(t,e,r){var n=this,i=this._zoomIn.touchend(t,e,r),a=this._zoomOut.touchend(t,e,r);return i?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(i)},{originalEvent:t})}}):a?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(a)},{originalEvent:t})}}):void 0},Gn.prototype.touchcancel=function(){this.reset()},Gn.prototype.enable=function(){this._enabled=!0},Gn.prototype.disable=function(){this._enabled=!1,this.reset()},Gn.prototype.isEnabled=function(){return this._enabled},Gn.prototype.isActive=function(){return this._active};var Yn=function(t){this.reset(),this._clickTolerance=t.clickTolerance||1};Yn.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Yn.prototype._correctButton=function(t,e){return!1},Yn.prototype._move=function(t,e){return{}},Yn.prototype.mousedown=function(t,e){if(!this._lastPoint){var n=r.mouseButton(t);this._correctButton(t,n)&&(this._lastPoint=e,this._eventButton=n)}},Yn.prototype.mousemoveWindow=function(t,e){var r=this._lastPoint;if(r&&(t.preventDefault(),this._moved||!(e.dist(r)0&&(this._active=!0);var i=Vn(n,r),a=new t.Point(0,0),o=new t.Point(0,0),s=0;for(var l in i){var c=i[l],u=this._touches[l];u&&(a._add(c),o._add(c.sub(u)),s++,i[l]=c)}if(this._touches=i,!(sMath.abs(t.x)}var ii=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.reset=function(){t.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},e.prototype._start=function(t){this._lastPoints=t,ni(t[0].sub(t[1]))&&(this._valid=!1)},e.prototype._move=function(t,e,r){var n=t[0].sub(this._lastPoints[0]),i=t[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid){this._lastPoints=t,this._active=!0;return{pitchDelta:-.5*((n.y+i.y)/2)}}},e.prototype.gestureBeginsVertically=function(t,e,r){if(void 0!==this._valid)return this._valid;var n=t.mag()>=2,i=e.mag()>=2;if(n||i){if(!n||!i)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;var a=t.y>0==e.y>0;return ni(t)&&ni(e)&&a}},e}(Kn),ai={panStep:100,bearingStep:15,pitchStep:10},oi=function(){var t=ai;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep};function si(t){return t*(2-t)}oi.prototype.reset=function(){this._active=!1},oi.prototype.keydown=function(t){var e=this;if(!(t.altKey||t.ctrlKey||t.metaKey)){var r=0,n=0,i=0,a=0,o=0;switch(t.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:t.shiftKey?n=-1:(t.preventDefault(),a=-1);break;case 39:t.shiftKey?n=1:(t.preventDefault(),a=1);break;case 38:t.shiftKey?i=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?i=-1:(t.preventDefault(),o=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:\"keyboardHandler\",easing:si,zoom:r?Math.round(l)+r*(t.shiftKey?2:1):l,bearing:s.getBearing()+n*e._bearingStep,pitch:s.getPitch()+i*e._pitchStep,offset:[-a*e._panStep,-o*e._panStep],center:s.getCenter()},{originalEvent:t})}}}},oi.prototype.enable=function(){this._enabled=!0},oi.prototype.disable=function(){this._enabled=!1,this.reset()},oi.prototype.isEnabled=function(){return this._enabled},oi.prototype.isActive=function(){return this._active};var li=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll([\"_onWheel\",\"_onTimeout\",\"_onScrollFrame\",\"_onScrollFinished\"],this)};li.prototype.setZoomRate=function(t){this._defaultZoomRate=t},li.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},li.prototype.isEnabled=function(){return!!this._enabled},li.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},li.prototype.isZooming=function(){return!!this._zooming},li.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&\"center\"===t.around)},li.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},li.prototype.wheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=t.browser.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._active||this._start(e)),e.preventDefault()}},li.prototype._onTimeout=function(t){this._type=\"wheel\",this._delta-=this._lastValue,this._active||this._start(t)},li.prototype._start=function(e){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var n=r.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},li.prototype.renderFrame=function(){return this._onScrollFrame()},li.prototype._onScrollFrame=function(){var e=this;if(this._frameId&&(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?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var a=\"number\"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(a*i))),\"wheel\"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o,s=\"number\"==typeof this._targetZoom?this._targetZoom:r.zoom,l=this._startZoom,c=this._easing,u=!1;if(\"wheel\"===this._type&&l&&c){var f=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=c(f);o=t.number(l,s,h),f<1?this._frameId||(this._frameId=!0):u=!0}else o=s,u=!0;return this._active=!0,u&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!u,zoomDelta:o-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},li.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var n=this._prevEase,i=(t.browser.now()-n.start)/n.duration,a=n.easing(i+.01)-n.easing(i),o=.27/Math.sqrt(a*a+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=t.bezier(o,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:r},r},li.prototype.reset=function(){this._active=!1};var ci=function(t,e){this._clickZoom=t,this._tapZoom=e};ci.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ci.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ci.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ci.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ui=function(){this.reset()};ui.prototype.reset=function(){this._active=!1},ui.prototype.dblclick=function(t,e){return t.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(t.shiftKey?-1:1),around:r.unproject(e)},{originalEvent:t})}}},ui.prototype.enable=function(){this._enabled=!0},ui.prototype.disable=function(){this._enabled=!1,this.reset()},ui.prototype.isEnabled=function(){return this._enabled},ui.prototype.isActive=function(){return this._active};var fi=function(){this._tap=new qn({numTouches:1,numTaps:1}),this.reset()};fi.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},fi.prototype.touchstart=function(t,e,r){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=e[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(t,e,r))},fi.prototype.touchmove=function(t,e,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;var n=e[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,t.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(t,e,r)},fi.prototype.touchend=function(t,e,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(t,e,r)&&(this._tapTime=t.timeStamp)},fi.prototype.touchcancel=function(){this.reset()},fi.prototype.enable=function(){this._enabled=!0},fi.prototype.disable=function(){this._enabled=!1,this.reset()},fi.prototype.isEnabled=function(){return this._enabled},fi.prototype.isActive=function(){return this._active};var hi=function(t,e,r){this._el=t,this._mousePan=e,this._touchPan=r};hi.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add(\"mapboxgl-touch-drag-pan\")},hi.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove(\"mapboxgl-touch-drag-pan\")},hi.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},hi.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var pi=function(t,e,r){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=r};pi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},pi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},pi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},pi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var di=function(t,e,r,n){this._el=t,this._touchZoom=e,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0};di.prototype.enable=function(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add(\"mapboxgl-touch-zoom-rotate\")},di.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove(\"mapboxgl-touch-zoom-rotate\")},di.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},di.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},di.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},di.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var gi=function(t){return t.zoom||t.drag||t.pitch||t.rotate},mi=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}(t.Event);function vi(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}var yi=function(e,n){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new On(e),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),t.bindAll([\"handleEvent\",\"handleWindowEvent\"],this);var i=this._el;this._listeners=[[i,\"touchstart\",{passive:!1}],[i,\"touchmove\",{passive:!1}],[i,\"touchend\",void 0],[i,\"touchcancel\",void 0],[i,\"mousedown\",void 0],[i,\"mousemove\",void 0],[i,\"mouseup\",void 0],[t.window.document,\"mousemove\",{capture:!0}],[t.window.document,\"mouseup\",void 0],[i,\"mouseover\",void 0],[i,\"mouseout\",void 0],[i,\"dblclick\",void 0],[i,\"click\",void 0],[i,\"keydown\",{capture:!1}],[i,\"keyup\",void 0],[i,\"wheel\",{passive:!1}],[i,\"contextmenu\",void 0],[t.window,\"blur\",void 0]];for(var a=0,o=this._listeners;aa?Math.min(2,_):Math.max(.5,_),w=Math.pow(m,1-e),T=i.unproject(x.add(b.mult(e*w)).mult(g));i.setLocationAtPoint(i.renderWorldCopies?T.wrap():T,d)}n._fireMoveEvents(r)}),(function(t){n._afterEase(r,t)}),e),this},r.prototype._prepareEase=function(e,r,n){void 0===n&&(n={}),this._moving=!0,r||n.moving||this.fire(new t.Event(\"movestart\",e)),this._zooming&&!n.zooming&&this.fire(new t.Event(\"zoomstart\",e)),this._rotating&&!n.rotating&&this.fire(new t.Event(\"rotatestart\",e)),this._pitching&&!n.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,r){if(!this._easeId||!r||this._easeId!==r){delete this._easeId;var n=this._zooming,i=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new t.Event(\"zoomend\",e)),i&&this.fire(new t.Event(\"rotateend\",e)),a&&this.fire(new t.Event(\"pitchend\",e)),this.fire(new t.Event(\"moveend\",e))}},r.prototype.flyTo=function(e,r){var n=this;if(!e.essential&&t.browser.prefersReducedMotion){var i=t.pick(e,[\"center\",\"zoom\",\"bearing\",\"pitch\",\"around\"]);return this.jumpTo(i,r)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var a=this.transform,o=this.getZoom(),s=this.getBearing(),l=this.getPitch(),c=this.getPadding(),u=\"zoom\"in e?t.clamp(+e.zoom,a.minZoom,a.maxZoom):o,f=\"bearing\"in e?this._normalizeBearing(e.bearing,s):s,h=\"pitch\"in e?+e.pitch:l,p=\"padding\"in e?e.padding:a.padding,d=a.zoomScale(u-o),g=t.Point.convert(e.offset),m=a.centerPoint.add(g),v=a.pointLocation(m),y=t.LngLat.convert(e.center||v);this._normalizeCenter(y);var x=a.project(v),b=a.project(y).sub(x),_=e.curve,w=Math.max(a.width,a.height),T=w/d,k=b.mag();if(\"minZoom\"in e){var A=t.clamp(Math.min(e.minZoom,o,u),a.minZoom,a.maxZoom),M=w/a.zoomScale(A-o);_=Math.sqrt(M/k*2)}var S=_*_;function E(t){var e=(T*T-w*w+(t?-1:1)*S*S*k*k)/(2*(t?T:w)*S*k);return Math.log(Math.sqrt(e*e+1)-e)}function L(t){return(Math.exp(t)-Math.exp(-t))/2}function C(t){return(Math.exp(t)+Math.exp(-t))/2}var P=E(0),I=function(t){return C(P)/C(P+_*t)},O=function(t){return w*((C(P)*(L(e=P+_*t)/C(e))-L(P))/S)/k;var e},z=(E(1)-P)/_;if(Math.abs(k)<1e-6||!isFinite(z)){if(Math.abs(w-T)<1e-6)return this.easeTo(e,r);var D=Te.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==f,this._pitching=h!==l,this._padding=!a.isPaddingEqual(p),this._prepareEase(r,!1),this._ease((function(e){var i=e*z,d=1/I(i);a.zoom=1===e?u:o+a.scaleZoom(d),n._rotating&&(a.bearing=t.number(s,f,e)),n._pitching&&(a.pitch=t.number(l,h,e)),n._padding&&(a.interpolatePadding(c,p,e),m=a.centerPoint.add(g));var v=1===e?y:a.unproject(x.add(b.mult(O(i))).mult(d));a.setLocationAtPoint(a.renderWorldCopies?v.wrap():v,m),n._fireMoveEvents(r)}),(function(){return n._afterEase(r)}),e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){return this._stop()},r.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,e)}if(!t){var n=this.handlers;n&&n.stop()}return this},r.prototype._ease=function(e,r,n){!1===n.animate||0===n.duration?(e(1),r()):(this._easeStart=t.browser.now(),this._easeOptions=n,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<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)180?-360:r<-180?360:0}},r}(t.Evented),bi=function(e){void 0===e&&(e={}),this.options=e,t.bindAll([\"_updateEditLink\",\"_updateData\",\"_updateCompact\"],this)};bi.prototype.getDefaultPosition=function(){return\"bottom-right\"},bi.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-attrib\"),this._innerContainer=r.create(\"div\",\"mapboxgl-ctrl-attrib-inner\",this._container),e&&this._container.classList.add(\"mapboxgl-compact\"),this._updateAttributions(),this._updateEditLink(),this._map.on(\"styledata\",this._updateData),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},bi.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"styledata\",this._updateData),this._map.off(\"sourcedata\",this._updateData),this._map.off(\"moveend\",this._updateEditLink),this._map.off(\"resize\",this._updateCompact),this._map=void 0,this._attribHTML=void 0},bi.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(\".mapbox-improve-map\"));var r=[{key:\"owner\",value:this.styleOwner},{key:\"id\",value:this.styleId},{key:\"access_token\",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){var n=r.reduce((function(t,e,n){return e.value&&(t+=e.key+\"=\"+e.value+(n=0)return!1;return!0}))).join(\" | \");o!==this._attribHTML&&(this._attribHTML=o,t.length?(this._innerContainer.innerHTML=o,this._container.classList.remove(\"mapboxgl-attrib-empty\")):this._container.classList.add(\"mapboxgl-attrib-empty\"),this._editLink=null)}},bi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add(\"mapboxgl-compact\"):this._container.classList.remove(\"mapboxgl-compact\")};var _i=function(){t.bindAll([\"_updateLogo\"],this),t.bindAll([\"_updateCompact\"],this)};_i.prototype.onAdd=function(t){this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl\");var e=r.create(\"a\",\"mapboxgl-ctrl-logo\");return e.target=\"_blank\",e.rel=\"noopener nofollow\",e.href=\"https://www.mapbox.com/\",e.setAttribute(\"aria-label\",this._map._getUIString(\"LogoControl.Title\")),e.setAttribute(\"rel\",\"noopener nofollow\"),this._container.appendChild(e),this._container.style.display=\"none\",this._map.on(\"sourcedata\",this._updateLogo),this._updateLogo(),this._map.on(\"resize\",this._updateCompact),this._updateCompact(),this._container},_i.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"sourcedata\",this._updateLogo),this._map.off(\"resize\",this._updateCompact)},_i.prototype.getDefaultPosition=function(){return\"bottom-left\"},_i.prototype._updateLogo=function(t){t&&\"metadata\"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?\"block\":\"none\")},_i.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}},_i.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add(\"mapboxgl-compact\"):e.classList.remove(\"mapboxgl-compact\")}};var wi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};wi.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},wi.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,n=e?this._queue.concat(e):this._queue;re.maxZoom)throw new Error(\"maxZoom must be greater than or equal to minZoom\");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error(\"maxPitch must be greater than or equal to minPitch\");if(null!=e.minPitch&&e.minPitch<0)throw new Error(\"minPitch must be greater than or equal to 0\");if(null!=e.maxPitch&&e.maxPitch>60)throw new Error(\"maxPitch must be less than or equal to 60\");var i=new An(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(n.call(this,i,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new wi,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},Ti,e.locale),this._requestManager=new t.RequestManager(e.transformRequest,e.accessToken),\"string\"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error(\"Container '\"+e.container+\"' not found.\")}else{if(!(e.container instanceof Ai))throw new Error(\"Invalid type: 'container' must be a String or HTMLElement.\");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll([\"_onWindowOnline\",\"_onWindowResize\",\"_contextLost\",\"_contextRestored\"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error(\"Failed to initialize WebGL.\");this.on(\"move\",(function(){return r._update(!1)})),this.on(\"moveend\",(function(){return r._update(!1)})),this.on(\"zoom\",(function(){return r._update(!0)})),void 0!==t.window&&(t.window.addEventListener(\"online\",this._onWindowOnline,!1),t.window.addEventListener(\"resize\",this._onWindowResize,!1)),this.handlers=new yi(this,e);var a=\"string\"==typeof e.hash&&e.hash||void 0;this._hash=e.hash&&new Sn(a).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new bi({customAttribution:e.customAttribution})),this.addControl(new _i,e.logoPosition),this.on(\"style.load\",(function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)})),this.on(\"data\",(function(e){r._update(\"style\"===e.dataType),r.fire(new t.Event(e.dataType+\"data\",e))})),this.on(\"dataloading\",(function(e){r.fire(new t.Event(e.dataType+\"dataloading\",e))}))}n&&(i.__proto__=n),i.prototype=Object.create(n&&n.prototype),i.prototype.constructor=i;var a={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(e,r){if(void 0===r&&e.getDefaultPosition&&(r=e.getDefaultPosition()),void 0===r&&(r=\"top-right\"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error(\"Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.\")));var n=e.onAdd(this);this._controls.push(e);var i=this._controlPositions[r];return-1!==r.indexOf(\"bottom\")?i.insertBefore(n,i.firstChild):i.appendChild(n),this},i.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error(\"Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.\")));var r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this},i.prototype.resize=function(e){var r=this._containerDimensions(),n=r[0],i=r[1];this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i);var a=!this._moving;return a&&(this.stop(),this.fire(new t.Event(\"movestart\",e)).fire(new t.Event(\"move\",e))),this.fire(new t.Event(\"resize\",e)),a&&this.fire(new t.Event(\"moveend\",e)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},i.prototype.setMinZoom=function(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=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\")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(t){if((t=null==t?0:t)<0)throw new Error(\"minPitch must be greater than or equal to 0\");if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()60)throw new Error(\"maxPitch must be less than or equal to 60\");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error(\"maxPitch must be greater than the current minPitch\")},i.prototype.getMaxPitch=function(){return this.transform.maxPitch},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},i.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},i.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},i.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},i.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},i.prototype._createDelegatedListener=function(t,e,r){var n,i=this;if(\"mouseenter\"===t||\"mouseover\"===t){var a=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){var o=i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[];o.length?a||(a=!0,r.call(i,new Rn(t,i,n.originalEvent,{features:o}))):a=!1},mouseout:function(){a=!1}}}}if(\"mouseleave\"===t||\"mouseout\"===t){var o=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){(i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[]).length?o=!0:o&&(o=!1,r.call(i,new Rn(t,i,n.originalEvent)))},mouseout:function(e){o&&(o=!1,r.call(i,new Rn(t,i,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(n={},n[t]=function(t){var n=i.getLayer(e)?i.queryRenderedFeatures(t.point,{layers:[e]}):[];n.length&&(t.features=n,r.call(i,t),delete t.features)},n)}},i.prototype.on=function(t,e,r){if(void 0===r)return n.prototype.on.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(i),i.delegates)this.on(a,i.delegates[a]);return this},i.prototype.once=function(t,e,r){if(void 0===r)return n.prototype.once.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in i.delegates)this.once(a,i.delegates[a]);return this},i.prototype.off=function(t,e,r){var i=this;if(void 0===r)return n.prototype.off.call(this,t,e);return this._delegatedListeners&&this._delegatedListeners[t]&&function(n){for(var a=n[t],o=0;o180;){var s=n.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;e.lng>n.center.lng?e.lng-=360:e.lng+=360}return e}Ii.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),r.disableDrag()},Ii.prototype.move=function(t,e){var r=this.map,n=this.mouseRotate.mousemoveWindow(t,e);if(n&&n.bearingDelta&&r.setBearing(r.getBearing()+n.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(t,e);i&&i.pitchDelta&&r.setPitch(r.getPitch()+i.pitchDelta)}},Ii.prototype.off=function(){var t=this.element;r.removeEventListener(t,\"mousedown\",this.mousedown),r.removeEventListener(t,\"touchstart\",this.touchstart,{passive:!1}),r.removeEventListener(t,\"touchmove\",this.touchmove),r.removeEventListener(t,\"touchend\",this.touchend),r.removeEventListener(t,\"touchcancel\",this.reset),this.offTemp()},Ii.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(t.window,\"mousemove\",this.mousemove),r.removeEventListener(t.window,\"mouseup\",this.mouseup)},Ii.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),r.mousePos(this.element,e)),r.addEventListener(t.window,\"mousemove\",this.mousemove),r.addEventListener(t.window,\"mouseup\",this.mouseup)},Ii.prototype.mousemove=function(t){this.move(t,r.mousePos(this.element,t))},Ii.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},Ii.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.down({type:\"mousedown\",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},Ii.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},Ii.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)e.getEast()||r.latitudee.getNorth())},n.prototype._setErrorState=function(){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\")}},n.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event(\"outofmaxbounds\",e)),this._updateMarker(),void this._finish();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()}},n.prototype._updateCamera=function(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude),n=e.coords.accuracy,i=this._map.getBearing(),a=t.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),a,{geolocateSource:!0})},n.prototype._updateMarker=function(e){if(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},n.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),r=this._map.unproject([1,t]),n=e.distanceTo(r),i=Math.ceil(2*this._accuracy/n);this._circleElement.style.width=i+\"px\",this._circleElement.style.height=i+\"px\"},n.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},n.prototype._onError=function(e){if(this._map){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\"),this._geolocateButton.disabled=!0;var r=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.title=r,this._geolocateButton.setAttribute(\"aria-label\",r),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&ji)return;this._setErrorState()}\"OFF\"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add(\"mapboxgl-user-location-dot-stale\"),this.fire(new t.Event(\"error\",e)),this._finish()}},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(e){var n=this;if(this._container.addEventListener(\"contextmenu\",(function(t){return t.preventDefault()})),this._geolocateButton=r.create(\"button\",\"mapboxgl-ctrl-geolocate\",this._container),r.create(\"span\",\"mapboxgl-ctrl-icon\",this._geolocateButton).setAttribute(\"aria-hidden\",!0),this._geolocateButton.type=\"button\",!1===e){t.warnOnce(\"Geolocation support is not available so the GeolocateControl will be disabled.\");var i=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute(\"aria-label\",i)}else{var a=this._map._getUIString(\"GeolocateControl.FindMyLocation\");this._geolocateButton.title=a,this._geolocateButton.setAttribute(\"aria-label\",a)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute(\"aria-pressed\",\"false\"),this._watchState=\"OFF\"),this.options.showUserLocation&&(this._dotElement=r.create(\"div\",\"mapboxgl-user-location-dot\"),this._userLocationDotMarker=new Fi(this._dotElement),this._circleElement=r.create(\"div\",\"mapboxgl-user-location-accuracy-circle\"),this._accuracyCircleMarker=new Fi({element:this._circleElement,pitchAlignment:\"map\"}),this.options.trackUserLocation&&(this._watchState=\"OFF\"),this._map.on(\"zoom\",this._onZoom)),this._geolocateButton.addEventListener(\"click\",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on(\"movestart\",(function(e){var r=e.originalEvent&&\"resize\"===e.originalEvent.type;e.geolocateSource||\"ACTIVE_LOCK\"!==n._watchState||r||(n._watchState=\"BACKGROUND\",n._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background\"),n._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),n.fire(new t.Event(\"trackuserlocationend\")))}))},n.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\":Ni--,ji=!1,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\")}if(\"OFF\"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.setAttribute(\"aria-pressed\",\"true\"),++Ni>1?(e={maximumAge:6e5,timeout:0},ji=!0):(e=this.options.positionOptions,ji=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},n.prototype._clearWatch=function(){t.window.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)},n}(t.Evented),Vi={maxWidth:100,unit:\"metric\"},Hi=function(e){this.options=t.extend({},Vi,e),t.bindAll([\"_onMove\",\"setUnit\"],this)};function qi(t,e,r){var n=r&&r.maxWidth||100,i=t._container.clientHeight/2,a=t.unproject([0,i]),o=t.unproject([n,i]),s=a.distanceTo(o);if(r&&\"imperial\"===r.unit){var l=3.2808*s;if(l>5280)Gi(e,n,l/5280,t._getUIString(\"ScaleControl.Miles\"));else Gi(e,n,l,t._getUIString(\"ScaleControl.Feet\"))}else if(r&&\"nautical\"===r.unit){Gi(e,n,s/1852,t._getUIString(\"ScaleControl.NauticalMiles\"))}else s>=1e3?Gi(e,n,s/1e3,t._getUIString(\"ScaleControl.Kilometers\")):Gi(e,n,s,t._getUIString(\"ScaleControl.Meters\"))}function Gi(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:o>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(o),a*o),l=s/r;t.style.width=e*l+\"px\",t.innerHTML=s+\" \"+n}Hi.prototype.getDefaultPosition=function(){return\"bottom-left\"},Hi.prototype._onMove=function(){qi(this._map,this._container,this.options)},Hi.prototype.onAdd=function(t){return this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-scale\",t.getContainer()),this._map.on(\"move\",this._onMove),this._onMove(),this._container},Hi.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"move\",this._onMove),this._map=void 0},Hi.prototype.setUnit=function(t){this.options.unit=t,qi(this._map,this._container,this.options)};var Yi=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce(\"Full screen control 'container' must be a DOM element.\")),t.bindAll([\"_onClickFullscreen\",\"_changeIcon\"],this),\"onfullscreenchange\"in t.window.document?this._fullscreenchange=\"fullscreenchange\":\"onmozfullscreenchange\"in t.window.document?this._fullscreenchange=\"mozfullscreenchange\":\"onwebkitfullscreenchange\"in t.window.document?this._fullscreenchange=\"webkitfullscreenchange\":\"onmsfullscreenchange\"in t.window.document&&(this._fullscreenchange=\"MSFullscreenChange\")};Yi.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-group\"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display=\"none\",t.warnOnce(\"This device does not support fullscreen mode.\")),this._controlContainer},Yi.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Yi.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Yi.prototype._setupUI=function(){var e=this._fullscreenButton=r.create(\"button\",\"mapboxgl-ctrl-fullscreen\",this._controlContainer);r.create(\"span\",\"mapboxgl-ctrl-icon\",e).setAttribute(\"aria-hidden\",!0),e.type=\"button\",this._updateTitle(),this._fullscreenButton.addEventListener(\"click\",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Yi.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute(\"aria-label\",t),this._fullscreenButton.title=t},Yi.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?\"FullscreenControl.Exit\":\"FullscreenControl.Enter\")},Yi.prototype._isFullscreen=function(){return this._fullscreen},Yi.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(\"mapboxgl-ctrl-shrink\"),this._fullscreenButton.classList.toggle(\"mapboxgl-ctrl-fullscreen\"),this._updateTitle())},Yi.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Wi={closeButton:!0,closeOnClick:!0,className:\"\",maxWidth:\"240px\"},Xi=function(e){function n(r){e.call(this),this.options=t.extend(Object.create(Wi),r),t.bindAll([\"_update\",\"_onClose\",\"remove\",\"_onMouseMove\",\"_onMouseUp\",\"_onDrag\"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on(\"click\",this._onClose),this.options.closeOnMove&&this._map.on(\"move\",this._onClose),this._map.on(\"remove\",this.remove),this._update(),this._trackPointer?(this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"mouseup\",this._onMouseUp),this._container&&this._container.classList.add(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"mapboxgl-track-pointer\")):this._map.on(\"move\",this._update),this.fire(new t.Event(\"open\")),this},n.prototype.isOpen=function(){return!!this._map},n.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off(\"move\",this._update),this._map.off(\"move\",this._onClose),this._map.off(\"click\",this._onClose),this._map.off(\"remove\",this.remove),this._map.off(\"mousemove\",this._onMouseMove),this._map.off(\"mouseup\",this._onMouseUp),this._map.off(\"drag\",this._onDrag),delete this._map),this.fire(new t.Event(\"close\")),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on(\"move\",this._update),this._map.off(\"mousemove\",this._onMouseMove),this._container&&this._container.classList.remove(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.remove(\"mapboxgl-track-pointer\")),this},n.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off(\"move\",this._update),this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"drag\",this._onDrag),this._container&&this._container.classList.add(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"mapboxgl-track-pointer\")),this},n.prototype.getElement=function(){return this._container},n.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},n.prototype.setHTML=function(e){var r,n=t.window.document.createDocumentFragment(),i=t.window.document.createElement(\"body\");for(i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},n.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},n.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},n.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},n.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},n.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},n.prototype._createContent=function(){this._content&&r.remove(this._content),this._content=r.create(\"div\",\"mapboxgl-popup-content\",this._container),this.options.closeButton&&(this._closeButton=r.create(\"button\",\"mapboxgl-popup-close-button\",this._content),this._closeButton.type=\"button\",this._closeButton.setAttribute(\"aria-label\",\"Close popup\"),this._closeButton.innerHTML=\"×\",this._closeButton.addEventListener(\"click\",this._onClose))},n.prototype._onMouseUp=function(t){this._update(t.point)},n.prototype._onMouseMove=function(t){this._update(t.point)},n.prototype._onDrag=function(t){this._update(t.point)},n.prototype._update=function(e){var n=this,i=this._lngLat||this._trackPointer;if(this._map&&i&&this._content&&(this._container||(this._container=r.create(\"div\",\"mapboxgl-popup\",this._map.getContainer()),this._tip=r.create(\"div\",\"mapboxgl-popup-tip\",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(\" \").forEach((function(t){return n._container.classList.add(t)})),this._trackPointer&&this._container.classList.add(\"mapboxgl-popup-track-pointer\")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Oi(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var a=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),o=this.options.anchor,s=function e(r){if(r){if(\"number\"==typeof r){var n=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new t.Point(0,0),top:new t.Point(0,r),\"top-left\":new t.Point(n,n),\"top-right\":new t.Point(-n,n),bottom:new t.Point(0,-r),\"bottom-left\":new t.Point(n,-n),\"bottom-right\":new t.Point(-n,-n),left:new t.Point(r,0),right:new t.Point(-r,0)}}if(r instanceof t.Point||Array.isArray(r)){var i=t.Point.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.Point.convert(r.center||[0,0]),top:t.Point.convert(r.top||[0,0]),\"top-left\":t.Point.convert(r[\"top-left\"]||[0,0]),\"top-right\":t.Point.convert(r[\"top-right\"]||[0,0]),bottom:t.Point.convert(r.bottom||[0,0]),\"bottom-left\":t.Point.convert(r[\"bottom-left\"]||[0,0]),\"bottom-right\":t.Point.convert(r[\"bottom-right\"]||[0,0]),left:t.Point.convert(r.left||[0,0]),right:t.Point.convert(r.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!o){var l,c=this._container.offsetWidth,u=this._container.offsetHeight;l=a.y+s.bottom.ythis._map.transform.height-u?[\"bottom\"]:[],a.xthis._map.transform.width-c/2&&l.push(\"right\"),o=0===l.length?\"bottom\":l.join(\"-\")}var f=a.add(s[o]).round();r.setTransform(this._container,zi[o]+\" translate(\"+f.x+\"px,\"+f.y+\"px)\"),Di(this._container,o,\"popup\")}},n.prototype._onClose=function(){this.remove()},n}(t.Evented);var Zi={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Ei,NavigationControl:Pi,GeolocateControl:Ui,AttributionControl:bi,ScaleControl:Hi,FullscreenControl:Yi,Popup:Xi,Marker:Fi,Style:qe,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:function(){Bt().acquire(zt)},clearPrewarmedResources:function(){var t=Rt;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(zt),Rt=null):console.warn(\"Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()\"))},get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return Dt.workerCount},set workerCount(t){Dt.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){t.clearTileCache(e)},workerUrl:\"\"};return Zi})),r}))},{}],240:[function(t,e,r){\"use strict\";e.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},{}],241:[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 m(){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)))}m();var v={element:t};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(e){e?m():function(){if(!s)return;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}}),v};var n=t(\"mouse-event\")},{\"mouse-event\":243}],242:[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}},{}],243:[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<=0)return 1<2147483647)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"');var e=new Uint8Array(t);return e.__proto__=a.prototype,e}function a(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 l(t)}return o(t,e,r)}function o(t,e,r){if(\"string\"==typeof t)return function(t,e){\"string\"==typeof e&&\"\"!==e||(e=\"utf8\");if(!a.isEncoding(e))throw new TypeError(\"Unknown encoding: \"+e);var r=0|f(t,e),n=i(r),o=n.write(t,e);o!==r&&(n=n.slice(0,o));return n}(t,e);if(ArrayBuffer.isView(t))return c(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(B(t,ArrayBuffer)||t&&B(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength=2147483647)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+2147483647..toString(16)+\" bytes\");return 0|t}function f(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||B(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 D(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return R(t).length;default:if(i)return n?-1:D(t).length;e=(\"\"+e).toLowerCase(),i=!0}}function h(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 M(this,e,r);case\"utf8\":case\"utf-8\":return T(this,e,r);case\"ascii\":return k(this,e,r);case\"latin1\":case\"binary\":return A(this,e,r);case\"base64\":return w(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return S(this,e,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),n=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(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),N(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=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:g(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):g(t,[e],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function g(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;as&&(r=s-l),a=r;a>=0;a--){for(var f=!0,h=0;hi&&(n=i):n=i;var a=e.length;n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function w(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?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<=4096)return String.fromCharCode.apply(String,t);var r=\"\",n=0;for(;ne&&(t+=\" ... \"),\"\"},a.prototype.compare=function(t,e,r,n,i){if(B(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.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 o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),l=Math.min(o,s),c=this.slice(n,i),u=t.slice(e,r),f=0;f>>=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 v(this,t,e,r);case\"ascii\":return y(this,t,e,r);case\"latin1\":case\"binary\":return x(this,t,e,r);case\"base64\":return b(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return _(this,t,e,r);default:if(a)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};function k(t,e,r){var n=\"\";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i=\"\",a=e;ar)throw new RangeError(\"Trying to access beyond buffer length\")}function L(t,e,r,n,i,o){if(!a.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError(\"Index out of range\")}function C(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 P(t,e,r,i,a){return e=+e,r>>>=0,a||C(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function I(t,e,r,i,a){return e=+e,r>>>=0,a||C(t,0,r,8),n.write(t,e,r,i,52,8),r+8}a.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>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||E(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},a.prototype.readInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,n)||L(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},a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(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},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return I(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return I(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.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=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=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},a.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&&!a.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>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),\"number\"==typeof t)for(o=e;o55295&&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 R(t){return e.toByteArray(function(t){if((t=(t=t.split(\"=\")[0]).trim().replace(O,\"\")).length<2)return\"\";for(;t.length%4!=0;)t+=\"=\";return t}(t))}function F(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function B(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function N(t){return t!=t}}).call(this)}).call(this,t(\"buffer\").Buffer)},{\"base64-js\":79,buffer:85,ieee754:230}],86:[function(t,e,r){e.exports=function(t,e,r){return er?r:t:te?e:t}},{}],87:[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:86}],88:[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]}},{}],89:[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:86,\"color-rgba\":91,dtype:127}],90:[function(t,e,r){(function(r){(function(){\"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=(p=t.slice(1)).length;c=1,u<=4?(l=[parseInt(p[0]+p[0],16),parseInt(p[1]+p[1],16),parseInt(p[2]+p[2],16)],4===u&&(c=parseInt(p[3]+p[3],16)/255)):(l=[parseInt(p[0]+p[1],16),parseInt(p[2]+p[3],16),parseInt(p[4]+p[5],16)],8===u&&(c=parseInt(p[6]+p[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 f=e[1],h=\"rgb\"===f,p=f.replace(/a$/,\"\");s=p;u=\"cmyk\"===p?4:\"gray\"===p?1:3;l=e[2].trim().split(/\\s*,\\s*/).map((function(t,e){if(/%$/.test(t))return e===u?parseFloat(t)/100:\"rgb\"===p?255*parseFloat(t)/100:parseFloat(t);if(\"h\"===p[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)})),f===p&&l.push(1),c=h||void 0===l[u]?1:l[u],l=l.slice(0,u)}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)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"color-name\":88,defined:124,\"is-plain-obj\":236}],91:[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:86,\"color-parse\":90,\"color-space/hsl\":92}],92:[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\":93}],93:[function(t,e,r){\"use strict\";e.exports={name:\"rgb\",min:[0,0,0],max:[255,255,255],channel:[\"red\",\"green\",\"blue\"],alias:[\"RGB\"]}},{}],94:[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\",CALF:\"\\\\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\",NAME:\"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\",SOME:\"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.?name|^(?=.*socialist).*viet.?name\",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\"}},{}],95:[function(t,e,r){e.exports=[\"xx-small\",\"x-small\",\"small\",\"medium\",\"large\",\"x-large\",\"xx-large\",\"larger\",\"smaller\"]},{}],96:[function(t,e,r){e.exports=[\"normal\",\"condensed\",\"semi-condensed\",\"extra-condensed\",\"ultra-condensed\",\"expanded\",\"semi-expanded\",\"extra-expanded\",\"ultra-expanded\"]},{}],97:[function(t,e,r){e.exports=[\"normal\",\"italic\",\"oblique\"]},{}],98:[function(t,e,r){e.exports=[\"normal\",\"bold\",\"bolder\",\"lighter\",\"100\",\"200\",\"300\",\"400\",\"500\",\"600\",\"700\",\"800\",\"900\"]},{}],99:[function(t,e,r){\"use strict\";e.exports={parse:t(\"./parse\"),stringify:t(\"./stringify\")}},{\"./parse\":101,\"./stringify\":102}],100:[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\":95}],101:[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\":100,\"css-font-stretch-keywords\":96,\"css-font-style-keywords\":97,\"css-font-weight-keywords\":98,\"css-global-keywords\":103,\"css-system-font-keywords\":104,\"string-split-by\":305,unquote:328}],102:[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;re?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>>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>>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(;++o1)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=r)for(n=i=r;++or&&(n=r),i=r)for(n=i=r;++or&&(n=r),i=0?(a>=v?10:a>=y?5:a>=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=v?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>=v?i*=10:a>=y?i*=5:a>=x&&(i*=2),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 k(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a=r)for(n=r;++ar&&(n=r)}else for(;++a=r)for(n=r;++ar&&(n=r);return n}function A(t){if(!(i=t.length))return[];for(var e=-1,r=k(t,M),n=new Array(r);++et?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;af;)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=r)for(n=r;++an&&(n=r)}else for(;++a=r)for(n=r;++an&&(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=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r},t.min=k,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);r0)return[t];if((n=e0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s=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(),m=a();++hl.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})}))},{}],109:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(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,8})$/,l=new RegExp(\"^rgb\\\\(\"+[i,i,i]+\"\\\\)$\"),c=new RegExp(\"^rgb\\\\(\"+[o,o,o]+\"\\\\)$\"),u=new RegExp(\"^rgba\\\\(\"+[i,i,i,a]+\"\\\\)$\"),f=new RegExp(\"^rgba\\\\(\"+[o,o,o,a]+\"\\\\)$\"),h=new RegExp(\"^hsl\\\\(\"+[a,o,o]+\"\\\\)$\"),p=new RegExp(\"^hsla\\\\(\"+[a,o,o,a]+\"\\\\)$\"),d={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 g(){return this.rgb().formatHex()}function m(){return this.rgb().formatRgb()}function v(t){var e,r;return t=(t+\"\").trim().toLowerCase(),(e=s.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?y(e):3===r?new w(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?x(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?x(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=l.exec(t))?new w(e[1],e[2],e[3],1):(e=c.exec(t))?new w(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=u.exec(t))?x(e[1],e[2],e[3],e[4]):(e=f.exec(t))?x(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=h.exec(t))?M(e[1],e[2]/100,e[3]/100,1):(e=p.exec(t))?M(e[1],e[2]/100,e[3]/100,e[4]):d.hasOwnProperty(t)?y(d[t]):\"transparent\"===t?new w(NaN,NaN,NaN,0):null}function y(t){return new w(t>>16&255,t>>8&255,255&t,1)}function x(t,e,r,n){return n<=0&&(t=e=r=NaN),new w(t,e,r,n)}function b(t){return t instanceof n||(t=v(t)),t?new w((t=t.rgb()).r,t.g,t.b,t.opacity):new w}function _(t,e,r,n){return 1===arguments.length?b(t):new w(t,e,r,null==n?1:n)}function w(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function T(){return\"#\"+A(this.r)+A(this.g)+A(this.b)}function k(){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+\")\")}function A(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?\"0\":\"\")+t.toString(16)}function M(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new L(t,e,r,n)}function S(t){if(t instanceof L)return new L(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=v(t)),!t)return new L;if(t instanceof L)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*(r0&&c<1?0:s,new L(s,l,c,t.opacity)}function E(t,e,r,n){return 1===arguments.length?S(t):new L(t,e,r,null==n?1:n)}function L(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function C(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,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:g,formatHex:g,formatHsl:function(){return S(this).formatHsl()},formatRgb:m,toString:m}),e(w,_,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new w(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new w(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:T,formatHex:T,formatRgb:k,toString:k})),e(L,E,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new L(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new L(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 w(C(t>=240?t-240:t+120,i,n),C(t,i,n),C(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},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?\"hsl(\":\"hsla(\")+(this.h||0)+\", \"+100*(this.s||0)+\"%, \"+100*(this.l||0)+\"%\"+(1===t?\")\":\", \"+t+\")\")}}));var P=Math.PI/180,I=180/Math.PI,O=6/29,z=3*O*O;function D(t){if(t instanceof F)return new F(t.l,t.a,t.b,t.opacity);if(t instanceof q)return G(t);t instanceof w||(t=b(t));var e,r,n=U(t.r),i=U(t.g),a=U(t.b),o=B((.2225045*n+.7168786*i+.0606169*a)/1);return n===i&&i===a?e=r=o:(e=B((.4360747*n+.3850649*i+.1430804*a)/.96422),r=B((.0139322*n+.0971045*i+.7141733*a)/.82521)),new F(116*o-16,500*(e-o),200*(o-r),t.opacity)}function R(t,e,r,n){return 1===arguments.length?D(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 B(t){return t>.008856451679035631?Math.pow(t,1/3):t/z+4/29}function N(t){return t>O?t*t*t:z*(t-4/29)}function j(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 V(t){if(t instanceof q)return new q(t.h,t.c,t.l,t.opacity);if(t instanceof F||(t=D(t)),0===t.a&&0===t.b)return new q(NaN,0=0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);return{type:t,name:r}}))}function a(t,e){for(var r,n=0,i=t.length;n0)for(var r,n,i=new Array(r),a=0;ah+c||np+c||au.index){var f=h-s.x-s.vx,m=p-s.y-s.vy,v=f*f+m*m;vt.r&&(t.r=t[e].r)}function h(){if(r){var e,i,a=r.length;for(n=new Array(a),e=0;e=c)){(t.data!==r||t.next)&&(0===f&&(d+=(f=o())*f),0===h&&(d+=(h=o())*h),d1?(null==r?u.remove(t):u.set(t,v(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;c1?(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;a1?n[0]+n.slice(2):n,+t.slice(r+1)]}function r(t){return(t=e(Math.abs(t)))?t[1]:NaN}var n,i=/^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;function a(t){if(!(e=i.exec(t)))throw new Error(\"invalid format: \"+t);var e;return new o({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function o(t){this.fill=void 0===t.fill?\" \":t.fill+\"\",this.align=void 0===t.align?\">\":t.align+\"\",this.sign=void 0===t.sign?\"-\":t.sign+\"\",this.symbol=void 0===t.symbol?\"\":t.symbol+\"\",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?\"\":t.type+\"\"}function s(t,r){var n=e(t,r);if(!n)return t+\"\";var i=n[0],a=n[1];return a<0?\"0.\"+new Array(-a).join(\"0\")+i:i.length>a+1?i.slice(0,a+1)+\".\"+i.slice(a+1):i+new Array(a-i.length+2).join(\"0\")}a.prototype=o.prototype,o.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\"0\":\"\")+(void 0===this.width?\"\":Math.max(1,0|this.width))+(this.comma?\",\":\"\")+(void 0===this.precision?\"\":\".\"+Math.max(0,0|this.precision))+(this.trim?\"~\":\"\")+this.type};var l={\"%\":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+\"\"},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString(\"en\").replace(/,/g,\"\"):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return s(100*t,e)},r:s,s:function(t,r){var i=e(t,r);if(!i)return t+\"\";var a=i[0],o=i[1],s=o-(n=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+new Array(s-l+1).join(\"0\"):s>0?a.slice(0,s)+\".\"+a.slice(s):\"0.\"+new Array(1-s).join(\"0\")+e(t,Math.max(0,r+s-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function c(t){return t}var u,f=Array.prototype.map,h=[\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\\xb5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];function p(t){var e,i,o=void 0===t.grouping||void 0===t.thousands?c:(e=f.call(t.grouping,Number),i=t.thousands+\"\",function(t,r){for(var n=t.length,a=[],o=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(t.substring(n-=s,n+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(i)}),s=void 0===t.currency?\"\":t.currency[0]+\"\",u=void 0===t.currency?\"\":t.currency[1]+\"\",p=void 0===t.decimal?\".\":t.decimal+\"\",d=void 0===t.numerals?c:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(f.call(t.numerals,String)),g=void 0===t.percent?\"%\":t.percent+\"\",m=void 0===t.minus?\"-\":t.minus+\"\",v=void 0===t.nan?\"NaN\":t.nan+\"\";function y(t){var e=(t=a(t)).fill,r=t.align,i=t.sign,c=t.symbol,f=t.zero,y=t.width,x=t.comma,b=t.precision,_=t.trim,w=t.type;\"n\"===w?(x=!0,w=\"g\"):l[w]||(void 0===b&&(b=12),_=!0,w=\"g\"),(f||\"0\"===e&&\"=\"===r)&&(f=!0,e=\"0\",r=\"=\");var T=\"$\"===c?s:\"#\"===c&&/[boxX]/.test(w)?\"0\"+w.toLowerCase():\"\",k=\"$\"===c?u:/[%p]/.test(w)?g:\"\",A=l[w],M=/[defgprs%]/.test(w);function S(t){var a,s,l,c=T,u=k;if(\"c\"===w)u=A(t)+u,t=\"\";else{var g=(t=+t)<0||1/t<0;if(t=isNaN(t)?v:A(Math.abs(t),b),_&&(t=function(t){t:for(var e,r=t.length,n=1,i=-1;n0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),g&&0==+t&&\"+\"!==i&&(g=!1),c=(g?\"(\"===i?i:m:\"-\"===i||\"(\"===i?\"\":i)+c,u=(\"s\"===w?h[8+n/3]:\"\")+u+(g&&\"(\"===i?\")\":\"\"),M)for(a=-1,s=t.length;++a(l=t.charCodeAt(a))||l>57){u=(46===l?p+t.slice(a+1):t.slice(a))+u,t=t.slice(0,a);break}}x&&!f&&(t=o(t,1/0));var S=c.length+t.length+u.length,E=S>1)+c+t+u+E.slice(S);break;default:t=E+c+t+u}return d(t)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return t+\"\"},S}return{format:y,formatPrefix:function(t,e){var n=y(((t=a(t)).type=\"f\",t)),i=3*Math.max(-8,Math.min(8,Math.floor(r(e)/3))),o=Math.pow(10,-i),s=h[8+i/3];return function(t){return n(o*t)+s}}}}function d(e){return u=p(e),t.format=u.format,t.formatPrefix=u.formatPrefix,u}d({decimal:\".\",thousands:\",\",grouping:[3],currency:[\"$\",\"\"],minus:\"-\"}),t.FormatSpecifier=o,t.formatDefaultLocale=d,t.formatLocale=p,t.formatSpecifier=a,t.precisionFixed=function(t){return Math.max(0,-r(Math.abs(t)))},t.precisionPrefix=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(r(e)/3)))-r(Math.abs(t)))},t.precisionRound=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,r(e)-r(t))+1},Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],113:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-geo\"),t(\"d3-array\")):i(n.d3=n.d3||{},n.d3,n.d3)}(this,(function(t,e,r){\"use strict\";var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,c=Math.log,u=Math.max,f=Math.min,h=Math.pow,p=Math.round,d=Math.sign||function(t){return t>0?1:t<0?-1:0},g=Math.sin,m=Math.tan,v=1e-6,y=Math.PI,x=y/2,b=y/4,_=Math.SQRT1_2,w=L(2),T=L(y),k=2*y,A=180/y,M=y/180;function S(t){return t>1?x:t<-1?-x:Math.asin(t)}function E(t){return t>1?0:t<-1?y:Math.acos(t)}function L(t){return t>0?Math.sqrt(t):0}function C(t){return(s(t)-s(-t))/2}function P(t){return(s(t)+s(-t))/2}function I(t){var e=m(t/2),r=2*c(o(t/2))/(e*e);function i(t,e){var n=o(t),i=o(e),a=g(e),s=i*n,l=-((1-s?c((1+s)/2)/(1-s):-.5)+r/(1+s));return[l*i*g(t),l*a]}return i.invert=function(e,i){var s,l=L(e*e+i*i),u=-t/2,f=50;if(!l)return[0,0];do{var h=u/2,p=o(h),d=g(h),m=d/p,y=-c(n(p));u-=s=(2/m*y-r*m-l)/(-y/(d*d)+1-r/(2*p*p))*(p<0?.7:1)}while(n(s)>v&&--f>0);var x=g(u);return[a(e*x,l*o(u)),S(i*x/l)]},i}function O(t,e){var r=o(e),n=function(t){return t?t/Math.sin(t):1}(E(r*o(t/=2)));return[2*r*g(t)*n,g(e)*n]}function z(t){var e=g(t),r=o(t),i=t>=0?1:-1,s=m(i*t),l=(1+e-r)/2;function c(t,n){var c=o(n),u=o(t/=2);return[(1+c)*g(t),(i*n>-a(u,s)-.001?0:10*-i)+l+g(n)*r-(1+c)*e*u]}return c.invert=function(t,c){var u=0,f=0,h=50;do{var p=o(u),d=g(u),m=o(f),y=g(f),x=1+m,b=x*d-t,_=l+y*r-x*e*p-c,w=x*p/2,T=-d*y,k=e*x*d/2,A=r*m+e*p*y,M=T*k-A*w,S=(_*T-b*A)/M/2,E=(b*k-_*w)/M;n(E)>2&&(E/=2),u-=S,f-=E}while((n(S)>v||n(E)>v)&&--h>0);return i*f>-a(o(u),s)-.001?[2*u,f]:null},c}function D(t,e){var r=m(e/2),n=L(1-r*r),i=1+n*o(t/=2),a=g(t)*n/i,s=r/i,l=a*a,c=s*s;return[4/3*a*(3+l-3*c),4/3*s*(3+3*l-c)]}O.invert=function(t,e){if(!(t*t+4*e*e>y*y+v)){var r=t,i=e,a=25;do{var s,l=g(r),c=g(r/2),u=o(r/2),f=g(i),h=o(i),p=g(2*i),d=f*f,m=h*h,x=c*c,b=1-m*u*u,_=b?E(h*u)*L(s=1/b):s=0,w=2*_*h*c-t,T=_*f-e,k=s*(m*x+_*h*u*d),A=s*(.5*l*p-2*_*f*c),M=.25*s*(p*c-_*f*m*l),S=s*(d*u+_*x*h),C=A*M-S*k;if(!C)break;var P=(T*A-w*S)/C,I=(w*M-T*k)/C;r-=P,i-=I}while((n(P)>v||n(I)>v)&&--a>0);return[r,i]}},D.invert=function(t,e){if(e*=3/8,!(t*=3/8)&&n(e)>1)return null;var r=1+t*t+e*e,i=L((r-L(r*r-4*e*e))/2),s=S(i)/3,l=i?function(t){return c(t+L(t*t-1))}(n(e/i))/3:function(t){return c(t+L(t*t+1))}(n(t))/3,u=o(s),f=P(l),h=f*f-u*u;return[2*d(t)*a(C(l)*u,.25-h),2*d(e)*a(f*g(s),.25+h)]};var R=L(8),F=c(1+w);function B(t,e){var r=n(e);return rx){var l=a(s[1],s[0]),c=L(s[0]*s[0]+s[1]*s[1]),u=r*p((l-x)/r)+x,f=a(g(l-=u),2-o(l));l=u+S(y/c*g(f))-f,s[0]=c*o(l),s[1]=c*g(l)}return s}return s.invert=function(t,n){var s=L(t*t+n*n);if(s>x){var l=a(n,t),c=r*p((l-x)/r)+x,u=l>c?-1:1,f=s*o(c-l),h=1/m(u*E((f-y)/L(y*(y-2*f)+s*s)));l=c+2*i((h+u*L(h*h-3))/3),t=s*o(l),n=s*g(l)}return e.geoAzimuthalEquidistantRaw.invert(t,n)},s}function j(t,r){if(arguments.length<2&&(r=t),1===r)return e.geoAzimuthalEqualAreaRaw;if(r===1/0)return U;function n(n,i){var a=e.geoAzimuthalEqualAreaRaw(n/r,i);return a[0]*=t,a}return n.invert=function(n,i){var a=e.geoAzimuthalEqualAreaRaw.invert(n/t,i);return a[0]*=r,a},n}function U(t,e){return[t*o(e)/o(e/=2),2*g(e)]}function V(t,e,r){var i,a,o,s=100;r=void 0===r?0:+r,e=+e;do{(a=t(r))===(o=t(r+v))&&(o=a+v),r-=i=-1*v*(a-e)/(a-o)}while(s-- >0&&n(i)>v);return s<0?NaN:r}function H(t,e,r){return void 0===e&&(e=40),void 0===r&&(r=1e-12),function(i,a,o,s){var l,c,u;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var f=0;fl)o-=c/=2,s-=u/=2;else{l=g;var m=(o>0?-1:1)*r,v=(s>0?-1:1)*r,y=t(o+m,s),x=t(o,s+v),b=(y[0]-h[0])/m,_=(y[1]-h[1])/m,w=(x[0]-h[0])/v,T=(x[1]-h[1])/v,k=T*b-_*w,A=(n(k)<.5?.5:1)/k;if(o+=c=(d*w-p*T)*A,s+=u=(p*_-d*b)*A,n(c)0&&(i[1]*=1+a/1.5*i[0]*i[0]),i}return e.invert=H(e),e}function G(t,e){var r,i=t*g(e),a=30;do{e-=r=(e+g(e)-i)/(1+o(e))}while(n(r)>v&&--a>0);return e/2}function Y(t,e,r){function n(n,i){return[t*n*o(i=G(r,i)),e*g(i)]}return n.invert=function(n,i){return i=S(i/e),[n/(t*o(i)),S((2*i+g(2*i))/r)]},n}B.invert=function(t,e){if((a=n(e))1e-12&&--u>0);return[t/(o(l)*(R-1/g(l))),d(e)*l]},U.invert=function(t,e){var r=2*S(e/2);return[t*o(r/2)/o(r),r]};var W=Y(w/x,w,y);var X=2.00276,Z=1.11072;function J(t,e){var r=G(y,e);return[X*t/(1/o(e)+Z/o(r)),(e+w*g(r))/X]}function K(t){var r=0,n=e.geoProjectionMutator(t),i=n(r);return i.parallel=function(t){return arguments.length?n(r=t*M):r*A},i}function Q(t,e){return[t*o(e),e]}function $(t){if(!t)return Q;var e=1/m(t);function r(r,n){var i=e+t-n,a=i?r*o(n)/i:i;return[i*g(a),e-i*o(a)]}return r.invert=function(r,n){var i=L(r*r+(n=e-n)*n),s=e+t-i;return[i/o(s)*a(r,n),s]},r}function tt(t){function e(e,r){var n=x-r,i=n?e*t*g(n)/n:n;return[n*g(i)/t,x-n*o(i)]}return e.invert=function(e,r){var n=e*t,i=x-r,o=L(n*n+i*i),s=a(n,i);return[(o?o/g(o):1)*s/t,x-o]},e}J.invert=function(t,e){var r,i,a=X*e,s=e<0?-b:b,l=25;do{i=a-w*g(s),s-=r=(g(2*s)+2*s-y*g(i))/(2*o(2*s)+2+y*o(i)*w*o(s))}while(n(r)>v&&--l>0);return i=a-w*g(s),[t*(1/o(i)+Z/o(s))/X,i]},Q.invert=function(t,e){return[t/o(e),e]};var et=Y(1,4/y,y);function rt(t,e,r,i,s,l){var c,u=o(l);if(n(t)>1||n(l)>1)c=E(r*s+e*i*u);else{var f=g(t/2),h=g(l/2);c=2*S(L(f*f+e*i*h*h))}return n(c)>v?[c,a(i*g(l),e*s-r*i*u)]:[0,0]}function nt(t,e,r){return E((t*t+e*e-r*r)/(2*t*e))}function it(t){return t-2*y*l((t+y)/(2*y))}function at(t,e,r){for(var n,i=[[t[0],t[1],g(t[1]),o(t[1])],[e[0],e[1],g(e[1]),o(e[1])],[r[0],r[1],g(r[1]),o(r[1])]],a=i[2],s=0;s<3;++s,a=n)n=i[s],a.v=rt(n[1]-a[1],a[3],a[2],n[3],n[2],n[0]-a[0]),a.point=[0,0];var l=nt(i[0].v[0],i[2].v[0],i[1].v[0]),c=nt(i[0].v[0],i[1].v[0],i[2].v[0]),u=y-l;i[2].point[1]=0,i[0].point[0]=-(i[1].point[0]=i[0].v[0]/2);var f=[i[2].point[0]=i[0].point[0]+i[2].v[0]*o(l),2*(i[0].point[1]=i[1].point[1]=i[2].v[0]*g(l))];return function(t,e){var r,n=g(e),a=o(e),s=new Array(3);for(r=0;r<3;++r){var l=i[r];if(s[r]=rt(e-l[1],l[3],l[2],a,n,t-l[0]),!s[r][0])return l.point;s[r][1]=it(s[r][1]-l.v[1])}var h=f.slice();for(r=0;r<3;++r){var p=2==r?0:r+1,d=nt(i[r].v[0],s[r][0],s[p][0]);s[r][1]<0&&(d=-d),r?1==r?(d=c-d,h[0]-=s[r][0]*o(d),h[1]-=s[r][0]*g(d)):(d=u-d,h[0]+=s[r][0]*o(d),h[1]+=s[r][0]*g(d)):(h[0]+=s[r][0]*o(d),h[1]-=s[r][0]*g(d))}return h[0]/=3,h[1]/=3,h}}function ot(t){return t[0]*=M,t[1]*=M,t}function st(t,r,n){var i=e.geoCentroid({type:\"MultiPoint\",coordinates:[t,r,n]}),a=[-i[0],-i[1]],o=e.geoRotation(a),s=at(ot(o(t)),ot(o(r)),ot(o(n)));s.invert=H(s);var l=e.geoProjection(s).rotate(a),c=l.center;return delete l.rotate,l.center=function(t){return arguments.length?c(o(t)):o.invert(c())},l.clipAngle(90)}function lt(t,e){var r=L(1-g(e));return[2/T*t*r,T*(1-r)]}function ct(t){var e=m(t);function r(t,r){return[t,(t?t/g(t):1)*(g(r)*o(t)-e*o(r))]}return r.invert=e?function(t,r){t&&(r*=g(t)/t);var n=o(t);return[t,2*a(L(n*n+e*e-r*r)-n,e-r)]}:function(t,e){return[t,S(t?e*m(t)/t:e)]},r}lt.invert=function(t,e){var r=(r=e/T-1)*r;return[r>0?t*L(y/r)/2:0,S(1-r)]};var ut=L(3);function ft(t,e){return[ut*t*(2*o(2*e/3)-1)/T,ut*T*g(e/3)]}function ht(t){var e=o(t);function r(t,r){return[t*e,g(r)/e]}return r.invert=function(t,r){return[t/e,S(r*e)]},r}function pt(t){var e=o(t);function r(t,r){return[t*e,(1+e)*m(r/2)]}return r.invert=function(t,r){return[t/e,2*i(r/(1+e))]},r}function dt(t,e){var r=L(8/(3*y));return[r*t*(1-n(e)/y),r*e]}function gt(t,e){var r=L(4-3*g(n(e)));return[2/L(6*y)*t*r,d(e)*L(2*y/3)*(2-r)]}function mt(t,e){var r=L(y*(4+y));return[2/r*t*(1+L(1-4*e*e/(y*y))),4/r*e]}function vt(t,e){var r=(2+x)*g(e);e/=2;for(var i=0,a=1/0;i<10&&n(a)>v;i++){var s=o(e);e-=a=(e+g(e)*(s+2)-r)/(2*s*(1+s))}return[2/L(y*(4+y))*t*(1+o(e)),2*L(y/(4+y))*g(e)]}function yt(t,e){return[t*(1+o(e))/L(2+y),2*e/L(2+y)]}function xt(t,e){for(var r=(1+x)*g(e),i=0,a=1/0;i<10&&n(a)>v;i++)e-=a=(e+g(e)-r)/(1+o(e));return r=L(2+y),[t*(1+o(e))/r,2*e/r]}ft.invert=function(t,e){var r=3*S(e/(ut*T));return[T*t/(ut*(2*o(2*r/3)-1)),r]},dt.invert=function(t,e){var r=L(8/(3*y)),i=e/r;return[t/(r*(1-n(i)/y)),i]},gt.invert=function(t,e){var r=2-n(e)/L(2*y/3);return[t*L(6*y)/(2*r),d(e)*S((4-r*r)/3)]},mt.invert=function(t,e){var r=L(y*(4+y))/2;return[t*r/(1+L(1-e*e*(4+y)/(4*y))),e*r/2]},vt.invert=function(t,e){var r=e*L((4+y)/y)/2,n=S(r),i=o(n);return[t/(2/L(y*(4+y))*(1+i)),S((n+r*(i+2))/(2+x))]},yt.invert=function(t,e){var r=L(2+y),n=e*r/2;return[r*t/(1+o(n)),n]},xt.invert=function(t,e){var r=1+x,n=L(r/2);return[2*t*n/(1+o(e*=n)),S((e+g(e))/r)]};var bt=3+2*w;function _t(t,e){var r=g(t/=2),n=o(t),a=L(o(e)),s=o(e/=2),l=g(e)/(s+w*n*a),u=L(2/(1+l*l)),f=L((w*s+(n+r)*a)/(w*s+(n-r)*a));return[bt*(u*(f-1/f)-2*c(f)),bt*(u*l*(f+1/f)-2*i(l))]}_t.invert=function(t,e){if(!(r=D.invert(t/1.2,1.065*e)))return null;var r,a=r[0],s=r[1],l=20;t/=bt,e/=bt;do{var h=a/2,p=s/2,d=g(h),m=o(h),y=g(p),b=o(p),T=o(s),k=L(T),A=y/(b+w*m*k),M=A*A,S=L(2/(1+M)),E=(w*b+(m+d)*k)/(w*b+(m-d)*k),C=L(E),P=C-1/C,I=C+1/C,O=S*P-2*c(C)-t,z=S*A*I-2*i(A)-e,R=y&&_*k*d*M/y,F=(w*m*b+k)/(2*(b+w*m*k)*(b+w*m*k)*k),B=-.5*A*S*S*S,N=B*R,j=B*F,U=(U=2*b+w*k*(m-d))*U*C,V=(w*m*b*k+T)/U,H=-w*d*y/(k*U),q=P*N-2*V/C+S*(V+V/E),G=P*j-2*H/C+S*(H+H/E),Y=A*I*N-2*R/(1+M)+S*I*R+S*A*(V-V/E),W=A*I*j-2*F/(1+M)+S*I*F+S*A*(H-H/E),X=G*Y-W*q;if(!X)break;var Z=(z*G-O*W)/X,J=(O*Y-z*q)/X;a-=Z,s=u(-x,f(x,s-J))}while((n(Z)>v||n(J)>v)&&--l>0);return n(n(s)-x)s){var d=L(h),m=a(f,u),b=i*p(m/i),_=m-b,w=t*o(_),T=(t*g(_)-_*g(w))/(x-w),k=Lt(_,T),A=(y-t)/Ct(k,w,y);u=d;var M,S=50;do{u-=M=(t+Ct(k,w,u)*A-d)/(k(u)*A)}while(n(M)>v&&--S>0);f=_*g(u),us){var u=L(c),f=a(l,r),h=i*p(f/i),d=f-h;r=u*o(d),l=u*g(d);for(var m=r-x,v=g(r),b=l/v,_=rv||n(p)>v)&&--x>0);return[d,m]},u}Tt.invert=function(t,e){var r=e/(1+wt);return[t&&t/(wt*L(1-r*r)),2*i(r)]},kt.invert=function(t,e){var r=i(e/T),n=o(r),a=2*r;return[t*T/2/(o(a)*n*n),a]};var It=Pt(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);var Ot=Pt(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);var zt=Pt(5/6*y,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Dt(t,e){var r=t*t,n=e*e;return[t*(1-.162388*n)*(.87-952426e-9*r*r),e*(1+n/12)]}Dt.invert=function(t,e){var r,i=t,a=e,o=50;do{var s=a*a;a-=r=(a*(1+s/12)-e)/(1+s/4)}while(n(r)>v&&--o>0);o=50,t/=1-.162388*s;do{var l=(l=i*i)*l;i-=r=(i*(.87-952426e-9*l)-t)/(.87-.00476213*l)}while(n(r)>v&&--o>0);return[i,a]};var Rt=Pt(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Ft(t){var e=t(x,0)[0]-t(-x,0)[0];function r(r,n){var i=r>0?-.5:.5,a=t(r+i*y,n);return a[0]-=i*e,a}return t.invert&&(r.invert=function(r,n){var i=r>0?-.5:.5,a=t.invert(r+i*e,n),o=a[0]-i*y;return o<-y?o+=2*y:o>y&&(o-=2*y),a[0]=o,a}),r}function Bt(t,e){var r=d(t),i=d(e),s=o(e),l=o(t)*s,c=g(t)*s,u=g(i*e);t=n(a(c,u)),e=S(l),n(t-x)>v&&(t%=x);var f=function(t,e){if(e===x)return[0,0];var r,i,a=g(e),s=a*a,l=s*s,c=1+l,u=1+3*l,f=1-l,h=S(1/L(c)),p=f+s*c*h,d=(1-a)/p,m=L(d),b=d*c,_=L(b),w=m*f;if(0===t)return[0,-(w+s*_)];var T,k=o(e),A=1/k,M=2*a*k,E=(-p*k-(-3*s+h*u)*M*(1-a))/(p*p),C=-A*M,P=-A*(s*c*E+d*u*M),I=-2*A*(f*(.5*E/m)-2*s*m*M),O=4*t/y;if(t>.222*y||e.175*y){if(r=(w+s*L(b*(1+l)-w*w))/(1+l),t>y/4)return[r,r];var z=r,D=.5*r;r=.5*(D+z),i=50;do{var R=L(b-r*r),F=r*(I+C*R)+P*S(r/_)-O;if(!F)break;F<0?D=r:z=r,r=.5*(D+z)}while(n(z-D)>v&&--i>0)}else{r=v,i=25;do{var B=r*r,N=L(b-B),j=I+C*N,U=r*j+P*S(r/_)-O,V=j+(P-C*B)/N;r-=T=N?U/V:0}while(n(T)>v&&--i>0)}return[r,-w-s*L(b-r*r)]}(t>y/4?x-t:t,e);return t>y/4&&(u=f[0],f[0]=-f[1],f[1]=-u),f[0]*=r,f[1]*=-i,f}function Nt(t,e){var r,a,l,c,u,f;if(e=1-v)return r=(1-e)/4,l=1/(a=P(t)),[(c=((f=s(2*(f=t)))-1)/(f+1))+r*((u=a*C(t))-t)/(a*a),l-r*c*l*(u-t),l+r*c*l*(u+t),2*i(s(t))-x+r*(u-t)/a];var h=[1,0,0,0,0,0,0,0,0],p=[L(e),0,0,0,0,0,0,0,0],d=0;for(a=L(1-e),u=1;n(p[d]/h[d])>v&&d<8;)r=h[d++],p[d]=(r-a)/2,h[d]=(r+a)/2,a=L(r*a),u*=2;l=u*h[d]*t;do{l=(S(c=p[d]*g(a=l)/h[d])+l)/2}while(--d);return[g(l),c=o(l),c/o(l-a),l]}function jt(t,e){if(!e)return t;if(1===e)return c(m(t/2+b));for(var r=1,a=L(1-e),o=L(e),s=0;n(o)>v;s++){if(t%y){var l=i(a*m(t)/r);l<0&&(l+=y),t+=l+~~(t/y)*y}else t+=t;o=(r+a)/2,a=L(r*a),o=((r=o)-a)/2}return t/(h(2,s)*r)}function Ut(t,e){var r=(w-1)/(w+1),l=L(1-r*r),u=jt(x,l*l),f=c(m(y/4+n(e)/2)),h=s(-1*f)/L(r),p=function(t,e){var r=t*t,n=e+1,i=1-r-e*e;return[.5*((t>=0?x:-x)-a(i,2*t)),-.25*c(i*i+4*r)+.5*c(n*n+r)]}(h*o(-1*t),h*g(-1*t)),v=function(t,e,r){var a=n(t),o=C(n(e));if(a){var s=1/g(a),l=1/(m(a)*m(a)),c=-(l+r*(o*o*s*s)-1+r),u=(-c+L(c*c-4*((r-1)*l)))/2;return[jt(i(1/L(u)),r)*d(t),jt(i(L((u/l-1)/r)),1-r)*d(e)]}return[0,jt(i(o),1-r)*d(e)]}(p[0],p[1],l*l);return[-v[1],(e>=0?1:-1)*(.5*u-v[0])]}function Vt(t){var e=g(t),r=o(t),i=Ht(t);function s(t,a){var s=i(t,a);t=s[0],a=s[1];var l=g(a),c=o(a),u=o(t),f=E(e*l+r*c*u),h=g(f),p=n(h)>v?f/h:1;return[p*r*g(t),(n(t)>x?p:-p)*(e*c-r*l*u)]}return i.invert=Ht(-t),s.invert=function(t,r){var n=L(t*t+r*r),s=-g(n),l=o(n),c=n*l,u=-r*s,f=n*e,h=L(c*c+u*u-f*f),p=a(c*f+u*h,u*f-c*h),d=(n>x?-1:1)*a(t*s,n*o(p)*l+r*g(p)*s);return i.invert(d,p)},s}function Ht(t){var e=g(t),r=o(t);return function(t,n){var i=o(n),s=o(t)*i,l=g(t)*i,c=g(n);return[a(l,s*r-c*e),S(c*r+s*e)]}}Bt.invert=function(t,e){n(t)>1&&(t=2*d(t)-t),n(e)>1&&(e=2*d(e)-e);var r=d(t),i=d(e),s=-r*t,l=-i*e,c=l/s<1,u=function(t,e){var r=0,i=1,a=.5,s=50;for(;;){var l=a*a,c=L(a),u=S(1/L(1+l)),f=1-l+a*(1+l)*u,h=(1-c)/f,p=L(h),d=h*(1+l),g=p*(1-l),m=L(d-t*t),v=e+g+a*m;if(n(i-r)<1e-12||0==--s||0===v)break;v>0?r=a:i=a,a=.5*(r+i)}if(!s)return null;var x=S(c),b=o(x),_=1/b,w=2*c*b,T=(-f*b-(-3*a+u*(1+3*l))*w*(1-c))/(f*f);return[y/4*(t*(-2*_*(.5*T/p*(1-l)-2*a*p*w)+-_*w*m)+-_*(a*(1+l)*T+h*(1+3*l)*w)*S(t/L(d))),x]}(c?l:s,c?s:l),f=u[0],h=u[1],p=o(h);return c&&(f=-x-f),[r*(a(g(f)*p,-g(h))+y),i*S(o(f)*p)]},Ut.invert=function(t,e){var r,n,o,l,u,f,h=(w-1)/(w+1),p=L(1-h*h),d=jt(x,p*p),g=(n=-t,o=p*p,(r=.5*d-e)?(l=Nt(r,o),n?(f=(u=Nt(n,1-o))[1]*u[1]+o*l[0]*l[0]*u[0]*u[0],[[l[0]*u[2]/f,l[1]*l[2]*u[0]*u[1]/f],[l[1]*u[1]/f,-l[0]*l[2]*u[0]*u[2]/f],[l[2]*u[1]*u[2]/f,-o*l[0]*l[1]*u[0]/f]]):[[l[0],0],[l[1],0],[l[2],0]]):[[0,(u=Nt(n,1-o))[0]/u[1]],[1/u[1],0],[u[2]/u[1],0]]),m=function(t,e){var r=e[0]*e[0]+e[1]*e[1];return[(t[0]*e[0]+t[1]*e[1])/r,(t[1]*e[0]-t[0]*e[1])/r]}(g[0],g[1]);return[a(m[1],m[0])/-1,2*i(s(-.5*c(h*m[0]*m[0]+h*m[1]*m[1])))-x]};var qt=S(1-1/3)*A,Gt=ht(0);function Yt(t){var e=qt*M,r=lt(y,e)[0]-lt(-y,e)[0],i=Gt(0,e)[1],a=lt(0,e)[1],o=T-a,s=k/t,c=4/k,h=i+o*o*4/k;function p(p,d){var g,m=n(d);if(m>e){var v=f(t-1,u(0,l((p+y)/s)));(g=lt(p+=y*(t-1)/t-v*s,m))[0]=g[0]*k/r-k*(t-1)/(2*t)+v*k/t,g[1]=i+4*(g[1]-a)*o/k,d<0&&(g[1]=-g[1])}else g=Gt(p,d);return g[0]*=c,g[1]/=h,g}return p.invert=function(e,p){e/=c;var d=n(p*=h);if(d>i){var g=f(t-1,u(0,l((e+y)/s)));e=(e+y*(t-1)/t-g*s)*r/k;var m=lt.invert(e,.25*(d-i)*k/o+a);return m[0]-=y*(t-1)/t-g*s,p<0&&(m[1]=-m[1]),m}return Gt.invert(e,p)},p}function Wt(t,e){return[t,1&e?90-v:qt]}function Xt(t,e){return[t,1&e?-90+v:-qt]}function Zt(t){return[t[0]*(1-v),t[1]]}function Jt(t){var e,r=1+t,i=S(g(1/r)),s=2*L(y/(e=y+4*i*r)),l=.5*s*(r+L(t*(2+t))),c=t*t,u=r*r;function f(f,h){var p,d,m=1-g(h);if(m&&m<2){var v,b=x-h,_=25;do{var w=g(b),T=o(b),k=i+a(w,r-T),A=1+u-2*r*T;b-=v=(b-c*i-r*w+A*k-.5*m*e)/(2*r*w*k)}while(n(v)>1e-12&&--_>0);p=s*L(A),d=f*k/y}else p=s*(t+m),d=f*i/y;return[p*g(d),l-p*o(d)]}return f.invert=function(t,n){var o=t*t+(n-=l)*n,f=(1+u-o/(s*s))/(2*r),h=E(f),p=g(h),d=i+a(p,r-f);return[S(t/L(o))*y/d,S(1-2*(h-c*i-r*p+(1+u-2*r*f)*d)/e)]},f}function Kt(t,e){return e>-.7109889596207567?((t=W(t,e))[1]+=.0528035274542,t):Q(t,e)}function Qt(t,e){return n(e)>.7109889596207567?((t=W(t,e))[1]-=e>0?.0528035274542:-.0528035274542,t):Q(t,e)}function $t(t,e,r,n){var i=L(4*y/(2*r+(1+t-e/2)*g(2*r)+(t+e)/2*g(4*r)+e/2*g(6*r))),a=L(n*g(r)*L((1+t*o(2*r)+e*o(4*r))/(1+t+e))),s=r*c(1);function l(r){return L(1+t*o(2*r)+e*o(4*r))}function c(n){var i=n*r;return(2*i+(1+t-e/2)*g(2*i)+(t+e)/2*g(4*i)+e/2*g(6*i))/r}function u(t){return l(t)*g(t)}var f=function(t,e){var n=r*V(c,s*g(e)/r,e/y);isNaN(n)&&(n=r*d(e));var u=i*l(n);return[u*a*t/y*o(n),u/a*g(n)]};return f.invert=function(t,e){var n=V(u,e*a/i);return[t*y/(o(n)*i*a*l(n)),S(r*c(n/r)/s)]},0===r&&(i=L(n/y),(f=function(t,e){return[t*i,g(e)/i]}).invert=function(t,e){return[t/i,S(e*i)]}),f}function te(t,e,r,n,i){void 0===n&&(n=1e-8),void 0===i&&(i=20);var a=t(e),o=t(.5*(e+r)),s=t(r);return function t(e,r,n,i,a,o,s,l,c,u,f){if(f.nanEncountered)return NaN;var h,p,d,g,m,v,y,x,b,_;if(p=e(r+.25*(h=n-r)),d=e(n-.25*h),isNaN(p))f.nanEncountered=!0;else{if(!isNaN(d))return _=((v=(g=h*(i+4*p+a)/12)+(m=h*(a+4*d+o)/12))-s)/15,u>c?(f.maxDepthCount++,v+_):Math.abs(_)t?r=n:e=n,n=e+r>>1}while(n>e);var i=c[n+1]-c[n];return i&&(i=(t-c[n+1])/i),(n+1+i)/s}var p=2*f(1)/y*o/r,m=function(t,e){var r=f(n(g(e))),a=i(r)*t;return r/=p,[a,e>=0?r:-r]};return m.invert=function(t,e){var r;return n(e*=p)<1&&(r=d(e)*S(a(n(e))*o)),[t/i(n(e)),r]},m}function re(t,e){return n(t[0]-e[0])=0;--l)n=(e=t[1][l])[0][0],i=e[0][1],a=e[1][1],o=e[2][0],s=e[2][1],c.push(ne([[o-v,s-v],[o-v,a+v],[n+v,a+v],[n+v,i-v]],30));return{type:\"Polygon\",coordinates:[r.merge(c)]}}function ae(t,r,n){var i,a;function o(e,n){for(var i=n<0?-1:1,a=r[+(n<0)],o=0,s=a.length-1;oa[o][2][0];++o);var l=t(e-a[o][1][0],n);return l[0]+=t(a[o][1][0],i*n>i*a[o][0][1]?a[o][0][1]:n)[0],l}n?o.invert=n(o):t.invert&&(o.invert=function(e,n){for(var i=a[+(n<0)],s=r[+(n<0)],l=0,c=i.length;lo&&(r=a,a=o,o=r),[[n,a],[i,o]]}))})),s):r.map((function(t){return t.map((function(t){return[[t[0][0]*A,t[0][1]*A],[t[1][0]*A,t[1][1]*A],[t[2][0]*A,t[2][1]*A]]}))}))},null!=r&&s.lobes(r),s}Kt.invert=function(t,e){return e>-.7109889596207567?W.invert(t,e-.0528035274542):Q.invert(t,e)},Qt.invert=function(t,e){return n(e)>.7109889596207567?W.invert(t,e+(e>0?.0528035274542:-.0528035274542)):Q.invert(t,e)};var oe=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var se=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var le=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var ce=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];var ue=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];var fe=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function he(t,e){return[3/k*t*L(y*y/3-e*e),e]}function pe(t){function e(e,r){if(n(n(r)-x)2)return null;var o=(e/=2)*e,s=(r/=2)*r,l=2*r/(1+o+s);return l=h((1+l)/(1-l),1/t),[a(2*e,1-o-s)/t,S((l-1)/(l+1))]},e}he.invert=function(t,e){return[k/3*t/L(y*y/3-e*e),e]};var de=y/w;function ge(t,e){return[t*(1+L(o(e)))/2,e/(o(e/2)*o(t/6))]}function me(t,e){var r=t*t,n=e*e;return[t*(.975534+n*(-.0143059*r-.119161+-.0547009*n)),e*(1.00384+r*(.0802894+-.02855*n+199025e-9*r)+n*(.0998909+-.0491032*n))]}function ve(t,e){return[g(t)/o(e),m(e)*o(t)]}function ye(t){var e=o(t),r=m(b+t/2);function i(i,a){var o=a-t,s=n(o)=0;)h=(f=t[u])[0]+l*(i=h)-c*p,p=f[1]+l*p+c*i;return[h=l*(i=h)-c*p,p=l*p+c*i]}return r.invert=function(r,s){var l=20,c=r,u=s;do{for(var f,h=e,p=t[h],d=p[0],m=p[1],v=0,y=0;--h>=0;)v=d+c*(f=v)-u*y,y=m+c*y+u*f,d=(p=t[h])[0]+c*(f=d)-u*m,m=p[1]+c*m+u*f;var x,b,_=(v=d+c*(f=v)-u*y)*v+(y=m+c*y+u*f)*y;c-=x=((d=c*(f=d)-u*m-r)*v+(m=c*m+u*f-s)*y)/_,u-=b=(m*v-d*y)/_}while(n(x)+n(b)>1e-12&&--l>0);if(l){var w=L(c*c+u*u),T=2*i(.5*w),k=g(T);return[a(c*k,w*o(T)),w?S(u*k/w):0]}},r}ge.invert=function(t,e){var r=n(t),i=n(e),a=v,s=x;iv||n(b)>v)&&--a>0);return a&&[r,i]},ve.invert=function(t,e){var r=t*t,n=e*e+1,i=r+n,a=t?_*L((i-L(i*i-4*r))/r):1/L(n);return[S(t*a),d(e)*E(a)]},xe.invert=function(t,e){return[t,2.5*i(s(.8*e))-.625*y]};var _e=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],we=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Te=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ke=[[.9245,0],[0,0],[.01943,0]],Ae=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Me(t,r){var n=e.geoProjection(be(t)).rotate(r).clipAngle(90),i=e.geoRotation(r),a=n.center;return delete n.rotate,n.center=function(t){return arguments.length?a(i(t)):i.invert(a())},n}var Se=L(6),Ee=L(7);function Le(t,e){var r=S(7*g(e)/(3*Se));return[Se*t*(2*o(2*r/3)-1)/Ee,9*g(r/3)/Ee]}function Ce(t,e){for(var r,i=(1+_)*g(e),a=e,s=0;s<25&&(a-=r=(g(a/2)+g(a)-i)/(.5*o(a/2)+o(a)),!(n(r)1e-12&&--l>0);return[t/(.84719-.13063*(i=s*s)+(o=i*(a=i*i))*o*(.05494*i-.04515-.02326*a+.00331*o)),s]},Oe.invert=function(t,e){for(var r=e/2,i=0,a=1/0;i<10&&n(a)>v;++i){var s=o(e/2);e-=a=(e-m(e/2)-r)/(1-.5/(s*s))}return[2*t/(1+o(e)),e]};var ze=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function De(t,e){var r=g(e),i=o(e),a=d(t);if(0===t||n(e)===x)return[0,e];if(0===e)return[t,0];if(n(t)===x)return[t*i,x*r];var s=y/(2*t)-2*t/y,l=2*e/y,c=(1-l*l)/(r-l),u=s*s,f=c*c,h=1+u/f,p=1+f/u,m=(s*r/c-s/2)/h,v=(f*r/u+c/2)/p,b=v*v-(f*r*r/u+c*r-1)/p;return[x*(m+L(m*m+i*i/h)*a),x*(v+L(b<0?0:b)*d(-e*s)*a)]}De.invert=function(t,e){var r=(t/=x)*t,n=r+(e/=x)*e,i=y*y;return[t?(n-1+L((1-n)*(1-n)+4*r))/(2*t)*x:0,V((function(t){return n*(y*g(t)-2*t)*y+4*t*t*(e-g(t))+2*y*t-i*e}),0)]};function Re(t,e){var r=e*e;return[t,e*(1.0148+r*r*(.23185+r*(.02406*r-.14499)))]}function Fe(t,e){if(n(e)=0;)if(n=e[s],r[0]===n[0]&&r[1]===n[1]){if(a)return[a,r];a=r}}}(e.face,r.face),i=Be(n.map(r.project),n.map(e.project));e.transform=r.transform?Ne(r.transform,i):i;for(var a=r.edges,o=0,s=a.length;o1.790857183?e=1.790857183:e<-1.790857183&&(e=-1.790857183);var r,i=e;do{var a=i*i;i-=r=(i*(1.0148+a*a*(.23185+a*(.02406*a-.14499)))-e)/(1.0148+a*a*(5*.23185+a*(.21654*a-1.01493)))}while(n(r)>v);return[t,i]},Fe.invert=function(t,e){if(n(e)v&&--s>0);return l=m(a),[(n(e)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])})),nr=[],t.length?t.length>1?{type:\"MultiPolygon\",coordinates:t}:{type:\"Polygon\",coordinates:t[0]}:null}};function sr(t){var r=t(x,0)[0]-t(-x,0)[0];function i(e,i){var a=n(e)0?e-y:e+y,i),s=(o[0]-o[1])*_,l=(o[0]+o[1])*_;if(a)return[s,l];var c=r*_,u=s>0^l>0?-1:1;return[u*s-d(l)*c,u*l-d(s)*c]}return t.invert&&(i.invert=function(e,i){var a=(e+i)*_,o=(i-e)*_,s=n(a)<.5*r&&n(o)<.5*r;if(!s){var l=r*_,c=a>0^o>0?-1:1,u=-c*e+(o>0?1:-1)*l,f=-c*i+(a>0?1:-1)*l;a=(-u-f)*_,o=(u-f)*_}var h=t.invert(a,o);return s||(h[0]+=a>0?y:-y),h}),e.geoProjection(i).rotate([-90,-90,45]).clipAngle(179.999)}function lr(){return sr(Ut).scale(111.48)}function cr(t){var e=g(t);function r(r,n){var a=e?m(r*e/2)/e:r/2;if(!n)return[2*a,-t];var s=2*i(a*g(n)),l=1/m(n);return[g(s)*l,n+(1-o(s))*l-t]}return r.invert=function(r,a){if(n(a+=t)v&&--u>0);var d=r*(f=m(c)),x=m(n(a)0?x:-x)*(h+o*(d-c)/2+o*o*(d-2*h+c)/2)]}function hr(t,e){var r=function(t){function e(e,r){var n=o(r),i=(t-1)/(t-n*o(e));return[i*n*g(e),i*g(r)]}return e.invert=function(e,r){var n=e*e+r*r,i=L(n),o=(t-L(1-n*(t+1)/(t-1)))/((t-1)/i+i/(t-1));return[a(e*o,i*L(1-o*o)),i?S(r*o/i):0]},e}(t);if(!e)return r;var n=o(e),i=g(e);function s(e,a){var o=r(e,a),s=o[1],l=s*i/(t-1)+n;return[o[0]*n/l,s/l]}return s.invert=function(e,a){var o=(t-1)/(t-1-a*i);return r.invert(o*e,o*a*n)},s}ur.forEach((function(t){t[1]*=1.0144})),fr.invert=function(t,e){var r=e/x,i=90*r,a=f(18,n(i/5)),o=u(0,l(a));do{var s=ur[o][1],c=ur[o+1][1],h=ur[f(19,o+2)][1],p=h-s,d=h-2*c+s,g=2*(n(r)-c)/p,m=d/p,v=g*(1-m*g*(1-2*m*g));if(v>=0||1===o){i=(e>=0?5:-5)*(v+a);var y,b=50;do{v=(a=f(18,n(i)/5))-(o=l(a)),s=ur[o][1],c=ur[o+1][1],h=ur[f(19,o+2)][1],i-=(y=(e>=0?x:-x)*(c+v*(h-s)/2+v*v*(h-2*c+s)/2)-e)*A}while(n(y)>1e-12&&--b>0);break}}while(--o>=0);var _=ur[o][0],w=ur[o+1][0],T=ur[f(19,o+2)][0];return[t/(w+v*(T-_)/2+v*v*(T-2*w+_)/2),i*M]};var pr=-179.9999,dr=179.9999,gr=-89.9999;function mr(t){return t.length>0}function vr(t){return-90===t||90===t?[0,t]:[-180,(e=t,Math.floor(1e4*e)/1e4)];var e}function yr(t){var e=t[0],r=t[1],n=!1;return e<=pr?(e=-180,n=!0):e>=dr&&(e=180,n=!0),r<=gr?(r=-90,n=!0):r>=89.9999&&(r=90,n=!0),n?[e,r]:t}function xr(t){return t.map(yr)}function br(t,e,r){for(var n=0,i=t.length;n=dr||u<=gr||u>=89.9999){a[o]=yr(l);for(var f=o+1;fpr&&pgr&&d<89.9999)break}if(f===o+1)continue;if(o){var g={index:-1,polygon:e,ring:a.slice(0,o+1)};g.ring[g.ring.length-1]=vr(u),r[r.length-1]=g}else r.pop();if(f>=s)break;r.push({index:-1,polygon:e,ring:a=a.slice(f-1)}),a[0]=vr(a[0][1]),o=-1,s=a.length}}}}function _r(t){var e,r,n,i,a,o,s=t.length,l={},c={};for(e=0;e0?y-l:l)*A],u=e.geoProjection(t(s)).rotate(c),f=e.geoRotation(c),h=u.center;return delete u.rotate,u.center=function(t){return arguments.length?h(f(t)):f.invert(h())},u.clipAngle(90)}function Mr(t){var r=o(t);function n(t,n){var i=e.geoGnomonicRaw(t,n);return i[0]*=r,i}return n.invert=function(t,n){return e.geoGnomonicRaw.invert(t/r,n)},n}function Sr(t,e){return Ar(Mr,t,e)}function Er(t){if(!(t*=2))return e.geoAzimuthalEquidistantRaw;var r=-t/2,n=-r,i=t*t,s=m(n),l=.5/g(n);function c(e,a){var s=E(o(a)*o(e-r)),l=E(o(a)*o(e-n));return[((s*=s)-(l*=l))/(2*t),(a<0?-1:1)*L(4*i*l-(i-s+l)*(i-s+l))/(2*t)]}return c.invert=function(t,e){var i,c,u=e*e,f=o(L(u+(i=t+r)*i)),h=o(L(u+(i=t+n)*i));return[a(c=f-h,i=(f+h)*s),(e<0?-1:1)*E(L(i*i+c*c)*l)]},c}function Lr(t,e){return Ar(Er,t,e)}function Cr(t,e){if(n(e)v&&--l>0);return[d(t)*(L(a*a+4)+a)*y/4,x*s]};var Rr=4*y+3*L(3),Fr=2*L(2*y*L(3)/Rr),Br=Y(Fr*L(3)/y,Fr,Rr/6);function Nr(t,e){return[t*L(1-3*e*e/(y*y)),e]}function jr(t,e){var r=o(e),n=o(t)*r,i=1-n,s=o(t=a(g(t)*r,-g(e))),l=g(t);return[l*(r=L(1-n*n))-s*i,-s*r-l*i]}function Ur(t,e){var r=O(t,e);return[(r[0]+t/x)/2,(r[1]+e)/2]}Nr.invert=function(t,e){return[t/L(1-3*e*e/(y*y)),e]},jr.invert=function(t,e){var r=(t*t+e*e)/-2,n=L(-r*(2+r)),i=e*r+t*n,o=t*r-e*n,s=L(o*o+i*i);return[a(n*i,s*(1+r)),s?-S(n*o/s):0]},Ur.invert=function(t,e){var r=t,i=e,a=25;do{var s,l=o(i),c=g(i),u=g(2*i),f=c*c,h=l*l,p=g(r),d=o(r/2),m=g(r/2),y=m*m,b=1-h*d*d,_=b?E(l*d)*L(s=1/b):s=0,w=.5*(2*_*l*m+r/x)-t,T=.5*(_*c+i)-e,k=.5*s*(h*y+_*l*d*f)+.5/x,A=s*(p*u/4-_*c*m),M=.125*s*(u*m-_*c*h*p),S=.5*s*(f*d+_*y*l)+.5,C=A*M-S*k,P=(T*A-w*S)/C,I=(w*M-T*k)/C;r-=P,i-=I}while((n(P)>v||n(I)>v)&&--a>0);return[r,i]},t.geoNaturalEarth=e.geoNaturalEarth1,t.geoNaturalEarthRaw=e.geoNaturalEarth1Raw,t.geoAiry=function(){var t=x,r=e.geoProjectionMutator(I),n=r(t);return n.radius=function(e){return arguments.length?r(t=e*M):t*A},n.scale(179.976).clipAngle(147)},t.geoAiryRaw=I,t.geoAitoff=function(){return e.geoProjection(O).scale(152.63)},t.geoAitoffRaw=O,t.geoArmadillo=function(){var t=20*M,r=t>=0?1:-1,n=m(r*t),i=e.geoProjectionMutator(z),s=i(t),l=s.stream;return s.parallel=function(e){return arguments.length?(n=m((r=(t=e*M)>=0?1:-1)*t),i(t)):t*A},s.stream=function(e){var i=s.rotate(),c=l(e),u=(s.rotate([0,0]),l(e)),f=s.precision();return s.rotate(i),c.sphere=function(){u.polygonStart(),u.lineStart();for(var e=-180*r;r*e<180;e+=90*r)u.point(e,90*r);if(t)for(;r*(e-=3*r*f)>=-180;)u.point(e,r*-a(o(e*M/2),n)*A);u.lineEnd(),u.polygonEnd()},c},s.scale(218.695).center([0,28.0974])},t.geoArmadilloRaw=z,t.geoAugust=function(){return e.geoProjection(D).scale(66.1603)},t.geoAugustRaw=D,t.geoBaker=function(){return e.geoProjection(B).scale(112.314)},t.geoBakerRaw=B,t.geoBerghaus=function(){var t=5,r=e.geoProjectionMutator(N),n=r(t),i=n.stream,s=-o(.01*M),l=g(.01*M);return n.lobes=function(e){return arguments.length?r(t=+e):t},n.stream=function(e){var r=n.rotate(),c=i(e),u=(n.rotate([0,0]),i(e));return n.rotate(r),c.sphere=function(){u.polygonStart(),u.lineStart();for(var e=0,r=360/t,n=2*y/t,i=90-180/t,c=x;e=0;)t.point((e=r[i])[0],e[1]);t.lineEnd(),t.polygonEnd()},t},n.scale(79.4187).parallel(45).clipAngle(179.999)},t.geoHammerRetroazimuthalRaw=Vt,t.geoHealpix=function(){var t=4,n=e.geoProjectionMutator(Yt),i=n(t),a=i.stream;return i.lobes=function(e){return arguments.length?n(t=+e):t},i.stream=function(n){var o=i.rotate(),s=a(n),l=(i.rotate([0,0]),a(n));return i.rotate(o),s.sphere=function(){var n,i;e.geoStream((n=180/t,i=[].concat(r.range(-180,180+n/2,n).map(Wt),r.range(180,-180-n/2,-n).map(Xt)),{type:\"Polygon\",coordinates:[180===n?i.map(Zt):i]}),l)},s},i.scale(239.75)},t.geoHealpixRaw=Yt,t.geoHill=function(){var t=1,r=e.geoProjectionMutator(Jt),n=r(t);return n.ratio=function(e){return arguments.length?r(t=+e):t},n.scale(167.774).center([0,18.67])},t.geoHillRaw=Jt,t.geoHomolosine=function(){return e.geoProjection(Qt).scale(152.63)},t.geoHomolosineRaw=Qt,t.geoHufnagel=function(){var t=1,r=0,n=45*M,i=2,a=e.geoProjectionMutator($t),o=a(t,r,n,i);return o.a=function(e){return arguments.length?a(t=+e,r,n,i):t},o.b=function(e){return arguments.length?a(t,r=+e,n,i):r},o.psiMax=function(e){return arguments.length?a(t,r,n=+e*M,i):n*A},o.ratio=function(e){return arguments.length?a(t,r,n,i=+e):i},o.scale(180.739)},t.geoHufnagelRaw=$t,t.geoHyperelliptical=function(){var t=0,r=2.5,n=1.183136,i=e.geoProjectionMutator(ee),a=i(t,r,n);return a.alpha=function(e){return arguments.length?i(t=+e,r,n):t},a.k=function(e){return arguments.length?i(t,r=+e,n):r},a.gamma=function(e){return arguments.length?i(t,r,n=+e):n},a.scale(152.63)},t.geoHyperellipticalRaw=ee,t.geoInterrupt=ae,t.geoInterruptedBoggs=function(){return ae(J,oe).scale(160.857)},t.geoInterruptedHomolosine=function(){return ae(Qt,se).scale(152.63)},t.geoInterruptedMollweide=function(){return ae(W,le).scale(169.529)},t.geoInterruptedMollweideHemispheres=function(){return ae(W,ce).scale(169.529).rotate([20,0])},t.geoInterruptedSinuMollweide=function(){return ae(Kt,ue,H).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},t.geoInterruptedSinusoidal=function(){return ae(Q,fe).scale(152.63).rotate([-20,0])},t.geoKavrayskiy7=function(){return e.geoProjection(he).scale(158.837)},t.geoKavrayskiy7Raw=he,t.geoLagrange=function(){var t=.5,r=e.geoProjectionMutator(pe),n=r(t);return n.spacing=function(e){return arguments.length?r(t=+e):t},n.scale(124.75)},t.geoLagrangeRaw=pe,t.geoLarrivee=function(){return e.geoProjection(ge).scale(97.2672)},t.geoLarriveeRaw=ge,t.geoLaskowski=function(){return e.geoProjection(me).scale(139.98)},t.geoLaskowskiRaw=me,t.geoLittrow=function(){return e.geoProjection(ve).scale(144.049).clipAngle(89.999)},t.geoLittrowRaw=ve,t.geoLoximuthal=function(){return K(ye).parallel(40).scale(158.837)},t.geoLoximuthalRaw=ye,t.geoMiller=function(){return e.geoProjection(xe).scale(108.318)},t.geoMillerRaw=xe,t.geoModifiedStereographic=Me,t.geoModifiedStereographicRaw=be,t.geoModifiedStereographicAlaska=function(){return Me(_e,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},t.geoModifiedStereographicGs48=function(){return Me(we,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},t.geoModifiedStereographicGs50=function(){return Me(Te,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},t.geoModifiedStereographicMiller=function(){return Me(ke,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},t.geoModifiedStereographicLee=function(){return Me(Ae,[165,10]).scale(250).clipAngle(130).center([-165,-10])},t.geoMollweide=function(){return e.geoProjection(W).scale(169.529)},t.geoMollweideRaw=W,t.geoMtFlatPolarParabolic=function(){return e.geoProjection(Le).scale(164.859)},t.geoMtFlatPolarParabolicRaw=Le,t.geoMtFlatPolarQuartic=function(){return e.geoProjection(Ce).scale(188.209)},t.geoMtFlatPolarQuarticRaw=Ce,t.geoMtFlatPolarSinusoidal=function(){return e.geoProjection(Pe).scale(166.518)},t.geoMtFlatPolarSinusoidalRaw=Pe,t.geoNaturalEarth2=function(){return e.geoProjection(Ie).scale(175.295)},t.geoNaturalEarth2Raw=Ie,t.geoNellHammer=function(){return e.geoProjection(Oe).scale(152.63)},t.geoNellHammerRaw=Oe,t.geoInterruptedQuarticAuthalic=function(){return ae(j(1/0),ze).rotate([20,0]).scale(152.63)},t.geoNicolosi=function(){return e.geoProjection(De).scale(127.267)},t.geoNicolosiRaw=De,t.geoPatterson=function(){return e.geoProjection(Re).scale(139.319)},t.geoPattersonRaw=Re,t.geoPolyconic=function(){return e.geoProjection(Fe).scale(103.74)},t.geoPolyconicRaw=Fe,t.geoPolyhedral=Ve,t.geoPolyhedralButterfly=function(t){t=t||function(t){var r=e.geoCentroid({type:\"MultiPoint\",coordinates:t});return e.geoGnomonic().scale(1).translate([0,0]).rotate([-r[0],-r[1]])};var r=Ye.map((function(e){return{face:e,project:t(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var n=r[t];n&&(n.children||(n.children=[])).push(r[e])})),Ve(r[0],(function(t,e){return r[t<-y/2?e<0?6:4:t<0?e<0?2:0:t0?[-r[0],0]:[180-r[0],180])};var r=Ye.map((function(e){return{face:e,project:t(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var n=r[t];n&&(n.children||(n.children=[])).push(r[e])})),Ve(r[0],(function(t,e){return r[t<-y/2?e<0?6:4:t<0?e<0?2:0:t2||a[0]!=e[0]||a[1]!=e[1])&&(n.push(a),e=a)}return 1===n.length&&t.length>1&&n.push(r(t[t.length-1])),n}function a(t){return t.map(i)}function o(t){if(null==t)return t;var e;switch(t.type){case\"GeometryCollection\":e={type:\"GeometryCollection\",geometries:t.geometries.map(o)};break;case\"Point\":e={type:\"Point\",coordinates:r(t.coordinates)};break;case\"MultiPoint\":e={type:t.type,coordinates:n(t.coordinates)};break;case\"LineString\":e={type:t.type,coordinates:i(t.coordinates)};break;case\"MultiLineString\":case\"Polygon\":e={type:t.type,coordinates:a(t.coordinates)};break;case\"MultiPolygon\":e={type:\"MultiPolygon\",coordinates:t.coordinates.map(a)};break;default:return t}return null!=t.bbox&&(e.bbox=t.bbox),e}function s(t){var e={type:\"Feature\",properties:t.properties,geometry:o(t.geometry)};return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),e}if(null!=t)switch(t.type){case\"Feature\":return s(t);case\"FeatureCollection\":var l={type:\"FeatureCollection\",features:t.features.map(s)};return null!=t.bbox&&(l.bbox=t.bbox),l;default:return o(t)}return t},t.geoQuincuncial=sr,t.geoRectangularPolyconic=function(){return K(cr).scale(131.215)},t.geoRectangularPolyconicRaw=cr,t.geoRobinson=function(){return e.geoProjection(fr).scale(152.63)},t.geoRobinsonRaw=fr,t.geoSatellite=function(){var t=2,r=0,n=e.geoProjectionMutator(hr),i=n(t,r);return i.distance=function(e){return arguments.length?n(t=+e,r):t},i.tilt=function(e){return arguments.length?n(t,r=e*M):r*A},i.scale(432.147).clipAngle(E(1/t)*A-1e-6)},t.geoSatelliteRaw=hr,t.geoSinuMollweide=function(){return e.geoProjection(Kt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},t.geoSinuMollweideRaw=Kt,t.geoSinusoidal=function(){return e.geoProjection(Q).scale(152.63)},t.geoSinusoidalRaw=Q,t.geoStitch=function(t){if(null==t)return t;switch(t.type){case\"Feature\":return wr(t);case\"FeatureCollection\":var e={type:\"FeatureCollection\",features:t.features.map(wr)};return null!=t.bbox&&(e.bbox=t.bbox),e;default:return Tr(t)}},t.geoTimes=function(){return e.geoProjection(kr).scale(146.153)},t.geoTimesRaw=kr,t.geoTwoPointAzimuthal=Sr,t.geoTwoPointAzimuthalRaw=Mr,t.geoTwoPointAzimuthalUsa=function(){return Sr([-158,21.5],[-77,39]).clipAngle(60).scale(400)},t.geoTwoPointEquidistant=Lr,t.geoTwoPointEquidistantRaw=Er,t.geoTwoPointEquidistantUsa=function(){return Lr([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},t.geoVanDerGrinten=function(){return e.geoProjection(Cr).scale(79.4183)},t.geoVanDerGrintenRaw=Cr,t.geoVanDerGrinten2=function(){return e.geoProjection(Pr).scale(79.4183)},t.geoVanDerGrinten2Raw=Pr,t.geoVanDerGrinten3=function(){return e.geoProjection(Ir).scale(79.4183)},t.geoVanDerGrinten3Raw=Ir,t.geoVanDerGrinten4=function(){return e.geoProjection(Or).scale(127.16)},t.geoVanDerGrinten4Raw=Or,t.geoWagner=Dr,t.geoWagner7=function(){return Dr().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},t.geoWagnerRaw=zr,t.geoWagner4=function(){return e.geoProjection(Br).scale(176.84)},t.geoWagner4Raw=Br,t.geoWagner6=function(){return e.geoProjection(Nr).scale(152.63)},t.geoWagner6Raw=Nr,t.geoWiechel=function(){return e.geoProjection(jr).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},t.geoWiechelRaw=jr,t.geoWinkel3=function(){return e.geoProjection(Ur).scale(158.837)},t.geoWinkel3Raw=Ur,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{\"d3-array\":107,\"d3-geo\":114}],114:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-array\")):i((n=n||self).d3=n.d3||{},n.d3)}(this,(function(t,e){\"use strict\";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(t){a(i,t,this.t),a(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new n;function a(t,e,r){var n=t.s=e+r,i=n-e,a=n-i;t.t=e-a+(r-i)}var o=1e-6,s=Math.PI,l=s/2,c=s/4,u=2*s,f=180/s,h=s/180,p=Math.abs,d=Math.atan,g=Math.atan2,m=Math.cos,v=Math.ceil,y=Math.exp,x=Math.log,b=Math.pow,_=Math.sin,w=Math.sign||function(t){return t>0?1:t<0?-1:0},T=Math.sqrt,k=Math.tan;function A(t){return t>1?0:t<-1?s:Math.acos(t)}function M(t){return t>1?l:t<-1?-l:Math.asin(t)}function S(t){return(t=_(t/2))*t}function E(){}function L(t,e){t&&P.hasOwnProperty(t.type)&&P[t.type](t,e)}var C={Feature:function(t,e){L(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n=0?1:-1,i=n*r,a=m(e=(e*=h)/2+c),o=_(e),s=N*o,l=B*a+s*m(i),u=s*n*_(i);j.add(g(u,l)),F=t,B=a,N=o}function W(t){return[g(t[1],t[0]),M(t[2])]}function X(t){var e=t[0],r=t[1],n=m(r);return[n*m(e),n*_(e),_(r)]}function Z(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function J(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 K(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Q(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function $(t){var e=T(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var tt,et,rt,nt,it,at,ot,st,lt,ct,ut,ft,ht,pt,dt,gt,mt,vt,yt,xt,bt,_t,wt,Tt,kt,At,Mt=r(),St={point:Et,lineStart:Ct,lineEnd:Pt,polygonStart:function(){St.point=It,St.lineStart=Ot,St.lineEnd=zt,Mt.reset(),V.polygonStart()},polygonEnd:function(){V.polygonEnd(),St.point=Et,St.lineStart=Ct,St.lineEnd=Pt,j<0?(tt=-(rt=180),et=-(nt=90)):Mt>o?nt=90:Mt<-o&&(et=-90),ct[0]=tt,ct[1]=rt},sphere:function(){tt=-(rt=180),et=-(nt=90)}};function Et(t,e){lt.push(ct=[tt=t,rt=t]),ent&&(nt=e)}function Lt(t,e){var r=X([t*h,e*h]);if(st){var n=J(st,r),i=J([n[1],-n[0],0],n);$(i),i=W(i);var a,o=t-it,s=o>0?1:-1,l=i[0]*f*s,c=p(o)>180;c^(s*itnt&&(nt=a):c^(s*it<(l=(l+360)%360-180)&&lnt&&(nt=e)),c?tDt(tt,rt)&&(rt=t):Dt(t,rt)>Dt(tt,rt)&&(tt=t):rt>=tt?(trt&&(rt=t)):t>it?Dt(tt,t)>Dt(tt,rt)&&(rt=t):Dt(t,rt)>Dt(tt,rt)&&(tt=t)}else lt.push(ct=[tt=t,rt=t]);ent&&(nt=e),st=r,it=t}function Ct(){St.point=Lt}function Pt(){ct[0]=tt,ct[1]=rt,St.point=Et,st=null}function It(t,e){if(st){var r=t-it;Mt.add(p(r)>180?r+(r>0?360:-360):r)}else at=t,ot=e;V.point(t,e),Lt(t,e)}function Ot(){V.lineStart()}function zt(){It(at,ot),V.lineEnd(),p(Mt)>o&&(tt=-(rt=180)),ct[0]=tt,ct[1]=rt,st=null}function Dt(t,e){return(e-=t)<0?e+360:e}function Rt(t,e){return t[0]-e[0]}function Ft(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:es?t+Math.round(-t/u)*u:t,e]}function Qt(t,e,r){return(t%=u)?e||r?Jt(te(t),ee(e,r)):te(t):e||r?ee(e,r):Kt}function $t(t){return function(e,r){return[(e+=t)>s?e-u:e<-s?e+u:e,r]}}function te(t){var e=$t(t);return e.invert=$t(-t),e}function ee(t,e){var r=m(t),n=_(t),i=m(e),a=_(e);function o(t,e){var o=m(e),s=m(t)*o,l=_(t)*o,c=_(e),u=c*r+s*n;return[g(l*i-u*a,s*r-c*n),M(u*i+l*a)]}return o.invert=function(t,e){var o=m(e),s=m(t)*o,l=_(t)*o,c=_(e),u=c*i-l*a;return[g(l*i+c*a,s*r+u*n),M(u*r-s*n)]},o}function re(t){function e(e){return(e=t(e[0]*h,e[1]*h))[0]*=f,e[1]*=f,e}return t=Qt(t[0]*h,t[1]*h,t.length>2?t[2]*h:0),e.invert=function(e){return(e=t.invert(e[0]*h,e[1]*h))[0]*=f,e[1]*=f,e},e}function ne(t,e,r,n,i,a){if(r){var o=m(e),s=_(e),l=n*r;null==i?(i=e+n*u,a=e-l/2):(i=ie(o,i),a=ie(o,a),(n>0?ia)&&(i+=n*u));for(var c,f=i;n>0?f>a:f1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}function oe(t,e){return p(t[0]-e[0])=0;--a)i.point((f=u[a])[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 ce(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n=0?1:-1,z=O*I,D=z>s,R=T*C;if(ue.add(g(R*O*_(z),k*P+R*m(z))),f+=D?I+O*u:I,D^b>=r^E>=r){var F=J(X(x),X(S));$(F);var B=J(a,F);$(B);var N=(D^I>=0?-1:1)*M(B[2]);(n>N||n===N&&(F[0]||F[1]))&&(h+=D^I>=0?1:-1)}}return(f<-o||f0){for(h||(a.polygonStart(),h=!0),a.lineStart(),t=0;t1&&2&i&&c.push(c.pop().concat(c.shift())),s.push(c.filter(de))}return p}}function de(t){return t.length>1}function ge(t,e){return((t=t.x)[0]<0?t[1]-l-o:l-t[1])-((e=e.x)[0]<0?e[1]-l-o:l-e[1])}var me=pe((function(){return!0}),(function(t){var e,r=NaN,n=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,c){var u=a>0?s:-s,f=p(a-r);p(f-s)0?l:-l),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(u,n),t.point(a,n),e=0):i!==u&&f>=s&&(p(r-i)o?d((_(e)*(a=m(n))*_(r)-_(n)*(i=m(e))*_(t))/(i*a*s)):(e+n)/2}(r,n,a,c),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(u,n),e=0),t.point(r=a,n=c),i=u},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}}),(function(t,e,r,n){var i;if(null==t)i=r*l,n.point(-s,i),n.point(0,i),n.point(s,i),n.point(s,0),n.point(s,-i),n.point(0,-i),n.point(-s,-i),n.point(-s,0),n.point(-s,i);else if(p(t[0]-e[0])>o){var a=t[0]0,i=p(e)>o;function a(t,r){return m(t)*m(r)>e}function l(t,r,n){var i=[1,0,0],a=J(X(t),X(r)),l=Z(a,a),c=a[0],u=l-c*c;if(!u)return!n&&t;var f=e*l/u,h=-e*c/u,d=J(i,a),g=Q(i,f);K(g,Q(a,h));var m=d,v=Z(g,m),y=Z(m,m),x=v*v-y*(Z(g,g)-1);if(!(x<0)){var b=T(x),_=Q(m,(-v-b)/y);if(K(_,g),_=W(_),!n)return _;var w,k=t[0],A=r[0],M=t[1],S=r[1];A0^_[1]<(p(_[0]-k)s^(k<=_[0]&&_[0]<=A)){var C=Q(m,(-v+b)/y);return K(C,g),[_,W(C)]}}}function c(e,r){var i=n?t:s-t,a=0;return e<-i?a|=1:e>i&&(a|=2),r<-i?a|=4:r>i&&(a|=8),a}return pe(a,(function(t){var e,r,o,u,f;return{lineStart:function(){u=o=!1,f=1},point:function(h,p){var d,g=[h,p],m=a(h,p),v=n?m?0:c(h,p):m?c(h+(h<0?s:-s),p):0;if(!e&&(u=o=m)&&t.lineStart(),m!==o&&(!(d=l(e,g))||oe(e,d)||oe(g,d))&&(g[2]=1),m!==o)f=0,m?(t.lineStart(),d=l(g,e),t.point(d[0],d[1])):(d=l(e,g),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&n^m){var y;v&r||!(y=l(g,e,!0))||(f=0,n?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!m||e&&oe(e,g)||t.point(g[0],g[1]),e=g,o=m,r=v},lineEnd:function(){o&&t.lineEnd(),e=null},clean:function(){return f|(u&&o)<<1}}}),(function(e,n,i,a){ne(a,t,r,i,e,n)}),n?[0,-t]:[-s,t-s])}function ye(t,r,n,i){function a(e,a){return t<=e&&e<=n&&r<=a&&a<=i}function s(e,a,o,s){var c=0,f=0;if(null==e||(c=l(e,o))!==(f=l(a,o))||u(e,a)<0^o>0)do{s.point(0===c||3===c?t:n,c>1?i:r)}while((c=(c+o+4)%4)!==f);else s.point(a[0],a[1])}function l(e,i){return p(e[0]-t)0?0:3:p(e[0]-n)0?2:1:p(e[1]-r)0?1:0:i>0?3:2}function c(t,e){return u(t.x,e.x)}function u(t,e){var r=l(t,1),n=l(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]}return function(o){var l,u,f,h,p,d,g,m,v,y,x,b=o,_=ae(),w={point:T,lineStart:function(){w.point=k,u&&u.push(f=[]);y=!0,v=!1,g=m=NaN},lineEnd:function(){l&&(k(h,p),d&&v&&_.rejoin(),l.push(_.result()));w.point=T,v&&b.lineEnd()},polygonStart:function(){b=_,l=[],u=[],x=!0},polygonEnd:function(){var r=function(){for(var e=0,r=0,n=u.length;ri&&(h-a)*(i-o)>(p-o)*(t-a)&&++e:p<=i&&(h-a)*(i-o)<(p-o)*(t-a)&&--e;return e}(),n=x&&r,a=(l=e.merge(l)).length;(n||a)&&(o.polygonStart(),n&&(o.lineStart(),s(null,null,1,o),o.lineEnd()),a&&le(l,c,r,s,o),o.polygonEnd());b=o,l=u=f=null}};function T(t,e){a(t,e)&&b.point(t,e)}function k(e,o){var s=a(e,o);if(u&&f.push([e,o]),y)h=e,p=o,d=s,y=!1,s&&(b.lineStart(),b.point(e,o));else if(s&&v)b.point(e,o);else{var l=[g=Math.max(-1e9,Math.min(1e9,g)),m=Math.max(-1e9,Math.min(1e9,m))],c=[e=Math.max(-1e9,Math.min(1e9,e)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,r,n,i,a){var o,s=t[0],l=t[1],c=0,u=1,f=e[0]-s,h=e[1]-l;if(o=r-s,f||!(o>0)){if(o/=f,f<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=i-s,f||!(o<0)){if(o/=f,f<0){if(o>u)return;o>c&&(c=o)}else if(f>0){if(o0)){if(o/=h,h<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=a-l,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>c&&(c=o)}else if(h>0){if(o0&&(t[0]=s+c*f,t[1]=l+c*h),u<1&&(e[0]=s+u*f,e[1]=l+u*h),!0}}}}}(l,c,t,r,n,i)?s&&(b.lineStart(),b.point(e,o),x=!1):(v||(b.lineStart(),b.point(l[0],l[1])),b.point(c[0],c[1]),s||b.lineEnd(),x=!1)}g=e,m=o,v=s}return w}}var xe,be,_e,we=r(),Te={sphere:E,point:E,lineStart:function(){Te.point=Ae,Te.lineEnd=ke},lineEnd:E,polygonStart:E,polygonEnd:E};function ke(){Te.point=Te.lineEnd=E}function Ae(t,e){xe=t*=h,be=_(e*=h),_e=m(e),Te.point=Me}function Me(t,e){t*=h;var r=_(e*=h),n=m(e),i=p(t-xe),a=m(i),o=n*_(i),s=_e*r-be*n*a,l=be*r+_e*n*a;we.add(g(T(o*o+s*s),l)),xe=t,be=r,_e=n}function Se(t){return we.reset(),z(t,Te),+we}var Ee=[null,null],Le={type:\"LineString\",coordinates:Ee};function Ce(t,e){return Ee[0]=t,Ee[1]=e,Se(Le)}var Pe={Feature:function(t,e){return Oe(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n0&&(i=Ce(t[a],t[a-1]))>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))<1e-12*i)return!0;r=n}return!1}function Re(t,e){return!!he(t.map(Fe),Be(e))}function Fe(t){return(t=t.map(Be)).pop(),t}function Be(t){return[t[0]*h,t[1]*h]}function Ne(t,r,n){var i=e.range(t,r-o,n).concat(r);return function(t){return i.map((function(e){return[t,e]}))}}function je(t,r,n){var i=e.range(t,r-o,n).concat(r);return function(t){return i.map((function(e){return[e,t]}))}}function Ue(){var t,r,n,i,a,s,l,c,u,f,h,d,g=10,m=g,y=90,x=360,b=2.5;function _(){return{type:\"MultiLineString\",coordinates:w()}}function w(){return e.range(v(i/y)*y,n,y).map(h).concat(e.range(v(c/x)*x,l,x).map(d)).concat(e.range(v(r/g)*g,t,g).filter((function(t){return p(t%y)>o})).map(u)).concat(e.range(v(s/m)*m,a,m).filter((function(t){return p(t%x)>o})).map(f))}return _.lines=function(){return w().map((function(t){return{type:\"LineString\",coordinates:t}}))},_.outline=function(){return{type:\"Polygon\",coordinates:[h(i).concat(d(l).slice(1),h(n).reverse().slice(1),d(c).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],c=+t[0][1],l=+t[1][1],i>n&&(t=i,i=n,n=t),c>l&&(t=c,c=l,l=t),_.precision(b)):[[i,c],[n,l]]},_.extentMinor=function(e){return arguments.length?(r=+e[0][0],t=+e[1][0],s=+e[0][1],a=+e[1][1],r>t&&(e=r,r=t,t=e),s>a&&(e=s,s=a,a=e),_.precision(b)):[[r,s],[t,a]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(y=+t[0],x=+t[1],_):[y,x]},_.stepMinor=function(t){return arguments.length?(g=+t[0],m=+t[1],_):[g,m]},_.precision=function(e){return arguments.length?(b=+e,u=Ne(s,a,90),f=je(r,t,b),h=Ne(c,l,90),d=je(i,n,b),_):b},_.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function Ve(t){return t}var He,qe,Ge,Ye,We=r(),Xe=r(),Ze={point:E,lineStart:E,lineEnd:E,polygonStart:function(){Ze.lineStart=Je,Ze.lineEnd=$e},polygonEnd:function(){Ze.lineStart=Ze.lineEnd=Ze.point=E,We.add(p(Xe)),Xe.reset()},result:function(){var t=We/2;return We.reset(),t}};function Je(){Ze.point=Ke}function Ke(t,e){Ze.point=Qe,He=Ge=t,qe=Ye=e}function Qe(t,e){Xe.add(Ye*t-Ge*e),Ge=t,Ye=e}function $e(){Qe(He,qe)}var tr=1/0,er=tr,rr=-tr,nr=rr,ir={point:function(t,e){trr&&(rr=t);enr&&(nr=e)},lineStart:E,lineEnd:E,polygonStart:E,polygonEnd:E,result:function(){var t=[[tr,er],[rr,nr]];return rr=nr=-(er=tr=1/0),t}};var ar,or,sr,lr,cr=0,ur=0,fr=0,hr=0,pr=0,dr=0,gr=0,mr=0,vr=0,yr={point:xr,lineStart:br,lineEnd:Tr,polygonStart:function(){yr.lineStart=kr,yr.lineEnd=Ar},polygonEnd:function(){yr.point=xr,yr.lineStart=br,yr.lineEnd=Tr},result:function(){var t=vr?[gr/vr,mr/vr]:dr?[hr/dr,pr/dr]:fr?[cr/fr,ur/fr]:[NaN,NaN];return cr=ur=fr=hr=pr=dr=gr=mr=vr=0,t}};function xr(t,e){cr+=t,ur+=e,++fr}function br(){yr.point=_r}function _r(t,e){yr.point=wr,xr(sr=t,lr=e)}function wr(t,e){var r=t-sr,n=e-lr,i=T(r*r+n*n);hr+=i*(sr+t)/2,pr+=i*(lr+e)/2,dr+=i,xr(sr=t,lr=e)}function Tr(){yr.point=xr}function kr(){yr.point=Mr}function Ar(){Sr(ar,or)}function Mr(t,e){yr.point=Sr,xr(ar=sr=t,or=lr=e)}function Sr(t,e){var r=t-sr,n=e-lr,i=T(r*r+n*n);hr+=i*(sr+t)/2,pr+=i*(lr+e)/2,dr+=i,gr+=(i=lr*t-sr*e)*(sr+t),mr+=i*(lr+e),vr+=3*i,xr(sr=t,lr=e)}function Er(t){this._context=t}Er.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,u)}},result:E};var Lr,Cr,Pr,Ir,Or,zr=r(),Dr={point:E,lineStart:function(){Dr.point=Rr},lineEnd:function(){Lr&&Fr(Cr,Pr),Dr.point=E},polygonStart:function(){Lr=!0},polygonEnd:function(){Lr=null},result:function(){var t=+zr;return zr.reset(),t}};function Rr(t,e){Dr.point=Fr,Cr=Ir=t,Pr=Or=e}function Fr(t,e){Ir-=t,Or-=e,zr.add(T(Ir*Ir+Or*Or)),Ir=t,Or=e}function Br(){this._string=[]}function Nr(t){return\"m0,\"+t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+-2*t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+2*t+\"z\"}function jr(t){return function(e){var r=new Ur;for(var n in t)r[n]=t[n];return r.stream=e,r}}function Ur(){}function Vr(t,e,r){var n=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=n&&t.clipExtent(null),z(r,t.stream(ir)),e(ir.result()),null!=n&&t.clipExtent(n),t}function Hr(t,e,r){return Vr(t,(function(r){var n=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(n/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),o=+e[0][0]+(n-a*(r[1][0]+r[0][0]))/2,s=+e[0][1]+(i-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([o,s])}),r)}function qr(t,e,r){return Hr(t,[[0,0],e],r)}function Gr(t,e,r){return Vr(t,(function(r){var n=+e,i=n/(r[1][0]-r[0][0]),a=(n-i*(r[1][0]+r[0][0]))/2,o=-i*r[0][1];t.scale(150*i).translate([a,o])}),r)}function Yr(t,e,r){return Vr(t,(function(r){var n=+e,i=n/(r[1][1]-r[0][1]),a=-i*r[0][0],o=(n-i*(r[1][1]+r[0][1]))/2;t.scale(150*i).translate([a,o])}),r)}Br.prototype={_radius:4.5,_circle:Nr(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push(\"Z\"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push(\"M\",t,\",\",e),this._point=1;break;case 1:this._string.push(\"L\",t,\",\",e);break;default:null==this._circle&&(this._circle=Nr(this._radius)),this._string.push(\"M\",t,\",\",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join(\"\");return this._string=[],t}return null}},Ur.prototype={constructor:Ur,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()}};var Wr=m(30*h);function Xr(t,e){return+e?function(t,e){function r(n,i,a,s,l,c,u,f,h,d,m,v,y,x){var b=u-n,_=f-i,w=b*b+_*_;if(w>4*e&&y--){var k=s+d,A=l+m,S=c+v,E=T(k*k+A*A+S*S),L=M(S/=E),C=p(p(S)-1)e||p((b*z+_*D)/w-.5)>.3||s*d+l*m+c*v2?t[2]%360*h:0,I()):[y*f,x*f,b*f]},C.angle=function(t){return arguments.length?(_=t%360*h,I()):_*f},C.reflectX=function(t){return arguments.length?(w=t?-1:1,I()):w<0},C.reflectY=function(t){return arguments.length?(k=t?-1:1,I()):k<0},C.precision=function(t){return arguments.length?(o=Xr(s,L=t*t),O()):T(L)},C.fitExtent=function(t,e){return Hr(C,t,e)},C.fitSize=function(t,e){return qr(C,t,e)},C.fitWidth=function(t,e){return Gr(C,t,e)},C.fitHeight=function(t,e){return Yr(C,t,e)},function(){return e=t.apply(this,arguments),C.invert=e.invert&&P,I()}}function tn(t){var e=0,r=s/3,n=$r(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*h,r=t[1]*h):[e*f,r*f]},i}function en(t,e){var r=_(t),n=(r+_(e))/2;if(p(n)0?e<-l+o&&(e=-l+o):e>l-o&&(e=l-o);var r=i/b(fn(e),n);return[r*_(n*t),i-r*m(n*t)]}return a.invert=function(t,e){var r=i-e,a=w(n)*T(t*t+r*r),o=g(t,p(r))*w(r);return r*n<0&&(o-=s*w(t)*w(r)),[o/n,2*d(b(i/a,1/n))-l]},a}function pn(t,e){return[t,e]}function dn(t,e){var r=m(t),n=t===e?_(t):(r-m(e))/(e-t),i=r/n+t;if(p(n)o&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},Tn.invert=on(M),kn.invert=on((function(t){return 2*d(t)})),An.invert=function(t,e){return[-e,2*d(y(t))-l]},t.geoAlbers=nn,t.geoAlbersUsa=function(){var t,e,r,n,i,a,s=nn(),l=rn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=rn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){a=[t,e]}};function f(t){var e=t[0],o=t[1];return a=null,r.point(e,o),a||(n.point(e,o),a)||(i.point(e,o),a)}function h(){return t=e=null,f}return f.invert=function(t){var e=s.scale(),r=s.translate(),n=(t[0]-r[0])/e,i=(t[1]-r[1])/e;return(i>=.12&&i<.234&&n>=-.425&&n<-.214?l:i>=.166&&i<.234&&n>=-.214&&n<-.115?c:s).invert(t)},f.stream=function(r){return t&&e===r?t:(n=[s.stream(e=r),l.stream(r),c.stream(r)],i=n.length,t={point:function(t,e){for(var r=-1;++rDt(n[0],n[1])&&(n[1]=i[1]),Dt(i[0],n[1])>Dt(n[0],n[1])&&(n[0]=i[0])):a.push(n=i);for(o=-1/0,e=0,n=a[r=a.length-1];e<=r;n=i,++e)i=a[e],(s=Dt(n[1],i[0]))>o&&(o=s,tt=i[0],rt=n[1])}return lt=ct=null,tt===1/0||et===1/0?[[NaN,NaN],[NaN,NaN]]:[[tt,et],[rt,nt]]},t.geoCentroid=function(t){ut=ft=ht=pt=dt=gt=mt=vt=yt=xt=bt=0,z(t,Bt);var e=yt,r=xt,n=bt,i=e*e+r*r+n*n;return i<1e-12&&(e=gt,r=mt,n=vt,ft2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90]).scale(159.155)},t.geoTransverseMercatorRaw=An,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{\"d3-array\":107}],115:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){\"use strict\";function e(t,e){return t.parent===e.parent?1:2}function r(t,e){return t+e.x}function n(t,e){return Math.max(t,e.y)}function i(t){var e=0,r=t.children,n=r&&r.length;if(n)for(;--n>=0;)e+=r[n].value;else e=1;t.value=e}function a(t,e){var r,n,i,a,s,u=new c(t),f=+t.value&&(u.value=t.value),h=[u];for(null==e&&(e=o);r=h.pop();)if(f&&(r.value=+r.data.value),(i=e(r.data))&&(s=i.length))for(r.children=new Array(s),a=s-1;a>=0;--a)h.push(n=r.children[a]=new c(i[a])),n.parent=r,n.depth=r.depth+1;return u.eachBefore(l)}function o(t){return t.children}function s(t){t.data=t.data.data}function l(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function c(t){this.data=t,this.depth=this.height=0,this.parent=null}c.prototype=a.prototype={constructor:c,count:function(){return this.eachAfter(i)},each:function(t){var e,r,n,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),r=a.children)for(n=0,i=r.length;n=0;--r)i.push(e[r]);return this},sum:function(t){return this.eachAfter((function(e){for(var r=+t(e.data)||0,n=e.children,i=n&&n.length;--i>=0;)r+=n[i].value;e.value=r}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),i=null;t=r.pop(),e=n.pop();for(;t===e;)i=t,t=r.pop(),e=n.pop();return i}(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var i=n.length;t!==r;)n.splice(i,0,t),t=t.parent;return n},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(r){r!==t&&e.push({source:r.parent,target:r})})),e},copy:function(){return a(this).eachBefore(s)}};var u=Array.prototype.slice;function f(t){for(var e,r,n=0,i=(t=function(t){for(var e,r,n=t.length;n;)r=Math.random()*n--|0,e=t[n],t[n]=t[r],t[r]=e;return t}(u.call(t))).length,a=[];n0&&r*r>n*n+i*i}function g(t,e){for(var r=0;r(o*=o)?(n=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-n*n)),r.x=t.x-n*s-a*l,r.y=t.y-n*l+a*s):(n=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-n*n)),r.x=e.x+n*s-a*l,r.y=e.y+n*l+a*s)):(r.x=e.x+r.r,r.y=e.y)}function b(t,e){var r=t.r+e.r-1e-6,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function _(t){var e=t._,r=t.next._,n=e.r+r.r,i=(e.x*r.r+r.x*e.r)/n,a=(e.y*r.r+r.y*e.r)/n;return i*i+a*a}function w(t){this._=t,this.next=null,this.previous=null}function T(t){if(!(i=t.length))return 0;var e,r,n,i,a,o,s,l,c,u,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(r=t[1],e.x=-r.r,r.x=e.r,r.y=0,!(i>2))return e.r+r.r;x(r,e,n=t[2]),e=new w(e),r=new w(r),n=new w(n),e.next=n.previous=r,r.next=e.previous=n,n.next=r.previous=e;t:for(s=3;sh&&(h=s),m=u*u*g,(p=Math.max(h/m,m/f))>d){u-=s;break}d=p}v.push(o={value:u,dice:l1?e:1)},r}(G);var X=function t(e){function r(t,r,n,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,l,c,u,f=-1,h=o.length,p=t.value;++f1?e:1)},r}(G);t.cluster=function(){var t=e,i=1,a=1,o=!1;function s(e){var s,l=0;e.eachAfter((function(e){var i=e.children;i?(e.x=function(t){return t.reduce(r,0)/t.length}(i),e.y=function(t){return 1+t.reduce(n,0)}(i)):(e.x=s?l+=t(e,s):0,e.y=0,s=e)}));var c=function(t){for(var e;e=t.children;)t=e[0];return t}(e),u=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),f=c.x-t(c,u)/2,h=u.x+t(u,c)/2;return e.eachAfter(o?function(t){t.x=(t.x-e.x)*i,t.y=(e.y-t.y)*a}:function(t){t.x=(t.x-f)/(h-f)*i,t.y=(1-(e.y?t.y/e.y:1))*a})}return s.separation=function(e){return arguments.length?(t=e,s):t},s.size=function(t){return arguments.length?(o=!1,i=+t[0],a=+t[1],s):o?null:[i,a]},s.nodeSize=function(t){return arguments.length?(o=!0,i=+t[0],a=+t[1],s):o?[i,a]:null},s},t.hierarchy=a,t.pack=function(){var t=null,e=1,r=1,n=M;function i(i){return i.x=e/2,i.y=r/2,t?i.eachBefore(L(t)).eachAfter(C(n,.5)).eachBefore(P(1)):i.eachBefore(L(E)).eachAfter(C(M,1)).eachAfter(C(n,i.r/Math.min(e,r))).eachBefore(P(Math.min(e,r)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=k(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],r=+t[1],i):[e,r]},i.padding=function(t){return arguments.length?(n=\"function\"==typeof t?t:S(+t),i):n},i},t.packEnclose=f,t.packSiblings=function(t){return T(t),t},t.partition=function(){var t=1,e=1,r=0,n=!1;function i(i){var a=i.height+1;return i.x0=i.y0=r,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(n){n.children&&O(n,n.x0,t*(n.depth+1)/e,n.x1,t*(n.depth+2)/e);var i=n.x0,a=n.y0,o=n.x1-r,s=n.y1-r;o0)throw new Error(\"cycle\");return a}return r.id=function(e){return arguments.length?(t=A(e),r):t},r.parentId=function(t){return arguments.length?(e=A(t),r):e},r},t.tree=function(){var t=B,e=1,r=1,n=null;function i(i){var l=function(t){for(var e,r,n,i,a,o=new H(t,0),s=[o];e=s.pop();)if(n=e._.children)for(e.children=new Array(a=n.length),i=a-1;i>=0;--i)s.push(r=e.children[i]=new H(n[i],i)),r.parent=e;return(o.parent=new H(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),n)i.eachBefore(s);else{var c=i,u=i,f=i;i.eachBefore((function(t){t.xu.x&&(u=t),t.depth>f.depth&&(f=t)}));var h=c===u?1:t(c,u)/2,p=h-c.x,d=e/(u.x+h+p),g=r/(f.depth||1);i.eachBefore((function(t){t.x=(t.x+p)*d,t.y=t.depth*g}))}return i}function a(e){var r=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(r){!function(t){for(var e,r=0,n=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(e);var a=(r[0].z+r[r.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,r,n){if(r){for(var i,a=e,o=e,s=r,l=a.parent.children[0],c=a.m,u=o.m,f=s.m,h=l.m;s=j(s),a=N(a),s&&a;)l=N(l),(o=j(o)).a=e,(i=s.z+f-a.z-c+t(s._,a._))>0&&(U(V(s,e,n),e,i),c+=i,u+=i),f+=s.m,c+=a.m,h+=l.m,u+=o.m;s&&!j(o)&&(o.t=s,o.m+=f-u),a&&!N(l)&&(l.t=a,l.m+=c-h,n=e)}return n}(e,i,e.parent.A||n[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*r}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(n=!1,e=+t[0],r=+t[1],i):n?null:[e,r]},i.nodeSize=function(t){return arguments.length?(n=!0,e=+t[0],r=+t[1],i):n?[e,r]:null},i},t.treemap=function(){var t=W,e=!1,r=1,n=1,i=[0],a=M,o=M,s=M,l=M,c=M;function u(t){return t.x0=t.y0=0,t.x1=r,t.y1=n,t.eachBefore(f),i=[0],e&&t.eachBefore(I),t}function f(e){var r=i[e.depth],n=e.x0+r,u=e.y0+r,f=e.x1-r,h=e.y1-r;f=r-1){var u=s[e];return u.x0=i,u.y0=a,u.x1=o,void(u.y1=l)}var f=c[e],h=n/2+f,p=e+1,d=r-1;for(;p>>1;c[g]l-a){var y=(i*v+o*m)/n;t(e,p,m,i,a,y,l),t(p,r,v,y,a,o,l)}else{var x=(a*v+l*m)/n;t(e,p,m,i,a,o,x),t(p,r,v,i,x,o,l)}}(0,l,t.value,e,r,n,i)},t.treemapDice=O,t.treemapResquarify=X,t.treemapSlice=q,t.treemapSliceDice=function(t,e,r,n,i){(1&t.depth?q:O)(t,e,r,n,i)},t.treemapSquarify=W,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],116:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-color\")):i((n=n||self).d3=n.d3||{},n.d3)}(this,(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=i180||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;na&&(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:y(r,n)})),a=_.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+\"rotate(\",null,n)-2,x:y(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:y(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:y(t,r)},{i:s-2,x:y(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;++r1e-6)if(Math.abs(f*l-c*u)>1e-6&&a){var p=n-o,d=i-s,g=l*l+c*c,m=p*p+d*d,v=Math.sqrt(g),y=Math.sqrt(h),x=a*Math.tan((e-Math.acos((g+h-m)/(2*v*y)))/2),b=x/y,_=x/v;Math.abs(b-1)>1e-6&&(this._+=\"L\"+(t+b*u)+\",\"+(r+b*f)),this._+=\"A\"+a+\",\"+a+\",0,0,\"+ +(f*p>u*d)+\",\"+(this._x1=t+_*l)+\",\"+(this._y1=r+_*c)}else this._+=\"L\"+(this._x1=t)+\",\"+(this._y1=r);else;},arc:function(t,i,a,o,s,l){t=+t,i=+i,l=!!l;var c=(a=+a)*Math.cos(o),u=a*Math.sin(o),f=t+c,h=i+u,p=1^l,d=l?o-s:s-o;if(a<0)throw new Error(\"negative radius: \"+a);null===this._x1?this._+=\"M\"+f+\",\"+h:(Math.abs(this._x1-f)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+=\"L\"+f+\",\"+h),a&&(d<0&&(d=d%r+r),d>n?this._+=\"A\"+a+\",\"+a+\",0,1,\"+p+\",\"+(t-c)+\",\"+(i-u)+\"A\"+a+\",\"+a+\",0,1,\"+p+\",\"+(this._x1=f)+\",\"+(this._y1=h):d>1e-6&&(this._+=\"A\"+a+\",\"+a+\",0,\"+ +(d>=e)+\",\"+p+\",\"+(this._x1=t+a*Math.cos(s))+\",\"+(this._y1=i+a*Math.sin(s))))},rect:function(t,e,r,n){this._+=\"M\"+(this._x0=this._x1=+t)+\",\"+(this._y0=this._y1=+e)+\"h\"+ +r+\"v\"+ +n+\"h\"+-r+\"Z\"},toString:function(){return this._}},t.path=a,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],118:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(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,m=t._y0,v=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(a=(g+v)/2))?g=a:v=a,(u=r>=(o=(m+y)/2))?m=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+v)/2))?g=a:v=a,(u=r>=(o=(m+y)/2))?m=o:y=o}while((f=u<<1|c)==(h=(l>=o)<<1|s>=a));return i[h]=p,i[f]=d,t}function r(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;nf&&(f=i),ah&&(h=a));if(c>f||u>h)return this;for(this.cover(c,u).cover(f,h),n=0;nt||t>=i||n>e||e>=a;)switch(s=(ep||(o=c.y0)>d||(s=c.x1)=y)<<1|t>=v)&&(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,m.data),b=e-+this._y.call(null,m.data),_=x*x+b*b;if(_=(s=(d+m)/2))?d=s:m=s,(u=o>=(l=(g+v)/2))?g=l:v=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;e1?0:t<-1?u:Math.acos(t)}function d(t){return t>=1?f:t<=-1?-f:Math.asin(t)}function g(t){return t.innerRadius}function m(t){return t.outerRadius}function v(t){return t.startAngle}function y(t){return t.endAngle}function x(t){return t&&t.padAngle}function b(t,e,r,n,i,a,o,s){var l=r-t,c=n-e,u=o-i,f=s-a,h=f*l-u*c;if(!(h*h<1e-12))return[t+(h=(u*(e-a)-f*(t-i))/h)*l,e+h*c]}function _(t,e,r,n,i,a,s){var l=t-r,u=e-n,f=(s?a:-a)/c(l*l+u*u),h=f*u,p=-f*l,d=t+h,g=e+p,m=r+h,v=n+p,y=(d+m)/2,x=(g+v)/2,b=m-d,_=v-g,w=b*b+_*_,T=i-a,k=d*v-m*g,A=(_<0?-1:1)*c(o(0,T*T*w-k*k)),M=(k*_-b*A)/w,S=(-k*b-_*A)/w,E=(k*_+b*A)/w,L=(-k*b+_*A)/w,C=M-y,P=S-x,I=E-y,O=L-x;return C*C+P*P>I*I+O*O&&(M=E,S=L),{cx:M,cy:S,x01:-h,y01:-p,x11:M*(i/T-1),y11:S*(i/T-1)}}function w(t){this._context=t}function T(t){return new w(t)}function k(t){return t[0]}function A(t){return t[1]}function M(){var t=k,n=A,i=r(!0),a=null,o=T,s=null;function l(r){var l,c,u,f=r.length,h=!1;for(null==a&&(s=o(u=e.path())),l=0;l<=f;++l)!(l=f;--h)c.point(v[h],y[h]);c.lineEnd(),c.areaEnd()}m&&(v[u]=+t(p,u,r),y[u]=+i(p,u,r),c.point(n?+n(p,u,r):v[u],a?+a(p,u,r):y[u]))}if(d)return c=null,d+\"\"||null}function f(){return M().defined(o).curve(l).context(s)}return u.x=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),n=null,u):t},u.x0=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),u):t},u.x1=function(t){return arguments.length?(n=null==t?null:\"function\"==typeof t?t:r(+t),u):n},u.y=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),a=null,u):i},u.y0=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),u):i},u.y1=function(t){return arguments.length?(a=null==t?null:\"function\"==typeof t?t:r(+t),u):a},u.lineX0=u.lineY0=function(){return f().x(t).y(i)},u.lineY1=function(){return f().x(t).y(a)},u.lineX1=function(){return f().x(n).y(i)},u.defined=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(!!t),u):o},u.curve=function(t){return arguments.length?(l=t,null!=s&&(c=l(s)),u):l},u.context=function(t){return arguments.length?(null==t?s=c=null:c=l(s=t),u):s},u}function E(t,e){return et?1:e>=t?0:NaN}function L(t){return t}w.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var C=I(T);function P(t){this._curve=t}function I(t){function e(e){return new P(t(e))}return e._curve=t,e}function O(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(I(t)):e()._curve},t}function z(){return O(M().curve(C))}function D(){var t=S().curve(C),e=t.curve,r=t.lineX0,n=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return O(r())},delete t.lineX0,t.lineEndAngle=function(){return O(n())},delete t.lineX1,t.lineInnerRadius=function(){return O(i())},delete t.lineY0,t.lineOuterRadius=function(){return O(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(I(t)):e()._curve},t}function R(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var F=Array.prototype.slice;function B(t){return t.source}function N(t){return t.target}function j(t){var n=B,i=N,a=k,o=A,s=null;function l(){var r,l=F.call(arguments),c=n.apply(this,l),u=i.apply(this,l);if(s||(s=r=e.path()),t(s,+a.apply(this,(l[0]=c,l)),+o.apply(this,l),+a.apply(this,(l[0]=u,l)),+o.apply(this,l)),r)return s=null,r+\"\"||null}return l.source=function(t){return arguments.length?(n=t,l):n},l.target=function(t){return arguments.length?(i=t,l):i},l.x=function(t){return arguments.length?(a=\"function\"==typeof t?t:r(+t),l):a},l.y=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(+t),l):o},l.context=function(t){return arguments.length?(s=null==t?null:t,l):s},l}function U(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function V(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e,r=(r+i)/2,n,r,n,i)}function H(t,e,r,n,i){var a=R(e,r),o=R(e,r=(r+i)/2),s=R(n,r),l=R(n,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],l[0],l[1])}var q={draw:function(t,e){var r=Math.sqrt(e/u);t.moveTo(r,0),t.arc(0,0,r,0,h)}},G={draw:function(t,e){var r=Math.sqrt(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Y=Math.sqrt(1/3),W=2*Y,X={draw:function(t,e){var r=Math.sqrt(e/W),n=r*Y;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},Z=Math.sin(u/10)/Math.sin(7*u/10),J=Math.sin(h/10)*Z,K=-Math.cos(h/10)*Z,Q={draw:function(t,e){var r=Math.sqrt(.8908130915292852*e),n=J*r,i=K*r;t.moveTo(0,-r),t.lineTo(n,i);for(var a=1;a<5;++a){var o=h*a/5,s=Math.cos(o),l=Math.sin(o);t.lineTo(l*r,-s*r),t.lineTo(s*n-l*i,l*n+s*i)}t.closePath()}},$={draw:function(t,e){var r=Math.sqrt(e),n=-r/2;t.rect(n,n,r,r)}},tt=Math.sqrt(3),et={draw:function(t,e){var r=-Math.sqrt(e/(3*tt));t.moveTo(0,2*r),t.lineTo(-tt*r,-r),t.lineTo(tt*r,-r),t.closePath()}},rt=-.5,nt=Math.sqrt(3)/2,it=1/Math.sqrt(12),at=3*(it/2+1),ot={draw:function(t,e){var r=Math.sqrt(e/at),n=r/2,i=r*it,a=n,o=r*it+r,s=-a,l=o;t.moveTo(n,i),t.lineTo(a,o),t.lineTo(s,l),t.lineTo(rt*n-nt*i,nt*n+rt*i),t.lineTo(rt*a-nt*o,nt*a+rt*o),t.lineTo(rt*s-nt*l,nt*s+rt*l),t.lineTo(rt*n+nt*i,rt*i-nt*n),t.lineTo(rt*a+nt*o,rt*o-nt*a),t.lineTo(rt*s+nt*l,rt*l-nt*s),t.closePath()}},st=[q,G,X,$,Q,et,ot];function lt(){}function ct(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function ut(t){this._context=t}function ft(t){this._context=t}function ht(t){this._context=t}function pt(t,e){this._basis=new ut(t),this._beta=e}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ct(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ft.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ht.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},pt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n,i=t[0],a=e[0],o=t[r]-i,s=e[r]-a,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+n*o),this._beta*e[l]+(1-this._beta)*(a+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var dt=function t(e){function r(t){return 1===e?new ut(t):new pt(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function gt(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function mt(t,e){this._context=t,this._k=(1-e)/6}mt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:gt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var vt=function t(e){function r(t){return new mt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function yt(t,e){this._context=t,this._k=(1-e)/6}yt.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var xt=function t(e){function r(t){return new yt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function bt(t,e){this._context=t,this._k=(1-e)/6}bt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var _t=function t(e){function r(t){return new bt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function wt(t,e,r){var n=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>1e-12){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*c+t._y1*t._l23_2a-r*t._l12_2a)/u}t._context.bezierCurveTo(n,i,a,o,t._x2,t._y2)}function Tt(t,e){this._context=t,this._alpha=e}Tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var kt=function t(e){function r(t){return e?new Tt(t,e):new mt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function At(t,e){this._context=t,this._alpha=e}At.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Mt=function t(e){function r(t){return e?new At(t,e):new yt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function St(t,e){this._context=t,this._alpha=e}St.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Et=function t(e){function r(t){return e?new St(t,e):new bt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Lt(t){this._context=t}function Ct(t){return t<0?-1:1}function Pt(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),o=(r-t._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Ct(a)+Ct(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function It(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Ot(t,e,r){var n=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-n)/3;t._context.bezierCurveTo(n+s,i+s*e,a-s,o-s*r,a,o)}function zt(t){this._context=t}function Dt(t){this._context=new Rt(t)}function Rt(t){this._context=t}function Ft(t){this._context=t}function Bt(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[n-1]=(t[n]+i[n-1])/2,e=0;e1)for(var r,n,i,a=1,o=t[e[0]],s=o.length;a=0;)r[e]=e;return r}function Vt(t,e){return t[e]}function Ht(t){var e=t.map(qt);return Ut(t).sort((function(t,r){return e[t]-e[r]}))}function qt(t){for(var e,r=-1,n=0,i=t.length,a=-1/0;++ra&&(a=e,n=r);return n}function Gt(t){var e=t.map(Yt);return Ut(t).sort((function(t,r){return e[t]-e[r]}))}function Yt(t){for(var e,r=0,n=-1,i=t.length;++n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},t.arc=function(){var t=g,o=m,w=r(0),T=null,k=v,A=y,M=x,S=null;function E(){var r,g,m=+t.apply(this,arguments),v=+o.apply(this,arguments),y=k.apply(this,arguments)-f,x=A.apply(this,arguments)-f,E=n(x-y),L=x>y;if(S||(S=r=e.path()),v1e-12)if(E>h-1e-12)S.moveTo(v*a(y),v*l(y)),S.arc(0,0,v,y,x,!L),m>1e-12&&(S.moveTo(m*a(x),m*l(x)),S.arc(0,0,m,x,y,L));else{var C,P,I=y,O=x,z=y,D=x,R=E,F=E,B=M.apply(this,arguments)/2,N=B>1e-12&&(T?+T.apply(this,arguments):c(m*m+v*v)),j=s(n(v-m)/2,+w.apply(this,arguments)),U=j,V=j;if(N>1e-12){var H=d(N/m*l(B)),q=d(N/v*l(B));(R-=2*H)>1e-12?(z+=H*=L?1:-1,D-=H):(R=0,z=D=(y+x)/2),(F-=2*q)>1e-12?(I+=q*=L?1:-1,O-=q):(F=0,I=O=(y+x)/2)}var G=v*a(I),Y=v*l(I),W=m*a(D),X=m*l(D);if(j>1e-12){var Z,J=v*a(O),K=v*l(O),Q=m*a(z),$=m*l(z);if(E1e-12?V>1e-12?(C=_(Q,$,G,Y,v,V,L),P=_(J,K,W,X,v,V,L),S.moveTo(C.cx+C.x01,C.cy+C.y01),V1e-12&&R>1e-12?U>1e-12?(C=_(W,X,J,K,m,-U,L),P=_(G,Y,Q,$,m,-U,L),S.lineTo(C.cx+C.x01,C.cy+C.y01),U0&&(d+=f);for(null!=e?g.sort((function(t,r){return e(m[t],m[r])})):null!=n&&g.sort((function(t,e){return n(r[t],r[e])})),s=0,c=d?(y-p*b)/d:0;s0?f*c:0)+b,m[l]={data:r[l],index:s,value:f,startAngle:v,endAngle:u,padAngle:x};return m}return s.value=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),s):i},s.endAngle=function(t){return arguments.length?(a=\"function\"==typeof t?t:r(+t),s):a},s.padAngle=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(+t),s):o},s},t.pointRadial=R,t.radialArea=D,t.radialLine=z,t.stack=function(){var t=r([]),e=Ut,n=jt,i=Vt;function a(r){var a,o,s=t.apply(this,arguments),l=r.length,c=s.length,u=new Array(c);for(a=0;a0)for(var r,n,i,a,o,s,l=0,c=t[e[0]].length;l0?(n[0]=a,n[1]=a+=i):i<0?(n[1]=o,n[0]=o+=i):(n[0]=0,n[1]=i)},t.stackOffsetExpand=function(t,e){if((n=t.length)>0){for(var r,n,i,a=0,o=t[0].length;a0){for(var r,n=0,i=t[e[0]],a=i.length;n0&&(n=(r=t[e[0]]).length)>0){for(var r,n,i,a=0,o=1;o=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:mt,s:vt,S:H,u:q,U:G,V:Y,w:W,W:X,x:null,X:null,y:Z,Y:J,Z:K,\"%\":gt},Ct={a:function(t){return f[t.getUTCDay()]},A:function(t){return u[t.getUTCDay()]},b:function(t){return yt[t.getUTCMonth()]},B:function(t){return h[t.getUTCMonth()]},c:null,d:Q,e:Q,f:nt,H:$,I:tt,j:et,L:rt,m:it,M:at,p:function(t){return c[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:mt,s:vt,S:ot,u:st,U:lt,V:ct,w:ut,W:ft,x:null,X:null,y:ht,Y:pt,Z:dt,\"%\":gt},Pt={a:function(t,e,r){var n=Tt.exec(e.slice(r));return n?(t.w=kt[n[0].toLowerCase()],r+n[0].length):-1},A:function(t,e,r){var n=_t.exec(e.slice(r));return n?(t.w=wt[n[0].toLowerCase()],r+n[0].length):-1},b:function(t,e,r){var n=St.exec(e.slice(r));return n?(t.m=Et[n[0].toLowerCase()],r+n[0].length):-1},B:function(t,e,r){var n=At.exec(e.slice(r));return n?(t.m=Mt[n[0].toLowerCase()],r+n[0].length):-1},c:function(t,e,r){return zt(t,a,e,r)},d:A,e:A,f:P,H:S,I:S,j:M,L:C,m:k,M:E,p:function(t,e,r){var n=xt.exec(e.slice(r));return n?(t.p=bt[n[0].toLowerCase()],r+n[0].length):-1},q:T,Q:O,s:z,S:L,u:m,U:v,V:y,w:g,W:x,x:function(t,e,r){return zt(t,o,e,r)},X:function(t,e,r){return zt(t,l,e,r)},y:_,Y:b,Z:w,\"%\":I};function It(t,e){return function(r){var n,i,a,o=[],l=-1,c=0,u=t.length;for(r instanceof Date||(r=new Date(+r));++l53)return null;\"w\"in c||(c.w=1),\"Z\"in c?(l=(s=n(i(c.y,0,1))).getUTCDay(),s=l>4||0===l?e.utcMonday.ceil(s):e.utcMonday(s),s=e.utcDay.offset(s,7*(c.V-1)),c.y=s.getUTCFullYear(),c.m=s.getUTCMonth(),c.d=s.getUTCDate()+(c.w+6)%7):(l=(s=r(i(c.y,0,1))).getDay(),s=l>4||0===l?e.timeMonday.ceil(s):e.timeMonday(s),s=e.timeDay.offset(s,7*(c.V-1)),c.y=s.getFullYear(),c.m=s.getMonth(),c.d=s.getDate()+(c.w+6)%7)}else(\"W\"in c||\"U\"in c)&&(\"w\"in c||(c.w=\"u\"in c?c.u%7:\"W\"in c?1:0),l=\"Z\"in c?n(i(c.y,0,1)).getUTCDay():r(i(c.y,0,1)).getDay(),c.m=0,c.d=\"W\"in c?(c.w+6)%7+7*c.W-(l+5)%7:c.w+7*c.U-(l+6)%7);return\"Z\"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,n(c)):r(c)}}function zt(t,e,r,n){for(var i,a,o=0,l=e.length,c=r.length;o=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=Pt[i in s?e.charAt(o++):i])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return Lt.x=It(o,Lt),Lt.X=It(l,Lt),Lt.c=It(a,Lt),Ct.x=It(o,Ct),Ct.X=It(l,Ct),Ct.c=It(a,Ct),{format:function(t){var e=It(t+=\"\",Lt);return e.toString=function(){return t},e},parse:function(t){var e=Ot(t+=\"\",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=It(t+=\"\",Ct);return e.toString=function(){return t},e},utcParse:function(t){var e=Ot(t+=\"\",!0);return e.toString=function(){return t},e}}}var o,s={\"-\":\"\",_:\" \",0:\"0\"},l=/^\\s*\\d+/,c=/^%/,u=/[\\\\^$*+?|[\\]().{}]/g;function f(t,e,r){var n=t<0?\"-\":\"\",i=(n?-t:t)+\"\",a=i.length;return n+(a68?1900:2e3),r+n[0].length):-1}function w(t,e,r){var n=/^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||\"00\")),r+n[0].length):-1}function T(t,e,r){var n=l.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function k(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function A(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function M(t,e,r){var n=l.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function S(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function E(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function L(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function C(t,e,r){var n=l.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function P(t,e,r){var n=l.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function I(t,e,r){var n=c.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function O(t,e,r){var n=l.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function z(t,e,r){var n=l.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function D(t,e){return f(t.getDate(),e,2)}function R(t,e){return f(t.getHours(),e,2)}function F(t,e){return f(t.getHours()%12||12,e,2)}function B(t,r){return f(1+e.timeDay.count(e.timeYear(t),t),r,3)}function N(t,e){return f(t.getMilliseconds(),e,3)}function j(t,e){return N(t,e)+\"000\"}function U(t,e){return f(t.getMonth()+1,e,2)}function V(t,e){return f(t.getMinutes(),e,2)}function H(t,e){return f(t.getSeconds(),e,2)}function q(t){var e=t.getDay();return 0===e?7:e}function G(t,r){return f(e.timeSunday.count(e.timeYear(t)-1,t),r,2)}function Y(t,r){var n=t.getDay();return t=n>=4||0===n?e.timeThursday(t):e.timeThursday.ceil(t),f(e.timeThursday.count(e.timeYear(t),t)+(4===e.timeYear(t).getDay()),r,2)}function W(t){return t.getDay()}function X(t,r){return f(e.timeMonday.count(e.timeYear(t)-1,t),r,2)}function Z(t,e){return f(t.getFullYear()%100,e,2)}function J(t,e){return f(t.getFullYear()%1e4,e,4)}function K(t){var e=t.getTimezoneOffset();return(e>0?\"-\":(e*=-1,\"+\"))+f(e/60|0,\"0\",2)+f(e%60,\"0\",2)}function Q(t,e){return f(t.getUTCDate(),e,2)}function $(t,e){return f(t.getUTCHours(),e,2)}function tt(t,e){return f(t.getUTCHours()%12||12,e,2)}function et(t,r){return f(1+e.utcDay.count(e.utcYear(t),t),r,3)}function rt(t,e){return f(t.getUTCMilliseconds(),e,3)}function nt(t,e){return rt(t,e)+\"000\"}function it(t,e){return f(t.getUTCMonth()+1,e,2)}function at(t,e){return f(t.getUTCMinutes(),e,2)}function ot(t,e){return f(t.getUTCSeconds(),e,2)}function st(t){var e=t.getUTCDay();return 0===e?7:e}function lt(t,r){return f(e.utcSunday.count(e.utcYear(t)-1,t),r,2)}function ct(t,r){var n=t.getUTCDay();return t=n>=4||0===n?e.utcThursday(t):e.utcThursday.ceil(t),f(e.utcThursday.count(e.utcYear(t),t)+(4===e.utcYear(t).getUTCDay()),r,2)}function ut(t){return t.getUTCDay()}function ft(t,r){return f(e.utcMonday.count(e.utcYear(t)-1,t),r,2)}function ht(t,e){return f(t.getUTCFullYear()%100,e,2)}function pt(t,e){return f(t.getUTCFullYear()%1e4,e,4)}function dt(){return\"+0000\"}function gt(){return\"%\"}function mt(t){return+t}function vt(t){return Math.floor(+t/1e3)}function yt(e){return o=a(e),t.timeFormat=o.format,t.timeParse=o.parse,t.utcFormat=o.utcFormat,t.utcParse=o.utcParse,o}yt({dateTime:\"%x, %X\",date:\"%-m/%-d/%Y\",time:\"%-I:%M:%S %p\",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\"]});var xt=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat(\"%Y-%m-%dT%H:%M:%S.%LZ\");var bt=+new Date(\"2000-01-01T00:00:00.000Z\")?function(t){var e=new Date(t);return isNaN(e)?null:e}:t.utcParse(\"%Y-%m-%dT%H:%M:%S.%LZ\");t.isoFormat=xt,t.isoParse=bt,t.timeFormatDefaultLocale=yt,t.timeFormatLocale=a,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{\"d3-time\":121}],121:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){\"use strict\";var e=new Date,r=new Date;function n(t,i,a,o){function s(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return s.floor=function(e){return t(e=new Date(+e)),e},s.ceil=function(e){return t(e=new Date(e-1)),i(e,1),t(e),e},s.round=function(t){var e=s(t),r=s.ceil(t);return t-e0))return o;do{o.push(a=new Date(+e)),i(e,n),t(e)}while(a=r)for(;t(r),!e(r);)r.setTime(r-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;i(t,-1),!e(t););else for(;--r>=0;)for(;i(t,1),!e(t););}))},a&&(s.count=function(n,i){return e.setTime(+n),r.setTime(+i),t(e),t(r),Math.floor(a(e,r))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(o?function(e){return o(e)%t==0}:function(e){return s.count(0,e)%t==0}):s:null}),s}var i=n((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?n((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,r){e.setTime(+e+r*t)}),(function(e,r){return(r-e)/t})):i:null};var a=i.range,o=n((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),s=o.range,l=n((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),c=l.range,u=n((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),f=u.range,h=n((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),p=h.range;function d(t){return n((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var g=d(0),m=d(1),v=d(2),y=d(3),x=d(4),b=d(5),_=d(6),w=g.range,T=m.range,k=v.range,A=y.range,M=x.range,S=b.range,E=_.range,L=n((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),C=L.range,P=n((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));P.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,r){e.setFullYear(e.getFullYear()+r*t)})):null};var I=P.range,O=n((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()})),z=O.range,D=n((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()})),R=D.range,F=n((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1})),B=F.range;function N(t){return n((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var j=N(0),U=N(1),V=N(2),H=N(3),q=N(4),G=N(5),Y=N(6),W=j.range,X=U.range,Z=V.range,J=H.range,K=q.range,Q=G.range,$=Y.range,tt=n((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),et=tt.range,rt=n((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));rt.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null};var nt=rt.range;t.timeDay=h,t.timeDays=p,t.timeFriday=b,t.timeFridays=S,t.timeHour=u,t.timeHours=f,t.timeInterval=n,t.timeMillisecond=i,t.timeMilliseconds=a,t.timeMinute=l,t.timeMinutes=c,t.timeMonday=m,t.timeMondays=T,t.timeMonth=L,t.timeMonths=C,t.timeSaturday=_,t.timeSaturdays=E,t.timeSecond=o,t.timeSeconds=s,t.timeSunday=g,t.timeSundays=w,t.timeThursday=x,t.timeThursdays=M,t.timeTuesday=v,t.timeTuesdays=k,t.timeWednesday=y,t.timeWednesdays=A,t.timeWeek=g,t.timeWeeks=w,t.timeYear=P,t.timeYears=I,t.utcDay=F,t.utcDays=B,t.utcFriday=G,t.utcFridays=Q,t.utcHour=D,t.utcHours=R,t.utcMillisecond=i,t.utcMilliseconds=a,t.utcMinute=O,t.utcMinutes=z,t.utcMonday=U,t.utcMondays=X,t.utcMonth=tt,t.utcMonths=et,t.utcSaturday=Y,t.utcSaturdays=$,t.utcSecond=o,t.utcSeconds=s,t.utcSunday=j,t.utcSundays=W,t.utcThursday=q,t.utcThursdays=K,t.utcTuesday=V,t.utcTuesdays=Z,t.utcWednesday=H,t.utcWednesdays=J,t.utcWeek=j,t.utcWeeks=W,t.utcYear=rt,t.utcYears=nt,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],122:[function(t,e,r){arguments[4][121][0].apply(r,arguments)},{dup:121}],123:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){\"use strict\";var e,r,n=0,i=0,a=0,o=0,s=0,l=0,c=\"object\"==typeof performance&&performance.now?performance:Date,u=\"object\"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function f(){return s||(u(h),s=c.now()+l)}function h(){s=0}function p(){this._call=this._time=this._next=null}function d(t,e,r){var n=new p;return n.restart(t,e,r),n}function g(){f(),++n;for(var t,r=e;r;)(t=s-r._time)>=0&&r._call.call(null,t),r=r._next;--n}function m(){s=(o=c.now())+l,n=i=0;try{g()}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,y(a)}(),s=0}}function v(){var t=c.now(),e=t-o;e>1e3&&(l-=e,o=t)}function y(t){n||(i&&(i=clearTimeout(i)),t-s>24?(t<1/0&&(i=setTimeout(m,t-c.now()-l)),a&&(a=clearInterval(a))):(a||(o=c.now(),a=setInterval(v,1e3)),n=1,u(m)))}p.prototype=d.prototype={constructor:p,restart:function(t,n,i){if(\"function\"!=typeof t)throw new TypeError(\"callback is not a function\");i=(null==i?f():+i)+(null==n?0:+n),this._next||r===this||(r?r._next=this:e=this,r=this),this._call=t,this._time=i,y()},stop:function(){this._call&&(this._call=null,this._time=1/0,y())}},t.interval=function(t,e,r){var n=new p,i=e;return null==e?(n.restart(t,e,r),n):(e=+e,r=null==r?f():+r,n.restart((function a(o){o+=i,n.restart(a,i+=e,r),t(o)}),e,r),n)},t.now=f,t.timeout=function(t,e,r){var n=new p;return e=null==e?0:+e,n.restart((function(r){n.stop(),t(r+e)}),e,r),n},t.timer=d,t.timerFlush=g,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],124:[function(t,e,r){e.exports=function(){for(var t=0;ts*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];i0)return function(t,e){var r,n;for(r=new Array(t),n=0;n80*r){n=l=t[0],s=c=t[1];for(var b=r;bl&&(l=u),p>c&&(c=p);d=0!==(d=Math.max(l-n,c-s))?1/d:0}return o(y,x,r,n,s,d),x}function i(t,e,r,n,i){var a,o;if(i===E(t,e,r,n)>0)for(a=e;a=e;a-=n)o=A(a,t[a],t[a+1],o);return o&&x(o,o.next)&&(M(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||!x(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(M(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=d(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;e0||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 p,g,m=t;t.prev!==t.next;)if(p=t.prev,g=t.next,f?l(t,n,i,f):s(t))e.push(p.i/r),e.push(t.i/r),e.push(g.i/r),M(t),t=g.next,m=g.next;else if((t=g)===m){h?1===h?o(t=c(a(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(y(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(m(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&y(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(y(i,a,o)>=0)return!1;for(var s=i.xa.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=d(s,l,e,r,n),h=d(c,u,e,r,n),p=t.prevZ,g=t.nextZ;p&&p.z>=f&&g&&g.z<=h;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,g!==t.prev&&g!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;g&&g.z<=h;){if(g!==t.prev&&g!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function c(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!x(i,o)&&b(i,n,n.next,o)&&T(i,o)&&T(o,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(o.i/r),M(n),M(n.next),n=t=o),n=n.next}while(n!==t);return a(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=k(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.x&&n.x>=u&&i!==n.x&&m(ar.x||n.x===r.x&&p(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(t,e)){var r=k(e,t);a(e,e.next),a(r,r.next)}}function p(t,e){return y(t.prev,t,e.prev)<0&&y(e.next,t,t.next)<0}function d(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 g(t){var e=t,r=t;do{(e.x=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&&b(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(T(t,e)&&T(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)&&(y(t.prev,t,e.prev)||y(t,e.prev,e))||x(t,e)&&y(t.prev,t,t.next)>0&&y(e.prev,e,e.next)>0)}function y(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,r,n){var i=w(y(t,e,r)),a=w(y(t,e,n)),o=w(y(r,n,t)),s=w(y(r,n,e));return i!==a&&o!==s||(!(0!==i||!_(t,r,e))||(!(0!==a||!_(t,n,e))||(!(0!==o||!_(r,t,n))||!(0!==s||!_(r,e,n)))))}function _(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function w(t){return t>0?1:t<0?-1:0}function T(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function k(t,e){var r=new S(t.i,t.x,t.y),n=new S(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 A(t,e,r,n){var i=new S(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 M(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 S(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 E(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],130:[function(t,e,r){var n=t(\"strongly-connected-components\");e.exports=function(t,e){var r,i=[],a=[],o=[],s={},l=[];function c(t){var e,n,i=!1;for(a.push(t),o[t]=!0,e=0;e=e}))}(e);for(var r,i=n(t).components.filter((function(t){return t.length>1})),a=1/0,o=0;o=55296&&y<=56319&&(w+=t[++r]),w=T?h.call(T,k,w,g):w,e?(p.value=w,d(m,g,p)):m[g]=w,++g;v=g}if(void 0===v)for(v=o(t.length),e&&(m=new e(v)),r=0;r0?1:-1}},{}],141:[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\":138}],142:[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\":141}],143:[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\":160,\"./valid-value\":162}],144:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?Object.assign:t(\"./shim\")},{\"./is-implemented\":145,\"./shim\":146}],145:[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\")}},{}],146:[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-1}},{}],166:[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}},{}],167:[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}},{}],168:[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\"))},{\"./\":171,d:106,\"es5-ext/object/set-prototype-of\":157,\"es5-ext/string/#/contains\":163,\"es6-symbol\":175}],169:[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,m,v=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,v,u.value,f),h)return;u=t.next()}else for(d=t.length,p=0;p=55296&&m<=56319&&(g+=t[++p]),l.call(e,v,g,f),!h);++p);else c.call(t,(function(t){return l.call(e,v,t,f),h}))}},{\"./get\":170,\"es5-ext/function/is-arguments\":135,\"es5-ext/object/valid-callable\":160,\"es5-ext/string/is-string\":166}],170:[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\":168,\"./string\":173,\"./valid-iterable\":174,\"es5-ext/function/is-arguments\":135,\"es5-ext/string/is-string\":166,\"es6-symbol\":175}],171:[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.__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:106,\"d/auto-bind\":105,\"es5-ext/array/#/clear\":131,\"es5-ext/object/assign\":144,\"es5-ext/object/valid-callable\":160,\"es5-ext/object/valid-value\":162,\"es6-symbol\":175}],172:[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\":135,\"es5-ext/object/is-value\":151,\"es5-ext/string/is-string\":166,\"es6-symbol\":175}],173:[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__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,o.toStringTag,a(\"c\",\"String Iterator\"))},{\"./\":171,d:106,\"es5-ext/object/set-prototype-of\":157,\"es6-symbol\":175}],174:[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\":172}],175:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?t(\"ext/global-this\").Symbol:t(\"./polyfill\")},{\"./is-implemented\":176,\"./polyfill\":181,\"ext/global-this\":188}],176:[function(t,e,r){\"use strict\";var n=t(\"ext/global-this\"),i={object:!0,symbol:!0};e.exports=function(){var t,e=n.Symbol;if(\"function\"!=typeof e)return!1;t=e(\"test symbol\");try{String(t)}catch(t){return!1}return!!i[typeof e.iterator]&&(!!i[typeof e.toPrimitive]&&!!i[typeof e.toStringTag])}},{\"ext/global-this\":188}],177:[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]))}},{}],178:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=Object.create,a=Object.defineProperty,o=Object.prototype,s=i(null);e.exports=function(t){for(var e,r,i=0;s[t+(i||\"\")];)++i;return s[t+=i||\"\"]=!0,a(o,e=\"@@\"+t,n.gs(null,(function(t){r||(r=!0,a(this,e,n(t)),r=!1)}))),e}},{d:106}],179:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=t(\"ext/global-this\").Symbol;e.exports=function(t){return Object.defineProperties(t,{hasInstance:n(\"\",i&&i.hasInstance||t(\"hasInstance\")),isConcatSpreadable:n(\"\",i&&i.isConcatSpreadable||t(\"isConcatSpreadable\")),iterator:n(\"\",i&&i.iterator||t(\"iterator\")),match:n(\"\",i&&i.match||t(\"match\")),replace:n(\"\",i&&i.replace||t(\"replace\")),search:n(\"\",i&&i.search||t(\"search\")),species:n(\"\",i&&i.species||t(\"species\")),split:n(\"\",i&&i.split||t(\"split\")),toPrimitive:n(\"\",i&&i.toPrimitive||t(\"toPrimitive\")),toStringTag:n(\"\",i&&i.toStringTag||t(\"toStringTag\")),unscopables:n(\"\",i&&i.unscopables||t(\"unscopables\"))})}},{d:106,\"ext/global-this\":188}],180:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=t(\"../../../validate-symbol\"),a=Object.create(null);e.exports=function(t){return Object.defineProperties(t,{for:n((function(e){return a[e]?a[e]:a[e]=t(String(e))})),keyFor:n((function(t){var e;for(e in i(t),a)if(a[e]===t)return e}))})}},{\"../../../validate-symbol\":182,d:106}],181:[function(t,e,r){\"use strict\";var n,i,a,o=t(\"d\"),s=t(\"./validate-symbol\"),l=t(\"ext/global-this\").Symbol,c=t(\"./lib/private/generate-name\"),u=t(\"./lib/private/setup/standard-symbols\"),f=t(\"./lib/private/setup/symbol-registry\"),h=Object.create,p=Object.defineProperties,d=Object.defineProperty;if(\"function\"==typeof l)try{String(l()),a=!0}catch(t){}else l=null;i=function(t){if(this instanceof i)throw new TypeError(\"Symbol is not a constructor\");return n(t)},e.exports=n=function t(e){var r;if(this instanceof t)throw new TypeError(\"Symbol is not a constructor\");return a?l(e):(r=h(i.prototype),e=void 0===e?\"\":String(e),p(r,{__description__:o(\"\",e),__name__:o(\"\",c(e))}))},u(n),f(n),p(i.prototype,{constructor:o(n),toString:o(\"\",(function(){return this.__name__}))}),p(n.prototype,{toString:o((function(){return\"Symbol (\"+s(this).__description__+\")\"})),valueOf:o((function(){return s(this)}))}),d(n.prototype,n.toPrimitive,o(\"\",(function(){var t=s(this);return\"symbol\"==typeof t?t:t.toString()}))),d(n.prototype,n.toStringTag,o(\"c\",\"Symbol\")),d(i.prototype,n.toStringTag,o(\"c\",n.prototype[n.toStringTag])),d(i.prototype,n.toPrimitive,o(\"c\",n.prototype[n.toPrimitive]))},{\"./lib/private/generate-name\":178,\"./lib/private/setup/standard-symbols\":179,\"./lib/private/setup/symbol-registry\":180,\"./validate-symbol\":182,d:106,\"ext/global-this\":188}],182:[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\":177}],183:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?WeakMap:t(\"./polyfill\")},{\"./is-implemented\":184,\"./polyfill\":186}],184:[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)))))}},{}],185:[function(t,e,r){\"use strict\";e.exports=\"function\"==typeof WeakMap&&\"[object WeakMap]\"===Object.prototype.toString.call(new WeakMap)},{}],186:[function(t,e,r){\"use strict\";var n,i=t(\"es5-ext/object/is-value\"),a=t(\"es5-ext/object/set-prototype-of\"),o=t(\"es5-ext/object/valid-object\"),s=t(\"es5-ext/object/valid-value\"),l=t(\"es5-ext/string/random-uniq\"),c=t(\"d\"),u=t(\"es6-iterator/get\"),f=t(\"es6-iterator/for-of\"),h=t(\"es6-symbol\").toStringTag,p=t(\"./is-native-implemented\"),d=Array.isArray,g=Object.defineProperty,m=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=p&&a&&WeakMap!==n?a(new WeakMap,v(this)):this,i(e)&&(d(e)||(e=u(e))),g(t,\"__weakMapData__\",c(\"c\",\"$weakMap$\"+l())),e?(f(e,(function(e){s(e),t.set(e[0],e[1])})),t):t},p&&(a&&a(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:c(n)})),Object.defineProperties(n.prototype,{delete:c((function(t){return!!m.call(o(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)})),get:c((function(t){if(m.call(o(t),this.__weakMapData__))return t[this.__weakMapData__]})),has:c((function(t){return m.call(o(t),this.__weakMapData__)})),set:c((function(t,e){return g(o(t),this.__weakMapData__,c(\"c\",e)),this})),toString:c((function(){return\"[object WeakMap]\"}))}),g(n.prototype,h,c(\"c\",\"WeakMap\"))},{\"./is-native-implemented\":185,d:106,\"es5-ext/object/is-value\":151,\"es5-ext/object/set-prototype-of\":157,\"es5-ext/object/valid-object\":161,\"es5-ext/object/valid-value\":162,\"es5-ext/string/random-uniq\":167,\"es6-iterator/for-of\":169,\"es6-iterator/get\":170,\"es6-symbol\":175}],187:[function(t,e,r){var n=function(){if(\"object\"==typeof self&&self)return self;if(\"object\"==typeof window&&window)return window;throw new Error(\"Unable to resolve global `this`\")};e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,\"__global__\",{get:function(){return this},configurable:!0})}catch(t){return n()}try{return __global__||n()}finally{delete Object.prototype.__global__}}()},{}],188:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?globalThis:t(\"./implementation\")},{\"./implementation\":187,\"./is-implemented\":189}],189:[function(t,e,r){\"use strict\";e.exports=function(){return\"object\"==typeof globalThis&&(!!globalThis&&globalThis.Array===Array)}},{}],190:[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\":237}],191:[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;ie[0]-o[0]/2&&(h=o[0]/2,p+=o[1]);return r}},{\"css-font/stringify\":102}],193:[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\",title:void 0!==e.title?e.title:\"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 m=a(f.getImageData(0,0,p,p));d.lineHeight=d.bottom=p-m+g,f.clearRect(0,0,p,p),f.textBaseline=\"alphabetic\",f.fillText(\"H\",0,p);var v=p-a(f.getImageData(0,0,p,p))-1+g;d.baseline=d.alphabetic=v,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.title&&(f.clearRect(0,0,p,p),f.textBaseline=\"top\",f.fillText(h.title,0,0),d.title=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=_-v}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;n0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}e.exports=n,n.canvas=document.createElement(\"canvas\"),n.cache={}},{}],194:[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 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:{}}},T.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),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=T.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(T.baseFontSize+\"px \"+t)}else t=n.parse(n.stringify(t));var i=n.stringify({size:T.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]=T.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:v(c,{origin:\"top\",fontSize:T.baseFontSize,fontStyle:u.join(\" \")})},T.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;h2){for(var w=!t.position[0].length,k=u.mallocFloat(2*this.count),A=0,M=0;A1?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],i*=-1}))),null!=t.color)if(t.color||(t.color=\"transparent\"),\"string\"!=typeof t.color&&isNaN(t.color)){var q;if(\"number\"==typeof t.color[0]&&t.color.length>this.counts.length){var G=t.color.length;q=u.mallocUint8(G);for(var Y=(t.color.subarray||t.color.slice).bind(t.color),W=0;W4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var J=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(J);for(var K=0;K1?this.counts[K]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[K]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*K,4*K+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[K]:this.opacity,baseline:null!=this.baselineOffset[K]?this.baselineOffset[K]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[K]?this.alignOffset[K]:this.alignOffset[0]:0,atlas:this.fontAtlas[K]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*K,2*K+2):this.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=[]},T.prototype.destroy=function(){},T.prototype.kerning=!0,T.prototype.position={constant:new Float32Array(2)},T.prototype.translate=null,T.prototype.scale=null,T.prototype.font=null,T.prototype.text=\"\",T.prototype.positionOffset=[0,0],T.prototype.opacity=1,T.prototype.color=new Uint8Array([0,0,0,255]),T.prototype.alignOffset=[0,0],T.maxAtlasSize=1024,T.atlasCanvas=document.createElement(\"canvas\"),T.atlasContext=T.atlasCanvas.getContext(\"2d\",{alpha:!1}),T.baseFontSize=64,T.fonts={},e.exports=T},{\"bit-twiddle\":81,\"color-normalize\":89,\"css-font\":99,\"detect-kerning\":125,\"es6-weak-map\":183,\"flatten-vertex-data\":191,\"font-atlas\":192,\"font-measure\":193,\"gl-util/context\":226,\"is-plain-obj\":236,\"object-assign\":247,\"parse-rect\":249,\"parse-unit\":251,\"pick-by-alias\":253,regl:283,\"to-px\":314,\"typedarray-pool\":327}],226:[function(t,e,r){(function(r){(function(){\"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*r.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*r.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}function o(){var t=document.createElement(\"canvas\");return t.style.position=\"absolute\",t.style.top=0,t.style.left=0,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\",width:\"w width\",height:\"h height\"},!0),t.pixelRatio||(t.pixelRatio=r.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(\"string\"==typeof t.container){var s=document.querySelector(t.container);if(!s)throw Error(\"Element \"+t.container+\" is not found\");t.container=s}a(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=o(),t.container.appendChild(t.canvas),i(t))}else if(!t.canvas){if(\"undefined\"==typeof document)throw Error(\"Not DOM environment. Use headless-gl.\");t.container=document.body||document.documentElement,t.canvas=o(),t.container.appendChild(t.canvas),i(t)}return t.gl||[\"webgl\",\"experimental-webgl\",\"webgl-experimental\"].some((function(e){try{t.gl=t.canvas.getContext(e,t.attrs)}catch(t){}return t.gl})),t.gl}}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"pick-by-alias\":253}],227:[function(t,e,r){e.exports=function(t){\"string\"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n>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<>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<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g}},{}],231:[function(t,e,r){\"function\"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},{}],232:[function(t,e,r){e.exports=!0},{}],233:[function(t,e,r){\"use strict\";e.exports=\"undefined\"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\\//.test(navigator.appVersion))},{}],234:[function(t,e,r){\"use strict\";e.exports=a,e.exports.isMobile=a,e.exports.default=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[46]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[46]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;if(e||\"undefined\"==typeof navigator||(e=navigator.userAgent),e&&e.headers&&\"string\"==typeof e.headers[\"user-agent\"]&&(e=e.headers[\"user-agent\"]),\"string\"!=typeof e)return!1;var r=t.tablet?i.test(e):n.test(e);return!r&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==e.indexOf(\"Macintosh\")&&-1!==e.indexOf(\"Safari\")&&(r=!0),r}},{}],235:[function(t,e,r){\"use strict\";e.exports=function(t){var e=typeof t;return null!==t&&(\"object\"===e||\"function\"===e)}},{}],236:[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({}))}},{}],237:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e,r=t.length,n=0;n13)&&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}},{}],238:[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))}},{}],239:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?e.exports=n():(t=t||self).mapboxgl=n()}(this,(function(){\"use strict\";var t,e,r;function n(n,i){if(t)if(e){var a=\"var sharedChunk = {}; (\"+t+\")(sharedChunk); (\"+e+\")(sharedChunk);\",o={};t(o),(r=i(o)).workerUrl=window.URL.createObjectURL(new Blob([a],{type:\"text/javascript\"}))}else e=i;else t=i}return n(0,(function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r=n;function n(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}n.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},n.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},n.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},n.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)(n=1))return n;for(;ra?r=i:n=i,i=.5*(n-r)+r}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var i=a;function a(t,e){this.x=t,this.y=e}function o(t,e,n,i){var a=new r(t,e,n,i);return function(t){return a.solve(t)}}a.prototype={clone:function(){return new a(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}},a.convert=function(t){return t instanceof a?t:Array.isArray(t)?new a(t[0],t[1]):t};var s=o(.25,.1,.25,1);function l(t,e,r){return Math.min(r,Math.max(e,t))}function c(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i}function u(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function d(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function g(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e))}))}function m(t,e){return-1!==t.indexOf(e,t.length-e.length)}function v(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?v(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 T(t){for(var e=0,r=0,n=t.length,i=n-1,a=void 0,o=void 0;r@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\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}var M=null;function S(t){if(null==M){var e=t.navigator?t.navigator.userAgent:null;M=!!t.safari||!(!e||!(/\\b(iPad|iPhone|iPod)\\b/.test(e)||e.match(\"Safari\")&&!e.match(\"Chrome\")))}return M}function E(t){try{var e=self[t];return e.setItem(\"_mapbox_test_\",1),e.removeItem(\"_mapbox_test_\"),!0}catch(t){return!1}}var L,C,P,I,O=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),z=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,D=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,R={now:O,frame:function(t){var e=z(t);return{cancel:function(){return D(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var r=self.document.createElement(\"canvas\"),n=r.getContext(\"2d\");if(!n)throw new Error(\"failed to create canvas 2d context\");return r.width=t.width,r.height=t.height,n.drawImage(t,0,0,t.width,t.height),n.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:function(t){return L||(L=self.document.createElement(\"a\")),L.href=t,L.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==C&&(C=self.matchMedia(\"(prefers-reduced-motion: reduce)\")),C.matches)}},F={API_URL:\"https://api.mapbox.com\",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf(\"https://api.mapbox.cn\")?\"https://events.mapbox.cn/events/v2\":0===this.API_URL.indexOf(\"https://api.mapbox.com\")?\"https://events.mapbox.com/events/v2\":null:null},FEEDBACK_URL:\"https://apps.mapbox.com/feedback\",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},B={supported:!1,testSupport:function(t){if(N||!I)return;j?U(t):P=t}},N=!1,j=!1;function U(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,I),t.isContextLost())return;B.supported=!0}catch(t){}t.deleteTexture(e),N=!0}self.document&&((I=self.document.createElement(\"img\")).onload=function(){P&&U(P),P=null,j=!0},I.onerror=function(){N=!0,P=null},I.src=\"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\");var V=\"01\";var H=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function q(t){return 0===t.indexOf(\"mapbox:\")}H.prototype._createSkuToken=function(){var t=function(){for(var t=\"\",e=0;e<10;e++)t+=\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"[Math.floor(62*Math.random())];return{token:[\"1\",V,t].join(\"\"),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},H.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},H.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},H.prototype.normalizeStyleURL=function(t,e){if(!q(t))return t;var r=X(t);return r.path=\"/styles/v1\"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeGlyphsURL=function(t,e){if(!q(t))return t;var r=X(t);return r.path=\"/fonts/v1\"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeSourceURL=function(t,e){if(!q(t))return t;var r=X(t);return r.path=\"/v4/\"+r.authority+\".json\",r.params.push(\"secure\"),this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeSpriteURL=function(t,e,r,n){var i=X(t);return q(t)?(i.path=\"/styles/v1\"+i.path+\"/sprite\"+e+r,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=\"\"+e+r,Z(i))},H.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!q(t))return t;var r=X(t),n=R.devicePixelRatio>=2||512===e?\"@2x\":\"\",i=B.supported?\".webp\":\"$1\";r.path=r.path.replace(/(\\.(png|jpg)\\d*)(?=$)/,\"\"+n+i),r.path=r.path.replace(/^.+\\/v4\\//,\"/\"),r.path=\"/v4\"+r.path;var a=this._customAccessToken||function(t){for(var e=0,r=t;e=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){_(\"Unable to write to LocalStorage\")}},K.prototype.processRequests=function(t){},K.prototype.postEvent=function(t,e,r,n){var i=this;if(F.EVENTS_URL){var a=X(F.EVENTS_URL);a.params.push(\"access_token=\"+(n||F.ACCESS_TOKEN||\"\"));var o={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:\"mapbox-gl-js\",sdkVersion:\"1.10.1\",skuId:V,userId:this.anonId},s=e?u(o,e):o,l={url:Z(a),headers:{\"Content-Type\":\"text/plain\"},body:JSON.stringify([s])};this.pendingRequest=bt(l,(function(t){i.pendingRequest=null,r(t),i.saveEventData(),i.processRequests(n)}))}},K.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var Q,$,tt=function(t){function e(){t.call(this,\"map.load\"),this.success={},this.skuToken=\"\"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postMapLoadEvent=function(t,e,r,n){this.skuToken=r,(F.EVENTS_URL&&n||F.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return q(t)||Y(t)})))&&this.queueRequest({id:e,timestamp:Date.now()},n)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var r=this.queue.shift(),n=r.id,i=r.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),d(this.anonId)||(this.anonId=p()),this.postEvent(i,{skuToken:this.skuToken},(function(t){t||n&&(e.success[n]=!0)}),t))}},e}(K),et=new(function(t){function e(e){t.call(this,\"appUserTurnstile\"),this._customAccessToken=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postTurnstileEvent=function(t,e){F.EVENTS_URL&&F.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return q(t)||Y(t)}))&&this.queueRequest(Date.now(),e)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var r=J(F.ACCESS_TOKEN),n=r?r.u:F.ACCESS_TOKEN,i=n!==this.eventData.tokenU;d(this.anonId)||(this.anonId=p(),i=!0);var a=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(a),l=(a-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||o.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(a,{\"enabled.telemetry\":!1},(function(t){t||(e.eventData.lastSuccess=a,e.eventData.tokenU=n)}),t)}},e}(K)),rt=et.postTurnstileEvent.bind(et),nt=new tt,it=nt.postMapLoadEvent.bind(nt),at=500,ot=50;function st(){self.caches&&!Q&&(Q=self.caches.open(\"mapbox-tiles\"))}function lt(t,e,r){if(st(),Q){var n={status:e.status,statusText:e.statusText,headers:new self.Headers};e.headers.forEach((function(t,e){return n.headers.set(e,t)}));var i=A(e.headers.get(\"Cache-Control\")||\"\");if(!i[\"no-store\"])i[\"max-age\"]&&n.headers.set(\"Expires\",new Date(r+1e3*i[\"max-age\"]).toUTCString()),new Date(n.headers.get(\"Expires\")).getTime()-r<42e4||function(t,e){if(void 0===$)try{new Response(new ReadableStream),$=!0}catch(t){$=!1}$?e(t.body):t.blob().then(e)}(e,(function(e){var r=new self.Response(e,n);st(),Q&&Q.then((function(e){return e.put(ct(t.url),r)})).catch((function(t){return _(t.message)}))}))}}function ct(t){var e=t.indexOf(\"?\");return e<0?t:t.slice(0,e)}function ut(t,e){if(st(),!Q)return e(null);var r=ct(t.url);Q.then((function(t){t.match(r).then((function(n){var i=function(t){if(!t)return!1;var e=new Date(t.headers.get(\"Expires\")||0),r=A(t.headers.get(\"Cache-Control\")||\"\");return e>Date.now()&&!r[\"no-cache\"]}(n);t.delete(r),i&&t.put(r,n.clone()),e(null,n,i)})).catch(e)})).catch(e)}var ft,ht=1/0;function pt(){return null==ft&&(ft=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext(\"2d\")&&\"function\"==typeof self.createImageBitmap),ft}var dt={Unknown:\"Unknown\",Style:\"Style\",Source:\"Source\",Tile:\"Tile\",Glyphs:\"Glyphs\",SpriteImage:\"SpriteImage\",SpriteJSON:\"SpriteJSON\",Image:\"Image\"};\"function\"==typeof Object.freeze&&Object.freeze(dt);var gt=function(t){function e(e,r,n){401===r&&Y(n)&&(e+=\": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes\"),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),mt=k()?function(){return self.worker&&self.worker.referrer}:function(){return(\"blob:\"===self.location.protocol?self.parent:self).location.href};function vt(t,e){var r,n=new self.AbortController,i=new self.Request(t.url,{method:t.method||\"GET\",body:t.body,credentials:t.credentials,headers:t.headers,referrer:mt(),signal:n.signal}),a=!1,o=!1,s=(r=i.url).indexOf(\"sku=\")>0&&Y(r);\"json\"===t.type&&i.headers.set(\"Accept\",\"application/json\");var l=function(r,n,a){if(!o){if(r&&\"SecurityError\"!==r.message&&_(r),n&&a)return c(n);var l=Date.now();self.fetch(i).then((function(r){if(r.ok){var n=s?r.clone():null;return c(r,n,l)}return e(new gt(r.statusText,r.status,t.url))})).catch((function(t){20!==t.code&&e(new Error(t.message))}))}},c=function(r,n,s){(\"arrayBuffer\"===t.type?r.arrayBuffer():\"json\"===t.type?r.json():r.text()).then((function(t){o||(n&&s&<(i,n,s),a=!0,e(null,t,r.headers.get(\"Cache-Control\"),r.headers.get(\"Expires\")))})).catch((function(t){o||e(new Error(t.message))}))};return s?ut(i,l):l(null,null),{cancel:function(){o=!0,a||n.abort()}}}var yt=function(t,e){if(r=t.url,!(/^file:/.test(r)||/^file:/.test(mt())&&!/^\\w+:/.test(r))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty(\"signal\"))return vt(t,e);if(k()&&self.worker&&self.worker.actor){return self.worker.actor.send(\"getResource\",t,e,void 0,!0)}}var r;return function(t,e){var r=new self.XMLHttpRequest;for(var n in r.open(t.method||\"GET\",t.url,!0),\"arrayBuffer\"===t.type&&(r.responseType=\"arraybuffer\"),t.headers)r.setRequestHeader(n,t.headers[n]);return\"json\"===t.type&&(r.responseType=\"text\",r.setRequestHeader(\"Accept\",\"application/json\")),r.withCredentials=\"include\"===t.credentials,r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if(\"json\"===t.type)try{n=JSON.parse(r.response)}catch(t){return e(t)}e(null,n,r.getResponseHeader(\"Cache-Control\"),r.getResponseHeader(\"Expires\"))}else e(new gt(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},xt=function(t,e){return yt(u(t,{type:\"arrayBuffer\"}),e)},bt=function(t,e){return yt(u(t,{method:\"POST\"}),e)};var _t,wt;_t=[],wt=0;var Tt=function(t,e){if(B.supported&&(t.headers||(t.headers={}),t.headers.accept=\"image/webp,*/*\"),wt>=F.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return _t.push(r),r}wt++;var n=!1,i=function(){if(!n)for(n=!0,wt--;_t.length&&wt0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},Et.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var Lt={$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.051129,180,85.051129]},scheme:{type:\"enum\",values:{xyz:{},tms:{}},default:\"xyz\"},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},attribution:{type:\"string\"},promoteId:{type:\"promoteId\"},\"*\":{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.051129,180,85.051129]},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.051129,180,85.051129]},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},attribution:{type:\"string\"},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\"},clusterProperties:{type:\"*\"},lineMetrics:{type:\"boolean\",default:!1},generateId:{type:\"boolean\",default:!1},promoteId:{type:\"promoteId\"}},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\",\"property-type\":\"constant\"}},layout_fill:{\"fill-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_circle:{\"circle-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_heatmap:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},\"layout_fill-extrusion\":{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_line:{\"line-cap\":{type:\"enum\",values:{butt:{},round:{},square:{}},default:\"butt\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-join\":{type:\"enum\",values:{bevel:{},round:{},miter:{}},default:\"miter\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"line-miter-limit\":{type:\"number\",default:2,requires:[{\"line-join\":\"miter\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-round-limit\":{type:\"number\",default:1.05,requires:[{\"line-join\":\"round\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_symbol:{\"symbol-placement\":{type:\"enum\",values:{point:{},line:{},\"line-center\":{}},default:\"point\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-spacing\":{type:\"number\",default:250,minimum:1,units:\"pixels\",requires:[{\"symbol-placement\":\"line\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-avoid-edges\":{type:\"boolean\",default:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"symbol-z-order\":{type:\"enum\",values:{auto:{},\"viewport-y\":{},source:{}},default:\"auto\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-optional\":{type:\"boolean\",default:!1,requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-size\":{type:\"number\",default:1,minimum:0,units:\"factor of the original icon size\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-text-fit\":{type:\"enum\",values:{none:{},width:{},height:{},both:{}},default:\"none\",requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-text-fit-padding\":{type:\"array\",value:\"number\",length:4,default:[0,0,0,0],units:\"pixels\",requires:[\"icon-image\",\"text-field\",{\"icon-text-fit\":[\"both\",\"width\",\"height\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-image\":{type:\"resolvedImage\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-keep-upright\":{type:\"boolean\",default:!1,requires:[\"icon-image\",{\"icon-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-offset\":{type:\"array\",value:\"number\",length:2,default:[0,0],requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-field\":{type:\"formatted\",default:\"\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-font\":{type:\"array\",value:\"string\",default:[\"Open Sans Regular\",\"Arial Unicode MS Regular\"],requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-size\":{type:\"number\",default:16,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-width\":{type:\"number\",default:10,minimum:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-line-height\":{type:\"number\",default:1.2,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-letter-spacing\":{type:\"number\",default:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-justify\":{type:\"enum\",values:{auto:{},left:{},center:{},right:{}},default:\"center\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-radial-offset\":{type:\"number\",units:\"ems\",default:0,requires:[\"text-field\"],\"property-type\":\"data-driven\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]}},\"text-variable-anchor\":{type:\"array\",value:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"text-field\",{\"!\":\"text-variable-anchor\"}],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-angle\":{type:\"number\",default:45,units:\"degrees\",requires:[\"text-field\",{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-writing-mode\":{type:\"array\",value:\"enum\",values:{horizontal:{},vertical:{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-keep-upright\":{type:\"boolean\",default:!0,requires:[\"text-field\",{\"text-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-transform\":{type:\"enum\",values:{none:{},uppercase:{},lowercase:{}},default:\"none\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-offset\":{type:\"array\",value:\"number\",units:\"ems\",length:2,default:[0,0],requires:[\"text-field\",{\"!\":\"text-radial-offset\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-optional\":{type:\"boolean\",default:!1,requires:[\"text-field\",\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_raster:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_hillshade:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},filter:{type:\"array\",value:\"*\"},filter_operator:{type:\"enum\",values:{\"==\":{},\"!=\":{},\">\":{},\">=\":{},\"<\":{},\"<=\":{},in:{},\"!in\":{},all:{},any:{},none:{},has:{},\"!has\":{},within:{}}},geometry_type:{type:\"enum\",values:{Point:{},LineString:{},Polygon:{}}},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}},function_stop:{type:\"array\",minimum:0,maximum:24,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\"},in:{group:\"Lookup\"},\"index-of\":{group:\"Lookup\"},slice:{group:\"Lookup\"},case:{group:\"Decision\"},match:{group:\"Decision\"},coalesce:{group:\"Decision\"},step:{group:\"Ramps, scales, curves\"},interpolate:{group:\"Ramps, scales, curves\"},\"interpolate-hcl\":{group:\"Ramps, scales, curves\"},\"interpolate-lab\":{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\"},format:{group:\"Types\"},image:{group:\"Types\"},\"number-format\":{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\"},\"feature-state\":{group:\"Feature data\"},\"geometry-type\":{group:\"Feature data\"},id:{group:\"Feature data\"},zoom:{group:\"Zoom\"},\"heatmap-density\":{group:\"Heatmap\"},\"line-progress\":{group:\"Feature data\"},accumulated:{group:\"Feature data\"},\"+\":{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\"},distance:{group:\"Math\"},\"==\":{group:\"Decision\"},\"!=\":{group:\"Decision\"},\">\":{group:\"Decision\"},\"<\":{group:\"Decision\"},\">=\":{group:\"Decision\"},\"<=\":{group:\"Decision\"},all:{group:\"Decision\"},any:{group:\"Decision\"},\"!\":{group:\"Decision\"},within:{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:{}},\"property-type\":\"data-constant\",transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]}},position:{type:\"array\",default:[1.15,210,30],length:3,value:\"number\",\"property-type\":\"data-constant\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]}},color:{type:\"color\",\"property-type\":\"data-constant\",default:\"#ffffff\",expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},intensity:{type:\"number\",\"property-type\":\"data-constant\",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:[\"zoom\"]},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\",default:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-outline-color\":{type:\"color\",transition:!0,requires:[{\"!\":\"fill-pattern\"},{\"fill-antialias\":!0}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"}},\"paint_fill-extrusion\":{\"fill-extrusion-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-extrusion-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-extrusion-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"fill-extrusion-height\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-base\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,requires:[\"fill-extrusion-height\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-vertical-gradient\":{type:\"boolean\",default:!0,transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_line:{\"line-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"line-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-width\":{type:\"number\",default:1,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-gap-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-offset\":{type:\"number\",default:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-dasharray\":{type:\"array\",value:\"number\",minimum:0,transition:!0,units:\"line widths\",requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"line-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"line-gradient\":{type:\"color\",transition:!1,requires:[{\"!\":\"line-dasharray\"},{\"!\":\"line-pattern\"},{source:\"geojson\",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:[\"line-progress\"]},\"property-type\":\"color-ramp\"}},paint_circle:{\"circle-radius\":{type:\"number\",default:5,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-blur\":{type:\"number\",default:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"circle-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-scale\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-stroke-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"}},paint_heatmap:{\"heatmap-radius\":{type:\"number\",default:30,minimum:1,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-weight\":{type:\"number\",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-intensity\":{type:\"number\",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"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\"],transition:!1,expression:{interpolated:!0,parameters:[\"heatmap-density\"]},\"property-type\":\"color-ramp\"},\"heatmap-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_symbol:{\"icon-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"icon-image\",\"icon-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-color\":{type:\"color\",default:\"#000000\",transition:!0,overridable:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"text-field\",\"text-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_raster:{\"raster-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-hue-rotate\":{type:\"number\",default:0,period:360,transition:!0,units:\"degrees\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-min\":{type:\"number\",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-max\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-saturation\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-contrast\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-resampling\":{type:\"enum\",values:{linear:{},nearest:{}},default:\"linear\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-fade-duration\":{type:\"number\",default:300,minimum:0,transition:!1,units:\"milliseconds\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_hillshade:{\"hillshade-illumination-direction\":{type:\"number\",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-illumination-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-exaggeration\":{type:\"number\",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-shadow-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-highlight-color\":{type:\"color\",default:\"#FFFFFF\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-accent-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_background:{\"background-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"background-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"background-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"background-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},transition:{duration:{type:\"number\",default:300,minimum:0,units:\"milliseconds\"},delay:{type:\"number\",default:0,minimum:0,units:\"milliseconds\"}},\"property-type\":{\"data-driven\":{type:\"property-type\"},\"cross-faded\":{type:\"property-type\"},\"cross-faded-data-driven\":{type:\"property-type\"},\"color-ramp\":{type:\"property-type\"},\"data-constant\":{type:\"property-type\"},constant:{type:\"property-type\"}},promoteId:{\"*\":{type:\"string\"}}},Ct=function(t,e,r,n){this.message=(t?t+\": \":\"\")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function Pt(t){var e=t.key,r=t.value;return r?[new Ct(e,r,\"constants have been deprecated as of v8\")]:[]}function It(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n\":\"value\"===t.itemType.kind?\"array\":\"array<\"+e+\">\"}return t.kind}var Zt=[Ft,Bt,Nt,jt,Ut,Gt,Vt,Wt(Ht),Yt];function Jt(t,e){if(\"error\"===e.kind)return null;if(\"array\"===t.kind){if(\"array\"===e.kind&&(0===e.N&&\"value\"===e.itemType.kind||!Jt(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=Zt;r255?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]),m=g<=.5?g*(d+1):g+d-g*d,v=2*g-m;return[n(255*s(v,m,p+1/3)),n(255*s(v,m,p)),n(255*s(v,m,p-1/3)),h];default:return null}}return null}}catch(t){}})).parseCSSColor,te=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};te.parse=function(t){if(t){if(t instanceof te)return t;if(\"string\"==typeof t){var e=$t(t);if(e)return new te(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},te.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+\")\"},te.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]},te.black=new te(0,0,0,1),te.white=new te(1,1,1,1),te.transparent=new te(0,0,0,0),te.red=new te(1,0,0,1);var ee=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\"})};ee.prototype.compare=function(t,e){return this.collator.compare(t,e)},ee.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var re=function(t,e,r,n,i){this.text=t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i},ne=function(t){this.sections=t};ne.fromString=function(t){return new ne([new re(t,null,null,null,null)])},ne.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},ne.factory=function(t){return t instanceof ne?t:ne.fromString(t)},ne.prototype.toString=function(){return 0===this.sections.length?\"\":this.sections.map((function(t){return t.text})).join(\"\")},ne.prototype.serialize=function(){for(var t=[\"format\"],e=0,r=this.sections;e=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 oe(t){if(null===t)return!0;if(\"string\"==typeof t)return!0;if(\"boolean\"==typeof t)return!0;if(\"number\"==typeof t)return!0;if(t instanceof te)return!0;if(t instanceof ee)return!0;if(t instanceof ne)return!0;if(t instanceof ie)return!0;if(Array.isArray(t)){for(var e=0,r=t;e2){var s=t[1];if(\"string\"!=typeof s||!(s in fe)||\"object\"===s)return e.error('The item type argument of \"array\" must be one of string, number, boolean',1);a=fe[s],n++}else a=Ht;if(t.length>3){if(null!==t[2]&&(\"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);o=t[2],n++}r=Wt(a,o)}else r=fe[i];for(var l=[];n1)&&e.push(n)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var pe=function(t){this.type=Gt,this.sections=t};pe.parse=function(t,e){if(t.length<2)return e.error(\"Expected at least one argument.\");var r=t[1];if(!Array.isArray(r)&&\"object\"==typeof r)return e.error(\"First argument must be an image or text section.\");for(var n=[],i=!1,a=1;a<=t.length-1;++a){var o=t[a];if(i&&\"object\"==typeof o&&!Array.isArray(o)){i=!1;var s=null;if(o[\"font-scale\"]&&!(s=e.parse(o[\"font-scale\"],1,Bt)))return null;var l=null;if(o[\"text-font\"]&&!(l=e.parse(o[\"text-font\"],1,Wt(Nt))))return null;var c=null;if(o[\"text-color\"]&&!(c=e.parse(o[\"text-color\"],1,Ut)))return null;var u=n[n.length-1];u.scale=s,u.font=l,u.textColor=c}else{var f=e.parse(t[a],1,Ht);if(!f)return null;var h=f.type.kind;if(\"string\"!==h&&\"value\"!==h&&\"null\"!==h&&\"resolvedImage\"!==h)return e.error(\"Formatted text type must be 'string', 'value', 'image' or 'null'.\");i=!0,n.push({content:f,scale:null,font:null,textColor:null})}}return new pe(n)},pe.prototype.evaluate=function(t){return new ne(this.sections.map((function(e){var r=e.content.evaluate(t);return se(r)===Yt?new re(\"\",r,null,null,null):new re(le(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(\",\"):null,e.textColor?e.textColor.evaluate(t):null)})))},pe.prototype.eachChild=function(t){for(var e=0,r=this.sections;e-1),r},de.prototype.eachChild=function(t){t(this.input)},de.prototype.outputDefined=function(){return!1},de.prototype.serialize=function(){return[\"image\",this.input.serialize()]};var ge={\"to-boolean\":jt,\"to-color\":Ut,\"to-number\":Bt,\"to-string\":Nt},me=function(t,e){this.type=t,this.args=e};me.parse=function(t,e){if(t.length<2)return e.error(\"Expected at least one argument.\");var r=t[0];if((\"to-boolean\"===r||\"to-string\"===r)&&2!==t.length)return e.error(\"Expected one argument.\");for(var n=ge[r],i=[],a=1;a4?\"Invalid rbga value \"+JSON.stringify(e)+\": expected an array containing either three or four numeric values.\":ae(e[0],e[1],e[2],e[3])))return new te(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ue(r||\"Could not parse color from value '\"+(\"string\"==typeof e?e:String(JSON.stringify(e)))+\"'\")}if(\"number\"===this.type.kind){for(var o=null,s=0,l=this.args;s=e[2])&&(!(t[1]<=e[1])&&!(t[3]>=e[3])))}function Te(t,e){var r,n=(180+t[0])/360,i=(r=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360),a=Math.pow(2,e.z);return[Math.round(n*a*8192),Math.round(i*a*8192)]}function ke(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function Ae(t,e){for(var r,n,i,a,o,s,l,c=!1,u=0,f=e.length;u0&&f<0||u<0&&f>0}function Ee(t,e,r){for(var n=0,i=r;nr[2]){var i=.5*n,a=t[0]-r[0]>i?-n:r[0]-t[0]>i?n:0;0===a&&(a=t[0]-r[2]>i?-n:r[2]-t[0]>i?n:0),t[0]+=a}_e(e,t)}function ze(t,e,r,n){for(var i=8192*Math.pow(2,n.z),a=[8192*n.x,8192*n.y],o=[],s=0,l=t;s=0)return!1;var r=!0;return t.eachChild((function(t){r&&!Ne(t,e)&&(r=!1)})),r}Re.parse=function(t,e){if(2!==t.length)return e.error(\"'within' expression requires exactly one argument, but found \"+(t.length-1)+\" instead.\");if(oe(t[1])){var r=t[1];if(\"FeatureCollection\"===r.type)for(var n=0;ne))throw new ue(\"Input is not a number.\");o=s-1}return 0}Ue.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)},Ue.prototype._parse=function(t,e){function r(t,e,r){return\"assert\"===r?new he(e,[t]):\"coerce\"===r?new me(e,[t]):t}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 n=t[0];if(\"string\"!=typeof n)return this.error(\"Expression name must be a string, but found \"+typeof n+' instead. If you wanted a literal array, use [\"literal\", [...]].',0),null;var i=this.registry[n];if(i){var a=i.parse(t,this);if(!a)return null;if(this.expectedType){var o=this.expectedType,s=a.type;if(\"string\"!==o.kind&&\"number\"!==o.kind&&\"boolean\"!==o.kind&&\"object\"!==o.kind&&\"array\"!==o.kind||\"value\"!==s.kind)if(\"color\"!==o.kind&&\"formatted\"!==o.kind&&\"resolvedImage\"!==o.kind||\"value\"!==s.kind&&\"string\"!==s.kind){if(this.checkSubtype(o,s))return null}else a=r(a,o,e.typeAnnotation||\"coerce\");else a=r(a,o,e.typeAnnotation||\"assert\")}if(!(a instanceof ce)&&\"resolvedImage\"!==a.type.kind&&function t(e){if(e instanceof je)return t(e.boundExpression);if(e instanceof xe&&\"error\"===e.name)return!1;if(e instanceof be)return!1;if(e instanceof Re)return!1;var r=e instanceof me||e instanceof he,n=!0;if(e.eachChild((function(e){n=r?n&&t(e):n&&e instanceof ce})),!n)return!1;return Fe(e)&&Ne(e,[\"zoom\",\"heatmap-density\",\"line-progress\",\"accumulated\",\"is-supported-script\"])}(a)){var l=new ye;try{a=new ce(a.type,a.evaluate(l))}catch(t){return this.error(t.message),null}}return a}return this.error('Unknown expression \"'+n+'\". 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.\")},Ue.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 Ue(this.registry,n,e||null,i,this.errors)},Ue.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 Dt(n,t))},Ue.prototype.checkSubtype=function(t,e){var r=Jt(t,e);return r&&this.error(r),r};var He=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n=o)return e.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.',l);var u=e.parse(s,c,i);if(!u)return null;i=i||u.type,n.push([o,u])}return new He(i,r,n)},He.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[Ve(e,n)].evaluate(t)},He.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Ge=Object.freeze({__proto__:null,number:qe,color:function(t,e,r){return new te(qe(t.r,e.r,r),qe(t.g,e.g,r),qe(t.b,e.b,r),qe(t.a,e.a,r))},array:function(t,e,r){return t.map((function(t,n){return qe(t,e[n],r)}))}}),Ye=6/29,We=3*Ye*Ye,Xe=Math.PI/180,Ze=180/Math.PI;function Je(t){return t>.008856451679035631?Math.pow(t,1/3):t/We+4/29}function Ke(t){return t>Ye?t*t*t:We*(t-4/29)}function Qe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function $e(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function tr(t){var e=$e(t.r),r=$e(t.g),n=$e(t.b),i=Je((.4124564*e+.3575761*r+.1804375*n)/.95047),a=Je((.2126729*e+.7151522*r+.072175*n)/1);return{l:116*a-16,a:500*(i-a),b:200*(a-Je((.0193339*e+.119192*r+.9503041*n)/1.08883)),alpha:t.a}}function er(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=1*Ke(e),r=.95047*Ke(r),n=1.08883*Ke(n),new te(Qe(3.2404542*r-1.5371385*e-.4985314*n),Qe(-.969266*r+1.8760108*e+.041556*n),Qe(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function rr(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var nr={forward:tr,reverse:er,interpolate:function(t,e,r){return{l:qe(t.l,e.l,r),a:qe(t.a,e.a,r),b:qe(t.b,e.b,r),alpha:qe(t.alpha,e.alpha,r)}}},ir={forward:function(t){var e=tr(t),r=e.l,n=e.a,i=e.b,a=Math.atan2(i,n)*Ze;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*Xe,r=t.c;return er({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:rr(t.h,e.h,r),c:qe(t.c,e.c,r),l:qe(t.l,e.l,r),alpha:qe(t.alpha,e.alpha,r)}}},ar=Object.freeze({__proto__:null,lab:nr,hcl:ir}),or=function(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var a=0,o=i;a1})))return e.error(\"Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.\",1);n={name:\"cubic-bezier\",controlPoints:s}}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(!(i=e.parse(i,2,Bt)))return null;var l=[],c=null;\"interpolate-hcl\"===r||\"interpolate-lab\"===r?c=Ut:e.expectedType&&\"value\"!==e.expectedType.kind&&(c=e.expectedType);for(var u=0;u=f)return e.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.',p);var g=e.parse(h,d,c);if(!g)return null;c=c||g.type,l.push([f,g])}return\"number\"===c.kind||\"color\"===c.kind||\"array\"===c.kind&&\"number\"===c.itemType.kind&&\"number\"==typeof c.N?new or(c,r,n,i,l):e.error(\"Type \"+Xt(c)+\" is not interpolatable.\")},or.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=Ve(e,n),o=e[a],s=e[a+1],l=or.interpolationFactor(this.interpolation,n,o,s),c=r[a].evaluate(t),u=r[a+1].evaluate(t);return\"interpolate\"===this.operator?Ge[this.type.kind.toLowerCase()](c,u,l):\"interpolate-hcl\"===this.operator?ir.reverse(ir.interpolate(ir.forward(c),ir.forward(u),l)):nr.reverse(nr.interpolate(nr.forward(c),nr.forward(u),l))},or.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e=r.length)throw new ue(\"Array index out of bounds: \"+e+\" > \"+(r.length-1)+\".\");if(e!==Math.floor(e))throw new ue(\"Array index must be an integer, but found \"+e+\" instead.\");return r[e]},ur.prototype.eachChild=function(t){t(this.index),t(this.input)},ur.prototype.outputDefined=function(){return!1},ur.prototype.serialize=function(){return[\"at\",this.index.serialize(),this.input.serialize()]};var fr=function(t,e){this.type=jt,this.needle=t,this.haystack=e};fr.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,Ht),n=e.parse(t[2],2,Ht);return r&&n?Kt(r.type,[jt,Nt,Bt,Ft,Ht])?new fr(r,n):e.error(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(r.type)+\" instead\"):null},fr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!r)return!1;if(!Qt(e,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ue(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(se(e))+\" instead.\");if(!Qt(r,[\"string\",\"array\"]))throw new ue(\"Expected second argument to be of type array or string, but found \"+Xt(se(r))+\" instead.\");return r.indexOf(e)>=0},fr.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},fr.prototype.outputDefined=function(){return!0},fr.prototype.serialize=function(){return[\"in\",this.needle.serialize(),this.haystack.serialize()]};var hr=function(t,e,r){this.type=Bt,this.needle=t,this.haystack=e,this.fromIndex=r};hr.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error(\"Expected 3 or 4 arguments, but found \"+(t.length-1)+\" instead.\");var r=e.parse(t[1],1,Ht),n=e.parse(t[2],2,Ht);if(!r||!n)return null;if(!Kt(r.type,[jt,Nt,Bt,Ft,Ht]))return e.error(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(r.type)+\" instead\");if(4===t.length){var i=e.parse(t[3],3,Bt);return i?new hr(r,n,i):null}return new hr(r,n)},hr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!Qt(e,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ue(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(se(e))+\" instead.\");if(!Qt(r,[\"string\",\"array\"]))throw new ue(\"Expected second argument to be of type array or string, but found \"+Xt(se(r))+\" instead.\");if(this.fromIndex){var n=this.fromIndex.evaluate(t);return r.indexOf(e,n)}return r.indexOf(e)},hr.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},hr.prototype.outputDefined=function(){return!1},hr.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return[\"index-of\",this.needle.serialize(),this.haystack.serialize(),t]}return[\"index-of\",this.needle.serialize(),this.haystack.serialize()]};var pr=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};pr.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;oNumber.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,se(h)))return null}else r=se(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,Ht);if(!d)return null;var g=e.parse(t[t.length-1],t.length-1,n);return g?\"value\"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new pr(r,n,d,i,a,g):null},pr.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(se(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},pr.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},pr.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},pr.prototype.serialize=function(){for(var t=this,e=[\"match\",this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();i=5)return e.error(\"Expected 3 or 4 arguments, but found \"+(t.length-1)+\" instead.\");var r=e.parse(t[1],1,Ht),n=e.parse(t[2],2,Bt);if(!r||!n)return null;if(!Kt(r.type,[Wt(Ht),Nt,Ht]))return e.error(\"Expected first argument to be of type array or string, but found \"+Xt(r.type)+\" instead\");if(4===t.length){var i=e.parse(t[3],3,Bt);return i?new gr(r.type,r,n,i):null}return new gr(r.type,r,n)},gr.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!Qt(e,[\"string\",\"array\"]))throw new ue(\"Expected first argument to be of type array or string, but found \"+Xt(se(e))+\" instead.\");if(this.endIndex){var n=this.endIndex.evaluate(t);return e.slice(r,n)}return e.slice(r)},gr.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},gr.prototype.outputDefined=function(){return!1},gr.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return[\"slice\",this.input.serialize(),this.beginIndex.serialize(),t]}return[\"slice\",this.input.serialize(),this.beginIndex.serialize()]};var xr=yr(\"==\",(function(t,e,r){return e===r}),vr),br=yr(\"!=\",(function(t,e,r){return e!==r}),(function(t,e,r,n){return!vr(0,e,r,n)})),_r=yr(\"<\",(function(t,e,r){return e\",(function(t,e,r){return e>r}),(function(t,e,r,n){return n.compare(e,r)>0})),Tr=yr(\"<=\",(function(t,e,r){return e<=r}),(function(t,e,r,n){return n.compare(e,r)<=0})),kr=yr(\">=\",(function(t,e,r){return e>=r}),(function(t,e,r,n){return n.compare(e,r)>=0})),Ar=function(t,e,r,n,i){this.type=Nt,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};Ar.parse=function(t,e){if(3!==t.length)return e.error(\"Expected two arguments.\");var r=e.parse(t[1],1,Bt);if(!r)return null;var n=t[2];if(\"object\"!=typeof n||Array.isArray(n))return e.error(\"NumberFormat options argument must be an object.\");var i=null;if(n.locale&&!(i=e.parse(n.locale,1,Nt)))return null;var a=null;if(n.currency&&!(a=e.parse(n.currency,1,Nt)))return null;var o=null;if(n[\"min-fraction-digits\"]&&!(o=e.parse(n[\"min-fraction-digits\"],1,Bt)))return null;var s=null;return n[\"max-fraction-digits\"]&&!(s=e.parse(n[\"max-fraction-digits\"],1,Bt))?null:new Ar(r,i,a,o,s)},Ar.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?\"currency\":\"decimal\",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},Ar.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},Ar.prototype.outputDefined=function(){return!1},Ar.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t[\"min-fraction-digits\"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t[\"max-fraction-digits\"]=this.maxFractionDigits.serialize()),[\"number-format\",this.number.serialize(),t]};var Mr=function(t){this.type=Bt,this.input=t};Mr.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 \"+Xt(r.type)+\" instead.\"):new Mr(r):null},Mr.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 ue(\"Expected value to be of type string or array, but found \"+Xt(se(e))+\" instead.\")},Mr.prototype.eachChild=function(t){t(this.input)},Mr.prototype.outputDefined=function(){return!1},Mr.prototype.serialize=function(){var t=[\"length\"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Sr={\"==\":xr,\"!=\":br,\">\":wr,\"<\":_r,\">=\":kr,\"<=\":Tr,array:he,at:ur,boolean:he,case:dr,coalesce:lr,collator:be,format:pe,image:de,in:fr,\"index-of\":hr,interpolate:or,\"interpolate-hcl\":or,\"interpolate-lab\":or,length:Mr,let:cr,literal:ce,match:pr,number:he,\"number-format\":Ar,object:he,slice:gr,step:He,string:he,\"to-boolean\":me,\"to-color\":me,\"to-number\":me,\"to-string\":me,var:je,within:Re};function Er(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=ae(r,n,i,o);if(s)throw new ue(s);return new te(r/255*o,n/255*o,i/255*o,o)}function Lr(t,e){return t in e}function Cr(t,e){var r=e[t];return void 0===r?null:r}function Pr(t){return{type:t}}function Ir(t){return{result:\"success\",value:t}}function Or(t){return{result:\"error\",value:t}}function zr(t){return\"data-driven\"===t[\"property-type\"]||\"cross-faded-data-driven\"===t[\"property-type\"]}function Dr(t){return!!t.expression&&t.expression.parameters.indexOf(\"zoom\")>-1}function Rr(t){return!!t.expression&&t.expression.interpolated}function Fr(t){return t instanceof Number?\"number\":t instanceof String?\"string\":t instanceof Boolean?\"boolean\":Array.isArray(t)?\"array\":null===t?\"null\":typeof t}function Br(t){return\"object\"==typeof t&&null!==t&&!Array.isArray(t)}function Nr(t){return t}function jr(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function Ur(t,e,r,n,i){return jr(typeof r===i?n[r]:void 0,t.default,e.default)}function Vr(t,e,r){if(\"number\"!==Fr(r))return jr(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=Ve(t.stops.map((function(t){return t[0]})),r);return t.stops[i][1]}function Hr(t,e,r){var n=void 0!==t.base?t.base:1;if(\"number\"!==Fr(r))return jr(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=Ve(t.stops.map((function(t){return t[0]})),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=Ge[e.type]||Nr;if(t.colorSpace&&\"rgb\"!==t.colorSpace){var u=ar[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 qr(t,e,r){return\"color\"===e.type?r=te.parse(r):\"formatted\"===e.type?r=ne.fromString(r.toString()):\"resolvedImage\"===e.type?r=ie.fromString(r.toString()):Fr(r)===e.type||\"enum\"===e.type&&e.values[r]||(r=void 0),jr(r,t.default,e.default)}xe.register(Sr,{error:[{kind:\"error\"},[Nt],function(t,e){var r=e[0];throw new ue(r.evaluate(t))}],typeof:[Nt,[Ht],function(t,e){return Xt(se(e[0].evaluate(t)))}],\"to-rgba\":[Wt(Bt,4),[Ut],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Ut,[Bt,Bt,Bt],Er],rgba:[Ut,[Bt,Bt,Bt,Bt],Er],has:{type:jt,overloads:[[[Nt],function(t,e){return Lr(e[0].evaluate(t),t.properties())}],[[Nt,Vt],function(t,e){var r=e[0],n=e[1];return Lr(r.evaluate(t),n.evaluate(t))}]]},get:{type:Ht,overloads:[[[Nt],function(t,e){return Cr(e[0].evaluate(t),t.properties())}],[[Nt,Vt],function(t,e){var r=e[0],n=e[1];return Cr(r.evaluate(t),n.evaluate(t))}]]},\"feature-state\":[Ht,[Nt],function(t,e){return Cr(e[0].evaluate(t),t.featureState||{})}],properties:[Vt,[],function(t){return t.properties()}],\"geometry-type\":[Nt,[],function(t){return t.geometryType()}],id:[Ht,[],function(t){return t.id()}],zoom:[Bt,[],function(t){return t.globals.zoom}],\"heatmap-density\":[Bt,[],function(t){return t.globals.heatmapDensity||0}],\"line-progress\":[Bt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Ht,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],\"+\":[Bt,Pr(Bt),function(t,e){for(var r=0,n=0,i=e;n\":[jt,[Nt,Ht],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->\":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],\"filter-<=\":[jt,[Nt,Ht],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-<=\":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],\"filter->=\":[jt,[Nt,Ht],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->=\":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],\"filter-has\":[jt,[Ht],function(t,e){return e[0].value in t.properties()}],\"filter-has-id\":[jt,[],function(t){return null!==t.id()&&void 0!==t.id()}],\"filter-type-in\":[jt,[Wt(Nt)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],\"filter-id-in\":[jt,[Wt(Ht)],function(t,e){return e[0].value.indexOf(t.id())>=0}],\"filter-in-small\":[jt,[Nt,Wt(Ht)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],\"filter-in-large\":[jt,[Nt,Wt(Ht)],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)}],all:{type:jt,overloads:[[[jt,jt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[Pr(jt),function(t,e){for(var r=0,n=e;r0&&\"string\"==typeof t[0]&&t[0]in Sr}function Wr(t,e){var r=new Ue(Sr,[],e?function(t){var e={color:Ut,string:Nt,number:Bt,enum:Nt,boolean:jt,formatted:Gt,resolvedImage:Yt};if(\"array\"===t.type)return Wt(e[t.value]||Ht,t.length);return e[t.type]}(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&\"string\"===e.type?{typeAnnotation:\"coerce\"}:void 0);return n?Ir(new Gr(n,e)):Or(r.errors)}Gr.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)},Gr.prototype.evaluate=function(t,e,r,n,i,a){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||\"number\"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new ue(\"Expected value to be one of \"+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(\", \")+\", but found \"+JSON.stringify(o)+\" instead.\");return o}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,\"undefined\"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Xr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent=\"constant\"!==t&&!Be(e.expression)};Xr.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,a)},Xr.prototype.evaluate=function(t,e,r,n,i,a){return this._styleExpression.evaluate(t,e,r,n,i,a)};var Zr=function(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent=\"camera\"!==t&&!Be(e.expression),this.interpolationType=n};function Jr(t,e){if(\"error\"===(t=Wr(t,e)).result)return t;var r=t.value.expression,n=Fe(r);if(!n&&!zr(e))return Or([new Dt(\"\",\"data expressions not supported\")]);var i=Ne(r,[\"zoom\"]);if(!i&&!Dr(e))return Or([new Dt(\"\",\"zoom expressions not supported\")]);var a=function t(e){var r=null;if(e instanceof cr)r=t(e.result);else if(e instanceof lr)for(var n=0,i=e.args;nn.maximum?[new Ct(e,r,r+\" is greater than the maximum value \"+n.maximum)]:[]}function en(t){var e,r,n,i=t.valueSpec,a=Ot(t.value.type),o={},s=\"categorical\"!==a&&void 0===t.value.property,l=!s,c=\"array\"===Fr(t.value.stops)&&\"array\"===Fr(t.value.stops[0])&&\"object\"===Fr(t.value.stops[0][0]),u=Qr({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 Ct(t.key,t.value,'identity function may not have a \"stops\" property')];var e=[],r=t.value;e=e.concat($r({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:f})),\"array\"===Fr(r)&&0===r.length&&e.push(new Ct(t.key,r,\"array must have at least one stop\"));return e},default:function(t){return kn({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return\"identity\"===a&&s&&u.push(new Ct(t.key,t.value,'missing required property \"property\"')),\"identity\"===a||t.value.stops||u.push(new Ct(t.key,t.value,'missing required property \"stops\"')),\"exponential\"===a&&t.valueSpec.expression&&!Rr(t.valueSpec)&&u.push(new Ct(t.key,t.value,\"exponential functions not supported\")),t.styleSpec.$version>=8&&(l&&!zr(t.valueSpec)?u.push(new Ct(t.key,t.value,\"property functions not supported\")):s&&!Dr(t.valueSpec)&&u.push(new Ct(t.key,t.value,\"zoom functions not supported\"))),\"categorical\"!==a&&!c||void 0!==t.value.property||u.push(new Ct(t.key,t.value,'\"property\" property is required')),u;function f(t){var e=[],a=t.value,s=t.key;if(\"array\"!==Fr(a))return[new Ct(s,a,\"array expected, \"+Fr(a)+\" found\")];if(2!==a.length)return[new Ct(s,a,\"array length 2 expected, length \"+a.length+\" found\")];if(c){if(\"object\"!==Fr(a[0]))return[new Ct(s,a,\"object expected, \"+Fr(a[0])+\" found\")];if(void 0===a[0].zoom)return[new Ct(s,a,\"object stop key must have zoom\")];if(void 0===a[0].value)return[new Ct(s,a,\"object stop key must have value\")];if(n&&n>Ot(a[0].zoom))return[new Ct(s,a[0].zoom,\"stop zoom values must appear in ascending order\")];Ot(a[0].zoom)!==n&&(n=Ot(a[0].zoom),r=void 0,o={}),e=e.concat(Qr({key:s+\"[0]\",value:a[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:tn,value:h}}))}else e=e.concat(h({key:s+\"[0]\",value:a[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},a));return Yr(zt(a[1]))?e.concat([new Ct(s+\"[1]\",a[1],\"expressions are not allowed in function stops.\")]):e.concat(kn({key:s+\"[1]\",value:a[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,n){var s=Fr(t.value),l=Ot(t.value),c=null!==t.value?t.value:n;if(e){if(s!==e)return[new Ct(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 Ct(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 zr(i)&&void 0===a&&(u+='\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.'),[new Ct(t.key,c,u)]}return\"categorical\"!==a||\"number\"!==s||isFinite(l)&&Math.floor(l)===l?\"categorical\"!==a&&\"number\"===s&&void 0!==r&&l=2&&\"$id\"!==t[1]&&\"$type\"!==t[1];case\"in\":return t.length>=3&&(\"string\"!=typeof t[1]||Array.isArray(t[2]));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);ee?1:0}function cn(t){if(!t)return!0;var e,r=t[0];return t.length<=1?\"any\"!==r:\"==\"===r?un(t[1],t[2],\"==\"):\"!=\"===r?pn(un(t[1],t[2],\"==\")):\"<\"===r||\">\"===r||\"<=\"===r||\">=\"===r?un(t[1],t[2],r):\"any\"===r?(e=t.slice(1),[\"any\"].concat(e.map(cn))):\"all\"===r?[\"all\"].concat(t.slice(1).map(cn)):\"none\"===r?[\"all\"].concat(t.slice(1).map(cn).map(pn)):\"in\"===r?fn(t[1],t.slice(2)):\"!in\"===r?pn(fn(t[1],t.slice(2))):\"has\"===r?hn(t[1]):\"!has\"===r?pn(hn(t[1])):\"within\"!==r||t}function un(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 fn(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(ln)]]:[\"filter-in-small\",t,[\"literal\",e]]}}function hn(t){switch(t){case\"$type\":return!0;case\"$id\":return[\"filter-has-id\"];default:return[\"filter-has\",t]}}function pn(t){return[\"!\",t]}function dn(t){return an(zt(t.value))?rn(It({},t,{expressionContext:\"filter\",valueSpec:{value:\"boolean\"}})):function t(e){var r=e.value,n=e.key;if(\"array\"!==Fr(r))return[new Ct(n,r,\"array expected, \"+Fr(r)+\" found\")];var i,a=e.styleSpec,o=[];if(r.length<1)return[new Ct(n,r,\"filter array must have at least 1 element\")];switch(o=o.concat(nn({key:n+\"[0]\",value:r[0],valueSpec:a.filter_operator,style:e.style,styleSpec:e.styleSpec})),Ot(r[0])){case\"<\":case\"<=\":case\">\":case\">=\":r.length>=2&&\"$type\"===Ot(r[1])&&o.push(new Ct(n,r,'\"$type\" cannot be use with operator \"'+r[0]+'\"'));case\"==\":case\"!=\":3!==r.length&&o.push(new Ct(n,r,'filter array for operator \"'+r[0]+'\" must have 3 elements'));case\"in\":case\"!in\":r.length>=2&&\"string\"!==(i=Fr(r[1]))&&o.push(new Ct(n+\"[1]\",r[1],\"string expected, \"+i+\" found\"));for(var s=2;s=u[p+0]&&n>=u[p+1])?(o[h]=!0,a.push(c[h])):o[h]=!1}}},Dn.prototype._forEachCell=function(t,e,r,n,i,a,o,s){for(var l=this._convertToCellCoord(t),c=this._convertToCellCoord(e),u=this._convertToCellCoord(r),f=this._convertToCellCoord(n),h=l;h<=u;h++)for(var p=c;p<=f;p++){var d=this.d*p+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(p),this._convertFromCellCoord(h+1),this._convertFromCellCoord(p+1)))&&i.call(this,t,e,r,n,d,a,o,s))return}},Dn.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},Dn.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Dn.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+this.cells.length+1+1,r=0,n=0;n=0)){var f=t[u];c[u]=Bn[l].shallow.indexOf(u)>=0?f:Hn(f,e)}t instanceof Error&&(c.message=t.message)}if(c.$name)throw new Error(\"$name property is reserved for worker serialization logic.\");return\"Object\"!==l&&(c.$name=l),c}throw new Error(\"can't serialize object of type \"+typeof t)}function qn(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||Un(t)||Vn(t)||ArrayBuffer.isView(t)||t instanceof Rn)return t;if(Array.isArray(t))return t.map(qn);if(\"object\"==typeof t){var e=t.$name||\"Object\",r=Bn[e].klass;if(!r)throw new Error(\"can't deserialize unregistered class \"+e);if(r.deserialize)return r.deserialize(t);for(var n=Object.create(r.prototype),i=0,a=Object.keys(t);i=0?s:qn(s)}}return n}throw new Error(\"can't deserialize object of type \"+typeof t)}var Gn=function(){this.first=!0};Gn.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=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 Wn(t){for(var e=0,r=t;e=65097&&t<=65103)||(!!Yn[\"CJK Compatibility Ideographs\"](t)||(!!Yn[\"CJK Compatibility\"](t)||(!!Yn[\"CJK Radicals Supplement\"](t)||(!!Yn[\"CJK Strokes\"](t)||(!(!Yn[\"CJK Symbols and Punctuation\"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||(!!Yn[\"CJK Unified Ideographs Extension A\"](t)||(!!Yn[\"CJK Unified Ideographs\"](t)||(!!Yn[\"Enclosed CJK Letters and Months\"](t)||(!!Yn[\"Hangul Compatibility Jamo\"](t)||(!!Yn[\"Hangul Jamo Extended-A\"](t)||(!!Yn[\"Hangul Jamo Extended-B\"](t)||(!!Yn[\"Hangul Jamo\"](t)||(!!Yn[\"Hangul Syllables\"](t)||(!!Yn.Hiragana(t)||(!!Yn[\"Ideographic Description Characters\"](t)||(!!Yn.Kanbun(t)||(!!Yn[\"Kangxi Radicals\"](t)||(!!Yn[\"Katakana Phonetic Extensions\"](t)||(!(!Yn.Katakana(t)||12540===t)||(!(!Yn[\"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)||(!(!Yn[\"Small Form Variants\"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||(!!Yn[\"Unified Canadian Aboriginal Syllabics\"](t)||(!!Yn[\"Unified Canadian Aboriginal Syllabics Extended\"](t)||(!!Yn[\"Vertical Forms\"](t)||(!!Yn[\"Yijing Hexagram Symbols\"](t)||(!!Yn[\"Yi Syllables\"](t)||!!Yn[\"Yi Radicals\"](t))))))))))))))))))))))))))))))}function Jn(t){return!(Zn(t)||function(t){return!(!Yn[\"Latin-1 Supplement\"](t)||167!==t&&169!==t&&174!==t&&177!==t&&188!==t&&189!==t&&190!==t&&215!==t&&247!==t)||(!(!Yn[\"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)||(!!Yn[\"Letterlike Symbols\"](t)||(!!Yn[\"Number Forms\"](t)||(!(!Yn[\"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))||(!(!Yn[\"Control Pictures\"](t)||9251===t)||(!!Yn[\"Optical Character Recognition\"](t)||(!!Yn[\"Enclosed Alphanumerics\"](t)||(!!Yn[\"Geometric Shapes\"](t)||(!(!Yn[\"Miscellaneous Symbols\"](t)||t>=9754&&t<=9759)||(!(!Yn[\"Miscellaneous Symbols and Arrows\"](t)||!(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243))||(!!Yn[\"CJK Symbols and Punctuation\"](t)||(!!Yn.Katakana(t)||(!!Yn[\"Private Use Area\"](t)||(!!Yn[\"CJK Compatibility Forms\"](t)||(!!Yn[\"Small Form Variants\"](t)||(!!Yn[\"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 Kn(t){return t>=1424&&t<=2303||Yn[\"Arabic Presentation Forms-A\"](t)||Yn[\"Arabic Presentation Forms-B\"](t)}function Qn(t,e){return!(!e&&Kn(t))&&!(t>=2304&&t<=3583||t>=3840&&t<=4255||Yn.Khmer(t))}function $n(t){for(var e=0,r=t;e-1&&(ai=ni),ii&&ii(t)};function li(){ci.fire(new Mt(\"pluginStateChange\",{pluginStatus:ai,pluginURL:oi}))}var ci=new Et,ui=function(){return ai},fi=function(){if(ai!==ti||!oi)throw new Error(\"rtl-text-plugin cannot be downloaded unless a pluginURL is specified\");ai=ei,li(),oi&&xt({url:oi},(function(t){t?si(t):(ai=ri,li())}))},hi={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return ai===ri||null!=hi.applyArabicShaping},isLoading:function(){return ai===ei},setState:function(t){ai=t.pluginStatus,oi=t.pluginURL},isParsed:function(){return null!=hi.applyArabicShaping&&null!=hi.processBidirectionalText&&null!=hi.processStyledBidirectionalText},getPluginURL:function(){return oi}},pi=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 Gn,this.transition={})};pi.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,n=t;rthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}};var di=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(Br(t))return new Kr(t,e);if(Yr(t)){var r=Jr(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=te.parse(t)),{kind:\"constant\",evaluate:function(){return n}}}(void 0===e?t.specification.default:e,t.specification)};di.prototype.isDataDriven=function(){return\"source\"===this.expression.kind||\"composite\"===this.expression.kind},di.prototype.possiblyEvaluate=function(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)};var gi=function(t){this.property=t,this.value=new di(t,void 0)};gi.prototype.transitioned=function(t,e){return new vi(this.property,this.value,e,u({},t.transition,this.transition),t.now)},gi.prototype.untransitioned=function(){return new vi(this.property,this.value,null,{},0)};var mi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};mi.prototype.getValue=function(t){return x(this._values[t].value.value)},mi.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new gi(this._values[t].property)),this._values[t].value=new di(this._values[t].property,null===e?void 0:x(e))},mi.prototype.getTransition=function(t){return x(this._values[t].transition)},mi.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new gi(this._values[t].property)),this._values[t].transition=x(e)||void 0},mi.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);ethis.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(n=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}(o))}return i};var yi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};yi.prototype.possiblyEvaluate=function(t,e,r){for(var n=new _i(this._properties),i=0,a=Object.keys(this._values);in.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(Ti),Ai=function(t){this.specification=t};Ai.prototype.possiblyEvaluate=function(t,e,r,n){if(void 0!==t.value){if(\"constant\"===t.expression.kind){var i=t.expression.evaluate(e,null,{},r,n);return this._calculate(i,i,i,e)}return this._calculate(t.expression.evaluate(new pi(Math.floor(e.zoom-1),e)),t.expression.evaluate(new pi(Math.floor(e.zoom),e)),t.expression.evaluate(new pi(Math.floor(e.zoom+1),e)),e)}},Ai.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},Ai.prototype.interpolate=function(t){return t};var Mi=function(t){this.specification=t};Mi.prototype.possiblyEvaluate=function(t,e,r,n){return!!t.expression.evaluate(e,null,{},r,n)},Mi.prototype.interpolate=function(){return!1};var Si=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var r=t[e];r.specification.overridable&&this.overridableProperties.push(e);var n=this.defaultPropertyValues[e]=new di(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new gi(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};Nn(\"DataDrivenProperty\",Ti),Nn(\"DataConstantProperty\",wi),Nn(\"CrossFadedDataDrivenProperty\",ki),Nn(\"CrossFadedProperty\",Ai),Nn(\"ColorRampProperty\",Mi);var Ei=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},\"custom\"!==e.type&&(e=e,this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,\"background\"!==e.type&&(this.source=e.source,this.sourceLayer=e[\"source-layer\"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new xi(r.layout)),r.paint)){for(var n in this._transitionablePaint=new mi(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(),this.paint=new _i(r.paint)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return\"visibility\"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n=\"layers.\"+this.id+\".layout.\"+t;if(this._validate(In,n,t,e,r))return}\"visibility\"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e},e.prototype.getPaintProperty=function(t){return m(t,\"-transition\")?this._transitionablePaint.getTransition(t.slice(0,-\"-transition\".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n=\"layers.\"+this.id+\".paint.\"+t;if(this._validate(Pn,n,t,e,r))return!1}if(m(t,\"-transition\"))return this._transitionablePaint.setTransition(t.slice(0,-\"-transition\".length),e||void 0),!1;var i=this._transitionablePaint._values[t],a=\"cross-faded-data-driven\"===i.property.specification[\"property-type\"],o=i.value.isDataDriven(),s=i.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var l=this._transitionablePaint._values[t].value;return l.isDataDriven()||o||a||this._handleOverridablePaintPropertyUpdate(t,s,l)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype._handleOverridablePaintPropertyUpdate=function(t,e,r){return!1},e.prototype.isHidden=function(t){return!!(this.minzoom&&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,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)},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 this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),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 void 0===i&&(i={}),(!i||!1!==i.validate)&&On(this,t.call(Ln,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:Lt,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof bi&&zr(e.property.specification)&&((\"source\"===e.value.kind||\"composite\"===e.value.kind)&&e.value.isStateDependent))return!0}return!1},e}(Et),Li={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Ci=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},Pi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Ii(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map((function(t){var i,a=(i=t.type,Li[i].BYTES_PER_ELEMENT),o=r=Oi(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:Oi(r,Math.max(n,e)),alignment:e}}function Oi(t,e){return Math.ceil(t/e)*e}Pi.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Pi.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},Pi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Pi.prototype.clear=function(){this.length=0},Pi.prototype.resize=function(t){this.reserve(t),this.length=t},Pi.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)}},Pi.prototype._refreshViews=function(){throw new Error(\"_refreshViews() must be implemented by each concrete StructArray layout\")};var zi=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;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.int16[n+0]=e,this.int16[n+1]=r,t},e}(Pi);zi.prototype.bytesPerElement=4,Nn(\"StructArrayLayout2i4\",zi);var Di=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;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,t},e}(Pi);Di.prototype.bytesPerElement=8,Nn(\"StructArrayLayout4i8\",Di);var Ri=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;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(Pi);Ri.prototype.bytesPerElement=12,Nn(\"StructArrayLayout2i4i12\",Ri);var Fi=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;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=4*t,l=8*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=a,this.uint8[l+7]=o,t},e}(Pi);Fi.prototype.bytesPerElement=8,Nn(\"StructArrayLayout2i4ub8\",Fi);var Bi=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,n,i,a,o,s,l,c){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,n,i,a,o,s,l,c)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u){var f=9*t,h=18*t;return this.uint16[f+0]=e,this.uint16[f+1]=r,this.uint16[f+2]=n,this.uint16[f+3]=i,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.uint8[h+16]=c,this.uint8[h+17]=u,t},e}(Pi);Bi.prototype.bytesPerElement=18,Nn(\"StructArrayLayout8ui2ub18\",Bi);var Ni=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,l,c,u,f){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,n,i,a,o,s,l,c,u,f)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h){var p=12*t;return this.int16[p+0]=e,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=i,this.uint16[p+4]=a,this.uint16[p+5]=o,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=c,this.int16[p+9]=u,this.int16[p+10]=f,this.int16[p+11]=h,t},e}(Pi);Ni.prototype.bytesPerElement=24,Nn(\"StructArrayLayout4i4ui4i24\",Ni);var ji=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.float32[i+0]=e,this.float32[i+1]=r,this.float32[i+2]=n,t},e}(Pi);ji.prototype.bytesPerElement=12,Nn(\"StructArrayLayout3f12\",ji);var Ui=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;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint32[r+0]=e,t},e}(Pi);Ui.prototype.bytesPerElement=4,Nn(\"StructArrayLayout1ul4\",Ui);var Vi=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){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,r,n,i,a,o,s,l)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c){var u=10*t,f=5*t;return this.int16[u+0]=e,this.int16[u+1]=r,this.int16[u+2]=n,this.int16[u+3]=i,this.int16[u+4]=a,this.int16[u+5]=o,this.uint32[f+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,t},e}(Pi);Vi.prototype.bytesPerElement=20,Nn(\"StructArrayLayout6i1ul2ui20\",Vi);var Hi=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;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(Pi);Hi.prototype.bytesPerElement=12,Nn(\"StructArrayLayout2i2i2i12\",Hi);var qi=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),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i)},e.prototype.emplace=function(t,e,r,n,i,a){var o=4*t,s=8*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=n,this.int16[s+6]=i,this.int16[s+7]=a,t},e}(Pi);qi.prototype.bytesPerElement=16,Nn(\"StructArrayLayout2f1f2i16\",qi);var Gi=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;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=12*t,o=3*t;return this.uint8[a+0]=e,this.uint8[a+1]=r,this.float32[o+1]=n,this.float32[o+2]=i,t},e}(Pi);Gi.prototype.bytesPerElement=12,Nn(\"StructArrayLayout2ub2f12\",Gi);var Yi=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,this.uint16[i+2]=n,t},e}(Pi);Yi.prototype.bytesPerElement=6,Nn(\"StructArrayLayout3ui6\",Yi);var Wi=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,d,g,m){var v=this.length;return this.resize(v+1),this.emplace(v,t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v){var y=24*t,x=12*t,b=48*t;return this.int16[y+0]=e,this.int16[y+1]=r,this.uint16[y+2]=n,this.uint16[y+3]=i,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[y+10]=l,this.uint16[y+11]=c,this.uint16[y+12]=u,this.float32[x+7]=f,this.float32[x+8]=h,this.uint8[b+36]=p,this.uint8[b+37]=d,this.uint8[b+38]=g,this.uint32[x+10]=m,this.int16[y+22]=v,t},e}(Pi);Wi.prototype.bytesPerElement=48,Nn(\"StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48\",Wi);var Xi=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,d,g,m,v,y,x,b,_,w,T,k,A,M,S){var E=this.length;return this.resize(E+1),this.emplace(E,t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,w,T,k,A,M,S)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,w,T,k,A,M,S,E){var L=34*t,C=17*t;return this.int16[L+0]=e,this.int16[L+1]=r,this.int16[L+2]=n,this.int16[L+3]=i,this.int16[L+4]=a,this.int16[L+5]=o,this.int16[L+6]=s,this.int16[L+7]=l,this.uint16[L+8]=c,this.uint16[L+9]=u,this.uint16[L+10]=f,this.uint16[L+11]=h,this.uint16[L+12]=p,this.uint16[L+13]=d,this.uint16[L+14]=g,this.uint16[L+15]=m,this.uint16[L+16]=v,this.uint16[L+17]=y,this.uint16[L+18]=x,this.uint16[L+19]=b,this.uint16[L+20]=_,this.uint16[L+21]=w,this.uint16[L+22]=T,this.uint32[C+12]=k,this.float32[C+13]=A,this.float32[C+14]=M,this.float32[C+15]=S,this.float32[C+16]=E,t},e}(Pi);Xi.prototype.bytesPerElement=68,Nn(\"StructArrayLayout8i15ui1ul4f68\",Xi);var Zi=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;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.float32[r+0]=e,t},e}(Pi);Zi.prototype.bytesPerElement=4,Nn(\"StructArrayLayout1f4\",Zi);var Ji=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.int16[i+0]=e,this.int16[i+1]=r,this.int16[i+2]=n,t},e}(Pi);Ji.prototype.bytesPerElement=6,Nn(\"StructArrayLayout3i6\",Ji);var Ki=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=2*t,a=4*t;return this.uint32[i+0]=e,this.uint16[a+2]=r,this.uint16[a+3]=n,t},e}(Pi);Ki.prototype.bytesPerElement=8,Nn(\"StructArrayLayout1ul2ui8\",Ki);var Qi=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;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,t},e}(Pi);Qi.prototype.bytesPerElement=4,Nn(\"StructArrayLayout2ui4\",Qi);var $i=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){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint16[r+0]=e,t},e}(Pi);$i.prototype.bytesPerElement=2,Nn(\"StructArrayLayout1ui2\",$i);var ta=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;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.float32[n+0]=e,this.float32[n+1]=r,t},e}(Pi);ta.prototype.bytesPerElement=8,Nn(\"StructArrayLayout2f8\",ta);var ea=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;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,t},e}(Pi);ea.prototype.bytesPerElement=16,Nn(\"StructArrayLayout4f16\",ea);var ra=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},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Ci);ra.prototype.size=20;var na=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 ra(this,t)},e}(Vi);Nn(\"CollisionBoxArray\",na);var ia=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},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,r),e}(Ci);ia.prototype.size=48;var aa=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 ia(this,t)},e}(Wi);Nn(\"PlacedSymbolArray\",aa);var oa=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},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+12]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},r.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,r),e}(Ci);oa.prototype.size=68;var sa=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 oa(this,t)},e}(Xi);Nn(\"SymbolInstanceArray\",sa);var la=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}(Zi);Nn(\"GlyphOffsetArray\",la);var ca=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}(Ji);Nn(\"SymbolLineVertexArray\",ca);var ua=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.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,r),e}(Ci);ua.prototype.size=8;var fa=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 ua(this,t)},e}(Ki);Nn(\"FeatureIndexArray\",fa);var ha=Ii([{name:\"a_pos\",components:2,type:\"Int16\"}],4).members,pa=function(t){void 0===t&&(t=[]),this.segments=t};function da(t,e){return 256*(t=l(Math.floor(t),0,255))+(e=l(Math.floor(e),0,255))}pa.prototype.prepareSegment=function(t,e,r,n){var i=this.segments[this.segments.length-1];return t>pa.MAX_VERTEX_ARRAY_LENGTH&&_(\"Max vertices per segment is \"+pa.MAX_VERTEX_ARRAY_LENGTH+\": bucket requested \"+t),(!i||i.vertexLength+t>pa.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},pa.prototype.get=function(){return this.segments},pa.prototype.destroy=function(){for(var t=0,e=this.segments;t>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(a>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&t.charCodeAt(c+2))<<16;case 2:l^=(255&t.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(c)))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}})),va=e((function(t){t.exports=function(t,e){for(var r,n=t.length,i=e^n,a=0;n>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(a)|(255&t.charCodeAt(++a))<<8|(255&t.charCodeAt(++a))<<16|(255&t.charCodeAt(++a))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++a;switch(n){case 3:i^=(255&t.charCodeAt(a+2))<<16;case 2:i^=(255&t.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(a)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}})),ya=ma,xa=ma,ba=va;ya.murmur3=xa,ya.murmur2=ba;var _a=function(){this.ids=[],this.positions=[],this.indexed=!1};_a.prototype.add=function(t,e,r,n){this.ids.push(Ta(t)),this.positions.push(e,r,n)},_a.prototype.getPositions=function(t){for(var e=Ta(t),r=0,n=this.ids.length-1;r>1;this.ids[i]>=e?n=i:r=i+1}for(var a=[];this.ids[r]===e;){var o=this.positions[3*r],s=this.positions[3*r+1],l=this.positions[3*r+2];a.push({index:o,start:s,end:l}),r++}return a},_a.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return function t(e,r,n,i){for(;n>1],o=n-1,s=i+1;;){do{o++}while(e[o]a);if(o>=s)break;ka(e,o,s),ka(r,3*o,3*s),ka(r,3*o+1,3*s+1),ka(r,3*o+2,3*s+2)}s-nGa.max||o.yGa.max)&&(_(\"Geometry exceeds allowed extent, reduce your vector tile buffer size\"),o.x=l(o.x,Ga.min,Ga.max),o.y=l(o.y,Ga.min,Ga.max))}return r}function Wa(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var Xa=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.hasPattern=!1,this.layoutVertexArray=new zi,this.indexArray=new Yi,this.segments=new pa,this.programConfigurations=new Ua(ha,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function Za(t,e){for(var r=0;r1){if($a(t,e))return!0;for(var n=0;n1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function no(t,e){for(var r,n,i,a=!1,o=0;oe.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 io(t,e){for(var r=!1,n=0,i=t.length-1;ne.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 ao(t,e,r){var n=r[0],i=r[2];if(t.xi.x&&e.x>i.x||t.yi.y&&e.y>i.y)return!1;var a=w(t,e,r[0]);return a!==w(t,e,r[1])||a!==w(t,e,r[2])||a!==w(t,e,r[3])}function oo(t,e,r){var n=e.paint.get(t).value;return\"constant\"===n.kind?n.value:r.programConfigurations.get(e.id).getMaxValue(t)}function so(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function lo(t,e,r,n,a){if(!e[0]&&!e[1])return t;var o=i.convert(e)._mult(a);\"viewport\"===r&&o._rotate(-n);for(var s=[],l=0;l=8192||u<0||u>=8192)){var f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),h=f.vertexLength;Wa(this.layoutVertexArray,c,u,-1,-1),Wa(this.layoutVertexArray,c,u,1,-1),Wa(this.layoutVertexArray,c,u,1,1),Wa(this.layoutVertexArray,c,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),f.vertexLength+=4,f.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{},n)},Nn(\"CircleBucket\",Xa,{omit:[\"layers\"]});var co=new Si({\"circle-sort-key\":new Ti(Lt.layout_circle[\"circle-sort-key\"])}),uo={paint:new Si({\"circle-radius\":new Ti(Lt.paint_circle[\"circle-radius\"]),\"circle-color\":new Ti(Lt.paint_circle[\"circle-color\"]),\"circle-blur\":new Ti(Lt.paint_circle[\"circle-blur\"]),\"circle-opacity\":new Ti(Lt.paint_circle[\"circle-opacity\"]),\"circle-translate\":new wi(Lt.paint_circle[\"circle-translate\"]),\"circle-translate-anchor\":new wi(Lt.paint_circle[\"circle-translate-anchor\"]),\"circle-pitch-scale\":new wi(Lt.paint_circle[\"circle-pitch-scale\"]),\"circle-pitch-alignment\":new wi(Lt.paint_circle[\"circle-pitch-alignment\"]),\"circle-stroke-width\":new Ti(Lt.paint_circle[\"circle-stroke-width\"]),\"circle-stroke-color\":new Ti(Lt.paint_circle[\"circle-stroke-color\"]),\"circle-stroke-opacity\":new Ti(Lt.paint_circle[\"circle-stroke-opacity\"])}),layout:co},fo=\"undefined\"!=typeof Float32Array?Float32Array:Array;function ho(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}function po(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],m=e[13],v=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*m,t[2]=x*a+b*c+_*p+w*v,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*m,t[6]=x*a+b*c+_*p+w*v,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*m,t[10]=x*a+b*c+_*p+w*v,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*m,t[14]=x*a+b*c+_*p+w*v,t[15]=x*o+b*u+_*d+w*y,t}Math.hypot||(Math.hypot=function(){for(var t=arguments,e=0,r=arguments.length;r--;)e+=t[r]*t[r];return Math.sqrt(e)});var go=po;var mo,vo,yo=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t};mo=new fo(3),fo!=Float32Array&&(mo[0]=0,mo[1]=0,mo[2]=0),vo=mo;function xo(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}!function(){var t=function(){var t=new fo(4);return fo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}()}();var bo=function(t){var e=t[0],r=t[1];return e*e+r*r},_o=(function(){var t=function(){var t=new fo(2);return fo!=Float32Array&&(t[0]=0,t[1]=0),t}()}(),function(t){function e(e){t.call(this,e,uo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Xa(t)},e.prototype.queryRadius=function(t){var e=t;return oo(\"circle-radius\",this,e)+oo(\"circle-stroke-width\",this,e)+so(this.paint.get(\"circle-translate\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o,s){for(var l=lo(t,this.paint.get(\"circle-translate\"),this.paint.get(\"circle-translate-anchor\"),a.angle,o),c=this.paint.get(\"circle-radius\").evaluate(e,r)+this.paint.get(\"circle-stroke-width\").evaluate(e,r),u=\"map\"===this.paint.get(\"circle-pitch-alignment\"),f=u?l:function(t,e){return t.map((function(t){return wo(t,e)}))}(l,s),h=u?c*o:c,p=0,d=n;pt.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;l80*r){n=a=t[0],i=o=t[1];for(var d=r;da&&(a=s),l>o&&(o=l);c=0!==(c=Math.max(a-n,o-i))?1/c:0}return jo(h,p,r,n,i,c),p}function Bo(t,e,r,n,i){var a,o;if(i===ls(t,e,r,n)>0)for(a=e;a=e;a-=n)o=as(a,t[a],t[a+1],o);return o&&$o(o,o.next)&&(os(o),o=o.next),o}function No(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!$o(n,n.next)&&0!==Qo(n.prev,n,n.next))n=n.next;else{if(os(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function jo(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=Xo(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;e0||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?Vo(t,n,i,a):Uo(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),os(t),t=l.next,c=l.next;else if((t=l)===c){o?1===o?jo(t=Ho(No(t),e,r),e,r,n,i,a,2):2===o&&qo(t,e,r,n,i,a):jo(No(t),e,r,n,i,a,1);break}}}function Uo(t){var e=t.prev,r=t,n=t.next;if(Qo(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Jo(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&Qo(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Vo(t,e,r,n){var i=t.prev,a=t,o=t.next;if(Qo(i,a,o)>=0)return!1;for(var s=i.xa.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=Xo(s,l,e,r,n),h=Xo(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&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=h;){if(d!==t.prev&&d!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Ho(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!$o(i,a)&&ts(i,n,n.next,a)&&ns(i,a)&&ns(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),os(n),os(n.next),n=t=a),n=n.next}while(n!==t);return No(n)}function qo(t,e,r,n,i,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&Ko(o,s)){var l=is(o,s);return o=No(o,o.next),l=No(l,l.next),jo(o,e,r,n,i,a),void jo(l,e,r,n,i,a)}s=s.next}o=o.next}while(o!==t)}function Go(t,e){return t.x-e.x}function Yo(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.x&&n.x>=u&&i!==n.x&&Jo(ar.x||n.x===r.x&&Wo(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(t,e)){var r=is(e,t);No(e,e.next),No(r,r.next)}}function Wo(t,e){return Qo(t.prev,t,e.prev)<0&&Qo(e.next,t,t.next)<0}function Xo(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 Zo(t){var e=t,r=t;do{(e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function Ko(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&&ts(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(ns(t,e)&&ns(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)&&(Qo(t.prev,t,e.prev)||Qo(t,e.prev,e))||$o(t,e)&&Qo(t.prev,t,t.next)>0&&Qo(e.prev,e,e.next)>0)}function Qo(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function $o(t,e){return t.x===e.x&&t.y===e.y}function ts(t,e,r,n){var i=rs(Qo(t,e,r)),a=rs(Qo(t,e,n)),o=rs(Qo(r,n,t)),s=rs(Qo(r,n,e));return i!==a&&o!==s||(!(0!==i||!es(t,r,e))||(!(0!==a||!es(t,n,e))||(!(0!==o||!es(r,t,n))||!(0!==s||!es(r,e,n)))))}function es(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function rs(t){return t>0?1:t<0?-1:0}function ns(t,e){return Qo(t.prev,t,t.next)<0?Qo(t,e,t.next)>=0&&Qo(t,t.prev,e)>=0:Qo(t,e,t.prev)<0||Qo(t,t.next,e)<0}function is(t,e){var r=new ss(t.i,t.x,t.y),n=new ss(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 as(t,e,r,n){var i=new ss(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 os(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 ss(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 ls(t,e,r,n){for(var i=0,a=e,o=r-n;an;){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),f=Math.max(n,Math.floor(r-s*c/o+u)),h=Math.min(i,Math.floor(r+(o-s)*c/o+u));t(e,r,f,h,a)}var p=e[r],d=n,g=i;for(us(e,n,r),a(e[i],p)>0&&us(e,n,i);d0;)g--}0===a(e[n],p)?us(e,n,g):(g++,us(e,g,i)),g<=r&&(n=g+1),r<=g&&(i=g-1)}}(t,e,r||0,n||t.length-1,i||fs)}function us(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function fs(t,e){return te?1:0}function hs(t,e){var r=t.length;if(r<=1)return[t];for(var n,i,a=[],o=0;o1)for(var l=0;l0&&(n+=t[i-1].length,r.holes.push(n))}return r},Do.default=Ro;var ms=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.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new zi,this.indexArray=new Yi,this.indexArray2=new Qi,this.programConfigurations=new Ua(zo,t.layers,t.zoom),this.segments=new pa,this.segments2=new pa,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};ms.prototype.populate=function(t,e,r){this.hasPattern=ds(\"fill\",this.layers,e);for(var n=this.layers[0].layout.get(\"fill-sort-key\"),i=[],a=0,o=t;a>3}if(a--,1===n||2===n)o+=t.readSVarint(),s+=t.readSVarint(),1===n&&(e&&l.push(e),e=[]),e.push(new i(o,s));else{if(7!==n)throw new Error(\"unknown command \"+n);e&&e.push(e[0].clone())}}return e&&l.push(e),l},ws.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>3}if(n--,1===r||2===r)(i+=t.readSVarint())s&&(s=i),(a+=t.readSVarint())c&&(c=a);else if(7!==r)throw new Error(\"unknown command \"+r)}return[o,l,s,c]},ws.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=ws.types[this.type];function u(t){for(var e=0;e>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 Es(t,e,r){if(3===t){var n=new As(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}Ms.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 _s(this._pbf,e,this.extent,this._keys,this._values)};var Ls={VectorTile:function(t,e){this.layers=t.readFields(Es,{},e)},VectorTileFeature:_s,VectorTileLayer:As},Cs=Ls.VectorTileFeature.types,Ps=Math.pow(2,13);function Is(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,2*Math.floor(n*Ps)+o,i*Ps*2,a*Ps*2,Math.round(s))}var Os=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.hasPattern=!1,this.layoutVertexArray=new Ri,this.indexArray=new Yi,this.programConfigurations=new Ua(bs,t.layers,t.zoom),this.segments=new pa,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function zs(t,e){return t.x===e.x&&(t.x<0||t.x>8192)||t.y===e.y&&(t.y<0||t.y>8192)}function Ds(t){return t.every((function(t){return t.x<0}))||t.every((function(t){return t.x>8192}))||t.every((function(t){return t.y<0}))||t.every((function(t){return t.y>8192}))}Os.prototype.populate=function(t,e,r){this.features=[],this.hasPattern=ds(\"fill-extrusion\",this.layers,e);for(var n=0,i=t;n=1){var y=d[m-1];if(!zs(v,y)){f.vertexLength+4>pa.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var x=v.sub(y)._perp()._unit(),b=y.dist(v);g+b>32768&&(g=0),Is(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,0,g),Is(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,1,g),g+=b,Is(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,0,g),Is(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,1,g);var _=f.vertexLength;this.indexArray.emplaceBack(_,_+2,_+1),this.indexArray.emplaceBack(_+1,_+2,_+3),f.vertexLength+=4,f.primitiveLength+=2}}}}if(f.vertexLength+l>pa.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),\"Polygon\"===Cs[t.type]){for(var w=[],T=[],k=f.vertexLength,A=0,M=s;A=2&&t[l-1].equals(t[l-2]);)l--;for(var c=0;c0;if(T&&v>c){var A=u.dist(p);if(A>2*f){var M=u.sub(u.sub(p)._mult(f/A)._round());this.updateDistance(p,M),this.addCurrentVertex(M,g,0,0,h),p=M}}var S=p&&d,E=S?r:s?\"butt\":n;if(S&&\"round\"===E&&(_i&&(E=\"bevel\"),\"bevel\"===E&&(_>2&&(E=\"flipbevel\"),_100)y=m.mult(-1);else{var L=_*g.add(m).mag()/g.sub(m).mag();y._perp()._mult(L*(k?-1:1))}this.addCurrentVertex(u,y,0,0,h),this.addCurrentVertex(u,y.mult(-1),0,0,h)}else if(\"bevel\"===E||\"fakeround\"===E){var C=-Math.sqrt(_*_-1),P=k?C:0,I=k?0:C;if(p&&this.addCurrentVertex(u,g,P,I,h),\"fakeround\"===E)for(var O=Math.round(180*w/Math.PI/20),z=1;z2*f){var j=u.add(d.sub(u)._mult(f/N)._round());this.updateDistance(u,j),this.addCurrentVertex(j,m,0,0,h),u=j}}}}},qs.prototype.addCurrentVertex=function(t,e,r,n,i,a){void 0===a&&(a=!1);var o=e.x+e.y*r,s=e.y-e.x*r,l=-e.x+e.y*n,c=-e.y-e.x*n;this.addHalfVertex(t,o,s,a,!1,r,i),this.addHalfVertex(t,l,c,a,!0,-n,i),this.distance>Hs/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,n,i,a))},qs.prototype.addHalfVertex=function(t,e,r,n,i,a,o){var s=t.x,l=t.y,c=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(i?1:0),Math.round(63*e)+128,Math.round(63*r)+128,1+(0===a?0:a<0?-1:1)|(63&c)<<2,c>>6);var u=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,u),o.primitiveLength++),i?this.e2=u:this.e1=u},qs.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(Hs-1):this.distance},qs.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},Nn(\"LineBucket\",qs,{omit:[\"layers\",\"patternFeatures\"]});var Gs=new Si({\"line-cap\":new wi(Lt.layout_line[\"line-cap\"]),\"line-join\":new Ti(Lt.layout_line[\"line-join\"]),\"line-miter-limit\":new wi(Lt.layout_line[\"line-miter-limit\"]),\"line-round-limit\":new wi(Lt.layout_line[\"line-round-limit\"]),\"line-sort-key\":new Ti(Lt.layout_line[\"line-sort-key\"])}),Ys={paint:new Si({\"line-opacity\":new Ti(Lt.paint_line[\"line-opacity\"]),\"line-color\":new Ti(Lt.paint_line[\"line-color\"]),\"line-translate\":new wi(Lt.paint_line[\"line-translate\"]),\"line-translate-anchor\":new wi(Lt.paint_line[\"line-translate-anchor\"]),\"line-width\":new Ti(Lt.paint_line[\"line-width\"]),\"line-gap-width\":new Ti(Lt.paint_line[\"line-gap-width\"]),\"line-offset\":new Ti(Lt.paint_line[\"line-offset\"]),\"line-blur\":new Ti(Lt.paint_line[\"line-blur\"]),\"line-dasharray\":new Ai(Lt.paint_line[\"line-dasharray\"]),\"line-pattern\":new ki(Lt.paint_line[\"line-pattern\"]),\"line-gradient\":new Mi(Lt.paint_line[\"line-gradient\"])}),layout:Gs},Ws=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 pi(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,i){return r=u({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,i)},e}(Ti))(Ys.paint.properties[\"line-width\"].specification);Ws.useIntegerZoom=!0;var Xs=function(t){function e(e){t.call(this,e,Ys)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){\"line-gradient\"===t&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values[\"line-gradient\"].value.expression;this.gradient=Co(t,\"lineProgress\"),this.gradientTexture=null},e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r),this.paint._values[\"line-floorwidth\"]=Ws.possiblyEvaluate(this._transitioningPaint._values[\"line-width\"].value,e)},e.prototype.createBucket=function(t){return new qs(t)},e.prototype.queryRadius=function(t){var e=t,r=Zs(oo(\"line-width\",this,e),oo(\"line-gap-width\",this,e)),n=oo(\"line-offset\",this,e);return r/2+Math.abs(n)+so(this.paint.get(\"line-translate\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,a,o,s){var l=lo(t,this.paint.get(\"line-translate\"),this.paint.get(\"line-translate-anchor\"),o.angle,s),c=s/2*Zs(this.paint.get(\"line-width\").evaluate(e,r),this.paint.get(\"line-gap-width\").evaluate(e,r)),u=this.paint.get(\"line-offset\").evaluate(e,r);return u&&(n=function(t,e){for(var r=[],n=new i(0,0),a=0;a=3)for(var a=0;a0?e+2*t:t}var Js=Ii([{name:\"a_pos_offset\",components:4,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint16\"},{name:\"a_pixeloffset\",components:4,type:\"Int16\"}],4),Ks=Ii([{name:\"a_projected_pos\",components:3,type:\"Float32\"}],4),Qs=(Ii([{name:\"a_fade_opacity\",components:1,type:\"Uint32\"}],4),Ii([{name:\"a_placed\",components:2,type:\"Uint8\"},{name:\"a_shift\",components:2,type:\"Float32\"}])),$s=(Ii([{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\"}]),Ii([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_anchor_pos\",components:2,type:\"Int16\"},{name:\"a_extrude\",components:2,type:\"Int16\"}],4)),tl=Ii([{name:\"a_pos\",components:2,type:\"Float32\"},{name:\"a_radius\",components:1,type:\"Float32\"},{name:\"a_flags\",components:2,type:\"Int16\"}],4);Ii([{name:\"triangle\",components:3,type:\"Uint16\"}]),Ii([{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:\"placedOrientation\"},{type:\"Uint8\",name:\"hidden\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Int16\",name:\"associatedIconIndex\"}]),Ii([{type:\"Int16\",name:\"anchorX\"},{type:\"Int16\",name:\"anchorY\"},{type:\"Int16\",name:\"rightJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"centerJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"leftJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedTextSymbolIndex\"},{type:\"Int16\",name:\"placedIconSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedIconSymbolIndex\"},{type:\"Uint16\",name:\"key\"},{type:\"Uint16\",name:\"textBoxStartIndex\"},{type:\"Uint16\",name:\"textBoxEndIndex\"},{type:\"Uint16\",name:\"verticalTextBoxStartIndex\"},{type:\"Uint16\",name:\"verticalTextBoxEndIndex\"},{type:\"Uint16\",name:\"iconBoxStartIndex\"},{type:\"Uint16\",name:\"iconBoxEndIndex\"},{type:\"Uint16\",name:\"verticalIconBoxStartIndex\"},{type:\"Uint16\",name:\"verticalIconBoxEndIndex\"},{type:\"Uint16\",name:\"featureIndex\"},{type:\"Uint16\",name:\"numHorizontalGlyphVertices\"},{type:\"Uint16\",name:\"numVerticalGlyphVertices\"},{type:\"Uint16\",name:\"numIconVertices\"},{type:\"Uint16\",name:\"numVerticalIconVertices\"},{type:\"Uint16\",name:\"useRuntimeCollisionCircles\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Float32\",name:\"textBoxScale\"},{type:\"Float32\",components:2,name:\"textOffset\"},{type:\"Float32\",name:\"collisionCircleDiameter\"}]),Ii([{type:\"Float32\",name:\"offsetX\"}]),Ii([{type:\"Int16\",name:\"x\"},{type:\"Int16\",name:\"y\"},{type:\"Int16\",name:\"tileUnitDistanceFromAnchor\"}]);function el(t,e,r){return t.sections.forEach((function(t){t.text=function(t,e,r){var n=e.layout.get(\"text-transform\").evaluate(r,{});return\"uppercase\"===n?t=t.toLocaleUpperCase():\"lowercase\"===n&&(t=t.toLocaleLowerCase()),hi.applyArabicShaping&&(t=hi.applyArabicShaping(t)),t}(t.text,e,r)})),t}var rl={\"!\":\"\\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\"};var nl=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<>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)},il=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>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<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g},al=ol;function ol(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}ol.Varint=0,ol.Fixed64=1,ol.Bytes=2,ol.Fixed32=5;var sl=\"undefined\"==typeof TextDecoder?null:new TextDecoder(\"utf8\");function ll(t){return t.type===ol.Bytes?t.readVarint()+t.pos:t.pos+1}function cl(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function ul(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(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 fl(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function wl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}ol.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos>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=bl(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=wl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=bl(this.buf,this.pos)+4294967296*bl(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=bl(this.buf,this.pos)+4294967296*wl(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=nl(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=nl(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(i=a[r.pos++],n=(112&i)>>4,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<3,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<10,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<17,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<24,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(1&i)<<31,i<128)return cl(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=this.pos;return this.pos=t,t-e>=12&&sl?function(t,e,r){return sl.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){var n=\"\",i=e;for(;i239?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,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==ol.Bytes)return t.push(this.readVarint(e));var r=ll(this);for(t=t||[];this.pos127;);else if(e===ol.Bytes)this.pos=this.readVarint()+this.pos;else if(e===ol.Fixed32)this.pos+=4;else{if(e!==ol.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;e268435455||t<0?function(t,e){var r,n;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));if(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;if(e.buf[e.pos++]|=r|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;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;a55295&&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&&ul(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),il(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),il(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=128&&ul(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,ol.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,fl,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,hl,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,gl,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,pl,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,dl,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,ml,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,vl,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,yl,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,xl,e)},writeBytesField:function(t,e){this.writeTag(t,ol.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,ol.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,ol.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,ol.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,ol.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,ol.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,ol.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,ol.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,ol.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,ol.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};function Tl(t,e,r){1===t&&r.readMessage(kl,e)}function kl(t,e,r){if(3===t){var n=r.readMessage(Al,{}),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 So({width:o+6,height:s+6},a),metrics:{width:o,height:s,left:l,top:c,advance:u}})}}function Al(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())}function Ml(t){for(var e=0,r=0,n=0,i=t;n=0;h--){var p=o[h];if(!(f.w>p.w||f.h>p.h)){if(f.x=p.x,f.y=p.y,l=Math.max(l,f.y+f.h),s=Math.max(s,f.x+f.w),f.w===p.w&&f.h===p.h){var d=o.pop();h0&&N>A&&(A=N)}else{var j=r[S.fontStack],U=j&&j[L];if(U&&U.rect)I=U.rect,P=U.metrics;else{var V=e[S.fontStack],H=V&&V[L];if(!H)continue;P=H.metrics}C=24*(_-S.scale)}D?(t.verticalizable=!0,k.push({glyph:L,imageName:O,x:h,y:p+C,vertical:D,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:I}),h+=z*S.scale+c):(k.push({glyph:L,imageName:O,x:h,y:p+C,vertical:D,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:I}),h+=P.advance*S.scale+c)}if(0!==k.length){var q=h-c;d=Math.max(q,d),Vl(k,0,k.length-1,m,A)}h=0;var G=a*_+A;T.lineOffset=Math.max(A,w),p+=G,g=Math.max(G,g),++v}else p+=a,++v}var Y;var W=p- -17,X=Ul(o),Z=X.horizontalAlign,J=X.verticalAlign;(function(t,e,r,n,i,a,o,s,l){var c=(e-r)*i,u=0;u=a!==o?-s*n- -17:(-n*l+.5)*o;for(var f=0,h=t;f=0&&n>=t&&zl[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},Il.prototype.substring=function(t,e){var r=new Il;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},Il.prototype.toString=function(){return this.text},Il.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce((function(e,r){return Math.max(e,t.sections[r].scale)}),0)},Il.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(Pl.forText(t.scale,t.fontStack||e));for(var r=this.sections.length-1,n=0;n=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var zl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Dl={};function Rl(t,e,r,n,i,a){if(e.imageName){var o=n[e.imageName];return o?o.displaySize[0]*e.scale*24/a+i:0}var s=r[e.fontStack],l=s&&s[t];return l?l.metrics.advance*e.scale+i:0}function Fl(t,e,r,n){var i=Math.pow(t-e,2);return n?t=0,f=0,h=0;h-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;sn;)c-=l.shift().angleDelta;if(c>i)return!1;o++,s+=f.dist(h)}return!0}function Jl(t){for(var e=0,r=0;rc){var d=(c-l)/p,g=qe(f.x,h.x,d),m=qe(f.y,h.y,d),v=new ql(g,m,h.angleTo(f),u);return v._round(),!o||Zl(t,v,s,o,e)?v:void 0}l+=p}}function tc(t,e,r,n,i,a,o,s,l){var c=Kl(n,a,o),u=Ql(n,i),f=u*o,h=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-f=0&&_=0&&w=0&&p+u<=f){var T=new ql(_,w,x,g);T._round(),i&&!Zl(e,T,o,i,a)||d.push(T)}}h+=y}l||d.length||s||(d=t(e,h/2,n,i,a,o,s,!0,c));return d}(t,h?e/2*s%e:(u/2+2*a)*o*s%e,e,c,r,f,h,!1,l)}function ec(t,e,r,n,a){for(var o=[],s=0;s=n&&h.x>=n||(f.x>=n?f=new i(n,f.y+(h.y-f.y)*((n-f.x)/(h.x-f.x)))._round():h.x>=n&&(h=new i(n,f.y+(h.y-f.y)*((n-f.x)/(h.x-f.x)))._round()),f.y>=a&&h.y>=a||(f.y>=a?f=new i(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round():h.y>=a&&(h=new i(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}function rc(t,e,r,n){var a=[],o=t.image,s=o.pixelRatio,l=o.paddedRect.w-2,c=o.paddedRect.h-2,u=t.right-t.left,f=t.bottom-t.top,h=o.stretchX||[[0,l]],p=o.stretchY||[[0,c]],d=function(t,e){return t+e[1]-e[0]},g=h.reduce(d,0),m=p.reduce(d,0),v=l-g,y=c-m,x=0,b=g,_=0,w=m,T=0,k=v,A=0,M=y;if(o.content&&n){var S=o.content;x=nc(h,0,S[0]),_=nc(p,0,S[1]),b=nc(h,S[0],S[2]),w=nc(p,S[1],S[3]),T=S[0]-x,A=S[1]-_,k=S[2]-S[0]-b,M=S[3]-S[1]-w}var E=function(n,a,l,c){var h=ac(n.stretch-x,b,u,t.left),p=oc(n.fixed-T,k,n.stretch,g),d=ac(a.stretch-_,w,f,t.top),v=oc(a.fixed-A,M,a.stretch,m),y=ac(l.stretch-x,b,u,t.left),S=oc(l.fixed-T,k,l.stretch,g),E=ac(c.stretch-_,w,f,t.top),L=oc(c.fixed-A,M,c.stretch,m),C=new i(h,d),P=new i(y,d),I=new i(y,E),O=new i(h,E),z=new i(p/s,v/s),D=new i(S/s,L/s),R=e*Math.PI/180;if(R){var F=Math.sin(R),B=Math.cos(R),N=[B,-F,F,B];C._matMult(N),P._matMult(N),O._matMult(N),I._matMult(N)}var j=n.stretch+n.fixed,U=l.stretch+l.fixed,V=a.stretch+a.fixed,H=c.stretch+c.fixed;return{tl:C,tr:P,bl:O,br:I,tex:{x:o.paddedRect.x+1+j,y:o.paddedRect.y+1+V,w:U-j,h:H-V},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:z,pixelOffsetBR:D,minFontScaleX:k/s/u,minFontScaleY:M/s/f,isSDF:r}};if(n&&(o.stretchX||o.stretchY))for(var L=ic(h,v,g),C=ic(p,y,m),P=0;P0&&(d=Math.max(10,d),this.circleDiameter=d)}else{var g=o.top*s-l,m=o.bottom*s+l,v=o.left*s-l,y=o.right*s+l,x=o.collisionPadding;if(x&&(v-=x[0]*s,g-=x[1]*s,y+=x[2]*s,m+=x[3]*s),u){var b=new i(v,g),_=new i(y,g),w=new i(v,m),T=new i(y,m),k=u*Math.PI/180;b._rotate(k),_._rotate(k),w._rotate(k),T._rotate(k),v=Math.min(b.x,_.x,w.x,T.x),y=Math.max(b.x,_.x,w.x,T.x),g=Math.min(b.y,_.y,w.y,T.y),m=Math.max(b.y,_.y,w.y,T.y)}t.emplaceBack(e.x,e.y,v,g,y,m,r,n,a)}this.boxEndIndex=t.length},lc=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=cc),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function cc(t,e){return te?1:0}function uc(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var n=1/0,a=1/0,o=-1/0,s=-1/0,l=t[0],c=0;co)&&(o=u.x),(!c||u.y>s)&&(s=u.y)}var f=o-n,h=s-a,p=Math.min(f,h),d=p/2,g=new lc([],fc);if(0===p)return new i(n,a);for(var m=n;my.d||!y.d)&&(y=b,r&&console.log(\"found best %d after %d probes\",Math.round(1e4*b.d)/1e4,x)),b.max-y.d<=e||(d=b.h/2,g.push(new hc(b.p.x-d,b.p.y-d,d,t)),g.push(new hc(b.p.x+d,b.p.y-d,d,t)),g.push(new hc(b.p.x-d,b.p.y+d,d,t)),g.push(new hc(b.p.x+d,b.p.y+d,d,t)),x+=4)}return r&&(console.log(\"num probes: \"+x),console.log(\"best distance: \"+y.d)),y.p}function fc(t,e){return e.max-t.max}function hc(t,e,r,n){this.p=new i(t,e),this.h=r,this.d=function(t,e){for(var r=!1,n=1/0,i=0;it.y!=u.y>t.y&&t.x<(u.x-c.x)*(t.y-c.y)/(u.y-c.y)+c.x&&(r=!r),n=Math.min(n,ro(t,c,u))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}lc.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},lc.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}},lc.prototype.peek=function(){return this.data[0]},lc.prototype._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},lc.prototype._down=function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];t=0)break;e[t]=o,t=a}e[t]=i};var pc=Number.POSITIVE_INFINITY;function dc(t,e){return e[1]!==pc?function(t,e,r){var n=0,i=0;switch(e=Math.abs(e),r=Math.abs(r),t){case\"top-right\":case\"top-left\":case\"top\":i=r-7;break;case\"bottom-right\":case\"bottom-left\":case\"bottom\":i=7-r}switch(t){case\"top-right\":case\"bottom-right\":case\"right\":n=-e;break;case\"top-left\":case\"bottom-left\":case\"left\":n=e}return[n,i]}(t,e[0],e[1]):function(t,e){var r=0,n=0;e<0&&(e=0);var i=e/Math.sqrt(2);switch(t){case\"top-right\":case\"top-left\":n=i-7;break;case\"bottom-right\":case\"bottom-left\":n=7-i;break;case\"bottom\":n=7-e;break;case\"top\":n=e-7}switch(t){case\"top-right\":case\"bottom-right\":r=-i;break;case\"top-left\":case\"bottom-left\":r=i;break;case\"left\":r=e;break;case\"right\":r=-e}return[r,n]}(t,e[0])}function gc(t){switch(t){case\"right\":case\"top-right\":case\"bottom-right\":return\"right\";case\"left\":case\"top-left\":case\"bottom-left\":return\"left\"}return\"center\"}function mc(t,e,r,n,a,o,s,l,c,u,f,h,p,d,g){var m=function(t,e,r,n,a,o,s,l){for(var c=n.layout.get(\"text-rotate\").evaluate(o,{})*Math.PI/180,u=[],f=0,h=e.positionedLines;f32640&&_(t.layerIds[0]+': Value for \"text-size\" is >= 255. Reduce your \"text-size\".'):\"composite\"===v.kind&&((y=[128*d.compositeTextSizes[0].evaluate(s,{},g),128*d.compositeTextSizes[1].evaluate(s,{},g)])[0]>32640||y[1]>32640)&&_(t.layerIds[0]+': Value for \"text-size\" is >= 255. Reduce your \"text-size\".'),t.addSymbols(t.text,m,y,l,o,s,u,e,c.lineStartIndex,c.lineLength,p,g);for(var x=0,b=f;x=0;o--)if(n.dist(a[o])0)&&(\"constant\"!==a.value.kind||a.value.value.length>0),c=\"constant\"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,u=i.get(\"symbol-sort-key\");if(this.features=[],l||c){for(var f=e.iconDependencies,h=e.glyphDependencies,p=e.availableImages,d=new pi(this.zoom),g=0,m=t;g=0;for(var O=0,z=k.sections;O=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;l0},Mc.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Mc.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Mc.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Mc.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Mc.prototype.addIndicesForPlacedSymbol=function(t,e){for(var r=t.placedSymbolArray.get(e),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r=0&&n.indexOf(t)===r&&e.addIndicesForPlacedSymbol(e.text,t)})),a.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,a.verticalPlacedTextSymbolIndex),a.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.placedIconSymbolIndex),a.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Nn(\"SymbolBucket\",Mc,{omit:[\"layers\",\"collisionBoxArray\",\"features\",\"compareText\"]}),Mc.MAX_GLYPHS=65535,Mc.addDynamicAttributes=wc;var Sc=new Si({\"symbol-placement\":new wi(Lt.layout_symbol[\"symbol-placement\"]),\"symbol-spacing\":new wi(Lt.layout_symbol[\"symbol-spacing\"]),\"symbol-avoid-edges\":new wi(Lt.layout_symbol[\"symbol-avoid-edges\"]),\"symbol-sort-key\":new Ti(Lt.layout_symbol[\"symbol-sort-key\"]),\"symbol-z-order\":new wi(Lt.layout_symbol[\"symbol-z-order\"]),\"icon-allow-overlap\":new wi(Lt.layout_symbol[\"icon-allow-overlap\"]),\"icon-ignore-placement\":new wi(Lt.layout_symbol[\"icon-ignore-placement\"]),\"icon-optional\":new wi(Lt.layout_symbol[\"icon-optional\"]),\"icon-rotation-alignment\":new wi(Lt.layout_symbol[\"icon-rotation-alignment\"]),\"icon-size\":new Ti(Lt.layout_symbol[\"icon-size\"]),\"icon-text-fit\":new wi(Lt.layout_symbol[\"icon-text-fit\"]),\"icon-text-fit-padding\":new wi(Lt.layout_symbol[\"icon-text-fit-padding\"]),\"icon-image\":new Ti(Lt.layout_symbol[\"icon-image\"]),\"icon-rotate\":new Ti(Lt.layout_symbol[\"icon-rotate\"]),\"icon-padding\":new wi(Lt.layout_symbol[\"icon-padding\"]),\"icon-keep-upright\":new wi(Lt.layout_symbol[\"icon-keep-upright\"]),\"icon-offset\":new Ti(Lt.layout_symbol[\"icon-offset\"]),\"icon-anchor\":new Ti(Lt.layout_symbol[\"icon-anchor\"]),\"icon-pitch-alignment\":new wi(Lt.layout_symbol[\"icon-pitch-alignment\"]),\"text-pitch-alignment\":new wi(Lt.layout_symbol[\"text-pitch-alignment\"]),\"text-rotation-alignment\":new wi(Lt.layout_symbol[\"text-rotation-alignment\"]),\"text-field\":new Ti(Lt.layout_symbol[\"text-field\"]),\"text-font\":new Ti(Lt.layout_symbol[\"text-font\"]),\"text-size\":new Ti(Lt.layout_symbol[\"text-size\"]),\"text-max-width\":new Ti(Lt.layout_symbol[\"text-max-width\"]),\"text-line-height\":new wi(Lt.layout_symbol[\"text-line-height\"]),\"text-letter-spacing\":new Ti(Lt.layout_symbol[\"text-letter-spacing\"]),\"text-justify\":new Ti(Lt.layout_symbol[\"text-justify\"]),\"text-radial-offset\":new Ti(Lt.layout_symbol[\"text-radial-offset\"]),\"text-variable-anchor\":new wi(Lt.layout_symbol[\"text-variable-anchor\"]),\"text-anchor\":new Ti(Lt.layout_symbol[\"text-anchor\"]),\"text-max-angle\":new wi(Lt.layout_symbol[\"text-max-angle\"]),\"text-writing-mode\":new wi(Lt.layout_symbol[\"text-writing-mode\"]),\"text-rotate\":new Ti(Lt.layout_symbol[\"text-rotate\"]),\"text-padding\":new wi(Lt.layout_symbol[\"text-padding\"]),\"text-keep-upright\":new wi(Lt.layout_symbol[\"text-keep-upright\"]),\"text-transform\":new Ti(Lt.layout_symbol[\"text-transform\"]),\"text-offset\":new Ti(Lt.layout_symbol[\"text-offset\"]),\"text-allow-overlap\":new wi(Lt.layout_symbol[\"text-allow-overlap\"]),\"text-ignore-placement\":new wi(Lt.layout_symbol[\"text-ignore-placement\"]),\"text-optional\":new wi(Lt.layout_symbol[\"text-optional\"])}),Ec={paint:new Si({\"icon-opacity\":new Ti(Lt.paint_symbol[\"icon-opacity\"]),\"icon-color\":new Ti(Lt.paint_symbol[\"icon-color\"]),\"icon-halo-color\":new Ti(Lt.paint_symbol[\"icon-halo-color\"]),\"icon-halo-width\":new Ti(Lt.paint_symbol[\"icon-halo-width\"]),\"icon-halo-blur\":new Ti(Lt.paint_symbol[\"icon-halo-blur\"]),\"icon-translate\":new wi(Lt.paint_symbol[\"icon-translate\"]),\"icon-translate-anchor\":new wi(Lt.paint_symbol[\"icon-translate-anchor\"]),\"text-opacity\":new Ti(Lt.paint_symbol[\"text-opacity\"]),\"text-color\":new Ti(Lt.paint_symbol[\"text-color\"],{runtimeType:Ut,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),\"text-halo-color\":new Ti(Lt.paint_symbol[\"text-halo-color\"]),\"text-halo-width\":new Ti(Lt.paint_symbol[\"text-halo-width\"]),\"text-halo-blur\":new Ti(Lt.paint_symbol[\"text-halo-blur\"]),\"text-translate\":new wi(Lt.paint_symbol[\"text-translate\"]),\"text-translate-anchor\":new wi(Lt.paint_symbol[\"text-translate-anchor\"])}),layout:Sc},Lc=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Ft,this.defaultValue=t};Lc.prototype.evaluate=function(t){if(t.formattedSection){var e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default},Lc.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},Lc.prototype.outputDefined=function(){return!1},Lc.prototype.serialize=function(){return null},Nn(\"FormatSectionOverride\",Lc,{omit:[\"defaultValue\"]});var Cc=function(t){function e(e){t.call(this,e,Ec)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e,r){if(t.prototype.recalculate.call(this,e,r),\"auto\"===this.layout.get(\"icon-rotation-alignment\")&&(\"point\"!==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\")&&(\"point\"!==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\")),\"point\"===this.layout.get(\"symbol-placement\")){var n=this.layout.get(\"text-writing-mode\");if(n){for(var i=[],a=0,o=n;a\",targetMapId:n,sourceMapId:a.mapId})}}},qc.prototype.receive=function(t){var e=t.data,r=e.id;if(r&&(!e.targetMapId||this.mapId===e.targetMapId))if(\"\"===e.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else k()||e.mustQueue?(this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,e)},qc.prototype.process=function(){if(this.taskQueue.length){var t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}},qc.prototype.processTask=function(t,e){var r=this;if(\"\"===e.type){var n=this.callbacks[t];delete this.callbacks[t],n&&(e.error?n(qn(e.error)):n(null,qn(e.data)))}else{var i=!1,a=S(this.globalScope)?void 0:[],o=e.hasCallback?function(e,n){i=!0,delete r.cancelCallbacks[t],r.target.postMessage({id:t,type:\"\",sourceMapId:r.mapId,error:e?Hn(e):null,data:Hn(n,a)},a)}:function(t){i=!0},s=null,l=qn(e.data);if(this.parent[e.type])s=this.parent[e.type](e.sourceMapId,l,o);else if(this.parent.getWorkerSource){var c=e.type.split(\".\");s=this.parent.getWorkerSource(e.sourceMapId,c[0],l.source)[c[1]](l,o)}else o(new Error(\"Could not find function \"+e.type));!i&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},qc.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener(\"message\",this.receive,!1)};var Yc=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]))};Yc.prototype.setNorthEast=function(t){return this._ne=t instanceof Wc?new Wc(t.lng,t.lat):Wc.convert(t),this},Yc.prototype.setSouthWest=function(t){return this._sw=t instanceof Wc?new Wc(t.lng,t.lat):Wc.convert(t),this},Yc.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof Wc)e=t,r=t;else{if(!(t instanceof Yc)){if(Array.isArray(t)){if(4===t.length||t.every(Array.isArray)){var a=t;return this.extend(Yc.convert(a))}var o=t;return this.extend(Wc.convert(o))}return 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 Wc(e.lng,e.lat),this._ne=new Wc(r.lng,r.lat)),this},Yc.prototype.getCenter=function(){return new Wc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Yc.prototype.getSouthWest=function(){return this._sw},Yc.prototype.getNorthEast=function(){return this._ne},Yc.prototype.getNorthWest=function(){return new Wc(this.getWest(),this.getNorth())},Yc.prototype.getSouthEast=function(){return new Wc(this.getEast(),this.getSouth())},Yc.prototype.getWest=function(){return this._sw.lng},Yc.prototype.getSouth=function(){return this._sw.lat},Yc.prototype.getEast=function(){return this._ne.lng},Yc.prototype.getNorth=function(){return this._ne.lat},Yc.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Yc.prototype.toString=function(){return\"LngLatBounds(\"+this._sw.toString()+\", \"+this._ne.toString()+\")\"},Yc.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Yc.prototype.contains=function(t){var e=Wc.convert(t),r=e.lng,n=e.lat,i=this._sw.lat<=n&&n<=this._ne.lat,a=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=r&&r>=this._ne.lng),i&&a},Yc.convert=function(t){return!t||t instanceof Yc?t:new Yc(t)};var Wc=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\")};Wc.prototype.wrap=function(){return new Wc(c(this.lng,-180,180),this.lat)},Wc.prototype.toArray=function(){return[this.lng,this.lat]},Wc.prototype.toString=function(){return\"LngLat(\"+this.lng+\", \"+this.lat+\")\"},Wc.prototype.distanceTo=function(t){var e=Math.PI/180,r=this.lat*e,n=t.lat*e,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((t.lng-this.lng)*e);return 6371008.8*Math.acos(Math.min(i,1))},Wc.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new Yc(new Wc(this.lng-r,this.lat-e),new Wc(this.lng+r,this.lat+e))},Wc.convert=function(t){if(t instanceof Wc)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Wc(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&\"object\"==typeof t&&null!==t)return new Wc(Number(\"lng\"in t?t.lng:t.lon),Number(t.lat));throw new Error(\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]\")};var Xc=2*Math.PI*6371008.8;function Zc(t){return Xc*Math.cos(t*Math.PI/180)}function Jc(t){return(180+t)/360}function Kc(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Qc(t,e){return t/Zc(e)}function $c(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}var tu=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};tu.fromLngLat=function(t,e){void 0===e&&(e=0);var r=Wc.convert(t);return new tu(Jc(r.lng),Kc(r.lat),Qc(e,r.lat))},tu.prototype.toLngLat=function(){return new Wc(360*this.x-180,$c(this.y))},tu.prototype.toAltitude=function(){return t=this.z,e=this.y,t*Zc($c(e));var t,e},tu.prototype.meterInMercatorCoordinateUnits=function(){return 1/Xc*(t=$c(this.y),1/Math.cos(t*Math.PI/180));var t};var eu=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=iu(0,t,t,e,r)};eu.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},eu.prototype.url=function(t,e){var r,n,i,a,o,s=(r=this.x,n=this.y,i=this.z,a=Gc(256*r,256*(n=Math.pow(2,i)-n-1),i),o=Gc(256*(r+1),256*(n+1),i),a[0]+\",\"+a[1]+\",\"+o[0]+\",\"+o[1]),l=function(t,e,r){for(var n,i=\"\",a=t;a>0;a--)i+=(e&(n=1<this.canonical.z?new nu(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new nu(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},nu.prototype.calculateScaledKey=function(t,e){var r=this.canonical.z-t;return t>this.canonical.z?iu(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):iu(this.wrap*+e,t,t,this.canonical.x>>r,this.canonical.y>>r)},nu.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ>e&&t.canonical.y===this.canonical.y>>e},nu.prototype.children=function(t){if(this.overscaledZ>=t)return[new nu(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 nu(e,this.wrap,e,r,n),new nu(e,this.wrap,e,r+1,n),new nu(e,this.wrap,e,r,n+1),new nu(e,this.wrap,e,r+1,n+1)]},nu.prototype.isLessThan=function(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.y=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError(\"out of range source coordinates for DEM data\");return(e+1)*this.stride+(t+1)},au.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},au.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},au.prototype.getPixels=function(){return new Eo({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},au.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw new Error(\"dem dimension mismatch\");var n=e*this.dim,i=e*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(e){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:a=o-1;break;case 1:o=a+1}for(var s=-e*this.dim,l=-r*this.dim,c=a;c=0&&u[3]>=0&&s.insert(o,u[0],u[1],u[2],u[3])}},uu.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ls.VectorTile(new al(this.rawTileData)).layers,this.sourceLayerCoder=new ou(this.vtLayers?Object.keys(this.vtLayers).sort():[\"_geojsonTileLayer\"])),this.vtLayers},uu.prototype.query=function(t,e,r,n){var a=this;this.loadVTLayers();for(var o=t.params||{},s=8192/t.tileSize/t.scale,l=sn(o.filter),c=t.queryGeometry,u=t.queryPadding*s,f=hu(c),h=this.grid.query(f.minX-u,f.minY-u,f.maxX+u,f.maxY+u),p=hu(t.cameraQueryGeometry),d=this.grid3D.query(p.minX-u,p.minY-u,p.maxX+u,p.maxY+u,(function(e,r,n,a){return function(t,e,r,n,a){for(var o=0,s=t;o=l.x&&a>=l.y)return!0}var c=[new i(e,r),new i(e,a),new i(n,a),new i(n,r)];if(t.length>2)for(var u=0,f=c;u=0)return!0;return!1}(a,f)){var h=this.sourceLayerCoder.decode(r),p=this.vtLayers[h].feature(n);if(i.filter(new pi(this.tileID.overscaledZ),p))for(var d=this.getId(p,h),g=0;gn)i=!1;else if(e)if(this.expirationTimeot&&(t.getActor().send(\"enforceCacheSizeLimit\",at),ht=0)},t.clamp=l,t.clearTileCache=function(t){var e=self.caches.delete(\"mapbox-tiles\");t&&e.catch(t).then((function(){return t()}))},t.clipLine=ec,t.clone=function(t){var e=new fo(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},t.clone$1=x,t.clone$2=function(t){var e=new fo(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=tl,t.config=F,t.create=function(){var t=new fo(16);return fo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=function(){var t=new fo(9);return fo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},t.create$2=function(){var t=new fo(4);return fo!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=Wr,t.createLayout=Ii,t.createStyleLayer=function(t){return\"custom\"===t.type?new Dc(t):new Rc[t.type](t)},t.cross=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},t.deepEqual=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var n=0;n0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t},t.number=qe,t.offscreenCanvasSupported=pt,t.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},t.parseGlyphPBF=function(t){return new al(t).readFields(Tl,[])},t.pbf=al,t.performSymbolLayout=function(t,e,r,n,i,a,o){t.createArrays();var s=512*t.overscaling;t.tilePixelRatio=8192/s,t.compareText={},t.iconsNeedLinear=!1;var l=t.layers[0].layout,c=t.layers[0]._unevaluatedLayout._values,u={};if(\"composite\"===t.textSizeData.kind){var f=t.textSizeData,h=f.minZoom,p=f.maxZoom;u.compositeTextSizes=[c[\"text-size\"].possiblyEvaluate(new pi(h),o),c[\"text-size\"].possiblyEvaluate(new pi(p),o)]}if(\"composite\"===t.iconSizeData.kind){var d=t.iconSizeData,g=d.minZoom,m=d.maxZoom;u.compositeIconSizes=[c[\"icon-size\"].possiblyEvaluate(new pi(g),o),c[\"icon-size\"].possiblyEvaluate(new pi(m),o)]}u.layoutTextSize=c[\"text-size\"].possiblyEvaluate(new pi(t.zoom+1),o),u.layoutIconSize=c[\"icon-size\"].possiblyEvaluate(new pi(t.zoom+1),o),u.textMaxSize=c[\"text-size\"].possiblyEvaluate(new pi(18));for(var v=24*l.get(\"text-line-height\"),y=\"map\"===l.get(\"text-rotation-alignment\")&&\"point\"!==l.get(\"symbol-placement\"),x=l.get(\"text-keep-upright\"),b=l.get(\"text-size\"),w=function(){var a=k[T],s=l.get(\"text-font\").evaluate(a,{},o).join(\",\"),c=b.evaluate(a,{},o),f=u.layoutTextSize.evaluate(a,{},o),h=u.layoutIconSize.evaluate(a,{},o),p={horizontal:{},vertical:void 0},d=a.text,g=[0,0];if(d){var m=d.toString(),w=24*l.get(\"text-letter-spacing\").evaluate(a,{},o),A=function(t){for(var e=0,r=t;e=8192||f.y<0||f.y>=8192||function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,w,T,k,A){var M,S,E,L,C,P=t.addToLineVertexArray(e,r),I=0,O=0,z=0,D=0,R=-1,F=-1,B={},N=ya(\"\"),j=0,U=0;void 0===s._unevaluatedLayout.getValue(\"text-radial-offset\")?(M=s.layout.get(\"text-offset\").evaluate(b,{},k).map((function(t){return 24*t})),j=M[0],U=M[1]):(j=24*s.layout.get(\"text-radial-offset\").evaluate(b,{},k),U=pc);if(t.allowVerticalPlacement&&n.vertical){var V=s.layout.get(\"text-rotate\").evaluate(b,{},k)+90,H=n.vertical;L=new sc(l,e,c,u,f,H,h,p,d,V),o&&(C=new sc(l,e,c,u,f,o,m,v,d,V))}if(i){var q=s.layout.get(\"icon-rotate\").evaluate(b,{}),G=\"none\"!==s.layout.get(\"icon-text-fit\"),Y=rc(i,q,T,G),W=o?rc(o,q,T,G):void 0;E=new sc(l,e,c,u,f,i,m,v,!1,q),I=4*Y.length;var X=t.iconSizeData,Z=null;\"source\"===X.kind?(Z=[128*s.layout.get(\"icon-size\").evaluate(b,{})])[0]>32640&&_(t.layerIds[0]+': Value for \"icon-size\" is >= 255. Reduce your \"icon-size\".'):\"composite\"===X.kind&&((Z=[128*w.compositeIconSizes[0].evaluate(b,{},k),128*w.compositeIconSizes[1].evaluate(b,{},k)])[0]>32640||Z[1]>32640)&&_(t.layerIds[0]+': Value for \"icon-size\" is >= 255. Reduce your \"icon-size\".'),t.addSymbols(t.icon,Y,Z,x,y,b,!1,e,P.lineStartIndex,P.lineLength,-1,k),R=t.icon.placedSymbolArray.length-1,W&&(O=4*W.length,t.addSymbols(t.icon,W,Z,x,y,b,Cl.vertical,e,P.lineStartIndex,P.lineLength,-1,k),F=t.icon.placedSymbolArray.length-1)}for(var J in n.horizontal){var K=n.horizontal[J];if(!S){N=ya(K.text);var Q=s.layout.get(\"text-rotate\").evaluate(b,{},k);S=new sc(l,e,c,u,f,K,h,p,d,Q)}var $=1===K.positionedLines.length;if(z+=mc(t,e,K,a,s,d,b,g,P,n.vertical?Cl.horizontal:Cl.horizontalOnly,$?Object.keys(n.horizontal):[J],B,R,w,k),$)break}n.vertical&&(D+=mc(t,e,n.vertical,a,s,d,b,g,P,Cl.vertical,[\"vertical\"],B,F,w,k));var tt=S?S.boxStartIndex:t.collisionBoxArray.length,et=S?S.boxEndIndex:t.collisionBoxArray.length,rt=L?L.boxStartIndex:t.collisionBoxArray.length,nt=L?L.boxEndIndex:t.collisionBoxArray.length,it=E?E.boxStartIndex:t.collisionBoxArray.length,at=E?E.boxEndIndex:t.collisionBoxArray.length,ot=C?C.boxStartIndex:t.collisionBoxArray.length,st=C?C.boxEndIndex:t.collisionBoxArray.length,lt=-1,ct=function(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e};lt=ct(S,lt),lt=ct(L,lt),lt=ct(E,lt);var ut=(lt=ct(C,lt))>-1?1:0;ut&&(lt*=A/24);t.glyphOffsetArray.length>=Mc.MAX_GLYPHS&&_(\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\");void 0!==b.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey);t.symbolInstances.emplaceBack(e.x,e.y,B.right>=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,R,F,N,tt,et,rt,nt,it,at,ot,st,c,z,D,I,O,ut,0,h,j,U,lt)}(t,f,s,r,n,i,h,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,v,w,A,l,x,T,M,d,e,a,c,u,o)};if(\"line\"===S)for(var P=0,I=ec(e.geometry,0,0,8192,8192);P1){var V=$l(U,k,r.vertical||g,n,24,y);V&&C(U,V)}}else if(\"Polygon\"===e.type)for(var H=0,q=hs(e.geometry,0);H=E.maxzoom))if(\"none\"!==E.visibility)o(S,this.zoom,n),(g[E.id]=E.createBucket({index:u.bucketLayerIDs.length,layers:S,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:b,sourceID:this.source})).populate(_,m,this.tileID.canonical),u.bucketLayerIDs.push(S.map((function(t){return t.id})))}}}var L=t.mapObject(m.glyphDependencies,(function(t){return Object.keys(t).map(Number)}));Object.keys(L).length?a.send(\"getGlyphs\",{uid:this.uid,stacks:L},(function(t,e){f||(f=t,h=e,I.call(l))})):h={};var C=Object.keys(m.iconDependencies);C.length?a.send(\"getImages\",{icons:C,source:this.source,tileID:this.tileID,type:\"icons\"},(function(t,e){f||(f=t,p=e,I.call(l))})):p={};var P=Object.keys(m.patternDependencies);function I(){if(f)return s(f);if(h&&p&&d){var e=new i(h),r=new t.ImageAtlas(p,d);for(var a in g){var l=g[a];l instanceof t.SymbolBucket?(o(l.layers,this.zoom,n),t.performSymbolLayout(l,h,e.positions,p,r.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof t.LineBucket||l instanceof t.FillBucket||l instanceof t.FillExtrusionBucket)&&(o(l.layers,this.zoom,n),l.addFeatures(m,this.tileID.canonical,r.patternPositions))}this.status=\"done\",s(null,{buckets:t.values(g).filter((function(t){return!t.isEmpty()})),featureIndex:u,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?e.positions:null})}}P.length?a.send(\"getImages\",{icons:P,source:this.source,tileID:this.tileID,type:\"patterns\"},(function(t,e){f||(f=t,d=e,I.call(l))})):d={},I.call(this)};var l=function(t,e,r,n){this.actor=t,this.layerIndex=e,this.availableImages=r,this.loadVectorData=n||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(e,r){var n=this,i=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request),s=this.loading[i]=new a(e);s.abort=this.loadVectorData(e,(function(e,a){if(delete n.loading[i],e||!a)return s.status=\"done\",n.loaded[i]=s,r(e);var l=a.rawData,c={};a.expires&&(c.expires=a.expires),a.cacheControl&&(c.cacheControl=a.cacheControl);var u={};if(o){var f=o.finish();f&&(u.resourceTiming=JSON.parse(JSON.stringify(f)))}s.vectorTile=a.vectorTile,s.parse(a.vectorTile,n.layerIndex,n.availableImages,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]=s}))},l.prototype.reloadTile=function(t,e){var r=this,n=this.loaded,i=t.uid,a=this;if(n&&n[i]){var o=n[i];o.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,n){var i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,a.layerIndex,r.availableImages,a.actor,i)),e(t,n)};\"parsing\"===o.status?o.reloadCallback=s:\"done\"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.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()},l.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var c=t.window.ImageBitmap,u=function(){this.loaded={}};u.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,a=e.rawImageData,o=c&&a instanceof c?this.getImageData(a):a,s=new t.DEMData(n,o,i);this.loaded=this.loaded||{},this.loaded[n]=s,r(null,s)},u.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext(\"2d\")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var r=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:r.width,height:r.height},r.data)},u.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var f=function t(e,r){var n,i=e&&e.type;if(\"FeatureCollection\"===i)for(n=0;n=0!=!!e&&t.reverse()}var d=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,g=function(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,\"id\"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};g.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r>31}function P(t,e){for(var r=t.loadGeometry(),n=t.type,i=0,a=0,o=r.length,s=0;s>1;!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),h=Math.max(i,Math.floor(n-l*u/s+f)),p=Math.min(a,Math.floor(n+(s-l)*u/s+f));t(e,r,n,h,p,o)}var d=r[2*n+o],g=i,m=a;for(z(e,r,i,n),r[2*a+o]>d&&z(e,r,i,a);gd;)m--}r[2*i+o]===d?z(e,r,i,m):(m++,z(e,r,m,a)),m<=n&&(i=m+1),n<=m&&(a=m-1)}}(t,e,o,n,i,a%2),O(t,e,r,n,o-1,a+1),O(t,e,r,o+1,i,a+1)}}function z(t,e,r,n){D(t,r,n),D(e,2*r,2*n),D(e,2*r+1,2*n+1)}function D(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function R(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}_.fromVectorTileJs=w,_.fromGeojsonVt=T,_.GeoJSONWrapper=k;var F=function(t){return t[0]},B=function(t){return t[1]},N=function(t,e,r,n,i){void 0===e&&(e=F),void 0===r&&(r=B),void 0===n&&(n=64),void 0===i&&(i=Float64Array),this.nodeSize=n,this.points=t;for(var a=t.length<65536?Uint16Array:Uint32Array,o=this.ids=new a(t.length),s=this.coords=new i(2*t.length),l=0;l=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 m=(f+1)%2;(0===f?r<=s:n<=l)&&(c.push(p),c.push(g-1),c.push(m)),(0===f?i>=s:a>=l)&&(c.push(g+1),c.push(h),c.push(m))}}return u}(this.ids,this.coords,t,e,r,n,this.nodeSize)},N.prototype.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++)R(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];R(d,g,r,n)<=l&&s.push(t[p]);var m=(c+1)%2;(0===c?r-i<=d:n-i<=g)&&(o.push(f),o.push(p-1),o.push(m)),(0===c?r+i>=d:n+i>=g)&&(o.push(p+1),o.push(u),o.push(m))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var j={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},U=function(t){this.options=X(Object.create(j),t),this.trees=new Array(this.options.maxZoom+1)};function V(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function H(t,e){var r=t.geometry.coordinates,n=r[0],i=r[1];return{x:Y(n),y:W(i),zoom:1/0,index:e,parentId:-1}}function q(t){return{type:\"Feature\",id:t.id,properties:G(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 G(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+\"k\":e>=1e3?Math.round(e/100)/10+\"k\":e;return X(X({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function Y(t){return t/360+.5}function W(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 X(t,e){for(var r in e)t[r]=e[r];return t}function Z(t){return t.x}function J(t){return t.y}function K(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 Q(t,e,r,n){var i={id:void 0===t?null:t,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)$(t,e);else if(\"Polygon\"===r||\"MultiLineString\"===r)for(var n=0;n0&&(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=n-r>>1,l=n-r,c=e[r],u=e[r+1],f=e[n],h=e[n+1],p=r+3;po)a=p,o=d;else if(d===o){var g=Math.abs(p-s);gi&&(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 nt(t,e,r,n){for(var i=0;i1?1:r}function ot(t,e,r,n,i,a,o,s){if(n/=e,a>=(r/=e)&&o=n)return null;for(var l=[],c=0;c=r&&d=n)){var g=[];if(\"Point\"===h||\"MultiPoint\"===h)st(f,g,r,n,i);else if(\"LineString\"===h)lt(f,g,r,n,i,!1,s.lineMetrics);else if(\"MultiLineString\"===h)ut(f,g,r,n,i,!1);else if(\"Polygon\"===h)ut(f,g,r,n,i,!0);else if(\"MultiPolygon\"===h)for(var m=0;m=r&&o<=n&&(e.push(t[a]),e.push(t[a+1]),e.push(t[a+2]))}}function lt(t,e,r,n,i,a,o){for(var s,l,c=ct(t),u=0===i?ht:pt,f=t.start,h=0;hr&&(l=u(c,p,d,m,v,r),o&&(c.start=f+s*l)):y>n?x=r&&(l=u(c,p,d,m,v,r),b=!0),x>n&&y<=n&&(l=u(c,p,d,m,v,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&&ft(c,p,d,g),_=c.length-3,a&&_>=3&&(c[_]!==c[0]||c[_+1]!==c[1])&&ft(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 ut(t,e,r,n,i,a){for(var o=0;oo.maxX&&(o.maxX=u),f>o.maxY&&(o.maxY=f)}return o}function xt(t,e,r,n){var i=e.geometry,a=e.type,o=[];if(\"Point\"===a||\"MultiPoint\"===a)for(var s=0;s0&&e.size<(i?o:n))r.numPoints+=e.length/3;else{for(var s=[],l=0;lo)&&(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;n0===e)for(n=0,i=t.length;n24)throw new Error(\"maxZoom should be in the 0-24 range\");if(e.promoteId&&e.generateId)throw new Error(\"promoteId and generateId cannot be used together.\");var n=function(t,e){var r=[];if(\"FeatureCollection\"===t.type)for(var n=0;n=n;c--){var u=+Date.now();s=this._cluster(s,c),this.trees[c]=new N(s,Z,J,a,Float32Array),r&&console.log(\"z%d: %d clusters in %dms\",c,s.length,+Date.now()-u)}return r&&console.timeEnd(\"total time\"),this},U.prototype.getClusters=function(t,e){var r=((t[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,i=180;else if(r>i){var o=this.getClusters([r,n,180,a],e),s=this.getClusters([-180,n,i,a],e);return o.concat(s)}for(var l=this.trees[this._limitZoom(e)],c=[],u=0,f=l.range(Y(r),W(a),Y(i),W(n));u1?this._map(c,!0):null,m=(l<<5)+(e+1)+this.points.length,v=0,y=f;v>5},U.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},U.prototype._map=function(t,e){if(t.numPoints)return e?X({},t.properties):t.properties;var r=this.points[t.index].properties,n=this.options.map(r);return e&&n===r?X({},n):n},_t.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},_t.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<1&&console.time(\"creation\"),h=this.tiles[f]=yt(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<1&&console.time(\"clipping\");var g,m,v,y,x,b,_=.5*l.buffer/l.extent,w=.5-_,T=.5+_,k=1+_;g=m=v=y=null,x=ot(t,u,r-_,r+T,0,h.minX,h.maxX,l),b=ot(t,u,r+w,r+k,0,h.minX,h.maxX,l),t=null,x&&(g=ot(x,u,n-_,n+T,1,h.minY,h.maxY,l),m=ot(x,u,n+w,n+k,1,h.minY,h.maxY,l),x=null),b&&(v=ot(b,u,n-_,n+T,1,h.minY,h.maxY,l),y=ot(b,u,n+w,n+k,1,h.minY,h.maxY,l),b=null),c>1&&console.timeEnd(\"clipping\"),s.push(g||[],e+1,2*r,2*n),s.push(m||[],e+1,2*r,2*n+1),s.push(v||[],e+1,2*r+1,2*n),s.push(y||[],e+1,2*r+1,2*n+1)}}},_t.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<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[wt(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]?mt(this.tiles[s],i):null):null};var kt=function(e){function r(t,r,n,i){e.call(this,t,r,n,Tt),i&&(this.loadGeoJSON=i)}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 e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(n&&n.request&&n.request.collectResourceTiming)&&new t.RequestPerformance(n.request);this.loadGeoJSON(n,(function(a,o){if(a||!o)return r(a);if(\"object\"!=typeof o)return r(new Error(\"Input data given to '\"+n.source+\"' is not a valid GeoJSON object.\"));f(o,!0);try{e._geoJSONIndex=n.cluster?new U(function(e){var r=e.superclusterOptions,n=e.clusterProperties;if(!n||!r)return r;for(var i={},a={},o={accumulated:null,zoom:0},s={properties:null},l=Object.keys(n),c=0,u=l;c=0?0:e.button},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var h=function(e){function r(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requesters=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requesters;e=0?1.2:1))}function v(t,e,r,n,i,a,o){for(var s=0;s65535)e(new Error(\"glyphs > 65535 not supported\"));else if(a.ranges[s])e(null,{stack:r,id:i,glyph:o});else{var l=a.requests[s];l||(l=a.requests[s]=[],x.loadGlyphRange(r,s,n.url,n.requestManager,(function(t,e){if(e){for(var r in e)n._doesCharSupportLocalGlyph(+r)||(a.glyphs[+r]=e[+r]);a.ranges[s]=!0}for(var i=0,o=l;i1&&(l=t[++s]);var u=Math.abs(c-l.left),f=Math.abs(c-l.right),h=Math.min(u,f),p=void 0,d=i/r*(n+1);if(l.isDash){var g=n-Math.abs(d);p=Math.sqrt(h*h+g*g)}else p=n-Math.sqrt(h*h+d*d);this.data[o+c]=Math.max(0,Math.min(255,p+128))}},T.prototype.addRegularDash=function(t){for(var e=t.length-1;e>=0;--e){var r=t[e],n=t[e+1];r.zeroLength?t.splice(e,1):n&&n.isDash===r.isDash&&(n.left=r.left,t.splice(e,1))}var i=t[0],a=t[t.length-1];i.isDash===a.isDash&&(i.left=a.left-this.width,a.right=i.right+this.width);for(var o=this.width*this.nextRow,s=0,l=t[s],c=0;c1&&(l=t[++s]);var u=Math.abs(c-l.left),f=Math.abs(c-l.right),h=Math.min(u,f),p=l.isDash?h:-h;this.data[o+c]=Math.max(0,Math.min(255,p+128))}},T.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=n&&e.x=i&&e.y0&&(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+10&&(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)r.fire(new t.ErrorEvent(e));else{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.getClusterExpansionZoom=function(t,e){return this.actor.send(\"geojson.getClusterExpansionZoom\",{clusterId:t,source:this.id},e),this},r.prototype.getClusterChildren=function(t,e){return this.actor.send(\"geojson.getClusterChildren\",{clusterId:t,source:this.id},e),this},r.prototype.getClusterLeaves=function(t,e,r,n){return this.actor.send(\"geojson.getClusterLeaves\",{source:this.id,clusterId:t,limit:e,offset:r},n),this},r.prototype._updateWorkerData=function(e){var r=this;this._loaded=!1;var n=t.extend({},this.workerOptions),i=this._data;\"string\"==typeof i?(n.request=this.map._requestManager.transformRequest(t.browser.resolveURL(i),t.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(i),this.actor.send(this.type+\".loadData\",n,(function(t,i){r._removed||i&&i.abandoned||(r._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[r.id]&&(r._resourceTiming=i.resourceTiming[r.id].slice(0)),r.actor.send(r.type+\".coalesce\",{source:n.source},null),e(t))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(e,r){var n=this,i=e.actor?\"reloadTile\":\"loadTile\";e.actor=this.actor;var a={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};e.request=this.actor.send(i,a,(function(t,a){return delete e.request,e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(a,n.map.painter,\"reloadTile\"===i),r(null))}))},r.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.actor.send(\"removeTile\",{uid:t.uid,type:this.type,source:this.id})},r.prototype.onRemove=function(){this._removed=!0,this.actor.send(\"removeSource\",{type:this.type,source:this.id})},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),P=t.createLayout([{name:\"a_pos\",type:\"Int16\",components:2},{name:\"a_texture_pos\",type:\"Int16\",components:2}]),I=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._loaded=!1,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(e,r){var n=this;this._loaded=!1,this.fire(new t.Event(\"dataloading\",{dataType:\"source\"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),(function(i,a){n._loaded=!0,i?n.fire(new t.ErrorEvent(i)):a&&(n.image=a,e&&(n.coordinates=e),r&&r(),n._finishLoading())}))},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,(function(){e.texture=null})),this):this},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){var r=this;this.coordinates=e;var n=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var r=1/0,n=1/0,i=-1/0,a=-1/0,o=0,s=e;or.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+this.id,null,\"Playback for this video can be set only between the \"+r.start(0)+\" and \"+r.end(0)+\"-second mark.\"))):this.video.currentTime=e}},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 e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,P.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,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:\"video\",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(I),z=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.ValidationError(\"sources.\"+r,null,'\"coordinates\" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+r,null,'missing required property \"coordinates\"'))),n.animate&&\"boolean\"!=typeof n.animate&&this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+r,null,'optional \"animate\" property must be a boolean value'))),n.canvas?\"string\"==typeof n.canvas||n.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError(\"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.ValidationError(\"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._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.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.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),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 e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,P.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var a=this.tiles[i];\"loaded\"!==a.state&&(a.state=\"loaded\",a.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];tthis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},N.prototype.has=function(t){return t.wrapped().key in this.data},N.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},N.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},N.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},N.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},N.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},N.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},N.prototype.filter=function(t){var e=[];for(var r in this.data)for(var n=0,i=this.data[r];n1||(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._retainLoadedChildren=function(t,e,r,n){for(var i in this._tiles){var a=this._tiles[i];if(!(n[i]||!a.hasData()||a.tileID.overscaledZ<=e||a.tileID.overscaledZ>r)){for(var o=a.tileID;a&&a.tileID.overscaledZ>e+1;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);(a=this._tiles[s.key])&&a.hasData()&&(o=s)}for(var l=o;l.overscaledZ>e;)if(t[(l=l.scaledTo(l.overscaledZ-1)).key]){n[o.key]=o;break}}}},r.prototype.findLoadedParent=function(t,e){if(t.key in this._loadedParentTiles){var r=this._loadedParentTiles[t.key];return r&&r.tileID.overscaledZ>=e?r:null}for(var n=t.overscaledZ-1;n>=e;n--){var i=t.scaledTo(n),a=this._getLoadedTile(i);if(a)return a}},r.prototype._getLoadedTile=function(t){var e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},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 a=e.coveringZoomLevel(this._source),o=Math.max(a-r.maxOverzooming,this._source.minzoom),s=Math.max(a+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,a);if(It(this._source.type)){for(var c={},u={},f=0,h=Object.keys(l);fthis._source.maxzoom){var m=d.children(this._source.maxzoom)[0],v=this.getTile(m);if(v&&v.hasData()){n[m.key]=m;continue}}else{var y=d.children(this._source.maxzoom);if(n[y[0].key]&&n[y[1].key]&&n[y[2].key]&&n[y[3].key])continue}for(var x=g.wasRequested(),b=d.overscaledZ-1;b>=a;--b){var _=d.scaledTo(b);if(i[_.key])break;if(i[_.key]=!0,!(g=this.getTile(_))&&x&&(g=this._addTile(_)),g&&(n[_.key]=_,x=g.wasRequested(),g.hasData()))break}}}return n},r.prototype._updateLoadedParentTileCache=function(){for(var t in this._loadedParentTiles={},this._tiles){for(var e=[],r=void 0,n=this._tiles[t].tileID;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}e.push(n.key);var i=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(i))break;n=i}for(var a=0,o=e;a0||(e.hasData()&&\"reloading\"!==e.state?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,n){var i=this,a=[],o=this.transform;if(!o)return a;for(var s=n?o.getCameraQueryGeometry(e):e,l=e.map((function(t){return o.pointCoordinate(t)})),c=s.map((function(t){return o.pointCoordinate(t)})),u=this.getIds(),f=1/0,h=1/0,p=-1/0,d=-1/0,g=0,m=c;g=0&&v[1].y+m>=0){var y=l.map((function(t){return s.getTilePoint(t)})),x=c.map((function(t){return s.getTilePoint(t)}));a.push({tile:n,tileID:s,queryGeometry:y,cameraQueryGeometry:x,scale:g})}}},x=0;x=t.browser.now())return!0}return!1},r.prototype.setFeatureState=function(t,e,r){t=t||\"_geojsonTileLayer\",this._state.updateState(t,e,r)},r.prototype.removeFeatureState=function(t,e,r){t=t||\"_geojsonTileLayer\",this._state.removeFeatureState(t,e,r)},r.prototype.getFeatureState=function(t,e){return t=t||\"_geojsonTileLayer\",this._state.getState(t,e)},r.prototype.setDependencies=function(t,e,r){var n=this._tiles[t];n&&n.setDependencies(e,r)},r.prototype.reloadTilesForDependencies=function(t,e){for(var r in this._tiles){this._tiles[r].hasDependency(t,e)&&this._reloadTile(r,\"reloading\")}this._cache.filter((function(r){return!r.hasDependency(t,e)}))},r}(t.Evented);function Pt(t,e){var r=Math.abs(2*t.wrap)-+(t.wrap<0),n=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||n-r||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function It(t){return\"raster\"===t||\"image\"===t||\"video\"===t}function Ot(){return new t.window.Worker(Zi.workerUrl)}Ct.maxOverzooming=10,Ct.maxUnderzooming=3;var zt=\"mapboxgl_preloaded_worker_pool\",Dt=function(){this.active={}};Dt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length0?(i-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))};var Kt=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=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function ne(e,r,n,i,a,o,s,l){var c=i?e.textSizeData:e.iconSizeData,u=t.evaluateSizeForZoom(c,n.transform.zoom),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,m=!1,v=0;vMath.abs(n.x-r.x)*i)return{useVertical:!0};return(e===t.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function oe(e,r,n,i,a,o,s,l,c,u,f,h,p,d){var g,m=r/24,v=e.lineOffsetX*m,y=e.lineOffsetY*m;if(e.numGlyphs>1){var x=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,_=e.lineStartIndex+e.lineLength,w=ie(m,l,v,y,n,f,h,e,c,o,p);if(!w)return{notEnoughRoom:!0};var T=te(w.first.point,s).point,k=te(w.last.point,s).point;if(i&&!n){var A=ae(e.writingMode,T,k,d);if(A)return A}g=[w.first];for(var M=e.glyphStartIndex+1;M0?C.point:se(h,L,S,1,a),I=ae(e.writingMode,S,P,d);if(I)return I}var O=le(m*l.getoffsetX(e.glyphStartIndex),v,y,n,f,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,c,o,p);if(!O)return{notEnoughRoom:!0};g=[O]}for(var z=0,D=g;z0?1:-1,g=0;i&&(d*=-1,g=Math.PI),d<0&&(g+=Math.PI);for(var m=d>0?l+s:l+s+1,v=a,y=a,x=0,b=0,_=Math.abs(p),w=[];x+b<=_;){if((m+=d)=c)return null;if(y=v,w.push(v),void 0===(v=h[m])){var T=new t.Point(u.getx(m),u.gety(m)),k=te(T,f);if(k.signedDistanceFromCamera>0)v=h[m]=k.point;else{var A=m-d;v=se(0===x?o:new t.Point(u.getx(A),u.gety(A)),T,y,_-x+1,f)}}x+=b,b=y.dist(v)}var M=(_-x)/b,S=v.sub(y),E=S.mult(M)._add(y);E._add(S._unit()._perp()._mult(n*d));var L=g+Math.atan2(v.y-y.y,v.x-y.x);return w.push(E),{point:E,angle:L,path:w}}Kt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Kt.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)},Kt.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)},Kt.prototype._insertBoxCell=function(t,e,r,n,i,a){this.boxCells[i].push(a)},Kt.prototype._insertCircleCell=function(t,e,r,n,i,a){this.circleCells[i].push(a)},Kt.prototype._query=function(t,e,r,n,i,a){if(r<0||t>this.width||n<0||e>this.height)return!i&&[];var o=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var s=0;s0:o},Kt.prototype._queryCircle=function(t,e,r,n,i){var a=t-r,o=t+r,s=e-r,l=e+r;if(o<0||a>this.width||l<0||s>this.height)return!n&&[];var c=[],u={hitTest:n,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(a,s,o,l,this._queryCellCircle,c,u,i),n?c.length>0:c},Kt.prototype.query=function(t,e,r,n,i){return this._query(t,e,r,n,!1,i)},Kt.prototype.hitTest=function(t,e,r,n,i){return this._query(t,e,r,n,!0,i)},Kt.prototype.hitTestCircle=function(t,e,r,n){return this._queryCircle(t,e,r,!0,n)},Kt.prototype._queryCell=function(t,e,r,n,i,a,o,s){var l=o.seenUids,c=this.boxCells[i];if(null!==c)for(var u=this.bboxes,f=0,h=c;f=u[d+0]&&n>=u[d+1]&&(!s||s(this.boxKeys[p]))){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[p],x1:u[d],y1:u[d+1],x2:u[d+2],y2:u[d+3]})}}}var g=this.circleCells[i];if(null!==g)for(var m=this.circles,v=0,y=g;vo*o+s*s},Kt.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 ce=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ue(t,e){for(var r=0;r=1;P--)C.push(E.path[P]);for(var I=1;I0){for(var R=C[0].clone(),F=C[0].clone(),B=1;B=A.x&&F.x<=M.x&&R.y>=A.y&&F.y<=M.y?[C]:F.xM.x||F.yM.y?[]:t.clipLine([C],A.x,A.y,M.x,M.y)}for(var N=0,j=D;N=this.screenRightBoundary||n<100||e>this.screenBottomBoundary},he.prototype.isInsideGrid=function(t,e,r,n){return r>=0&&t=0&&e0)return this.prevPlacement&&this.prevPlacement.variableOffsets[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID].text&&(g=this.prevPlacement.variableOffsets[f.crossTileID].anchor),this.variableOffsets[f.crossTileID]={textOffset:m,width:r,height:n,anchor:t,textBoxScale:i,prevAnchor:g},this.markUsedJustification(h,t,f,p),h.allowVerticalPlacement&&(this.markUsedOrientation(h,p,f),this.placedOrientations[f.crossTileID]=p),{shift:v,placedGlyphBoxes:y}},we.prototype.placeLayerBucketPart=function(e,r,n){var i=this,a=e.parameters,o=a.bucket,s=a.layout,l=a.posMatrix,c=a.textLabelPlaneMatrix,u=a.labelToScreenMatrix,f=a.textPixelRatio,h=a.holdingForFade,p=a.collisionBoxArray,d=a.partiallyEvaluatedTextSize,g=a.collisionGroup,m=s.get(\"text-optional\"),v=s.get(\"icon-optional\"),y=s.get(\"text-allow-overlap\"),x=s.get(\"icon-allow-overlap\"),b=\"map\"===s.get(\"text-rotation-alignment\"),_=\"map\"===s.get(\"text-pitch-alignment\"),w=\"none\"!==s.get(\"icon-text-fit\"),T=\"viewport-y\"===s.get(\"symbol-z-order\"),k=y&&(x||!o.hasIconData()||v),A=x&&(y||!o.hasTextData()||m);!o.collisionArrays&&p&&o.deserializeCollisionBoxes(p);var M=function(e,a){if(!r[e.crossTileID])if(h)i.placements[e.crossTileID]=new me(!1,!1,!1);else{var p,T=!1,M=!1,S=!0,E=null,L={box:null,offscreen:null},C={box:null,offscreen:null},P=null,I=null,O=0,z=0,D=0;a.textFeatureIndex?O=a.textFeatureIndex:e.useRuntimeCollisionCircles&&(O=e.featureIndex),a.verticalTextFeatureIndex&&(z=a.verticalTextFeatureIndex);var R=a.textBox;if(R){var F=function(r){var n=t.WritingMode.horizontal;if(o.allowVerticalPlacement&&!r&&i.prevPlacement){var a=i.prevPlacement.placedOrientations[e.crossTileID];a&&(i.placedOrientations[e.crossTileID]=a,n=a,i.markUsedOrientation(o,n,e))}return n},B=function(r,n){if(o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&a.verticalTextBox)for(var i=0,s=o.writingModes;i0&&(N=N.filter((function(t){return t!==j.anchor}))).unshift(j.anchor)}var U=function(t,r,n){for(var a=t.x2-t.x1,s=t.y2-t.y1,c=e.textBoxScale,u=w&&!x?r:null,h={box:[],offscreen:!1},p=y?2*N.length:N.length,d=0;d=N.length,k=i.attemptAnchorPlacement(m,t,a,s,c,b,_,f,l,g,v,e,o,n,u);if(k&&(h=k.placedGlyphBoxes)&&h.box&&h.box.length){T=!0,E=k.shift;break}}return h};B((function(){return U(R,a.iconBox,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox,n=L&&L.box&&L.box.length;return o.allowVerticalPlacement&&!n&&e.numVerticalGlyphVertices>0&&r?U(r,a.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}})),L&&(T=L.box,S=L.offscreen);var V=F(L&&L.box);if(!T&&i.prevPlacement){var H=i.prevPlacement.variableOffsets[e.crossTileID];H&&(i.variableOffsets[e.crossTileID]=H,i.markUsedJustification(o,H.anchor,e,V))}}else{var q=function(t,r){var n=i.collisionIndex.placeCollisionBox(t,y,f,l,g.predicate);return n&&n.box&&n.box.length&&(i.markUsedOrientation(o,r,e),i.placedOrientations[e.crossTileID]=r),n};B((function(){return q(R,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox;return o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?q(r,t.WritingMode.vertical):{box:null,offscreen:null}})),F(L&&L.box&&L.box.length)}}if(T=(p=L)&&p.box&&p.box.length>0,S=p&&p.offscreen,e.useRuntimeCollisionCircles){var G=o.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),Y=t.evaluateSizeForFeature(o.textSizeData,d,G),W=s.get(\"text-padding\"),X=e.collisionCircleDiameter;P=i.collisionIndex.placeCollisionCircles(y,G,o.lineVertexArray,o.glyphOffsetArray,Y,l,c,u,n,_,g.predicate,X,W),T=y||P.circles.length>0&&!P.collisionDetected,S=S&&P.offscreen}if(a.iconFeatureIndex&&(D=a.iconFeatureIndex),a.iconBox){var Z=function(t){var e=w&&E?_e(t,E.x,E.y,b,_,i.transform.angle):t;return i.collisionIndex.placeCollisionBox(e,x,f,l,g.predicate)};M=C&&C.box&&C.box.length&&a.verticalIconBox?(I=Z(a.verticalIconBox)).box.length>0:(I=Z(a.iconBox)).box.length>0,S=S&&I.offscreen}var J=m||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,K=v||0===e.numIconVertices;if(J||K?K?J||(M=M&&T):T=M&&T:M=T=M&&T,T&&p&&p.box&&(C&&C.box&&z?i.collisionIndex.insertCollisionBox(p.box,s.get(\"text-ignore-placement\"),o.bucketInstanceId,z,g.ID):i.collisionIndex.insertCollisionBox(p.box,s.get(\"text-ignore-placement\"),o.bucketInstanceId,O,g.ID)),M&&I&&i.collisionIndex.insertCollisionBox(I.box,s.get(\"icon-ignore-placement\"),o.bucketInstanceId,D,g.ID),P&&(T&&i.collisionIndex.insertCollisionCircles(P.circles,s.get(\"text-ignore-placement\"),o.bucketInstanceId,O,g.ID),n)){var Q=o.bucketInstanceId,$=i.collisionCircleArrays[Q];void 0===$&&($=i.collisionCircleArrays[Q]=new ve);for(var tt=0;tt=0;--E){var L=S[E];M(o.symbolInstances.get(L),o.collisionArrays[L])}else for(var C=e.symbolInstanceStart;C=0&&(e.text.placedSymbolArray.get(c).crossTileID=a>=0&&c!==a?0:n.crossTileID)}},we.prototype.markUsedOrientation=function(e,r,n){for(var i=r===t.WritingMode.horizontal||r===t.WritingMode.horizontalOnly?r:0,a=r===t.WritingMode.vertical?r:0,o=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];o0||l>0,x=a.numIconVertices>0,b=i.placedOrientations[a.crossTileID],_=b===t.WritingMode.vertical,w=b===t.WritingMode.horizontal||b===t.WritingMode.horizontalOnly;if(y){var T=Pe(v.text),k=_?Ie:T;d(e.text,s,k);var A=w?Ie:T;d(e.text,l,A);var M=v.text.isHidden();[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach((function(t){t>=0&&(e.text.placedSymbolArray.get(t).hidden=M||_?1:0)})),a.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).hidden=M||w?1:0);var S=i.variableOffsets[a.crossTileID];S&&i.markUsedJustification(e,S.anchor,a,b);var E=i.placedOrientations[a.crossTileID];E&&(i.markUsedJustification(e,\"left\",a,E),i.markUsedOrientation(e,E,a))}if(x){var L=Pe(v.icon),C=!(h&&a.verticalPlacedIconSymbolIndex&&_);if(a.placedIconSymbolIndex>=0){var P=C?L:Ie;d(e.icon,a.numIconVertices,P),e.icon.placedSymbolArray.get(a.placedIconSymbolIndex).hidden=v.icon.isHidden()}if(a.verticalPlacedIconSymbolIndex>=0){var I=C?Ie:L;d(e.icon,a.numVerticalIconVertices,I),e.icon.placedSymbolArray.get(a.verticalPlacedIconSymbolIndex).hidden=v.icon.isHidden()}}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var O=e.collisionArrays[n];if(O){var z=new t.Point(0,0);if(O.textBox||O.verticalTextBox){var D=!0;if(c){var R=i.variableOffsets[g];R?(z=be(R.anchor,R.width,R.height,R.textOffset,R.textBoxScale),u&&z._rotate(f?i.transform.angle:-i.transform.angle)):D=!1}O.textBox&&Te(e.textCollisionBox.collisionVertexArray,v.text.placed,!D||_,z.x,z.y),O.verticalTextBox&&Te(e.textCollisionBox.collisionVertexArray,v.text.placed,!D||w,z.x,z.y)}var F=Boolean(!w&&O.verticalIconBox);O.iconBox&&Te(e.iconCollisionBox.collisionVertexArray,v.icon.placed,F,h?z.x:0,h?z.y:0),O.verticalIconBox&&Te(e.iconCollisionBox.collisionVertexArray,v.icon.placed,!F,h?z.x:0,h?z.y:0)}}},m=0;mt},we.prototype.setStale=function(){this.stale=!0};var ke=Math.pow(2,25),Ae=Math.pow(2,24),Me=Math.pow(2,17),Se=Math.pow(2,16),Ee=Math.pow(2,9),Le=Math.pow(2,8),Ce=Math.pow(2,1);function Pe(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*ke+e*Ae+r*Me+e*Se+r*Ee+e*Le+r*Ce+e}var Ie=0,Oe=function(t){this._sortAcrossTiles=\"viewport-y\"!==t.layout.get(\"symbol-z-order\")&&void 0!==t.layout.get(\"symbol-sort-key\").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Oe.prototype.continuePlacement=function(t,e,r,n,i){for(var a=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=r[e[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if(\"symbol\"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new Oe(s)),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},ze.prototype.commit=function(t){return this.placement.commit(t),this.placement};var De=512/t.EXTENT/2,Re=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;nt.overscaledZ)for(var s in o){var l=o[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,i)}else{var c=o[t.scaledTo(Number(a)).key];c&&c.findMatches(e.symbolInstances,t,i)}}for(var u=0;u1?\"@2x\":\"\",l=t.getJSON(r.transformRequest(r.normalizeSpriteURL(e,s,\".json\"),t.ResourceType.SpriteJSON),(function(t,e){l=null,o||(o=t,i=e,u())})),c=t.getImage(r.transformRequest(r.normalizeSpriteURL(e,s,\".png\"),t.ResourceType.SpriteImage),(function(t,e){c=null,o||(o=t,a=e,u())}));function u(){if(o)n(o);else if(i&&a){var e=t.browser.getImageData(a),r={};for(var s in i){var l=i[s],c=l.width,u=l.height,f=l.x,h=l.y,p=l.sdf,d=l.pixelRatio,g=l.stretchX,m=l.stretchY,v=l.content,y=new t.RGBAImage({width:c,height:u});t.RGBAImage.copy(e,y,{x:f,y:h},{x:0,y:0},{width:c,height:u}),r[s]={data:y,pixelRatio:d,sdf:p,stretchX:g,stretchY:m,content:v}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(e,this.map._requestManager,(function(e,n){if(r._spriteRequest=null,e)r.fire(new t.ErrorEvent(e));else if(n)for(var i in n)r.imageManager.addImage(i,n[i]);r.imageManager.setLoaded(!0),r._availableImages=r.imageManager.listImages(),r.dispatcher.broadcast(\"setImages\",r._availableImages),r.fire(new t.Event(\"data\",{dataType:\"style\"}))}))},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){for(var e=[],r=0,n=t;r0)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._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event(\"data\",{dataType:\"style\"}))},r.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},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._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event(\"data\",{dataType:\"style\"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(e,r,n){var i=this;if(void 0===n&&(n={}),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 Ct(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){void 0===n&&(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{var a;if(\"custom\"===e.type){if(je(this,t.validateCustomStyleLayer(e)))return;a=t.createStyleLayer(e)}else{if(\"object\"==typeof e.source&&(this.addSource(i,e.source),e=t.clone$1(e),e=t.extend(e,{source:i})),this._validate(t.validateStyle.layer,\"layers.\"+i,e,{arrayIndex:-1},n))return;a=t.createStyleLayer(e),this._validateLayer(a),a.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[a.id]=a.serialize()}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&&\"custom\"!==a.type){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),a.onAdd&&a.onAdd(this.map)}}},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._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}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.hasLayer=function(t){return t in this._layers},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,n){void 0===n&&(n={}),this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.deepEqual(i.filter,r))return null==r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(t.validateStyle.filter,\"layers.\"+i.id+\".filter\",r,null,n)||(i.filter=t.clone$1(r),this._updateLayer(i)))}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$1(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getLayoutProperty(r),n)||(a.setLayoutProperty(r,n,i),this._updateLayer(a)):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(e,r){var n=this.getLayer(e);if(n)return n.getLayoutProperty(r);this.fire(new t.ErrorEvent(new Error(\"The layer '\"+e+\"' does not exist in the map's style.\")))},r.prototype.setPaintProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getPaintProperty(r),n)||(a.setPaintProperty(r,n,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[e]=!0):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.setFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=e.sourceLayer,a=this.sourceCaches[n];if(void 0!==a){var o=a.getSource().type;\"geojson\"===o&&i?this.fire(new t.ErrorEvent(new Error(\"GeoJSON sources cannot have a sourceLayer parameter.\"))):\"vector\"!==o||i?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error(\"The feature id parameter must be provided.\"))),a.setFeatureState(i,e.id,r)):this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+n+\"' does not exist in the map's style.\")))},r.prototype.removeFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=this.sourceCaches[n];if(void 0!==i){var a=i.getSource().type,o=\"vector\"===a?e.sourceLayer:void 0;\"vector\"!==a||o?r&&\"string\"!=typeof e.id&&\"number\"!=typeof e.id?this.fire(new t.ErrorEvent(new Error(\"A feature id is required to remove its specific state property.\"))):i.removeFeatureState(o,e.id,r):this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+n+\"' does not exist in the map's style.\")))},r.prototype.getFeatureState=function(e){this._checkLoaded();var r=e.source,n=e.sourceLayer,i=this.sourceCaches[r];if(void 0!==i){if(\"vector\"!==i.getSource().type||n)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error(\"The feature id parameter must be provided.\"))),i.getFeatureState(n,e.id);this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+r+\"' does not exist in the map's style.\")))},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){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._serializeLayers(this._order)},(function(t){return void 0!==t}))},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&\"raster\"!==this.sourceCaches[t.source].getSource().type&&(this._updatedSources[t.source]=\"reload\",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,r=function(t){return\"fill-extrusion\"===e._layers[t].type},n={},i=[],a=this._order.length-1;a>=0;a--){var o=this._order[a];if(r(o)){n[o]=a;for(var s=0,l=t;s=0;d--){var g=this._order[d];if(r(g))for(var m=i.length-1;m>=0;m--){var v=i[m].feature;if(n[v.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}\",\"attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}\"),tr=yr(\"varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}\",\"attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}\"),er=yr(\"uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}\",\"attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}\"),rr=yr(\"#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float opacity\\ngl_FragColor=color*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"attribute vec2 a_pos;uniform mat4 u_matrix;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float opacity\\ngl_Position=u_matrix*vec4(a_pos,0,1);}\"),nr=yr(\"varying vec2 v_pos;\\n#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 outline_color\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\\n#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 outline_color\\n#pragma mapbox: initialize lowp float opacity\\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}\"),ir=yr(\"uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}\"),ar=yr(\"uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}\"),or=yr(\"varying vec4 v_color;void main() {gl_FragColor=v_color;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\\n#pragma mapbox: define highp float base\\n#pragma mapbox: define highp float height\\n#pragma mapbox: define highp vec4 color\\nvoid main() {\\n#pragma mapbox: initialize highp float base\\n#pragma mapbox: initialize highp float height\\n#pragma mapbox: initialize highp vec4 color\\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}\"),sr=yr(\"uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float base\\n#pragma mapbox: initialize lowp float height\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float base\\n#pragma mapbox: initialize lowp float height\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\\n? a_pos\\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}\"),lr=yr(\"#ifdef GL_ES\\nprecision highp float;\\n#endif\\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}\"),cr=yr(\"uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\\n#define PI 3.141592653589793\\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}\"),ur=yr(\"uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\\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\\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\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}\"),fr=yr(\"uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define MAX_LINE_DISTANCE 32767.0\\n#define scale 0.015873016\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\\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\\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\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}\"),hr=yr(\"uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\\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#pragma mapbox: define lowp float floorwidth\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\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#pragma mapbox: initialize lowp float floorwidth\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}\"),pr=yr(\"uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\\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\\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\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\\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\\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\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}\"),dr=yr(\"uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}\"),gr=yr(\"uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}\"),mr=yr(\"#define SDF_PX 8.0\\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\\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\\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\\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\\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\\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\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}\"),vr=yr(\"#define SDF_PX 8.0\\n#define SDF 1.0\\n#define ICON 0.0\\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\\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\\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\\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\\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\\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\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}\");function yr(t,e){var r=/#pragma mapbox: ([\\w]+) ([\\w]+) ([\\w]+) ([\\w]+)/g,n={};return{fragmentSource:t=t.replace(r,(function(t,e,r,i,a){return n[a]=!0,\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nvarying \"+r+\" \"+i+\" \"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"\\n#ifdef HAS_UNIFORM_u_\"+a+\"\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\"})),vertexSource:e=e.replace(r,(function(t,e,r,i,a){var o=\"float\"===i?\"vec2\":\"vec4\",s=a.match(/color/)?\"color\":o;return n[a]?\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nuniform lowp float u_\"+a+\"_t;\\nattribute \"+r+\" \"+o+\" a_\"+a+\";\\nvarying \"+r+\" \"+i+\" \"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"vec4\"===s?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+a+\" = a_\"+a+\";\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+a+\" = unpack_mix_\"+s+\"(a_\"+a+\", u_\"+a+\"_t);\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nuniform lowp float u_\"+a+\"_t;\\nattribute \"+r+\" \"+o+\" a_\"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"vec4\"===s?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+r+\" \"+i+\" \"+a+\" = a_\"+a+\";\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+r+\" \"+i+\" \"+a+\" = unpack_mix_\"+s+\"(a_\"+a+\", u_\"+a+\"_t);\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\"}))}}var xr=Object.freeze({__proto__:null,prelude:Ye,background:We,backgroundPattern:Xe,circle:Ze,clippingMask:Je,heatmap:Ke,heatmapTexture:Qe,collisionBox:$e,collisionCircle:tr,debug:er,fill:rr,fillOutline:nr,fillOutlinePattern:ir,fillPattern:ar,fillExtrusion:or,fillExtrusionPattern:sr,hillshadePrepare:lr,hillshade:cr,line:ur,lineGradient:fr,linePattern:hr,lineSDF:pr,raster:dr,symbolIcon:gr,symbolSDF:mr,symbolTextAndIcon:vr}),br=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};br.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>16,s>>16],u_pixel_coord_lower:[65535&o,65535&s]}}_r.prototype.draw=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g){var m,v=t.gl;if(!this.failedToCreate){for(var y in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(n),t.setColorMode(i),t.setCullFace(a),this.fixedUniforms)this.fixedUniforms[y].set(o[y]);p&&p.setUniforms(t,this.binderUniforms,f,{zoom:h});for(var x=(m={},m[v.LINES]=2,m[v.TRIANGLES]=3,m[v.LINE_STRIP]=1,m)[e],b=0,_=u.get();b<_.length;b+=1){var w=_[b],T=w.vaos||(w.vaos={});(T[s]||(T[s]=new br)).bind(t,this,l,p?p.getPaintVertexBuffers():[],c,w.vertexOffset,d,g),v.drawElements(e,w.primitiveLength*x,v.UNSIGNED_SHORT,w.primitiveOffset*x*2)}}};var Tr=function(e,r,n,i){var a=r.style.light,o=a.properties.get(\"position\"),s=[o.x,o.y,o.z],l=t.create$1();\"viewport\"===a.properties.get(\"anchor\")&&t.fromRotation(l,-r.transform.angle),t.transformMat3(s,s,l);var c=a.properties.get(\"color\");return{u_matrix:e,u_lightpos:s,u_lightintensity:a.properties.get(\"intensity\"),u_lightcolor:[c.r,c.g,c.b],u_vertical_gradient:+n,u_opacity:i}},kr=function(e,r,n,i,a,o,s){return t.extend(Tr(e,r,n,i),wr(o,r,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8})},Ar=function(t){return{u_matrix:t}},Mr=function(e,r,n,i){return t.extend(Ar(e),wr(n,r,i))},Sr=function(t,e){return{u_matrix:t,u_world:e}},Er=function(e,r,n,i,a){return t.extend(Mr(e,r,n,i),{u_world:a})},Lr=function(e,r,n,i){var a,o,s=e.transform;if(\"map\"===i.paint.get(\"circle-pitch-alignment\")){var l=pe(n,1,s.zoom);a=!0,o=[l,l]}else a=!1,o=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+(\"map\"===i.paint.get(\"circle-pitch-scale\")),u_matrix:e.translatePosMatrix(r.posMatrix,n,i.paint.get(\"circle-translate\"),i.paint.get(\"circle-translate-anchor\")),u_pitch_with_map:+a,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:o}},Cr=function(t,e,r){var n=pe(r,1,e.zoom),i=Math.pow(2,e.zoom-r.tileID.overscaledZ),a=r.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:n,u_extrude_scale:[e.pixelsToGLUnits[0]/(n*i),e.pixelsToGLUnits[1]/(n*i)],u_overscale_factor:a}},Pr=function(t,e,r){return{u_matrix:t,u_inv_matrix:e,u_camera_to_center_distance:r.cameraToCenterDistance,u_viewport_size:[r.width,r.height]}},Ir=function(t,e,r){return void 0===r&&(r=1),{u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:r}},Or=function(t){return{u_matrix:t}},zr=function(t,e,r,n){return{u_matrix:t,u_extrude_scale:pe(e,1,r),u_intensity:n}};function Dr(e,r){var n=Math.pow(2,r.canonical.z),i=r.canonical.y;return[new t.MercatorCoordinate(0,i/n).toLngLat().lat,new t.MercatorCoordinate(0,(i+1)/n).toLngLat().lat]}var Rr=function(e,r,n){var i=e.transform;return{u_matrix:Ur(e,r,n),u_ratio:1/pe(r,1,i.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Fr=function(e,r,n){return t.extend(Rr(e,r,n),{u_image:0})},Br=function(e,r,n,i){var a=e.transform,o=jr(r,a);return{u_matrix:Ur(e,r,n),u_texsize:r.imageAtlasTexture.size,u_ratio:1/pe(r,1,a.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[o,i.fromScale,i.toScale],u_fade:i.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},Nr=function(e,r,n,i,a){var o=e.transform,s=e.lineAtlas,l=jr(r,o),c=\"round\"===n.layout.get(\"line-cap\"),u=s.getDash(i.from,c),f=s.getDash(i.to,c),h=u.width*a.fromScale,p=f.width*a.toScale;return t.extend(Rr(e,r,n),{u_patternscale_a:[l/h,-u.height/2],u_patternscale_b:[l/p,-f.height/2],u_sdfgamma:s.width/(256*Math.min(h,p)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:f.y,u_mix:a.t})};function jr(t,e){return 1/pe(t,1,e.tileZoom)}function Ur(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get(\"line-translate\"),r.paint.get(\"line-translate-anchor\"))}var Vr=function(t,e,r,n,i){return{u_matrix:t,u_tl_parent:e,u_scale_parent:r,u_buffer_scale:1,u_fade_t:n.mix,u_opacity:n.opacity*i.paint.get(\"raster-opacity\"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get(\"raster-brightness-min\"),u_brightness_high:i.paint.get(\"raster-brightness-max\"),u_saturation_factor:(o=i.paint.get(\"raster-saturation\"),o>0?1-1/(1.001-o):-o),u_contrast_factor:(a=i.paint.get(\"raster-contrast\"),a>0?1/(1-a):1+a),u_spin_weights:Hr(i.paint.get(\"raster-hue-rotate\"))};var a,o};function Hr(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]}var qr,Gr=function(t,e,r,n,i,a,o,s,l,c){var u=i.transform;return{u_is_size_zoom_constant:+(\"constant\"===t||\"source\"===t),u_is_size_feature_constant:+(\"constant\"===t||\"camera\"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:u.cameraToCenterDistance,u_pitch:u.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:u.width/u.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:a,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:c,u_texture:0}},Yr=function(e,r,n,i,a,o,s,l,c,u,f){var h=a.transform;return t.extend(Gr(e,r,n,i,a,o,s,l,c,u),{u_gamma_scale:i?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+f})},Wr=function(e,r,n,i,a,o,s,l,c,u){return t.extend(Yr(e,r,n,i,a,o,s,l,!0,c,!0),{u_texsize_icon:u,u_texture_icon:1})},Xr=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Zr=function(e,r,n,i,a,o){return t.extend(function(t,e,r,n){var i=r.imageManager.getPattern(t.from.toString()),a=r.imageManager.getPattern(t.to.toString()),o=r.imageManager.getPixelSize(),s=o.width,l=o.height,c=Math.pow(2,n.tileID.overscaledZ),u=n.tileSize*Math.pow(2,r.transform.tileZoom)/c,f=u*(n.tileID.canonical.x+n.tileID.wrap*c),h=u*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[s,l],u_mix:e.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/pe(n,1,r.transform.tileZoom),u_pixel_coord_upper:[f>>16,h>>16],u_pixel_coord_lower:[65535&f,65535&h]}}(i,o,n,a),{u_matrix:e,u_opacity:r})},Jr={fillExtrusion:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fillExtrusionPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,r.u_height_factor),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fill:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},fillPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},fillOutline:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world)}},fillOutlinePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},circle:function(e,r){return{u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,r.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},collisionBox:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,r.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,r.u_overscale_factor)}},collisionCircle:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,r.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,r.u_viewport_size)}},debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_overlay:new t.Uniform1i(e,r.u_overlay),u_overlay_scale:new t.Uniform1f(e,r.u_overlay_scale)}},clippingMask:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmap:function(e,r){return{u_extrude_scale:new t.Uniform1f(e,r.u_extrude_scale),u_intensity:new t.Uniform1f(e,r.u_intensity),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmapTexture:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_color_ramp:new t.Uniform1i(e,r.u_color_ramp),u_opacity:new t.Uniform1f(e,r.u_opacity)}},hillshade:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_latrange:new t.Uniform2f(e,r.u_latrange),u_light:new t.Uniform2f(e,r.u_light),u_shadow:new t.UniformColor(e,r.u_shadow),u_highlight:new t.UniformColor(e,r.u_highlight),u_accent:new t.UniformColor(e,r.u_accent)}},hillshadePrepare:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_dimension:new t.Uniform2f(e,r.u_dimension),u_zoom:new t.Uniform1f(e,r.u_zoom),u_maxzoom:new t.Uniform1f(e,r.u_maxzoom),u_unpack:new t.Uniform4f(e,r.u_unpack)}},line:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels)}},lineGradient:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_image:new t.Uniform1i(e,r.u_image)}},linePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_texsize:new t.Uniform2f(e,r.u_texsize),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_image:new t.Uniform1i(e,r.u_image),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},lineSDF:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,r.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,r.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,r.u_sdfgamma),u_image:new t.Uniform1i(e,r.u_image),u_tex_y_a:new t.Uniform1f(e,r.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,r.u_tex_y_b),u_mix:new t.Uniform1f(e,r.u_mix)}},raster:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_tl_parent:new t.Uniform2f(e,r.u_tl_parent),u_scale_parent:new t.Uniform1f(e,r.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,r.u_buffer_scale),u_fade_t:new t.Uniform1f(e,r.u_fade_t),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image0:new t.Uniform1i(e,r.u_image0),u_image1:new t.Uniform1i(e,r.u_image1),u_brightness_low:new t.Uniform1f(e,r.u_brightness_low),u_brightness_high:new t.Uniform1f(e,r.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,r.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,r.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,r.u_spin_weights)}},symbolIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture)}},symbolSDF:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},symbolTextAndIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texsize_icon:new t.Uniform2f(e,r.u_texsize_icon),u_texture:new t.Uniform1i(e,r.u_texture),u_texture_icon:new t.Uniform1i(e,r.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},background:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_color:new t.UniformColor(e,r.u_color)}},backgroundPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image:new t.Uniform1i(e,r.u_image),u_pattern_tl_a:new t.Uniform2f(e,r.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,r.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,r.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,r.u_pattern_br_b),u_texsize:new t.Uniform2f(e,r.u_texsize),u_mix:new t.Uniform1f(e,r.u_mix),u_pattern_size_a:new t.Uniform2f(e,r.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,r.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,r.u_scale_a),u_scale_b:new t.Uniform1f(e,r.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,r.u_tile_units_to_pixels)}}};function Kr(e,r,n,i,a,o,s){for(var l=e.context,c=l.gl,u=e.useProgram(\"collisionBox\"),f=[],h=0,p=0,d=0;d0){var _=t.create(),w=y;t.mul(_,v.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(_,_,v.placementViewportMatrix),f.push({circleArray:b,circleOffset:p,transform:w,invTransform:_}),p=h+=b.length/4}x&&u.draw(l,c.LINES,At.disabled,Mt.disabled,e.colorModeForRenderPass(),Et.disabled,Cr(y,e.transform,m),n.id,x.layoutVertexBuffer,x.indexBuffer,x.segments,null,e.transform.zoom,null,null,x.collisionVertexBuffer)}}if(s&&f.length){var T=e.useProgram(\"collisionCircle\"),k=new t.StructArrayLayout2f1f2i16;k.resize(4*h),k._trim();for(var A=0,M=0,S=f;M=0&&(g[v.associatedIconIndex]={shiftedAnchor:S,angle:E})}else ue(v.numGlyphs,p)}if(f){d.clear();for(var C=e.icon.placedSymbolArray,P=0;P0){var s=t.browser.now(),l=(s-e.timeAdded)/o,c=r?(s-r.timeAdded)/o:-1,u=n.getSource(),f=a.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),h=!r||Math.abs(r.tileID.overscaledZ-f)>Math.abs(e.tileID.overscaledZ-f),p=h&&e.refreshedUponExpiration?1:t.clamp(h?l:1-c,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-p}:{opacity:p,mix:0}}return{opacity:1,mix:0}}var un=new t.Color(1,0,0,1),fn=new t.Color(0,1,0,1),hn=new t.Color(0,0,1,1),pn=new t.Color(1,0,1,1),dn=new t.Color(0,1,1,1);function gn(t){var e=t.transform.padding;mn(t,t.transform.height-(e.top||0),3,un),mn(t,e.bottom||0,3,fn),vn(t,e.left||0,3,hn),vn(t,t.transform.width-(e.right||0),3,pn);var r=t.transform.centerPoint;!function(t,e,r,n){yn(t,e-1,r-10,2,20,n),yn(t,e-10,r-1,20,2,n)}(t,r.x,t.transform.height-r.y,dn)}function mn(t,e,r,n){yn(t,0,e+r/2,t.transform.width,r,n)}function vn(t,e,r,n){yn(t,e-r/2,0,r,t.transform.height,n)}function yn(e,r,n,i,a,o){var s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*t.browser.devicePixelRatio,n*t.browser.devicePixelRatio,i*t.browser.devicePixelRatio,a*t.browser.devicePixelRatio),s.clear({color:o}),l.disable(l.SCISSOR_TEST)}function xn(e,r,n){var i=e.context,a=i.gl,o=n.posMatrix,s=e.useProgram(\"debug\"),l=At.disabled,c=Mt.disabled,u=e.colorModeForRenderPass();i.activeTexture.set(a.TEXTURE0),e.emptyTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE),s.draw(i,a.LINE_STRIP,l,c,u,Et.disabled,Ir(o,t.Color.red),\"$debug\",e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);var f=r.getTileByID(n.key).latestRawTileData,h=f&&f.byteLength||0,p=Math.floor(h/1024),d=r.getTile(n).tileSize,g=512/Math.min(d,512)*(n.overscaledZ/e.transform.zoom)*.5,m=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(m+=\" => \"+n.overscaledZ),function(t,e){t.initDebugOverlayCanvas();var r=t.debugOverlayCanvas,n=t.context.gl,i=t.debugOverlayCanvas.getContext(\"2d\");i.clearRect(0,0,r.width,r.height),i.shadowColor=\"white\",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle=\"white\",i.textBaseline=\"top\",i.font=\"bold 36px Open Sans, sans-serif\",i.fillText(e,5,5),i.strokeText(e,5,5),t.debugOverlayTexture.update(r),t.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}(e,m+\" \"+p+\"kb\"),s.draw(i,a.TRIANGLES,l,c,St.alphaBlended,Et.disabled,Ir(o,t.Color.transparent,g),\"$debug\",e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}var bn={symbol:function(e,r,n,i,a){if(\"translucent\"===e.renderPass){var o=Mt.disabled,s=e.colorModeForRenderPass();n.layout.get(\"text-variable-anchor\")&&function(e,r,n,i,a,o,s){for(var l=r.transform,c=\"map\"===a,u=\"map\"===o,f=0,h=e;f256&&this.clearStencil(),r.setColorMode(St.disabled),r.setDepthMode(At.disabled);var i=this.useProgram(\"clippingMask\");this._tileClippingMaskIDs={};for(var a=0,o=e;a256&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new Mt({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},_n.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Mt({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},_n.prototype.stencilConfigForOverlap=function(t){var e,r=this.context.gl,n=t.sort((function(t,e){return e.overscaledZ-t.overscaledZ})),i=n[n.length-1].overscaledZ,a=n[0].overscaledZ-i+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();for(var o={},s=0;s=0;this.currentLayer--){var w=this.style._layers[i[this.currentLayer]],T=a[w.source],k=u[w.source];this._renderTileClippingMasks(w,k),this.renderLayer(this,T,w,k)}for(this.renderPass=\"translucent\",this.currentLayer=0;this.currentLayer0?e.pop():null},_n.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),r=this.imageManager.getPattern(t.to.toString());return!e||!r},_n.prototype.useProgram=function(t,e){this.cache=this.cache||{};var r=\"\"+t+(e?e.cacheKey:\"\")+(this._showOverdrawInspector?\"/overdraw\":\"\");return this.cache[r]||(this.cache[r]=new _r(this.context,xr[t],e,Jr[t],this._showOverdrawInspector)),this.cache[r]},_n.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},_n.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)},_n.prototype.initDebugOverlayCanvas=function(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=t.window.document.createElement(\"canvas\"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var e=this.context.gl;this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,e.RGBA)}},_n.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var wn=function(t,e){this.points=t,this.planes=e};wn.fromInvProjectionMatrix=function(e,r,n){var i=Math.pow(2,n),a=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((function(r){return t.transformMat4([],r,e)})).map((function(e){return t.scale$1([],e,1/e[3]/r*i)})),o=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(e){var r=t.sub([],a[e[0]],a[e[1]]),n=t.sub([],a[e[2]],a[e[1]]),i=t.normalize([],t.cross([],r,n)),o=-t.dot(i,a[e[1]]);return i.concat(o)}));return new wn(a,o)};var Tn=function(e,r){this.min=e,this.max=r,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};Tn.prototype.quadrant=function(e){for(var r=[e%2==0,e<2],n=t.clone$2(this.min),i=t.clone$2(this.max),a=0;a=0;if(0===o)return 0;o!==r.length&&(n=!1)}if(n)return 2;for(var l=0;l<3;l++){for(var c=Number.MAX_VALUE,u=-Number.MAX_VALUE,f=0;fthis.max[l]-this.min[l])return 0}return 1};var kn=function(t,e,r,n){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),isNaN(t)||t<0||isNaN(e)||e<0||isNaN(r)||r<0||isNaN(n)||n<0)throw new Error(\"Invalid value for edge-insets, top, bottom, left and right must all be numbers\");this.top=t,this.bottom=e,this.left=r,this.right=n};kn.prototype.interpolate=function(e,r,n){return null!=r.top&&null!=e.top&&(this.top=t.number(e.top,r.top,n)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,r.bottom,n)),null!=r.left&&null!=e.left&&(this.left=t.number(e.left,r.left,n)),null!=r.right&&null!=e.right&&(this.right=t.number(e.right,r.right,n)),this},kn.prototype.getCenter=function(e,r){var n=t.clamp((this.left+e-this.right)/2,0,e),i=t.clamp((this.top+r-this.bottom)/2,0,r);return new t.Point(n,i)},kn.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},kn.prototype.clone=function(){return new kn(this.top,this.bottom,this.left,this.right)},kn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var An=function(e,r,n,i,a){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===a||a,this._minZoom=e||0,this._maxZoom=r||22,this._minPitch=null==n?0:n,this._maxPitch=null==i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new kn,this._posMatrixCache={},this._alignedPosMatrixCache={}},Mn={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};An.prototype.clone=function(){var t=new An(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,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._edgeInsets=this._edgeInsets.clone(),t._calcMatrices(),t},Mn.minZoom.get=function(){return this._minZoom},Mn.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Mn.maxZoom.get=function(){return this._maxZoom},Mn.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Mn.minPitch.get=function(){return this._minPitch},Mn.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},Mn.maxPitch.get=function(){return this._maxPitch},Mn.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},Mn.renderWorldCopies.get=function(){return this._renderWorldCopies},Mn.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},Mn.worldSize.get=function(){return this.tileSize*this.scale},Mn.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Mn.size.get=function(){return new t.Point(this.width,this.height)},Mn.bearing.get=function(){return-this.angle/Math.PI*180},Mn.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=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Mn.pitch.get=function(){return this._pitch/Math.PI*180},Mn.pitch.set=function(e){var r=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},Mn.fov.get=function(){return this._fov/Math.PI*180},Mn.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())},Mn.zoom.get=function(){return this._zoom},Mn.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())},Mn.center.get=function(){return this._center},Mn.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Mn.padding.get=function(){return this._edgeInsets.toJSON()},Mn.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},Mn.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},An.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},An.prototype.interpolatePadding=function(t,e,r){this._unmodified=!1,this._edgeInsets.interpolate(t,e,r),this._constrain(),this._calcMatrices()},An.prototype.coveringZoomLevel=function(t){var e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)},An.prototype.getVisibleUnwrappedCoordinates=function(e){var r=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new t.Point(0,0)),i=this.pointCoordinate(new t.Point(this.width,0)),a=this.pointCoordinate(new t.Point(this.width,this.height)),o=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(n.x,i.x,a.x,o.x)),l=Math.floor(Math.max(n.x,i.x,a.x,o.x)),c=s-1;c<=l+1;c++)0!==c&&r.push(new t.UnwrappedTileID(c,e));return r},An.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&&re.maxzoom&&(r=e.maxzoom);var i=t.MercatorCoordinate.fromLngLat(this.center),a=Math.pow(2,r),o=[a*i.x,a*i.y,0],s=wn.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),l=e.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=r);var c=function(t){return{aabb:new Tn([t*a,0,0],[(t+1)*a,a,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}},u=[],f=[],h=r,p=e.reparseOverscaled?n:r;if(this._renderWorldCopies)for(var d=1;d<=3;d++)u.push(c(-d)),u.push(c(d));for(u.push(c(0));u.length>0;){var g=u.pop(),m=g.x,v=g.y,y=g.fullyVisible;if(!y){var x=g.aabb.intersects(s);if(0===x)continue;y=2===x}var b=g.aabb.distanceX(o),_=g.aabb.distanceY(o),w=Math.max(Math.abs(b),Math.abs(_)),T=3+(1<T&&g.zoom>=l)f.push({tileID:new t.OverscaledTileID(g.zoom===h?p:g.zoom,g.wrap,g.zoom,m,v),distanceSq:t.sqrLen([o[0]-.5-m,o[1]-.5-v])});else for(var k=0;k<4;k++){var A=(m<<1)+k%2,M=(v<<1)+(k>>1);u.push({aabb:g.aabb.quadrant(k),zoom:g.zoom+1,x:A,y:M,wrap:g.wrap,fullyVisible:y})}}return f.sort((function(t,e){return t.distanceSq-e.distanceSq})).map((function(t){return t.tileID}))},An.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Mn.unmodified.get=function(){return this._unmodified},An.prototype.zoomScale=function(t){return Math.pow(2,t)},An.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},An.prototype.project=function(e){var r=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(r)*this.worldSize)},An.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},Mn.point.get=function(){return this.project(this.center)},An.prototype.setLocationAtPoint=function(e,r){var n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),a=this.locationCoordinate(e),o=new t.MercatorCoordinate(a.x-(n.x-i.x),a.y-(n.y-i.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())},An.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},An.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},An.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},An.prototype.coordinateLocation=function(t){return t.toLngLat()},An.prototype.pointCoordinate=function(e){var r=[e.x,e.y,0,1],n=[e.x,e.y,1,1];t.transformMat4(r,r,this.pixelMatrixInverse),t.transformMat4(n,n,this.pixelMatrixInverse);var i=r[3],a=n[3],o=r[0]/i,s=n[0]/a,l=r[1]/i,c=n[1]/a,u=r[2]/i,f=n[2]/a,h=u===f?0:(0-u)/(f-u);return new t.MercatorCoordinate(t.number(o,s,h)/this.worldSize,t.number(l,c,h)/this.worldSize)},An.prototype.coordinatePoint=function(e){var r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix),new t.Point(r[0]/r[3],r[1]/r[3])},An.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},An.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},An.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},An.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=t.identity(new Float64Array(16));return t.translate(l,l,[s*o,a.y*o,0]),t.scale(l,l,[o/t.EXTENT,o/t.EXTENT,1]),t.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},An.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},An.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=t.mercatorYfromLat(f[1])*this.worldSize,e=(o=t.mercatorYfromLat(f[0])*this.worldSize)-ao&&(i=o-m)}if(this.lngRange){var v=p.x,y=c.x/2;v-yl&&(n=l-y)}void 0===n&&void 0===i||(this.center=this.unproject(new t.Point(void 0!==n?n:p.x,void 0!==i?i:p.y))),this._unmodified=u,this._constraining=!1}},An.prototype._calcMatrices=function(){if(this.height){var e=this._fov/2,r=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(e)*this.height;var n=Math.PI/2+this._pitch,i=this._fov*(.5+r.y/this.height),a=Math.sin(i)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-n-i,.01,Math.PI-.01)),o=this.point,s=o.x,l=o.y,c=1.01*(Math.cos(Math.PI/2-this._pitch)*a+this.cameraToCenterDistance),u=this.height/50,f=new Float64Array(16);t.perspective(f,this._fov,this.width/this.height,u,c),f[8]=2*-r.x/this.width,f[9]=2*r.y/this.height,t.scale(f,f,[1,-1,1]),t.translate(f,f,[0,0,-this.cameraToCenterDistance]),t.rotateX(f,f,this._pitch),t.rotateZ(f,f,this.angle),t.translate(f,f,[-s,-l,0]),this.mercatorMatrix=t.scale([],f,[this.worldSize,this.worldSize,this.worldSize]),t.scale(f,f,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=f,this.invProjMatrix=t.invert([],this.projMatrix);var h=this.width%2/2,p=this.height%2/2,d=Math.cos(this.angle),g=Math.sin(this.angle),m=s-Math.round(s)+d*h+g*p,v=l-Math.round(l)+d*p+g*h,y=new Float64Array(f);if(t.translate(y,y,[m>.5?m-1:m,v>.5?v-1:v,0]),this.alignedProjMatrix=y,f=t.create(),t.scale(f,f,[this.width/2,-this.height/2,1]),t.translate(f,f,[1,-1,0]),this.labelPlaneMatrix=f,f=t.create(),t.scale(f,f,[1,-1,1]),t.translate(f,f,[-1,-1,0]),t.scale(f,f,[2/this.width,2/this.height,1]),this.glCoordMatrix=f,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(f=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error(\"failed to invert matrix\");this.pixelMatrixInverse=f,this._posMatrixCache={},this._alignedPosMatrixCache={}}},An.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},An.prototype.getCameraPoint=function(){var e=this._pitch,r=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,r))},An.prototype.getCameraQueryGeometry=function(e){var r=this.getCameraPoint();if(1===e.length)return[e[0],r];for(var n=r.x,i=r.y,a=r.x,o=r.y,s=0,l=e;s=3&&!t.some((function(t){return isNaN(t)}))){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0}return!1},Sn.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,\"\",e)}catch(t){}};var En={linearity:.3,easing:t.bezier(0,0,.3,1)},Ln=t.extend({deceleration:2500,maxSpeed:1400},En),Cn=t.extend({deceleration:20,maxSpeed:1400},En),Pn=t.extend({deceleration:1e3,maxSpeed:360},En),In=t.extend({deceleration:1e3,maxSpeed:90},En),On=function(t){this._map=t,this.clear()};function zn(t,e){(!t.duration||t.duration0&&r-e[0].time>160;)e.shift()},On.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var r={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},n=0,i=this._inertiaBuffer;n=this._clickTolerance||this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.dblclick=function(t){return this._firePreventable(new Rn(t.type,this._map,t))},Nn.prototype.mouseover=function(t){this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.mouseout=function(t){this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.touchstart=function(t){return this._firePreventable(new Fn(t.type,this._map,t))},Nn.prototype.touchmove=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype.touchend=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype.touchcancel=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Nn.prototype.isEnabled=function(){return!0},Nn.prototype.isActive=function(){return!1},Nn.prototype.enable=function(){},Nn.prototype.disable=function(){};var jn=function(t){this._map=t};jn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},jn.prototype.mousemove=function(t){this._map.fire(new Rn(t.type,this._map,t))},jn.prototype.mousedown=function(){this._delayContextMenu=!0},jn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Rn(\"contextmenu\",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},jn.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new Rn(t.type,this._map,t)),this._map.listens(\"contextmenu\")&&t.preventDefault()},jn.prototype.isEnabled=function(){return!0},jn.prototype.isActive=function(){return!1},jn.prototype.enable=function(){},jn.prototype.disable=function(){};var Un=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1};function Vn(t,e){for(var r={},n=0;nthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),n.length===this.numTouches&&(this.centroid=function(e){for(var r=new t.Point(0,0),n=0,i=e;n30)&&(this.aborted=!0)}}},Hn.prototype.touchend=function(t,e,r){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){var n=!this.aborted&&this.centroid;if(this.reset(),n)return n}};var qn=function(t){this.singleTap=new Hn(t),this.numTaps=t.numTaps,this.reset()};qn.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},qn.prototype.touchstart=function(t,e,r){this.singleTap.touchstart(t,e,r)},qn.prototype.touchmove=function(t,e,r){this.singleTap.touchmove(t,e,r)},qn.prototype.touchend=function(t,e,r){var n=this.singleTap.touchend(t,e,r);if(n){var i=t.timeStamp-this.lastTime<500,a=!this.lastTap||this.lastTap.dist(n)<30;if(i&&a||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}};var Gn=function(){this._zoomIn=new qn({numTouches:1,numTaps:2}),this._zoomOut=new qn({numTouches:2,numTaps:1}),this.reset()};Gn.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Gn.prototype.touchstart=function(t,e,r){this._zoomIn.touchstart(t,e,r),this._zoomOut.touchstart(t,e,r)},Gn.prototype.touchmove=function(t,e,r){this._zoomIn.touchmove(t,e,r),this._zoomOut.touchmove(t,e,r)},Gn.prototype.touchend=function(t,e,r){var n=this,i=this._zoomIn.touchend(t,e,r),a=this._zoomOut.touchend(t,e,r);return i?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(i)},{originalEvent:t})}}):a?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(a)},{originalEvent:t})}}):void 0},Gn.prototype.touchcancel=function(){this.reset()},Gn.prototype.enable=function(){this._enabled=!0},Gn.prototype.disable=function(){this._enabled=!1,this.reset()},Gn.prototype.isEnabled=function(){return this._enabled},Gn.prototype.isActive=function(){return this._active};var Yn=function(t){this.reset(),this._clickTolerance=t.clickTolerance||1};Yn.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Yn.prototype._correctButton=function(t,e){return!1},Yn.prototype._move=function(t,e){return{}},Yn.prototype.mousedown=function(t,e){if(!this._lastPoint){var n=r.mouseButton(t);this._correctButton(t,n)&&(this._lastPoint=e,this._eventButton=n)}},Yn.prototype.mousemoveWindow=function(t,e){var r=this._lastPoint;if(r&&(t.preventDefault(),this._moved||!(e.dist(r)0&&(this._active=!0);var i=Vn(n,r),a=new t.Point(0,0),o=new t.Point(0,0),s=0;for(var l in i){var c=i[l],u=this._touches[l];u&&(a._add(c),o._add(c.sub(u)),s++,i[l]=c)}if(this._touches=i,!(sMath.abs(t.x)}var ii=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.reset=function(){t.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},e.prototype._start=function(t){this._lastPoints=t,ni(t[0].sub(t[1]))&&(this._valid=!1)},e.prototype._move=function(t,e,r){var n=t[0].sub(this._lastPoints[0]),i=t[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid){this._lastPoints=t,this._active=!0;return{pitchDelta:-.5*((n.y+i.y)/2)}}},e.prototype.gestureBeginsVertically=function(t,e,r){if(void 0!==this._valid)return this._valid;var n=t.mag()>=2,i=e.mag()>=2;if(n||i){if(!n||!i)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;var a=t.y>0==e.y>0;return ni(t)&&ni(e)&&a}},e}(Kn),ai={panStep:100,bearingStep:15,pitchStep:10},oi=function(){var t=ai;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep};function si(t){return t*(2-t)}oi.prototype.reset=function(){this._active=!1},oi.prototype.keydown=function(t){var e=this;if(!(t.altKey||t.ctrlKey||t.metaKey)){var r=0,n=0,i=0,a=0,o=0;switch(t.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:t.shiftKey?n=-1:(t.preventDefault(),a=-1);break;case 39:t.shiftKey?n=1:(t.preventDefault(),a=1);break;case 38:t.shiftKey?i=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?i=-1:(t.preventDefault(),o=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:\"keyboardHandler\",easing:si,zoom:r?Math.round(l)+r*(t.shiftKey?2:1):l,bearing:s.getBearing()+n*e._bearingStep,pitch:s.getPitch()+i*e._pitchStep,offset:[-a*e._panStep,-o*e._panStep],center:s.getCenter()},{originalEvent:t})}}}},oi.prototype.enable=function(){this._enabled=!0},oi.prototype.disable=function(){this._enabled=!1,this.reset()},oi.prototype.isEnabled=function(){return this._enabled},oi.prototype.isActive=function(){return this._active};var li=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll([\"_onWheel\",\"_onTimeout\",\"_onScrollFrame\",\"_onScrollFinished\"],this)};li.prototype.setZoomRate=function(t){this._defaultZoomRate=t},li.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},li.prototype.isEnabled=function(){return!!this._enabled},li.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},li.prototype.isZooming=function(){return!!this._zooming},li.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&\"center\"===t.around)},li.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},li.prototype.wheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=t.browser.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._active||this._start(e)),e.preventDefault()}},li.prototype._onTimeout=function(t){this._type=\"wheel\",this._delta-=this._lastValue,this._active||this._start(t)},li.prototype._start=function(e){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var n=r.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},li.prototype.renderFrame=function(){return this._onScrollFrame()},li.prototype._onScrollFrame=function(){var e=this;if(this._frameId&&(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?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var a=\"number\"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(a*i))),\"wheel\"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o,s=\"number\"==typeof this._targetZoom?this._targetZoom:r.zoom,l=this._startZoom,c=this._easing,u=!1;if(\"wheel\"===this._type&&l&&c){var f=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=c(f);o=t.number(l,s,h),f<1?this._frameId||(this._frameId=!0):u=!0}else o=s,u=!0;return this._active=!0,u&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!u,zoomDelta:o-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},li.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var n=this._prevEase,i=(t.browser.now()-n.start)/n.duration,a=n.easing(i+.01)-n.easing(i),o=.27/Math.sqrt(a*a+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=t.bezier(o,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:r},r},li.prototype.reset=function(){this._active=!1};var ci=function(t,e){this._clickZoom=t,this._tapZoom=e};ci.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ci.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ci.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ci.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ui=function(){this.reset()};ui.prototype.reset=function(){this._active=!1},ui.prototype.dblclick=function(t,e){return t.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(t.shiftKey?-1:1),around:r.unproject(e)},{originalEvent:t})}}},ui.prototype.enable=function(){this._enabled=!0},ui.prototype.disable=function(){this._enabled=!1,this.reset()},ui.prototype.isEnabled=function(){return this._enabled},ui.prototype.isActive=function(){return this._active};var fi=function(){this._tap=new qn({numTouches:1,numTaps:1}),this.reset()};fi.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},fi.prototype.touchstart=function(t,e,r){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=e[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(t,e,r))},fi.prototype.touchmove=function(t,e,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;var n=e[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,t.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(t,e,r)},fi.prototype.touchend=function(t,e,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(t,e,r)&&(this._tapTime=t.timeStamp)},fi.prototype.touchcancel=function(){this.reset()},fi.prototype.enable=function(){this._enabled=!0},fi.prototype.disable=function(){this._enabled=!1,this.reset()},fi.prototype.isEnabled=function(){return this._enabled},fi.prototype.isActive=function(){return this._active};var hi=function(t,e,r){this._el=t,this._mousePan=e,this._touchPan=r};hi.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add(\"mapboxgl-touch-drag-pan\")},hi.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove(\"mapboxgl-touch-drag-pan\")},hi.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},hi.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var pi=function(t,e,r){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=r};pi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},pi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},pi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},pi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var di=function(t,e,r,n){this._el=t,this._touchZoom=e,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0};di.prototype.enable=function(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add(\"mapboxgl-touch-zoom-rotate\")},di.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove(\"mapboxgl-touch-zoom-rotate\")},di.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},di.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},di.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},di.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var gi=function(t){return t.zoom||t.drag||t.pitch||t.rotate},mi=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}(t.Event);function vi(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}var yi=function(e,n){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new On(e),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),t.bindAll([\"handleEvent\",\"handleWindowEvent\"],this);var i=this._el;this._listeners=[[i,\"touchstart\",{passive:!1}],[i,\"touchmove\",{passive:!1}],[i,\"touchend\",void 0],[i,\"touchcancel\",void 0],[i,\"mousedown\",void 0],[i,\"mousemove\",void 0],[i,\"mouseup\",void 0],[t.window.document,\"mousemove\",{capture:!0}],[t.window.document,\"mouseup\",void 0],[i,\"mouseover\",void 0],[i,\"mouseout\",void 0],[i,\"dblclick\",void 0],[i,\"click\",void 0],[i,\"keydown\",{capture:!1}],[i,\"keyup\",void 0],[i,\"wheel\",{passive:!1}],[i,\"contextmenu\",void 0],[t.window,\"blur\",void 0]];for(var a=0,o=this._listeners;aa?Math.min(2,_):Math.max(.5,_),w=Math.pow(m,1-e),T=i.unproject(x.add(b.mult(e*w)).mult(g));i.setLocationAtPoint(i.renderWorldCopies?T.wrap():T,d)}n._fireMoveEvents(r)}),(function(t){n._afterEase(r,t)}),e),this},r.prototype._prepareEase=function(e,r,n){void 0===n&&(n={}),this._moving=!0,r||n.moving||this.fire(new t.Event(\"movestart\",e)),this._zooming&&!n.zooming&&this.fire(new t.Event(\"zoomstart\",e)),this._rotating&&!n.rotating&&this.fire(new t.Event(\"rotatestart\",e)),this._pitching&&!n.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,r){if(!this._easeId||!r||this._easeId!==r){delete this._easeId;var n=this._zooming,i=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new t.Event(\"zoomend\",e)),i&&this.fire(new t.Event(\"rotateend\",e)),a&&this.fire(new t.Event(\"pitchend\",e)),this.fire(new t.Event(\"moveend\",e))}},r.prototype.flyTo=function(e,r){var n=this;if(!e.essential&&t.browser.prefersReducedMotion){var i=t.pick(e,[\"center\",\"zoom\",\"bearing\",\"pitch\",\"around\"]);return this.jumpTo(i,r)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var a=this.transform,o=this.getZoom(),s=this.getBearing(),l=this.getPitch(),c=this.getPadding(),u=\"zoom\"in e?t.clamp(+e.zoom,a.minZoom,a.maxZoom):o,f=\"bearing\"in e?this._normalizeBearing(e.bearing,s):s,h=\"pitch\"in e?+e.pitch:l,p=\"padding\"in e?e.padding:a.padding,d=a.zoomScale(u-o),g=t.Point.convert(e.offset),m=a.centerPoint.add(g),v=a.pointLocation(m),y=t.LngLat.convert(e.center||v);this._normalizeCenter(y);var x=a.project(v),b=a.project(y).sub(x),_=e.curve,w=Math.max(a.width,a.height),T=w/d,k=b.mag();if(\"minZoom\"in e){var A=t.clamp(Math.min(e.minZoom,o,u),a.minZoom,a.maxZoom),M=w/a.zoomScale(A-o);_=Math.sqrt(M/k*2)}var S=_*_;function E(t){var e=(T*T-w*w+(t?-1:1)*S*S*k*k)/(2*(t?T:w)*S*k);return Math.log(Math.sqrt(e*e+1)-e)}function L(t){return(Math.exp(t)-Math.exp(-t))/2}function C(t){return(Math.exp(t)+Math.exp(-t))/2}var P=E(0),I=function(t){return C(P)/C(P+_*t)},O=function(t){return w*((C(P)*(L(e=P+_*t)/C(e))-L(P))/S)/k;var e},z=(E(1)-P)/_;if(Math.abs(k)<1e-6||!isFinite(z)){if(Math.abs(w-T)<1e-6)return this.easeTo(e,r);var D=Te.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==f,this._pitching=h!==l,this._padding=!a.isPaddingEqual(p),this._prepareEase(r,!1),this._ease((function(e){var i=e*z,d=1/I(i);a.zoom=1===e?u:o+a.scaleZoom(d),n._rotating&&(a.bearing=t.number(s,f,e)),n._pitching&&(a.pitch=t.number(l,h,e)),n._padding&&(a.interpolatePadding(c,p,e),m=a.centerPoint.add(g));var v=1===e?y:a.unproject(x.add(b.mult(O(i))).mult(d));a.setLocationAtPoint(a.renderWorldCopies?v.wrap():v,m),n._fireMoveEvents(r)}),(function(){return n._afterEase(r)}),e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){return this._stop()},r.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,e)}if(!t){var n=this.handlers;n&&n.stop()}return this},r.prototype._ease=function(e,r,n){!1===n.animate||0===n.duration?(e(1),r()):(this._easeStart=t.browser.now(),this._easeOptions=n,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<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)180?-360:r<-180?360:0}},r}(t.Evented),bi=function(e){void 0===e&&(e={}),this.options=e,t.bindAll([\"_updateEditLink\",\"_updateData\",\"_updateCompact\"],this)};bi.prototype.getDefaultPosition=function(){return\"bottom-right\"},bi.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-attrib\"),this._innerContainer=r.create(\"div\",\"mapboxgl-ctrl-attrib-inner\",this._container),e&&this._container.classList.add(\"mapboxgl-compact\"),this._updateAttributions(),this._updateEditLink(),this._map.on(\"styledata\",this._updateData),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},bi.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"styledata\",this._updateData),this._map.off(\"sourcedata\",this._updateData),this._map.off(\"moveend\",this._updateEditLink),this._map.off(\"resize\",this._updateCompact),this._map=void 0,this._attribHTML=void 0},bi.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(\".mapbox-improve-map\"));var r=[{key:\"owner\",value:this.styleOwner},{key:\"id\",value:this.styleId},{key:\"access_token\",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){var n=r.reduce((function(t,e,n){return e.value&&(t+=e.key+\"=\"+e.value+(n=0)return!1;return!0}))).join(\" | \");o!==this._attribHTML&&(this._attribHTML=o,t.length?(this._innerContainer.innerHTML=o,this._container.classList.remove(\"mapboxgl-attrib-empty\")):this._container.classList.add(\"mapboxgl-attrib-empty\"),this._editLink=null)}},bi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add(\"mapboxgl-compact\"):this._container.classList.remove(\"mapboxgl-compact\")};var _i=function(){t.bindAll([\"_updateLogo\"],this),t.bindAll([\"_updateCompact\"],this)};_i.prototype.onAdd=function(t){this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl\");var e=r.create(\"a\",\"mapboxgl-ctrl-logo\");return e.target=\"_blank\",e.rel=\"noopener nofollow\",e.href=\"https://www.mapbox.com/\",e.setAttribute(\"aria-label\",this._map._getUIString(\"LogoControl.Title\")),e.setAttribute(\"rel\",\"noopener nofollow\"),this._container.appendChild(e),this._container.style.display=\"none\",this._map.on(\"sourcedata\",this._updateLogo),this._updateLogo(),this._map.on(\"resize\",this._updateCompact),this._updateCompact(),this._container},_i.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"sourcedata\",this._updateLogo),this._map.off(\"resize\",this._updateCompact)},_i.prototype.getDefaultPosition=function(){return\"bottom-left\"},_i.prototype._updateLogo=function(t){t&&\"metadata\"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?\"block\":\"none\")},_i.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}},_i.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add(\"mapboxgl-compact\"):e.classList.remove(\"mapboxgl-compact\")}};var wi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};wi.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},wi.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,n=e?this._queue.concat(e):this._queue;re.maxZoom)throw new Error(\"maxZoom must be greater than or equal to minZoom\");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error(\"maxPitch must be greater than or equal to minPitch\");if(null!=e.minPitch&&e.minPitch<0)throw new Error(\"minPitch must be greater than or equal to 0\");if(null!=e.maxPitch&&e.maxPitch>60)throw new Error(\"maxPitch must be less than or equal to 60\");var i=new An(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(n.call(this,i,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new wi,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},Ti,e.locale),this._requestManager=new t.RequestManager(e.transformRequest,e.accessToken),\"string\"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error(\"Container '\"+e.container+\"' not found.\")}else{if(!(e.container instanceof Ai))throw new Error(\"Invalid type: 'container' must be a String or HTMLElement.\");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll([\"_onWindowOnline\",\"_onWindowResize\",\"_contextLost\",\"_contextRestored\"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error(\"Failed to initialize WebGL.\");this.on(\"move\",(function(){return r._update(!1)})),this.on(\"moveend\",(function(){return r._update(!1)})),this.on(\"zoom\",(function(){return r._update(!0)})),void 0!==t.window&&(t.window.addEventListener(\"online\",this._onWindowOnline,!1),t.window.addEventListener(\"resize\",this._onWindowResize,!1)),this.handlers=new yi(this,e);var a=\"string\"==typeof e.hash&&e.hash||void 0;this._hash=e.hash&&new Sn(a).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new bi({customAttribution:e.customAttribution})),this.addControl(new _i,e.logoPosition),this.on(\"style.load\",(function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)})),this.on(\"data\",(function(e){r._update(\"style\"===e.dataType),r.fire(new t.Event(e.dataType+\"data\",e))})),this.on(\"dataloading\",(function(e){r.fire(new t.Event(e.dataType+\"dataloading\",e))}))}n&&(i.__proto__=n),i.prototype=Object.create(n&&n.prototype),i.prototype.constructor=i;var a={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(e,r){if(void 0===r&&e.getDefaultPosition&&(r=e.getDefaultPosition()),void 0===r&&(r=\"top-right\"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error(\"Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.\")));var n=e.onAdd(this);this._controls.push(e);var i=this._controlPositions[r];return-1!==r.indexOf(\"bottom\")?i.insertBefore(n,i.firstChild):i.appendChild(n),this},i.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error(\"Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.\")));var r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this},i.prototype.resize=function(e){var r=this._containerDimensions(),n=r[0],i=r[1];this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i);var a=!this._moving;return a&&(this.stop(),this.fire(new t.Event(\"movestart\",e)).fire(new t.Event(\"move\",e))),this.fire(new t.Event(\"resize\",e)),a&&this.fire(new t.Event(\"moveend\",e)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},i.prototype.setMinZoom=function(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=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\")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(t){if((t=null==t?0:t)<0)throw new Error(\"minPitch must be greater than or equal to 0\");if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()60)throw new Error(\"maxPitch must be less than or equal to 60\");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error(\"maxPitch must be greater than the current minPitch\")},i.prototype.getMaxPitch=function(){return this.transform.maxPitch},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},i.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},i.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},i.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},i.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},i.prototype._createDelegatedListener=function(t,e,r){var n,i=this;if(\"mouseenter\"===t||\"mouseover\"===t){var a=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){var o=i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[];o.length?a||(a=!0,r.call(i,new Rn(t,i,n.originalEvent,{features:o}))):a=!1},mouseout:function(){a=!1}}}}if(\"mouseleave\"===t||\"mouseout\"===t){var o=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){(i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[]).length?o=!0:o&&(o=!1,r.call(i,new Rn(t,i,n.originalEvent)))},mouseout:function(e){o&&(o=!1,r.call(i,new Rn(t,i,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(n={},n[t]=function(t){var n=i.getLayer(e)?i.queryRenderedFeatures(t.point,{layers:[e]}):[];n.length&&(t.features=n,r.call(i,t),delete t.features)},n)}},i.prototype.on=function(t,e,r){if(void 0===r)return n.prototype.on.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(i),i.delegates)this.on(a,i.delegates[a]);return this},i.prototype.once=function(t,e,r){if(void 0===r)return n.prototype.once.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in i.delegates)this.once(a,i.delegates[a]);return this},i.prototype.off=function(t,e,r){var i=this;if(void 0===r)return n.prototype.off.call(this,t,e);return this._delegatedListeners&&this._delegatedListeners[t]&&function(n){for(var a=n[t],o=0;o180;){var s=n.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;e.lng>n.center.lng?e.lng-=360:e.lng+=360}return e}Ii.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),r.disableDrag()},Ii.prototype.move=function(t,e){var r=this.map,n=this.mouseRotate.mousemoveWindow(t,e);if(n&&n.bearingDelta&&r.setBearing(r.getBearing()+n.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(t,e);i&&i.pitchDelta&&r.setPitch(r.getPitch()+i.pitchDelta)}},Ii.prototype.off=function(){var t=this.element;r.removeEventListener(t,\"mousedown\",this.mousedown),r.removeEventListener(t,\"touchstart\",this.touchstart,{passive:!1}),r.removeEventListener(t,\"touchmove\",this.touchmove),r.removeEventListener(t,\"touchend\",this.touchend),r.removeEventListener(t,\"touchcancel\",this.reset),this.offTemp()},Ii.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(t.window,\"mousemove\",this.mousemove),r.removeEventListener(t.window,\"mouseup\",this.mouseup)},Ii.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),r.mousePos(this.element,e)),r.addEventListener(t.window,\"mousemove\",this.mousemove),r.addEventListener(t.window,\"mouseup\",this.mouseup)},Ii.prototype.mousemove=function(t){this.move(t,r.mousePos(this.element,t))},Ii.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},Ii.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.down({type:\"mousedown\",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},Ii.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},Ii.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)e.getEast()||r.latitudee.getNorth())},n.prototype._setErrorState=function(){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\")}},n.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event(\"outofmaxbounds\",e)),this._updateMarker(),void this._finish();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()}},n.prototype._updateCamera=function(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude),n=e.coords.accuracy,i=this._map.getBearing(),a=t.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),a,{geolocateSource:!0})},n.prototype._updateMarker=function(e){if(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},n.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),r=this._map.unproject([1,t]),n=e.distanceTo(r),i=Math.ceil(2*this._accuracy/n);this._circleElement.style.width=i+\"px\",this._circleElement.style.height=i+\"px\"},n.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},n.prototype._onError=function(e){if(this._map){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\"),this._geolocateButton.disabled=!0;var r=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.title=r,this._geolocateButton.setAttribute(\"aria-label\",r),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&ji)return;this._setErrorState()}\"OFF\"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add(\"mapboxgl-user-location-dot-stale\"),this.fire(new t.Event(\"error\",e)),this._finish()}},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(e){var n=this;if(this._container.addEventListener(\"contextmenu\",(function(t){return t.preventDefault()})),this._geolocateButton=r.create(\"button\",\"mapboxgl-ctrl-geolocate\",this._container),r.create(\"span\",\"mapboxgl-ctrl-icon\",this._geolocateButton).setAttribute(\"aria-hidden\",!0),this._geolocateButton.type=\"button\",!1===e){t.warnOnce(\"Geolocation support is not available so the GeolocateControl will be disabled.\");var i=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute(\"aria-label\",i)}else{var a=this._map._getUIString(\"GeolocateControl.FindMyLocation\");this._geolocateButton.title=a,this._geolocateButton.setAttribute(\"aria-label\",a)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute(\"aria-pressed\",\"false\"),this._watchState=\"OFF\"),this.options.showUserLocation&&(this._dotElement=r.create(\"div\",\"mapboxgl-user-location-dot\"),this._userLocationDotMarker=new Fi(this._dotElement),this._circleElement=r.create(\"div\",\"mapboxgl-user-location-accuracy-circle\"),this._accuracyCircleMarker=new Fi({element:this._circleElement,pitchAlignment:\"map\"}),this.options.trackUserLocation&&(this._watchState=\"OFF\"),this._map.on(\"zoom\",this._onZoom)),this._geolocateButton.addEventListener(\"click\",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on(\"movestart\",(function(e){var r=e.originalEvent&&\"resize\"===e.originalEvent.type;e.geolocateSource||\"ACTIVE_LOCK\"!==n._watchState||r||(n._watchState=\"BACKGROUND\",n._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background\"),n._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),n.fire(new t.Event(\"trackuserlocationend\")))}))},n.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\":Ni--,ji=!1,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\")}if(\"OFF\"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.setAttribute(\"aria-pressed\",\"true\"),++Ni>1?(e={maximumAge:6e5,timeout:0},ji=!0):(e=this.options.positionOptions,ji=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},n.prototype._clearWatch=function(){t.window.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)},n}(t.Evented),Vi={maxWidth:100,unit:\"metric\"},Hi=function(e){this.options=t.extend({},Vi,e),t.bindAll([\"_onMove\",\"setUnit\"],this)};function qi(t,e,r){var n=r&&r.maxWidth||100,i=t._container.clientHeight/2,a=t.unproject([0,i]),o=t.unproject([n,i]),s=a.distanceTo(o);if(r&&\"imperial\"===r.unit){var l=3.2808*s;if(l>5280)Gi(e,n,l/5280,t._getUIString(\"ScaleControl.Miles\"));else Gi(e,n,l,t._getUIString(\"ScaleControl.Feet\"))}else if(r&&\"nautical\"===r.unit){Gi(e,n,s/1852,t._getUIString(\"ScaleControl.NauticalMiles\"))}else s>=1e3?Gi(e,n,s/1e3,t._getUIString(\"ScaleControl.Kilometers\")):Gi(e,n,s,t._getUIString(\"ScaleControl.Meters\"))}function Gi(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:o>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(o),a*o),l=s/r;t.style.width=e*l+\"px\",t.innerHTML=s+\" \"+n}Hi.prototype.getDefaultPosition=function(){return\"bottom-left\"},Hi.prototype._onMove=function(){qi(this._map,this._container,this.options)},Hi.prototype.onAdd=function(t){return this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-scale\",t.getContainer()),this._map.on(\"move\",this._onMove),this._onMove(),this._container},Hi.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"move\",this._onMove),this._map=void 0},Hi.prototype.setUnit=function(t){this.options.unit=t,qi(this._map,this._container,this.options)};var Yi=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce(\"Full screen control 'container' must be a DOM element.\")),t.bindAll([\"_onClickFullscreen\",\"_changeIcon\"],this),\"onfullscreenchange\"in t.window.document?this._fullscreenchange=\"fullscreenchange\":\"onmozfullscreenchange\"in t.window.document?this._fullscreenchange=\"mozfullscreenchange\":\"onwebkitfullscreenchange\"in t.window.document?this._fullscreenchange=\"webkitfullscreenchange\":\"onmsfullscreenchange\"in t.window.document&&(this._fullscreenchange=\"MSFullscreenChange\")};Yi.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-group\"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display=\"none\",t.warnOnce(\"This device does not support fullscreen mode.\")),this._controlContainer},Yi.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Yi.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Yi.prototype._setupUI=function(){var e=this._fullscreenButton=r.create(\"button\",\"mapboxgl-ctrl-fullscreen\",this._controlContainer);r.create(\"span\",\"mapboxgl-ctrl-icon\",e).setAttribute(\"aria-hidden\",!0),e.type=\"button\",this._updateTitle(),this._fullscreenButton.addEventListener(\"click\",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Yi.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute(\"aria-label\",t),this._fullscreenButton.title=t},Yi.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?\"FullscreenControl.Exit\":\"FullscreenControl.Enter\")},Yi.prototype._isFullscreen=function(){return this._fullscreen},Yi.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(\"mapboxgl-ctrl-shrink\"),this._fullscreenButton.classList.toggle(\"mapboxgl-ctrl-fullscreen\"),this._updateTitle())},Yi.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Wi={closeButton:!0,closeOnClick:!0,className:\"\",maxWidth:\"240px\"},Xi=function(e){function n(r){e.call(this),this.options=t.extend(Object.create(Wi),r),t.bindAll([\"_update\",\"_onClose\",\"remove\",\"_onMouseMove\",\"_onMouseUp\",\"_onDrag\"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on(\"click\",this._onClose),this.options.closeOnMove&&this._map.on(\"move\",this._onClose),this._map.on(\"remove\",this.remove),this._update(),this._trackPointer?(this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"mouseup\",this._onMouseUp),this._container&&this._container.classList.add(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"mapboxgl-track-pointer\")):this._map.on(\"move\",this._update),this.fire(new t.Event(\"open\")),this},n.prototype.isOpen=function(){return!!this._map},n.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off(\"move\",this._update),this._map.off(\"move\",this._onClose),this._map.off(\"click\",this._onClose),this._map.off(\"remove\",this.remove),this._map.off(\"mousemove\",this._onMouseMove),this._map.off(\"mouseup\",this._onMouseUp),this._map.off(\"drag\",this._onDrag),delete this._map),this.fire(new t.Event(\"close\")),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on(\"move\",this._update),this._map.off(\"mousemove\",this._onMouseMove),this._container&&this._container.classList.remove(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.remove(\"mapboxgl-track-pointer\")),this},n.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off(\"move\",this._update),this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"drag\",this._onDrag),this._container&&this._container.classList.add(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"mapboxgl-track-pointer\")),this},n.prototype.getElement=function(){return this._container},n.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},n.prototype.setHTML=function(e){var r,n=t.window.document.createDocumentFragment(),i=t.window.document.createElement(\"body\");for(i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},n.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},n.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},n.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},n.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},n.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},n.prototype._createContent=function(){this._content&&r.remove(this._content),this._content=r.create(\"div\",\"mapboxgl-popup-content\",this._container),this.options.closeButton&&(this._closeButton=r.create(\"button\",\"mapboxgl-popup-close-button\",this._content),this._closeButton.type=\"button\",this._closeButton.setAttribute(\"aria-label\",\"Close popup\"),this._closeButton.innerHTML=\"×\",this._closeButton.addEventListener(\"click\",this._onClose))},n.prototype._onMouseUp=function(t){this._update(t.point)},n.prototype._onMouseMove=function(t){this._update(t.point)},n.prototype._onDrag=function(t){this._update(t.point)},n.prototype._update=function(e){var n=this,i=this._lngLat||this._trackPointer;if(this._map&&i&&this._content&&(this._container||(this._container=r.create(\"div\",\"mapboxgl-popup\",this._map.getContainer()),this._tip=r.create(\"div\",\"mapboxgl-popup-tip\",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(\" \").forEach((function(t){return n._container.classList.add(t)})),this._trackPointer&&this._container.classList.add(\"mapboxgl-popup-track-pointer\")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Oi(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var a=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),o=this.options.anchor,s=function e(r){if(r){if(\"number\"==typeof r){var n=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new t.Point(0,0),top:new t.Point(0,r),\"top-left\":new t.Point(n,n),\"top-right\":new t.Point(-n,n),bottom:new t.Point(0,-r),\"bottom-left\":new t.Point(n,-n),\"bottom-right\":new t.Point(-n,-n),left:new t.Point(r,0),right:new t.Point(-r,0)}}if(r instanceof t.Point||Array.isArray(r)){var i=t.Point.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.Point.convert(r.center||[0,0]),top:t.Point.convert(r.top||[0,0]),\"top-left\":t.Point.convert(r[\"top-left\"]||[0,0]),\"top-right\":t.Point.convert(r[\"top-right\"]||[0,0]),bottom:t.Point.convert(r.bottom||[0,0]),\"bottom-left\":t.Point.convert(r[\"bottom-left\"]||[0,0]),\"bottom-right\":t.Point.convert(r[\"bottom-right\"]||[0,0]),left:t.Point.convert(r.left||[0,0]),right:t.Point.convert(r.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!o){var l,c=this._container.offsetWidth,u=this._container.offsetHeight;l=a.y+s.bottom.ythis._map.transform.height-u?[\"bottom\"]:[],a.xthis._map.transform.width-c/2&&l.push(\"right\"),o=0===l.length?\"bottom\":l.join(\"-\")}var f=a.add(s[o]).round();r.setTransform(this._container,zi[o]+\" translate(\"+f.x+\"px,\"+f.y+\"px)\"),Di(this._container,o,\"popup\")}},n.prototype._onClose=function(){this.remove()},n}(t.Evented);var Zi={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Ei,NavigationControl:Pi,GeolocateControl:Ui,AttributionControl:bi,ScaleControl:Hi,FullscreenControl:Yi,Popup:Xi,Marker:Fi,Style:qe,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:function(){Bt().acquire(zt)},clearPrewarmedResources:function(){var t=Rt;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(zt),Rt=null):console.warn(\"Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()\"))},get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return Dt.workerCount},set workerCount(t){Dt.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){t.clearTileCache(e)},workerUrl:\"\"};return Zi})),r}))},{}],240:[function(t,e,r){\"use strict\";e.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},{}],241:[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 m(){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)))}m();var v={element:t};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(e){e?m():function(){if(!s)return;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}}),v};var n=t(\"mouse-event\")},{\"mouse-event\":243}],242:[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}},{}],243:[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<=0)return 1<=-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)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])t!=o-i>t&&(a-c)*(i-u)/(o-u)+c-n>t&&(s=!s),a=c,o=u}return s}};return e}},{}],257:[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;i0}))}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 m(){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 v,y=m();if(y){var x;if(t)(x=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above);else y.seg.otherFill=h.seg.myFill;r&&r.segmentUpdate(y.seg),h.other.remove(),h.remove()}if(a.getHead()!==h){r&&r.rewind(h.seg);continue}if(t)x=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=x?!h.seg.myFill.below:h.seg.myFill.below;else if(null===h.seg.otherFill)v=g?h.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:h.primary?o:i,h.seg.otherFill={above:v,below:v};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;l0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,t)}},a.prototype.read_uint16=function(t){var e=this.input;if(t+2>e.length)throw n(\"unexpected EOF\",\"EBADDATA\");return this.big_endian?256*e[t]+e[t+1]:e[t]+256*e[t+1]},a.prototype.read_uint32=function(t){var e=this.input;if(t+4>e.length)throw n(\"unexpected EOF\",\"EBADDATA\");return this.big_endian?16777216*e[t]+65536*e[t+1]+256*e[t+2]+e[t+3]:e[t]+256*e[t+1]+65536*e[t+2]+16777216*e[t+3]},a.prototype.is_subifd_link=function(t,e){return 0===t&&34665===e||0===t&&34853===e||34665===t&&40965===e},a.prototype.exif_format_length=function(t){switch(t){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},a.prototype.exif_format_read=function(t,e){var r;switch(t){case 1:case 2:return r=this.input[e];case 6:return(r=this.input[e])|33554430*(128&r);case 3:return r=this.read_uint16(e);case 8:return(r=this.read_uint16(e))|131070*(32768&r);case 4:return r=this.read_uint32(e);case 9:return 0|(r=this.read_uint32(e));case 5:case 10:case 11:case 12:case 7:default:return null}},a.prototype.scan_ifd=function(t,e,r){var a=this.read_uint16(e);e+=2;for(var o=0;othis.input.length)throw n(\"unexpected EOF\",\"EBADDATA\");for(var d=[],g=h,m=0;m0&&(this.ifds_to_read.push({id:s,offset:d[0]}),p=!0),!1===r({is_big_endian:this.big_endian,ifd:t,tag:s,format:l,count:c,entry_offset:e+this.start,data_length:f,data_offset:h+this.start,value:d,is_subifd_link:p}))return void(this.aborted=!0);e+=12}0===t&&this.ifds_to_read.push({id:1,offset:this.read_uint32(e)})},e.exports.ExifParser=a,e.exports.get_orientation=function(t){var e=0;try{return new a(t,0,t.length).each((function(t){if(0===t.ifd&&274===t.tag&&Array.isArray(t.value))return e=t.value[0],!1})),e}catch(t){return-1}}},{}],264:[function(t,e,r){\"use strict\";var n=t(\"./common\").readUInt16BE,i=t(\"./common\").readUInt32BE;function a(t,e){if(t.length<4+e)return null;var r=i(t,e);return t.length>4&15,i=15&t[4],a=t[5]>>4&15,o=n(t,6),l=8,c=0;ce.width||t.width===e.width&&t.height>e.height?t:e})),i=r.reduce((function(t,e){return t.height>e.height||t.height===e.height&&t.width>e.width?t:e})),n.width>i.height||n.width===i.height&&n.height>i.width?n:i),s=1;e.transforms.forEach((function(t){var e={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},r={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(\"imir\"===t.type&&(s=0===t.value?r[s]:e[s=e[s=r[s]]]),\"irot\"===t.type)for(var n=0;n1&&(h.variants=f.variants),f.orientation&&(h.orientation=f.orientation),f.exif_location&&f.exif_location.offset+f.exif_location.length<=t.length){var p=a(t,f.exif_location.offset),d=t.slice(f.exif_location.offset+p+4,f.exif_location.offset+f.exif_location.length),g=s.get_orientation(d);g>0&&(h.orientation=g)}return h}}}}}}},{\"../common\":262,\"../exif_utils\":263,\"../miaf_utils\":264}],266:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt16LE,o=n(\"BM\");e.exports=function(t){if(!(t.length<26)&&i(t,0,o))return{width:a(t,18),height:a(t,22),type:\"bmp\",mime:\"image/bmp\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],267:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt16LE,o=n(\"GIF87a\"),s=n(\"GIF89a\");e.exports=function(t){if(!(t.length<10)&&(i(t,0,o)||i(t,0,s)))return{width:a(t,6),height:a(t,8),type:\"gif\",mime:\"image/gif\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],268:[function(t,e,r){\"use strict\";var n=t(\"../common\").readUInt16LE;e.exports=function(t){var e=n(t,0),r=n(t,2),i=n(t,4);if(0===e&&1===r&&i){for(var a=[],o={width:0,height:0},s=0;so.width||c>o.height)&&(o=u)}return{width:o.width,height:o.height,variants:a,type:\"ico\",mime:\"image/x-icon\",wUnits:\"px\",hUnits:\"px\"}}}},{\"../common\":262}],269:[function(t,e,r){\"use strict\";var n=t(\"../common\").readUInt16BE,i=t(\"../common\").str2arr,a=t(\"../common\").sliceEq,o=t(\"../exif_utils\"),s=i(\"Exif\\0\\0\");e.exports=function(t){if(!(t.length<2)&&255===t[0]&&216===t[1]&&255===t[2])for(var e=2;;){for(;;){if(t.length-e<2)return;if(255===t[e++])break}for(var r,i,l=t[e++];255===l;)l=t[e++];if(208<=l&&l<=217||1===l)r=0;else{if(!(192<=l&&l<=254))return;if(t.length-e<2)return;r=n(t,e)-2,e+=2}if(217===l||218===l)return;if(225===l&&r>=10&&a(t,e,s)&&(i=o.get_orientation(t.slice(e+6,e+r))),r>=5&&192<=l&&l<=207&&196!==l&&200!==l&&204!==l){if(t.length-e0&&(c.orientation=i),c}e+=r}}},{\"../common\":262,\"../exif_utils\":263}],270:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt32BE,o=n(\"\\x89PNG\\r\\n\\x1a\\n\"),s=n(\"IHDR\");e.exports=function(t){if(!(t.length<24)&&i(t,0,o)&&i(t,12,s))return{width:a(t,16),height:a(t,20),type:\"png\",mime:\"image/png\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],271:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt32BE,o=n(\"8BPS\\0\\x01\");e.exports=function(t){if(!(t.length<22)&&i(t,0,o))return{width:a(t,18),height:a(t,14),type:\"psd\",mime:\"image/vnd.adobe.photoshop\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],272:[function(t,e,r){\"use strict\";function n(t){return\"number\"==typeof t&&isFinite(t)&&t>0}var i=/<[-_.:a-zA-Z0-9][^>]*>/,a=/^<([-_.:a-zA-Z0-9]+:)?svg\\s/,o=/[^-]\\bwidth=\"([^%]+?)\"|[^-]\\bwidth='([^%]+?)'/,s=/\\bheight=\"([^%]+?)\"|\\bheight='([^%]+?)'/,l=/\\bview[bB]ox=\"(.+?)\"|\\bview[bB]ox='(.+?)'/,c=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function u(t){return c.test(t)?t.match(c)[0]:\"px\"}e.exports=function(t){if(function(t){var e,r=0,n=t.length;for(239===t[0]&&187===t[1]&&191===t[2]&&(r=3);r>14&16383),type:\"webp\",mime:\"image/webp\",wUnits:\"px\",hUnits:\"px\"}}}function h(t,e){return{width:1+(t[e+6]<<16|t[e+5]<<8|t[e+4]),height:1+(t[e+9]<t.length)){for(;e+8=10?r=r||u(t,e+8):\"VP8L\"===p&&d>=9?r=r||f(t,e+8):\"VP8X\"===p&&d>=10?r=r||h(t,e+8):\"EXIF\"===p&&(n=s.get_orientation(t.slice(e+8,e+8+d)),e=1/0),e+=8+d}else e++;if(r)return n>0&&(r.orientation=n),r}}}},{\"../common\":262,\"../exif_utils\":263}],275:[function(t,e,r){\"use strict\";e.exports={avif:t(\"./parse_sync/avif\"),bmp:t(\"./parse_sync/bmp\"),gif:t(\"./parse_sync/gif\"),ico:t(\"./parse_sync/ico\"),jpeg:t(\"./parse_sync/jpeg\"),png:t(\"./parse_sync/png\"),psd:t(\"./parse_sync/psd\"),svg:t(\"./parse_sync/svg\"),tiff:t(\"./parse_sync/tiff\"),webp:t(\"./parse_sync/webp\")}},{\"./parse_sync/avif\":265,\"./parse_sync/bmp\":266,\"./parse_sync/gif\":267,\"./parse_sync/ico\":268,\"./parse_sync/jpeg\":269,\"./parse_sync/png\":270,\"./parse_sync/psd\":271,\"./parse_sync/svg\":272,\"./parse_sync/tiff\":273,\"./parse_sync/webp\":274}],276:[function(t,e,r){\"use strict\";var n=t(\"./lib/parsers_sync\");e.exports=function(t){return function(t){for(var e=Object.keys(n),r=0;r1)for(var r=1;r1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function T(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 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 float dashLength, pixelRatio, thickness, opacity, id, miterMode;\\nuniform sampler2D dashTexture;\\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) / dashLength) * .5 + .25;\\n\\tfloat dash = texture2D(dashTexture, 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||\"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\",splitNull:\"splitNull\"}),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=D}));(I=I.slice(0,R)).push(D)}for(var F=function(t){var e=k.slice(2*z,2*I[t]).concat(D?k.slice(2*D):[]),r=(d.hole||[]).map((function(e){return e-D+(I[t]-z)})),n=c(e,r);n=n.map((function(e){return e+z+(e+zt.length)&&(e=t.length);for(var r=0,n=new Array(e);r 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\"]),l.vert=h([\"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 bool constPointSize;\\nuniform float pixelRatio;\\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\\nuniform sampler2D paletteTexture;\\n\\nconst float maxSize = 100.;\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragBorderRadius, fragWidth;\\n\\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\\n\\nbool isDirect = (paletteSize.x < 1.);\\n\\nvec4 getColor(vec4 id) {\\n return isDirect ? id / 255. : texture2D(paletteTexture,\\n vec2(\\n (id.x + .5) / paletteSize.x,\\n (id.y + .5) / paletteSize.y\\n )\\n );\\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) * pointSizeScale;\\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\"]),m&&(l.frag=l.frag.replace(\"smoothstep\",\"smoothStep\"),s.frag=s.frag.replace(\"smoothstep\",\"smoothStep\")),this.drawCircle=t(l)}b.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},b.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},b.prototype.draw=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;nn)?e.tree=u(t,{bounds:f}):n&&n.length&&(e.tree=n),e.tree){var h={primitive:\"points\",usage:\"static\",data:e.tree,type:\"uint32\"};e.elements?e.elements(h):e.elements=o.elements(h)}var p=v.float32(t);return i({data:p,usage:\"dynamic\"}),a({data:v.fract32(t,p),usage:\"dynamic\"}),s({data:new Uint8Array(c),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=[],s=0,l=Math.min(e.length,r.count);s=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;o4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===i.length?i[0]:i},b.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;i2?(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;nk))&&(s.lower||!(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)||W(t.data))}function c(t,e,r,n,i,a){for(var o=0;o(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)||W(t)||l(t)?e=t:(\"data\"in t&&(e=t.data),\"usage\"in t&&(r=Q[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>>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,r.height>>=i,p(r,n[i]),t.mipmask|=1<e;++e)t.images[e]=null;return t}function C(t){for(var e=t.images,r=0;re){for(var r=0;r=--this.refCount&&F(this)}}),o.profile&&(a.getTotalTextureSize=function(){var t=0;return Object.keys(yt).forEach((function(e){t+=yt[e].stats.size})),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;P.call(r);var a=L();return\"number\"==typeof t?M(a,0|t,\"number\"==typeof e?0|e:0|t):t?(I(r,t),S(a,t)):M(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),E(a,3553),O(r,3553),R(),C(a),o.profile&&(i.stats.size=T(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 z(3553);return yt[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=v();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(),k(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=0;i.mipmask>>l;++l){var c=a>>l,u=s>>l;if(!c||!u)break;t.texImage2D(3553,l,i.format,c,u,0,i.format,i.type,null)}return R(),o.profile&&(i.stats.size=T(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(P.call(l),s=0;6>s;++s)g[s]=L();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(I(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)M(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)E(g[s],34069+s);for(O(l,34067),R(),o.profile&&(h.stats.size=T(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)C(g[s]);return f}var h=new z(34067);yt[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=v();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(),k(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=T(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;er;++r)if(0!=(e.mipmask&1<>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);O(e.texInfo,e.target)}))},refresh:function(){for(var e=0;ei;++i){for(c=0;ct;++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(k).forEach(m)},restore:function(){x.cur=null,x.next=null,x.dirty=!0,X(k).forEach((function(e){e.framebuffer=t.createFramebuffer(),v(e)}))}})}function M(){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,i,a,o){function s(){this.id=++f,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var t=e.oes_vertex_array_object;this.vao=t?t.createVertexArrayOES():null,h[this.id]=this,this.buffers=[]}var c=r.maxAttributes,u=Array(c);for(r=0;r=h.byteLength?c.subdata(h):(c.destroy(),r.buffers[s]=null)),r.buffers[s]||(c=r.buffers[s]=i.create(u,34962,!1,!0)),f.buffer=i.getBuffer(c),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1,t[s]=1;else i.getBuffer(u)?(f.buffer=i.getBuffer(u),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1):i.getBuffer(u.buffer)?(f.buffer=i.getBuffer(u.buffer),f.size=0|(+u.size||f.buffer.dimension),f.normalized=!!u.normalized||!1,f.type=\"type\"in u?K[u.type]:f.buffer.dtype,f.offset=0|(u.offset||0),f.stride=0|(u.stride||0),f.divisor=0|(u.divisor||0),f.state=1):\"x\"in u&&(f.x=+u.x||0,f.y=+u.y||0,f.z=+u.z||0,f.w=+u.w||0,f.state=2)}for(c=0;ct&&(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(e,n,i,a){var o=f[n];o||(o=f[n]={});var p=o[e];if(p&&(p.refCount++,!a))return p;var d=new s(n,e);return r.shaderCount++,l(d,i,a),p||(o[e]=d),h.push(d),j(d,{destroy:function(){if(d.refCount--,0>=d.refCount){t.deleteProgram(d.program);var e=h.indexOf(d);h.splice(e,1),r.shaderCount--}0>=o[d.vertId].refCount&&(t.deleteShader(u[d.vertId]),delete u[d.vertId],delete f[d.fragId][d.vertId]),Object.keys(f[d.fragId]).length||(t.deleteShader(c[d.fragId]),delete c[d.fragId],delete f[d.fragId])}})},restore:function(){c={},u={};for(var t=0;t\"+e+\"?\"+i+\".constant[\"+e+\"]:0;\"})).join(\"\"),\"}}else{\",\"if(\",s,\"(\",i,\".buffer)){\",u,\"=\",a,\".createStream(\",34962,\",\",i,\".buffer);\",\"}else{\",u,\"=\",a,\".getBuffer(\",i,\".buffer);\",\"}\",f,'=\"type\" in ',i,\"?\",o.glTypes,\"[\",i,\".type]:\",u,\".dtype;\",l.normalized,\"=!!\",i,\".normalized;\"),n(\"size\"),n(\"offset\"),n(\"stride\"),n(\"divisor\"),r(\"}}\"),r.exit(\"if(\",l.isStream,\"){\",a,\".destroyStream(\",u,\");\",\"}\"),l}))})),o}function A(t,e,n,i,o){function s(t){var e=c[t];e&&(h[t]=e)}var l=function(t,e){if(\"string\"==typeof(r=t.static).frag&&\"string\"==typeof r.vert){if(0>1)\",s],\");\")}function e(){r(l,\".drawArraysInstancedANGLE(\",[d,g,m,s],\");\")}p&&\"null\"!==p?y?t():(r(\"if(\",p,\"){\"),t(),r(\"}else{\"),e(),r(\"}\")):e()}function o(){function t(){r(u+\".drawElements(\"+[d,m,v,g+\"<<((\"+v+\"-5121)>>1)\"]+\");\")}function e(){r(u+\".drawArrays(\"+[d,g,m]+\");\")}p&&\"null\"!==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),h.elementsActive&&a(\"if(\"+i+\")\"+u+\".bindBuffer(34963,\"+i+\".buffer.buffer);\")):(i=a.def(),a(i,\"=\",f,\".\",\"elements\",\";\",\"if(\",i,\"){\",u,\".bindBuffer(\",34963,\",\",i,\".buffer.buffer);}\",\"else if(\",c.vao,\".currentVAO){\",i,\"=\",t.shared.elements+\".getElements(\"+c.vao,\".currentVAO.elements);\",nt?\"\":\"if(\"+i+\")\"+u+\".bindBuffer(34963,\"+i+\".buffer.buffer);\",\"}\")),i}(),d=i(\"primitive\"),g=i(\"offset\"),m=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 m){if(0===m)return}else r(\"if(\",m,\"){\"),r.exit(\"}\");tt&&(s=i(\"instances\"),l=t.instancing);var v=p+\".type\",y=h.elements&&D(h.elements)&&!h.vaoActive;tt&&(\"number\"!=typeof s||0<=s)?\"string\"==typeof s?(r(\"if(\",s,\">0){\"),a(),r(\"}else if(\",s,\"<0){\"),o(),r(\"}\")):a():o()}function G(t,e,r,n,i){return i=(e=b()).proc(\"body\",i),tt&&(e.instancing=i.def(e.shared.extensions,\".angle_instanced_arrays\")),t(e,i,r,n),e.compile().body}function Y(t,e,r,n){B(t,e),r.useVAO?r.drawVAO?e(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,e),\");\"):e(t.shared.vao,\".setVAO(\",t.shared.vao,\".targetVAO);\"):(e(t.shared.vao,\".setVAO(null);\"),U(t,e,r,n.attributes,(function(){return!0}))),H(t,e,r,n.uniforms,(function(){return!0}),!1),q(t,e,e,r)}function W(t,e,r,n){function i(){return!0}t.batchId=\"a1\",B(t,e),U(t,e,r,n.attributes,i),H(t,e,r,n.uniforms,i,!1),q(t,e,e,r)}function X(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}B(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&&M(t,u,r.context),r.needsFramebuffer&&S(t,u,r.framebuffer),L(t,u,r.state,i),r.profile&&i(r.profile)&&N(t,u,r,!1,!0),n?(r.useVAO?r.drawVAO?i(r.drawVAO)?u(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,u),\");\"):c(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,c),\");\"):c(t.shared.vao,\".setVAO(\",t.shared.vao,\".targetVAO);\"):(c(t.shared.vao,\".setVAO(null);\"),U(t,c,r,n.attributes,a),U(t,u,r,n.attributes,i)),H(t,c,r,n.uniforms,a,!1),H(t,u,r,n.uniforms,i,!0),q(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 G(W,t,r,e,2)})),\"(\",n,\");}\",c,\".call(this,a0[\",s,\"],\",s,\");\"))}function Z(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;M(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),O(Object.keys(r.state)).forEach((function(e){var n=r.state[e].append(t,i);m(n)?n.forEach((function(r,n){i.set(t.next[e],\"[\"+n+\"]\",r)})):i.set(a.next,\".\"+e,n)})),N(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){var o=r.uniforms[n].append(t,i);Array.isArray(o)&&(o=\"[\"+o.join()+\"]\"),i.set(a.uniforms,\"[\"+e.id(n)+\"]\",o)})),Object.keys(r.attributes).forEach((function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new Q).forEach((function(t){i.set(a,\".\"+t,n[t])}))})),r.scopeVAO&&i.set(a.vao,\".targetVAO\",r.scopeVAO.append(t,i)),n(\"vert\"),n(\"frag\"),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.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)}}},xt=[];xt[6408]=4,xt[6407]=3;var bt=[];bt[5121]=1,bt[5126]=4,bt[36193]=2;var _t=[\"x\",\"y\",\"z\",\"w\"],wt=\"blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset\".split(\" \"),Tt={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},At={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,\"increment wrap\":34055,\"decrement wrap\":34056,invert:5386},Mt={cw:2304,ccw:2305},St=new z(!1,!1,!1,(function(){}));return function(t){function e(){if(0===J.length)w&&w.update(),tt=null;else{tt=H.next(e),f();for(var t=J.length-1;0<=t;--t){var r=J[t];r&&r(P,null,0)}m.flush(),w&&w.update()}}function r(){!tt&&0=J.length&&n()}}}}function u(){var t=X.viewport,e=X.scissor_box;t[0]=t[1]=e[0]=e[1]=0,P.viewportWidth=P.framebufferWidth=P.drawingBufferWidth=t[2]=e[2]=m.drawingBufferWidth,P.viewportHeight=P.framebufferHeight=P.drawingBufferHeight=t[3]=e[3]=m.drawingBufferHeight}function f(){P.tick+=1,P.time=g(),u(),W.procs.poll()}function h(){F.refresh(),u(),W.procs.refresh(),w&&w.update()}function g(){return(q()-T)/1e3}if(!(t=i(t)))return null;var m=t.gl,v=m.getContextAttributes();m.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;ie;++e)et(j({framebuffer:t.framebuffer.faces[e]},t),l);else et(t,l);else l(0,t)},prop:V.define.bind(null,1),context:V.define.bind(null,2),this:V.define.bind(null,3),draw:s({}),buffer:function(t){return O.create(t,34962,!1,!1)},elements:function(t){return z.create(t,!1)},texture:F.create2D,cube:F.createCube,renderbuffer:U.create,framebuffer:G.create,framebufferCube:G.createCube,vao:D.createVAO,attributes:v,frame:c,on:function(t,e){var r;switch(t){case\"frame\":return c(e);case\"lost\":r=K;break;case\"restore\":r=Q;break;case\"destroy\":r=$}return r.push(e),{cancel:function(){for(var t=0;t2?\"one of \".concat(e,\" \").concat(t.slice(0,r-1).join(\", \"),\", or \")+t[r-1]:2===r?\"one of \".concat(e,\" \").concat(t[0],\" or \").concat(t[1]):\"of \".concat(e,\" \").concat(t[0])}return\"of \".concat(e,\" \").concat(String(t))}i(\"ERR_INVALID_OPT_VALUE\",(function(t,e){return'The value \"'+e+'\" is invalid for option \"'+t+'\"'}),TypeError),i(\"ERR_INVALID_ARG_TYPE\",(function(t,e,r){var n,i,o,s;if(\"string\"==typeof e&&(i=\"not \",e.substr(!o||o<0?0:+o,i.length)===i)?(n=\"must not be\",e=e.replace(/^not /,\"\")):n=\"must be\",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t,\" argument\"))s=\"The \".concat(t,\" \").concat(n,\" \").concat(a(e,\"type\"));else{var l=function(t,e,r){return\"number\"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,\".\")?\"property\":\"argument\";s='The \"'.concat(t,'\" ').concat(l,\" \").concat(n,\" \").concat(a(e,\"type\"))}return s+=\". Received type \".concat(typeof r)}),TypeError),i(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\"),i(\"ERR_METHOD_NOT_IMPLEMENTED\",(function(t){return\"The \"+t+\" method is not implemented\"})),i(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\"),i(\"ERR_STREAM_DESTROYED\",(function(t){return\"Cannot call \"+t+\" after a stream was destroyed\"})),i(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\"),i(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\"),i(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\"),i(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError),i(\"ERR_UNKNOWN_ENCODING\",(function(t){return\"Unknown encoding: \"+t}),TypeError),i(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\"),e.exports.codes=n},{}],287:[function(t,e,r){(function(r){(function(){\"use strict\";var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=c;var i=t(\"./_stream_readable\"),a=t(\"./_stream_writable\");t(\"inherits\")(c,i);for(var o=n(a.prototype),s=0;s0)if(\"string\"==typeof e||o.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),n)o.endEmitted?w(t,new _):S(t,o,e,!0);else if(o.ended)w(t,new x);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?S(t,o,e,!1):P(t,o)):S(t,o,e,!1)}else n||(o.reading=!1,P(t,o));return!o.ended&&(o.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function L(t){var e=t._readableState;c(\"emitReadable\",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c(\"emitReadable\",e.flowing),e.emittedReadable=!0,r.nextTick(C,t))}function C(t){var e=t._readableState;c(\"emitReadable_\",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit(\"readable\"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,R(t)}function P(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(I,t,e))}function I(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount(\"data\")>0&&t.resume()}function z(t){c(\"readable nexttick read 0\"),t.read(0)}function D(t,e){c(\"resume\",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit(\"resume\"),R(t),e.flowing&&!e.reading&&t.read(0)}function R(t){var e=t._readableState;for(c(\"flow\",e.flowing);e.flowing&&null!==t.read(););}function F(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(\"\"):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function B(t){var e=t._readableState;c(\"endReadable\",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(N,e,t))}function N(t,e){if(c(\"endReadableNT\",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit(\"end\"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function j(t,e){for(var r=0,n=t.length;r=e.highWaterMark:e.length>0)||e.ended))return c(\"read: emitReadable\",e.length,e.ended),0===e.length&&e.ended?B(this):L(this),null;if(0===(t=E(t,e))&&e.ended)return 0===e.length&&B(this),null;var n,i=e.needReadable;return c(\"need readable\",i),(0===e.length||e.length-t0?F(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&B(this)),null!==n&&this.emit(\"data\",n),n},A.prototype._read=function(t){w(this,new b(\"_read()\"))},A.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c(\"pipe count=%d opts=%j\",i.pipesCount,e);var o=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?l:m;function s(e,r){c(\"onunpipe\"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c(\"cleanup\"),t.removeListener(\"close\",d),t.removeListener(\"finish\",g),t.removeListener(\"drain\",u),t.removeListener(\"error\",p),t.removeListener(\"unpipe\",s),n.removeListener(\"end\",l),n.removeListener(\"end\",m),n.removeListener(\"data\",h),f=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function l(){c(\"onend\"),t.end()}i.endEmitted?r.nextTick(o):n.once(\"end\",o),t.on(\"unpipe\",s);var u=function(t){return function(){var e=t._readableState;c(\"pipeOnDrain\",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,\"data\")&&(e.flowing=!0,R(t))}}(n);t.on(\"drain\",u);var f=!1;function h(e){c(\"ondata\");var r=t.write(e);c(\"dest.write\",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==j(i.pipes,t))&&!f&&(c(\"false write response, pause\",i.awaitDrain),i.awaitDrain++),n.pause())}function p(e){c(\"onerror\",e),m(),t.removeListener(\"error\",p),0===a(t,\"error\")&&w(t,e)}function d(){t.removeListener(\"finish\",g),m()}function g(){c(\"onfinish\"),t.removeListener(\"close\",d),m()}function m(){c(\"unpipe\"),n.unpipe(t)}return n.on(\"data\",h),function(t,e,r){if(\"function\"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,\"error\",p),t.once(\"close\",d),t.once(\"finish\",g),t.emit(\"pipe\",n),i.flowing||(c(\"pipe resume\"),n.resume()),t},A.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit(\"unpipe\",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a0,!1!==i.flowing&&this.resume()):\"readable\"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c(\"on readable\",i.length,i.reading),i.length?L(this):i.reading||r.nextTick(z,this))),n},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(t,e){var n=o.prototype.removeListener.call(this,t,e);return\"readable\"===t&&r.nextTick(O,this),n},A.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return\"readable\"!==t&&void 0!==t||r.nextTick(O,this),e},A.prototype.resume=function(){var t=this._readableState;return t.flowing||(c(\"resume\"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(D,t,e))}(this,t)),t.paused=!1,this},A.prototype.pause=function(){return c(\"call pause flowing=%j\",this._readableState.flowing),!1!==this._readableState.flowing&&(c(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this},A.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on(\"end\",(function(){if(c(\"wrapped end\"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on(\"data\",(function(i){(c(\"wrapped data\"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&\"function\"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var a=0;a-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(A.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(t,e,r){r(new g(\"_write()\"))},A.prototype._writev=null,A.prototype.end=function(t,e,n){var i=this._writableState;return\"function\"==typeof t?(n=t,t=null,e=null):\"function\"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,P(t,e),n&&(e.finished?r.nextTick(n):t.once(\"finish\",n));e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(A.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,\"destroyed\",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),A.prototype.destroy=f.destroy,A.prototype._undestroy=f.undestroy,A.prototype._destroy=function(t,e){e(t)}}).call(this)}).call(this,t(\"_process\"),\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"../errors\":286,\"./_stream_duplex\":287,\"./internal/streams/destroy\":294,\"./internal/streams/state\":298,\"./internal/streams/stream\":299,_process:277,buffer:85,inherits:231,\"util-deprecate\":330}],292:[function(t,e,r){(function(r){(function(){\"use strict\";var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var a=t(\"./end-of-stream\"),o=Symbol(\"lastResolve\"),s=Symbol(\"lastReject\"),l=Symbol(\"error\"),c=Symbol(\"ended\"),u=Symbol(\"lastPromise\"),f=Symbol(\"handlePromise\"),h=Symbol(\"stream\");function p(t,e){return{value:t,done:e}}function d(t){var e=t[o];if(null!==e){var r=t[h].read();null!==r&&(t[u]=null,t[o]=null,t[s]=null,e(p(r,!1)))}}function g(t){r.nextTick(d,t)}var m=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var t=this,e=this[l];if(null!==e)return Promise.reject(e);if(this[c])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise((function(e,n){r.nextTick((function(){t[l]?n(t[l]):e(p(void 0,!0))}))}));var n,i=this[u];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(p(void 0,!0)):e[f](r,n)}),n)}}(i,this));else{var a=this[h].read();if(null!==a)return Promise.resolve(p(a,!1));n=new Promise(this[f])}return this[u]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,\"return\",(function(){var t=this;return new Promise((function(e,r){t[h].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),n),m);e.exports=function(t){var e,r=Object.create(v,(i(e={},h,{value:t,writable:!0}),i(e,o,{value:null,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,l,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,f,{value:function(t,e){var n=r[h].read();n?(r[u]=null,r[o]=null,r[s]=null,t(p(n,!1))):(r[o]=t,r[s]=e)},writable:!0}),e));return r[u]=null,a(t,(function(t){if(t&&\"ERR_STREAM_PREMATURE_CLOSE\"!==t.code){var e=r[s];return null!==e&&(r[u]=null,r[o]=null,r[s]=null,e(t)),void(r[l]=t)}var n=r[o];null!==n&&(r[u]=null,r[o]=null,r[s]=null,n(p(void 0,!0))),r[c]=!0})),t.on(\"readable\",g.bind(null,r)),r}}).call(this)}).call(this,t(\"_process\"))},{\"./end-of-stream\":295,_process:277}],293:[function(t,e,r){\"use strict\";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){for(var r=0;r0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:\"unshift\",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:\"shift\",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:\"clear\",value:function(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function(t){if(0===this.length)return\"\";for(var e=this.head,r=\"\"+e.data;e=e.next;)r+=t+e.data;return r}},{key:\"concat\",value:function(t){if(0===this.length)return o.alloc(0);for(var e,r,n,i=o.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,r=i,n=s,o.prototype.copy.call(e,r,n),s+=a.data.length,a=a.next;return i}},{key:\"consume\",value:function(t,e){var r;return ti.length?i.length:t;if(a===i.length?n+=i:n+=i.slice(0,t),0==(t-=a)){a===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(a));break}++r}return this.length-=r,n}},{key:\"_getBuffer\",value:function(t){var e=o.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,a=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,a),0==(t-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,e}},{key:l,value:function(t,e){return s(this,function(t){for(var e=1;e0,(function(t){n||(n=t),t&&o.forEach(c),a||(o.forEach(c),i(n))}))}));return e.reduce(u)}},{\"../../../errors\":286,\"./end-of-stream\":295}],298:[function(t,e,r){\"use strict\";var n=t(\"../../../errors\").codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(t,e,r,i){var a=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new n(i?r:\"highWaterMark\",a);return Math.floor(a)}return t.objectMode?16:16384}}},{\"../../../errors\":286}],299:[function(t,e,r){e.exports=t(\"events\").EventEmitter},{events:84}],300:[function(t,e,r){\"use strict\";var n=t(\"safe-buffer\").Buffer,i=n.isEncoding||function(t){switch((t=\"\"+t)&&t.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return\"utf8\";for(var e;;)switch(t){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return t;default:if(e)return;t=(\"\"+t).toLowerCase(),e=!0}}(t);if(\"string\"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error(\"Unknown encoding: \"+t);return e||t}(t),this.encoding){case\"utf16le\":this.text=l,this.end=c,e=4;break;case\"utf8\":this.fillLast=s,e=4;break;case\"base64\":this.text=u,this.end=f,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,\"\\ufffd\";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,\"\\ufffd\";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,\"\\ufffd\"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){if((t.length-e)%2==0){var r=t.toString(\"utf16le\",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,r)}return e}function u(t,e){var r=(t.length-e)%3;return 0===r?t.toString(\"base64\",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):\"\"}r.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return\"\";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString(\"utf8\",e,n)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{\"safe-buffer\":284}],301:[function(t,e,r){(function(r,n){(function(){var r=t(\"assert\"),i=t(\"debug\")(\"stream-parser\");e.exports=function(t){var e=t&&\"function\"==typeof t._transform,r=t&&\"function\"==typeof t._write;if(!e&&!r)throw new Error(\"must pass a Writable or Transform stream in\");i(\"extending Parser into stream\"),t._bytes=o,t._skipBytes=s,e&&(t._passthrough=l);e?t._transform=u:t._write=c};function a(t){i(\"initializing parser stream\"),t._parserBytesLeft=0,t._parserBuffers=[],t._parserBuffered=0,t._parserState=-1,t._parserCallback=null,\"function\"==typeof t.push&&(t._parserOutput=t.push.bind(t)),t._parserInit=!0}function o(t,e){r(!this._parserCallback,'there is already a \"callback\" set!'),r(isFinite(t)&&t>0,'can only buffer a finite number of bytes > 0, got \"'+t+'\"'),this._parserInit||a(this),i(\"buffering %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=0}function s(t,e){r(!this._parserCallback,'there is already a \"callback\" set!'),r(t>0,'can only skip > 0 bytes, got \"'+t+'\"'),this._parserInit||a(this),i(\"skipping %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=1}function l(t,e){r(!this._parserCallback,'There is already a \"callback\" set!'),r(t>0,'can only pass through > 0 bytes, got \"'+t+'\"'),this._parserInit||a(this),i(\"passing through %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=2}function c(t,e,r){this._parserInit||a(this),i(\"write(%o bytes)\",t.length),\"function\"==typeof e&&(r=e),h(this,t,null,r)}function u(t,e,r){this._parserInit||a(this),i(\"transform(%o bytes)\",t.length),\"function\"!=typeof e&&(e=this._parserOutput),h(this,t,e,r)}function f(t,e,r,a){if(t._parserBytesLeft-=e.length,i(\"%o bytes left for stream piece\",t._parserBytesLeft),0===t._parserState?(t._parserBuffers.push(e),t._parserBuffered+=e.length):2===t._parserState&&r(e),0!==t._parserBytesLeft)return a;var o=t._parserCallback;if(o&&0===t._parserState&&t._parserBuffers.length>1&&(e=n.concat(t._parserBuffers,t._parserBuffered)),0!==t._parserState&&(e=null),t._parserCallback=null,t._parserBuffered=0,t._parserState=-1,t._parserBuffers.splice(0),o){var s=[];e&&s.push(e),r&&s.push(r);var l=o.length>s.length;l&&s.push(p(a));var c=o.apply(t,s);if(!l||a===c)return a}}var h=p((function t(e,r,n,i){return e._parserBytesLeft<=0?i(new Error(\"got data but not currently parsing anything\")):r.length<=e._parserBytesLeft?function(){return f(e,r,n,i)}:function(){var a=r.slice(0,e._parserBytesLeft);return f(e,a,n,(function(o){return o?i(o):r.length>a.length?function(){return t(e,r.slice(a.length),n,i)}:void 0}))}}));function p(t){return function(){for(var e=t.apply(this,arguments);\"function\"==typeof e;)e=e();return e}}}).call(this)}).call(this,t(\"_process\"),t(\"buffer\").Buffer)},{_process:277,assert:75,buffer:85,debug:302}],302:[function(t,e,r){(function(n){(function(){function i(){var t;try{t=r.storage.debug}catch(t){}return!t&&void 0!==n&&\"env\"in n&&(t=n.env.DEBUG),t}(r=e.exports=t(\"./debug\")).log=function(){return\"object\"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},r.formatArgs=function(t){var e=this.useColors;if(t[0]=(e?\"%c\":\"\")+this.namespace+(e?\" %c\":\" \")+t[0]+(e?\"%c \":\" \")+\"+\"+r.humanize(this.diff),!e)return;var n=\"color: \"+this.color;t.splice(1,0,n,\"color: inherit\");var i=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){\"%%\"!==t&&(i++,\"%c\"===t&&(a=i))})),t.splice(a,0,n)},r.save=function(t){try{null==t?r.storage.removeItem(\"debug\"):r.storage.debug=t}catch(t){}},r.load=i,r.useColors=function(){if(\"undefined\"!=typeof window&&window.process&&\"renderer\"===window.process.type)return!0;return\"undefined\"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||\"undefined\"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},r.storage=\"undefined\"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),r.colors=[\"lightseagreen\",\"forestgreen\",\"goldenrod\",\"dodgerblue\",\"darkorchid\",\"crimson\"],r.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return\"[UnexpectedJSONParseError]: \"+t.message}},r.enable(i())}).call(this)}).call(this,t(\"_process\"))},{\"./debug\":303,_process:277}],303:[function(t,e,r){var n;function i(t){function e(){if(e.enabled){var t=e,i=+new Date,a=i-(n||i);t.diff=a,t.prev=n,t.curr=i,n=i;for(var o=new Array(arguments.length),s=0;s0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var r=parseFloat(e[1]);switch((e[2]||\"ms\").toLowerCase()){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return 315576e5*r;case\"days\":case\"day\":case\"d\":return r*o;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return r*a;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return r*i;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return r*n;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return r;default:return}}(t);if(\"number\"===l&&!1===isNaN(t))return e.long?s(r=t,o,\"day\")||s(r,a,\"hour\")||s(r,i,\"minute\")||s(r,n,\"second\")||r+\" ms\":function(t){if(t>=o)return Math.round(t/o)+\"d\";if(t>=a)return Math.round(t/a)+\"h\";if(t>=i)return Math.round(t/i)+\"m\";if(t>=n)return Math.round(t/n)+\"s\";return t+\"ms\"}(t);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(t))}},{}],305:[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;s0;){e=c[c.length-1];var p=t[e];if(a[e]=0&&s[e].push(o[g])}a[e]=d}else{if(n[e]===r[e]){var m=[],v=[],y=0;for(d=l.length-1;d>=0;--d){var x=l[d];if(i[x]=!1,m.push(x),v.push(s[x]),y+=s[x].length,o[x]=f.length,x===e){l.length=d;break}}f.push(m);var b=new Array(y);for(d=0;d1&&(i=1),i<-1&&(i=-1),(t*n-e*r<0?-1:1)*Math.acos(i)};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,m=t.sweepFlag,v=void 0===m?0:m,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 T=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(f,2);T>1&&(u*=Math.sqrt(T),f*=Math.sqrt(T));var k=function(t,e,r,n,a,o,l,c,u,f,h,p){var d=Math.pow(a,2),g=Math.pow(o,2),m=Math.pow(h,2),v=Math.pow(p,2),y=d*g-d*v-g*m;y<0&&(y=0),y/=d*v+g*m;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,T=(h-x)/a,k=(p-b)/o,A=(-h-x)/a,M=(-p-b)/o,S=s(1,0,T,k),E=s(T,k,A,M);return 0===c&&E>0&&(E-=i),1===c&&E<0&&(E+=i),[_,w,S,E]}(e,r,l,c,u,f,g,v,x,b,_,w),A=n(k,4),M=A[0],S=A[1],E=A[2],L=A[3],C=Math.abs(L)/(i/4);Math.abs(1-C)<1e-7&&(C=1);var P=Math.max(Math.ceil(C),1);L/=P;for(var I=0;Ie[2]&&(e[2]=c[u+0]),c[u+1]>e[3]&&(e[3]=c[u+1]);return e}},{\"abs-svg-path\":70,assert:75,\"is-svg-path\":238,\"normalize-svg-path\":309,\"parse-svg-path\":250}],309:[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;d4?(o=m[m.length-4],s=m[m.length-3]):(o=h,s=p),r.push(m)}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\":307}],310:[function(t,e,r){\"use strict\";var n,i=t(\"svg-path-bounds\"),a=t(\"parse-svg-path\"),o=t(\"draw-svg-path\"),s=t(\"is-svg-path\"),l=t(\"bitmap-sdf\"),c=document.createElement(\"canvas\"),u=c.getContext(\"2d\");e.exports=function(t,e){if(!s(t))throw Error(\"Argument should be valid svg path string\");e||(e={});var r,f;e.shape?(r=e.shape[0],f=e.shape[1]):(r=c.width=e.w||e.width||200,f=c.height=e.h||e.height||200);var h=Math.min(r,f),p=e.stroke||0,d=e.viewbox||e.viewBox||i(t),g=[r/(d[2]-d[0]),f/(d[3]-d[1])],m=Math.min(g[0]||0,g[1]||0)/2;u.fillStyle=\"black\",u.fillRect(0,0,r,f),u.fillStyle=\"white\",p&&(\"number\"!=typeof p&&(p=1),u.strokeStyle=p>0?\"white\":\"black\",u.lineWidth=Math.abs(p));if(u.translate(.5*r,.5*f),u.scale(m,m),function(){if(null!=n)return n;var t=document.createElement(\"canvas\").getContext(\"2d\");if(t.canvas.width=t.canvas.height=1,!window.Path2D)return n=!1;var e=new Path2D(\"M0,0h1v1h-1v-1Z\");t.fillStyle=\"black\",t.fill(e);var r=t.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var v=new Path2D(t);u.fill(v),p&&u.stroke(v)}else{var y=a(t);o(u,y),u.fill(),p&&u.stroke()}return u.setTransform(1,0,0,1,0,0),l(u,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*h})}},{\"bitmap-sdf\":82,\"draw-svg-path\":126,\"is-svg-path\":238,\"parse-svg-path\":250,\"svg-path-bounds\":308}],311:[function(t,e,r){(function(e,n){(function(){var i=t(\"process/browser.js\").nextTick,a=Function.prototype.apply,o=Array.prototype.slice,s={},l=0;function c(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new c(a.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(a.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate=\"function\"==typeof e?e:function(t){var e=l++,n=!(arguments.length<2)&&o.call(arguments,1);return s[e]=!0,i((function(){s[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate=\"function\"==typeof n?n:function(t){delete s[t]}}).call(this)}).call(this,t(\"timers\").setImmediate,t(\"timers\").clearImmediate)},{\"process/browser.js\":277,timers:311}],312:[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:I(e[1]),g:I(e[2]),b:I(e[3]),a:R(e[4]),format:i?\"name\":\"hex8\"};if(e=j.hex6.exec(t))return{r:I(e[1]),g:I(e[2]),b:I(e[3]),format:i?\"name\":\"hex\"};if(e=j.hex4.exec(t))return{r:I(e[1]+\"\"+e[1]),g:I(e[2]+\"\"+e[2]),b:I(e[3]+\"\"+e[3]),a:R(e[4]+\"\"+e[4]),format:i?\"name\":\"hex8\"};if(e=j.hex3.exec(t))return{r:I(e[1]+\"\"+e[1]),g:I(e[2]+\"\"+e[2]),b:I(e[3]+\"\"+e[3]),format:i?\"name\":\"hex\"};return!1}(e));\"object\"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(p=e.r,d=e.g,g=e.b,i={r:255*C(p,255),g:255*C(d,255),b:255*C(g,255)},f=!0,h=\"%\"===String(e.r).substr(-1)?\"prgb\":\"rgb\"):U(e.h)&&U(e.s)&&U(e.v)?(l=z(e.s),c=z(e.v),i=function(e,r,n){e=6*C(e,360),r=C(r,100),n=C(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\"):U(e.h)&&U(e.s)&&U(e.l)&&(l=z(e.s),u=z(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=C(t,360),e=C(e,100),r=C(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=L(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=C(t,255),e=C(e,255),r=C(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>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(c(n));return a}function M(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=L(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=[O(a(t).toString(16)),O(a(e).toString(16)),O(a(r).toString(16)),O(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*C(this._r,255))+\"%\",g:a(100*C(this._g,255))+\"%\",b:a(100*C(this._b,255))+\"%\",a:this._a}},toPercentageRgbString:function(){return 1==this._a?\"rgb(\"+a(100*C(this._r,255))+\"%, \"+a(100*C(this._g,255))+\"%, \"+a(100*C(this._b,255))+\"%)\":\"rgba(\"+a(100*C(this._r,255))+\"%, \"+a(100*C(this._g,255))+\"%, \"+a(100*C(this._b,255))+\"%, \"+this._roundA+\")\"},toName:function(){return 0===this._a?\"transparent\":!(this._a<1)&&(E[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(v,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(m,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(M,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(T,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]:z(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;ul&&(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\"},E=c.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(S);function L(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function C(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 P(t){return o(1,s(0,t))}function I(t){return parseInt(t,16)}function O(t){return 1==t.length?\"0\"+t:\"\"+t}function z(t){return t<=1&&(t=100*t+\"%\"),t}function D(e){return t.round(255*parseFloat(e)).toString(16)}function R(t){return I(t)/255}var F,B,N,j=(B=\"[\\\\s|\\\\(]+(\"+(F=\"(?:[-\\\\+]?\\\\d*\\\\.\\\\d+%?)|(?:[-\\\\+]?\\\\d+%?)\")+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")\\\\s*\\\\)?\",N=\"[\\\\s|\\\\(]+(\"+F+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")\\\\s*\\\\)?\",{CSS_UNIT:new RegExp(F),rgb:new RegExp(\"rgb\"+B),rgba:new RegExp(\"rgba\"+N),hsl:new RegExp(\"hsl\"+B),hsla:new RegExp(\"hsla\"+N),hsv:new RegExp(\"hsv\"+B),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 U(t){return!!j.CSS_UNIT.exec(t)}void 0!==e&&e.exports?e.exports=c:window.tinycolor=c}(Math)},{}],313:[function(t,e,r){\"use strict\";e.exports=i,e.exports.float32=e.exports.float=i,e.exports.fract32=e.exports.fract=function(t,e){if(t.length){if(t instanceof Float32Array)return new Float32Array(t.length);e instanceof Float32Array||(e=i(t));for(var r=0,n=e.length;ro&&(o=t[0]),t[1]s&&(s=t[1])}function c(t){switch(t.type){case\"GeometryCollection\":t.geometries.forEach(c);break;case\"Point\":l(t.coordinates);break;case\"MultiPoint\":t.coordinates.forEach(l)}}for(e in t.arcs.forEach((function(t){for(var e,r=-1,l=t.length;++ro&&(o=e[0]),e[1]s&&(s=e[1])})),t.objects)c(t.objects[e]);return[i,a,o,s]}function i(t,e){var r=e.id,n=e.bbox,i=null==e.properties?{}:e.properties,o=a(t,e);return null==r&&null==n?{type:\"Feature\",properties:i,geometry:o}:null==n?{type:\"Feature\",id:r,properties:i,geometry:o}:{type:\"Feature\",id:r,bbox:n,properties:i,geometry:o}}function a(t,e){var n=r(t.transform),i=t.arcs;function a(t,e){e.length&&e.pop();for(var r=i[t<0?~t:t],a=0,o=r.length;a1)n=l(t,e,r);else for(i=0,n=new Array(a=t.arcs.length);i1)for(var a,s,c=1,u=l(i[0]);cu&&(s=i[0],i[0]=i[c],i[c]=s,u=a);return i})).filter((function(t){return t.length>0}))}}function u(t,e){for(var r=0,n=t.length;r>>1;t[i]=2))throw new Error(\"n must be \\u22652\");var r,i=(l=t.bbox||n(t))[0],a=l[1],o=l[2],s=l[3];e={scale:[o-i?(o-i)/(r-1):1,s-a?(s-a)/(r-1):1],translate:[i,a]}}var l,c,u=f(e),h=t.objects,p={};function d(t){return u(t)}function g(t){var e;switch(t.type){case\"GeometryCollection\":e={type:\"GeometryCollection\",geometries:t.geometries.map(g)};break;case\"Point\":e={type:\"Point\",coordinates:d(t.coordinates)};break;case\"MultiPoint\":e={type:\"MultiPoint\",coordinates:t.coordinates.map(d)};break;default:return t}return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),null!=t.properties&&(e.properties=t.properties),e}for(c in h)p[c]=g(h[c]);return{type:\"Topology\",bbox:l,transform:e,objects:p,arcs:t.arcs.map((function(t){var e,r=0,n=1,i=t.length,a=new Array(i);for(a[0]=u(t[0],0);++r\":(e.length>100&&(e=e.slice(0,99)+\"\\u2026\"),e=e.replace(i,(function(t){switch(t){case\"\\n\":return\"\\\\n\";case\"\\r\":return\"\\\\r\";case\"\\u2028\":return\"\\\\u2028\";case\"\\u2029\":return\"\\\\u2029\";default:throw new Error(\"Unexpected character\")}})))}},{\"./safe-to-string\":318}],320:[function(t,e,r){\"use strict\";var n=t(\"../value/is\"),i={object:!0,function:!0,undefined:!0};e.exports=function(t){return!!n(t)&&hasOwnProperty.call(i,typeof t)}},{\"../value/is\":326}],321:[function(t,e,r){\"use strict\";var n=t(\"../lib/resolve-exception\"),i=t(\"./is\");e.exports=function(t){return i(t)?t:n(t,\"%v is not a plain function\",arguments[1])}},{\"../lib/resolve-exception\":317,\"./is\":322}],322:[function(t,e,r){\"use strict\";var n=t(\"../function/is\"),i=/^\\s*class[\\s{/}]/,a=Function.prototype.toString;e.exports=function(t){return!!n(t)&&!i.test(a.call(t))}},{\"../function/is\":316}],323:[function(t,e,r){\"use strict\";var n=t(\"../object/is\");e.exports=function(t){if(!n(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(t){return!1}}},{\"../object/is\":320}],324:[function(t,e,r){\"use strict\";var n=t(\"../value/is\"),i=t(\"../object/is\"),a=Object.prototype.toString;e.exports=function(t){if(!n(t))return null;if(i(t)){var e=t.toString;if(\"function\"!=typeof e)return null;if(e===a)return null}try{return\"\"+t}catch(t){return null}}},{\"../object/is\":320,\"../value/is\":326}],325:[function(t,e,r){\"use strict\";var n=t(\"../lib/resolve-exception\"),i=t(\"./is\");e.exports=function(t){return i(t)?t:n(t,\"Cannot use %v\",arguments[1])}},{\"../lib/resolve-exception\":317,\"./is\":326}],326:[function(t,e,r){\"use strict\";e.exports=function(t){return null!=t}},{}],327:[function(t,e,r){(function(e){(function(){\"use strict\";var n=t(\"bit-twiddle\"),i=t(\"dup\"),a=t(\"buffer\").Buffer;e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var o=\"undefined\"!=typeof Uint8ClampedArray,s=\"undefined\"!=typeof BigUint64Array,l=\"undefined\"!=typeof BigInt64Array,c=e.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=i([32,0])),c.BIGUINT64||(c.BIGUINT64=i([32,0])),c.BIGINT64||(c.BIGINT64=i([32,0])),c.BUFFER||(c.BUFFER=i([32,0]));var u=c.DATA,f=c.BUFFER;function h(t){if(t){var e=t.length||t.byteLength,r=n.log2(e);u[r].push(t)}}function p(t){t=n.nextPow2(t);var e=n.log2(t),r=u[e];return r.length>0?r.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function g(t){return new Uint16Array(p(2*t),0,t)}function m(t){return new Uint32Array(p(4*t),0,t)}function v(t){return new Int8Array(p(t),0,t)}function y(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function T(t){return s?new BigUint64Array(p(8*t),0,t):null}function k(t){return l?new BigInt64Array(p(8*t),0,t):null}function A(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=f[e];return r.length>0?r.pop():new a(t)}r.free=function(t){if(a.isBuffer(t))f[n.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|n.log2(e);u[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeBigUint64=r.freeInt8=r.freeInt16=r.freeInt32=r.freeBigInt64=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){h(t.buffer)},r.freeArrayBuffer=h,r.freeBuffer=function(t){f[n.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||\"arraybuffer\"===e)return p(t);switch(e){case\"uint8\":return d(t);case\"uint16\":return g(t);case\"uint32\":return m(t);case\"int8\":return v(t);case\"int16\":return y(t);case\"int32\":return x(t);case\"float\":case\"float32\":return b(t);case\"double\":case\"float64\":return _(t);case\"uint8_clamped\":return w(t);case\"bigint64\":return k(t);case\"biguint64\":return T(t);case\"buffer\":return M(t);case\"data\":case\"dataview\":return A(t);default:return null}return null},r.mallocArrayBuffer=p,r.mallocUint8=d,r.mallocUint16=g,r.mallocUint32=m,r.mallocInt8=v,r.mallocInt16=y,r.mallocInt32=x,r.mallocFloat32=r.mallocFloat=b,r.mallocFloat64=r.mallocDouble=_,r.mallocUint8Clamped=w,r.mallocBigUint64=T,r.mallocBigInt64=k,r.mallocDataView=A,r.mallocBuffer=M,r.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,u[t].length=0,f[t].length=0}}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"bit-twiddle\":81,buffer:85,dup:128}],328:[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):\"\"}},{}],329:[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;n2111)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>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;if(!(\"number\"==typeof t&&t>=1888&&t<=2111))throw new Error(\"Lunar year outside range 1888-2111\");if(!(\"number\"==typeof e&&e>=1&&e<=12))throw new Error(\"Lunar month outside range 1 - 12\");if(!(\"number\"==typeof r&&r>=1&&r<=30))throw new Error(\"Lunar day outside range 1 - 30\");\"object\"==typeof n?(l=!1,a=n):(l=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:l}}s=o.day-1;var c,u=f[o.year-f[0]],p=u>>13;c=p&&(o.month>p||o.isIntercalary)?o.month:o.month-1;for(var d=0;d>9&4095,(g>>5&15)-1,(31&g)+s);return a.year=m.getFullYear(),a.month=1+m.getMonth(),a.day=m.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{if(!(\"number\"==typeof t&&t>=1888&&t<=2111))throw new Error(\"Solar year outside range 1888-2111\");if(!(\"number\"==typeof e&&e>=1&&e<=12))throw new Error(\"Solar month outside range 1 - 12\");if(!(\"number\"==typeof r&&r>=1&&r<=31))throw new Error(\"Solar day outside range 1 - 31\");i={year:t,month:e,day:r},a=n||{}}var o=h[i.year-h[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=h[a.year-h[0]];var l,c=new Date(o>>9&4095,(o>>5&15)-1,31&o),u=new Date(i.year,i.month-1,i.day);l=Math.round((u-c)/864e5);var p,d=f[a.year-f[0]];for(p=0;p<13;p++){var g=d&1<<12-p?30:29;if(l>13;!m||p=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\":346,\"object-assign\":247}],335:[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\":346,\"object-assign\":247}],336:[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)||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=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=tthis.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\":346,\"object-assign\":247}],337:[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\":346,\"object-assign\":247}],338:[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\":346,\"object-assign\":247}],339:[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;r19||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\":346,\"object-assign\":247}],340:[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=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\":346,\"object-assign\":247}],341:[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(),void 0===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),void 0===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;r0?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\":346,\"object-assign\":247}],343:[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\":346,\"object-assign\":247}],344:[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\":346,\"object-assign\":247}],345:[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;ar)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;ne);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\":346,\"object-assign\":247}],346:[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(;oe-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.minDay&&r-this.minDay13.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\":247}],347:[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+n1}),d=function(t,e,r,n){var i=\"\"+e;if(p(t,n))for(;i.length1},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-1){p=1,d=g;for(var E=this.daysInMonth(h,p);d>E;E=this.daysInMonth(h,p))p++,d-=E}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\":346,\"object-assign\":247}],348:[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}]},{}],349:[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;t(\"../../constants/axis_placeable_objects\");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\"}}})},{\"../../constants/axis_placeable_objects\":472,\"../../plot_api/plot_template\":543,\"../../plots/cartesian/constants\":561,\"../../plots/font_attributes\":585,\"./arrow_paths\":348}],350:[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),a=i.getRefType(e.xref),o=i.getRefType(e.yref);e._extremes={},\"range\"===a&&s(e,r),\"range\"===o&&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,m=3*t.startarrowsize*t.arrowwidth||0,v=m+h,y=m-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,v),ppadminus:Math.max(f,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else v=s?v+s:v,y=s?y-s:y,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(u,d,v),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\":503,\"../../plots/cartesian/axes\":554,\"./draw\":355}],351:[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;r0||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;r2/3?\"right\":\"center\"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var W=!1,X=[\"x\",\"y\"],Z=0;Z1)&&(nt===rt?((pt=it.r2fraction(e[\"a\"+et]))<0||pt>1)&&(W=!0):W=!0),J=it._offset+it.r2p(e[et]),$=.5}else{var dt=\"domain\"===ht;\"x\"===et?(Q=e[et],J=dt?it._offset+it._length*Q:J=T.l+T.w*Q):(Q=1-e[et],J=dt?it._offset+it._length*Q:J=T.t+T.h*Q),$=e.showarrow?.5:Q}if(e.showarrow){ft.head=J;var gt=e[\"a\"+et];if(tt=ot*q(.5,e.xanchor)-st*q(.5,e.yanchor),nt===rt){var mt=l.getRefType(nt);\"domain\"===mt?(\"y\"===et&&(gt=1-gt),ft.tail=it._offset+it._length*gt):\"paper\"===mt?\"y\"===et?(gt=1-gt,ft.tail=T.t+T.h*gt):ft.tail=T.l+T.w*gt:ft.tail=it._offset+it.r2p(gt),K=tt}else ft.tail=J+gt,K=tt+gt;ft.text=ft.tail+tt;var vt=w[\"x\"===et?\"width\":\"height\"];if(\"paper\"===rt&&(ft.head=o.constrain(ft.head,1,vt-1)),\"pixel\"===nt){var yt=-Math.max(ft.tail-3,ft.text),xt=Math.min(ft.tail+3,ft.text)-vt;yt>0?(ft.tail+=yt,ft.text+=yt):xt>0&&(ft.tail-=xt,ft.text-=xt)}ft.tail+=ut,ft.head+=ut}else K=tt=lt*q($,ct),ft.text=J+tt;ft.text+=ut,tt+=ut,K+=ut,e[\"_\"+et+\"padplus\"]=lt/2+K,e[\"_\"+et+\"padminus\"]=lt/2-K,e[\"_\"+et+\"size\"]=lt,e[\"_\"+et+\"shift\"]=tt}if(W)R.remove();else{var bt=0,_t=0;if(\"left\"!==e.align&&(bt=(A-b)*(\"center\"===e.align?.5:1)),\"top\"!==e.valign&&(_t=(D-_)*(\"middle\"===e.valign?.5:1)),f)n.select(\"svg\").attr({x:N+bt-1,y:N+_t}).call(u.setClipUrl,U?L:null,t);else{var wt=N+_t-g.top,Tt=N+bt-g.left;G.call(h.positionText,Tt,wt).call(u.setClipUrl,U?L:null,t)}V.select(\"rect\").call(u.setRect,N,N,A,D),j.call(u.setRect,F/2,F/2,B-F,H-F),R.call(u.setTranslate,Math.round(C.x.text-B/2),Math.round(C.y.text-H/2)),O.attr({transform:\"rotate(\"+P+\",\"+C.x.text+\",\"+C.y.text+\")\"});var kt,At=function(r,n){I.selectAll(\".annotation-arrow-g\").remove();var l=C.x.head,f=C.y.head,h=C.x.tail+r,p=C.y.tail+n,g=C.x.text+r,b=C.y.text+n,_=o.rotationXYMatrix(P,g,b),w=o.apply2DTransform(_),A=o.apply2DTransform2(_),L=+j.attr(\"width\"),z=+j.attr(\"height\"),D=g-.5*L,F=D+L,B=b-.5*z,N=B+z,U=[[D,B,D,N],[D,N,F,N],[F,N,F,B],[F,B,D,B]].map(A);if(!U.reduce((function(t,e){return t^!!o.segmentsIntersect(l,f,l+1e6,f+1e6,e[0],e[1],e[2],e[3])}),!1)){U.forEach((function(t){var e=o.segmentsIntersect(h,p,l,f,t[0],t[1],t[2],t[3]);e&&(h=e.x,p=e.y)}));var V=e.arrowwidth,H=e.arrowcolor,q=e.arrowside,G=I.append(\"g\").style({opacity:c.opacity(H)}).classed(\"annotation-arrow-g\",!0),Y=G.append(\"path\").attr(\"d\",\"M\"+h+\",\"+p+\"L\"+l+\",\"+f).style(\"stroke-width\",V+\"px\").call(c.stroke,c.rgb(H));if(m(Y,q,e),k.annotationPosition&&Y.node().parentNode&&!a){var W=l,X=f;if(e.standoff){var Z=Math.sqrt(Math.pow(l-h,2)+Math.pow(f-p,2));W+=e.standoff*(h-l)/Z,X+=e.standoff*(p-f)/Z}var J,K,Q=G.append(\"path\").classed(\"annotation-arrow\",!0).classed(\"anndrag\",!0).classed(\"cursor-move\",!0).attr({d:\"M3,3H-3V-3H3ZM0,0L\"+(h-W)+\",\"+(p-X),transform:s(W,X)}).style(\"stroke-width\",V+6+\"px\").call(c.stroke,\"rgba(0,0,0,0)\").call(c.fill,\"rgba(0,0,0,0)\");d.init({element:Q.node(),gd:t,prepFn:function(){var t=u.getTranslate(R);J=t.x,K=t.y,v&&v.autorange&&M(v._name+\".autorange\",!0),x&&x.autorange&&M(x._name+\".autorange\",!0)},moveFn:function(t,r){var n=w(J,K),i=n[0]+t,a=n[1]+r;R.call(u.setTranslate,i,a),S(\"x\",y(v,t,\"x\",T,e)),S(\"y\",y(x,r,\"y\",T,e)),e.axref===e.xref&&S(\"ax\",y(v,t,\"ax\",T,e)),e.ayref===e.yref&&S(\"ay\",y(x,r,\"ay\",T,e)),G.attr(\"transform\",s(t,r)),O.attr({transform:\"rotate(\"+P+\",\"+i+\",\"+a+\")\"})},doneFn:function(){i.call(\"_guiRelayout\",t,E());var e=document.querySelector(\".js-notes-box-panel\");e&&e.redraw(e.selectedObj)}})}}};if(e.showarrow&&At(0,0),z)d.init({element:R.node(),gd:t,prepFn:function(){kt=O.attr(\"transform\")},moveFn:function(t,r){var n=\"pointer\";if(e.showarrow)e.axref===e.xref?S(\"ax\",y(v,t,\"ax\",T,e)):S(\"ax\",e.ax+t),e.ayref===e.yref?S(\"ay\",y(x,r,\"ay\",T.w,e)):S(\"ay\",e.ay+r),At(t,r);else{if(a)return;var i,o;if(v)i=y(v,t,\"x\",T,e);else{var l=e._xsize/T.w,c=e.x+(e._xshift-e.xshift)/T.w-l/2;i=d.align(c+t/T.w,l,0,1,e.xanchor)}if(x)o=y(x,r,\"y\",T,e);else{var u=e._ysize/T.h,f=e.y-(e._yshift+e.yshift)/T.h-u/2;o=d.align(f-r/T.h,u,0,1,e.yanchor)}S(\"x\",i),S(\"y\",o),v&&x||(n=d.getCursor(v?.5:i,x?.5:o,e.xanchor,e.yanchor))}O.attr({transform:s(t,r)+kt}),p(R,n)},clickFn:function(r,n){e.captureevents&&t.emit(\"plotly_clickannotation\",Y(n))},doneFn:function(){p(R),i.call(\"_guiRelayout\",t,E());var e=document.querySelector(\".js-notes-box-panel\");e&&e.redraw(e.selectedObj)}})}}}e.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(\".annotation\").remove();for(var r=0;r=0,x=e.indexOf(\"end\")>=0,b=d.backoff*m+r.standoff,_=g.backoff*v+r.startstandoff;if(\"line\"===p.nodeName){o={x:+t.attr(\"x1\"),y:+t.attr(\"y1\")},u={x:+t.attr(\"x2\"),y:+t.attr(\"y2\")};var w=o.x-u.x,T=o.y-u.y;if(h=(f=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T))return void z();if(b){if(b*b>w*w+T*T)return void z();var k=b*Math.cos(f),A=b*Math.sin(f);u.x+=k,u.y+=A,t.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+T*T)return void z();var M=_*Math.cos(f),S=_*Math.sin(f);o.x-=M,o.y-=S,t.attr({x1:o.x,y1:o.y})}}else if(\"path\"===p.nodeName){var E=p.getTotalLength(),L=\"\";if(E1){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\":607,\"../annotations/draw\":355}],362:[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=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+\")\"}o.tinyRGB=function(t){var e=t.toRgb();return\"rgb(\"+Math.round(e.r)+\", \"+Math.round(e.g)+\", \"+Math.round(e.b)+\")\"},o.rgb=function(t){return o.tinyRGB(n(t))},o.opacity=function(t){return t?n(t).getAlpha():0},o.addOpacity=function(t,e){var r=n(t).toRgb();return\"rgba(\"+Math.round(r.r)+\", \"+Math.round(r.g)+\", \"+Math.round(r.b)+\", \"+e+\")\"},o.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||c).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()},o.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(o.combine(t,c))),(i.isDark()?e?i.lighten(e):c:r?i.darken(r):l).toString()},o.stroke=function(t,e){var r=n(e);t.style({stroke:o.tinyRGB(r),\"stroke-opacity\":r.getAlpha()})},o.fill=function(t,e){var r=n(e);t.style({fill:o.tinyRGB(r),\"fill-opacity\":r.getAlpha()})},o.clean=function(t){if(t&&\"object\"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e0?n>=l:n<=l));i++)n>u&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var ct=Math.pow(10,Math.floor(Math.log(lt)/Math.LN10));ot*=ct*c.roundUp(lt/ct,[2,5,10]),(Math.abs(q.start)/q.size+1e-6)%1<2e-6&&(it.tick0=0)}it.dtick=ot}it.domain=o?[rt+I/R.h,rt+K-I/R.h]:[rt+P/R.w,rt+K-P/R.w],it.setScale(),t.attr(\"transform\",u(Math.round(R.l),Math.round(R.t)));var ut,ft=t.select(\".\"+A.cbtitleunshift).attr(\"transform\",u(-Math.round(R.l),-Math.round(R.t))),ht=it.ticklabelposition,pt=it.title.font.size,dt=t.select(\".\"+A.cbaxis),gt=0,mt=0;function vt(n,i){var a={propContainer:it,propName:e._propPrefix+\"title\",traceIndex:e._traceIndex,_meta:e._meta,placeholder:D._dfltTitle.colorbar,containerGroup:t.select(\".\"+A.cbtitle)},o=\"h\"===n.charAt(0)?n.substr(1):\"h\"+n;t.selectAll(\".\"+o+\",.\"+o+\"-math-group\").remove(),g.draw(r,n,f(a,i||{}))}return c.syncOrAsync([a.previousPromises,function(){var t,e;(o&&at||!o&&!at)&&(\"top\"===j&&(t=P+R.l+R.w*O,e=I+R.t+R.h*(1-rt-K)+3+.75*pt),\"bottom\"===j&&(t=P+R.l+R.w*O,e=I+R.t+R.h*(1-rt)-3-.25*pt),\"right\"===j&&(e=I+R.t+R.h*z+3+.75*pt,t=P+R.l+R.w*rt),vt(it._id+\"title\",{attributes:{x:t,y:e,\"text-anchor\":o?\"start\":\"middle\"}}))},function(){if(!o&&!at||o&&at){var a,l=t.select(\".\"+A.cbtitle),f=l.select(\"text\"),h=[-M/2,M/2],d=l.select(\".h\"+it._id+\"title-math-group\").node(),g=15.6;if(f.node()&&(g=parseInt(f.node().style.fontSize,10)*w),d?(a=p.bBox(d),mt=a.width,(gt=a.height)>g&&(h[1]-=(gt-g)/2)):f.node()&&!f.classed(A.jsPlaceholder)&&(a=p.bBox(f.node()),mt=a.width,gt=a.height),o){if(gt){if(gt+=5,\"top\"===j)it.domain[1]-=gt/R.h,h[1]*=-1;else{it.domain[0]+=gt/R.h;var v=m.lineCount(f);h[1]+=(1-v)*g}l.attr(\"transform\",u(h[0],h[1])),it.setScale()}}else mt&&(\"right\"===j&&(it.domain[0]+=(mt+pt/2)/R.w),l.attr(\"transform\",u(h[0],h[1])),it.setScale())}t.selectAll(\".\"+A.cbfills+\",.\"+A.cblines).attr(\"transform\",o?u(0,Math.round(R.h*(1-it.domain[1]))):u(Math.round(R.w*it.domain[0]),0)),dt.attr(\"transform\",o?u(0,Math.round(-R.t)):u(Math.round(-R.l),0));var y=t.select(\".\"+A.cbfills).selectAll(\"rect.\"+A.cbfill).attr(\"style\",\"\").data(Y);y.enter().append(\"rect\").classed(A.cbfill,!0).style(\"stroke\",\"none\"),y.exit().remove();var x=U.map(it.c2p).map(Math.round).sort((function(t,e){return t-e}));y.each((function(t,a){var s=[0===a?U[0]:(Y[a]+Y[a-1])/2,a===Y.length-1?U[1]:(Y[a]+Y[a+1])/2].map(it.c2p).map(Math.round);o&&(s[1]=c.constrain(s[1]+(s[1]>s[0])?1:-1,x[0],x[1]));var l=n.select(this).attr(o?\"x\":\"y\",Q).attr(o?\"y\":\"x\",n.min(s)).attr(o?\"width\":\"height\",Math.max(X,2)).attr(o?\"height\":\"width\",Math.max(n.max(s)-n.min(s),2));if(e._fillgradient)p.gradient(l,r,e._id,o?\"vertical\":\"horizontalreversed\",e._fillgradient,\"fill\");else{var u=H(t).replace(\"e-\",\"\");l.attr(\"fill\",i(u).toHexString())}}));var b=t.select(\".\"+A.cblines).selectAll(\"path.\"+A.cbline).data(B.color&&B.width?W:[]);b.enter().append(\"path\").classed(A.cbline,!0),b.exit().remove(),b.each((function(t){var e=Q,r=Math.round(it.c2p(t))+B.width/2%1;n.select(this).attr(\"d\",\"M\"+(o?e+\",\"+r:r+\",\"+e)+(o?\"h\":\"v\")+X).call(p.lineGroupStyle,B.width,V(t),B.dash)})),dt.selectAll(\"g.\"+it._id+\"tick,path\").remove();var _=Q+X+(M||0)/2-(\"outside\"===e.ticks?1:0),T=s.calcTicks(it),k=s.getTickSigns(it)[2];return s.drawTicks(r,it,{vals:\"inside\"===it.ticks?s.clipEnds(it,T):T,layer:dt,path:s.makeTickPath(it,_,k),transFn:s.makeTransTickFn(it)}),s.drawLabels(r,it,{vals:T,layer:dt,transFn:s.makeTransTickLabelFn(it),labelFns:s.makeLabelFns(it,_)})},function(){if(o&&!at||!o&&at){var t,i,a=it.position||0,s=it._offset+it._length/2;if(\"right\"===j)i=s,t=R.l+R.w*a+10+pt*(it.showticklabels?1:.5);else if(t=s,\"bottom\"===j&&(i=R.t+R.h*a+10+(-1===ht.indexOf(\"inside\")?it.tickfont.size:0)+(\"intside\"!==it.ticks&&e.ticklen||0)),\"top\"===j){var l=N.text.split(\"
\").length;i=R.t+R.h*a+10-X-w*pt*l}vt((o?\"h\":\"v\")+it._id+\"title\",{avoid:{selection:n.select(r).selectAll(\"g.\"+it._id+\"tick\"),side:j,offsetTop:o?0:R.t,offsetLeft:o?R.l:0,maxShift:o?D.width:D.height},attributes:{x:t,y:i,\"text-anchor\":\"middle\"},transform:{rotate:o?-90:0,offset:0}})}},a.previousPromises,function(){var n,s=X+M/2;-1===ht.indexOf(\"inside\")&&(n=p.bBox(dt.node()),s+=o?n.width:n.height),ut=ft.select(\"text\");var c=0,f=o&&\"top\"===j,g=!o&&\"right\"===j,m=0;if(ut.node()&&!ut.classed(A.jsPlaceholder)){var y,x=ft.select(\".h\"+it._id+\"title-math-group\").node();x&&(o&&at||!o&&!at)?(c=(n=p.bBox(x)).width,y=n.height):(c=(n=p.bBox(ft.node())).right-R.l-(o?Q:nt),y=n.bottom-R.t-(o?nt:Q),o||\"top\"!==j||(s+=n.height,m=n.height)),g&&(ut.attr(\"transform\",u(c/2+pt/2,0)),c*=2),s=Math.max(s,o?c:y)}var b=2*(o?P:I)+s+S+M/2,w=0;!o&&N.text&&\"bottom\"===C&&z<=0&&(b+=w=b/2,m+=w),D._hColorbarMoveTitle=w,D._hColorbarMoveCBTitle=m;var F=S+M;t.select(\".\"+A.cbbg).attr(\"x\",(o?Q:nt)-F/2-(o?P:0)).attr(\"y\",(o?nt:Q)-(o?J:I+m-w)).attr(o?\"width\":\"height\",Math.max(b-w,2)).attr(o?\"height\":\"width\",Math.max(J+F,2)).call(d.fill,E).call(d.stroke,e.bordercolor).style(\"stroke-width\",S);var B=g?Math.max(c-10,0):0;if(t.selectAll(\".\"+A.cboutline).attr(\"x\",(o?Q:nt+P)+B).attr(\"y\",(o?nt+I-J:Q)+(f?gt:0)).attr(o?\"width\":\"height\",Math.max(X,2)).attr(o?\"height\":\"width\",Math.max(J-(o?2*I+gt:2*P+B),2)).call(d.stroke,e.outlinecolor).style({fill:\"none\",\"stroke-width\":M}),t.attr(\"transform\",u(R.l-(o?$*b:0),R.t-(o?0:(1-tt)*b-m))),!o&&(S||i(E).getAlpha()&&!i.equals(D.paper_bgcolor,E))){var U=dt.selectAll(\"text\"),V=U[0].length,H=t.select(\".\"+A.cbbg).node(),q=p.bBox(H),G=p.getTranslate(t);U.each((function(t,e){var r=V-1;if(0===e||e===r){var n,i=p.bBox(this),a=p.getTranslate(this);if(e===r){var o=i.right+a.x;(n=q.right+G.x+nt-S-2+O-o)>0&&(n=0)}else if(0===e){var s=i.left+a.x;(n=q.left+G.x+nt+S+2-s)<0&&(n=0)}n&&(V<3?this.setAttribute(\"transform\",\"translate(\"+n+\",0) \"+this.getAttribute(\"transform\")):this.setAttribute(\"visibility\",\"hidden\"))}}))}var Y={},W=T[L],Z=k[L],K=T[C],et=k[C],rt=b-X;o?(\"pixels\"===h?(Y.y=z,Y.t=J*K,Y.b=J*et):(Y.t=Y.b=0,Y.yt=z+l*K,Y.yb=z-l*et),\"pixels\"===_?(Y.x=O,Y.l=b*W,Y.r=b*Z):(Y.l=rt*W,Y.r=rt*Z,Y.xl=O-v*W,Y.xr=O+v*Z)):(\"pixels\"===h?(Y.x=O,Y.l=J*W,Y.r=J*Z):(Y.l=Y.r=0,Y.xl=O+l*W,Y.xr=O-l*Z),\"pixels\"===_?(Y.y=1-z,Y.t=b*K,Y.b=b*et):(Y.t=rt*K,Y.b=rt*et,Y.yt=z-v*K,Y.yb=z+v*et)),a.autoMargin(r,e._id,Y)}],r)}(r,e,t);v&&v.then&&(t._promises||[]).push(v),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,a,s=\"v\"===e.orientation,c=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr(\"transform\"),h(t)},moveFn:function(r,o){t.attr(\"transform\",n+u(r,o)),i=l.align((s?e._uFrac:e._vFrac)+r/c.w,s?e._thickFrac:e._lenFrac,0,1,e.xanchor),a=l.align((s?e._vFrac:1-e._uFrac)-o/c.h,s?e._lenFrac:e._thickFrac,0,1,e.yanchor);var f=l.getCursor(i,a,e.xanchor,e.yanchor);h(t,f)},doneFn:function(){if(h(t),void 0!==i&&void 0!==a){var n={};n[e._propPrefix+\"x\"]=i,n[e._propPrefix+\"y\"]=a,void 0!==e._traceIndex?o.call(\"_guiRestyle\",r,n,e._traceIndex):o.call(\"_guiRelayout\",r,n)}}})}(r,e,t)})),e.exit().each((function(e){a.autoMargin(t,e._id)})).remove(),e.order()}}},{\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/extend\":493,\"../../lib/setcursor\":524,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../plots/cartesian/axis_defaults\":556,\"../../plots/cartesian/layout_attributes\":569,\"../../plots/cartesian/position_defaults\":572,\"../../plots/plots\":619,\"../../registry\":638,\"../color\":366,\"../colorscale/helpers\":377,\"../dragelement\":385,\"../drawing\":388,\"../titles\":464,\"./constants\":368,\"@plotly/d3\":58,tinycolor2:312}],371:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t){return n.isPlainObject(t.colorbar)}},{\"../../lib\":503}],372:[function(t,e,r){\"use strict\";e.exports={moduleType:\"component\",name:\"colorbar\",attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),draw:t(\"./draw\").draw,hasColorbar:t(\"./has_colorbar\")}},{\"./attributes\":367,\"./defaults\":369,\"./draw\":370,\"./has_colorbar\":371}],373:[function(t,e,r){\"use strict\";var n=t(\"../colorbar/attributes\"),i=t(\"../../lib/regex\").counter,a=t(\"../../lib/sort_object_keys\"),o=t(\"./scales.js\").scales;a(o);function s(t){return\"`\"+t+\"`\"}e.exports=function(t,e){t=t||\"\";var r,a=(e=e||{}).cLetter||\"c\",l=(\"onlyIfNumerical\"in e?e.onlyIfNumerical:Boolean(t),\"noScale\"in e?e.noScale:\"marker.line\"===t),c=\"showScaleDflt\"in e?e.showScaleDflt:\"z\"===a,u=\"string\"==typeof e.colorscaleDflt?o[e.colorscaleDflt]:null,f=e.editTypeOverride||\"\",h=t?t+\".\":\"\";\"colorAttr\"in e?(r=e.colorAttr,e.colorAttr):s(h+(r={z:\"z\",c:\"color\"}[a]));var p=a+\"auto\",d=a+\"min\",g=a+\"max\",m=a+\"mid\",v=(s(h+p),s(h+d),s(h+g),{});v[d]=v[g]=void 0;var y={};y[p]=!1;var x={};return\"color\"===r&&(x.color={valType:\"color\",arrayOk:!0,editType:f||\"style\"},e.anim&&(x.color.anim=!0)),x[p]={valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:v},x[d]={valType:\"number\",dflt:null,editType:f||\"plot\",impliedEdits:y},x[g]={valType:\"number\",dflt:null,editType:f||\"plot\",impliedEdits:y},x[m]={valType:\"number\",dflt:null,editType:\"calc\",impliedEdits:v},x.colorscale={valType:\"colorscale\",editType:\"calc\",dflt:u,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:\"boolean\",dflt:!1!==e.autoColorDflt,editType:\"calc\",impliedEdits:{colorscale:void 0}},x.reversescale={valType:\"boolean\",dflt:!1,editType:\"plot\"},l||(x.showscale={valType:\"boolean\",dflt:c,editType:\"calc\"},x.colorbar=n),e.noColorAxis||(x.coloraxis={valType:\"subplotid\",regex:i(\"coloraxis\"),dflt:null,editType:\"calc\"}),x}},{\"../../lib/regex\":520,\"../../lib/sort_object_keys\":526,\"../colorbar/attributes\":367,\"./scales.js\":381}],374:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"./helpers\").extractOpts;e.exports=function(t,e,r){var o,s=t._fullLayout,l=r.vals,c=r.containerStr,u=c?i.nestedProperty(e,c).get():e,f=a(u),h=!1!==f.auto,p=f.min,d=f.max,g=f.mid,m=function(){return i.aggNums(Math.min,null,l)},v=function(){return i.aggNums(Math.max,null,l)};(void 0===p?p=m():h&&(p=u._colorAx&&n(p)?Math.min(p,m()):m()),void 0===d?d=v():h&&(d=u._colorAx&&n(d)?Math.max(d,v()):v()),h&&void 0!==g&&(d-g>g-p?p=g-(d-g):d-g=0?s.colorscale.sequential:s.colorscale.sequentialminus,f._sync(\"colorscale\",o))}},{\"../../lib\":503,\"./helpers\":377,\"fast-isnumeric\":190}],375:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./helpers\").hasColorscale,a=t(\"./helpers\").extractOpts;e.exports=function(t,e){function r(t,e){var r=t[\"_\"+e];void 0!==r&&(t[e]=r)}function o(t,i){var o=i.container?n.nestedProperty(t,i.container).get():t;if(o)if(o.coloraxis)o._colorAx=e[o.coloraxis];else{var s=a(o),l=s.auto;(l||void 0===s.min)&&r(o,i.min),(l||void 0===s.max)&&r(o,i.max),s.autocolorscale&&r(o,\"colorscale\")}}for(var s=0;s=0;n--,i++){var a=t[n];r[i]=[1-a[0],a[1]]}return r}function d(t,e){e=e||{};for(var r=t.domain,o=t.range,l=o.length,c=new Array(l),u=0;u4/3-s?o:s}},{}],383:[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\":503}],384:[function(t,e,r){\"use strict\";r.selectMode=function(t){return\"lasso\"===t||\"select\"===t},r.drawMode=function(t){return\"drawclosedpath\"===t||\"drawopenpath\"===t||\"drawline\"===t||\"drawrect\"===t||\"drawcircle\"===t},r.openMode=function(t){return\"drawline\"===t||\"drawopenpath\"===t},r.rectMode=function(t){return\"select\"===t||\"drawline\"===t||\"drawrect\"===t||\"drawcircle\"===t},r.freeMode=function(t){return\"lasso\"===t||\"drawclosedpath\"===t||\"drawopenpath\"===t},r.selectingOrDrawing=function(t){return r.freeMode(t)||r.rectMode(t)}},{}],385:[function(t,e,r){\"use strict\";var n=t(\"mouse-event-offset\"),i=t(\"has-hover\"),a=t(\"has-passive-events\"),o=t(\"../../lib\").removeElement,s=t(\"../../plots/cartesian/constants\"),l=e.exports={};l.align=t(\"./align\"),l.getCursor=t(\"./cursor\");var c=t(\"./unhover\");function u(){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 f(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(t){var e,r,n,c,h,p,d,g,m=t.gd,v=1,y=m._context.doubleClickDelay,x=t.element;m._mouseDownTime||(m._mouseDownTime=0),x.style.pointerEvents=\"all\",x.onmousedown=_,a?(x._ontouchstart&&x.removeEventListener(\"touchstart\",x._ontouchstart),x._ontouchstart=_,x.addEventListener(\"touchstart\",_,{passive:!1})):x.ontouchstart=_;var b=t.clampFn||function(t,e,r){return Math.abs(t)y&&(v=Math.max(v-1,1)),m._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(v,p),!g){var r;try{r=new MouseEvent(\"click\",e)}catch(t){var n=f(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)}d.dispatchEvent(r)}m._dragging=!1,m._dragged=!1}else m._dragged=!1}},l.coverSlip=u},{\"../../lib\":503,\"../../plots/cartesian/constants\":561,\"./align\":382,\"./cursor\":383,\"./unhover\":386,\"has-hover\":228,\"has-passive-events\":229,\"mouse-event-offset\":242}],386:[function(t,e,r){\"use strict\";var n=t(\"../../lib/events\"),i=t(\"../../lib/throttle\"),a=t(\"../../lib/dom\").getGraphDiv,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&&!t._dragged&&!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/dom\":491,\"../../lib/events\":492,\"../../lib/throttle\":530,\"../fx/constants\":400}],387:[function(t,e,r){\"use strict\";r.dash={valType:\"string\",values:[\"solid\",\"dot\",\"dash\",\"longdash\",\"dashdot\",\"longdashdot\"],dflt:\"solid\",editType:\"style\"},r.pattern={shape:{valType:\"enumerated\",values:[\"\",\"/\",\"\\\\\",\"x\",\"-\",\"|\",\"+\",\".\"],dflt:\"\",arrayOk:!0,editType:\"style\"},fillmode:{valType:\"enumerated\",values:[\"replace\",\"overlay\"],dflt:\"replace\",editType:\"style\"},bgcolor:{valType:\"color\",arrayOk:!0,editType:\"style\"},fgcolor:{valType:\"color\",arrayOk:!0,editType:\"style\"},fgopacity:{valType:\"number\",editType:\"style\",min:0,max:1},size:{valType:\"number\",min:0,dflt:8,arrayOk:!0,editType:\"style\"},solidity:{valType:\"number\",min:0,max:1,dflt:.3,arrayOk:!0,editType:\"style\"},editType:\"style\"}},{}],388:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.numberFormat,o=t(\"fast-isnumeric\"),s=t(\"tinycolor2\"),l=t(\"../../registry\"),c=t(\"../color\"),u=t(\"../colorscale\"),f=i.strTranslate,h=t(\"../../lib/svg_text_utils\"),p=t(\"../../constants/xmlns_namespaces\"),d=t(\"../../constants/alignment\").LINE_SPACING,g=t(\"../../constants/interactions\").DESELECTDIM,m=t(\"../../traces/scatter/subtypes\"),v=t(\"../../traces/scatter/make_bubble_size_func\"),y=t(\"../../components/fx/helpers\").appendArrayPointValue,x=e.exports={};x.font=function(t,e,r,n){i.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(c.fill,n)},x.setPosition=function(t,e,r){t.attr(\"x\",e).attr(\"y\",r)},x.setSize=function(t,e,r){t.attr(\"width\",e).attr(\"height\",r)},x.setRect=function(t,e,r,n,i){t.call(x.setPosition,e,r).call(x.setSize,n,i)},x.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),a=n.c2p(t.y);return!!(o(i)&&o(a)&&e.node())&&(\"text\"===e.node().nodeName?e.attr(\"x\",i).attr(\"y\",a):e.attr(\"transform\",f(i,a)),!0)},x.translatePoints=function(t,e,r){t.each((function(t){var i=n.select(this);x.translatePoint(t,i,e,r)}))},x.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr(\"display\",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:\"none\")},x.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,c=l.traceIs(a,\"bar-like\")?\".bartext\":\".point,.textpoint\";t.selectAll(c).each((function(t){x.hideOutsideRangePoint(t,n.select(this),r,i,o,s)}))}))}},x.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},x.singleLineStyle=function(t,e,r,n,i){e.style(\"fill\",\"none\");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||\"\";c.stroke(e,n||a.color),x.dashLine(e,s,o)},x.lineGroupStyle=function(t,e,r,i){t.style(\"fill\",\"none\").each((function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,s=i||a.dash||\"\";n.select(this).call(c.stroke,r||a.color).call(x.dashLine,s,o)}))},x.dashLine=function(t,e,r){r=+r||0,e=x.dashStyle(e,r),t.style({\"stroke-dasharray\":e,\"stroke-width\":r+\"px\"})},x.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},x.singleFillStyle=function(t){var e=(((n.select(t.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;e&&t.call(c.fill,e)},x.fillGroupStyle=function(t){t.style(\"stroke-width\",0).each((function(t){var e=n.select(this);t[0].trace&&e.call(c.fill,t[0].trace.fillcolor)}))};var b=t(\"./symbol_defs\");x.symbolNames=[],x.symbolFuncs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(b).forEach((function(t){var e=b[t],r=e.n;x.symbolList.push(r,String(r),t,r+100,String(r+100),t+\"-open\"),x.symbolNames[r]=t,x.symbolFuncs[r]=e.f,e.needLine&&(x.symbolNeedLines[r]=!0),e.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),t+\"-dot\",r+300,String(r+300),t+\"-open-dot\"),e.noFill&&(x.symbolNoFill[r]=!0)}));var _=x.symbolNames.length;function w(t,e){var r=t%100;return x.symbolFuncs[r](e)+(t>=200?\"M0,0.5L0.5,0L0,-0.5L-0.5,0Z\":\"\")}x.symbolNumber=function(t){if(o(t))t=+t;else 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=x.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=_||t>=400?0:Math.floor(Math.max(t,0))};var T={x1:1,x2:0,y1:0,y2:0},k={x1:0,x2:0,y1:1,y2:0},A=a(\"~f\"),M={radial:{node:\"radialGradient\"},radialreversed:{node:\"radialGradient\",reversed:!0},horizontal:{node:\"linearGradient\",attrs:T},horizontalreversed:{node:\"linearGradient\",attrs:T,reversed:!0},vertical:{node:\"linearGradient\",attrs:k},verticalreversed:{node:\"linearGradient\",attrs:k,reversed:!0}};x.gradient=function(t,e,r,a,o,l){for(var u=o.length,f=M[a],h=new Array(u),p=0;p\"+v(t);d._gradientUrlQueryParts[y]=1},x.pattern=function(t,e,r,a,o,s,l,u,f,h,p,d){var g=\"legend\"===e;u&&(\"overlay\"===f?(h=u,p=c.contrast(h)):(h=void 0,p=u));var m,v,y,x,b,_,w,T,k,A,M,S=r._fullLayout,E=\"p\"+S._uid+\"-\"+a,L={};switch(o){case\"/\":m=s*Math.sqrt(2),v=s*Math.sqrt(2),_=\"path\",L={d:y=\"M-\"+m/4+\",\"+v/4+\"l\"+m/2+\",-\"+v/2+\"M0,\"+v+\"L\"+m+\",0M\"+m/4*3+\",\"+v/4*5+\"l\"+m/2+\",-\"+v/2,opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"\\\\\":m=s*Math.sqrt(2),v=s*Math.sqrt(2),_=\"path\",L={d:y=\"M\"+m/4*3+\",-\"+v/4+\"l\"+m/2+\",\"+v/2+\"M0,0L\"+m+\",\"+v+\"M-\"+m/4+\",\"+v/4*3+\"l\"+m/2+\",\"+v/2,opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"x\":m=s*Math.sqrt(2),v=s*Math.sqrt(2),y=\"M-\"+m/4+\",\"+v/4+\"l\"+m/2+\",-\"+v/2+\"M0,\"+v+\"L\"+m+\",0M\"+m/4*3+\",\"+v/4*5+\"l\"+m/2+\",-\"+v/2+\"M\"+m/4*3+\",-\"+v/4+\"l\"+m/2+\",\"+v/2+\"M0,0L\"+m+\",\"+v+\"M-\"+m/4+\",\"+v/4*3+\"l\"+m/2+\",\"+v/2,x=s-s*Math.sqrt(1-l),_=\"path\",L={d:y,opacity:d,stroke:p,\"stroke-width\":x+\"px\"};break;case\"|\":_=\"path\",_=\"path\",L={d:y=\"M\"+(m=s)/2+\",0L\"+m/2+\",\"+(v=s),opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"-\":_=\"path\",_=\"path\",L={d:y=\"M0,\"+(v=s)/2+\"L\"+(m=s)+\",\"+v/2,opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"+\":_=\"path\",y=\"M\"+(m=s)/2+\",0L\"+m/2+\",\"+(v=s)+\"M0,\"+v/2+\"L\"+m+\",\"+v/2,x=s-s*Math.sqrt(1-l),_=\"path\",L={d:y,opacity:d,stroke:p,\"stroke-width\":x+\"px\"};break;case\".\":m=s,v=s,l.pattern_filled\";S._patternUrlQueryParts[I]=1},x.initGradients=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,\"g\",\"gradients\").selectAll(\"linearGradient,radialGradient\").remove(),e._gradientUrlQueryParts={}},x.initPatterns=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,\"g\",\"patterns\").selectAll(\"pattern\").remove(),e._patternUrlQueryParts={}},x.getPatternAttr=function(t,e,r){return t&&i.isArrayOrTypedArray(t)?e=100,e.attr(\"d\",w(u,l))}var f,h,p,d=!1;if(t.so)p=s.outlierwidth,h=s.outliercolor,f=o.outliercolor;else{var g=(s||{}).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):i.isArrayOrTypedArray(s.color)?c.defaultLine:s.color,i.isArrayOrTypedArray(o.color)&&(f=c.defaultLine,d=!0),f=\"mc\"in t?t.mcc=n.markerScale(t.mc):o.color||\"rgba(0,0,0,0)\",n.selectedColorFn&&(f=n.selectedColorFn(t))}if(t.om)e.call(c.stroke,f).style({\"stroke-width\":(p||1)+\"px\",fill:\"none\"});else{e.style(\"stroke-width\",(t.isBlank?0:p)+\"px\");var m=o.gradient,v=t.mgt;v?d=!0:v=m&&m.type,i.isArrayOrTypedArray(v)&&(v=v[0],M[v]||(v=0));var y=o.pattern,b=y&&x.getPatternAttr(y.shape,t.i,\"\");if(v&&\"none\"!==v){var _=t.mgc;_?d=!0:_=m.color;var T=r.uid;d&&(T+=\"-\"+t.i),x.gradient(e,a,T,v,[[0,_],[1,f]],\"fill\")}else if(b){var k=x.getPatternAttr(y.bgcolor,t.i,null),A=x.getPatternAttr(y.fgcolor,t.i,null),S=y.fgopacity,E=x.getPatternAttr(y.size,t.i,8),L=x.getPatternAttr(y.solidity,t.i,.3),C=t.mcc||i.isArrayOrTypedArray(y.shape)||i.isArrayOrTypedArray(y.bgcolor)||i.isArrayOrTypedArray(y.size)||i.isArrayOrTypedArray(y.solidity),P=r.uid;C&&(P+=\"-\"+t.i),x.pattern(e,\"point\",a,P,b,E,L,t.mcc,y.fillmode,k,A,S)}else c.fill(e,f);p&&c.stroke(e,h)}},x.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=x.tryColorscale(r,\"\"),e.lineScale=x.tryColorscale(r,\"line\"),l.traceIs(t,\"symbols\")&&(e.ms2mrc=m.isBubble(t)?v(t):function(){return(r.size||6)/2}),t.selectedpoints&&i.extendFlat(e,x.makeSelectedPointStyleFns(t)),e},x.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.marker||{},o=r.marker||{},s=n.marker||{},c=a.opacity,u=o.opacity,f=s.opacity,h=void 0!==u,p=void 0!==f;(i.isArrayOrTypedArray(c)||h||p)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?a.opacity:t.mo;return t.selected?h?u:e:p?f:g*e});var d=a.color,m=o.color,v=s.color;(m||v)&&(e.selectedColorFn=function(t){var e=t.mcc||d;return t.selected?m||e:v||e});var y=a.size,x=o.size,b=s.size,_=void 0!==x,w=void 0!==b;return l.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},x.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:u||(l?e:c.addOpacity(e,g))},e},x.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.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){c.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\",w(x.symbolNumber(n),a)),e.mrc2=a})),a.length&&t.each((function(t){for(var e=n.select(this),r=0;r0?r:0}x.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var o=x.makeSelectedTextStyleFns(e);a=o.selectedTextColorFn}var s=e.texttemplate,l=r._fullLayout;t.each((function(t){var o=n.select(this),c=s?i.extractOption(t,e,\"txt\",\"texttemplate\"):i.extractOption(t,e,\"tx\",\"text\");if(c||0===c){if(s){var u=e._module.formatLabels,f=u?u(t,e,l):{},p={};y(p,e,t.i);var d=e._meta||{};c=i.texttemplateString(c,f,l._d3locale,p,t,d)}var g=t.tp||e.textposition,m=L(t,e),v=a?a(t):t.tc||e.textfont.color;o.call(x.font,t.tf||e.textfont.family,m,v).text(c).call(h.convertToTspans,r).call(E,g,m,t.mrc)}else o.remove()}))}},x.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.makeSelectedTextStyleFns(e);t.each((function(t){var i=n.select(this),a=r.selectedTextColorFn(t),o=t.tp||e.textposition,s=L(t,e);c.fill(i,a);var u=l.traceIs(e,\"bar-like\");E(i,o,s,t.mrc2||t.mrc,u)}))}};function C(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,.25),u=Math.pow(s*s+l*l,.25),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)]]}x.smoothopen=function(t,e){if(t.length<3)return\"M\"+t.join(\"L\");var r,n=\"M\"+t[0],i=[];for(r=1;r=1e4&&(x.savedBBoxes={},O=0),r&&(x.savedBBoxes[r]=m),O++,i.extendFlat({},m)},x.setClipUrl=function(t,e,r){t.attr(\"clip-path\",D(e,r))},x.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}},x.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+=f(e,r)).trim(),t[i](\"transform\",a),a},x.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}},x.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 R=/\\s*sc.*/;x.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(R,\"\");t=(t+=n).trim(),this.setAttribute(\"transform\",t)}))}};var F=/translate\\([^)]*\\)\\s*$/;x.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(F);t=1===e&&1===r?[]:[f(o,s),\"scale(\"+e+\",\"+r+\")\",f(-o,-s)],l&&t.push(l),i.attr(\"transform\",t.join(\"\"))}}))}},{\"../../components/fx/helpers\":402,\"../../constants/alignment\":471,\"../../constants/interactions\":478,\"../../constants/xmlns_namespaces\":480,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../registry\":638,\"../../traces/scatter/make_bubble_size_func\":943,\"../../traces/scatter/subtypes\":951,\"../color\":366,\"../colorscale\":378,\"./symbol_defs\":389,\"@plotly/d3\":58,\"fast-isnumeric\":190,tinycolor2:312}],389:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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},\"arrow-up\":{n:45,f:function(t){var e=n.round(t,2);return\"M0,0L-\"+e+\",\"+n.round(2*t,2)+\"H\"+e+\"Z\"},noDot:!0},\"arrow-down\":{n:46,f:function(t){var e=n.round(t,2);return\"M0,0L-\"+e+\",-\"+n.round(2*t,2)+\"H\"+e+\"Z\"},noDot:!0},\"arrow-left\":{n:47,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,0L\"+e+\",-\"+r+\"V\"+r+\"Z\"},noDot:!0},\"arrow-right\":{n:48,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,0L-\"+e+\",-\"+r+\"V\"+r+\"Z\"},noDot:!0},\"arrow-bar-up\":{n:49,f:function(t){var e=n.round(t,2);return\"M-\"+e+\",0H\"+e+\"M0,0L-\"+e+\",\"+n.round(2*t,2)+\"H\"+e+\"Z\"},needLine:!0,noDot:!0},\"arrow-bar-down\":{n:50,f:function(t){var e=n.round(t,2);return\"M-\"+e+\",0H\"+e+\"M0,0L-\"+e+\",-\"+n.round(2*t,2)+\"H\"+e+\"Z\"},needLine:!0,noDot:!0},\"arrow-bar-left\":{n:51,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,-\"+r+\"V\"+r+\"M0,0L\"+e+\",-\"+r+\"V\"+r+\"Z\"},needLine:!0,noDot:!0},\"arrow-bar-right\":{n:52,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,-\"+r+\"V\"+r+\"M0,0L-\"+e+\",-\"+r+\"V\"+r+\"Z\"},needLine:!0,noDot:!0}}},{\"@plotly/d3\":58}],390:[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\"}}}},{}],391:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../registry\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../lib\"),s=t(\"./compute_error\");function l(t,e,r,i){var l=e[\"error_\"+i]||{},c=[];if(l.visible&&-1!==[\"linear\",\"log\"].indexOf(r.type)){for(var u=s(l),f=0;f0;e.each((function(e){var f,h=e[0].trace,p=h.error_x||{},d=h.error_y||{};h.ids&&(f=function(t){return t.id});var g=o.hasMarkers(h)&&h.marker.maxdisplayed>0;d.visible||p.visible||(e=[]);var m=n.select(this).selectAll(\"g.errorbar\").data(e,f);if(m.exit().remove(),e.length){p.visible||m.selectAll(\"path.xerror\").remove(),d.visible||m.selectAll(\"path.yerror\").remove(),m.style(\"opacity\",1);var v=m.enter().append(\"g\").classed(\"errorbar\",!0);u&&v.style(\"opacity\",0).transition().duration(s.duration).style(\"opacity\",1),a.setClipUrl(m,r.layerClipId,t),m.each((function(t){var e=n.select(this),r=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,l,c);if(!g||t.vis){var a,o=e.select(\"path.yerror\");if(d.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var f=d.width;a=\"M\"+(r.x-f)+\",\"+r.yh+\"h\"+2*f+\"m-\"+f+\",0V\"+r.ys,r.noYS||(a+=\"m-\"+f+\",0h\"+2*f),!o.size()?o=e.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").classed(\"yerror\",!0):u&&(o=o.transition().duration(s.duration).ease(s.easing)),o.attr(\"d\",a)}else o.remove();var h=e.select(\"path.xerror\");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var m=(p.copy_ystyle?d:p).width;a=\"M\"+r.xh+\",\"+(r.y-m)+\"v\"+2*m+\"m0,-\"+m+\"H\"+r.xs,r.noXS||(a+=\"m0,-\"+m+\"v\"+2*m),!h.size()?h=e.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").classed(\"xerror\",!0):u&&(h=h.transition().duration(s.duration).ease(s.easing)),h.attr(\"d\",a)}else h.remove()}}))}}))}},{\"../../traces/scatter/subtypes\":951,\"../drawing\":388,\"@plotly/d3\":58,\"fast-isnumeric\":190}],396:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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\":366,\"@plotly/d3\":58}],397:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"./layout_attributes\").hoverlabel,a=t(\"../../lib/extend\").extendFlat;e.exports={hoverlabel:{bgcolor:a({},i.bgcolor,{arrayOk:!0}),bordercolor:a({},i.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:\"none\"}),align:a({},i.align,{arrayOk:!0}),namelength:a({},i.namelength,{arrayOk:!0}),editType:\"none\"}}},{\"../../lib/extend\":493,\"../../plots/font_attributes\":585,\"./layout_attributes\":407}],398:[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=0&&r.index_[0]._length||ot<0||ot>w[0]._length)return d.unhoverRaw(t,e)}if(e.pointerX=at+_[0]._offset,e.pointerY=ot+w[0]._offset,V=\"xval\"in e?v.flat(l,e.xval):v.p2c(_,at),H=\"yval\"in e?v.flat(l,e.yval):v.p2c(w,ot),!i(V[0])||!i(H[0]))return o.warn(\"Fx.hover failed\",e,t),d.unhoverRaw(t,e)}var ct=1/0;function ut(t,r){for(G=0;Gtt&&(et.splice(0,tt),ct=et[0].distance),y&&0!==B&&0===et.length){$.distance=B,$.index=!1;var f=W._module.hoverPoints($,K,Q,\"closest\",{hoverLayer:u._hoverlayer});if(f&&(f=f.filter((function(t){return t.spikeDistance<=B}))),f&&f.length){var h,d=f.filter((function(t){return t.xa.showspikes&&\"hovered data\"!==t.xa.spikesnap}));if(d.length){var g=d[0];i(g.x0)&&i(g.y0)&&(h=ht(g),(!nt.vLinePoint||nt.vLinePoint.spikeDistance>h.spikeDistance)&&(nt.vLinePoint=h))}var m=f.filter((function(t){return t.ya.showspikes&&\"hovered data\"!==t.ya.spikesnap}));if(m.length){var x=m[0];i(x.x0)&&i(x.y0)&&(h=ht(x),(!nt.hLinePoint||nt.hLinePoint.spikeDistance>h.spikeDistance)&&(nt.hLinePoint=h))}}}}}function ft(t,e,r){for(var n,i=null,a=1/0,o=0;o0&&Math.abs(t.distance)Tt-1;Mt--)Ct(et[Mt]);et=St,mt()}var Pt=t._hoverdata,It=[],Ot=j(t),zt=U(t);for(q=0;q1||et.length>1)||\"closest\"===P&&it&&et.length>1,Wt=p.combine(u.plot_bgcolor||p.background,u.paper_bgcolor),Xt=I(et,{gd:t,hovermode:P,rotateLabels:Yt,bgColor:Wt,container:u._hoverlayer,outerContainer:u._paper.node(),commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance});v.isUnifiedHover(P)||(!function(t,e,r){var n,i,a,o,s,l,c,u=0,f=1,h=t.size(),p=new Array(h),d=0;function g(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;oe.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=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--)}}}t.each((function(t){var n=t[e],i=\"x\"===n._id.charAt(0),a=n.range;0===d&&a&&a[0]>a[1]!==i&&(f=-1),p[d++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(i?T:1)/2,pmin:0,pmax:i?r.width:r.height}]})),p.sort((function(t,e){return t[0].posref-e[0].posref||f*(e[0].traceIndex-t[0].traceIndex)}));for(;!n&&u<=h;){for(u++,n=!0,o=0;o.01&&y.pmin===x.pmin&&y.pmax===x.pmax){for(s=v.length-1;s>=0;s--)v[s].dp+=i;for(m.push.apply(m,v),p.splice(o+1,1),c=0,s=m.length-1;s>=0;s--)c+=m[s].dp;for(a=c/m.length,s=m.length-1;s>=0;s--)m[s].dp-=a;n=!1}else o++}p.forEach(g)}for(o=p.length-1;o>=0;o--){var b=p[o];for(s=b.length-1;s>=0;s--){var _=b[s],w=_.datum;w.offset=_.dp,w.del=_.del}}}(Xt,Yt?\"xa\":\"ya\",u),z(Xt,Yt,u._invScaleX,u._invScaleY));if(s&&s.tagName){var Zt=m.getComponentMethod(\"annotations\",\"hasClickToShow\")(t,It);f(n.select(s),Zt?\"pointer\":\"\")}if(!s||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)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(t,0,Pt))return;Pt&&t.emit(\"plotly_unhover\",{event:e,points:Pt});t.emit(\"plotly_hover\",{event:e,points:t._hoverdata,xaxes:_,yaxes:w,xvals:V,yvals:H})}(t,e,r,a,s)}))},r.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=e.gd,a=j(i),o=U(i),s=I(t.map((function(t){var r=t._x0||t.x0||t.x||0,n=t._x1||t.x1||t.x||0,s=t._y0||t.y0||t.y||0,l=t._y1||t.y1||t.y||0,c=t.eventData;if(c){var u=Math.min(r,n),f=Math.max(r,n),h=Math.min(s,l),d=Math.max(s,l),g=t.trace;if(m.traceIs(g,\"gl3d\")){var v=i._fullLayout[g.scene]._scene.container,y=v.offsetLeft,x=v.offsetTop;u+=y,f+=y,h+=x,d+=x}c.bbox={x0:u+o,x1:f+o,y0:h+a,y1:d+a},e.inOut_bbox&&e.inOut_bbox.push(c.bbox)}else c=!1;return{color:t.color||p.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,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:\"\"},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData:c}})),{gd:i,hovermode:\"closest\",rotateLabels:!1,bgColor:e.bgColor||p.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}),l=0,c=0;return s.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5([\\s\\S]*)<\\/extra>/;function I(t,e){var r=e.gd,i=r._fullLayout,a=e.hovermode,c=e.rotateLabels,f=e.bgColor,d=e.container,g=e.outerContainer,w=e.commonLabelOpts||{};if(0===t.length)return[[]];var T=e.fontFamily||y.HOVERFONT,k=e.fontSize||y.HOVERFONTSIZE,A=t[0],E=A.xa,L=A.ya,P=a.charAt(0),I=A[P+\"Label\"],z=V(r,g),D=z.top,R=z.width,F=z.height,B=void 0!==I&&A.distance<=e.hoverdistance&&(\"x\"===a||\"y\"===a);if(B){var N,j,U=!0;for(N=0;Ni.width-b?(m=i.width-b,e.attr(\"d\",\"M\"+(b-M)+\",0L\"+b+\",\"+x+M+\"v\"+x+(2*S+y.height)+\"H-\"+b+\"V\"+x+M+\"H\"+(b-2*M)+\"Z\")):e.attr(\"d\",\"M0,0L\"+M+\",\"+x+M+\"H\"+(S+y.width/2)+\"v\"+x+(2*S+y.height)+\"H-\"+(S+y.width/2)+\"V\"+x+M+\"H-\"+M+\"Z\")}else{var _,C,P;\"right\"===L.side?(_=\"start\",C=1,P=\"\",m=E._offset+E._length):(_=\"end\",C=-1,P=\"-\",m=E._offset),v=L._offset+(A.y0+A.y1)/2,l.attr(\"text-anchor\",_),e.attr(\"d\",\"M0,0L\"+P+M+\",\"+M+\"V\"+(S+y.height/2)+\"h\"+P+(2*S+y.width)+\"V-\"+(S+y.height/2)+\"H\"+P+M+\"V-\"+M+\"Z\");var O,z=y.height/2,R=D-y.top-z,F=\"clip\"+i._uid+\"commonlabel\"+L._id;if(m=0?at:ot+ct=0?ot:vt+ct=0?nt:it+ut=0?it:yt+ut=0,\"top\"!==t.idealAlign&&G||!Y?G?(z+=j/2,t.anchor=\"start\"):t.anchor=\"middle\":(z-=j/2,t.anchor=\"end\");else if(t.pos=z,G=P+N/2+W<=R,Y=P-N/2-W>=0,\"left\"!==t.idealAlign&&G||!Y)if(G)P+=N/2,t.anchor=\"start\";else{t.anchor=\"middle\";var X=W/2,Z=P+X-R,J=P-X;Z>0&&(P-=Z),J<0&&(P+=-J)}else P-=N/2,t.anchor=\"end\";w.attr(\"text-anchor\",t.anchor),E&&A.attr(\"text-anchor\",t.anchor),e.attr(\"transform\",s(P,z)+(c?l(_):\"\"))})),xt}function O(t,e,r,n,i,a){var s=\"\",l=\"\";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=o.templateString(t.name,t.trace._meta)),s=B(t.name,t.nameLength));var c=r.charAt(0),u=\"x\"===c?\"y\":\"x\";void 0!==t.zLabel?(void 0!==t.xLabel&&(l+=\"x: \"+t.xLabel+\"
\"),void 0!==t.yLabel&&(l+=\"y: \"+t.yLabel+\"
\"),\"choropleth\"!==t.trace.type&&\"choroplethmapbox\"!==t.trace.type&&(l+=(l?\"z: \":\"\")+t.zLabel)):e&&t[c+\"Label\"]===i?l=t[u+\"Label\"]||\"\":void 0===t.xLabel?void 0!==t.yLabel&&\"scattercarpet\"!==t.trace.type&&(l=t.yLabel):l=void 0===t.yLabel?t.xLabel:\"(\"+t.xLabel+\", \"+t.yLabel+\")\",!t.text&&0!==t.text||Array.isArray(t.text)||(l+=(l?\"
\":\"\")+t.text),void 0!==t.extraText&&(l+=(l?\"
\":\"\")+t.extraText),a&&\"\"===l&&!t.hovertemplate&&(\"\"===s&&a.remove(),l=s);var f=t.hovertemplate||!1;if(f){var h=t.hovertemplateLabels||t;t[c+\"Label\"]!==i&&(h[c+\"other\"]=h[c+\"Val\"],h[c+\"otherLabel\"]=h[c+\"Label\"]),l=(l=o.hovertemplateString(f,h,n._d3locale,t.eventData[0]||{},t.trace._meta)).replace(P,(function(e,r){return s=B(r,t.nameLength),\"\"}))}return[l,s]}function z(t,e,r,i){var a=function(t){return t*r},o=function(t){return t*i};t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var i=r.select(\"text.nums\"),s=t.anchor,l=\"end\"===s?-1:1,c={start:1,end:-1,middle:0}[s],f=c*(M+S),p=f+c*(t.txwidth+S),d=0,g=t.offset,m=\"middle\"===s;m&&(f-=t.tx2width/2,p+=t.txwidth/2+S),e&&(g*=-A,d=t.offset*k),r.select(\"path\").attr(\"d\",m?\"M-\"+a(t.bx/2+t.tx2width/2)+\",\"+o(g-t.by/2)+\"h\"+a(t.bx)+\"v\"+o(t.by)+\"h-\"+a(t.bx)+\"Z\":\"M0,0L\"+a(l*M+d)+\",\"+o(M+g)+\"v\"+o(t.by/2-M)+\"h\"+a(l*t.bx)+\"v-\"+o(t.by)+\"H\"+a(l*M+d)+\"V\"+o(g-M)+\"Z\");var v=d+f,y=g+t.ty0-t.by/2+S,x=t.textAlign||\"auto\";\"auto\"!==x&&(\"left\"===x&&\"start\"!==s?(i.attr(\"text-anchor\",\"start\"),v=m?-t.bx/2-t.tx2width/2+S:-t.bx-S):\"right\"===x&&\"end\"!==s&&(i.attr(\"text-anchor\",\"end\"),v=m?t.bx/2-t.tx2width/2-S:t.bx+S)),i.call(u.positionText,a(v),o(y)),t.tx2width&&(r.select(\"text.name\").call(u.positionText,a(p+c*S+d),o(g+t.ty0-t.by/2+S)),r.select(\"rect\").call(h.setRect,a(p+(c-1)*t.tx2width/2+d),o(g-t.by/2-1),a(t.tx2width),o(t.by+2)))}))}function D(t,e){var r=t.index,n=t.trace||{},a=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var c=Array.isArray(r)?function(t,e){var i=o.castOption(a,r,t);return l(i)?i:o.extractOption({},n,\"\",e)}:function(t,e){return o.extractOption(s,n,t,e)};function u(e,r,n){var i=c(r,n);l(i)&&(t[e]=i)}if(u(\"hoverinfo\",\"hi\",\"hoverinfo\"),u(\"bgcolor\",\"hbg\",\"hoverlabel.bgcolor\"),u(\"borderColor\",\"hbc\",\"hoverlabel.bordercolor\"),u(\"fontFamily\",\"htf\",\"hoverlabel.font.family\"),u(\"fontSize\",\"hts\",\"hoverlabel.font.size\"),u(\"fontColor\",\"htc\",\"hoverlabel.font.color\"),u(\"nameLength\",\"hnl\",\"hoverlabel.namelength\"),u(\"textAlign\",\"hta\",\"hoverlabel.align\"),t.posref=\"y\"===e||\"closest\"===e&&\"h\"===n.orientation?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:g.hoverLabelText(t.xa,t.xLabelVal,n.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel=\"yLabel\"in t?t.yLabel:g.hoverLabelText(t.ya,t.yLabelVal,n.yhoverformat),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 f=g.tickText(t.xa,t.xa.c2l(t.xerr),\"hover\").text;void 0!==t.xerrneg?t.xLabel+=\" +\"+f+\" / -\"+g.tickText(t.xa,t.xa.c2l(t.xerrneg),\"hover\").text:t.xLabel+=\" \\xb1 \"+f,\"x\"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||\"log\"===t.ya.type&&t.yerr<=0)){var h=g.tickText(t.ya,t.ya.c2l(t.yerr),\"hover\").text;void 0!==t.yerrneg?t.yLabel+=\" +\"+h+\" / -\"+g.tickText(t.ya,t.ya.c2l(t.yerrneg),\"hover\").text:t.yLabel+=\" \\xb1 \"+h,\"y\"===e&&(t.distance+=1)}var p=t.hoverinfo||t.trace.hoverinfo;return p&&\"all\"!==p&&(-1===(p=Array.isArray(p)?p:p.split(\"+\")).indexOf(\"x\")&&(t.xLabel=void 0),-1===p.indexOf(\"y\")&&(t.yLabel=void 0),-1===p.indexOf(\"z\")&&(t.zLabel=void 0),-1===p.indexOf(\"text\")&&(t.text=void 0),-1===p.indexOf(\"name\")&&(t.name=void 0)),t}function R(t,e,r){var n,i,o=r.container,s=r.fullLayout,l=s._size,c=r.event,u=!!e.hLinePoint,f=!!e.vLinePoint;if(o.selectAll(\".spikeline\").remove(),f||u){var d=p.combine(s.plot_bgcolor,s.paper_bgcolor);if(u){var m,v,y=e.hLinePoint;n=y&&y.xa,\"cursor\"===(i=y&&y.ya).spikesnap?(m=c.pointerX,v=c.pointerY):(m=n._offset+y.x,v=i._offset+y.y);var x,b,_=a.readability(y.color,d)<1.5?p.contrast(d):y.color,w=i.spikemode,T=i.spikethickness,k=i.spikecolor||_,A=g.getPxPosition(t,i);if(-1!==w.indexOf(\"toaxis\")||-1!==w.indexOf(\"across\")){if(-1!==w.indexOf(\"toaxis\")&&(x=A,b=m),-1!==w.indexOf(\"across\")){var M=i._counterDomainMin,S=i._counterDomainMax;\"free\"===i.anchor&&(M=Math.min(M,i.position),S=Math.max(S,i.position)),x=l.l+M*l.w,b=l.l+S*l.w}o.insert(\"line\",\":first-child\").attr({x1:x,x2:b,y1:v,y2:v,\"stroke-width\":T,stroke:k,\"stroke-dasharray\":h.dashStyle(i.spikedash,T)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),o.insert(\"line\",\":first-child\").attr({x1:x,x2:b,y1:v,y2:v,\"stroke-width\":T+2,stroke:d}).classed(\"spikeline\",!0).classed(\"crisp\",!0)}-1!==w.indexOf(\"marker\")&&o.insert(\"circle\",\":first-child\").attr({cx:A+(\"right\"!==i.side?T:-T),cy:v,r:T,fill:k}).classed(\"spikeline\",!0)}if(f){var E,L,C=e.vLinePoint;n=C&&C.xa,i=C&&C.ya,\"cursor\"===n.spikesnap?(E=c.pointerX,L=c.pointerY):(E=n._offset+C.x,L=i._offset+C.y);var P,I,O=a.readability(C.color,d)<1.5?p.contrast(d):C.color,z=n.spikemode,D=n.spikethickness,R=n.spikecolor||O,F=g.getPxPosition(t,n);if(-1!==z.indexOf(\"toaxis\")||-1!==z.indexOf(\"across\")){if(-1!==z.indexOf(\"toaxis\")&&(P=F,I=L),-1!==z.indexOf(\"across\")){var B=n._counterDomainMin,N=n._counterDomainMax;\"free\"===n.anchor&&(B=Math.min(B,n.position),N=Math.max(N,n.position)),P=l.t+(1-N)*l.h,I=l.t+(1-B)*l.h}o.insert(\"line\",\":first-child\").attr({x1:E,x2:E,y1:P,y2:I,\"stroke-width\":D,stroke:R,\"stroke-dasharray\":h.dashStyle(n.spikedash,D)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),o.insert(\"line\",\":first-child\").attr({x1:E,x2:E,y1:P,y2:I,\"stroke-width\":D+2,stroke:d}).classed(\"spikeline\",!0).classed(\"crisp\",!0)}-1!==z.indexOf(\"marker\")&&o.insert(\"circle\",\":first-child\").attr({cx:E,cy:F-(\"top\"!==n.side?D:-D),r:D,fill:R}).classed(\"spikeline\",!0)}}}function F(t,e){return!e||(e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint)}function B(t,e){return u.plainText(t||\"\",{len:e,allowedTags:[\"br\",\"sub\",\"sup\",\"b\",\"i\",\"em\"]})}function N(t,e,r){var n=e[t+\"a\"],i=e[t+\"Val\"],a=e.cd[0];if(\"category\"===n.type)i=n._categoriesMap[i];else if(\"date\"===n.type){var o=e.trace[t+\"periodalignment\"];if(o){var s=e.cd[e.index],l=s[t+\"Start\"];void 0===l&&(l=s[t]);var c=s[t+\"End\"];void 0===c&&(c=s[t]);var u=c-l;\"end\"===o?i+=u:\"middle\"===o&&(i+=u/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&(\"group\"!==r.boxmode&&\"group\"!==r.violinmode||(i+=a.t.dPos)),i}function j(t){return t.offsetTop+t.clientTop}function U(t){return t.offsetLeft+t.clientLeft}function V(t,e){var r=t._fullLayout,n=e.getBoundingClientRect(),i=n.x,a=n.y,s=i+n.width,l=a+n.height,c=o.apply3DTransform(r._invTransform)(i,a),u=o.apply3DTransform(r._invTransform)(s,l),f=c[0],h=c[1],p=u[0],d=u[1];return{x:f,y:h,width:p-f,height:d-h,top:Math.min(h,d),left:Math.min(f,p),right:Math.max(f,p),bottom:Math.max(h,d)}}},{\"../../lib\":503,\"../../lib/events\":492,\"../../lib/override_cursor\":514,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"../color\":366,\"../dragelement\":385,\"../drawing\":388,\"../legend/defaults\":418,\"../legend/draw\":419,\"./constants\":400,\"./helpers\":402,\"@plotly/d3\":58,\"fast-isnumeric\":190,tinycolor2:312}],404:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../color\"),a=t(\"./helpers\").isUnifiedHover;e.exports=function(t,e,r,o){o=o||{};var s=e.legend;function l(t){o.font[t]||(o.font[t]=s?e.legend.font[t]:e.font[t])}e&&a(e.hovermode)&&(o.font||(o.font={}),l(\"size\"),l(\"family\"),l(\"color\"),s?(o.bgcolor||(o.bgcolor=i.combine(e.legend.bgcolor,e.paper_bgcolor)),o.bordercolor||(o.bordercolor=e.legend.bordercolor)):o.bgcolor||(o.bgcolor=e.paper_bgcolor)),r(\"hoverlabel.bgcolor\",o.bgcolor),r(\"hoverlabel.bordercolor\",o.bordercolor),r(\"hoverlabel.namelength\",o.namelength),n.coerceFont(r,\"hoverlabel.font\",o.font),r(\"hoverlabel.align\",o.align)}},{\"../../lib\":503,\"../color\":366,\"./helpers\":402}],405:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e){function r(r,a){return void 0!==e[r]?e[r]:n.coerce(t,e,i,r,a)}return r(\"clickmode\"),r(\"hovermode\")}},{\"../../lib\":503,\"./layout_attributes\":407}],406:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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,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\":503,\"../dragelement\":385,\"./attributes\":397,\"./calc\":398,\"./click\":399,\"./constants\":400,\"./defaults\":401,\"./helpers\":402,\"./hover\":403,\"./layout_attributes\":407,\"./layout_defaults\":408,\"./layout_global_defaults\":409,\"@plotly/d3\":58}],407:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"../../plots/font_attributes\"),a=i({editType:\"none\"});a.family.dflt=n.HOVERFONT,a.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\",\"drawclosedpath\",\"drawopenpath\",\"drawline\",\"drawrect\",\"drawcircle\",\"orbit\",\"turntable\",!1],dflt:\"zoom\",editType:\"modebar\"},hovermode:{valType:\"enumerated\",values:[\"x\",\"y\",\"closest\",!1,\"x unified\",\"y unified\"],dflt:\"closest\",editType:\"modebar\"},hoverdistance:{valType:\"integer\",min:-1,dflt:20,editType:\"none\"},spikedistance:{valType:\"integer\",min:-1,dflt:-1,editType:\"none\"},hoverlabel:{bgcolor:{valType:\"color\",editType:\"none\"},bordercolor:{valType:\"color\",editType:\"none\"},font:a,grouptitlefont:i({editType:\"none\"}),align:{valType:\"enumerated\",values:[\"left\",\"right\",\"auto\"],dflt:\"auto\",editType:\"none\"},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\":585,\"./constants\":400}],408:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\"),a=t(\"./hovermode_defaults\"),o=t(\"./hoverlabel_defaults\");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}a(t,e)&&(r(\"hoverdistance\"),r(\"spikedistance\")),\"select\"===r(\"dragmode\")&&r(\"selectdirection\");var s=e._has(\"mapbox\"),l=e._has(\"geo\"),c=e._basePlotModules.length;\"zoom\"===e.dragmode&&((s||l)&&1===c||s&&l&&2===c)&&(e.dragmode=\"pan\"),o(t,e,r),n.coerceFont(r,\"hoverlabel.grouptitlefont\",e.hoverlabel.font)}},{\"../../lib\":503,\"./hoverlabel_defaults\":404,\"./hovermode_defaults\":405,\"./layout_attributes\":407}],409:[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\":503,\"./hoverlabel_defaults\":404,\"./layout_attributes\":407}],410:[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;h1){if(!h&&!p&&!d)\"independent\"===k(\"pattern\")&&(h=!0);m._hasSubplotGrid=h;var x,b,_=\"top to bottom\"===k(\"roworder\"),w=h?.2:.1,T=h?.3:.1;g&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),m._domains={x:u(\"x\",k,w,x,y),y:u(\"y\",k,T,b,v,_)}}else delete e.grid}function k(t,e){return n.coerce(r,m,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,m=r.columns,v=\"independent\"===r.pattern,y=r._axisMap={};if(d){var x=h.subplots||[];l=r.subplots=new Array(g);var b=1;for(n=0;n1);if(!1===_&&(e.legend=void 0),(!1!==_||f.uirevision)&&(p(\"uirevision\",e.uirevision),!1!==_)){p(\"bgcolor\",e.paper_bgcolor),p(\"bordercolor\"),p(\"borderwidth\");var w,T,k,A=i.coerceFont(p,\"font\",e.font),M=\"h\"===p(\"orientation\");if(M?(w=0,n.getComponentMethod(\"rangeslider\",\"isVisible\")(t.xaxis)?(T=1.1,k=\"bottom\"):(T=-.1,k=\"top\")):(w=1.02,T=1,k=\"auto\"),p(\"traceorder\",x),c.isGrouped(e.legend)&&p(\"tracegroupgap\"),p(\"itemsizing\"),p(\"itemwidth\"),p(\"itemclick\"),p(\"itemdoubleclick\"),p(\"groupclick\"),p(\"x\",w),p(\"xanchor\"),p(\"y\",T),p(\"yanchor\",k),p(\"valign\"),i.noneOrAll(f,h,[\"x\",\"y\"]),p(\"title.text\")){p(\"title.side\",M?\"left\":\"top\");var S=i.extendFlat({},A,{size:i.bigFont(A.size)});i.coerceFont(p,\"title.font\",S)}}}},{\"../../lib\":503,\"../../plot_api/plot_template\":543,\"../../plots/attributes\":550,\"../../plots/layout_attributes\":610,\"../../registry\":638,\"./attributes\":416,\"./helpers\":422}],419:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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/alignment\"),g=d.LINE_SPACING,m=d.FROM_TL,v=d.FROM_BR,y=t(\"./get_legend_data\"),x=t(\"./style\"),b=t(\"./helpers\");function _(t,e,r,n,i){var a=r.data()[0][0].trace,l={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&&(l.group=a._group),o.traceIs(a,\"pie-like\")&&(l.label=r.datum()[0].label),!1!==s.triggerHandler(t,\"plotly_legendclick\",l))if(1===n)e._clickTimeout=setTimeout((function(){t._fullLayout&&h(r,t,n)}),t._context.doubleClickDelay);else if(2===n){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,\"plotly_legenddoubleclick\",l)&&h(r,t,n)}}function w(t,e,r){var n,a,s=t.data()[0][0],l=s.trace,u=o.traceIs(l,\"pie-like\"),h=!r._inHover&&e._context.edits.legendText&&!u,d=r._maxNameLength;s.groupTitle?(n=s.groupTitle.text,a=s.groupTitle.font):(a=r.font,r.entries?n=s.text:(n=u?s.label:l.name,l._meta&&(n=i.templateString(n,l._meta))));var g=i.ensureSingle(t,\"text\",\"legendtext\");g.attr(\"text-anchor\",\"start\").call(c.font,a).text(h?T(n,d):n);var m=r.itemwidth+2*p.itemGap;f.positionText(g,m,0),h?g.call(f.makeEditable,{gd:e,text:n}).call(A,t,e,r).on(\"edit\",(function(n){this.text(T(n,d)).call(A,t,e,r);var a=s.trace._fullInput||{},c={};if(o.hasTransform(a,\"groupby\")){var u=o.getTransformIndices(a,\"groupby\"),f=u[u.length-1],h=i.keyedContainer(a,\"transforms[\"+f+\"].styles\",\"target\",\"value.name\");h.set(s.trace._group,n),c=h.constructUpdate()}else c.name=n;return o.call(\"_guiRestyle\",e,c,l.index)})):A(g,t,e,r)}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 k(t,e){var r,a=e._context.doubleClickDelay,o=1,s=i.ensureSingle(t,\"rect\",\"legendtoggle\",(function(t){e._context.staticPlot||t.style(\"cursor\",\"pointer\").attr(\"pointer-events\",\"all\"),t.call(u.fill,\"rgba(0,0,0,0)\")}));e._context.staticPlot||(s.on(\"mousedown\",(function(){(r=(new Date).getTime())-e._legendMouseDownTimea&&(o=Math.max(o-1,1)),_(e,r,t,o,n.event)}})))}function A(t,e,r,n,i){n._inHover&&t.attr(\"data-notex\",!0),f.convertToTspans(t,r,(function(){!function(t,e,r,n){var i=t.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend)return void t.remove();var a=t.select(\"g[class*=math-group]\"),o=a.node();r||(r=e._fullLayout.legend);var s,l=r.borderwidth;s=1===n?r.title.font:i.groupTitle?i.groupTitle.font:r.font;var u,h,d=s.size*g;if(o){var m=c.bBox(o);u=m.height,h=m.width,1===n?c.setTranslate(a,l,l+.75*u):c.setTranslate(a,0,.25*u)}else{var v=t.select(1===n?\".legendtitletext\":\".legendtext\"),y=f.lineCount(v),x=v.node();if(u=d*y,h=x?c.bBox(x).width:0,1===n)\"left\"===r.title.side&&(h+=2*p.itemGap),f.positionText(v,l+p.titlePad,l+d);else{var b=2*p.itemGap+r.itemwidth;i.groupTitle&&(b=p.itemGap,h-=r.itemwidth),f.positionText(v,b,-d*((y-1)/2-.3))}}1===n?(r._titleWidth=h,r._titleHeight=u):(i.lineHeight=d,i.height=Math.max(u,16)+3,i.width=h)}(e,r,n,i)}))}function M(t){return i.isRightAnchor(t)?\"right\":i.isCenterAnchor(t)?\"center\":\"left\"}function S(t){return i.isBottomAnchor(t)?\"bottom\":i.isMiddleAnchor(t)?\"middle\":\"top\"}e.exports=function(t,e){return e||(e=t._fullLayout.legend||{}),function(t,e){var r,s,f=t._fullLayout,h=\"legend\"+f._uid,d=e._inHover;d?(r=e.layer,h+=\"-hover\"):r=f._infolayer;if(!r)return;t._legendMouseDownTime||(t._legendMouseDownTime=0);if(d){if(!e.entries)return;s=y(e.entries,e)}else{if(!t.calcdata)return;s=f.showlegend&&y(t.calcdata,e)}var g=f.hiddenlabels||[];if(!(d||f.showlegend&&s.length))return r.selectAll(\".legend\").remove(),f._topdefs.select(\"#\"+h).remove(),a.autoMargin(t,\"legend\");var T=i.ensureSingle(r,\"g\",\"legend\",(function(t){d||t.attr(\"pointer-events\",\"all\")})),E=i.ensureSingleById(f._topdefs,\"clipPath\",h,(function(t){t.append(\"rect\")})),L=i.ensureSingle(T,\"rect\",\"bg\",(function(t){t.attr(\"shape-rendering\",\"crispEdges\")}));L.call(u.stroke,e.bordercolor).call(u.fill,e.bgcolor).style(\"stroke-width\",e.borderwidth+\"px\");var C=i.ensureSingle(T,\"g\",\"scrollbox\"),P=e.title;if(e._titleWidth=0,e._titleHeight=0,P.text){var I=i.ensureSingle(C,\"text\",\"legendtitletext\");I.attr(\"text-anchor\",\"start\").call(c.font,P.font).text(P.text),A(I,C,t,e,1)}else C.selectAll(\".legendtitletext\").remove();var O=i.ensureSingle(T,\"rect\",\"scrollbar\",(function(t){t.attr(p.scrollBarEnterAttrs).call(u.fill,p.scrollBarColor)})),z=C.selectAll(\"g.groups\").data(s);z.enter().append(\"g\").attr(\"class\",\"groups\"),z.exit().remove();var D=z.selectAll(\"g.traces\").data(i.identity);D.enter().append(\"g\").attr(\"class\",\"traces\"),D.exit().remove(),D.style(\"opacity\",(function(t){var e=t[0].trace;return o.traceIs(e,\"pie-like\")?-1!==g.indexOf(t[0].label)?.5:1:\"legendonly\"===e.visible?.5:1})).each((function(){n.select(this).call(w,t,e)})).call(x,t,e).each((function(){d||n.select(this).call(k,t)})),i.syncOrAsync([a.previousPromises,function(){return function(t,e,r,i){var a=t._fullLayout;i||(i=a.legend);var o=a._size,s=b.isVertical(i),l=b.isGrouped(i),u=i.borderwidth,f=2*u,h=p.itemGap,d=i.itemwidth+2*h,g=2*(u+h),m=S(i),v=i.y<0||0===i.y&&\"top\"===m,y=i.y>1||1===i.y&&\"bottom\"===m,x=i.tracegroupgap;i._maxHeight=Math.max(v||y?a.height/2:o.h,30);var _=0;i._width=0,i._height=0;var w=function(t){var e=0,r=0,n=t.title.side;n&&(-1!==n.indexOf(\"left\")&&(e=t._titleWidth),-1!==n.indexOf(\"top\")&&(r=t._titleHeight));return[e,r]}(i);if(s)r.each((function(t){var e=t[0].height;c.setTranslate(this,u+w[0],u+w[1]+i._height+e/2+h),i._height+=e,i._width=Math.max(i._width,t[0].width)})),_=d+i._width,i._width+=h+d+f,i._height+=g,l&&(e.each((function(t,e){c.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var T=M(i),k=i.x<0||0===i.x&&\"right\"===T,A=i.x>1||1===i.x&&\"left\"===T,E=y||v,L=a.width/2;i._maxWidth=Math.max(k?E&&\"left\"===T?o.l+o.w:L:A?E&&\"right\"===T?o.r+o.w:L:o.w,2*d);var C=0,P=0;r.each((function(t){var e=t[0].width+d;C=Math.max(C,e),P+=e})),_=null;var I=0;if(l){var O=0,z=0,D=0;e.each((function(){var t=0,e=0;n.select(this).selectAll(\"g.traces\").each((function(r){var n=r[0].width,i=r[0].height;c.setTranslate(this,w[0],w[1]+u+h+i/2+e),e+=i,t=Math.max(t,d+n)}));var r=t+h;z>0&&r+u+z>i._maxWidth?(I=Math.max(I,z),z=0,D+=O+x,O=e):O=Math.max(O,e),c.setTranslate(this,z,D),z+=r})),i._width=Math.max(I,z)+u,i._height=D+O+g}else{var R=r.size(),F=P+f+(R-1)*h=i._maxWidth&&(I=Math.max(I,U),N=0,j+=B,i._height+=B,B=0),c.setTranslate(this,w[0]+u+N,w[1]+u+j+e/2+h),U=N+r+h,N+=n,B=Math.max(B,e)})),F?(i._width=N+f,i._height=B+g):(i._width=Math.max(I,U)+f,i._height+=B+g)}}i._width=Math.ceil(Math.max(i._width+w[0],i._titleWidth+2*(u+p.titlePad))),i._height=Math.ceil(Math.max(i._height+w[1],i._titleHeight+2*(u+p.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var V=t._context.edits,H=V.legendText||V.legendPosition;r.each((function(t){var e=n.select(this).select(\".legendtoggle\"),r=t[0].height,i=H?d:_||d+t[0].width;s||(i+=h/2),c.setRect(e,0,-r/2,i,r)}))}(t,z,D,e)},function(){var s,u,g,y,x=f._size,b=e.borderwidth;if(!d){if(function(t){var e=t._fullLayout.legend,r=M(e),n=S(e);return a.autoMargin(t,\"legend\",{x:e.x,y:e.y,l:e._width*m[r],r:e._width*v[r],b:e._effHeight*v[n],t:e._effHeight*m[n]})}(t))return;var w=x.l+x.w*e.x-m[M(e)]*e._width,k=x.t+x.h*(1-e.y)-m[S(e)]*e._effHeight;if(f.margin.autoexpand){var A=w,P=k;w=i.constrain(w,0,f.width-e._width),k=i.constrain(k,0,f.height-e._effHeight),w!==A&&i.log(\"Constrain legend.x to make legend fit inside graph\"),k!==P&&i.log(\"Constrain legend.y to make legend fit inside graph\")}c.setTranslate(T,w,k)}if(O.on(\".drag\",null),T.on(\"wheel\",null),d||e._height<=e._maxHeight||t._context.staticPlot){var I=e._effHeight;d&&(I=e._height),L.attr({width:e._width-b,height:I-b,x:b/2,y:b/2}),c.setTranslate(C,0,0),E.select(\"rect\").attr({width:e._width-2*b,height:I-2*b,x:b,y:b}),c.setClipUrl(C,h,t),c.setRect(O,0,0,0,0),delete e._scrollY}else{var z,D,R,F=Math.max(p.scrollBarMinHeight,e._effHeight*e._effHeight/e._height),B=e._effHeight-F-2*p.scrollBarMargin,N=e._height-e._effHeight,j=B/N,U=Math.min(e._scrollY||0,N);L.attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-b,x:b/2,y:b/2}),E.select(\"rect\").attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-2*b,x:b,y:b+U}),c.setClipUrl(C,h,t),q(U,F,j),T.on(\"wheel\",(function(){q(U=i.constrain(e._scrollY+n.event.deltaY/B*N,0,N),F,j),0!==U&&U!==N&&n.event.preventDefault()}));var V=n.behavior.drag().on(\"dragstart\",(function(){var t=n.event.sourceEvent;z=\"touchstart\"===t.type?t.changedTouches[0].clientY:t.clientY,R=U})).on(\"drag\",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(D=\"touchmove\"===t.type?t.changedTouches[0].clientY:t.clientY,q(U=function(t,e,r){var n=(r-e)/j+t;return i.constrain(n,0,N)}(R,z,D),F,j))}));O.call(V);var H=n.behavior.drag().on(\"dragstart\",(function(){var t=n.event.sourceEvent;\"touchstart\"===t.type&&(z=t.changedTouches[0].clientY,R=U)})).on(\"drag\",(function(){var t=n.event.sourceEvent;\"touchmove\"===t.type&&(D=t.changedTouches[0].clientY,q(U=function(t,e,r){var n=(e-r)/j+t;return i.constrain(n,0,N)}(R,z,D),F,j))}));C.call(H)}function q(r,n,i){e._scrollY=t._fullLayout.legend._scrollY=r,c.setTranslate(C,0,-r),c.setRect(O,e._width,p.scrollBarMargin+r*i,p.scrollBarWidth,n),E.select(\"rect\").attr(\"y\",b+r)}t._context.edits.legendPosition&&(T.classed(\"cursor-move\",!0),l.init({element:T.node(),gd:t,prepFn:function(){var t=c.getTranslate(T);g=t.x,y=t.y},moveFn:function(t,r){var n=g+t,i=y+r;c.setTranslate(T,n,i),s=l.align(n,0,x.l,x.l+x.w,e.xanchor),u=l.align(i,0,x.t+x.h,x.t,e.yanchor)},doneFn:function(){void 0!==s&&void 0!==u&&o.call(\"_guiRelayout\",t,{\"legend.x\":s,\"legend.y\":u})},clickFn:function(e,n){var i=r.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&&_(t,T,i,e,n)}}))}],t)}(t,e)}},{\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/events\":492,\"../../lib/svg_text_utils\":529,\"../../plots/plots\":619,\"../../registry\":638,\"../color\":366,\"../dragelement\":385,\"../drawing\":388,\"./constants\":417,\"./get_legend_data\":420,\"./handle_click\":421,\"./helpers\":422,\"./style\":424,\"@plotly/d3\":58}],420:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"./helpers\");e.exports=function(t,e){var r,a,o=e._inHover,s=i.isGrouped(e),l=i.isReversed(e),c={},u=[],f=!1,h={},p=0,d=0;function g(t,r){if(\"\"!==t&&i.isGrouped(e))-1===u.indexOf(t)?(u.push(t),f=!0,c[t]=[r]):c[t].push(r);else{var n=\"~~i\"+p;u.push(n),c[n]=[r],p++}}for(r=0;rA&&(k=A)}w[r][0]._groupMinRank=k,w[r][0]._preGroupSort=r}var M=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(w.forEach((function(t,e){t[0]._preGroupSort=e})),w.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),r=0;rr?r:t}e.exports=function(t,e,r){var v=e._fullLayout;r||(r=v.legend);var y=\"constant\"===r.itemsizing,x=r.itemwidth,b=(x+2*p.itemGap)/2,_=o(b,0),w=function(t,e,r,n){var i;if(t+1)i=t;else{if(!(e&&e.width>0))return 0;i=e.width}return y?n:Math.min(i,r)};function T(t,a,o){var u=t[0].trace,f=u.marker||{},h=f.line||{},p=o?u.visible&&u.type===o:i.traceIs(u,\"bar\"),d=n.select(a).select(\"g.legendpoints\").selectAll(\"path.legend\"+o).data(p?[t]:[]);d.enter().append(\"path\").classed(\"legend\"+o,!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),d.exit().remove(),d.each((function(t){var i=n.select(this),a=t[0],o=w(a.mlw,f.line,5,2);i.style(\"stroke-width\",o+\"px\");var p=a.mcc;if(!r._inHover&&\"mc\"in a){var d=c(f),g=d.mid;void 0===g&&(g=(d.max+d.min)/2),p=s.tryColorscale(f,\"\")(g)}var v=p||a.mc||f.color,y=f.pattern,x=y&&s.getPatternAttr(y.shape,0,\"\");if(x){var b=s.getPatternAttr(y.bgcolor,0,null),_=s.getPatternAttr(y.fgcolor,0,null),T=y.fgopacity,k=m(y.size,8,10),A=m(y.solidity,.5,1),M=\"legend-\"+u.uid;i.call(s.pattern,\"legend\",e,M,x,k,A,p,y.fillmode,b,_,T)}else i.call(l.fill,v);o&&l.stroke(i,a.mlc||h.color)}))}function k(t,e,r){var o=t[0],s=o.trace,l=r?s.visible&&s.type===r:i.traceIs(s,r),c=n.select(e).select(\"g.legendpoints\").selectAll(\"path.legend\"+r).data(l?[t]:[]);if(c.enter().append(\"path\").classed(\"legend\"+r,!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),c.exit().remove(),c.size()){var u=(s.marker||{}).line,p=w(h(u.width,o.pts),u,5,2),d=a.minExtend(s,{marker:{line:{width:p}}});d.marker.line.color=u.color;var g=a.minExtend(o,{trace:d});f(c,g,d)}}t.each((function(t){var e=n.select(this),i=a.ensureSingle(e,\"g\",\"layers\");i.style(\"opacity\",t[0].trace.opacity);var s=r.valign,l=t[0].lineHeight,c=t[0].height;if(\"middle\"!==s&&l&&c){var u={top:1,bottom:-1}[s]*(.5*(l-c+3));i.attr(\"transform\",o(0,u))}else i.attr(\"transform\",null);i.selectAll(\"g.legendfill\").data([t]).enter().append(\"g\").classed(\"legendfill\",!0),i.selectAll(\"g.legendlines\").data([t]).enter().append(\"g\").classed(\"legendlines\",!0);var f=i.selectAll(\"g.legendsymbols\").data([t]);f.enter().append(\"g\").classed(\"legendsymbols\",!0),f.selectAll(\"g.legendpoints\").data([t]).enter().append(\"g\").classed(\"legendpoints\",!0)})).each((function(t){var r,i=t[0].trace,o=[];if(i.visible)switch(i.type){case\"histogram2d\":case\"heatmap\":o=[[\"M-15,-2V4H15V-2Z\"]],r=!0;break;case\"choropleth\":case\"choroplethmapbox\":o=[[\"M-6,-6V6H6V-6Z\"]],r=!0;break;case\"densitymapbox\":o=[[\"M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0\"]],r=\"radial\";break;case\"cone\":o=[[\"M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z\"],[\"M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z\"],[\"M-6,-2 A2,2 0 0,0 -6,2 L6,0Z\"]],r=!1;break;case\"streamtube\":o=[[\"M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z\"],[\"M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z\"],[\"M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z\"]],r=!1;break;case\"surface\":o=[[\"M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z\"],[\"M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z\"]],r=!0;break;case\"mesh3d\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6H6L0,6Z\"]],r=!1;break;case\"volume\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6H6L0,6Z\"]],r=!0;break;case\"isosurface\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6 A12,24 0 0,0 6,-6 L0,6Z\"]],r=!1}var u=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legend3dandfriends\").data(o);u.enter().append(\"path\").classed(\"legend3dandfriends\",!0).attr(\"transform\",_).style(\"stroke-miterlimit\",1),u.exit().remove(),u.each((function(t,o){var u,f=n.select(this),h=c(i),p=h.colorscale,g=h.reversescale;if(p){if(!r){var m=p.length;u=0===o?p[g?m-1:0][1]:1===o?p[g?0:m-1][1]:p[Math.floor((m-1)/2)][1]}}else{var v=i.vertexcolor||i.facecolor||i.color;u=a.isArrayOrTypedArray(v)?v[o]||v[0]:v}f.attr(\"d\",t[0]),u?f.call(l.fill,u):f.call((function(t){if(t.size()){var n=\"legendfill-\"+i.uid;s.gradient(t,e,n,d(g,\"radial\"===r),p,\"fill\")}}))}))})).each((function(t){var e=t[0].trace,r=\"waterfall\"===e.type;if(t[0]._distinct&&r){var i=t[0].trace[t[0].dir].marker;return t[0].mc=i.color,t[0].mlw=i.line.width,t[0].mlc=i.line.color,T(t,this,\"waterfall\")}var a=[];e.visible&&r&&(a=t[0].hasTotals?[[\"increasing\",\"M-6,-6V6H0Z\"],[\"totals\",\"M6,6H0L-6,-6H-0Z\"],[\"decreasing\",\"M6,6V-6H0Z\"]]:[[\"increasing\",\"M-6,-6V6H6Z\"],[\"decreasing\",\"M6,6V-6H-6Z\"]]);var o=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendwaterfall\").data(a);o.enter().append(\"path\").classed(\"legendwaterfall\",!0).attr(\"transform\",_).style(\"stroke-miterlimit\",1),o.exit().remove(),o.each((function(t){var r=n.select(this),i=e[t[0]].marker,a=w(void 0,i.line,5,2);r.attr(\"d\",t[1]).style(\"stroke-width\",a+\"px\").call(l.fill,i.color),a&&r.call(l.stroke,i.line.color)}))})).each((function(t){T(t,this,\"funnel\")})).each((function(t){T(t,this)})).each((function(t){var r=t[0].trace,o=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendbox\").data(r.visible&&i.traceIs(r,\"box-violin\")?[t]:[]);o.enter().append(\"path\").classed(\"legendbox\",!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),o.exit().remove(),o.each((function(){var t=n.select(this);if(\"all\"!==r.boxpoints&&\"all\"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=w(void 0,r.line,5,2);t.style(\"stroke-width\",i+\"px\").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var c=a.minExtend(r,{marker:{size:y?12:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:\"diameter\"}});o.call(s.pointStyle,c,e)}}))})).each((function(t){k(t,this,\"funnelarea\")})).each((function(t){k(t,this,\"pie\")})).each((function(t){var r,i,o=g(t),l=o.showFill,f=o.showLine,h=o.showGradientLine,p=o.showGradientFill,m=o.anyFill,v=o.anyLine,y=t[0],b=y.trace,_=c(b),T=_.colorscale,k=_.reversescale,A=u.hasMarkers(b)||!m?\"M5,0\":v?\"M5,-2\":\"M5,-3\",M=n.select(this),S=M.select(\".legendfill\").selectAll(\"path\").data(l||p?[t]:[]);if(S.enter().append(\"path\").classed(\"js-fill\",!0),S.exit().remove(),S.attr(\"d\",A+\"h\"+x+\"v6h-\"+x+\"z\").call(l?s.fillGroupStyle:function(t){if(t.size()){var r=\"legendfill-\"+b.uid;s.gradient(t,e,r,d(k),T,\"fill\")}}),f||h){var E=w(void 0,b.line,10,5);i=a.minExtend(b,{line:{width:E}}),r=[a.minExtend(y,{trace:i})]}var L=M.select(\".legendlines\").selectAll(\"path\").data(f||h?[r]:[]);L.enter().append(\"path\").classed(\"js-line\",!0),L.exit().remove(),L.attr(\"d\",A+(h?\"l\"+x+\",0.0001\":\"h\"+x)).call(f?s.lineGroupStyle:function(t){if(t.size()){var r=\"legendline-\"+b.uid;s.lineGroupStyle(t),s.gradient(t,e,r,d(k),T,\"stroke\")}})})).each((function(t){var r,i,o=g(t),l=o.anyFill,c=o.anyLine,f=o.showLine,h=o.showMarker,p=t[0],d=p.trace,m=!h&&!c&&!l&&u.hasText(d);function v(t,e,r,n){var i=a.nestedProperty(d,t).get(),o=a.isArrayOrTypedArray(i)&&e?e(i):i;if(y&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function x(t){return p._distinct&&p.index&&t[p.index]?t[p.index]:t[0]}if(h||m||f){var b={},w={};if(h){b.mc=v(\"marker.color\",x),b.mx=v(\"marker.symbol\",x),b.mo=v(\"marker.opacity\",a.mean,[.2,1]),b.mlc=v(\"marker.line.color\",x),b.mlw=v(\"marker.line.width\",a.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:\"diameter\"};var T=v(\"marker.size\",a.mean,[2,16],12);b.ms=T,w.marker.size=T}f&&(w.line={width:v(\"line.width\",x,[0,10],5)}),m&&(b.tx=\"Aa\",b.tp=v(\"textposition\",x),b.ts=10,b.tc=v(\"textfont.color\",x),b.tf=v(\"textfont.family\",x)),r=[a.minExtend(p,b)],(i=a.minExtend(d,w)).selectedpoints=null,i.texttemplate=null}var k=n.select(this).select(\"g.legendpoints\"),A=k.selectAll(\"path.scatterpts\").data(h?r:[]);A.enter().insert(\"path\",\":first-child\").classed(\"scatterpts\",!0).attr(\"transform\",_),A.exit().remove(),A.call(s.pointStyle,i,e),h&&(r[0].mrc=3);var M=k.selectAll(\"g.pointtext\").data(m?r:[]);M.enter().append(\"g\").classed(\"pointtext\",!0).append(\"text\").attr(\"transform\",_),M.exit().remove(),M.selectAll(\"text\").call(s.textPointStyle,i,e)})).each((function(t){var e=t[0].trace,r=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendcandle\").data(e.visible&&\"candlestick\"===e.type?[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\",_).style(\"stroke-miterlimit\",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?\"increasing\":\"decreasing\"],o=w(void 0,a.line,5,2);i.style(\"stroke-width\",o+\"px\").call(l.fill,a.fillcolor),o&&l.stroke(i,a.line.color)}))})).each((function(t){var e=t[0].trace,r=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendohlc\").data(e.visible&&\"ohlc\"===e.type?[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\",_).style(\"stroke-miterlimit\",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?\"increasing\":\"decreasing\"],o=w(void 0,a.line,5,2);i.style(\"fill\",\"none\").call(s.dashLine,a.line.dash,o),o&&l.stroke(i,a.line.color)}))}))}},{\"../../lib\":503,\"../../registry\":638,\"../../traces/pie/helpers\":905,\"../../traces/pie/style_one\":911,\"../../traces/scatter/subtypes\":951,\"../color\":366,\"../colorscale/helpers\":377,\"../drawing\":388,\"./constants\":417,\"@plotly/d3\":58}],425:[function(t,e,r){\"use strict\";t(\"./constants\");e.exports={editType:\"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\"},uirevision:{valType:\"any\",editType:\"none\"},add:{valType:\"string\",arrayOk:!0,dflt:\"\",editType:\"modebar\"},remove:{valType:\"string\",arrayOk:!0,dflt:\"\",editType:\"modebar\"}}},{\"./constants\":427}],426:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../plots/plots\"),a=t(\"../../plots/cartesian/axis_ids\"),o=t(\"../../fonts/ploticon\"),s=t(\"../shapes/draw\").eraseActiveShape,l=t(\"../../lib\"),c=l._,u=e.exports={};function f(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=c._cartesianSpikesEnabled;if(\"zoom\"===s){var p,d=\"in\"===l?.5:2,g=(1+d)/2,m=(1-d)/2;for(i=0;i1?(I=[\"toggleHover\"],O=[\"resetViews\"]):v?(P=[\"zoomInGeo\",\"zoomOutGeo\"],I=[\"hoverClosestGeo\"],O=[\"resetGeo\"]):m?(I=[\"hoverClosest3d\"],O=[\"resetCameraDefault3d\",\"resetCameraLastSave3d\"]):w?(P=[\"zoomInMapbox\",\"zoomOutMapbox\"],I=[\"toggleHover\"],O=[\"resetViewMapbox\"]):b?I=[\"hoverClosestGl2d\"]:y?I=[\"hoverClosestPie\"]:A?(I=[\"hoverClosestCartesian\",\"hoverCompareCartesian\"],O=[\"resetViewSankey\"]):I=[\"toggleHover\"];g&&(I=[\"toggleSpikelines\",\"hoverClosestCartesian\",\"hoverCompareCartesian\"]);(function(t){for(var e=0;e0)){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.max)e=F[r+1];else if(t=n.pmax)e=F[r+1];else if(t0?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||\"multicategory\"===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;lp&&(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;oy?(k=f,E=\"y0\",A=y,L=\"y1\"):(k=y,E=\"y1\",A=f,L=\"y0\");Z(n),Q(s,r),function(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),s=a.getFromId(r,i),l=\"\";\"paper\"===n||o.autorange||(l+=n);\"paper\"===i||s.autorange||(l+=i);u.setClipUrl(t,l?\"clip\"+r._fullLayout._uid+l:null,r)}(e,r,t),X.moveFn=\"move\"===O?J:K,X.altKey=n.altKey},doneFn:function(){if(v(t))return;p(e),$(s),b(e,t,r),n.call(\"_guiRelayout\",t,l.getUpdateObj())},clickFn:function(){if(v(t))return;$(s)}};function Z(r){if(v(t))O=null;else if(R)O=\"path\"===r.target.tagName?\"move\":\"start-point\"===r.target.attributes[\"data-line-point\"].value?\"resize-over-start-point\":\"resize-over-end-point\";else{var n=X.element.getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top,o=r.clientX-n.left,s=r.clientY-n.top,l=!F&&i>10&&a>10&&!r.shiftKey?h.getCursor(o/i,1-s/a):\"move\";p(e,l),O=l.split(\"-\")[0]}}function J(n,i){if(\"path\"===r.type){var a=function(t){return t},o=a,l=a;z?B(\"xanchor\",r.xanchor=G(x+n)):(o=function(t){return G(H(t)+n)},N&&\"date\"===N.type&&(o=g.encodeDate(o))),D?B(\"yanchor\",r.yanchor=Y(T+i)):(l=function(t){return Y(q(t)+i)},U&&\"date\"===U.type&&(l=g.encodeDate(l))),B(\"path\",r.path=w(I,o,l))}else z?B(\"xanchor\",r.xanchor=G(x+n)):(B(\"x0\",r.x0=G(c+n)),B(\"x1\",r.x1=G(m+n))),D?B(\"yanchor\",r.yanchor=Y(T+i)):(B(\"y0\",r.y0=Y(f+i)),B(\"y1\",r.y1=Y(y+i)));e.attr(\"d\",_(t,r)),Q(s,r)}function K(n,i){if(F){var a=function(t){return t},o=a,l=a;z?B(\"xanchor\",r.xanchor=G(x+n)):(o=function(t){return G(H(t)+n)},N&&\"date\"===N.type&&(o=g.encodeDate(o))),D?B(\"yanchor\",r.yanchor=Y(T+i)):(l=function(t){return Y(q(t)+i)},U&&\"date\"===U.type&&(l=g.encodeDate(l))),B(\"path\",r.path=w(I,o,l))}else if(R){if(\"resize-over-start-point\"===O){var u=c+n,h=D?f-i:f+i;B(\"x0\",r.x0=z?u:G(u)),B(\"y0\",r.y0=D?h:Y(h))}else if(\"resize-over-end-point\"===O){var p=m+n,d=D?y-i:y+i;B(\"x1\",r.x1=z?p:G(p)),B(\"y1\",r.y1=D?d:Y(d))}}else{var v=function(t){return-1!==O.indexOf(t)},b=v(\"n\"),j=v(\"s\"),V=v(\"w\"),W=v(\"e\"),X=b?k+i:k,Z=j?A+i:A,J=V?M+n:M,K=W?S+n:S;D&&(b&&(X=k-i),j&&(Z=A-i)),(!D&&Z-X>10||D&&X-Z>10)&&(B(E,r[E]=D?X:Y(X)),B(L,r[L]=D?Z:Y(Z))),K-J>10&&(B(C,r[C]=z?J:G(J)),B(P,r[P]=z?K:G(K)))}e.attr(\"d\",_(t,r)),Q(s,r)}function Q(t,e){(z||D)&&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=H(z?e.xanchor:i.midRange(r?[e.x0,e.x1]:g.extractPathCoords(e.path,d.paramIsX))),o=q(D?e.yanchor:i.midRange(r?[e.y0,e.y1]:g.extractPathCoords(e.path,d.paramIsY)));if(a=g.roundPositionForSharpStrokeRendering(a,1),o=g.roundPositionForSharpStrokeRendering(o,1),z&&D){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(z){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 $(t){t.selectAll(\".visual-cue\").remove()}h.init(X),W.node().onmousemove=Z}(t,z,l,e,r,O):!0===l.editable&&z.style(\"pointer-events\",P||c.opacity(S)*M<=.5?\"stroke\":\"all\");z.node().addEventListener(\"click\",(function(){return function(t,e){if(!y(t))return;var r=+e.node().getAttribute(\"data-index\");if(r>=0){if(r===t._fullLayout._activeShapeIndex)return void T(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=T,m(t)}}(t,z)}))}}function b(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,\"\").replace(/[xyz][1-9]* *domain/g,\"\");u.setClipUrl(t,n?\"clip\"+e._fullLayout._uid+n:null,e)}function _(t,e){var r,n,o,s,l,c,u,f,h=e.type,p=a.getRefType(e.xref),m=a.getRefType(e.yref),v=a.getFromId(t,e.xref),y=a.getFromId(t,e.yref),x=t._fullLayout._size;if(v?\"domain\"===p?n=function(t){return v._offset+v._length*t}:(r=g.shapePositionToRange(v),n=function(t){return v._offset+v.r2p(r(t,!0))}):n=function(t){return x.l+x.w*t},y?\"domain\"===m?s=function(t){return y._offset+y._length*(1-t)}:(o=g.shapePositionToRange(y),s=function(t){return y._offset+y.r2p(o(t,!0))}):s=function(t){return x.t+x.h*(1-t)},\"path\"===h)return v&&\"date\"===v.type&&(n=g.decodeDate(n)),y&&\"date\"===y.type&&(s=g.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(d.segmentRE,(function(t){var n=0,c=t.charAt(0),u=d.paramIsX[c],f=d.paramIsY[c],h=d.numParams[c],p=t.substr(1).replace(d.paramRE,(function(t){return u[n]?t=\"pixel\"===a?e(s)+Number(t):e(t):f[n]&&(t=\"pixel\"===o?r(l)-Number(t):r(t)),++n>h&&(t=\"X\"),t}));return n>h&&(p=p.replace(/[\\s,]*X.*/,\"\"),i.log(\"Ignoring extra params in segment \"+t)),c+p}))}(e,n,s);if(\"pixel\"===e.xsizemode){var b=n(e.xanchor);l=b+e.x0,c=b+e.x1}else l=n(e.x0),c=n(e.x1);if(\"pixel\"===e.ysizemode){var _=s(e.yanchor);u=_-e.y0,f=_-e.y1}else u=s(e.y0),f=s(e.y1);if(\"line\"===h)return\"M\"+l+\",\"+u+\"L\"+c+\",\"+f;if(\"rect\"===h)return\"M\"+l+\",\"+u+\"H\"+c+\"V\"+f+\"H\"+l+\"Z\";var w=(l+c)/2,T=(u+f)/2,k=Math.abs(w-l),A=Math.abs(T-u),M=\"A\"+k+\",\"+A,S=w+k+\",\"+T;return\"M\"+S+M+\" 0 1,1 \"+(w+\",\"+(T-A))+M+\" 0 0,1 \"+S+\"Z\"}function w(t,e,r){return t.replace(d.segmentRE,(function(t){var n=0,i=t.charAt(0),a=d.paramIsX[i],o=d.paramIsY[i],s=d.numParams[i];return i+t.substr(1).replace(d.paramRE,(function(t){return n>=s||(a[n]?t=e(t):o[n]&&(t=r(t)),n++),t}))}))}function T(t){y(t)&&(t._fullLayout._activeShapeIndex>=0&&(l(t),delete t._fullLayout._activeShapeIndex,m(t)))}e.exports={draw:m,drawOne:x,eraseActiveShape:function(t){if(!y(t))return;l(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e=0&&f(v),r.attr(\"d\",g(e)),A&&!h)&&(k=function(t,e){for(var r=0;r1&&(2!==t.length||\"Z\"!==t[1][0])&&(0===T&&(t[0][0]=\"M\"),e[w]=t,y(),x())}}()}}function I(t,r){!function(t,r){if(e.length)for(var n=0;n0&&l0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr(\"transform\",l(o-.5*f.gripWidth,e._dims.currentValueTotalHeight))}}function E(t,e){var r=t._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,e))}function L(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 C(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 P(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;i0?[0]:[]);function s(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,m(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,v);l.enter().append(\"g\").classed(f.groupClassName,!0),l.exit().each(s).remove();for(var c=0;c0||h<0){var v={left:[-d,0],right:[d,0],top:[0,-d],bottom:[0,d]}[b.side];e.attr(\"transform\",l(v[0],v[1]))}}}return R.call(F),O&&(E?R.on(\".opacity\",null):(A=0,M=!0,R.text(y).on(\"mouseover.opacity\",(function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style(\"opacity\",1)})).on(\"mouseout.opacity\",(function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style(\"opacity\",0)}))),R.call(f.makeEditable,{gd:t}).on(\"edit\",(function(e){void 0!==x?o.call(\"_guiRestyle\",t,v,e,x):o.call(\"_guiRelayout\",t,v,e)})).on(\"cancel\",(function(){this.text(this.attr(\"data-unformatted\")).call(F)})).on(\"input\",(function(t){this.text(t||\" \").call(f.positionText,_.x,_.y)}))),R.classed(\"js-placeholder\",M),T}}},{\"../../constants/alignment\":471,\"../../constants/interactions\":478,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/plots\":619,\"../../registry\":638,\"../color\":366,\"../drawing\":388,\"@plotly/d3\":58,\"fast-isnumeric\":190}],465:[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\"}]},args2:{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({editType:\"arraydraw\"}),{}),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\":493,\"../../plot_api/edit_types\":536,\"../../plot_api/plot_template\":543,\"../../plots/font_attributes\":585,\"../../plots/pad_attributes\":618,\"../color/attributes\":365}],466:[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\"}}},{}],467:[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(\"args2\"),r(\"label\"),r(\"execute\"))}e.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},{\"../../lib\":503,\"../../plots/array_container_defaults\":549,\"./attributes\":465,\"./constants\":466}],468:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../plots/plots\"),a=t(\"../color\"),o=t(\"../drawing\"),s=t(\"../../lib\"),l=t(\"../../lib/svg_text_utils\"),c=t(\"../../plot_api/plot_template\").arrayEditor,u=t(\"../../constants/alignment\").LINE_SPACING,f=t(\"./constants\"),h=t(\"./scrollbox\");function p(t){return t._index}function d(t,e){return+t.attr(f.menuIndexAttrName)===e._index}function g(t,e,r,n,i,a,o,s){e.active=o,c(t.layout,f.name,e).applyUpdate(\"active\",o),\"buttons\"===e.type?v(t,n,null,null,e):\"dropdown\"===e.type&&(i.attr(f.menuIndexAttrName,\"-1\"),m(t,n,i,a,e),s||v(t,n,i,a,e))}function m(t,e,r,n,i){var a=s.ensureSingle(e,\"g\",f.headerClassName,(function(t){t.style(\"pointer-events\",\"all\")})),l=i._dims,c=i.active,u=i.buttons[c]||f.blankHeaderOpts,h={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};a.call(y,i,u,t).call(M,i,h,p),s.ensureSingle(e,\"text\",f.headerArrowClassName,(function(t){t.attr(\"text-anchor\",\"end\").call(o.font,i.font).text(f.arrowSymbol[i.direction])})).attr({x:l.headerWidth-f.arrowOffsetX+i.pad.l,y:l.headerHeight/2+f.textOffsetY+i.pad.t}),a.on(\"click\",(function(){r.call(S,String(d(r,i)?-1:i._index)),v(t,e,r,n,i)})),a.on(\"mouseover\",(function(){a.call(w)})),a.on(\"mouseout\",(function(){a.call(T,i)})),o.setTranslate(e,l.lx,l.ly)}function v(t,e,r,a,o){r||(r=e).attr(\"pointer-events\",\"all\");var l=function(t){return-1==+t.attr(f.menuIndexAttrName)}(r)&&\"buttons\"!==o.type?[]:o.buttons,c=\"dropdown\"===o.type?f.dropdownButtonClassName:f.buttonClassName,u=r.selectAll(\"g.\"+c).data(s.filterVisible(l)),h=u.enter().append(\"g\").classed(c,!0),p=u.exit();\"dropdown\"===o.type?(h.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\"),p.transition().attr(\"opacity\",\"0\").remove()):p.remove();var d=0,m=0,v=o._dims,x=-1!==[\"up\",\"down\"].indexOf(o.direction);\"dropdown\"===o.type&&(x?m=v.headerHeight+f.gapButtonHeader:d=v.headerWidth+f.gapButtonHeader),\"dropdown\"===o.type&&\"up\"===o.direction&&(m=-f.gapButtonHeader+f.gapButton-v.openHeight),\"dropdown\"===o.type&&\"left\"===o.direction&&(d=-f.gapButtonHeader+f.gapButton-v.openWidth);var b={x:v.lx+d+o.pad.l,y:v.ly+m+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},k={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each((function(s,l){var c=n.select(this);c.call(y,o,s,t).call(M,o,b),c.on(\"click\",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(g(t,o,0,e,r,a,-1),i.executeAPICommand(t,s.method,s.args2)):(g(t,o,0,e,r,a,l),i.executeAPICommand(t,s.method,s.args))),t.emit(\"plotly_buttonclicked\",{menu:o,button:s,active:o.active}))})),c.on(\"mouseover\",(function(){c.call(w)})),c.on(\"mouseout\",(function(){c.call(T,o),u.call(_,o)}))})),u.call(_,o),x?(k.w=Math.max(v.openWidth,v.headerWidth),k.h=b.y-k.t):(k.w=b.x-k.l,k.h=Math.max(v.openHeight,v.headerHeight)),k.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,h=i._dims,p=i.active;if(u)for(s=0,l=0;l0?[0]:[]);if(o.enter().append(\"g\").classed(f.containerClassName,!0).style(\"cursor\",\"pointer\"),o.exit().each((function(){n.select(this).selectAll(\"g.\"+f.headerGroupClassName).each(a)})).remove(),0!==r.length){var l=o.selectAll(\"g.\"+f.headerGroupClassName).data(r,p);l.enter().append(\"g\").classed(f.headerGroupClassName,!0);for(var c=s.ensureSingle(o,\"g\",f.dropdownButtonGroupClassName,(function(t){t.style(\"pointer-events\",\"all\")})),u=0;uw,A=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,S=d,E=m+v;E+M>c&&(E=c-M);var L=this.container.selectAll(\"rect.scrollbar-horizontal\").data(k?[0]:[]);L.exit().on(\".drag\",null).remove(),L.enter().append(\"rect\").classed(\"scrollbar-horizontal\",!0).call(i.fill,s.barColor),k?(this.hbar=L.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:E,width:A,height:M}),this._hbarXMin=S+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=v>T,P=s.barWidth+2*s.barPad,I=s.barLength+2*s.barPad,O=d+g,z=m;O+P>l&&(O=l-P);var D=this.container.selectAll(\"rect.scrollbar-vertical\").data(C?[0]:[]);D.exit().on(\".drag\",null).remove(),D.enter().append(\"rect\").classed(\"scrollbar-vertical\",!0).call(i.fill,s.barColor),C?(this.vbar=D.attr({rx:s.barRadius,ry:s.barRadius,x:O,y:z,width:P,height:I}),this._vbarYMin=z+I/2,this._vbarTranslateMax=T-I):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,B=C?f+P+.5:f+.5,N=h-.5,j=k?p+M+.5:p+.5,U=o._topdefs.selectAll(\"#\"+R).data(k||C?[0]:[]);if(U.exit().remove(),U.enter().append(\"clipPath\").attr(\"id\",R).append(\"rect\"),k||C?(this._clipRect=U.select(\"rect\").attr({x:Math.floor(F),y:Math.floor(N),width:Math.ceil(B)-Math.floor(F),height:Math.ceil(j)-Math.floor(N)}),this.container.call(a.setClipUrl,R,this.gd),this.bg.attr({x:d,y:m,width:g,height:v})):(this.bg.attr({width:0,height:0}),this.container.on(\"wheel\",null).on(\".drag\",null).call(a.setClipUrl,null),delete this._clipRect),k||C){var V=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(V);var H=n.behavior.drag().on(\"dragstart\",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on(\"drag\",this._onBarDrag.bind(this));k&&this.hbar.on(\".drag\",null).call(H),C&&this.vbar.on(\".drag\",null).call(H)}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\":503,\"../color\":366,\"../drawing\":388,\"@plotly/d3\":58}],471:[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,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:\"right\",right:\"left\",top:\"bottom\",bottom:\"top\"}}},{}],472:[function(t,e,r){\"use strict\";e.exports={axisRefDescription:function(t,e,r){return[\"If set to a\",t,\"axis id (e.g. *\"+t+\"* or\",\"*\"+t+\"2*), the `\"+t+\"` position refers to a\",t,\"coordinate. If set to *paper*, the `\"+t+\"`\",\"position refers to the distance from the\",e,\"of the plotting\",\"area in normalized coordinates where *0* (*1*) corresponds to the\",e,\"(\"+r+\"). If set to a\",t,\"axis ID followed by\",\"*domain* (separated by a space), the position behaves like for\",\"*paper*, but refers to the distance in fractions of the domain\",\"length from the\",e,\"of the domain of that axis: e.g.,\",\"*\"+t+\"2 domain* refers to the domain of the second\",t,\" axis and a\",t,\"position of 0.5 refers to the\",\"point between the\",e,\"and the\",r,\"of the domain of the\",\"second\",t,\"axis.\"].join(\" \")}}},{}],473:[function(t,e,r){\"use strict\";e.exports={INCREASING:{COLOR:\"#3D9970\",SYMBOL:\"\\u25b2\"},DECREASING:{COLOR:\"#FF4136\",SYMBOL:\"\\u25bc\"}}},{}],474:[function(t,e,r){\"use strict\";e.exports={FORMAT_LINK:\"https://github.com/d3/d3-format/tree/v1.4.5#d3-format\",DATE_FORMAT_LINK:\"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format\"}},{}],475:[function(t,e,r){\"use strict\";e.exports={COMPARISON_OPS:[\"=\",\"!=\",\"<\",\">=\",\">\",\"<=\"],COMPARISON_OPS2:[\"=\",\"<\",\">=\",\">\",\"<=\"],INTERVAL_OPS:[\"[]\",\"()\",\"[)\",\"(]\",\"][\",\")(\",\"](\",\")[\"],SET_OPS:[\"{}\",\"}{\"],CONSTRAINT_REDUCTION:{\"=\":\"=\",\"<\":\"<\",\"<=\":\"<\",\">\":\">\",\">=\":\">\",\"[]\":\"[]\",\"()\":\"[]\",\"[)\":\"[]\",\"(]\":\"[]\",\"][\":\"][\",\")(\":\"][\",\"](\":\"][\",\")[\":\"][\"}}},{}],476:[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]}},{}],477:[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\"}},{}],478:[function(t,e,r){\"use strict\";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],479:[function(t,e,r){\"use strict\";e.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:\"\\u2212\"}},{}],480:[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}},{}],481:[function(t,e,r){\"use strict\";r.version=t(\"./version\").version,t(\"native-promise-only\"),t(\"../build/plotcss\");for(var n=t(\"./registry\"),i=r.register=n.register,a=t(\"./plot_api\"),o=Object.keys(a),s=0;splotly-logomark\"}}},{}],483:[function(t,e,r){\"use strict\";r.isLeftAnchor=function(t){return\"left\"===t.xanchor||\"auto\"===t.xanchor&&t.x<=1/3},r.isCenterAnchor=function(t){return\"center\"===t.xanchor||\"auto\"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isRightAnchor=function(t){return\"right\"===t.xanchor||\"auto\"===t.xanchor&&t.x>=2/3},r.isTopAnchor=function(t){return\"top\"===t.yanchor||\"auto\"===t.yanchor&&t.y>=2/3},r.isMiddleAnchor=function(t){return\"middle\"===t.yanchor||\"auto\"===t.yanchor&&t.y>1/3&&t.y<2/3},r.isBottomAnchor=function(t){return\"bottom\"===t.yanchor||\"auto\"===t.yanchor&&t.y<=1/3}},{}],484:[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-14}function c(t,e){return a(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0](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 m(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}g?(u=0,f=o,h=s):r=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\":510}],485:[function(t,e,r){\"use strict\";var n=Array.isArray,i=ArrayBuffer,a=DataView;function o(t){return i.isView(t)&&!(t instanceof a)}function s(t){return n(t)||o(t)}function l(t,e,r){if(s(t)){if(s(t[0])){for(var n=r,i=0;ii.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&ti.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.get(t,r))}},angle:{coerceFunction:function(t,e,r){\"auto\"===t?e.set(\"auto\"):n(t)?e.set(f(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||u(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&&!!u(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=n&&t<=i?t:u}if(\"string\"!=typeof t&&\"number\"!=typeof t)return u;t=String(t);var c=_(e),v=t.charAt(0);!c||\"G\"!==v&&\"g\"!==v||(t=t.substr(1),e=\"\");var w=c&&\"chinese\"===e.substr(0,7),T=t.match(w?x:y);if(!T)return u;var k=T[1],A=T[3]||\"1\",M=Number(T[5]||1),S=Number(T[7]||0),E=Number(T[9]||0),L=Number(T[11]||0);if(c){if(2===k.length)return u;var C;k=Number(k);try{var P=m.getComponentMethod(\"calendars\",\"getCal\")(e);if(w){var I=\"i\"===A.charAt(A.length-1);A=parseInt(A,10),C=P.newDate(k,P.toMonthIndex(k,A,I),M)}else C=P.newDate(k,Number(A),M)}catch(t){return u}return C?(C.toJD()-g)*f+S*h+E*p+L*d:u}k=2===k.length?(Number(k)+2e3-b)%100+b:Number(k),A-=1;var O=new Date(Date.UTC(2e3,A,M,S,E));return O.setUTCFullYear(k),O.getUTCMonth()!==A||O.getUTCDate()!==M?u:O.getTime()+L*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 T=90*f,k=3*h,A=5*p;function M(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,E=Math.floor(l(t,f));try{a=m.getComponentMethod(\"calendars\",\"getCal\")(r).fromJD(S).formatDate(\"yyyy-mm-dd\")}catch(t){a=v(\"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=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 M(a(\"%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,E=/%h/g,L={1:\"1\",2:\"1\",3:\"2\",4:\"2\"};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(t=t.replace(E,(function(){return L[r(\"%q\")(i)]})),_(n))try{t=m.getComponentMethod(\"calendars\",\"worldCalFmt\")(t,e,n)}catch(t){return\"Invalid\"}return r(t)(i)}var P=[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),P[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 I=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=m.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+I);return c.setUTCMonth(c.getUTCMonth()+e)+n-I},r.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,c=_(e)&&m.getComponentMethod(\"calendars\",\"getCal\")(e),u=0;u0&&t[e+1][0]<0)return e;return null}switch(e=\"RUS\"===s||\"FJI\"===s?function(t){var e;if(null===c(t))e=t;else for(e=new Array(t.length),i=0;ie?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 a=h.tester(r);a.pts.pop(),l.push(a)}:function(t){l.push(h.tester(t))},a.type){case\"MultiPolygon\":for(r=0;ri&&(i=c,e=l)}else e=r;return o.default(e).geometry.coordinates}(u),n.fIn=t,n.fOut=u,s.push(u)}else c.log([\"Location\",n.loc,\"does not have a valid GeoJSON geometry.\",\"Traces with locationmode *geojson-id* only support\",\"*Polygon* and *MultiPolygon* geometries.\"].join(\" \"))}delete i[r]}switch(r.type){case\"FeatureCollection\":var h=r.features;for(n=0;n100?(clearInterval(a),n(\"Unexpected error while fetching from \"+t)):void i++}),50)}))}for(var o=0;o0&&(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;r1||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,m=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(m)},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.xo?r.x-o:0,f=r.yl?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;f0?p=i:h=i,f++}return a}},{\"./mod\":510}],499:[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(\"./array\").isArrayOrTypedArray,c=a(s);function u(t,e){var r=t;return r[3]*=e,r}function f(t){if(n(t))return c;var e=a(t);return e.length?e:c}function h(t){return n(t)?t:1}e.exports={formatColor:function(t,e,r){var n,i,s,p,d,g=t.color,m=l(g),v=l(e),y=o.extractOpts(t),x=[];if(n=void 0!==y.colorscale?o.makeColorScaleFuncFromTrace(t):f,i=m?function(t,e){return void 0===t[e]?c:a(n(t[e]))}:f,s=v?function(t,e){return void 0===t[e]?1:h(t[e])}:h,m||v)for(var b=0;b1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var a=String(e).length;if(i>=String(t).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf(\"e+\")&&(n=+o)}}return n}},{}],503:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-time-format\").utcFormat,a=t(\"d3-format\").format,o=t(\"fast-isnumeric\"),s=t(\"../constants/numerical\"),l=s.FP_SAFE,c=-l,u=s.BADNUM,f=e.exports={};f.adjustFormat=function(t){return!t||/^\\d[.]\\df/.test(t)||/[.]\\d%/.test(t)?t:\"0.f\"===t?\"~f\":/^\\d%/.test(t)?\"~%\":/^\\ds/.test(t)?\"~s\":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?\"~\"+t:t};var h={};f.warnBadFormat=function(t){var e=String(t);h[e]||(h[e]=1,f.warn('encountered bad format: \"'+e+'\"'))},f.noFormat=function(t){return String(t)},f.numberFormat=function(t){var e;try{e=a(f.adjustFormat(t))}catch(e){return f.warnBadFormat(t),f.noFormat}return e},f.nestedProperty=t(\"./nested_property\"),f.keyedContainer=t(\"./keyed_container\"),f.relativeAttr=t(\"./relative_attr\"),f.isPlainObject=t(\"./is_plain_object\"),f.toLogRange=t(\"./to_log_range\"),f.relinkPrivateKeys=t(\"./relink_private\");var p=t(\"./array\");f.isTypedArray=p.isTypedArray,f.isArrayOrTypedArray=p.isArrayOrTypedArray,f.isArray1D=p.isArray1D,f.ensureArray=p.ensureArray,f.concat=p.concat,f.maxRowLength=p.maxRowLength,f.minRowLength=p.minRowLength;var d=t(\"./mod\");f.mod=d.mod,f.modHalf=d.modHalf;var g=t(\"./coerce\");f.valObjectMeta=g.valObjectMeta,f.coerce=g.coerce,f.coerce2=g.coerce2,f.coerceFont=g.coerceFont,f.coercePattern=g.coercePattern,f.coerceHoverinfo=g.coerceHoverinfo,f.coerceSelectionMarkerOpacity=g.coerceSelectionMarkerOpacity,f.validate=g.validate;var m=t(\"./dates\");f.dateTime2ms=m.dateTime2ms,f.isDateTime=m.isDateTime,f.ms2DateTime=m.ms2DateTime,f.ms2DateTimeLocal=m.ms2DateTimeLocal,f.cleanDate=m.cleanDate,f.isJSDate=m.isJSDate,f.formatDate=m.formatDate,f.incrementMonth=m.incrementMonth,f.dateTick0=m.dateTick0,f.dfltRange=m.dfltRange,f.findExactDates=m.findExactDates,f.MIN_MS=m.MIN_MS,f.MAX_MS=m.MAX_MS;var v=t(\"./search\");f.findBin=v.findBin,f.sorterAsc=v.sorterAsc,f.sorterDes=v.sorterDes,f.distinctVals=v.distinctVals,f.roundUp=v.roundUp,f.sort=v.sort,f.findIndexOfMin=v.findIndexOfMin,f.sortObjectKeys=t(\"./sort_object_keys\");var y=t(\"./stats\");f.aggNums=y.aggNums,f.len=y.len,f.mean=y.mean,f.median=y.median,f.midRange=y.midRange,f.variance=y.variance,f.stdev=y.stdev,f.interp=y.interp;var x=t(\"./matrix\");f.init2dArray=x.init2dArray,f.transposeRagged=x.transposeRagged,f.dot=x.dot,f.translationMatrix=x.translationMatrix,f.rotationMatrix=x.rotationMatrix,f.rotationXYMatrix=x.rotationXYMatrix,f.apply3DTransform=x.apply3DTransform,f.apply2DTransform=x.apply2DTransform,f.apply2DTransform2=x.apply2DTransform2,f.convertCssMatrix=x.convertCssMatrix,f.inverseTransformMatrix=x.inverseTransformMatrix;var b=t(\"./angles\");f.deg2rad=b.deg2rad,f.rad2deg=b.rad2deg,f.angleDelta=b.angleDelta,f.angleDist=b.angleDist,f.isFullCircle=b.isFullCircle,f.isAngleInsideSector=b.isAngleInsideSector,f.isPtInsideSector=b.isPtInsideSector,f.pathArc=b.pathArc,f.pathSector=b.pathSector,f.pathAnnulus=b.pathAnnulus;var _=t(\"./anchor_utils\");f.isLeftAnchor=_.isLeftAnchor,f.isCenterAnchor=_.isCenterAnchor,f.isRightAnchor=_.isRightAnchor,f.isTopAnchor=_.isTopAnchor,f.isMiddleAnchor=_.isMiddleAnchor,f.isBottomAnchor=_.isBottomAnchor;var w=t(\"./geometry2d\");f.segmentsIntersect=w.segmentsIntersect,f.segmentDistance=w.segmentDistance,f.getTextLocation=w.getTextLocation,f.clearLocationCache=w.clearLocationCache,f.getVisibleSegment=w.getVisibleSegment,f.findPointOnPath=w.findPointOnPath;var T=t(\"./extend\");f.extendFlat=T.extendFlat,f.extendDeep=T.extendDeep,f.extendDeepAll=T.extendDeepAll,f.extendDeepNoArrays=T.extendDeepNoArrays;var k=t(\"./loggers\");f.log=k.log,f.warn=k.warn,f.error=k.error;var A=t(\"./regex\");f.counterRegex=A.counter;var M=t(\"./throttle\");f.throttle=M.throttle,f.throttleDone=M.done,f.clearThrottle=M.clear;var S=t(\"./dom\");function E(t){var e={};for(var r in t)for(var n=t[r],i=0;il||t=e)&&(o(t)&&t>=0&&t%1==0)},f.noop=t(\"./noop\"),f.identity=t(\"./identity\"),f.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},f.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},f.simpleMap=function(t,e,r,n,i){for(var a=t.length,o=new Array(a),s=0;s=Math.pow(2,r)?i>10?(f.warn(\"randstr failed uniqueness\"),l):t(e,r,n,(i||0)+1):l},f.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},f.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=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},f.syncOrAsync=function(t,e,r){var n;function i(){return f.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},f.stripTrailingSlash=function(t){return\"/\"===t.substr(-1)?t.substr(0,t.length-1):t},f.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n0?e:0}))},f.fillArray=function(t,e,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(t))for(var i=0;i1?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},f.TEMPLATE_STRING_REGEX=/%{([^\\s%{}:]*)([:|\\|][^}]*)?}/g;var z=/^\\w*$/;f.templateString=function(t,e){var r={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,n){var i;return z.test(n)?i=e[n]:(r[n]=r[n]||f.nestedProperty(e,n).get,i=r[n]()),f.isValidTextValue(i)?i:\"\"}))};var D={max:10,count:0,name:\"hovertemplate\"};f.hovertemplateString=function(){return B.apply(D,arguments)};var R={max:10,count:0,name:\"texttemplate\"};f.texttemplateString=function(){return B.apply(R,arguments)};var F=/^[:|\\|]/;function B(t,e,r){var n=this,a=arguments;e||(e={});var o={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,s,l){var c,u,h,p=\"_xother\"===s||\"_yother\"===s,d=\"_xother_\"===s||\"_yother_\"===s,g=\"xother_\"===s||\"yother_\"===s,m=\"xother\"===s||\"yother\"===s||p||g||d,v=s;if((p||d)&&(v=v.substring(1)),(g||d)&&(v=v.substring(0,v.length-1)),m){if(void 0===(c=e[v]))return\"\"}else for(h=3;h=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 N=2e9;f.seedPseudoRandom=function(){N=2e9},f.pseudoRandom=function(){var t=N;return N=(69069*N+1)%4294967296,Math.abs(N-t)<429496729?f.pseudoRandom():N/4294967296},f.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=f.extractOption(t,e,\"htx\",\"hovertext\");if(f.isValidTextValue(i))return n(i);var a=f.extractOption(t,e,\"tx\",\"text\");return f.isValidTextValue(a)?n(a):void 0},f.isValidTextValue=function(t){return t||0===t},f.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+\"%\",n=0;n1&&(c=1):c=0,f.strTranslate(i-c*(r+o),a-c*(n+s))+f.strScale(c)+(l?\"rotate(\"+l+(e?\"\":\" \"+r+\" \"+n)+\")\":\"\")},f.ensureUniformFontSize=function(t,e){var r=f.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},f.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)},f.bigFont=function(t){return Math.round(1.2*t)};var j=f.getFirefoxVersion(),U=null!==j&&j<86;f.getPositionFromD3Event=function(){return U?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},{\"../constants/numerical\":479,\"./anchor_utils\":483,\"./angles\":484,\"./array\":485,\"./clean_number\":486,\"./clear_responsive\":488,\"./coerce\":489,\"./dates\":490,\"./dom\":491,\"./extend\":493,\"./filter_unique\":494,\"./filter_visible\":495,\"./geometry2d\":498,\"./identity\":501,\"./increment\":502,\"./is_plain_object\":504,\"./keyed_container\":505,\"./localize\":506,\"./loggers\":507,\"./make_trace_groups\":508,\"./matrix\":509,\"./mod\":510,\"./nested_property\":511,\"./noop\":512,\"./notifier\":513,\"./preserve_drawing_buffer\":517,\"./push_unique\":518,\"./regex\":520,\"./relative_attr\":521,\"./relink_private\":522,\"./search\":523,\"./sort_object_keys\":526,\"./stats\":527,\"./throttle\":530,\"./to_log_range\":531,\"@plotly/d3\":58,\"d3-format\":112,\"d3-time-format\":120,\"fast-isnumeric\":190}],504:[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).hasOwnProperty(\"hasOwnProperty\")}},{}],505:[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;o2)return c[e]=2|c[e],h.set(t,null);if(f){for(o=e;o1){var e=[\"LOG:\"];for(t=0;t1){var r=[];for(t=0;t\"),\"long\")}},a.warn=function(){var t;if(n.logging>0){var e=[\"WARN:\"];for(t=0;t0){var r=[];for(t=0;t\"),\"stick\")}},a.error=function(){var t;if(n.logging>0){var e=[\"ERROR:\"];for(t=0;t0){var r=[];for(t=0;t\"),\"stick\")}}},{\"../plot_api/plot_config\":541,\"./notifier\":513}],508:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\");e.exports=function(t,e,r){var i=t.selectAll(\"g.\"+r.replace(/\\s/g,\".\")).data(e,(function(t){return t[0].trace.uid}));i.exit().remove(),i.enter().append(\"g\").attr(\"class\",r),i.order();var a=t.classed(\"rangeplot\")?\"nodeRangePlot3\":\"node3\";return i.each((function(t){t[0][a]=n.select(this)})),i}},{\"@plotly/d3\":58}],509:[function(t,e,r){\"use strict\";var n=t(\"gl-mat4\");r.init2dArray=function(t,e){for(var r=new Array(t),n=0;ne/2?t-Math.round(t/e)*e:t}}},{}],511:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./array\").isArrayOrTypedArray;function a(t,e){return function(){var r,n,o,s,l,c=t;for(s=0;s/g),l=0;la||c===i||cs)&&(!e||!l(t))}:function(t,e){var l=t[0],c=t[1];if(l===i||la||c===i||cs)return!1;var u,f,h,p,d,g=r.length,m=r[0][0],v=r[0][1],y=0;for(u=1;uMath.max(f,m)||c>Math.max(h,v)))if(cu||Math.abs(n(o,h))>i)return!0;return!1},a.filter=function(t,e){var r=[t[0]],n=0,i=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c1&&o(t.pop());return{addPt:o,raw:t,filtered:r}}},{\"../constants/numerical\":479,\"./matrix\":509}],516:[function(t,e,r){(function(r){(function(){\"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}n.regl||(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)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./show_no_webgl_msg\":525,regl:283}],517:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"is-mobile\");e.exports=function(t){var e;if(\"string\"!=typeof(e=t&&t.hasOwnProperty(\"userAgent\")?t.userAgent:function(){var t;\"undefined\"!=typeof navigator&&(t=navigator.userAgent);t&&t.headers&&\"string\"==typeof t.headers[\"user-agent\"]&&(t=t.headers[\"user-agent\"]);return t}()))return!0;var r=i({ua:{headers:{\"user-agent\":e}},tablet:!0,featureDetect:!1});if(!r)for(var a=e.split(\" \"),o=1;o-1;s--){var l=a[s];if(\"Version/\"===l.substr(0,8)){var c=l.substr(8).split(\".\")[0];if(n(c)&&(c=+c),c>=13)return!0}}}return r}},{\"fast-isnumeric\":190,\"is-mobile\":234}],518:[function(t,e,r){\"use strict\";e.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;ni.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(!(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=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function u(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,o,f=0,h=e.length,p=0,d=h>1?(e[h-1]-e[0])/(h-1):1;for(o=d>=0?r?s:l:r?u:c,t+=1e-9*d*(r?-1:1)*(d>=0?1:-1);f90&&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,n=t.slice();for(n.sort(r.sorterAsc),e=n.length-1;e>-1&&n[e]===o;e--);for(var i,a=n[e]-n[0]||1,s=a/(e||1)/1e4,l=[],c=0;c<=e;c++){var u=n[c],f=u-i;void 0===i?(l.push(u),i=u):f>s&&(a=Math.min(a,f),l.push(u),i=u)}return{vals:l,minDiff:a}},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;i0&&(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;ia.length)&&(o=a.length),n(e)||(e=!1),i(a[0])){for(l=new Array(o),s=0;st.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{\"./array\":485,\"fast-isnumeric\":190}],528:[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\":89}],529:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../lib\"),a=i.strTranslate,o=t(\"../constants/xmlns_namespaces\"),s=t(\"../constants/alignment\").LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,d){var A=t.text(),M=!t.attr(\"data-notex\")&&\"undefined\"!=typeof MathJax&&A.match(l),L=n.select(t.node().parentNode);if(!L.empty()){var C=t.attr(\"class\")?t.attr(\"class\").split(\" \")[0]:\"text\";return C+=\"-math\",L.selectAll(\"svg.\"+C).remove(),L.selectAll(\"g.\"+C+\"-group\").remove(),t.style(\"display\",null).attr({\"data-unformatted\":A,\"data-math\":\"N\"}),M?(e&&e._promises||[]).push(new Promise((function(e){t.style(\"display\",\"none\");var r=parseInt(t.node().style.fontSize,10),o={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)}))}(M[2],o,(function(n,i,o){L.selectAll(\"svg.\"+C).remove(),L.selectAll(\"g.\"+C+\"-group\").remove();var s=n&&n.select(\"svg\");if(!s||!s.node())return P(),void e();var l=L.append(\"g\").classed(C+\"-group\",!0).attr({\"pointer-events\":\"none\",\"data-unformatted\":A,\"data-math\":\"Y\"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var c=o.width,u=o.height;s.attr({class:C,height:u,preserveAspectRatio:\"xMinYMin meet\"}).style({overflow:\"visible\",\"pointer-events\":\"none\"});var f=t.node().style.fill||\"black\",h=s.select(\"g\");h.attr({fill:f,stroke:f});var p=h.node().getBoundingClientRect(),g=p.width,m=p.height;(g>c||m>u)&&(s.style(\"overflow\",\"hidden\"),g=(p=s.node().getBoundingClientRect()).width,m=p.height);var v=+t.attr(\"x\"),y=+t.attr(\"y\"),x=-(r||t.node().getBoundingClientRect().height)/4;if(\"y\"===C[0])l.attr({transform:\"rotate(\"+[-90,v,y]+\")\"+a(-g/2,x-m/2)});else if(\"l\"===C[0])y=x-m/2;else if(\"a\"===C[0]&&0!==C.indexOf(\"atitle\"))v=0,y=x;else{var b=t.attr(\"text-anchor\");v-=g*(\"middle\"===b?.5:\"end\"===b?1:0),y=y+x-m/2}s.attr({x:v,y:y}),d&&d.call(t,l),e(l)}))}))):P(),t}function P(){L.empty()||(C=t.attr(\"class\")+\"-math\",L.select(\"svg.\"+C).remove()),t.text(\"\").style(\"white-space\",\"pre\"),function(t,e){e=e.replace(g,\" \");var r,a=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(o.svg,\"tspan\");n.select(e).attr({class:\"line\",dy:c*s+\"em\"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var a=1;a doesnt match end tag <\"+t+\">. Pretending it did match.\",e),r=l[l.length-1].node}else i.log(\"Ignoring unexpected end tag .\",e)}y.test(e)?u():(r=t,l=[{node:t}]);for(var L=e.split(m),C=0;C|>|>)/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=[\"http:\",\"https:\",\"mailto:\",\"\",void 0,\":\"],g=r.NEWLINES=/(\\r\\n?|\\n)/g,m=/(<[^<>]*>)/,v=/<(\\/?)([^ >]*)(\\s+(.*))?>/i,y=//i;r.BR_TAG_ALL=//gi;var x=/(^|[\\s\"'])style\\s*=\\s*(\"([^\"]*);?\"|'([^']*);?')/i,b=/(^|[\\s\"'])href\\s*=\\s*(\"([^\"]*)\"|'([^']*)')/i,_=/(^|[\\s\"'])target\\s*=\\s*(\"([^\"\\s]*)\"|'([^'\\s]*)')/i,w=/(^|[\\s\"'])popup\\s*=\\s*(\"([\\w=,]*)\"|'([\\w=,]*)')/i;function T(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&S(n)}var k=/(^|;)\\s*color:/;r.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:[\"br\"],i=\"...\".length,a=t.split(m),o=[],s=\"\",l=0,c=0;ci?o.push(u.substr(0,d-i)+\"...\"):o.push(u.substr(0,d));break}s=\"\"}}return o.join(\"\")};var A={mu:\"\\u03bc\",amp:\"&\",lt:\"<\",gt:\">\",nbsp:\"\\xa0\",times:\"\\xd7\",plusmn:\"\\xb1\",deg:\"\\xb0\"},M=/&(#\\d+|#x[\\da-fA-F]+|[a-z]+);/g;function S(t){return t.replace(M,(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)):A[e])||t}))}function E(t){var e=encodeURI(decodeURI(t)),r=document.createElement(\"a\"),n=document.createElement(\"a\");r.href=t,n.href=e;var i=r.protocol,a=n.protocol;return-1!==d.indexOf(i)&&-1!==d.indexOf(a)?e:\"\"}function L(t,e,r){var n,a,o,s=r.horizontalAlign,l=r.verticalAlign||\"top\",c=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return a=\"bottom\"===l?function(){return c.bottom-n.height}:\"middle\"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},o=\"right\"===s?function(){return c.right-n.width}:\"center\"===s?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var t=o()-u.left,e=a()-u.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+\"px\",left:t+\"px\",\"z-index\":1e3}),this}}r.convertEntities=S,r.sanitizeHTML=function(t){t=t.replace(g,\" \");for(var e=document.createElement(\"p\"),r=e,i=[],a=t.split(m),o=0;oa.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)}},{}],531:[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\":190}],532:[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\":587,\"topojson-client\":315}],533:[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\"}}},{}],534:[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\"}}},{}],535:[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;s0&&o.log(\"Clearing previous rejected promises from queue.\"),t._promises=[]},r.cleanLayout=function(t){var e,n;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 a=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,f=(s.subplotsRegistry.ternary||{}).attrRegex,h=(s.subplotsRegistry.gl3d||{}).attrRegex,g=Object.keys(t);for(e=0;e3?(O.x=1.02,O.xanchor=\"left\"):O.x<-2&&(O.x=-.02,O.xanchor=\"right\"),O.y>3?(O.y=1.02,O.yanchor=\"bottom\"):O.y<-2&&(O.y=-.02,O.yanchor=\"top\")),d(t),\"rotate\"===t.dragmode&&(t.dragmode=\"orbit\"),c.clean(t),t.template&&t.template.layout&&r.cleanLayout(t.template.layout),t},r.cleanData=function(t){for(var e=0;e0)return t.substr(0,e)}r.hasParent=function(t,e){for(var r=b(e);r;){if(r in t)return!0;r=b(r)}return!1};var _=[\"x\",\"y\",\"z\"];r.clearAxisTypes=function(t,e,r){for(var n=0;n1&&a.warn(\"Full array edits are incompatible with other edits\",f);var y=r[\"\"][\"\"];if(c(y))e.set(null);else{if(!Array.isArray(y))return a.warn(\"Unrecognized full array edit value\",f,y),!0;e.set(y)}return!g&&(h(m,v),p(t),!0)}var x,b,_,w,T,k,A,M,S=Object.keys(r).map(Number).sort(o),E=e.get(),L=E||[],C=u(v,f).get(),P=[],I=-1,O=L.length;for(x=0;xL.length-(A?0:1))a.warn(\"index out of range\",f,_);else if(void 0!==k)T.length>1&&a.warn(\"Insertion & removal are incompatible with edits to the same index.\",f,_),c(k)?P.push(_):A?(\"add\"===k&&(k={}),L.splice(_,0,k),C&&C.splice(_,0,{})):a.warn(\"Unrecognized full object edit value\",f,_,k),-1===I&&(I=_);else for(b=0;b=0;x--)L.splice(P[x],1),C&&C.splice(P[x],1);if(L.length?E||e.set(L):e.set(null),g)return!1;if(h(m,v),d!==i){var z;if(-1===I)z=S;else{for(O=Math.max(L.length,O),z=[],x=0;x=I);x++)z.push(_);for(x=I;x=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(void 0===e)throw new Error(\"currentIndices is a required argument.\");if(Array.isArray(e)||(e=[e]),P(t,e,\"currentIndices\"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&P(t,r,\"newIndices\"),void 0!==r&&e.length!==r.length)throw new Error(\"current and new indices must be of equal length.\")}function O(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(void 0===r)throw new Error(\"indices must be an integer or array of integers\");for(var a in P(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 l=function(t,e,r,n){var a,l,c,u,f,h=o.isPlainObject(n),p=[];for(var d in Array.isArray(r)||(r=[r]),r=C(r,t.data.length-1),e)for(var g=0;g-1&&-1===r.indexOf(\"grouptitlefont\")?l(r,r.replace(\"titlefont\",\"title.font\")):r.indexOf(\"titleposition\")>-1?l(r,r.replace(\"titleposition\",\"title.position\")):r.indexOf(\"titleside\")>-1?l(r,r.replace(\"titleside\",\"title.side\")):r.indexOf(\"titleoffset\")>-1&&l(r,r.replace(\"titleoffset\",\"title.offset\")):l(r,r.replace(\"title\",\"title.text\"));function l(e,r){t[r]=t[e],delete t[e]}}function U(t,e,r){t=o.getGraphDiv(t),_.clearPromiseQueue(t);var n={};if(\"string\"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn(\"Relayout fail.\",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=W(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[h.previousPromises];a.layoutReplot?s.push(w.layoutReplot):Object.keys(n).length&&(V(t,a,i)||h.supplyDefaults(t),a.legend&&s.push(w.doLegend),a.layoutstyle&&s.push(w.layoutStyles),a.axrange&&H(s,i.rangesAltered),a.ticks&&s.push(w.doTicksRelayout),a.modebar&&s.push(w.doModeBar),a.camera&&s.push(w.doCamera),a.colorbars&&s.push(w.doColorBars),s.push(M)),s.push(h.rehover,h.redrag),c.add(t,U,[t,i.undoit],U,[t,i.redoit]);var l=o.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit(\"plotly_relayout\",i.eventData),t}))}function V(t,e,r){var n=t._fullLayout;if(!e.axrange)return!1;for(var i in e)if(\"axrange\"!==i&&e[i])return!1;for(var a in r.rangesAltered){var o=p.id2name(a),s=t.layout[o],l=n[o];if(l.autorange=s.autorange,s.range&&(l.range=s.range.slice()),l.cleanRange(),l._matchGroup)for(var c in l._matchGroup)if(c!==a){var u=n[p.id2name(c)];u.autorange=l.autorange,u.range=l.range.slice(),u._input.range=l.range.slice()}}return!0}function H(t,e){var r=e?function(t){var r=[],n=!0;for(var i in e){var a=p.getFromId(t,i);if(r.push(i),-1!==(a.ticklabelposition||\"\").indexOf(\"inside\")&&a._anchorAxis&&r.push(a._anchorAxis._id),a._matchGroup)for(var o in a._matchGroup)e[o]||r.push(o);a.automargin&&(n=!1)}return p.draw(t,r,{skipTitle:n})}:function(t){return p.draw(t,\"redraw\")};t.push(y,w.doAutoRangeAndConstraints,r,w.drawData,w.finalDraw)}var q=/^[xyz]axis[0-9]*\\.range(\\[[0|1]\\])?$/,G=/^[xyz]axis[0-9]*\\.autorange$/,Y=/^[xyz]axis[0-9]*\\.domain(\\[[0|1]\\])?$/;function W(t,e){var r,n,i,a=t.layout,l=t._fullLayout,c=l._guiEditing,h=F(l._preGUI,c),d=Object.keys(e),g=p.list(t),m=o.extendDeepAll({},e),v={};for(j(e),d=Object.keys(e),n=0;n0&&\"string\"!=typeof O.parts[D];)D--;var B=O.parts[D],N=O.parts[D-1]+\".\"+B,U=O.parts.slice(0,D).join(\".\"),V=s(t.layout,U).get(),H=s(l,U).get(),W=O.get();if(void 0!==z){M[I]=z,S[I]=\"reverse\"===B?z:R(W);var Z=f.getLayoutValObject(l,O.parts);if(Z&&Z.impliedEdits&&null!==z)for(var J in Z.impliedEdits)E(o.relativeAttr(I,J),Z.impliedEdits[J]);if(-1!==[\"width\",\"height\"].indexOf(I))if(z){E(\"autosize\",null);var K=\"height\"===I?\"width\":\"height\";E(K,l[K])}else l[I]=t._initialAutoSize[I];else if(\"autosize\"===I)E(\"width\",z?null:l.width),E(\"height\",z?null:l.height);else if(N.match(q))P(N),s(l,U+\"._inputRange\").set(null);else if(N.match(G)){P(N),s(l,U+\"._inputRange\").set(null);var Q=s(l,U).get();Q._inputDomain&&(Q._input.domain=Q._inputDomain.slice())}else N.match(Y)&&s(l,U+\"._inputDomain\").set(null);if(\"type\"===B){L=V;var $=\"linear\"===H.type&&\"log\"===z,tt=\"log\"===H.type&&\"linear\"===z;if($||tt){if(L&&L.range)if(H.autorange)$&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var et=L.range[0],rt=L.range[1];$?(et<=0&&rt<=0&&E(U+\".autorange\",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),E(U+\".range[0]\",Math.log(et)/Math.LN10),E(U+\".range[1]\",Math.log(rt)/Math.LN10)):(E(U+\".range[0]\",Math.pow(10,et)),E(U+\".range[1]\",Math.pow(10,rt)))}else E(U+\".autorange\",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[O.parts[0]]&&\"radialaxis\"===O.parts[1]&&delete l[O.parts[0]]._subplot.viewInitial[\"radialaxis.range\"],u.getComponentMethod(\"annotations\",\"convertCoords\")(t,H,z,E),u.getComponentMethod(\"images\",\"convertCoords\")(t,H,z,E)}else E(U+\".autorange\",!0),E(U+\".range\",null);s(l,U+\"._inputRange\").set(null)}else if(B.match(k)){var nt=s(l,I).get(),it=(z||{}).type;it&&\"-\"!==it||(it=\"linear\"),u.getComponentMethod(\"annotations\",\"convertCoords\")(t,nt,it,E),u.getComponentMethod(\"images\",\"convertCoords\")(t,nt,it,E)}var at=b.containerArrayMatch(I);if(at){r=at.array,n=at.index;var ot=at.property,st=Z||{editType:\"calc\"};\"\"!==n&&\"\"===ot&&(b.isAddVal(z)?S[I]=null:b.isRemoveVal(z)?S[I]=(s(a,r).get()||[])[n]:o.warn(\"unrecognized full object value\",e)),T.update(A,st),v[r]||(v[r]={});var lt=v[r][n];lt||(lt=v[r][n]={}),lt[ot]=z,delete e[I]}else\"reverse\"===B?(V.range?V.range.reverse():(E(U+\".autorange\",!0),V.range=[1,0]),H.autorange?A.calc=!0:A.plot=!0):(l._has(\"scatter-like\")&&l._has(\"regl\")&&\"dragmode\"===I&&(\"lasso\"===z||\"select\"===z)&&\"lasso\"!==W&&\"select\"!==W||l._has(\"gl2d\")?A.plot=!0:Z?T.update(A,Z):A.calc=!0,O.set(z))}}for(r in v){b.applyContainerArrayChanges(t,h(a,r),v[r],A,h)||(A.plot=!0)}for(var ct in C){var ut=(L=p.getFromId(t,ct))&&L._constraintGroup;if(ut)for(var ft in A.calc=!0,ut)C[ft]||(p.getFromId(t,ft)._constraintShrinkable=!0)}return(X(t)||e.height||e.width)&&(A.plot=!0),(A.plot||A.calc)&&(A.layoutReplot=!0),{flags:A,rangesAltered:C,undoit:S,redoit:M,eventData:m}}function X(t){var e=t._fullLayout,r=e.width,n=e.height;return t.layout.autosize&&h.plotAutoSize(t,t.layout,e),e.width!==r||e.height!==n}function Z(t,e,n,i){t=o.getGraphDiv(t),_.clearPromiseQueue(t),o.isPlainObject(e)||(e={}),o.isPlainObject(n)||(n={}),Object.keys(e).length&&(t.changed=!0),Object.keys(n).length&&(t.changed=!0);var a=_.coerceTraceIndices(t,i),s=N(t,o.extendFlat({},e),a),l=s.flags,u=W(t,o.extendFlat({},n)),f=u.flags;(l.calc||f.calc)&&(t.calcdata=void 0),l.clearAxisTypes&&_.clearAxisTypes(t,a,n);var p=[];f.layoutReplot?p.push(w.layoutReplot):l.fullReplot?p.push(r._doPlot):(p.push(h.previousPromises),V(t,f,u)||h.supplyDefaults(t),l.style&&p.push(w.doTraceStyle),(l.colorbars||f.colorbars)&&p.push(w.doColorBars),f.legend&&p.push(w.doLegend),f.layoutstyle&&p.push(w.layoutStyles),f.axrange&&H(p,u.rangesAltered),f.ticks&&p.push(w.doTicksRelayout),f.modebar&&p.push(w.doModeBar),f.camera&&p.push(w.doCamera),p.push(M)),p.push(h.rehover,h.redrag),c.add(t,Z,[t,s.undoit,u.undoit,s.traces],Z,[t,s.redoit,u.redoit,s.traces]);var d=o.syncOrAsync(p,t);return d&&d.then||(d=Promise.resolve(t)),d.then((function(){return t.emit(\"plotly_update\",{data:s.eventData,layout:u.eventData}),t}))}function J(t){return function(e){e._fullLayout._guiEditing=!0;var r=t.apply(null,arguments);return e._fullLayout._guiEditing=!1,r}}var K=[{pattern:/^hiddenlabels/,attr:\"legend.uirevision\"},{pattern:/^((x|y)axis\\d*)\\.((auto)?range|title\\.text)/},{pattern:/axis\\d*\\.showspikes$/,attr:\"modebar.uirevision\"},{pattern:/(hover|drag)mode$/,attr:\"modebar.uirevision\"},{pattern:/^(scene\\d*)\\.camera/},{pattern:/^(geo\\d*)\\.(projection|center|fitbounds)/},{pattern:/^(ternary\\d*\\.[abc]axis)\\.(min|title\\.text)$/},{pattern:/^(polar\\d*\\.radialaxis)\\.((auto)?range|angle|title\\.text)/},{pattern:/^(polar\\d*\\.angularaxis)\\.rotation/},{pattern:/^(mapbox\\d*)\\.(center|zoom|bearing|pitch)/},{pattern:/^legend\\.(x|y)$/,attr:\"editrevision\"},{pattern:/^(shapes|annotations)/,attr:\"editrevision\"},{pattern:/^title\\.text$/,attr:\"editrevision\"}],Q=[{pattern:/^selectedpoints$/,attr:\"selectionrevision\"},{pattern:/(^|value\\.)visible$/,attr:\"legend.uirevision\"},{pattern:/^dimensions\\[\\d+\\]\\.constraintrange/},{pattern:/^node\\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\\.)name$/},{pattern:/colorbar\\.title\\.text$/},{pattern:/colorbar\\.(x|y)$/,attr:\"editrevision\"}];function $(t,e){for(var r=0;r1;)if(n.pop(),void 0!==(r=s(e,n.join(\".\")+\".uirevision\").get()))return r;return e.uirevision}function et(t,e){for(var r=0;r=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 f(){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,h.transition(t,e.frame.data,e.frame.layout,_.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&&f()};e()}var d,g,m=0;function v(t){return Array.isArray(i)?m>=i.length?t.transitionOpts=i[m]:t.transitionOpts=i[0]:t.transitionOpts=i,m++,t}var y=[],x=null==e,b=Array.isArray(e);if(!x&&!b&&o.isPlainObject(e))y.push({type:\"object\",data:v(o.extendFlat({},e))});else if(x||-1!==[\"string\",\"number\"].indexOf(typeof e))for(d=0;d0&&kk)&&A.push(g);y=A}}y.length>0?function(e){if(0!==e.length){for(var i=0;i=0;n--)if(o.isPlainObject(e[n])){var g=e[n].name,m=(u[g]||d[g]||{}).name,v=e[n].name,y=u[m]||d[m];m&&v&&\"number\"==typeof v&&y&&A<5&&(A++,o.warn('addFrames: overwriting frame \"'+(u[m]||d[m]).name+'\" with a frame whose name of type \"number\" also equates to \"'+m+'\". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===A&&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:h.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}p.sort((function(t,e){return t.index>e.index?-1:t.index=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=0;r--)n=e[r],a.push({type:\"delete\",index:n}),s.unshift({type:\"insert\",index:n,value:i[n]});var l=h.modifyFrames,u=h.modifyFrames,f=[t,s],p=[t,a];return c&&c.add(t,l,f,u,p),h.modifyFrames(t,a)},r.addTraces=function t(e,n,i){e=o.getGraphDiv(e);var a,s,l=[],u=r.deleteTraces,f=t,h=[e,l],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(void 0===e)throw new Error(\"traces must be defined.\");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!y(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function y(t){return t===Math.round(t)&&t>=0}function x(){var t,e,r={};for(t in f(r,o),n.subplotsRegistry){if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i=l.length)return!1;i=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else{var u=t._module;if(u||(u=(n.modules[t.type||a.type.dflt]||{})._module),!u)return!1;if(!(i=(r=u.attributes)&&r[o])){var f=u.basePlotModule;f&&f.attributes&&(i=f.attributes[o])}i||(i=a[o])}return v(i,e,s)},r.getLayoutValObject=function(t,e){return v(function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var c;for(r=0;r=i&&(r._input||{})._templateitemname;o&&(a=i);var s,l=e+\"[\"+a+\"]\";function c(){s={},o&&(s[l]={},s[l].templateitemname=o)}function u(t,e){o?n.nestedProperty(s[l],t).set(e):s[l+\".\"+t]=e}function f(){var t=s;return c(),t}return c(),{modifyBase:function(t,e){s[t]=e},modifyItem:u,getUpdateObj:f,applyUpdate:function(e,r){e&&u(e,r);var i=f();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},{\"../lib\":503,\"../plots/attributes\":550}],544:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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,m=d.clean,v=t(\"../plots/cartesian/autorange\").doAutoRange;function y(t,e,r){for(var n=0;n=t[1]||i[1]<=t[0])&&(a[0]e[0]))return!0}return!1}function x(t){var e,i,s,u,d,g,m=t._fullLayout,v=m._size,x=v.p,_=h.list(t,\"\",!0);if(m._paperdiv.style({width:t._context.responsive&&m.autosize&&!t._context._hasZeroWidth&&!t.layout.width?\"100%\":m.width+\"px\",height:t._context.responsive&&m.autosize&&!t._context._hasZeroHeight&&!t.layout.height?\"100%\":m.height+\"px\"}).selectAll(\".main-svg\").call(c.setSize,m.width,m.height),t._context.setBackground(t,m.paper_bgcolor),r.drawMainTitle(t),f.manage(t),!m._has(\"cartesian\"))return a.previousPromises(t);function T(t,e,r){var n=t._lw/2;return\"x\"===t._id.charAt(0)?e?\"top\"===r?e._offset-x-n:e._offset+e._length+x+n:v.t+v.h*(1-(t.position||0))+n%1:e?\"right\"===r?e._offset+e._length+x+n:e._offset-x-n:v.l+v.w*(t.position||0)+n%1}for(e=0;e<_.length;e++){var k=(u=_[e])._anchorAxis;u._linepositions={},u._lw=c.crispRound(t,u.linewidth,1),u._mainLinePosition=T(u,k,u.side),u._mainMirrorPosition=u.mirror&&k?T(u,k,p.OPPOSITE_SIDE[u.side]):null}var A=[],M=[],S=[],E=1===l.opacity(m.paper_bgcolor)&&1===l.opacity(m.plot_bgcolor)&&m.paper_bgcolor===m.plot_bgcolor;for(i in m._plots)if((s=m._plots[i]).mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var L=s.xaxis.domain,C=s.yaxis.domain,P=s.plotgroup;if(y(L,C,S)){var I=P.node(),O=s.bg=o.ensureSingle(P,\"rect\",\"bg\");I.insertBefore(O.node(),I.childNodes[0]),M.push(i)}else P.select(\"rect.bg\").remove(),S.push([L,C]),E||(A.push(i),M.push(i))}var z,D,R,F,B,N,j,U,V,H,q,G,Y,W=m._bgLayer.selectAll(\".bg\").data(A);for(W.enter().append(\"rect\").classed(\"bg\",!0),W.exit().remove(),W.each((function(t){m._plots[t].bg=n.select(this)})),e=0;eT?u.push({code:\"unused\",traceType:y,templateCount:w,dataCount:T}):T>w&&u.push({code:\"reused\",traceType:y,templateCount:w,dataCount:T})}}else u.push({code:\"data\"});if(function t(e,r){for(var n in e)if(\"_\"!==n.charAt(0)){var a=e[n],o=g(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)&&m(a)&&t(a,o)}}({data:p,layout:h},\"\"),u.length)return u.map(v)}},{\"../lib\":503,\"../plots/attributes\":550,\"../plots/plots\":619,\"./plot_config\":541,\"./plot_schema\":542,\"./plot_template\":543}],546:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./plot_api\"),a=t(\"../plots/plots\"),o=t(\"../lib\"),s=t(\"../snapshot/helpers\"),l=t(\"../snapshot/tosvg\"),c=t(\"../snapshot/svgtoimg\"),u=t(\"../version\").version,f={format:{valType:\"enumerated\",values:[\"png\",\"jpeg\",\"webp\",\"svg\",\"full-json\"],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}};e.exports=function(t,e){var r,h,p,d;function g(t){return!(t in e)||o.validate(e[t],f[t])}if(e=e||{},o.isPlainObject(t)?(r=t.data||[],h=t.layout||{},p=t.config||{},d={}):(t=o.getGraphDiv(t),r=o.extendDeep([],t.data),h=o.extendDeep({},t.layout),p=t._context,d=t._fullLayout||{}),!g(\"width\")&&null!==e.width||!g(\"height\")&&null!==e.height)throw new Error(\"Height and width should be pixel values.\");if(!g(\"format\"))throw new Error(\"Export format is not \"+o.join2(f.format.values,\", \",\" or \")+\".\");var m={};function v(t,r){return o.coerce(e,m,f,t,r)}var y=v(\"format\"),x=v(\"width\"),b=v(\"height\"),_=v(\"scale\"),w=v(\"setBackground\"),T=v(\"imageDataOnly\"),k=document.createElement(\"div\");k.style.position=\"absolute\",k.style.left=\"-5000px\",document.body.appendChild(k);var A=o.extendFlat({},h);x?A.width=x:null===e.width&&n(d.width)&&(A.width=d.width),b?A.height=b:null===e.height&&n(d.height)&&(A.height=d.height);var M=o.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=s.getRedrawFunc(k);function E(){return new Promise((function(t){setTimeout(t,s.getDelay(k._fullLayout))}))}function L(){return new Promise((function(t,e){var r=l(k,y,_),n=k._fullLayout.width,f=k._fullLayout.height;function h(){i.purge(k),document.body.removeChild(k)}if(\"full-json\"===y){var p=a.graphJson(k,!1,\"keepdata\",\"object\",!0,!0);return p.version=u,p=JSON.stringify(p),h(),t(T?p:s.encodeJSON(p))}if(h(),\"svg\"===y)return t(T?r:s.encodeSVG(r));var d=document.createElement(\"canvas\");d.id=o.randstr(),c({format:y,width:n,height:f,scale:_,canvas:d,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.newPlot(k,r,A,M).then(S).then(E).then(L).then((function(e){t(function(t){return T?t.replace(s.IMAGE_URL_PREFIX,\"\"):t}(e))})).catch((function(t){e(t)}))}))}},{\"../lib\":503,\"../plots/plots\":619,\"../snapshot/helpers\":642,\"../snapshot/svgtoimg\":644,\"../snapshot/tosvg\":646,\"../version\":1119,\"./plot_api\":540,\"fast-isnumeric\":190}],547:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plots/plots\"),a=t(\"./plot_schema\"),o=t(\"./plot_config\").dfltConfig,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;hx.length&&i.push(d(\"unused\",a,v.concat(x.length)));var A,M,S,E,L,C=x.length,P=Array.isArray(k);if(P&&(C=Math.min(C,k.length)),2===b.dimensions)for(M=0;Mx[M].length&&i.push(d(\"unused\",a,v.concat(M,x[M].length)));var I=x[M].length;for(A=0;A<(P?Math.min(I,k[M].length):I);A++)S=P?k[M][A]:k,E=y[M][A],L=x[M][A],n.validate(E,S)?L!==E&&L!==+E&&i.push(d(\"dynamic\",a,v.concat(M,A),E,L)):i.push(d(\"value\",a,v.concat(M,A),E))}else i.push(d(\"array\",a,v.concat(M),y[M]));else for(M=0;M1&&p.push(d(\"object\",\"layout\"))),i.supplyDefaults(g);for(var m=g._fullData,v=r.length,y=0;y0&&Math.round(f)===f))return{vals:i};c=f}for(var h=e.calendar,p=\"start\"===l,d=\"end\"===l,g=t[r+\"period0\"],m=a(g,h)||0,v=[],y=[],x=[],b=i.length,_=0;_A;)k=o(k,-c,h);for(;k<=A;)k=o(k,c,h);T=o(k,-c,h)}else{for(k=m+(w=Math.round((A-m)/u))*u;k>A;)k-=u;for(;k<=A;)k+=u;T=k-u}v[_]=p?T:d?k:(T+k)/2,y[_]=T,x[_]=k}return{vals:v,starts:y,ends:x}}},{\"../../constants/numerical\":479,\"../../lib\":503,\"fast-isnumeric\":190}],552:[function(t,e,r){\"use strict\";e.exports={xaxis:{valType:\"subplotid\",dflt:\"x\",editType:\"calc+clearAxisTypes\"},yaxis:{valType:\"subplotid\",dflt:\"y\",editType:\"calc+clearAxisTypes\"}}},{}],553:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../lib\"),o=t(\"../../constants/numerical\").FP_SAFE,s=t(\"../../registry\"),l=t(\"../../components/drawing\"),c=t(\"./axis_ids\"),u=c.getFromId,f=c.isLinked;function h(t,e){var r,n,i=[],o=t._fullLayout,s=d(o,e,0),l=d(o,e,1),c=g(t,e),u=c.min,f=c.max;if(0===u.length||0===f.length)return a.simpleMap(e.range,e.r2l);var h=u[0].val,m=f[0].val;for(r=1;r0&&((T=E-s(x)-l(b))>L?k/T>C&&(_=x,w=b,C=k/T):k/E>C&&(_={val:x.val,nopad:1},w={val:b.val,nopad:1},C=k/E));if(h===m){var P=h-1,I=h+1;if(M)if(0===h)i=[0,1];else{var O=(h>0?f:u).reduce((function(t,e){return Math.max(t,l(e))}),0),z=h/(1-Math.min(.5,O/E));i=h>0?[0,z]:[z,0]}else i=S?[Math.max(0,P),Math.max(1,I)]:[P,I]}else M?(_.val>=0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:0,nopad:1})):S&&(_.val-C*s(_)<0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:1,nopad:1})),C=(w.val-_.val-p(e,x.val,b.val))/(E-s(_)-l(w)),i=[_.val-C*s(_),w.val+C*l(w)];return v&&i.reverse(),a.simpleMap(i,e.l2r||Number)}function p(t,e,r){var n=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),S=A((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=A(r.vpadplus||r.vpad),L=A(r.vpadminus||r.vpad);if(!T){if(h=1/0,p=-1/0,w)for(n=0;n0&&(h=a),a>p&&a-o&&(h=a),a>p&&a=I;n--)P(n);return{min:d,max:g,opts:r}},concatExtremes:g};function g(t,e,r){var n,i,a,o=e._id,s=t._fullData,l=t._fullLayout,c=[],f=[];function h(t,e){for(n=0;n=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 x(t){return i(t)&&Math.abs(t)=e}},{\"../../components/drawing\":388,\"../../constants/numerical\":479,\"../../lib\":503,\"../../registry\":638,\"./axis_ids\":558,\"@plotly/d3\":58,\"fast-isnumeric\":190}],554:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../plots/plots\"),o=t(\"../../registry\"),s=t(\"../../lib\"),l=s.strTranslate,c=t(\"../../lib/svg_text_utils\"),u=t(\"../../components/titles\"),f=t(\"../../components/color\"),h=t(\"../../components/drawing\"),p=t(\"./layout_attributes\"),d=t(\"./clean_ticks\"),g=t(\"../../constants/numerical\"),m=g.ONEMAXYEAR,v=g.ONEAVGYEAR,y=g.ONEMINYEAR,x=g.ONEMAXQUARTER,b=g.ONEAVGQUARTER,_=g.ONEMINQUARTER,w=g.ONEMAXMONTH,T=g.ONEAVGMONTH,k=g.ONEMINMONTH,A=g.ONEWEEK,M=g.ONEDAY,S=M/2,E=g.ONEHOUR,L=g.ONEMIN,C=g.ONESEC,P=g.MINUS_SIGN,I=g.BADNUM,O={K:\"zeroline\"},z={K:\"gridline\",L:\"path\"},D={K:\"tick\",L:\"path\"},R={K:\"tick\",L:\"text\"},F=t(\"../../constants/alignment\"),B=F.MID_SHIFT,N=F.CAP_SHIFT,j=F.LINE_SPACING,U=F.OPPOSITE_SIDE,V=e.exports={};V.setConvert=t(\"./set_convert\");var H=t(\"./axis_autotype\"),q=t(\"./axis_ids\"),G=q.idSort,Y=q.isLinked;V.id2name=q.id2name,V.name2id=q.name2id,V.cleanId=q.cleanId,V.list=q.list,V.listIds=q.listIds,V.getFromId=q.getFromId,V.getFromTrace=q.getFromTrace;var W=t(\"./autorange\");V.getAutoRange=W.getAutoRange,V.findExtremes=W.findExtremes;function X(t){var e=1e-4*(t[1]-t[0]);return[t[0]-e,t[1]+e]}V.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]||(\"string\"==typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(t){return t+\" domain\"}))),u[c]={valType:\"enumerated\",values:l.concat(a?\"string\"==typeof a?[a]:a:[]),dflt:i},s.coerce(t,e,u,c)},V.getRefType=function(t){return void 0===t?t:\"paper\"===t?\"paper\":\"pixel\"===t?\"pixel\":/( domain)$/.test(t)?\"domain\":\"range\"},V.coercePosition=function(t,e,r,n,i,a){var o,l;if(\"range\"!==V.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var c=V.getFromId(e,n);l=r(i,a=c.fraction2r(a)),o=c.cleanPos}t[i]=o(l)},V.cleanPosition=function(t,e,r){return(\"paper\"===r||\"pixel\"===r?s.ensureNumber:V.getFromId(e,r).cleanPos)(t)},V.redrawComponents=function(t,e){e=e||V.listIds(t);var r=t._fullLayout;function n(n,i,a,s){for(var l=o.getComponentMethod(n,i),c={},u=0;u2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},V.saveRangeInitial=function(t,e){for(var r=V.list(t,\"\",!0),n=!1,i=0;i.3*h||u(n)||u(a))){var p=r.dtick/2;t+=t+p.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=V.tickIncrement(t,\"M6\",\"reverse\")+1.5*M:a.exactMonths>.8?t=V.tickIncrement(t,\"M1\",\"reverse\")+15.5*M:t-=S;var l=V.tickIncrement(t,r);if(l<=n)return l}return t}(y,t,v,c,a)),m=y,0;m<=u;)m=V.tickIncrement(m,v,!1,a);return{start:e.c2r(y,0,a),end:e.c2r(m,0,a),size:v,_dataSpan:u-c}},V.prepTicks=function(t,e){var r=s.simpleMap(t.range,t.r2l,void 0,void 0,e);if(t._dtickInit=t.dtick,t._tick0Init=t.tick0,\"auto\"===t.tickmode||!t.dtick){var n,a=t.nticks;a||(\"category\"===t.type||\"multicategory\"===t.type?(n=t.tickfont?s.bigFont(t.tickfont.size||12):15,a=t._length/n):(n=\"y\"===t._id.charAt(0)?40:80,a=s.constrain(t._length/n,4,9)+1),\"radialaxis\"===t._name&&(a*=2)),\"array\"===t.tickmode&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,V.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}\"period\"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||\"M\"!==t.dtick.charAt(0))}var n=r(),a=V.getTickFormat(t);if(a){var o=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(e=E,o&&!n&&t.dticka&&f=o:d<=o;d=V.tickIncrement(d,t.dtick,l,t.calendar)){if(R++,t.rangebreaks&&!l){if(d=u)break}if(P.length>C||d===O)break;O=d;var F=!1;h&&d!==(0|d)&&(F=!0);var B={minor:F,value:d};L>1&&R%L&&(B.skipLabel=!0),P.push(B)}if(p&&function(t,e,r){for(var n=0;n0?(a=n-1,o=n):(a=n,o=n);var s,l=t[a].value,c=t[o].value,u=Math.abs(c-l),f=r||u,h=0;f>=y?h=u>=y&&u<=m?u:v:r===b&&f>=_?h=u>=_&&u<=x?u:b:f>=k?h=u>=k&&u<=w?u:T:r===A&&f>=A?h=A:f>=M?h=M:r===S&&f>=S?h=S:r===E&&f>=E&&(h=E),h>=u&&(h=u,s=!0);var p=i+h;if(e.rangebreaks&&h>0){for(var d=0,g=0;g<84;g++){var L=(g+.5)/84;e.maskBreaks(i*(1-L)+L*p)!==I&&d++}(h*=d/84)||(t[n].drop=!0),s&&u>A&&(h=u)}(h>0||0===n)&&(t[n].periodX=i+h/2)}}(P,t,t._definedDelta),t.rangebreaks){var N=\"y\"===t._id.charAt(0),j=1;\"auto\"===t.tickmode&&(j=t.tickfont?t.tickfont.size:12);var U=NaN;for(z=P.length-1;z>-1;z--)if(P[z].drop)P.splice(z,1);else{P[z].value=Mt(P[z].value,t);var H=t.c2p(P[z].value);(N?U>H-j:Uu||Gu&&(q.periodX=u),G10||\"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>=L&&a<=16||e>=E)t._tickround=\"M\";else if(e>=C&&a<=19||e>=L)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),u=void 0===t.minexponent?3:t.minexponent;Math.abs(c)>u&&(ut(t.exponentformat)&&!ft(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function lt(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}}V.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,0);var a=2*e;if(a>v)e/=v,r=n(10),t.dtick=\"M\"+12*ot(e,r,$);else if(a>T)e/=T,t.dtick=\"M\"+ot(e,1,tt);else if(a>M){t.dtick=ot(e,M,t._hasDayOfWeekBreaks?[1,2,7,14]:rt);var o=V.getTickFormat(t),l=\"period\"===t.ticklabelmode;l&&(t._rawTick0=t.tick0),/%[uVW]/.test(o)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),l&&(t._dowTick0=t.tick0)}else a>E?t.dtick=ot(e,E,tt):a>L?t.dtick=ot(e,L,et):a>C?t.dtick=ot(e,C,et):(r=n(10),t.dtick=ot(e,r,$))}else if(\"log\"===t.type){t.tick0=0;var c=s.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(c[1]-c[0])<1){var u=1.5*Math.abs((c[1]-c[0])/e);e=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/u,r=n(10),t.dtick=\"L\"+ot(e,r,$)}else t.dtick=e>.3?\"D2\":\"D1\"}else\"category\"===t.type||\"multicategory\"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):At(t)?(t.tick0=0,r=1,t.dtick=ot(e,r,at)):(t.tick0=0,r=n(10),t.dtick=ot(e,r,$));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&\"string\"!=typeof t.dtick){var f=t.dtick;throw t.dtick=1,\"ax.dtick error: \"+String(f)}},V.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return s.increment(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?it:nt,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)},V.tickFirst=function(t,e){var r=t.r2l||Number,a=s.simpleMap(t.range,r,void 0,void 0,e),o=a[1] \")}else t._prevDateHead=l,c+=\"
\"+l;e.text=c}(t,o,r,c):\"log\"===u?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=ht(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||ut(p)&&ft(f)?(e.text=0===f?1:1===f?\"10\":\"10\"+(f>1?\"\":P)+h+\"\",e.fontSize*=1.25):(\"e\"===p||\"E\"===p)&&h>2?e.text=\"1\"+p+(f>0?\"+\":P)+h:(e.text=ht(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,g):\"category\"===u?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=\"\");e.text=String(r)}(t,o):\"multicategory\"===u?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],a=void 0===i[1]?\"\":String(i[1]),o=void 0===i[0]?\"\":String(i[0]);r?e.text=o+\" - \"+a:(e.text=a,e.text2=o)}(t,o,r):At(t)?function(t,e,r,n,i){if(\"radians\"!==t.thetaunit||r)e.text=ht(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){for(var r=1;!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=ht(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=[\"\",o[0],\"\",\"\\u2044\",\"\",o[1],\"\",\"\\u03c0\"].join(\"\"),l&&(e.text=P+e.text)}}}}(t,o,r,c,g):function(t,e,r,n,i){\"never\"===i?i=\"\":\"all\"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i=\"hide\");e.text=ht(e.x,t,i,n)}(t,o,0,c,g),n||(t.tickprefix&&!d(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!d(t.showticksuffix)&&(o.text+=t.ticksuffix)),\"boundaries\"===t.tickson||t.showdividers){var m=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};o.xbnd=[m(o.x-.5),m(o.x+t.dtick-.5)]}return o},V.hoverLabelText=function(t,e,r){r&&(t=s.extendFlat({},t,{hoverformat:r}));var n=Array.isArray(e)?e[0]:e,i=Array.isArray(e)?e[1]:void 0;if(void 0!==i&&i!==n)return V.hoverLabelText(t,n,r)+\" - \"+V.hoverLabelText(t,i,r);var a=\"log\"===t.type&&n<=0,o=V.tickText(t,t.c2l(a?-n:n),\"hover\").text;return a?0===n?\"0\":P+o:o};var ct=[\"f\",\"p\",\"n\",\"\\u03bc\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\"];function ut(t){return\"SI\"===t||\"B\"===t}function ft(t){return t>14||t<-15}function ht(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||\"B\",c=e._tickexponent,u=V.getTickFormat(e),f=e.separatethousands;if(n){var h={exponentformat:l,minexponent:e.minexponent,dtick:\"none\"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:\"none\"===e.showexponent?e.range.map(e.r2d):[0,t||1]};st(h),o=(Number(h._tickround)||0)+4,c=h._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,P);var p,d=Math.pow(10,-o)/2;if(\"none\"===l&&(c=0),(t=Math.abs(t))\"+p+\"\":\"B\"===l&&9===c?t+=\"B\":ut(l)&&(t+=ct[c/3+5]));return a?P+t:t}function pt(t,e){for(var r=[],n={},i=0;i1&&r=i.min&&t=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=o(i)))){r=n;break}break;case\"log\":for(e=0;e0?r.bottom-f:0,h)))),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1];if(\"x\"===d){if(\"b\"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?f-r.top:0,h),p.reverse()),r.width>0){var m=r.right-(e._offset+e._length);m>0&&(n.xr=1,n.r=m);var v=e._offset-r.left;v>0&&(n.xl=0,n.l=v)}}else if(\"l\"===l?n[l]=e._depth=Math.max(r.height>0?f-r.left:0,h):(n[l]=e._depth=Math.max(r.height>0?r.right-f:0,h),p.reverse()),r.height>0){var y=r.bottom-(e._offset+e._length);y>0&&(n.yb=0,n.b=y);var x=e._offset-r.top;x>0&&(n.yt=1,n.t=x)}n[g]=\"free\"===e.anchor?e.position:e._anchorAxis.domain[p[0]],e.title.text!==c._dfltTitle[d]&&(n[l]+=mt(e)+(e.title.standoff||0)),e.mirror&&\"free\"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[u]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[u]+=h),!0===e.mirror||\"ticks\"===e.mirror?i[g]=e._anchorAxis.domain[p[1]]:\"all\"!==e.mirror&&\"allticks\"!==e.mirror||(i[g]=[e._counterDomainMin,e._counterDomainMax][p[1]]))}K&&(s=o.getComponentMethod(\"rangeslider\",\"autoMarginOpts\")(t,e)),a.autoMargin(t,xt(e),n),a.autoMargin(t,bt(e),i),a.autoMargin(t,_t(e),s)})),r.skipTitle||K&&\"bottom\"===e.side||Z.push((function(){return function(t,e){var r,n=t._fullLayout,i=e._id,a=i.charAt(0),o=e.title.font.size;if(e.title.hasOwnProperty(\"standoff\"))r=e._depth+e.title.standoff+mt(e);else{var s=St(e);if(\"multicategory\"===e.type)r=e._depth;else{var l=1.5*o;s&&(l=.5*o,\"outside\"===e.ticks&&(l+=e.ticklen)),r=10+l+(e.linewidth?e.linewidth-1:0)}s||(r+=\"x\"===a?\"top\"===e.side?o*(e.showticklabels?1:0):o*(e.showticklabels?1.5:.5):\"right\"===e.side?o*(e.showticklabels?1:.5):o*(e.showticklabels?.5:0))}var c,f,p,d,g=V.getPxPosition(t,e);\"x\"===a?(f=e._offset+e._length/2,p=\"top\"===e.side?g-r:g+r):(p=e._offset+e._length/2,f=\"right\"===e.side?g+r:g-r,c={rotate:\"-90\",offset:0});if(\"multicategory\"!==e.type){var m=e._selections[e._id+\"tick\"];if(d={selection:m,side:e.side},m&&m.node()&&m.node().parentNode){var v=h.getTranslate(m.node().parentNode);d.offsetLeft=v.x,d.offsetTop=v.y}e.title.hasOwnProperty(\"standoff\")&&(d.pad=0)}return u.draw(t,i+\"title\",{propContainer:e,propName:e._name+\".title.text\",placeholder:n._dfltTitle[a],avoid:d,transform:c,attributes:{x:f,y:p,\"text-anchor\":\"middle\"}})}(t,e)})),s.syncOrAsync(Z)}}function Q(t){var r=p+(t||\"tick\");return w[r]||(w[r]=function(t,e){var r,n,i,a;t._selections[e].size()?(r=1/0,n=-1/0,i=1/0,a=-1/0,t._selections[e].each((function(){var t=yt(this),e=h.bBox(t.node().parentNode);r=Math.min(r,e.top),n=Math.max(n,e.bottom),i=Math.min(i,e.left),a=Math.max(a,e.right)}))):(r=0,n=0,i=0,a=0);return{top:r,bottom:n,left:i,right:a,height:n-r,width:a-i}}(e,r)),w[r]}},V.getTickSigns=function(t){var e=t._id.charAt(0),r={x:\"top\",y:\"right\"}[e],n=t.side===r?1:-1,i=[-1,1,n,-n];return\"inside\"!==t.ticks==(\"x\"===e)&&(i=i.map((function(t){return-t}))),t.side&&i.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),i},V.makeTransTickFn=function(t){return\"x\"===t._id.charAt(0)?function(e){return l(t._offset+t.l2p(e.x),0)}:function(e){return l(0,t._offset+t.l2p(e.x))}},V.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||\"\",r=function(t){return-1!==e.indexOf(t)},n=r(\"top\"),i=r(\"left\"),a=r(\"right\"),o=r(\"bottom\"),s=r(\"inside\"),l=o||i||n||a;if(!l&&!s)return[0,0];var c=t.side,u=l?(t.tickwidth||0)/2:0,f=3,h=t.tickfont?t.tickfont.size:12;(o||n)&&(u+=h*N,f+=(t.linewidth||0)/2);(i||a)&&(u+=(t.linewidth||0)/2,f+=3);s&&\"top\"===c&&(f-=h*(1-N));(i||n)&&(u=-u);\"bottom\"!==c&&\"right\"!==c||(f=-f);return[l?u:0,s?f:0]}(t),r=e[0],n=e[1];return\"x\"===t._id.charAt(0)?function(e){return l(r+t._offset+t.l2p(dt(e)),n)}:function(e){return l(n,r+t._offset+t.l2p(dt(e)))}},V.makeTickPath=function(t,e,r,n){n=void 0!==n?n:t.ticklen;var i=t._id.charAt(0),a=(t.linewidth||1)/2;return\"x\"===i?\"M0,\"+(e+a*r)+\"v\"+n*r:\"M\"+(e+a*r)+\",0h\"+n*r},V.makeLabelFns=function(t,e,r){var n=t.ticklabelposition||\"\",a=function(t){return-1!==n.indexOf(t)},o=a(\"top\"),l=a(\"left\"),c=a(\"right\"),u=a(\"bottom\")||l||o||c,f=a(\"inside\"),h=\"inside\"===n&&\"inside\"===t.ticks||!f&&\"outside\"===t.ticks&&\"boundaries\"!==t.tickson,p=0,d=0,g=h?t.ticklen:0;if(f?g*=-1:u&&(g=0),h&&(p+=g,r)){var m=s.deg2rad(r);p=g*Math.cos(m)+1,d=g*Math.sin(m)}t.showticklabels&&(h||t.showline)&&(p+=.2*t.tickfont.size);var v,y,x,b,_,w={labelStandoff:p+=(t.linewidth||1)/2*(f?-1:1),labelShift:d},T=0,k=t.side,A=t._id.charAt(0),M=t.tickangle;if(\"x\"===A)b=(_=!f&&\"bottom\"===k||f&&\"top\"===k)?1:-1,f&&(b*=-1),v=d*b,y=e+p*b,x=_?1:-.2,90===Math.abs(M)&&(f?x+=B:x=-90===M&&\"bottom\"===k?N:90===M&&\"top\"===k?B:.5,T=B/2*(M/90)),w.xFn=function(t){return t.dx+v+T*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*x},w.anchorFn=function(t,e){if(u){if(l)return\"end\";if(c)return\"start\"}return i(e)&&0!==e&&180!==e?e*b<0!==f?\"end\":\"start\":\"middle\"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:\"top\"===t.side!==f?-n:0};else if(\"y\"===A){if(b=(_=!f&&\"left\"===k||f&&\"right\"===k)?1:-1,f&&(b*=-1),v=p,y=d*b,x=0,f||90!==Math.abs(M)||(x=-90===M&&\"left\"===k||90===M&&\"right\"===k?N:.5),f){var S=i(M)?+M:0;if(0!==S){var E=s.deg2rad(S);T=Math.abs(Math.sin(E))*N*b,x=0}}w.xFn=function(t){return t.dx+e-(v+t.fontSize*x)*b+T*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*B},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?\"middle\":_?\"end\":\"start\"},w.heightFn=function(e,r,n){return\"right\"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},V.drawTicks=function(t,e,r){r=r||{};var n=e._id+\"tick\",i=r.vals;\"period\"===e.ticklabelmode&&(i=i.slice()).shift();var a=r.layer.selectAll(\"path.\"+n).data(e.ticks?i:[],gt);a.exit().remove(),a.enter().append(\"path\").classed(n,1).classed(\"ticks\",1).classed(\"crisp\",!1!==r.crisp).call(f.stroke,e.tickcolor).style(\"stroke-width\",h.crispRound(t,e.tickwidth,1)+\"px\").attr(\"d\",r.path).style(\"display\",null),Et(e,[D]),a.attr(\"transform\",r.transFn)},V.drawGrid=function(t,e,r){r=r||{};var n=e._id+\"grid\",i=r.vals,a=r.counterAxis;if(!1===e.showgrid)i=[];else if(a&&V.shouldShowZeroLine(t,e,a))for(var o=\"array\"===e.tickmode,s=0;sp||a.leftp||a.top+(e.tickangle?0:t.fontSize/4)e[\"_visibleLabelMin_\"+r._id]?l.style(\"display\",\"none\"):\"tick\"!==t.K||i||l.style(\"display\",null)}))}))}))}))},x(v,m+1?m:g);var b=null;e._selections&&(e._selections[f]=v);var _=[function(){return y.length&&Promise.all(y)}];e.automargin&&a._redrawFromAutoMarginCount&&90===m?(b=90,_.push((function(){x(v,m)}))):_.push((function(){if(x(v,g),p.length&&\"x\"===u&&!i(g)&&(\"log\"!==e.type||\"D\"!==String(e.dtick).charAt(0))){b=0;var t,n=0,a=[];if(v.each((function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),i=yt(this),o=h.bBox(i.node());a.push({top:0,bottom:10,height:10,left:r-o.width/2,right:r+o.width/2+2,width:o.width+2})})),\"boundaries\"!==e.tickson&&!e.showdividers||r.secondary){var o=p.length,l=Math.abs((p[o-1].x-p[0].x)*e._m)/(o-1),c=e.ticklabelposition||\"\",f=function(t){return-1!==c.indexOf(t)},d=f(\"top\"),m=f(\"left\"),y=f(\"right\"),_=f(\"bottom\")||m||d||y?(e.tickwidth||0)+6:0,w=l<2.5*n||\"multicategory\"===e.type||\"realaxis\"===e._name;for(t=0;t1)for(n=1;n2*o}(i,e))return\"date\";var m=\"strict\"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=f(r),i=0,o=0,s={},u=0;u2*i}(i,m)?\"category\":function(t,e){for(var r=t.length,n=0;n=2){var l,c,u=\"\";if(2===o.length)for(l=0;l<2;l++)if(c=x(o[l])){u=g;break}var f=i(\"pattern\",u);if(f===g)for(l=0;l<2;l++)(c=x(o[l]))&&(e.bounds[l]=o[l]=c-1);if(f)for(l=0;l<2;l++)switch(c=o[l],f){case g:if(!n(c))return void(e.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(e.enabled=!1);e.bounds[l]=o[l]=c;break;case m:if(!n(c))return void(e.enabled=!1);if((c=+c)<0||c>24)return void(e.enabled=!1);e.bounds[l]=o[l]=c}if(!1===r.autorange){var h=r.range;if(h[0]h[1])return void(e.enabled=!1)}else if(o[0]>h[0]&&o[1]n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},r.ref2id=function(t){return!!/^[xyz]/.test(t)&&t.split(\" \")[0]},r.isLinked=function(t,e){return a(e,t._axisMatchGroups)||a(e,t._axisConstraintGroups)}},{\"../../registry\":638,\"./constants\":561}],559:[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;nn?i.substr(n):a.substr(r))+o:i+a+t*e:o}function m(t,e){for(var r=e._size,n=r.h/r.w,i={},a=Object.keys(t),o=0;oc*x)||T)for(r=0;rO&&FP&&(P=F);h/=(P-C)/(2*I),C=l.l2r(C),P=l.l2r(P),l.range=l._input.range=S=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function N(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\",c(r,n)).attr(\"d\",i+\"Z\")}function j(t,e,r){return t.append(\"path\").attr(\"class\",\"zoombox-corners\").style({fill:f.background,stroke:f.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"transform\",c(e,r)).attr(\"d\",\"M0,0Z\")}function U(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\"),V(t,e,i,a)}function V(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 H(t){n.select(t).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}function q(t){I&&t.data&&t._context.showTips&&(i.notifier(i._(t,\"Double-click to zoom back out\"),\"long\"),I=!1)}function G(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,P)/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 Y(t,e,r,n,a){for(var o,s,l,c,u=!1,f={},h={},p=(a||{}).xaHash,d=(a||{}).yaHash,g=0;g=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(H(i),2!==t||vt||qt(),mt)o.indexOf(\"select\")>-1&&S(r,i,J,K,e.id,Pt),o.indexOf(\"event\")>-1&&p.click(i,r,e.id);else if(1===t&&vt){var s=g?O:I,c=\"s\"===g||\"w\"===v?0:1,f=s._name+\".range[\"+c+\"]\",h=function(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return\"date\"===t.type?n:\"log\"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a(\".\"+r+\"g\")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a(\".\"+String(r)+\"g\")(n))}(s,c),d=\"left\",m=\"middle\";if(s.fixedrange)return;g?(m=\"n\"===g?\"top\":\"bottom\",\"right\"===s.side&&(d=\"right\")):\"e\"===v&&(d=\"right\"),i._context.showAxisRangeEntryBoxes&&n.select(bt).call(u.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(h),fill:s.tickfont?s.tickfont.color:\"#444\",horizontalAlign:d,verticalAlign:m}).on(\"edit\",(function(t){var e=s.d2r(t);void 0!==e&&l.call(\"_guiRelayout\",i,f,e)}))}}}function zt(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(tt,pt*e+_t)),i=Math.max(0,Math.min(et,dt*r+wt)),a=Math.abs(n-_t),o=Math.abs(i-wt);function s(){St=\"\",Tt.r=Tt.l,Tt.t=Tt.b,Lt.attr(\"d\",\"M0,0Z\")}if(Tt.l=Math.min(_t,n),Tt.r=Math.max(_t,n),Tt.t=Math.min(wt,i),Tt.b=Math.max(wt,i),rt.isSubplotConstrained)a>P||o>P?(St=\"xy\",a/tt>o/et?(o=a*et/tt,wt>i?Tt.t=wt-o:Tt.b=wt+o):(a=o*tt/et,_t>n?Tt.l=_t-a:Tt.r=_t+a),Lt.attr(\"d\",G(Tt))):s();else if(nt.isSubplotConstrained)if(a>P||o>P){St=\"xy\";var l=Math.min(Tt.l/tt,(et-Tt.b)/et),c=Math.max(Tt.r/tt,(et-Tt.t)/et);Tt.l=l*tt,Tt.r=c*tt,Tt.b=(1-l)*et,Tt.t=(1-c)*et,Lt.attr(\"d\",G(Tt))}else s();else!at||o0){var u;if(nt.isSubplotConstrained||!it&&1===at.length){for(u=0;ug[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s)}return r(\"layer\"),e}},{\"../../lib\":503,\"fast-isnumeric\":190}],573:[function(t,e,r){\"use strict\";var n=t(\"./show_dflt\");e.exports=function(t,e,r,i,a){a||(a={});var o=a.tickSuffixDflt,s=n(t);r(\"tickprefix\")&&r(\"showtickprefix\",s),r(\"ticksuffix\",o)&&r(\"showticksuffix\",s)}},{\"./show_dflt\":577}],574:[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)],t.setScale()}},{\"../../constants/alignment\":471}],575:[function(t,e,r){\"use strict\";var n=t(\"polybooljs\"),i=t(\"../../registry\"),a=t(\"../../components/drawing\").dashStyle,o=t(\"../../components/color\"),s=t(\"../../components/fx\"),l=t(\"../../components/fx/helpers\").makeEventData,c=t(\"../../components/dragelement/helpers\"),u=c.freeMode,f=c.rectMode,h=c.drawMode,p=c.openMode,d=c.selectMode,g=t(\"../../components/shapes/draw_newshape/display_outlines\"),m=t(\"../../components/shapes/draw_newshape/helpers\").handleEllipse,v=t(\"../../components/shapes/draw_newshape/newshapes\"),y=t(\"../../lib\"),x=t(\"../../lib/polygon\"),b=t(\"../../lib/throttle\"),_=t(\"./axis_ids\").getFromId,w=t(\"../../lib/clear_gl_canvases\"),T=t(\"../../plot_api/subroutines\").redrawReglTraces,k=t(\"./constants\"),A=k.MINSELECT,M=x.filter,S=x.tester,E=t(\"./handle_outline\").clearSelect,L=t(\"./helpers\"),C=L.p2r,P=L.axValue,I=L.getTransform;function O(t,e,r,n,i,a,o){var s,l,c,u,f,h,d,m,v,y=e._hoverdata,x=e._fullLayout.clickmode.indexOf(\"event\")>-1,b=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(y)){F(t,e,a);var _=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n0?function(t,e){var r,n,i,a=[];for(i=0;i0&&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;i1)return!1;if((i+=r.selectedpoints.length)>1)return!1}return 1===i}(s)&&(h=j(_))){for(o&&o.remove(),v=0;v=0&&n._fullLayout._deactivateShape(n),h(e)){var a=n._fullLayout._zoomlayer.selectAll(\".select-outline-\"+r.id);if(a&&n._fullLayout._drawing){var o=v(a,t);o&&i.call(\"_guiRelayout\",n,{shapes:o}),n._fullLayout._drawing=!1}}r.selection={},r.selection.selectionDefs=t.selectionDefs=[],r.selection.mergedPolygons=t.mergedPolygons=[]}function N(t,e,r,n){var i,a,o,s=[],l=e.map((function(t){return t._id})),c=r.map((function(t){return t._id}));for(o=0;o0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function U(t,e,r){var n,a,o,s;for(n=0;n=0)L._fullLayout._deactivateShape(L);else if(!_){var r=z.clickmode;b.done(gt).then((function(){if(b.clear(gt),2===t){for(ft.remove(),$=0;$-1&&O(e,L,i.xaxes,i.yaxes,i.subplot,i,ft),\"event\"===r&&L.emit(\"plotly_selected\",void 0);s.click(L,e)})).catch(y.error)}},i.doneFn=function(){dt.remove(),b.done(gt).then((function(){b.clear(gt),i.gd.emit(\"plotly_selected\",et),Q&&i.selectionDefs&&(Q.subtract=ut,i.selectionDefs.push(Q),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,K)),i.doneFnCompleted&&i.doneFnCompleted(mt)})).catch(y.error),_&&B(i)}},clearSelect:E,clearSelectionsCache:B,selectOnClick:O}},{\"../../components/color\":366,\"../../components/dragelement/helpers\":384,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../components/fx/helpers\":402,\"../../components/shapes/draw_newshape/display_outlines\":454,\"../../components/shapes/draw_newshape/helpers\":455,\"../../components/shapes/draw_newshape/newshapes\":456,\"../../lib\":503,\"../../lib/clear_gl_canvases\":487,\"../../lib/polygon\":515,\"../../lib/throttle\":530,\"../../plot_api/subroutines\":544,\"../../registry\":638,\"./axis_ids\":558,\"./constants\":561,\"./handle_outline\":565,\"./helpers\":566,polybooljs:254}],576:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-time-format\").utcFormat,a=t(\"../../lib\"),o=a.numberFormat,s=t(\"fast-isnumeric\"),l=a.cleanNumber,c=a.ms2DateTime,u=a.dateTime2ms,f=a.ensureNumber,h=a.isArrayOrTypedArray,p=t(\"../../constants/numerical\"),d=p.FP_SAFE,g=p.BADNUM,m=p.LOG_CLIP,v=p.ONEWEEK,y=p.ONEDAY,x=p.ONEHOUR,b=p.ONEMIN,_=p.ONESEC,w=t(\"./axis_ids\"),T=t(\"./constants\"),k=T.HOUR_PATTERN,A=T.WEEKDAY_PATTERN;function M(t){return Math.pow(10,t)}function S(t){return null!=t}e.exports=function(t,e){e=e||{};var r=t._id||\"x\",p=r.charAt(0);function E(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*m*Math.abs(n-i))}return g}function L(e,r,n,i){if((i||{}).msUTC&&s(e))return+e;var o=u(e,n||t.calendar);if(o===g){if(!s(e))return g;e=+e;var l=Math.floor(10*a.mod(e+.05,1)),c=Math.round(e-l/10);o=u(new Date(c))+l/10}return o}function C(e,r,n){return c(e,r,n||t.calendar)}function P(e){return t._categories[Math.round(e)]}function I(e){if(S(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push(\"number\"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return g}function O(e){if(t._categoriesMap)return t._categoriesMap[e]}function z(t){var e=O(t);return void 0!==e?e:s(t)?+t:void 0}function D(t){return s(t)?+t:O(t)}function R(t,e,r){return n.round(r+e*t,2)}function F(t,e,r){return(t-r)/e}var B=function(e){return s(e)?R(e,t._m,t._b):g},N=function(e){return F(e,t._m,t._b)};if(t.rangebreaks){var j=\"y\"===p;B=function(e){if(!s(e))return g;var r=t._rangebreaks.length;if(!r)return R(e,t._m,t._b);var n=j;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,a=i*e,o=0,l=0;lu)){o=a<(c+u)/2?l:l+1;break}o=l+1}var f=t._B[o]||0;return isFinite(f)?R(e,t._m2,f):0},N=function(e){var r=t._rangebreaks.length;if(!r)return F(e,t._m,t._b);for(var n=0,i=0;it._rangebreaks[i].pmax&&(n=i+1);return F(e,t._m2,t._B[n])}}t.c2l=\"log\"===t.type?E:f,t.l2c=\"log\"===t.type?M:f,t.l2p=B,t.p2l=N,t.c2p=\"log\"===t.type?function(t,e){return B(E(t,e))}:B,t.p2c=\"log\"===t.type?function(t){return M(N(t))}:N,-1!==[\"linear\",\"-\"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=f,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=N,t.cleanPos=f):\"log\"===t.type?(t.d2r=t.d2l=function(t,e){return E(l(t),e)},t.r2d=t.r2c=function(t){return M(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=f,t.c2r=E,t.l2d=M,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return M(N(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=N,t.cleanPos=f):\"date\"===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=L,t.c2d=t.c2r=t.l2d=t.l2r=C,t.d2p=t.r2p=function(e,r,n){return t.l2p(L(e,0,n))},t.p2d=t.p2r=function(t,e,r){return C(N(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,g,t.calendar)}):\"category\"===t.type?(t.d2c=t.d2l=I,t.r2d=t.c2d=t.l2d=P,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=D(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=f,t.r2l=D,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return\"string\"==typeof t&&\"\"!==t?t:f(t)}):\"multicategory\"===t.type&&(t.r2d=t.c2d=t.l2d=P,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=z(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=O,t.l2r=t.c2r=f,t.r2l=z,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return Array.isArray(t)||\"string\"==typeof t&&\"\"!==t?t:f(t)},t.setupMultiCategory=function(n){var i,o,s=t._traceIndices,l=t._matchGroup;if(l&&0===t._categories.length)for(var c in l)if(c!==r){var u=e[w.id2name(c)];s=s.concat(u._traceIndices)}var f=[[0,{}],[0,{}]],d=[];for(i=0;id&&(o[n]=d),o[0]===o[1]){var c=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=c,o[1]+=c}}else a.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=w.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?\"_r\":\"range\",o=t.calendar;t.cleanRange(a);var s,l,c=t.r2l(t[a][0],o),u=t.r2l(t[a][1],o),f=\"y\"===p;if((f?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks)&&(t._rangebreaks=t.locateBreaks(Math.min(c,u),Math.max(c,u)),t._rangebreaks.length)){for(s=0;su&&(h=!h),h&&t._rangebreaks.reverse();var d=h?-1:1;for(t._m2=d*t._length/(Math.abs(u-c)-t._lBreaks),t._B.push(-t._m2*(f?u:c)),s=0;si&&(i+=7,oi&&(i+=24,o=n&&o=n&&e=s.min&&(ts.max&&(s.max=n),i=!1)}i&&c.push({min:t,max:n})}};for(n=0;nr.duration?(!function(){for(var r={},n=0;n rect\").call(o.setTranslate,0,0).call(o.setScale,1,1),t.plot.call(o.setTranslate,e._offset,r._offset).call(o.setScale,1,1);var n=t.plot.selectAll(\".scatterlayer .trace\");n.selectAll(\".point\").call(o.setPointGroupScale,1,1),n.selectAll(\".textpoint\").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,t)}function m(e,r){var n=e.plotinfo,i=n.xaxis,l=n.yaxis,c=i._length,u=l._length,f=!!e.xr1,h=!!e.yr1,p=[];if(f){var d=a.simpleMap(e.xr0,i.r2l),g=a.simpleMap(e.xr1,i.r2l),m=d[1]-d[0],v=g[1]-g[0];p[0]=(d[0]*(1-r)+r*g[0]-d[0])/(d[1]-d[0])*c,p[2]=c*(1-r+r*v/m),i.range[0]=i.l2r(d[0]*(1-r)+r*g[0]),i.range[1]=i.l2r(d[1]*(1-r)+r*g[1])}else p[0]=0,p[2]=c;if(h){var y=a.simpleMap(e.yr0,l.r2l),x=a.simpleMap(e.yr1,l.r2l),b=y[1]-y[0],_=x[1]-x[0];p[1]=(y[1]*(1-r)+r*x[1]-y[1])/(y[0]-y[1])*u,p[3]=u*(1-r+r*_/b),l.range[0]=i.l2r(y[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(y[1]*(1-r)+r*x[1])}else p[1]=0,p[3]=u;s.drawOne(t,i,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[i._id,l._id]);var w=f?c/p[2]:1,T=h?u/p[3]:1,k=f?p[0]:0,A=h?p[1]:0,M=f?p[0]/p[2]*c:0,S=h?p[1]/p[3]*u:0,E=i._offset-M,L=l._offset-S;n.clipRect.call(o.setTranslate,k,A).call(o.setScale,1/w,1/T),n.plot.call(o.setTranslate,E,L).call(o.setScale,w,T),o.setPointGroupScale(n.zoomScalePts,1/w,1/T),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}s.redrawComponents(t)}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../registry\":638,\"./axes\":554,\"@plotly/d3\":58}],582:[function(t,e,r){\"use strict\";var n=t(\"../../registry\").traceIs,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(t,\"box-violin\"),o=n(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(\"autotypenumbers\",s.autotypenumbersDflt),\"-\"===r(\"type\",(s.splomStash||{}).type)&&(!function(t,e){if(\"-\"!==t.type)return;var r,s=t._id,l=s.charAt(0);-1!==s.indexOf(\"scene\")&&(s=l);var c=function(t,e,r){for(var n=0;n0&&(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,s,l);if(!c)return;if(\"histogram\"===c.type&&l==={v:\"y\",h:\"x\"}[c.orientation||\"v\"])return void(t.type=\"linear\");var u=l+\"calendar\",f=c[u],h={noMultiCategory:!n(c,\"cartesian\")||n(c,\"noMultiCategory\")};\"box\"===c.type&&c._hasPreCompStats&&l==={h:\"x\",v:\"y\"}[c.orientation||\"v\"]&&(h.noMultiCategory=!0);if(h.autotypenumbers=t.autotypenumbers,o(c,l)){var p=a(c),d=[];for(r=0;r0?\".\":\"\")+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;f0&&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]]]}}e.exports=function(t){return new M(t)},S.plot=function(t,e,r){var n=this,i=e[this.id],a=[],o=!1;for(var s in w.layerNameToAdjective)if(\"frame\"!==s&&i[\"show\"+s]){o=!0;break}for(var l=0;l0&&a._module.calcGeoJSON(i,e)}if(!this.updateProjection(t,e)){this.viewInitial&&this.scope===r.scope||this.saveViewInitial(r),this.scope=r.scope,this.updateBaseLayers(e,r),this.updateDims(e,r),this.updateFx(e,r),d.generalUpdatePerTraceModule(this.graphDiv,this,t,r);var o=this.layers.frontplot.select(\".scatterlayer\");this.dataPoints.point=o.selectAll(\".point\"),this.dataPoints.text=o.selectAll(\"text\"),this.dataPaths.line=o.selectAll(\".js-line\");var s=this.layers.backplot.select(\".choroplethlayer\");this.dataPaths.choropleth=s.selectAll(\"path\"),this.render()}},S.updateProjection=function(t,e){var r=this.graphDiv,n=e[this.id],l=e._size,u=n.domain,f=n.projection,h=n.lonaxis,p=n.lataxis,d=h._ax,g=p._ax,v=this.projection=function(t){var e=t.projection,r=e.type,n=w.projNames[r];n=\"geo\"+c.titleCase(n);for(var l=(i[n]||s[n])(),u=t._isSatellite?180*Math.acos(1/e.distance)/Math.PI:t._isClipped?w.lonaxisSpan[r]/2:null,f=[\"center\",\"rotate\",\"parallels\",\"clipExtent\"],h=function(t){return t?l:[]},p=0;pu*Math.PI/180}return!1},l.getPath=function(){return a().projection(l)},l.getBounds=function(t){return l.getPath().bounds(t)},l.precision(w.precision),t._isSatellite&&l.tilt(e.tilt).distance(e.distance);u&&l.clipAngle(u-w.clipPad);return l}(n),y=[[l.l+l.w*u.x[0],l.t+l.h*(1-u.y[1])],[l.l+l.w*u.x[1],l.t+l.h*(1-u.y[0])]],x=n.center||{},b=f.rotation||{},_=h.range||[],T=p.range||[];if(n.fitbounds){d._length=y[1][0]-y[0][0],g._length=y[1][1]-y[0][1],d.range=m(r,d),g.range=m(r,g);var k=(d.range[0]+d.range[1])/2,A=(g.range[0]+g.range[1])/2;if(n._isScoped)x={lon:k,lat:A};else if(n._isClipped){x={lon:k,lat:A},b={lon:k,lat:A,roll:b.roll};var M=f.type,S=w.lonaxisSpan[M]/2||180,L=w.lataxisSpan[M]/2||90;_=[k-S,k+S],T=[A-L,A+L]}else x={lon:k,lat:A},b={lon:k,lat:b.lat,roll:b.roll}}v.center([x.lon-b.lon,x.lat-b.lat]).rotate([-b.lon,-b.lat,b.roll]).parallels(f.parallels);var C=E(_,T);v.fitExtent(y,C);var P=this.bounds=v.getBounds(C),I=this.fitScale=v.scale(),O=v.translate();if(n.fitbounds){var z=v.getBounds(E(d.range,g.range)),D=Math.min((P[1][0]-P[0][0])/(z[1][0]-z[0][0]),(P[1][1]-P[0][1])/(z[1][1]-z[0][1]));isFinite(D)?v.scale(D*I):c.warn(\"Something went wrong during\"+this.id+\"fitbounds computations.\")}else v.scale(f.scale*I);var R=this.midPt=[(P[0][0]+P[1][0])/2,(P[0][1]+P[1][1])/2];if(v.translate([O[0]+(R[0]-O[0]),O[1]+(R[1]-O[1])]).clipExtent(P),n._isAlbersUsa){var F=v([x.lon,x.lat]),B=v.translate();v.translate([B[0]-(F[0]-B[0]),B[1]-(F[1]-B[1])])}},S.updateBaseLayers=function(t,e){var r=this,i=r.topojson,a=r.layers,o=r.basePaths;function s(t){return\"lonaxis\"===t||\"lataxis\"===t}function l(t){return Boolean(w.lineLayers[t])}function c(t){return Boolean(w.fillLayers[t])}var u=(this.hasChoropleth?w.layersForChoropleth:w.layers).filter((function(t){return l(t)||c(t)?e[\"show\"+t]:!s(t)||e[t].showgrid})),p=r.framework.selectAll(\".layer\").data(u,String);p.exit().each((function(t){delete a[t],delete o[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\"):s(t)?o[t]=e.append(\"path\").style(\"fill\",\"none\"):\"backplot\"===t?e.append(\"g\").classed(\"choroplethlayer\",!0):\"frontplot\"===t?e.append(\"g\").classed(\"scatterlayer\",!0):l(t)?o[t]=e.append(\"path\").style(\"fill\",\"none\").style(\"stroke-miterlimit\",2):c(t)&&(o[t]=e.append(\"path\").style(\"stroke\",\"none\"))})),p.order(),p.each((function(r){var n=o[r],a=w.layerNameToAdjective[r];\"frame\"===r?n.datum(w.sphereSVG):l(r)||c(r)?n.datum(A(i,i.objects[r])):s(r)&&n.datum(function(t,e,r){var n,i,a,o=e[t],s=w.scopeDefaults[e.scope];\"lonaxis\"===t?(n=s.lonaxisRange,i=s.lataxisRange,a=function(t,e){return[t,e]}):\"lataxis\"===t&&(n=s.lataxisRange,i=s.lonaxisRange,a=function(t,e){return[e,t]});var l={type:\"linear\",range:[n[0],n[1]-1e-6],tick0:o.tick0,dtick:o.dtick};g.setConvert(l,r);var c=g.calcTicks(l);e.isScoped||\"lonaxis\"!==t||c.pop();for(var u=c.length,f=new Array(u),h=0;h-1&&b(n.event,i,[r.xaxis],[r.yaxis],r.id,f),s.indexOf(\"event\")>-1&&p.click(i,n.event))}))}function h(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},S.makeFramework=function(){var t=this,e=t.graphDiv,r=e._fullLayout,i=\"clip\"+r._uid+t.id;t.clipDef=r._clips.append(\"clipPath\").attr(\"id\",i),t.clipRect=t.clipDef.append(\"rect\"),t.framework=n.select(t.container).append(\"g\").attr(\"class\",\"geo \"+t.id).call(h.setClipUrl,i,e),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\"},g.setConvert(t.mockAxis,r)},S.saveViewInitial=function(t){var e,r=t.center||{},n=t.projection,i=n.rotation||{};this.viewInitial={fitbounds:t.fitbounds,\"projection.scale\":n.scale},e=t._isScoped?{\"center.lon\":r.lon,\"center.lat\":r.lat}:t._isClipped?{\"projection.rotation.lon\":i.lon,\"projection.rotation.lat\":i.lat}:{\"center.lon\":r.lon,\"center.lat\":r.lat,\"projection.rotation.lon\":i.lon},c.extendFlat(this.viewInitial,e)},S.render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?u(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\":366,\"../../components/dragelement\":385,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/geo_location_utils\":496,\"../../lib/topojson_utils\":532,\"../../registry\":638,\"../cartesian/autorange\":553,\"../cartesian/axes\":554,\"../cartesian/select\":575,\"../plots\":619,\"./constants\":587,\"./zoom\":592,\"@plotly/d3\":58,\"d3-geo\":114,\"d3-geo-projection\":113,\"topojson-client\":315}],589:[function(t,e,r){\"use strict\";var n=t(\"../../plots/get_data\").getSubplotCalcData,i=t(\"../../lib\").counterRegex,a=t(\"./geo\"),o=\"geo\",s=i(o),l={};l.geo={valType:\"subplotid\",dflt:o,editType:\"calc\"},e.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:t(\"./layout_attributes\"),supplyLayoutDefaults:t(\"./layout_defaults\"),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots.geo,s=0;s0&&P<0&&(P+=360);var I,O,z,D=(C+P)/2;if(!p){var R=d?f.projRotate:[D,0,0];I=r(\"projection.rotation.lon\",R[0]),r(\"projection.rotation.lat\",R[1]),r(\"projection.rotation.roll\",R[2]),r(\"showcoastlines\",!d&&x)&&(r(\"coastlinecolor\"),r(\"coastlinewidth\")),r(\"showocean\",!!x&&void 0)&&r(\"oceancolor\")}(p?(O=-96.6,z=38.7):(O=d?D:I,z=(L[0]+L[1])/2),r(\"center.lon\",O),r(\"center.lat\",z),g&&(r(\"projection.tilt\"),r(\"projection.distance\")),m)&&r(\"projection.parallels\",f.projParallels||[0,60]);r(\"projection.scale\"),r(\"showland\",!!x&&void 0)&&r(\"landcolor\"),r(\"showlakes\",!!x&&void 0)&&r(\"lakecolor\"),r(\"showrivers\",!!x&&void 0)&&(r(\"rivercolor\"),r(\"riverwidth\")),r(\"showcountries\",d&&\"usa\"!==u&&x)&&(r(\"countrycolor\"),r(\"countrywidth\")),(\"usa\"===u||\"north america\"===u&&50===c)&&(r(\"showsubunits\",x),r(\"subunitcolor\"),r(\"subunitwidth\")),d||r(\"showframe\",x)&&(r(\"framecolor\"),r(\"framewidth\")),r(\"bgcolor\"),r(\"fitbounds\")&&(delete e.projection.scale,d?(delete e.center.lon,delete e.center.lat):v?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}e.exports=function(t,e,r){i(t,e,r,{type:\"geo\",attributes:s,handleDefaults:c,fullData:r,partition:\"y\"})}},{\"../../lib\":503,\"../get_data\":593,\"../subplot_defaults\":632,\"./constants\":587,\"./layout_attributes\":590}],592:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../registry\"),o=Math.PI/180,s=180/Math.PI,l={cursor:\"pointer\"},c={cursor:\"auto\"};function u(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function f(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],c=o._fullLayout,u=c[n],f={},h={};function p(t,e){f[n+\".\"+t]=i.nestedProperty(l,t).get(),a.call(\"_storeDirectGUIEdit\",s,c._preGUI,f);var r=i.nestedProperty(u,t);r.get()!==e&&(r.set(e),i.nestedProperty(l,t).set(e),h[n+\".\"+t]=e)}r(p),p(\"projection.scale\",e.scale()/t.fitScale),p(\"fitbounds\",!1),o.emit(\"plotly_relayout\",h)}function h(t,e){var r=u(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(l)})).on(\"zoom\",(function(){e.scale(n.event.scale).translate(n.event.translate),t.render();var r=e.invert(t.midPt);t.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":e.scale()/t.fitScale,\"geo.center.lon\":r[0],\"geo.center.lat\":r[1]})})).on(\"zoomend\",(function(){n.select(this).style(c),f(t,e,i)})),r}function p(t,e){var r,i,a,o,s,h,p,d,g,m=u(0,e);function v(t){return e.invert(t)}function y(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 m.on(\"zoomstart\",(function(){n.select(this).style(l),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,s=v(r)})).on(\"zoom\",(function(){if(h=n.mouse(this),function(t){var r=v(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>2||Math.abs(n[1]-t[1])>2}(r))return m.scale(e.scale()),void m.translate(e.translate());e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),s?v(h)&&(d=v(h),p=[o[0]+(d[0]-s[0]),i[1],i[2]],e.rotate(p),o=p):s=v(r=h),g=!0,t.render();var l=e.rotate(),c=e.invert(t.midPt);t.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":e.scale()/t.fitScale,\"geo.center.lon\":c[0],\"geo.center.lat\":c[1],\"geo.projection.rotation.lon\":-l[0]})})).on(\"zoomend\",(function(){n.select(this).style(c),g&&f(t,e,y)})),m}function d(t,e){var r,i={r:e.rotate(),k:e.scale()},a=u(0,e),o=function(t){var e=0,r=arguments.length,i=[];for(;++ed?(a=(f>0?90:-90)-p,i=0):(a=Math.asin(f/d)*s-p,i=Math.sqrt(d*d-f*f));var g=180-a-2*p,m=(Math.atan2(h,u)-Math.atan2(c,i))*s,v=(Math.atan2(h,u)-Math.atan2(c,-i))*s;return b(r[0],r[1],a,m)<=b(r[0],r[1],g,v)?[a,m,r[2]]:[g,v,r[2]]}function b(t,e,r,n){var i=_(r-t),a=_(n-e);return Math.sqrt(i*i+a*a)}function _(t){return(t%360+540)%360-180}function w(t,e,r){var n=r*o,i=t.slice(),a=0===e?1:0,s=2===e?1:2,l=Math.cos(n),c=Math.sin(n);return i[a]=t[a]*l-t[s]*c,i[s]=t[s]*l+t[a]*c,i}function T(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*s,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*s]}function k(t,e){for(var r=0,n=0,i=t.length;nMath.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(a)*_*(s>=0?1:-1),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[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&&(m(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&&(m(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).999&&(g=\"turntable\"):g=\"turntable\")}else g=\"turntable\";r(\"dragmode\",g),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:u,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{\"../../../components/color\":366,\"../../../lib\":503,\"../../../registry\":638,\"../../get_data\":593,\"../../subplot_defaults\":632,\"./axis_defaults\":601,\"./layout_attributes\":604}],604:[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),{}),projection:{type:{valType:\"enumerated\",values:[\"perspective\",\"orthographic\"],dflt:\"perspective\",editType:\"calc\"},editType:\"calc\"},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],editType:\"plot\"},hovermode:{valType:\"enumerated\",values:[\"closest\",!1],dflt:\"closest\",editType:\"modebar\"},uirevision:{valType:\"any\",editType:\"none\"},editType:\"plot\",_deprecated:{cameraposition:{valType:\"info_array\",editType:\"camera\"}}}},{\"../../../lib\":503,\"../../../lib/extend\":493,\"../../domain\":584,\"./axis_attributes\":600}],605:[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\":528}],606:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[a[c]];if(u._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/t.dataScale[c],Math.abs(u._length)===1/0||isNaN(u._length))l[c]=[];else{u._input_range=u.range.slice(),u.range[0]=r[c].lo/t.dataScale[c],u.range[1]=r[c].hi/t.dataScale[c],u._m=1/(t.dataScale[c]*r[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var f=u.tickmode;if(\"auto\"===u.tickmode){u.tickmode=\"linear\";var h=u.nticks||i.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/h)}for(var p=n.calcTicks(u,{msUTC:!0}),d=0;d/g,\" \"));l[c]=p,u.tickmode=f}}e.ticks=l;for(c=0;c<3;++c){o[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]);for(d=0;d<2;++d)e.bounds[d][c]=t.glplot.bounds[d][c]}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;ar.deltaY?1.1:1/1.1,a=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(t)}}),!!c&&{passive:!1}),t.glplot.canvas.addEventListener(\"mousemove\",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit(\"plotly_relayouting\",e)}})),t.staticMode||t.glplot.canvas.addEventListener(\"webglcontextlost\",(function(r){e&&e.emit&&e.emit(\"plotly_webglcontextlost\",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},w.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,\"viewBox\",\"0 0 \"+s+\" \"+l),n.setAttributeNS(null,\"width\",s),n.setAttributeNS(null,\"height\",l),b(e),e.glplot.axes.update(e.axesOptions);for(var c=Object.keys(e.traces),u=null,h=e.glplot.selection,g=0;g\")):\"isosurface\"===t.type||\"volume\"===t.type?(T.valueLabel=p.hoverLabelText(e._mockAxis,e._mockAxis.d2l(h.traceCoordinate[3]),t.valuehoverformat),S.push(\"value: \"+T.valueLabel),h.textLabel&&S.push(h.textLabel),x=S.join(\"
\")):x=h.textLabel;var E={x:h.traceCoordinate[0],y:h.traceCoordinate[1],z:h.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:w};d.appendArrayPointValue(E,_,w),t._module.eventData&&(E=_._module.eventData(E,h,_,{},w));var L={points:[E]};if(e.fullSceneLayout.hovermode){var C=[];d.loneHover({trace:_,x:(.5+.5*y[0]/y[3])*s,y:(.5-.5*y[1]/y[3])*l,xLabel:T.xLabel,yLabel:T.yLabel,zLabel:T.zLabel,text:x,name:u.name,color:d.castHoverOption(_,w,\"bgcolor\")||u.color,borderColor:d.castHoverOption(_,w,\"bordercolor\"),fontFamily:d.castHoverOption(_,w,\"font.family\"),fontSize:d.castHoverOption(_,w,\"font.size\"),fontColor:d.castHoverOption(_,w,\"font.color\"),nameLength:d.castHoverOption(_,w,\"namelength\"),textAlign:d.castHoverOption(_,w,\"align\"),hovertemplate:f.castOption(_,w,\"hovertemplate\"),hovertemplateLabels:f.extendFlat({},E,T),eventData:[E]},{container:n,gd:r,inOut_bbox:C}),E.bbox=C[0]}h.buttons&&h.distance<5?r.emit(\"plotly_click\",L):r.emit(\"plotly_hover\",L),this.oldEventData=L}else d.loneUnhover(n),this.oldEventData&&r.emit(\"plotly_unhover\",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)},w.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):f.error(\"Catastrophic and unrecoverable WebGL error. Context lost.\")};requestAnimationFrame(e)};var k=[\"xaxis\",\"yaxis\",\"zaxis\"];function A(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var a=k[i],o=a.charAt(0),s=n[a],l=e[o],c=e[o+\"calendar\"],u=e[\"_\"+o+\"length\"];if(f.isArrayOrTypedArray(l))for(var h,p=0;p<(u||l.length);p++)if(f.isArrayOrTypedArray(l[p]))for(var d=0;dm[1][a])m[0][a]=-1,m[1][a]=1;else{var L=m[1][a]-m[0][a];m[0][a]-=L/32,m[1][a]+=L/32}if(\"reversed\"===s.autorange){var C=m[0][a];m[0][a]=m[1][a],m[1][a]=C}}else{var P=s.range;m[0][a]=s.r2l(P[0]),m[1][a]=s.r2l(P[1])}m[0][a]===m[1][a]&&(m[0][a]-=1,m[1][a]+=1),v[a]=m[1][a]-m[0][a],this.glplot.setBounds(a,{min:m[0][a]*h[a],max:m[1][a]*h[a]})}var I=c.aspectmode;if(\"cube\"===I)d=[1,1,1];else if(\"manual\"===I){var O=c.aspectratio;d=[O.x,O.y,O.z]}else{if(\"auto\"!==I&&\"data\"!==I)throw new Error(\"scene.js aspectRatio was not one of the enumerated types\");var z=[1,1,1];for(a=0;a<3;++a){var D=y[l=(s=c[k[a]]).type];z[a]=Math.pow(D.acc,1/D.count)/h[a]}d=\"data\"===I||Math.max.apply(null,z)/Math.min.apply(null,z)<=4?z:[1,1,1]}c.aspectratio.x=u.aspectratio.x=d[0],c.aspectratio.y=u.aspectratio.y=d[1],c.aspectratio.z=u.aspectratio.z=d[2],this.glplot.setAspectratio(c.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),this.viewInitial.aspectmode||(this.viewInitial.aspectmode=c.aspectmode);var R=c.domain||null,F=e._size||null;if(R&&F){var B=this.container.style;B.position=\"absolute\",B.left=F.l+R.x[0]*F.w+\"px\",B.top=F.t+(1-R.y[1])*F.h+\"px\",B.width=F.w*(R.x[1]-R.x[0])+\"px\",B.height=F.h*(R.y[1]-R.y[0])+\"px\"}this.glplot.redraw()}},w.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener(\"wheel\",this.camera.wheelListener),this.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},w.getCamera=function(){var t;return this.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(t=this.camera).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]},projection:{type:!0===t._ortho?\"orthographic\":\"perspective\"}}},w.setViewport=function(t){var e,r=t.camera;this.camera.lookAt.apply(this,[[(e=r).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]]),this.glplot.setAspectratio(t.aspectratio),\"orthographic\"===r.projection.type!==this.camera._ortho&&(this.glplot.redraw(),this.glplot.clearRGBA(),this.glplot.dispose(),this.initializeGLPlot())},w.isCameraChanged=function(t){var e=this.getCamera(),r=f.nestedProperty(t,this.id+\".camera\").get();function n(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]]}var i=!1;if(void 0===r)i=!0;else{for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!n(e,r,a,o)){i=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(i=!0)}return i},w.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=f.nestedProperty(t,this.id+\".aspectratio\").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},w.saveLayout=function(t){var e,r,n,i,a,o,s=this.fullLayout,l=this.isCameraChanged(t),c=this.isAspectChanged(t),h=l||c;if(h){var p={};if(l&&(e=this.getCamera(),n=(r=f.nestedProperty(t,this.id+\".camera\")).get(),p[this.id+\".camera\"]=n),c&&(i=this.glplot.getAspectratio(),o=(a=f.nestedProperty(t,this.id+\".aspectratio\")).get(),p[this.id+\".aspectratio\"]=o),u.call(\"_storeDirectGUIEdit\",t,s._preGUI,p),l)r.set(e),f.nestedProperty(s,this.id+\".camera\").set(e);if(c)a.set(i),f.nestedProperty(s,this.id+\".aspectratio\").set(i),this.glplot.redraw()}return h},w.updateFx=function(t,e){var r=this.camera;if(r)if(\"orbit\"===t)r.mode=\"orbit\",r.keyBindingMode=\"rotate\";else if(\"turntable\"===t){r.up=[0,0,1],r.mode=\"turntable\",r.keyBindingMode=\"rotate\";var n=this.graphDiv,i=n._fullLayout,a=this.fullSceneLayout.camera,o=a.up.x,s=a.up.y,l=a.up.z;if(l/Math.sqrt(o*o+s*s+l*l)<.999){var c=this.id+\".camera.up\",h={x:0,y:0,z:1},p={};p[c]=h;var d=n.layout;u.call(\"_storeDirectGUIEdit\",d,i._preGUI,p),a.up=h,f.nestedProperty(d,c).set(h)}}else r.keyBindingMode=t;this.fullSceneLayout.hovermode=e},w.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),function(t,e,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)t[a+l]=Math.min(s*t[a+l],255)}}(a,r,i);var o=document.createElement(\"canvas\");o.width=r,o.height=i;var s,l=o.getContext(\"2d\"),c=l.createImageData(r,i);switch(c.data.set(a),l.putImageData(c,0,0),t){case\"jpeg\":s=o.toDataURL(\"image/jpeg\");break;case\"webp\":s=o.toDataURL(\"image/webp\");break;default:s=o.toDataURL(\"image/png\")}return this.staticMode&&this.container.removeChild(n),s},w.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[k[t]];p.setConvert(e,this.fullLayout),e.setScale=f.noop}},w.make4thDimension=function(){var t=this.graphDiv._fullLayout;this._mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},p.setConvert(this._mockAxis,t)},e.exports=_},{\"../../../stackgl_modules\":1120,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/show_no_webgl_msg\":525,\"../../lib/str2rgbarray\":528,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"./layout/convert\":602,\"./layout/spikes\":605,\"./layout/tick_marks\":606,\"./project\":607,\"has-passive-events\":229,\"webgl-context\":331}],609:[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;aOpenStreetMap contributors',a=['\\xa9 Carto',i].join(\" \"),o=['Map tiles by Stamen Design','under CC BY 3.0',\"|\",'Data by OpenStreetMap contributors','under ODbL'].join(\" \"),s={\"open-street-map\":{id:\"osm\",version:8,sources:{\"plotly-osm-tiles\":{type:\"raster\",attribution:i,tiles:[\"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png\",\"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-osm-tiles\",type:\"raster\",source:\"plotly-osm-tiles\",minzoom:0,maxzoom:22}]},\"white-bg\":{id:\"white-bg\",version:8,sources:{},layers:[{id:\"white-bg\",type:\"background\",paint:{\"background-color\":\"#FFFFFF\"},minzoom:0,maxzoom:22}]},\"carto-positron\":{id:\"carto-positron\",version:8,sources:{\"plotly-carto-positron\":{type:\"raster\",attribution:a,tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-positron\",type:\"raster\",source:\"plotly-carto-positron\",minzoom:0,maxzoom:22}]},\"carto-darkmatter\":{id:\"carto-darkmatter\",version:8,sources:{\"plotly-carto-darkmatter\":{type:\"raster\",attribution:a,tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-darkmatter\",type:\"raster\",source:\"plotly-carto-darkmatter\",minzoom:0,maxzoom:22}]},\"stamen-terrain\":{id:\"stamen-terrain\",version:8,sources:{\"plotly-stamen-terrain\":{type:\"raster\",attribution:o,tiles:[\"https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-terrain\",type:\"raster\",source:\"plotly-stamen-terrain\",minzoom:0,maxzoom:22}]},\"stamen-toner\":{id:\"stamen-toner\",version:8,sources:{\"plotly-stamen-toner\":{type:\"raster\",attribution:o,tiles:[\"https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-toner\",type:\"raster\",source:\"plotly-stamen-toner\",minzoom:0,maxzoom:22}]},\"stamen-watercolor\":{id:\"stamen-watercolor\",version:8,sources:{\"plotly-stamen-watercolor\":{type:\"raster\",attribution:['Map tiles by Stamen Design','under CC BY 3.0',\"|\",'Data by OpenStreetMap contributors','under CC BY SA'].join(\" \"),tiles:[\"https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-watercolor\",type:\"raster\",source:\"plotly-stamen-watercolor\",minzoom:0,maxzoom:22}]}},l=n(s);e.exports={requiredVersion:\"1.10.1\",styleUrlPrefix:\"mapbox://styles/mapbox/\",styleUrlSuffix:\"v9\",styleValuesMapbox:[\"basic\",\"streets\",\"outdoors\",\"light\",\"dark\",\"satellite\",\"satellite-streets\"],styleValueDflt:\"basic\",stylesNonMapbox:s,styleValuesNonMapbox:l,traceLayerPrefix:\"plotly-trace-layer-\",layoutLayerPrefix:\"plotly-layout-layer-\",wrongVersionErrorMsg:[\"Your custom plotly.js bundle is not using the correct mapbox-gl version\",\"Please install mapbox-gl@1.10.1.\"].join(\"\\n\"),noAccessTokenErrorMsg:[\"Missing Mapbox access token.\",\"Mapbox trace type require a Mapbox access token to be registered.\",\"For example:\",\" Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });\",\"More info here: https://www.mapbox.com/help/define-access-token/\"].join(\"\\n\"),missingStyleErrorMsg:[\"No valid mapbox style found, please set `mapbox.style` to one of:\",l.join(\", \"),\"or register a Mapbox access token to use a Mapbox-served style.\"].join(\"\\n\"),multipleTokensErrorMsg:[\"Set multiple mapbox access token across different mapbox subplot,\",\"using first token found as mapbox-gl does not allow multipleaccess tokens on the same page.\"].join(\"\\n\"),mapOnErrorMsg:\"Mapbox error.\",mapboxLogo:{path0:\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\",path1:\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\",path2:\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\",polygon:\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34\"},styleRules:{map:\"overflow:hidden;position:relative;\",\"missing-css\":\"display:none;\",canary:\"background-color:salmon;\",\"ctrl-bottom-left\":\"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;\",\"ctrl-bottom-right\":\"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;\",ctrl:\"clear: both; pointer-events: auto; transform: translate(0, 0);\",\"ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner\":\"display: none;\",\"ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner\":\"display: block; margin-top:2px\",\"ctrl-attrib.mapboxgl-compact:hover\":\"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;\",\"ctrl-attrib.mapboxgl-compact::after\":'content: \"\"; cursor: pointer; position: absolute; background-image: url(\\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"%3E %3Cpath fill=\"%23333333\" fill-rule=\"evenodd\" d=\"M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0\"/%3E %3C/svg%3E\\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',\"ctrl-attrib.mapboxgl-compact\":\"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;\",\"ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; right: 0\",\"ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; left: 0\",\"ctrl-bottom-left .mapboxgl-ctrl\":\"margin: 0 0 10px 10px; float: left;\",\"ctrl-bottom-right .mapboxgl-ctrl\":\"margin: 0 10px 10px 0; float: right;\",\"ctrl-attrib\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a:hover\":\"color: inherit; text-decoration: underline;\",\"ctrl-attrib .mapbox-improve-map\":\"font-weight: bold; margin-left: 2px;\",\"attrib-empty\":\"display: none;\",\"ctrl-logo\":'display:block; width: 21px; height: 21px; background-image: url(\\'data:image/svg+xml;charset=utf-8,%3C?xml version=\"1.0\" encoding=\"utf-8\"?%3E %3Csvg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 21 21\" style=\"enable-background:new 0 0 21 21;\" xml:space=\"preserve\"%3E%3Cg transform=\"translate(0,0.01)\"%3E%3Cpath d=\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3Cpath d=\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpath d=\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpolygon points=\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 \" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3C/g%3E%3C/svg%3E\\')'}}},{\"../../lib/sort_object_keys\":526}],612:[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\":503}],613:[function(t,e,r){\"use strict\";var n=t(\"mapbox-gl/dist/mapbox-gl-unminified\"),i=t(\"../../lib\"),a=i.strTranslate,o=i.strScale,s=t(\"../../plots/get_data\").getSubplotCalcData,l=t(\"../../constants/xmlns_namespaces\"),c=t(\"@plotly/d3\"),u=t(\"../../components/drawing\"),f=t(\"../../lib/svg_text_utils\"),h=t(\"./mapbox\"),p=r.constants=t(\"./constants\");function d(t){return\"string\"==typeof t&&(-1!==p.styleValuesMapbox.indexOf(t)||0===t.indexOf(\"mapbox://\"))}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,a=e._subplots.mapbox;if(n.version!==p.requiredVersion)throw new Error(p.wrongVersionErrorMsg);var o=function(t,e){var r=t._fullLayout;if(\"\"===t._context.mapboxAccessToken)return\"\";for(var n=[],a=[],o=!1,s=!1,l=0;l1&&i.warn(p.multipleTokensErrorMsg),n[0]):(a.length&&i.log([\"Listed mapbox access token(s)\",a.join(\",\"),\"but did not use a Mapbox map style, ignoring token(s).\"].join(\" \")),\"\")}(t,a);n.accessToken=o;for(var l=0;l_/2){var w=v.split(\"|\").join(\"
\");x.text(w).attr(\"data-unformatted\",w).call(f.convertToTspans,t),b=u.bBox(x.node())}x.attr(\"transform\",a(-3,8-b.height)),y.insert(\"rect\",\".static-attribution\").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:\"rgba(255, 255, 255, 0.75)\"});var T=1;b.width+6>_&&(T=_/(b.width+6));var k=[n.l+n.w*h.x[1],n.t+n.h*(1-h.y[0])];y.attr(\"transform\",a(k[0],k[1])+o(T))}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n0){for(var r=0;r0}function u(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,\"line-dasharray\":t.line.dash});break;case\"fill\":n.extendFlat(r,{\"fill-color\":t.color,\"fill-outline-color\":t.fill.outlinecolor,\"fill-opacity\":t.opacity});break;case\"symbol\":var i=t.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(e,{\"icon-image\":i.icon+\"-15\",\"icon-size\":i.iconsize/10,\"text-field\":i.text,\"text-size\":i.textfont.size,\"text-anchor\":o.anchor,\"text-offset\":o.offset,\"symbol-placement\":i.placement}),n.extendFlat(r,{\"icon-color\":t.color,\"text-color\":i.textfont.color,\"text-opacity\":t.opacity});break;case\"raster\":n.extendFlat(r,{\"raster-fade-duration\":0,\"raster-opacity\":t.opacity})}return{layout:e,paint:r}}l.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):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=c(t)},l.needsNewImage=function(t){return this.subplot.map.getSource(this.idSource)&&\"image\"===this.sourceType&&\"image\"===t.sourcetype&&(this.source!==t.source||JSON.stringify(this.coordinates)!==JSON.stringify(t.coordinates))},l.needsNewSource=function(t){return this.sourceType!==t.sourcetype||JSON.stringify(this.source)!==JSON.stringify(t.source)||this.layerType!==t.type},l.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup[\"layout-\"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup[\"layout-\"+this.index]},l.updateImage=function(t){this.subplot.map.getSource(this.idSource).updateImage({url:t.source,coordinates:t.coordinates});var e=this.findFollowingMapboxLayerId(this.lookupBelow());null!==e&&this.subplot.map.moveLayer(this.idLayer,e)},l.updateSource=function(t){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,c(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,a={type:r};\"geojson\"===r?e=\"data\":\"vector\"===r?e=\"string\"==typeof n?\"url\":\"tiles\":\"raster\"===r?(e=\"tiles\",a.tileSize=256):\"image\"===r&&(e=\"url\",a.coordinates=t.coordinates);a[e]=n,t.sourceattribution&&(a.attribution=i(t.sourceattribution));return a}(t);e.addSource(this.idSource,r)}},l.findFollowingMapboxLayerId=function(t){if(\"traces\"===t)for(var e=this.subplot.getMapLayers(),r=0;r1)for(r=0;r-1&&v(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf(\"event\")>-1&&c.click(n,e.originalEvent)}}},_.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,o=t.dragmode;a=f(o)?function(t,r){(t.range={})[e.id]=[c([r.xmin,r.ymin]),c([r.xmax,r.ymax])]}:function(t,r,n){(t.lassoPoints={})[e.id]=n.filtered.map(c)};var s=e.dragOptions;e.dragOptions=i.extendDeep(s||{},{dragmode:t.dragmode,element:e.div,gd:n,plotinfo:{id:e.id,domain:t[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off(\"click\",e.onClickInPanHandler),p(o)||h(o)?(r.dragPan.disable(),r.on(\"zoomstart\",e.clearSelect),e.dragOptions.prepFn=function(t,r,n){d(t,r,n,e.dragOptions,o)},l.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 c(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},_.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])},_.updateLayers=function(t){var e,r=t[this.id].layers,n=this.layerList;if(r.length!==n.length){for(e=0;e=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\"),l=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(){b.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()&&l.text()?\" - \":\"\")}},b.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit(\"plotly_beforeexport\");var 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=b.graphJson(t,!1,\"keepdata\"),i.node().submit(),r.remove(),t.emit(\"plotly_afterexport\"),!1}};var T=[\"days\",\"shortDays\",\"months\",\"shortMonths\",\"periods\",\"dateTime\",\"date\",\"time\",\"decimal\",\"thousands\",\"grouping\",\"currency\"],k=[\"year\",\"month\",\"dayMonth\",\"dayMonthYear\"];function A(t,e){var r=t._context.locale;r||(r=\"en-US\");var n=!1,i={};function a(t){for(var r=!0,a=0;a1&&z.length>1){for(s.getComponentMethod(\"grid\",\"sizeDefaults\")(c,l),o=0;o15&&z.length>15&&0===l.shapes.length&&0===l.images.length,b.linkSubplots(h,l,f,n),b.cleanPlot(h,l,f,n);var N=!(!n._has||!n._has(\"gl2d\")),j=!(!l._has||!l._has(\"gl2d\")),U=!(!n._has||!n._has(\"cartesian\"))||N,V=!(!l._has||!l._has(\"cartesian\"))||j;U&&!V?n._bgLayer.remove():V&&!U&&(l._shouldCreateBgLayer=!0),n._zoomlayer&&!t._dragging&&d({_fullLayout:n}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i0){var f=1-2*s;n=Math.round(f*n),i=Math.round(f*i)}}var h=b.layoutAttributes.width.min,p=b.layoutAttributes.height.min;n1,g=!e.height&&Math.abs(r.height-i)>1;(g||d)&&(d&&(r.width=n),g&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),b.sanitizeMargins(r)},b.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a,o,l=s.componentsRegistry,c=e._basePlotModules,f=s.subplotsRegistry.cartesian;for(i in l)(o=l[i]).includeBasePlot&&o.includeBasePlot(t,e);for(var h in c.length||c.push(f),e._has(\"cartesian\")&&(s.getComponentMethod(\"grid\",\"contentDefaults\")(t,e),f.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(u.subplotSort);for(a=0;a1&&(r.l/=g,r.r/=g)}if(f){var m=(r.t+r.b)/f;m>1&&(r.t/=m,r.b/=m)}var v=void 0!==r.xl?r.xl:r.x,y=void 0!==r.xr?r.xr:r.x,x=void 0!==r.yt?r.yt:r.y,_=void 0!==r.yb?r.yb:r.y;h[e]={l:{val:v,size:r.l+d},r:{val:y,size:r.r+d},b:{val:_,size:r.b+d},t:{val:x,size:r.t+d}},p[e]=1}else delete h[e],delete p[e];if(!n._replotting)return b.doAutoMargin(t)}},b.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,n=e.height;e._size||(e._size={}),C(e);var i=e._size,a=e.margin,l=u.extendFlat({},i),c=a.l,f=a.r,h=a.t,d=a.b,g=e._pushmargin,m=e._pushmarginIds;if(!1!==e.margin.autoexpand){for(var v in g)m[v]||delete g[v];for(var y in g.base={l:{val:0,size:c},r:{val:1,size:f},t:{val:1,size:h},b:{val:0,size:d}},g){var x=g[y].l||{},_=g[y].b||{},w=x.val,T=x.size,k=_.val,A=_.size;for(var M in g){if(o(T)&&g[M].r){var S=g[M].r.val,E=g[M].r.size;if(S>w){var L=(T*S+(E-r)*w)/(S-w),P=(E*(1-w)+(T-r)*(1-S))/(S-w);L+P>c+f&&(c=L,f=P)}}if(o(A)&&g[M].t){var I=g[M].t.val,O=g[M].t.size;if(I>k){var z=(A*I+(O-n)*k)/(I-k),D=(O*(1-k)+(A-n)*(1-I))/(I-k);z+D>d+h&&(d=z,h=D)}}}}}var R=u.constrain(r-a.l-a.r,2,64),F=u.constrain(n-a.t-a.b,2,64),B=Math.max(0,r-R),N=Math.max(0,n-F);if(B){var j=(c+f)/B;j>1&&(c/=j,f/=j)}if(N){var U=(d+h)/N;U>1&&(d/=U,h/=U)}if(i.l=Math.round(c),i.r=Math.round(f),i.t=Math.round(h),i.b=Math.round(d),i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e._replotting&&b.didMarginChange(l,i)){\"_redrawFromAutoMarginCount\"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var V=3*(1+Object.keys(m).length);if(e._redrawFromAutoMarginCount0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return s.call(\"redraw\",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit(\"plotly_transitioninterrupted\",[])}));var a=0,o=0;function l(){return a++,function(){o++,n||o!==a||function(e){if(!t._transitionData)return;(function(t){if(t)for(;t.length;)t.shift()})(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return s.call(\"redraw\",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit(\"plotly_transitioned\",[])})).then(e)}(i)}}r.runFn(l),setTimeout(l())}))}],a=u.syncOrAsync(i,t);return a&&a.then||(a=Promise.resolve()),a.then((function(){return t}))}b.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},b.graphJson=function(t,e,r,n,i,a){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&b.supplyDefaults(t);var o=i?t._fullData:t.data,s=i?t._fullLayout:t.layout,l=(t._transitionData||{})._frames;function c(t,e){if(\"function\"==typeof t)return e?\"_function_\":null;if(u.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(a){if(-1===[\"_\",\"[\"].indexOf(a.charAt(0)))if(\"function\"!=typeof t[a]){if(\"keepdata\"===r){if(\"src\"===a.substr(a.length-3))return}else if(\"keepstream\"===r){if(\"string\"==typeof(n=t[a+\"src\"])&&n.indexOf(\":\")>0&&!u.isPlainObject(t.stream))return}else if(\"keepall\"!==r&&\"string\"==typeof(n=t[a+\"src\"])&&n.indexOf(\":\")>0)return;i[a]=c(t[a],e)}else e&&(i[a]=\"_function\")})),i}return Array.isArray(t)?t.map((function(t){return c(t,e)})):u.isTypedArray(t)?u.simpleMap(t,u.identity):u.isJSDate(t)?u.ms2DateTimeLocal(+t):t}var f={data:(o||[]).map((function(t){var r=c(t);return e&&delete r.fit,r}))};if(!e&&(f.layout=c(s),i)){var h=s._size;f.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return l&&(f.frames=c(l)),a&&(f.config=c(t._context,!0)),\"object\"===n?f:JSON.stringify(f)},b.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r=0;a--)if(s[a].enabled){r._indexToPoints=s[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(t,r))}Array.isArray(o)&&o[0]||(o=[{x:h,y:h}]),o[0].t||(o[0].t={}),o[0].trace=r,d[e]=o}}for(z(o,c,f),i=0;i1e-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;a0?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=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]}(p),b=x[2]-x[0],_=x[3]-x[1],w=h/f,T=Math.abs(_/b);w>T?(d=f,y=(h-(g=f*T))/n.h/2,m=[o[0],o[1]],v=[s[0]+y,s[1]-y]):(g=h,y=(f-(d=h/T))/n.w/2,m=[o[0]+y,o[1]-y],v=[s[0],s[1]]),this.xLength2=d,this.yLength2=g,this.xDomain2=m,this.yDomain2=v;var k,A=this.xOffset2=n.l+n.w*m[0],M=this.yOffset2=n.t+n.h*(1-v[1]),S=this.radius=d/b,E=this.innerRadius=this.getHole(e)*S,L=this.cx=A-S*x[0],C=this.cy=M+S*x[3],P=this.cxx=L-A,I=this.cyy=C-M,O=i.side;\"counterclockwise\"===O?(k=O,O=\"top\"):\"clockwise\"===O&&(k=O,O=\"bottom\"),this.radialAxis=this.mockAxis(t,e,i,{_id:\"x\",side:O,_trueSide:k,domain:[E/n.w,S/n.w]}),this.angularAxis=this.mockAxis(t,e,a,{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:m}),this.yaxis=this.mockCartesianAxis(t,e,{_id:\"y\",domain:v});var z=this.pathSubplot();this.clipPaths.forTraces.select(\"path\").attr(\"d\",z).attr(\"transform\",l(P,I)),r.frontplot.attr(\"transform\",l(A,M)).call(u.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr(\"d\",z).attr(\"transform\",l(L,C)).call(c.fill,e.bgcolor)},N.mockAxis=function(t,e,r,n){var i=o.extendFlat({},r,n);return d(i,e,t),i},N.mockCartesianAxis=function(t,e,r){var n=this,i=n.isSmith,a=r._id,s=o.extendFlat({type:\"linear\"},r);p(s,t);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var t=n.sectorBBox,r=l[a],i=n.radialAxis._rl,o=(i[1]-i[0])/(1-n.getHole(e));s.range=[t[r[0]]*o,t[r[1]]*o]},s.isPtWithinRange=\"x\"!==a||i?function(){return!0}:function(t){return n.isPtInside(t)},s.setRange(),s.setScale(),s},N.doAutoRange=function(t,e){var r=this.gd,n=this.radialAxis,i=this.getRadial(e);g(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\")]},N.updateRadialAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=r.getRadial(e),g=D(r.getSector(e)[0],360),m=r.radialAxis,v=u90&&g<=270&&(m.tickangle=180);var x=y?function(t){var e=O(r,C([t.x,0]));return l(e[0]-f,e[1]-p)}:function(t){return l(m.l2p(t.x)+u,0)},b=y?function(t){return I(r,t.x,-1/0,1/0)}:function(t){return r.pathArc(m.r2p(t.x)+u)},_=j(d);if(r.radialTickLayout!==_&&(i[\"radial-axis\"].selectAll(\".xtick\").remove(),r.radialTickLayout=_),v){m.setScale();var w=0,T=y?(m.tickvals||[]).filter((function(t){return t>=0})).map((function(t){return h.tickText(m,t,!0,!1)})):h.calcTicks(m),k=y?T:h.clipEnds(m,T),A=h.getTickSigns(m)[2];y&&((\"top\"===m.ticks&&\"bottom\"===m.side||\"bottom\"===m.ticks&&\"top\"===m.side)&&(A=-A),\"top\"===m.ticks&&\"top\"===m.side&&(w=-m.ticklen),\"bottom\"===m.ticks&&\"bottom\"===m.side&&(w=m.ticklen)),h.drawTicks(n,m,{vals:T,layer:i[\"radial-axis\"],path:h.makeTickPath(m,0,A),transFn:x,crisp:!1}),h.drawGrid(n,m,{vals:k,layer:i[\"radial-grid\"],path:b,transFn:o.noop,crisp:!1}),h.drawLabels(n,m,{vals:T,layer:i[\"radial-axis\"],transFn:x,labelFns:h.makeLabelFns(m,w)})}var M=r.radialAxisAngle=r.vangles?F(U(R(d.angle),r.vangles)):d.angle,S=l(f,p),E=S+s(-M);V(i[\"radial-axis\"],v&&(d.showticklabels||d.ticks),{transform:E}),V(i[\"radial-grid\"],v&&d.showgrid,{transform:y?\"\":S}),V(i[\"radial-line\"].select(\"line\"),v&&d.showline,{x1:y?-a:u,y1:0,x2:a,y2:0,transform:E}).attr(\"stroke-width\",d.linewidth).call(c.stroke,d.linecolor)},N.updateRadialAxisTitle=function(t,e,r){if(!this.isSmith){var n=this.gd,i=this.radius,a=this.cx,o=this.cy,s=this.getRadial(e),l=this.id+\"title\",c=0;if(s.title){var f=u.bBox(this.layers[\"radial-axis\"].node()).height,h=s.title.font.size,p=s.side;c=\"top\"===p?h:\"counterclockwise\"===p?-(f+.4*h):f+.8*h}var d=void 0!==r?r:this.radialAxisAngle,g=R(d),m=Math.cos(g),v=Math.sin(g),y=a+i/2*m+c*v,b=o-i/2*v+c*m;this.layers[\"radial-axis-title\"]=x.draw(n,l,{propContainer:s,propName:this.id+\".radialaxis.title\",placeholder:z(n,\"Click to enter radial axis title\"),attributes:{x:y,y:b,\"text-anchor\":\"middle\"},transform:{rotate:-d}})}},N.updateAngularAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=r.getAngular(e),g=r.angularAxis,m=r.isSmith;m||(r.fillViewInitialKey(\"angularaxis.rotation\",d.rotation),g.setGeometry(),g.setScale());var v=m?function(t){var e=O(r,C([0,t.x]));return Math.atan2(e[0]-f,e[1]-p)-Math.PI/2}:function(t){return g.t2g(t.x)};\"linear\"===g.type&&\"radians\"===g.thetaunit&&(g.tick0=F(g.tick0),g.dtick=F(g.dtick));var y=function(t){return l(f+a*Math.cos(t),p-a*Math.sin(t))},x=m?function(t){var e=O(r,C([0,t.x]));return l(e[0],e[1])}:function(t){return y(v(t))},b=m?function(t){var e=O(r,C([0,t.x])),n=Math.atan2(e[0]-f,e[1]-p)-Math.PI/2;return l(e[0],e[1])+s(-F(n))}:function(t){var e=v(t);return y(e)+s(-F(e))},_=m?function(t){return P(r,t.x,0,1/0)}:function(t){var e=v(t),r=Math.cos(e),n=Math.sin(e);return\"M\"+[f+u*r,p-u*n]+\"L\"+[f+a*r,p-a*n]},w=h.makeLabelFns(g,0).labelStandoff,T={xFn:function(t){var e=v(t);return Math.cos(e)*w},yFn:function(t){var e=v(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(w+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*M)},anchorFn:function(t){var e=v(t),r=Math.cos(e);return Math.abs(r)<.1?\"middle\":r>0?\"start\":\"end\"},heightFn:function(t,e,r){var n=v(t);return-.5*(1+Math.sin(n))*r}},k=j(d);r.angularTickLayout!==k&&(i[\"angular-axis\"].selectAll(\".\"+g._id+\"tick\").remove(),r.angularTickLayout=k);var A,S=m?[1/0].concat(g.tickvals||[]).map((function(t){return h.tickText(g,t,!0,!1)})):h.calcTicks(g);if(m&&(S[0].text=\"\\u221e\",S[0].fontSize*=1.75),\"linear\"===e.gridshape?(A=S.map(v),o.angleDelta(A[0],A[1])<0&&(A=A.slice().reverse())):A=null,r.vangles=A,\"category\"===g.type&&(S=S.filter((function(t){return o.isAngleInsideSector(v(t),r.sectorInRad)}))),g.visible){var E=\"inside\"===g.ticks?-1:1,L=(g.linewidth||1)/2;h.drawTicks(n,g,{vals:S,layer:i[\"angular-axis\"],path:\"M\"+E*L+\",0h\"+E*g.ticklen,transFn:b,crisp:!1}),h.drawGrid(n,g,{vals:S,layer:i[\"angular-grid\"],path:_,transFn:o.noop,crisp:!1}),h.drawLabels(n,g,{vals:S,layer:i[\"angular-axis\"],repositionOnUpdate:!0,transFn:x,labelFns:T})}V(i[\"angular-line\"].select(\"path\"),d.showline,{d:r.pathSubplot(),transform:l(f,p)}).attr(\"stroke-width\",d.linewidth).call(c.stroke,d.linecolor)},N.updateFx=function(t,e){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1)),this.updateHoverAndMainDrag(t))},N.updateHoverAndMainDrag=function(t){var e,r,s=this,c=s.isSmith,u=s.gd,f=s.layers,h=t._zoomlayer,p=S.MINZOOM,d=S.OFFEDGE,g=s.radius,x=s.innerRadius,T=s.cx,k=s.cy,A=s.cxx,M=s.cyy,L=s.sectorInRad,C=s.vangles,P=s.radialAxis,I=E.clampTiny,O=E.findXYatLength,z=E.findEnclosingVertexAngles,D=S.cornerHalfWidth,R=S.cornerLen/2,F=m.makeDragger(f,\"path\",\"maindrag\",\"crosshair\");n.select(F).attr(\"d\",s.pathSubplot()).attr(\"transform\",l(T,k)),F.onmousemove=function(t){y.hover(u,t,s.id),u._fullLayout._lasthover=F,u._fullLayout._hoversubplot=s.id},F.onmouseout=function(t){u._dragging||v.unhover(u,t)};var B,N,j,U,V,H,q,G,Y,W={element:F,gd:u,subplot:s.id,plotinfo:{id:s.id,xaxis:s.xaxis,yaxis:s.yaxis},xaxes:[s.xaxis],yaxes:[s.yaxis]};function X(t,e){return Math.sqrt(t*t+e*e)}function Z(t,e){return X(t-A,e-M)}function J(t,e){return Math.atan2(M-e,t-A)}function K(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function Q(t,e){if(0===t)return s.pathSector(2*D);var r=R/t,n=e-r,i=e+r,a=Math.max(0,Math.min(t,g)),o=a-D,l=a+D;return\"M\"+K(o,n)+\"A\"+[o,o]+\" 0,0,0 \"+K(o,i)+\"L\"+K(l,i)+\"A\"+[l,l]+\" 0,0,1 \"+K(l,n)+\"Z\"}function $(t,e,r){if(0===t)return s.pathSector(2*D);var n,i,a=K(t,e),o=K(t,r),l=I((a[0]+o[0])/2),c=I((a[1]+o[1])/2);if(l&&c){var u=c/l,f=-1/u,h=O(D,u,l,c);n=O(R,f,h[0][0],h[0][1]),i=O(R,f,h[1][0],h[1][1])}else{var p,d;c?(p=R,d=D):(p=D,d=R),n=[[l-p,c-d],[l+p,c-d]],i=[[l-p,c+d],[l+p,c+d]]}return\"M\"+n.join(\"L\")+\"L\"+i.reverse().join(\"L\")+\"Z\"}function tt(t,e){return e=Math.max(Math.min(e,g),x),tp?(t-1&&1===t&&_(e,u,[s.xaxis],[s.yaxis],s.id,W),r.indexOf(\"event\")>-1&&y.click(u,e,s.id)}W.prepFn=function(t,n,a){var l=u._fullLayout.dragmode,f=F.getBoundingClientRect();u._fullLayout._calcInverseTransform(u);var p=u._fullLayout._invTransform;e=u._fullLayout._invScaleX,r=u._fullLayout._invScaleY;var d=o.apply3DTransform(p)(n-f.left,a-f.top);if(B=d[0],N=d[1],C){var v=E.findPolygonOffset(g,L[0],L[1],C);B+=A+v[0],N+=M+v[1]}switch(l){case\"zoom\":W.clickFn=st,c||(W.moveFn=C?it:rt,W.doneFn=at,function(){j=null,U=null,V=s.pathSubplot(),H=!1;var t=u._fullLayout[s.id];q=i(t.bgcolor).getLuminance(),(G=m.makeZoombox(h,q,T,k,V)).attr(\"fill-rule\",\"evenodd\"),Y=m.makeCorners(h,T,k),w(u)}());break;case\"select\":case\"lasso\":b(t,n,a,W,l)}},v.init(W)},N.updateRadialDrag=function(t,e,r){var i=this,c=i.gd,u=i.layers,f=i.radius,h=i.innerRadius,p=i.cx,d=i.cy,g=i.radialAxis,y=S.radialDragBoxSize,x=y/2;if(g.visible){var b,_,T,M=R(i.radialAxisAngle),E=g._rl,L=E[0],C=E[1],P=E[r],I=.75*(E[1]-E[0])/(1-i.getHole(e))/f;r?(b=p+(f+x)*Math.cos(M),_=d-(f+x)*Math.sin(M),T=\"radialdrag\"):(b=p+(h-x)*Math.cos(M),_=d-(h-x)*Math.sin(M),T=\"radialdrag-inner\");var O,z,D,B=m.makeRectDragger(u,T,\"crosshair\",-x,-x,y,y),N={element:B,gd:c};V(n.select(B),g.visible&&h0==(r?D>L:Dn?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;o0?1:0}function i(t){var e=t[0],r=t[1];if(!isFinite(e)||!isFinite(r))return[1,0];var n=(e+1)*(e+1)+r*r;return[(e*e+r*r-1)/n,2*r/n]}function a(t,e){var r=e[0],n=e[1];return[r*t.radius+t.cx,-n*t.radius+t.cy]}function o(t,e){return e*t.radius}e.exports={smith:i,reactanceArc:function(t,e,r,n){var s=a(t,i([r,e])),l=s[0],c=s[1],u=a(t,i([n,e])),f=u[0],h=u[1];if(0===e)return[\"M\"+l+\",\"+c,\"L\"+f+\",\"+h].join(\" \");var p=o(t,1/Math.abs(e));return[\"M\"+l+\",\"+c,\"A\"+p+\",\"+p+\" 0 0,\"+(e<0?1:0)+\" \"+f+\",\"+h].join(\" \")},resistanceArc:function(t,e,r,s){var l=o(t,1/(e+1)),c=a(t,i([e,r])),u=c[0],f=c[1],h=a(t,i([e,s])),p=h[0],d=h[1];if(n(r)!==n(s)){var g=a(t,i([e,0]));return[\"M\"+u+\",\"+f,\"A\"+l+\",\"+l+\" 0 0,\"+(00){for(var n=[],i=0;i=u&&(h.min=0,d.min=0,m.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function g(t,e,r,n){var i=h[e._name];function o(r,n){return a.coerce(t,e,i,r,n)}o(\"uirevision\",n.uirevision),e.type=\"linear\";var p=o(\"color\"),d=p!==i.color.dflt?p:r.font.color,g=e._name.charAt(0).toUpperCase(),m=\"Component \"+g,v=o(\"title.text\",m);e._hovertitle=v===m?v:g,a.coerceFont(o,\"title.font\",{family:r.font.family,size:a.bigFont(r.font.size),color:d}),o(\"min\"),u(t,e,o,\"linear\"),l(t,e,o,\"linear\"),s(t,e,o,\"linear\"),c(t,e,o,{outerTicks:!0}),o(\"showticklabels\")&&(a.coerceFont(o,\"tickfont\",{family:r.font.family,size:r.font.size,color:d}),o(\"tickangle\"),o(\"tickformat\")),f(t,e,o,{dfltColor:p,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),o(\"hoverformat\"),o(\"layer\")}e.exports=function(t,e,r){o(t,e,r,{type:\"ternary\",attributes:h,handleDefaults:d,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{\"../../components/color\":366,\"../../lib\":503,\"../../plot_api/plot_template\":543,\"../cartesian/line_grid_defaults\":571,\"../cartesian/prefix_suffix_defaults\":573,\"../cartesian/tick_label_defaults\":578,\"../cartesian/tick_mark_defaults\":579,\"../cartesian/tick_value_defaults\":580,\"../subplot_defaults\":632,\"./layout_attributes\":635}],637:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"tinycolor2\"),a=t(\"../../registry\"),o=t(\"../../lib\"),s=o.strTranslate,l=o._,c=t(\"../../components/color\"),u=t(\"../../components/drawing\"),f=t(\"../cartesian/set_convert\"),h=t(\"../../lib/extend\").extendFlat,p=t(\"../plots\"),d=t(\"../cartesian/axes\"),g=t(\"../../components/dragelement\"),m=t(\"../../components/fx\"),v=t(\"../../components/dragelement/helpers\"),y=v.freeMode,x=v.rectMode,b=t(\"../../components/titles\"),_=t(\"../cartesian/select\").prepSelect,w=t(\"../cartesian/select\").selectOnClick,T=t(\"../cartesian/select\").clearSelect,k=t(\"../cartesian/select\").clearSelectionsCache,A=t(\"../cartesian/constants\");function M(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=M;var S=M.prototype;S.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},S.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var i=0;iE*b?i=(a=b)*E:a=(i=x)/E,o=v*i/x,l=y*a/b,r=e.l+e.w*g-i/2,n=e.t+e.h*(1-m)-a/2,p.x0=r,p.y0=n,p.w=i,p.h=a,p.sum=_,p.xaxis={type:\"linear\",range:[w+2*k-_,_-w-2*T],domain:[g-o/2,g+o/2],_id:\"x\"},f(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(t){return t.a>=p.aaxis.range[0]&&t.a<=p.aaxis.range[1]&&t.b>=p.baxis.range[1]&&t.b<=p.baxis.range[0]&&t.c>=p.caxis.range[1]&&t.c<=p.caxis.range[0]},p.yaxis={type:\"linear\",range:[w,_-T-k],domain:[m-l/2,m+l/2],_id:\"y\"},f(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var A=p.yaxis.domain[0],M=p.aaxis=h({},t.aaxis,{range:[w,_-T-k],side:\"left\",tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+l*E],anchor:\"free\",position:0,_id:\"y\",_length:i});f(M,p.graphDiv._fullLayout),M.setScale();var S=p.baxis=h({},t.baxis,{range:[_-w-k,T],side:\"bottom\",domain:p.xaxis.domain,anchor:\"free\",position:0,_id:\"x\",_length:i});f(S,p.graphDiv._fullLayout),S.setScale();var L=p.caxis=h({},t.caxis,{range:[_-w-T,k],side:\"right\",tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+l*E],anchor:\"free\",position:0,_id:\"y\",_length:i});f(L,p.graphDiv._fullLayout),L.setScale();var C=\"M\"+r+\",\"+(n+a)+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";p.clipDef.select(\"path\").attr(\"d\",C),p.layers.plotbg.select(\"path\").attr(\"d\",C);var P=\"M0,\"+a+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";p.clipDefRelative.select(\"path\").attr(\"d\",P);var I=s(r,n);p.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",I),p.clipDefRelative.select(\"path\").attr(\"transform\",null);var O=s(r-S._offset,n+a);p.layers.baxis.attr(\"transform\",O),p.layers.bgrid.attr(\"transform\",O);var z=s(r+i/2,n)+\"rotate(30)\"+s(0,-M._offset);p.layers.aaxis.attr(\"transform\",z),p.layers.agrid.attr(\"transform\",z);var D=s(r+i/2,n)+\"rotate(-30)\"+s(0,-L._offset);p.layers.caxis.attr(\"transform\",D),p.layers.cgrid.attr(\"transform\",D),p.drawAxes(!0),p.layers.aline.select(\"path\").attr(\"d\",M.showline?\"M\"+r+\",\"+(n+a)+\"l\"+i/2+\",-\"+a:\"M0,0\").call(c.stroke,M.linecolor||\"#000\").style(\"stroke-width\",(M.linewidth||0)+\"px\"),p.layers.bline.select(\"path\").attr(\"d\",S.showline?\"M\"+r+\",\"+(n+a)+\"h\"+i:\"M0,0\").call(c.stroke,S.linecolor||\"#000\").style(\"stroke-width\",(S.linewidth||0)+\"px\"),p.layers.cline.select(\"path\").attr(\"d\",L.showline?\"M\"+(r+i/2)+\",\"+n+\"l\"+i/2+\",\"+a:\"M0,0\").call(c.stroke,L.linecolor||\"#000\").style(\"stroke-width\",(L.linewidth||0)+\"px\"),p.graphDiv._context.staticPlot||p.initInteractions(),u.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},S.drawAxes=function(t){var e=this.graphDiv,r=this.id.substr(7)+\"title\",n=this.layers,i=this.aaxis,a=this.baxis,o=this.caxis;if(this.drawAx(i),this.drawAx(a),this.drawAx(o),t){var s=Math.max(i.showticklabels?i.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+(\"outside\"===o.ticks?.87*o.ticklen:0)),c=(a.showticklabels?a.tickfont.size:0)+(\"outside\"===a.ticks?a.ticklen:0)+3;n[\"a-title\"]=b.draw(e,\"a\"+r,{propContainer:i,propName:this.id+\".aaxis.title\",placeholder:l(e,\"Click to enter Component A title\"),attributes:{x:this.x0+this.w/2,y:this.y0-i.title.font.size/3-s,\"text-anchor\":\"middle\"}}),n[\"b-title\"]=b.draw(e,\"b\"+r,{propContainer:a,propName:this.id+\".baxis.title\",placeholder:l(e,\"Click to enter Component B title\"),attributes:{x:this.x0-c,y:this.y0+this.h+.83*a.title.font.size+c,\"text-anchor\":\"middle\"}}),n[\"c-title\"]=b.draw(e,\"c\"+r,{propContainer:o,propName:this.id+\".caxis.title\",placeholder:l(e,\"Click to enter Component C title\"),attributes:{x:this.x0+this.w+c,y:this.y0+this.h+.83*o.title.font.size+c,\"text-anchor\":\"middle\"}})}},S.drawAx=function(t){var e,r=this.graphDiv,n=t._name,i=n.charAt(0),a=t._id,s=this.layers[n],l=i+\"tickLayout\",c=(e=t).ticks+String(e.ticklen)+String(e.showticklabels);this[l]!==c&&(s.selectAll(\".\"+a+\"tick\").remove(),this[l]=c),t.setScale();var u=d.calcTicks(t),f=d.clipEnds(t,u),h=d.makeTransTickFn(t),p=d.getTickSigns(t)[2],g=o.deg2rad(30),m=p*(t.linewidth||1)/2,v=p*t.ticklen,y=this.w,x=this.h,b=\"b\"===i?\"M0,\"+m+\"l\"+Math.sin(g)*v+\",\"+Math.cos(g)*v:\"M\"+m+\",0l\"+Math.cos(g)*v+\",\"+-Math.sin(g)*v,_={a:\"M0,0l\"+x+\",-\"+y/2,b:\"M0,0l-\"+y/2+\",-\"+x,c:\"M0,0l-\"+x+\",\"+y/2}[i];d.drawTicks(r,t,{vals:\"inside\"===t.ticks?f:u,layer:s,path:b,transFn:h,crisp:!1}),d.drawGrid(r,t,{vals:f,layer:this.layers[i+\"grid\"],path:_,transFn:h,crisp:!1}),d.drawLabels(r,t,{vals:u,layer:s,transFn:h,labelFns:d.makeLabelFns(t,0,30)})};var L=A.MINZOOM/2+.87,C=\"m-0.87,.5h\"+L+\"v3h-\"+(L+5.2)+\"l\"+(L/2+2.6)+\",-\"+(.87*L+4.5)+\"l2.6,1.5l-\"+L/2+\",\"+.87*L+\"Z\",P=\"m0.87,.5h-\"+L+\"v3h\"+(L+5.2)+\"l-\"+(L/2+2.6)+\",-\"+(.87*L+4.5)+\"l-2.6,1.5l\"+L/2+\",\"+.87*L+\"Z\",I=\"m0,1l\"+L/2+\",\"+.87*L+\"l2.6,-1.5l-\"+(L/2+2.6)+\",-\"+(.87*L+4.5)+\"l-\"+(L/2+2.6)+\",\"+(.87*L+4.5)+\"l2.6,1.5l\"+L/2+\",-\"+.87*L+\"Z\",O=!0;function z(t){n.select(t).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}S.clearSelect=function(){k(this.dragOptions),T(this.dragOptions.gd)},S.initInteractions=function(){var t,e,r,n,f,h,p,d,v,b,T,k,M=this,S=M.layers.plotbg.select(\"path\").node(),L=M.graphDiv,D=L._fullLayout._zoomlayer;function R(t){var e={};return e[M.id+\".aaxis.min\"]=t.a,e[M.id+\".baxis.min\"]=t.b,e[M.id+\".caxis.min\"]=t.c,e}function F(t,e){var r=L._fullLayout.clickmode;z(L),2===t&&(L.emit(\"plotly_doubleclick\",null),a.call(\"_guiRelayout\",L,R({a:0,b:0,c:0}))),r.indexOf(\"select\")>-1&&1===t&&w(e,L,[M.xaxis],[M.yaxis],M.id,M.dragOptions),r.indexOf(\"event\")>-1&&m.click(L,e,M.id)}function B(t,e){return 1-e/M.h}function N(t,e){return 1-(t+(M.h-e)/Math.sqrt(3))/M.w}function j(t,e){return(t-(M.h-e)/Math.sqrt(3))/M.w}function U(i,a){var o=r+i*t,s=n+a*e,l=Math.max(0,Math.min(1,B(0,n),B(0,s))),c=Math.max(0,Math.min(1,N(r,n),N(o,s))),u=Math.max(0,Math.min(1,j(r,n),j(o,s))),g=(l/2+u)*M.w,m=(1-l/2-c)*M.w,y=(g+m)/2,x=m-g,_=(1-l)*M.h,w=_-x/E;x.2?\"rgba(0,0,0,0.4)\":\"rgba(255,255,255,0.3)\").duration(200),k.transition().style(\"opacity\",1).duration(200),b=!0),L.emit(\"plotly_relayouting\",R(p))}function V(){z(L),p!==f&&(a.call(\"_guiRelayout\",L,R(p)),O&&L.data&&L._context.showTips&&(o.notifier(l(L,\"Double-click to zoom back out\"),\"long\"),O=!1))}function H(t,e){var r=t/M.xaxis._m,n=e/M.yaxis._m,i=[(p={a:f.a-n,b:f.b+(r+n)/2,c:f.c-(r-n)/2}).a,p.b,p.c].sort(o.sorterAsc),a=i.indexOf(p.a),l=i.indexOf(p.b),c=i.indexOf(p.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),p={a:i[a],b:i[l],c:i[c]},e=(f.a-p.a)*M.yaxis._m,t=(f.c-p.c-f.b+p.b)*M.xaxis._m);var h=s(M.x0+t,M.y0+e);M.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",h);var d=s(-t,-e);M.clipDefRelative.select(\"path\").attr(\"transform\",d),M.aaxis.range=[p.a,M.sum-p.b-p.c],M.baxis.range=[M.sum-p.a-p.c,p.b],M.caxis.range=[M.sum-p.a-p.b,p.c],M.drawAxes(!1),M._hasClipOnAxisFalse&&M.plotContainer.select(\".scatterlayer\").selectAll(\".trace\").call(u.hideOutsideRangePoints,M),L.emit(\"plotly_relayouting\",R(p))}function q(){a.call(\"_guiRelayout\",L,R(p))}this.dragOptions={element:S,gd:L,plotinfo:{id:M.id,domain:L._fullLayout[M.id].domain,xaxis:M.xaxis,yaxis:M.yaxis},subplot:M.id,prepFn:function(a,l,u){M.dragOptions.xaxes=[M.xaxis],M.dragOptions.yaxes=[M.yaxis],t=L._fullLayout._invScaleX,e=L._fullLayout._invScaleY;var g=M.dragOptions.dragmode=L._fullLayout.dragmode;y(g)?M.dragOptions.minDrag=1:M.dragOptions.minDrag=void 0,\"zoom\"===g?(M.dragOptions.moveFn=U,M.dragOptions.clickFn=F,M.dragOptions.doneFn=V,function(t,e,a){var l=S.getBoundingClientRect();r=e-l.left,n=a-l.top,L._fullLayout._calcInverseTransform(L);var u=L._fullLayout._invTransform,g=o.apply3DTransform(u)(r,n);r=g[0],n=g[1],f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=f,h=M.aaxis.range[1]-f.a,d=i(M.graphDiv._fullLayout[M.id].bgcolor).getLuminance(),v=\"M0,\"+M.h+\"L\"+M.w/2+\", 0L\"+M.w+\",\"+M.h+\"Z\",b=!1,T=D.append(\"path\").attr(\"class\",\"zoombox\").attr(\"transform\",s(M.x0,M.y0)).style({fill:d>.2?\"rgba(0,0,0,0)\":\"rgba(255,255,255,0)\",\"stroke-width\":0}).attr(\"d\",v),k=D.append(\"path\").attr(\"class\",\"zoombox-corners\").attr(\"transform\",s(M.x0,M.y0)).style({fill:c.background,stroke:c.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"d\",\"M0,0Z\"),M.clearSelect(L)}(0,l,u)):\"pan\"===g?(M.dragOptions.moveFn=H,M.dragOptions.clickFn=F,M.dragOptions.doneFn=q,f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=f,M.clearSelect(L)):(x(g)||y(g))&&_(a,l,u,M.dragOptions,g)}},S.onmousemove=function(t){m.hover(L,t,M.id),L._fullLayout._lasthover=S,L._fullLayout._hoversubplot=M.id},S.onmouseout=function(t){L._dragging||g.unhover(L,t)},g.init(this.dragOptions)}},{\"../../components/color\":366,\"../../components/dragelement\":385,\"../../components/dragelement/helpers\":384,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../components/titles\":464,\"../../lib\":503,\"../../lib/extend\":493,\"../../registry\":638,\"../cartesian/axes\":554,\"../cartesian/constants\":561,\"../cartesian/select\":575,\"../cartesian/set_convert\":576,\"../plots\":619,\"@plotly/d3\":58,tinycolor2:312}],638:[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/dom\").addStyleRule,l=t(\"./lib/extend\"),c=t(\"./plots/attributes\"),u=t(\"./plots/layout_attributes\"),f=l.extendFlat,h=l.extendDeepAll;function p(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)b(i,t.name)}(t.basePlotModule);for(var o={},l=0;l-1&&(f[p[r]].title={text:\"\"});for(r=0;r\")?\"\":e.html(t).text()}));return e.remove(),r}(T),T=(T=T.replace(/&(?!\\w+;|\\#[0-9]+;| \\#x[0-9A-F]+;)/g,\"&\")).replace(c,\"'\"),i.isIE()&&(T=(T=(T=T.replace(/\"/gi,\"'\")).replace(/(\\('#)([^']*)('\\))/gi,'(\"#$2\")')).replace(/(\\\\')/gi,'\"')),T}},{\"../components/color\":366,\"../components/drawing\":388,\"../constants/xmlns_namespaces\":480,\"../lib\":503,\"@plotly/d3\":58}],647:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){for(var r=0;rf+c||!n(u))}for(var p=0;pa))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)?e0?e+=r:u<0&&(e-=r)}return e}function z(t){var e=u,r=t.b,i=O(t);return n.inbox(r-e,i-e,_+(i-e)/(i-r)-1)}var D=t[f+\"a\"],R=t[h+\"a\"];g=Math.abs(D.r2c(D.range[1])-D.r2c(D.range[0]));var F=n.getDistanceFunction(i,p,d,(function(t){return(p(t)+d(t))/2}));if(n.getClosest(m,F,t),!1!==t.index&&m[t.index].p!==c){k||(L=function(t){return Math.min(A(t),t.p-y.bargroupwidth/2)},C=function(t){return Math.max(M(t),t.p+y.bargroupwidth/2)});var B=m[t.index],N=v.base?B.b+B.s:B.s;t[h+\"0\"]=t[h+\"1\"]=R.c2p(B[h],!0),t[h+\"LabelVal\"]=N;var j=y.extents[y.extents.round(B.p)];t[f+\"0\"]=D.c2p(x?L(B):j[0],!0),t[f+\"1\"]=D.c2p(x?C(B):j[1],!0);var U=void 0!==B.orig_p;return t[f+\"LabelVal\"]=U?B.orig_p:B.p,t.labelLabel=l(D,t[f+\"LabelVal\"],v[f+\"hoverformat\"]),t.valueLabel=l(R,t[h+\"LabelVal\"],v[h+\"hoverformat\"]),t.baseLabel=l(R,B.b,v[h+\"hoverformat\"]),t.spikeDistance=(function(t){var e=u,r=t.b,i=O(t);return n.inbox(r-e,i-e,w+(i-e)/(i-r)-1)}(B)+function(t){return P(A(t),M(t),w)}(B))/2,t[f+\"Spike\"]=D.c2p(B.p,!0),o(B,v,t),t.hovertemplate=v.hovertemplate,t}}function f(t,e){var r=e.mcc||t.marker.color,n=e.mlcc||t.marker.line.color,i=s(t,e);return a.opacity(r)?r:a.opacity(n)&&i?n:void 0}e.exports={hoverPoints:function(t,e,r,n,a){var o=u(t,e,r,n,a);if(o){var s=o.cd,l=s[0].trace,c=s[o.index];return o.color=f(l,c),i.getComponentMethod(\"errorbars\",\"hoverInfo\")(c,l,o),[o]}},hoverOnBars:u,getTraceColor:f}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"./helpers\":654}],656:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\").crossTraceCalc,colorbar:t(\"../scatter/marker_colorbar\"),arraysToCalcdata:t(\"./arrays_to_calcdata\"),plot:t(\"./plot\").plot,style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"bar\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"bar\",\"oriented\",\"errorBarsOK\",\"showLegend\",\"zoomScale\"],animatable:!0,meta:{}}},{\"../../plots/cartesian\":568,\"../scatter/marker_colorbar\":944,\"./arrays_to_calcdata\":647,\"./attributes\":648,\"./calc\":649,\"./cross_trace_calc\":651,\"./defaults\":652,\"./event_data\":653,\"./hover\":655,\"./layout_attributes\":657,\"./layout_defaults\":658,\"./plot\":659,\"./select\":660,\"./style\":662}],657:[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\"}}},{}],658:[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=s(\"barmode\"),p=0;p0}function S(t){return\"auto\"===t?0:t}function E(t,e){var r=Math.PI/180*e,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:t.width*i+t.height*n,y:t.width*n+t.height*i}}function L(t,e,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,c=a.anchor||\"end\",u=\"end\"===c,f=\"start\"===c,h=((a.leftToRight||0)+1)/2,p=1-h,d=i.width,g=i.height,m=Math.abs(e-t),v=Math.abs(n-r),y=m>2*_&&v>2*_?_:0;m-=2*y,v-=2*y;var x=S(l);\"auto\"!==l||d<=m&&g<=v||!(d>m||g>v)||(d>v||g>m)&&d.01?q:function(t,e,r){return r&&t===e?t:Math.abs(t-e)>=2?q(t):t>e?Math.ceil(t):Math.floor(t)};B=G(B,N,D),N=G(N,B,D),j=G(j,U,!D),U=G(U,j,!D)}var Y=A(a.ensureSingle(I,\"path\"),P,m,v);if(Y.style(\"vector-effect\",\"non-scaling-stroke\").attr(\"d\",isNaN((N-B)*(U-j))||V&&t._context.staticPlot?\"M0,0Z\":\"M\"+B+\",\"+j+\"V\"+U+\"H\"+N+\"V\"+j+\"Z\").call(l.setClipUrl,e.layerClipId,t),!P.uniformtext.mode&&R){var W=l.makePointStyleFns(f);l.singlePointStyle(c,Y,f,W,t)}!function(t,e,r,n,i,s,c,f,p,m,v){var w,T=e.xaxis,M=e.yaxis,C=t._fullLayout;function P(e,r,n){return a.ensureSingle(e,\"text\").text(r).attr({class:\"bartext bartext-\"+w,\"text-anchor\":\"middle\",\"data-notex\":1}).call(l.font,n).call(o.convertToTspans,t)}var I=n[0].trace,O=\"h\"===I.orientation,z=function(t,e,r,n,i){var o,s=e[0].trace;o=s.texttemplate?function(t,e,r,n,i){var o=e[0].trace,s=a.castOption(o,r,\"texttemplate\");if(!s)return\"\";var l,c,f,h,p=\"histogram\"===o.type,d=\"waterfall\"===o.type,g=\"funnel\"===o.type,m=\"h\"===o.orientation;m?(l=\"y\",c=i,f=\"x\",h=n):(l=\"x\",c=n,f=\"y\",h=i);function v(t){return u(h,h.c2l(t),!0).text}var y=e[r],x={};x.label=y.p,x.labelLabel=x[l+\"Label\"]=(_=y.p,u(c,c.c2l(_),!0).text);var _;var w=a.castOption(o,y.i,\"text\");(0===w||w)&&(x.text=w);x.value=y.s,x.valueLabel=x[f+\"Label\"]=v(y.s);var T={};b(T,o,y.i),(p||void 0===T.x)&&(T.x=m?x.value:x.label);(p||void 0===T.y)&&(T.y=m?x.label:x.value);(p||void 0===T.xLabel)&&(T.xLabel=m?x.valueLabel:x.labelLabel);(p||void 0===T.yLabel)&&(T.yLabel=m?x.labelLabel:x.valueLabel);d&&(x.delta=+y.rawS||y.s,x.deltaLabel=v(x.delta),x.final=y.v,x.finalLabel=v(x.final),x.initial=x.final-x.delta,x.initialLabel=v(x.initial));g&&(x.value=y.s,x.valueLabel=v(x.value),x.percentInitial=y.begR,x.percentInitialLabel=a.formatPercent(y.begR),x.percentPrevious=y.difR,x.percentPreviousLabel=a.formatPercent(y.difR),x.percentTotal=y.sumR,x.percenTotalLabel=a.formatPercent(y.sumR));var k=a.castOption(o,y.i,\"customdata\");k&&(x.customdata=k);return a.texttemplateString(s,x,t._d3locale,T,x,o._meta||{})}(t,e,r,n,i):s.textinfo?function(t,e,r,n){var i=t[0].trace,o=\"h\"===i.orientation,s=\"waterfall\"===i.type,l=\"funnel\"===i.type;function c(t){return u(o?r:n,+t,!0).text}var f,h=i.textinfo,p=t[e],d=h.split(\"+\"),g=[],m=function(t){return-1!==d.indexOf(t)};m(\"label\")&&g.push((v=t[e].p,u(o?n:r,v,!0).text));var v;m(\"text\")&&(0===(f=a.castOption(i,p.i,\"text\"))||f)&&g.push(f);if(s){var y=+p.rawS||p.s,x=p.v,b=x-y;m(\"initial\")&&g.push(c(b)),m(\"delta\")&&g.push(c(y)),m(\"final\")&&g.push(c(x))}if(l){m(\"value\")&&g.push(c(p.s));var _=0;m(\"percent initial\")&&_++,m(\"percent previous\")&&_++,m(\"percent total\")&&_++;var w=_>1;m(\"percent initial\")&&(f=a.formatPercent(p.begR),w&&(f+=\" of initial\"),g.push(f)),m(\"percent previous\")&&(f=a.formatPercent(p.difR),w&&(f+=\" of previous\"),g.push(f)),m(\"percent total\")&&(f=a.formatPercent(p.sumR),w&&(f+=\" of total\"),g.push(f))}return g.join(\"
\")}(e,r,n,i):g.getValue(s.text,r);return g.coerceString(y,o)}(C,n,i,T,M);w=function(t,e){var r=g.getValue(t.textposition,e);return g.coerceEnumerated(x,r)}(I,i);var D=\"stack\"===m.mode||\"relative\"===m.mode,R=n[i],F=!D||R._outmost;if(!z||\"none\"===w||(R.isBlank||s===c||f===p)&&(\"auto\"===w||\"inside\"===w))return void r.select(\"text\").remove();var B=C.font,N=d.getBarColor(n[i],I),j=d.getInsideTextFont(I,i,B,N),U=d.getOutsideTextFont(I,i,B),V=r.datum();O?\"log\"===T.type&&V.s0<=0&&(s=T.range[0]=G*(Z/Y):Z>=Y*(X/G);G>0&&Y>0&&(J||K||Q)?w=\"inside\":(w=\"outside\",H.remove(),H=null)}else w=\"inside\";if(!H){W=a.ensureUniformFontSize(t,\"outside\"===w?U:j);var $=(H=P(r,z,W)).attr(\"transform\");if(H.attr(\"transform\",\"\"),q=l.bBox(H.node()),G=q.width,Y=q.height,H.attr(\"transform\",$),G<=0||Y<=0)return void H.remove()}var tt,et,rt=I.textangle;\"outside\"===w?(et=\"both\"===I.constraintext||\"outside\"===I.constraintext,tt=function(t,e,r,n,i,a){var o,s=!!a.isHorizontal,l=!!a.constrained,c=a.angle||0,u=i.width,f=i.height,h=Math.abs(e-t),p=Math.abs(n-r);o=s?p>2*_?_:0:h>2*_?_:0;var d=1;l&&(d=s?Math.min(1,p/f):Math.min(1,h/u));var g=S(c),m=E(i,g),v=(s?m.x:m.y)/2,y=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=(t+e)/2,w=(r+n)/2,T=0,A=0,M=s?k(e,t):k(r,n);s?(b=e-M*o,T=M*v):(w=n+M*o,A=-M*v);return{textX:y,textY:x,targetX:b,targetY:w,anchorX:T,anchorY:A,scale:d,rotate:g}}(s,c,f,p,q,{isHorizontal:O,constrained:et,angle:rt})):(et=\"both\"===I.constraintext||\"inside\"===I.constraintext,tt=L(s,c,f,p,q,{isHorizontal:O,constrained:et,angle:rt,anchor:I.insidetextanchor}));tt.fontSize=W.size,h(\"histogram\"===I.type?\"bar\":I.type,tt,C),R.transform=tt,A(H,C,m,v).attr(\"transform\",a.getTextTransform(tt))}(t,e,I,r,p,B,N,j,U,m,v),e.layerClipId&&l.hideOutsideRangePoint(c,I.select(\"text\"),w,C,f.xcalendar,f.ycalendar)}));var j=!1===f.cliponaxis;l.setClipUrl(c,j?null:e.layerClipId,t)}));c.getComponentMethod(\"errorbars\",\"plot\")(t,I,e,m)},toMoveInsideBar:L}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../components/fx/helpers\":402,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"./attributes\":648,\"./constants\":650,\"./helpers\":654,\"./style\":662,\"./uniform_text\":664,\"@plotly/d3\":58,\"fast-isnumeric\":190}],660:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){var a=e.c2p(n?t.s0:t.p0,!0),o=e.c2p(n?t.s1:t.p1,!0),s=r.c2p(n?t.p0:t.s0,!0),l=r.c2p(n?t.p1:t.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}e.exports=function(t,e){var r,i=t.cd,a=t.xaxis,o=t.yaxis,s=i[0].trace,l=\"funnel\"===s.type,c=\"h\"===s.orientation,u=[];if(!1===e)for(r=0;r1||0===i.bargap&&0===i.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr(\"shape-rendering\",\"crispEdges\")})),e.selectAll(\"g.points\").each((function(e){d(n.select(this),e[0].trace,t)})),s.getComponentMethod(\"errorbars\",\"style\")(e)},styleTextPoints:g,styleOnSelect:function(t,e,r){var 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.ensureUniformFontSize(r,m(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):(d(r,i,t),s.getComponentMethod(\"errorbars\",\"style\")(r))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:_,resizeText:l}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../lib\":503,\"../../registry\":638,\"./attributes\":648,\"./helpers\":654,\"./uniform_text\":664,\"@plotly/d3\":58}],663:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/helpers\").hasColorscale,a=t(\"../../components/colorscale/defaults\"),o=t(\"../../lib\").coercePattern;e.exports=function(t,e,r,s,l){var c=r(\"marker.color\",s),u=i(t,\"marker\");u&&a(t,e,l,r,{prefix:\"marker.\",cLetter:\"c\"}),r(\"marker.line.color\",n.defaultLine),i(t,\"marker.line\")&&a(t,e,l,r,{prefix:\"marker.line.\",cLetter:\"c\"}),r(\"marker.line.width\"),r(\"marker.opacity\"),o(r,\"marker.pattern\",c,u),r(\"selected.marker.color\"),r(\"unselected.marker.color\")}},{\"../../components/color\":366,\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503}],664:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\");function a(t){return\"_\"+t+\"Text_minsize\"}e.exports={recordMinTextSize:function(t,e,r){if(r.uniformtext.mode){var n=a(t),i=r.uniformtext.minsize,o=e.scale*e.fontSize;e.hide=o g.point\"}e.selectAll(s).each((function(t){var e=t.transform;e&&(e.scale=l&&e.hide?0:o/e.fontSize,n.select(this).select(\"text\").attr(\"transform\",i.getTextTransform(e)))}))}}}},{\"../../lib\":503,\"@plotly/d3\":58}],665:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../lib/extend\").extendFlat,a=t(\"../scatterpolar/attributes\"),o=t(\"../bar/attributes\");e.exports={r:a.r,theta:a.theta,r0:a.r0,dr:a.dr,theta0:a.theta0,dtheta:a.dtheta,thetaunit:a.thetaunit,base:i({},o.base,{}),offset:i({},o.offset,{}),width:i({},o.width,{}),text:i({},o.text,{}),hovertext:i({},o.hovertext,{}),marker:o.marker,hoverinfo:a.hoverinfo,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{\"../../lib/extend\":493,\"../../plots/template_attributes\":633,\"../bar/attributes\":648,\"../scatterpolar/attributes\":1e3}],666:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/helpers\").hasColorscale,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,m=0;mh.range[1]&&(x+=Math.PI);if(n.getClosest(c,(function(t){return g(y,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?m+Math.min(1,Math.abs(t.thetag1-t.thetag0)/v)-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.hovertemplate=u.hovertemplate,t.color=a(u,b),t.xLabelVal=t.yLabelVal=void 0,b.s<0&&(t.idealAlign=\"left\"),[t]}}},{\"../../components/fx\":406,\"../../lib\":503,\"../../plots/polar/helpers\":621,\"../bar/hover\":655,\"../scatterpolar/hover\":1004}],669:[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\"),formatLabels:t(\"../scatterpolar/format_labels\"),style:t(\"../bar/style\").style,styleOnSelect:t(\"../bar/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../bar/select\"),meta:{}}},{\"../../plots/polar\":622,\"../bar/select\":660,\"../bar/style\":662,\"../scatter/marker_colorbar\":944,\"../scatterpolar/format_labels\":1003,\"./attributes\":665,\"./calc\":666,\"./defaults\":667,\"./hover\":668,\"./layout_attributes\":670,\"./layout_defaults\":671,\"./plot\":672}],670:[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\"}}},{}],671:[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;l0?(c=o,u=l):(c=l,u=o);var f=[s.findEnclosingVertexAngles(c,t.vangles)[0],(c+u)/2,s.findEnclosingVertexAngles(u,t.vangles)[1]];return s.pathPolygonAnnulus(n,i,c,u,f,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(){var r=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),m=(p+d)/2;t.ct=[l.c2p(g*Math.cos(m)),c.c2p(g*Math.sin(m))],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,t)}))}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../plots/polar/helpers\":621,\"@plotly/d3\":58,\"fast-isnumeric\":190}],673:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../bar/attributes\"),a=t(\"../../components/color/attributes\"),o=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../lib/extend\").extendFlat,c=n.marker,u=c.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\"},dx:{valType:\"number\",editType:\"calc\"},dy:{valType:\"number\",editType:\"calc\"},xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,xhoverformat:o(\"x\"),yhoverformat:o(\"y\"),name:{valType:\"string\",editType:\"calc+clearAxisTypes\"},q1:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},median:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},q3:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},lowerfence:{valType:\"data_array\",editType:\"calc\"},upperfence:{valType:\"data_array\",editType:\"calc\"},notched:{valType:\"boolean\",editType:\"calc\"},notchwidth:{valType:\"number\",min:0,max:.5,dflt:.25,editType:\"calc\"},notchspan:{valType:\"data_array\",editType:\"calc\"},boxpoints:{valType:\"enumerated\",values:[\"all\",\"outliers\",\"suspectedoutliers\",!1],editType:\"calc\"},jitter:{valType:\"number\",min:0,max:1,editType:\"calc\"},pointpos:{valType:\"number\",min:-2,max:2,editType:\"calc\"},boxmean:{valType:\"enumerated\",values:[!0,\"sd\",!1],editType:\"calc\"},mean:{valType:\"data_array\",editType:\"calc\"},sd:{valType:\"data_array\",editType:\"calc\"},orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc+clearAxisTypes\"},quartilemethod:{valType:\"enumerated\",values:[\"linear\",\"exclusive\",\"inclusive\"],dflt:\"linear\",editType:\"calc\"},width:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},marker:{outliercolor:{valType:\"color\",dflt:\"rgba(0, 0, 0, 0)\",editType:\"style\"},symbol:l({},c.symbol,{arrayOk:!1,editType:\"plot\"}),opacity:l({},c.opacity,{arrayOk:!1,dflt:1,editType:\"style\"}),size:l({},c.size,{arrayOk:!1,editType:\"calc\"}),color:l({},c.color,{arrayOk:!1,editType:\"style\"}),line:{color:l({},u.color,{arrayOk:!1,dflt:a.defaultLine,editType:\"style\"}),width:l({},u.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,whiskerwidth:{valType:\"number\",min:0,max:1,dflt:.5,editType:\"calc\"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:n.selected.marker,editType:\"style\"},unselected:{marker:n.unselected.marker,editType:\"style\"},text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),hovertemplate:s({}),hoveron:{valType:\"flaglist\",flags:[\"boxes\",\"points\"],dflt:\"boxes+points\",editType:\"style\"}}},{\"../../components/color/attributes\":365,\"../../lib/extend\":493,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../bar/attributes\":648,\"../scatter/attributes\":926}],674:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../plots/cartesian/align_period\"),o=t(\"../../lib\"),s=t(\"../../constants/numerical\").BADNUM,l=o._;e.exports=function(t,e){var r,c,y,x,b,_,w,T=t._fullLayout,k=i.getFromId(t,e.xaxis||\"x\"),A=i.getFromId(t,e.yaxis||\"y\"),M=[],S=\"violin\"===e.type?\"_numViolins\":\"_numBoxes\";\"h\"===e.orientation?(y=k,x=\"x\",b=A,_=\"y\",w=!!e.yperiodalignment):(y=A,x=\"y\",b=k,_=\"x\",w=!!e.xperiodalignment);var E,L,C,P,I,O,z=function(t,e,r,i){var s,l=e+\"0\"in t,c=\"d\"+e in t;if(e in t||l&&c){var u=r.makeCalcdata(t,e);return[a(t,r,e,u).vals,u]}s=l?t[e+\"0\"]:\"name\"in t&&(\"category\"===r.type||n(t.name)&&-1!==[\"linear\",\"log\"].indexOf(r.type)||o.isDateTime(t.name)&&\"date\"===r.type)?t.name:i;for(var f=\"multicategory\"===r.type?r.r2c_just_indices(s):r.d2c(s,0,t[e+\"calendar\"]),h=t._length,p=new Array(h),d=0;dE.uf};if(e._hasPreCompStats){var U=e[x],V=function(t){return y.d2c((e[t]||[])[r])},H=1/0,q=-1/0;for(r=0;r=E.q1&&E.q3>=E.med){var Y=V(\"lowerfence\");E.lf=Y!==s&&Y<=E.q1?Y:p(E,C,P);var W=V(\"upperfence\");E.uf=W!==s&&W>=E.q3?W:d(E,C,P);var X=V(\"mean\");E.mean=X!==s?X:P?o.mean(C,P):(E.q1+E.q3)/2;var Z=V(\"sd\");E.sd=X!==s&&Z>=0?Z:P?o.stdev(C,P,E.mean):E.q3-E.q1,E.lo=g(E),E.uo=m(E);var J=V(\"notchspan\");J=J!==s&&J>0?J:v(E,P),E.ln=E.med-J,E.un=E.med+J;var K=E.lf,Q=E.uf;e.boxpoints&&C.length&&(K=Math.min(K,C[0]),Q=Math.max(Q,C[P-1])),e.notched&&(K=Math.min(K,E.ln),Q=Math.max(Q,E.un)),E.min=K,E.max=Q}else{var $;o.warn([\"Invalid input - make sure that q1 <= median <= q3\",\"q1 = \"+E.q1,\"median = \"+E.med,\"q3 = \"+E.q3].join(\"\\n\")),$=E.med!==s?E.med:E.q1!==s?E.q3!==s?(E.q1+E.q3)/2:E.q1:E.q3!==s?E.q3:0,E.med=$,E.q1=E.q3=$,E.lf=E.uf=$,E.mean=E.sd=$,E.ln=E.un=$,E.min=E.max=$}H=Math.min(H,E.min),q=Math.max(q,E.max),E.pts2=L.filter(j),M.push(E)}}e._extremes[y._id]=i.findExtremes(y,[H,q],{padded:!0})}else{var tt=y.makeCalcdata(e,x),et=function(t,e){for(var r=t.length,n=new Array(r+1),i=0;i=0&&it0){var ut,ft;if((E={}).pos=E[_]=B[r],L=E.pts=nt[r].sort(f),P=(C=E[x]=L.map(h)).length,E.min=C[0],E.max=C[P-1],E.mean=o.mean(C,P),E.sd=o.stdev(C,P,E.mean),E.med=o.interp(C,.5),P%2&&(lt||ct))lt?(ut=C.slice(0,P/2),ft=C.slice(P/2+1)):ct&&(ut=C.slice(0,P/2+1),ft=C.slice(P/2)),E.q1=o.interp(ut,.5),E.q3=o.interp(ft,.5);else E.q1=o.interp(C,.25),E.q3=o.interp(C,.75);E.lf=p(E,C,P),E.uf=d(E,C,P),E.lo=g(E),E.uo=m(E);var ht=v(E,P);E.ln=E.med-ht,E.un=E.med+ht,at=Math.min(at,E.ln),ot=Math.max(ot,E.un),E.pts2=L.filter(j),M.push(E)}e._extremes[y._id]=i.findExtremes(y,e.notched?tt.concat([at,ot]):tt,{padded:!0})}return function(t,e){if(o.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r0?(M[0].t={num:T[S],dPos:N,posLetter:_,valLetter:x,labels:{med:l(t,\"median:\"),min:l(t,\"min:\"),q1:l(t,\"q1:\"),q3:l(t,\"q3:\"),max:l(t,\"max:\"),mean:\"sd\"===e.boxmean?l(t,\"mean \\xb1 \\u03c3:\"):l(t,\"mean:\"),lf:l(t,\"lower fence:\"),uf:l(t,\"upper fence:\")}},T[S]++,M):[{t:{empty:!0}}]};var c={text:\"tx\",hovertext:\"htx\"};function u(t,e,r){for(var n in c)o.isArrayOrTypedArray(e[n])&&(Array.isArray(r)?o.isArrayOrTypedArray(e[n][r[0]])&&(t[c[n]]=e[n][r[0]][r[1]]):t[c[n]]=e[n][r])}function f(t,e){return t.v-e.v}function h(t){return t.v}function p(t,e,r){return 0===r?t.q1:Math.min(t.q1,e[Math.min(o.findBin(2.5*t.q1-1.5*t.q3,e,!0)+1,r-1)])}function d(t,e,r){return 0===r?t.q3:Math.max(t.q3,e[Math.max(o.findBin(2.5*t.q3-1.5*t.q1,e),0)])}function g(t){return 4*t.q1-3*t.q3}function m(t){return 4*t.q3-3*t.q1}function v(t,e){return 0===e?0:1.57*(t.q3-t.q1)/Math.sqrt(e)}},{\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/align_period\":551,\"../../plots/cartesian/axes\":554,\"fast-isnumeric\":190}],675:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/constraints\").getAxisGroup,o=[\"v\",\"h\"];function s(t,e,r,o){var s,l,c,u=e.calcdata,f=e._fullLayout,h=o._id,p=h.charAt(0),d=[],g=0;for(s=0;s1,b=1-f[t+\"gap\"],_=1-f[t+\"groupgap\"];for(s=0;s0){var q=E.pointpos,G=E.jitter,Y=E.marker.size/2,W=0;q+G>=0&&((W=V*(q+G))>M?(H=!0,j=Y,B=W):W>R&&(j=Y,B=M)),W<=M&&(B=M);var X=0;q-G<=0&&((X=-V*(q-G))>S?(H=!0,U=Y,N=X):X>F&&(U=Y,N=S)),X<=S&&(N=S)}else B=M,N=S;var Z=new Array(c.length);for(l=0;l0?(m=\"v\",v=x>0?Math.min(_,b):Math.min(b)):x>0?(m=\"h\",v=Math.min(_)):v=0;if(v){e._length=v;var S=r(\"orientation\",m);e._hasPreCompStats?\"v\"===S&&0===x?(r(\"x0\",0),r(\"dx\",1)):\"h\"===S&&0===y&&(r(\"y0\",0),r(\"dy\",1)):\"v\"===S&&0===x?r(\"x0\"):\"h\"===S&&0===y&&r(\"y0\"),i.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\"],a)}else e.visible=!1}function f(t,e,r,i){var a=i.prefix,o=n.coerce2(t,e,c,\"marker.outliercolor\"),s=r(\"marker.line.outliercolor\"),l=\"outliers\";e._hasPreCompStats?l=\"all\":(o||s)&&(l=\"suspectedoutliers\");var u=r(a+\"points\",l);u?(r(\"jitter\",\"all\"===u?.3:0),r(\"pointpos\",\"all\"===u?-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\"===u&&(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\"),r(\"hovertext\")):delete e.marker;var f=r(\"hoveron\");\"all\"!==f&&-1===f.indexOf(\"points\")||r(\"hovertemplate\"),n.coerceSelectionMarkerOpacity(e,r)}e.exports={supplyDefaults:function(t,e,r,i){function s(r,i){return n.coerce(t,e,c,r,i)}if(u(t,e,s,i),!1!==e.visible){o(t,e,i,s),s(\"xhoverformat\"),s(\"yhoverformat\");var l=e._hasPreCompStats;l&&(s(\"lowerfence\"),s(\"upperfence\")),s(\"line.color\",(t.marker||{}).color||r),s(\"line.width\"),s(\"fillcolor\",a.addOpacity(e.line.color,.5));var h=!1;if(l){var p=s(\"mean\"),d=s(\"sd\");p&&p.length&&(h=!0,d&&d.length&&(h=\"sd\"))}s(\"boxmean\",h),s(\"whiskerwidth\"),s(\"width\"),s(\"quartilemethod\");var g=!1;if(l){var m=s(\"notchspan\");m&&m.length&&(g=!0)}else n.validate(t.notchwidth,c.notchwidth)&&(g=!0);s(\"notched\",g)&&s(\"notchwidth\"),f(t,e,s,{prefix:\"box\"})}},crossTraceDefaults:function(t,e){var r,i;function a(t){return n.coerce(i._input,i,c,t)}for(var o=0;ot.lo&&(x.so=!0)}return a}));h.enter().append(\"path\").classed(\"point\",!0),h.exit().remove(),h.call(a.translatePoints,o,s)}function l(t,e,r,a){var o,s,l=e.val,c=e.pos,u=!!c.rangebreaks,f=a.bPos,h=a.bPosPxOffset||0,p=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var d=t.selectAll(\"path.mean\").data(\"box\"===r.type&&r.boxmean||\"violin\"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);d.enter().append(\"path\").attr(\"class\",\"mean\").style({fill:\"none\",\"vector-effect\":\"non-scaling-stroke\"}),d.exit().remove(),d.each((function(t){var e=c.c2l(t.pos+f,!0),i=c.l2p(e-o)+h,a=c.l2p(e+s)+h,d=u?(i+a)/2:c.l2p(e)+h,g=l.c2p(t.mean,!0),m=l.c2p(t.mean-t.sd,!0),v=l.c2p(t.mean+t.sd,!0);\"h\"===r.orientation?n.select(this).attr(\"d\",\"M\"+g+\",\"+i+\"V\"+a+(\"sd\"===p?\"m0,0L\"+m+\",\"+d+\"L\"+g+\",\"+i+\"L\"+v+\",\"+d+\"Z\":\"\")):n.select(this).attr(\"d\",\"M\"+i+\",\"+g+\"H\"+a+(\"sd\"===p?\"m0,0L\"+d+\",\"+m+\"L\"+i+\",\"+g+\"L\"+d+\",\"+v+\"Z\":\"\"))}))}e.exports={plot:function(t,e,r,a){var c=e.xaxis,u=e.yaxis;i.makeTraceGroups(a,r,\"trace boxes\").each((function(t){var e,r,i=n.select(this),a=t[0],f=a.t,h=a.trace;(f.wdPos=f.bdPos*h.whiskerwidth,!0!==h.visible||f.empty)?i.remove():(\"h\"===h.orientation?(e=u,r=c):(e=c,r=u),o(i,{pos:e,val:r},h,f),s(i,{x:c,y:u},h,f),l(i,{pos:e,val:r},h,f))}))},plotBoxAndWhiskers:o,plotPoints:s,plotBoxMean:l}},{\"../../components/drawing\":388,\"../../lib\":503,\"@plotly/d3\":58}],683:[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=10)return null;for(var i=1/0,a=-1/0,o=e.length,s=0;s0?Math.floor:Math.ceil,I=L>0?Math.ceil:Math.floor,O=L>0?Math.min:Math.max,z=L>0?Math.max:Math.min,D=P(S+C),R=I(E-C),F=[[f=M(S)]];for(a=D;a*L=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}},{}],697:[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,m,v,y,x=t[\"_\"+e],b=t[e+\"axis\"],_=b._gridlines=[],w=b._minorgridlines=[],T=b._boundarylines=[],k=t[\"_\"+r],A=t[r+\"axis\"];\"array\"===b.tickmode&&(b.tickvals=x.slice());var M=t._xctrl,S=t._yctrl,E=M[0].length,L=M.length,C=t._a.length,P=t._b.length;n.prepTicks(b),\"array\"===b.tickmode&&delete b.tickvals;var I=b.smoothing?3:1;function O(n){var i,a,o,s,l,c,u,f,p,d,g,m,v=[],y=[],x={};if(\"b\"===e)for(a=t.b2j(n),o=Math.floor(Math.max(0,Math.min(P-2,a))),s=a-o,x.length=P,x.crossLength=C,x.xy=function(e){return t.evalxy([],e,a)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},i=0;i0&&(p=t.dxydi([],i-1,o,0,s),v.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),d=t.dxydi([],i-1,o,1,s),v.push(f[0]-d[0]/3),y.push(f[1]-d[1]/3)),v.push(f[0]),y.push(f[1]),l=f;else for(i=t.a2i(n),c=Math.floor(Math.max(0,Math.min(C-2,i))),u=i-c,x.length=C,x.crossLength=P,x.xy=function(e){return t.evalxy([],i,e)},x.dxy=function(e,r){return t.dxydj([],c,e,u,r)},a=0;a0&&(g=t.dxydj([],c,a-1,u,0),v.push(l[0]+g[0]/3),y.push(l[1]+g[1]/3),m=t.dxydj([],c,a-1,u,1),v.push(f[0]-m[0]/3),y.push(f[1]-m[1]/3)),v.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=v,x.y=y,x.smoothing=A.smoothing,x}function z(n){var i,a,o,s,l,c=[],u=[],f={};if(f.length=x.length,f.crossLength=k.length,\"b\"===e)for(o=Math.max(0,Math.min(P-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;ix.length-1||_.push(i(z(o),{color:b.gridcolor,width:b.gridwidth}));for(h=u;hx.length-1||g<0||g>x.length-1))for(m=x[s],v=x[g],a=0;ax[x.length-1]||w.push(i(O(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&T.push(i(z(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(z(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(O(p),{color:b.gridcolor,width:b.gridwidth}));for(h=u-1;hx[x.length-1]||w.push(i(O(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&T.push(i(O(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(O(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{\"../../lib/extend\":493,\"../../plots/cartesian/axes\":554}],698:[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;re.length&&(t=t.slice(0,e.length)):t=[],i=0;i90&&(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(n,e,r),offsetMultplier:c}}},{}],712:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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=c.strRotate,f=c.strTranslate,h=t(\"../../constants/alignment\");function p(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 d(t,e,r,a,o,c,h,p){var d=c.selectAll(\"text.\"+p).data(h);d.enter().append(\"text\").classed(p,!0);var g=0,m={};return d.each((function(o,c){var h;if(\"auto\"===o.axis.tickangle)h=s(a,e,r,o.xy,o.dxy);else{var p=(o.axis.tickangle+180)*Math.PI/180;h=s(a,e,r,o.xy,[Math.cos(p),Math.sin(p)])}c||(m={angle:h.angle,flip:h.flip});var d=(o.endAnchor?-1:1)*h.flip,v=n.select(this).attr({\"text-anchor\":d>0?\"start\":\"end\",\"data-notex\":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,t),y=i.bBox(this);v.attr(\"transform\",f(h.p[0],h.p[1])+u(h.angle)+f(o.axis.labelpadding*d,.3*y.height)),g=Math.max(g,y.width+o.axis.labelpadding)})),d.exit().remove(),m.maxExtent=g,m}e.exports=function(t,e,r,i){var l=e.xaxis,u=e.yaxis,f=t._fullLayout._clips;c.makeTraceGroups(i,r,\"trace\").each((function(e){var r=n.select(this),i=e[0],h=i.trace,g=h.aaxis,m=h.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\",h.opacity),p(l,u,x,g,\"a\",g._gridlines),p(l,u,x,m,\"b\",m._gridlines),p(l,u,y,g,\"a\",g._minorgridlines),p(l,u,y,m,\"b\",m._minorgridlines),p(l,u,b,g,\"a-boundary\",g._boundarylines),p(l,u,b,m,\"b-boundary\",m._boundarylines);var w=d(t,l,u,h,i,_,g._labels,\"a-label\"),T=d(t,l,u,h,i,_,m._labels,\"b-label\");!function(t,e,r,n,i,a,o,l){var u,f,h,p,d=c.aggNums(Math.min,null,r.a),g=c.aggNums(Math.max,null,r.a),m=c.aggNums(Math.min,null,r.b),y=c.aggNums(Math.max,null,r.b);u=.5*(d+g),f=m,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)));v(t,e,r,n,h,p,r.aaxis,i,a,o,\"a-title\"),u=d,f=.5*(m+y),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)));v(t,e,r,n,h,p,r.baxis,i,a,l,\"b-title\")}(t,_,h,i,l,u,w,T),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;f90&&y<270,b=n.select(this);b.text(h.title.text).call(l.convertToTspans,t),x&&(_=(-l.lineCount(b)+m)*g*a-_),b.attr(\"transform\",f(e.p[0],e.p[1])+u(e.angle)+f(0,_)).attr(\"text-anchor\",\"middle\").call(i.font,h.title.font)})),b.exit().remove()}},{\"../../components/drawing\":388,\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"./makepath\":709,\"./map_1d_array\":710,\"./orient_text\":711,\"@plotly/d3\":58}],713:[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],m=r[u-1],v=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=v*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;p-=x,d+=x,g-=b,m+=b,t.isVisible=function(t,e){return t>p&&tg&&ed||em},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&&(ne[c-1]|ir[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,m=0,v=[];ne[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)))),ir[u-1]?(p=u-2,d=1,m=(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(v,f,p,h,d),l[0]+=v[0]*g,l[1]+=v[1]*g),m&&(t.dxydj(v,f,p,h,d),l[0]+=v[0]*m,l[1]+=v[1]*m)}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=v*(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\":523,\"./compute_control_points\":701,\"./constants\":702,\"./create_i_derivative_evaluator\":703,\"./create_j_derivative_evaluator\":704,\"./create_spline_evaluator\":705}],714:[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),e0&&void 0!==(n=t[r-1][e])&&(a++,i+=n),r0&&a0&&i1e-5);return n.log(\"Smoother converged to\",k,\"after\",A,\"iterations\"),t}},{\"../../lib\":503}],715:[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\":503}],716:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../scattergeo/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../plots/attributes\"),s=t(\"../../components/color/attributes\").defaultLine,l=t(\"../../lib/extend\").extendFlat,c=i.marker.line;e.exports=l({locations:{valType:\"data_array\",editType:\"calc\"},locationmode:i.locationmode,z:{valType:\"data_array\",editType:\"calc\"},geojson:l({},i.geojson,{}),featureidkey:i.featureidkey,text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),marker:{line:{color:l({},c.color,{dflt:s}),width:l({},c.width,{dflt:1}),editType:\"calc\"},opacity:{valType:\"number\",arrayOk:!0,min:0,max:1,dflt:1,editType:\"style\"},editType:\"calc\"},selected:{marker:{opacity:i.selected.marker.opacity,editType:\"plot\"},editType:\"plot\"},unselected:{marker:{opacity:i.unselected.marker.opacity,editType:\"plot\"},editType:\"plot\"},hoverinfo:l({},o.hoverinfo,{editType:\"calc\",flags:[\"location\",\"z\",\"text\",\"name\"]}),hovertemplate:n(),showlegend:l({},o.showlegend,{dflt:!1})},a(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))},{\"../../components/color/attributes\":365,\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/template_attributes\":633,\"../scattergeo/attributes\":968}],717:[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\");function l(t){return t&&\"string\"==typeof t}e.exports=function(t,e){var r,c=e._length,u=new Array(c);r=e.geojson?function(t){return l(t)||n(t)}:l;for(var f=0;f\")}(t,f,o),[t]}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"./attributes\":716}],721:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../heatmap/colorbar\"),calc:t(\"./calc\"),calcGeoJSON:t(\"./plot\").calcGeoJSON,plot:t(\"./plot\").plot,style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"choropleth\",basePlotModule:t(\"../../plots/geo\"),categories:[\"geo\",\"noOpacity\",\"showLegend\"],meta:{}}},{\"../../plots/geo\":589,\"../heatmap/colorbar\":795,\"./attributes\":716,\"./calc\":717,\"./defaults\":718,\"./event_data\":719,\"./hover\":720,\"./plot\":722,\"./select\":723,\"./style\":724}],722:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../lib/geo_location_utils\"),o=t(\"../../lib/topojson_utils\").getTopojsonFeatures,s=t(\"../../plots/cartesian/autorange\").findExtremes,l=t(\"./style\").style;e.exports={calcGeoJSON:function(t,e){for(var r=t[0].trace,n=e[r.geo],i=n._subplot,l=r.locationmode,c=r._length,u=\"geojson-id\"===l?a.extractTraceFeature(t):o(r,i.topojson),f=[],h=[],p=0;p=0;n--){var i=r[n].id;if(\"string\"==typeof i&&0===i.indexOf(\"water\"))for(var a=n+1;a=0;r--)t.removeLayer(e[r][1])},s.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new o(t,r.uid),a=i.sourceId,s=n(e),l=i.below=t.belowLookup[\"trace-\"+r.uid];return t.map.addSource(a,{type:\"geojson\",data:s.geojson}),i._addLayers(s,l),e[0].trace._glTrace=i,i}},{\"../../plots/mapbox/constants\":611,\"./convert\":726}],730:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../mesh3d/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,c={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\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:a({editType:\"calc\"},{keys:[\"norm\"]}),uhoverformat:i(\"u\",1),vhoverformat:i(\"v\",1),whoverformat:i(\"w\",1),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),showlegend:l({},s.showlegend,{dflt:!1})};l(c,n(\"\",{colorAttr:\"u/v/w norm\",showScaleDflt:!0,editTypeOverride:\"calc\"}));[\"opacity\",\"lightposition\",\"lighting\"].forEach((function(t){c[t]=o[t]})),c.hoverinfo=l({},s.hoverinfo,{editType:\"calc\",flags:[\"x\",\"y\",\"z\",\"u\",\"v\",\"w\",\"norm\",\"text\",\"name\"],dflt:\"x+y+z+norm+text+name\"}),c.transforms=void 0,e.exports=c},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../mesh3d/attributes\":867}],731:[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;co.level||o.starts.length&&a===o.level)}break;case\"constraint\":if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,l=n.y.length,c=-1/0,u=1/0;for(r=0;r\":p>c&&(n.prefixBoundary=!0);break;case\"<\":(pc||n.starts.length&&h===u)&&(n.prefixBoundary=!0);break;case\"][\":f=Math.min(p[0],p[1]),h=Math.max(p[0],p[1]),fc&&(n.prefixBoundary=!0)}}}},{}],738:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale\"),i=t(\"./make_color_map\"),a=t(\"./end_plus\");e.exports={min:\"zmin\",max:\"zmax\",calc:function(t,e,r){var o=e.contours,s=e.line,l=o.size||1,c=o.coloring,u=i(e,{isColorbar:!0});if(\"heatmap\"===c){var f=n.extractOpts(e);r._fillgradient=f.reversescale?n.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else\"fill\"===c&&(r._fillcolor=u);r._line={color:\"lines\"===c?u:s.color,width:!1!==o.showlines?s.width:0,dash:s.dash},r._levels={start:o.start,end:a(o),size:l}}}},{\"../../components/colorscale\":378,\"./end_plus\":746,\"./make_color_map\":751}],739:[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}}},{}],740:[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,m=r(\"contours.operation\");(g._operation=c[m],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),\"=\"===m?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\":366,\"../../constants/filter_ops\":475,\"./label_defaults\":750,\"fast-isnumeric\":190}],741:[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\":475,\"fast-isnumeric\":190}],742:[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\")}},{}],743:[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),starts:n.extendDeep([],t.starts)})}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;r1e3){n.warn(\"Too many contours, clipping at 1000\",t);break}return l}},{\"../../lib\":503,\"./constraint_mapping\":741,\"./end_plus\":746}],746:[function(t,e,r){\"use strict\";e.exports=function(t){return t.end+t.size/1e6}},{}],747:[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])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]}(f,r,e),p=[s(t,e,[-h[0],-h[1]])],d=t.z.length,g=t.z[0].length,m=e.slice(),v=h.slice();for(c=0;c<1e4;c++){if(f>20?(f=i.CHOOSESADDLE[f][(h[0]||h[1])<0?0:1],t.crossings[u]=i.SADDLEREMAINDER[f]):delete t.crossings[u],!(h=i.NEWDELTA[f])){n.log(\"Found bad marching index:\",f,e,t.level);break}p.push(s(t,e,h)),e[0]+=h[0],e[1]+=h[1],u=e.join(\",\"),a(p[p.length-1],p[p.length-2],o,l)&&p.pop();var y=h[0]&&(e[0]<0||e[0]>g-2)||h[1]&&(e[1]<0||e[1]>d-2);if(e[0]===m[0]&&e[1]===m[1]&&h[0]===v[0]&&h[1]===v[1]||r&&y)break;f=t.crossings[u]}1e4===c&&n.log(\"Infinite loop in contour?\");var x,b,_,w,T,k,A,M,S,E,L,C,P,I,O,z=a(p[0],p[p.length-1],o,l),D=0,R=.2*t.smoothing,F=[],B=0;for(c=1;c=B;c--)if((x=F[c])=B&&x+F[b]M&&S--,t.edgepaths[S]=L.concat(p,E));break}V||(t.edgepaths[M]=p.concat(E))}for(M=0;Mt?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=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;hn.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;b2*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.fontSize,a=e.width+i/3,o=Math.max(0,e.height-i/3),s=t.x,l=t.y,c=t.theta,u=Math.sin(c),f=Math.cos(c),h=function(t,e){return[s+t*f-e*u,l+t*u+e*f]},p=[h(-a/2,-o/2),h(-a/2,o/2),h(a/2,o/2),h(a/2,-o/2)];r.push({text:e.text,x:s,y:l,dy:e.dy,theta:c,level:e.level,width:a,height:o}),n.push(p)},r.drawLabels=function(t,e,r,a,o){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(s.convertToTspans,r)})),o){for(var c=\"\",u=0;ur.end&&(r.start=r.end=(r.start+r.end)/2),t._input.contours||(t._input.contours={}),i.extendFlat(t._input.contours,{start:r.start,end:r.end,size:r.size}),t._input.autocontour=!0}else if(\"constraint\"!==r.type){var c,u=r.start,f=r.end,h=t._input.contours;if(u>f&&(r.start=h.start=f,f=r.end=h.end=u,u=r.start),!(r.size>0))c=u===f?1:a(u,f,t.ncontours).dtick,h.size=r.size=c}}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554}],755:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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\":388,\"../heatmap/style\":805,\"./make_color_map\":751,\"@plotly/d3\":58}],756:[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\":376,\"./label_defaults\":750}],757:[function(t,e,r){\"use strict\";var n=t(\"../heatmap/attributes\"),i=t(\"../contour/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../lib/extend\").extendFlat,s=i.contours;e.exports=o({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,hovertext:n.hovertext,transpose:n.transpose,atype:n.xtype,btype:n.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:s.type,start:s.start,end:s.end,size:s.size,coloring:{valType:\"enumerated\",values:[\"fill\",\"lines\",\"none\"],dflt:\"fill\",editType:\"calc\"},showlines:s.showlines,showlabels:s.showlabels,labelfont:s.labelfont,labelformat:s.labelformat,operation:s.operation,value:s.value,editType:\"calc\",impliedEdits:{autocontour:!1}},line:{color:i.line.color,width:i.line.width,dash:i.line.dash,smoothing:i.line.smoothing,editType:\"plot\"},transforms:void 0},a(\"\",{cLetter:\"z\",autoColorDflt:!1}))},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../contour/attributes\":735,\"../heatmap/attributes\":792}],758:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\"),i=t(\"../../lib\"),a=t(\"../heatmap/convert_column_xyz\"),o=t(\"../heatmap/clean_2d_array\"),s=t(\"../heatmap/interp2d\"),l=t(\"../heatmap/find_empties\"),c=t(\"../heatmap/make_bound_array\"),u=t(\"./defaults\"),f=t(\"../carpet/lookup_carpetid\"),h=t(\"../contour/set_contours\");e.exports=function(t,e){var r=e._carpetTrace=f(t,e);if(r&&r.visible&&\"legendonly\"!==r.visible){if(!e.a||!e.b){var p=t.data[r.index],d=t.data[e.index];d.a||(d.a=p.a),d.b||(d.b=p.b),u(d,e,e._defaultColor,t._fullLayout)}var g=function(t,e){var r,u,f,h,p,d,g,m=e._carpetTrace,v=m.aaxis,y=m.baxis;v._minDtick=0,y._minDtick=0,i.isArray1D(e.z)&&a(e,v,y,\"a\",\"b\",[\"z\"]);r=e._a=e._a||e.a,h=e._b=e._b||e.b,r=r?v.makeCalcdata(e,\"_a\"):[],h=h?y.makeCalcdata(e,\"_b\"):[],u=e.a0||0,f=e.da||1,p=e.b0||0,d=e.db||1,g=e._z=o(e._z||e.z,e.transpose),e._emptypoints=l(g),s(g,e._emptypoints);var x=i.maxRowLength(g),b=\"scaled\"===e.xtype?\"\":r,_=c(e,b,u,f,x,v),w=\"scaled\"===e.ytype?\"\":h,T=c(e,w,p,d,g.length,y),k={a:_,b:T,z:g};\"levels\"===e.contours.type&&\"none\"!==e.contours.coloring&&n(t,e,{vals:g,containerStr:\"\",cLetter:\"z\"});return[k]}(t,e);return h(e,e._z),g}}},{\"../../components/colorscale/calc\":374,\"../../lib\":503,\"../carpet/lookup_carpetid\":708,\"../contour/set_contours\":754,\"../heatmap/clean_2d_array\":794,\"../heatmap/convert_column_xyz\":796,\"../heatmap/find_empties\":798,\"../heatmap/interp2d\":801,\"../heatmap/make_bound_array\":803,\"./defaults\":759}],759:[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\":503,\"../contour/constraint_defaults\":740,\"../contour/contours_defaults\":742,\"../contour/style_defaults\":756,\"../heatmap/xyz_defaults\":807,\"./attributes\":757}],760:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../contour/colorbar\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../contour/style\"),moduleType:\"trace\",name:\"contourcarpet\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"carpet\",\"contour\",\"symbols\",\"showLegend\",\"hasLines\",\"carpetDependent\",\"noHover\",\"noSortingByValue\"],meta:{}}},{\"../../plots/cartesian\":568,\"../contour/colorbar\":738,\"../contour/style\":755,\"./attributes\":757,\"./calc\":758,\"./defaults\":759,\"./plot\":761}],761:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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(\"../contour/empty_pathinfo\"),d=t(\"../contour/close_boundaries\"),g=t(\"../carpet/lookup_carpetid\"),m=t(\"../carpet/axis_aligned_line\");function v(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 y(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function x(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,b){var _=e.xaxis,w=e.yaxis;s.makeTraceGroups(b,r,\"contour\").each((function(r){var b=n.select(this),T=r[0],k=T.trace,A=k._carpetTrace=g(t,k),M=t.calcdata[A.index][0];if(A.visible&&\"legendonly\"!==A.visible){var S=T.a,E=T.b,L=k.contours,C=p(L,e,T),P=\"constraint\"===L.type,I=L._operation,O=P?\"=\"===I?\"lines\":\"fill\":L.coloring,z=[[S[0],E[E.length-1]],[S[S.length-1],E[E.length-1]],[S[S.length-1],E[0]],[S[0],E[0]]];l(C);var D=1e-8*(S[S.length-1]-S[0]),R=1e-8*(E[E.length-1]-E[0]);c(C,D,R);var F,B,N,j,U=C;\"constraint\"===L.type&&(U=h(C,I)),function(t,e){var r,n,i,a,o,s,l,c,u;for(r=0;r=0;j--)F=M.clipsegments[j],B=i([],F.x,_.c2p),N=i([],F.y,w.c2p),B.reverse(),N.reverse(),V.push(a(B,N,F.bicubic));var H=\"M\"+V.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=0&&(h=L,d=g):Math.abs(f[1]-h[1])=0&&(h=L,d=g):s.log(\"endpt to newendpt is not vert. or horz.\",f,h,L)}if(d>=0)break;y+=S(f,h),f=h}if(d===e.edgepaths.length){s.log(\"unclosed perimeter path\");break}u=d,(b=-1===x.indexOf(u))&&(u=x[0],y+=S(f,h)+\"Z\",f=null)}for(u=0;um&&(n.max=m);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/I),f.LABELMAX),a=0;a0?+p[u]:0),f.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:v},properties:y})}}var b=o.extractOpts(e),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],T=[\"interpolate\",[\"linear\"],[\"heatmap-density\"],0,a.opacity(w)<1?w:a.addOpacity(w,0)];for(u=1;u<_.length;u++)T.push(_[u][0],_[u][1]);var k=[\"interpolate\",[\"linear\"],[\"get\",\"z\"],b.min,0,b.max,1];return i.extendFlat(c.heatmap.paint,{\"heatmap-weight\":d?k:1/(b.max-b.min),\"heatmap-color\":T,\"heatmap-radius\":g?{type:\"identity\",property:\"r\"}:e.radius,\"heatmap-opacity\":e.opacity}),c.geojson={type:\"FeatureCollection\",features:f},c.heatmap.layout.visibility=\"visible\",c}},{\"../../components/color\":366,\"../../components/colorscale\":378,\"../../constants/numerical\":479,\"../../lib\":503,\"../../lib/geojson_utils\":497,\"fast-isnumeric\":190}],765:[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(\"lon\")||[],c=s(\"lat\")||[],u=Math.min(l.length,c.length);u?(e._length=u,s(\"z\"),s(\"radius\"),s(\"below\"),s(\"text\"),s(\"hovertext\"),s(\"hovertemplate\"),i(t,e,o,s,{prefix:\"\",cLetter:\"z\"})):e.visible=!1}},{\"../../components/colorscale/defaults\":376,\"../../lib\":503,\"./attributes\":762}],766:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.z=e.z,t}},{}],767:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../scattermapbox/hover\").hoverPoints,a=t(\"../scattermapbox/hover\").getExtraText;e.exports=function(t,e,r){var o=i(t,e,r);if(o){var s=o[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,\"z\"in u){var f=s.subplot.mockAxis;s.z=u.z,s.zLabel=n.tickText(f,f.c2l(u.z),\"hover\").text}return s.extraText=a(c,u,l[0].t.labels),[s]}}},{\"../../plots/cartesian/axes\":554,\"../scattermapbox/hover\":996}],768:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../heatmap/colorbar\"),formatLabels:t(\"../scattermapbox/format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),getBelow:function(t,e){for(var r=e.getMapLayers(),n=0;n=0;r--)t.removeLayer(e[r][1])},o.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new a(t,r.uid),o=i.sourceId,s=n(e),l=i.below=t.belowLookup[\"trace-\"+r.uid];return t.map.addSource(o,{type:\"geojson\",data:s.geojson}),i._addLayers(s,l),i}},{\"../../plots/mapbox/constants\":611,\"./convert\":764}],770:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){for(var r=0;r\"),l.color=function(t,e){var r=t.marker,i=e.mc||r.color,a=e.mlc||r.line.color,o=e.mlw||r.line.width;if(n(i))return i;if(n(a)&&o)return a}(u,h),[l]}}},{\"../../components/color\":366,\"../../lib\":503,\"../bar/hover\":655}],778:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\"),plot:t(\"./plot\"),style:t(\"./style\").style,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"../bar/select\"),moduleType:\"trace\",name:\"funnel\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"../bar/select\":660,\"./attributes\":771,\"./calc\":772,\"./cross_trace_calc\":774,\"./defaults\":775,\"./event_data\":776,\"./hover\":777,\"./layout_attributes\":779,\"./layout_defaults\":780,\"./plot\":781,\"./style\":782}],779:[function(t,e,r){\"use strict\";e.exports={funnelmode:{valType:\"enumerated\",values:[\"stack\",\"group\",\"overlay\"],dflt:\"stack\",editType:\"calc\"},funnelgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},funnelgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],780:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s path\").each((function(t){if(!t.isBlank){var e=s.marker;n.select(this).call(a.fill,t.mc||e.color).call(a.stroke,t.mlc||e.line.color).call(i.dashLine,e.line.dash,t.mlw||e.line.width).style(\"opacity\",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(\".regions\").each((function(){n.select(this).selectAll(\"path\").style(\"stroke-width\",0).call(a.fill,s.connector.fillcolor)})),r.selectAll(\".lines\").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll(\"path\"),t.width,t.color,t.dash)}))}))}}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../constants/interactions\":478,\"../bar/style\":662,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],783:[function(t,e,r){\"use strict\";var n=t(\"../pie/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/domain\").attributes,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../../plots/template_attributes\").texttemplateAttrs,l=t(\"../../lib/extend\").extendFlat;e.exports={labels:n.labels,label0:n.label0,dlabel:n.dlabel,values:n.values,marker:{colors:n.marker.colors,line:{color:l({},n.marker.line.color,{dflt:null}),width:l({},n.marker.line.width,{dflt:1}),editType:\"calc\"},editType:\"calc\"},text:n.text,hovertext:n.hovertext,scalegroup:l({},n.scalegroup,{}),textinfo:l({},n.textinfo,{flags:[\"label\",\"text\",\"value\",\"percent\"]}),texttemplate:s({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),hoverinfo:l({},i.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:o({},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),textposition:l({},n.textposition,{values:[\"inside\",\"none\"],dflt:\"inside\"}),textfont:n.textfont,insidetextfont:n.insidetextfont,title:{text:n.title.text,font:n.title.font,position:l({},n.title.position,{values:[\"top left\",\"top center\",\"top right\"],dflt:\"top center\"}),editType:\"plot\"},domain:a({name:\"funnelarea\",trace:!0,editType:\"calc\"}),aspectratio:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},baseratio:{valType:\"number\",min:0,max:1,dflt:.333,editType:\"plot\"}}},{\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/domain\":584,\"../../plots/template_attributes\":633,\"../pie/attributes\":900}],784:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"funnelarea\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":619}],785:[function(t,e,r){\"use strict\";var n=t(\"../pie/calc\");e.exports={calc:function(t,e){return n.calc(t,e)},crossTraceCalc:function(t){n.crossTraceCalc(t,{type:\"funnelarea\"})}}},{\"../pie/calc\":902}],786:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../plots/domain\").defaults,o=t(\"../bar/defaults\").handleText,s=t(\"../pie/defaults\").handleLabelsAndValues;e.exports=function(t,e,r,l){function c(r,a){return n.coerce(t,e,i,r,a)}var u=c(\"labels\"),f=c(\"values\"),h=s(u,f),p=h.len;if(e._hasLabels=h.hasLabels,e._hasValues=h.hasValues,!e._hasLabels&&e._hasValues&&(c(\"label0\"),c(\"dlabel\")),p){e._length=p,c(\"marker.line.width\")&&c(\"marker.line.color\",l.paper_bgcolor),c(\"marker.colors\"),c(\"scalegroup\");var d,g=c(\"text\"),m=c(\"texttemplate\");if(m||(d=c(\"textinfo\",Array.isArray(g)?\"text+percent\":\"percent\")),c(\"hovertext\"),c(\"hovertemplate\"),m||d&&\"none\"!==d){var v=c(\"textposition\");o(t,e,l,c,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}a(e,l,c),c(\"title.text\")&&(c(\"title.position\"),n.coerceFont(c,\"title.font\",l.font)),c(\"aspectratio\"),c(\"baseratio\")}else e.visible=!1}},{\"../../lib\":503,\"../../plots/domain\":584,\"../bar/defaults\":652,\"../pie/defaults\":903,\"./attributes\":783}],787:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"funnelarea\",basePlotModule:t(\"./base_plot\"),categories:[\"pie-like\",\"funnelarea\",\"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\"),style:t(\"./style\"),styleOne:t(\"../pie/style_one\"),meta:{}}},{\"../pie/style_one\":911,\"./attributes\":783,\"./base_plot\":784,\"./calc\":785,\"./defaults\":786,\"./layout_attributes\":788,\"./layout_defaults\":789,\"./plot\":790,\"./style\":791}],788:[function(t,e,r){\"use strict\";var n=t(\"../pie/layout_attributes\").hiddenlabels;e.exports={hiddenlabels:n,funnelareacolorway:{valType:\"colorlist\",editType:\"calc\"},extendfunnelareacolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{\"../pie/layout_attributes\":907}],789:[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(\"funnelareacolorway\",e.colorway),r(\"extendfunnelareacolors\")}},{\"../../lib\":503,\"./layout_attributes\":788}],790:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/drawing\"),a=t(\"../../lib\"),o=a.strScale,s=a.strTranslate,l=t(\"../../lib/svg_text_utils\"),c=t(\"../bar/plot\").toMoveInsideBar,u=t(\"../bar/uniform_text\"),f=u.recordMinTextSize,h=u.clearMinTextSize,p=t(\"../pie/helpers\"),d=t(\"../pie/plot\"),g=d.attachFxHandlers,m=d.determineInsideTextFont,v=d.layoutAreas,y=d.prerenderTitles,x=d.positionTitleOutside,b=d.formatSliceLabel;function _(t,e){return\"l\"+(e[0]-t[0])+\",\"+(e[1]-t[1])}e.exports=function(t,e){var r=t._fullLayout;h(\"funnelarea\",r),y(e,t),v(e,r._size),a.makeTraceGroups(r._funnelarealayer,e,\"trace\").each((function(e){var u=n.select(this),h=e[0],d=h.trace;!function(t){if(!t.length)return;var e=t[0],r=e.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a,o=Math.pow(i,2),s=e.vTotal,l=s,c=s*o/(1-o)/s;function u(){var t,e={x:t=Math.sqrt(c),y:-t};return[e.x,e.y]}var f,h,p=[];for(p.push(u()),f=t.length-1;f>-1;f--)if(!(h=t[f]).hidden){var d=h.v/l;c+=d,p.push(u())}var g=1/0,m=-1/0;for(f=0;f-1;f--)if(!(h=t[f]).hidden){var A=p[k+=1][0],M=p[k][1];h.TL=[-A,M],h.TR=[A,M],h.BL=w,h.BR=T,h.pxmid=(S=h.TR,E=h.BR,[.5*(S[0]+E[0]),.5*(S[1]+E[1])]),w=h.TL,T=h.TR}var S,E}(e),u.each((function(){var u=n.select(this).selectAll(\"g.slice\").data(e);u.enter().append(\"g\").classed(\"slice\",!0),u.exit().remove(),u.each((function(o,s){if(o.hidden)n.select(this).selectAll(\"path,g\").remove();else{o.pointNumber=o.i,o.curveNumber=d.index;var u=h.cx,v=h.cy,y=n.select(this),x=y.selectAll(\"path.surface\").data([o]);x.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":\"all\"}),y.call(g,t,e);var w=\"M\"+(u+o.TR[0])+\",\"+(v+o.TR[1])+_(o.TR,o.BR)+_(o.BR,o.BL)+_(o.BL,o.TL)+\"Z\";x.attr(\"d\",w),b(t,o,h);var T=p.castOption(d.textposition,o.pts),k=y.selectAll(\"g.slicetext\").data(o.text&&\"none\"!==T?[0]:[]);k.enter().append(\"g\").classed(\"slicetext\",!0),k.exit().remove(),k.each((function(){var h=a.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),p=a.ensureUniformFontSize(t,m(d,o,r.font));h.text(o.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(i.font,p).call(l.convertToTspans,t);var g,y,x,b=i.bBox(h.node()),_=Math.min(o.BL[1],o.BR[1])+v,w=Math.max(o.TL[1],o.TR[1])+v;y=Math.max(o.TL[0],o.BL[0])+u,x=Math.min(o.TR[0],o.BR[0])+u,(g=c(y,x,_,w,b,{isHorizontal:!0,constrained:!0,angle:0,anchor:\"middle\"})).fontSize=p.size,f(d.type,g,r),e[s].transform=g,h.attr(\"transform\",a.getTextTransform(g))}))}}));var v=n.select(this).selectAll(\"g.titletext\").data(d.title.text?[0]:[]);v.enter().append(\"g\").classed(\"titletext\",!0),v.exit().remove(),v.each((function(){var e=a.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),c=d.title.text;d._meta&&(c=a.templateString(c,d._meta)),e.text(c).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(i.font,d.title.font).call(l.convertToTspans,t);var u=x(h,r._size);e.attr(\"transform\",s(u.x,u.y)+o(Math.min(1,u.scale))+s(u.tx,u.ty))}))}))}))}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../bar/plot\":659,\"../bar/uniform_text\":664,\"../pie/helpers\":905,\"../pie/plot\":909,\"@plotly/d3\":58}],791:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../pie/style_one\"),a=t(\"../bar/uniform_text\").resizeText;e.exports=function(t){var e=t._fullLayout._funnelarealayer.selectAll(\".trace\");a(t,e,\"funnelarea\"),e.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)}))}))}},{\"../bar/uniform_text\":664,\"../pie/style_one\":911,\"@plotly/d3\":58}],792:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/font_attributes\"),o=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../plots/template_attributes\").texttemplateAttrs,c=t(\"../../components/colorscale/attributes\"),u=t(\"../../lib/extend\").extendFlat;e.exports=u({z:{valType:\"data_array\",editType:\"calc\"},x:u({},n.x,{impliedEdits:{xtype:\"array\"}}),x0:u({},n.x0,{impliedEdits:{xtype:\"scaled\"}}),dx:u({},n.dx,{impliedEdits:{xtype:\"scaled\"}}),y:u({},n.y,{impliedEdits:{ytype:\"array\"}}),y0:u({},n.y0,{impliedEdits:{ytype:\"scaled\"}}),dy:u({},n.dy,{impliedEdits:{ytype:\"scaled\"}}),xperiod:u({},n.xperiod,{impliedEdits:{xtype:\"scaled\"}}),yperiod:u({},n.yperiod,{impliedEdits:{ytype:\"scaled\"}}),xperiod0:u({},n.xperiod0,{impliedEdits:{xtype:\"scaled\"}}),yperiod0:u({},n.yperiod0,{impliedEdits:{ytype:\"scaled\"}}),xperiodalignment:u({},n.xperiodalignment,{impliedEdits:{xtype:\"scaled\"}}),yperiodalignment:u({},n.yperiodalignment,{impliedEdits:{ytype:\"scaled\"}}),text:{valType:\"data_array\",editType:\"calc\"},hovertext:{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\"},hoverongaps:{valType:\"boolean\",dflt:!0,editType:\"none\"},connectgaps:{valType:\"boolean\",editType:\"calc\"},xgap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},ygap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},xhoverformat:o(\"x\"),yhoverformat:o(\"y\"),zhoverformat:o(\"z\",1),hovertemplate:s(),texttemplate:l({arrayOk:!1,editType:\"plot\"},{keys:[\"x\",\"y\",\"z\",\"text\"]}),textfont:a({editType:\"plot\",autoSize:!0,autoColor:!0,colorEditType:\"style\"}),showlegend:u({},i.showlegend,{dflt:!1})},{transforms:void 0},c(\"\",{cLetter:\"z\",autoColorDflt:!1}))},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/font_attributes\":585,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926}],793:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../plots/cartesian/align_period\"),s=t(\"../histogram2d/calc\"),l=t(\"../../components/colorscale/calc\"),c=t(\"./convert_column_xyz\"),u=t(\"./clean_2d_array\"),f=t(\"./interp2d\"),h=t(\"./find_empties\"),p=t(\"./make_bound_array\"),d=t(\"../../constants/numerical\").BADNUM;function g(t){for(var e=[],r=t.length,n=0;nD){O(\"x scale is not linear\");break}}if(x.length&&\"fast\"===P){var R=(x[x.length-1]-x[0])/(x.length-1),F=Math.abs(R/100);for(k=0;kF){O(\"y scale is not linear\");break}}}var B=i.maxRowLength(T),N=\"scaled\"===e.xtype?\"\":r,j=p(e,N,m,v,B,M),U=\"scaled\"===e.ytype?\"\":x,V=p(e,U,b,_,T.length,S);C||(e._extremes[M._id]=a.findExtremes(M,j),e._extremes[S._id]=a.findExtremes(S,V));var H={x:j,y:V,z:T,text:e._text||e.text,hovertext:e._hovertext||e.hovertext};if(e.xperiodalignment&&y&&(H.orig_x=y),e.yperiodalignment&&w&&(H.orig_y=w),N&&N.length===j.length-1&&(H.xCenter=N),U&&U.length===V.length-1&&(H.yCenter=U),L&&(H.xRanges=A.xRanges,H.yRanges=A.yRanges,H.pts=A.pts),E||l(t,e,{vals:T,cLetter:\"z\"}),E&&e.contours&&\"heatmap\"===e.contours.coloring){var q={type:\"contour\"===e.type?\"heatmap\":\"histogram2d\",xcalendar:e.xcalendar,ycalendar:e.ycalendar};H.xfill=p(q,N,m,v,B,M),H.yfill=p(q,U,b,_,T.length,S)}return[H]}},{\"../../components/colorscale/calc\":374,\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/align_period\":551,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"../histogram2d/calc\":826,\"./clean_2d_array\":794,\"./convert_column_xyz\":796,\"./find_empties\":798,\"./interp2d\":801,\"./make_bound_array\":803}],794:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e,r,o){var s,l,c,u,f,h;function p(t){if(n(t))return+t}if(e&&e.transpose){for(s=0,f=0;f=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]}))}},{\"../../lib\":503}],799:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../components/colorscale\").extractOpts;e.exports=function(t,e,r,s,l){l||(l={});var c,u,f,h,p=l.isContour,d=t.cd[0],g=d.trace,m=t.xa,v=t.ya,y=d.x,x=d.y,b=d.z,_=d.xCenter,w=d.yCenter,T=d.zmask,k=g.zhoverformat,A=y,M=x;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>=b[0].length||h<0||h>b.length)return}else{if(n.inbox(e-y[0],e-y[y.length-1],0)>0||n.inbox(r-x[0],r-x[x.length-1],0)>0)return;if(p){var S;for(A=[2*y[0]-y[1]],S=1;Sg&&(v=Math.max(v,Math.abs(t[a][o]-d)/(m-g))))}return v}e.exports=function(t,e){var r,i=1;for(o(t,e),r=0;r.01;r++)i=o(t,e,a(i));return i>.01&&n.log(\"interp2d didn't converge quickly\",i),t}},{\"../../lib\":503}],802:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){t(\"texttemplate\");var r=n.extendFlat({},e.font,{color:\"auto\",size:\"auto\"});n.coerceFont(t,\"textfont\",r)}},{\"../../lib\":503}],803:[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;u0;)_=w.c2p(R[S]),S--;for(_0;)M=T.c2p(F[S]),S--;if(MGt||Gt>T._length))for(E=Ut;EWt||Wt>w._length)){var Xt=u({x:Yt,y:qt},I,t._fullLayout);Xt.x=Yt,Xt.y=qt;var Zt=P.z[S][E];void 0===Zt?(Xt.z=\"\",Xt.zLabel=\"\"):(Xt.z=Zt,Xt.zLabel=s.tickText(Ft,Zt,\"hover\").text);var Jt=P.text&&P.text[S]&&P.text[S][E];void 0!==Jt&&!1!==Jt||(Jt=\"\"),Xt.text=Jt;var Kt=l.texttemplateString(Dt,Xt,t._fullLayout._d3locale,Xt,I._meta||{});if(Kt){var Qt=Kt.split(\"
\"),$t=Qt.length,te=0;for(L=0;L<$t;L++)te=Math.max(te,Qt[L].length);Ht.push({l:$t,c:te,t:Kt,x:Wt,y:Gt,z:Zt})}}}}var ee=I.textfont,re=ee.family,ne=ee.size,ie=t._fullLayout.font.size;if(!ne||\"auto\"===ne){var ae=1/0,oe=1/0,se=0,le=0;for(L=0;L0&&(a=!0);for(var l=0;la){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]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],m=Math.min(f(d+h,d+p,n,a),f(g+h,g+p,n,a)),v=Math.min(f(d+c,d+h,n,a),f(g+c,g+h,n,a));if(m>v&&vo){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(cr.r2l(B)&&(j=o.tickIncrement(j,b.size,!0,p)),z.start=r.l2r(j),F||i.nestedProperty(e,v+\".start\").set(z.start)}var U=b.end,V=r.r2l(O.end),H=void 0!==V;if((b.endFound||H)&&V!==r.r2l(U)){var q=H?V:i.aggNums(Math.max,null,d);z.end=r.l2r(q),H||i.nestedProperty(e,v+\".start\").set(z.end)}var G=\"autobin\"+s;return!1===e._input[G]&&(e._input[v]=i.extendFlat({},e[v]||{}),delete e._input[G],delete e[G]),[z,d]}e.exports={calc:function(t,e){var r,a,p,d,g=[],m=[],v=\"h\"===e.orientation,y=o.getFromId(t,v?e.yaxis:e.xaxis),x=v?\"y\":\"x\",b={x:\"y\",y:\"x\"}[x],_=e[x+\"calendar\"],w=e.cumulative,T=h(t,e,y,x),k=T[0],A=T[1],M=\"string\"==typeof k.size,S=[],E=M?S:k,L=[],C=[],P=[],I=0,O=e.histnorm,z=e.histfunc,D=-1!==O.indexOf(\"density\");w.enabled&&D&&(O=O.replace(/ ?density$/,\"\"),D=!1);var R,F=\"max\"===z||\"min\"===z?null:0,B=l.count,N=c[O],j=!1,U=function(t){return y.r2c(t,0,_)};for(i.isArrayOrTypedArray(e[b])&&\"count\"!==z&&(R=e[b],j=\"avg\"===z,B=l[z]),r=U(k.start),p=U(k.end)+(r-o.tickIncrement(r,k.size,!1,_))/1e6;r=0&&d=0;n--)s(n);else if(\"increasing\"===e){for(n=1;n=0;n--)t[n]+=t[n+1];\"exclude\"===r&&(t.push(0),t.shift())}}(m,w.direction,w.currentbin);var K=Math.min(g.length,m.length),Q=[],$=0,tt=K-1;for(r=0;r=$;r--)if(m[r]){tt=r;break}for(r=$;r<=tt;r++)if(n(g[r])&&n(m[r])){var et={p:g[r],s:m[r],b:0};w.enabled||(et.pts=P[r],Y?et.ph0=et.ph1=P[r].length?A[P[r][0]]:g[r]:(e._computePh=!0,et.ph0=q(S[r]),et.ph1=q(S[r+1],!0))),Q.push(et)}return 1===Q.length&&(Q[0].width1=o.tickIncrement(Q[0].p,k.size,!1,_)-Q[0].p),s(Q,e),i.isArrayOrTypedArray(e.selectedpoints)&&i.tagSelected(Q,e,Z),Q},calcAllAutoBins:h}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"../bar/arrays_to_calcdata\":647,\"./average\":813,\"./bin_functions\":815,\"./bin_label_vals\":816,\"./norm_functions\":824,\"fast-isnumeric\":190}],818:[function(t,e,r){\"use strict\";e.exports={eventDataKeys:[\"binNumber\"]}},{}],819:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axis_ids\"),a=t(\"../../registry\").traceIs,o=t(\"../bar/defaults\").handleGroupingDefaults,s=n.nestedProperty,l=t(\"../../plots/cartesian/constraints\").getAxisGroup,c=[{aStr:{x:\"xbins.start\",y:\"ybins.start\"},name:\"start\"},{aStr:{x:\"xbins.end\",y:\"ybins.end\"},name:\"end\"},{aStr:{x:\"xbins.size\",y:\"ybins.size\"},name:\"size\"},{aStr:{x:\"nbinsx\",y:\"nbinsy\"},name:\"nbins\"}],u=[\"x\",\"y\"];e.exports=function(t,e){var r,f,h,p,d,g,m,v=e._histogramBinOpts={},y=[],x={},b=[];function _(t,e){return n.coerce(r._input,r,r._module.attributes,t,e)}function w(t){return\"v\"===t.orientation?\"x\":\"y\"}function T(t,r,a){var o=t.uid+\"__\"+a;r||(r=o);var s=function(t,r){return i.getFromTrace({_fullLayout:e},t,r).type}(t,a),l=t[a+\"calendar\"]||\"\",c=v[r],u=!0;c&&(s===c.axType&&l===c.calendar?(u=!1,c.traces.push(t),c.dirs.push(a)):(r=o,s!==c.axType&&n.warn([\"Attempted to group the bins of trace\",t.index,\"set on a\",\"type:\"+s,\"axis\",\"with bins on\",\"type:\"+c.axType,\"axis.\"].join(\" \")),l!==c.calendar&&n.warn([\"Attempted to group the bins of trace\",t.index,\"set with a\",l,\"calendar\",\"with bins\",c.calendar?\"on a \"+c.calendar+\" calendar\":\"w/o a set calendar\"].join(\" \")))),u&&(v[r]={traces:[t],dirs:[a],axType:s,calendar:t[a+\"calendar\"]||\"\"}),t[\"_\"+a+\"bingroup\"]=r}for(d=0;dS&&T.splice(S,T.length-S),M.length>S&&M.splice(S,M.length-S);var E=[],L=[],C=[],P=\"string\"==typeof w.size,I=\"string\"==typeof A.size,O=[],z=[],D=P?O:w,R=I?z:A,F=0,B=[],N=[],j=e.histnorm,U=e.histfunc,V=-1!==j.indexOf(\"density\"),H=\"max\"===U||\"min\"===U?null:0,q=a.count,G=o[j],Y=!1,W=[],X=[],Z=\"z\"in e?e.z:\"marker\"in e&&Array.isArray(e.marker.color)?e.marker.color:\"\";Z&&\"count\"!==U&&(Y=\"avg\"===U,q=a[U]);var J=w.size,K=x(w.start),Q=x(w.end)+(K-i.tickIncrement(K,J,!1,v))/1e6;for(r=K;r=0&&p=0&&d-1,flipY:E.tiling.flip.indexOf(\"y\")>-1,orientation:E.tiling.orientation,pad:{inner:E.tiling.pad},maxDepth:E._maxDepth}).descendants(),O=1/0,z=-1/0;I.forEach((function(t){var e=t.depth;e>=E._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(O=Math.min(O,e),z=Math.max(z,e))})),p=p.data(I,u.getPtId),E._maxVisibleLayers=isFinite(z)?z-O+1:0,p.enter().append(\"g\").classed(\"slice\",!0),T(p,!1,{},[g,m],x),p.order();var D=null;if(w&&M){var R=u.getPtId(M);p.each((function(t){null===D&&u.getPtId(t)===R&&(D={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var F=function(){return D||{x0:0,x1:g,y0:0,y1:m}},B=p;return w&&(B=B.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),B.each((function(s){s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-E.tiling.pad),s._hoverY=y(P?s.y1-E.tiling.pad/2:s.y0+E.tiling.pad/2);var p=n.select(this),d=i.ensureSingle(p,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?d.transition().attrTween(\"d\",(function(t){var e=k(t,!1,F(),[g,m],{orientation:E.tiling.orientation,flipX:E.tiling.flip.indexOf(\"x\")>-1,flipY:E.tiling.flip.indexOf(\"y\")>-1});return function(t){return x(e(t))}})):d.attr(\"d\",x),p.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{isTransitioning:t._transitioning}),d.call(l,s,E,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text=\"\":s._text=h(s,r,E,e,S)||\"\";var T=i.ensureSingle(p,\"g\",\"slicetext\"),M=i.ensureSingle(T,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),I=i.ensureUniformFontSize(t,u.determineTextFont(E,s,S.font));M.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",C?\"end\":L?\"start\":\"middle\").call(a.font,I).call(o.convertToTspans,t),s.textBB=a.bBox(M.node()),s.transform=b(s,{fontSize:I.size}),s.transform.fontSize=I.size,w?M.transition().attrTween(\"transform\",(function(t){var e=A(t,!1,F(),[g,m]);return function(t){return _(e(t))}})):M.attr(\"transform\",_(s))})),D}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../sunburst/fx\":1050,\"../sunburst/helpers\":1051,\"../sunburst/plot\":1055,\"../treemap/constants\":1074,\"./partition\":842,\"./style\":844,\"@plotly/d3\":58}],839:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"icicle\",basePlotModule:t(\"./base_plot\"),categories:[],animatable:!0,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\"),style:t(\"./style\").style,colorbar:t(\"../scatter/marker_colorbar\"),meta:{}}},{\"../scatter/marker_colorbar\":944,\"./attributes\":834,\"./base_plot\":835,\"./calc\":836,\"./defaults\":837,\"./layout_attributes\":840,\"./layout_defaults\":841,\"./plot\":843,\"./style\":844}],840:[function(t,e,r){\"use strict\";e.exports={iciclecolorway:{valType:\"colorlist\",editType:\"calc\"},extendiciclecolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],841:[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(\"iciclecolorway\",e.colorway),r(\"extendiciclecolors\")}},{\"../../lib\":503,\"./layout_attributes\":840}],842:[function(t,e,r){\"use strict\";var n=t(\"d3-hierarchy\"),i=t(\"../treemap/flip_tree\");e.exports=function(t,e,r){var a=r.flipX,o=r.flipY,s=\"h\"===r.orientation,l=r.maxDepth,c=e[0],u=e[1];l&&(c=(t.height+1)*e[0]/Math.min(t.height+1,l),u=(t.height+1)*e[1]/Math.min(t.height+1,l));var f=n.partition().padding(r.pad.inner).size(s?[e[1],c]:[e[0],u])(t);return(s||a||o)&&i(f,e,{swapXY:s,flipX:a,flipY:o}),f}},{\"../treemap/flip_tree\":1079,\"d3-hierarchy\":115}],843:[function(t,e,r){\"use strict\";var n=t(\"../treemap/draw\"),i=t(\"./draw_descendants\");e.exports=function(t,e,r,a){return n(t,e,r,a,{type:\"icicle\",drawDescendants:i})}},{\"../treemap/draw\":1076,\"./draw_descendants\":838}],844:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../bar/uniform_text\").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,\"marker.line.color\")||i.defaultLine,c=a.castOption(r,s,\"marker.line.width\")||0;t.style(\"stroke-width\",c).call(i.fill,n.color).call(i.stroke,l).style(\"opacity\",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._iciclelayer.selectAll(\".trace\");o(t,e,\"icicle\"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style(\"opacity\",r.opacity),e.selectAll(\"path.surface\").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{\"../../components/color\":366,\"../../lib\":503,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],845:[function(t,e,r){\"use strict\";for(var n=t(\"../../plots/attributes\"),i=t(\"../../plots/template_attributes\").hovertemplateAttrs,a=t(\"../../lib/extend\").extendFlat,o=t(\"./constants\").colormodel,s=[\"rgb\",\"rgba\",\"rgba256\",\"hsl\",\"hsla\"],l=[],c=[],u=0;u0||n.inbox(r-o.y0,r-(o.y0+o.h*s.dy),0)>0)){var u,f=Math.floor((e-o.x0)/s.dx),h=Math.floor(Math.abs(r-o.y0)/s.dy);if(s._hasZ?u=o.z[h][f]:s._hasSource&&(u=s._canvas.el.getContext(\"2d\").getImageData(f,h,1,1).data),u){var p,d=o.hi||s.hoverinfo;if(d){var g=d.split(\"+\");-1!==g.indexOf(\"all\")&&(g=[\"color\"]),-1!==g.indexOf(\"color\")&&(p=!0)}var m,v=a.colormodel[s.colormodel],y=v.colormodel||s.colormodel,x=y.length,b=s._scaler(u),_=v.suffix,w=[];(s.hovertemplate||p)&&(w.push(\"[\"+[b[0]+_[0],b[1]+_[1],b[2]+_[2]].join(\", \")),4===x&&w.push(\", \"+b[3]+_[3]),w.push(\"]\"),w=w.join(\"\"),t.extraText=y.toUpperCase()+\": \"+w),Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[h])?m=s.hovertext[h][f]:Array.isArray(s.text)&&Array.isArray(s.text[h])&&(m=s.text[h][f]);var T=c.c2p(o.y0+(h+.5)*s.dy),k=o.x0+(f+.5)*s.dx,A=o.y0+(h+.5)*s.dy,M=\"[\"+u.slice(0,s.colormodel.length).join(\", \")+\"]\";return[i.extendFlat(t,{index:[h,f],x0:l.c2p(o.x0+f*s.dx),x1:l.c2p(o.x0+(f+1)*s.dx),y0:T,y1:T,color:b,xVal:k,xLabelVal:k,yVal:A,yLabelVal:A,zLabelVal:M,text:m,hovertemplateLabels:{zLabel:M,colorLabel:w,\"color[0]Label\":b[0]+_[0],\"color[1]Label\":b[1]+_[1],\"color[2]Label\":b[2]+_[2],\"color[3]Label\":b[3]+_[3]}})]}}}},{\"../../components/fx\":406,\"../../lib\":503,\"./constants\":847}],852:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"./style\"),hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"image\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"2dMap\",\"noSortingByValue\"],animatable:!1,meta:{}}},{\"../../plots/cartesian\":568,\"./attributes\":845,\"./calc\":846,\"./defaults\":848,\"./event_data\":849,\"./hover\":851,\"./plot\":853,\"./style\":854}],853:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.strTranslate,o=t(\"../../constants/xmlns_namespaces\"),s=t(\"./constants\"),l=i.isIOS()||i.isSafari()||i.isIE();e.exports=function(t,e,r,c){var u=e.xaxis,f=e.yaxis,h=!(l||t._context._exportedPlot);i.makeTraceGroups(c,r,\"im\").each((function(e){var r=n.select(this),l=e[0],c=l.trace,p=(\"fast\"===c.zsmooth||!1===c.zsmooth&&h)&&!c._hasZ&&c._hasSource&&\"linear\"===u.type&&\"linear\"===f.type;c._realImage=p;var d,g,m,v,y,x,b=l.z,_=l.x0,w=l.y0,T=l.w,k=l.h,A=c.dx,M=c.dy;for(x=0;void 0===d&&x0;)g=u.c2p(_+x*A),x--;for(x=0;void 0===v&&x0;)y=f.c2p(w+x*M),x--;if(gI[0];if(O||z){var D=d+S/2,R=v+E/2;C+=\"transform:\"+a(D+\"px\",R+\"px\")+\"scale(\"+(O?-1:1)+\",\"+(z?-1:1)+\")\"+a(-D+\"px\",-R+\"px\")+\";\"}}L.attr(\"style\",C);var F=new Promise((function(t){if(c._hasZ)t();else if(c._hasSource)if(c._canvas&&c._canvas.el.width===T&&c._canvas.el.height===k&&c._canvas.source===c.source)t();else{var e=document.createElement(\"canvas\");e.width=T,e.height=k;var r=e.getContext(\"2d\");c._image=c._image||new Image;var n=c._image;n.onload=function(){r.drawImage(n,0,0),c._canvas={el:e,source:c.source},t()},n.setAttribute(\"src\",c.source)}})).then((function(){var t;if(c._hasZ)t=B((function(t,e){return b[e][t]})).toDataURL(\"image/png\");else if(c._hasSource)if(p)t=c.source;else{var e=c._canvas.el.getContext(\"2d\").getImageData(0,0,T,k).data;t=B((function(t,r){var n=4*(r*T+t);return[e[n],e[n+1],e[n+2],e[n+3]]})).toDataURL(\"image/png\")}L.attr({\"xlink:href\":t,height:E,width:S,x:d,y:v})}));t._promises.push(F)}function B(t){var e=document.createElement(\"canvas\");e.width=S,e.height=E;var r,n=e.getContext(\"2d\"),a=function(t){return i.constrain(Math.round(u.c2p(_+t*A)-d),0,S)},o=function(t){return i.constrain(Math.round(f.c2p(w+t*M)-v),0,E)},h=s.colormodel[c.colormodel],p=h.colormodel||c.colormodel,g=h.fmt;for(x=0;x0}function T(t){t.each((function(t){y.stroke(n.select(this),t.line.color)})).each((function(t){y.fill(n.select(this),t.color)})).style(\"stroke-width\",(function(t){return t.line.width}))}function k(t,e,r){var n=t._fullLayout,i=o.extendFlat({type:\"linear\",ticks:\"outside\",range:r,showline:!0},e),a={type:\"linear\",_id:\"x\"+e._id},s={letter:\"x\",font:n.font,noHover:!0,noTickson:!0};function l(t,e){return o.coerce(i,a,v,t,e)}return g(i,a,l,s,n),m(i,a,l,s),a}function A(t,e,r){return[Math.min(e/t.width,r/t.height),t,e+\"x\"+r]}function M(t,e,r,i){var a=document.createElementNS(\"http://www.w3.org/2000/svg\",\"text\"),o=n.select(a);return o.text(t).attr(\"x\",0).attr(\"y\",0).attr(\"text-anchor\",r).attr(\"data-unformatted\",t).call(p.convertToTspans,i).call(f.font,e),f.bBox(o.node())}function S(t,e,r,n,i,a){var s=\"_cache\"+e;t[s]&&t[s].key===i||(t[s]={key:i,value:r});var l=o.aggNums(a,null,[t[s].value,n],2);return t[s].value=l,l}e.exports=function(t,e,r,g){var m,v=t._fullLayout;w(r)&&g&&(m=g()),o.makeTraceGroups(v._indicatorlayer,e,\"trace\").each((function(e){var g,E,L,C,P,I=e[0].trace,O=n.select(this),z=I._hasGauge,D=I._isAngular,R=I._isBullet,F=I.domain,B={w:v._size.w*(F.x[1]-F.x[0]),h:v._size.h*(F.y[1]-F.y[0]),l:v._size.l+v._size.w*F.x[0],r:v._size.r+v._size.w*(1-F.x[1]),t:v._size.t+v._size.h*(1-F.y[1]),b:v._size.b+v._size.h*F.y[0]},N=B.l+B.w/2,j=B.t+B.h/2,U=Math.min(B.w/2,B.h),V=h.innerRadius*U,H=I.align||\"center\";if(E=j,z){if(D&&(g=N,E=j+U/2,L=function(t){return function(t,e){var r=Math.sqrt(t.width/2*(t.width/2)+t.height*t.height);return[e/r,t,e]}(t,.9*V)}),R){var q=h.bulletPadding,G=1-h.bulletNumberDomainSize+q;g=B.l+(G+(1-G)*b[H])*B.w,L=function(t){return A(t,(h.bulletNumberDomainSize-q)*B.w,B.h)}}}else g=B.l+b[H]*B.w,L=function(t){return A(t,B.w,B.h)};!function(t,e,r,i){var c,u,h,g=r[0].trace,m=i.numbersX,v=i.numbersY,T=g.align||\"center\",A=x[T],E=i.transitionOpts,L=i.onComplete,C=o.ensureSingle(e,\"g\",\"numbers\"),P=[];g._hasNumber&&P.push(\"number\");g._hasDelta&&(P.push(\"delta\"),\"left\"===g.delta.position&&P.reverse());var I=C.selectAll(\"text\").data(P);function O(e,r,n,i){if(!e.match(\"s\")||n>=0==i>=0||r(n).slice(-1).match(_)||r(i).slice(-1).match(_))return r;var a=e.slice().replace(\"s\",\"f\").replace(/\\d+/,(function(t){return parseInt(t)-1})),o=k(t,{tickformat:a});return function(t){return Math.abs(t)<1?d.tickText(o,t).text:r(t)}}I.enter().append(\"text\"),I.attr(\"text-anchor\",(function(){return A})).attr(\"class\",(function(t){return t})).attr(\"x\",null).attr(\"y\",null).attr(\"dx\",null).attr(\"dy\",null),I.exit().remove();var z,D=g.mode+g.align;g._hasDelta&&(z=function(){var e=k(t,{tickformat:g.delta.valueformat},g._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=function(t){return g.delta.relative?t.relativeDelta:t.delta},s=function(t,e){return 0===t||\"number\"!=typeof t||isNaN(t)?\"-\":(t>0?g.delta.increasing.symbol:g.delta.decreasing.symbol)+e(t)},l=function(t){return t.delta>=0?g.delta.increasing.color:g.delta.decreasing.color};void 0===g._deltaLastValue&&(g._deltaLastValue=o(r[0]));var c=C.select(\"text.delta\");function h(){c.text(s(o(r[0]),i)).call(y.fill,l(r[0])).call(p.convertToTspans,t)}return c.call(f.font,g.delta.font).call(y.fill,l({delta:g._deltaLastValue})),w(E)?c.transition().duration(E.duration).ease(E.easing).tween(\"text\",(function(){var t=n.select(this),e=o(r[0]),c=g._deltaLastValue,u=O(g.delta.valueformat,i,c,e),f=a(c,e);return g._deltaLastValue=e,function(e){t.text(s(f(e),u)),t.call(y.fill,l({delta:f(e)}))}})).each(\"end\",(function(){h(),L&&L()})).each(\"interrupt\",(function(){h(),L&&L()})):h(),u=M(s(o(r[0]),i),g.delta.font,A,t),c}(),D+=g.delta.position+g.delta.font.size+g.delta.font.family+g.delta.valueformat,D+=g.delta.increasing.symbol+g.delta.decreasing.symbol,h=u);g._hasNumber&&(!function(){var e=k(t,{tickformat:g.number.valueformat},g._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=g.number.suffix,s=g.number.prefix,l=C.select(\"text.number\");function u(){var e=\"number\"==typeof r[0].y?s+i(r[0].y)+o:\"-\";l.text(e).call(f.font,g.number.font).call(p.convertToTspans,t)}w(E)?l.transition().duration(E.duration).ease(E.easing).each(\"end\",(function(){u(),L&&L()})).each(\"interrupt\",(function(){u(),L&&L()})).attrTween(\"text\",(function(){var t=n.select(this),e=a(r[0].lastY,r[0].y);g._lastValue=r[0].y;var l=O(g.number.valueformat,i,r[0].lastY,r[0].y);return function(r){t.text(s+l(e(r))+o)}})):u(),c=M(s+i(r[0].y)+o,g.number.font,A,t)}(),D+=g.number.font.size+g.number.font.family+g.number.valueformat+g.number.suffix+g.number.prefix,h=c);if(g._hasDelta&&g._hasNumber){var R,F,B=[(c.left+c.right)/2,(c.top+c.bottom)/2],N=[(u.left+u.right)/2,(u.top+u.bottom)/2],j=.75*g.delta.font.size;\"left\"===g.delta.position&&(R=S(g,\"deltaPos\",0,-1*(c.width*b[g.align]+u.width*(1-b[g.align])+j),D,Math.min),F=B[1]-N[1],h={width:c.width+u.width+j,height:Math.max(c.height,u.height),left:u.left+R,right:c.right,top:Math.min(c.top,u.top+F),bottom:Math.max(c.bottom,u.bottom+F)}),\"right\"===g.delta.position&&(R=S(g,\"deltaPos\",0,c.width*(1-b[g.align])+u.width*b[g.align]+j,D,Math.max),F=B[1]-N[1],h={width:c.width+u.width+j,height:Math.max(c.height,u.height),left:c.left,right:u.right+R,top:Math.min(c.top,u.top+F),bottom:Math.max(c.bottom,u.bottom+F)}),\"bottom\"===g.delta.position&&(R=null,F=u.height,h={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height,bottom:c.bottom+u.height}),\"top\"===g.delta.position&&(R=null,F=c.top,h={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height-u.height,bottom:c.bottom}),z.attr({dx:R,dy:F})}(g._hasNumber||g._hasDelta)&&C.attr(\"transform\",(function(){var t=i.numbersScaler(h);D+=t[2];var e,r=S(g,\"numbersScale\",1,t[0],D,Math.min);g._scaleNumbers||(r=1),e=g._isAngular?v-r*h.bottom:v-r*(h.top+h.bottom)/2,g._numbersTop=r*h.top+e;var n=h[T];\"center\"===T&&(n=(h.left+h.right)/2);var a=m-r*n;return a=S(g,\"numbersTranslate\",0,a,D,Math.max),l(a,e)+s(r)}))}(t,O,e,{numbersX:g,numbersY:E,numbersScaler:L,transitionOpts:r,onComplete:m}),z&&(C={range:I.gauge.axis.range,color:I.gauge.bgcolor,line:{color:I.gauge.bordercolor,width:0},thickness:1},P={range:I.gauge.axis.range,color:\"rgba(0, 0, 0, 0)\",line:{color:I.gauge.bordercolor,width:I.gauge.borderwidth},thickness:1});var Y=O.selectAll(\"g.angular\").data(D?e:[]);Y.exit().remove();var W=O.selectAll(\"g.angularaxis\").data(D?e:[]);W.exit().remove(),D&&function(t,e,r,a){var o,s,f,h,p=r[0].trace,g=a.size,m=a.radius,v=a.innerRadius,y=a.gaugeBg,x=a.gaugeOutline,b=[g.l+g.w/2,g.t+g.h/2+m/2],_=a.gauge,A=a.layer,M=a.transitionOpts,S=a.onComplete,E=Math.PI/2;function L(t){var e=p.gauge.axis.range[0],r=(t-e)/(p.gauge.axis.range[1]-e)*Math.PI-E;return r<-E?-E:r>E?E:r}function C(t){return n.svg.arc().innerRadius((v+m)/2-t/2*(m-v)).outerRadius((v+m)/2+t/2*(m-v)).startAngle(-E)}function P(t){t.attr(\"d\",(function(t){return C(t.thickness).startAngle(L(t.range[0])).endAngle(L(t.range[1]))()}))}_.enter().append(\"g\").classed(\"angular\",!0),_.attr(\"transform\",l(b[0],b[1])),A.enter().append(\"g\").classed(\"angularaxis\",!0).classed(\"crisp\",!0),A.selectAll(\"g.xangularaxistick,path,text\").remove(),(o=k(t,p.gauge.axis)).type=\"linear\",o.range=p.gauge.axis.range,o._id=\"xangularaxis\",o.ticklabeloverflow=\"allow\",o.setScale();var I=function(t){return(o.range[0]-t.x)/(o.range[1]-o.range[0])*Math.PI+Math.PI},O={},z=d.makeLabelFns(o,0).labelStandoff;O.xFn=function(t){var e=I(t);return Math.cos(e)*z},O.yFn=function(t){var e=I(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(z+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*u)},O.anchorFn=function(t){var e=I(t),r=Math.cos(e);return Math.abs(r)<.1?\"middle\":r>0?\"start\":\"end\"},O.heightFn=function(t,e,r){var n=I(t);return-.5*(1+Math.sin(n))*r};var D=function(t){return l(b[0]+m*Math.cos(t),b[1]-m*Math.sin(t))};f=function(t){return D(I(t))};if(s=d.calcTicks(o),h=d.getTickSigns(o)[2],o.visible){h=\"inside\"===o.ticks?-1:1;var R=(o.linewidth||1)/2;d.drawTicks(t,o,{vals:s,layer:A,path:\"M\"+h*R+\",0h\"+h*o.ticklen,transFn:function(t){var e=I(t);return D(e)+\"rotate(\"+-c(e)+\")\"}}),d.drawLabels(t,o,{vals:s,layer:A,transFn:f,labelFns:O})}var F=[y].concat(p.gauge.steps),B=_.selectAll(\"g.bg-arc\").data(F);B.enter().append(\"g\").classed(\"bg-arc\",!0).append(\"path\"),B.select(\"path\").call(P).call(T),B.exit().remove();var N=C(p.gauge.bar.thickness),j=_.selectAll(\"g.value-arc\").data([p.gauge.bar]);j.enter().append(\"g\").classed(\"value-arc\",!0).append(\"path\");var U=j.select(\"path\");w(M)?(U.transition().duration(M.duration).ease(M.easing).each(\"end\",(function(){S&&S()})).each(\"interrupt\",(function(){S&&S()})).attrTween(\"d\",(V=N,H=L(r[0].lastY),q=L(r[0].y),function(){var t=i(H,q);return function(e){return V.endAngle(t(e))()}})),p._lastValue=r[0].y):U.attr(\"d\",\"number\"==typeof r[0].y?N.endAngle(L(r[0].y)):\"M0,0Z\");var V,H,q;U.call(T),j.exit().remove(),F=[];var G=p.gauge.threshold.value;(G||0===G)&&F.push({range:[G,G],color:p.gauge.threshold.color,line:{color:p.gauge.threshold.line.color,width:p.gauge.threshold.line.width},thickness:p.gauge.threshold.thickness});var Y=_.selectAll(\"g.threshold-arc\").data(F);Y.enter().append(\"g\").classed(\"threshold-arc\",!0).append(\"path\"),Y.select(\"path\").call(P).call(T),Y.exit().remove();var W=_.selectAll(\"g.gauge-outline\").data([x]);W.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"path\"),W.select(\"path\").call(P).call(T),W.exit().remove()}(t,0,e,{radius:U,innerRadius:V,gauge:Y,layer:W,size:B,gaugeBg:C,gaugeOutline:P,transitionOpts:r,onComplete:m});var X=O.selectAll(\"g.bullet\").data(R?e:[]);X.exit().remove();var Z=O.selectAll(\"g.bulletaxis\").data(R?e:[]);Z.exit().remove(),R&&function(t,e,r,n){var i,a,o,s,c,u=r[0].trace,f=n.gauge,p=n.layer,g=n.gaugeBg,m=n.gaugeOutline,v=n.size,x=u.domain,b=n.transitionOpts,_=n.onComplete;f.enter().append(\"g\").classed(\"bullet\",!0),f.attr(\"transform\",l(v.l,v.t)),p.enter().append(\"g\").classed(\"bulletaxis\",!0).classed(\"crisp\",!0),p.selectAll(\"g.xbulletaxistick,path,text\").remove();var A=v.h,M=u.gauge.bar.thickness*A,S=x.x[0],E=x.x[0]+(x.x[1]-x.x[0])*(u._hasNumber||u._hasDelta?1-h.bulletNumberDomainSize:1);(i=k(t,u.gauge.axis))._id=\"xbulletaxis\",i.domain=[S,E],i.setScale(),a=d.calcTicks(i),o=d.makeTransTickFn(i),s=d.getTickSigns(i)[2],c=v.t+v.h,i.visible&&(d.drawTicks(t,i,{vals:\"inside\"===i.ticks?d.clipEnds(i,a):a,layer:p,path:d.makeTickPath(i,c,s),transFn:o}),d.drawLabels(t,i,{vals:a,layer:p,transFn:o,labelFns:d.makeLabelFns(i,c)}));function L(t){t.attr(\"width\",(function(t){return Math.max(0,i.c2p(t.range[1])-i.c2p(t.range[0]))})).attr(\"x\",(function(t){return i.c2p(t.range[0])})).attr(\"y\",(function(t){return.5*(1-t.thickness)*A})).attr(\"height\",(function(t){return t.thickness*A}))}var C=[g].concat(u.gauge.steps),P=f.selectAll(\"g.bg-bullet\").data(C);P.enter().append(\"g\").classed(\"bg-bullet\",!0).append(\"rect\"),P.select(\"rect\").call(L).call(T),P.exit().remove();var I=f.selectAll(\"g.value-bullet\").data([u.gauge.bar]);I.enter().append(\"g\").classed(\"value-bullet\",!0).append(\"rect\"),I.select(\"rect\").attr(\"height\",M).attr(\"y\",(A-M)/2).call(T),w(b)?I.select(\"rect\").transition().duration(b.duration).ease(b.easing).each(\"end\",(function(){_&&_()})).each(\"interrupt\",(function(){_&&_()})).attr(\"width\",Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y)))):I.select(\"rect\").attr(\"width\",\"number\"==typeof r[0].y?Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y))):0);I.exit().remove();var O=r.filter((function(){return u.gauge.threshold.value||0===u.gauge.threshold.value})),z=f.selectAll(\"g.threshold-bullet\").data(O);z.enter().append(\"g\").classed(\"threshold-bullet\",!0).append(\"line\"),z.select(\"line\").attr(\"x1\",i.c2p(u.gauge.threshold.value)).attr(\"x2\",i.c2p(u.gauge.threshold.value)).attr(\"y1\",(1-u.gauge.threshold.thickness)/2*A).attr(\"y2\",(1-(1-u.gauge.threshold.thickness)/2)*A).call(y.stroke,u.gauge.threshold.line.color).style(\"stroke-width\",u.gauge.threshold.line.width),z.exit().remove();var D=f.selectAll(\"g.gauge-outline\").data([m]);D.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"rect\"),D.select(\"rect\").call(L).call(T),D.exit().remove()}(t,0,e,{gauge:X,layer:Z,size:B,gaugeBg:C,gaugeOutline:P,transitionOpts:r,onComplete:m});var J=O.selectAll(\"text.title\").data(e);J.exit().remove(),J.enter().append(\"text\").classed(\"title\",!0),J.attr(\"text-anchor\",(function(){return R?x.right:x[I.title.align]})).text(I.title.text).call(f.font,I.title.font).call(p.convertToTspans,t),J.attr(\"transform\",(function(){var t,e=B.l+B.w*b[I.title.align],r=h.titlePadding,n=f.bBox(J.node());if(z){if(D)if(I.gauge.axis.visible)t=f.bBox(W.node()).top-r-n.bottom;else t=B.t+B.h/2-U/2-n.bottom-r;R&&(t=E-(n.top+n.bottom)/2,e=B.l-h.bulletPadding*B.w)}else t=I._numbersTop-r-n.bottom;return l(e,t)}))}))}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../plots/cartesian/axis_defaults\":556,\"../../plots/cartesian/layout_attributes\":569,\"../../plots/cartesian/position_defaults\":572,\"./constants\":858,\"@plotly/d3\":58,\"d3-interpolate\":116}],862:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../mesh3d/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=t(\"../../plot_api/edit_types\").overrideAll;var u=e.exports=c(l({x:{valType:\"data_array\"},y:{valType:\"data_array\"},z:{valType:\"data_array\"},value:{valType:\"data_array\"},isomin:{valType:\"number\"},isomax:{valType:\"number\"},surface:{show:{valType:\"boolean\",dflt:!0},count:{valType:\"integer\",dflt:2,min:1},fill:{valType:\"number\",min:0,max:1,dflt:1},pattern:{valType:\"flaglist\",flags:[\"A\",\"B\",\"C\",\"D\",\"E\"],extras:[\"all\",\"odd\",\"even\"],dflt:\"all\"}},spaceframe:{show:{valType:\"boolean\",dflt:!1},fill:{valType:\"number\",min:0,max:1,dflt:.15}},slices:{x:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}},y:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}},z:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}},y:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}},z:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}}},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:a(),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),valuehoverformat:i(\"value\",1),showlegend:l({},s.showlegend,{dflt:!1})},n(\"\",{colorAttr:\"`value`\",showScaleDflt:!0,editTypeOverride:\"calc\"}),{opacity:o.opacity,lightposition:o.lightposition,lighting:o.lighting,flatshading:o.flatshading,contour:o.contour,hoverinfo:l({},s.hoverinfo)}),\"calc\",\"nested\");u.flatshading.dflt=!0,u.lighting.facenormalsepsilon.dflt=0,u.x.editType=u.y.editType=u.z.editType=u.value.editType=\"calc+clearAxisTypes\",u.transforms=void 0},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/edit_types\":536,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../mesh3d/attributes\":867}],863:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\"),i=t(\"../streamtube/calc\").processGrid,a=t(\"../streamtube/calc\").filter;e.exports=function(t,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length),e._x=a(e.x,e._len),e._y=a(e.y,e._len),e._z=a(e.z,e._len),e._value=a(e.value,e._len);var r=i(e);e._gridFill=r.fill,e._Xs=r.Xs,e._Ys=r.Ys,e._Zs=r.Zs,e._len=r.len;for(var o=1/0,s=-1/0,l=0;l0;r--){var n=Math.min(e[r],e[r-1]),i=Math.max(e[r],e[r-1]);if(i>n&&n-1}function R(t,e){return null===t?e:t}function F(e,r,n){C();var i,a,o,l=[r],c=[n];if(s>=1)l=[r],c=[n];else if(s>0){var u=function(t,e){var r=t[0],n=t[1],i=t[2],a=function(t,e,r){for(var n=[],i=0;i-1?n[p]:L(d,g,v);h[p]=x>-1?x:I(d,g,v,R(e,y))}i=h[0],a=h[1],o=h[2],t._meshI.push(i),t._meshJ.push(a),t._meshK.push(o),++m}}function B(t,e,r,n){var i=t[3];in&&(i=n);for(var a=(t[3]-i)/(t[3]-e[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*t[s]+a*e[s];return o}function N(t,e,r){return t>=e&&t<=r}function j(t){var e=.001*(E-S);return t>=S-e&&t<=E+e}function U(e){for(var r=[],n=0;n<4;n++){var i=e[n];r.push([t._x[i],t._y[i],t._z[i],t._value[i]])}return r}function V(t,e,r,n,i,a){a||(a=1),r=[-1,-1,-1];var o=!1,s=[N(e[0][3],n,i),N(e[1][3],n,i),N(e[2][3],n,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(t,e,r){return j(e[0][3])&&j(e[1][3])&&j(e[2][3])?(F(t,e,r),!0):a<3&&V(t,e,r,S,E,++a)};if(s[0]&&s[1]&&s[2])return l(t,e,r)||o;var c=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach((function(a){if(s[a[0]]&&s[a[1]]&&!s[a[2]]){var u=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(h,u,n,i),d=B(h,f,n,i);o=l(t,[d,p,u],[-1,-1,r[a[0]]])||o,o=l(t,[u,f,d],[r[a[0]],r[a[1]],-1])||o,c=!0}})),c||[[0,1,2],[1,2,0],[2,0,1]].forEach((function(a){if(s[a[0]]&&!s[a[1]]&&!s[a[2]]){var u=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(f,u,n,i),d=B(h,u,n,i);o=l(t,[d,p,u],[-1,-1,r[a[0]]])||o,c=!0}})),o}function H(t,e,r,n){var i=!1,a=U(e),o=[N(a[0][3],r,n),N(a[1][3],r,n),N(a[2][3],r,n),N(a[3][3],r,n)];if(!(o[0]||o[1]||o[2]||o[3]))return i;if(o[0]&&o[1]&&o[2]&&o[3])return g&&(i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(3,0,1),n(2,3,0),n(1,2,3)}(t,a,e)||i),i;var s=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]];if(g)i=F(t,[c,u,f],[e[l[0]],e[l[1]],e[l[2]]])||i;else{var p=B(h,c,r,n),d=B(h,u,r,n),m=B(h,f,r,n);i=F(null,[p,d,m],[-1,-1,-1])||i}s=!0}})),s?i:([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(f,c,r,n),d=B(f,u,r,n),m=B(h,u,r,n),v=B(h,c,r,n);g?(i=F(t,[c,v,p],[e[l[0]],-1,-1])||i,i=F(t,[u,d,m],[e[l[1]],-1,-1])||i):i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(2,3,0)}(null,[p,d,m,v],[-1,-1,-1,-1])||i,s=!0}})),s||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach((function(l){if(o[l[0]]&&!o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(u,c,r,n),d=B(f,c,r,n),m=B(h,c,r,n);g?(i=F(t,[c,p,d],[e[l[0]],-1,-1])||i,i=F(t,[c,d,m],[e[l[0]],-1,-1])||i,i=F(t,[c,m,p],[e[l[0]],-1,-1])||i):i=F(null,[p,d,m],[-1,-1,-1])||i,s=!0}})),i)}function q(t,e,r,n,i,a,o,s,l,c,u){var f=!1;return d&&(D(t,\"A\")&&(f=H(null,[e,r,n,a],c,u)||f),D(t,\"B\")&&(f=H(null,[r,n,i,l],c,u)||f),D(t,\"C\")&&(f=H(null,[r,a,o,l],c,u)||f),D(t,\"D\")&&(f=H(null,[n,a,s,l],c,u)||f),D(t,\"E\")&&(f=H(null,[r,n,a,l],c,u)||f)),g&&(f=H(t,[r,n,a,l],c,u)||f),f}function G(t,e,r,n,i,a,o,s){return[!0===s[0]||V(t,U([e,r,n]),[e,r,n],a,o),!0===s[1]||V(t,U([n,i,e]),[n,i,e],a,o)]}function Y(t,e,r,n,i,a,o,s,l){return s?G(t,e,r,i,n,a,o,l):G(t,r,i,n,e,a,o,l)}function W(t,e,r,n,i,a,o){var s,l,c,u,f=!1,h=function(){f=V(t,[s,l,c],[-1,-1,-1],i,a)||f,f=V(t,[c,u,s],[-1,-1,-1],i,a)||f},p=o[0],d=o[1],g=o[2];return p&&(s=O(U([k(e,r-0,n-0)])[0],U([k(e-1,r-0,n-0)])[0],p),l=O(U([k(e,r-0,n-1)])[0],U([k(e-1,r-0,n-1)])[0],p),c=O(U([k(e,r-1,n-1)])[0],U([k(e-1,r-1,n-1)])[0],p),u=O(U([k(e,r-1,n-0)])[0],U([k(e-1,r-1,n-0)])[0],p),h()),d&&(s=O(U([k(e-0,r,n-0)])[0],U([k(e-0,r-1,n-0)])[0],d),l=O(U([k(e-0,r,n-1)])[0],U([k(e-0,r-1,n-1)])[0],d),c=O(U([k(e-1,r,n-1)])[0],U([k(e-1,r-1,n-1)])[0],d),u=O(U([k(e-1,r,n-0)])[0],U([k(e-1,r-1,n-0)])[0],d),h()),g&&(s=O(U([k(e-0,r-0,n)])[0],U([k(e-0,r-0,n-1)])[0],g),l=O(U([k(e-0,r-1,n)])[0],U([k(e-0,r-1,n-1)])[0],g),c=O(U([k(e-1,r-1,n)])[0],U([k(e-1,r-1,n-1)])[0],g),u=O(U([k(e-1,r-0,n)])[0],U([k(e-1,r-0,n-1)])[0],g),h()),f}function X(t,e,r,n,i,a,o,s,l,c,u,f){var h=t;return f?(d&&\"even\"===t&&(h=null),q(h,e,r,n,i,a,o,s,l,c,u)):(d&&\"odd\"===t&&(h=null),q(h,l,s,o,a,i,n,r,e,c,u))}function Z(t,e,r,n,i){for(var a=[],o=0,s=0;sMath.abs(d-M)?[A,d]:[d,M];$(e,T[0],T[1])}}var L=[[Math.min(S,M),Math.max(S,M)],[Math.min(A,E),Math.max(A,E)]];[\"x\",\"y\",\"z\"].forEach((function(e){for(var r=[],n=0;n0&&(u.push(p.id),\"x\"===e?f.push([p.distRatio,0,0]):\"y\"===e?f.push([0,p.distRatio,0]):f.push([0,0,p.distRatio]))}else c=nt(1,\"x\"===e?b-1:\"y\"===e?_-1:w-1);u.length>0&&(r[i]=\"x\"===e?tt(null,u,a,o,f,r[i]):\"y\"===e?et(null,u,a,o,f,r[i]):rt(null,u,a,o,f,r[i]),i++),c.length>0&&(r[i]=\"x\"===e?Z(null,c,a,o,r[i]):\"y\"===e?J(null,c,a,o,r[i]):K(null,c,a,o,r[i]),i++)}var d=t.caps[e];d.show&&d.fill&&(z(d.fill),r[i]=\"x\"===e?Z(null,[0,b-1],a,o,r[i]):\"y\"===e?J(null,[0,_-1],a,o,r[i]):K(null,[0,w-1],a,o,r[i]),i++)}})),0===m&&P(),t._meshX=n,t._meshY=i,t._meshZ=a,t._meshIntensity=o,t._Xs=v,t._Ys=y,t._Zs=x}(),t}e.exports={findNearestOnAxis:l,generateIsoMeshes:h,createIsosurfaceTrace:function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new c(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}}},{\"../../../stackgl_modules\":1120,\"../../components/colorscale\":378,\"../../lib/gl_format_color\":499,\"../../lib/str2rgbarray\":528,\"../../plots/gl3d/zip3\":609}],865:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"./attributes\"),o=t(\"../../components/colorscale/defaults\");function s(t,e,r,n,a){var s=a(\"isomin\"),l=a(\"isomax\");null!=l&&null!=s&&s>l&&(e.isomin=null,e.isomax=null);var c=a(\"x\"),u=a(\"y\"),f=a(\"z\"),h=a(\"value\");c&&c.length&&u&&u.length&&f&&f.length&&h&&h.length?(i.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\",\"z\"],n),a(\"valuehoverformat\"),[\"x\",\"y\",\"z\"].forEach((function(t){a(t+\"hoverformat\");var e=\"caps.\"+t;a(e+\".show\")&&a(e+\".fill\");var r=\"slices.\"+t;a(r+\".show\")&&(a(r+\".fill\"),a(r+\".locations\"))})),a(\"spaceframe.show\")&&a(\"spaceframe.fill\"),a(\"surface.show\")&&(a(\"surface.count\"),a(\"surface.fill\"),a(\"surface.pattern\")),a(\"contour.show\")&&(a(\"contour.color\"),a(\"contour.width\")),[\"text\",\"hovertext\",\"hovertemplate\",\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lighting.vertexnormalsepsilon\",\"lighting.facenormalsepsilon\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"flatshading\",\"opacity\"].forEach((function(t){a(t)})),o(t,e,n,a,{prefix:\"\",cLetter:\"c\"}),e._length=null):e.visible=!1}e.exports={supplyDefaults:function(t,e,r,i){s(t,e,r,i,(function(r,i){return n.coerce(t,e,a,r,i)}))},supplyIsoDefaults:s}},{\"../../components/colorscale/defaults\":376,\"../../lib\":503,\"../../registry\":638,\"./attributes\":862}],866:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,calc:t(\"./calc\"),colorbar:{min:\"cmin\",max:\"cmax\"},plot:t(\"./convert\").createIsosurfaceTrace,moduleType:\"trace\",name:\"isosurface\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"showLegend\"],meta:{}}},{\"../../plots/gl3d\":598,\"./attributes\":862,\"./calc\":863,\"./convert\":864,\"./defaults\":865}],867:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../surface/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat;e.exports=l({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\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:a({editType:\"calc\"}),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),delaunayaxis:{valType:\"enumerated\",values:[\"x\",\"y\",\"z\"],dflt:\"z\",editType:\"calc\"},alphahull:{valType:\"number\",dflt:-1,editType:\"calc\"},intensity:{valType:\"data_array\",editType:\"calc\"},intensitymode:{valType:\"enumerated\",values:[\"vertex\",\"cell\"],dflt:\"vertex\",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\"}),{opacity:o.opacity,flatshading:{valType:\"boolean\",dflt:!1,editType:\"calc\"},contour:{show:l({},o.contours.x.show,{}),color:o.contours.x.color,width:o.contours.x.width,editType:\"calc\"},lightposition:{x:l({},o.lightposition.x,{dflt:1e5}),y:l({},o.lightposition.y,{dflt:1e5}),z:l({},o.lightposition.z,{dflt:0}),editType:\"calc\"},lighting:l({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\"},o.lighting),hoverinfo:l({},s.hoverinfo,{editType:\"calc\"}),showlegend:l({},s.showlegend,{dflt:!1})})},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../surface/attributes\":1057}],868:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.intensity&&n(t,e,{vals:e.intensity,containerStr:\"\",cLetter:\"c\"})}},{\"../../components/colorscale/calc\":374}],869:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_mesh3d,i=t(\"../../../stackgl_modules\").delaunay_triangulate,a=t(\"../../../stackgl_modules\").alpha_shape,o=t(\"../../../stackgl_modules\").convex_hull,s=t(\"../../lib/gl_format_color\").parseColorScale,l=t(\"../../lib/str2rgbarray\"),c=t(\"../../components/colorscale\").extractOpts,u=t(\"../../plots/gl3d/zip3\");function f(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name=\"\",this.color=\"#fff\",this.data=null,this.showContour=!1}var h=f.prototype;function p(t){for(var e=[],r=t.length,n=0;n=e-.5)return!1;return!0}h.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.data._cellCenter?t.traceCoordinate=t.data.dataCoordinate:t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},h.update=function(t){var e=this.scene,r=e.fullSceneLayout;this.data=t;var n,f=t.x.length,h=u(d(r.xaxis,t.x,e.dataScale[0],t.xcalendar),d(r.yaxis,t.y,e.dataScale[1],t.ycalendar),d(r.zaxis,t.z,e.dataScale[2],t.zcalendar));if(t.i&&t.j&&t.k){if(t.i.length!==t.j.length||t.j.length!==t.k.length||!m(t.i,f)||!m(t.j,f)||!m(t.k,f))return;n=u(g(t.i),g(t.j),g(t.k))}else n=0===t.alphahull?o(h):t.alphahull>0?a(t.alphahull,h):function(t,e){for(var r=[\"x\",\"y\",\"z\"].indexOf(t),n=[],a=e.length,o=0;ov):m=A>w,v=A;var M=c(w,T,k,A);M.pos=_,M.yc=(w+A)/2,M.i=b,M.dir=m?\"increasing\":\"decreasing\",M.x=M.pos,M.y=[k,T],y&&(M.orig_p=r[b]),d&&(M.tx=e.text[b]),g&&(M.htx=e.hovertext[b]),x.push(M)}else x.push({pos:_,empty:!0})}return e._extremes[l._id]=a.findExtremes(l,n.concat(h,f),{padded:!0}),x.length&&(x[0].t={labels:{open:i(t,\"open:\")+\" \",high:i(t,\"high:\")+\" \",low:i(t,\"low:\")+\" \",close:i(t,\"close:\")+\" \"}}),x}e.exports={calc:function(t,e){var r=a.getFromId(t,e.xaxis),i=a.getFromId(t,e.yaxis),s=function(t,e,r){var i=r._minDiff;if(!i){var a,s=t._fullData,l=[];for(i=1/0,a=0;a\"+c.labels[x]+n.hoverLabelText(s,b,l.yhoverformat):((y=i.extendFlat({},h)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=c.labels[x]+n.hoverLabelText(s,b,l.yhoverformat),y.name=\"\",f.push(y),m[b]=y)}return f}function h(t,e,r,i){var a=t.cd,o=t.ya,l=a[0].trace,f=a[0].t,h=u(t,e,r,i);if(!h)return[];var p=a[h.index],d=h.index=p.i,g=p.dir;function m(t){return f.labels[t]+n.hoverLabelText(o,l[t][d],l.yhoverformat)}var v=p.hi||l.hoverinfo,y=v.split(\"+\"),x=\"all\"===v,b=x||-1!==y.indexOf(\"y\"),_=x||-1!==y.indexOf(\"text\"),w=b?[m(\"open\"),m(\"high\"),m(\"low\"),m(\"close\")+\" \"+c[g]]:[];return _&&s(p,l,w),h.extraText=w.join(\"
\"),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?f(t,e,r,n):h(t,e,r,n)},hoverSplit:f,hoverOnPoints:h}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../constants/delta.js\":473,\"../../lib\":503,\"../../plots/cartesian/axes\":554}],876:[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\":568,\"./attributes\":872,\"./calc\":873,\"./defaults\":874,\"./hover\":875,\"./plot\":878,\"./select\":879,\"./style\":880}],877:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o=r(\"x\"),s=r(\"open\"),l=r(\"high\"),c=r(\"low\"),u=r(\"close\");if(r(\"hoverlabel.split\"),n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\"],a),s&&l&&c&&u){var f=Math.min(s.length,l.length,c.length,u.length);return o&&(f=Math.min(f,i.minRowLength(o))),e._length=f,f}}},{\"../../lib\":503,\"../../registry\":638}],878:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o=e.yaxis,s=e.xaxis,l=!!s.rangebreaks;i.makeTraceGroups(a,r,\"trace ohlc\").each((function(t){var e=n.select(this),r=t[0],a=r.t;if(!0!==r.trace.visible||a.empty)e.remove();else{var c=a.tickLen,u=e.selectAll(\"path\").data(i.identity);u.enter().append(\"path\"),u.exit().remove(),u.attr(\"d\",(function(t){if(t.empty)return\"M0,0Z\";var e=s.c2p(t.pos-c,!0),r=s.c2p(t.pos+c,!0),n=l?(e+r)/2:s.c2p(t.pos,!0);return\"M\"+e+\",\"+o.c2p(t.o,!0)+\"H\"+n+\"M\"+n+\",\"+o.c2p(t.h,!0)+\"V\"+o.c2p(t.l,!0)+\"M\"+r+\",\"+o.c2p(t.c,!0)+\"H\"+n}))}}))}},{\"../../lib\":503,\"@plotly/d3\":58}],879:[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=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;e0;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\"),s(\"line.hovertemplate\");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(\"hovertemplate\"),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 m={family:f.font.family,size:Math.round(f.font.size/1.2),color:f.font.color};n.coerceFont(h,\"tickfont\",m)}},{\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503,\"../../plots/array_container_defaults\":549,\"../../plots/domain\":584,\"../parcoords/merge_length\":897,\"./attributes\":881}],885:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcats\",basePlotModule:t(\"./base_plot\"),categories:[\"noOpacity\"],meta:{}}},{\"./attributes\":881,\"./base_plot\":882,\"./calc\":883,\"./defaults\":884,\"./plot\":887}],886:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-interpolate\").interpolateNumber,a=t(\"../../plot_api/plot_api\"),o=t(\"../../components/fx\"),s=t(\"../../lib\"),l=s.strTranslate,c=t(\"../../components/drawing\"),u=t(\"tinycolor2\"),f=t(\"../../lib/svg_text_utils\");function h(t,e,r,i){var a=t.map(F.bind(0,e,r)),o=i.selectAll(\"g.parcatslayer\").data([null]);o.enter().append(\"g\").attr(\"class\",\"parcatslayer\").style(\"pointer-events\",\"all\");var u=o.selectAll(\"g.trace.parcats\").data(a,p),h=u.enter().append(\"g\").attr(\"class\",\"trace parcats\");u.attr(\"transform\",(function(t){return l(t.x,t.y)})),h.append(\"g\").attr(\"class\",\"paths\");var y=u.select(\"g.paths\").selectAll(\"path.path\").data((function(t){return t.paths}),p);y.attr(\"fill\",(function(t){return t.model.color}));var x=y.enter().append(\"path\").attr(\"class\",\"path\").attr(\"stroke-opacity\",0).attr(\"fill\",(function(t){return t.model.color})).attr(\"fill-opacity\",0);_(x),y.attr(\"d\",(function(t){return t.svgD})),x.empty()||y.sort(g),y.exit().remove(),y.on(\"mouseover\",m).on(\"mouseout\",v).on(\"click\",b),h.append(\"g\").attr(\"class\",\"dimensions\");var w=u.select(\"g.dimensions\").selectAll(\"g.dimension\").data((function(t){return t.dimensions}),p);w.enter().append(\"g\").attr(\"class\",\"dimension\"),w.attr(\"transform\",(function(t){return l(t.x,0)})),w.exit().remove();var A=w.selectAll(\"g.category\").data((function(t){return t.categories}),p),M=A.enter().append(\"g\").attr(\"class\",\"category\");A.attr(\"transform\",(function(t){return l(0,t.y)})),M.append(\"rect\").attr(\"class\",\"catrect\").attr(\"pointer-events\",\"none\"),A.select(\"rect.catrect\").attr(\"fill\",\"none\").attr(\"width\",(function(t){return t.width})).attr(\"height\",(function(t){return t.height})),T(M);var S=A.selectAll(\"rect.bandrect\").data((function(t){return t.bands}),p);S.each((function(){s.raiseToTop(this)})),S.attr(\"fill\",(function(t){return t.color}));var E=S.enter().append(\"rect\").attr(\"class\",\"bandrect\").attr(\"stroke-opacity\",0).attr(\"fill\",(function(t){return t.color})).attr(\"fill-opacity\",0);S.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\"})),k(E),S.exit().remove(),M.append(\"text\").attr(\"class\",\"catlabel\").attr(\"pointer-events\",\"none\");var z=e._fullLayout.paper_bgcolor;A.select(\"text.catlabel\").attr(\"text-anchor\",(function(t){return d(t)?\"start\":\"end\"})).attr(\"alignment-baseline\",\"middle\").style(\"text-shadow\",f.makeTextShadow(z)).style(\"fill\",\"rgb(0, 0, 0)\").attr(\"x\",(function(t){return d(t)?t.width+5:-5})).attr(\"y\",(function(t){return t.height/2})).text((function(t){return t.model.categoryLabel})).each((function(t){c.font(n.select(this),t.parcatsViewModel.categorylabelfont),f.convertToTspans(n.select(this),e)})),M.append(\"text\").attr(\"class\",\"dimlabel\"),A.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){c.font(n.select(this),t.parcatsViewModel.labelfont)})),A.selectAll(\"rect.bandrect\").on(\"mouseover\",L).on(\"mouseout\",C),A.exit().remove(),w.call(n.behavior.drag().origin((function(t){return{x:t.x,y:0}})).on(\"dragstart\",P).on(\"drag\",I).on(\"dragend\",O)),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 p(t){return t.key}function d(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function g(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor\"),L=n.mouse(f)[0];o.loneHover({trace:h,x:b-d.left+g.left,y:_-d.top+g.top,text:E,color:t.model.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:10,fontColor:T,idealAlign:L1&&h.displayInd===f.dimensions.length-1?(i=c.left,a=\"left\"):(i=c.left+c.width,a=\"right\");var g=u.model.count,m=u.model.categoryLabel,v=g/u.parcatsViewModel.model.count,y={countLabel:g,categoryLabel:m,probabilityLabel:v.toFixed(3)},x=[];-1!==u.parcatsViewModel.hoverinfoItems.indexOf(\"count\")&&x.push([\"Count:\",y.countLabel].join(\" \")),-1!==u.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")&&x.push([\"P(\"+y.categoryLabel+\"):\",y.probabilityLabel].join(\" \"));var b=x.join(\"
\");return{trace:p,x:o*(i-e.left),y:s*(d-e.top),text:b,color:\"lightgray\",borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:12,fontColor:\"black\",idealAlign:a,hovertemplate:p.hovertemplate,hovertemplateLabels:y,eventData:[{data:p._input,fullData:p,count:g,category:m,probability:v}]}}function L(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,a=i._paperdiv.node().getBoundingClientRect(),l=t.parcatsViewModel.hoveron;if(\"color\"===l?(!function(t){var e=n.select(t).datum(),r=A(e);w(r),r.each((function(){s.raiseToTop(this)})),n.select(t.parentNode).selectAll(\"rect.bandrect\").filter((function(t){return t.color===e.color})).each((function(){s.raiseToTop(this),n.select(this).attr(\"stroke\",\"black\").attr(\"stroke-width\",1.5)}))}(this),S(this,\"plotly_hover\",n.event)):(!function(t){n.select(t.parentNode).selectAll(\"rect.bandrect\").each((function(t){var e=A(t);w(e),e.each((function(){s.raiseToTop(this)}))})),n.select(t.parentNode).select(\"rect.catrect\").attr(\"stroke\",\"black\").attr(\"stroke-width\",2.5)}(this),M(this,\"plotly_hover\",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf(\"none\"))\"category\"===l?e=E(r,a,this):\"color\"===l?e=function(t,e,r){t._fullLayout._calcInverseTransform(t);var i,a,o=t._fullLayout._invScaleX,s=t._fullLayout._invScaleY,l=r.getBoundingClientRect(),c=n.select(r).datum(),f=c.categoryViewModel,h=f.parcatsViewModel,p=h.model.dimensions[f.model.dimensionInd],d=h.trace,g=l.y+l.height/2;h.dimensions.length>1&&p.displayInd===h.dimensions.length-1?(i=l.left,a=\"left\"):(i=l.left+l.width,a=\"right\");var m=f.model.categoryLabel,v=c.parcatsViewModel.model.count,y=0;c.categoryViewModel.bands.forEach((function(t){t.color===c.color&&(y+=t.count)}));var x=f.model.count,b=0;h.pathSelection.each((function(t){t.model.color===c.color&&(b+=t.model.count)}));var _=y/v,w=y/b,T=y/x,k={countLabel:v,categoryLabel:m,probabilityLabel:_.toFixed(3)},A=[];-1!==f.parcatsViewModel.hoverinfoItems.indexOf(\"count\")&&A.push([\"Count:\",k.countLabel].join(\" \")),-1!==f.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")&&(A.push(\"P(color \\u2229 \"+m+\"): \"+k.probabilityLabel),A.push(\"P(\"+m+\" | color): \"+w.toFixed(3)),A.push(\"P(color | \"+m+\"): \"+T.toFixed(3)));var M=A.join(\"
\"),S=u.mostReadable(c.color,[\"black\",\"white\"]);return{trace:d,x:o*(i-e.left),y:s*(g-e.top),text:M,color:c.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontColor:S,fontSize:10,idealAlign:a,hovertemplate:d.hovertemplate,hovertemplateLabels:k,eventData:[{data:d._input,fullData:d,category:m,count:v,probability:_,categorycount:x,colorcount:b,bandcolorcount:y}]}}(r,a,this):\"dimension\"===l&&(e=function(t,e,r){var i=[];return n.select(r.parentNode.parentNode).selectAll(\"g.category\").select(\"rect.catrect\").each((function(){i.push(E(t,e,this))})),i}(r,a,this)),e&&o.loneHover(e,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r})}}function C(t){var e=t.parcatsViewModel;if(!e.dragDimension&&(_(e.pathSelection),T(e.dimensionSelection.selectAll(\"g.category\")),k(e.dimensionSelection.selectAll(\"g.category\").selectAll(\"rect.bandrect\")),o.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(g),-1===e.hoverinfoItems.indexOf(\"skip\"))){\"color\"===t.parcatsViewModel.hoveron?S(this,\"plotly_unhover\",n.event):M(this,\"plotly_unhover\",n.event)}}function P(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,s.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll(\"rect.bandrect\").each((function(e){e.yf.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.dragXp.x&&(a.model.displayInd=p.model.displayInd,p.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=a.model.displayInd}j(t.parcatsViewModel),N(t.parcatsViewModel),R(t.parcatsViewModel),D(t.parcatsViewModel)}}function O(t){if(\"fixed\"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll(\"text\").attr(\"font-weight\",\"normal\");var e={},r=z(t.parcatsViewModel),i=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),o=t.initialDragDimensionDisplayInds.some((function(t,e){return t!==i[e]}));o&&i.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?S(t.potentialClickBand,\"plotly_click\",n.event.sourceEvent):M(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,j(t.parcatsViewModel),N(t.parcatsViewModel),n.transition().duration(300).ease(\"cubic-in-out\").each((function(){R(t.parcatsViewModel,!0),D(t.parcatsViewModel,!0)})).each(\"end\",(function(){(o||s)&&a.restyle(t.parcatsViewModel.graphDiv,e,[r])}))}}function z(t){for(var e,r=t.graphDiv._fullData,n=0;n=0;s--)u+=\"C\"+c[s]+\",\"+(e[s+1]+n)+\" \"+l[s]+\",\"+(e[s]+n)+\" \"+(t[s]+r[s])+\",\"+(e[s]+n),u+=\"l-\"+r[s]+\",0 \";return u+=\"Z\"}function N(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)),ni?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;g0?d*(v.count/p):0;for(var y,x=new Array(n.length),b=0;b1?(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,m=e.categories.map((function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}}));for(m.sort((function(t,e){return t.displayInd-e.displayInd})),c=0;c0?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){h(r,t,n,e)}},{\"../../components/drawing\":388,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plot_api/plot_api\":540,\"@plotly/d3\":58,\"d3-interpolate\":116,tinycolor2:312}],887:[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\":886}],888:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/layout_attributes\"),a=t(\"../../plots/font_attributes\"),o=t(\"../../plots/domain\").attributes,s=t(\"../../lib/extend\").extendFlat,l=t(\"../../plot_api/plot_template\").templatedArray;e.exports={domain:o({name:\"parcoords\",trace:!0,editType:\"plot\"}),labelangle:{valType:\"angle\",dflt:0,editType:\"plot\"},labelside:{valType:\"enumerated\",values:[\"top\",\"bottom\"],dflt:\"top\",editType:\"plot\"},labelfont:a({editType:\"plot\"}),tickfont:a({editType:\"plot\"}),rangefont:a({editType:\"plot\"}),dimensions:l(\"dimension\",{label:{valType:\"string\",editType:\"plot\"},tickvals:s({},i.tickvals,{editType:\"plot\"}),ticktext:s({},i.ticktext,{editType:\"plot\"}),tickformat:s({},i.tickformat,{editType:\"plot\"}),visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},range:{valType:\"info_array\",items:[{valType:\"number\",editType:\"plot\"},{valType:\"number\",editType:\"plot\"}],editType:\"plot\"},constraintrange:{valType:\"info_array\",freeLength:!0,dimensions:\"1-2\",items:[{valType:\"any\",editType:\"plot\"},{valType:\"any\",editType:\"plot\"}],editType:\"plot\"},multiselect:{valType:\"boolean\",dflt:!0,editType:\"plot\"},values:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\"}),line:s({editType:\"calc\"},n(\"line\",{colorscaleDflt:\"Viridis\",autoColorDflt:!1,editTypeOverride:\"calc\"}))}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/plot_template\":543,\"../../plots/cartesian/layout_attributes\":569,\"../../plots/domain\":584,\"../../plots/font_attributes\":585}],889:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"@plotly/d3\"),a=t(\"../../lib/gup\").keyFun,o=t(\"../../lib/gup\").repeat,s=t(\"../../lib\").sorterAsc,l=t(\"../../lib\").strTranslate,c=n.bar.snapRatio;function u(t,e){return t*(1-c)+e*c}var f=n.bar.snapClose;function h(t,e){return t*(1-f)+e*f}function p(t,e,r,n){if(function(t,e){for(var r=0;r=e[r][0]&&t<=e[r][1])return!0;return!1}(r,n))return r;var i=t?-1:1,a=0,o=e.length-1;if(i<0){var s=a;a=o,o=s}for(var l=e[a],c=l,f=a;i*fe){h=r;break}}if(a=u,isNaN(a)&&(a=isNaN(f)||isNaN(h)?isNaN(f)?h:f:e-c[f][1]t[1]+r||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 m=t.unitTickvals,y=t.unitToPaddedPx.invert(e);for(r=0;r=x[0]&&y<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function w(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[r-a.grabPoint,r+a.barLength-a.grabPoint].map(e.unitToPaddedPx.invert):a.newExtent=[a.startExtent,e.unitToPaddedPx.invert(r)].sort(s),e.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(e),b(t.parentNode)}function T(t,e){var r=_(e,e.height-i.mouse(t)[1]-2*n.verticalPadding),a=\"crosshair\";r.clickableOrdinalRange?a=\"pointer\":r.region&&(a=r.region+\"-resize\"),i.select(document.body).style(\"cursor\",a)}function k(t){t.on(\"mousemove\",(function(t){i.event.preventDefault(),t.parent.inBrushDrag||T(this,t)})).on(\"mouseleave\",(function(t){t.parent.inBrushDrag||y()})).call(i.behavior.drag().on(\"dragstart\",(function(t){!function(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.unitToPaddedPx.invert(r),o=e.brush,s=_(e,r),l=s.interval,c=o.svgBrush;if(c.wasDragged=!1,c.grabbingBar=\"ns\"===s.region,c.grabbingBar){var u=l.map(e.unitToPaddedPx);c.grabPoint=r-u[0]-n.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=e.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter((function(t){return t[0]!==l[0]&&t[1]!==l[1]}))),c.startExtent=s.region?l[\"s\"===s.region?1:0]:a,e.parent.inBrushDrag=!0,c.brushStartCallback()}(this,t)})).on(\"drag\",(function(t){w(this,t)})).on(\"dragend\",(function(t){!function(t,e){var r=e.brush,n=r.filter,a=r.svgBrush;a._dragging||(T(t,e),w(t,e),e.brush.svgBrush.wasDragged=!1),a._dragging=!1,i.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,e.parent.inBrushDrag=!1,y(),!a.wasDragged)return a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&e.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&M(r)):M(r),a.brushCallback(e),b(t.parentNode),void a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(e.ordinal){var l=e.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(c?[a.newExtent]:[]),a.extent.length||M(r),a.brushCallback(e),c?b(t.parentNode,s):(s(),b(t.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,t)})))}function A(t,e){return t[0]-e[0]}function M(t){t.filterSpecified=!1,t.svgBrush.extent=[[-1/0,1/0]]}function S(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 1===n.length&&n[0][0]>n[0][1]&&(n=[]),n}e.exports={makeBrush:function(t,e,r,n,i,a){var o,l=function(){var t,e,r=[];return{set:function(n){1===(r=n.map((function(t){return t.slice().sort(s)})).sort(A)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),t=S(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,e){var r=t.selectAll(\".\"+n.cn.axisBrush).data(o,a);r.enter().append(\"g\").classed(n.cn.axisBrush,!0),function(t,e){var r=t.selectAll(\".background\").data(o);r.enter().append(\"rect\").classed(\"background\",!0).call(d).call(g).style(\"pointer-events\",\"auto\").attr(\"transform\",l(0,n.verticalPadding)),r.call(k).attr(\"height\",(function(t){return t.height-n.verticalPadding}));var i=t.selectAll(\".highlight-shadow\").data(o);i.enter().append(\"line\").classed(\"highlight-shadow\",!0).attr(\"x\",-n.bar.width/2).attr(\"stroke-width\",n.bar.width+n.bar.strokeWidth).attr(\"stroke\",e).attr(\"opacity\",n.bar.strokeOpacity).attr(\"stroke-linecap\",\"butt\"),i.attr(\"y1\",(function(t){return t.height})).call(x);var a=t.selectAll(\".highlight\").data(o);a.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\"),a.attr(\"y1\",(function(t){return t.height})).call(x)}(r,e)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map((function(t){return t.sort(s)})),t=e.multiselect?S(t.sort(A)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map((function(t){var e=[p(0,r,t[0],[]),p(1,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\":503,\"../../lib/gup\":500,\"./constants\":892,\"@plotly/d3\":58}],890:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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.style.width,height:this.style.height})})),window.setTimeout((function(){n.selectAll(\"#filterBarPattern\").attr(\"id\",\"filterBarPattern\")}),60)}},{\"../../constants/xmlns_namespaces\":480,\"../../plots/get_data\":593,\"./plot\":899,\"@plotly/d3\":58}],891:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray,i=t(\"../../components/colorscale\"),a=t(\"../../lib/gup\").wrap;e.exports=function(t,e){var r,o;return i.hasColorscale(e,\"line\")&&n(e.line.color)?(r=e.line.color,o=i.extractOpts(e.line).colorscale,i.calc(t,e,{vals:r,containerStr:\"line\",cLetter:\"c\"})):(r=function(t){for(var e=new Array(t),r=0;rf&&(n.log(\"parcoords traces support up to \"+f+\" dimensions at the moment\"),d.splice(f));var g=s(t,e,{name:\"dimensions\",layout:l,handleItemDefaults:p}),m=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,l,u);o(e,l,u),Array.isArray(g)&&g.length||(e.visible=!1),h(e,g,\"values\",m);var v={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(u,\"labelfont\",v),n.coerceFont(u,\"tickfont\",v),n.coerceFont(u,\"rangefont\",v),u(\"labelangle\"),u(\"labelside\")}},{\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503,\"../../plots/array_container_defaults\":549,\"../../plots/cartesian/axes\":554,\"../../plots/domain\":584,\"./attributes\":888,\"./axisbrush\":889,\"./constants\":892,\"./merge_length\":897}],894:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isTypedArray;r.convertTypedArray=function(t){return n(t)?Array.prototype.slice.call(t):t},r.isOrdinal=function(t){return!!t.tickvals},r.isVisible=function(t){return t.visible||!(\"visible\"in t)}},{\"../../lib\":503}],895:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcoords\",basePlotModule:t(\"./base_plot\"),categories:[\"gl\",\"regl\",\"noOpacity\",\"noHover\"],meta:{}}},{\"./attributes\":888,\"./base_plot\":890,\"./calc\":891,\"./defaults\":893,\"./plot\":899}],896:[function(t,e,r){\"use strict\";var n=t(\"glslify\"),i=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nattribute vec4 p01_04, p05_08, p09_12, p13_16,\\n p17_20, p21_24, p25_28, p29_32,\\n p33_36, p37_40, p41_44, p45_48,\\n p49_52, p53_56, p57_60, colors;\\n\\nuniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,\\n loA, hiA, loB, hiB, loC, hiC, loD, hiD;\\n\\nuniform vec2 resolution, viewBoxPos, viewBoxSize;\\nuniform float maskHeight;\\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\\nuniform vec4 contextColor;\\nuniform sampler2D maskTexture, palette;\\n\\nbool isPick = (drwLayer > 1.5);\\nbool isContext = (drwLayer < 0.5);\\n\\nconst vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);\\nconst vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);\\n\\nfloat val(mat4 p, mat4 v) {\\n return dot(matrixCompMult(p, v) * UNITS, UNITS);\\n}\\n\\nfloat axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {\\n float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);\\n float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);\\n return y1 * (1.0 - ratio) + y2 * ratio;\\n}\\n\\nint iMod(int a, int b) {\\n return a - b * (a / b);\\n}\\n\\nbool fOutside(float p, float lo, float hi) {\\n return (lo < hi) && (lo > p || p > hi);\\n}\\n\\nbool vOutside(vec4 p, vec4 lo, vec4 hi) {\\n return (\\n fOutside(p[0], lo[0], hi[0]) ||\\n fOutside(p[1], lo[1], hi[1]) ||\\n fOutside(p[2], lo[2], hi[2]) ||\\n fOutside(p[3], lo[3], hi[3])\\n );\\n}\\n\\nbool mOutside(mat4 p, mat4 lo, mat4 hi) {\\n return (\\n vOutside(p[0], lo[0], hi[0]) ||\\n vOutside(p[1], lo[1], hi[1]) ||\\n vOutside(p[2], lo[2], hi[2]) ||\\n vOutside(p[3], lo[3], hi[3])\\n );\\n}\\n\\nbool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {\\n return mOutside(A, loA, hiA) ||\\n mOutside(B, loB, hiB) ||\\n mOutside(C, loC, hiC) ||\\n mOutside(D, loD, hiD);\\n}\\n\\nbool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {\\n mat4 pnts[4];\\n pnts[0] = A;\\n pnts[1] = B;\\n pnts[2] = C;\\n pnts[3] = D;\\n\\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 if(0 == iMod(\\n int(255.0 * texture2D(maskTexture,\\n vec2(\\n (float(i * 2 + j / 2) + 0.5) / 8.0,\\n (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight\\n ))[3]\\n ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),\\n 2\\n )) return true;\\n }\\n }\\n }\\n return false;\\n}\\n\\nvec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {\\n float x = 0.5 * sign(v) + 0.5;\\n float y = axisY(x, A, B, C, D);\\n float z = 1.0 - abs(v);\\n\\n z += isContext ? 0.0 : 2.0 * float(\\n outsideBoundingBox(A, B, C, D) ||\\n outsideRasterMask(A, B, C, D)\\n );\\n\\n return vec4(\\n 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,\\n z,\\n 1.0\\n );\\n}\\n\\nvoid main() {\\n mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);\\n mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);\\n mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);\\n mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);\\n\\n float v = colors[3];\\n\\n gl_Position = position(isContext, v, A, B, C, D);\\n\\n fragColor =\\n isContext ? vec4(contextColor) :\\n isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));\\n}\\n\"]),a=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n gl_FragColor = fragColor;\\n}\\n\"]),o=t(\"./constants\").maxDimensionCount,s=t(\"../../lib\"),l=new Uint8Array(4),c=new Uint8Array(4),u={shape:[256,1],format:\"rgba\",type:\"uint8\",mag:\"nearest\",min:\"nearest\"};function f(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 h(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:l})}(t),r.drawCompleted=!0),function s(l){var c=Math.min(n,i-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],f(t,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),r.clearOnly||(a.count=2*c,a.offset=2*l*n,e(a),l*n+c>>8*e)%256/255}function g(t,e,r){for(var n=new Array(8*e),i=0,a=0;au&&(u=t[i].dim1.canvasX,o=i);0===s&&f(T,0,0,r.canvasWidth,r.canvasHeight);var p=function(t){var e,r,n,i=[[],[]];for(n=0;n<64;n++){var a=!t&&no._length&&(S=S.slice(0,o._length));var L,C=o.tickvals;function P(t,e){return{val:t,text:L[e]}}function I(t,e){return t.val-e.val}if(Array.isArray(C)&&C.length){L=o.ticktext,Array.isArray(L)&&L.length?L.length>C.length?L=L.slice(0,C.length):C.length>L.length&&(C=C.slice(0,L.length)):L=C.map(a(o.tickformat));for(var O=1;O=r||l>=i)return;var c=t.lineLayer.readPixel(s,i-1-l),u=0!==c[3],f=u?c[2]+256*(c[1]+256*c[0]):null,h={x:s,y:l,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:f};f!==B&&(u?a.hover(h):a.unhover&&a.unhover(h),B=f)}})),F.style(\"opacity\",(function(t){return t.pick?0:1})),h.style(\"background\",\"rgba(255, 255, 255, 0)\");var N=h.selectAll(\".\"+y.cn.parcoords).data(R,d);N.exit().remove(),N.enter().append(\"g\").classed(y.cn.parcoords,!0).style(\"shape-rendering\",\"crispEdges\").style(\"pointer-events\",\"none\"),N.attr(\"transform\",(function(t){return c(t.model.translateX,t.model.translateY)}));var j=N.selectAll(\".\"+y.cn.parcoordsControlView).data(g,d);j.enter().append(\"g\").classed(y.cn.parcoordsControlView,!0),j.attr(\"transform\",(function(t){return c(t.model.pad.l,t.model.pad.t)}));var U=j.selectAll(\".\"+y.cn.yAxis).data((function(t){return t.dimensions}),d);U.enter().append(\"g\").classed(y.cn.yAxis,!0),j.each((function(t){O(U,t,_)})),F.each((function(t){if(t.viewModel){!t.lineLayer||a?t.lineLayer=b(this,t):t.lineLayer.update(t),(t.key||0===t.key)&&(t.viewModel[t.key]=t.lineLayer);var e=!t.context||a;t.lineLayer.render(t.viewModel.panels,e)}})),U.attr(\"transform\",(function(t){return c(t.xScale(t.xIndex),0)})),U.call(n.behavior.drag().origin((function(t){return t})).on(\"drag\",(function(t){var e=t.parent;S.linePickActive(!1),t.x=Math.max(-y.overdrag,Math.min(t.model.width+y.overdrag,n.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,U.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})),O(U,e,_),U.filter((function(e){return 0!==Math.abs(t.xIndex-e.xIndex)})).attr(\"transform\",(function(t){return c(t.xScale(t.xIndex),0)})),n.select(this).attr(\"transform\",c(t.x,0)),U.each((function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!E(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,O(U,e,_),n.select(this).attr(\"transform\",(function(t){return c(t.x,0)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!E(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),S.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(e.key,e.dimensions.map((function(t){return t.crossfilterDimensionIndex})))}))),U.exit().remove();var V=U.selectAll(\".\"+y.cn.axisOverlays).data(g,d);V.enter().append(\"g\").classed(y.cn.axisOverlays,!0),V.selectAll(\".\"+y.cn.axis).remove();var H=V.selectAll(\".\"+y.cn.axis).data(g,d);H.enter().append(\"g\").classed(y.cn.axis,!0),H.each((function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,i=r.domain();n.select(this).call(n.svg.axis().orient(\"left\").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?i:null).tickFormat((function(e){return v.isOrdinal(t)?e:z(t.model.dimensions[t.visibleIndex],e)})).scale(r)),f.font(H.selectAll(\"text\"),t.model.tickFont)})),H.selectAll(\".domain, .tick>line\").attr(\"fill\",\"none\").attr(\"stroke\",\"black\").attr(\"stroke-opacity\",.25).attr(\"stroke-width\",\"1px\"),H.selectAll(\"text\").style(\"text-shadow\",u.makeTextShadow(T)).style(\"cursor\",\"default\");var q=V.selectAll(\".\"+y.cn.axisHeading).data(g,d);q.enter().append(\"g\").classed(y.cn.axisHeading,!0);var G=q.selectAll(\".\"+y.cn.axisTitle).data(g,d);G.enter().append(\"text\").classed(y.cn.axisTitle,!0).attr(\"text-anchor\",\"middle\").style(\"cursor\",\"ew-resize\").style(\"pointer-events\",\"auto\"),G.text((function(t){return t.label})).each((function(e){var r=n.select(this);f.font(r,e.model.labelFont),u.convertToTspans(r,t)})).attr(\"transform\",(function(t){var e=I(t.model.labelAngle,t.model.labelSide),r=y.axisTitleOffset;return(e.dir>0?\"\":c(0,2*r+t.model.height))+l(e.degrees)+c(-r*e.dx,-r*e.dy)})).attr(\"text-anchor\",(function(t){var e=I(t.model.labelAngle,t.model.labelSide);return 2*Math.abs(e.dx)>Math.abs(e.dy)?e.dir*e.dx<0?\"start\":\"end\":\"middle\"}));var Y=V.selectAll(\".\"+y.cn.axisExtent).data(g,d);Y.enter().append(\"g\").classed(y.cn.axisExtent,!0);var W=Y.selectAll(\".\"+y.cn.axisExtentTop).data(g,d);W.enter().append(\"g\").classed(y.cn.axisExtentTop,!0),W.attr(\"transform\",c(0,-y.axisExtentOffset));var X=W.selectAll(\".\"+y.cn.axisExtentTopText).data(g,d);X.enter().append(\"text\").classed(y.cn.axisExtentTopText,!0).call(P),X.text((function(t){return D(t,!0)})).each((function(t){f.font(n.select(this),t.model.rangeFont)}));var Z=Y.selectAll(\".\"+y.cn.axisExtentBottom).data(g,d);Z.enter().append(\"g\").classed(y.cn.axisExtentBottom,!0),Z.attr(\"transform\",(function(t){return c(0,t.model.height+y.axisExtentOffset)}));var J=Z.selectAll(\".\"+y.cn.axisExtentBottomText).data(g,d);J.enter().append(\"text\").classed(y.cn.axisExtentBottomText,!0).attr(\"dy\",\"0.75em\").call(P),J.text((function(t){return D(t,!1)})).each((function(t){f.font(n.select(this),t.model.rangeFont)})),x.ensureAxisBrush(V,T)}},{\"../../components/colorscale\":378,\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/gup\":500,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"./axisbrush\":889,\"./constants\":892,\"./helpers\":894,\"./lines\":896,\"@plotly/d3\":58,\"color-rgba\":91}],899:[function(t,e,r){\"use strict\";var n=t(\"./parcoords\"),i=t(\"../../lib/prepare_regl\"),a=t(\"./helpers\").isVisible;function o(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return-1===i&&(i+=e.length),i}e.exports=function(t,e){var r=t._fullLayout;if(i(t)){var s={},l={},c={},u={},f=r._size;e.forEach((function(e,r){var n=e[0].trace;c[r]=n.index;var i=u[r]=n._fullInput.index;s[r]=t.data[i].dimensions,l[r]=t.data[i].dimensions.slice()}));n(t,e,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{filterChanged:function(e,n,i){var a=l[e][n],o=i.map((function(t){return t.slice()})),s=\"dimensions[\"+n+\"].constraintrange\",f=r._tracePreGUI[t._fullData[c[e]]._fullInput.uid];if(void 0===f[s]){var h=a.constraintrange;f[s]=h||null}var p=t._fullData[c[e]].dimensions[n];o.length?(1===o.length&&(o=o[0]),a.constraintrange=o,p.constraintrange=o.slice(),o=[o]):(delete a.constraintrange,delete p.constraintrange,o=null);var d={};d[s]=o,t.emit(\"plotly_restyle\",[d,[u[e]]])},hover:function(e){t.emit(\"plotly_hover\",e)},unhover:function(e){t.emit(\"plotly_unhover\",e)},axesMoved:function(e,r){var n=function(t,e){return function(r,n){return o(t,e,r)-o(t,e,n)}}(r,l[e].filter(a));s[e].sort(n),l[e].filter((function(t){return!a(t)})).sort((function(t){return l[e].indexOf(t)})).forEach((function(t){s[e].splice(s[e].indexOf(t),1),s[e].splice(l[e].indexOf(t),0,t)})),t.emit(\"plotly_restyle\",[{dimensions:[s[e]]},[u[e]]])}})}}},{\"../../lib/prepare_regl\":516,\"./helpers\":894,\"./parcoords\":898}],900:[function(t,e,r){\"use strict\";var n=t(\"../../plots/attributes\"),i=t(\"../../plots/domain\").attributes,a=t(\"../../plots/font_attributes\"),o=t(\"../../components/color/attributes\"),s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../plots/template_attributes\").texttemplateAttrs,c=t(\"../../lib/extend\").extendFlat,u=a({editType:\"plot\",arrayOk:!0,colorEditType:\"plot\"});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:o.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:\"plot\"},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:c({},n.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:s({},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),texttemplate:l({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),textposition:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"auto\",\"none\"],dflt:\"auto\",arrayOk:!0,editType:\"plot\"},textfont:c({},u,{}),insidetextorientation:{valType:\"enumerated\",values:[\"horizontal\",\"radial\",\"tangential\",\"auto\"],dflt:\"auto\",editType:\"plot\"},insidetextfont:c({},u,{}),outsidetextfont:c({},u,{}),automargin:{valType:\"boolean\",dflt:!1,editType:\"plot\"},title:{text:{valType:\"string\",dflt:\"\",editType:\"plot\"},font:c({},u,{}),position:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle center\",\"bottom left\",\"bottom center\",\"bottom right\"],editType:\"plot\"},editType:\"plot\"},domain:i({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\"},_deprecated:{title:{valType:\"string\",dflt:\"\",editType:\"calc\"},titlefont:c({},u,{}),titleposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle center\",\"bottom left\",\"bottom center\",\"bottom right\"],editType:\"calc\"}}}},{\"../../components/color/attributes\":365,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/domain\":584,\"../../plots/font_attributes\":585,\"../../plots/template_attributes\":633}],901:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"pie\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":619}],902:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"tinycolor2\"),a=t(\"../../components/color\"),o={};function s(t){return function(e,r){return!!e&&(!!(e=i(e)).isValid()&&(e=a.addOpacity(e,e.getAlpha()),t[r]||(t[r]=e),e))}}function l(t,e){var r,n=JSON.stringify(t),a=e[n];if(!a){for(a=t.slice(),r=0;r=0})),(\"funnelarea\"===e.type?v:e.sort)&&a.sort((function(t,e){return e.v-t.v})),a[0]&&(a[0].vTotal=m),a},crossTraceCalc:function(t,e){var r=(e||{}).type;r||(r=\"pie\");var n=t._fullLayout,i=t.calcdata,a=n[r+\"colorway\"],s=n[\"_\"+r+\"colormap\"];n[\"extend\"+r+\"colors\"]&&(a=l(a,o));for(var c=0,u=0;u0){s=!0;break}}s||(o=0)}return{hasLabels:r,hasValues:a,len:o}}e.exports={handleLabelsAndValues:l,supplyDefaults:function(t,e,r,n){function c(r,n){return i.coerce(t,e,a,r,n)}var u=l(c(\"labels\"),c(\"values\")),f=u.len;if(e._hasLabels=u.hasLabels,e._hasValues=u.hasValues,!e._hasLabels&&e._hasValues&&(c(\"label0\"),c(\"dlabel\")),f){e._length=f,c(\"marker.line.width\")&&c(\"marker.line.color\"),c(\"marker.colors\"),c(\"scalegroup\");var h,p=c(\"text\"),d=c(\"texttemplate\");if(d||(h=c(\"textinfo\",Array.isArray(p)?\"text+percent\":\"percent\")),c(\"hovertext\"),c(\"hovertemplate\"),d||h&&\"none\"!==h){var g=c(\"textposition\");s(t,e,n,c,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||\"auto\"===g||\"outside\"===g)&&c(\"automargin\"),(\"inside\"===g||\"auto\"===g||Array.isArray(g))&&c(\"insidetextorientation\")}o(e,n,c);var m=c(\"hole\");if(c(\"title.text\")){var v=c(\"title.position\",m?\"middle center\":\"top center\");m||\"middle center\"!==v||(e.title.position=\"top center\"),i.coerceFont(c,\"title.font\",n.font)}c(\"sort\"),c(\"direction\"),c(\"rotation\"),c(\"pull\")}else e.visible=!1}}},{\"../../lib\":503,\"../../plots/domain\":584,\"../bar/defaults\":652,\"./attributes\":900,\"fast-isnumeric\":190}],904:[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,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return 1===t.pts.length&&(r.pointNumber=r.i=t.pts[0]),n(r,e,t.pts),\"funnelarea\"===e.type&&(delete r.v,delete r.i),r}},{\"../../components/fx/helpers\":402}],905:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");function i(t){return-1!==t.indexOf(\"e\")?t.replace(/[.]?0+e/,\"e\"):-1!==t.indexOf(\".\")?t.replace(/[.]?0+$/,\"\"):t}r.formatPiePercent=function(t,e){var r=i((100*t).toPrecision(3));return n.numSeparate(r,e)+\"%\"},r.formatPieValue=function(t,e){var r=i(t.toPrecision(10));return n.numSeparate(r,e)},r.getFirstFilled=function(t,e){if(Array.isArray(t))for(var r=0;r\"),name:f.hovertemplate||-1!==h.indexOf(\"name\")?f.name:void 0,idealAlign:t.pxmid[0]<0?\"left\":\"right\",color:m.castOption(_.bgcolor,t.pts)||t.color,borderColor:m.castOption(_.bordercolor,t.pts),fontFamily:m.castOption(w.family,t.pts),fontSize:m.castOption(w.size,t.pts),fontColor:m.castOption(w.color,t.pts),nameLength:m.castOption(_.namelength,t.pts),textAlign:m.castOption(_.align,t.pts),hovertemplate:m.castOption(f.hovertemplate,t.pts),hovertemplateLabels:t,eventData:[v(t,f)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e,inOut_bbox:T}),t.bbox=T[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,e.emit(\"plotly_hover\",{points:[v(t,f)],event:n.event})}})),t.on(\"mouseout\",(function(t){var r=e._fullLayout,i=e._fullData[c.index],o=n.select(this).datum();c._hasHoverEvent&&(t.originalEvent=n.event,e.emit(\"plotly_unhover\",{points:[v(o,i)],event:n.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(a.loneUnhover(r._hoverlayer.node()),c._hasHoverLabel=!1)})),t.on(\"click\",(function(t){var r=e._fullLayout,i=e._fullData[c.index];e._dragging||!1===r.hovermode||(e._hoverdata=[v(t,i)],a.click(e,n.event))}))}function b(t,e,r){var n=m.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=m.castOption(t._input.textfont.color,e.pts));var i=m.castOption(t.insidetextfont.family,e.pts)||m.castOption(t.textfont.family,e.pts)||r.family,a=m.castOption(t.insidetextfont.size,e.pts)||m.castOption(t.textfont.size,e.pts)||r.size;return{color:n||o.contrast(e.color),family:i,size:a}}function _(t,e){for(var r,n,i=0;ie&&e>n||r=-4;m-=2)v(Math.PI*m,\"tan\");for(m=4;m>=-4;m-=2)v(Math.PI*(m+1),\"tan\")}if(f||p){for(m=4;m>=-4;m-=2)v(Math.PI*(m+1.5),\"rad\");for(m=4;m>=-4;m-=2)v(Math.PI*(m+.5),\"rad\")}}if(s||d||f){var y=Math.sqrt(t.width*t.width+t.height*t.height);if((a={scale:i*n*2/y,rCenter:1-i,rotate:0}).textPosAngle=(e.startangle+e.stopangle)/2,a.scale>=1)return a;g.push(a)}(d||p)&&((a=T(t,n,o,l,c)).textPosAngle=(e.startangle+e.stopangle)/2,g.push(a)),(d||h)&&((a=k(t,n,o,l,c)).textPosAngle=(e.startangle+e.stopangle)/2,g.push(a));for(var x=0,b=0,_=0;_=1)break}return g[x]}function T(t,e,r,n,i){e=Math.max(0,e-2*g);var a=t.width/t.height,o=S(a,n,e,r);return{scale:2*o/t.height,rCenter:A(a,o/e),rotate:M(i)}}function k(t,e,r,n,i){e=Math.max(0,e-2*g);var a=t.height/t.width,o=S(a,n,e,r);return{scale:2*o/t.width,rCenter:A(a,o/e),rotate:M(i+Math.PI/2)}}function A(t,e){return Math.cos(e)-t*e}function M(t){return(180/Math.PI*t+720)%180-90}function S(t,e,r,n){var i=t+1/(2*Math.tan(e));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(t*t+n/2)+t))}function E(t,e){return t.v!==e.vTotal||e.trace.hole?Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2):1}function L(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 C(t,e){var r,n,i,a=t.trace,o={x:t.cx,y:t.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=I(a),-1!==a.title.position.indexOf(\"top\")?(o.y-=(1+i)*t.r,s.ty-=t.titleBox.height):-1!==a.title.position.indexOf(\"bottom\")&&(o.y+=(1+i)*t.r);var l,c,u=(l=t.r,c=t.trace.aspectratio,l/(void 0===c?1:c)),f=e.w*(a.domain.x[1]-a.domain.x[0])/2;return-1!==a.title.position.indexOf(\"left\")?(f+=u,o.x-=(1+i)*u,s.tx+=t.titleBox.width/2):-1!==a.title.position.indexOf(\"center\")?f*=2:-1!==a.title.position.indexOf(\"right\")&&(f+=u,o.x+=(1+i)*u,s.tx-=t.titleBox.width/2),r=f/t.titleBox.width,n=P(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}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 I(t){var e,r=t.pull;if(!r)return 0;if(Array.isArray(r))for(r=0,e=0;er&&(r=t.pull[e]);return r}function O(t,e){for(var r=[],n=0;n1?(c=r.r,u=c/i.aspectratio):(u=r.r,c=u*i.aspectratio),c*=(1+i.baseratio)/2,l=c*u}o=Math.min(o,l/r.vTotal)}for(n=0;n\")}if(a){var x=l.castOption(i,e.i,\"texttemplate\");if(x){var b=function(t){return{label:t.label,value:t.v,valueLabel:m.formatPieValue(t.v,n.separators),percent:t.v/r.vTotal,percentLabel:m.formatPiePercent(t.v/r.vTotal,n.separators),color:t.color,text:t.text,customdata:l.castOption(i,t.i,\"customdata\")}}(e),_=m.getFirstFilled(i.text,e.pts);(y(_)||\"\"===_)&&(b.text=_),e.text=l.texttemplateString(x,b,t._fullLayout._d3locale,b,i._meta||{})}else e.text=\"\"}}function R(t,e){var r=t.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(e.left+e.right)/2,o=(e.top+e.bottom)/2;t.textX=a*n-o*i,t.textY=a*i+o*n,t.noCenter=!0}e.exports={plot:function(t,e){var r=t._fullLayout,a=r._size;d(\"pie\",r),_(e,t),O(e,a);var h=l.makeTraceGroups(r._pielayer,e,\"trace\").each((function(e){var h=n.select(this),d=e[0],g=d.trace;!function(t){var e,r,n,i=t[0],a=i.r,o=i.trace,s=m.getRotationAngle(o.rotation),l=2*Math.PI/i.vTotal,c=\"px0\",u=\"px1\";if(\"counterclockwise\"===o.direction){for(e=0;ei.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-o.hole,r.rInscribed=E(r,i))}(e),h.attr(\"stroke-linejoin\",\"round\"),h.each((function(){var v=n.select(this).selectAll(\"g.slice\").data(e);v.enter().append(\"g\").classed(\"slice\",!0),v.exit().remove();var y=[[[],[]],[[],[]]],_=!1;v.each((function(i,a){if(i.hidden)n.select(this).selectAll(\"path,g\").remove();else{i.pointNumber=i.i,i.curveNumber=g.index,y[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var o=d.cx,c=d.cy,u=n.select(this),h=u.selectAll(\"path.surface\").data([i]);if(h.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":\"all\"}),u.call(x,t,e),g.pull){var v=+m.castOption(g.pull,i.pts)||0;v>0&&(o+=v*i.pxmid[0],c+=v*i.pxmid[1])}i.cxFinal=o,i.cyFinal=c;var T=g.hole;if(i.v===d.vTotal){var k=\"M\"+(o+i.px0[0])+\",\"+(c+i.px0[1])+C(i.px0,i.pxmid,!0,1)+C(i.pxmid,i.px0,!0,1)+\"Z\";T?h.attr(\"d\",\"M\"+(o+T*i.px0[0])+\",\"+(c+T*i.px0[1])+C(i.px0,i.pxmid,!1,T)+C(i.pxmid,i.px0,!1,T)+\"Z\"+k):h.attr(\"d\",k)}else{var A=C(i.px0,i.px1,!0,1);if(T){var M=1-T;h.attr(\"d\",\"M\"+(o+T*i.px1[0])+\",\"+(c+T*i.px1[1])+C(i.px1,i.px0,!1,T)+\"l\"+M*i.px0[0]+\",\"+M*i.px0[1]+A+\"Z\")}else h.attr(\"d\",\"M\"+o+\",\"+c+\"l\"+i.px0[0]+\",\"+i.px0[1]+A+\"Z\")}D(t,i,d);var S=m.castOption(g.textposition,i.pts),E=u.selectAll(\"g.slicetext\").data(i.text&&\"none\"!==S?[0]:[]);E.enter().append(\"g\").classed(\"slicetext\",!0),E.exit().remove(),E.each((function(){var u=l.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),h=l.ensureUniformFontSize(t,\"outside\"===S?function(t,e,r){var n=m.castOption(t.outsidetextfont.color,e.pts)||m.castOption(t.textfont.color,e.pts)||r.color,i=m.castOption(t.outsidetextfont.family,e.pts)||m.castOption(t.textfont.family,e.pts)||r.family,a=m.castOption(t.outsidetextfont.size,e.pts)||m.castOption(t.textfont.size,e.pts)||r.size;return{color:n,family:i,size:a}}(g,i,r.font):b(g,i,r.font));u.text(i.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(s.font,h).call(f.convertToTspans,t);var v,y=s.bBox(u.node());if(\"outside\"===S)v=L(y,i);else if(v=w(y,i,d),\"auto\"===S&&v.scale<1){var x=l.ensureUniformFontSize(t,g.outsidetextfont);u.call(s.font,x),v=L(y=s.bBox(u.node()),i)}var T=v.textPosAngle,k=void 0===T?i.pxmid:z(d.r,T);if(v.targetX=o+k[0]*v.rCenter+(v.x||0),v.targetY=c+k[1]*v.rCenter+(v.y||0),R(v,y),v.outside){var A=v.targetY;i.yLabelMin=A-y.height/2,i.yLabelMid=A,i.yLabelMax=A+y.height/2,i.labelExtraX=0,i.labelExtraY=0,_=!0}v.fontSize=h.size,p(g.type,v,r),e[a].transform=v,u.attr(\"transform\",l.getTextTransform(v))}))}function C(t,e,r,n){var a=n*(e[0]-t[0]),o=n*(e[1]-t[1]);return\"a\"+n*d.r+\",\"+n*d.r+\" 0 \"+i.largeArc+(r?\" 1 \":\" 0 \")+a+\",\"+o}}));var T=n.select(this).selectAll(\"g.titletext\").data(g.title.text?[0]:[]);if(T.enter().append(\"g\").classed(\"titletext\",!0),T.exit().remove(),T.each((function(){var e,r=l.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),i=g.title.text;g._meta&&(i=l.templateString(i,g._meta)),r.text(i).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(s.font,g.title.font).call(f.convertToTspans,t),e=\"middle center\"===g.title.position?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.title.font.size}}(d):C(d,a),r.attr(\"transform\",u(e.x,e.y)+c(Math.min(1,e.scale))+u(e.tx,e.ty))})),_&&function(t,e){var r,n,i,a,o,s,l,c,u,f,h,p,d;function g(t,e){return t.pxmid[1]-e.pxmid[1]}function v(t,e){return e.pxmid[1]-t.pxmid[1]}function y(t,r){r||(r={});var i,c,u,h,p=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),d=n?t.yLabelMin:t.yLabelMax,g=n?t.yLabelMax:t.yLabelMin,v=t.cyFinal+o(t.px0[1],t.px1[1]),y=p-d;if(y*l>0&&(t.labelExtraY=y),Array.isArray(e.pull))for(c=0;c=(m.castOption(e.pull,u.pts)||0)||((t.pxmid[1]-u.pxmid[1])*l>0?(y=u.cyFinal+o(u.px0[1],u.px1[1])-d-t.labelExtraY)*l>0&&(t.labelExtraY+=y):(g+t.labelExtraY-v)*l>0&&(i=3*s*Math.abs(c-f.indexOf(t)),(h=u.cxFinal+a(u.px0[0],u.px1[0])+i-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=h)))}for(n=0;n<2;n++)for(i=n?g:v,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,(c=t[n][r]).sort(i),u=t[1-n][r],f=u.concat(c),p=[],h=0;hMath.abs(f)?s+=\"l\"+f*t.pxmid[0]/t.pxmid[1]+\",\"+f+\"H\"+(a+t.labelExtraX+c):s+=\"l\"+t.labelExtraX+\",\"+u+\"v\"+(f-u)+\"h\"+c}else s+=\"V\"+(t.yLabelMid+t.labelExtraY)+\"h\"+c;l.ensureSingle(r,\"path\",\"textline\").call(o.stroke,e.outsidetextfont.color).attr({\"stroke-width\":Math.min(2,e.outsidetextfont.size/8),d:s,fill:\"none\"})}else r.select(\"path.textline\").remove()}))}(v,g),_&&g.automargin){var k=s.bBox(h.node()),A=g.domain,M=a.w*(A.x[1]-A.x[0]),S=a.h*(A.y[1]-A.y[0]),E=(.5*M-d.r)/a.w,P=(.5*S-d.r)/a.h;i.autoMargin(t,\"pie.\"+g.uid+\".automargin\",{xl:A.x[0]-E,xr:A.x[1]+E,yb:A.y[0]-P,yt:A.y[1]+P,l:Math.max(d.cx-d.r-k.left,0),r:Math.max(k.right-(d.cx+d.r),0),b:Math.max(k.bottom-(d.cy+d.r),0),t:Math.max(d.cy-d.r-k.top,0),pad:5})}}))}));setTimeout((function(){h.selectAll(\"tspan\").each((function(){var t=n.select(this);t.attr(\"dy\")&&t.attr(\"dy\",t.attr(\"dy\"))}))}),0)},formatSliceLabel:D,transformInsideText:w,determineInsideTextFont:b,positionTitleOutside:C,prerenderTitles:_,layoutAreas:O,attachFxHandlers:x,computeTransform:R}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/plots\":619,\"../bar/constants\":650,\"../bar/uniform_text\":664,\"./event_data\":904,\"./helpers\":905,\"@plotly/d3\":58}],910:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"./style_one\"),a=t(\"../bar/uniform_text\").resizeText;e.exports=function(t){var e=t._fullLayout._pielayer.selectAll(\".trace\");a(t,e,\"pie\"),e.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)}))}))}},{\"../bar/uniform_text\":664,\"./style_one\":911,\"@plotly/d3\":58}],911:[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\":366,\"./helpers\":905}],912:[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\":926}],913:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").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;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);if(p)r=p;else for(r=new Int32Array(e),l=0;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var g=i(t.marker.color),m=i(t.marker.border.color),v=t.opacity*t.marker.opacity;g[3]*=v,this.pointcloudOptions.color=g;var y=t.marker.blend;if(null===y){y=c.length<100||u.length<100}this.pointcloudOptions.blend=y,m[3]*=v,this.pointcloudOptions.borderColor=m;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,T=b/2||.5;t._extremes[_._id]=a(_,[d[0],d[2]],{ppad:T}),t._extremes[w._id]=a(w,[d[1],d[3]],{ppad:T})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},{\"../../../stackgl_modules\":1120,\"../../lib/str2rgbarray\":528,\"../../plots/cartesian/autorange\":553,\"../scatter/get_trace_color\":936}],914:[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\":503,\"./attributes\":912}],915:[function(t,e,r){\"use strict\";[\"*pointcloud* trace is deprecated!\",\"Please consider switching to the *scattergl* trace type.\"].join(\" \");e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"../scatter3d/calc\"),plot:t(\"./convert\"),moduleType:\"trace\",name:\"pointcloud\",basePlotModule:t(\"../../plots/gl2d\"),categories:[\"gl\",\"gl2d\",\"showLegend\"],meta:{}}},{\"../../plots/gl2d\":596,\"../scatter3d/calc\":955,\"./attributes\":912,\"./convert\":913,\"./defaults\":914}],916:[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(\"../../plots/template_attributes\").hovertemplateAttrs,c=t(\"../../components/colorscale/attributes\"),u=t(\"../../plot_api/plot_template\").templatedArray,f=t(\"../../plots/cartesian/axis_format_attributes\").descriptionOnlyNumbers,h=t(\"../../lib/extend\").extendFlat,p=t(\"../../plot_api/edit_types\").overrideAll;(e.exports=p({hoverinfo:h({},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\",description:f(\"value\")},valuesuffix:{valType:\"string\",dflt:\"\"},arrangement:{valType:\"enumerated\",values:[\"snap\",\"perpendicular\",\"freeform\",\"fixed\"],dflt:\"snap\"},textfont:n({}),customdata:void 0,node:{label:{valType:\"data_array\",dflt:[]},groups:{valType:\"info_array\",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:\"number\",editType:\"calc\"}},x:{valType:\"data_array\",dflt:[]},y:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},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,hovertemplate:l({},{keys:[\"value\",\"label\"]})},link:{label:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},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,hovertemplate:l({},{keys:[\"value\",\"label\"]}),colorscales:u(\"concentrationscales\",{editType:\"calc\",label:{valType:\"string\",editType:\"calc\",dflt:\"\"},cmax:{valType:\"number\",editType:\"calc\",dflt:1},cmin:{valType:\"number\",editType:\"calc\",dflt:0},colorscale:h(c().colorscale,{dflt:[[0,\"white\"],[1,\"black\"]]})})}},\"calc\",\"nested\")).transforms=void 0},{\"../../components/color/attributes\":365,\"../../components/colorscale/attributes\":373,\"../../components/fx/attributes\":397,\"../../lib/extend\":493,\"../../plot_api/edit_types\":536,\"../../plot_api/plot_template\":543,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/domain\":584,\"../../plots/font_attributes\":585,\"../../plots/template_attributes\":633}],917:[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\"),s=t(\"../../lib/setcursor\"),l=t(\"../../components/dragelement\"),c=t(\"../../plots/cartesian/select\").prepSelect,u=t(\"../../lib\"),f=t(\"../../registry\");function h(t,e){var r=t._fullData[e],n=t._fullLayout,i=n.dragmode,a=\"pan\"===n.dragmode?\"move\":\"crosshair\",o=r._bgRect;if(\"pan\"!==i&&\"zoom\"!==i){s(o,a);var h={_id:\"x\",c2p:u.identity,_offset:r._sankey.translateX,_length:r._sankey.width},p={_id:\"y\",c2p:u.identity,_offset:r._sankey.translateY,_length:r._sankey.height},d={gd:t,element:o.node(),plotinfo:{id:e,xaxis:h,yaxis:p,fillRangeItems:u.noop},subplot:e,xaxes:[h],yaxes:[p],doneFnCompleted:function(r){var n,i=t._fullData[e],a=i.node.groups.slice(),o=[];function s(t){for(var e=i._sankey.graph.nodes,r=0;ry&&(y=a.source[e]),a.target[e]>y&&(y=a.target[e]);var x,b=y+1;t.node._count=b;var _=t.node.groups,w={};for(e=0;e<_.length;e++){var T=_[e];for(x=0;x0&&s(E,b)&&s(L,b)&&(!w.hasOwnProperty(E)||!w.hasOwnProperty(L)||w[E]!==w[L])){w.hasOwnProperty(L)&&(L=w[L]),w.hasOwnProperty(E)&&(E=w[E]),L=+L,h[E=+E]=h[L]=!0;var C=\"\";a.label&&a.label[e]&&(C=a.label[e]);var P=null;C&&p.hasOwnProperty(C)&&(P=p[C]),c.push({pointNumber:e,label:C,color:u?a.color[e]:a.color,customdata:f?a.customdata[e]:a.customdata,concentrationscale:P,source:E,target:L,value:+S}),M.source.push(E),M.target.push(L)}}var I=b+_.length,O=o(r.color),z=o(r.customdata),D=[];for(e=0;eb-1,childrenNodes:[],pointNumber:e,label:R,color:O?r.color[e]:r.color,customdata:z?r.customdata[e]:r.customdata})}var F=!1;return function(t,e,r){for(var a=i.init2dArray(t,0),o=0;o1}))}(I,M.source,M.target)&&(F=!0),{circular:F,links:c,nodes:D,groups:_,groupLookup:w}}e.exports=function(t,e){var r=c(e);return a({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},{\"../../components/colorscale\":378,\"../../lib\":503,\"../../lib/gup\":500,\"strongly-connected-components\":306}],919:[function(t,e,r){\"use strict\";e.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:\"linear\",cn:{sankey:\"sankey\",sankeyLinks:\"sankey-links\",sankeyLink:\"sankey-link\",sankeyNodeSet:\"sankey-node-set\",sankeyNode:\"sankey-node\",nodeRect:\"node-rect\",nodeLabel:\"node-label\"}}},{}],920:[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\"),u=t(\"../../plots/array_container_defaults\");function f(t,e){function r(r,a){return n.coerce(t,e,i.link.colorscales,r,a)}r(\"label\"),r(\"cmin\"),r(\"cmax\"),r(\"colorscale\")}e.exports=function(t,e,r,h){function p(r,a){return n.coerce(t,e,i,r,a)}var d=n.extendDeep(h.hoverlabel,t.hoverlabel),g=t.node,m=c.newContainer(e,\"node\");function v(t,e){return n.coerce(g,m,i.node,t,e)}v(\"label\"),v(\"groups\"),v(\"x\"),v(\"y\"),v(\"pad\"),v(\"thickness\"),v(\"line.color\"),v(\"line.width\"),v(\"hoverinfo\",t.hoverinfo),l(g,m,v,d),v(\"hovertemplate\");var y=h.colorway;v(\"color\",m.label.map((function(t,e){return a.addOpacity(function(t){return y[t%y.length]}(e),.8)}))),v(\"customdata\");var x=t.link||{},b=c.newContainer(e,\"link\");function _(t,e){return n.coerce(x,b,i.link,t,e)}_(\"label\"),_(\"source\"),_(\"target\"),_(\"value\"),_(\"line.color\"),_(\"line.width\"),_(\"hoverinfo\",t.hoverinfo),l(x,b,_,d),_(\"hovertemplate\");var w,T=o(h.paper_bgcolor).getLuminance()<.333?\"rgba(255, 255, 255, 0.6)\":\"rgba(0, 0, 0, 0.2)\";_(\"color\",n.repeat(T,b.value.length)),_(\"customdata\"),u(x,b,{name:\"colorscales\",handleItemDefaults:f}),s(e,h,p),p(\"orientation\"),p(\"valueformat\"),p(\"valuesuffix\"),m.x.length&&m.y.length&&(w=\"freeform\"),p(\"arrangement\",w),n.coerceFont(p,\"textfont\",n.extendFlat({},h.font)),e._length=null}},{\"../../components/color\":366,\"../../components/fx/hoverlabel_defaults\":404,\"../../lib\":503,\"../../plot_api/plot_template\":543,\"../../plots/array_container_defaults\":549,\"../../plots/domain\":584,\"./attributes\":916,tinycolor2:312}],921:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),moduleType:\"trace\",name:\"sankey\",basePlotModule:t(\"./base_plot\"),selectPoints:t(\"./select.js\"),categories:[\"noOpacity\"],meta:{}}},{\"./attributes\":916,\"./base_plot\":917,\"./calc\":918,\"./defaults\":920,\"./plot\":922,\"./select.js\":924}],922:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.numberFormat,o=t(\"./render\"),s=t(\"../../components/fx\"),l=t(\"../../components/color\"),c=t(\"./constants\").cn,u=i._;function f(t){return\"\"!==t}function h(t,e){return t.filter((function(t){return t.key===e.traceId}))}function p(t,e){n.select(t).select(\"path\").style(\"fill-opacity\",e),n.select(t).select(\"rect\").style(\"fill-opacity\",e)}function d(t){n.select(t).select(\"text.name\").style(\"fill\",\"black\")}function g(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function m(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&&h(r,e).selectAll(\".\"+c.sankeyLink).filter(g(e)).call(x.bind(0,e,r,!1))}function y(t,e,r){e&&r&&h(r,e).selectAll(\".\"+c.sankeyLink).filter(g(e)).call(b.bind(0,e,r,!1))}function x(t,e,r,n){var i=n.datum().link.label;n.style(\"fill-opacity\",(function(t){if(!t.link.concentrationscale)return.4})),i&&h(e,t).selectAll(\".\"+c.sankeyLink).filter((function(t){return t.link.label===i})).style(\"fill-opacity\",(function(t){if(!t.link.concentrationscale)return.4})),r&&h(e,t).selectAll(\".\"+c.sankeyNode).filter(m(t)).call(v)}function b(t,e,r,n){var i=n.datum().link.label;n.style(\"fill-opacity\",(function(t){return t.tinyColorAlpha})),i&&h(e,t).selectAll(\".\"+c.sankeyLink).filter((function(t){return t.link.label===i})).style(\"fill-opacity\",(function(t){return t.tinyColorAlpha})),r&&h(e,t).selectAll(c.sankeyNode).filter(m(t)).call(y)}function _(t,e){var r=t.hoverlabel||{},n=i.nestedProperty(r,e).get();return!Array.isArray(n)&&n}e.exports=function(t,e){for(var r=t._fullLayout,i=r._paper,h=r._size,g=0;g\"),color:_(o,\"bgcolor\")||l.addOpacity(g.color,1),borderColor:_(o,\"bordercolor\"),fontFamily:_(o,\"font.family\"),fontSize:_(o,\"font.size\"),fontColor:_(o,\"font.color\"),nameLength:_(o,\"namelength\"),textAlign:_(o,\"align\"),idealAlign:n.event.x\"),color:_(o,\"bgcolor\")||i.tinyColorHue,borderColor:_(o,\"bordercolor\"),fontFamily:_(o,\"font.family\"),fontSize:_(o,\"font.size\"),fontColor:_(o,\"font.color\"),nameLength:_(o,\"namelength\"),textAlign:_(o,\"align\"),idealAlign:\"left\",hovertemplate:o.hovertemplate,hovertemplateLabels:y,eventData:[i.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});p(w,.85),d(w)}}},unhover:function(e,i,a){!1!==t._fullLayout.hovermode&&(n.select(e).call(y,i,a),\"skip\"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,t.emit(\"plotly_unhover\",{event:n.event,points:[i.node]})),s.loneUnhover(r._hoverlayer.node()))},select:function(e,r,i){var a=r.node;a.originalEvent=n.event,t._hoverdata=[a],n.select(e).call(y,r,i),s.click(t,{target:!0})}}})}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../lib\":503,\"./constants\":919,\"./render\":923,\"@plotly/d3\":58}],923:[function(t,e,r){\"use strict\";var n=t(\"d3-force\"),i=t(\"d3-interpolate\").interpolateNumber,a=t(\"@plotly/d3\"),o=t(\"@plotly/d3-sankey\"),s=t(\"@plotly/d3-sankey-circular\"),l=t(\"./constants\"),c=t(\"tinycolor2\"),u=t(\"../../components/color\"),f=t(\"../../components/drawing\"),h=t(\"../../lib\"),p=h.strTranslate,d=h.strRotate,g=t(\"../../lib/gup\"),m=g.keyFun,v=g.repeat,y=g.unwrap,x=t(\"../../lib/svg_text_utils\"),b=t(\"../../registry\"),_=t(\"../../constants/alignment\"),w=_.CAP_SHIFT,T=_.LINE_SPACING;function k(t,e,r){var n,i=y(e),a=i.trace,u=a.domain,f=\"h\"===a.orientation,p=a.node.pad,d=a.node.thickness,g=t.width*(u.x[1]-u.x[0]),m=t.height*(u.y[1]-u.y[0]),v=i._nodes,x=i._links,b=i.circular;(n=b?s.sankeyCircular().circularLinkGap(0):o.sankey()).iterations(l.sankeyIterations).size(f?[g,m]:[m,g]).nodeWidth(d).nodePadding(p).nodeId((function(t){return t.pointNumber})).nodes(v).links(x);var _,w,T,k=n();for(var A in n.nodePadding()=i||(r=i-e.y0)>1e-6&&(e.y0+=r,e.y1+=r),i=e.y1+p}))}(function(t){var e,r,n=t.map((function(t,e){return{x0:t.x0,index:e}})).sort((function(t,e){return t.x0-e.x0})),i=[],a=-1,o=-1/0;for(_=0;_o+d&&(a+=1,e=s.x0),o=s.x0,i[a]||(i[a]=[]),i[a].push(s),r=e-s.x0,s.x0+=r,s.x1+=r}return i}(v=k.nodes));n.update(k)}return{circular:b,key:r,trace:a,guid:h.randstr(),horizontal:f,width:g,height:m,nodePad:a.node.pad,nodeLineColor:a.node.line.color,nodeLineWidth:a.node.line.width,linkLineColor:a.link.line.color,linkLineWidth:a.link.line.width,valueFormat:a.valueformat,valueSuffix:a.valuesuffix,textFont:a.textfont,translateX:u.x[0]*t.width+t.margin.l,translateY:t.height-u.y[1]*t.height+t.margin.t,dragParallel:f?m:g,dragPerpendicular:f?g:m,arrangement:a.arrangement,sankey:n,graph:k,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function A(t,e,r){var n=c(e.color),i=e.source.label+\"|\"+e.target.label+\"__\"+r;return e.trace=t.trace,e.curveNumber=t.trace.index,{circular:t.circular,key:i,traceId:t.key,pointNumber:e.pointNumber,link:e,tinyColorHue:u.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:M,linkLineColor:t.linkLineColor,linkLineWidth:t.linkLineWidth,valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,parent:t,interactionState:t.interactionState,flow:e.flow}}function M(){return function(t){if(t.link.circular)return e=t.link,r=e.width/2,n=e.circularPathData,\"top\"===e.circularLinkType?\"M \"+n.targetX+\" \"+(n.targetY+r)+\" L\"+n.rightInnerExtent+\" \"+(n.targetY+r)+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightSmallArcRadius+r)+\" 0 0 1 \"+(n.rightFullExtent-r)+\" \"+(n.targetY-n.rightSmallArcRadius)+\"L\"+(n.rightFullExtent-r)+\" \"+n.verticalRightInnerExtent+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightLargeArcRadius+r)+\" 0 0 1 \"+n.rightInnerExtent+\" \"+(n.verticalFullExtent-r)+\"L\"+n.leftInnerExtent+\" \"+(n.verticalFullExtent-r)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftLargeArcRadius+r)+\" 0 0 1 \"+(n.leftFullExtent+r)+\" \"+n.verticalLeftInnerExtent+\"L\"+(n.leftFullExtent+r)+\" \"+(n.sourceY-n.leftSmallArcRadius)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftSmallArcRadius+r)+\" 0 0 1 \"+n.leftInnerExtent+\" \"+(n.sourceY+r)+\"L\"+n.sourceX+\" \"+(n.sourceY+r)+\"L\"+n.sourceX+\" \"+(n.sourceY-r)+\"L\"+n.leftInnerExtent+\" \"+(n.sourceY-r)+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftSmallArcRadius-r)+\" 0 0 0 \"+(n.leftFullExtent-r)+\" \"+(n.sourceY-n.leftSmallArcRadius)+\"L\"+(n.leftFullExtent-r)+\" \"+n.verticalLeftInnerExtent+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftLargeArcRadius-r)+\" 0 0 0 \"+n.leftInnerExtent+\" \"+(n.verticalFullExtent+r)+\"L\"+n.rightInnerExtent+\" \"+(n.verticalFullExtent+r)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightLargeArcRadius-r)+\" 0 0 0 \"+(n.rightFullExtent+r)+\" \"+n.verticalRightInnerExtent+\"L\"+(n.rightFullExtent+r)+\" \"+(n.targetY-n.rightSmallArcRadius)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightSmallArcRadius-r)+\" 0 0 0 \"+n.rightInnerExtent+\" \"+(n.targetY-r)+\"L\"+n.targetX+\" \"+(n.targetY-r)+\"Z\":\"M \"+n.targetX+\" \"+(n.targetY-r)+\" L\"+n.rightInnerExtent+\" \"+(n.targetY-r)+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightSmallArcRadius+r)+\" 0 0 0 \"+(n.rightFullExtent-r)+\" \"+(n.targetY+n.rightSmallArcRadius)+\"L\"+(n.rightFullExtent-r)+\" \"+n.verticalRightInnerExtent+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightLargeArcRadius+r)+\" 0 0 0 \"+n.rightInnerExtent+\" \"+(n.verticalFullExtent+r)+\"L\"+n.leftInnerExtent+\" \"+(n.verticalFullExtent+r)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftLargeArcRadius+r)+\" 0 0 0 \"+(n.leftFullExtent+r)+\" \"+n.verticalLeftInnerExtent+\"L\"+(n.leftFullExtent+r)+\" \"+(n.sourceY+n.leftSmallArcRadius)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftSmallArcRadius+r)+\" 0 0 0 \"+n.leftInnerExtent+\" \"+(n.sourceY-r)+\"L\"+n.sourceX+\" \"+(n.sourceY-r)+\"L\"+n.sourceX+\" \"+(n.sourceY+r)+\"L\"+n.leftInnerExtent+\" \"+(n.sourceY+r)+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftSmallArcRadius-r)+\" 0 0 1 \"+(n.leftFullExtent-r)+\" \"+(n.sourceY+n.leftSmallArcRadius)+\"L\"+(n.leftFullExtent-r)+\" \"+n.verticalLeftInnerExtent+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftLargeArcRadius-r)+\" 0 0 1 \"+n.leftInnerExtent+\" \"+(n.verticalFullExtent-r)+\"L\"+n.rightInnerExtent+\" \"+(n.verticalFullExtent-r)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightLargeArcRadius-r)+\" 0 0 1 \"+(n.rightFullExtent+r)+\" \"+n.verticalRightInnerExtent+\"L\"+(n.rightFullExtent+r)+\" \"+(n.targetY+n.rightSmallArcRadius)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightSmallArcRadius-r)+\" 0 0 1 \"+n.rightInnerExtent+\" \"+(n.targetY+r)+\"L\"+n.targetX+\" \"+(n.targetY+r)+\"Z\";var e,r,n,a=t.link.source.x1,o=t.link.target.x0,s=i(a,o),l=s(.5),c=s(.5),u=t.link.y0-t.link.width/2,f=t.link.y0+t.link.width/2,h=t.link.y1-t.link.width/2,p=t.link.y1+t.link.width/2;return\"M\"+a+\",\"+u+\"C\"+l+\",\"+u+\" \"+c+\",\"+h+\" \"+o+\",\"+h+\"L\"+o+\",\"+p+\"C\"+c+\",\"+p+\" \"+l+\",\"+f+\" \"+a+\",\"+f+\"Z\"}}function S(t,e){var r=c(e.color),n=l.nodePadAcross,i=t.nodePad/2;e.dx=e.x1-e.x0,e.dy=e.y1-e.y0;var a=e.dx,o=Math.max(.5,e.dy),s=\"node_\"+e.pointNumber;return e.group&&(s=h.randstr()),e.trace=t.trace,e.curveNumber=t.trace.index,{index:e.pointNumber,key:s,partOfGroup:e.partOfGroup||!1,group:e.group,traceId:t.key,trace:t.trace,node:e,nodePad:t.nodePad,nodeLineColor:t.nodeLineColor,nodeLineWidth:t.nodeLineWidth,textFont:t.textFont,size:t.horizontal?t.height:t.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:t.horizontal?e.dy/2+1:e.dx/2+1,left:1===e.originalLayer,sizeAcross:t.width,forceLayouts:t.forceLayouts,horizontal:t.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:u.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,graph:t.graph,arrangement:t.arrangement,uniqueNodeLabelPathId:[t.guid,t.key,s].join(\"_\"),interactionState:t.interactionState,figure:t}}function E(t){t.attr(\"transform\",(function(t){return p(t.node.x0.toFixed(3),t.node.y0.toFixed(3))}))}function L(t){t.call(E)}function C(t,e){t.call(L),e.attr(\"d\",M())}function P(t){t.attr(\"width\",(function(t){return t.node.x1-t.node.x0})).attr(\"height\",(function(t){return t.visibleHeight}))}function I(t){return t.link.width>1||t.linkLineWidth>0}function O(t){return p(t.translateX,t.translateY)+(t.horizontal?\"matrix(1 0 0 1 0 0)\":\"matrix(0 1 1 0 0 0)\")}function z(t,e,r){t.on(\".basic\",null).on(\"mouseover.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.hover(this,t,e),t.interactionState.hovered=[this,t])})).on(\"mousemove.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.follow(this,t),t.interactionState.hovered=[this,t])})).on(\"mouseout.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(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||t.partOfGroup||r.select(this,t,e)}))}function D(t,e,r,i){var o=a.behavior.drag().origin((function(t){return{x:t.node.x0+t.visibleWidth/2,y:t.node.y0+t.visibleHeight/2}})).on(\"dragstart\",(function(a){if(\"fixed\"!==a.arrangement&&(h.ensureSingle(i._fullLayout._infolayer,\"g\",\"dragcover\",(function(t){i._fullLayout._dragCover=t})),h.raiseToTop(this),a.interactionState.dragInProgress=a.node,F(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),\"snap\"===a.arrangement)){var o=a.traceId+\"|\"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):function(t,e,r,i){!function(t){for(var e=0;e0&&n.forceLayouts[e].alpha(0)}}(0,e,a,r)).stop()}(0,o,a),function(t,e,r,n,i){window.requestAnimationFrame((function a(){var o;for(o=0;o0)window.requestAnimationFrame(a);else{var s=r.node.originalX;r.node.x0=s-r.visibleWidth/2,r.node.x1=s+r.visibleWidth/2,R(r,i)}}))}(t,e,a,o,i)}})).on(\"drag\",(function(r){if(\"fixed\"!==r.arrangement){var n=a.event.x,i=a.event.y;\"snap\"===r.arrangement?(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2,r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2):(\"freeform\"===r.arrangement&&(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2),i=Math.max(0,Math.min(r.size-r.visibleHeight/2,i)),r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2),F(r.node),\"snap\"!==r.arrangement&&(r.sankey.update(r.graph),C(t.filter(B(r)),e))}})).on(\"dragend\",(function(t){if(\"fixed\"!==t.arrangement){t.interactionState.dragInProgress=!1;for(var e=0;el&&C[v].gap;)v--;for(x=C[v].s,g=C.length-1;g>v;g--)C[g].s=x;for(;lM[u]&&u=0;i--){var a=t[i];if(\"scatter\"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],933:[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(\"./period_defaults\"),u=t(\"./stack_defaults\"),f=t(\"./marker_defaults\"),h=t(\"./line_defaults\"),p=t(\"./line_shape_defaults\"),d=t(\"./text_defaults\"),g=t(\"./fillcolor_defaults\");e.exports=function(t,e,r,m){function v(r,i){return n.coerce(t,e,a,r,i)}var y=l(t,e,m,v);if(y||(e.visible=!1),e.visible){c(t,e,m,v),v(\"xhoverformat\"),v(\"yhoverformat\");var x=u(t,e,m,v),b=!x&&y=Math.min(e,r)&&d<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(h.c2p(t.x)-d);return a=Math.min(e,r)&&g<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(p.c2p(t.y)-g);return aW!=(N=z[I][1])>=W&&(R=z[I-1][0],F=z[I][0],N-B&&(D=R+(F-R)*(W-B)/(N-B),H=Math.min(H,D),q=Math.max(q,D)));H=Math.max(H,0),q=Math.min(q,h._length);var X=s.defaultLine;return s.opacity(f.fillcolor)?X=f.fillcolor:s.opacity((f.line||{}).color)&&(X=f.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:H,x1:q,y0:W,y1:W,color:X,hovertemplate:!1}),delete t.index,f.text&&!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../lib\":503,\"../../registry\":638,\"./get_trace_color\":936}],938:[function(t,e,r){\"use strict\";var n=t(\"./subtypes\");e.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"./cross_trace_defaults\"),calc:t(\"./calc\").calc,crossTraceCalc:t(\"./cross_trace_calc\"),arraysToCalcdata:t(\"./arrays_to_calcdata\"),plot:t(\"./plot\"),colorbar:t(\"./marker_colorbar\"),formatLabels:t(\"./format_labels\"),style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"./select\"),animatable:!0,moduleType:\"trace\",name:\"scatter\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"symbols\",\"errorBarsOK\",\"showLegend\",\"scatter-like\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"./arrays_to_calcdata\":925,\"./attributes\":926,\"./calc\":927,\"./cross_trace_calc\":931,\"./cross_trace_defaults\":932,\"./defaults\":933,\"./format_labels\":935,\"./hover\":937,\"./marker_colorbar\":944,\"./plot\":947,\"./select\":948,\"./style\":950,\"./subtypes\":951}],939:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray,i=t(\"../../components/colorscale/helpers\").hasColorscale,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\"}):s(\"line.color\",!n(c)&&c||r);s(\"line.width\"),(l||{}).noDash||s(\"line.dash\")}},{\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503}],940:[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,m,v,y,x,b,_,w,T,k,A,M,S=e.xaxis,E=e.yaxis,L=\"log\"===S.type,C=\"log\"===E.type,P=S._length,I=E._length,O=e.connectGaps,z=e.baseTolerance,D=e.shape,R=\"linear\"===D,F=e.fill&&\"none\"!==e.fill,B=[],N=f.minTolerance,j=t.length,U=new Array(j),V=0;function H(r){var n=t[r];if(!n)return!1;var a=e.linearized?S.l2p(n.x):S.c2p(n.x),l=e.linearized?E.l2p(n.y):E.c2p(n.y);if(a===i){if(L&&(a=S.c2p(n.x,!0)),a===i)return!1;C&&l===i&&(a*=Math.abs(S._m*I*(S._m>0?o:s)/(E._m*P*(E._m>0?o:s)))),a*=1e3}if(l===i){if(C&&(l=E.c2p(n.y,!0)),l===i)return!1;l*=1e3}return[a,l]}function q(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&&crt||t[1]it)return[u(t[0],et,rt),u(t[1],nt,it)]}function st(t,e){return t[0]===e[0]&&(t[0]===et||t[0]===rt)||(t[1]===e[1]&&(t[1]===nt||t[1]===it)||void 0)}function lt(t,e,r){return function(n,i){var a=ot(n),o=ot(i),s=[];if(a&&o&&st(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 ct(t){var e=t[0],r=t[1],n=e===U[V-1][0],i=r===U[V-1][1];if(!n||!i)if(V>1){var a=e===U[V-2][0],o=r===U[V-2][1];n&&(e===et||e===rt)&&a?o?V--:U[V-1]=t:i&&(r===nt||r===it)&&o?a?V--:U[V-1]=t:U[V++]=t}else U[V++]=t}function ut(t){U[V-1][0]!==t[0]&&U[V-1][1]!==t[1]&&ct([Z,J]),ct(t),K=null,Z=J=0}function ft(t){if(A=t[0]/P,M=t[1]/I,W=t[0]rt?rt:0,X=t[1]it?it:0,W||X){if(V)if(K){var e=$(K,t);e.length>1&&(ut(e[0]),U[V++]=e[1])}else Q=$(U[V-1],t)[0],U[V++]=Q;else U[V++]=[W||t[0],X||t[1]];var r=U[V-1];W&&X&&(r[0]!==W||r[1]!==X)?(K&&(Z!==W&&J!==X?ct(Z&&J?(n=K,a=(i=t)[0]-n[0],o=(i[1]-n[1])/a,(n[1]*i[0]-i[1]*n[0])/a>0?[o>0?et:rt,it]:[o>0?rt:et,nt]):[Z||W,J||X]):Z&&J&&ct([Z,J])),ct([W,X])):Z-W&&J-X&&ct([W||Z,X||J]),K=t,Z=W,J=X}else K&&ut($(K,t)[0]),U[V++]=t;var n,i,a,o}for(\"linear\"===D||\"spline\"===D?$=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var a=at[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&&Y(o,t)G(d,ht))break;a=d,(_=v[0]*m[0]+v[1]*m[1])>x?(x=_,h=d,g=!1):_=t.length||!d)break;ft(d),n=d}}else ft(h)}K&&ct([Z||K[0],J||K[1]]),B.push(U.slice(0,V))}return B}},{\"../../constants/numerical\":479,\"../../lib\":503,\"./constants\":930}],941:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){\"spline\"===r(\"line.shape\")&&r(\"line.smoothing\")}},{}],942:[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=0?l=p:(l=p=h,h++),l0?Math.max(r,a):0}}},{\"fast-isnumeric\":190}],944:[function(t,e,r){\"use strict\";e.exports={container:\"marker\",min:\"cmin\",max:\"cmax\"}},{}],945:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/helpers\").hasColorscale,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\":366,\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"./subtypes\":951}],946:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").dateTick0,i=t(\"../../constants/numerical\").ONEWEEK;function a(t,e){return n(e,t%i==0?1:0)}e.exports=function(t,e,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n(\"xperiod\");o&&(n(\"xperiod0\",a(o,e.xcalendar)),n(\"xperiodalignment\"))}if(i.y){var s=n(\"yperiod\");s&&(n(\"yperiod0\",a(s,e.ycalendar)),n(\"yperiodalignment\"))}}},{\"../../constants/numerical\":479,\"../../lib\":503}],947:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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 m;!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),m=0;o.forEach((function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(t){return v?t.transition():t}var x=r.xaxis,b=r.yaxis,_=f[0].trace,w=_.line,T=n.select(d),k=o(T,\"g\",\"errorbars\"),A=o(T,\"g\",\"lines\"),M=o(T,\"g\",\"points\"),S=o(T,\"g\",\"text\");if(i.getComponentMethod(\"errorbars\",\"plot\")(t,k,r,g),!0===_.visible){var E,L;y(T).style(\"opacity\",_.opacity);var C=_.fill.charAt(_.fill.length-1);\"x\"!==C&&\"y\"!==C&&(C=\"\"),f[0][r.isRangePlot?\"nodeRangePlot3\":\"node3\"]=T;var P,I,O=\"\",z=[],D=_._prevtrace;D&&(O=D._prevRevpath||\"\",L=D._nextFill,z=D._polygons);var R,F,B,N,j,U,V,H=\"\",q=\"\",G=[],Y=a.noop;if(E=_._ownFill,c.hasLines(_)||\"none\"!==_.fill){for(L&&L.datum(f),-1!==[\"hv\",\"vh\",\"hvh\",\"vhv\"].indexOf(w.shape)?(R=l.steps(w.shape),F=l.steps(w.shape.split(\"\").reverse().join(\"\"))):R=F=\"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\")},B=function(t){return F(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,fill:_.fill}),V=_._polygons=new Array(G.length),m=0;m1){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 W=A.selectAll(\".js-line\").data(G);y(W.exit()).style(\"opacity\",0).remove(),W.each(Y(!1)),W.enter().append(\"path\").classed(\"js-line\",!0).style(\"vector-effect\",\"non-scaling-stroke\").call(l.lineGroupStyle).each(Y(!0)),l.setClipUrl(W,r.layerClipId,t),G.length?(E?(E.datum(f),N&&U&&(C?(\"y\"===C?N[1]=U[1]=b.c2p(0,!0):\"x\"===C&&(N[0]=U[0]=x.c2p(0,!0)),y(E).attr(\"d\",\"M\"+U+\"L\"+N+\"L\"+H.substr(1)).call(l.singleFillStyle)):y(E).attr(\"d\",H+\"Z\").call(l.singleFillStyle))):L&&(\"tonext\"===_.fill.substr(0,6)&&H&&O?(\"tonext\"===_.fill?y(L).attr(\"d\",H+\"Z\"+O+\"Z\").call(l.singleFillStyle):y(L).attr(\"d\",H+\"L\"+O.substr(1)+\"Z\").call(l.singleFillStyle),_._polygons=_._polygons.concat(z)):(Z(L),_._polygons=null)),_._prevRevpath=q,_._prevPolygons=V):(E?Z(E):L&&Z(L),_._polygons=_._prevRevpath=_._prevPolygons=null),M.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 m=s,_=u.stackgroup,w=_&&\"infer zero\"===t._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?m=w?K:J:_&&!w&&(m=Q),f&&(d=m),h&&(g=m)}var T,k=(o=e.selectAll(\"path.point\").data(d,p)).enter().append(\"path\").classed(\"point\",!0);v&&k.call(l.pointStyle,u,t).call(l.translatePoints,x,b).style(\"opacity\",0).transition().style(\"opacity\",1),o.order(),f&&(T=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,T,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()})),v?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()}(M,S,f);var X=!1===_.cliponaxis?null:r.layerClipId;l.setClipUrl(M,X,t),l.setClipUrl(S,X,t)}function Z(t){y(t).attr(\"d\",\"M0,0Z\")}function J(t){return t.filter((function(t){return!t.gap&&t.vis}))}function K(t){return t.filter((function(t){return t.vis}))}function Q(t){return t.filter((function(t){return!t.gap}))}function $(t){return t.id}function tt(t){if(t.ids)return $}function et(){return!1}}e.exports=function(t,e,r,i,a,c){var u,h,d=!a,g=!!a&&a.duration>0,m=f(t,e,r);((u=i.selectAll(\"g.trace\").data(m,(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(e){var i=o(n.select(this),\"g\",\"fills\");l.setClipUrl(i,r.layerClipId,t);var a=e[0].trace,c=[];a._ownfill&&c.push(\"_ownFill\"),a._nexttrace&&c.push(\"_nextFill\");var u=i.selectAll(\"g\").data(c,s);u.enter().append(\"g\"),u.exit().each((function(t){a[t]=null})).remove(),u.order().each((function(t){a[t]=o(n.select(this),\"path\",\"js-fill\")}))}))}(t,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,m,this,a)}))}))):u.each((function(r,n){p(t,n,e,r,m,this,a)}));d&&u.exit().remove(),i.selectAll(\"path:not([d])\").remove()}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/polygon\":515,\"../../registry\":638,\"./line_points\":940,\"./link_traces\":942,\"./subtypes\":951,\"@plotly/d3\":58}],948:[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;r0){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-1?-1:t.indexOf(\"right\")>-1?1:0}function b(t){return null==t?0:t.indexOf(\"top\")>-1?-1:t.indexOf(\"bottom\")>-1?1:0}function _(t,e){return e(4*t)}function w(t){return p[t]}function T(t,e,r,n,i){var a=null;if(l.isArrayOrTypedArray(t)){a=[];for(var o=0;o=0){var g=function(t,e,r){var n,i=(r+1)%3,a=(r+2)%3,o=[],l=[];for(n=0;n=0&&f(\"surfacecolor\",h||p);for(var d=[\"x\",\"y\",\"z\"],g=0;g<3;++g){var m=\"projection.\"+d[g];f(m+\".show\")&&(f(m+\".opacity\"),f(m+\".scale\"))}var v=n.getComponentMethod(\"errorbars\",\"supplyDefaults\");v(t,e,h||p||r,{axis:\"z\"}),v(t,e,h||p||r,{axis:\"y\",inherit:\"z\"}),v(t,e,h||p||r,{axis:\"x\",inherit:\"z\"})}else e.visible=!1}},{\"../../lib\":503,\"../../registry\":638,\"../scatter/line_defaults\":939,\"../scatter/marker_defaults\":945,\"../scatter/subtypes\":951,\"../scatter/text_defaults\":952,\"./attributes\":954}],959:[function(t,e,r){\"use strict\";e.exports={plot:t(\"./convert\"),attributes:t(\"./attributes\"),markerSymbols:t(\"../../constants/gl3d_markers\"),supplyDefaults:t(\"./defaults\"),colorbar:[{container:\"marker\",min:\"cmin\",max:\"cmax\"},{container:\"line\",min:\"cmin\",max:\"cmax\"}],calc:t(\"./calc\"),moduleType:\"trace\",name:\"scatter3d\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../constants/gl3d_markers\":477,\"../../plots/gl3d\":598,\"./attributes\":954,\"./calc\":955,\"./convert\":957,\"./defaults\":958}],960:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../../plots/template_attributes\").texttemplateAttrs,s=t(\"../../components/colorscale/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=n.marker,u=n.line,f=c.line;e.exports={carpet:{valType:\"string\",editType:\"calc\"},a:{valType:\"data_array\",editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},mode:l({},n.mode,{dflt:\"markers\"}),text:l({},n.text,{}),texttemplate:o({editType:\"plot\"},{keys:[\"a\",\"b\",\"text\"]}),hovertext:l({},n.hovertext,{}),line:{color:u.color,width:u.width,dash:u.dash,shape:l({},u.shape,{values:[\"linear\",\"spline\"]}),smoothing:u.smoothing,editType:\"calc\"},connectgaps:n.connectgaps,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\"},s(\"marker.line\")),gradient:c.gradient,editType:\"calc\"},s(\"marker\")),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:l({},i.hoverinfo,{flags:[\"a\",\"b\",\"text\",\"name\"]}),hoveron:n.hoveron,hovertemplate:a()}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926}],961:[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\")}return o}function y(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,\"\"):t._hovertitle,m.push(r+\": \"+e.toFixed(3)+t.labelsuffix)}}},{\"../../lib\":503,\"../scatter/hover\":937}],966:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../scatter/select\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"scattercarpet\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"svg\",\"carpet\",\"symbols\",\"showLegend\",\"carpetDependent\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":960,\"./calc\":961,\"./defaults\":962,\"./event_data\":963,\"./format_labels\":964,\"./hover\":965,\"./plot\":967}],967:[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\")}(c,g,t,l[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}},{\"../../components/fx\":406,\"../../constants/numerical\":479,\"../../lib\":503,\"../scatter/get_trace_color\":936,\"./attributes\":968}],974:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),calcGeoJSON:t(\"./plot\").calcGeoJSON,plot:t(\"./plot\").plot,style:t(\"./style\"),styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"scattergeo\",basePlotModule:t(\"../../plots/geo\"),categories:[\"geo\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/geo\":589,\"../scatter/marker_colorbar\":944,\"../scatter/style\":950,\"./attributes\":968,\"./calc\":969,\"./defaults\":970,\"./event_data\":971,\"./format_labels\":972,\"./hover\":973,\"./plot\":975,\"./select\":976,\"./style\":977}],975:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../lib/topojson_utils\").getTopojsonFeatures,o=t(\"../../lib/geojson_utils\"),s=t(\"../../lib/geo_location_utils\"),l=t(\"../../plots/cartesian/autorange\").findExtremes,c=t(\"../../constants/numerical\").BADNUM,u=t(\"../scatter/calc\").calcMarkerSize,f=t(\"../scatter/subtypes\"),h=t(\"./style\");e.exports={calcGeoJSON:function(t,e){var r,n,i=t[0].trace,o=e[i.geo],f=o._subplot,h=i._length;if(Array.isArray(i.locations)){var p=i.locationmode,d=\"geojson-id\"===p?s.extractTraceFeature(t):a(i,f.topojson);for(r=0;r=m,w=2*b,T={},k=l.makeCalcdata(e,\"x\"),A=y.makeCalcdata(e,\"y\"),M=s(e,l,\"x\",k),S=s(e,y,\"y\",A),E=M.vals,L=S.vals;e._x=E,e._y=L,e.xperiodalignment&&(e._origX=k,e._xStarts=M.starts,e._xEnds=M.ends),e.yperiodalignment&&(e._origY=A,e._yStarts=S.starts,e._yEnds=S.ends);var C=new Array(w),P=new Array(b);for(r=0;r1&&i.extendFlat(s.line,p.linePositions(t,r,n));if(s.errorX||s.errorY){var l=p.errorBarPositions(t,r,n,a,o);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}s.text&&(i.extendFlat(s.text,{positions:n},p.textPosition(t,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},p.textPosition(t,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},p.textPosition(t,r,s.text,s.markerUnsel)));return s}(t,0,e,C,E,L),z=d(t,x);return f(o,e),_?O.marker&&(I=O.marker.sizeAvg||Math.max(O.marker.size,3)):I=c(e,b),u(t,e,l,y,E,L,I),O.errorX&&v(e,l,O.errorX),O.errorY&&v(e,y,O.errorY),O.fill&&!z.fill2d&&(z.fill2d=!0),O.marker&&!z.scatter2d&&(z.scatter2d=!0),O.line&&!z.line2d&&(z.line2d=!0),!O.errorX&&!O.errorY||z.error2d||(z.error2d=!0),O.text&&!z.glText&&(z.glText=!0),O.marker&&(O.marker.snap=b),z.lineOptions.push(O.line),z.errorXOptions.push(O.errorX),z.errorYOptions.push(O.errorY),z.fillOptions.push(O.fill),z.markerOptions.push(O.marker),z.markerSelectedOptions.push(O.markerSel),z.markerUnselectedOptions.push(O.markerUnsel),z.textOptions.push(O.text),z.textSelectedOptions.push(O.textSel),z.textUnselectedOptions.push(O.textUnsel),z.selectBatch.push([]),z.unselectBatch.push([]),T._scene=z,T.index=z.count,T.x=E,T.y=L,T.positions=C,z.count++,[{x:!1,y:!1,t:T,trace:e}]}},{\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/align_period\":551,\"../../plots/cartesian/autorange\":553,\"../../plots/cartesian/axis_ids\":558,\"../scatter/calc\":927,\"../scatter/colorscale_calc\":929,\"./constants\":980,\"./convert\":981,\"./scene_update\":989,\"@plotly/point-cluster\":59}],980:[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]}}},{}],981:[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(\"./helpers\"),d=t(\"./constants\"),g=t(\"../../constants/interactions\").DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=t(\"../../components/fx/helpers\").appendArrayPointValue;function y(t,e){var r,i=t._fullLayout,a=e._length,o=e.textfont,l=e.textposition,c=Array.isArray(l)?l:[l],u=o.color,f=o.size,h=o.family,p={},d=t._context.plotGlPixelRatio,g=e.texttemplate;if(g){p.text=[];var m=i._d3locale,y=Array.isArray(g),x=y?Math.min(g.length,a):a,b=y?function(t){return g[t]}:function(){return g};for(r=0;rd.TOO_MANY_POINTS||f.hasMarkers(e)?\"rect\":\"round\";if(c&&e.connectgaps){var h=n[0],p=n[1];for(i=0;i1?l[i]:l[0]:l,d=Array.isArray(c)?c.length>1?c[i]:c[0]:c,g=m[p],v=m[d],y=u?u/.8+1:0,x=-v*y-.5*v;o.offset[i]=[g*y/h,x/h]}}return o}}},{\"../../components/drawing\":388,\"../../components/fx/helpers\":402,\"../../constants/interactions\":478,\"../../lib\":503,\"../../lib/gl_format_color\":499,\"../../plots/cartesian/axis_ids\":558,\"../../registry\":638,\"../scatter/make_bubble_size_func\":943,\"../scatter/subtypes\":951,\"./constants\":980,\"./helpers\":985,\"color-normalize\":89,\"fast-isnumeric\":190,\"svg-path-sdf\":310}],982:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"./helpers\"),o=t(\"./attributes\"),s=t(\"../scatter/constants\"),l=t(\"../scatter/subtypes\"),c=t(\"../scatter/xy_defaults\"),u=t(\"../scatter/period_defaults\"),f=t(\"../scatter/marker_defaults\"),h=t(\"../scatter/line_defaults\"),p=t(\"../scatter/fillcolor_defaults\"),d=t(\"../scatter/text_defaults\");e.exports=function(t,e,r,g){function m(r,i){return n.coerce(t,e,o,r,i)}var v=!!t.marker&&a.isOpenSymbol(t.marker.symbol),y=l.isBubble(t),x=c(t,e,g,m);if(x){u(t,e,g,m),m(\"xhoverformat\"),m(\"yhoverformat\");var b=x100},r.isDotSymbol=function(t){return\"string\"==typeof t?n.DOT_RE.test(t):t>200}},{\"./constants\":980}],986:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../scatter/get_trace_color\");function o(t,e,r,o){var s=t.xa,l=t.ya,c=t.distance,u=t.dxy,f=t.index,h={pointNumber:f,x:e[f],y:r[f]};h.tx=Array.isArray(o.text)?o.text[f]:o.text,h.htx=Array.isArray(o.hovertext)?o.hovertext[f]:o.hovertext,h.data=Array.isArray(o.customdata)?o.customdata[f]:o.customdata,h.tp=Array.isArray(o.textposition)?o.textposition[f]:o.textposition;var p=o.textfont;p&&(h.ts=i.isArrayOrTypedArray(p.size)?p.size[f]:p.size,h.tc=Array.isArray(p.color)?p.color[f]:p.color,h.tf=Array.isArray(p.family)?p.family[f]:p.family);var d=o.marker;d&&(h.ms=i.isArrayOrTypedArray(d.size)?d.size[f]:d.size,h.mo=i.isArrayOrTypedArray(d.opacity)?d.opacity[f]:d.opacity,h.mx=i.isArrayOrTypedArray(d.symbol)?d.symbol[f]:d.symbol,h.mc=i.isArrayOrTypedArray(d.color)?d.color[f]:d.color);var g=d&&d.line;g&&(h.mlc=Array.isArray(g.color)?g.color[f]:g.color,h.mlw=i.isArrayOrTypedArray(g.width)?g.width[f]:g.width);var m=d&&d.gradient;m&&\"none\"!==m.type&&(h.mgt=Array.isArray(m.type)?m.type[f]:m.type,h.mgc=Array.isArray(m.color)?m.color[f]:m.color);var v=s.c2p(h.x,!0),y=l.c2p(h.y,!0),x=h.mrc||1,b=o.hoverlabel;b&&(h.hbg=Array.isArray(b.bgcolor)?b.bgcolor[f]:b.bgcolor,h.hbc=Array.isArray(b.bordercolor)?b.bordercolor[f]:b.bordercolor,h.hts=i.isArrayOrTypedArray(b.font.size)?b.font.size[f]:b.font.size,h.htc=Array.isArray(b.font.color)?b.font.color[f]:b.font.color,h.htf=Array.isArray(b.font.family)?b.font.family[f]:b.font.family,h.hnl=i.isArrayOrTypedArray(b.namelength)?b.namelength[f]:b.namelength);var _=o.hoverinfo;_&&(h.hi=Array.isArray(_)?_[f]:_);var w=o.hovertemplate;w&&(h.ht=Array.isArray(w)?w[f]:w);var T={};T[t.index]=h;var k=o._origX,A=o._origY,M=i.extendFlat({},t,{color:a(o,h),x0:v-x,x1:v+x,xLabelVal:k?k[f]:h.x,y0:y-x,y1:y+x,yLabelVal:A?A[f]:h.y,cd:T,distance:c,spikeDistance:u,hovertemplate:h.ht});return h.htx?M.text=h.htx:h.tx?M.text=h.tx:o.text&&(M.text=o.text),i.fillText(h,o,M),n.getComponentMethod(\"errorbars\",\"hoverInfo\")(h,o,M),M}e.exports={hoverPoints:function(t,e,r,n){var i,a,s,l,c,u,f,h,p,d,g=t.cd,m=g[0].t,v=g[0].trace,y=t.xa,x=t.ya,b=m.x,_=m.y,w=y.c2p(e),T=x.c2p(r),k=t.distance;if(m.tree){var A=y.p2c(w-k),M=y.p2c(w+k),S=x.p2c(T-k),E=x.p2c(T+k);i=\"x\"===n?m.tree.range(Math.min(A,M),Math.min(x._rl[0],x._rl[1]),Math.max(A,M),Math.max(x._rl[0],x._rl[1])):m.tree.range(Math.min(A,M),Math.min(S,E),Math.max(A,M),Math.max(S,E))}else i=m.ids;var L=k;if(\"x\"===n){var C=!!v.xperiodalignment,P=!!v.yperiodalignment;for(u=0;u=Math.min(I,O)&&w<=Math.max(I,O)?0:1/0}if(f=Math.min(z,D)&&T<=Math.max(z,D)?0:1/0}d=Math.sqrt(f*f+h*h),s=i[u]}}}else for(u=i.length-1;u>-1;u--)l=b[a=i[u]],c=_[a],f=y.c2p(l)-w,h=x.c2p(c)-T,(p=Math.sqrt(f*f+h*h))v.glText.length){var w=b-v.glText.length;for(d=0;dr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t})),v.line2d.update(v.lineOptions)),v.error2d){var k=(v.errorXOptions||[]).concat(v.errorYOptions||[]);v.error2d.update(k)}v.scatter2d&&v.scatter2d.update(v.markerOptions),v.fillOrder=s.repeat(null,b),v.fill2d&&(v.fillOptions=v.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=v.lineOptions[e],u=[];s._ownfill&&u.push(e),s._nexttrace&&u.push(e+1),u.length&&(v.fillOrder[e]=u);var f,h,p=[],d=c&&c.positions||l.positions;if(\"tozeroy\"===s.fill){for(f=0;ff&&isNaN(d[h+1]);)h-=2;0!==d[f+1]&&(p=[d[f],0]),p=p.concat(d.slice(f,h+2)),0!==d[h+1]&&(p=p.concat([d[h],0]))}else if(\"tozerox\"===s.fill){for(f=0;ff&&isNaN(d[h]);)h-=2;0!==d[f]&&(p=[0,d[f+1]]),p=p.concat(d.slice(f,h+2)),0!==d[h]&&(p=p.concat([0,d[h+1]]))}else if(\"toself\"===s.fill||\"tonext\"===s.fill){for(p=[],i=0,t.splitNull=!0,a=0;a-1;for(d=0;d\")}function u(t){return t+\"\\xb0\"}}e.exports={hoverPoints:function(t,e,r){var o=t.cd,c=o[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(o,(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=o[t.index],m=g.lonlat,v=[i.modHalf(m[0],360)+p,m[1]],y=u.c2p(v),x=f.c2p(v),b=g.mrc||1;t.x0=y-b,t.x1=y+b,t.y0=x-b,t.y1=x+b;var _={};_[c.subplot]={_subplot:h};var w=c._module.formatLabels(g,c,_);return t.lonLabel=w.lonLabel,t.latLabel=w.latLabel,t.color=a(c,g),t.extraText=l(c,g,o[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}},getExtraText:l}},{\"../../components/fx\":406,\"../../constants/numerical\":479,\"../../lib\":503,\"../scatter/get_trace_color\":936}],997:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"../scattergeo/calc\"),plot:t(\"./plot\"),hoverPoints:t(\"./hover\").hoverPoints,eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),styleOnSelect:function(t,e){e&&e[0].trace._glTrace.update(e)},moduleType:\"trace\",name:\"scattermapbox\",basePlotModule:t(\"../../plots/mapbox\"),categories:[\"mapbox\",\"gl\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/mapbox\":613,\"../scatter/marker_colorbar\":944,\"../scattergeo/calc\":969,\"./attributes\":991,\"./defaults\":993,\"./event_data\":994,\"./format_labels\":995,\"./hover\":996,\"./plot\":998,\"./select\":999}],998:[function(t,e,r){\"use strict\";var n=t(\"./convert\"),i=t(\"../../plots/mapbox/constants\").traceLayerPrefix,a=[\"fill\",\"line\",\"circle\",\"symbol\"];function o(t,e){this.type=\"scattermapbox\",this.subplot=t,this.uid=e,this.sourceIds={fill:\"source-\"+e+\"-fill\",line:\"source-\"+e+\"-line\",circle:\"source-\"+e+\"-circle\",symbol:\"source-\"+e+\"-symbol\"},this.layerIds={fill:i+e+\"-fill\",line:i+e+\"-line\",circle:i+e+\"-circle\",symbol:i+e+\"-symbol\"},this.below=null}var s=o.prototype;s.addSource=function(t,e){this.subplot.map.addSource(this.sourceIds[t],{type:\"geojson\",data:e.geojson})},s.setSourceData=function(t,e){this.subplot.map.getSource(this.sourceIds[t]).setData(e.geojson)},s.addLayer=function(t,e,r){this.subplot.addLayer({type:t,id:this.layerIds[t],source:this.sourceIds[t],layout:e.layout,paint:e.paint},r)},s.update=function(t){var e,r,i,o=this.subplot,s=o.map,l=n(o.gd,t),c=o.belowLookup[\"trace-\"+this.uid];if(c!==this.below){for(e=a.length-1;e>=0;e--)r=a[e],s.removeLayer(this.layerIds[r]);for(e=0;e=0;e--){var r=a[e];t.removeLayer(this.layerIds[r]),t.removeSource(this.sourceIds[r])}},e.exports=function(t,e){for(var r=e[0].trace,i=new o(t,r.uid),s=n(t.gd,e),l=i.below=t.belowLookup[\"trace-\"+r.uid],c=0;c\")}}e.exports={hoverPoints: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)return o;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,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}},{\"../scatter/hover\":937}],1005:[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\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"../scatter/select\"),meta:{}}},{\"../../plots/polar\":622,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":1e3,\"./calc\":1001,\"./defaults\":1002,\"./format_labels\":1003,\"./hover\":1004,\"./plot\":1006}],1006:[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=c&&(y.marker.cluster=d.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=_),y.line&&_.length>1&&l.extendFlat(y.line,s.linePositions(t,p,_)),y.text&&(l.extendFlat(y.text,{positions:_},s.textPosition(t,p,y.text,y.marker)),l.extendFlat(y.textSel,{positions:_},s.textPosition(t,p,y.text,y.markerSel)),l.extendFlat(y.textUnsel,{positions:_},s.textPosition(t,p,y.text,y.markerUnsel))),y.fill&&!h.fill2d&&(h.fill2d=!0),y.marker&&!h.scatter2d&&(h.scatter2d=!0),y.line&&!h.line2d&&(h.line2d=!0),y.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(y.line),h.fillOptions.push(y.fill),h.markerOptions.push(y.marker),h.markerSelectedOptions.push(y.markerSel),h.markerUnselectedOptions.push(y.markerUnsel),h.textOptions.push(y.text),h.textSelectedOptions.push(y.textSel),h.textUnselectedOptions.push(y.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),d.x=w,d.y=T,d.rawx=w,d.rawy=T,d.r=m,d.theta=v,d.positions=_,d._scene=h,d.index=h.count,h.count++}})),a(t,e,r)}}},{\"../../lib\":503,\"../scattergl/constants\":980,\"../scattergl/convert\":981,\"../scattergl/plot\":988,\"../scattergl/scene_update\":989,\"@plotly/point-cluster\":59,\"fast-isnumeric\":190}],1014:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../plots/template_attributes\").texttemplateAttrs,a=t(\"../../lib/extend\").extendFlat,o=t(\"../scatter/attributes\"),s=t(\"../../plots/attributes\"),l=o.line;e.exports={mode:o.mode,real:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},imag:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},text:o.text,texttemplate:i({editType:\"plot\"},{keys:[\"real\",\"imag\",\"text\"]}),hovertext:o.hovertext,line:{color:l.color,width:l.width,dash:l.dash,shape:a({},l.shape,{values:[\"linear\",\"spline\"]}),smoothing:l.smoothing,editType:\"calc\"},connectgaps:o.connectgaps,marker:o.marker,cliponaxis:a({},o.cliponaxis,{dflt:!1}),textposition:o.textposition,textfont:o.textfont,fill:a({},o.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:o.fillcolor,hoverinfo:a({},s.hoverinfo,{flags:[\"real\",\"imag\",\"text\",\"name\"]}),hoveron:o.hoveron,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926}],1015:[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(\"../scatter/calc\").calcMarkerSize;e.exports=function(t,e){for(var r=t._fullLayout,c=e.subplot,u=r[c].realaxis,f=r[c].imaginaryaxis,h=u.makeCalcdata(e,\"real\"),p=f.makeCalcdata(e,\"imag\"),d=e._length,g=new Array(d),m=0;m\")}}e.exports={hoverPoints: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)return o;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,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}},{\"../scatter/hover\":937}],1019:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"scattersmith\",basePlotModule:t(\"../../plots/smith\"),categories:[\"smith\",\"symbols\",\"showLegend\",\"scatter-like\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"../scatter/select\"),meta:{}}},{\"../../plots/smith\":629,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":1014,\"./calc\":1015,\"./defaults\":1016,\"./format_labels\":1017,\"./hover\":1018,\"./plot\":1020}],1020:[function(t,e,r){\"use strict\";var n=t(\"../scatter/plot\"),i=t(\"../../constants/numerical\").BADNUM,a=t(\"../../plots/smith/helpers\").smith;e.exports=function(t,e,r){for(var o=e.layers.frontplot.select(\"g.scatterlayer\"),s={xaxis:e.xaxis,yaxis:e.yaxis,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},l=0;l\"),o.hovertemplate=h.hovertemplate,a}function x(t,e){v.push(t._hovertitle+\": \"+e)}}},{\"../scatter/hover\":937}],1027:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../scatter/select\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"scatterternary\",basePlotModule:t(\"../../plots/ternary\"),categories:[\"ternary\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/ternary\":634,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":1021,\"./calc\":1022,\"./defaults\":1023,\"./event_data\":1024,\"./format_labels\":1025,\"./hover\":1026,\"./plot\":1028}],1028:[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\":947}],1029:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../scattergl/attributes\"),l=t(\"../../plots/cartesian/constants\").idRegex,c=t(\"../../plot_api/plot_template\").templatedArray,u=t(\"../../lib/extend\").extendFlat,f=n.marker,h=f.line,p=u(i(\"marker.line\",{editTypeOverride:\"calc\"}),{width:u({},h.width,{editType:\"calc\"}),editType:\"calc\"}),d=u(i(\"marker\"),{symbol:f.symbol,size:u({},f.size,{editType:\"markerSize\"}),sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:f.opacity,colorbar:f.colorbar,line:p,editType:\"calc\"});function g(t){return{valType:\"info_array\",freeLength:!0,editType:\"calc\",items:{valType:\"subplotid\",regex:l[t],editType:\"plot\"}}}d.color.editType=d.cmin.editType=d.cmax.editType=\"style\",e.exports={dimensions:c(\"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\"},matches:{valType:\"boolean\",dflt:!1,editType:\"calc\"},editType:\"calc+clearAxisTypes\"},editType:\"calc+clearAxisTypes\"}),text:u({},s.text,{}),hovertext:u({},s.hovertext,{}),hovertemplate:o(),xhoverformat:a(\"x\"),yhoverformat:a(\"y\"),marker:d,xaxes:g(\"x\"),yaxes:g(\"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:s.selected.marker,editType:\"calc\"},unselected:{marker:s.unselected.marker,editType:\"calc\"},opacity:s.opacity}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/plot_template\":543,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/cartesian/constants\":561,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926,\"../scattergl/attributes\":978}],1030:[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;function u(t,e,r){for(var n=r.matrixOptions.data.length,i=e._visibleDims,a=r.viewOpts.ranges=new Array(n),o=0;oh?b.sizeAvg||Math.max(b.size,3):a(e,x),p=0;pa&&l||i-1,P=!0;if(o(x)||!!p.selectedpoints||C){var I=p._length;if(p.selectedpoints){g.selectBatch=p.selectedpoints;var O=p.selectedpoints,z={};for(l=0;l1&&(u=g[y-1],h=m[y-1],d=v[y-1]),e=0;eu?\"-\":\"+\")+\"x\")).replace(\"y\",(f>h?\"-\":\"+\")+\"y\")).replace(\"z\",(p>d?\"-\":\"+\")+\"z\");var L=function(){y=0,M=[],S=[],E=[]};(!y||y2?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,u=e._len,f={};function d(t,e){var n=r[e],o=i[c[e]];return a.simpleMap(t,(function(t){return n.d2l(t)*o}))}if(f.vectors=l(d(e._u,\"xaxis\"),d(e._v,\"yaxis\"),d(e._w,\"zaxis\"),u),!u)return{positions:[],cells:[]};var g=d(e._Xs,\"xaxis\"),m=d(e._Ys,\"yaxis\"),v=d(e._Zs,\"zaxis\");if(f.meshgrid=[g,m,v],f.gridFill=e._gridFill,e._slen)f.startingPositions=l(d(e._startsX,\"xaxis\"),d(e._startsY,\"yaxis\"),d(e._startsZ,\"zaxis\"));else{for(var y=m[0],x=h(g),b=h(v),_=new Array(x.length*b.length),w=0,T=0;T=0};v?(r=Math.min(m.length,x.length),l=function(t){return A(m[t])&&M(t)},f=function(t){return String(m[t])}):(r=Math.min(y.length,x.length),l=function(t){return A(y[t])&&M(t)},f=function(t){return String(y[t])}),_&&(r=Math.min(r,b.length));for(var S=0;S1){for(var P=a.randstr(),I=0;I\"),name:A||z(\"name\")?y.name:void 0,color:k(\"hoverlabel.bgcolor\")||x.color,borderColor:k(\"hoverlabel.bordercolor\"),fontFamily:k(\"hoverlabel.font.family\"),fontSize:k(\"hoverlabel.font.size\"),fontColor:k(\"hoverlabel.font.color\"),nameLength:k(\"hoverlabel.namelength\"),textAlign:k(\"hoverlabel.align\"),hovertemplate:A,hovertemplateLabels:P,eventData:l};m&&(F.x0=E-i.rInscribed*i.rpx1,F.x1=E+i.rInscribed*i.rpx1,F.idealAlign=i.pxmid[0]<0?\"left\":\"right\"),v&&(F.x=E,F.idealAlign=E<0?\"left\":\"right\");var B=[];o.loneHover(F,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:r,inOut_bbox:B}),l[0].bbox=B[0],d._hasHoverLabel=!0}if(v){var N=t.select(\"path.surface\");h.styleOne(N,i,y,{hovered:!0})}d._hasHoverEvent=!0,r.emit(\"plotly_hover\",{points:l||[f(i,y,h.eventDataKeys)],event:n.event})}})),t.on(\"mouseout\",(function(e){var i=r._fullLayout,a=r._fullData[d.index],s=n.select(this).datum();if(d._hasHoverEvent&&(e.originalEvent=n.event,r.emit(\"plotly_unhover\",{points:[f(s,a,h.eventDataKeys)],event:n.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(o.loneUnhover(i._hoverlayer.node()),d._hasHoverLabel=!1),v){var l=t.select(\"path.surface\");h.styleOne(l,s,a,{hovered:!1})}})),t.on(\"click\",(function(t){var e=r._fullLayout,a=r._fullData[d.index],s=m&&(c.isHierarchyRoot(t)||c.isLeaf(t)),u=c.getPtId(t),p=c.isEntry(t)?c.findEntryWithChild(g,u):c.findEntryWithLevel(g,u),v=c.getPtId(p),y={points:[f(t,a,h.eventDataKeys)],event:n.event};s||(y.nextLevel=v);var x=l.triggerHandler(r,\"plotly_\"+d.type+\"click\",y);if(!1!==x&&e.hovermode&&(r._hoverdata=[f(t,a,h.eventDataKeys)],o.click(r,n.event)),!s&&!1!==x&&!r._dragging&&!r._transitioning){i.call(\"_storeDirectGUIEdit\",a,e._tracePreGUI[a.uid],{level:a.level});var b={data:[{level:v}],traces:[d.index]},_={frame:{redraw:!1,duration:h.transitionTime},transition:{duration:h.transitionTime,easing:h.transitionEasing},mode:\"immediate\",fromcurrent:!0};o.loneUnhover(e._hoverlayer.node()),i.call(\"animate\",r,b,_)}}))}},{\"../../components/fx\":406,\"../../components/fx/helpers\":402,\"../../lib\":503,\"../../lib/events\":492,\"../../registry\":638,\"../pie/helpers\":905,\"./helpers\":1051,\"@plotly/d3\":58}],1051:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\"),a=t(\"../../lib/setcursor\"),o=t(\"../pie/helpers\");function s(t){return t.data.data.pid}r.findEntryWithLevel=function(t,e){var n;return e&&t.eachAfter((function(t){if(r.getPtId(t)===e)return n=t.copy()})),n||t},r.findEntryWithChild=function(t,e){var n;return t.eachAfter((function(t){for(var i=t.children||[],a=0;a0)},r.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},r.isHeader=function(t,e){return!(r.isLeaf(t)||t.depth===e._maxDepth-1)},r.getParent=function(t,e){return r.findEntryWithLevel(t,s(e))},r.listPath=function(t,e){var n=t.parent;if(!n)return[];var i=e?[n.data[e]]:[n];return r.listPath(n,e).concat(i)},r.getPath=function(t){return r.listPath(t,\"label\").join(\"/\")+\"/\"},r.formatValue=o.formatPieValue,r.formatPercent=function(t,e){var r=n.formatPercent(t,0);return\"0%\"===r&&(r=o.formatPiePercent(t,e)),r}},{\"../../components/color\":366,\"../../lib\":503,\"../../lib/setcursor\":524,\"../pie/helpers\":905}],1052:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"sunburst\",basePlotModule:t(\"./base_plot\"),categories:[],animatable:!0,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\").plot,style:t(\"./style\").style,colorbar:t(\"../scatter/marker_colorbar\"),meta:{}}},{\"../scatter/marker_colorbar\":944,\"./attributes\":1045,\"./base_plot\":1046,\"./calc\":1047,\"./defaults\":1049,\"./layout_attributes\":1053,\"./layout_defaults\":1054,\"./plot\":1055,\"./style\":1056}],1053:[function(t,e,r){\"use strict\";e.exports={sunburstcolorway:{valType:\"colorlist\",editType:\"calc\"},extendsunburstcolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],1054:[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(\"sunburstcolorway\",e.colorway),r(\"extendsunburstcolors\")}},{\"../../lib\":503,\"./layout_attributes\":1053}],1055:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-hierarchy\"),a=t(\"d3-interpolate\").interpolate,o=t(\"../../components/drawing\"),s=t(\"../../lib\"),l=t(\"../../lib/svg_text_utils\"),c=t(\"../bar/uniform_text\"),u=c.recordMinTextSize,f=c.clearMinTextSize,h=t(\"../pie/plot\"),p=t(\"../pie/helpers\").getRotationAngle,d=h.computeTransform,g=h.transformInsideText,m=t(\"./style\").styleOne,v=t(\"../bar/style\").resizeText,y=t(\"./fx\"),x=t(\"./constants\"),b=t(\"./helpers\");function _(t,e,c,f){var h=t._fullLayout,v=!h.uniformtext.mode&&b.hasTransition(f),_=n.select(c).selectAll(\"g.slice\"),T=e[0],k=T.trace,A=T.hierarchy,M=b.findEntryWithLevel(A,k.level),S=b.getMaxDepth(k),E=h._size,L=k.domain,C=E.w*(L.x[1]-L.x[0]),P=E.h*(L.y[1]-L.y[0]),I=.5*Math.min(C,P),O=T.cx=E.l+E.w*(L.x[1]+L.x[0])/2,z=T.cy=E.t+E.h*(1-L.y[0])-P/2;if(!M)return _.remove();var D=null,R={};v&&_.each((function(t){R[b.getPtId(t)]={rpx0:t.rpx0,rpx1:t.rpx1,x0:t.x0,x1:t.x1,transform:t.transform},!D&&b.isEntry(t)&&(D=t)}));var F=function(t){return i.partition().size([2*Math.PI,t.height+1])(t)}(M).descendants(),B=M.height+1,N=0,j=S;T.hasMultipleRoots&&b.isHierarchyRoot(M)&&(F=F.slice(1),B-=1,N=1,j+=1),F=F.filter((function(t){return t.y1<=j}));var U=p(k.rotation);U&&F.forEach((function(t){t.x0+=U,t.x1+=U}));var V=Math.min(B,S),H=function(t){return(t-N)/V*I},q=function(t,e){return[t*Math.cos(e),-t*Math.sin(e)]},G=function(t){return s.pathAnnulus(t.rpx0,t.rpx1,t.x0,t.x1,O,z)},Y=function(t){return O+w(t)[0]*(t.transform.rCenter||0)+(t.transform.x||0)},W=function(t){return z+w(t)[1]*(t.transform.rCenter||0)+(t.transform.y||0)};(_=_.data(F,b.getPtId)).enter().append(\"g\").classed(\"slice\",!0),v?_.exit().transition().each((function(){var t=n.select(this);t.select(\"path.surface\").transition().attrTween(\"d\",(function(t){var e=function(t){var e,r=b.getPtId(t),n=R[r],i=R[b.getPtId(M)];if(i){var o=(t.x1>i.x1?2*Math.PI:0)+U;e=t.rpx1X?2*Math.PI:0)+U;e={x0:i,x1:i}}else e={rpx0:I,rpx1:I},s.extendFlat(e,K(t));else e={rpx0:0,rpx1:0};else e={x0:U,x1:U};return a(e,n)}(t);return function(t){return G(e(t))}})):f.attr(\"d\",G),c.call(y,M,t,e,{eventDataKeys:x.eventDataKeys,transitionTime:x.CLICK_TRANSITION_TIME,transitionEasing:x.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,t,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:t._transitioning}),f.call(m,i,k);var p=s.ensureSingle(c,\"g\",\"slicetext\"),_=s.ensureSingle(p,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),w=s.ensureUniformFontSize(t,b.determineTextFont(k,i,h.font));_.text(r.formatSliceLabel(i,M,k,e,h)).classed(\"slicetext\",!0).attr(\"text-anchor\",\"middle\").call(o.font,w).call(l.convertToTspans,t);var A=o.bBox(_.node());i.transform=g(A,i,T),i.transform.targetX=Y(i),i.transform.targetY=W(i);var S=function(t,e){var r=t.transform;return d(r,e),r.fontSize=w.size,u(k.type,r,h),s.getTextTransform(r)};v?_.transition().attrTween(\"transform\",(function(t){var e=function(t){var e,r=R[b.getPtId(t)],n=t.transform;if(r)e=r;else if(e={rpx1:t.rpx1,transform:{textPosAngle:n.textPosAngle,scale:0,rotate:n.rotate,rCenter:n.rCenter,x:n.x,y:n.y}},D)if(t.parent)if(X){var i=t.x1>X?2*Math.PI:0;e.x0=e.x1=i}else s.extendFlat(e,K(t));else e.x0=e.x1=U;else e.x0=e.x1=U;var o=a(e.transform.textPosAngle,t.transform.textPosAngle),l=a(e.rpx1,t.rpx1),c=a(e.x0,t.x0),f=a(e.x1,t.x1),p=a(e.transform.scale,n.scale),d=a(e.transform.rotate,n.rotate),g=0===n.rCenter?3:0===e.transform.rCenter?1/3:1,m=a(e.transform.rCenter,n.rCenter);return function(t){var e=l(t),r=c(t),i=f(t),a=function(t){return m(Math.pow(t,g))}(t),s={pxmid:q(e,(r+i)/2),rpx1:e,transform:{textPosAngle:o(t),rCenter:a,x:n.x,y:n.y}};return u(k.type,n,h),{transform:{targetX:Y(s),targetY:W(s),scale:p(t),rotate:d(t),rCenter:a}}}}(t);return function(t){return S(e(t),A)}})):_.attr(\"transform\",S(i,A))}))}function w(t){return e=t.rpx1,r=t.transform.textPosAngle,[e*Math.sin(r),-e*Math.cos(r)];var e,r}r.plot=function(t,e,r,i){var a,o,s=t._fullLayout,l=s._sunburstlayer,c=!r,u=!s.uniformtext.mode&&b.hasTransition(r);(f(\"sunburst\",s),(a=l.selectAll(\"g.trace.sunburst\").data(e,(function(t){return t[0].trace.uid}))).enter().append(\"g\").classed(\"trace\",!0).classed(\"sunburst\",!0).attr(\"stroke-linejoin\",\"round\"),a.order(),u)?(i&&(o=i()),n.transition().duration(r.duration).ease(r.easing).each(\"end\",(function(){o&&o()})).each(\"interrupt\",(function(){o&&o()})).each((function(){l.selectAll(\"g.trace\").each((function(e){_(t,e,this,r)}))}))):(a.each((function(e){_(t,e,this,r)})),s.uniformtext.mode&&v(t,s._sunburstlayer.selectAll(\".trace\"),\"sunburst\"));c&&a.exit().remove()},r.formatSliceLabel=function(t,e,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!(a||o&&\"none\"!==o))return\"\";var l=i.separators,c=n[0],u=t.data.data,f=c.hierarchy,h=b.isHierarchyRoot(t),p=b.getParent(f,t),d=b.getValue(t);if(!a){var g,m=o.split(\"+\"),v=function(t){return-1!==m.indexOf(t)},y=[];if(v(\"label\")&&u.label&&y.push(u.label),u.hasOwnProperty(\"v\")&&v(\"value\")&&y.push(b.formatValue(u.v,l)),!h){v(\"current path\")&&y.push(b.getPath(t.data));var x=0;v(\"percent parent\")&&x++,v(\"percent entry\")&&x++,v(\"percent root\")&&x++;var _=x>1;if(x){var w,T=function(t){g=b.formatPercent(w,l),_&&(g+=\" of \"+t),y.push(g)};v(\"percent parent\")&&!h&&(w=d/b.getValue(p),T(\"parent\")),v(\"percent entry\")&&(w=d/b.getValue(e),T(\"entry\")),v(\"percent root\")&&(w=d/b.getValue(f),T(\"root\"))}}return v(\"text\")&&(g=s.castOption(r,u.i,\"text\"),s.isValidTextValue(g)&&y.push(g)),y.join(\"
\")}var k=s.castOption(r,u.i,\"texttemplate\");if(!k)return\"\";var A={};u.label&&(A.label=u.label),u.hasOwnProperty(\"v\")&&(A.value=u.v,A.valueLabel=b.formatValue(u.v,l)),A.currentPath=b.getPath(t.data),h||(A.percentParent=d/b.getValue(p),A.percentParentLabel=b.formatPercent(A.percentParent,l),A.parent=b.getPtLabel(p)),A.percentEntry=d/b.getValue(e),A.percentEntryLabel=b.formatPercent(A.percentEntry,l),A.entry=b.getPtLabel(e),A.percentRoot=d/b.getValue(f),A.percentRootLabel=b.formatPercent(A.percentRoot,l),A.root=b.getPtLabel(f),u.hasOwnProperty(\"color\")&&(A.color=u.color);var M=s.castOption(r,u.i,\"text\");return(s.isValidTextValue(M)||\"\"===M)&&(A.text=M),A.customdata=s.castOption(r,u.i,\"customdata\"),s.texttemplateString(k,A,i._d3locale,A,r._meta||{})}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../bar/style\":662,\"../bar/uniform_text\":664,\"../pie/helpers\":905,\"../pie/plot\":909,\"./constants\":1048,\"./fx\":1050,\"./helpers\":1051,\"./style\":1056,\"@plotly/d3\":58,\"d3-hierarchy\":115,\"d3-interpolate\":116}],1056:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../bar/uniform_text\").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,\"marker.line.color\")||i.defaultLine,c=a.castOption(r,s,\"marker.line.width\")||0;t.style(\"stroke-width\",c).call(i.fill,n.color).call(i.stroke,l).style(\"opacity\",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._sunburstlayer.selectAll(\".trace\");o(t,e,\"sunburst\"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style(\"opacity\",r.opacity),e.selectAll(\"path.surface\").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{\"../../components/color\":366,\"../../lib\":503,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],1057:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=t(\"../../plot_api/edit_types\").overrideAll;function u(t){return{show:{valType:\"boolean\",dflt:!1},start:{valType:\"number\",dflt:null,editType:\"plot\"},end:{valType:\"number\",dflt:null,editType:\"plot\"},size:{valType:\"number\",dflt:null,min:0,editType:\"plot\"},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 f=e.exports=c(l({z:{valType:\"data_array\"},x:{valType:\"data_array\"},y:{valType:\"data_array\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:o(),xhoverformat:a(\"x\"),yhoverformat:a(\"y\"),zhoverformat:a(\"z\"),connectgaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},surfacecolor:{valType:\"data_array\"}},i(\"\",{colorAttr:\"z or surfacecolor\",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:\"calc\"}),{contours:{x:u(),y:u(),z:u()},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},opacityscale:{valType:\"any\",editType:\"calc\"},_deprecated:{zauto:l({},i.zauto,{}),zmin:l({},i.zmin,{}),zmax:l({},i.zmax,{})},hoverinfo:l({},s.hoverinfo),showlegend:l({},s.showlegend,{dflt:!1})}),\"calc\",\"nested\");f.x.editType=f.y.editType=f.z.editType=\"calc+clearAxisTypes\",f.transforms=void 0},{\"../../components/color\":366,\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/edit_types\":536,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633}],1058:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.surfacecolor?n(t,e,{vals:e.surfacecolor,containerStr:\"\",cLetter:\"c\"}):n(t,e,{vals:e.z,containerStr:\"\",cLetter:\"c\"})}},{\"../../components/colorscale/calc\":374}],1059:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_surface3d,i=t(\"../../../stackgl_modules\").ndarray,a=t(\"../../../stackgl_modules\").ndarray_linear_interpolate.d2,o=t(\"../heatmap/interp2d\"),s=t(\"../heatmap/find_empties\"),l=t(\"../../lib\").isArrayOrTypedArray,c=t(\"../../lib/gl_format_color\").parseColorScale,u=t(\"../../lib/str2rgbarray\"),f=t(\"../../components/colorscale\").extractOpts;function h(t,e,r){this.scene=t,this.uid=r,this.surface=e,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var p=h.prototype;p.getXat=function(t,e,r,n){var i=l(this.data.x)?l(this.data.x[0])?this.data.x[e][t]:this.data.x[t]:t;return void 0===r?i:n.d2l(i,0,r)},p.getYat=function(t,e,r,n){var i=l(this.data.y)?l(this.data.y[0])?this.data.y[e][t]:this.data.y[e]:e;return void 0===r?i:n.d2l(i,0,r)},p.getZat=function(t,e,r,n){var i=this.data.z[e][t];return null===i&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[e][t]),void 0===r?i:n.d2l(i,0,r)},p.handlePick=function(t){if(t.object===this.surface){var e=(t.data.index[0]-1)/this.dataScaleX-1,r=(t.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(e),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);t.index=[n,i],t.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],t.dataCoordinate=[this.getXat(n,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=t.dataCoordinate[a];null!=o&&(t.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return Array.isArray(s)&&s[i]&&void 0!==s[i][n]?t.textLabel=s[i][n]:t.textLabel=s||\"\",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}};var d=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function g(t,e){if(t0){r=d[n];break}return r}function y(t,e){if(!(t<1||e<1)){for(var r=m(t),n=m(e),i=1,a=0;a_;)r--,r/=v(r),++r1?n:1},p.refineCoords=function(t){for(var e=this.dataScaleX,r=this.dataScaleY,n=t[0].shape[0],a=t[0].shape[1],o=0|Math.floor(t[0].shape[0]*e+1),s=0|Math.floor(t[0].shape[1]*r+1),l=1+n+1,c=1+a+1,u=i(new Float32Array(l*c),[l,c]),f=[1/e,0,0,0,1/r,0,0,0,1],h=0;h0&&null!==this.contourStart[t]&&null!==this.contourEnd[t]&&this.contourEnd[t]>this.contourStart[t]))for(i[t]=!0,e=this.contourStart[t];ea&&(this.minValues[e]=a),this.maxValues[e]\",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\"}}},{}],1066:[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=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)}))),m=e.domain,v=Math.floor(t._fullLayout._size.w*(m.x[1]-m.x[0])),y=Math.floor(t._fullLayout._size.h*(m.y[1]-m.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),T=f(h(x,_),[]),k=f(w,T),A={},M=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})),E=S.reduce(s,0);S=S.map((function(t){return t/E*v}));var L=Math.max(o(e.header.line.width),o(e.cells.line.width)),C={key:e.uid+t._context.staticPlot,translateX:m.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-m.y[1]),size:t._fullLayout._size,width:v,maxLineWidth:L,height:y,columnOrder:M,groupHeight:y,rowBlocks:k,headerRowBlocks:T,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:M[e],xScale:u,x:void 0,calcdata:void 0,columnWidth:S[e]}}))};return C.columns.forEach((function(t){t.calcdata=C,t.x=u(t)})),C}},{\"../../lib/extend\":493,\"./constants\":1065,\"fast-isnumeric\":190}],1067:[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\":493}],1068:[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/i),l=!o||s;t.mayHaveMarkup=o&&i.match(/[<&>]/);var c,u=\"string\"==typeof(c=i)&&c.match(n.latexCheck);t.latex=u;var f,h,p=u?\"\":T(t.calcdata.cells.prefix,e,r)||\"\",d=u?\"\":T(t.calcdata.cells.suffix,e,r)||\"\",g=u?null:T(t.calcdata.cells.format,e,r)||null,m=p+(g?a(g)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&&!l&&!u&&(f=w(m)),t.cellHeightMayIncrease=s||u||t.mayHaveMarkup||(void 0===f?w(m):f),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var v=(\" \"===n.wrapSplitCharacter?m.replace(/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){var e=D(t.rowBlocks,t.page)-t.scrollY;return u(0,e)})),t&&(C(t,r,e,c,n.prevPages,n,0),C(t,r,e,c,n.prevPages,n,1),x(r,t))}}function L(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,u=s.scrollY;s.scrollY=void 0===a?s.scrollY+c*i.event.dy:a;var f=l.selectAll(\".\"+n.cn.yColumn).selectAll(\".\"+n.cn.columnBlock).filter(A);return E(t,f,l),s.scrollY===u}}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]}));b(t,e,a,r),i[o]=n[o]})))}function P(t,e,r,a){return function(){var o=i.select(e.parentNode);o.each((function(t){var e=t.fragments;o.selectAll(\"tspan.line\").each((function(t,r){e[r].width=this.getComputedTextLength()}));var r,i,a=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+a)>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})),o.selectAll(\"tspan.line\").remove(),_(o.select(\".\"+n.cn.cellText),r,t,a),i.select(e.parentNode.parentNode).call(z)}}function I(t,e,r,a,o){return function(){if(!o.settledY){var s=i.select(e.parentNode),l=B(o),c=o.key-l.firstRowIndex,f=l.rows[c].rowHeight,h=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:f,p=Math.max(h,f);p-l.rows[c].rowHeight&&(l.rows[c].rowHeight=p,t.selectAll(\".\"+n.cn.columnCell).call(z),E(null,t.filter(A),0),x(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 u(O(o,i.select(this.parentNode).select(\".\"+n.cn.cellTextHolder).node().getBoundingClientRect().width),a)})),o.settledY=!0}}}function O(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 z(t){t.attr(\"transform\",(function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce((function(t,e){return t+R(e,1/0)}),0),r=R(B(t),t.key);return u(0,r+e)})).selectAll(\".\"+n.cn.cellRect).attr(\"height\",(function(t){return(e=B(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r}))}function D(t,e){for(var r=0,n=e-1;n>=0;n--)r+=F(t[n]);return r}function R(t,e){for(var r=0,n=0;n\",\"<\",\"|\",\"/\",\"\\\\\"],dflt:\">\",editType:\"plot\"},thickness:{valType:\"number\",min:12,editType:\"plot\"},textfont:u({},s.textfont,{}),editType:\"calc\"},text:s.text,textinfo:l.textinfo,texttemplate:i({editType:\"plot\"},{keys:c.eventDataKeys.concat([\"label\",\"value\"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:n({},{keys:c.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u({},s.outsidetextfont,{}),textposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle left\",\"middle center\",\"middle right\",\"bottom left\",\"bottom center\",\"bottom right\"],dflt:\"top left\",editType:\"plot\"},sort:s.sort,root:l.root,domain:o({name:\"treemap\",trace:!0,editType:\"calc\"})}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/domain\":584,\"../../plots/template_attributes\":633,\"../pie/attributes\":900,\"../sunburst/attributes\":1045,\"./constants\":1074}],1072:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"treemap\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":619}],1073:[function(t,e,r){\"use strict\";var n=t(\"../sunburst/calc\");r.calc=function(t,e){return n.calc(t,e)},r.crossTraceCalc=function(t){return n._runCrossTraceCalc(\"treemap\",t)}},{\"../sunburst/calc\":1047}],1074:[function(t,e,r){\"use strict\";e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:\"poly\",eventDataKeys:[\"currentPath\",\"root\",\"entry\",\"percentRoot\",\"percentEntry\",\"percentParent\"],gapWithPathbar:1}},{}],1075:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../components/color\"),o=t(\"../../plots/domain\").defaults,s=t(\"../bar/defaults\").handleText,l=t(\"../bar/constants\").TEXTPAD,c=t(\"../../components/colorscale\"),u=c.hasColorscale,f=c.handleDefaults;e.exports=function(t,e,r,c){function h(r,a){return n.coerce(t,e,i,r,a)}var p=h(\"labels\"),d=h(\"parents\");if(p&&p.length&&d&&d.length){var g=h(\"values\");g&&g.length?h(\"branchvalues\"):h(\"count\"),h(\"level\"),h(\"maxdepth\"),\"squarify\"===h(\"tiling.packing\")&&h(\"tiling.squarifyratio\"),h(\"tiling.flip\"),h(\"tiling.pad\");var m=h(\"text\");h(\"texttemplate\"),e.texttemplate||h(\"textinfo\",Array.isArray(m)?\"text+label\":\"label\"),h(\"hovertext\"),h(\"hovertemplate\");var v=h(\"pathbar.visible\");s(t,e,c,h,\"auto\",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h(\"textposition\");var y=-1!==e.textposition.indexOf(\"bottom\");h(\"marker.line.width\")&&h(\"marker.line.color\",c.paper_bgcolor);var x=h(\"marker.colors\");(e._hasColorscale=u(t,\"marker\",\"colors\")||(t.marker||{}).coloraxis)?f(t,e,c,h,{prefix:\"marker.\",cLetter:\"c\"}):h(\"marker.depthfade\",!(x||[]).length);var b=2*e.textfont.size;h(\"marker.pad.t\",y?b/4:b),h(\"marker.pad.l\",b/4),h(\"marker.pad.r\",b/4),h(\"marker.pad.b\",y?b:b/4),e._hovered={marker:{line:{width:2,color:a.contrast(c.paper_bgcolor)}}},v&&(h(\"pathbar.thickness\",e.pathbar.textfont.size+2*l),h(\"pathbar.side\"),h(\"pathbar.edgeshape\")),h(\"sort\"),h(\"root.color\"),o(e,c,h),e._length=null}else e.visible=!1}},{\"../../components/color\":366,\"../../components/colorscale\":378,\"../../lib\":503,\"../../plots/domain\":584,\"../bar/constants\":650,\"../bar/defaults\":652,\"./attributes\":1071}],1076:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../sunburst/helpers\"),a=t(\"../bar/uniform_text\").clearMinTextSize,o=t(\"../bar/style\").resizeText,s=t(\"./plot_one\");e.exports=function(t,e,r,l,c){var u,f,h=c.type,p=c.drawDescendants,d=t._fullLayout,g=d[\"_\"+h+\"layer\"],m=!r;(a(h,d),(u=g.selectAll(\"g.trace.\"+h).data(e,(function(t){return t[0].trace.uid}))).enter().append(\"g\").classed(\"trace\",!0).classed(h,!0),u.order(),!d.uniformtext.mode&&i.hasTransition(r))?(l&&(f=l()),n.transition().duration(r.duration).ease(r.easing).each(\"end\",(function(){f&&f()})).each(\"interrupt\",(function(){f&&f()})).each((function(){g.selectAll(\"g.trace\").each((function(e){s(t,e,this,r,p)}))}))):(u.each((function(e){s(t,e,this,r,p)})),d.uniformtext.mode&&o(t,g.selectAll(\".trace\"),h));m&&u.exit().remove()}},{\"../bar/style\":662,\"../bar/uniform_text\":664,\"../sunburst/helpers\":1051,\"./plot_one\":1085,\"@plotly/d3\":58}],1077:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../lib/svg_text_utils\"),s=t(\"./partition\"),l=t(\"./style\").styleOne,c=t(\"./constants\"),u=t(\"../sunburst/helpers\"),f=t(\"../sunburst/fx\");e.exports=function(t,e,r,h,p){var d=p.barDifY,g=p.width,m=p.height,v=p.viewX,y=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,T=p.handleSlicesExit,k=p.makeUpdateSliceInterpolator,A=p.makeUpdateTextInterpolator,M={},S=t._fullLayout,E=e[0],L=E.trace,C=E.hierarchy,P=g/L._entryDepth,I=u.listPath(r.data,\"id\"),O=s(C.copy(),[g,m],{packing:\"dice\",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(O=O.filter((function(t){var e=I.indexOf(t.data.id);return-1!==e&&(t.x0=P*e,t.x1=P*(e+1),t.y0=d,t.y1=d+m,t.onPathbar=!0,!0)}))).reverse(),(h=h.data(O,u.getPtId)).enter().append(\"g\").classed(\"pathbar\",!0),T(h,!0,M,[g,m],x),h.order();var z=h;w&&(z=z.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),z.each((function(s){s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-Math.min(g,m)/2),s._hoverY=y(s.y1-m/2);var h=n.select(this),p=i.ensureSingle(h,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?p.transition().attrTween(\"d\",(function(t){var e=k(t,!0,M,[g,m]);return function(t){return x(e(t))}})):p.attr(\"d\",x),h.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),p.call(l,s,L,{hovered:!1}),s._text=(u.getPtLabel(s)||\"\").split(\"
\").join(\" \")||\"\";var d=i.ensureSingle(h,\"g\",\"slicetext\"),T=i.ensureSingle(d,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),E=i.ensureUniformFontSize(t,u.determineTextFont(L,s,S.font,{onPathbar:!0}));T.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",\"start\").call(a.font,E).call(o.convertToTspans,t),s.textBB=a.bBox(T.node()),s.transform=b(s,{fontSize:E.size,onPathbar:!0}),s.transform.fontSize=E.size,w?T.transition().attrTween(\"transform\",(function(t){var e=A(t,!0,M,[g,m]);return function(t){return _(e(t))}})):T.attr(\"transform\",_(s))}))}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../sunburst/fx\":1050,\"../sunburst/helpers\":1051,\"./constants\":1074,\"./partition\":1083,\"./style\":1086,\"@plotly/d3\":58}],1078:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../lib/svg_text_utils\"),s=t(\"./partition\"),l=t(\"./style\").styleOne,c=t(\"./constants\"),u=t(\"../sunburst/helpers\"),f=t(\"../sunburst/fx\"),h=t(\"../sunburst/plot\").formatSliceLabel;e.exports=function(t,e,r,p,d){var g=d.width,m=d.height,v=d.viewX,y=d.viewY,x=d.pathSlice,b=d.toMoveInsideSlice,_=d.strTransform,w=d.hasTransition,T=d.handleSlicesExit,k=d.makeUpdateSliceInterpolator,A=d.makeUpdateTextInterpolator,M=d.prevEntry,S=t._fullLayout,E=e[0].trace,L=-1!==E.textposition.indexOf(\"left\"),C=-1!==E.textposition.indexOf(\"right\"),P=-1!==E.textposition.indexOf(\"bottom\"),I=!P&&!E.marker.pad.t||P&&!E.marker.pad.b,O=s(r,[g,m],{packing:E.tiling.packing,squarifyratio:E.tiling.squarifyratio,flipX:E.tiling.flip.indexOf(\"x\")>-1,flipY:E.tiling.flip.indexOf(\"y\")>-1,pad:{inner:E.tiling.pad,top:E.marker.pad.t,left:E.marker.pad.l,right:E.marker.pad.r,bottom:E.marker.pad.b}}).descendants(),z=1/0,D=-1/0;O.forEach((function(t){var e=t.depth;e>=E._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(z=Math.min(z,e),D=Math.max(D,e))})),p=p.data(O,u.getPtId),E._maxVisibleLayers=isFinite(D)?D-z+1:0,p.enter().append(\"g\").classed(\"slice\",!0),T(p,!1,{},[g,m],x),p.order();var R=null;if(w&&M){var F=u.getPtId(M);p.each((function(t){null===R&&u.getPtId(t)===F&&(R={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var B=function(){return R||{x0:0,x1:g,y0:0,y1:m}},N=p;return w&&(N=N.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),N.each((function(s){var p=u.isHeader(s,E);s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-E.marker.pad.r),s._hoverY=y(P?s.y1-E.marker.pad.b/2:s.y0+E.marker.pad.t/2);var d=n.select(this),T=i.ensureSingle(d,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?T.transition().attrTween(\"d\",(function(t){var e=k(t,!1,B(),[g,m]);return function(t){return x(e(t))}})):T.attr(\"d\",x),d.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{isTransitioning:t._transitioning}),T.call(l,s,E,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text=\"\":s._text=p?I?\"\":u.getPtLabel(s)||\"\":h(s,r,E,e,S)||\"\";var M=i.ensureSingle(d,\"g\",\"slicetext\"),O=i.ensureSingle(M,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),z=i.ensureUniformFontSize(t,u.determineTextFont(E,s,S.font));O.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",C?\"end\":L||p?\"start\":\"middle\").call(a.font,z).call(o.convertToTspans,t),s.textBB=a.bBox(O.node()),s.transform=b(s,{fontSize:z.size,isHeader:p}),s.transform.fontSize=z.size,w?O.transition().attrTween(\"transform\",(function(t){var e=A(t,!1,B(),[g,m]);return function(t){return _(e(t))}})):O.attr(\"transform\",_(s))})),R}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../sunburst/fx\":1050,\"../sunburst/helpers\":1051,\"../sunburst/plot\":1055,\"./constants\":1074,\"./partition\":1083,\"./style\":1086,\"@plotly/d3\":58}],1079:[function(t,e,r){\"use strict\";e.exports=function t(e,r,n){var i;n.swapXY&&(i=e.x0,e.x0=e.y0,e.y0=i,i=e.x1,e.x1=e.y1,e.y1=i),n.flipX&&(i=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-i),n.flipY&&(i=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-i);var a=e.children;if(a)for(var o=0;o-1?C+O:-(I+O):0,D={x0:P,x1:P,y0:z,y1:z+I},R=function(t,e,r){var n=v.tiling.pad,i=function(t){return t-n<=e.x0},a=function(t){return t+n>=e.x1},o=function(t){return t-n<=e.y0},s=function(t){return t+n>=e.y1};return t.x0===e.x0&&t.x1===e.x1&&t.y0===e.y0&&t.y1===e.y1?{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}:{x0:i(t.x0-n)?0:a(t.x0-n)?r[0]:t.x0,x1:i(t.x1+n)?0:a(t.x1+n)?r[0]:t.x1,y0:o(t.y0-n)?0:s(t.y0-n)?r[1]:t.y0,y1:o(t.y1+n)?0:s(t.y1+n)?r[1]:t.y1}},F=null,B={},N={},j=null,U=function(t,e){return e?B[h(t)]:N[h(t)]},V=function(t,e,r,n){if(e)return B[h(x)]||D;var i=N[v.level]||r;return function(t){return t.data.depth-b.data.depth=(n-=(y?m:m.r)-s)){var x=(r+n)/2;r=x,n=x}var b;f?i<(b=a-(y?m:m.b))&&b\"===tt?(l.x-=a,c.x-=a,u.x-=a,f.x-=a):\"/\"===tt?(u.x-=a,f.x-=a,o.x-=a/2,s.x-=a/2):\"\\\\\"===tt?(l.x-=a,c.x-=a,o.x-=a/2,s.x-=a/2):\"<\"===tt&&(o.x-=a,s.x-=a),$(l),$(f),$(o),$(c),$(u),$(s),\"M\"+K(l.x,l.y)+\"L\"+K(c.x,c.y)+\"L\"+K(s.x,s.y)+\"L\"+K(u.x,u.y)+\"L\"+K(f.x,f.y)+\"L\"+K(o.x,o.y)+\"Z\"},toMoveInsideSlice:et,makeUpdateSliceInterpolator:nt,makeUpdateTextInterpolator:it,handleSlicesExit:at,hasTransition:A,strTransform:ot}):w.remove()}},{\"../../lib\":503,\"../bar/constants\":650,\"../bar/plot\":659,\"../bar/uniform_text\":664,\"../sunburst/helpers\":1051,\"./constants\":1074,\"./draw_ancestors\":1077,\"@plotly/d3\":58,\"d3-interpolate\":116}],1086:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../sunburst/helpers\"),s=t(\"../bar/uniform_text\").resizeText;function l(t,e,r,n){var s,l,c=(n||{}).hovered,u=e.data.data,f=u.i,h=u.color,p=o.isHierarchyRoot(e),d=1;if(c)s=r._hovered.marker.line.color,l=r._hovered.marker.line.width;else if(p&&h===r.root.color)d=100,s=\"rgba(0,0,0,0)\",l=0;else if(s=a.castOption(r,f,\"marker.line.color\")||i.defaultLine,l=a.castOption(r,f,\"marker.line.width\")||0,!r._hasColorscale&&!e.onPathbar){var g=r.marker.depthfade;if(g){var m,v=i.combine(i.addOpacity(r._backgroundColor,.75),h);if(!0===g){var y=o.getMaxDepth(r);m=isFinite(y)?o.isLeaf(e)?0:r._maxVisibleLayers-(e.data.depth-r._entryDepth):e.data.height+1}else m=e.data.depth-r._entryDepth,r._atRootLevel||m++;if(m>0)for(var x=0;x0){var x,b,_,w,T,k=t.xa,A=t.ya;\"h\"===p.orientation?(T=e,x=\"y\",_=A,b=\"x\",w=k):(T=r,x=\"x\",_=k,b=\"y\",w=A);var M=h[t.index];if(T>=M.span[0]&&T<=M.span[1]){var S=n.extendFlat({},t),E=w.c2p(T,!0),L=o.getKdeValue(M,p,T),C=o.getPositionOnKdePath(M,p,E),P=_._offset,I=_._length;S[x+\"0\"]=C[0],S[x+\"1\"]=C[1],S[b+\"0\"]=S[b+\"1\"]=E,S[b+\"Label\"]=b+\": \"+i.hoverLabelText(w,T,p[b+\"hoverformat\"])+\", \"+h[0].t.labels.kde+\" \"+L.toFixed(3),S.spikeDistance=y[0].spikeDistance;var O=x+\"Spike\";S[O]=y[0][O],y[0].spikeDistance=void 0,y[0][O]=void 0,S.hovertemplate=!1,v.push(S),(u={stroke:t.color})[x+\"1\"]=n.constrain(P+C[0],P,P+I),u[x+\"2\"]=n.constrain(P+C[1],P,P+I),u[b+\"1\"]=u[b+\"2\"]=w._offset+E}}g&&(v=v.concat(y))}-1!==d.indexOf(\"points\")&&(c=a.hoverOnPoints(t,e,r));var z=f.selectAll(\".violinline-\"+p.uid).data(u?[0]:[]);return z.enter().append(\"line\").classed(\"violinline-\"+p.uid,!0).attr(\"stroke-width\",1.5),z.exit().remove(),z.attr(u),\"closest\"===s?c?[c]:v:c?(v.push(c),v):v}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"../box/hover\":678,\"./helpers\":1091}],1093:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"../box/defaults\").crossTraceDefaults,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\":568,\"../box/defaults\":676,\"../box/select\":683,\"../scatter/style\":950,\"./attributes\":1087,\"./calc\":1088,\"./cross_trace_calc\":1089,\"./defaults\":1090,\"./hover\":1092,\"./layout_attributes\":1094,\"./layout_defaults\":1095,\"./plot\":1096,\"./style\":1097}],1094:[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\":503,\"../box/layout_attributes\":680}],1095:[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\":503,\"../box/layout_defaults\":681,\"./layout_attributes\":1094}],1096:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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,linearized:!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;if(!0!==c.visible||s.empty)r.remove();else{var d=s.bPos,g=s.bdPos,m=e[s.valLetter+\"axis\"],v=e[s.posLetter+\"axis\"],y=\"both\"===c.side,x=y||\"positive\"===c.side,b=y||\"negative\"===c.side,_=r.selectAll(\"path.violin\").data(i.identity);_.enter().append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").attr(\"class\",\"violin\"),_.exit().remove(),_.each((function(t){var e,r,i,a,o,l,f,h,_=n.select(this),w=t.density,T=w.length,k=v.c2l(t.pos+d,!0),A=v.l2p(k);if(c.width)e=s.maxKDE/g;else{var M=u._violinScaleGroupStats[c.scalegroup];e=\"count\"===c.scalemode?M.maxKDE/g*(M.maxCount/t.pts.length):M.maxKDE/g}if(x){for(f=new Array(T),o=0;o\")),u.color=function(t,e){var r=t[e.dir].marker,n=r.color,a=r.line.color,o=r.line.width;if(i(n))return n;if(i(a)&&o)return a}(h,m),[u]}function k(t){return n(g,t,h[d+\"hoverformat\"])}}},{\"../../components/color\":366,\"../../constants/delta.js\":473,\"../../plots/cartesian/axes\":554,\"../bar/hover\":655}],1109:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\"),plot:t(\"./plot\"),style:t(\"./style\").style,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"../bar/select\"),moduleType:\"trace\",name:\"waterfall\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"../bar/select\":660,\"./attributes\":1102,\"./calc\":1103,\"./cross_trace_calc\":1105,\"./defaults\":1106,\"./event_data\":1107,\"./hover\":1108,\"./layout_attributes\":1110,\"./layout_defaults\":1111,\"./plot\":1112,\"./style\":1113}],1110:[function(t,e,r){\"use strict\";e.exports={waterfallmode:{valType:\"enumerated\",values:[\"group\",\"overlay\"],dflt:\"group\",editType:\"calc\"},waterfallgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},waterfallgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],1111:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s0&&(m+=h?\"M\"+f[0]+\",\"+d[1]+\"V\"+d[0]:\"M\"+f[1]+\",\"+d[0]+\"H\"+f[0]),\"between\"!==p&&(r.isSum||s path\").each((function(t){if(!t.isBlank){var e=s[t.dir].marker;n.select(this).call(a.fill,e.color).call(a.stroke,e.line.color).call(i.dashLine,e.line.dash,e.line.width).style(\"opacity\",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(\".lines\").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll(\"path\"),t.width,t.color,t.dash)}))}))}}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../constants/interactions\":478,\"../bar/style\":662,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],1114:[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,a=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,i=0;ii&&(i=u,o=c)}}return i?a(o):s};case\"rms\":return function(t,e){for(var r=0,i=0,o=0;o\":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[0]&&es[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 es[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[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?(m=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(f))},v=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(m=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},v=function(t,e){var r=x[t.astr][e];t.get().push(r)}),k(m);for(var w=o(e.transforms,r),T=0;T1?\"%{group} (%{trace})\":\"%{group}\");var l=t.styles,c=o.styles=[];if(l)for(a=0;a0?o-4:o;for(r=0;r>16&255,l[u++]=e>>8&255,l[u++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,l[u++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e);return l},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=0,s=r-i;os?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;s0)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>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join(\"\")}i[\"-\".charCodeAt(0)]=62,i[\"_\".charCodeAt(0)]=63},{}],2:[function(t,e,r){},{}],3:[function(t,e,r){(function(e){(function(){\n", + "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\":255,\"./lib/epsilon\":256,\"./lib/geojson\":257,\"./lib/intersecter\":258,\"./lib/segment-chainer\":260,\"./lib/segment-selector\":261}],255:[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\")}}}},{}],256:[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)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])t!=o-i>t&&(a-c)*(i-u)/(o-u)+c-n>t&&(s=!s),a=c,o=u}return s}};return e}},{}],257:[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;i0}))}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 m(){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 v,y=m();if(y){var x;if(t)(x=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above);else y.seg.otherFill=h.seg.myFill;r&&r.segmentUpdate(y.seg),h.other.remove(),h.remove()}if(a.getHead()!==h){r&&r.rewind(h.seg);continue}if(t)x=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=x?!h.seg.myFill.below:h.seg.myFill.below;else if(null===h.seg.otherFill)v=g?h.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:h.primary?o:i,h.seg.otherFill={above:v,below:v};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;l0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,t)}},a.prototype.read_uint16=function(t){var e=this.input;if(t+2>e.length)throw n(\"unexpected EOF\",\"EBADDATA\");return this.big_endian?256*e[t]+e[t+1]:e[t]+256*e[t+1]},a.prototype.read_uint32=function(t){var e=this.input;if(t+4>e.length)throw n(\"unexpected EOF\",\"EBADDATA\");return this.big_endian?16777216*e[t]+65536*e[t+1]+256*e[t+2]+e[t+3]:e[t]+256*e[t+1]+65536*e[t+2]+16777216*e[t+3]},a.prototype.is_subifd_link=function(t,e){return 0===t&&34665===e||0===t&&34853===e||34665===t&&40965===e},a.prototype.exif_format_length=function(t){switch(t){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},a.prototype.exif_format_read=function(t,e){var r;switch(t){case 1:case 2:return r=this.input[e];case 6:return(r=this.input[e])|33554430*(128&r);case 3:return r=this.read_uint16(e);case 8:return(r=this.read_uint16(e))|131070*(32768&r);case 4:return r=this.read_uint32(e);case 9:return 0|(r=this.read_uint32(e));case 5:case 10:case 11:case 12:case 7:default:return null}},a.prototype.scan_ifd=function(t,e,r){var a=this.read_uint16(e);e+=2;for(var o=0;othis.input.length)throw n(\"unexpected EOF\",\"EBADDATA\");for(var d=[],g=h,m=0;m0&&(this.ifds_to_read.push({id:s,offset:d[0]}),p=!0),!1===r({is_big_endian:this.big_endian,ifd:t,tag:s,format:l,count:c,entry_offset:e+this.start,data_length:f,data_offset:h+this.start,value:d,is_subifd_link:p}))return void(this.aborted=!0);e+=12}0===t&&this.ifds_to_read.push({id:1,offset:this.read_uint32(e)})},e.exports.ExifParser=a,e.exports.get_orientation=function(t){var e=0;try{return new a(t,0,t.length).each((function(t){if(0===t.ifd&&274===t.tag&&Array.isArray(t.value))return e=t.value[0],!1})),e}catch(t){return-1}}},{}],264:[function(t,e,r){\"use strict\";var n=t(\"./common\").readUInt16BE,i=t(\"./common\").readUInt32BE;function a(t,e){if(t.length<4+e)return null;var r=i(t,e);return t.length>4&15,i=15&t[4],a=t[5]>>4&15,o=n(t,6),l=8,c=0;ce.width||t.width===e.width&&t.height>e.height?t:e})),i=r.reduce((function(t,e){return t.height>e.height||t.height===e.height&&t.width>e.width?t:e})),n.width>i.height||n.width===i.height&&n.height>i.width?n:i),s=1;e.transforms.forEach((function(t){var e={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},r={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(\"imir\"===t.type&&(s=0===t.value?r[s]:e[s=e[s=r[s]]]),\"irot\"===t.type)for(var n=0;n1&&(h.variants=f.variants),f.orientation&&(h.orientation=f.orientation),f.exif_location&&f.exif_location.offset+f.exif_location.length<=t.length){var p=a(t,f.exif_location.offset),d=t.slice(f.exif_location.offset+p+4,f.exif_location.offset+f.exif_location.length),g=s.get_orientation(d);g>0&&(h.orientation=g)}return h}}}}}}},{\"../common\":262,\"../exif_utils\":263,\"../miaf_utils\":264}],266:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt16LE,o=n(\"BM\");e.exports=function(t){if(!(t.length<26)&&i(t,0,o))return{width:a(t,18),height:a(t,22),type:\"bmp\",mime:\"image/bmp\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],267:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt16LE,o=n(\"GIF87a\"),s=n(\"GIF89a\");e.exports=function(t){if(!(t.length<10)&&(i(t,0,o)||i(t,0,s)))return{width:a(t,6),height:a(t,8),type:\"gif\",mime:\"image/gif\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],268:[function(t,e,r){\"use strict\";var n=t(\"../common\").readUInt16LE;e.exports=function(t){var e=n(t,0),r=n(t,2),i=n(t,4);if(0===e&&1===r&&i){for(var a=[],o={width:0,height:0},s=0;so.width||c>o.height)&&(o=u)}return{width:o.width,height:o.height,variants:a,type:\"ico\",mime:\"image/x-icon\",wUnits:\"px\",hUnits:\"px\"}}}},{\"../common\":262}],269:[function(t,e,r){\"use strict\";var n=t(\"../common\").readUInt16BE,i=t(\"../common\").str2arr,a=t(\"../common\").sliceEq,o=t(\"../exif_utils\"),s=i(\"Exif\\0\\0\");e.exports=function(t){if(!(t.length<2)&&255===t[0]&&216===t[1]&&255===t[2])for(var e=2;;){for(;;){if(t.length-e<2)return;if(255===t[e++])break}for(var r,i,l=t[e++];255===l;)l=t[e++];if(208<=l&&l<=217||1===l)r=0;else{if(!(192<=l&&l<=254))return;if(t.length-e<2)return;r=n(t,e)-2,e+=2}if(217===l||218===l)return;if(225===l&&r>=10&&a(t,e,s)&&(i=o.get_orientation(t.slice(e+6,e+r))),r>=5&&192<=l&&l<=207&&196!==l&&200!==l&&204!==l){if(t.length-e0&&(c.orientation=i),c}e+=r}}},{\"../common\":262,\"../exif_utils\":263}],270:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt32BE,o=n(\"\\x89PNG\\r\\n\\x1a\\n\"),s=n(\"IHDR\");e.exports=function(t){if(!(t.length<24)&&i(t,0,o)&&i(t,12,s))return{width:a(t,16),height:a(t,20),type:\"png\",mime:\"image/png\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],271:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt32BE,o=n(\"8BPS\\0\\x01\");e.exports=function(t){if(!(t.length<22)&&i(t,0,o))return{width:a(t,18),height:a(t,14),type:\"psd\",mime:\"image/vnd.adobe.photoshop\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],272:[function(t,e,r){\"use strict\";function n(t){return\"number\"==typeof t&&isFinite(t)&&t>0}var i=/<[-_.:a-zA-Z0-9][^>]*>/,a=/^<([-_.:a-zA-Z0-9]+:)?svg\\s/,o=/[^-]\\bwidth=\"([^%]+?)\"|[^-]\\bwidth='([^%]+?)'/,s=/\\bheight=\"([^%]+?)\"|\\bheight='([^%]+?)'/,l=/\\bview[bB]ox=\"(.+?)\"|\\bview[bB]ox='(.+?)'/,c=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function u(t){return c.test(t)?t.match(c)[0]:\"px\"}e.exports=function(t){if(function(t){var e,r=0,n=t.length;for(239===t[0]&&187===t[1]&&191===t[2]&&(r=3);r>14&16383),type:\"webp\",mime:\"image/webp\",wUnits:\"px\",hUnits:\"px\"}}}function h(t,e){return{width:1+(t[e+6]<<16|t[e+5]<<8|t[e+4]),height:1+(t[e+9]<t.length)){for(;e+8=10?r=r||u(t,e+8):\"VP8L\"===p&&d>=9?r=r||f(t,e+8):\"VP8X\"===p&&d>=10?r=r||h(t,e+8):\"EXIF\"===p&&(n=s.get_orientation(t.slice(e+8,e+8+d)),e=1/0),e+=8+d}else e++;if(r)return n>0&&(r.orientation=n),r}}}},{\"../common\":262,\"../exif_utils\":263}],275:[function(t,e,r){\"use strict\";e.exports={avif:t(\"./parse_sync/avif\"),bmp:t(\"./parse_sync/bmp\"),gif:t(\"./parse_sync/gif\"),ico:t(\"./parse_sync/ico\"),jpeg:t(\"./parse_sync/jpeg\"),png:t(\"./parse_sync/png\"),psd:t(\"./parse_sync/psd\"),svg:t(\"./parse_sync/svg\"),tiff:t(\"./parse_sync/tiff\"),webp:t(\"./parse_sync/webp\")}},{\"./parse_sync/avif\":265,\"./parse_sync/bmp\":266,\"./parse_sync/gif\":267,\"./parse_sync/ico\":268,\"./parse_sync/jpeg\":269,\"./parse_sync/png\":270,\"./parse_sync/psd\":271,\"./parse_sync/svg\":272,\"./parse_sync/tiff\":273,\"./parse_sync/webp\":274}],276:[function(t,e,r){\"use strict\";var n=t(\"./lib/parsers_sync\");e.exports=function(t){return function(t){for(var e=Object.keys(n),r=0;r1)for(var r=1;r1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function T(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 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 float dashLength, pixelRatio, thickness, opacity, id, miterMode;\\nuniform sampler2D dashTexture;\\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) / dashLength) * .5 + .25;\\n\\tfloat dash = texture2D(dashTexture, 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||\"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\",splitNull:\"splitNull\"}),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=D}));(I=I.slice(0,R)).push(D)}for(var F=function(t){var e=k.slice(2*z,2*I[t]).concat(D?k.slice(2*D):[]),r=(d.hole||[]).map((function(e){return e-D+(I[t]-z)})),n=c(e,r);n=n.map((function(e){return e+z+(e+zt.length)&&(e=t.length);for(var r=0,n=new Array(e);r 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\"]),l.vert=h([\"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 bool constPointSize;\\nuniform float pixelRatio;\\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\\nuniform sampler2D paletteTexture;\\n\\nconst float maxSize = 100.;\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragBorderRadius, fragWidth;\\n\\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\\n\\nbool isDirect = (paletteSize.x < 1.);\\n\\nvec4 getColor(vec4 id) {\\n return isDirect ? id / 255. : texture2D(paletteTexture,\\n vec2(\\n (id.x + .5) / paletteSize.x,\\n (id.y + .5) / paletteSize.y\\n )\\n );\\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) * pointSizeScale;\\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\"]),m&&(l.frag=l.frag.replace(\"smoothstep\",\"smoothStep\"),s.frag=s.frag.replace(\"smoothstep\",\"smoothStep\")),this.drawCircle=t(l)}b.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},b.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},b.prototype.draw=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;nn)?e.tree=u(t,{bounds:f}):n&&n.length&&(e.tree=n),e.tree){var h={primitive:\"points\",usage:\"static\",data:e.tree,type:\"uint32\"};e.elements?e.elements(h):e.elements=o.elements(h)}var p=v.float32(t);return i({data:p,usage:\"dynamic\"}),a({data:v.fract32(t,p),usage:\"dynamic\"}),s({data:new Uint8Array(c),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=[],s=0,l=Math.min(e.length,r.count);s=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;o4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===i.length?i[0]:i},b.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;i2?(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;nk))&&(s.lower||!(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)||W(t.data))}function c(t,e,r,n,i,a){for(var o=0;o(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)||W(t)||l(t)?e=t:(\"data\"in t&&(e=t.data),\"usage\"in t&&(r=Q[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>>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,r.height>>=i,p(r,n[i]),t.mipmask|=1<e;++e)t.images[e]=null;return t}function C(t){for(var e=t.images,r=0;re){for(var r=0;r=--this.refCount&&F(this)}}),o.profile&&(a.getTotalTextureSize=function(){var t=0;return Object.keys(yt).forEach((function(e){t+=yt[e].stats.size})),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;P.call(r);var a=L();return\"number\"==typeof t?M(a,0|t,\"number\"==typeof e?0|e:0|t):t?(I(r,t),S(a,t)):M(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),E(a,3553),O(r,3553),R(),C(a),o.profile&&(i.stats.size=T(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 z(3553);return yt[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=v();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(),k(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=0;i.mipmask>>l;++l){var c=a>>l,u=s>>l;if(!c||!u)break;t.texImage2D(3553,l,i.format,c,u,0,i.format,i.type,null)}return R(),o.profile&&(i.stats.size=T(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(P.call(l),s=0;6>s;++s)g[s]=L();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(I(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)M(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)E(g[s],34069+s);for(O(l,34067),R(),o.profile&&(h.stats.size=T(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)C(g[s]);return f}var h=new z(34067);yt[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=v();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(),k(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=T(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;er;++r)if(0!=(e.mipmask&1<>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);O(e.texInfo,e.target)}))},refresh:function(){for(var e=0;ei;++i){for(c=0;ct;++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(k).forEach(m)},restore:function(){x.cur=null,x.next=null,x.dirty=!0,X(k).forEach((function(e){e.framebuffer=t.createFramebuffer(),v(e)}))}})}function M(){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,i,a,o){function s(){this.id=++f,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var t=e.oes_vertex_array_object;this.vao=t?t.createVertexArrayOES():null,h[this.id]=this,this.buffers=[]}var c=r.maxAttributes,u=Array(c);for(r=0;r=h.byteLength?c.subdata(h):(c.destroy(),r.buffers[s]=null)),r.buffers[s]||(c=r.buffers[s]=i.create(u,34962,!1,!0)),f.buffer=i.getBuffer(c),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1,t[s]=1;else i.getBuffer(u)?(f.buffer=i.getBuffer(u),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1):i.getBuffer(u.buffer)?(f.buffer=i.getBuffer(u.buffer),f.size=0|(+u.size||f.buffer.dimension),f.normalized=!!u.normalized||!1,f.type=\"type\"in u?K[u.type]:f.buffer.dtype,f.offset=0|(u.offset||0),f.stride=0|(u.stride||0),f.divisor=0|(u.divisor||0),f.state=1):\"x\"in u&&(f.x=+u.x||0,f.y=+u.y||0,f.z=+u.z||0,f.w=+u.w||0,f.state=2)}for(c=0;ct&&(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(e,n,i,a){var o=f[n];o||(o=f[n]={});var p=o[e];if(p&&(p.refCount++,!a))return p;var d=new s(n,e);return r.shaderCount++,l(d,i,a),p||(o[e]=d),h.push(d),j(d,{destroy:function(){if(d.refCount--,0>=d.refCount){t.deleteProgram(d.program);var e=h.indexOf(d);h.splice(e,1),r.shaderCount--}0>=o[d.vertId].refCount&&(t.deleteShader(u[d.vertId]),delete u[d.vertId],delete f[d.fragId][d.vertId]),Object.keys(f[d.fragId]).length||(t.deleteShader(c[d.fragId]),delete c[d.fragId],delete f[d.fragId])}})},restore:function(){c={},u={};for(var t=0;t\"+e+\"?\"+i+\".constant[\"+e+\"]:0;\"})).join(\"\"),\"}}else{\",\"if(\",s,\"(\",i,\".buffer)){\",u,\"=\",a,\".createStream(\",34962,\",\",i,\".buffer);\",\"}else{\",u,\"=\",a,\".getBuffer(\",i,\".buffer);\",\"}\",f,'=\"type\" in ',i,\"?\",o.glTypes,\"[\",i,\".type]:\",u,\".dtype;\",l.normalized,\"=!!\",i,\".normalized;\"),n(\"size\"),n(\"offset\"),n(\"stride\"),n(\"divisor\"),r(\"}}\"),r.exit(\"if(\",l.isStream,\"){\",a,\".destroyStream(\",u,\");\",\"}\"),l}))})),o}function A(t,e,n,i,o){function s(t){var e=c[t];e&&(h[t]=e)}var l=function(t,e){if(\"string\"==typeof(r=t.static).frag&&\"string\"==typeof r.vert){if(0>1)\",s],\");\")}function e(){r(l,\".drawArraysInstancedANGLE(\",[d,g,m,s],\");\")}p&&\"null\"!==p?y?t():(r(\"if(\",p,\"){\"),t(),r(\"}else{\"),e(),r(\"}\")):e()}function o(){function t(){r(u+\".drawElements(\"+[d,m,v,g+\"<<((\"+v+\"-5121)>>1)\"]+\");\")}function e(){r(u+\".drawArrays(\"+[d,g,m]+\");\")}p&&\"null\"!==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),h.elementsActive&&a(\"if(\"+i+\")\"+u+\".bindBuffer(34963,\"+i+\".buffer.buffer);\")):(i=a.def(),a(i,\"=\",f,\".\",\"elements\",\";\",\"if(\",i,\"){\",u,\".bindBuffer(\",34963,\",\",i,\".buffer.buffer);}\",\"else if(\",c.vao,\".currentVAO){\",i,\"=\",t.shared.elements+\".getElements(\"+c.vao,\".currentVAO.elements);\",nt?\"\":\"if(\"+i+\")\"+u+\".bindBuffer(34963,\"+i+\".buffer.buffer);\",\"}\")),i}(),d=i(\"primitive\"),g=i(\"offset\"),m=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 m){if(0===m)return}else r(\"if(\",m,\"){\"),r.exit(\"}\");tt&&(s=i(\"instances\"),l=t.instancing);var v=p+\".type\",y=h.elements&&D(h.elements)&&!h.vaoActive;tt&&(\"number\"!=typeof s||0<=s)?\"string\"==typeof s?(r(\"if(\",s,\">0){\"),a(),r(\"}else if(\",s,\"<0){\"),o(),r(\"}\")):a():o()}function G(t,e,r,n,i){return i=(e=b()).proc(\"body\",i),tt&&(e.instancing=i.def(e.shared.extensions,\".angle_instanced_arrays\")),t(e,i,r,n),e.compile().body}function Y(t,e,r,n){B(t,e),r.useVAO?r.drawVAO?e(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,e),\");\"):e(t.shared.vao,\".setVAO(\",t.shared.vao,\".targetVAO);\"):(e(t.shared.vao,\".setVAO(null);\"),U(t,e,r,n.attributes,(function(){return!0}))),H(t,e,r,n.uniforms,(function(){return!0}),!1),q(t,e,e,r)}function W(t,e,r,n){function i(){return!0}t.batchId=\"a1\",B(t,e),U(t,e,r,n.attributes,i),H(t,e,r,n.uniforms,i,!1),q(t,e,e,r)}function X(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}B(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&&M(t,u,r.context),r.needsFramebuffer&&S(t,u,r.framebuffer),L(t,u,r.state,i),r.profile&&i(r.profile)&&N(t,u,r,!1,!0),n?(r.useVAO?r.drawVAO?i(r.drawVAO)?u(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,u),\");\"):c(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,c),\");\"):c(t.shared.vao,\".setVAO(\",t.shared.vao,\".targetVAO);\"):(c(t.shared.vao,\".setVAO(null);\"),U(t,c,r,n.attributes,a),U(t,u,r,n.attributes,i)),H(t,c,r,n.uniforms,a,!1),H(t,u,r,n.uniforms,i,!0),q(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 G(W,t,r,e,2)})),\"(\",n,\");}\",c,\".call(this,a0[\",s,\"],\",s,\");\"))}function Z(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;M(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),O(Object.keys(r.state)).forEach((function(e){var n=r.state[e].append(t,i);m(n)?n.forEach((function(r,n){i.set(t.next[e],\"[\"+n+\"]\",r)})):i.set(a.next,\".\"+e,n)})),N(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){var o=r.uniforms[n].append(t,i);Array.isArray(o)&&(o=\"[\"+o.join()+\"]\"),i.set(a.uniforms,\"[\"+e.id(n)+\"]\",o)})),Object.keys(r.attributes).forEach((function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new Q).forEach((function(t){i.set(a,\".\"+t,n[t])}))})),r.scopeVAO&&i.set(a.vao,\".targetVAO\",r.scopeVAO.append(t,i)),n(\"vert\"),n(\"frag\"),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.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)}}},xt=[];xt[6408]=4,xt[6407]=3;var bt=[];bt[5121]=1,bt[5126]=4,bt[36193]=2;var _t=[\"x\",\"y\",\"z\",\"w\"],wt=\"blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset\".split(\" \"),Tt={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},At={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,\"increment wrap\":34055,\"decrement wrap\":34056,invert:5386},Mt={cw:2304,ccw:2305},St=new z(!1,!1,!1,(function(){}));return function(t){function e(){if(0===J.length)w&&w.update(),tt=null;else{tt=H.next(e),f();for(var t=J.length-1;0<=t;--t){var r=J[t];r&&r(P,null,0)}m.flush(),w&&w.update()}}function r(){!tt&&0=J.length&&n()}}}}function u(){var t=X.viewport,e=X.scissor_box;t[0]=t[1]=e[0]=e[1]=0,P.viewportWidth=P.framebufferWidth=P.drawingBufferWidth=t[2]=e[2]=m.drawingBufferWidth,P.viewportHeight=P.framebufferHeight=P.drawingBufferHeight=t[3]=e[3]=m.drawingBufferHeight}function f(){P.tick+=1,P.time=g(),u(),W.procs.poll()}function h(){F.refresh(),u(),W.procs.refresh(),w&&w.update()}function g(){return(q()-T)/1e3}if(!(t=i(t)))return null;var m=t.gl,v=m.getContextAttributes();m.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;ie;++e)et(j({framebuffer:t.framebuffer.faces[e]},t),l);else et(t,l);else l(0,t)},prop:V.define.bind(null,1),context:V.define.bind(null,2),this:V.define.bind(null,3),draw:s({}),buffer:function(t){return O.create(t,34962,!1,!1)},elements:function(t){return z.create(t,!1)},texture:F.create2D,cube:F.createCube,renderbuffer:U.create,framebuffer:G.create,framebufferCube:G.createCube,vao:D.createVAO,attributes:v,frame:c,on:function(t,e){var r;switch(t){case\"frame\":return c(e);case\"lost\":r=K;break;case\"restore\":r=Q;break;case\"destroy\":r=$}return r.push(e),{cancel:function(){for(var t=0;t2?\"one of \".concat(e,\" \").concat(t.slice(0,r-1).join(\", \"),\", or \")+t[r-1]:2===r?\"one of \".concat(e,\" \").concat(t[0],\" or \").concat(t[1]):\"of \".concat(e,\" \").concat(t[0])}return\"of \".concat(e,\" \").concat(String(t))}i(\"ERR_INVALID_OPT_VALUE\",(function(t,e){return'The value \"'+e+'\" is invalid for option \"'+t+'\"'}),TypeError),i(\"ERR_INVALID_ARG_TYPE\",(function(t,e,r){var n,i,o,s;if(\"string\"==typeof e&&(i=\"not \",e.substr(!o||o<0?0:+o,i.length)===i)?(n=\"must not be\",e=e.replace(/^not /,\"\")):n=\"must be\",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t,\" argument\"))s=\"The \".concat(t,\" \").concat(n,\" \").concat(a(e,\"type\"));else{var l=function(t,e,r){return\"number\"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,\".\")?\"property\":\"argument\";s='The \"'.concat(t,'\" ').concat(l,\" \").concat(n,\" \").concat(a(e,\"type\"))}return s+=\". Received type \".concat(typeof r)}),TypeError),i(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\"),i(\"ERR_METHOD_NOT_IMPLEMENTED\",(function(t){return\"The \"+t+\" method is not implemented\"})),i(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\"),i(\"ERR_STREAM_DESTROYED\",(function(t){return\"Cannot call \"+t+\" after a stream was destroyed\"})),i(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\"),i(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\"),i(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\"),i(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError),i(\"ERR_UNKNOWN_ENCODING\",(function(t){return\"Unknown encoding: \"+t}),TypeError),i(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\"),e.exports.codes=n},{}],287:[function(t,e,r){(function(r){(function(){\"use strict\";var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=c;var i=t(\"./_stream_readable\"),a=t(\"./_stream_writable\");t(\"inherits\")(c,i);for(var o=n(a.prototype),s=0;s0)if(\"string\"==typeof e||o.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),n)o.endEmitted?w(t,new _):S(t,o,e,!0);else if(o.ended)w(t,new x);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?S(t,o,e,!1):P(t,o)):S(t,o,e,!1)}else n||(o.reading=!1,P(t,o));return!o.ended&&(o.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function L(t){var e=t._readableState;c(\"emitReadable\",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c(\"emitReadable\",e.flowing),e.emittedReadable=!0,r.nextTick(C,t))}function C(t){var e=t._readableState;c(\"emitReadable_\",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit(\"readable\"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,R(t)}function P(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(I,t,e))}function I(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount(\"data\")>0&&t.resume()}function z(t){c(\"readable nexttick read 0\"),t.read(0)}function D(t,e){c(\"resume\",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit(\"resume\"),R(t),e.flowing&&!e.reading&&t.read(0)}function R(t){var e=t._readableState;for(c(\"flow\",e.flowing);e.flowing&&null!==t.read(););}function F(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(\"\"):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function B(t){var e=t._readableState;c(\"endReadable\",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(N,e,t))}function N(t,e){if(c(\"endReadableNT\",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit(\"end\"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function j(t,e){for(var r=0,n=t.length;r=e.highWaterMark:e.length>0)||e.ended))return c(\"read: emitReadable\",e.length,e.ended),0===e.length&&e.ended?B(this):L(this),null;if(0===(t=E(t,e))&&e.ended)return 0===e.length&&B(this),null;var n,i=e.needReadable;return c(\"need readable\",i),(0===e.length||e.length-t0?F(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&B(this)),null!==n&&this.emit(\"data\",n),n},A.prototype._read=function(t){w(this,new b(\"_read()\"))},A.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c(\"pipe count=%d opts=%j\",i.pipesCount,e);var o=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?l:m;function s(e,r){c(\"onunpipe\"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c(\"cleanup\"),t.removeListener(\"close\",d),t.removeListener(\"finish\",g),t.removeListener(\"drain\",u),t.removeListener(\"error\",p),t.removeListener(\"unpipe\",s),n.removeListener(\"end\",l),n.removeListener(\"end\",m),n.removeListener(\"data\",h),f=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function l(){c(\"onend\"),t.end()}i.endEmitted?r.nextTick(o):n.once(\"end\",o),t.on(\"unpipe\",s);var u=function(t){return function(){var e=t._readableState;c(\"pipeOnDrain\",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,\"data\")&&(e.flowing=!0,R(t))}}(n);t.on(\"drain\",u);var f=!1;function h(e){c(\"ondata\");var r=t.write(e);c(\"dest.write\",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==j(i.pipes,t))&&!f&&(c(\"false write response, pause\",i.awaitDrain),i.awaitDrain++),n.pause())}function p(e){c(\"onerror\",e),m(),t.removeListener(\"error\",p),0===a(t,\"error\")&&w(t,e)}function d(){t.removeListener(\"finish\",g),m()}function g(){c(\"onfinish\"),t.removeListener(\"close\",d),m()}function m(){c(\"unpipe\"),n.unpipe(t)}return n.on(\"data\",h),function(t,e,r){if(\"function\"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,\"error\",p),t.once(\"close\",d),t.once(\"finish\",g),t.emit(\"pipe\",n),i.flowing||(c(\"pipe resume\"),n.resume()),t},A.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit(\"unpipe\",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a0,!1!==i.flowing&&this.resume()):\"readable\"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c(\"on readable\",i.length,i.reading),i.length?L(this):i.reading||r.nextTick(z,this))),n},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(t,e){var n=o.prototype.removeListener.call(this,t,e);return\"readable\"===t&&r.nextTick(O,this),n},A.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return\"readable\"!==t&&void 0!==t||r.nextTick(O,this),e},A.prototype.resume=function(){var t=this._readableState;return t.flowing||(c(\"resume\"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(D,t,e))}(this,t)),t.paused=!1,this},A.prototype.pause=function(){return c(\"call pause flowing=%j\",this._readableState.flowing),!1!==this._readableState.flowing&&(c(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this},A.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on(\"end\",(function(){if(c(\"wrapped end\"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on(\"data\",(function(i){(c(\"wrapped data\"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&\"function\"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var a=0;a-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(A.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(t,e,r){r(new g(\"_write()\"))},A.prototype._writev=null,A.prototype.end=function(t,e,n){var i=this._writableState;return\"function\"==typeof t?(n=t,t=null,e=null):\"function\"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,P(t,e),n&&(e.finished?r.nextTick(n):t.once(\"finish\",n));e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(A.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,\"destroyed\",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),A.prototype.destroy=f.destroy,A.prototype._undestroy=f.undestroy,A.prototype._destroy=function(t,e){e(t)}}).call(this)}).call(this,t(\"_process\"),\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"../errors\":286,\"./_stream_duplex\":287,\"./internal/streams/destroy\":294,\"./internal/streams/state\":298,\"./internal/streams/stream\":299,_process:277,buffer:85,inherits:231,\"util-deprecate\":330}],292:[function(t,e,r){(function(r){(function(){\"use strict\";var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var a=t(\"./end-of-stream\"),o=Symbol(\"lastResolve\"),s=Symbol(\"lastReject\"),l=Symbol(\"error\"),c=Symbol(\"ended\"),u=Symbol(\"lastPromise\"),f=Symbol(\"handlePromise\"),h=Symbol(\"stream\");function p(t,e){return{value:t,done:e}}function d(t){var e=t[o];if(null!==e){var r=t[h].read();null!==r&&(t[u]=null,t[o]=null,t[s]=null,e(p(r,!1)))}}function g(t){r.nextTick(d,t)}var m=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var t=this,e=this[l];if(null!==e)return Promise.reject(e);if(this[c])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise((function(e,n){r.nextTick((function(){t[l]?n(t[l]):e(p(void 0,!0))}))}));var n,i=this[u];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(p(void 0,!0)):e[f](r,n)}),n)}}(i,this));else{var a=this[h].read();if(null!==a)return Promise.resolve(p(a,!1));n=new Promise(this[f])}return this[u]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,\"return\",(function(){var t=this;return new Promise((function(e,r){t[h].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),n),m);e.exports=function(t){var e,r=Object.create(v,(i(e={},h,{value:t,writable:!0}),i(e,o,{value:null,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,l,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,f,{value:function(t,e){var n=r[h].read();n?(r[u]=null,r[o]=null,r[s]=null,t(p(n,!1))):(r[o]=t,r[s]=e)},writable:!0}),e));return r[u]=null,a(t,(function(t){if(t&&\"ERR_STREAM_PREMATURE_CLOSE\"!==t.code){var e=r[s];return null!==e&&(r[u]=null,r[o]=null,r[s]=null,e(t)),void(r[l]=t)}var n=r[o];null!==n&&(r[u]=null,r[o]=null,r[s]=null,n(p(void 0,!0))),r[c]=!0})),t.on(\"readable\",g.bind(null,r)),r}}).call(this)}).call(this,t(\"_process\"))},{\"./end-of-stream\":295,_process:277}],293:[function(t,e,r){\"use strict\";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){for(var r=0;r0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:\"unshift\",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:\"shift\",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:\"clear\",value:function(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function(t){if(0===this.length)return\"\";for(var e=this.head,r=\"\"+e.data;e=e.next;)r+=t+e.data;return r}},{key:\"concat\",value:function(t){if(0===this.length)return o.alloc(0);for(var e,r,n,i=o.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,r=i,n=s,o.prototype.copy.call(e,r,n),s+=a.data.length,a=a.next;return i}},{key:\"consume\",value:function(t,e){var r;return ti.length?i.length:t;if(a===i.length?n+=i:n+=i.slice(0,t),0==(t-=a)){a===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(a));break}++r}return this.length-=r,n}},{key:\"_getBuffer\",value:function(t){var e=o.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,a=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,a),0==(t-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,e}},{key:l,value:function(t,e){return s(this,function(t){for(var e=1;e0,(function(t){n||(n=t),t&&o.forEach(c),a||(o.forEach(c),i(n))}))}));return e.reduce(u)}},{\"../../../errors\":286,\"./end-of-stream\":295}],298:[function(t,e,r){\"use strict\";var n=t(\"../../../errors\").codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(t,e,r,i){var a=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new n(i?r:\"highWaterMark\",a);return Math.floor(a)}return t.objectMode?16:16384}}},{\"../../../errors\":286}],299:[function(t,e,r){e.exports=t(\"events\").EventEmitter},{events:84}],300:[function(t,e,r){\"use strict\";var n=t(\"safe-buffer\").Buffer,i=n.isEncoding||function(t){switch((t=\"\"+t)&&t.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return\"utf8\";for(var e;;)switch(t){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return t;default:if(e)return;t=(\"\"+t).toLowerCase(),e=!0}}(t);if(\"string\"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error(\"Unknown encoding: \"+t);return e||t}(t),this.encoding){case\"utf16le\":this.text=l,this.end=c,e=4;break;case\"utf8\":this.fillLast=s,e=4;break;case\"base64\":this.text=u,this.end=f,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,\"\\ufffd\";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,\"\\ufffd\";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,\"\\ufffd\"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){if((t.length-e)%2==0){var r=t.toString(\"utf16le\",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,r)}return e}function u(t,e){var r=(t.length-e)%3;return 0===r?t.toString(\"base64\",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):\"\"}r.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return\"\";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString(\"utf8\",e,n)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{\"safe-buffer\":284}],301:[function(t,e,r){(function(r,n){(function(){var r=t(\"assert\"),i=t(\"debug\")(\"stream-parser\");e.exports=function(t){var e=t&&\"function\"==typeof t._transform,r=t&&\"function\"==typeof t._write;if(!e&&!r)throw new Error(\"must pass a Writable or Transform stream in\");i(\"extending Parser into stream\"),t._bytes=o,t._skipBytes=s,e&&(t._passthrough=l);e?t._transform=u:t._write=c};function a(t){i(\"initializing parser stream\"),t._parserBytesLeft=0,t._parserBuffers=[],t._parserBuffered=0,t._parserState=-1,t._parserCallback=null,\"function\"==typeof t.push&&(t._parserOutput=t.push.bind(t)),t._parserInit=!0}function o(t,e){r(!this._parserCallback,'there is already a \"callback\" set!'),r(isFinite(t)&&t>0,'can only buffer a finite number of bytes > 0, got \"'+t+'\"'),this._parserInit||a(this),i(\"buffering %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=0}function s(t,e){r(!this._parserCallback,'there is already a \"callback\" set!'),r(t>0,'can only skip > 0 bytes, got \"'+t+'\"'),this._parserInit||a(this),i(\"skipping %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=1}function l(t,e){r(!this._parserCallback,'There is already a \"callback\" set!'),r(t>0,'can only pass through > 0 bytes, got \"'+t+'\"'),this._parserInit||a(this),i(\"passing through %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=2}function c(t,e,r){this._parserInit||a(this),i(\"write(%o bytes)\",t.length),\"function\"==typeof e&&(r=e),h(this,t,null,r)}function u(t,e,r){this._parserInit||a(this),i(\"transform(%o bytes)\",t.length),\"function\"!=typeof e&&(e=this._parserOutput),h(this,t,e,r)}function f(t,e,r,a){if(t._parserBytesLeft-=e.length,i(\"%o bytes left for stream piece\",t._parserBytesLeft),0===t._parserState?(t._parserBuffers.push(e),t._parserBuffered+=e.length):2===t._parserState&&r(e),0!==t._parserBytesLeft)return a;var o=t._parserCallback;if(o&&0===t._parserState&&t._parserBuffers.length>1&&(e=n.concat(t._parserBuffers,t._parserBuffered)),0!==t._parserState&&(e=null),t._parserCallback=null,t._parserBuffered=0,t._parserState=-1,t._parserBuffers.splice(0),o){var s=[];e&&s.push(e),r&&s.push(r);var l=o.length>s.length;l&&s.push(p(a));var c=o.apply(t,s);if(!l||a===c)return a}}var h=p((function t(e,r,n,i){return e._parserBytesLeft<=0?i(new Error(\"got data but not currently parsing anything\")):r.length<=e._parserBytesLeft?function(){return f(e,r,n,i)}:function(){var a=r.slice(0,e._parserBytesLeft);return f(e,a,n,(function(o){return o?i(o):r.length>a.length?function(){return t(e,r.slice(a.length),n,i)}:void 0}))}}));function p(t){return function(){for(var e=t.apply(this,arguments);\"function\"==typeof e;)e=e();return e}}}).call(this)}).call(this,t(\"_process\"),t(\"buffer\").Buffer)},{_process:277,assert:75,buffer:85,debug:302}],302:[function(t,e,r){(function(n){(function(){function i(){var t;try{t=r.storage.debug}catch(t){}return!t&&void 0!==n&&\"env\"in n&&(t=n.env.DEBUG),t}(r=e.exports=t(\"./debug\")).log=function(){return\"object\"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},r.formatArgs=function(t){var e=this.useColors;if(t[0]=(e?\"%c\":\"\")+this.namespace+(e?\" %c\":\" \")+t[0]+(e?\"%c \":\" \")+\"+\"+r.humanize(this.diff),!e)return;var n=\"color: \"+this.color;t.splice(1,0,n,\"color: inherit\");var i=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){\"%%\"!==t&&(i++,\"%c\"===t&&(a=i))})),t.splice(a,0,n)},r.save=function(t){try{null==t?r.storage.removeItem(\"debug\"):r.storage.debug=t}catch(t){}},r.load=i,r.useColors=function(){if(\"undefined\"!=typeof window&&window.process&&\"renderer\"===window.process.type)return!0;return\"undefined\"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||\"undefined\"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},r.storage=\"undefined\"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),r.colors=[\"lightseagreen\",\"forestgreen\",\"goldenrod\",\"dodgerblue\",\"darkorchid\",\"crimson\"],r.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return\"[UnexpectedJSONParseError]: \"+t.message}},r.enable(i())}).call(this)}).call(this,t(\"_process\"))},{\"./debug\":303,_process:277}],303:[function(t,e,r){var n;function i(t){function e(){if(e.enabled){var t=e,i=+new Date,a=i-(n||i);t.diff=a,t.prev=n,t.curr=i,n=i;for(var o=new Array(arguments.length),s=0;s0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var r=parseFloat(e[1]);switch((e[2]||\"ms\").toLowerCase()){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return 315576e5*r;case\"days\":case\"day\":case\"d\":return r*o;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return r*a;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return r*i;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return r*n;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return r;default:return}}(t);if(\"number\"===l&&!1===isNaN(t))return e.long?s(r=t,o,\"day\")||s(r,a,\"hour\")||s(r,i,\"minute\")||s(r,n,\"second\")||r+\" ms\":function(t){if(t>=o)return Math.round(t/o)+\"d\";if(t>=a)return Math.round(t/a)+\"h\";if(t>=i)return Math.round(t/i)+\"m\";if(t>=n)return Math.round(t/n)+\"s\";return t+\"ms\"}(t);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(t))}},{}],305:[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;s0;){e=c[c.length-1];var p=t[e];if(a[e]=0&&s[e].push(o[g])}a[e]=d}else{if(n[e]===r[e]){var m=[],v=[],y=0;for(d=l.length-1;d>=0;--d){var x=l[d];if(i[x]=!1,m.push(x),v.push(s[x]),y+=s[x].length,o[x]=f.length,x===e){l.length=d;break}}f.push(m);var b=new Array(y);for(d=0;d1&&(i=1),i<-1&&(i=-1),(t*n-e*r<0?-1:1)*Math.acos(i)};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,m=t.sweepFlag,v=void 0===m?0:m,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 T=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(f,2);T>1&&(u*=Math.sqrt(T),f*=Math.sqrt(T));var k=function(t,e,r,n,a,o,l,c,u,f,h,p){var d=Math.pow(a,2),g=Math.pow(o,2),m=Math.pow(h,2),v=Math.pow(p,2),y=d*g-d*v-g*m;y<0&&(y=0),y/=d*v+g*m;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,T=(h-x)/a,k=(p-b)/o,A=(-h-x)/a,M=(-p-b)/o,S=s(1,0,T,k),E=s(T,k,A,M);return 0===c&&E>0&&(E-=i),1===c&&E<0&&(E+=i),[_,w,S,E]}(e,r,l,c,u,f,g,v,x,b,_,w),A=n(k,4),M=A[0],S=A[1],E=A[2],L=A[3],C=Math.abs(L)/(i/4);Math.abs(1-C)<1e-7&&(C=1);var P=Math.max(Math.ceil(C),1);L/=P;for(var I=0;Ie[2]&&(e[2]=c[u+0]),c[u+1]>e[3]&&(e[3]=c[u+1]);return e}},{\"abs-svg-path\":70,assert:75,\"is-svg-path\":238,\"normalize-svg-path\":309,\"parse-svg-path\":250}],309:[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;d4?(o=m[m.length-4],s=m[m.length-3]):(o=h,s=p),r.push(m)}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\":307}],310:[function(t,e,r){\"use strict\";var n,i=t(\"svg-path-bounds\"),a=t(\"parse-svg-path\"),o=t(\"draw-svg-path\"),s=t(\"is-svg-path\"),l=t(\"bitmap-sdf\"),c=document.createElement(\"canvas\"),u=c.getContext(\"2d\");e.exports=function(t,e){if(!s(t))throw Error(\"Argument should be valid svg path string\");e||(e={});var r,f;e.shape?(r=e.shape[0],f=e.shape[1]):(r=c.width=e.w||e.width||200,f=c.height=e.h||e.height||200);var h=Math.min(r,f),p=e.stroke||0,d=e.viewbox||e.viewBox||i(t),g=[r/(d[2]-d[0]),f/(d[3]-d[1])],m=Math.min(g[0]||0,g[1]||0)/2;u.fillStyle=\"black\",u.fillRect(0,0,r,f),u.fillStyle=\"white\",p&&(\"number\"!=typeof p&&(p=1),u.strokeStyle=p>0?\"white\":\"black\",u.lineWidth=Math.abs(p));if(u.translate(.5*r,.5*f),u.scale(m,m),function(){if(null!=n)return n;var t=document.createElement(\"canvas\").getContext(\"2d\");if(t.canvas.width=t.canvas.height=1,!window.Path2D)return n=!1;var e=new Path2D(\"M0,0h1v1h-1v-1Z\");t.fillStyle=\"black\",t.fill(e);var r=t.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var v=new Path2D(t);u.fill(v),p&&u.stroke(v)}else{var y=a(t);o(u,y),u.fill(),p&&u.stroke()}return u.setTransform(1,0,0,1,0,0),l(u,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*h})}},{\"bitmap-sdf\":82,\"draw-svg-path\":126,\"is-svg-path\":238,\"parse-svg-path\":250,\"svg-path-bounds\":308}],311:[function(t,e,r){(function(e,n){(function(){var i=t(\"process/browser.js\").nextTick,a=Function.prototype.apply,o=Array.prototype.slice,s={},l=0;function c(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new c(a.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(a.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate=\"function\"==typeof e?e:function(t){var e=l++,n=!(arguments.length<2)&&o.call(arguments,1);return s[e]=!0,i((function(){s[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate=\"function\"==typeof n?n:function(t){delete s[t]}}).call(this)}).call(this,t(\"timers\").setImmediate,t(\"timers\").clearImmediate)},{\"process/browser.js\":277,timers:311}],312:[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:I(e[1]),g:I(e[2]),b:I(e[3]),a:R(e[4]),format:i?\"name\":\"hex8\"};if(e=j.hex6.exec(t))return{r:I(e[1]),g:I(e[2]),b:I(e[3]),format:i?\"name\":\"hex\"};if(e=j.hex4.exec(t))return{r:I(e[1]+\"\"+e[1]),g:I(e[2]+\"\"+e[2]),b:I(e[3]+\"\"+e[3]),a:R(e[4]+\"\"+e[4]),format:i?\"name\":\"hex8\"};if(e=j.hex3.exec(t))return{r:I(e[1]+\"\"+e[1]),g:I(e[2]+\"\"+e[2]),b:I(e[3]+\"\"+e[3]),format:i?\"name\":\"hex\"};return!1}(e));\"object\"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(p=e.r,d=e.g,g=e.b,i={r:255*C(p,255),g:255*C(d,255),b:255*C(g,255)},f=!0,h=\"%\"===String(e.r).substr(-1)?\"prgb\":\"rgb\"):U(e.h)&&U(e.s)&&U(e.v)?(l=z(e.s),c=z(e.v),i=function(e,r,n){e=6*C(e,360),r=C(r,100),n=C(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\"):U(e.h)&&U(e.s)&&U(e.l)&&(l=z(e.s),u=z(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=C(t,360),e=C(e,100),r=C(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=L(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=C(t,255),e=C(e,255),r=C(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>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(c(n));return a}function M(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=L(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=[O(a(t).toString(16)),O(a(e).toString(16)),O(a(r).toString(16)),O(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*C(this._r,255))+\"%\",g:a(100*C(this._g,255))+\"%\",b:a(100*C(this._b,255))+\"%\",a:this._a}},toPercentageRgbString:function(){return 1==this._a?\"rgb(\"+a(100*C(this._r,255))+\"%, \"+a(100*C(this._g,255))+\"%, \"+a(100*C(this._b,255))+\"%)\":\"rgba(\"+a(100*C(this._r,255))+\"%, \"+a(100*C(this._g,255))+\"%, \"+a(100*C(this._b,255))+\"%, \"+this._roundA+\")\"},toName:function(){return 0===this._a?\"transparent\":!(this._a<1)&&(E[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(v,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(m,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(M,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(T,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]:z(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;ul&&(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\"},E=c.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(S);function L(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function C(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 P(t){return o(1,s(0,t))}function I(t){return parseInt(t,16)}function O(t){return 1==t.length?\"0\"+t:\"\"+t}function z(t){return t<=1&&(t=100*t+\"%\"),t}function D(e){return t.round(255*parseFloat(e)).toString(16)}function R(t){return I(t)/255}var F,B,N,j=(B=\"[\\\\s|\\\\(]+(\"+(F=\"(?:[-\\\\+]?\\\\d*\\\\.\\\\d+%?)|(?:[-\\\\+]?\\\\d+%?)\")+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")\\\\s*\\\\)?\",N=\"[\\\\s|\\\\(]+(\"+F+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")\\\\s*\\\\)?\",{CSS_UNIT:new RegExp(F),rgb:new RegExp(\"rgb\"+B),rgba:new RegExp(\"rgba\"+N),hsl:new RegExp(\"hsl\"+B),hsla:new RegExp(\"hsla\"+N),hsv:new RegExp(\"hsv\"+B),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 U(t){return!!j.CSS_UNIT.exec(t)}void 0!==e&&e.exports?e.exports=c:window.tinycolor=c}(Math)},{}],313:[function(t,e,r){\"use strict\";e.exports=i,e.exports.float32=e.exports.float=i,e.exports.fract32=e.exports.fract=function(t,e){if(t.length){if(t instanceof Float32Array)return new Float32Array(t.length);e instanceof Float32Array||(e=i(t));for(var r=0,n=e.length;ro&&(o=t[0]),t[1]s&&(s=t[1])}function c(t){switch(t.type){case\"GeometryCollection\":t.geometries.forEach(c);break;case\"Point\":l(t.coordinates);break;case\"MultiPoint\":t.coordinates.forEach(l)}}for(e in t.arcs.forEach((function(t){for(var e,r=-1,l=t.length;++ro&&(o=e[0]),e[1]s&&(s=e[1])})),t.objects)c(t.objects[e]);return[i,a,o,s]}function i(t,e){var r=e.id,n=e.bbox,i=null==e.properties?{}:e.properties,o=a(t,e);return null==r&&null==n?{type:\"Feature\",properties:i,geometry:o}:null==n?{type:\"Feature\",id:r,properties:i,geometry:o}:{type:\"Feature\",id:r,bbox:n,properties:i,geometry:o}}function a(t,e){var n=r(t.transform),i=t.arcs;function a(t,e){e.length&&e.pop();for(var r=i[t<0?~t:t],a=0,o=r.length;a1)n=l(t,e,r);else for(i=0,n=new Array(a=t.arcs.length);i1)for(var a,s,c=1,u=l(i[0]);cu&&(s=i[0],i[0]=i[c],i[c]=s,u=a);return i})).filter((function(t){return t.length>0}))}}function u(t,e){for(var r=0,n=t.length;r>>1;t[i]=2))throw new Error(\"n must be \\u22652\");var r,i=(l=t.bbox||n(t))[0],a=l[1],o=l[2],s=l[3];e={scale:[o-i?(o-i)/(r-1):1,s-a?(s-a)/(r-1):1],translate:[i,a]}}var l,c,u=f(e),h=t.objects,p={};function d(t){return u(t)}function g(t){var e;switch(t.type){case\"GeometryCollection\":e={type:\"GeometryCollection\",geometries:t.geometries.map(g)};break;case\"Point\":e={type:\"Point\",coordinates:d(t.coordinates)};break;case\"MultiPoint\":e={type:\"MultiPoint\",coordinates:t.coordinates.map(d)};break;default:return t}return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),null!=t.properties&&(e.properties=t.properties),e}for(c in h)p[c]=g(h[c]);return{type:\"Topology\",bbox:l,transform:e,objects:p,arcs:t.arcs.map((function(t){var e,r=0,n=1,i=t.length,a=new Array(i);for(a[0]=u(t[0],0);++r\":(e.length>100&&(e=e.slice(0,99)+\"\\u2026\"),e=e.replace(i,(function(t){switch(t){case\"\\n\":return\"\\\\n\";case\"\\r\":return\"\\\\r\";case\"\\u2028\":return\"\\\\u2028\";case\"\\u2029\":return\"\\\\u2029\";default:throw new Error(\"Unexpected character\")}})))}},{\"./safe-to-string\":318}],320:[function(t,e,r){\"use strict\";var n=t(\"../value/is\"),i={object:!0,function:!0,undefined:!0};e.exports=function(t){return!!n(t)&&hasOwnProperty.call(i,typeof t)}},{\"../value/is\":326}],321:[function(t,e,r){\"use strict\";var n=t(\"../lib/resolve-exception\"),i=t(\"./is\");e.exports=function(t){return i(t)?t:n(t,\"%v is not a plain function\",arguments[1])}},{\"../lib/resolve-exception\":317,\"./is\":322}],322:[function(t,e,r){\"use strict\";var n=t(\"../function/is\"),i=/^\\s*class[\\s{/}]/,a=Function.prototype.toString;e.exports=function(t){return!!n(t)&&!i.test(a.call(t))}},{\"../function/is\":316}],323:[function(t,e,r){\"use strict\";var n=t(\"../object/is\");e.exports=function(t){if(!n(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(t){return!1}}},{\"../object/is\":320}],324:[function(t,e,r){\"use strict\";var n=t(\"../value/is\"),i=t(\"../object/is\"),a=Object.prototype.toString;e.exports=function(t){if(!n(t))return null;if(i(t)){var e=t.toString;if(\"function\"!=typeof e)return null;if(e===a)return null}try{return\"\"+t}catch(t){return null}}},{\"../object/is\":320,\"../value/is\":326}],325:[function(t,e,r){\"use strict\";var n=t(\"../lib/resolve-exception\"),i=t(\"./is\");e.exports=function(t){return i(t)?t:n(t,\"Cannot use %v\",arguments[1])}},{\"../lib/resolve-exception\":317,\"./is\":326}],326:[function(t,e,r){\"use strict\";e.exports=function(t){return null!=t}},{}],327:[function(t,e,r){(function(e){(function(){\"use strict\";var n=t(\"bit-twiddle\"),i=t(\"dup\"),a=t(\"buffer\").Buffer;e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var o=\"undefined\"!=typeof Uint8ClampedArray,s=\"undefined\"!=typeof BigUint64Array,l=\"undefined\"!=typeof BigInt64Array,c=e.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=i([32,0])),c.BIGUINT64||(c.BIGUINT64=i([32,0])),c.BIGINT64||(c.BIGINT64=i([32,0])),c.BUFFER||(c.BUFFER=i([32,0]));var u=c.DATA,f=c.BUFFER;function h(t){if(t){var e=t.length||t.byteLength,r=n.log2(e);u[r].push(t)}}function p(t){t=n.nextPow2(t);var e=n.log2(t),r=u[e];return r.length>0?r.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function g(t){return new Uint16Array(p(2*t),0,t)}function m(t){return new Uint32Array(p(4*t),0,t)}function v(t){return new Int8Array(p(t),0,t)}function y(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function T(t){return s?new BigUint64Array(p(8*t),0,t):null}function k(t){return l?new BigInt64Array(p(8*t),0,t):null}function A(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=f[e];return r.length>0?r.pop():new a(t)}r.free=function(t){if(a.isBuffer(t))f[n.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|n.log2(e);u[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeBigUint64=r.freeInt8=r.freeInt16=r.freeInt32=r.freeBigInt64=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){h(t.buffer)},r.freeArrayBuffer=h,r.freeBuffer=function(t){f[n.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||\"arraybuffer\"===e)return p(t);switch(e){case\"uint8\":return d(t);case\"uint16\":return g(t);case\"uint32\":return m(t);case\"int8\":return v(t);case\"int16\":return y(t);case\"int32\":return x(t);case\"float\":case\"float32\":return b(t);case\"double\":case\"float64\":return _(t);case\"uint8_clamped\":return w(t);case\"bigint64\":return k(t);case\"biguint64\":return T(t);case\"buffer\":return M(t);case\"data\":case\"dataview\":return A(t);default:return null}return null},r.mallocArrayBuffer=p,r.mallocUint8=d,r.mallocUint16=g,r.mallocUint32=m,r.mallocInt8=v,r.mallocInt16=y,r.mallocInt32=x,r.mallocFloat32=r.mallocFloat=b,r.mallocFloat64=r.mallocDouble=_,r.mallocUint8Clamped=w,r.mallocBigUint64=T,r.mallocBigInt64=k,r.mallocDataView=A,r.mallocBuffer=M,r.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,u[t].length=0,f[t].length=0}}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"bit-twiddle\":81,buffer:85,dup:128}],328:[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):\"\"}},{}],329:[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;n2111)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>13},isIntercalaryMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);return!!r&&r===e},leap year: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.leap year(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;if(!(\"number\"==typeof t&&t>=1888&&t<=2111))throw new Error(\"Lunar year outside range 1888-2111\");if(!(\"number\"==typeof e&&e>=1&&e<=12))throw new Error(\"Lunar month outside range 1 - 12\");if(!(\"number\"==typeof r&&r>=1&&r<=30))throw new Error(\"Lunar day outside range 1 - 30\");\"object\"==typeof n?(l=!1,a=n):(l=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:l}}s=o.day-1;var c,u=f[o.year-f[0]],p=u>>13;c=p&&(o.month>p||o.isIntercalary)?o.month:o.month-1;for(var d=0;d>9&4095,(g>>5&15)-1,(31&g)+s);return a.year=m.getFullYear(),a.month=1+m.getMonth(),a.day=m.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{if(!(\"number\"==typeof t&&t>=1888&&t<=2111))throw new Error(\"Solar year outside range 1888-2111\");if(!(\"number\"==typeof e&&e>=1&&e<=12))throw new Error(\"Solar month outside range 1 - 12\");if(!(\"number\"==typeof r&&r>=1&&r<=31))throw new Error(\"Solar day outside range 1 - 31\");i={year:t,month:e,day:r},a=n||{}}var o=h[i.year-h[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=h[a.year-h[0]];var l,c=new Date(o>>9&4095,(o>>5&15)-1,31&o),u=new Date(i.year,i.month-1,i.day);l=Math.round((u-c)/864e5);var p,d=f[a.year-f[0]];for(p=0;p<13;p++){var g=d&1<<12-p?30:29;if(l>13;!m||p=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\":346,\"object-assign\":247}],335:[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}},leap year: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.leap year(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\":346,\"object-assign\":247}],336:[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}},leap year: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.leap year(t)||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.leap year(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=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=tthis.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\":346,\"object-assign\":247}],337:[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}},leap year: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.leap year(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.leap year(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\":346,\"object-assign\":247}],338:[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}},leap year: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.leap year(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\":346,\"object-assign\":247}],339:[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\"]}},leap year: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;r19||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\":346,\"object-assign\":247}],340:[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:[\"Some\",\"Mangal\",\"Budh\",\"Veer\",\"Shukar\",\"Sanichar\",\"Et\"],dayNamesMin:[\"So\",\"Ma\",\"Bu\",\"Ve\",\"Sh\",\"Sa\",\"Et\"],digits:null,dateFormat:\"dd-mm-yyyy\",firstDay:0,isRTL:!1}},leap year:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[\"\"].invalidYear);return o.leap year(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.leap year(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=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\":346,\"object-assign\":247}],341:[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\",\"Some\",\"Mangl\",\"Budha\",\"Bihi\",\"Shukra\",\"Shani\"],dayNamesMin:[\"Aai\",\"So\",\"Man\",\"Bu\",\"Bi\",\"Shu\",\"Sha\"],digits:null,dateFormat:\"dd/mm/yyyy\",firstDay:1,isRTL:!1}},leap year: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(),void 0===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),void 0===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;r0?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.leap year(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\":346,\"object-assign\":247}],343:[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}},leap year:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(e.year());return a.leap year(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.leap year(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\":346,\"object-assign\":247}],344:[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}},leap year:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(e.year());return a.leap year(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.leap year(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\":346,\"object-assign\":247}],345:[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}},leap year: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;ar)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;ne);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\":346,\"object-assign\":247}],346:[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},leap year:function(){return this._calendar.leap year(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.leap year(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(;oe-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.minDay&&r-this.minDay13.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\":247}],347:[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+n1}),d=function(t,e,r,n){var i=\"\"+e;if(p(t,n))for(;i.length1},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-1){p=1,d=g;for(var E=this.daysInMonth(h,p);d>E;E=this.daysInMonth(h,p))p++,d-=E}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\":346,\"object-assign\":247}],348:[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}]},{}],349:[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;t(\"../../constants/axis_placeable_objects\");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\"}}})},{\"../../constants/axis_placeable_objects\":472,\"../../plot_api/plot_template\":543,\"../../plots/cartesian/constants\":561,\"../../plots/font_attributes\":585,\"./arrow_paths\":348}],350:[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),a=i.getRefType(e.xref),o=i.getRefType(e.yref);e._extremes={},\"range\"===a&&s(e,r),\"range\"===o&&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,m=3*t.startarrowsize*t.arrowwidth||0,v=m+h,y=m-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,v),ppadminus:Math.max(f,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else v=s?v+s:v,y=s?y-s:y,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(u,d,v),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\":503,\"../../plots/cartesian/axes\":554,\"./draw\":355}],351:[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;r0||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;r2/3?\"right\":\"center\"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var W=!1,X=[\"x\",\"y\"],Z=0;Z1)&&(nt===rt?((pt=it.r2fraction(e[\"a\"+et]))<0||pt>1)&&(W=!0):W=!0),J=it._offset+it.r2p(e[et]),$=.5}else{var dt=\"domain\"===ht;\"x\"===et?(Q=e[et],J=dt?it._offset+it._length*Q:J=T.l+T.w*Q):(Q=1-e[et],J=dt?it._offset+it._length*Q:J=T.t+T.h*Q),$=e.showarrow?.5:Q}if(e.showarrow){ft.head=J;var gt=e[\"a\"+et];if(tt=ot*q(.5,e.xanchor)-st*q(.5,e.yanchor),nt===rt){var mt=l.getRefType(nt);\"domain\"===mt?(\"y\"===et&&(gt=1-gt),ft.tail=it._offset+it._length*gt):\"paper\"===mt?\"y\"===et?(gt=1-gt,ft.tail=T.t+T.h*gt):ft.tail=T.l+T.w*gt:ft.tail=it._offset+it.r2p(gt),K=tt}else ft.tail=J+gt,K=tt+gt;ft.text=ft.tail+tt;var vt=w[\"x\"===et?\"width\":\"height\"];if(\"paper\"===rt&&(ft.head=o.constrain(ft.head,1,vt-1)),\"pixel\"===nt){var yt=-Math.max(ft.tail-3,ft.text),xt=Math.min(ft.tail+3,ft.text)-vt;yt>0?(ft.tail+=yt,ft.text+=yt):xt>0&&(ft.tail-=xt,ft.text-=xt)}ft.tail+=ut,ft.head+=ut}else K=tt=lt*q($,ct),ft.text=J+tt;ft.text+=ut,tt+=ut,K+=ut,e[\"_\"+et+\"padplus\"]=lt/2+K,e[\"_\"+et+\"padminus\"]=lt/2-K,e[\"_\"+et+\"size\"]=lt,e[\"_\"+et+\"shift\"]=tt}if(W)R.remove();else{var bt=0,_t=0;if(\"left\"!==e.align&&(bt=(A-b)*(\"center\"===e.align?.5:1)),\"top\"!==e.valign&&(_t=(D-_)*(\"middle\"===e.valign?.5:1)),f)n.select(\"svg\").attr({x:N+bt-1,y:N+_t}).call(u.setClipUrl,U?L:null,t);else{var wt=N+_t-g.top,Tt=N+bt-g.left;G.call(h.positionText,Tt,wt).call(u.setClipUrl,U?L:null,t)}V.select(\"rect\").call(u.setRect,N,N,A,D),j.call(u.setRect,F/2,F/2,B-F,H-F),R.call(u.setTranslate,Math.round(C.x.text-B/2),Math.round(C.y.text-H/2)),O.attr({transform:\"rotate(\"+P+\",\"+C.x.text+\",\"+C.y.text+\")\"});var kt,At=function(r,n){I.selectAll(\".annotation-arrow-g\").remove();var l=C.x.head,f=C.y.head,h=C.x.tail+r,p=C.y.tail+n,g=C.x.text+r,b=C.y.text+n,_=o.rotationXYMatrix(P,g,b),w=o.apply2DTransform(_),A=o.apply2DTransform2(_),L=+j.attr(\"width\"),z=+j.attr(\"height\"),D=g-.5*L,F=D+L,B=b-.5*z,N=B+z,U=[[D,B,D,N],[D,N,F,N],[F,N,F,B],[F,B,D,B]].map(A);if(!U.reduce((function(t,e){return t^!!o.segmentsIntersect(l,f,l+1e6,f+1e6,e[0],e[1],e[2],e[3])}),!1)){U.forEach((function(t){var e=o.segmentsIntersect(h,p,l,f,t[0],t[1],t[2],t[3]);e&&(h=e.x,p=e.y)}));var V=e.arrowwidth,H=e.arrowcolor,q=e.arrowside,G=I.append(\"g\").style({opacity:c.opacity(H)}).classed(\"annotation-arrow-g\",!0),Y=G.append(\"path\").attr(\"d\",\"M\"+h+\",\"+p+\"L\"+l+\",\"+f).style(\"stroke-width\",V+\"px\").call(c.stroke,c.rgb(H));if(m(Y,q,e),k.annotationPosition&&Y.node().parentNode&&!a){var W=l,X=f;if(e.standoff){var Z=Math.sqrt(Math.pow(l-h,2)+Math.pow(f-p,2));W+=e.standoff*(h-l)/Z,X+=e.standoff*(p-f)/Z}var J,K,Q=G.append(\"path\").classed(\"annotation-arrow\",!0).classed(\"anndrag\",!0).classed(\"cursor-move\",!0).attr({d:\"M3,3H-3V-3H3ZM0,0L\"+(h-W)+\",\"+(p-X),transform:s(W,X)}).style(\"stroke-width\",V+6+\"px\").call(c.stroke,\"rgba(0,0,0,0)\").call(c.fill,\"rgba(0,0,0,0)\");d.init({element:Q.node(),gd:t,prepFn:function(){var t=u.getTranslate(R);J=t.x,K=t.y,v&&v.autorange&&M(v._name+\".autorange\",!0),x&&x.autorange&&M(x._name+\".autorange\",!0)},moveFn:function(t,r){var n=w(J,K),i=n[0]+t,a=n[1]+r;R.call(u.setTranslate,i,a),S(\"x\",y(v,t,\"x\",T,e)),S(\"y\",y(x,r,\"y\",T,e)),e.axref===e.xref&&S(\"ax\",y(v,t,\"ax\",T,e)),e.ayref===e.yref&&S(\"ay\",y(x,r,\"ay\",T,e)),G.attr(\"transform\",s(t,r)),O.attr({transform:\"rotate(\"+P+\",\"+i+\",\"+a+\")\"})},doneFn:function(){i.call(\"_guiRelayout\",t,E());var e=document.querySelector(\".js-notes-box-panel\");e&&e.redraw(e.selectedObj)}})}}};if(e.showarrow&&At(0,0),z)d.init({element:R.node(),gd:t,prepFn:function(){kt=O.attr(\"transform\")},moveFn:function(t,r){var n=\"pointer\";if(e.showarrow)e.axref===e.xref?S(\"ax\",y(v,t,\"ax\",T,e)):S(\"ax\",e.ax+t),e.ayref===e.yref?S(\"ay\",y(x,r,\"ay\",T.w,e)):S(\"ay\",e.ay+r),At(t,r);else{if(a)return;var i,o;if(v)i=y(v,t,\"x\",T,e);else{var l=e._xsize/T.w,c=e.x+(e._xshift-e.xshift)/T.w-l/2;i=d.align(c+t/T.w,l,0,1,e.xanchor)}if(x)o=y(x,r,\"y\",T,e);else{var u=e._ysize/T.h,f=e.y-(e._yshift+e.yshift)/T.h-u/2;o=d.align(f-r/T.h,u,0,1,e.yanchor)}S(\"x\",i),S(\"y\",o),v&&x||(n=d.getCursor(v?.5:i,x?.5:o,e.xanchor,e.yanchor))}O.attr({transform:s(t,r)+kt}),p(R,n)},clickFn:function(r,n){e.captureevents&&t.emit(\"plotly_clickannotation\",Y(n))},doneFn:function(){p(R),i.call(\"_guiRelayout\",t,E());var e=document.querySelector(\".js-notes-box-panel\");e&&e.redraw(e.selectedObj)}})}}}e.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(\".annotation\").remove();for(var r=0;r=0,x=e.indexOf(\"end\")>=0,b=d.backoff*m+r.standoff,_=g.backoff*v+r.startstandoff;if(\"line\"===p.nodeName){o={x:+t.attr(\"x1\"),y:+t.attr(\"y1\")},u={x:+t.attr(\"x2\"),y:+t.attr(\"y2\")};var w=o.x-u.x,T=o.y-u.y;if(h=(f=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T))return void z();if(b){if(b*b>w*w+T*T)return void z();var k=b*Math.cos(f),A=b*Math.sin(f);u.x+=k,u.y+=A,t.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+T*T)return void z();var M=_*Math.cos(f),S=_*Math.sin(f);o.x-=M,o.y-=S,t.attr({x1:o.x,y1:o.y})}}else if(\"path\"===p.nodeName){var E=p.getTotalLength(),L=\"\";if(E1){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\":607,\"../annotations/draw\":355}],362:[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=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+\")\"}o.tinyRGB=function(t){var e=t.toRgb();return\"rgb(\"+Math.round(e.r)+\", \"+Math.round(e.g)+\", \"+Math.round(e.b)+\")\"},o.rgb=function(t){return o.tinyRGB(n(t))},o.opacity=function(t){return t?n(t).getAlpha():0},o.addOpacity=function(t,e){var r=n(t).toRgb();return\"rgba(\"+Math.round(r.r)+\", \"+Math.round(r.g)+\", \"+Math.round(r.b)+\", \"+e+\")\"},o.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||c).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()},o.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(o.combine(t,c))),(i.isDark()?e?i.lighten(e):c:r?i.darken(r):l).toString()},o.stroke=function(t,e){var r=n(e);t.style({stroke:o.tinyRGB(r),\"stroke-opacity\":r.getAlpha()})},o.fill=function(t,e){var r=n(e);t.style({fill:o.tinyRGB(r),\"fill-opacity\":r.getAlpha()})},o.clean=function(t){if(t&&\"object\"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e0?n>=l:n<=l));i++)n>u&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var ct=Math.pow(10,Math.floor(Math.log(lt)/Math.LN10));ot*=ct*c.roundUp(lt/ct,[2,5,10]),(Math.abs(q.start)/q.size+1e-6)%1<2e-6&&(it.tick0=0)}it.dtick=ot}it.domain=o?[rt+I/R.h,rt+K-I/R.h]:[rt+P/R.w,rt+K-P/R.w],it.setScale(),t.attr(\"transform\",u(Math.round(R.l),Math.round(R.t)));var ut,ft=t.select(\".\"+A.cbtitleunshift).attr(\"transform\",u(-Math.round(R.l),-Math.round(R.t))),ht=it.ticklabelposition,pt=it.title.font.size,dt=t.select(\".\"+A.cbaxis),gt=0,mt=0;function vt(n,i){var a={propContainer:it,propName:e._propPrefix+\"title\",traceIndex:e._traceIndex,_meta:e._meta,placeholder:D._dfltTitle.colorbar,containerGroup:t.select(\".\"+A.cbtitle)},o=\"h\"===n.charAt(0)?n.substr(1):\"h\"+n;t.selectAll(\".\"+o+\",.\"+o+\"-math-group\").remove(),g.draw(r,n,f(a,i||{}))}return c.syncOrAsync([a.previousPromises,function(){var t,e;(o&&at||!o&&!at)&&(\"top\"===j&&(t=P+R.l+R.w*O,e=I+R.t+R.h*(1-rt-K)+3+.75*pt),\"bottom\"===j&&(t=P+R.l+R.w*O,e=I+R.t+R.h*(1-rt)-3-.25*pt),\"right\"===j&&(e=I+R.t+R.h*z+3+.75*pt,t=P+R.l+R.w*rt),vt(it._id+\"title\",{attributes:{x:t,y:e,\"text-anchor\":o?\"start\":\"middle\"}}))},function(){if(!o&&!at||o&&at){var a,l=t.select(\".\"+A.cbtitle),f=l.select(\"text\"),h=[-M/2,M/2],d=l.select(\".h\"+it._id+\"title-math-group\").node(),g=15.6;if(f.node()&&(g=parseInt(f.node().style.fontSize,10)*w),d?(a=p.bBox(d),mt=a.width,(gt=a.height)>g&&(h[1]-=(gt-g)/2)):f.node()&&!f.classed(A.jsPlaceholder)&&(a=p.bBox(f.node()),mt=a.width,gt=a.height),o){if(gt){if(gt+=5,\"top\"===j)it.domain[1]-=gt/R.h,h[1]*=-1;else{it.domain[0]+=gt/R.h;var v=m.lineCount(f);h[1]+=(1-v)*g}l.attr(\"transform\",u(h[0],h[1])),it.setScale()}}else mt&&(\"right\"===j&&(it.domain[0]+=(mt+pt/2)/R.w),l.attr(\"transform\",u(h[0],h[1])),it.setScale())}t.selectAll(\".\"+A.cbfills+\",.\"+A.cblines).attr(\"transform\",o?u(0,Math.round(R.h*(1-it.domain[1]))):u(Math.round(R.w*it.domain[0]),0)),dt.attr(\"transform\",o?u(0,Math.round(-R.t)):u(Math.round(-R.l),0));var y=t.select(\".\"+A.cbfills).selectAll(\"rect.\"+A.cbfill).attr(\"style\",\"\").data(Y);y.enter().append(\"rect\").classed(A.cbfill,!0).style(\"stroke\",\"none\"),y.exit().remove();var x=U.map(it.c2p).map(Math.round).sort((function(t,e){return t-e}));y.each((function(t,a){var s=[0===a?U[0]:(Y[a]+Y[a-1])/2,a===Y.length-1?U[1]:(Y[a]+Y[a+1])/2].map(it.c2p).map(Math.round);o&&(s[1]=c.constrain(s[1]+(s[1]>s[0])?1:-1,x[0],x[1]));var l=n.select(this).attr(o?\"x\":\"y\",Q).attr(o?\"y\":\"x\",n.min(s)).attr(o?\"width\":\"height\",Math.max(X,2)).attr(o?\"height\":\"width\",Math.max(n.max(s)-n.min(s),2));if(e._fillgradient)p.gradient(l,r,e._id,o?\"vertical\":\"horizontalreversed\",e._fillgradient,\"fill\");else{var u=H(t).replace(\"e-\",\"\");l.attr(\"fill\",i(u).toHexString())}}));var b=t.select(\".\"+A.cblines).selectAll(\"path.\"+A.cbline).data(B.color&&B.width?W:[]);b.enter().append(\"path\").classed(A.cbline,!0),b.exit().remove(),b.each((function(t){var e=Q,r=Math.round(it.c2p(t))+B.width/2%1;n.select(this).attr(\"d\",\"M\"+(o?e+\",\"+r:r+\",\"+e)+(o?\"h\":\"v\")+X).call(p.lineGroupStyle,B.width,V(t),B.dash)})),dt.selectAll(\"g.\"+it._id+\"tick,path\").remove();var _=Q+X+(M||0)/2-(\"outside\"===e.ticks?1:0),T=s.calcTicks(it),k=s.getTickSigns(it)[2];return s.drawTicks(r,it,{vals:\"inside\"===it.ticks?s.clipEnds(it,T):T,layer:dt,path:s.makeTickPath(it,_,k),transFn:s.makeTransTickFn(it)}),s.drawLabels(r,it,{vals:T,layer:dt,transFn:s.makeTransTickLabelFn(it),labelFns:s.makeLabelFns(it,_)})},function(){if(o&&!at||!o&&at){var t,i,a=it.position||0,s=it._offset+it._length/2;if(\"right\"===j)i=s,t=R.l+R.w*a+10+pt*(it.showticklabels?1:.5);else if(t=s,\"bottom\"===j&&(i=R.t+R.h*a+10+(-1===ht.indexOf(\"inside\")?it.tickfont.size:0)+(\"intside\"!==it.ticks&&e.ticklen||0)),\"top\"===j){var l=N.text.split(\"
\").length;i=R.t+R.h*a+10-X-w*pt*l}vt((o?\"h\":\"v\")+it._id+\"title\",{avoid:{selection:n.select(r).selectAll(\"g.\"+it._id+\"tick\"),side:j,offsetTop:o?0:R.t,offsetLeft:o?R.l:0,maxShift:o?D.width:D.height},attributes:{x:t,y:i,\"text-anchor\":\"middle\"},transform:{rotate:o?-90:0,offset:0}})}},a.previousPromises,function(){var n,s=X+M/2;-1===ht.indexOf(\"inside\")&&(n=p.bBox(dt.node()),s+=o?n.width:n.height),ut=ft.select(\"text\");var c=0,f=o&&\"top\"===j,g=!o&&\"right\"===j,m=0;if(ut.node()&&!ut.classed(A.jsPlaceholder)){var y,x=ft.select(\".h\"+it._id+\"title-math-group\").node();x&&(o&&at||!o&&!at)?(c=(n=p.bBox(x)).width,y=n.height):(c=(n=p.bBox(ft.node())).right-R.l-(o?Q:nt),y=n.bottom-R.t-(o?nt:Q),o||\"top\"!==j||(s+=n.height,m=n.height)),g&&(ut.attr(\"transform\",u(c/2+pt/2,0)),c*=2),s=Math.max(s,o?c:y)}var b=2*(o?P:I)+s+S+M/2,w=0;!o&&N.text&&\"bottom\"===C&&z<=0&&(b+=w=b/2,m+=w),D._hColorbarMoveTitle=w,D._hColorbarMoveCBTitle=m;var F=S+M;t.select(\".\"+A.cbbg).attr(\"x\",(o?Q:nt)-F/2-(o?P:0)).attr(\"y\",(o?nt:Q)-(o?J:I+m-w)).attr(o?\"width\":\"height\",Math.max(b-w,2)).attr(o?\"height\":\"width\",Math.max(J+F,2)).call(d.fill,E).call(d.stroke,e.bordercolor).style(\"stroke-width\",S);var B=g?Math.max(c-10,0):0;if(t.selectAll(\".\"+A.cboutline).attr(\"x\",(o?Q:nt+P)+B).attr(\"y\",(o?nt+I-J:Q)+(f?gt:0)).attr(o?\"width\":\"height\",Math.max(X,2)).attr(o?\"height\":\"width\",Math.max(J-(o?2*I+gt:2*P+B),2)).call(d.stroke,e.outlinecolor).style({fill:\"none\",\"stroke-width\":M}),t.attr(\"transform\",u(R.l-(o?$*b:0),R.t-(o?0:(1-tt)*b-m))),!o&&(S||i(E).getAlpha()&&!i.equals(D.paper_bgcolor,E))){var U=dt.selectAll(\"text\"),V=U[0].length,H=t.select(\".\"+A.cbbg).node(),q=p.bBox(H),G=p.getTranslate(t);U.each((function(t,e){var r=V-1;if(0===e||e===r){var n,i=p.bBox(this),a=p.getTranslate(this);if(e===r){var o=i.right+a.x;(n=q.right+G.x+nt-S-2+O-o)>0&&(n=0)}else if(0===e){var s=i.left+a.x;(n=q.left+G.x+nt+S+2-s)<0&&(n=0)}n&&(V<3?this.setAttribute(\"transform\",\"translate(\"+n+\",0) \"+this.getAttribute(\"transform\")):this.setAttribute(\"visibility\",\"hidden\"))}}))}var Y={},W=T[L],Z=k[L],K=T[C],et=k[C],rt=b-X;o?(\"pixels\"===h?(Y.y=z,Y.t=J*K,Y.b=J*et):(Y.t=Y.b=0,Y.yt=z+l*K,Y.yb=z-l*et),\"pixels\"===_?(Y.x=O,Y.l=b*W,Y.r=b*Z):(Y.l=rt*W,Y.r=rt*Z,Y.xl=O-v*W,Y.xr=O+v*Z)):(\"pixels\"===h?(Y.x=O,Y.l=J*W,Y.r=J*Z):(Y.l=Y.r=0,Y.xl=O+l*W,Y.xr=O-l*Z),\"pixels\"===_?(Y.y=1-z,Y.t=b*K,Y.b=b*et):(Y.t=rt*K,Y.b=rt*et,Y.yt=z-v*K,Y.yb=z+v*et)),a.autoMargin(r,e._id,Y)}],r)}(r,e,t);v&&v.then&&(t._promises||[]).push(v),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,a,s=\"v\"===e.orientation,c=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr(\"transform\"),h(t)},moveFn:function(r,o){t.attr(\"transform\",n+u(r,o)),i=l.align((s?e._uFrac:e._vFrac)+r/c.w,s?e._thickFrac:e._lenFrac,0,1,e.xanchor),a=l.align((s?e._vFrac:1-e._uFrac)-o/c.h,s?e._lenFrac:e._thickFrac,0,1,e.yanchor);var f=l.getCursor(i,a,e.xanchor,e.yanchor);h(t,f)},doneFn:function(){if(h(t),void 0!==i&&void 0!==a){var n={};n[e._propPrefix+\"x\"]=i,n[e._propPrefix+\"y\"]=a,void 0!==e._traceIndex?o.call(\"_guiRestyle\",r,n,e._traceIndex):o.call(\"_guiRelayout\",r,n)}}})}(r,e,t)})),e.exit().each((function(e){a.autoMargin(t,e._id)})).remove(),e.order()}}},{\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/extend\":493,\"../../lib/setcursor\":524,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../plots/cartesian/axis_defaults\":556,\"../../plots/cartesian/layout_attributes\":569,\"../../plots/cartesian/position_defaults\":572,\"../../plots/plots\":619,\"../../registry\":638,\"../color\":366,\"../colorscale/helpers\":377,\"../dragelement\":385,\"../drawing\":388,\"../titles\":464,\"./constants\":368,\"@plotly/d3\":58,tinycolor2:312}],371:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t){return n.isPlainObject(t.colorbar)}},{\"../../lib\":503}],372:[function(t,e,r){\"use strict\";e.exports={moduleType:\"component\",name:\"colorbar\",attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),draw:t(\"./draw\").draw,hasColorbar:t(\"./has_colorbar\")}},{\"./attributes\":367,\"./defaults\":369,\"./draw\":370,\"./has_colorbar\":371}],373:[function(t,e,r){\"use strict\";var n=t(\"../colorbar/attributes\"),i=t(\"../../lib/regex\").counter,a=t(\"../../lib/sort_object_keys\"),o=t(\"./scales.js\").scales;a(o);function s(t){return\"`\"+t+\"`\"}e.exports=function(t,e){t=t||\"\";var r,a=(e=e||{}).cLetter||\"c\",l=(\"onlyIfNumerical\"in e?e.onlyIfNumerical:Boolean(t),\"noScale\"in e?e.noScale:\"marker.line\"===t),c=\"showScaleDflt\"in e?e.showScaleDflt:\"z\"===a,u=\"string\"==typeof e.colorscaleDflt?o[e.colorscaleDflt]:null,f=e.editTypeOverride||\"\",h=t?t+\".\":\"\";\"colorAttr\"in e?(r=e.colorAttr,e.colorAttr):s(h+(r={z:\"z\",c:\"color\"}[a]));var p=a+\"auto\",d=a+\"min\",g=a+\"max\",m=a+\"mid\",v=(s(h+p),s(h+d),s(h+g),{});v[d]=v[g]=void 0;var y={};y[p]=!1;var x={};return\"color\"===r&&(x.color={valType:\"color\",arrayOk:!0,editType:f||\"style\"},e.anim&&(x.color.anim=!0)),x[p]={valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:v},x[d]={valType:\"number\",dflt:null,editType:f||\"plot\",impliedEdits:y},x[g]={valType:\"number\",dflt:null,editType:f||\"plot\",impliedEdits:y},x[m]={valType:\"number\",dflt:null,editType:\"calc\",impliedEdits:v},x.colorscale={valType:\"colorscale\",editType:\"calc\",dflt:u,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:\"boolean\",dflt:!1!==e.autoColorDflt,editType:\"calc\",impliedEdits:{colorscale:void 0}},x.reversescale={valType:\"boolean\",dflt:!1,editType:\"plot\"},l||(x.showscale={valType:\"boolean\",dflt:c,editType:\"calc\"},x.colorbar=n),e.noColorAxis||(x.coloraxis={valType:\"subplotid\",regex:i(\"coloraxis\"),dflt:null,editType:\"calc\"}),x}},{\"../../lib/regex\":520,\"../../lib/sort_object_keys\":526,\"../colorbar/attributes\":367,\"./scales.js\":381}],374:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"./helpers\").extractOpts;e.exports=function(t,e,r){var o,s=t._fullLayout,l=r.vals,c=r.containerStr,u=c?i.nestedProperty(e,c).get():e,f=a(u),h=!1!==f.auto,p=f.min,d=f.max,g=f.mid,m=function(){return i.aggNums(Math.min,null,l)},v=function(){return i.aggNums(Math.max,null,l)};(void 0===p?p=m():h&&(p=u._colorAx&&n(p)?Math.min(p,m()):m()),void 0===d?d=v():h&&(d=u._colorAx&&n(d)?Math.max(d,v()):v()),h&&void 0!==g&&(d-g>g-p?p=g-(d-g):d-g=0?s.colorscale.sequential:s.colorscale.sequentialminus,f._sync(\"colorscale\",o))}},{\"../../lib\":503,\"./helpers\":377,\"fast-isnumeric\":190}],375:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./helpers\").hasColorscale,a=t(\"./helpers\").extractOpts;e.exports=function(t,e){function r(t,e){var r=t[\"_\"+e];void 0!==r&&(t[e]=r)}function o(t,i){var o=i.container?n.nestedProperty(t,i.container).get():t;if(o)if(o.coloraxis)o._colorAx=e[o.coloraxis];else{var s=a(o),l=s.auto;(l||void 0===s.min)&&r(o,i.min),(l||void 0===s.max)&&r(o,i.max),s.autocolorscale&&r(o,\"colorscale\")}}for(var s=0;s=0;n--,i++){var a=t[n];r[i]=[1-a[0],a[1]]}return r}function d(t,e){e=e||{};for(var r=t.domain,o=t.range,l=o.length,c=new Array(l),u=0;u4/3-s?o:s}},{}],383:[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\":503}],384:[function(t,e,r){\"use strict\";r.selectMode=function(t){return\"lasso\"===t||\"select\"===t},r.drawMode=function(t){return\"drawclosedpath\"===t||\"drawopenpath\"===t||\"drawline\"===t||\"drawrect\"===t||\"drawcircle\"===t},r.openMode=function(t){return\"drawline\"===t||\"drawopenpath\"===t},r.rectMode=function(t){return\"select\"===t||\"drawline\"===t||\"drawrect\"===t||\"drawcircle\"===t},r.freeMode=function(t){return\"lasso\"===t||\"drawclosedpath\"===t||\"drawopenpath\"===t},r.selectingOrDrawing=function(t){return r.freeMode(t)||r.rectMode(t)}},{}],385:[function(t,e,r){\"use strict\";var n=t(\"mouse-event-offset\"),i=t(\"has-hover\"),a=t(\"has-passive-events\"),o=t(\"../../lib\").removeElement,s=t(\"../../plots/cartesian/constants\"),l=e.exports={};l.align=t(\"./align\"),l.getCursor=t(\"./cursor\");var c=t(\"./unhover\");function u(){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 f(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(t){var e,r,n,c,h,p,d,g,m=t.gd,v=1,y=m._context.doubleClickDelay,x=t.element;m._mouseDownTime||(m._mouseDownTime=0),x.style.pointerEvents=\"all\",x.onmousedown=_,a?(x._ontouchstart&&x.removeEventListener(\"touchstart\",x._ontouchstart),x._ontouchstart=_,x.addEventListener(\"touchstart\",_,{passive:!1})):x.ontouchstart=_;var b=t.clampFn||function(t,e,r){return Math.abs(t)y&&(v=Math.max(v-1,1)),m._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(v,p),!g){var r;try{r=new MouseEvent(\"click\",e)}catch(t){var n=f(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)}d.dispatchEvent(r)}m._dragging=!1,m._dragged=!1}else m._dragged=!1}},l.coverSlip=u},{\"../../lib\":503,\"../../plots/cartesian/constants\":561,\"./align\":382,\"./cursor\":383,\"./unhover\":386,\"has-hover\":228,\"has-passive-events\":229,\"mouse-event-offset\":242}],386:[function(t,e,r){\"use strict\";var n=t(\"../../lib/events\"),i=t(\"../../lib/throttle\"),a=t(\"../../lib/dom\").getGraphDiv,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&&!t._dragged&&!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/dom\":491,\"../../lib/events\":492,\"../../lib/throttle\":530,\"../fx/constants\":400}],387:[function(t,e,r){\"use strict\";r.dash={valType:\"string\",values:[\"solid\",\"dot\",\"dash\",\"longdash\",\"dashdot\",\"longdashdot\"],dflt:\"solid\",editType:\"style\"},r.pattern={shape:{valType:\"enumerated\",values:[\"\",\"/\",\"\\\\\",\"x\",\"-\",\"|\",\"+\",\".\"],dflt:\"\",arrayOk:!0,editType:\"style\"},fillmode:{valType:\"enumerated\",values:[\"replace\",\"overlay\"],dflt:\"replace\",editType:\"style\"},bgcolor:{valType:\"color\",arrayOk:!0,editType:\"style\"},fgcolor:{valType:\"color\",arrayOk:!0,editType:\"style\"},fgopacity:{valType:\"number\",editType:\"style\",min:0,max:1},size:{valType:\"number\",min:0,dflt:8,arrayOk:!0,editType:\"style\"},solidity:{valType:\"number\",min:0,max:1,dflt:.3,arrayOk:!0,editType:\"style\"},editType:\"style\"}},{}],388:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.numberFormat,o=t(\"fast-isnumeric\"),s=t(\"tinycolor2\"),l=t(\"../../registry\"),c=t(\"../color\"),u=t(\"../colorscale\"),f=i.strTranslate,h=t(\"../../lib/svg_text_utils\"),p=t(\"../../constants/xmlns_namespaces\"),d=t(\"../../constants/alignment\").LINE_SPACING,g=t(\"../../constants/interactions\").DESELECTDIM,m=t(\"../../traces/scatter/subtypes\"),v=t(\"../../traces/scatter/make_bubble_size_func\"),y=t(\"../../components/fx/helpers\").appendArrayPointValue,x=e.exports={};x.font=function(t,e,r,n){i.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(c.fill,n)},x.setPosition=function(t,e,r){t.attr(\"x\",e).attr(\"y\",r)},x.setSize=function(t,e,r){t.attr(\"width\",e).attr(\"height\",r)},x.setRect=function(t,e,r,n,i){t.call(x.setPosition,e,r).call(x.setSize,n,i)},x.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),a=n.c2p(t.y);return!!(o(i)&&o(a)&&e.node())&&(\"text\"===e.node().nodeName?e.attr(\"x\",i).attr(\"y\",a):e.attr(\"transform\",f(i,a)),!0)},x.translatePoints=function(t,e,r){t.each((function(t){var i=n.select(this);x.translatePoint(t,i,e,r)}))},x.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr(\"display\",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:\"none\")},x.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,c=l.traceIs(a,\"bar-like\")?\".bartext\":\".point,.textpoint\";t.selectAll(c).each((function(t){x.hideOutsideRangePoint(t,n.select(this),r,i,o,s)}))}))}},x.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},x.singleLineStyle=function(t,e,r,n,i){e.style(\"fill\",\"none\");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||\"\";c.stroke(e,n||a.color),x.dashLine(e,s,o)},x.lineGroupStyle=function(t,e,r,i){t.style(\"fill\",\"none\").each((function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,s=i||a.dash||\"\";n.select(this).call(c.stroke,r||a.color).call(x.dashLine,s,o)}))},x.dashLine=function(t,e,r){r=+r||0,e=x.dashStyle(e,r),t.style({\"stroke-dasharray\":e,\"stroke-width\":r+\"px\"})},x.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},x.singleFillStyle=function(t){var e=(((n.select(t.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;e&&t.call(c.fill,e)},x.fillGroupStyle=function(t){t.style(\"stroke-width\",0).each((function(t){var e=n.select(this);t[0].trace&&e.call(c.fill,t[0].trace.fillcolor)}))};var b=t(\"./symbol_defs\");x.symbolNames=[],x.symbolFuncs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(b).forEach((function(t){var e=b[t],r=e.n;x.symbolList.push(r,String(r),t,r+100,String(r+100),t+\"-open\"),x.symbolNames[r]=t,x.symbolFuncs[r]=e.f,e.needLine&&(x.symbolNeedLines[r]=!0),e.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),t+\"-dot\",r+300,String(r+300),t+\"-open-dot\"),e.noFill&&(x.symbolNoFill[r]=!0)}));var _=x.symbolNames.length;function w(t,e){var r=t%100;return x.symbolFuncs[r](e)+(t>=200?\"M0,0.5L0.5,0L0,-0.5L-0.5,0Z\":\"\")}x.symbolNumber=function(t){if(o(t))t=+t;else 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=x.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=_||t>=400?0:Math.floor(Math.max(t,0))};var T={x1:1,x2:0,y1:0,y2:0},k={x1:0,x2:0,y1:1,y2:0},A=a(\"~f\"),M={radial:{node:\"radialGradient\"},radialreversed:{node:\"radialGradient\",reversed:!0},horizontal:{node:\"linearGradient\",attrs:T},horizontalreversed:{node:\"linearGradient\",attrs:T,reversed:!0},vertical:{node:\"linearGradient\",attrs:k},verticalreversed:{node:\"linearGradient\",attrs:k,reversed:!0}};x.gradient=function(t,e,r,a,o,l){for(var u=o.length,f=M[a],h=new Array(u),p=0;p\"+v(t);d._gradientUrlQueryParts[y]=1},x.pattern=function(t,e,r,a,o,s,l,u,f,h,p,d){var g=\"legend\"===e;u&&(\"overlay\"===f?(h=u,p=c.contrast(h)):(h=void 0,p=u));var m,v,y,x,b,_,w,T,k,A,M,S=r._fullLayout,E=\"p\"+S._uid+\"-\"+a,L={};switch(o){case\"/\":m=s*Math.sqrt(2),v=s*Math.sqrt(2),_=\"path\",L={d:y=\"M-\"+m/4+\",\"+v/4+\"l\"+m/2+\",-\"+v/2+\"M0,\"+v+\"L\"+m+\",0M\"+m/4*3+\",\"+v/4*5+\"l\"+m/2+\",-\"+v/2,opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"\\\\\":m=s*Math.sqrt(2),v=s*Math.sqrt(2),_=\"path\",L={d:y=\"M\"+m/4*3+\",-\"+v/4+\"l\"+m/2+\",\"+v/2+\"M0,0L\"+m+\",\"+v+\"M-\"+m/4+\",\"+v/4*3+\"l\"+m/2+\",\"+v/2,opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"x\":m=s*Math.sqrt(2),v=s*Math.sqrt(2),y=\"M-\"+m/4+\",\"+v/4+\"l\"+m/2+\",-\"+v/2+\"M0,\"+v+\"L\"+m+\",0M\"+m/4*3+\",\"+v/4*5+\"l\"+m/2+\",-\"+v/2+\"M\"+m/4*3+\",-\"+v/4+\"l\"+m/2+\",\"+v/2+\"M0,0L\"+m+\",\"+v+\"M-\"+m/4+\",\"+v/4*3+\"l\"+m/2+\",\"+v/2,x=s-s*Math.sqrt(1-l),_=\"path\",L={d:y,opacity:d,stroke:p,\"stroke-width\":x+\"px\"};break;case\"|\":_=\"path\",_=\"path\",L={d:y=\"M\"+(m=s)/2+\",0L\"+m/2+\",\"+(v=s),opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"-\":_=\"path\",_=\"path\",L={d:y=\"M0,\"+(v=s)/2+\"L\"+(m=s)+\",\"+v/2,opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"+\":_=\"path\",y=\"M\"+(m=s)/2+\",0L\"+m/2+\",\"+(v=s)+\"M0,\"+v/2+\"L\"+m+\",\"+v/2,x=s-s*Math.sqrt(1-l),_=\"path\",L={d:y,opacity:d,stroke:p,\"stroke-width\":x+\"px\"};break;case\".\":m=s,v=s,l.pattern_filled\";S._patternUrlQueryParts[I]=1},x.initGradients=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,\"g\",\"gradients\").selectAll(\"linearGradient,radialGradient\").remove(),e._gradientUrlQueryParts={}},x.initPatterns=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,\"g\",\"patterns\").selectAll(\"pattern\").remove(),e._patternUrlQueryParts={}},x.getPatternAttr=function(t,e,r){return t&&i.isArrayOrTypedArray(t)?e=100,e.attr(\"d\",w(u,l))}var f,h,p,d=!1;if(t.so)p=s.outlierwidth,h=s.outliercolor,f=o.outliercolor;else{var g=(s||{}).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):i.isArrayOrTypedArray(s.color)?c.defaultLine:s.color,i.isArrayOrTypedArray(o.color)&&(f=c.defaultLine,d=!0),f=\"mc\"in t?t.mcc=n.markerScale(t.mc):o.color||\"rgba(0,0,0,0)\",n.selectedColorFn&&(f=n.selectedColorFn(t))}if(t.om)e.call(c.stroke,f).style({\"stroke-width\":(p||1)+\"px\",fill:\"none\"});else{e.style(\"stroke-width\",(t.isBlank?0:p)+\"px\");var m=o.gradient,v=t.mgt;v?d=!0:v=m&&m.type,i.isArrayOrTypedArray(v)&&(v=v[0],M[v]||(v=0));var y=o.pattern,b=y&&x.getPatternAttr(y.shape,t.i,\"\");if(v&&\"none\"!==v){var _=t.mgc;_?d=!0:_=m.color;var T=r.uid;d&&(T+=\"-\"+t.i),x.gradient(e,a,T,v,[[0,_],[1,f]],\"fill\")}else if(b){var k=x.getPatternAttr(y.bgcolor,t.i,null),A=x.getPatternAttr(y.fgcolor,t.i,null),S=y.fgopacity,E=x.getPatternAttr(y.size,t.i,8),L=x.getPatternAttr(y.solidity,t.i,.3),C=t.mcc||i.isArrayOrTypedArray(y.shape)||i.isArrayOrTypedArray(y.bgcolor)||i.isArrayOrTypedArray(y.size)||i.isArrayOrTypedArray(y.solidity),P=r.uid;C&&(P+=\"-\"+t.i),x.pattern(e,\"point\",a,P,b,E,L,t.mcc,y.fillmode,k,A,S)}else c.fill(e,f);p&&c.stroke(e,h)}},x.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=x.tryColorscale(r,\"\"),e.lineScale=x.tryColorscale(r,\"line\"),l.traceIs(t,\"symbols\")&&(e.ms2mrc=m.isBubble(t)?v(t):function(){return(r.size||6)/2}),t.selectedpoints&&i.extendFlat(e,x.makeSelectedPointStyleFns(t)),e},x.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.marker||{},o=r.marker||{},s=n.marker||{},c=a.opacity,u=o.opacity,f=s.opacity,h=void 0!==u,p=void 0!==f;(i.isArrayOrTypedArray(c)||h||p)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?a.opacity:t.mo;return t.selected?h?u:e:p?f:g*e});var d=a.color,m=o.color,v=s.color;(m||v)&&(e.selectedColorFn=function(t){var e=t.mcc||d;return t.selected?m||e:v||e});var y=a.size,x=o.size,b=s.size,_=void 0!==x,w=void 0!==b;return l.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},x.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:u||(l?e:c.addOpacity(e,g))},e},x.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.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){c.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\",w(x.symbolNumber(n),a)),e.mrc2=a})),a.length&&t.each((function(t){for(var e=n.select(this),r=0;r0?r:0}x.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var o=x.makeSelectedTextStyleFns(e);a=o.selectedTextColorFn}var s=e.texttemplate,l=r._fullLayout;t.each((function(t){var o=n.select(this),c=s?i.extractOption(t,e,\"txt\",\"texttemplate\"):i.extractOption(t,e,\"tx\",\"text\");if(c||0===c){if(s){var u=e._module.formatLabels,f=u?u(t,e,l):{},p={};y(p,e,t.i);var d=e._meta||{};c=i.texttemplateString(c,f,l._d3locale,p,t,d)}var g=t.tp||e.textposition,m=L(t,e),v=a?a(t):t.tc||e.textfont.color;o.call(x.font,t.tf||e.textfont.family,m,v).text(c).call(h.convertToTspans,r).call(E,g,m,t.mrc)}else o.remove()}))}},x.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.makeSelectedTextStyleFns(e);t.each((function(t){var i=n.select(this),a=r.selectedTextColorFn(t),o=t.tp||e.textposition,s=L(t,e);c.fill(i,a);var u=l.traceIs(e,\"bar-like\");E(i,o,s,t.mrc2||t.mrc,u)}))}};function C(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,.25),u=Math.pow(s*s+l*l,.25),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)]]}x.smoothopen=function(t,e){if(t.length<3)return\"M\"+t.join(\"L\");var r,n=\"M\"+t[0],i=[];for(r=1;r=1e4&&(x.savedBBoxes={},O=0),r&&(x.savedBBoxes[r]=m),O++,i.extendFlat({},m)},x.setClipUrl=function(t,e,r){t.attr(\"clip-path\",D(e,r))},x.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}},x.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+=f(e,r)).trim(),t[i](\"transform\",a),a},x.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}},x.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 R=/\\s*sc.*/;x.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(R,\"\");t=(t+=n).trim(),this.setAttribute(\"transform\",t)}))}};var F=/translate\\([^)]*\\)\\s*$/;x.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(F);t=1===e&&1===r?[]:[f(o,s),\"scale(\"+e+\",\"+r+\")\",f(-o,-s)],l&&t.push(l),i.attr(\"transform\",t.join(\"\"))}}))}},{\"../../components/fx/helpers\":402,\"../../constants/alignment\":471,\"../../constants/interactions\":478,\"../../constants/xmlns_namespaces\":480,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../registry\":638,\"../../traces/scatter/make_bubble_size_func\":943,\"../../traces/scatter/subtypes\":951,\"../color\":366,\"../colorscale\":378,\"./symbol_defs\":389,\"@plotly/d3\":58,\"fast-isnumeric\":190,tinycolor2:312}],389:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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},\"arrow-up\":{n:45,f:function(t){var e=n.round(t,2);return\"M0,0L-\"+e+\",\"+n.round(2*t,2)+\"H\"+e+\"Z\"},noDot:!0},\"arrow-down\":{n:46,f:function(t){var e=n.round(t,2);return\"M0,0L-\"+e+\",-\"+n.round(2*t,2)+\"H\"+e+\"Z\"},noDot:!0},\"arrow-left\":{n:47,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,0L\"+e+\",-\"+r+\"V\"+r+\"Z\"},noDot:!0},\"arrow-right\":{n:48,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,0L-\"+e+\",-\"+r+\"V\"+r+\"Z\"},noDot:!0},\"arrow-bar-up\":{n:49,f:function(t){var e=n.round(t,2);return\"M-\"+e+\",0H\"+e+\"M0,0L-\"+e+\",\"+n.round(2*t,2)+\"H\"+e+\"Z\"},needLine:!0,noDot:!0},\"arrow-bar-down\":{n:50,f:function(t){var e=n.round(t,2);return\"M-\"+e+\",0H\"+e+\"M0,0L-\"+e+\",-\"+n.round(2*t,2)+\"H\"+e+\"Z\"},needLine:!0,noDot:!0},\"arrow-bar-left\":{n:51,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,-\"+r+\"V\"+r+\"M0,0L\"+e+\",-\"+r+\"V\"+r+\"Z\"},needLine:!0,noDot:!0},\"arrow-bar-right\":{n:52,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,-\"+r+\"V\"+r+\"M0,0L-\"+e+\",-\"+r+\"V\"+r+\"Z\"},needLine:!0,noDot:!0}}},{\"@plotly/d3\":58}],390:[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\"}}}},{}],391:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../registry\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../lib\"),s=t(\"./compute_error\");function l(t,e,r,i){var l=e[\"error_\"+i]||{},c=[];if(l.visible&&-1!==[\"linear\",\"log\"].indexOf(r.type)){for(var u=s(l),f=0;f0;e.each((function(e){var f,h=e[0].trace,p=h.error_x||{},d=h.error_y||{};h.ids&&(f=function(t){return t.id});var g=o.hasMarkers(h)&&h.marker.maxdisplayed>0;d.visible||p.visible||(e=[]);var m=n.select(this).selectAll(\"g.errorbar\").data(e,f);if(m.exit().remove(),e.length){p.visible||m.selectAll(\"path.xerror\").remove(),d.visible||m.selectAll(\"path.yerror\").remove(),m.style(\"opacity\",1);var v=m.enter().append(\"g\").classed(\"errorbar\",!0);u&&v.style(\"opacity\",0).transition().duration(s.duration).style(\"opacity\",1),a.setClipUrl(m,r.layerClipId,t),m.each((function(t){var e=n.select(this),r=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,l,c);if(!g||t.vis){var a,o=e.select(\"path.yerror\");if(d.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var f=d.width;a=\"M\"+(r.x-f)+\",\"+r.yh+\"h\"+2*f+\"m-\"+f+\",0V\"+r.ys,r.noYS||(a+=\"m-\"+f+\",0h\"+2*f),!o.size()?o=e.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").classed(\"yerror\",!0):u&&(o=o.transition().duration(s.duration).ease(s.easing)),o.attr(\"d\",a)}else o.remove();var h=e.select(\"path.xerror\");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var m=(p.copy_ystyle?d:p).width;a=\"M\"+r.xh+\",\"+(r.y-m)+\"v\"+2*m+\"m0,-\"+m+\"H\"+r.xs,r.noXS||(a+=\"m0,-\"+m+\"v\"+2*m),!h.size()?h=e.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").classed(\"xerror\",!0):u&&(h=h.transition().duration(s.duration).ease(s.easing)),h.attr(\"d\",a)}else h.remove()}}))}}))}},{\"../../traces/scatter/subtypes\":951,\"../drawing\":388,\"@plotly/d3\":58,\"fast-isnumeric\":190}],396:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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\":366,\"@plotly/d3\":58}],397:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"./layout_attributes\").hoverlabel,a=t(\"../../lib/extend\").extendFlat;e.exports={hoverlabel:{bgcolor:a({},i.bgcolor,{arrayOk:!0}),bordercolor:a({},i.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:\"none\"}),align:a({},i.align,{arrayOk:!0}),namelength:a({},i.namelength,{arrayOk:!0}),editType:\"none\"}}},{\"../../lib/extend\":493,\"../../plots/font_attributes\":585,\"./layout_attributes\":407}],398:[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=0&&r.index_[0]._length||ot<0||ot>w[0]._length)return d.unhoverRaw(t,e)}if(e.pointerX=at+_[0]._offset,e.pointerY=ot+w[0]._offset,V=\"xval\"in e?v.flat(l,e.xval):v.p2c(_,at),H=\"yval\"in e?v.flat(l,e.yval):v.p2c(w,ot),!i(V[0])||!i(H[0]))return o.warn(\"Fx.hover failed\",e,t),d.unhoverRaw(t,e)}var ct=1/0;function ut(t,r){for(G=0;Gtt&&(et.splice(0,tt),ct=et[0].distance),y&&0!==B&&0===et.length){$.distance=B,$.index=!1;var f=W._module.hoverPoints($,K,Q,\"closest\",{hoverLayer:u._hoverlayer});if(f&&(f=f.filter((function(t){return t.spikeDistance<=B}))),f&&f.length){var h,d=f.filter((function(t){return t.xa.showspikes&&\"hovered data\"!==t.xa.spikesnap}));if(d.length){var g=d[0];i(g.x0)&&i(g.y0)&&(h=ht(g),(!nt.vLinePoint||nt.vLinePoint.spikeDistance>h.spikeDistance)&&(nt.vLinePoint=h))}var m=f.filter((function(t){return t.ya.showspikes&&\"hovered data\"!==t.ya.spikesnap}));if(m.length){var x=m[0];i(x.x0)&&i(x.y0)&&(h=ht(x),(!nt.hLinePoint||nt.hLinePoint.spikeDistance>h.spikeDistance)&&(nt.hLinePoint=h))}}}}}function ft(t,e,r){for(var n,i=null,a=1/0,o=0;o0&&Math.abs(t.distance)Tt-1;Mt--)Ct(et[Mt]);et=St,mt()}var Pt=t._hoverdata,It=[],Ot=j(t),zt=U(t);for(q=0;q1||et.length>1)||\"closest\"===P&&it&&et.length>1,Wt=p.combine(u.plot_bgcolor||p.background,u.paper_bgcolor),Xt=I(et,{gd:t,hovermode:P,rotateLabels:Yt,bgColor:Wt,container:u._hoverlayer,outerContainer:u._paper.node(),commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance});v.isUnifiedHover(P)||(!function(t,e,r){var n,i,a,o,s,l,c,u=0,f=1,h=t.size(),p=new Array(h),d=0;function g(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;oe.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=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--)}}}t.each((function(t){var n=t[e],i=\"x\"===n._id.charAt(0),a=n.range;0===d&&a&&a[0]>a[1]!==i&&(f=-1),p[d++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(i?T:1)/2,pmin:0,pmax:i?r.width:r.height}]})),p.sort((function(t,e){return t[0].posref-e[0].posref||f*(e[0].traceIndex-t[0].traceIndex)}));for(;!n&&u<=h;){for(u++,n=!0,o=0;o.01&&y.pmin===x.pmin&&y.pmax===x.pmax){for(s=v.length-1;s>=0;s--)v[s].dp+=i;for(m.push.apply(m,v),p.splice(o+1,1),c=0,s=m.length-1;s>=0;s--)c+=m[s].dp;for(a=c/m.length,s=m.length-1;s>=0;s--)m[s].dp-=a;n=!1}else o++}p.forEach(g)}for(o=p.length-1;o>=0;o--){var b=p[o];for(s=b.length-1;s>=0;s--){var _=b[s],w=_.datum;w.offset=_.dp,w.del=_.del}}}(Xt,Yt?\"xa\":\"ya\",u),z(Xt,Yt,u._invScaleX,u._invScaleY));if(s&&s.tagName){var Zt=m.getComponentMethod(\"annotations\",\"hasClickToShow\")(t,It);f(n.select(s),Zt?\"pointer\":\"\")}if(!s||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)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(t,0,Pt))return;Pt&&t.emit(\"plotly_unhover\",{event:e,points:Pt});t.emit(\"plotly_hover\",{event:e,points:t._hoverdata,xaxes:_,yaxes:w,xvals:V,yvals:H})}(t,e,r,a,s)}))},r.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=e.gd,a=j(i),o=U(i),s=I(t.map((function(t){var r=t._x0||t.x0||t.x||0,n=t._x1||t.x1||t.x||0,s=t._y0||t.y0||t.y||0,l=t._y1||t.y1||t.y||0,c=t.eventData;if(c){var u=Math.min(r,n),f=Math.max(r,n),h=Math.min(s,l),d=Math.max(s,l),g=t.trace;if(m.traceIs(g,\"gl3d\")){var v=i._fullLayout[g.scene]._scene.container,y=v.offsetLeft,x=v.offsetTop;u+=y,f+=y,h+=x,d+=x}c.bbox={x0:u+o,x1:f+o,y0:h+a,y1:d+a},e.inOut_bbox&&e.inOut_bbox.push(c.bbox)}else c=!1;return{color:t.color||p.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,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:\"\"},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData:c}})),{gd:i,hovermode:\"closest\",rotateLabels:!1,bgColor:e.bgColor||p.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}),l=0,c=0;return s.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5([\\s\\S]*)<\\/extra>/;function I(t,e){var r=e.gd,i=r._fullLayout,a=e.hovermode,c=e.rotateLabels,f=e.bgColor,d=e.container,g=e.outerContainer,w=e.commonLabelOpts||{};if(0===t.length)return[[]];var T=e.fontFamily||y.HOVERFONT,k=e.fontSize||y.HOVERFONTSIZE,A=t[0],E=A.xa,L=A.ya,P=a.charAt(0),I=A[P+\"Label\"],z=V(r,g),D=z.top,R=z.width,F=z.height,B=void 0!==I&&A.distance<=e.hoverdistance&&(\"x\"===a||\"y\"===a);if(B){var N,j,U=!0;for(N=0;Ni.width-b?(m=i.width-b,e.attr(\"d\",\"M\"+(b-M)+\",0L\"+b+\",\"+x+M+\"v\"+x+(2*S+y.height)+\"H-\"+b+\"V\"+x+M+\"H\"+(b-2*M)+\"Z\")):e.attr(\"d\",\"M0,0L\"+M+\",\"+x+M+\"H\"+(S+y.width/2)+\"v\"+x+(2*S+y.height)+\"H-\"+(S+y.width/2)+\"V\"+x+M+\"H-\"+M+\"Z\")}else{var _,C,P;\"right\"===L.side?(_=\"start\",C=1,P=\"\",m=E._offset+E._length):(_=\"end\",C=-1,P=\"-\",m=E._offset),v=L._offset+(A.y0+A.y1)/2,l.attr(\"text-anchor\",_),e.attr(\"d\",\"M0,0L\"+P+M+\",\"+M+\"V\"+(S+y.height/2)+\"h\"+P+(2*S+y.width)+\"V-\"+(S+y.height/2)+\"H\"+P+M+\"V-\"+M+\"Z\");var O,z=y.height/2,R=D-y.top-z,F=\"clip\"+i._uid+\"commonlabel\"+L._id;if(m=0?at:ot+ct=0?ot:vt+ct=0?nt:it+ut=0?it:yt+ut=0,\"top\"!==t.idealAlign&&G||!Y?G?(z+=j/2,t.anchor=\"start\"):t.anchor=\"middle\":(z-=j/2,t.anchor=\"end\");else if(t.pos=z,G=P+N/2+W<=R,Y=P-N/2-W>=0,\"left\"!==t.idealAlign&&G||!Y)if(G)P+=N/2,t.anchor=\"start\";else{t.anchor=\"middle\";var X=W/2,Z=P+X-R,J=P-X;Z>0&&(P-=Z),J<0&&(P+=-J)}else P-=N/2,t.anchor=\"end\";w.attr(\"text-anchor\",t.anchor),E&&A.attr(\"text-anchor\",t.anchor),e.attr(\"transform\",s(P,z)+(c?l(_):\"\"))})),xt}function O(t,e,r,n,i,a){var s=\"\",l=\"\";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=o.templateString(t.name,t.trace._meta)),s=B(t.name,t.nameLength));var c=r.charAt(0),u=\"x\"===c?\"y\":\"x\";void 0!==t.zLabel?(void 0!==t.xLabel&&(l+=\"x: \"+t.xLabel+\"
\"),void 0!==t.yLabel&&(l+=\"y: \"+t.yLabel+\"
\"),\"choropleth\"!==t.trace.type&&\"choroplethmapbox\"!==t.trace.type&&(l+=(l?\"z: \":\"\")+t.zLabel)):e&&t[c+\"Label\"]===i?l=t[u+\"Label\"]||\"\":void 0===t.xLabel?void 0!==t.yLabel&&\"scattercarpet\"!==t.trace.type&&(l=t.yLabel):l=void 0===t.yLabel?t.xLabel:\"(\"+t.xLabel+\", \"+t.yLabel+\")\",!t.text&&0!==t.text||Array.isArray(t.text)||(l+=(l?\"
\":\"\")+t.text),void 0!==t.extraText&&(l+=(l?\"
\":\"\")+t.extraText),a&&\"\"===l&&!t.hovertemplate&&(\"\"===s&&a.remove(),l=s);var f=t.hovertemplate||!1;if(f){var h=t.hovertemplateLabels||t;t[c+\"Label\"]!==i&&(h[c+\"other\"]=h[c+\"Val\"],h[c+\"otherLabel\"]=h[c+\"Label\"]),l=(l=o.hovertemplateString(f,h,n._d3locale,t.eventData[0]||{},t.trace._meta)).replace(P,(function(e,r){return s=B(r,t.nameLength),\"\"}))}return[l,s]}function z(t,e,r,i){var a=function(t){return t*r},o=function(t){return t*i};t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var i=r.select(\"text.nums\"),s=t.anchor,l=\"end\"===s?-1:1,c={start:1,end:-1,middle:0}[s],f=c*(M+S),p=f+c*(t.txwidth+S),d=0,g=t.offset,m=\"middle\"===s;m&&(f-=t.tx2width/2,p+=t.txwidth/2+S),e&&(g*=-A,d=t.offset*k),r.select(\"path\").attr(\"d\",m?\"M-\"+a(t.bx/2+t.tx2width/2)+\",\"+o(g-t.by/2)+\"h\"+a(t.bx)+\"v\"+o(t.by)+\"h-\"+a(t.bx)+\"Z\":\"M0,0L\"+a(l*M+d)+\",\"+o(M+g)+\"v\"+o(t.by/2-M)+\"h\"+a(l*t.bx)+\"v-\"+o(t.by)+\"H\"+a(l*M+d)+\"V\"+o(g-M)+\"Z\");var v=d+f,y=g+t.ty0-t.by/2+S,x=t.textAlign||\"auto\";\"auto\"!==x&&(\"left\"===x&&\"start\"!==s?(i.attr(\"text-anchor\",\"start\"),v=m?-t.bx/2-t.tx2width/2+S:-t.bx-S):\"right\"===x&&\"end\"!==s&&(i.attr(\"text-anchor\",\"end\"),v=m?t.bx/2-t.tx2width/2-S:t.bx+S)),i.call(u.positionText,a(v),o(y)),t.tx2width&&(r.select(\"text.name\").call(u.positionText,a(p+c*S+d),o(g+t.ty0-t.by/2+S)),r.select(\"rect\").call(h.setRect,a(p+(c-1)*t.tx2width/2+d),o(g-t.by/2-1),a(t.tx2width),o(t.by+2)))}))}function D(t,e){var r=t.index,n=t.trace||{},a=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var c=Array.isArray(r)?function(t,e){var i=o.castOption(a,r,t);return l(i)?i:o.extractOption({},n,\"\",e)}:function(t,e){return o.extractOption(s,n,t,e)};function u(e,r,n){var i=c(r,n);l(i)&&(t[e]=i)}if(u(\"hoverinfo\",\"hi\",\"hoverinfo\"),u(\"bgcolor\",\"hbg\",\"hoverlabel.bgcolor\"),u(\"borderColor\",\"hbc\",\"hoverlabel.bordercolor\"),u(\"fontFamily\",\"htf\",\"hoverlabel.font.family\"),u(\"fontSize\",\"hts\",\"hoverlabel.font.size\"),u(\"fontColor\",\"htc\",\"hoverlabel.font.color\"),u(\"nameLength\",\"hnl\",\"hoverlabel.namelength\"),u(\"textAlign\",\"hta\",\"hoverlabel.align\"),t.posref=\"y\"===e||\"closest\"===e&&\"h\"===n.orientation?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:g.hoverLabelText(t.xa,t.xLabelVal,n.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel=\"yLabel\"in t?t.yLabel:g.hoverLabelText(t.ya,t.yLabelVal,n.yhoverformat),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 f=g.tickText(t.xa,t.xa.c2l(t.xerr),\"hover\").text;void 0!==t.xerrneg?t.xLabel+=\" +\"+f+\" / -\"+g.tickText(t.xa,t.xa.c2l(t.xerrneg),\"hover\").text:t.xLabel+=\" \\xb1 \"+f,\"x\"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||\"log\"===t.ya.type&&t.yerr<=0)){var h=g.tickText(t.ya,t.ya.c2l(t.yerr),\"hover\").text;void 0!==t.yerrneg?t.yLabel+=\" +\"+h+\" / -\"+g.tickText(t.ya,t.ya.c2l(t.yerrneg),\"hover\").text:t.yLabel+=\" \\xb1 \"+h,\"y\"===e&&(t.distance+=1)}var p=t.hoverinfo||t.trace.hoverinfo;return p&&\"all\"!==p&&(-1===(p=Array.isArray(p)?p:p.split(\"+\")).indexOf(\"x\")&&(t.xLabel=void 0),-1===p.indexOf(\"y\")&&(t.yLabel=void 0),-1===p.indexOf(\"z\")&&(t.zLabel=void 0),-1===p.indexOf(\"text\")&&(t.text=void 0),-1===p.indexOf(\"name\")&&(t.name=void 0)),t}function R(t,e,r){var n,i,o=r.container,s=r.fullLayout,l=s._size,c=r.event,u=!!e.hLinePoint,f=!!e.vLinePoint;if(o.selectAll(\".spikeline\").remove(),f||u){var d=p.combine(s.plot_bgcolor,s.paper_bgcolor);if(u){var m,v,y=e.hLinePoint;n=y&&y.xa,\"cursor\"===(i=y&&y.ya).spikesnap?(m=c.pointerX,v=c.pointerY):(m=n._offset+y.x,v=i._offset+y.y);var x,b,_=a.readability(y.color,d)<1.5?p.contrast(d):y.color,w=i.spikemode,T=i.spikethickness,k=i.spikecolor||_,A=g.getPxPosition(t,i);if(-1!==w.indexOf(\"toaxis\")||-1!==w.indexOf(\"across\")){if(-1!==w.indexOf(\"toaxis\")&&(x=A,b=m),-1!==w.indexOf(\"across\")){var M=i._counterDomainMin,S=i._counterDomainMax;\"free\"===i.anchor&&(M=Math.min(M,i.position),S=Math.max(S,i.position)),x=l.l+M*l.w,b=l.l+S*l.w}o.insert(\"line\",\":first-child\").attr({x1:x,x2:b,y1:v,y2:v,\"stroke-width\":T,stroke:k,\"stroke-dasharray\":h.dashStyle(i.spikedash,T)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),o.insert(\"line\",\":first-child\").attr({x1:x,x2:b,y1:v,y2:v,\"stroke-width\":T+2,stroke:d}).classed(\"spikeline\",!0).classed(\"crisp\",!0)}-1!==w.indexOf(\"marker\")&&o.insert(\"circle\",\":first-child\").attr({cx:A+(\"right\"!==i.side?T:-T),cy:v,r:T,fill:k}).classed(\"spikeline\",!0)}if(f){var E,L,C=e.vLinePoint;n=C&&C.xa,i=C&&C.ya,\"cursor\"===n.spikesnap?(E=c.pointerX,L=c.pointerY):(E=n._offset+C.x,L=i._offset+C.y);var P,I,O=a.readability(C.color,d)<1.5?p.contrast(d):C.color,z=n.spikemode,D=n.spikethickness,R=n.spikecolor||O,F=g.getPxPosition(t,n);if(-1!==z.indexOf(\"toaxis\")||-1!==z.indexOf(\"across\")){if(-1!==z.indexOf(\"toaxis\")&&(P=F,I=L),-1!==z.indexOf(\"across\")){var B=n._counterDomainMin,N=n._counterDomainMax;\"free\"===n.anchor&&(B=Math.min(B,n.position),N=Math.max(N,n.position)),P=l.t+(1-N)*l.h,I=l.t+(1-B)*l.h}o.insert(\"line\",\":first-child\").attr({x1:E,x2:E,y1:P,y2:I,\"stroke-width\":D,stroke:R,\"stroke-dasharray\":h.dashStyle(n.spikedash,D)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),o.insert(\"line\",\":first-child\").attr({x1:E,x2:E,y1:P,y2:I,\"stroke-width\":D+2,stroke:d}).classed(\"spikeline\",!0).classed(\"crisp\",!0)}-1!==z.indexOf(\"marker\")&&o.insert(\"circle\",\":first-child\").attr({cx:E,cy:F-(\"top\"!==n.side?D:-D),r:D,fill:R}).classed(\"spikeline\",!0)}}}function F(t,e){return!e||(e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint)}function B(t,e){return u.plainText(t||\"\",{len:e,allowedTags:[\"br\",\"sub\",\"sup\",\"b\",\"i\",\"em\"]})}function N(t,e,r){var n=e[t+\"a\"],i=e[t+\"Val\"],a=e.cd[0];if(\"category\"===n.type)i=n._categoriesMap[i];else if(\"date\"===n.type){var o=e.trace[t+\"periodalignment\"];if(o){var s=e.cd[e.index],l=s[t+\"Start\"];void 0===l&&(l=s[t]);var c=s[t+\"End\"];void 0===c&&(c=s[t]);var u=c-l;\"end\"===o?i+=u:\"middle\"===o&&(i+=u/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&(\"group\"!==r.boxmode&&\"group\"!==r.violinmode||(i+=a.t.dPos)),i}function j(t){return t.offsetTop+t.clientTop}function U(t){return t.offsetLeft+t.clientLeft}function V(t,e){var r=t._fullLayout,n=e.getBoundingClientRect(),i=n.x,a=n.y,s=i+n.width,l=a+n.height,c=o.apply3DTransform(r._invTransform)(i,a),u=o.apply3DTransform(r._invTransform)(s,l),f=c[0],h=c[1],p=u[0],d=u[1];return{x:f,y:h,width:p-f,height:d-h,top:Math.min(h,d),left:Math.min(f,p),right:Math.max(f,p),bottom:Math.max(h,d)}}},{\"../../lib\":503,\"../../lib/events\":492,\"../../lib/override_cursor\":514,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"../color\":366,\"../dragelement\":385,\"../drawing\":388,\"../legend/defaults\":418,\"../legend/draw\":419,\"./constants\":400,\"./helpers\":402,\"@plotly/d3\":58,\"fast-isnumeric\":190,tinycolor2:312}],404:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../color\"),a=t(\"./helpers\").isUnifiedHover;e.exports=function(t,e,r,o){o=o||{};var s=e.legend;function l(t){o.font[t]||(o.font[t]=s?e.legend.font[t]:e.font[t])}e&&a(e.hovermode)&&(o.font||(o.font={}),l(\"size\"),l(\"family\"),l(\"color\"),s?(o.bgcolor||(o.bgcolor=i.combine(e.legend.bgcolor,e.paper_bgcolor)),o.bordercolor||(o.bordercolor=e.legend.bordercolor)):o.bgcolor||(o.bgcolor=e.paper_bgcolor)),r(\"hoverlabel.bgcolor\",o.bgcolor),r(\"hoverlabel.bordercolor\",o.bordercolor),r(\"hoverlabel.namelength\",o.namelength),n.coerceFont(r,\"hoverlabel.font\",o.font),r(\"hoverlabel.align\",o.align)}},{\"../../lib\":503,\"../color\":366,\"./helpers\":402}],405:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e){function r(r,a){return void 0!==e[r]?e[r]:n.coerce(t,e,i,r,a)}return r(\"clickmode\"),r(\"hovermode\")}},{\"../../lib\":503,\"./layout_attributes\":407}],406:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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,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\":503,\"../dragelement\":385,\"./attributes\":397,\"./calc\":398,\"./click\":399,\"./constants\":400,\"./defaults\":401,\"./helpers\":402,\"./hover\":403,\"./layout_attributes\":407,\"./layout_defaults\":408,\"./layout_global_defaults\":409,\"@plotly/d3\":58}],407:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"../../plots/font_attributes\"),a=i({editType:\"none\"});a.family.dflt=n.HOVERFONT,a.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\",\"drawclosedpath\",\"drawopenpath\",\"drawline\",\"drawrect\",\"drawcircle\",\"orbit\",\"turntable\",!1],dflt:\"zoom\",editType:\"modebar\"},hovermode:{valType:\"enumerated\",values:[\"x\",\"y\",\"closest\",!1,\"x unified\",\"y unified\"],dflt:\"closest\",editType:\"modebar\"},hoverdistance:{valType:\"integer\",min:-1,dflt:20,editType:\"none\"},spikedistance:{valType:\"integer\",min:-1,dflt:-1,editType:\"none\"},hoverlabel:{bgcolor:{valType:\"color\",editType:\"none\"},bordercolor:{valType:\"color\",editType:\"none\"},font:a,grouptitlefont:i({editType:\"none\"}),align:{valType:\"enumerated\",values:[\"left\",\"right\",\"auto\"],dflt:\"auto\",editType:\"none\"},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\":585,\"./constants\":400}],408:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\"),a=t(\"./hovermode_defaults\"),o=t(\"./hoverlabel_defaults\");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}a(t,e)&&(r(\"hoverdistance\"),r(\"spikedistance\")),\"select\"===r(\"dragmode\")&&r(\"selectdirection\");var s=e._has(\"mapbox\"),l=e._has(\"geo\"),c=e._basePlotModules.length;\"zoom\"===e.dragmode&&((s||l)&&1===c||s&&l&&2===c)&&(e.dragmode=\"pan\"),o(t,e,r),n.coerceFont(r,\"hoverlabel.grouptitlefont\",e.hoverlabel.font)}},{\"../../lib\":503,\"./hoverlabel_defaults\":404,\"./hovermode_defaults\":405,\"./layout_attributes\":407}],409:[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\":503,\"./hoverlabel_defaults\":404,\"./layout_attributes\":407}],410:[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;h1){if(!h&&!p&&!d)\"independent\"===k(\"pattern\")&&(h=!0);m._hasSubplotGrid=h;var x,b,_=\"top to bottom\"===k(\"roworder\"),w=h?.2:.1,T=h?.3:.1;g&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),m._domains={x:u(\"x\",k,w,x,y),y:u(\"y\",k,T,b,v,_)}}else delete e.grid}function k(t,e){return n.coerce(r,m,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,m=r.columns,v=\"independent\"===r.pattern,y=r._axisMap={};if(d){var x=h.subplots||[];l=r.subplots=new Array(g);var b=1;for(n=0;n1);if(!1===_&&(e.legend=void 0),(!1!==_||f.uirevision)&&(p(\"uirevision\",e.uirevision),!1!==_)){p(\"bgcolor\",e.paper_bgcolor),p(\"bordercolor\"),p(\"borderwidth\");var w,T,k,A=i.coerceFont(p,\"font\",e.font),M=\"h\"===p(\"orientation\");if(M?(w=0,n.getComponentMethod(\"rangeslider\",\"isVisible\")(t.xaxis)?(T=1.1,k=\"bottom\"):(T=-.1,k=\"top\")):(w=1.02,T=1,k=\"auto\"),p(\"traceorder\",x),c.isGrouped(e.legend)&&p(\"tracegroupgap\"),p(\"itemsizing\"),p(\"itemwidth\"),p(\"itemclick\"),p(\"itemdoubleclick\"),p(\"groupclick\"),p(\"x\",w),p(\"xanchor\"),p(\"y\",T),p(\"yanchor\",k),p(\"valign\"),i.noneOrAll(f,h,[\"x\",\"y\"]),p(\"title.text\")){p(\"title.side\",M?\"left\":\"top\");var S=i.extendFlat({},A,{size:i.bigFont(A.size)});i.coerceFont(p,\"title.font\",S)}}}},{\"../../lib\":503,\"../../plot_api/plot_template\":543,\"../../plots/attributes\":550,\"../../plots/layout_attributes\":610,\"../../registry\":638,\"./attributes\":416,\"./helpers\":422}],419:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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/alignment\"),g=d.LINE_SPACING,m=d.FROM_TL,v=d.FROM_BR,y=t(\"./get_legend_data\"),x=t(\"./style\"),b=t(\"./helpers\");function _(t,e,r,n,i){var a=r.data()[0][0].trace,l={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&&(l.group=a._group),o.traceIs(a,\"pie-like\")&&(l.label=r.datum()[0].label),!1!==s.triggerHandler(t,\"plotly_legendclick\",l))if(1===n)e._clickTimeout=setTimeout((function(){t._fullLayout&&h(r,t,n)}),t._context.doubleClickDelay);else if(2===n){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,\"plotly_legenddoubleclick\",l)&&h(r,t,n)}}function w(t,e,r){var n,a,s=t.data()[0][0],l=s.trace,u=o.traceIs(l,\"pie-like\"),h=!r._inHover&&e._context.edits.legendText&&!u,d=r._maxNameLength;s.groupTitle?(n=s.groupTitle.text,a=s.groupTitle.font):(a=r.font,r.entries?n=s.text:(n=u?s.label:l.name,l._meta&&(n=i.templateString(n,l._meta))));var g=i.ensureSingle(t,\"text\",\"legendtext\");g.attr(\"text-anchor\",\"start\").call(c.font,a).text(h?T(n,d):n);var m=r.itemwidth+2*p.itemGap;f.positionText(g,m,0),h?g.call(f.makeEditable,{gd:e,text:n}).call(A,t,e,r).on(\"edit\",(function(n){this.text(T(n,d)).call(A,t,e,r);var a=s.trace._fullInput||{},c={};if(o.hasTransform(a,\"groupby\")){var u=o.getTransformIndices(a,\"groupby\"),f=u[u.length-1],h=i.keyedContainer(a,\"transforms[\"+f+\"].styles\",\"target\",\"value.name\");h.set(s.trace._group,n),c=h.constructUpdate()}else c.name=n;return o.call(\"_guiRestyle\",e,c,l.index)})):A(g,t,e,r)}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 k(t,e){var r,a=e._context.doubleClickDelay,o=1,s=i.ensureSingle(t,\"rect\",\"legendtoggle\",(function(t){e._context.staticPlot||t.style(\"cursor\",\"pointer\").attr(\"pointer-events\",\"all\"),t.call(u.fill,\"rgba(0,0,0,0)\")}));e._context.staticPlot||(s.on(\"mousedown\",(function(){(r=(new Date).getTime())-e._legendMouseDownTimea&&(o=Math.max(o-1,1)),_(e,r,t,o,n.event)}})))}function A(t,e,r,n,i){n._inHover&&t.attr(\"data-notex\",!0),f.convertToTspans(t,r,(function(){!function(t,e,r,n){var i=t.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend)return void t.remove();var a=t.select(\"g[class*=math-group]\"),o=a.node();r||(r=e._fullLayout.legend);var s,l=r.borderwidth;s=1===n?r.title.font:i.groupTitle?i.groupTitle.font:r.font;var u,h,d=s.size*g;if(o){var m=c.bBox(o);u=m.height,h=m.width,1===n?c.setTranslate(a,l,l+.75*u):c.setTranslate(a,0,.25*u)}else{var v=t.select(1===n?\".legendtitletext\":\".legendtext\"),y=f.lineCount(v),x=v.node();if(u=d*y,h=x?c.bBox(x).width:0,1===n)\"left\"===r.title.side&&(h+=2*p.itemGap),f.positionText(v,l+p.titlePad,l+d);else{var b=2*p.itemGap+r.itemwidth;i.groupTitle&&(b=p.itemGap,h-=r.itemwidth),f.positionText(v,b,-d*((y-1)/2-.3))}}1===n?(r._titleWidth=h,r._titleHeight=u):(i.lineHeight=d,i.height=Math.max(u,16)+3,i.width=h)}(e,r,n,i)}))}function M(t){return i.isRightAnchor(t)?\"right\":i.isCenterAnchor(t)?\"center\":\"left\"}function S(t){return i.isBottomAnchor(t)?\"bottom\":i.isMiddleAnchor(t)?\"middle\":\"top\"}e.exports=function(t,e){return e||(e=t._fullLayout.legend||{}),function(t,e){var r,s,f=t._fullLayout,h=\"legend\"+f._uid,d=e._inHover;d?(r=e.layer,h+=\"-hover\"):r=f._infolayer;if(!r)return;t._legendMouseDownTime||(t._legendMouseDownTime=0);if(d){if(!e.entries)return;s=y(e.entries,e)}else{if(!t.calcdata)return;s=f.showlegend&&y(t.calcdata,e)}var g=f.hiddenlabels||[];if(!(d||f.showlegend&&s.length))return r.selectAll(\".legend\").remove(),f._topdefs.select(\"#\"+h).remove(),a.autoMargin(t,\"legend\");var T=i.ensureSingle(r,\"g\",\"legend\",(function(t){d||t.attr(\"pointer-events\",\"all\")})),E=i.ensureSingleById(f._topdefs,\"clipPath\",h,(function(t){t.append(\"rect\")})),L=i.ensureSingle(T,\"rect\",\"bg\",(function(t){t.attr(\"shape-rendering\",\"crispEdges\")}));L.call(u.stroke,e.bordercolor).call(u.fill,e.bgcolor).style(\"stroke-width\",e.borderwidth+\"px\");var C=i.ensureSingle(T,\"g\",\"scrollbox\"),P=e.title;if(e._titleWidth=0,e._titleHeight=0,P.text){var I=i.ensureSingle(C,\"text\",\"legendtitletext\");I.attr(\"text-anchor\",\"start\").call(c.font,P.font).text(P.text),A(I,C,t,e,1)}else C.selectAll(\".legendtitletext\").remove();var O=i.ensureSingle(T,\"rect\",\"scrollbar\",(function(t){t.attr(p.scrollBarEnterAttrs).call(u.fill,p.scrollBarColor)})),z=C.selectAll(\"g.groups\").data(s);z.enter().append(\"g\").attr(\"class\",\"groups\"),z.exit().remove();var D=z.selectAll(\"g.traces\").data(i.identity);D.enter().append(\"g\").attr(\"class\",\"traces\"),D.exit().remove(),D.style(\"opacity\",(function(t){var e=t[0].trace;return o.traceIs(e,\"pie-like\")?-1!==g.indexOf(t[0].label)?.5:1:\"legendonly\"===e.visible?.5:1})).each((function(){n.select(this).call(w,t,e)})).call(x,t,e).each((function(){d||n.select(this).call(k,t)})),i.syncOrAsync([a.previousPromises,function(){return function(t,e,r,i){var a=t._fullLayout;i||(i=a.legend);var o=a._size,s=b.isVertical(i),l=b.isGrouped(i),u=i.borderwidth,f=2*u,h=p.itemGap,d=i.itemwidth+2*h,g=2*(u+h),m=S(i),v=i.y<0||0===i.y&&\"top\"===m,y=i.y>1||1===i.y&&\"bottom\"===m,x=i.tracegroupgap;i._maxHeight=Math.max(v||y?a.height/2:o.h,30);var _=0;i._width=0,i._height=0;var w=function(t){var e=0,r=0,n=t.title.side;n&&(-1!==n.indexOf(\"left\")&&(e=t._titleWidth),-1!==n.indexOf(\"top\")&&(r=t._titleHeight));return[e,r]}(i);if(s)r.each((function(t){var e=t[0].height;c.setTranslate(this,u+w[0],u+w[1]+i._height+e/2+h),i._height+=e,i._width=Math.max(i._width,t[0].width)})),_=d+i._width,i._width+=h+d+f,i._height+=g,l&&(e.each((function(t,e){c.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var T=M(i),k=i.x<0||0===i.x&&\"right\"===T,A=i.x>1||1===i.x&&\"left\"===T,E=y||v,L=a.width/2;i._maxWidth=Math.max(k?E&&\"left\"===T?o.l+o.w:L:A?E&&\"right\"===T?o.r+o.w:L:o.w,2*d);var C=0,P=0;r.each((function(t){var e=t[0].width+d;C=Math.max(C,e),P+=e})),_=null;var I=0;if(l){var O=0,z=0,D=0;e.each((function(){var t=0,e=0;n.select(this).selectAll(\"g.traces\").each((function(r){var n=r[0].width,i=r[0].height;c.setTranslate(this,w[0],w[1]+u+h+i/2+e),e+=i,t=Math.max(t,d+n)}));var r=t+h;z>0&&r+u+z>i._maxWidth?(I=Math.max(I,z),z=0,D+=O+x,O=e):O=Math.max(O,e),c.setTranslate(this,z,D),z+=r})),i._width=Math.max(I,z)+u,i._height=D+O+g}else{var R=r.size(),F=P+f+(R-1)*h=i._maxWidth&&(I=Math.max(I,U),N=0,j+=B,i._height+=B,B=0),c.setTranslate(this,w[0]+u+N,w[1]+u+j+e/2+h),U=N+r+h,N+=n,B=Math.max(B,e)})),F?(i._width=N+f,i._height=B+g):(i._width=Math.max(I,U)+f,i._height+=B+g)}}i._width=Math.ceil(Math.max(i._width+w[0],i._titleWidth+2*(u+p.titlePad))),i._height=Math.ceil(Math.max(i._height+w[1],i._titleHeight+2*(u+p.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var V=t._context.edits,H=V.legendText||V.legendPosition;r.each((function(t){var e=n.select(this).select(\".legendtoggle\"),r=t[0].height,i=H?d:_||d+t[0].width;s||(i+=h/2),c.setRect(e,0,-r/2,i,r)}))}(t,z,D,e)},function(){var s,u,g,y,x=f._size,b=e.borderwidth;if(!d){if(function(t){var e=t._fullLayout.legend,r=M(e),n=S(e);return a.autoMargin(t,\"legend\",{x:e.x,y:e.y,l:e._width*m[r],r:e._width*v[r],b:e._effHeight*v[n],t:e._effHeight*m[n]})}(t))return;var w=x.l+x.w*e.x-m[M(e)]*e._width,k=x.t+x.h*(1-e.y)-m[S(e)]*e._effHeight;if(f.margin.autoexpand){var A=w,P=k;w=i.constrain(w,0,f.width-e._width),k=i.constrain(k,0,f.height-e._effHeight),w!==A&&i.log(\"Constrain legend.x to make legend fit inside graph\"),k!==P&&i.log(\"Constrain legend.y to make legend fit inside graph\")}c.setTranslate(T,w,k)}if(O.on(\".drag\",null),T.on(\"wheel\",null),d||e._height<=e._maxHeight||t._context.staticPlot){var I=e._effHeight;d&&(I=e._height),L.attr({width:e._width-b,height:I-b,x:b/2,y:b/2}),c.setTranslate(C,0,0),E.select(\"rect\").attr({width:e._width-2*b,height:I-2*b,x:b,y:b}),c.setClipUrl(C,h,t),c.setRect(O,0,0,0,0),delete e._scrollY}else{var z,D,R,F=Math.max(p.scrollBarMinHeight,e._effHeight*e._effHeight/e._height),B=e._effHeight-F-2*p.scrollBarMargin,N=e._height-e._effHeight,j=B/N,U=Math.min(e._scrollY||0,N);L.attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-b,x:b/2,y:b/2}),E.select(\"rect\").attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-2*b,x:b,y:b+U}),c.setClipUrl(C,h,t),q(U,F,j),T.on(\"wheel\",(function(){q(U=i.constrain(e._scrollY+n.event.deltaY/B*N,0,N),F,j),0!==U&&U!==N&&n.event.preventDefault()}));var V=n.behavior.drag().on(\"dragstart\",(function(){var t=n.event.sourceEvent;z=\"touchstart\"===t.type?t.changedTouches[0].clientY:t.clientY,R=U})).on(\"drag\",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(D=\"touchmove\"===t.type?t.changedTouches[0].clientY:t.clientY,q(U=function(t,e,r){var n=(r-e)/j+t;return i.constrain(n,0,N)}(R,z,D),F,j))}));O.call(V);var H=n.behavior.drag().on(\"dragstart\",(function(){var t=n.event.sourceEvent;\"touchstart\"===t.type&&(z=t.changedTouches[0].clientY,R=U)})).on(\"drag\",(function(){var t=n.event.sourceEvent;\"touchmove\"===t.type&&(D=t.changedTouches[0].clientY,q(U=function(t,e,r){var n=(e-r)/j+t;return i.constrain(n,0,N)}(R,z,D),F,j))}));C.call(H)}function q(r,n,i){e._scrollY=t._fullLayout.legend._scrollY=r,c.setTranslate(C,0,-r),c.setRect(O,e._width,p.scrollBarMargin+r*i,p.scrollBarWidth,n),E.select(\"rect\").attr(\"y\",b+r)}t._context.edits.legendPosition&&(T.classed(\"cursor-move\",!0),l.init({element:T.node(),gd:t,prepFn:function(){var t=c.getTranslate(T);g=t.x,y=t.y},moveFn:function(t,r){var n=g+t,i=y+r;c.setTranslate(T,n,i),s=l.align(n,0,x.l,x.l+x.w,e.xanchor),u=l.align(i,0,x.t+x.h,x.t,e.yanchor)},doneFn:function(){void 0!==s&&void 0!==u&&o.call(\"_guiRelayout\",t,{\"legend.x\":s,\"legend.y\":u})},clickFn:function(e,n){var i=r.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&&_(t,T,i,e,n)}}))}],t)}(t,e)}},{\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/events\":492,\"../../lib/svg_text_utils\":529,\"../../plots/plots\":619,\"../../registry\":638,\"../color\":366,\"../dragelement\":385,\"../drawing\":388,\"./constants\":417,\"./get_legend_data\":420,\"./handle_click\":421,\"./helpers\":422,\"./style\":424,\"@plotly/d3\":58}],420:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"./helpers\");e.exports=function(t,e){var r,a,o=e._inHover,s=i.isGrouped(e),l=i.isReversed(e),c={},u=[],f=!1,h={},p=0,d=0;function g(t,r){if(\"\"!==t&&i.isGrouped(e))-1===u.indexOf(t)?(u.push(t),f=!0,c[t]=[r]):c[t].push(r);else{var n=\"~~i\"+p;u.push(n),c[n]=[r],p++}}for(r=0;rA&&(k=A)}w[r][0]._groupMinRank=k,w[r][0]._preGroupSort=r}var M=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(w.forEach((function(t,e){t[0]._preGroupSort=e})),w.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),r=0;rr?r:t}e.exports=function(t,e,r){var v=e._fullLayout;r||(r=v.legend);var y=\"constant\"===r.itemsizing,x=r.itemwidth,b=(x+2*p.itemGap)/2,_=o(b,0),w=function(t,e,r,n){var i;if(t+1)i=t;else{if(!(e&&e.width>0))return 0;i=e.width}return y?n:Math.min(i,r)};function T(t,a,o){var u=t[0].trace,f=u.marker||{},h=f.line||{},p=o?u.visible&&u.type===o:i.traceIs(u,\"bar\"),d=n.select(a).select(\"g.legendpoints\").selectAll(\"path.legend\"+o).data(p?[t]:[]);d.enter().append(\"path\").classed(\"legend\"+o,!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),d.exit().remove(),d.each((function(t){var i=n.select(this),a=t[0],o=w(a.mlw,f.line,5,2);i.style(\"stroke-width\",o+\"px\");var p=a.mcc;if(!r._inHover&&\"mc\"in a){var d=c(f),g=d.mid;void 0===g&&(g=(d.max+d.min)/2),p=s.tryColorscale(f,\"\")(g)}var v=p||a.mc||f.color,y=f.pattern,x=y&&s.getPatternAttr(y.shape,0,\"\");if(x){var b=s.getPatternAttr(y.bgcolor,0,null),_=s.getPatternAttr(y.fgcolor,0,null),T=y.fgopacity,k=m(y.size,8,10),A=m(y.solidity,.5,1),M=\"legend-\"+u.uid;i.call(s.pattern,\"legend\",e,M,x,k,A,p,y.fillmode,b,_,T)}else i.call(l.fill,v);o&&l.stroke(i,a.mlc||h.color)}))}function k(t,e,r){var o=t[0],s=o.trace,l=r?s.visible&&s.type===r:i.traceIs(s,r),c=n.select(e).select(\"g.legendpoints\").selectAll(\"path.legend\"+r).data(l?[t]:[]);if(c.enter().append(\"path\").classed(\"legend\"+r,!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),c.exit().remove(),c.size()){var u=(s.marker||{}).line,p=w(h(u.width,o.pts),u,5,2),d=a.minExtend(s,{marker:{line:{width:p}}});d.marker.line.color=u.color;var g=a.minExtend(o,{trace:d});f(c,g,d)}}t.each((function(t){var e=n.select(this),i=a.ensureSingle(e,\"g\",\"layers\");i.style(\"opacity\",t[0].trace.opacity);var s=r.valign,l=t[0].lineHeight,c=t[0].height;if(\"middle\"!==s&&l&&c){var u={top:1,bottom:-1}[s]*(.5*(l-c+3));i.attr(\"transform\",o(0,u))}else i.attr(\"transform\",null);i.selectAll(\"g.legendfill\").data([t]).enter().append(\"g\").classed(\"legendfill\",!0),i.selectAll(\"g.legendlines\").data([t]).enter().append(\"g\").classed(\"legendlines\",!0);var f=i.selectAll(\"g.legendsymbols\").data([t]);f.enter().append(\"g\").classed(\"legendsymbols\",!0),f.selectAll(\"g.legendpoints\").data([t]).enter().append(\"g\").classed(\"legendpoints\",!0)})).each((function(t){var r,i=t[0].trace,o=[];if(i.visible)switch(i.type){case\"histogram2d\":case\"heatmap\":o=[[\"M-15,-2V4H15V-2Z\"]],r=!0;break;case\"choropleth\":case\"choroplethmapbox\":o=[[\"M-6,-6V6H6V-6Z\"]],r=!0;break;case\"densitymapbox\":o=[[\"M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0\"]],r=\"radial\";break;case\"cone\":o=[[\"M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z\"],[\"M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z\"],[\"M-6,-2 A2,2 0 0,0 -6,2 L6,0Z\"]],r=!1;break;case\"streamtube\":o=[[\"M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z\"],[\"M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z\"],[\"M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z\"]],r=!1;break;case\"surface\":o=[[\"M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z\"],[\"M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z\"]],r=!0;break;case\"mesh3d\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6H6L0,6Z\"]],r=!1;break;case\"volume\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6H6L0,6Z\"]],r=!0;break;case\"isosurface\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6 A12,24 0 0,0 6,-6 L0,6Z\"]],r=!1}var u=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legend3dandfriends\").data(o);u.enter().append(\"path\").classed(\"legend3dandfriends\",!0).attr(\"transform\",_).style(\"stroke-miterlimit\",1),u.exit().remove(),u.each((function(t,o){var u,f=n.select(this),h=c(i),p=h.colorscale,g=h.reversescale;if(p){if(!r){var m=p.length;u=0===o?p[g?m-1:0][1]:1===o?p[g?0:m-1][1]:p[Math.floor((m-1)/2)][1]}}else{var v=i.vertexcolor||i.facecolor||i.color;u=a.isArrayOrTypedArray(v)?v[o]||v[0]:v}f.attr(\"d\",t[0]),u?f.call(l.fill,u):f.call((function(t){if(t.size()){var n=\"legendfill-\"+i.uid;s.gradient(t,e,n,d(g,\"radial\"===r),p,\"fill\")}}))}))})).each((function(t){var e=t[0].trace,r=\"waterfall\"===e.type;if(t[0]._distinct&&r){var i=t[0].trace[t[0].dir].marker;return t[0].mc=i.color,t[0].mlw=i.line.width,t[0].mlc=i.line.color,T(t,this,\"waterfall\")}var a=[];e.visible&&r&&(a=t[0].hasTotals?[[\"increasing\",\"M-6,-6V6H0Z\"],[\"totals\",\"M6,6H0L-6,-6H-0Z\"],[\"decreasing\",\"M6,6V-6H0Z\"]]:[[\"increasing\",\"M-6,-6V6H6Z\"],[\"decreasing\",\"M6,6V-6H-6Z\"]]);var o=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendwaterfall\").data(a);o.enter().append(\"path\").classed(\"legendwaterfall\",!0).attr(\"transform\",_).style(\"stroke-miterlimit\",1),o.exit().remove(),o.each((function(t){var r=n.select(this),i=e[t[0]].marker,a=w(void 0,i.line,5,2);r.attr(\"d\",t[1]).style(\"stroke-width\",a+\"px\").call(l.fill,i.color),a&&r.call(l.stroke,i.line.color)}))})).each((function(t){T(t,this,\"funnel\")})).each((function(t){T(t,this)})).each((function(t){var r=t[0].trace,o=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendbox\").data(r.visible&&i.traceIs(r,\"box-violin\")?[t]:[]);o.enter().append(\"path\").classed(\"legendbox\",!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),o.exit().remove(),o.each((function(){var t=n.select(this);if(\"all\"!==r.boxpoints&&\"all\"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=w(void 0,r.line,5,2);t.style(\"stroke-width\",i+\"px\").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var c=a.minExtend(r,{marker:{size:y?12:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:\"diameter\"}});o.call(s.pointStyle,c,e)}}))})).each((function(t){k(t,this,\"funnelarea\")})).each((function(t){k(t,this,\"pie\")})).each((function(t){var r,i,o=g(t),l=o.showFill,f=o.showLine,h=o.showGradientLine,p=o.showGradientFill,m=o.anyFill,v=o.anyLine,y=t[0],b=y.trace,_=c(b),T=_.colorscale,k=_.reversescale,A=u.hasMarkers(b)||!m?\"M5,0\":v?\"M5,-2\":\"M5,-3\",M=n.select(this),S=M.select(\".legendfill\").selectAll(\"path\").data(l||p?[t]:[]);if(S.enter().append(\"path\").classed(\"js-fill\",!0),S.exit().remove(),S.attr(\"d\",A+\"h\"+x+\"v6h-\"+x+\"z\").call(l?s.fillGroupStyle:function(t){if(t.size()){var r=\"legendfill-\"+b.uid;s.gradient(t,e,r,d(k),T,\"fill\")}}),f||h){var E=w(void 0,b.line,10,5);i=a.minExtend(b,{line:{width:E}}),r=[a.minExtend(y,{trace:i})]}var L=M.select(\".legendlines\").selectAll(\"path\").data(f||h?[r]:[]);L.enter().append(\"path\").classed(\"js-line\",!0),L.exit().remove(),L.attr(\"d\",A+(h?\"l\"+x+\",0.0001\":\"h\"+x)).call(f?s.lineGroupStyle:function(t){if(t.size()){var r=\"legendline-\"+b.uid;s.lineGroupStyle(t),s.gradient(t,e,r,d(k),T,\"stroke\")}})})).each((function(t){var r,i,o=g(t),l=o.anyFill,c=o.anyLine,f=o.showLine,h=o.showMarker,p=t[0],d=p.trace,m=!h&&!c&&!l&&u.hasText(d);function v(t,e,r,n){var i=a.nestedProperty(d,t).get(),o=a.isArrayOrTypedArray(i)&&e?e(i):i;if(y&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function x(t){return p._distinct&&p.index&&t[p.index]?t[p.index]:t[0]}if(h||m||f){var b={},w={};if(h){b.mc=v(\"marker.color\",x),b.mx=v(\"marker.symbol\",x),b.mo=v(\"marker.opacity\",a.mean,[.2,1]),b.mlc=v(\"marker.line.color\",x),b.mlw=v(\"marker.line.width\",a.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:\"diameter\"};var T=v(\"marker.size\",a.mean,[2,16],12);b.ms=T,w.marker.size=T}f&&(w.line={width:v(\"line.width\",x,[0,10],5)}),m&&(b.tx=\"Aa\",b.tp=v(\"textposition\",x),b.ts=10,b.tc=v(\"textfont.color\",x),b.tf=v(\"textfont.family\",x)),r=[a.minExtend(p,b)],(i=a.minExtend(d,w)).selectedpoints=null,i.texttemplate=null}var k=n.select(this).select(\"g.legendpoints\"),A=k.selectAll(\"path.scatterpts\").data(h?r:[]);A.enter().insert(\"path\",\":first-child\").classed(\"scatterpts\",!0).attr(\"transform\",_),A.exit().remove(),A.call(s.pointStyle,i,e),h&&(r[0].mrc=3);var M=k.selectAll(\"g.pointtext\").data(m?r:[]);M.enter().append(\"g\").classed(\"pointtext\",!0).append(\"text\").attr(\"transform\",_),M.exit().remove(),M.selectAll(\"text\").call(s.textPointStyle,i,e)})).each((function(t){var e=t[0].trace,r=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendcandle\").data(e.visible&&\"candlestick\"===e.type?[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\",_).style(\"stroke-miterlimit\",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?\"increasing\":\"decreasing\"],o=w(void 0,a.line,5,2);i.style(\"stroke-width\",o+\"px\").call(l.fill,a.fillcolor),o&&l.stroke(i,a.line.color)}))})).each((function(t){var e=t[0].trace,r=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendohlc\").data(e.visible&&\"ohlc\"===e.type?[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\",_).style(\"stroke-miterlimit\",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?\"increasing\":\"decreasing\"],o=w(void 0,a.line,5,2);i.style(\"fill\",\"none\").call(s.dashLine,a.line.dash,o),o&&l.stroke(i,a.line.color)}))}))}},{\"../../lib\":503,\"../../registry\":638,\"../../traces/pie/helpers\":905,\"../../traces/pie/style_one\":911,\"../../traces/scatter/subtypes\":951,\"../color\":366,\"../colorscale/helpers\":377,\"../drawing\":388,\"./constants\":417,\"@plotly/d3\":58}],425:[function(t,e,r){\"use strict\";t(\"./constants\");e.exports={editType:\"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\"},uirevision:{valType:\"any\",editType:\"none\"},add:{valType:\"string\",arrayOk:!0,dflt:\"\",editType:\"modebar\"},remove:{valType:\"string\",arrayOk:!0,dflt:\"\",editType:\"modebar\"}}},{\"./constants\":427}],426:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../plots/plots\"),a=t(\"../../plots/cartesian/axis_ids\"),o=t(\"../../fonts/ploticon\"),s=t(\"../shapes/draw\").eraseActiveShape,l=t(\"../../lib\"),c=l._,u=e.exports={};function f(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=c._cartesianSpikesEnabled;if(\"zoom\"===s){var p,d=\"in\"===l?.5:2,g=(1+d)/2,m=(1-d)/2;for(i=0;i1?(I=[\"toggleHover\"],O=[\"resetViews\"]):v?(P=[\"zoomInGeo\",\"zoomOutGeo\"],I=[\"hoverClosestGeo\"],O=[\"resetGeo\"]):m?(I=[\"hoverClosest3d\"],O=[\"resetCameraDefault3d\",\"resetCameraLastSave3d\"]):w?(P=[\"zoomInMapbox\",\"zoomOutMapbox\"],I=[\"toggleHover\"],O=[\"resetViewMapbox\"]):b?I=[\"hoverClosestGl2d\"]:y?I=[\"hoverClosestPie\"]:A?(I=[\"hoverClosestCartesian\",\"hoverCompareCartesian\"],O=[\"resetViewSankey\"]):I=[\"toggleHover\"];g&&(I=[\"toggleSpikelines\",\"hoverClosestCartesian\",\"hoverCompareCartesian\"]);(function(t){for(var e=0;e0)){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.max)e=F[r+1];else if(t=n.pmax)e=F[r+1];else if(t0?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||\"multicategory\"===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;lp&&(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;oy?(k=f,E=\"y0\",A=y,L=\"y1\"):(k=y,E=\"y1\",A=f,L=\"y0\");Z(n),Q(s,r),function(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),s=a.getFromId(r,i),l=\"\";\"paper\"===n||o.autorange||(l+=n);\"paper\"===i||s.autorange||(l+=i);u.setClipUrl(t,l?\"clip\"+r._fullLayout._uid+l:null,r)}(e,r,t),X.moveFn=\"move\"===O?J:K,X.altKey=n.altKey},doneFn:function(){if(v(t))return;p(e),$(s),b(e,t,r),n.call(\"_guiRelayout\",t,l.getUpdateObj())},clickFn:function(){if(v(t))return;$(s)}};function Z(r){if(v(t))O=null;else if(R)O=\"path\"===r.target.tagName?\"move\":\"start-point\"===r.target.attributes[\"data-line-point\"].value?\"resize-over-start-point\":\"resize-over-end-point\";else{var n=X.element.getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top,o=r.clientX-n.left,s=r.clientY-n.top,l=!F&&i>10&&a>10&&!r.shiftKey?h.getCursor(o/i,1-s/a):\"move\";p(e,l),O=l.split(\"-\")[0]}}function J(n,i){if(\"path\"===r.type){var a=function(t){return t},o=a,l=a;z?B(\"xanchor\",r.xanchor=G(x+n)):(o=function(t){return G(H(t)+n)},N&&\"date\"===N.type&&(o=g.encodeDate(o))),D?B(\"yanchor\",r.yanchor=Y(T+i)):(l=function(t){return Y(q(t)+i)},U&&\"date\"===U.type&&(l=g.encodeDate(l))),B(\"path\",r.path=w(I,o,l))}else z?B(\"xanchor\",r.xanchor=G(x+n)):(B(\"x0\",r.x0=G(c+n)),B(\"x1\",r.x1=G(m+n))),D?B(\"yanchor\",r.yanchor=Y(T+i)):(B(\"y0\",r.y0=Y(f+i)),B(\"y1\",r.y1=Y(y+i)));e.attr(\"d\",_(t,r)),Q(s,r)}function K(n,i){if(F){var a=function(t){return t},o=a,l=a;z?B(\"xanchor\",r.xanchor=G(x+n)):(o=function(t){return G(H(t)+n)},N&&\"date\"===N.type&&(o=g.encodeDate(o))),D?B(\"yanchor\",r.yanchor=Y(T+i)):(l=function(t){return Y(q(t)+i)},U&&\"date\"===U.type&&(l=g.encodeDate(l))),B(\"path\",r.path=w(I,o,l))}else if(R){if(\"resize-over-start-point\"===O){var u=c+n,h=D?f-i:f+i;B(\"x0\",r.x0=z?u:G(u)),B(\"y0\",r.y0=D?h:Y(h))}else if(\"resize-over-end-point\"===O){var p=m+n,d=D?y-i:y+i;B(\"x1\",r.x1=z?p:G(p)),B(\"y1\",r.y1=D?d:Y(d))}}else{var v=function(t){return-1!==O.indexOf(t)},b=v(\"n\"),j=v(\"s\"),V=v(\"w\"),W=v(\"e\"),X=b?k+i:k,Z=j?A+i:A,J=V?M+n:M,K=W?S+n:S;D&&(b&&(X=k-i),j&&(Z=A-i)),(!D&&Z-X>10||D&&X-Z>10)&&(B(E,r[E]=D?X:Y(X)),B(L,r[L]=D?Z:Y(Z))),K-J>10&&(B(C,r[C]=z?J:G(J)),B(P,r[P]=z?K:G(K)))}e.attr(\"d\",_(t,r)),Q(s,r)}function Q(t,e){(z||D)&&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=H(z?e.xanchor:i.midRange(r?[e.x0,e.x1]:g.extractPathCoords(e.path,d.paramIsX))),o=q(D?e.yanchor:i.midRange(r?[e.y0,e.y1]:g.extractPathCoords(e.path,d.paramIsY)));if(a=g.roundPositionForSharpStrokeRendering(a,1),o=g.roundPositionForSharpStrokeRendering(o,1),z&&D){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(z){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 $(t){t.selectAll(\".visual-cue\").remove()}h.init(X),W.node().onmousemove=Z}(t,z,l,e,r,O):!0===l.editable&&z.style(\"pointer-events\",P||c.opacity(S)*M<=.5?\"stroke\":\"all\");z.node().addEventListener(\"click\",(function(){return function(t,e){if(!y(t))return;var r=+e.node().getAttribute(\"data-index\");if(r>=0){if(r===t._fullLayout._activeShapeIndex)return void T(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=T,m(t)}}(t,z)}))}}function b(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,\"\").replace(/[xyz][1-9]* *domain/g,\"\");u.setClipUrl(t,n?\"clip\"+e._fullLayout._uid+n:null,e)}function _(t,e){var r,n,o,s,l,c,u,f,h=e.type,p=a.getRefType(e.xref),m=a.getRefType(e.yref),v=a.getFromId(t,e.xref),y=a.getFromId(t,e.yref),x=t._fullLayout._size;if(v?\"domain\"===p?n=function(t){return v._offset+v._length*t}:(r=g.shapePositionToRange(v),n=function(t){return v._offset+v.r2p(r(t,!0))}):n=function(t){return x.l+x.w*t},y?\"domain\"===m?s=function(t){return y._offset+y._length*(1-t)}:(o=g.shapePositionToRange(y),s=function(t){return y._offset+y.r2p(o(t,!0))}):s=function(t){return x.t+x.h*(1-t)},\"path\"===h)return v&&\"date\"===v.type&&(n=g.decodeDate(n)),y&&\"date\"===y.type&&(s=g.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(d.segmentRE,(function(t){var n=0,c=t.charAt(0),u=d.paramIsX[c],f=d.paramIsY[c],h=d.numParams[c],p=t.substr(1).replace(d.paramRE,(function(t){return u[n]?t=\"pixel\"===a?e(s)+Number(t):e(t):f[n]&&(t=\"pixel\"===o?r(l)-Number(t):r(t)),++n>h&&(t=\"X\"),t}));return n>h&&(p=p.replace(/[\\s,]*X.*/,\"\"),i.log(\"Ignoring extra params in segment \"+t)),c+p}))}(e,n,s);if(\"pixel\"===e.xsizemode){var b=n(e.xanchor);l=b+e.x0,c=b+e.x1}else l=n(e.x0),c=n(e.x1);if(\"pixel\"===e.ysizemode){var _=s(e.yanchor);u=_-e.y0,f=_-e.y1}else u=s(e.y0),f=s(e.y1);if(\"line\"===h)return\"M\"+l+\",\"+u+\"L\"+c+\",\"+f;if(\"rect\"===h)return\"M\"+l+\",\"+u+\"H\"+c+\"V\"+f+\"H\"+l+\"Z\";var w=(l+c)/2,T=(u+f)/2,k=Math.abs(w-l),A=Math.abs(T-u),M=\"A\"+k+\",\"+A,S=w+k+\",\"+T;return\"M\"+S+M+\" 0 1,1 \"+(w+\",\"+(T-A))+M+\" 0 0,1 \"+S+\"Z\"}function w(t,e,r){return t.replace(d.segmentRE,(function(t){var n=0,i=t.charAt(0),a=d.paramIsX[i],o=d.paramIsY[i],s=d.numParams[i];return i+t.substr(1).replace(d.paramRE,(function(t){return n>=s||(a[n]?t=e(t):o[n]&&(t=r(t)),n++),t}))}))}function T(t){y(t)&&(t._fullLayout._activeShapeIndex>=0&&(l(t),delete t._fullLayout._activeShapeIndex,m(t)))}e.exports={draw:m,drawOne:x,eraseActiveShape:function(t){if(!y(t))return;l(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e=0&&f(v),r.attr(\"d\",g(e)),A&&!h)&&(k=function(t,e){for(var r=0;r1&&(2!==t.length||\"Z\"!==t[1][0])&&(0===T&&(t[0][0]=\"M\"),e[w]=t,y(),x())}}()}}function I(t,r){!function(t,r){if(e.length)for(var n=0;n0&&l0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr(\"transform\",l(o-.5*f.gripWidth,e._dims.currentValueTotalHeight))}}function E(t,e){var r=t._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,e))}function L(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 C(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 P(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;i0?[0]:[]);function s(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,m(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,v);l.enter().append(\"g\").classed(f.groupClassName,!0),l.exit().each(s).remove();for(var c=0;c0||h<0){var v={left:[-d,0],right:[d,0],top:[0,-d],bottom:[0,d]}[b.side];e.attr(\"transform\",l(v[0],v[1]))}}}return R.call(F),O&&(E?R.on(\".opacity\",null):(A=0,M=!0,R.text(y).on(\"mouseover.opacity\",(function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style(\"opacity\",1)})).on(\"mouseout.opacity\",(function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style(\"opacity\",0)}))),R.call(f.makeEditable,{gd:t}).on(\"edit\",(function(e){void 0!==x?o.call(\"_guiRestyle\",t,v,e,x):o.call(\"_guiRelayout\",t,v,e)})).on(\"cancel\",(function(){this.text(this.attr(\"data-unformatted\")).call(F)})).on(\"input\",(function(t){this.text(t||\" \").call(f.positionText,_.x,_.y)}))),R.classed(\"js-placeholder\",M),T}}},{\"../../constants/alignment\":471,\"../../constants/interactions\":478,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/plots\":619,\"../../registry\":638,\"../color\":366,\"../drawing\":388,\"@plotly/d3\":58,\"fast-isnumeric\":190}],465:[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\"}]},args2:{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({editType:\"arraydraw\"}),{}),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\":493,\"../../plot_api/edit_types\":536,\"../../plot_api/plot_template\":543,\"../../plots/font_attributes\":585,\"../../plots/pad_attributes\":618,\"../color/attributes\":365}],466:[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\"}}},{}],467:[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(\"args2\"),r(\"label\"),r(\"execute\"))}e.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},{\"../../lib\":503,\"../../plots/array_container_defaults\":549,\"./attributes\":465,\"./constants\":466}],468:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../plots/plots\"),a=t(\"../color\"),o=t(\"../drawing\"),s=t(\"../../lib\"),l=t(\"../../lib/svg_text_utils\"),c=t(\"../../plot_api/plot_template\").arrayEditor,u=t(\"../../constants/alignment\").LINE_SPACING,f=t(\"./constants\"),h=t(\"./scrollbox\");function p(t){return t._index}function d(t,e){return+t.attr(f.menuIndexAttrName)===e._index}function g(t,e,r,n,i,a,o,s){e.active=o,c(t.layout,f.name,e).applyUpdate(\"active\",o),\"buttons\"===e.type?v(t,n,null,null,e):\"dropdown\"===e.type&&(i.attr(f.menuIndexAttrName,\"-1\"),m(t,n,i,a,e),s||v(t,n,i,a,e))}function m(t,e,r,n,i){var a=s.ensureSingle(e,\"g\",f.headerClassName,(function(t){t.style(\"pointer-events\",\"all\")})),l=i._dims,c=i.active,u=i.buttons[c]||f.blankHeaderOpts,h={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};a.call(y,i,u,t).call(M,i,h,p),s.ensureSingle(e,\"text\",f.headerArrowClassName,(function(t){t.attr(\"text-anchor\",\"end\").call(o.font,i.font).text(f.arrowSymbol[i.direction])})).attr({x:l.headerWidth-f.arrowOffsetX+i.pad.l,y:l.headerHeight/2+f.textOffsetY+i.pad.t}),a.on(\"click\",(function(){r.call(S,String(d(r,i)?-1:i._index)),v(t,e,r,n,i)})),a.on(\"mouseover\",(function(){a.call(w)})),a.on(\"mouseout\",(function(){a.call(T,i)})),o.setTranslate(e,l.lx,l.ly)}function v(t,e,r,a,o){r||(r=e).attr(\"pointer-events\",\"all\");var l=function(t){return-1==+t.attr(f.menuIndexAttrName)}(r)&&\"buttons\"!==o.type?[]:o.buttons,c=\"dropdown\"===o.type?f.dropdownButtonClassName:f.buttonClassName,u=r.selectAll(\"g.\"+c).data(s.filterVisible(l)),h=u.enter().append(\"g\").classed(c,!0),p=u.exit();\"dropdown\"===o.type?(h.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\"),p.transition().attr(\"opacity\",\"0\").remove()):p.remove();var d=0,m=0,v=o._dims,x=-1!==[\"up\",\"down\"].indexOf(o.direction);\"dropdown\"===o.type&&(x?m=v.headerHeight+f.gapButtonHeader:d=v.headerWidth+f.gapButtonHeader),\"dropdown\"===o.type&&\"up\"===o.direction&&(m=-f.gapButtonHeader+f.gapButton-v.openHeight),\"dropdown\"===o.type&&\"left\"===o.direction&&(d=-f.gapButtonHeader+f.gapButton-v.openWidth);var b={x:v.lx+d+o.pad.l,y:v.ly+m+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},k={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each((function(s,l){var c=n.select(this);c.call(y,o,s,t).call(M,o,b),c.on(\"click\",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(g(t,o,0,e,r,a,-1),i.executeAPICommand(t,s.method,s.args2)):(g(t,o,0,e,r,a,l),i.executeAPICommand(t,s.method,s.args))),t.emit(\"plotly_buttonclicked\",{menu:o,button:s,active:o.active}))})),c.on(\"mouseover\",(function(){c.call(w)})),c.on(\"mouseout\",(function(){c.call(T,o),u.call(_,o)}))})),u.call(_,o),x?(k.w=Math.max(v.openWidth,v.headerWidth),k.h=b.y-k.t):(k.w=b.x-k.l,k.h=Math.max(v.openHeight,v.headerHeight)),k.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,h=i._dims,p=i.active;if(u)for(s=0,l=0;l0?[0]:[]);if(o.enter().append(\"g\").classed(f.containerClassName,!0).style(\"cursor\",\"pointer\"),o.exit().each((function(){n.select(this).selectAll(\"g.\"+f.headerGroupClassName).each(a)})).remove(),0!==r.length){var l=o.selectAll(\"g.\"+f.headerGroupClassName).data(r,p);l.enter().append(\"g\").classed(f.headerGroupClassName,!0);for(var c=s.ensureSingle(o,\"g\",f.dropdownButtonGroupClassName,(function(t){t.style(\"pointer-events\",\"all\")})),u=0;uw,A=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,S=d,E=m+v;E+M>c&&(E=c-M);var L=this.container.selectAll(\"rect.scrollbar-horizontal\").data(k?[0]:[]);L.exit().on(\".drag\",null).remove(),L.enter().append(\"rect\").classed(\"scrollbar-horizontal\",!0).call(i.fill,s.barColor),k?(this.hbar=L.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:E,width:A,height:M}),this._hbarXMin=S+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=v>T,P=s.barWidth+2*s.barPad,I=s.barLength+2*s.barPad,O=d+g,z=m;O+P>l&&(O=l-P);var D=this.container.selectAll(\"rect.scrollbar-vertical\").data(C?[0]:[]);D.exit().on(\".drag\",null).remove(),D.enter().append(\"rect\").classed(\"scrollbar-vertical\",!0).call(i.fill,s.barColor),C?(this.vbar=D.attr({rx:s.barRadius,ry:s.barRadius,x:O,y:z,width:P,height:I}),this._vbarYMin=z+I/2,this._vbarTranslateMax=T-I):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,B=C?f+P+.5:f+.5,N=h-.5,j=k?p+M+.5:p+.5,U=o._topdefs.selectAll(\"#\"+R).data(k||C?[0]:[]);if(U.exit().remove(),U.enter().append(\"clipPath\").attr(\"id\",R).append(\"rect\"),k||C?(this._clipRect=U.select(\"rect\").attr({x:Math.floor(F),y:Math.floor(N),width:Math.ceil(B)-Math.floor(F),height:Math.ceil(j)-Math.floor(N)}),this.container.call(a.setClipUrl,R,this.gd),this.bg.attr({x:d,y:m,width:g,height:v})):(this.bg.attr({width:0,height:0}),this.container.on(\"wheel\",null).on(\".drag\",null).call(a.setClipUrl,null),delete this._clipRect),k||C){var V=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(V);var H=n.behavior.drag().on(\"dragstart\",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on(\"drag\",this._onBarDrag.bind(this));k&&this.hbar.on(\".drag\",null).call(H),C&&this.vbar.on(\".drag\",null).call(H)}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\":503,\"../color\":366,\"../drawing\":388,\"@plotly/d3\":58}],471:[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,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:\"right\",right:\"left\",top:\"bottom\",bottom:\"top\"}}},{}],472:[function(t,e,r){\"use strict\";e.exports={axisRefDescription:function(t,e,r){return[\"If set to a\",t,\"axis id (e.g. *\"+t+\"* or\",\"*\"+t+\"2*), the `\"+t+\"` position refers to a\",t,\"coordinate. If set to *paper*, the `\"+t+\"`\",\"position refers to the distance from the\",e,\"of the plotting\",\"area in normalized coordinates where *0* (*1*) corresponds to the\",e,\"(\"+r+\"). If set to a\",t,\"axis ID followed by\",\"*domain* (separated by a space), the position behaves like for\",\"*paper*, but refers to the distance in fractions of the domain\",\"length from the\",e,\"of the domain of that axis: e.g.,\",\"*\"+t+\"2 domain* refers to the domain of the second\",t,\" axis and a\",t,\"position of 0.5 refers to the\",\"point between the\",e,\"and the\",r,\"of the domain of the\",\"second\",t,\"axis.\"].join(\" \")}}},{}],473:[function(t,e,r){\"use strict\";e.exports={INCREASING:{COLOR:\"#3D9970\",SYMBOL:\"\\u25b2\"},DECREASING:{COLOR:\"#FF4136\",SYMBOL:\"\\u25bc\"}}},{}],474:[function(t,e,r){\"use strict\";e.exports={FORMAT_LINK:\"https://github.com/d3/d3-format/tree/v1.4.5#d3-format\",DATE_FORMAT_LINK:\"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format\"}},{}],475:[function(t,e,r){\"use strict\";e.exports={COMPARISON_OPS:[\"=\",\"!=\",\"<\",\">=\",\">\",\"<=\"],COMPARISON_OPS2:[\"=\",\"<\",\">=\",\">\",\"<=\"],INTERVAL_OPS:[\"[]\",\"()\",\"[)\",\"(]\",\"][\",\")(\",\"](\",\")[\"],SET_OPS:[\"{}\",\"}{\"],CONSTRAINT_REDUCTION:{\"=\":\"=\",\"<\":\"<\",\"<=\":\"<\",\">\":\">\",\">=\":\">\",\"[]\":\"[]\",\"()\":\"[]\",\"[)\":\"[]\",\"(]\":\"[]\",\"][\":\"][\",\")(\":\"][\",\"](\":\"][\",\")[\":\"][\"}}},{}],476:[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]}},{}],477:[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\"}},{}],478:[function(t,e,r){\"use strict\";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],479:[function(t,e,r){\"use strict\";e.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:\"\\u2212\"}},{}],480:[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}},{}],481:[function(t,e,r){\"use strict\";r.version=t(\"./version\").version,t(\"native-promise-only\"),t(\"../build/plotcss\");for(var n=t(\"./registry\"),i=r.register=n.register,a=t(\"./plot_api\"),o=Object.keys(a),s=0;splotly-logomark\"}}},{}],483:[function(t,e,r){\"use strict\";r.isLeftAnchor=function(t){return\"left\"===t.xanchor||\"auto\"===t.xanchor&&t.x<=1/3},r.isCenterAnchor=function(t){return\"center\"===t.xanchor||\"auto\"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isRightAnchor=function(t){return\"right\"===t.xanchor||\"auto\"===t.xanchor&&t.x>=2/3},r.isTopAnchor=function(t){return\"top\"===t.yanchor||\"auto\"===t.yanchor&&t.y>=2/3},r.isMiddleAnchor=function(t){return\"middle\"===t.yanchor||\"auto\"===t.yanchor&&t.y>1/3&&t.y<2/3},r.isBottomAnchor=function(t){return\"bottom\"===t.yanchor||\"auto\"===t.yanchor&&t.y<=1/3}},{}],484:[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-14}function c(t,e){return a(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0](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 m(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}g?(u=0,f=o,h=s):r=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\":510}],485:[function(t,e,r){\"use strict\";var n=Array.isArray,i=ArrayBuffer,a=DataView;function o(t){return i.isView(t)&&!(t instanceof a)}function s(t){return n(t)||o(t)}function l(t,e,r){if(s(t)){if(s(t[0])){for(var n=r,i=0;ii.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&ti.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.get(t,r))}},angle:{coerceFunction:function(t,e,r){\"auto\"===t?e.set(\"auto\"):n(t)?e.set(f(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||u(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&&!!u(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=n&&t<=i?t:u}if(\"string\"!=typeof t&&\"number\"!=typeof t)return u;t=String(t);var c=_(e),v=t.charAt(0);!c||\"G\"!==v&&\"g\"!==v||(t=t.substr(1),e=\"\");var w=c&&\"chinese\"===e.substr(0,7),T=t.match(w?x:y);if(!T)return u;var k=T[1],A=T[3]||\"1\",M=Number(T[5]||1),S=Number(T[7]||0),E=Number(T[9]||0),L=Number(T[11]||0);if(c){if(2===k.length)return u;var C;k=Number(k);try{var P=m.getComponentMethod(\"calendars\",\"getCal\")(e);if(w){var I=\"i\"===A.charAt(A.length-1);A=parseInt(A,10),C=P.newDate(k,P.toMonthIndex(k,A,I),M)}else C=P.newDate(k,Number(A),M)}catch(t){return u}return C?(C.toJD()-g)*f+S*h+E*p+L*d:u}k=2===k.length?(Number(k)+2e3-b)%100+b:Number(k),A-=1;var O=new Date(Date.UTC(2e3,A,M,S,E));return O.setUTCFullYear(k),O.getUTCMonth()!==A||O.getUTCDate()!==M?u:O.getTime()+L*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 T=90*f,k=3*h,A=5*p;function M(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,E=Math.floor(l(t,f));try{a=m.getComponentMethod(\"calendars\",\"getCal\")(r).fromJD(S).formatDate(\"yyyy-mm-dd\")}catch(t){a=v(\"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=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 M(a(\"%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,E=/%h/g,L={1:\"1\",2:\"1\",3:\"2\",4:\"2\"};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(t=t.replace(E,(function(){return L[r(\"%q\")(i)]})),_(n))try{t=m.getComponentMethod(\"calendars\",\"worldCalFmt\")(t,e,n)}catch(t){return\"Invalid\"}return r(t)(i)}var P=[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),P[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 I=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=m.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+I);return c.setUTCMonth(c.getUTCMonth()+e)+n-I},r.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,c=_(e)&&m.getComponentMethod(\"calendars\",\"getCal\")(e),u=0;u0&&t[e+1][0]<0)return e;return null}switch(e=\"RUS\"===s||\"FJI\"===s?function(t){var e;if(null===c(t))e=t;else for(e=new Array(t.length),i=0;ie?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 a=h.tester(r);a.pts.pop(),l.push(a)}:function(t){l.push(h.tester(t))},a.type){case\"MultiPolygon\":for(r=0;ri&&(i=c,e=l)}else e=r;return o.default(e).geometry.coordinates}(u),n.fIn=t,n.fOut=u,s.push(u)}else c.log([\"Location\",n.loc,\"does not have a valid GeoJSON geometry.\",\"Traces with locationmode *geojson-id* only support\",\"*Polygon* and *MultiPolygon* geometries.\"].join(\" \"))}delete i[r]}switch(r.type){case\"FeatureCollection\":var h=r.features;for(n=0;n100?(clearInterval(a),n(\"Unexpected error while fetching from \"+t)):void i++}),50)}))}for(var o=0;o0&&(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;r1||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,m=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(m)},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.xo?r.x-o:0,f=r.yl?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;f0?p=i:h=i,f++}return a}},{\"./mod\":510}],499:[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(\"./array\").isArrayOrTypedArray,c=a(s);function u(t,e){var r=t;return r[3]*=e,r}function f(t){if(n(t))return c;var e=a(t);return e.length?e:c}function h(t){return n(t)?t:1}e.exports={formatColor:function(t,e,r){var n,i,s,p,d,g=t.color,m=l(g),v=l(e),y=o.extractOpts(t),x=[];if(n=void 0!==y.colorscale?o.makeColorScaleFuncFromTrace(t):f,i=m?function(t,e){return void 0===t[e]?c:a(n(t[e]))}:f,s=v?function(t,e){return void 0===t[e]?1:h(t[e])}:h,m||v)for(var b=0;b1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var a=String(e).length;if(i>=String(t).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf(\"e+\")&&(n=+o)}}return n}},{}],503:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-time-format\").utcFormat,a=t(\"d3-format\").format,o=t(\"fast-isnumeric\"),s=t(\"../constants/numerical\"),l=s.FP_SAFE,c=-l,u=s.BADNUM,f=e.exports={};f.adjustFormat=function(t){return!t||/^\\d[.]\\df/.test(t)||/[.]\\d%/.test(t)?t:\"0.f\"===t?\"~f\":/^\\d%/.test(t)?\"~%\":/^\\ds/.test(t)?\"~s\":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?\"~\"+t:t};var h={};f.warnBadFormat=function(t){var e=String(t);h[e]||(h[e]=1,f.warn('encountered bad format: \"'+e+'\"'))},f.noFormat=function(t){return String(t)},f.numberFormat=function(t){var e;try{e=a(f.adjustFormat(t))}catch(e){return f.warnBadFormat(t),f.noFormat}return e},f.nestedProperty=t(\"./nested_property\"),f.keyedContainer=t(\"./keyed_container\"),f.relativeAttr=t(\"./relative_attr\"),f.isPlainObject=t(\"./is_plain_object\"),f.toLogRange=t(\"./to_log_range\"),f.relinkPrivateKeys=t(\"./relink_private\");var p=t(\"./array\");f.isTypedArray=p.isTypedArray,f.isArrayOrTypedArray=p.isArrayOrTypedArray,f.isArray1D=p.isArray1D,f.ensureArray=p.ensureArray,f.concat=p.concat,f.maxRowLength=p.maxRowLength,f.minRowLength=p.minRowLength;var d=t(\"./mod\");f.mod=d.mod,f.modHalf=d.modHalf;var g=t(\"./coerce\");f.valObjectMeta=g.valObjectMeta,f.coerce=g.coerce,f.coerce2=g.coerce2,f.coerceFont=g.coerceFont,f.coercePattern=g.coercePattern,f.coerceHoverinfo=g.coerceHoverinfo,f.coerceSelectionMarkerOpacity=g.coerceSelectionMarkerOpacity,f.validate=g.validate;var m=t(\"./dates\");f.dateTime2ms=m.dateTime2ms,f.isDateTime=m.isDateTime,f.ms2DateTime=m.ms2DateTime,f.ms2DateTimeLocal=m.ms2DateTimeLocal,f.cleanDate=m.cleanDate,f.isJSDate=m.isJSDate,f.formatDate=m.formatDate,f.incrementMonth=m.incrementMonth,f.dateTick0=m.dateTick0,f.dfltRange=m.dfltRange,f.findExactDates=m.findExactDates,f.MIN_MS=m.MIN_MS,f.MAX_MS=m.MAX_MS;var v=t(\"./search\");f.findBin=v.findBin,f.sorterAsc=v.sorterAsc,f.sorterDes=v.sorterDes,f.distinctVals=v.distinctVals,f.roundUp=v.roundUp,f.sort=v.sort,f.findIndexOfMin=v.findIndexOfMin,f.sortObjectKeys=t(\"./sort_object_keys\");var y=t(\"./stats\");f.aggNums=y.aggNums,f.len=y.len,f.mean=y.mean,f.median=y.median,f.midRange=y.midRange,f.variance=y.variance,f.stdev=y.stdev,f.interp=y.interp;var x=t(\"./matrix\");f.init2dArray=x.init2dArray,f.transposeRagged=x.transposeRagged,f.dot=x.dot,f.translationMatrix=x.translationMatrix,f.rotationMatrix=x.rotationMatrix,f.rotationXYMatrix=x.rotationXYMatrix,f.apply3DTransform=x.apply3DTransform,f.apply2DTransform=x.apply2DTransform,f.apply2DTransform2=x.apply2DTransform2,f.convertCssMatrix=x.convertCssMatrix,f.inverseTransformMatrix=x.inverseTransformMatrix;var b=t(\"./angles\");f.deg2rad=b.deg2rad,f.rad2deg=b.rad2deg,f.angleDelta=b.angleDelta,f.angleDist=b.angleDist,f.isFullCircle=b.isFullCircle,f.isAngleInsideSector=b.isAngleInsideSector,f.isPtInsideSector=b.isPtInsideSector,f.pathArc=b.pathArc,f.pathSector=b.pathSector,f.pathAnnulus=b.pathAnnulus;var _=t(\"./anchor_utils\");f.isLeftAnchor=_.isLeftAnchor,f.isCenterAnchor=_.isCenterAnchor,f.isRightAnchor=_.isRightAnchor,f.isTopAnchor=_.isTopAnchor,f.isMiddleAnchor=_.isMiddleAnchor,f.isBottomAnchor=_.isBottomAnchor;var w=t(\"./geometry2d\");f.segmentsIntersect=w.segmentsIntersect,f.segmentDistance=w.segmentDistance,f.getTextLocation=w.getTextLocation,f.clearLocationCache=w.clearLocationCache,f.getVisibleSegment=w.getVisibleSegment,f.findPointOnPath=w.findPointOnPath;var T=t(\"./extend\");f.extendFlat=T.extendFlat,f.extendDeep=T.extendDeep,f.extendDeepAll=T.extendDeepAll,f.extendDeepNoArrays=T.extendDeepNoArrays;var k=t(\"./loggers\");f.log=k.log,f.warn=k.warn,f.error=k.error;var A=t(\"./regex\");f.counterRegex=A.counter;var M=t(\"./throttle\");f.throttle=M.throttle,f.throttleDone=M.done,f.clearThrottle=M.clear;var S=t(\"./dom\");function E(t){var e={};for(var r in t)for(var n=t[r],i=0;il||t=e)&&(o(t)&&t>=0&&t%1==0)},f.noop=t(\"./noop\"),f.identity=t(\"./identity\"),f.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},f.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},f.simpleMap=function(t,e,r,n,i){for(var a=t.length,o=new Array(a),s=0;s=Math.pow(2,r)?i>10?(f.warn(\"randstr failed uniqueness\"),l):t(e,r,n,(i||0)+1):l},f.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},f.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=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},f.syncOrAsync=function(t,e,r){var n;function i(){return f.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},f.stripTrailingSlash=function(t){return\"/\"===t.substr(-1)?t.substr(0,t.length-1):t},f.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n0?e:0}))},f.fillArray=function(t,e,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(t))for(var i=0;i1?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},f.TEMPLATE_STRING_REGEX=/%{([^\\s%{}:]*)([:|\\|][^}]*)?}/g;var z=/^\\w*$/;f.templateString=function(t,e){var r={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,n){var i;return z.test(n)?i=e[n]:(r[n]=r[n]||f.nestedProperty(e,n).get,i=r[n]()),f.isValidTextValue(i)?i:\"\"}))};var D={max:10,count:0,name:\"hovertemplate\"};f.hovertemplateString=function(){return B.apply(D,arguments)};var R={max:10,count:0,name:\"texttemplate\"};f.texttemplateString=function(){return B.apply(R,arguments)};var F=/^[:|\\|]/;function B(t,e,r){var n=this,a=arguments;e||(e={});var o={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,s,l){var c,u,h,p=\"_xother\"===s||\"_yother\"===s,d=\"_xother_\"===s||\"_yother_\"===s,g=\"xother_\"===s||\"yother_\"===s,m=\"xother\"===s||\"yother\"===s||p||g||d,v=s;if((p||d)&&(v=v.substring(1)),(g||d)&&(v=v.substring(0,v.length-1)),m){if(void 0===(c=e[v]))return\"\"}else for(h=3;h=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 N=2e9;f.seedPseudoRandom=function(){N=2e9},f.pseudoRandom=function(){var t=N;return N=(69069*N+1)%4294967296,Math.abs(N-t)<429496729?f.pseudoRandom():N/4294967296},f.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=f.extractOption(t,e,\"htx\",\"hovertext\");if(f.isValidTextValue(i))return n(i);var a=f.extractOption(t,e,\"tx\",\"text\");return f.isValidTextValue(a)?n(a):void 0},f.isValidTextValue=function(t){return t||0===t},f.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+\"%\",n=0;n1&&(c=1):c=0,f.strTranslate(i-c*(r+o),a-c*(n+s))+f.strScale(c)+(l?\"rotate(\"+l+(e?\"\":\" \"+r+\" \"+n)+\")\":\"\")},f.ensureUniformFontSize=function(t,e){var r=f.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},f.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)},f.bigFont=function(t){return Math.round(1.2*t)};var j=f.getFirefoxVersion(),U=null!==j&&j<86;f.getPositionFromD3Event=function(){return U?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},{\"../constants/numerical\":479,\"./anchor_utils\":483,\"./angles\":484,\"./array\":485,\"./clean_number\":486,\"./clear_responsive\":488,\"./coerce\":489,\"./dates\":490,\"./dom\":491,\"./extend\":493,\"./filter_unique\":494,\"./filter_visible\":495,\"./geometry2d\":498,\"./identity\":501,\"./increment\":502,\"./is_plain_object\":504,\"./keyed_container\":505,\"./localize\":506,\"./loggers\":507,\"./make_trace_groups\":508,\"./matrix\":509,\"./mod\":510,\"./nested_property\":511,\"./noop\":512,\"./notifier\":513,\"./preserve_drawing_buffer\":517,\"./push_unique\":518,\"./regex\":520,\"./relative_attr\":521,\"./relink_private\":522,\"./search\":523,\"./sort_object_keys\":526,\"./stats\":527,\"./throttle\":530,\"./to_log_range\":531,\"@plotly/d3\":58,\"d3-format\":112,\"d3-time-format\":120,\"fast-isnumeric\":190}],504:[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).hasOwnProperty(\"hasOwnProperty\")}},{}],505:[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;o2)return c[e]=2|c[e],h.set(t,null);if(f){for(o=e;o1){var e=[\"LOG:\"];for(t=0;t1){var r=[];for(t=0;t\"),\"long\")}},a.warn=function(){var t;if(n.logging>0){var e=[\"WARN:\"];for(t=0;t0){var r=[];for(t=0;t\"),\"stick\")}},a.error=function(){var t;if(n.logging>0){var e=[\"ERROR:\"];for(t=0;t0){var r=[];for(t=0;t\"),\"stick\")}}},{\"../plot_api/plot_config\":541,\"./notifier\":513}],508:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\");e.exports=function(t,e,r){var i=t.selectAll(\"g.\"+r.replace(/\\s/g,\".\")).data(e,(function(t){return t[0].trace.uid}));i.exit().remove(),i.enter().append(\"g\").attr(\"class\",r),i.order();var a=t.classed(\"rangeplot\")?\"nodeRangePlot3\":\"node3\";return i.each((function(t){t[0][a]=n.select(this)})),i}},{\"@plotly/d3\":58}],509:[function(t,e,r){\"use strict\";var n=t(\"gl-mat4\");r.init2dArray=function(t,e){for(var r=new Array(t),n=0;ne/2?t-Math.round(t/e)*e:t}}},{}],511:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./array\").isArrayOrTypedArray;function a(t,e){return function(){var r,n,o,s,l,c=t;for(s=0;s/g),l=0;la||c===i||cs)&&(!e||!l(t))}:function(t,e){var l=t[0],c=t[1];if(l===i||la||c===i||cs)return!1;var u,f,h,p,d,g=r.length,m=r[0][0],v=r[0][1],y=0;for(u=1;uMath.max(f,m)||c>Math.max(h,v)))if(cu||Math.abs(n(o,h))>i)return!0;return!1},a.filter=function(t,e){var r=[t[0]],n=0,i=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c1&&o(t.pop());return{addPt:o,raw:t,filtered:r}}},{\"../constants/numerical\":479,\"./matrix\":509}],516:[function(t,e,r){(function(r){(function(){\"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}n.regl||(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)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./show_no_webgl_msg\":525,regl:283}],517:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"is-mobile\");e.exports=function(t){var e;if(\"string\"!=typeof(e=t&&t.hasOwnProperty(\"userAgent\")?t.userAgent:function(){var t;\"undefined\"!=typeof navigator&&(t=navigator.userAgent);t&&t.headers&&\"string\"==typeof t.headers[\"user-agent\"]&&(t=t.headers[\"user-agent\"]);return t}()))return!0;var r=i({ua:{headers:{\"user-agent\":e}},tablet:!0,featureDetect:!1});if(!r)for(var a=e.split(\" \"),o=1;o-1;s--){var l=a[s];if(\"Version/\"===l.substr(0,8)){var c=l.substr(8).split(\".\")[0];if(n(c)&&(c=+c),c>=13)return!0}}}return r}},{\"fast-isnumeric\":190,\"is-mobile\":234}],518:[function(t,e,r){\"use strict\";e.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;ni.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(!(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=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function u(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,o,f=0,h=e.length,p=0,d=h>1?(e[h-1]-e[0])/(h-1):1;for(o=d>=0?r?s:l:r?u:c,t+=1e-9*d*(r?-1:1)*(d>=0?1:-1);f90&&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,n=t.slice();for(n.sort(r.sorterAsc),e=n.length-1;e>-1&&n[e]===o;e--);for(var i,a=n[e]-n[0]||1,s=a/(e||1)/1e4,l=[],c=0;c<=e;c++){var u=n[c],f=u-i;void 0===i?(l.push(u),i=u):f>s&&(a=Math.min(a,f),l.push(u),i=u)}return{vals:l,minDiff:a}},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;i0&&(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;ia.length)&&(o=a.length),n(e)||(e=!1),i(a[0])){for(l=new Array(o),s=0;st.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{\"./array\":485,\"fast-isnumeric\":190}],528:[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\":89}],529:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../lib\"),a=i.strTranslate,o=t(\"../constants/xmlns_namespaces\"),s=t(\"../constants/alignment\").LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,d){var A=t.text(),M=!t.attr(\"data-notex\")&&\"undefined\"!=typeof MathJax&&A.match(l),L=n.select(t.node().parentNode);if(!L.empty()){var C=t.attr(\"class\")?t.attr(\"class\").split(\" \")[0]:\"text\";return C+=\"-math\",L.selectAll(\"svg.\"+C).remove(),L.selectAll(\"g.\"+C+\"-group\").remove(),t.style(\"display\",null).attr({\"data-unformatted\":A,\"data-math\":\"N\"}),M?(e&&e._promises||[]).push(new Promise((function(e){t.style(\"display\",\"none\");var r=parseInt(t.node().style.fontSize,10),o={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)}))}(M[2],o,(function(n,i,o){L.selectAll(\"svg.\"+C).remove(),L.selectAll(\"g.\"+C+\"-group\").remove();var s=n&&n.select(\"svg\");if(!s||!s.node())return P(),void e();var l=L.append(\"g\").classed(C+\"-group\",!0).attr({\"pointer-events\":\"none\",\"data-unformatted\":A,\"data-math\":\"Y\"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var c=o.width,u=o.height;s.attr({class:C,height:u,preserveAspectRatio:\"xMinYMin meet\"}).style({overflow:\"visible\",\"pointer-events\":\"none\"});var f=t.node().style.fill||\"black\",h=s.select(\"g\");h.attr({fill:f,stroke:f});var p=h.node().getBoundingClientRect(),g=p.width,m=p.height;(g>c||m>u)&&(s.style(\"overflow\",\"hidden\"),g=(p=s.node().getBoundingClientRect()).width,m=p.height);var v=+t.attr(\"x\"),y=+t.attr(\"y\"),x=-(r||t.node().getBoundingClientRect().height)/4;if(\"y\"===C[0])l.attr({transform:\"rotate(\"+[-90,v,y]+\")\"+a(-g/2,x-m/2)});else if(\"l\"===C[0])y=x-m/2;else if(\"a\"===C[0]&&0!==C.indexOf(\"atitle\"))v=0,y=x;else{var b=t.attr(\"text-anchor\");v-=g*(\"middle\"===b?.5:\"end\"===b?1:0),y=y+x-m/2}s.attr({x:v,y:y}),d&&d.call(t,l),e(l)}))}))):P(),t}function P(){L.empty()||(C=t.attr(\"class\")+\"-math\",L.select(\"svg.\"+C).remove()),t.text(\"\").style(\"white-space\",\"pre\"),function(t,e){e=e.replace(g,\" \");var r,a=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(o.svg,\"tspan\");n.select(e).attr({class:\"line\",dy:c*s+\"em\"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var a=1;a doesnt match end tag <\"+t+\">. Pretending it did match.\",e),r=l[l.length-1].node}else i.log(\"Ignoring unexpected end tag .\",e)}y.test(e)?u():(r=t,l=[{node:t}]);for(var L=e.split(m),C=0;C|>|>)/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=[\"http:\",\"https:\",\"mailto:\",\"\",void 0,\":\"],g=r.NEWLINES=/(\\r\\n?|\\n)/g,m=/(<[^<>]*>)/,v=/<(\\/?)([^ >]*)(\\s+(.*))?>/i,y=//i;r.BR_TAG_ALL=//gi;var x=/(^|[\\s\"'])style\\s*=\\s*(\"([^\"]*);?\"|'([^']*);?')/i,b=/(^|[\\s\"'])href\\s*=\\s*(\"([^\"]*)\"|'([^']*)')/i,_=/(^|[\\s\"'])target\\s*=\\s*(\"([^\"\\s]*)\"|'([^'\\s]*)')/i,w=/(^|[\\s\"'])popup\\s*=\\s*(\"([\\w=,]*)\"|'([\\w=,]*)')/i;function T(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&S(n)}var k=/(^|;)\\s*color:/;r.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:[\"br\"],i=\"...\".length,a=t.split(m),o=[],s=\"\",l=0,c=0;ci?o.push(u.substr(0,d-i)+\"...\"):o.push(u.substr(0,d));break}s=\"\"}}return o.join(\"\")};var A={mu:\"\\u03bc\",amp:\"&\",lt:\"<\",gt:\">\",nbsp:\"\\xa0\",times:\"\\xd7\",plusmn:\"\\xb1\",deg:\"\\xb0\"},M=/&(#\\d+|#x[\\da-fA-F]+|[a-z]+);/g;function S(t){return t.replace(M,(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)):A[e])||t}))}function E(t){var e=encodeURI(decodeURI(t)),r=document.createElement(\"a\"),n=document.createElement(\"a\");r.href=t,n.href=e;var i=r.protocol,a=n.protocol;return-1!==d.indexOf(i)&&-1!==d.indexOf(a)?e:\"\"}function L(t,e,r){var n,a,o,s=r.horizontalAlign,l=r.verticalAlign||\"top\",c=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return a=\"bottom\"===l?function(){return c.bottom-n.height}:\"middle\"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},o=\"right\"===s?function(){return c.right-n.width}:\"center\"===s?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var t=o()-u.left,e=a()-u.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+\"px\",left:t+\"px\",\"z-index\":1e3}),this}}r.convertEntities=S,r.sanitizeHTML=function(t){t=t.replace(g,\" \");for(var e=document.createElement(\"p\"),r=e,i=[],a=t.split(m),o=0;oa.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)}},{}],531:[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\":190}],532:[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\":587,\"topojson-client\":315}],533:[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\"}}},{}],534:[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\"}}},{}],535:[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;s0&&o.log(\"Clearing previous rejected promises from queue.\"),t._promises=[]},r.cleanLayout=function(t){var e,n;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 a=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,f=(s.subplotsRegistry.ternary||{}).attrRegex,h=(s.subplotsRegistry.gl3d||{}).attrRegex,g=Object.keys(t);for(e=0;e3?(O.x=1.02,O.xanchor=\"left\"):O.x<-2&&(O.x=-.02,O.xanchor=\"right\"),O.y>3?(O.y=1.02,O.yanchor=\"bottom\"):O.y<-2&&(O.y=-.02,O.yanchor=\"top\")),d(t),\"rotate\"===t.dragmode&&(t.dragmode=\"orbit\"),c.clean(t),t.template&&t.template.layout&&r.cleanLayout(t.template.layout),t},r.cleanData=function(t){for(var e=0;e0)return t.substr(0,e)}r.hasParent=function(t,e){for(var r=b(e);r;){if(r in t)return!0;r=b(r)}return!1};var _=[\"x\",\"y\",\"z\"];r.clearAxisTypes=function(t,e,r){for(var n=0;n1&&a.warn(\"Full array edits are incompatible with other edits\",f);var y=r[\"\"][\"\"];if(c(y))e.set(null);else{if(!Array.isArray(y))return a.warn(\"Unrecognized full array edit value\",f,y),!0;e.set(y)}return!g&&(h(m,v),p(t),!0)}var x,b,_,w,T,k,A,M,S=Object.keys(r).map(Number).sort(o),E=e.get(),L=E||[],C=u(v,f).get(),P=[],I=-1,O=L.length;for(x=0;xL.length-(A?0:1))a.warn(\"index out of range\",f,_);else if(void 0!==k)T.length>1&&a.warn(\"Insertion & removal are incompatible with edits to the same index.\",f,_),c(k)?P.push(_):A?(\"add\"===k&&(k={}),L.splice(_,0,k),C&&C.splice(_,0,{})):a.warn(\"Unrecognized full object edit value\",f,_,k),-1===I&&(I=_);else for(b=0;b=0;x--)L.splice(P[x],1),C&&C.splice(P[x],1);if(L.length?E||e.set(L):e.set(null),g)return!1;if(h(m,v),d!==i){var z;if(-1===I)z=S;else{for(O=Math.max(L.length,O),z=[],x=0;x=I);x++)z.push(_);for(x=I;x=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(void 0===e)throw new Error(\"currentIndices is a required argument.\");if(Array.isArray(e)||(e=[e]),P(t,e,\"currentIndices\"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&P(t,r,\"newIndices\"),void 0!==r&&e.length!==r.length)throw new Error(\"current and new indices must be of equal length.\")}function O(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(void 0===r)throw new Error(\"indices must be an integer or array of integers\");for(var a in P(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 correspondence with the keys and number of traces in the update object\")}}(t,e,r,n);for(var l=function(t,e,r,n){var a,l,c,u,f,h=o.isPlainObject(n),p=[];for(var d in Array.isArray(r)||(r=[r]),r=C(r,t.data.length-1),e)for(var g=0;g-1&&-1===r.indexOf(\"grouptitlefont\")?l(r,r.replace(\"titlefont\",\"title.font\")):r.indexOf(\"titleposition\")>-1?l(r,r.replace(\"titleposition\",\"title.position\")):r.indexOf(\"titleside\")>-1?l(r,r.replace(\"titleside\",\"title.side\")):r.indexOf(\"titleoffset\")>-1&&l(r,r.replace(\"titleoffset\",\"title.offset\")):l(r,r.replace(\"title\",\"title.text\"));function l(e,r){t[r]=t[e],delete t[e]}}function U(t,e,r){t=o.getGraphDiv(t),_.clearPromiseQueue(t);var n={};if(\"string\"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn(\"Relayout fail.\",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=W(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[h.previousPromises];a.layoutReplot?s.push(w.layoutReplot):Object.keys(n).length&&(V(t,a,i)||h.supplyDefaults(t),a.legend&&s.push(w.doLegend),a.layoutstyle&&s.push(w.layoutStyles),a.axrange&&H(s,i.rangesAltered),a.ticks&&s.push(w.doTicksRelayout),a.modebar&&s.push(w.doModeBar),a.camera&&s.push(w.doCamera),a.colorbars&&s.push(w.doColorBars),s.push(M)),s.push(h.rehover,h.redrag),c.add(t,U,[t,i.undoit],U,[t,i.redoit]);var l=o.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit(\"plotly_relayout\",i.eventData),t}))}function V(t,e,r){var n=t._fullLayout;if(!e.axrange)return!1;for(var i in e)if(\"axrange\"!==i&&e[i])return!1;for(var a in r.rangesAltered){var o=p.id2name(a),s=t.layout[o],l=n[o];if(l.autorange=s.autorange,s.range&&(l.range=s.range.slice()),l.cleanRange(),l._matchGroup)for(var c in l._matchGroup)if(c!==a){var u=n[p.id2name(c)];u.autorange=l.autorange,u.range=l.range.slice(),u._input.range=l.range.slice()}}return!0}function H(t,e){var r=e?function(t){var r=[],n=!0;for(var i in e){var a=p.getFromId(t,i);if(r.push(i),-1!==(a.ticklabelposition||\"\").indexOf(\"inside\")&&a._anchorAxis&&r.push(a._anchorAxis._id),a._matchGroup)for(var o in a._matchGroup)e[o]||r.push(o);a.automargin&&(n=!1)}return p.draw(t,r,{skipTitle:n})}:function(t){return p.draw(t,\"redraw\")};t.push(y,w.doAutoRangeAndConstraints,r,w.drawData,w.finalDraw)}var q=/^[xyz]axis[0-9]*\\.range(\\[[0|1]\\])?$/,G=/^[xyz]axis[0-9]*\\.autorange$/,Y=/^[xyz]axis[0-9]*\\.domain(\\[[0|1]\\])?$/;function W(t,e){var r,n,i,a=t.layout,l=t._fullLayout,c=l._guiEditing,h=F(l._preGUI,c),d=Object.keys(e),g=p.list(t),m=o.extendDeepAll({},e),v={};for(j(e),d=Object.keys(e),n=0;n0&&\"string\"!=typeof O.parts[D];)D--;var B=O.parts[D],N=O.parts[D-1]+\".\"+B,U=O.parts.slice(0,D).join(\".\"),V=s(t.layout,U).get(),H=s(l,U).get(),W=O.get();if(void 0!==z){M[I]=z,S[I]=\"reverse\"===B?z:R(W);var Z=f.getLayoutValObject(l,O.parts);if(Z&&Z.impliedEdits&&null!==z)for(var J in Z.impliedEdits)E(o.relativeAttr(I,J),Z.impliedEdits[J]);if(-1!==[\"width\",\"height\"].indexOf(I))if(z){E(\"autosize\",null);var K=\"height\"===I?\"width\":\"height\";E(K,l[K])}else l[I]=t._initialAutoSize[I];else if(\"autosize\"===I)E(\"width\",z?null:l.width),E(\"height\",z?null:l.height);else if(N.match(q))P(N),s(l,U+\"._inputRange\").set(null);else if(N.match(G)){P(N),s(l,U+\"._inputRange\").set(null);var Q=s(l,U).get();Q._inputDomain&&(Q._input.domain=Q._inputDomain.slice())}else N.match(Y)&&s(l,U+\"._inputDomain\").set(null);if(\"type\"===B){L=V;var $=\"linear\"===H.type&&\"log\"===z,tt=\"log\"===H.type&&\"linear\"===z;if($||tt){if(L&&L.range)if(H.autorange)$&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var et=L.range[0],rt=L.range[1];$?(et<=0&&rt<=0&&E(U+\".autorange\",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),E(U+\".range[0]\",Math.log(et)/Math.LN10),E(U+\".range[1]\",Math.log(rt)/Math.LN10)):(E(U+\".range[0]\",Math.pow(10,et)),E(U+\".range[1]\",Math.pow(10,rt)))}else E(U+\".autorange\",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[O.parts[0]]&&\"radialaxis\"===O.parts[1]&&delete l[O.parts[0]]._subplot.viewInitial[\"radialaxis.range\"],u.getComponentMethod(\"annotations\",\"convertCoords\")(t,H,z,E),u.getComponentMethod(\"images\",\"convertCoords\")(t,H,z,E)}else E(U+\".autorange\",!0),E(U+\".range\",null);s(l,U+\"._inputRange\").set(null)}else if(B.match(k)){var nt=s(l,I).get(),it=(z||{}).type;it&&\"-\"!==it||(it=\"linear\"),u.getComponentMethod(\"annotations\",\"convertCoords\")(t,nt,it,E),u.getComponentMethod(\"images\",\"convertCoords\")(t,nt,it,E)}var at=b.containerArrayMatch(I);if(at){r=at.array,n=at.index;var ot=at.property,st=Z||{editType:\"calc\"};\"\"!==n&&\"\"===ot&&(b.isAddVal(z)?S[I]=null:b.isRemoveVal(z)?S[I]=(s(a,r).get()||[])[n]:o.warn(\"unrecognized full object value\",e)),T.update(A,st),v[r]||(v[r]={});var lt=v[r][n];lt||(lt=v[r][n]={}),lt[ot]=z,delete e[I]}else\"reverse\"===B?(V.range?V.range.reverse():(E(U+\".autorange\",!0),V.range=[1,0]),H.autorange?A.calc=!0:A.plot=!0):(l._has(\"scatter-like\")&&l._has(\"regl\")&&\"dragmode\"===I&&(\"lasso\"===z||\"select\"===z)&&\"lasso\"!==W&&\"select\"!==W||l._has(\"gl2d\")?A.plot=!0:Z?T.update(A,Z):A.calc=!0,O.set(z))}}for(r in v){b.applyContainerArrayChanges(t,h(a,r),v[r],A,h)||(A.plot=!0)}for(var ct in C){var ut=(L=p.getFromId(t,ct))&&L._constraintGroup;if(ut)for(var ft in A.calc=!0,ut)C[ft]||(p.getFromId(t,ft)._constraintShrinkable=!0)}return(X(t)||e.height||e.width)&&(A.plot=!0),(A.plot||A.calc)&&(A.layoutReplot=!0),{flags:A,rangesAltered:C,undoit:S,redoit:M,eventData:m}}function X(t){var e=t._fullLayout,r=e.width,n=e.height;return t.layout.autosize&&h.plotAutoSize(t,t.layout,e),e.width!==r||e.height!==n}function Z(t,e,n,i){t=o.getGraphDiv(t),_.clearPromiseQueue(t),o.isPlainObject(e)||(e={}),o.isPlainObject(n)||(n={}),Object.keys(e).length&&(t.changed=!0),Object.keys(n).length&&(t.changed=!0);var a=_.coerceTraceIndices(t,i),s=N(t,o.extendFlat({},e),a),l=s.flags,u=W(t,o.extendFlat({},n)),f=u.flags;(l.calc||f.calc)&&(t.calcdata=void 0),l.clearAxisTypes&&_.clearAxisTypes(t,a,n);var p=[];f.layoutReplot?p.push(w.layoutReplot):l.fullReplot?p.push(r._doPlot):(p.push(h.previousPromises),V(t,f,u)||h.supplyDefaults(t),l.style&&p.push(w.doTraceStyle),(l.colorbars||f.colorbars)&&p.push(w.doColorBars),f.legend&&p.push(w.doLegend),f.layoutstyle&&p.push(w.layoutStyles),f.axrange&&H(p,u.rangesAltered),f.ticks&&p.push(w.doTicksRelayout),f.modebar&&p.push(w.doModeBar),f.camera&&p.push(w.doCamera),p.push(M)),p.push(h.rehover,h.redrag),c.add(t,Z,[t,s.undoit,u.undoit,s.traces],Z,[t,s.redoit,u.redoit,s.traces]);var d=o.syncOrAsync(p,t);return d&&d.then||(d=Promise.resolve(t)),d.then((function(){return t.emit(\"plotly_update\",{data:s.eventData,layout:u.eventData}),t}))}function J(t){return function(e){e._fullLayout._guiEditing=!0;var r=t.apply(null,arguments);return e._fullLayout._guiEditing=!1,r}}var K=[{pattern:/^hiddenlabels/,attr:\"legend.uirevision\"},{pattern:/^((x|y)axis\\d*)\\.((auto)?range|title\\.text)/},{pattern:/axis\\d*\\.showspikes$/,attr:\"modebar.uirevision\"},{pattern:/(hover|drag)mode$/,attr:\"modebar.uirevision\"},{pattern:/^(scene\\d*)\\.camera/},{pattern:/^(geo\\d*)\\.(projection|center|fitbounds)/},{pattern:/^(ternary\\d*\\.[abc]axis)\\.(min|title\\.text)$/},{pattern:/^(polar\\d*\\.radialaxis)\\.((auto)?range|angle|title\\.text)/},{pattern:/^(polar\\d*\\.angularaxis)\\.rotation/},{pattern:/^(mapbox\\d*)\\.(center|zoom|bearing|pitch)/},{pattern:/^legend\\.(x|y)$/,attr:\"editrevision\"},{pattern:/^(shapes|annotations)/,attr:\"editrevision\"},{pattern:/^title\\.text$/,attr:\"editrevision\"}],Q=[{pattern:/^selectedpoints$/,attr:\"selectionrevision\"},{pattern:/(^|value\\.)visible$/,attr:\"legend.uirevision\"},{pattern:/^dimensions\\[\\d+\\]\\.constraintrange/},{pattern:/^node\\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\\.)name$/},{pattern:/colorbar\\.title\\.text$/},{pattern:/colorbar\\.(x|y)$/,attr:\"editrevision\"}];function $(t,e){for(var r=0;r1;)if(n.pop(),void 0!==(r=s(e,n.join(\".\")+\".uirevision\").get()))return r;return e.uirevision}function et(t,e){for(var r=0;r=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 f(){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,h.transition(t,e.frame.data,e.frame.layout,_.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&&f()};e()}var d,g,m=0;function v(t){return Array.isArray(i)?m>=i.length?t.transitionOpts=i[m]:t.transitionOpts=i[0]:t.transitionOpts=i,m++,t}var y=[],x=null==e,b=Array.isArray(e);if(!x&&!b&&o.isPlainObject(e))y.push({type:\"object\",data:v(o.extendFlat({},e))});else if(x||-1!==[\"string\",\"number\"].indexOf(typeof e))for(d=0;d0&&kk)&&A.push(g);y=A}}y.length>0?function(e){if(0!==e.length){for(var i=0;i=0;n--)if(o.isPlainObject(e[n])){var g=e[n].name,m=(u[g]||d[g]||{}).name,v=e[n].name,y=u[m]||d[m];m&&v&&\"number\"==typeof v&&y&&A<5&&(A++,o.warn('addFrames: overwriting frame \"'+(u[m]||d[m]).name+'\" with a frame whose name of type \"number\" also equates to \"'+m+'\". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===A&&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:h.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}p.sort((function(t,e){return t.index>e.index?-1:t.index=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=0;r--)n=e[r],a.push({type:\"delete\",index:n}),s.unshift({type:\"insert\",index:n,value:i[n]});var l=h.modifyFrames,u=h.modifyFrames,f=[t,s],p=[t,a];return c&&c.add(t,l,f,u,p),h.modifyFrames(t,a)},r.addTraces=function t(e,n,i){e=o.getGraphDiv(e);var a,s,l=[],u=r.deleteTraces,f=t,h=[e,l],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(void 0===e)throw new Error(\"traces must be defined.\");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!y(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function y(t){return t===Math.round(t)&&t>=0}function x(){var t,e,r={};for(t in f(r,o),n.subplotsRegistry){if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i=l.length)return!1;i=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else{var u=t._module;if(u||(u=(n.modules[t.type||a.type.dflt]||{})._module),!u)return!1;if(!(i=(r=u.attributes)&&r[o])){var f=u.basePlotModule;f&&f.attributes&&(i=f.attributes[o])}i||(i=a[o])}return v(i,e,s)},r.getLayoutValObject=function(t,e){return v(function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var c;for(r=0;r=i&&(r._input||{})._templateitemname;o&&(a=i);var s,l=e+\"[\"+a+\"]\";function c(){s={},o&&(s[l]={},s[l].templateitemname=o)}function u(t,e){o?n.nestedProperty(s[l],t).set(e):s[l+\".\"+t]=e}function f(){var t=s;return c(),t}return c(),{modifyBase:function(t,e){s[t]=e},modifyItem:u,getUpdateObj:f,applyUpdate:function(e,r){e&&u(e,r);var i=f();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},{\"../lib\":503,\"../plots/attributes\":550}],544:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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,m=d.clean,v=t(\"../plots/cartesian/autorange\").doAutoRange;function y(t,e,r){for(var n=0;n=t[1]||i[1]<=t[0])&&(a[0]e[0]))return!0}return!1}function x(t){var e,i,s,u,d,g,m=t._fullLayout,v=m._size,x=v.p,_=h.list(t,\"\",!0);if(m._paperdiv.style({width:t._context.responsive&&m.autosize&&!t._context._hasZeroWidth&&!t.layout.width?\"100%\":m.width+\"px\",height:t._context.responsive&&m.autosize&&!t._context._hasZeroHeight&&!t.layout.height?\"100%\":m.height+\"px\"}).selectAll(\".main-svg\").call(c.setSize,m.width,m.height),t._context.setBackground(t,m.paper_bgcolor),r.drawMainTitle(t),f.manage(t),!m._has(\"cartesian\"))return a.previousPromises(t);function T(t,e,r){var n=t._lw/2;return\"x\"===t._id.charAt(0)?e?\"top\"===r?e._offset-x-n:e._offset+e._length+x+n:v.t+v.h*(1-(t.position||0))+n%1:e?\"right\"===r?e._offset+e._length+x+n:e._offset-x-n:v.l+v.w*(t.position||0)+n%1}for(e=0;e<_.length;e++){var k=(u=_[e])._anchorAxis;u._linepositions={},u._lw=c.crispRound(t,u.linewidth,1),u._mainLinePosition=T(u,k,u.side),u._mainMirrorPosition=u.mirror&&k?T(u,k,p.OPPOSITE_SIDE[u.side]):null}var A=[],M=[],S=[],E=1===l.opacity(m.paper_bgcolor)&&1===l.opacity(m.plot_bgcolor)&&m.paper_bgcolor===m.plot_bgcolor;for(i in m._plots)if((s=m._plots[i]).mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var L=s.xaxis.domain,C=s.yaxis.domain,P=s.plotgroup;if(y(L,C,S)){var I=P.node(),O=s.bg=o.ensureSingle(P,\"rect\",\"bg\");I.insertBefore(O.node(),I.childNodes[0]),M.push(i)}else P.select(\"rect.bg\").remove(),S.push([L,C]),E||(A.push(i),M.push(i))}var z,D,R,F,B,N,j,U,V,H,q,G,Y,W=m._bgLayer.selectAll(\".bg\").data(A);for(W.enter().append(\"rect\").classed(\"bg\",!0),W.exit().remove(),W.each((function(t){m._plots[t].bg=n.select(this)})),e=0;eT?u.push({code:\"unused\",traceType:y,templateCount:w,dataCount:T}):T>w&&u.push({code:\"reused\",traceType:y,templateCount:w,dataCount:T})}}else u.push({code:\"data\"});if(function t(e,r){for(var n in e)if(\"_\"!==n.charAt(0)){var a=e[n],o=g(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)&&m(a)&&t(a,o)}}({data:p,layout:h},\"\"),u.length)return u.map(v)}},{\"../lib\":503,\"../plots/attributes\":550,\"../plots/plots\":619,\"./plot_config\":541,\"./plot_schema\":542,\"./plot_template\":543}],546:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./plot_api\"),a=t(\"../plots/plots\"),o=t(\"../lib\"),s=t(\"../snapshot/helpers\"),l=t(\"../snapshot/tosvg\"),c=t(\"../snapshot/svgtoimg\"),u=t(\"../version\").version,f={format:{valType:\"enumerated\",values:[\"png\",\"jpeg\",\"webp\",\"svg\",\"full-json\"],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}};e.exports=function(t,e){var r,h,p,d;function g(t){return!(t in e)||o.validate(e[t],f[t])}if(e=e||{},o.isPlainObject(t)?(r=t.data||[],h=t.layout||{},p=t.config||{},d={}):(t=o.getGraphDiv(t),r=o.extendDeep([],t.data),h=o.extendDeep({},t.layout),p=t._context,d=t._fullLayout||{}),!g(\"width\")&&null!==e.width||!g(\"height\")&&null!==e.height)throw new Error(\"Height and width should be pixel values.\");if(!g(\"format\"))throw new Error(\"Export format is not \"+o.join2(f.format.values,\", \",\" or \")+\".\");var m={};function v(t,r){return o.coerce(e,m,f,t,r)}var y=v(\"format\"),x=v(\"width\"),b=v(\"height\"),_=v(\"scale\"),w=v(\"setBackground\"),T=v(\"imageDataOnly\"),k=document.createElement(\"div\");k.style.position=\"absolute\",k.style.left=\"-5000px\",document.body.appendChild(k);var A=o.extendFlat({},h);x?A.width=x:null===e.width&&n(d.width)&&(A.width=d.width),b?A.height=b:null===e.height&&n(d.height)&&(A.height=d.height);var M=o.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=s.getRedrawFunc(k);function E(){return new Promise((function(t){setTimeout(t,s.getDelay(k._fullLayout))}))}function L(){return new Promise((function(t,e){var r=l(k,y,_),n=k._fullLayout.width,f=k._fullLayout.height;function h(){i.purge(k),document.body.removeChild(k)}if(\"full-json\"===y){var p=a.graphJson(k,!1,\"keepdata\",\"object\",!0,!0);return p.version=u,p=JSON.stringify(p),h(),t(T?p:s.encodeJSON(p))}if(h(),\"svg\"===y)return t(T?r:s.encodeSVG(r));var d=document.createElement(\"canvas\");d.id=o.randstr(),c({format:y,width:n,height:f,scale:_,canvas:d,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.newPlot(k,r,A,M).then(S).then(E).then(L).then((function(e){t(function(t){return T?t.replace(s.IMAGE_URL_PREFIX,\"\"):t}(e))})).catch((function(t){e(t)}))}))}},{\"../lib\":503,\"../plots/plots\":619,\"../snapshot/helpers\":642,\"../snapshot/svgtoimg\":644,\"../snapshot/tosvg\":646,\"../version\":1119,\"./plot_api\":540,\"fast-isnumeric\":190}],547:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plots/plots\"),a=t(\"./plot_schema\"),o=t(\"./plot_config\").dfltConfig,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;hx.length&&i.push(d(\"unused\",a,v.concat(x.length)));var A,M,S,E,L,C=x.length,P=Array.isArray(k);if(P&&(C=Math.min(C,k.length)),2===b.dimensions)for(M=0;Mx[M].length&&i.push(d(\"unused\",a,v.concat(M,x[M].length)));var I=x[M].length;for(A=0;A<(P?Math.min(I,k[M].length):I);A++)S=P?k[M][A]:k,E=y[M][A],L=x[M][A],n.validate(E,S)?L!==E&&L!==+E&&i.push(d(\"dynamic\",a,v.concat(M,A),E,L)):i.push(d(\"value\",a,v.concat(M,A),E))}else i.push(d(\"array\",a,v.concat(M),y[M]));else for(M=0;M1&&p.push(d(\"object\",\"layout\"))),i.supplyDefaults(g);for(var m=g._fullData,v=r.length,y=0;y0&&Math.round(f)===f))return{vals:i};c=f}for(var h=e.calendar,p=\"start\"===l,d=\"end\"===l,g=t[r+\"period0\"],m=a(g,h)||0,v=[],y=[],x=[],b=i.length,_=0;_A;)k=o(k,-c,h);for(;k<=A;)k=o(k,c,h);T=o(k,-c,h)}else{for(k=m+(w=Math.round((A-m)/u))*u;k>A;)k-=u;for(;k<=A;)k+=u;T=k-u}v[_]=p?T:d?k:(T+k)/2,y[_]=T,x[_]=k}return{vals:v,starts:y,ends:x}}},{\"../../constants/numerical\":479,\"../../lib\":503,\"fast-isnumeric\":190}],552:[function(t,e,r){\"use strict\";e.exports={xaxis:{valType:\"subplotid\",dflt:\"x\",editType:\"calc+clearAxisTypes\"},yaxis:{valType:\"subplotid\",dflt:\"y\",editType:\"calc+clearAxisTypes\"}}},{}],553:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../lib\"),o=t(\"../../constants/numerical\").FP_SAFE,s=t(\"../../registry\"),l=t(\"../../components/drawing\"),c=t(\"./axis_ids\"),u=c.getFromId,f=c.isLinked;function h(t,e){var r,n,i=[],o=t._fullLayout,s=d(o,e,0),l=d(o,e,1),c=g(t,e),u=c.min,f=c.max;if(0===u.length||0===f.length)return a.simpleMap(e.range,e.r2l);var h=u[0].val,m=f[0].val;for(r=1;r0&&((T=E-s(x)-l(b))>L?k/T>C&&(_=x,w=b,C=k/T):k/E>C&&(_={val:x.val,nopad:1},w={val:b.val,nopad:1},C=k/E));if(h===m){var P=h-1,I=h+1;if(M)if(0===h)i=[0,1];else{var O=(h>0?f:u).reduce((function(t,e){return Math.max(t,l(e))}),0),z=h/(1-Math.min(.5,O/E));i=h>0?[0,z]:[z,0]}else i=S?[Math.max(0,P),Math.max(1,I)]:[P,I]}else M?(_.val>=0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:0,nopad:1})):S&&(_.val-C*s(_)<0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:1,nopad:1})),C=(w.val-_.val-p(e,x.val,b.val))/(E-s(_)-l(w)),i=[_.val-C*s(_),w.val+C*l(w)];return v&&i.reverse(),a.simpleMap(i,e.l2r||Number)}function p(t,e,r){var n=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),S=A((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=A(r.vpadplus||r.vpad),L=A(r.vpadminus||r.vpad);if(!T){if(h=1/0,p=-1/0,w)for(n=0;n0&&(h=a),a>p&&a-o&&(h=a),a>p&&a=I;n--)P(n);return{min:d,max:g,opts:r}},concatExtremes:g};function g(t,e,r){var n,i,a,o=e._id,s=t._fullData,l=t._fullLayout,c=[],f=[];function h(t,e){for(n=0;n=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 x(t){return i(t)&&Math.abs(t)=e}},{\"../../components/drawing\":388,\"../../constants/numerical\":479,\"../../lib\":503,\"../../registry\":638,\"./axis_ids\":558,\"@plotly/d3\":58,\"fast-isnumeric\":190}],554:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../plots/plots\"),o=t(\"../../registry\"),s=t(\"../../lib\"),l=s.strTranslate,c=t(\"../../lib/svg_text_utils\"),u=t(\"../../components/titles\"),f=t(\"../../components/color\"),h=t(\"../../components/drawing\"),p=t(\"./layout_attributes\"),d=t(\"./clean_ticks\"),g=t(\"../../constants/numerical\"),m=g.ONEMAXYEAR,v=g.ONEAVGYEAR,y=g.ONEMINYEAR,x=g.ONEMAXQUARTER,b=g.ONEAVGQUARTER,_=g.ONEMINQUARTER,w=g.ONEMAXMONTH,T=g.ONEAVGMONTH,k=g.ONEMINMONTH,A=g.ONEWEEK,M=g.ONEDAY,S=M/2,E=g.ONEHOUR,L=g.ONEMIN,C=g.ONESEC,P=g.MINUS_SIGN,I=g.BADNUM,O={K:\"zeroline\"},z={K:\"gridline\",L:\"path\"},D={K:\"tick\",L:\"path\"},R={K:\"tick\",L:\"text\"},F=t(\"../../constants/alignment\"),B=F.MID_SHIFT,N=F.CAP_SHIFT,j=F.LINE_SPACING,U=F.OPPOSITE_SIDE,V=e.exports={};V.setConvert=t(\"./set_convert\");var H=t(\"./axis_autotype\"),q=t(\"./axis_ids\"),G=q.idSort,Y=q.isLinked;V.id2name=q.id2name,V.name2id=q.name2id,V.cleanId=q.cleanId,V.list=q.list,V.listIds=q.listIds,V.getFromId=q.getFromId,V.getFromTrace=q.getFromTrace;var W=t(\"./autorange\");V.getAutoRange=W.getAutoRange,V.findExtremes=W.findExtremes;function X(t){var e=1e-4*(t[1]-t[0]);return[t[0]-e,t[1]+e]}V.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]||(\"string\"==typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(t){return t+\" domain\"}))),u[c]={valType:\"enumerated\",values:l.concat(a?\"string\"==typeof a?[a]:a:[]),dflt:i},s.coerce(t,e,u,c)},V.getRefType=function(t){return void 0===t?t:\"paper\"===t?\"paper\":\"pixel\"===t?\"pixel\":/( domain)$/.test(t)?\"domain\":\"range\"},V.coercePosition=function(t,e,r,n,i,a){var o,l;if(\"range\"!==V.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var c=V.getFromId(e,n);l=r(i,a=c.fraction2r(a)),o=c.cleanPos}t[i]=o(l)},V.cleanPosition=function(t,e,r){return(\"paper\"===r||\"pixel\"===r?s.ensureNumber:V.getFromId(e,r).cleanPos)(t)},V.redrawComponents=function(t,e){e=e||V.listIds(t);var r=t._fullLayout;function n(n,i,a,s){for(var l=o.getComponentMethod(n,i),c={},u=0;u2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},V.saveRangeInitial=function(t,e){for(var r=V.list(t,\"\",!0),n=!1,i=0;i.3*h||u(n)||u(a))){var p=r.dtick/2;t+=t+p.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=V.tickIncrement(t,\"M6\",\"reverse\")+1.5*M:a.exactMonths>.8?t=V.tickIncrement(t,\"M1\",\"reverse\")+15.5*M:t-=S;var l=V.tickIncrement(t,r);if(l<=n)return l}return t}(y,t,v,c,a)),m=y,0;m<=u;)m=V.tickIncrement(m,v,!1,a);return{start:e.c2r(y,0,a),end:e.c2r(m,0,a),size:v,_dataSpan:u-c}},V.prepTicks=function(t,e){var r=s.simpleMap(t.range,t.r2l,void 0,void 0,e);if(t._dtickInit=t.dtick,t._tick0Init=t.tick0,\"auto\"===t.tickmode||!t.dtick){var n,a=t.nticks;a||(\"category\"===t.type||\"multicategory\"===t.type?(n=t.tickfont?s.bigFont(t.tickfont.size||12):15,a=t._length/n):(n=\"y\"===t._id.charAt(0)?40:80,a=s.constrain(t._length/n,4,9)+1),\"radialaxis\"===t._name&&(a*=2)),\"array\"===t.tickmode&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,V.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}\"period\"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||\"M\"!==t.dtick.charAt(0))}var n=r(),a=V.getTickFormat(t);if(a){var o=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(e=E,o&&!n&&t.dticka&&f=o:d<=o;d=V.tickIncrement(d,t.dtick,l,t.calendar)){if(R++,t.rangebreaks&&!l){if(d=u)break}if(P.length>C||d===O)break;O=d;var F=!1;h&&d!==(0|d)&&(F=!0);var B={minor:F,value:d};L>1&&R%L&&(B.skipLabel=!0),P.push(B)}if(p&&function(t,e,r){for(var n=0;n0?(a=n-1,o=n):(a=n,o=n);var s,l=t[a].value,c=t[o].value,u=Math.abs(c-l),f=r||u,h=0;f>=y?h=u>=y&&u<=m?u:v:r===b&&f>=_?h=u>=_&&u<=x?u:b:f>=k?h=u>=k&&u<=w?u:T:r===A&&f>=A?h=A:f>=M?h=M:r===S&&f>=S?h=S:r===E&&f>=E&&(h=E),h>=u&&(h=u,s=!0);var p=i+h;if(e.rangebreaks&&h>0){for(var d=0,g=0;g<84;g++){var L=(g+.5)/84;e.maskBreaks(i*(1-L)+L*p)!==I&&d++}(h*=d/84)||(t[n].drop=!0),s&&u>A&&(h=u)}(h>0||0===n)&&(t[n].periodX=i+h/2)}}(P,t,t._definedDelta),t.rangebreaks){var N=\"y\"===t._id.charAt(0),j=1;\"auto\"===t.tickmode&&(j=t.tickfont?t.tickfont.size:12);var U=NaN;for(z=P.length-1;z>-1;z--)if(P[z].drop)P.splice(z,1);else{P[z].value=Mt(P[z].value,t);var H=t.c2p(P[z].value);(N?U>H-j:Uu||Gu&&(q.periodX=u),G10||\"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>=L&&a<=16||e>=E)t._tickround=\"M\";else if(e>=C&&a<=19||e>=L)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),u=void 0===t.minexponent?3:t.minexponent;Math.abs(c)>u&&(ut(t.exponentformat)&&!ft(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function lt(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}}V.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,0);var a=2*e;if(a>v)e/=v,r=n(10),t.dtick=\"M\"+12*ot(e,r,$);else if(a>T)e/=T,t.dtick=\"M\"+ot(e,1,tt);else if(a>M){t.dtick=ot(e,M,t._hasDayOfWeekBreaks?[1,2,7,14]:rt);var o=V.getTickFormat(t),l=\"period\"===t.ticklabelmode;l&&(t._rawTick0=t.tick0),/%[uVW]/.test(o)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),l&&(t._dowTick0=t.tick0)}else a>E?t.dtick=ot(e,E,tt):a>L?t.dtick=ot(e,L,et):a>C?t.dtick=ot(e,C,et):(r=n(10),t.dtick=ot(e,r,$))}else if(\"log\"===t.type){t.tick0=0;var c=s.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(c[1]-c[0])<1){var u=1.5*Math.abs((c[1]-c[0])/e);e=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/u,r=n(10),t.dtick=\"L\"+ot(e,r,$)}else t.dtick=e>.3?\"D2\":\"D1\"}else\"category\"===t.type||\"multicategory\"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):At(t)?(t.tick0=0,r=1,t.dtick=ot(e,r,at)):(t.tick0=0,r=n(10),t.dtick=ot(e,r,$));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&\"string\"!=typeof t.dtick){var f=t.dtick;throw t.dtick=1,\"ax.dtick error: \"+String(f)}},V.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return s.increment(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?it:nt,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)},V.tickFirst=function(t,e){var r=t.r2l||Number,a=s.simpleMap(t.range,r,void 0,void 0,e),o=a[1] \")}else t._prevDateHead=l,c+=\"
\"+l;e.text=c}(t,o,r,c):\"log\"===u?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=ht(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||ut(p)&&ft(f)?(e.text=0===f?1:1===f?\"10\":\"10\"+(f>1?\"\":P)+h+\"\",e.fontSize*=1.25):(\"e\"===p||\"E\"===p)&&h>2?e.text=\"1\"+p+(f>0?\"+\":P)+h:(e.text=ht(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,g):\"category\"===u?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=\"\");e.text=String(r)}(t,o):\"multicategory\"===u?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],a=void 0===i[1]?\"\":String(i[1]),o=void 0===i[0]?\"\":String(i[0]);r?e.text=o+\" - \"+a:(e.text=a,e.text2=o)}(t,o,r):At(t)?function(t,e,r,n,i){if(\"radians\"!==t.thetaunit||r)e.text=ht(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){for(var r=1;!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=ht(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=[\"\",o[0],\"\",\"\\u2044\",\"\",o[1],\"\",\"\\u03c0\"].join(\"\"),l&&(e.text=P+e.text)}}}}(t,o,r,c,g):function(t,e,r,n,i){\"never\"===i?i=\"\":\"all\"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i=\"hide\");e.text=ht(e.x,t,i,n)}(t,o,0,c,g),n||(t.tickprefix&&!d(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!d(t.showticksuffix)&&(o.text+=t.ticksuffix)),\"boundaries\"===t.tickson||t.showdividers){var m=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};o.xbnd=[m(o.x-.5),m(o.x+t.dtick-.5)]}return o},V.hoverLabelText=function(t,e,r){r&&(t=s.extendFlat({},t,{hoverformat:r}));var n=Array.isArray(e)?e[0]:e,i=Array.isArray(e)?e[1]:void 0;if(void 0!==i&&i!==n)return V.hoverLabelText(t,n,r)+\" - \"+V.hoverLabelText(t,i,r);var a=\"log\"===t.type&&n<=0,o=V.tickText(t,t.c2l(a?-n:n),\"hover\").text;return a?0===n?\"0\":P+o:o};var ct=[\"f\",\"p\",\"n\",\"\\u03bc\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\"];function ut(t){return\"SI\"===t||\"B\"===t}function ft(t){return t>14||t<-15}function ht(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||\"B\",c=e._tickexponent,u=V.getTickFormat(e),f=e.separatethousands;if(n){var h={exponentformat:l,minexponent:e.minexponent,dtick:\"none\"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:\"none\"===e.showexponent?e.range.map(e.r2d):[0,t||1]};st(h),o=(Number(h._tickround)||0)+4,c=h._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,P);var p,d=Math.pow(10,-o)/2;if(\"none\"===l&&(c=0),(t=Math.abs(t))\"+p+\"\":\"B\"===l&&9===c?t+=\"B\":ut(l)&&(t+=ct[c/3+5]));return a?P+t:t}function pt(t,e){for(var r=[],n={},i=0;i1&&r=i.min&&t=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=o(i)))){r=n;break}break;case\"log\":for(e=0;e0?r.bottom-f:0,h)))),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1];if(\"x\"===d){if(\"b\"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?f-r.top:0,h),p.reverse()),r.width>0){var m=r.right-(e._offset+e._length);m>0&&(n.xr=1,n.r=m);var v=e._offset-r.left;v>0&&(n.xl=0,n.l=v)}}else if(\"l\"===l?n[l]=e._depth=Math.max(r.height>0?f-r.left:0,h):(n[l]=e._depth=Math.max(r.height>0?r.right-f:0,h),p.reverse()),r.height>0){var y=r.bottom-(e._offset+e._length);y>0&&(n.yb=0,n.b=y);var x=e._offset-r.top;x>0&&(n.yt=1,n.t=x)}n[g]=\"free\"===e.anchor?e.position:e._anchorAxis.domain[p[0]],e.title.text!==c._dfltTitle[d]&&(n[l]+=mt(e)+(e.title.standoff||0)),e.mirror&&\"free\"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[u]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[u]+=h),!0===e.mirror||\"ticks\"===e.mirror?i[g]=e._anchorAxis.domain[p[1]]:\"all\"!==e.mirror&&\"allticks\"!==e.mirror||(i[g]=[e._counterDomainMin,e._counterDomainMax][p[1]]))}K&&(s=o.getComponentMethod(\"rangeslider\",\"autoMarginOpts\")(t,e)),a.autoMargin(t,xt(e),n),a.autoMargin(t,bt(e),i),a.autoMargin(t,_t(e),s)})),r.skipTitle||K&&\"bottom\"===e.side||Z.push((function(){return function(t,e){var r,n=t._fullLayout,i=e._id,a=i.charAt(0),o=e.title.font.size;if(e.title.hasOwnProperty(\"standoff\"))r=e._depth+e.title.standoff+mt(e);else{var s=St(e);if(\"multicategory\"===e.type)r=e._depth;else{var l=1.5*o;s&&(l=.5*o,\"outside\"===e.ticks&&(l+=e.ticklen)),r=10+l+(e.linewidth?e.linewidth-1:0)}s||(r+=\"x\"===a?\"top\"===e.side?o*(e.showticklabels?1:0):o*(e.showticklabels?1.5:.5):\"right\"===e.side?o*(e.showticklabels?1:.5):o*(e.showticklabels?.5:0))}var c,f,p,d,g=V.getPxPosition(t,e);\"x\"===a?(f=e._offset+e._length/2,p=\"top\"===e.side?g-r:g+r):(p=e._offset+e._length/2,f=\"right\"===e.side?g+r:g-r,c={rotate:\"-90\",offset:0});if(\"multicategory\"!==e.type){var m=e._selections[e._id+\"tick\"];if(d={selection:m,side:e.side},m&&m.node()&&m.node().parentNode){var v=h.getTranslate(m.node().parentNode);d.offsetLeft=v.x,d.offsetTop=v.y}e.title.hasOwnProperty(\"standoff\")&&(d.pad=0)}return u.draw(t,i+\"title\",{propContainer:e,propName:e._name+\".title.text\",placeholder:n._dfltTitle[a],avoid:d,transform:c,attributes:{x:f,y:p,\"text-anchor\":\"middle\"}})}(t,e)})),s.syncOrAsync(Z)}}function Q(t){var r=p+(t||\"tick\");return w[r]||(w[r]=function(t,e){var r,n,i,a;t._selections[e].size()?(r=1/0,n=-1/0,i=1/0,a=-1/0,t._selections[e].each((function(){var t=yt(this),e=h.bBox(t.node().parentNode);r=Math.min(r,e.top),n=Math.max(n,e.bottom),i=Math.min(i,e.left),a=Math.max(a,e.right)}))):(r=0,n=0,i=0,a=0);return{top:r,bottom:n,left:i,right:a,height:n-r,width:a-i}}(e,r)),w[r]}},V.getTickSigns=function(t){var e=t._id.charAt(0),r={x:\"top\",y:\"right\"}[e],n=t.side===r?1:-1,i=[-1,1,n,-n];return\"inside\"!==t.ticks==(\"x\"===e)&&(i=i.map((function(t){return-t}))),t.side&&i.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),i},V.makeTransTickFn=function(t){return\"x\"===t._id.charAt(0)?function(e){return l(t._offset+t.l2p(e.x),0)}:function(e){return l(0,t._offset+t.l2p(e.x))}},V.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||\"\",r=function(t){return-1!==e.indexOf(t)},n=r(\"top\"),i=r(\"left\"),a=r(\"right\"),o=r(\"bottom\"),s=r(\"inside\"),l=o||i||n||a;if(!l&&!s)return[0,0];var c=t.side,u=l?(t.tickwidth||0)/2:0,f=3,h=t.tickfont?t.tickfont.size:12;(o||n)&&(u+=h*N,f+=(t.linewidth||0)/2);(i||a)&&(u+=(t.linewidth||0)/2,f+=3);s&&\"top\"===c&&(f-=h*(1-N));(i||n)&&(u=-u);\"bottom\"!==c&&\"right\"!==c||(f=-f);return[l?u:0,s?f:0]}(t),r=e[0],n=e[1];return\"x\"===t._id.charAt(0)?function(e){return l(r+t._offset+t.l2p(dt(e)),n)}:function(e){return l(n,r+t._offset+t.l2p(dt(e)))}},V.makeTickPath=function(t,e,r,n){n=void 0!==n?n:t.ticklen;var i=t._id.charAt(0),a=(t.linewidth||1)/2;return\"x\"===i?\"M0,\"+(e+a*r)+\"v\"+n*r:\"M\"+(e+a*r)+\",0h\"+n*r},V.makeLabelFns=function(t,e,r){var n=t.ticklabelposition||\"\",a=function(t){return-1!==n.indexOf(t)},o=a(\"top\"),l=a(\"left\"),c=a(\"right\"),u=a(\"bottom\")||l||o||c,f=a(\"inside\"),h=\"inside\"===n&&\"inside\"===t.ticks||!f&&\"outside\"===t.ticks&&\"boundaries\"!==t.tickson,p=0,d=0,g=h?t.ticklen:0;if(f?g*=-1:u&&(g=0),h&&(p+=g,r)){var m=s.deg2rad(r);p=g*Math.cos(m)+1,d=g*Math.sin(m)}t.showticklabels&&(h||t.showline)&&(p+=.2*t.tickfont.size);var v,y,x,b,_,w={labelStandoff:p+=(t.linewidth||1)/2*(f?-1:1),labelShift:d},T=0,k=t.side,A=t._id.charAt(0),M=t.tickangle;if(\"x\"===A)b=(_=!f&&\"bottom\"===k||f&&\"top\"===k)?1:-1,f&&(b*=-1),v=d*b,y=e+p*b,x=_?1:-.2,90===Math.abs(M)&&(f?x+=B:x=-90===M&&\"bottom\"===k?N:90===M&&\"top\"===k?B:.5,T=B/2*(M/90)),w.xFn=function(t){return t.dx+v+T*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*x},w.anchorFn=function(t,e){if(u){if(l)return\"end\";if(c)return\"start\"}return i(e)&&0!==e&&180!==e?e*b<0!==f?\"end\":\"start\":\"middle\"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:\"top\"===t.side!==f?-n:0};else if(\"y\"===A){if(b=(_=!f&&\"left\"===k||f&&\"right\"===k)?1:-1,f&&(b*=-1),v=p,y=d*b,x=0,f||90!==Math.abs(M)||(x=-90===M&&\"left\"===k||90===M&&\"right\"===k?N:.5),f){var S=i(M)?+M:0;if(0!==S){var E=s.deg2rad(S);T=Math.abs(Math.sin(E))*N*b,x=0}}w.xFn=function(t){return t.dx+e-(v+t.fontSize*x)*b+T*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*B},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?\"middle\":_?\"end\":\"start\"},w.heightFn=function(e,r,n){return\"right\"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},V.drawTicks=function(t,e,r){r=r||{};var n=e._id+\"tick\",i=r.vals;\"period\"===e.ticklabelmode&&(i=i.slice()).shift();var a=r.layer.selectAll(\"path.\"+n).data(e.ticks?i:[],gt);a.exit().remove(),a.enter().append(\"path\").classed(n,1).classed(\"ticks\",1).classed(\"crisp\",!1!==r.crisp).call(f.stroke,e.tickcolor).style(\"stroke-width\",h.crispRound(t,e.tickwidth,1)+\"px\").attr(\"d\",r.path).style(\"display\",null),Et(e,[D]),a.attr(\"transform\",r.transFn)},V.drawGrid=function(t,e,r){r=r||{};var n=e._id+\"grid\",i=r.vals,a=r.counterAxis;if(!1===e.showgrid)i=[];else if(a&&V.shouldShowZeroLine(t,e,a))for(var o=\"array\"===e.tickmode,s=0;sp||a.leftp||a.top+(e.tickangle?0:t.fontSize/4)e[\"_visibleLabelMin_\"+r._id]?l.style(\"display\",\"none\"):\"tick\"!==t.K||i||l.style(\"display\",null)}))}))}))}))},x(v,m+1?m:g);var b=null;e._selections&&(e._selections[f]=v);var _=[function(){return y.length&&Promise.all(y)}];e.automargin&&a._redrawFromAutoMarginCount&&90===m?(b=90,_.push((function(){x(v,m)}))):_.push((function(){if(x(v,g),p.length&&\"x\"===u&&!i(g)&&(\"log\"!==e.type||\"D\"!==String(e.dtick).charAt(0))){b=0;var t,n=0,a=[];if(v.each((function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),i=yt(this),o=h.bBox(i.node());a.push({top:0,bottom:10,height:10,left:r-o.width/2,right:r+o.width/2+2,width:o.width+2})})),\"boundaries\"!==e.tickson&&!e.showdividers||r.secondary){var o=p.length,l=Math.abs((p[o-1].x-p[0].x)*e._m)/(o-1),c=e.ticklabelposition||\"\",f=function(t){return-1!==c.indexOf(t)},d=f(\"top\"),m=f(\"left\"),y=f(\"right\"),_=f(\"bottom\")||m||d||y?(e.tickwidth||0)+6:0,w=l<2.5*n||\"multicategory\"===e.type||\"realaxis\"===e._name;for(t=0;t1)for(n=1;n2*o}(i,e))return\"date\";var m=\"strict\"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=f(r),i=0,o=0,s={},u=0;u2*i}(i,m)?\"category\":function(t,e){for(var r=t.length,n=0;n=2){var l,c,u=\"\";if(2===o.length)for(l=0;l<2;l++)if(c=x(o[l])){u=g;break}var f=i(\"pattern\",u);if(f===g)for(l=0;l<2;l++)(c=x(o[l]))&&(e.bounds[l]=o[l]=c-1);if(f)for(l=0;l<2;l++)switch(c=o[l],f){case g:if(!n(c))return void(e.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(e.enabled=!1);e.bounds[l]=o[l]=c;break;case m:if(!n(c))return void(e.enabled=!1);if((c=+c)<0||c>24)return void(e.enabled=!1);e.bounds[l]=o[l]=c}if(!1===r.autorange){var h=r.range;if(h[0]h[1])return void(e.enabled=!1)}else if(o[0]>h[0]&&o[1]n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},r.ref2id=function(t){return!!/^[xyz]/.test(t)&&t.split(\" \")[0]},r.isLinked=function(t,e){return a(e,t._axisMatchGroups)||a(e,t._axisConstraintGroups)}},{\"../../registry\":638,\"./constants\":561}],559:[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;nn?i.substr(n):a.substr(r))+o:i+a+t*e:o}function m(t,e){for(var r=e._size,n=r.h/r.w,i={},a=Object.keys(t),o=0;oc*x)||T)for(r=0;rO&&FP&&(P=F);h/=(P-C)/(2*I),C=l.l2r(C),P=l.l2r(P),l.range=l._input.range=S=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function N(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\",c(r,n)).attr(\"d\",i+\"Z\")}function j(t,e,r){return t.append(\"path\").attr(\"class\",\"zoombox-corners\").style({fill:f.background,stroke:f.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"transform\",c(e,r)).attr(\"d\",\"M0,0Z\")}function U(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\"),V(t,e,i,a)}function V(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 H(t){n.select(t).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}function q(t){I&&t.data&&t._context.showTips&&(i.notifier(i._(t,\"Double-click to zoom back out\"),\"long\"),I=!1)}function G(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,P)/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 Y(t,e,r,n,a){for(var o,s,l,c,u=!1,f={},h={},p=(a||{}).xaHash,d=(a||{}).yaHash,g=0;g=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(H(i),2!==t||vt||qt(),mt)o.indexOf(\"select\")>-1&&S(r,i,J,K,e.id,Pt),o.indexOf(\"event\")>-1&&p.click(i,r,e.id);else if(1===t&&vt){var s=g?O:I,c=\"s\"===g||\"w\"===v?0:1,f=s._name+\".range[\"+c+\"]\",h=function(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return\"date\"===t.type?n:\"log\"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a(\".\"+r+\"g\")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a(\".\"+String(r)+\"g\")(n))}(s,c),d=\"left\",m=\"middle\";if(s.fixedrange)return;g?(m=\"n\"===g?\"top\":\"bottom\",\"right\"===s.side&&(d=\"right\")):\"e\"===v&&(d=\"right\"),i._context.showAxisRangeEntryBoxes&&n.select(bt).call(u.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(h),fill:s.tickfont?s.tickfont.color:\"#444\",horizontalAlign:d,verticalAlign:m}).on(\"edit\",(function(t){var e=s.d2r(t);void 0!==e&&l.call(\"_guiRelayout\",i,f,e)}))}}}function zt(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(tt,pt*e+_t)),i=Math.max(0,Math.min(et,dt*r+wt)),a=Math.abs(n-_t),o=Math.abs(i-wt);function s(){St=\"\",Tt.r=Tt.l,Tt.t=Tt.b,Lt.attr(\"d\",\"M0,0Z\")}if(Tt.l=Math.min(_t,n),Tt.r=Math.max(_t,n),Tt.t=Math.min(wt,i),Tt.b=Math.max(wt,i),rt.isSubplotConstrained)a>P||o>P?(St=\"xy\",a/tt>o/et?(o=a*et/tt,wt>i?Tt.t=wt-o:Tt.b=wt+o):(a=o*tt/et,_t>n?Tt.l=_t-a:Tt.r=_t+a),Lt.attr(\"d\",G(Tt))):s();else if(nt.isSubplotConstrained)if(a>P||o>P){St=\"xy\";var l=Math.min(Tt.l/tt,(et-Tt.b)/et),c=Math.max(Tt.r/tt,(et-Tt.t)/et);Tt.l=l*tt,Tt.r=c*tt,Tt.b=(1-l)*et,Tt.t=(1-c)*et,Lt.attr(\"d\",G(Tt))}else s();else!at||o0){var u;if(nt.isSubplotConstrained||!it&&1===at.length){for(u=0;ug[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s)}return r(\"layer\"),e}},{\"../../lib\":503,\"fast-isnumeric\":190}],573:[function(t,e,r){\"use strict\";var n=t(\"./show_dflt\");e.exports=function(t,e,r,i,a){a||(a={});var o=a.tickSuffixDflt,s=n(t);r(\"tickprefix\")&&r(\"showtickprefix\",s),r(\"ticksuffix\",o)&&r(\"showticksuffix\",s)}},{\"./show_dflt\":577}],574:[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)],t.setScale()}},{\"../../constants/alignment\":471}],575:[function(t,e,r){\"use strict\";var n=t(\"polybooljs\"),i=t(\"../../registry\"),a=t(\"../../components/drawing\").dashStyle,o=t(\"../../components/color\"),s=t(\"../../components/fx\"),l=t(\"../../components/fx/helpers\").makeEventData,c=t(\"../../components/dragelement/helpers\"),u=c.freeMode,f=c.rectMode,h=c.drawMode,p=c.openMode,d=c.selectMode,g=t(\"../../components/shapes/draw_newshape/display_outlines\"),m=t(\"../../components/shapes/draw_newshape/helpers\").handleEllipse,v=t(\"../../components/shapes/draw_newshape/newshapes\"),y=t(\"../../lib\"),x=t(\"../../lib/polygon\"),b=t(\"../../lib/throttle\"),_=t(\"./axis_ids\").getFromId,w=t(\"../../lib/clear_gl_canvases\"),T=t(\"../../plot_api/subroutines\").redrawReglTraces,k=t(\"./constants\"),A=k.MINSELECT,M=x.filter,S=x.tester,E=t(\"./handle_outline\").clearSelect,L=t(\"./helpers\"),C=L.p2r,P=L.axValue,I=L.getTransform;function O(t,e,r,n,i,a,o){var s,l,c,u,f,h,d,m,v,y=e._hoverdata,x=e._fullLayout.clickmode.indexOf(\"event\")>-1,b=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(y)){F(t,e,a);var _=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n0?function(t,e){var r,n,i,a=[];for(i=0;i0&&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;i1)return!1;if((i+=r.selectedpoints.length)>1)return!1}return 1===i}(s)&&(h=j(_))){for(o&&o.remove(),v=0;v=0&&n._fullLayout._deactivateShape(n),h(e)){var a=n._fullLayout._zoomlayer.selectAll(\".select-outline-\"+r.id);if(a&&n._fullLayout._drawing){var o=v(a,t);o&&i.call(\"_guiRelayout\",n,{shapes:o}),n._fullLayout._drawing=!1}}r.selection={},r.selection.selectionDefs=t.selectionDefs=[],r.selection.mergedPolygons=t.mergedPolygons=[]}function N(t,e,r,n){var i,a,o,s=[],l=e.map((function(t){return t._id})),c=r.map((function(t){return t._id}));for(o=0;o0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function U(t,e,r){var n,a,o,s;for(n=0;n=0)L._fullLayout._deactivateShape(L);else if(!_){var r=z.clickmode;b.done(gt).then((function(){if(b.clear(gt),2===t){for(ft.remove(),$=0;$-1&&O(e,L,i.xaxes,i.yaxes,i.subplot,i,ft),\"event\"===r&&L.emit(\"plotly_selected\",void 0);s.click(L,e)})).catch(y.error)}},i.doneFn=function(){dt.remove(),b.done(gt).then((function(){b.clear(gt),i.gd.emit(\"plotly_selected\",et),Q&&i.selectionDefs&&(Q.subtract=ut,i.selectionDefs.push(Q),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,K)),i.doneFnCompleted&&i.doneFnCompleted(mt)})).catch(y.error),_&&B(i)}},clearSelect:E,clearSelectionsCache:B,selectOnClick:O}},{\"../../components/color\":366,\"../../components/dragelement/helpers\":384,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../components/fx/helpers\":402,\"../../components/shapes/draw_newshape/display_outlines\":454,\"../../components/shapes/draw_newshape/helpers\":455,\"../../components/shapes/draw_newshape/newshapes\":456,\"../../lib\":503,\"../../lib/clear_gl_canvases\":487,\"../../lib/polygon\":515,\"../../lib/throttle\":530,\"../../plot_api/subroutines\":544,\"../../registry\":638,\"./axis_ids\":558,\"./constants\":561,\"./handle_outline\":565,\"./helpers\":566,polybooljs:254}],576:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-time-format\").utcFormat,a=t(\"../../lib\"),o=a.numberFormat,s=t(\"fast-isnumeric\"),l=a.cleanNumber,c=a.ms2DateTime,u=a.dateTime2ms,f=a.ensureNumber,h=a.isArrayOrTypedArray,p=t(\"../../constants/numerical\"),d=p.FP_SAFE,g=p.BADNUM,m=p.LOG_CLIP,v=p.ONEWEEK,y=p.ONEDAY,x=p.ONEHOUR,b=p.ONEMIN,_=p.ONESEC,w=t(\"./axis_ids\"),T=t(\"./constants\"),k=T.HOUR_PATTERN,A=T.WEEKDAY_PATTERN;function M(t){return Math.pow(10,t)}function S(t){return null!=t}e.exports=function(t,e){e=e||{};var r=t._id||\"x\",p=r.charAt(0);function E(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*m*Math.abs(n-i))}return g}function L(e,r,n,i){if((i||{}).msUTC&&s(e))return+e;var o=u(e,n||t.calendar);if(o===g){if(!s(e))return g;e=+e;var l=Math.floor(10*a.mod(e+.05,1)),c=Math.round(e-l/10);o=u(new Date(c))+l/10}return o}function C(e,r,n){return c(e,r,n||t.calendar)}function P(e){return t._categories[Math.round(e)]}function I(e){if(S(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push(\"number\"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return g}function O(e){if(t._categoriesMap)return t._categoriesMap[e]}function z(t){var e=O(t);return void 0!==e?e:s(t)?+t:void 0}function D(t){return s(t)?+t:O(t)}function R(t,e,r){return n.round(r+e*t,2)}function F(t,e,r){return(t-r)/e}var B=function(e){return s(e)?R(e,t._m,t._b):g},N=function(e){return F(e,t._m,t._b)};if(t.rangebreaks){var j=\"y\"===p;B=function(e){if(!s(e))return g;var r=t._rangebreaks.length;if(!r)return R(e,t._m,t._b);var n=j;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,a=i*e,o=0,l=0;lu)){o=a<(c+u)/2?l:l+1;break}o=l+1}var f=t._B[o]||0;return isFinite(f)?R(e,t._m2,f):0},N=function(e){var r=t._rangebreaks.length;if(!r)return F(e,t._m,t._b);for(var n=0,i=0;it._rangebreaks[i].pmax&&(n=i+1);return F(e,t._m2,t._B[n])}}t.c2l=\"log\"===t.type?E:f,t.l2c=\"log\"===t.type?M:f,t.l2p=B,t.p2l=N,t.c2p=\"log\"===t.type?function(t,e){return B(E(t,e))}:B,t.p2c=\"log\"===t.type?function(t){return M(N(t))}:N,-1!==[\"linear\",\"-\"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=f,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=N,t.cleanPos=f):\"log\"===t.type?(t.d2r=t.d2l=function(t,e){return E(l(t),e)},t.r2d=t.r2c=function(t){return M(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=f,t.c2r=E,t.l2d=M,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return M(N(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=N,t.cleanPos=f):\"date\"===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=L,t.c2d=t.c2r=t.l2d=t.l2r=C,t.d2p=t.r2p=function(e,r,n){return t.l2p(L(e,0,n))},t.p2d=t.p2r=function(t,e,r){return C(N(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,g,t.calendar)}):\"category\"===t.type?(t.d2c=t.d2l=I,t.r2d=t.c2d=t.l2d=P,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=D(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=f,t.r2l=D,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return\"string\"==typeof t&&\"\"!==t?t:f(t)}):\"multicategory\"===t.type&&(t.r2d=t.c2d=t.l2d=P,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=z(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=O,t.l2r=t.c2r=f,t.r2l=z,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return Array.isArray(t)||\"string\"==typeof t&&\"\"!==t?t:f(t)},t.setupMultiCategory=function(n){var i,o,s=t._traceIndices,l=t._matchGroup;if(l&&0===t._categories.length)for(var c in l)if(c!==r){var u=e[w.id2name(c)];s=s.concat(u._traceIndices)}var f=[[0,{}],[0,{}]],d=[];for(i=0;id&&(o[n]=d),o[0]===o[1]){var c=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=c,o[1]+=c}}else a.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=w.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?\"_r\":\"range\",o=t.calendar;t.cleanRange(a);var s,l,c=t.r2l(t[a][0],o),u=t.r2l(t[a][1],o),f=\"y\"===p;if((f?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks)&&(t._rangebreaks=t.locateBreaks(Math.min(c,u),Math.max(c,u)),t._rangebreaks.length)){for(s=0;su&&(h=!h),h&&t._rangebreaks.reverse();var d=h?-1:1;for(t._m2=d*t._length/(Math.abs(u-c)-t._lBreaks),t._B.push(-t._m2*(f?u:c)),s=0;si&&(i+=7,oi&&(i+=24,o=n&&o=n&&e=s.min&&(ts.max&&(s.max=n),i=!1)}i&&c.push({min:t,max:n})}};for(n=0;nr.duration?(!function(){for(var r={},n=0;n rect\").call(o.setTranslate,0,0).call(o.setScale,1,1),t.plot.call(o.setTranslate,e._offset,r._offset).call(o.setScale,1,1);var n=t.plot.selectAll(\".scatterlayer .trace\");n.selectAll(\".point\").call(o.setPointGroupScale,1,1),n.selectAll(\".textpoint\").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,t)}function m(e,r){var n=e.plotinfo,i=n.xaxis,l=n.yaxis,c=i._length,u=l._length,f=!!e.xr1,h=!!e.yr1,p=[];if(f){var d=a.simpleMap(e.xr0,i.r2l),g=a.simpleMap(e.xr1,i.r2l),m=d[1]-d[0],v=g[1]-g[0];p[0]=(d[0]*(1-r)+r*g[0]-d[0])/(d[1]-d[0])*c,p[2]=c*(1-r+r*v/m),i.range[0]=i.l2r(d[0]*(1-r)+r*g[0]),i.range[1]=i.l2r(d[1]*(1-r)+r*g[1])}else p[0]=0,p[2]=c;if(h){var y=a.simpleMap(e.yr0,l.r2l),x=a.simpleMap(e.yr1,l.r2l),b=y[1]-y[0],_=x[1]-x[0];p[1]=(y[1]*(1-r)+r*x[1]-y[1])/(y[0]-y[1])*u,p[3]=u*(1-r+r*_/b),l.range[0]=i.l2r(y[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(y[1]*(1-r)+r*x[1])}else p[1]=0,p[3]=u;s.drawOne(t,i,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[i._id,l._id]);var w=f?c/p[2]:1,T=h?u/p[3]:1,k=f?p[0]:0,A=h?p[1]:0,M=f?p[0]/p[2]*c:0,S=h?p[1]/p[3]*u:0,E=i._offset-M,L=l._offset-S;n.clipRect.call(o.setTranslate,k,A).call(o.setScale,1/w,1/T),n.plot.call(o.setTranslate,E,L).call(o.setScale,w,T),o.setPointGroupScale(n.zoomScalePts,1/w,1/T),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}s.redrawComponents(t)}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../registry\":638,\"./axes\":554,\"@plotly/d3\":58}],582:[function(t,e,r){\"use strict\";var n=t(\"../../registry\").traceIs,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(t,\"box-violin\"),o=n(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(\"autotypenumbers\",s.autotypenumbersDflt),\"-\"===r(\"type\",(s.splomStash||{}).type)&&(!function(t,e){if(\"-\"!==t.type)return;var r,s=t._id,l=s.charAt(0);-1!==s.indexOf(\"scene\")&&(s=l);var c=function(t,e,r){for(var n=0;n0&&(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,s,l);if(!c)return;if(\"histogram\"===c.type&&l==={v:\"y\",h:\"x\"}[c.orientation||\"v\"])return void(t.type=\"linear\");var u=l+\"calendar\",f=c[u],h={noMultiCategory:!n(c,\"cartesian\")||n(c,\"noMultiCategory\")};\"box\"===c.type&&c._hasPreCompStats&&l==={h:\"x\",v:\"y\"}[c.orientation||\"v\"]&&(h.noMultiCategory=!0);if(h.autotypenumbers=t.autotypenumbers,o(c,l)){var p=a(c),d=[];for(r=0;r0?\".\":\"\")+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;f0&&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]]]}}e.exports=function(t){return new M(t)},S.plot=function(t,e,r){var n=this,i=e[this.id],a=[],o=!1;for(var s in w.layerNameToAdjective)if(\"frame\"!==s&&i[\"show\"+s]){o=!0;break}for(var l=0;l0&&a._module.calcGeoJSON(i,e)}if(!this.updateProjection(t,e)){this.viewInitial&&this.scope===r.scope||this.saveViewInitial(r),this.scope=r.scope,this.updateBaseLayers(e,r),this.updateDims(e,r),this.updateFx(e,r),d.generalUpdatePerTraceModule(this.graphDiv,this,t,r);var o=this.layers.frontplot.select(\".scatterlayer\");this.dataPoints.point=o.selectAll(\".point\"),this.dataPoints.text=o.selectAll(\"text\"),this.dataPaths.line=o.selectAll(\".js-line\");var s=this.layers.backplot.select(\".choroplethlayer\");this.dataPaths.choropleth=s.selectAll(\"path\"),this.render()}},S.updateProjection=function(t,e){var r=this.graphDiv,n=e[this.id],l=e._size,u=n.domain,f=n.projection,h=n.lonaxis,p=n.lataxis,d=h._ax,g=p._ax,v=this.projection=function(t){var e=t.projection,r=e.type,n=w.projNames[r];n=\"geo\"+c.titleCase(n);for(var l=(i[n]||s[n])(),u=t._isSatellite?180*Math.acos(1/e.distance)/Math.PI:t._isClipped?w.lonaxisSpan[r]/2:null,f=[\"center\",\"rotate\",\"parallels\",\"clipExtent\"],h=function(t){return t?l:[]},p=0;pu*Math.PI/180}return!1},l.getPath=function(){return a().projection(l)},l.getBounds=function(t){return l.getPath().bounds(t)},l.precision(w.precision),t._isSatellite&&l.tilt(e.tilt).distance(e.distance);u&&l.clipAngle(u-w.clipPad);return l}(n),y=[[l.l+l.w*u.x[0],l.t+l.h*(1-u.y[1])],[l.l+l.w*u.x[1],l.t+l.h*(1-u.y[0])]],x=n.center||{},b=f.rotation||{},_=h.range||[],T=p.range||[];if(n.fitbounds){d._length=y[1][0]-y[0][0],g._length=y[1][1]-y[0][1],d.range=m(r,d),g.range=m(r,g);var k=(d.range[0]+d.range[1])/2,A=(g.range[0]+g.range[1])/2;if(n._isScoped)x={lon:k,lat:A};else if(n._isClipped){x={lon:k,lat:A},b={lon:k,lat:A,roll:b.roll};var M=f.type,S=w.lonaxisSpan[M]/2||180,L=w.lataxisSpan[M]/2||90;_=[k-S,k+S],T=[A-L,A+L]}else x={lon:k,lat:A},b={lon:k,lat:b.lat,roll:b.roll}}v.center([x.lon-b.lon,x.lat-b.lat]).rotate([-b.lon,-b.lat,b.roll]).parallels(f.parallels);var C=E(_,T);v.fitExtent(y,C);var P=this.bounds=v.getBounds(C),I=this.fitScale=v.scale(),O=v.translate();if(n.fitbounds){var z=v.getBounds(E(d.range,g.range)),D=Math.min((P[1][0]-P[0][0])/(z[1][0]-z[0][0]),(P[1][1]-P[0][1])/(z[1][1]-z[0][1]));isFinite(D)?v.scale(D*I):c.warn(\"Something went wrong during\"+this.id+\"fitbounds computations.\")}else v.scale(f.scale*I);var R=this.midPt=[(P[0][0]+P[1][0])/2,(P[0][1]+P[1][1])/2];if(v.translate([O[0]+(R[0]-O[0]),O[1]+(R[1]-O[1])]).clipExtent(P),n._isAlbersUsa){var F=v([x.lon,x.lat]),B=v.translate();v.translate([B[0]-(F[0]-B[0]),B[1]-(F[1]-B[1])])}},S.updateBaseLayers=function(t,e){var r=this,i=r.topojson,a=r.layers,o=r.basePaths;function s(t){return\"lonaxis\"===t||\"lataxis\"===t}function l(t){return Boolean(w.lineLayers[t])}function c(t){return Boolean(w.fillLayers[t])}var u=(this.hasChoropleth?w.layersForChoropleth:w.layers).filter((function(t){return l(t)||c(t)?e[\"show\"+t]:!s(t)||e[t].showgrid})),p=r.framework.selectAll(\".layer\").data(u,String);p.exit().each((function(t){delete a[t],delete o[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\"):s(t)?o[t]=e.append(\"path\").style(\"fill\",\"none\"):\"backplot\"===t?e.append(\"g\").classed(\"choroplethlayer\",!0):\"frontplot\"===t?e.append(\"g\").classed(\"scatterlayer\",!0):l(t)?o[t]=e.append(\"path\").style(\"fill\",\"none\").style(\"stroke-miterlimit\",2):c(t)&&(o[t]=e.append(\"path\").style(\"stroke\",\"none\"))})),p.order(),p.each((function(r){var n=o[r],a=w.layerNameToAdjective[r];\"frame\"===r?n.datum(w.sphereSVG):l(r)||c(r)?n.datum(A(i,i.objects[r])):s(r)&&n.datum(function(t,e,r){var n,i,a,o=e[t],s=w.scopeDefaults[e.scope];\"lonaxis\"===t?(n=s.lonaxisRange,i=s.lataxisRange,a=function(t,e){return[t,e]}):\"lataxis\"===t&&(n=s.lataxisRange,i=s.lonaxisRange,a=function(t,e){return[e,t]});var l={type:\"linear\",range:[n[0],n[1]-1e-6],tick0:o.tick0,dtick:o.dtick};g.setConvert(l,r);var c=g.calcTicks(l);e.isScoped||\"lonaxis\"!==t||c.pop();for(var u=c.length,f=new Array(u),h=0;h-1&&b(n.event,i,[r.xaxis],[r.yaxis],r.id,f),s.indexOf(\"event\")>-1&&p.click(i,n.event))}))}function h(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},S.makeFramework=function(){var t=this,e=t.graphDiv,r=e._fullLayout,i=\"clip\"+r._uid+t.id;t.clipDef=r._clips.append(\"clipPath\").attr(\"id\",i),t.clipRect=t.clipDef.append(\"rect\"),t.framework=n.select(t.container).append(\"g\").attr(\"class\",\"geo \"+t.id).call(h.setClipUrl,i,e),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\"},g.setConvert(t.mockAxis,r)},S.saveViewInitial=function(t){var e,r=t.center||{},n=t.projection,i=n.rotation||{};this.viewInitial={fitbounds:t.fitbounds,\"projection.scale\":n.scale},e=t._isScoped?{\"center.lon\":r.lon,\"center.lat\":r.lat}:t._isClipped?{\"projection.rotation.lon\":i.lon,\"projection.rotation.lat\":i.lat}:{\"center.lon\":r.lon,\"center.lat\":r.lat,\"projection.rotation.lon\":i.lon},c.extendFlat(this.viewInitial,e)},S.render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?u(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\":366,\"../../components/dragelement\":385,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/geo_location_utils\":496,\"../../lib/topojson_utils\":532,\"../../registry\":638,\"../cartesian/autorange\":553,\"../cartesian/axes\":554,\"../cartesian/select\":575,\"../plots\":619,\"./constants\":587,\"./zoom\":592,\"@plotly/d3\":58,\"d3-geo\":114,\"d3-geo-projection\":113,\"topojson-client\":315}],589:[function(t,e,r){\"use strict\";var n=t(\"../../plots/get_data\").getSubplotCalcData,i=t(\"../../lib\").counterRegex,a=t(\"./geo\"),o=\"geo\",s=i(o),l={};l.geo={valType:\"subplotid\",dflt:o,editType:\"calc\"},e.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:t(\"./layout_attributes\"),supplyLayoutDefaults:t(\"./layout_defaults\"),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots.geo,s=0;s0&&P<0&&(P+=360);var I,O,z,D=(C+P)/2;if(!p){var R=d?f.projRotate:[D,0,0];I=r(\"projection.rotation.lon\",R[0]),r(\"projection.rotation.lat\",R[1]),r(\"projection.rotation.roll\",R[2]),r(\"showcoastlines\",!d&&x)&&(r(\"coastlinecolor\"),r(\"coastlinewidth\")),r(\"showocean\",!!x&&void 0)&&r(\"oceancolor\")}(p?(O=-96.6,z=38.7):(O=d?D:I,z=(L[0]+L[1])/2),r(\"center.lon\",O),r(\"center.lat\",z),g&&(r(\"projection.tilt\"),r(\"projection.distance\")),m)&&r(\"projection.parallels\",f.projParallels||[0,60]);r(\"projection.scale\"),r(\"showland\",!!x&&void 0)&&r(\"landcolor\"),r(\"showlakes\",!!x&&void 0)&&r(\"lakecolor\"),r(\"showrivers\",!!x&&void 0)&&(r(\"rivercolor\"),r(\"riverwidth\")),r(\"showcountries\",d&&\"usa\"!==u&&x)&&(r(\"countrycolor\"),r(\"countrywidth\")),(\"usa\"===u||\"north america\"===u&&50===c)&&(r(\"showsubunits\",x),r(\"subunitcolor\"),r(\"subunitwidth\")),d||r(\"showframe\",x)&&(r(\"framecolor\"),r(\"framewidth\")),r(\"bgcolor\"),r(\"fitbounds\")&&(delete e.projection.scale,d?(delete e.center.lon,delete e.center.lat):v?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}e.exports=function(t,e,r){i(t,e,r,{type:\"geo\",attributes:s,handleDefaults:c,fullData:r,partition:\"y\"})}},{\"../../lib\":503,\"../get_data\":593,\"../subplot_defaults\":632,\"./constants\":587,\"./layout_attributes\":590}],592:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../registry\"),o=Math.PI/180,s=180/Math.PI,l={cursor:\"pointer\"},c={cursor:\"auto\"};function u(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function f(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],c=o._fullLayout,u=c[n],f={},h={};function p(t,e){f[n+\".\"+t]=i.nestedProperty(l,t).get(),a.call(\"_storeDirectGUIEdit\",s,c._preGUI,f);var r=i.nestedProperty(u,t);r.get()!==e&&(r.set(e),i.nestedProperty(l,t).set(e),h[n+\".\"+t]=e)}r(p),p(\"projection.scale\",e.scale()/t.fitScale),p(\"fitbounds\",!1),o.emit(\"plotly_relayout\",h)}function h(t,e){var r=u(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(l)})).on(\"zoom\",(function(){e.scale(n.event.scale).translate(n.event.translate),t.render();var r=e.invert(t.midPt);t.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":e.scale()/t.fitScale,\"geo.center.lon\":r[0],\"geo.center.lat\":r[1]})})).on(\"zoomend\",(function(){n.select(this).style(c),f(t,e,i)})),r}function p(t,e){var r,i,a,o,s,h,p,d,g,m=u(0,e);function v(t){return e.invert(t)}function y(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 m.on(\"zoomstart\",(function(){n.select(this).style(l),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,s=v(r)})).on(\"zoom\",(function(){if(h=n.mouse(this),function(t){var r=v(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>2||Math.abs(n[1]-t[1])>2}(r))return m.scale(e.scale()),void m.translate(e.translate());e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),s?v(h)&&(d=v(h),p=[o[0]+(d[0]-s[0]),i[1],i[2]],e.rotate(p),o=p):s=v(r=h),g=!0,t.render();var l=e.rotate(),c=e.invert(t.midPt);t.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":e.scale()/t.fitScale,\"geo.center.lon\":c[0],\"geo.center.lat\":c[1],\"geo.projection.rotation.lon\":-l[0]})})).on(\"zoomend\",(function(){n.select(this).style(c),g&&f(t,e,y)})),m}function d(t,e){var r,i={r:e.rotate(),k:e.scale()},a=u(0,e),o=function(t){var e=0,r=arguments.length,i=[];for(;++ed?(a=(f>0?90:-90)-p,i=0):(a=Math.asin(f/d)*s-p,i=Math.sqrt(d*d-f*f));var g=180-a-2*p,m=(Math.atan2(h,u)-Math.atan2(c,i))*s,v=(Math.atan2(h,u)-Math.atan2(c,-i))*s;return b(r[0],r[1],a,m)<=b(r[0],r[1],g,v)?[a,m,r[2]]:[g,v,r[2]]}function b(t,e,r,n){var i=_(r-t),a=_(n-e);return Math.sqrt(i*i+a*a)}function _(t){return(t%360+540)%360-180}function w(t,e,r){var n=r*o,i=t.slice(),a=0===e?1:0,s=2===e?1:2,l=Math.cos(n),c=Math.sin(n);return i[a]=t[a]*l-t[s]*c,i[s]=t[s]*l+t[a]*c,i}function T(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*s,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*s]}function k(t,e){for(var r=0,n=0,i=t.length;nMath.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(a)*_*(s>=0?1:-1),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[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&&(m(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&&(m(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).999&&(g=\"turntable\"):g=\"turntable\")}else g=\"turntable\";r(\"dragmode\",g),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:u,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{\"../../../components/color\":366,\"../../../lib\":503,\"../../../registry\":638,\"../../get_data\":593,\"../../subplot_defaults\":632,\"./axis_defaults\":601,\"./layout_attributes\":604}],604:[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),{}),projection:{type:{valType:\"enumerated\",values:[\"perspective\",\"orthographic\"],dflt:\"perspective\",editType:\"calc\"},editType:\"calc\"},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],editType:\"plot\"},hovermode:{valType:\"enumerated\",values:[\"closest\",!1],dflt:\"closest\",editType:\"modebar\"},uirevision:{valType:\"any\",editType:\"none\"},editType:\"plot\",_deprecated:{cameraposition:{valType:\"info_array\",editType:\"camera\"}}}},{\"../../../lib\":503,\"../../../lib/extend\":493,\"../../domain\":584,\"./axis_attributes\":600}],605:[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\":528}],606:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[a[c]];if(u._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/t.dataScale[c],Math.abs(u._length)===1/0||isNaN(u._length))l[c]=[];else{u._input_range=u.range.slice(),u.range[0]=r[c].lo/t.dataScale[c],u.range[1]=r[c].hi/t.dataScale[c],u._m=1/(t.dataScale[c]*r[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var f=u.tickmode;if(\"auto\"===u.tickmode){u.tickmode=\"linear\";var h=u.nticks||i.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/h)}for(var p=n.calcTicks(u,{msUTC:!0}),d=0;d/g,\" \"));l[c]=p,u.tickmode=f}}e.ticks=l;for(c=0;c<3;++c){o[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]);for(d=0;d<2;++d)e.bounds[d][c]=t.glplot.bounds[d][c]}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;ar.deltaY?1.1:1/1.1,a=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(t)}}),!!c&&{passive:!1}),t.glplot.canvas.addEventListener(\"mousemove\",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit(\"plotly_relayouting\",e)}})),t.staticMode||t.glplot.canvas.addEventListener(\"webglcontextlost\",(function(r){e&&e.emit&&e.emit(\"plotly_webglcontextlost\",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},w.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,\"viewBox\",\"0 0 \"+s+\" \"+l),n.setAttributeNS(null,\"width\",s),n.setAttributeNS(null,\"height\",l),b(e),e.glplot.axes.update(e.axesOptions);for(var c=Object.keys(e.traces),u=null,h=e.glplot.selection,g=0;g\")):\"isosurface\"===t.type||\"volume\"===t.type?(T.valueLabel=p.hoverLabelText(e._mockAxis,e._mockAxis.d2l(h.traceCoordinate[3]),t.valuehoverformat),S.push(\"value: \"+T.valueLabel),h.textLabel&&S.push(h.textLabel),x=S.join(\"
\")):x=h.textLabel;var E={x:h.traceCoordinate[0],y:h.traceCoordinate[1],z:h.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:w};d.appendArrayPointValue(E,_,w),t._module.eventData&&(E=_._module.eventData(E,h,_,{},w));var L={points:[E]};if(e.fullSceneLayout.hovermode){var C=[];d.loneHover({trace:_,x:(.5+.5*y[0]/y[3])*s,y:(.5-.5*y[1]/y[3])*l,xLabel:T.xLabel,yLabel:T.yLabel,zLabel:T.zLabel,text:x,name:u.name,color:d.castHoverOption(_,w,\"bgcolor\")||u.color,borderColor:d.castHoverOption(_,w,\"bordercolor\"),fontFamily:d.castHoverOption(_,w,\"font.family\"),fontSize:d.castHoverOption(_,w,\"font.size\"),fontColor:d.castHoverOption(_,w,\"font.color\"),nameLength:d.castHoverOption(_,w,\"namelength\"),textAlign:d.castHoverOption(_,w,\"align\"),hovertemplate:f.castOption(_,w,\"hovertemplate\"),hovertemplateLabels:f.extendFlat({},E,T),eventData:[E]},{container:n,gd:r,inOut_bbox:C}),E.bbox=C[0]}h.buttons&&h.distance<5?r.emit(\"plotly_click\",L):r.emit(\"plotly_hover\",L),this.oldEventData=L}else d.loneUnhover(n),this.oldEventData&&r.emit(\"plotly_unhover\",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)},w.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):f.error(\"Catastrophic and unrecoverable WebGL error. Context lost.\")};requestAnimationFrame(e)};var k=[\"xaxis\",\"yaxis\",\"zaxis\"];function A(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var a=k[i],o=a.charAt(0),s=n[a],l=e[o],c=e[o+\"calendar\"],u=e[\"_\"+o+\"length\"];if(f.isArrayOrTypedArray(l))for(var h,p=0;p<(u||l.length);p++)if(f.isArrayOrTypedArray(l[p]))for(var d=0;dm[1][a])m[0][a]=-1,m[1][a]=1;else{var L=m[1][a]-m[0][a];m[0][a]-=L/32,m[1][a]+=L/32}if(\"reversed\"===s.autorange){var C=m[0][a];m[0][a]=m[1][a],m[1][a]=C}}else{var P=s.range;m[0][a]=s.r2l(P[0]),m[1][a]=s.r2l(P[1])}m[0][a]===m[1][a]&&(m[0][a]-=1,m[1][a]+=1),v[a]=m[1][a]-m[0][a],this.glplot.setBounds(a,{min:m[0][a]*h[a],max:m[1][a]*h[a]})}var I=c.aspectmode;if(\"cube\"===I)d=[1,1,1];else if(\"manual\"===I){var O=c.aspectratio;d=[O.x,O.y,O.z]}else{if(\"auto\"!==I&&\"data\"!==I)throw new Error(\"scene.js aspectRatio was not one of the enumerated types\");var z=[1,1,1];for(a=0;a<3;++a){var D=y[l=(s=c[k[a]]).type];z[a]=Math.pow(D.acc,1/D.count)/h[a]}d=\"data\"===I||Math.max.apply(null,z)/Math.min.apply(null,z)<=4?z:[1,1,1]}c.aspectratio.x=u.aspectratio.x=d[0],c.aspectratio.y=u.aspectratio.y=d[1],c.aspectratio.z=u.aspectratio.z=d[2],this.glplot.setAspectratio(c.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),this.viewInitial.aspectmode||(this.viewInitial.aspectmode=c.aspectmode);var R=c.domain||null,F=e._size||null;if(R&&F){var B=this.container.style;B.position=\"absolute\",B.left=F.l+R.x[0]*F.w+\"px\",B.top=F.t+(1-R.y[1])*F.h+\"px\",B.width=F.w*(R.x[1]-R.x[0])+\"px\",B.height=F.h*(R.y[1]-R.y[0])+\"px\"}this.glplot.redraw()}},w.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener(\"wheel\",this.camera.wheelListener),this.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},w.getCamera=function(){var t;return this.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(t=this.camera).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]},projection:{type:!0===t._ortho?\"orthographic\":\"perspective\"}}},w.setViewport=function(t){var e,r=t.camera;this.camera.lookAt.apply(this,[[(e=r).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]]),this.glplot.setAspectratio(t.aspectratio),\"orthographic\"===r.projection.type!==this.camera._ortho&&(this.glplot.redraw(),this.glplot.clearRGBA(),this.glplot.dispose(),this.initializeGLPlot())},w.isCameraChanged=function(t){var e=this.getCamera(),r=f.nestedProperty(t,this.id+\".camera\").get();function n(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]]}var i=!1;if(void 0===r)i=!0;else{for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!n(e,r,a,o)){i=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(i=!0)}return i},w.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=f.nestedProperty(t,this.id+\".aspectratio\").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},w.saveLayout=function(t){var e,r,n,i,a,o,s=this.fullLayout,l=this.isCameraChanged(t),c=this.isAspectChanged(t),h=l||c;if(h){var p={};if(l&&(e=this.getCamera(),n=(r=f.nestedProperty(t,this.id+\".camera\")).get(),p[this.id+\".camera\"]=n),c&&(i=this.glplot.getAspectratio(),o=(a=f.nestedProperty(t,this.id+\".aspectratio\")).get(),p[this.id+\".aspectratio\"]=o),u.call(\"_storeDirectGUIEdit\",t,s._preGUI,p),l)r.set(e),f.nestedProperty(s,this.id+\".camera\").set(e);if(c)a.set(i),f.nestedProperty(s,this.id+\".aspectratio\").set(i),this.glplot.redraw()}return h},w.updateFx=function(t,e){var r=this.camera;if(r)if(\"orbit\"===t)r.mode=\"orbit\",r.keyBindingMode=\"rotate\";else if(\"turntable\"===t){r.up=[0,0,1],r.mode=\"turntable\",r.keyBindingMode=\"rotate\";var n=this.graphDiv,i=n._fullLayout,a=this.fullSceneLayout.camera,o=a.up.x,s=a.up.y,l=a.up.z;if(l/Math.sqrt(o*o+s*s+l*l)<.999){var c=this.id+\".camera.up\",h={x:0,y:0,z:1},p={};p[c]=h;var d=n.layout;u.call(\"_storeDirectGUIEdit\",d,i._preGUI,p),a.up=h,f.nestedProperty(d,c).set(h)}}else r.keyBindingMode=t;this.fullSceneLayout.hovermode=e},w.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),function(t,e,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)t[a+l]=Math.min(s*t[a+l],255)}}(a,r,i);var o=document.createElement(\"canvas\");o.width=r,o.height=i;var s,l=o.getContext(\"2d\"),c=l.createImageData(r,i);switch(c.data.set(a),l.putImageData(c,0,0),t){case\"jpeg\":s=o.toDataURL(\"image/jpeg\");break;case\"webp\":s=o.toDataURL(\"image/webp\");break;default:s=o.toDataURL(\"image/png\")}return this.staticMode&&this.container.removeChild(n),s},w.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[k[t]];p.setConvert(e,this.fullLayout),e.setScale=f.noop}},w.make4thDimension=function(){var t=this.graphDiv._fullLayout;this._mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},p.setConvert(this._mockAxis,t)},e.exports=_},{\"../../../stackgl_modules\":1120,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/show_no_webgl_msg\":525,\"../../lib/str2rgbarray\":528,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"./layout/convert\":602,\"./layout/spikes\":605,\"./layout/tick_marks\":606,\"./project\":607,\"has-passive-events\":229,\"webgl-context\":331}],609:[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;aOpenStreetMap
contributors',a=['\\xa9 Carto',i].join(\" \"),o=['Map tiles by Stamen Design','under CC BY 3.0',\"|\",'Data by OpenStreetMap contributors','under ODbL'].join(\" \"),s={\"open-street-map\":{id:\"osm\",version:8,sources:{\"plotly-osm-tiles\":{type:\"raster\",attribution:i,tiles:[\"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png\",\"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-osm-tiles\",type:\"raster\",source:\"plotly-osm-tiles\",minzoom:0,maxzoom:22}]},\"white-bg\":{id:\"white-bg\",version:8,sources:{},layers:[{id:\"white-bg\",type:\"background\",paint:{\"background-color\":\"#FFFFFF\"},minzoom:0,maxzoom:22}]},\"carto-positron\":{id:\"carto-positron\",version:8,sources:{\"plotly-carto-positron\":{type:\"raster\",attribution:a,tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-positron\",type:\"raster\",source:\"plotly-carto-positron\",minzoom:0,maxzoom:22}]},\"carto-darkmatter\":{id:\"carto-darkmatter\",version:8,sources:{\"plotly-carto-darkmatter\":{type:\"raster\",attribution:a,tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-darkmatter\",type:\"raster\",source:\"plotly-carto-darkmatter\",minzoom:0,maxzoom:22}]},\"stamen-terrain\":{id:\"stamen-terrain\",version:8,sources:{\"plotly-stamen-terrain\":{type:\"raster\",attribution:o,tiles:[\"https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-terrain\",type:\"raster\",source:\"plotly-stamen-terrain\",minzoom:0,maxzoom:22}]},\"stamen-toner\":{id:\"stamen-toner\",version:8,sources:{\"plotly-stamen-toner\":{type:\"raster\",attribution:o,tiles:[\"https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-toner\",type:\"raster\",source:\"plotly-stamen-toner\",minzoom:0,maxzoom:22}]},\"stamen-watercolor\":{id:\"stamen-watercolor\",version:8,sources:{\"plotly-stamen-watercolor\":{type:\"raster\",attribution:['Map tiles by Stamen Design','under CC BY 3.0',\"|\",'Data by OpenStreetMap contributors','under CC BY SA'].join(\" \"),tiles:[\"https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-watercolor\",type:\"raster\",source:\"plotly-stamen-watercolor\",minzoom:0,maxzoom:22}]}},l=n(s);e.exports={requiredVersion:\"1.10.1\",styleUrlPrefix:\"mapbox://styles/mapbox/\",styleUrlSuffix:\"v9\",styleValuesMapbox:[\"basic\",\"streets\",\"outdoors\",\"light\",\"dark\",\"satellite\",\"satellite-streets\"],styleValueDflt:\"basic\",stylesNonMapbox:s,styleValuesNonMapbox:l,traceLayerPrefix:\"plotly-trace-layer-\",layoutLayerPrefix:\"plotly-layout-layer-\",wrongVersionErrorMsg:[\"Your custom plotly.js bundle is not using the correct mapbox-gl version\",\"Please install mapbox-gl@1.10.1.\"].join(\"\\n\"),noAccessTokenErrorMsg:[\"Missing Mapbox access token.\",\"Mapbox trace type require a Mapbox access token to be registered.\",\"For example:\",\" Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });\",\"More info here: https://www.mapbox.com/help/define-access-token/\"].join(\"\\n\"),missingStyleErrorMsg:[\"No valid mapbox style found, please set `mapbox.style` to one of:\",l.join(\", \"),\"or register a Mapbox access token to use a Mapbox-served style.\"].join(\"\\n\"),multipleTokensErrorMsg:[\"Set multiple mapbox access token across different mapbox subplot,\",\"using first token found as mapbox-gl does not allow multipleaccess tokens on the same page.\"].join(\"\\n\"),mapOnErrorMsg:\"Mapbox error.\",mapboxLogo:{path0:\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\",path1:\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\",path2:\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\",polygon:\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34\"},styleRules:{map:\"overflow:hidden;position:relative;\",\"missing-css\":\"display:none;\",canary:\"background-color:salmon;\",\"ctrl-bottom-left\":\"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;\",\"ctrl-bottom-right\":\"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;\",ctrl:\"clear: both; pointer-events: auto; transform: translate(0, 0);\",\"ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner\":\"display: none;\",\"ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner\":\"display: block; margin-top:2px\",\"ctrl-attrib.mapboxgl-compact:hover\":\"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;\",\"ctrl-attrib.mapboxgl-compact::after\":'content: \"\"; cursor: pointer; position: absolute; background-image: url(\\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"%3E %3Cpath fill=\"%23333333\" fill-rule=\"evenodd\" d=\"M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0\"/%3E %3C/svg%3E\\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',\"ctrl-attrib.mapboxgl-compact\":\"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;\",\"ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; right: 0\",\"ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; left: 0\",\"ctrl-bottom-left .mapboxgl-ctrl\":\"margin: 0 0 10px 10px; float: left;\",\"ctrl-bottom-right .mapboxgl-ctrl\":\"margin: 0 10px 10px 0; float: right;\",\"ctrl-attrib\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a:hover\":\"color: inherit; text-decoration: underline;\",\"ctrl-attrib .mapbox-improve-map\":\"font-weight: bold; margin-left: 2px;\",\"attrib-empty\":\"display: none;\",\"ctrl-logo\":'display:block; width: 21px; height: 21px; background-image: url(\\'data:image/svg+xml;charset=utf-8,%3C?xml version=\"1.0\" encoding=\"utf-8\"?%3E %3Csvg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 21 21\" style=\"enable-background:new 0 0 21 21;\" xml:space=\"preserve\"%3E%3Cg transform=\"translate(0,0.01)\"%3E%3Cpath d=\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3Cpath d=\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpath d=\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpolygon points=\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 \" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3C/g%3E%3C/svg%3E\\')'}}},{\"../../lib/sort_object_keys\":526}],612:[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\":503}],613:[function(t,e,r){\"use strict\";var n=t(\"mapbox-gl/dist/mapbox-gl-unminified\"),i=t(\"../../lib\"),a=i.strTranslate,o=i.strScale,s=t(\"../../plots/get_data\").getSubplotCalcData,l=t(\"../../constants/xmlns_namespaces\"),c=t(\"@plotly/d3\"),u=t(\"../../components/drawing\"),f=t(\"../../lib/svg_text_utils\"),h=t(\"./mapbox\"),p=r.constants=t(\"./constants\");function d(t){return\"string\"==typeof t&&(-1!==p.styleValuesMapbox.indexOf(t)||0===t.indexOf(\"mapbox://\"))}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,a=e._subplots.mapbox;if(n.version!==p.requiredVersion)throw new Error(p.wrongVersionErrorMsg);var o=function(t,e){var r=t._fullLayout;if(\"\"===t._context.mapboxAccessToken)return\"\";for(var n=[],a=[],o=!1,s=!1,l=0;l1&&i.warn(p.multipleTokensErrorMsg),n[0]):(a.length&&i.log([\"Listed mapbox access token(s)\",a.join(\",\"),\"but did not use a Mapbox map style, ignoring token(s).\"].join(\" \")),\"\")}(t,a);n.accessToken=o;for(var l=0;l_/2){var w=v.split(\"|\").join(\"
\");x.text(w).attr(\"data-unformatted\",w).call(f.convertToTspans,t),b=u.bBox(x.node())}x.attr(\"transform\",a(-3,8-b.height)),y.insert(\"rect\",\".static-attribution\").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:\"rgba(255, 255, 255, 0.75)\"});var T=1;b.width+6>_&&(T=_/(b.width+6));var k=[n.l+n.w*h.x[1],n.t+n.h*(1-h.y[0])];y.attr(\"transform\",a(k[0],k[1])+o(T))}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n0){for(var r=0;r0}function u(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,\"line-dasharray\":t.line.dash});break;case\"fill\":n.extendFlat(r,{\"fill-color\":t.color,\"fill-outline-color\":t.fill.outlinecolor,\"fill-opacity\":t.opacity});break;case\"symbol\":var i=t.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(e,{\"icon-image\":i.icon+\"-15\",\"icon-size\":i.iconsize/10,\"text-field\":i.text,\"text-size\":i.textfont.size,\"text-anchor\":o.anchor,\"text-offset\":o.offset,\"symbol-placement\":i.placement}),n.extendFlat(r,{\"icon-color\":t.color,\"text-color\":i.textfont.color,\"text-opacity\":t.opacity});break;case\"raster\":n.extendFlat(r,{\"raster-fade-duration\":0,\"raster-opacity\":t.opacity})}return{layout:e,paint:r}}l.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):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=c(t)},l.needsNewImage=function(t){return this.subplot.map.getSource(this.idSource)&&\"image\"===this.sourceType&&\"image\"===t.sourcetype&&(this.source!==t.source||JSON.stringify(this.coordinates)!==JSON.stringify(t.coordinates))},l.needsNewSource=function(t){return this.sourceType!==t.sourcetype||JSON.stringify(this.source)!==JSON.stringify(t.source)||this.layerType!==t.type},l.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup[\"layout-\"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup[\"layout-\"+this.index]},l.updateImage=function(t){this.subplot.map.getSource(this.idSource).updateImage({url:t.source,coordinates:t.coordinates});var e=this.findFollowingMapboxLayerId(this.lookupBelow());null!==e&&this.subplot.map.moveLayer(this.idLayer,e)},l.updateSource=function(t){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,c(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,a={type:r};\"geojson\"===r?e=\"data\":\"vector\"===r?e=\"string\"==typeof n?\"url\":\"tiles\":\"raster\"===r?(e=\"tiles\",a.tileSize=256):\"image\"===r&&(e=\"url\",a.coordinates=t.coordinates);a[e]=n,t.sourceattribution&&(a.attribution=i(t.sourceattribution));return a}(t);e.addSource(this.idSource,r)}},l.findFollowingMapboxLayerId=function(t){if(\"traces\"===t)for(var e=this.subplot.getMapLayers(),r=0;r1)for(r=0;r-1&&v(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf(\"event\")>-1&&c.click(n,e.originalEvent)}}},_.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,o=t.dragmode;a=f(o)?function(t,r){(t.range={})[e.id]=[c([r.xmin,r.ymin]),c([r.xmax,r.ymax])]}:function(t,r,n){(t.lassoPoints={})[e.id]=n.filtered.map(c)};var s=e.dragOptions;e.dragOptions=i.extendDeep(s||{},{dragmode:t.dragmode,element:e.div,gd:n,plotinfo:{id:e.id,domain:t[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off(\"click\",e.onClickInPanHandler),p(o)||h(o)?(r.dragPan.disable(),r.on(\"zoomstart\",e.clearSelect),e.dragOptions.prepFn=function(t,r,n){d(t,r,n,e.dragOptions,o)},l.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 c(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},_.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])},_.updateLayers=function(t){var e,r=t[this.id].layers,n=this.layerList;if(r.length!==n.length){for(e=0;e=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\"),l=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(){b.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()&&l.text()?\" - \":\"\")}},b.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit(\"plotly_beforeexport\");var 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=b.graphJson(t,!1,\"keepdata\"),i.node().submit(),r.remove(),t.emit(\"plotly_afterexport\"),!1}};var T=[\"days\",\"shortDays\",\"months\",\"shortMonths\",\"periods\",\"dateTime\",\"date\",\"time\",\"decimal\",\"thousands\",\"grouping\",\"currency\"],k=[\"year\",\"month\",\"dayMonth\",\"dayMonthYear\"];function A(t,e){var r=t._context.locale;r||(r=\"en-US\");var n=!1,i={};function a(t){for(var r=!0,a=0;a1&&z.length>1){for(s.getComponentMethod(\"grid\",\"sizeDefaults\")(c,l),o=0;o15&&z.length>15&&0===l.shapes.length&&0===l.images.length,b.linkSubplots(h,l,f,n),b.cleanPlot(h,l,f,n);var N=!(!n._has||!n._has(\"gl2d\")),j=!(!l._has||!l._has(\"gl2d\")),U=!(!n._has||!n._has(\"cartesian\"))||N,V=!(!l._has||!l._has(\"cartesian\"))||j;U&&!V?n._bgLayer.remove():V&&!U&&(l._shouldCreateBgLayer=!0),n._zoomlayer&&!t._dragging&&d({_fullLayout:n}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i0){var f=1-2*s;n=Math.round(f*n),i=Math.round(f*i)}}var h=b.layoutAttributes.width.min,p=b.layoutAttributes.height.min;n1,g=!e.height&&Math.abs(r.height-i)>1;(g||d)&&(d&&(r.width=n),g&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),b.sanitizeMargins(r)},b.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a,o,l=s.componentsRegistry,c=e._basePlotModules,f=s.subplotsRegistry.cartesian;for(i in l)(o=l[i]).includeBasePlot&&o.includeBasePlot(t,e);for(var h in c.length||c.push(f),e._has(\"cartesian\")&&(s.getComponentMethod(\"grid\",\"contentDefaults\")(t,e),f.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(u.subplotSort);for(a=0;a1&&(r.l/=g,r.r/=g)}if(f){var m=(r.t+r.b)/f;m>1&&(r.t/=m,r.b/=m)}var v=void 0!==r.xl?r.xl:r.x,y=void 0!==r.xr?r.xr:r.x,x=void 0!==r.yt?r.yt:r.y,_=void 0!==r.yb?r.yb:r.y;h[e]={l:{val:v,size:r.l+d},r:{val:y,size:r.r+d},b:{val:_,size:r.b+d},t:{val:x,size:r.t+d}},p[e]=1}else delete h[e],delete p[e];if(!n._replotting)return b.doAutoMargin(t)}},b.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,n=e.height;e._size||(e._size={}),C(e);var i=e._size,a=e.margin,l=u.extendFlat({},i),c=a.l,f=a.r,h=a.t,d=a.b,g=e._pushmargin,m=e._pushmarginIds;if(!1!==e.margin.autoexpand){for(var v in g)m[v]||delete g[v];for(var y in g.base={l:{val:0,size:c},r:{val:1,size:f},t:{val:1,size:h},b:{val:0,size:d}},g){var x=g[y].l||{},_=g[y].b||{},w=x.val,T=x.size,k=_.val,A=_.size;for(var M in g){if(o(T)&&g[M].r){var S=g[M].r.val,E=g[M].r.size;if(S>w){var L=(T*S+(E-r)*w)/(S-w),P=(E*(1-w)+(T-r)*(1-S))/(S-w);L+P>c+f&&(c=L,f=P)}}if(o(A)&&g[M].t){var I=g[M].t.val,O=g[M].t.size;if(I>k){var z=(A*I+(O-n)*k)/(I-k),D=(O*(1-k)+(A-n)*(1-I))/(I-k);z+D>d+h&&(d=z,h=D)}}}}}var R=u.constrain(r-a.l-a.r,2,64),F=u.constrain(n-a.t-a.b,2,64),B=Math.max(0,r-R),N=Math.max(0,n-F);if(B){var j=(c+f)/B;j>1&&(c/=j,f/=j)}if(N){var U=(d+h)/N;U>1&&(d/=U,h/=U)}if(i.l=Math.round(c),i.r=Math.round(f),i.t=Math.round(h),i.b=Math.round(d),i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e._replotting&&b.didMarginChange(l,i)){\"_redrawFromAutoMarginCount\"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var V=3*(1+Object.keys(m).length);if(e._redrawFromAutoMarginCount0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return s.call(\"redraw\",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit(\"plotly_transitioninterrupted\",[])}));var a=0,o=0;function l(){return a++,function(){o++,n||o!==a||function(e){if(!t._transitionData)return;(function(t){if(t)for(;t.length;)t.shift()})(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return s.call(\"redraw\",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit(\"plotly_transitioned\",[])})).then(e)}(i)}}r.runFn(l),setTimeout(l())}))}],a=u.syncOrAsync(i,t);return a&&a.then||(a=Promise.resolve()),a.then((function(){return t}))}b.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},b.graphJson=function(t,e,r,n,i,a){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&b.supplyDefaults(t);var o=i?t._fullData:t.data,s=i?t._fullLayout:t.layout,l=(t._transitionData||{})._frames;function c(t,e){if(\"function\"==typeof t)return e?\"_function_\":null;if(u.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(a){if(-1===[\"_\",\"[\"].indexOf(a.charAt(0)))if(\"function\"!=typeof t[a]){if(\"keepdata\"===r){if(\"src\"===a.substr(a.length-3))return}else if(\"keepstream\"===r){if(\"string\"==typeof(n=t[a+\"src\"])&&n.indexOf(\":\")>0&&!u.isPlainObject(t.stream))return}else if(\"keepall\"!==r&&\"string\"==typeof(n=t[a+\"src\"])&&n.indexOf(\":\")>0)return;i[a]=c(t[a],e)}else e&&(i[a]=\"_function\")})),i}return Array.isArray(t)?t.map((function(t){return c(t,e)})):u.isTypedArray(t)?u.simpleMap(t,u.identity):u.isJSDate(t)?u.ms2DateTimeLocal(+t):t}var f={data:(o||[]).map((function(t){var r=c(t);return e&&delete r.fit,r}))};if(!e&&(f.layout=c(s),i)){var h=s._size;f.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return l&&(f.frames=c(l)),a&&(f.config=c(t._context,!0)),\"object\"===n?f:JSON.stringify(f)},b.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r=0;a--)if(s[a].enabled){r._indexToPoints=s[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(t,r))}Array.isArray(o)&&o[0]||(o=[{x:h,y:h}]),o[0].t||(o[0].t={}),o[0].trace=r,d[e]=o}}for(z(o,c,f),i=0;i1e-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;a0?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=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]}(p),b=x[2]-x[0],_=x[3]-x[1],w=h/f,T=Math.abs(_/b);w>T?(d=f,y=(h-(g=f*T))/n.h/2,m=[o[0],o[1]],v=[s[0]+y,s[1]-y]):(g=h,y=(f-(d=h/T))/n.w/2,m=[o[0]+y,o[1]-y],v=[s[0],s[1]]),this.xLength2=d,this.yLength2=g,this.xDomain2=m,this.yDomain2=v;var k,A=this.xOffset2=n.l+n.w*m[0],M=this.yOffset2=n.t+n.h*(1-v[1]),S=this.radius=d/b,E=this.innerRadius=this.getHole(e)*S,L=this.cx=A-S*x[0],C=this.cy=M+S*x[3],P=this.cxx=L-A,I=this.cyy=C-M,O=i.side;\"counterclockwise\"===O?(k=O,O=\"top\"):\"clockwise\"===O&&(k=O,O=\"bottom\"),this.radialAxis=this.mockAxis(t,e,i,{_id:\"x\",side:O,_trueSide:k,domain:[E/n.w,S/n.w]}),this.angularAxis=this.mockAxis(t,e,a,{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:m}),this.yaxis=this.mockCartesianAxis(t,e,{_id:\"y\",domain:v});var z=this.pathSubplot();this.clipPaths.forTraces.select(\"path\").attr(\"d\",z).attr(\"transform\",l(P,I)),r.frontplot.attr(\"transform\",l(A,M)).call(u.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr(\"d\",z).attr(\"transform\",l(L,C)).call(c.fill,e.bgcolor)},N.mockAxis=function(t,e,r,n){var i=o.extendFlat({},r,n);return d(i,e,t),i},N.mockCartesianAxis=function(t,e,r){var n=this,i=n.isSmith,a=r._id,s=o.extendFlat({type:\"linear\"},r);p(s,t);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var t=n.sectorBBox,r=l[a],i=n.radialAxis._rl,o=(i[1]-i[0])/(1-n.getHole(e));s.range=[t[r[0]]*o,t[r[1]]*o]},s.isPtWithinRange=\"x\"!==a||i?function(){return!0}:function(t){return n.isPtInside(t)},s.setRange(),s.setScale(),s},N.doAutoRange=function(t,e){var r=this.gd,n=this.radialAxis,i=this.getRadial(e);g(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\")]},N.updateRadialAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=r.getRadial(e),g=D(r.getSector(e)[0],360),m=r.radialAxis,v=u90&&g<=270&&(m.tickangle=180);var x=y?function(t){var e=O(r,C([t.x,0]));return l(e[0]-f,e[1]-p)}:function(t){return l(m.l2p(t.x)+u,0)},b=y?function(t){return I(r,t.x,-1/0,1/0)}:function(t){return r.pathArc(m.r2p(t.x)+u)},_=j(d);if(r.radialTickLayout!==_&&(i[\"radial-axis\"].selectAll(\".xtick\").remove(),r.radialTickLayout=_),v){m.setScale();var w=0,T=y?(m.tickvals||[]).filter((function(t){return t>=0})).map((function(t){return h.tickText(m,t,!0,!1)})):h.calcTicks(m),k=y?T:h.clipEnds(m,T),A=h.getTickSigns(m)[2];y&&((\"top\"===m.ticks&&\"bottom\"===m.side||\"bottom\"===m.ticks&&\"top\"===m.side)&&(A=-A),\"top\"===m.ticks&&\"top\"===m.side&&(w=-m.ticklen),\"bottom\"===m.ticks&&\"bottom\"===m.side&&(w=m.ticklen)),h.drawTicks(n,m,{vals:T,layer:i[\"radial-axis\"],path:h.makeTickPath(m,0,A),transFn:x,crisp:!1}),h.drawGrid(n,m,{vals:k,layer:i[\"radial-grid\"],path:b,transFn:o.noop,crisp:!1}),h.drawLabels(n,m,{vals:T,layer:i[\"radial-axis\"],transFn:x,labelFns:h.makeLabelFns(m,w)})}var M=r.radialAxisAngle=r.vangles?F(U(R(d.angle),r.vangles)):d.angle,S=l(f,p),E=S+s(-M);V(i[\"radial-axis\"],v&&(d.showticklabels||d.ticks),{transform:E}),V(i[\"radial-grid\"],v&&d.showgrid,{transform:y?\"\":S}),V(i[\"radial-line\"].select(\"line\"),v&&d.showline,{x1:y?-a:u,y1:0,x2:a,y2:0,transform:E}).attr(\"stroke-width\",d.linewidth).call(c.stroke,d.linecolor)},N.updateRadialAxisTitle=function(t,e,r){if(!this.isSmith){var n=this.gd,i=this.radius,a=this.cx,o=this.cy,s=this.getRadial(e),l=this.id+\"title\",c=0;if(s.title){var f=u.bBox(this.layers[\"radial-axis\"].node()).height,h=s.title.font.size,p=s.side;c=\"top\"===p?h:\"counterclockwise\"===p?-(f+.4*h):f+.8*h}var d=void 0!==r?r:this.radialAxisAngle,g=R(d),m=Math.cos(g),v=Math.sin(g),y=a+i/2*m+c*v,b=o-i/2*v+c*m;this.layers[\"radial-axis-title\"]=x.draw(n,l,{propContainer:s,propName:this.id+\".radialaxis.title\",placeholder:z(n,\"Click to enter radial axis title\"),attributes:{x:y,y:b,\"text-anchor\":\"middle\"},transform:{rotate:-d}})}},N.updateAngularAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=r.getAngular(e),g=r.angularAxis,m=r.isSmith;m||(r.fillViewInitialKey(\"angularaxis.rotation\",d.rotation),g.setGeometry(),g.setScale());var v=m?function(t){var e=O(r,C([0,t.x]));return Math.atan2(e[0]-f,e[1]-p)-Math.PI/2}:function(t){return g.t2g(t.x)};\"linear\"===g.type&&\"radians\"===g.thetaunit&&(g.tick0=F(g.tick0),g.dtick=F(g.dtick));var y=function(t){return l(f+a*Math.cos(t),p-a*Math.sin(t))},x=m?function(t){var e=O(r,C([0,t.x]));return l(e[0],e[1])}:function(t){return y(v(t))},b=m?function(t){var e=O(r,C([0,t.x])),n=Math.atan2(e[0]-f,e[1]-p)-Math.PI/2;return l(e[0],e[1])+s(-F(n))}:function(t){var e=v(t);return y(e)+s(-F(e))},_=m?function(t){return P(r,t.x,0,1/0)}:function(t){var e=v(t),r=Math.cos(e),n=Math.sin(e);return\"M\"+[f+u*r,p-u*n]+\"L\"+[f+a*r,p-a*n]},w=h.makeLabelFns(g,0).labelStandoff,T={xFn:function(t){var e=v(t);return Math.cos(e)*w},yFn:function(t){var e=v(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(w+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*M)},anchorFn:function(t){var e=v(t),r=Math.cos(e);return Math.abs(r)<.1?\"middle\":r>0?\"start\":\"end\"},heightFn:function(t,e,r){var n=v(t);return-.5*(1+Math.sin(n))*r}},k=j(d);r.angularTickLayout!==k&&(i[\"angular-axis\"].selectAll(\".\"+g._id+\"tick\").remove(),r.angularTickLayout=k);var A,S=m?[1/0].concat(g.tickvals||[]).map((function(t){return h.tickText(g,t,!0,!1)})):h.calcTicks(g);if(m&&(S[0].text=\"\\u221e\",S[0].fontSize*=1.75),\"linear\"===e.gridshape?(A=S.map(v),o.angleDelta(A[0],A[1])<0&&(A=A.slice().reverse())):A=null,r.vangles=A,\"category\"===g.type&&(S=S.filter((function(t){return o.isAngleInsideSector(v(t),r.sectorInRad)}))),g.visible){var E=\"inside\"===g.ticks?-1:1,L=(g.linewidth||1)/2;h.drawTicks(n,g,{vals:S,layer:i[\"angular-axis\"],path:\"M\"+E*L+\",0h\"+E*g.ticklen,transFn:b,crisp:!1}),h.drawGrid(n,g,{vals:S,layer:i[\"angular-grid\"],path:_,transFn:o.noop,crisp:!1}),h.drawLabels(n,g,{vals:S,layer:i[\"angular-axis\"],repositionOnUpdate:!0,transFn:x,labelFns:T})}V(i[\"angular-line\"].select(\"path\"),d.showline,{d:r.pathSubplot(),transform:l(f,p)}).attr(\"stroke-width\",d.linewidth).call(c.stroke,d.linecolor)},N.updateFx=function(t,e){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1)),this.updateHoverAndMainDrag(t))},N.updateHoverAndMainDrag=function(t){var e,r,s=this,c=s.isSmith,u=s.gd,f=s.layers,h=t._zoomlayer,p=S.MINZOOM,d=S.OFFEDGE,g=s.radius,x=s.innerRadius,T=s.cx,k=s.cy,A=s.cxx,M=s.cyy,L=s.sectorInRad,C=s.vangles,P=s.radialAxis,I=E.clampTiny,O=E.findXYatLength,z=E.findEnclosingVertexAngles,D=S.cornerHalfWidth,R=S.cornerLen/2,F=m.makeDragger(f,\"path\",\"maindrag\",\"crosshair\");n.select(F).attr(\"d\",s.pathSubplot()).attr(\"transform\",l(T,k)),F.onmousemove=function(t){y.hover(u,t,s.id),u._fullLayout._lasthover=F,u._fullLayout._hoversubplot=s.id},F.onmouseout=function(t){u._dragging||v.unhover(u,t)};var B,N,j,U,V,H,q,G,Y,W={element:F,gd:u,subplot:s.id,plotinfo:{id:s.id,xaxis:s.xaxis,yaxis:s.yaxis},xaxes:[s.xaxis],yaxes:[s.yaxis]};function X(t,e){return Math.sqrt(t*t+e*e)}function Z(t,e){return X(t-A,e-M)}function J(t,e){return Math.atan2(M-e,t-A)}function K(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function Q(t,e){if(0===t)return s.pathSector(2*D);var r=R/t,n=e-r,i=e+r,a=Math.max(0,Math.min(t,g)),o=a-D,l=a+D;return\"M\"+K(o,n)+\"A\"+[o,o]+\" 0,0,0 \"+K(o,i)+\"L\"+K(l,i)+\"A\"+[l,l]+\" 0,0,1 \"+K(l,n)+\"Z\"}function $(t,e,r){if(0===t)return s.pathSector(2*D);var n,i,a=K(t,e),o=K(t,r),l=I((a[0]+o[0])/2),c=I((a[1]+o[1])/2);if(l&&c){var u=c/l,f=-1/u,h=O(D,u,l,c);n=O(R,f,h[0][0],h[0][1]),i=O(R,f,h[1][0],h[1][1])}else{var p,d;c?(p=R,d=D):(p=D,d=R),n=[[l-p,c-d],[l+p,c-d]],i=[[l-p,c+d],[l+p,c+d]]}return\"M\"+n.join(\"L\")+\"L\"+i.reverse().join(\"L\")+\"Z\"}function tt(t,e){return e=Math.max(Math.min(e,g),x),tp?(t-1&&1===t&&_(e,u,[s.xaxis],[s.yaxis],s.id,W),r.indexOf(\"event\")>-1&&y.click(u,e,s.id)}W.prepFn=function(t,n,a){var l=u._fullLayout.dragmode,f=F.getBoundingClientRect();u._fullLayout._calcInverseTransform(u);var p=u._fullLayout._invTransform;e=u._fullLayout._invScaleX,r=u._fullLayout._invScaleY;var d=o.apply3DTransform(p)(n-f.left,a-f.top);if(B=d[0],N=d[1],C){var v=E.findPolygonOffset(g,L[0],L[1],C);B+=A+v[0],N+=M+v[1]}switch(l){case\"zoom\":W.clickFn=st,c||(W.moveFn=C?it:rt,W.doneFn=at,function(){j=null,U=null,V=s.pathSubplot(),H=!1;var t=u._fullLayout[s.id];q=i(t.bgcolor).getLuminance(),(G=m.makeZoombox(h,q,T,k,V)).attr(\"fill-rule\",\"evenodd\"),Y=m.makeCorners(h,T,k),w(u)}());break;case\"select\":case\"lasso\":b(t,n,a,W,l)}},v.init(W)},N.updateRadialDrag=function(t,e,r){var i=this,c=i.gd,u=i.layers,f=i.radius,h=i.innerRadius,p=i.cx,d=i.cy,g=i.radialAxis,y=S.radialDragBoxSize,x=y/2;if(g.visible){var b,_,T,M=R(i.radialAxisAngle),E=g._rl,L=E[0],C=E[1],P=E[r],I=.75*(E[1]-E[0])/(1-i.getHole(e))/f;r?(b=p+(f+x)*Math.cos(M),_=d-(f+x)*Math.sin(M),T=\"radialdrag\"):(b=p+(h-x)*Math.cos(M),_=d-(h-x)*Math.sin(M),T=\"radialdrag-inner\");var O,z,D,B=m.makeRectDragger(u,T,\"crosshair\",-x,-x,y,y),N={element:B,gd:c};V(n.select(B),g.visible&&h0==(r?D>L:Dn?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;o0?1:0}function i(t){var e=t[0],r=t[1];if(!isFinite(e)||!isFinite(r))return[1,0];var n=(e+1)*(e+1)+r*r;return[(e*e+r*r-1)/n,2*r/n]}function a(t,e){var r=e[0],n=e[1];return[r*t.radius+t.cx,-n*t.radius+t.cy]}function o(t,e){return e*t.radius}e.exports={smith:i,reactanceArc:function(t,e,r,n){var s=a(t,i([r,e])),l=s[0],c=s[1],u=a(t,i([n,e])),f=u[0],h=u[1];if(0===e)return[\"M\"+l+\",\"+c,\"L\"+f+\",\"+h].join(\" \");var p=o(t,1/Math.abs(e));return[\"M\"+l+\",\"+c,\"A\"+p+\",\"+p+\" 0 0,\"+(e<0?1:0)+\" \"+f+\",\"+h].join(\" \")},resistanceArc:function(t,e,r,s){var l=o(t,1/(e+1)),c=a(t,i([e,r])),u=c[0],f=c[1],h=a(t,i([e,s])),p=h[0],d=h[1];if(n(r)!==n(s)){var g=a(t,i([e,0]));return[\"M\"+u+\",\"+f,\"A\"+l+\",\"+l+\" 0 0,\"+(00){for(var n=[],i=0;i=u&&(h.min=0,d.min=0,m.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function g(t,e,r,n){var i=h[e._name];function o(r,n){return a.coerce(t,e,i,r,n)}o(\"uirevision\",n.uirevision),e.type=\"linear\";var p=o(\"color\"),d=p!==i.color.dflt?p:r.font.color,g=e._name.charAt(0).toUpperCase(),m=\"Component \"+g,v=o(\"title.text\",m);e._hovertitle=v===m?v:g,a.coerceFont(o,\"title.font\",{family:r.font.family,size:a.bigFont(r.font.size),color:d}),o(\"min\"),u(t,e,o,\"linear\"),l(t,e,o,\"linear\"),s(t,e,o,\"linear\"),c(t,e,o,{outerTicks:!0}),o(\"showticklabels\")&&(a.coerceFont(o,\"tickfont\",{family:r.font.family,size:r.font.size,color:d}),o(\"tickangle\"),o(\"tickformat\")),f(t,e,o,{dfltColor:p,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),o(\"hoverformat\"),o(\"layer\")}e.exports=function(t,e,r){o(t,e,r,{type:\"ternary\",attributes:h,handleDefaults:d,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{\"../../components/color\":366,\"../../lib\":503,\"../../plot_api/plot_template\":543,\"../cartesian/line_grid_defaults\":571,\"../cartesian/prefix_suffix_defaults\":573,\"../cartesian/tick_label_defaults\":578,\"../cartesian/tick_mark_defaults\":579,\"../cartesian/tick_value_defaults\":580,\"../subplot_defaults\":632,\"./layout_attributes\":635}],637:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"tinycolor2\"),a=t(\"../../registry\"),o=t(\"../../lib\"),s=o.strTranslate,l=o._,c=t(\"../../components/color\"),u=t(\"../../components/drawing\"),f=t(\"../cartesian/set_convert\"),h=t(\"../../lib/extend\").extendFlat,p=t(\"../plots\"),d=t(\"../cartesian/axes\"),g=t(\"../../components/dragelement\"),m=t(\"../../components/fx\"),v=t(\"../../components/dragelement/helpers\"),y=v.freeMode,x=v.rectMode,b=t(\"../../components/titles\"),_=t(\"../cartesian/select\").prepSelect,w=t(\"../cartesian/select\").selectOnClick,T=t(\"../cartesian/select\").clearSelect,k=t(\"../cartesian/select\").clearSelectionsCache,A=t(\"../cartesian/constants\");function M(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=M;var S=M.prototype;S.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},S.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var i=0;iE*b?i=(a=b)*E:a=(i=x)/E,o=v*i/x,l=y*a/b,r=e.l+e.w*g-i/2,n=e.t+e.h*(1-m)-a/2,p.x0=r,p.y0=n,p.w=i,p.h=a,p.sum=_,p.xaxis={type:\"linear\",range:[w+2*k-_,_-w-2*T],domain:[g-o/2,g+o/2],_id:\"x\"},f(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(t){return t.a>=p.aaxis.range[0]&&t.a<=p.aaxis.range[1]&&t.b>=p.baxis.range[1]&&t.b<=p.baxis.range[0]&&t.c>=p.caxis.range[1]&&t.c<=p.caxis.range[0]},p.yaxis={type:\"linear\",range:[w,_-T-k],domain:[m-l/2,m+l/2],_id:\"y\"},f(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var A=p.yaxis.domain[0],M=p.aaxis=h({},t.aaxis,{range:[w,_-T-k],side:\"left\",tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+l*E],anchor:\"free\",position:0,_id:\"y\",_length:i});f(M,p.graphDiv._fullLayout),M.setScale();var S=p.baxis=h({},t.baxis,{range:[_-w-k,T],side:\"bottom\",domain:p.xaxis.domain,anchor:\"free\",position:0,_id:\"x\",_length:i});f(S,p.graphDiv._fullLayout),S.setScale();var L=p.caxis=h({},t.caxis,{range:[_-w-T,k],side:\"right\",tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+l*E],anchor:\"free\",position:0,_id:\"y\",_length:i});f(L,p.graphDiv._fullLayout),L.setScale();var C=\"M\"+r+\",\"+(n+a)+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";p.clipDef.select(\"path\").attr(\"d\",C),p.layers.plotbg.select(\"path\").attr(\"d\",C);var P=\"M0,\"+a+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";p.clipDefRelative.select(\"path\").attr(\"d\",P);var I=s(r,n);p.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",I),p.clipDefRelative.select(\"path\").attr(\"transform\",null);var O=s(r-S._offset,n+a);p.layers.baxis.attr(\"transform\",O),p.layers.bgrid.attr(\"transform\",O);var z=s(r+i/2,n)+\"rotate(30)\"+s(0,-M._offset);p.layers.aaxis.attr(\"transform\",z),p.layers.agrid.attr(\"transform\",z);var D=s(r+i/2,n)+\"rotate(-30)\"+s(0,-L._offset);p.layers.caxis.attr(\"transform\",D),p.layers.cgrid.attr(\"transform\",D),p.drawAxes(!0),p.layers.aline.select(\"path\").attr(\"d\",M.showline?\"M\"+r+\",\"+(n+a)+\"l\"+i/2+\",-\"+a:\"M0,0\").call(c.stroke,M.linecolor||\"#000\").style(\"stroke-width\",(M.linewidth||0)+\"px\"),p.layers.bline.select(\"path\").attr(\"d\",S.showline?\"M\"+r+\",\"+(n+a)+\"h\"+i:\"M0,0\").call(c.stroke,S.linecolor||\"#000\").style(\"stroke-width\",(S.linewidth||0)+\"px\"),p.layers.cline.select(\"path\").attr(\"d\",L.showline?\"M\"+(r+i/2)+\",\"+n+\"l\"+i/2+\",\"+a:\"M0,0\").call(c.stroke,L.linecolor||\"#000\").style(\"stroke-width\",(L.linewidth||0)+\"px\"),p.graphDiv._context.staticPlot||p.initInteractions(),u.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},S.drawAxes=function(t){var e=this.graphDiv,r=this.id.substr(7)+\"title\",n=this.layers,i=this.aaxis,a=this.baxis,o=this.caxis;if(this.drawAx(i),this.drawAx(a),this.drawAx(o),t){var s=Math.max(i.showticklabels?i.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+(\"outside\"===o.ticks?.87*o.ticklen:0)),c=(a.showticklabels?a.tickfont.size:0)+(\"outside\"===a.ticks?a.ticklen:0)+3;n[\"a-title\"]=b.draw(e,\"a\"+r,{propContainer:i,propName:this.id+\".aaxis.title\",placeholder:l(e,\"Click to enter Component A title\"),attributes:{x:this.x0+this.w/2,y:this.y0-i.title.font.size/3-s,\"text-anchor\":\"middle\"}}),n[\"b-title\"]=b.draw(e,\"b\"+r,{propContainer:a,propName:this.id+\".baxis.title\",placeholder:l(e,\"Click to enter Component B title\"),attributes:{x:this.x0-c,y:this.y0+this.h+.83*a.title.font.size+c,\"text-anchor\":\"middle\"}}),n[\"c-title\"]=b.draw(e,\"c\"+r,{propContainer:o,propName:this.id+\".caxis.title\",placeholder:l(e,\"Click to enter Component C title\"),attributes:{x:this.x0+this.w+c,y:this.y0+this.h+.83*o.title.font.size+c,\"text-anchor\":\"middle\"}})}},S.drawAx=function(t){var e,r=this.graphDiv,n=t._name,i=n.charAt(0),a=t._id,s=this.layers[n],l=i+\"tickLayout\",c=(e=t).ticks+String(e.ticklen)+String(e.showticklabels);this[l]!==c&&(s.selectAll(\".\"+a+\"tick\").remove(),this[l]=c),t.setScale();var u=d.calcTicks(t),f=d.clipEnds(t,u),h=d.makeTransTickFn(t),p=d.getTickSigns(t)[2],g=o.deg2rad(30),m=p*(t.linewidth||1)/2,v=p*t.ticklen,y=this.w,x=this.h,b=\"b\"===i?\"M0,\"+m+\"l\"+Math.sin(g)*v+\",\"+Math.cos(g)*v:\"M\"+m+\",0l\"+Math.cos(g)*v+\",\"+-Math.sin(g)*v,_={a:\"M0,0l\"+x+\",-\"+y/2,b:\"M0,0l-\"+y/2+\",-\"+x,c:\"M0,0l-\"+x+\",\"+y/2}[i];d.drawTicks(r,t,{vals:\"inside\"===t.ticks?f:u,layer:s,path:b,transFn:h,crisp:!1}),d.drawGrid(r,t,{vals:f,layer:this.layers[i+\"grid\"],path:_,transFn:h,crisp:!1}),d.drawLabels(r,t,{vals:u,layer:s,transFn:h,labelFns:d.makeLabelFns(t,0,30)})};var L=A.MINZOOM/2+.87,C=\"m-0.87,.5h\"+L+\"v3h-\"+(L+5.2)+\"l\"+(L/2+2.6)+\",-\"+(.87*L+4.5)+\"l2.6,1.5l-\"+L/2+\",\"+.87*L+\"Z\",P=\"m0.87,.5h-\"+L+\"v3h\"+(L+5.2)+\"l-\"+(L/2+2.6)+\",-\"+(.87*L+4.5)+\"l-2.6,1.5l\"+L/2+\",\"+.87*L+\"Z\",I=\"m0,1l\"+L/2+\",\"+.87*L+\"l2.6,-1.5l-\"+(L/2+2.6)+\",-\"+(.87*L+4.5)+\"l-\"+(L/2+2.6)+\",\"+(.87*L+4.5)+\"l2.6,1.5l\"+L/2+\",-\"+.87*L+\"Z\",O=!0;function z(t){n.select(t).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}S.clearSelect=function(){k(this.dragOptions),T(this.dragOptions.gd)},S.initInteractions=function(){var t,e,r,n,f,h,p,d,v,b,T,k,M=this,S=M.layers.plotbg.select(\"path\").node(),L=M.graphDiv,D=L._fullLayout._zoomlayer;function R(t){var e={};return e[M.id+\".aaxis.min\"]=t.a,e[M.id+\".baxis.min\"]=t.b,e[M.id+\".caxis.min\"]=t.c,e}function F(t,e){var r=L._fullLayout.clickmode;z(L),2===t&&(L.emit(\"plotly_doubleclick\",null),a.call(\"_guiRelayout\",L,R({a:0,b:0,c:0}))),r.indexOf(\"select\")>-1&&1===t&&w(e,L,[M.xaxis],[M.yaxis],M.id,M.dragOptions),r.indexOf(\"event\")>-1&&m.click(L,e,M.id)}function B(t,e){return 1-e/M.h}function N(t,e){return 1-(t+(M.h-e)/Math.sqrt(3))/M.w}function j(t,e){return(t-(M.h-e)/Math.sqrt(3))/M.w}function U(i,a){var o=r+i*t,s=n+a*e,l=Math.max(0,Math.min(1,B(0,n),B(0,s))),c=Math.max(0,Math.min(1,N(r,n),N(o,s))),u=Math.max(0,Math.min(1,j(r,n),j(o,s))),g=(l/2+u)*M.w,m=(1-l/2-c)*M.w,y=(g+m)/2,x=m-g,_=(1-l)*M.h,w=_-x/E;x.2?\"rgba(0,0,0,0.4)\":\"rgba(255,255,255,0.3)\").duration(200),k.transition().style(\"opacity\",1).duration(200),b=!0),L.emit(\"plotly_relayouting\",R(p))}function V(){z(L),p!==f&&(a.call(\"_guiRelayout\",L,R(p)),O&&L.data&&L._context.showTips&&(o.notifier(l(L,\"Double-click to zoom back out\"),\"long\"),O=!1))}function H(t,e){var r=t/M.xaxis._m,n=e/M.yaxis._m,i=[(p={a:f.a-n,b:f.b+(r+n)/2,c:f.c-(r-n)/2}).a,p.b,p.c].sort(o.sorterAsc),a=i.indexOf(p.a),l=i.indexOf(p.b),c=i.indexOf(p.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),p={a:i[a],b:i[l],c:i[c]},e=(f.a-p.a)*M.yaxis._m,t=(f.c-p.c-f.b+p.b)*M.xaxis._m);var h=s(M.x0+t,M.y0+e);M.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",h);var d=s(-t,-e);M.clipDefRelative.select(\"path\").attr(\"transform\",d),M.aaxis.range=[p.a,M.sum-p.b-p.c],M.baxis.range=[M.sum-p.a-p.c,p.b],M.caxis.range=[M.sum-p.a-p.b,p.c],M.drawAxes(!1),M._hasClipOnAxisFalse&&M.plotContainer.select(\".scatterlayer\").selectAll(\".trace\").call(u.hideOutsideRangePoints,M),L.emit(\"plotly_relayouting\",R(p))}function q(){a.call(\"_guiRelayout\",L,R(p))}this.dragOptions={element:S,gd:L,plotinfo:{id:M.id,domain:L._fullLayout[M.id].domain,xaxis:M.xaxis,yaxis:M.yaxis},subplot:M.id,prepFn:function(a,l,u){M.dragOptions.xaxes=[M.xaxis],M.dragOptions.yaxes=[M.yaxis],t=L._fullLayout._invScaleX,e=L._fullLayout._invScaleY;var g=M.dragOptions.dragmode=L._fullLayout.dragmode;y(g)?M.dragOptions.minDrag=1:M.dragOptions.minDrag=void 0,\"zoom\"===g?(M.dragOptions.moveFn=U,M.dragOptions.clickFn=F,M.dragOptions.doneFn=V,function(t,e,a){var l=S.getBoundingClientRect();r=e-l.left,n=a-l.top,L._fullLayout._calcInverseTransform(L);var u=L._fullLayout._invTransform,g=o.apply3DTransform(u)(r,n);r=g[0],n=g[1],f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=f,h=M.aaxis.range[1]-f.a,d=i(M.graphDiv._fullLayout[M.id].bgcolor).getLuminance(),v=\"M0,\"+M.h+\"L\"+M.w/2+\", 0L\"+M.w+\",\"+M.h+\"Z\",b=!1,T=D.append(\"path\").attr(\"class\",\"zoombox\").attr(\"transform\",s(M.x0,M.y0)).style({fill:d>.2?\"rgba(0,0,0,0)\":\"rgba(255,255,255,0)\",\"stroke-width\":0}).attr(\"d\",v),k=D.append(\"path\").attr(\"class\",\"zoombox-corners\").attr(\"transform\",s(M.x0,M.y0)).style({fill:c.background,stroke:c.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"d\",\"M0,0Z\"),M.clearSelect(L)}(0,l,u)):\"pan\"===g?(M.dragOptions.moveFn=H,M.dragOptions.clickFn=F,M.dragOptions.doneFn=q,f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=f,M.clearSelect(L)):(x(g)||y(g))&&_(a,l,u,M.dragOptions,g)}},S.onmousemove=function(t){m.hover(L,t,M.id),L._fullLayout._lasthover=S,L._fullLayout._hoversubplot=M.id},S.onmouseout=function(t){L._dragging||g.unhover(L,t)},g.init(this.dragOptions)}},{\"../../components/color\":366,\"../../components/dragelement\":385,\"../../components/dragelement/helpers\":384,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../components/titles\":464,\"../../lib\":503,\"../../lib/extend\":493,\"../../registry\":638,\"../cartesian/axes\":554,\"../cartesian/constants\":561,\"../cartesian/select\":575,\"../cartesian/set_convert\":576,\"../plots\":619,\"@plotly/d3\":58,tinycolor2:312}],638:[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/dom\").addStyleRule,l=t(\"./lib/extend\"),c=t(\"./plots/attributes\"),u=t(\"./plots/layout_attributes\"),f=l.extendFlat,h=l.extendDeepAll;function p(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)b(i,t.name)}(t.basePlotModule);for(var o={},l=0;l-1&&(f[p[r]].title={text:\"\"});for(r=0;r\")?\"\":e.html(t).text()}));return e.remove(),r}(T),T=(T=T.replace(/&(?!\\w+;|\\#[0-9]+;| \\#x[0-9A-F]+;)/g,\"&\")).replace(c,\"'\"),i.isIE()&&(T=(T=(T=T.replace(/\"/gi,\"'\")).replace(/(\\('#)([^']*)('\\))/gi,'(\"#$2\")')).replace(/(\\\\')/gi,'\"')),T}},{\"../components/color\":366,\"../components/drawing\":388,\"../constants/xmlns_namespaces\":480,\"../lib\":503,\"@plotly/d3\":58}],647:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){for(var r=0;rf+c||!n(u))}for(var p=0;pa))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)?e0?e+=r:u<0&&(e-=r)}return e}function z(t){var e=u,r=t.b,i=O(t);return n.inbox(r-e,i-e,_+(i-e)/(i-r)-1)}var D=t[f+\"a\"],R=t[h+\"a\"];g=Math.abs(D.r2c(D.range[1])-D.r2c(D.range[0]));var F=n.getDistanceFunction(i,p,d,(function(t){return(p(t)+d(t))/2}));if(n.getClosest(m,F,t),!1!==t.index&&m[t.index].p!==c){k||(L=function(t){return Math.min(A(t),t.p-y.bargroupwidth/2)},C=function(t){return Math.max(M(t),t.p+y.bargroupwidth/2)});var B=m[t.index],N=v.base?B.b+B.s:B.s;t[h+\"0\"]=t[h+\"1\"]=R.c2p(B[h],!0),t[h+\"LabelVal\"]=N;var j=y.extents[y.extents.round(B.p)];t[f+\"0\"]=D.c2p(x?L(B):j[0],!0),t[f+\"1\"]=D.c2p(x?C(B):j[1],!0);var U=void 0!==B.orig_p;return t[f+\"LabelVal\"]=U?B.orig_p:B.p,t.labelLabel=l(D,t[f+\"LabelVal\"],v[f+\"hoverformat\"]),t.valueLabel=l(R,t[h+\"LabelVal\"],v[h+\"hoverformat\"]),t.baseLabel=l(R,B.b,v[h+\"hoverformat\"]),t.spikeDistance=(function(t){var e=u,r=t.b,i=O(t);return n.inbox(r-e,i-e,w+(i-e)/(i-r)-1)}(B)+function(t){return P(A(t),M(t),w)}(B))/2,t[f+\"Spike\"]=D.c2p(B.p,!0),o(B,v,t),t.hovertemplate=v.hovertemplate,t}}function f(t,e){var r=e.mcc||t.marker.color,n=e.mlcc||t.marker.line.color,i=s(t,e);return a.opacity(r)?r:a.opacity(n)&&i?n:void 0}e.exports={hoverPoints:function(t,e,r,n,a){var o=u(t,e,r,n,a);if(o){var s=o.cd,l=s[0].trace,c=s[o.index];return o.color=f(l,c),i.getComponentMethod(\"errorbars\",\"hoverInfo\")(c,l,o),[o]}},hoverOnBars:u,getTraceColor:f}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"./helpers\":654}],656:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\").crossTraceCalc,colorbar:t(\"../scatter/marker_colorbar\"),arraysToCalcdata:t(\"./arrays_to_calcdata\"),plot:t(\"./plot\").plot,style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"bar\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"bar\",\"oriented\",\"errorBarsOK\",\"showLegend\",\"zoomScale\"],animatable:!0,meta:{}}},{\"../../plots/cartesian\":568,\"../scatter/marker_colorbar\":944,\"./arrays_to_calcdata\":647,\"./attributes\":648,\"./calc\":649,\"./cross_trace_calc\":651,\"./defaults\":652,\"./event_data\":653,\"./hover\":655,\"./layout_attributes\":657,\"./layout_defaults\":658,\"./plot\":659,\"./select\":660,\"./style\":662}],657:[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\"}}},{}],658:[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=s(\"barmode\"),p=0;p0}function S(t){return\"auto\"===t?0:t}function E(t,e){var r=Math.PI/180*e,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:t.width*i+t.height*n,y:t.width*n+t.height*i}}function L(t,e,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,c=a.anchor||\"end\",u=\"end\"===c,f=\"start\"===c,h=((a.leftToRight||0)+1)/2,p=1-h,d=i.width,g=i.height,m=Math.abs(e-t),v=Math.abs(n-r),y=m>2*_&&v>2*_?_:0;m-=2*y,v-=2*y;var x=S(l);\"auto\"!==l||d<=m&&g<=v||!(d>m||g>v)||(d>v||g>m)&&d.01?q:function(t,e,r){return r&&t===e?t:Math.abs(t-e)>=2?q(t):t>e?Math.ceil(t):Math.floor(t)};B=G(B,N,D),N=G(N,B,D),j=G(j,U,!D),U=G(U,j,!D)}var Y=A(a.ensureSingle(I,\"path\"),P,m,v);if(Y.style(\"vector-effect\",\"non-scaling-stroke\").attr(\"d\",isNaN((N-B)*(U-j))||V&&t._context.staticPlot?\"M0,0Z\":\"M\"+B+\",\"+j+\"V\"+U+\"H\"+N+\"V\"+j+\"Z\").call(l.setClipUrl,e.layerClipId,t),!P.uniformtext.mode&&R){var W=l.makePointStyleFns(f);l.singlePointStyle(c,Y,f,W,t)}!function(t,e,r,n,i,s,c,f,p,m,v){var w,T=e.xaxis,M=e.yaxis,C=t._fullLayout;function P(e,r,n){return a.ensureSingle(e,\"text\").text(r).attr({class:\"bartext bartext-\"+w,\"text-anchor\":\"middle\",\"data-notex\":1}).call(l.font,n).call(o.convertToTspans,t)}var I=n[0].trace,O=\"h\"===I.orientation,z=function(t,e,r,n,i){var o,s=e[0].trace;o=s.texttemplate?function(t,e,r,n,i){var o=e[0].trace,s=a.castOption(o,r,\"texttemplate\");if(!s)return\"\";var l,c,f,h,p=\"histogram\"===o.type,d=\"waterfall\"===o.type,g=\"funnel\"===o.type,m=\"h\"===o.orientation;m?(l=\"y\",c=i,f=\"x\",h=n):(l=\"x\",c=n,f=\"y\",h=i);function v(t){return u(h,h.c2l(t),!0).text}var y=e[r],x={};x.label=y.p,x.labelLabel=x[l+\"Label\"]=(_=y.p,u(c,c.c2l(_),!0).text);var _;var w=a.castOption(o,y.i,\"text\");(0===w||w)&&(x.text=w);x.value=y.s,x.valueLabel=x[f+\"Label\"]=v(y.s);var T={};b(T,o,y.i),(p||void 0===T.x)&&(T.x=m?x.value:x.label);(p||void 0===T.y)&&(T.y=m?x.label:x.value);(p||void 0===T.xLabel)&&(T.xLabel=m?x.valueLabel:x.labelLabel);(p||void 0===T.yLabel)&&(T.yLabel=m?x.labelLabel:x.valueLabel);d&&(x.delta=+y.rawS||y.s,x.deltaLabel=v(x.delta),x.final=y.v,x.finalLabel=v(x.final),x.initial=x.final-x.delta,x.initialLabel=v(x.initial));g&&(x.value=y.s,x.valueLabel=v(x.value),x.percentInitial=y.begR,x.percentInitialLabel=a.formatPercent(y.begR),x.percentPrevious=y.difR,x.percentPreviousLabel=a.formatPercent(y.difR),x.percentTotal=y.sumR,x.percenTotalLabel=a.formatPercent(y.sumR));var k=a.castOption(o,y.i,\"customdata\");k&&(x.customdata=k);return a.texttemplateString(s,x,t._d3locale,T,x,o._meta||{})}(t,e,r,n,i):s.textinfo?function(t,e,r,n){var i=t[0].trace,o=\"h\"===i.orientation,s=\"waterfall\"===i.type,l=\"funnel\"===i.type;function c(t){return u(o?r:n,+t,!0).text}var f,h=i.textinfo,p=t[e],d=h.split(\"+\"),g=[],m=function(t){return-1!==d.indexOf(t)};m(\"label\")&&g.push((v=t[e].p,u(o?n:r,v,!0).text));var v;m(\"text\")&&(0===(f=a.castOption(i,p.i,\"text\"))||f)&&g.push(f);if(s){var y=+p.rawS||p.s,x=p.v,b=x-y;m(\"initial\")&&g.push(c(b)),m(\"delta\")&&g.push(c(y)),m(\"final\")&&g.push(c(x))}if(l){m(\"value\")&&g.push(c(p.s));var _=0;m(\"percent initial\")&&_++,m(\"percent previous\")&&_++,m(\"percent total\")&&_++;var w=_>1;m(\"percent initial\")&&(f=a.formatPercent(p.begR),w&&(f+=\" of initial\"),g.push(f)),m(\"percent previous\")&&(f=a.formatPercent(p.difR),w&&(f+=\" of previous\"),g.push(f)),m(\"percent total\")&&(f=a.formatPercent(p.sumR),w&&(f+=\" of total\"),g.push(f))}return g.join(\"
\")}(e,r,n,i):g.getValue(s.text,r);return g.coerceString(y,o)}(C,n,i,T,M);w=function(t,e){var r=g.getValue(t.textposition,e);return g.coerceEnumerated(x,r)}(I,i);var D=\"stack\"===m.mode||\"relative\"===m.mode,R=n[i],F=!D||R._outmost;if(!z||\"none\"===w||(R.isBlank||s===c||f===p)&&(\"auto\"===w||\"inside\"===w))return void r.select(\"text\").remove();var B=C.font,N=d.getBarColor(n[i],I),j=d.getInsideTextFont(I,i,B,N),U=d.getOutsideTextFont(I,i,B),V=r.datum();O?\"log\"===T.type&&V.s0<=0&&(s=T.range[0]=G*(Z/Y):Z>=Y*(X/G);G>0&&Y>0&&(J||K||Q)?w=\"inside\":(w=\"outside\",H.remove(),H=null)}else w=\"inside\";if(!H){W=a.ensureUniformFontSize(t,\"outside\"===w?U:j);var $=(H=P(r,z,W)).attr(\"transform\");if(H.attr(\"transform\",\"\"),q=l.bBox(H.node()),G=q.width,Y=q.height,H.attr(\"transform\",$),G<=0||Y<=0)return void H.remove()}var tt,et,rt=I.textangle;\"outside\"===w?(et=\"both\"===I.constraintext||\"outside\"===I.constraintext,tt=function(t,e,r,n,i,a){var o,s=!!a.isHorizontal,l=!!a.constrained,c=a.angle||0,u=i.width,f=i.height,h=Math.abs(e-t),p=Math.abs(n-r);o=s?p>2*_?_:0:h>2*_?_:0;var d=1;l&&(d=s?Math.min(1,p/f):Math.min(1,h/u));var g=S(c),m=E(i,g),v=(s?m.x:m.y)/2,y=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=(t+e)/2,w=(r+n)/2,T=0,A=0,M=s?k(e,t):k(r,n);s?(b=e-M*o,T=M*v):(w=n+M*o,A=-M*v);return{textX:y,textY:x,targetX:b,targetY:w,anchorX:T,anchorY:A,scale:d,rotate:g}}(s,c,f,p,q,{isHorizontal:O,constrained:et,angle:rt})):(et=\"both\"===I.constraintext||\"inside\"===I.constraintext,tt=L(s,c,f,p,q,{isHorizontal:O,constrained:et,angle:rt,anchor:I.insidetextanchor}));tt.fontSize=W.size,h(\"histogram\"===I.type?\"bar\":I.type,tt,C),R.transform=tt,A(H,C,m,v).attr(\"transform\",a.getTextTransform(tt))}(t,e,I,r,p,B,N,j,U,m,v),e.layerClipId&&l.hideOutsideRangePoint(c,I.select(\"text\"),w,C,f.xcalendar,f.ycalendar)}));var j=!1===f.cliponaxis;l.setClipUrl(c,j?null:e.layerClipId,t)}));c.getComponentMethod(\"errorbars\",\"plot\")(t,I,e,m)},toMoveInsideBar:L}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../components/fx/helpers\":402,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"./attributes\":648,\"./constants\":650,\"./helpers\":654,\"./style\":662,\"./uniform_text\":664,\"@plotly/d3\":58,\"fast-isnumeric\":190}],660:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){var a=e.c2p(n?t.s0:t.p0,!0),o=e.c2p(n?t.s1:t.p1,!0),s=r.c2p(n?t.p0:t.s0,!0),l=r.c2p(n?t.p1:t.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}e.exports=function(t,e){var r,i=t.cd,a=t.xaxis,o=t.yaxis,s=i[0].trace,l=\"funnel\"===s.type,c=\"h\"===s.orientation,u=[];if(!1===e)for(r=0;r1||0===i.bargap&&0===i.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr(\"shape-rendering\",\"crispEdges\")})),e.selectAll(\"g.points\").each((function(e){d(n.select(this),e[0].trace,t)})),s.getComponentMethod(\"errorbars\",\"style\")(e)},styleTextPoints:g,styleOnSelect:function(t,e,r){var 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.ensureUniformFontSize(r,m(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):(d(r,i,t),s.getComponentMethod(\"errorbars\",\"style\")(r))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:_,resizeText:l}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../lib\":503,\"../../registry\":638,\"./attributes\":648,\"./helpers\":654,\"./uniform_text\":664,\"@plotly/d3\":58}],663:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/helpers\").hasColorscale,a=t(\"../../components/colorscale/defaults\"),o=t(\"../../lib\").coercePattern;e.exports=function(t,e,r,s,l){var c=r(\"marker.color\",s),u=i(t,\"marker\");u&&a(t,e,l,r,{prefix:\"marker.\",cLetter:\"c\"}),r(\"marker.line.color\",n.defaultLine),i(t,\"marker.line\")&&a(t,e,l,r,{prefix:\"marker.line.\",cLetter:\"c\"}),r(\"marker.line.width\"),r(\"marker.opacity\"),o(r,\"marker.pattern\",c,u),r(\"selected.marker.color\"),r(\"unselected.marker.color\")}},{\"../../components/color\":366,\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503}],664:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\");function a(t){return\"_\"+t+\"Text_minsize\"}e.exports={recordMinTextSize:function(t,e,r){if(r.uniformtext.mode){var n=a(t),i=r.uniformtext.minsize,o=e.scale*e.fontSize;e.hide=o g.point\"}e.selectAll(s).each((function(t){var e=t.transform;e&&(e.scale=l&&e.hide?0:o/e.fontSize,n.select(this).select(\"text\").attr(\"transform\",i.getTextTransform(e)))}))}}}},{\"../../lib\":503,\"@plotly/d3\":58}],665:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../lib/extend\").extendFlat,a=t(\"../scatterpolar/attributes\"),o=t(\"../bar/attributes\");e.exports={r:a.r,theta:a.theta,r0:a.r0,dr:a.dr,theta0:a.theta0,dtheta:a.dtheta,thetaunit:a.thetaunit,base:i({},o.base,{}),offset:i({},o.offset,{}),width:i({},o.width,{}),text:i({},o.text,{}),hovertext:i({},o.hovertext,{}),marker:o.marker,hoverinfo:a.hoverinfo,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{\"../../lib/extend\":493,\"../../plots/template_attributes\":633,\"../bar/attributes\":648,\"../scatterpolar/attributes\":1e3}],666:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/helpers\").hasColorscale,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,m=0;mh.range[1]&&(x+=Math.PI);if(n.getClosest(c,(function(t){return g(y,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?m+Math.min(1,Math.abs(t.thetag1-t.thetag0)/v)-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.hovertemplate=u.hovertemplate,t.color=a(u,b),t.xLabelVal=t.yLabelVal=void 0,b.s<0&&(t.idealAlign=\"left\"),[t]}}},{\"../../components/fx\":406,\"../../lib\":503,\"../../plots/polar/helpers\":621,\"../bar/hover\":655,\"../scatterpolar/hover\":1004}],669:[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\"),formatLabels:t(\"../scatterpolar/format_labels\"),style:t(\"../bar/style\").style,styleOnSelect:t(\"../bar/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../bar/select\"),meta:{}}},{\"../../plots/polar\":622,\"../bar/select\":660,\"../bar/style\":662,\"../scatter/marker_colorbar\":944,\"../scatterpolar/format_labels\":1003,\"./attributes\":665,\"./calc\":666,\"./defaults\":667,\"./hover\":668,\"./layout_attributes\":670,\"./layout_defaults\":671,\"./plot\":672}],670:[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\"}}},{}],671:[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;l0?(c=o,u=l):(c=l,u=o);var f=[s.findEnclosingVertexAngles(c,t.vangles)[0],(c+u)/2,s.findEnclosingVertexAngles(u,t.vangles)[1]];return s.pathPolygonAnnulus(n,i,c,u,f,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(){var r=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),m=(p+d)/2;t.ct=[l.c2p(g*Math.cos(m)),c.c2p(g*Math.sin(m))],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,t)}))}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../plots/polar/helpers\":621,\"@plotly/d3\":58,\"fast-isnumeric\":190}],673:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../bar/attributes\"),a=t(\"../../components/color/attributes\"),o=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../lib/extend\").extendFlat,c=n.marker,u=c.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\"},dx:{valType:\"number\",editType:\"calc\"},dy:{valType:\"number\",editType:\"calc\"},xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,xhoverformat:o(\"x\"),yhoverformat:o(\"y\"),name:{valType:\"string\",editType:\"calc+clearAxisTypes\"},q1:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},median:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},q3:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},lowerfence:{valType:\"data_array\",editType:\"calc\"},upperfence:{valType:\"data_array\",editType:\"calc\"},notched:{valType:\"boolean\",editType:\"calc\"},notchwidth:{valType:\"number\",min:0,max:.5,dflt:.25,editType:\"calc\"},notchspan:{valType:\"data_array\",editType:\"calc\"},boxpoints:{valType:\"enumerated\",values:[\"all\",\"outliers\",\"suspectedoutliers\",!1],editType:\"calc\"},jitter:{valType:\"number\",min:0,max:1,editType:\"calc\"},pointpos:{valType:\"number\",min:-2,max:2,editType:\"calc\"},boxmean:{valType:\"enumerated\",values:[!0,\"sd\",!1],editType:\"calc\"},mean:{valType:\"data_array\",editType:\"calc\"},sd:{valType:\"data_array\",editType:\"calc\"},orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc+clearAxisTypes\"},quartilemethod:{valType:\"enumerated\",values:[\"linear\",\"exclusive\",\"inclusive\"],dflt:\"linear\",editType:\"calc\"},width:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},marker:{outliercolor:{valType:\"color\",dflt:\"rgba(0, 0, 0, 0)\",editType:\"style\"},symbol:l({},c.symbol,{arrayOk:!1,editType:\"plot\"}),opacity:l({},c.opacity,{arrayOk:!1,dflt:1,editType:\"style\"}),size:l({},c.size,{arrayOk:!1,editType:\"calc\"}),color:l({},c.color,{arrayOk:!1,editType:\"style\"}),line:{color:l({},u.color,{arrayOk:!1,dflt:a.defaultLine,editType:\"style\"}),width:l({},u.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,whiskerwidth:{valType:\"number\",min:0,max:1,dflt:.5,editType:\"calc\"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:n.selected.marker,editType:\"style\"},unselected:{marker:n.unselected.marker,editType:\"style\"},text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),hovertemplate:s({}),hoveron:{valType:\"flaglist\",flags:[\"boxes\",\"points\"],dflt:\"boxes+points\",editType:\"style\"}}},{\"../../components/color/attributes\":365,\"../../lib/extend\":493,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../bar/attributes\":648,\"../scatter/attributes\":926}],674:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../plots/cartesian/align_period\"),o=t(\"../../lib\"),s=t(\"../../constants/numerical\").BADNUM,l=o._;e.exports=function(t,e){var r,c,y,x,b,_,w,T=t._fullLayout,k=i.getFromId(t,e.xaxis||\"x\"),A=i.getFromId(t,e.yaxis||\"y\"),M=[],S=\"violin\"===e.type?\"_numViolins\":\"_numBoxes\";\"h\"===e.orientation?(y=k,x=\"x\",b=A,_=\"y\",w=!!e.yperiodalignment):(y=A,x=\"y\",b=k,_=\"x\",w=!!e.xperiodalignment);var E,L,C,P,I,O,z=function(t,e,r,i){var s,l=e+\"0\"in t,c=\"d\"+e in t;if(e in t||l&&c){var u=r.makeCalcdata(t,e);return[a(t,r,e,u).vals,u]}s=l?t[e+\"0\"]:\"name\"in t&&(\"category\"===r.type||n(t.name)&&-1!==[\"linear\",\"log\"].indexOf(r.type)||o.isDateTime(t.name)&&\"date\"===r.type)?t.name:i;for(var f=\"multicategory\"===r.type?r.r2c_just_indices(s):r.d2c(s,0,t[e+\"calendar\"]),h=t._length,p=new Array(h),d=0;dE.uf};if(e._hasPreCompStats){var U=e[x],V=function(t){return y.d2c((e[t]||[])[r])},H=1/0,q=-1/0;for(r=0;r=E.q1&&E.q3>=E.med){var Y=V(\"lowerfence\");E.lf=Y!==s&&Y<=E.q1?Y:p(E,C,P);var W=V(\"upperfence\");E.uf=W!==s&&W>=E.q3?W:d(E,C,P);var X=V(\"mean\");E.mean=X!==s?X:P?o.mean(C,P):(E.q1+E.q3)/2;var Z=V(\"sd\");E.sd=X!==s&&Z>=0?Z:P?o.stdev(C,P,E.mean):E.q3-E.q1,E.lo=g(E),E.uo=m(E);var J=V(\"notchspan\");J=J!==s&&J>0?J:v(E,P),E.ln=E.med-J,E.un=E.med+J;var K=E.lf,Q=E.uf;e.boxpoints&&C.length&&(K=Math.min(K,C[0]),Q=Math.max(Q,C[P-1])),e.notched&&(K=Math.min(K,E.ln),Q=Math.max(Q,E.un)),E.min=K,E.max=Q}else{var $;o.warn([\"Invalid input - make sure that q1 <= median <= q3\",\"q1 = \"+E.q1,\"median = \"+E.med,\"q3 = \"+E.q3].join(\"\\n\")),$=E.med!==s?E.med:E.q1!==s?E.q3!==s?(E.q1+E.q3)/2:E.q1:E.q3!==s?E.q3:0,E.med=$,E.q1=E.q3=$,E.lf=E.uf=$,E.mean=E.sd=$,E.ln=E.un=$,E.min=E.max=$}H=Math.min(H,E.min),q=Math.max(q,E.max),E.pts2=L.filter(j),M.push(E)}}e._extremes[y._id]=i.findExtremes(y,[H,q],{padded:!0})}else{var tt=y.makeCalcdata(e,x),et=function(t,e){for(var r=t.length,n=new Array(r+1),i=0;i=0&&it0){var ut,ft;if((E={}).pos=E[_]=B[r],L=E.pts=nt[r].sort(f),P=(C=E[x]=L.map(h)).length,E.min=C[0],E.max=C[P-1],E.mean=o.mean(C,P),E.sd=o.stdev(C,P,E.mean),E.med=o.interp(C,.5),P%2&&(lt||ct))lt?(ut=C.slice(0,P/2),ft=C.slice(P/2+1)):ct&&(ut=C.slice(0,P/2+1),ft=C.slice(P/2)),E.q1=o.interp(ut,.5),E.q3=o.interp(ft,.5);else E.q1=o.interp(C,.25),E.q3=o.interp(C,.75);E.lf=p(E,C,P),E.uf=d(E,C,P),E.lo=g(E),E.uo=m(E);var ht=v(E,P);E.ln=E.med-ht,E.un=E.med+ht,at=Math.min(at,E.ln),ot=Math.max(ot,E.un),E.pts2=L.filter(j),M.push(E)}e._extremes[y._id]=i.findExtremes(y,e.notched?tt.concat([at,ot]):tt,{padded:!0})}return function(t,e){if(o.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r0?(M[0].t={num:T[S],dPos:N,posLetter:_,valLetter:x,labels:{med:l(t,\"median:\"),min:l(t,\"min:\"),q1:l(t,\"q1:\"),q3:l(t,\"q3:\"),max:l(t,\"max:\"),mean:\"sd\"===e.boxmean?l(t,\"mean \\xb1 \\u03c3:\"):l(t,\"mean:\"),lf:l(t,\"lower fence:\"),uf:l(t,\"upper fence:\")}},T[S]++,M):[{t:{empty:!0}}]};var c={text:\"tx\",hovertext:\"htx\"};function u(t,e,r){for(var n in c)o.isArrayOrTypedArray(e[n])&&(Array.isArray(r)?o.isArrayOrTypedArray(e[n][r[0]])&&(t[c[n]]=e[n][r[0]][r[1]]):t[c[n]]=e[n][r])}function f(t,e){return t.v-e.v}function h(t){return t.v}function p(t,e,r){return 0===r?t.q1:Math.min(t.q1,e[Math.min(o.findBin(2.5*t.q1-1.5*t.q3,e,!0)+1,r-1)])}function d(t,e,r){return 0===r?t.q3:Math.max(t.q3,e[Math.max(o.findBin(2.5*t.q3-1.5*t.q1,e),0)])}function g(t){return 4*t.q1-3*t.q3}function m(t){return 4*t.q3-3*t.q1}function v(t,e){return 0===e?0:1.57*(t.q3-t.q1)/Math.sqrt(e)}},{\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/align_period\":551,\"../../plots/cartesian/axes\":554,\"fast-isnumeric\":190}],675:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/constraints\").getAxisGroup,o=[\"v\",\"h\"];function s(t,e,r,o){var s,l,c,u=e.calcdata,f=e._fullLayout,h=o._id,p=h.charAt(0),d=[],g=0;for(s=0;s1,b=1-f[t+\"gap\"],_=1-f[t+\"groupgap\"];for(s=0;s0){var q=E.pointpos,G=E.jitter,Y=E.marker.size/2,W=0;q+G>=0&&((W=V*(q+G))>M?(H=!0,j=Y,B=W):W>R&&(j=Y,B=M)),W<=M&&(B=M);var X=0;q-G<=0&&((X=-V*(q-G))>S?(H=!0,U=Y,N=X):X>F&&(U=Y,N=S)),X<=S&&(N=S)}else B=M,N=S;var Z=new Array(c.length);for(l=0;l0?(m=\"v\",v=x>0?Math.min(_,b):Math.min(b)):x>0?(m=\"h\",v=Math.min(_)):v=0;if(v){e._length=v;var S=r(\"orientation\",m);e._hasPreCompStats?\"v\"===S&&0===x?(r(\"x0\",0),r(\"dx\",1)):\"h\"===S&&0===y&&(r(\"y0\",0),r(\"dy\",1)):\"v\"===S&&0===x?r(\"x0\"):\"h\"===S&&0===y&&r(\"y0\"),i.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\"],a)}else e.visible=!1}function f(t,e,r,i){var a=i.prefix,o=n.coerce2(t,e,c,\"marker.outliercolor\"),s=r(\"marker.line.outliercolor\"),l=\"outliers\";e._hasPreCompStats?l=\"all\":(o||s)&&(l=\"suspectedoutliers\");var u=r(a+\"points\",l);u?(r(\"jitter\",\"all\"===u?.3:0),r(\"pointpos\",\"all\"===u?-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\"===u&&(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\"),r(\"hovertext\")):delete e.marker;var f=r(\"hoveron\");\"all\"!==f&&-1===f.indexOf(\"points\")||r(\"hovertemplate\"),n.coerceSelectionMarkerOpacity(e,r)}e.exports={supplyDefaults:function(t,e,r,i){function s(r,i){return n.coerce(t,e,c,r,i)}if(u(t,e,s,i),!1!==e.visible){o(t,e,i,s),s(\"xhoverformat\"),s(\"yhoverformat\");var l=e._hasPreCompStats;l&&(s(\"lowerfence\"),s(\"upperfence\")),s(\"line.color\",(t.marker||{}).color||r),s(\"line.width\"),s(\"fillcolor\",a.addOpacity(e.line.color,.5));var h=!1;if(l){var p=s(\"mean\"),d=s(\"sd\");p&&p.length&&(h=!0,d&&d.length&&(h=\"sd\"))}s(\"boxmean\",h),s(\"whiskerwidth\"),s(\"width\"),s(\"quartilemethod\");var g=!1;if(l){var m=s(\"notchspan\");m&&m.length&&(g=!0)}else n.validate(t.notchwidth,c.notchwidth)&&(g=!0);s(\"notched\",g)&&s(\"notchwidth\"),f(t,e,s,{prefix:\"box\"})}},crossTraceDefaults:function(t,e){var r,i;function a(t){return n.coerce(i._input,i,c,t)}for(var o=0;ot.lo&&(x.so=!0)}return a}));h.enter().append(\"path\").classed(\"point\",!0),h.exit().remove(),h.call(a.translatePoints,o,s)}function l(t,e,r,a){var o,s,l=e.val,c=e.pos,u=!!c.rangebreaks,f=a.bPos,h=a.bPosPxOffset||0,p=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var d=t.selectAll(\"path.mean\").data(\"box\"===r.type&&r.boxmean||\"violin\"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);d.enter().append(\"path\").attr(\"class\",\"mean\").style({fill:\"none\",\"vector-effect\":\"non-scaling-stroke\"}),d.exit().remove(),d.each((function(t){var e=c.c2l(t.pos+f,!0),i=c.l2p(e-o)+h,a=c.l2p(e+s)+h,d=u?(i+a)/2:c.l2p(e)+h,g=l.c2p(t.mean,!0),m=l.c2p(t.mean-t.sd,!0),v=l.c2p(t.mean+t.sd,!0);\"h\"===r.orientation?n.select(this).attr(\"d\",\"M\"+g+\",\"+i+\"V\"+a+(\"sd\"===p?\"m0,0L\"+m+\",\"+d+\"L\"+g+\",\"+i+\"L\"+v+\",\"+d+\"Z\":\"\")):n.select(this).attr(\"d\",\"M\"+i+\",\"+g+\"H\"+a+(\"sd\"===p?\"m0,0L\"+d+\",\"+m+\"L\"+i+\",\"+g+\"L\"+d+\",\"+v+\"Z\":\"\"))}))}e.exports={plot:function(t,e,r,a){var c=e.xaxis,u=e.yaxis;i.makeTraceGroups(a,r,\"trace boxes\").each((function(t){var e,r,i=n.select(this),a=t[0],f=a.t,h=a.trace;(f.wdPos=f.bdPos*h.whiskerwidth,!0!==h.visible||f.empty)?i.remove():(\"h\"===h.orientation?(e=u,r=c):(e=c,r=u),o(i,{pos:e,val:r},h,f),s(i,{x:c,y:u},h,f),l(i,{pos:e,val:r},h,f))}))},plotBoxAndWhiskers:o,plotPoints:s,plotBoxMean:l}},{\"../../components/drawing\":388,\"../../lib\":503,\"@plotly/d3\":58}],683:[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=10)return null;for(var i=1/0,a=-1/0,o=e.length,s=0;s0?Math.floor:Math.ceil,I=L>0?Math.ceil:Math.floor,O=L>0?Math.min:Math.max,z=L>0?Math.max:Math.min,D=P(S+C),R=I(E-C),F=[[f=M(S)]];for(a=D;a*L=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}},{}],697:[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,m,v,y,x=t[\"_\"+e],b=t[e+\"axis\"],_=b._gridlines=[],w=b._minorgridlines=[],T=b._boundarylines=[],k=t[\"_\"+r],A=t[r+\"axis\"];\"array\"===b.tickmode&&(b.tickvals=x.slice());var M=t._xctrl,S=t._yctrl,E=M[0].length,L=M.length,C=t._a.length,P=t._b.length;n.prepTicks(b),\"array\"===b.tickmode&&delete b.tickvals;var I=b.smoothing?3:1;function O(n){var i,a,o,s,l,c,u,f,p,d,g,m,v=[],y=[],x={};if(\"b\"===e)for(a=t.b2j(n),o=Math.floor(Math.max(0,Math.min(P-2,a))),s=a-o,x.length=P,x.crossLength=C,x.xy=function(e){return t.evalxy([],e,a)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},i=0;i0&&(p=t.dxydi([],i-1,o,0,s),v.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),d=t.dxydi([],i-1,o,1,s),v.push(f[0]-d[0]/3),y.push(f[1]-d[1]/3)),v.push(f[0]),y.push(f[1]),l=f;else for(i=t.a2i(n),c=Math.floor(Math.max(0,Math.min(C-2,i))),u=i-c,x.length=C,x.crossLength=P,x.xy=function(e){return t.evalxy([],i,e)},x.dxy=function(e,r){return t.dxydj([],c,e,u,r)},a=0;a0&&(g=t.dxydj([],c,a-1,u,0),v.push(l[0]+g[0]/3),y.push(l[1]+g[1]/3),m=t.dxydj([],c,a-1,u,1),v.push(f[0]-m[0]/3),y.push(f[1]-m[1]/3)),v.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=v,x.y=y,x.smoothing=A.smoothing,x}function z(n){var i,a,o,s,l,c=[],u=[],f={};if(f.length=x.length,f.crossLength=k.length,\"b\"===e)for(o=Math.max(0,Math.min(P-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;ix.length-1||_.push(i(z(o),{color:b.gridcolor,width:b.gridwidth}));for(h=u;hx.length-1||g<0||g>x.length-1))for(m=x[s],v=x[g],a=0;ax[x.length-1]||w.push(i(O(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&T.push(i(z(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(z(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(O(p),{color:b.gridcolor,width:b.gridwidth}));for(h=u-1;hx[x.length-1]||w.push(i(O(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&T.push(i(O(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(O(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{\"../../lib/extend\":493,\"../../plots/cartesian/axes\":554}],698:[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;re.length&&(t=t.slice(0,e.length)):t=[],i=0;i90&&(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(n,e,r),offsetMultplier:c}}},{}],712:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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=c.strRotate,f=c.strTranslate,h=t(\"../../constants/alignment\");function p(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 d(t,e,r,a,o,c,h,p){var d=c.selectAll(\"text.\"+p).data(h);d.enter().append(\"text\").classed(p,!0);var g=0,m={};return d.each((function(o,c){var h;if(\"auto\"===o.axis.tickangle)h=s(a,e,r,o.xy,o.dxy);else{var p=(o.axis.tickangle+180)*Math.PI/180;h=s(a,e,r,o.xy,[Math.cos(p),Math.sin(p)])}c||(m={angle:h.angle,flip:h.flip});var d=(o.endAnchor?-1:1)*h.flip,v=n.select(this).attr({\"text-anchor\":d>0?\"start\":\"end\",\"data-notex\":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,t),y=i.bBox(this);v.attr(\"transform\",f(h.p[0],h.p[1])+u(h.angle)+f(o.axis.labelpadding*d,.3*y.height)),g=Math.max(g,y.width+o.axis.labelpadding)})),d.exit().remove(),m.maxExtent=g,m}e.exports=function(t,e,r,i){var l=e.xaxis,u=e.yaxis,f=t._fullLayout._clips;c.makeTraceGroups(i,r,\"trace\").each((function(e){var r=n.select(this),i=e[0],h=i.trace,g=h.aaxis,m=h.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\",h.opacity),p(l,u,x,g,\"a\",g._gridlines),p(l,u,x,m,\"b\",m._gridlines),p(l,u,y,g,\"a\",g._minorgridlines),p(l,u,y,m,\"b\",m._minorgridlines),p(l,u,b,g,\"a-boundary\",g._boundarylines),p(l,u,b,m,\"b-boundary\",m._boundarylines);var w=d(t,l,u,h,i,_,g._labels,\"a-label\"),T=d(t,l,u,h,i,_,m._labels,\"b-label\");!function(t,e,r,n,i,a,o,l){var u,f,h,p,d=c.aggNums(Math.min,null,r.a),g=c.aggNums(Math.max,null,r.a),m=c.aggNums(Math.min,null,r.b),y=c.aggNums(Math.max,null,r.b);u=.5*(d+g),f=m,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)));v(t,e,r,n,h,p,r.aaxis,i,a,o,\"a-title\"),u=d,f=.5*(m+y),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)));v(t,e,r,n,h,p,r.baxis,i,a,l,\"b-title\")}(t,_,h,i,l,u,w,T),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;f90&&y<270,b=n.select(this);b.text(h.title.text).call(l.convertToTspans,t),x&&(_=(-l.lineCount(b)+m)*g*a-_),b.attr(\"transform\",f(e.p[0],e.p[1])+u(e.angle)+f(0,_)).attr(\"text-anchor\",\"middle\").call(i.font,h.title.font)})),b.exit().remove()}},{\"../../components/drawing\":388,\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"./makepath\":709,\"./map_1d_array\":710,\"./orient_text\":711,\"@plotly/d3\":58}],713:[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],m=r[u-1],v=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=v*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;p-=x,d+=x,g-=b,m+=b,t.isVisible=function(t,e){return t>p&&tg&&ed||em},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&&(ne[c-1]|ir[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,m=0,v=[];ne[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)))),ir[u-1]?(p=u-2,d=1,m=(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(v,f,p,h,d),l[0]+=v[0]*g,l[1]+=v[1]*g),m&&(t.dxydj(v,f,p,h,d),l[0]+=v[0]*m,l[1]+=v[1]*m)}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=v*(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\":523,\"./compute_control_points\":701,\"./constants\":702,\"./create_i_derivative_evaluator\":703,\"./create_j_derivative_evaluator\":704,\"./create_spline_evaluator\":705}],714:[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),e0&&void 0!==(n=t[r-1][e])&&(a++,i+=n),r0&&a0&&i1e-5);return n.log(\"Smoother converged to\",k,\"after\",A,\"iterations\"),t}},{\"../../lib\":503}],715:[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\":503}],716:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../scattergeo/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../plots/attributes\"),s=t(\"../../components/color/attributes\").defaultLine,l=t(\"../../lib/extend\").extendFlat,c=i.marker.line;e.exports=l({locations:{valType:\"data_array\",editType:\"calc\"},locationmode:i.locationmode,z:{valType:\"data_array\",editType:\"calc\"},geojson:l({},i.geojson,{}),featureidkey:i.featureidkey,text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),marker:{line:{color:l({},c.color,{dflt:s}),width:l({},c.width,{dflt:1}),editType:\"calc\"},opacity:{valType:\"number\",arrayOk:!0,min:0,max:1,dflt:1,editType:\"style\"},editType:\"calc\"},selected:{marker:{opacity:i.selected.marker.opacity,editType:\"plot\"},editType:\"plot\"},unselected:{marker:{opacity:i.unselected.marker.opacity,editType:\"plot\"},editType:\"plot\"},hoverinfo:l({},o.hoverinfo,{editType:\"calc\",flags:[\"location\",\"z\",\"text\",\"name\"]}),hovertemplate:n(),showlegend:l({},o.showlegend,{dflt:!1})},a(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))},{\"../../components/color/attributes\":365,\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/template_attributes\":633,\"../scattergeo/attributes\":968}],717:[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\");function l(t){return t&&\"string\"==typeof t}e.exports=function(t,e){var r,c=e._length,u=new Array(c);r=e.geojson?function(t){return l(t)||n(t)}:l;for(var f=0;f\")}(t,f,o),[t]}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"./attributes\":716}],721:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../heatmap/colorbar\"),calc:t(\"./calc\"),calcGeoJSON:t(\"./plot\").calcGeoJSON,plot:t(\"./plot\").plot,style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"choropleth\",basePlotModule:t(\"../../plots/geo\"),categories:[\"geo\",\"noOpacity\",\"showLegend\"],meta:{}}},{\"../../plots/geo\":589,\"../heatmap/colorbar\":795,\"./attributes\":716,\"./calc\":717,\"./defaults\":718,\"./event_data\":719,\"./hover\":720,\"./plot\":722,\"./select\":723,\"./style\":724}],722:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../lib/geo_location_utils\"),o=t(\"../../lib/topojson_utils\").getTopojsonFeatures,s=t(\"../../plots/cartesian/autorange\").findExtremes,l=t(\"./style\").style;e.exports={calcGeoJSON:function(t,e){for(var r=t[0].trace,n=e[r.geo],i=n._subplot,l=r.locationmode,c=r._length,u=\"geojson-id\"===l?a.extractTraceFeature(t):o(r,i.topojson),f=[],h=[],p=0;p=0;n--){var i=r[n].id;if(\"string\"==typeof i&&0===i.indexOf(\"water\"))for(var a=n+1;a=0;r--)t.removeLayer(e[r][1])},s.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new o(t,r.uid),a=i.sourceId,s=n(e),l=i.below=t.belowLookup[\"trace-\"+r.uid];return t.map.addSource(a,{type:\"geojson\",data:s.geojson}),i._addLayers(s,l),e[0].trace._glTrace=i,i}},{\"../../plots/mapbox/constants\":611,\"./convert\":726}],730:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../mesh3d/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,c={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\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:a({editType:\"calc\"},{keys:[\"norm\"]}),uhoverformat:i(\"u\",1),vhoverformat:i(\"v\",1),whoverformat:i(\"w\",1),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),showlegend:l({},s.showlegend,{dflt:!1})};l(c,n(\"\",{colorAttr:\"u/v/w norm\",showScaleDflt:!0,editTypeOverride:\"calc\"}));[\"opacity\",\"lightposition\",\"lighting\"].forEach((function(t){c[t]=o[t]})),c.hoverinfo=l({},s.hoverinfo,{editType:\"calc\",flags:[\"x\",\"y\",\"z\",\"u\",\"v\",\"w\",\"norm\",\"text\",\"name\"],dflt:\"x+y+z+norm+text+name\"}),c.transforms=void 0,e.exports=c},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../mesh3d/attributes\":867}],731:[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;co.level||o.starts.length&&a===o.level)}break;case\"constraint\":if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,l=n.y.length,c=-1/0,u=1/0;for(r=0;r\":p>c&&(n.prefixBoundary=!0);break;case\"<\":(pc||n.starts.length&&h===u)&&(n.prefixBoundary=!0);break;case\"][\":f=Math.min(p[0],p[1]),h=Math.max(p[0],p[1]),fc&&(n.prefixBoundary=!0)}}}},{}],738:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale\"),i=t(\"./make_color_map\"),a=t(\"./end_plus\");e.exports={min:\"zmin\",max:\"zmax\",calc:function(t,e,r){var o=e.contours,s=e.line,l=o.size||1,c=o.coloring,u=i(e,{isColorbar:!0});if(\"heatmap\"===c){var f=n.extractOpts(e);r._fillgradient=f.reversescale?n.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else\"fill\"===c&&(r._fillcolor=u);r._line={color:\"lines\"===c?u:s.color,width:!1!==o.showlines?s.width:0,dash:s.dash},r._levels={start:o.start,end:a(o),size:l}}}},{\"../../components/colorscale\":378,\"./end_plus\":746,\"./make_color_map\":751}],739:[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}}},{}],740:[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,m=r(\"contours.operation\");(g._operation=c[m],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),\"=\"===m?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\":366,\"../../constants/filter_ops\":475,\"./label_defaults\":750,\"fast-isnumeric\":190}],741:[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\":475,\"fast-isnumeric\":190}],742:[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\")}},{}],743:[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),starts:n.extendDeep([],t.starts)})}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;r1e3){n.warn(\"Too many contours, clipping at 1000\",t);break}return l}},{\"../../lib\":503,\"./constraint_mapping\":741,\"./end_plus\":746}],746:[function(t,e,r){\"use strict\";e.exports=function(t){return t.end+t.size/1e6}},{}],747:[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])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]}(f,r,e),p=[s(t,e,[-h[0],-h[1]])],d=t.z.length,g=t.z[0].length,m=e.slice(),v=h.slice();for(c=0;c<1e4;c++){if(f>20?(f=i.CHOOSESADDLE[f][(h[0]||h[1])<0?0:1],t.crossings[u]=i.SADDLEREMAINDER[f]):delete t.crossings[u],!(h=i.NEWDELTA[f])){n.log(\"Found bad marching index:\",f,e,t.level);break}p.push(s(t,e,h)),e[0]+=h[0],e[1]+=h[1],u=e.join(\",\"),a(p[p.length-1],p[p.length-2],o,l)&&p.pop();var y=h[0]&&(e[0]<0||e[0]>g-2)||h[1]&&(e[1]<0||e[1]>d-2);if(e[0]===m[0]&&e[1]===m[1]&&h[0]===v[0]&&h[1]===v[1]||r&&y)break;f=t.crossings[u]}1e4===c&&n.log(\"Infinite loop in contour?\");var x,b,_,w,T,k,A,M,S,E,L,C,P,I,O,z=a(p[0],p[p.length-1],o,l),D=0,R=.2*t.smoothing,F=[],B=0;for(c=1;c=B;c--)if((x=F[c])=B&&x+F[b]M&&S--,t.edgepaths[S]=L.concat(p,E));break}V||(t.edgepaths[M]=p.concat(E))}for(M=0;Mt?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=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;hn.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;b2*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.fontSize,a=e.width+i/3,o=Math.max(0,e.height-i/3),s=t.x,l=t.y,c=t.theta,u=Math.sin(c),f=Math.cos(c),h=function(t,e){return[s+t*f-e*u,l+t*u+e*f]},p=[h(-a/2,-o/2),h(-a/2,o/2),h(a/2,o/2),h(a/2,-o/2)];r.push({text:e.text,x:s,y:l,dy:e.dy,theta:c,level:e.level,width:a,height:o}),n.push(p)},r.drawLabels=function(t,e,r,a,o){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(s.convertToTspans,r)})),o){for(var c=\"\",u=0;ur.end&&(r.start=r.end=(r.start+r.end)/2),t._input.contours||(t._input.contours={}),i.extendFlat(t._input.contours,{start:r.start,end:r.end,size:r.size}),t._input.autocontour=!0}else if(\"constraint\"!==r.type){var c,u=r.start,f=r.end,h=t._input.contours;if(u>f&&(r.start=h.start=f,f=r.end=h.end=u,u=r.start),!(r.size>0))c=u===f?1:a(u,f,t.ncontours).dtick,h.size=r.size=c}}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554}],755:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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\":388,\"../heatmap/style\":805,\"./make_color_map\":751,\"@plotly/d3\":58}],756:[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\":376,\"./label_defaults\":750}],757:[function(t,e,r){\"use strict\";var n=t(\"../heatmap/attributes\"),i=t(\"../contour/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../lib/extend\").extendFlat,s=i.contours;e.exports=o({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,hovertext:n.hovertext,transpose:n.transpose,atype:n.xtype,btype:n.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:s.type,start:s.start,end:s.end,size:s.size,coloring:{valType:\"enumerated\",values:[\"fill\",\"lines\",\"none\"],dflt:\"fill\",editType:\"calc\"},showlines:s.showlines,showlabels:s.showlabels,labelfont:s.labelfont,labelformat:s.labelformat,operation:s.operation,value:s.value,editType:\"calc\",impliedEdits:{autocontour:!1}},line:{color:i.line.color,width:i.line.width,dash:i.line.dash,smoothing:i.line.smoothing,editType:\"plot\"},transforms:void 0},a(\"\",{cLetter:\"z\",autoColorDflt:!1}))},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../contour/attributes\":735,\"../heatmap/attributes\":792}],758:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\"),i=t(\"../../lib\"),a=t(\"../heatmap/convert_column_xyz\"),o=t(\"../heatmap/clean_2d_array\"),s=t(\"../heatmap/interp2d\"),l=t(\"../heatmap/find_empties\"),c=t(\"../heatmap/make_bound_array\"),u=t(\"./defaults\"),f=t(\"../carpet/lookup_carpetid\"),h=t(\"../contour/set_contours\");e.exports=function(t,e){var r=e._carpetTrace=f(t,e);if(r&&r.visible&&\"legendonly\"!==r.visible){if(!e.a||!e.b){var p=t.data[r.index],d=t.data[e.index];d.a||(d.a=p.a),d.b||(d.b=p.b),u(d,e,e._defaultColor,t._fullLayout)}var g=function(t,e){var r,u,f,h,p,d,g,m=e._carpetTrace,v=m.aaxis,y=m.baxis;v._minDtick=0,y._minDtick=0,i.isArray1D(e.z)&&a(e,v,y,\"a\",\"b\",[\"z\"]);r=e._a=e._a||e.a,h=e._b=e._b||e.b,r=r?v.makeCalcdata(e,\"_a\"):[],h=h?y.makeCalcdata(e,\"_b\"):[],u=e.a0||0,f=e.da||1,p=e.b0||0,d=e.db||1,g=e._z=o(e._z||e.z,e.transpose),e._emptypoints=l(g),s(g,e._emptypoints);var x=i.maxRowLength(g),b=\"scaled\"===e.xtype?\"\":r,_=c(e,b,u,f,x,v),w=\"scaled\"===e.ytype?\"\":h,T=c(e,w,p,d,g.length,y),k={a:_,b:T,z:g};\"levels\"===e.contours.type&&\"none\"!==e.contours.coloring&&n(t,e,{vals:g,containerStr:\"\",cLetter:\"z\"});return[k]}(t,e);return h(e,e._z),g}}},{\"../../components/colorscale/calc\":374,\"../../lib\":503,\"../carpet/lookup_carpetid\":708,\"../contour/set_contours\":754,\"../heatmap/clean_2d_array\":794,\"../heatmap/convert_column_xyz\":796,\"../heatmap/find_empties\":798,\"../heatmap/interp2d\":801,\"../heatmap/make_bound_array\":803,\"./defaults\":759}],759:[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\":503,\"../contour/constraint_defaults\":740,\"../contour/contours_defaults\":742,\"../contour/style_defaults\":756,\"../heatmap/xyz_defaults\":807,\"./attributes\":757}],760:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../contour/colorbar\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../contour/style\"),moduleType:\"trace\",name:\"contourcarpet\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"carpet\",\"contour\",\"symbols\",\"showLegend\",\"hasLines\",\"carpetDependent\",\"noHover\",\"noSortingByValue\"],meta:{}}},{\"../../plots/cartesian\":568,\"../contour/colorbar\":738,\"../contour/style\":755,\"./attributes\":757,\"./calc\":758,\"./defaults\":759,\"./plot\":761}],761:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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(\"../contour/empty_pathinfo\"),d=t(\"../contour/close_boundaries\"),g=t(\"../carpet/lookup_carpetid\"),m=t(\"../carpet/axis_aligned_line\");function v(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 y(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function x(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,b){var _=e.xaxis,w=e.yaxis;s.makeTraceGroups(b,r,\"contour\").each((function(r){var b=n.select(this),T=r[0],k=T.trace,A=k._carpetTrace=g(t,k),M=t.calcdata[A.index][0];if(A.visible&&\"legendonly\"!==A.visible){var S=T.a,E=T.b,L=k.contours,C=p(L,e,T),P=\"constraint\"===L.type,I=L._operation,O=P?\"=\"===I?\"lines\":\"fill\":L.coloring,z=[[S[0],E[E.length-1]],[S[S.length-1],E[E.length-1]],[S[S.length-1],E[0]],[S[0],E[0]]];l(C);var D=1e-8*(S[S.length-1]-S[0]),R=1e-8*(E[E.length-1]-E[0]);c(C,D,R);var F,B,N,j,U=C;\"constraint\"===L.type&&(U=h(C,I)),function(t,e){var r,n,i,a,o,s,l,c,u;for(r=0;r=0;j--)F=M.clipsegments[j],B=i([],F.x,_.c2p),N=i([],F.y,w.c2p),B.reverse(),N.reverse(),V.push(a(B,N,F.bicubic));var H=\"M\"+V.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=0&&(h=L,d=g):Math.abs(f[1]-h[1])=0&&(h=L,d=g):s.log(\"endpt to newendpt is not vert. or horz.\",f,h,L)}if(d>=0)break;y+=S(f,h),f=h}if(d===e.edgepaths.length){s.log(\"unclosed perimeter path\");break}u=d,(b=-1===x.indexOf(u))&&(u=x[0],y+=S(f,h)+\"Z\",f=null)}for(u=0;um&&(n.max=m);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/I),f.LABELMAX),a=0;a0?+p[u]:0),f.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:v},properties:y})}}var b=o.extractOpts(e),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],T=[\"interpolate\",[\"linear\"],[\"heatmap-density\"],0,a.opacity(w)<1?w:a.addOpacity(w,0)];for(u=1;u<_.length;u++)T.push(_[u][0],_[u][1]);var k=[\"interpolate\",[\"linear\"],[\"get\",\"z\"],b.min,0,b.max,1];return i.extendFlat(c.heatmap.paint,{\"heatmap-weight\":d?k:1/(b.max-b.min),\"heatmap-color\":T,\"heatmap-radius\":g?{type:\"identity\",property:\"r\"}:e.radius,\"heatmap-opacity\":e.opacity}),c.geojson={type:\"FeatureCollection\",features:f},c.heatmap.layout.visibility=\"visible\",c}},{\"../../components/color\":366,\"../../components/colorscale\":378,\"../../constants/numerical\":479,\"../../lib\":503,\"../../lib/geojson_utils\":497,\"fast-isnumeric\":190}],765:[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(\"lon\")||[],c=s(\"lat\")||[],u=Math.min(l.length,c.length);u?(e._length=u,s(\"z\"),s(\"radius\"),s(\"below\"),s(\"text\"),s(\"hovertext\"),s(\"hovertemplate\"),i(t,e,o,s,{prefix:\"\",cLetter:\"z\"})):e.visible=!1}},{\"../../components/colorscale/defaults\":376,\"../../lib\":503,\"./attributes\":762}],766:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.z=e.z,t}},{}],767:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../scattermapbox/hover\").hoverPoints,a=t(\"../scattermapbox/hover\").getExtraText;e.exports=function(t,e,r){var o=i(t,e,r);if(o){var s=o[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,\"z\"in u){var f=s.subplot.mockAxis;s.z=u.z,s.zLabel=n.tickText(f,f.c2l(u.z),\"hover\").text}return s.extraText=a(c,u,l[0].t.labels),[s]}}},{\"../../plots/cartesian/axes\":554,\"../scattermapbox/hover\":996}],768:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../heatmap/colorbar\"),formatLabels:t(\"../scattermapbox/format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),getBelow:function(t,e){for(var r=e.getMapLayers(),n=0;n=0;r--)t.removeLayer(e[r][1])},o.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new a(t,r.uid),o=i.sourceId,s=n(e),l=i.below=t.belowLookup[\"trace-\"+r.uid];return t.map.addSource(o,{type:\"geojson\",data:s.geojson}),i._addLayers(s,l),i}},{\"../../plots/mapbox/constants\":611,\"./convert\":764}],770:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){for(var r=0;r\"),l.color=function(t,e){var r=t.marker,i=e.mc||r.color,a=e.mlc||r.line.color,o=e.mlw||r.line.width;if(n(i))return i;if(n(a)&&o)return a}(u,h),[l]}}},{\"../../components/color\":366,\"../../lib\":503,\"../bar/hover\":655}],778:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\"),plot:t(\"./plot\"),style:t(\"./style\").style,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"../bar/select\"),moduleType:\"trace\",name:\"funnel\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"../bar/select\":660,\"./attributes\":771,\"./calc\":772,\"./cross_trace_calc\":774,\"./defaults\":775,\"./event_data\":776,\"./hover\":777,\"./layout_attributes\":779,\"./layout_defaults\":780,\"./plot\":781,\"./style\":782}],779:[function(t,e,r){\"use strict\";e.exports={funnelmode:{valType:\"enumerated\",values:[\"stack\",\"group\",\"overlay\"],dflt:\"stack\",editType:\"calc\"},funnelgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},funnelgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],780:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s path\").each((function(t){if(!t.isBlank){var e=s.marker;n.select(this).call(a.fill,t.mc||e.color).call(a.stroke,t.mlc||e.line.color).call(i.dashLine,e.line.dash,t.mlw||e.line.width).style(\"opacity\",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(\".regions\").each((function(){n.select(this).selectAll(\"path\").style(\"stroke-width\",0).call(a.fill,s.connector.fillcolor)})),r.selectAll(\".lines\").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll(\"path\"),t.width,t.color,t.dash)}))}))}}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../constants/interactions\":478,\"../bar/style\":662,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],783:[function(t,e,r){\"use strict\";var n=t(\"../pie/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/domain\").attributes,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../../plots/template_attributes\").texttemplateAttrs,l=t(\"../../lib/extend\").extendFlat;e.exports={labels:n.labels,label0:n.label0,dlabel:n.dlabel,values:n.values,marker:{colors:n.marker.colors,line:{color:l({},n.marker.line.color,{dflt:null}),width:l({},n.marker.line.width,{dflt:1}),editType:\"calc\"},editType:\"calc\"},text:n.text,hovertext:n.hovertext,scalegroup:l({},n.scalegroup,{}),textinfo:l({},n.textinfo,{flags:[\"label\",\"text\",\"value\",\"percent\"]}),texttemplate:s({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),hoverinfo:l({},i.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:o({},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),textposition:l({},n.textposition,{values:[\"inside\",\"none\"],dflt:\"inside\"}),textfont:n.textfont,insidetextfont:n.insidetextfont,title:{text:n.title.text,font:n.title.font,position:l({},n.title.position,{values:[\"top left\",\"top center\",\"top right\"],dflt:\"top center\"}),editType:\"plot\"},domain:a({name:\"funnelarea\",trace:!0,editType:\"calc\"}),aspectratio:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},baseratio:{valType:\"number\",min:0,max:1,dflt:.333,editType:\"plot\"}}},{\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/domain\":584,\"../../plots/template_attributes\":633,\"../pie/attributes\":900}],784:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"funnelarea\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":619}],785:[function(t,e,r){\"use strict\";var n=t(\"../pie/calc\");e.exports={calc:function(t,e){return n.calc(t,e)},crossTraceCalc:function(t){n.crossTraceCalc(t,{type:\"funnelarea\"})}}},{\"../pie/calc\":902}],786:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../plots/domain\").defaults,o=t(\"../bar/defaults\").handleText,s=t(\"../pie/defaults\").handleLabelsAndValues;e.exports=function(t,e,r,l){function c(r,a){return n.coerce(t,e,i,r,a)}var u=c(\"labels\"),f=c(\"values\"),h=s(u,f),p=h.len;if(e._hasLabels=h.hasLabels,e._hasValues=h.hasValues,!e._hasLabels&&e._hasValues&&(c(\"label0\"),c(\"dlabel\")),p){e._length=p,c(\"marker.line.width\")&&c(\"marker.line.color\",l.paper_bgcolor),c(\"marker.colors\"),c(\"scalegroup\");var d,g=c(\"text\"),m=c(\"texttemplate\");if(m||(d=c(\"textinfo\",Array.isArray(g)?\"text+percent\":\"percent\")),c(\"hovertext\"),c(\"hovertemplate\"),m||d&&\"none\"!==d){var v=c(\"textposition\");o(t,e,l,c,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}a(e,l,c),c(\"title.text\")&&(c(\"title.position\"),n.coerceFont(c,\"title.font\",l.font)),c(\"aspectratio\"),c(\"baseratio\")}else e.visible=!1}},{\"../../lib\":503,\"../../plots/domain\":584,\"../bar/defaults\":652,\"../pie/defaults\":903,\"./attributes\":783}],787:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"funnelarea\",basePlotModule:t(\"./base_plot\"),categories:[\"pie-like\",\"funnelarea\",\"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\"),style:t(\"./style\"),styleOne:t(\"../pie/style_one\"),meta:{}}},{\"../pie/style_one\":911,\"./attributes\":783,\"./base_plot\":784,\"./calc\":785,\"./defaults\":786,\"./layout_attributes\":788,\"./layout_defaults\":789,\"./plot\":790,\"./style\":791}],788:[function(t,e,r){\"use strict\";var n=t(\"../pie/layout_attributes\").hiddenlabels;e.exports={hiddenlabels:n,funnelareacolorway:{valType:\"colorlist\",editType:\"calc\"},extendfunnelareacolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{\"../pie/layout_attributes\":907}],789:[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(\"funnelareacolorway\",e.colorway),r(\"extendfunnelareacolors\")}},{\"../../lib\":503,\"./layout_attributes\":788}],790:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/drawing\"),a=t(\"../../lib\"),o=a.strScale,s=a.strTranslate,l=t(\"../../lib/svg_text_utils\"),c=t(\"../bar/plot\").toMoveInsideBar,u=t(\"../bar/uniform_text\"),f=u.recordMinTextSize,h=u.clearMinTextSize,p=t(\"../pie/helpers\"),d=t(\"../pie/plot\"),g=d.attachFxHandlers,m=d.determineInsideTextFont,v=d.layoutAreas,y=d.prerenderTitles,x=d.positionTitleOutside,b=d.formatSliceLabel;function _(t,e){return\"l\"+(e[0]-t[0])+\",\"+(e[1]-t[1])}e.exports=function(t,e){var r=t._fullLayout;h(\"funnelarea\",r),y(e,t),v(e,r._size),a.makeTraceGroups(r._funnelarealayer,e,\"trace\").each((function(e){var u=n.select(this),h=e[0],d=h.trace;!function(t){if(!t.length)return;var e=t[0],r=e.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a,o=Math.pow(i,2),s=e.vTotal,l=s,c=s*o/(1-o)/s;function u(){var t,e={x:t=Math.sqrt(c),y:-t};return[e.x,e.y]}var f,h,p=[];for(p.push(u()),f=t.length-1;f>-1;f--)if(!(h=t[f]).hidden){var d=h.v/l;c+=d,p.push(u())}var g=1/0,m=-1/0;for(f=0;f-1;f--)if(!(h=t[f]).hidden){var A=p[k+=1][0],M=p[k][1];h.TL=[-A,M],h.TR=[A,M],h.BL=w,h.BR=T,h.pxmid=(S=h.TR,E=h.BR,[.5*(S[0]+E[0]),.5*(S[1]+E[1])]),w=h.TL,T=h.TR}var S,E}(e),u.each((function(){var u=n.select(this).selectAll(\"g.slice\").data(e);u.enter().append(\"g\").classed(\"slice\",!0),u.exit().remove(),u.each((function(o,s){if(o.hidden)n.select(this).selectAll(\"path,g\").remove();else{o.pointNumber=o.i,o.curveNumber=d.index;var u=h.cx,v=h.cy,y=n.select(this),x=y.selectAll(\"path.surface\").data([o]);x.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":\"all\"}),y.call(g,t,e);var w=\"M\"+(u+o.TR[0])+\",\"+(v+o.TR[1])+_(o.TR,o.BR)+_(o.BR,o.BL)+_(o.BL,o.TL)+\"Z\";x.attr(\"d\",w),b(t,o,h);var T=p.castOption(d.textposition,o.pts),k=y.selectAll(\"g.slicetext\").data(o.text&&\"none\"!==T?[0]:[]);k.enter().append(\"g\").classed(\"slicetext\",!0),k.exit().remove(),k.each((function(){var h=a.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),p=a.ensureUniformFontSize(t,m(d,o,r.font));h.text(o.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(i.font,p).call(l.convertToTspans,t);var g,y,x,b=i.bBox(h.node()),_=Math.min(o.BL[1],o.BR[1])+v,w=Math.max(o.TL[1],o.TR[1])+v;y=Math.max(o.TL[0],o.BL[0])+u,x=Math.min(o.TR[0],o.BR[0])+u,(g=c(y,x,_,w,b,{isHorizontal:!0,constrained:!0,angle:0,anchor:\"middle\"})).fontSize=p.size,f(d.type,g,r),e[s].transform=g,h.attr(\"transform\",a.getTextTransform(g))}))}}));var v=n.select(this).selectAll(\"g.titletext\").data(d.title.text?[0]:[]);v.enter().append(\"g\").classed(\"titletext\",!0),v.exit().remove(),v.each((function(){var e=a.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),c=d.title.text;d._meta&&(c=a.templateString(c,d._meta)),e.text(c).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(i.font,d.title.font).call(l.convertToTspans,t);var u=x(h,r._size);e.attr(\"transform\",s(u.x,u.y)+o(Math.min(1,u.scale))+s(u.tx,u.ty))}))}))}))}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../bar/plot\":659,\"../bar/uniform_text\":664,\"../pie/helpers\":905,\"../pie/plot\":909,\"@plotly/d3\":58}],791:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../pie/style_one\"),a=t(\"../bar/uniform_text\").resizeText;e.exports=function(t){var e=t._fullLayout._funnelarealayer.selectAll(\".trace\");a(t,e,\"funnelarea\"),e.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)}))}))}},{\"../bar/uniform_text\":664,\"../pie/style_one\":911,\"@plotly/d3\":58}],792:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/font_attributes\"),o=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../plots/template_attributes\").texttemplateAttrs,c=t(\"../../components/colorscale/attributes\"),u=t(\"../../lib/extend\").extendFlat;e.exports=u({z:{valType:\"data_array\",editType:\"calc\"},x:u({},n.x,{impliedEdits:{xtype:\"array\"}}),x0:u({},n.x0,{impliedEdits:{xtype:\"scaled\"}}),dx:u({},n.dx,{impliedEdits:{xtype:\"scaled\"}}),y:u({},n.y,{impliedEdits:{ytype:\"array\"}}),y0:u({},n.y0,{impliedEdits:{ytype:\"scaled\"}}),dy:u({},n.dy,{impliedEdits:{ytype:\"scaled\"}}),xperiod:u({},n.xperiod,{impliedEdits:{xtype:\"scaled\"}}),yperiod:u({},n.yperiod,{impliedEdits:{ytype:\"scaled\"}}),xperiod0:u({},n.xperiod0,{impliedEdits:{xtype:\"scaled\"}}),yperiod0:u({},n.yperiod0,{impliedEdits:{ytype:\"scaled\"}}),xperiodalignment:u({},n.xperiodalignment,{impliedEdits:{xtype:\"scaled\"}}),yperiodalignment:u({},n.yperiodalignment,{impliedEdits:{ytype:\"scaled\"}}),text:{valType:\"data_array\",editType:\"calc\"},hovertext:{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\"},hoverongaps:{valType:\"boolean\",dflt:!0,editType:\"none\"},connectgaps:{valType:\"boolean\",editType:\"calc\"},xgap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},ygap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},xhoverformat:o(\"x\"),yhoverformat:o(\"y\"),zhoverformat:o(\"z\",1),hovertemplate:s(),texttemplate:l({arrayOk:!1,editType:\"plot\"},{keys:[\"x\",\"y\",\"z\",\"text\"]}),textfont:a({editType:\"plot\",autoSize:!0,autoColor:!0,colorEditType:\"style\"}),showlegend:u({},i.showlegend,{dflt:!1})},{transforms:void 0},c(\"\",{cLetter:\"z\",autoColorDflt:!1}))},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/font_attributes\":585,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926}],793:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../plots/cartesian/align_period\"),s=t(\"../histogram2d/calc\"),l=t(\"../../components/colorscale/calc\"),c=t(\"./convert_column_xyz\"),u=t(\"./clean_2d_array\"),f=t(\"./interp2d\"),h=t(\"./find_empties\"),p=t(\"./make_bound_array\"),d=t(\"../../constants/numerical\").BADNUM;function g(t){for(var e=[],r=t.length,n=0;nD){O(\"x scale is not linear\");break}}if(x.length&&\"fast\"===P){var R=(x[x.length-1]-x[0])/(x.length-1),F=Math.abs(R/100);for(k=0;kF){O(\"y scale is not linear\");break}}}var B=i.maxRowLength(T),N=\"scaled\"===e.xtype?\"\":r,j=p(e,N,m,v,B,M),U=\"scaled\"===e.ytype?\"\":x,V=p(e,U,b,_,T.length,S);C||(e._extremes[M._id]=a.findExtremes(M,j),e._extremes[S._id]=a.findExtremes(S,V));var H={x:j,y:V,z:T,text:e._text||e.text,hovertext:e._hovertext||e.hovertext};if(e.xperiodalignment&&y&&(H.orig_x=y),e.yperiodalignment&&w&&(H.orig_y=w),N&&N.length===j.length-1&&(H.xCenter=N),U&&U.length===V.length-1&&(H.yCenter=U),L&&(H.xRanges=A.xRanges,H.yRanges=A.yRanges,H.pts=A.pts),E||l(t,e,{vals:T,cLetter:\"z\"}),E&&e.contours&&\"heatmap\"===e.contours.coloring){var q={type:\"contour\"===e.type?\"heatmap\":\"histogram2d\",xcalendar:e.xcalendar,ycalendar:e.ycalendar};H.xfill=p(q,N,m,v,B,M),H.yfill=p(q,U,b,_,T.length,S)}return[H]}},{\"../../components/colorscale/calc\":374,\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/align_period\":551,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"../histogram2d/calc\":826,\"./clean_2d_array\":794,\"./convert_column_xyz\":796,\"./find_empties\":798,\"./interp2d\":801,\"./make_bound_array\":803}],794:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e,r,o){var s,l,c,u,f,h;function p(t){if(n(t))return+t}if(e&&e.transpose){for(s=0,f=0;f=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]}))}},{\"../../lib\":503}],799:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../components/colorscale\").extractOpts;e.exports=function(t,e,r,s,l){l||(l={});var c,u,f,h,p=l.isContour,d=t.cd[0],g=d.trace,m=t.xa,v=t.ya,y=d.x,x=d.y,b=d.z,_=d.xCenter,w=d.yCenter,T=d.zmask,k=g.zhoverformat,A=y,M=x;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>=b[0].length||h<0||h>b.length)return}else{if(n.inbox(e-y[0],e-y[y.length-1],0)>0||n.inbox(r-x[0],r-x[x.length-1],0)>0)return;if(p){var S;for(A=[2*y[0]-y[1]],S=1;Sg&&(v=Math.max(v,Math.abs(t[a][o]-d)/(m-g))))}return v}e.exports=function(t,e){var r,i=1;for(o(t,e),r=0;r.01;r++)i=o(t,e,a(i));return i>.01&&n.log(\"interp2d didn't converge quickly\",i),t}},{\"../../lib\":503}],802:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){t(\"texttemplate\");var r=n.extendFlat({},e.font,{color:\"auto\",size:\"auto\"});n.coerceFont(t,\"textfont\",r)}},{\"../../lib\":503}],803:[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;u0;)_=w.c2p(R[S]),S--;for(_0;)M=T.c2p(F[S]),S--;if(MGt||Gt>T._length))for(E=Ut;EWt||Wt>w._length)){var Xt=u({x:Yt,y:qt},I,t._fullLayout);Xt.x=Yt,Xt.y=qt;var Zt=P.z[S][E];void 0===Zt?(Xt.z=\"\",Xt.zLabel=\"\"):(Xt.z=Zt,Xt.zLabel=s.tickText(Ft,Zt,\"hover\").text);var Jt=P.text&&P.text[S]&&P.text[S][E];void 0!==Jt&&!1!==Jt||(Jt=\"\"),Xt.text=Jt;var Kt=l.texttemplateString(Dt,Xt,t._fullLayout._d3locale,Xt,I._meta||{});if(Kt){var Qt=Kt.split(\"
\"),$t=Qt.length,te=0;for(L=0;L<$t;L++)te=Math.max(te,Qt[L].length);Ht.push({l:$t,c:te,t:Kt,x:Wt,y:Gt,z:Zt})}}}}var ee=I.textfont,re=ee.family,ne=ee.size,ie=t._fullLayout.font.size;if(!ne||\"auto\"===ne){var ae=1/0,oe=1/0,se=0,le=0;for(L=0;L0&&(a=!0);for(var l=0;la){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]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],m=Math.min(f(d+h,d+p,n,a),f(g+h,g+p,n,a)),v=Math.min(f(d+c,d+h,n,a),f(g+c,g+h,n,a));if(m>v&&vo){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(cr.r2l(B)&&(j=o.tickIncrement(j,b.size,!0,p)),z.start=r.l2r(j),F||i.nestedProperty(e,v+\".start\").set(z.start)}var U=b.end,V=r.r2l(O.end),H=void 0!==V;if((b.endFound||H)&&V!==r.r2l(U)){var q=H?V:i.aggNums(Math.max,null,d);z.end=r.l2r(q),H||i.nestedProperty(e,v+\".start\").set(z.end)}var G=\"autobin\"+s;return!1===e._input[G]&&(e._input[v]=i.extendFlat({},e[v]||{}),delete e._input[G],delete e[G]),[z,d]}e.exports={calc:function(t,e){var r,a,p,d,g=[],m=[],v=\"h\"===e.orientation,y=o.getFromId(t,v?e.yaxis:e.xaxis),x=v?\"y\":\"x\",b={x:\"y\",y:\"x\"}[x],_=e[x+\"calendar\"],w=e.cumulative,T=h(t,e,y,x),k=T[0],A=T[1],M=\"string\"==typeof k.size,S=[],E=M?S:k,L=[],C=[],P=[],I=0,O=e.histnorm,z=e.histfunc,D=-1!==O.indexOf(\"density\");w.enabled&&D&&(O=O.replace(/ ?density$/,\"\"),D=!1);var R,F=\"max\"===z||\"min\"===z?null:0,B=l.count,N=c[O],j=!1,U=function(t){return y.r2c(t,0,_)};for(i.isArrayOrTypedArray(e[b])&&\"count\"!==z&&(R=e[b],j=\"avg\"===z,B=l[z]),r=U(k.start),p=U(k.end)+(r-o.tickIncrement(r,k.size,!1,_))/1e6;r=0&&d=0;n--)s(n);else if(\"increasing\"===e){for(n=1;n=0;n--)t[n]+=t[n+1];\"exclude\"===r&&(t.push(0),t.shift())}}(m,w.direction,w.currentbin);var K=Math.min(g.length,m.length),Q=[],$=0,tt=K-1;for(r=0;r=$;r--)if(m[r]){tt=r;break}for(r=$;r<=tt;r++)if(n(g[r])&&n(m[r])){var et={p:g[r],s:m[r],b:0};w.enabled||(et.pts=P[r],Y?et.ph0=et.ph1=P[r].length?A[P[r][0]]:g[r]:(e._computePh=!0,et.ph0=q(S[r]),et.ph1=q(S[r+1],!0))),Q.push(et)}return 1===Q.length&&(Q[0].width1=o.tickIncrement(Q[0].p,k.size,!1,_)-Q[0].p),s(Q,e),i.isArrayOrTypedArray(e.selectedpoints)&&i.tagSelected(Q,e,Z),Q},calcAllAutoBins:h}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"../bar/arrays_to_calcdata\":647,\"./average\":813,\"./bin_functions\":815,\"./bin_label_vals\":816,\"./norm_functions\":824,\"fast-isnumeric\":190}],818:[function(t,e,r){\"use strict\";e.exports={eventDataKeys:[\"binNumber\"]}},{}],819:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axis_ids\"),a=t(\"../../registry\").traceIs,o=t(\"../bar/defaults\").handleGroupingDefaults,s=n.nestedProperty,l=t(\"../../plots/cartesian/constraints\").getAxisGroup,c=[{aStr:{x:\"xbins.start\",y:\"ybins.start\"},name:\"start\"},{aStr:{x:\"xbins.end\",y:\"ybins.end\"},name:\"end\"},{aStr:{x:\"xbins.size\",y:\"ybins.size\"},name:\"size\"},{aStr:{x:\"nbinsx\",y:\"nbinsy\"},name:\"nbins\"}],u=[\"x\",\"y\"];e.exports=function(t,e){var r,f,h,p,d,g,m,v=e._histogramBinOpts={},y=[],x={},b=[];function _(t,e){return n.coerce(r._input,r,r._module.attributes,t,e)}function w(t){return\"v\"===t.orientation?\"x\":\"y\"}function T(t,r,a){var o=t.uid+\"__\"+a;r||(r=o);var s=function(t,r){return i.getFromTrace({_fullLayout:e},t,r).type}(t,a),l=t[a+\"calendar\"]||\"\",c=v[r],u=!0;c&&(s===c.axType&&l===c.calendar?(u=!1,c.traces.push(t),c.dirs.push(a)):(r=o,s!==c.axType&&n.warn([\"Attempted to group the bins of trace\",t.index,\"set on a\",\"type:\"+s,\"axis\",\"with bins on\",\"type:\"+c.axType,\"axis.\"].join(\" \")),l!==c.calendar&&n.warn([\"Attempted to group the bins of trace\",t.index,\"set with a\",l,\"calendar\",\"with bins\",c.calendar?\"on a \"+c.calendar+\" calendar\":\"w/o a set calendar\"].join(\" \")))),u&&(v[r]={traces:[t],dirs:[a],axType:s,calendar:t[a+\"calendar\"]||\"\"}),t[\"_\"+a+\"bingroup\"]=r}for(d=0;dS&&T.splice(S,T.length-S),M.length>S&&M.splice(S,M.length-S);var E=[],L=[],C=[],P=\"string\"==typeof w.size,I=\"string\"==typeof A.size,O=[],z=[],D=P?O:w,R=I?z:A,F=0,B=[],N=[],j=e.histnorm,U=e.histfunc,V=-1!==j.indexOf(\"density\"),H=\"max\"===U||\"min\"===U?null:0,q=a.count,G=o[j],Y=!1,W=[],X=[],Z=\"z\"in e?e.z:\"marker\"in e&&Array.isArray(e.marker.color)?e.marker.color:\"\";Z&&\"count\"!==U&&(Y=\"avg\"===U,q=a[U]);var J=w.size,K=x(w.start),Q=x(w.end)+(K-i.tickIncrement(K,J,!1,v))/1e6;for(r=K;r=0&&p=0&&d-1,flipY:E.tiling.flip.indexOf(\"y\")>-1,orientation:E.tiling.orientation,pad:{inner:E.tiling.pad},maxDepth:E._maxDepth}).descendants(),O=1/0,z=-1/0;I.forEach((function(t){var e=t.depth;e>=E._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(O=Math.min(O,e),z=Math.max(z,e))})),p=p.data(I,u.getPtId),E._maxVisibleLayers=isFinite(z)?z-O+1:0,p.enter().append(\"g\").classed(\"slice\",!0),T(p,!1,{},[g,m],x),p.order();var D=null;if(w&&M){var R=u.getPtId(M);p.each((function(t){null===D&&u.getPtId(t)===R&&(D={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var F=function(){return D||{x0:0,x1:g,y0:0,y1:m}},B=p;return w&&(B=B.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),B.each((function(s){s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-E.tiling.pad),s._hoverY=y(P?s.y1-E.tiling.pad/2:s.y0+E.tiling.pad/2);var p=n.select(this),d=i.ensureSingle(p,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?d.transition().attrTween(\"d\",(function(t){var e=k(t,!1,F(),[g,m],{orientation:E.tiling.orientation,flipX:E.tiling.flip.indexOf(\"x\")>-1,flipY:E.tiling.flip.indexOf(\"y\")>-1});return function(t){return x(e(t))}})):d.attr(\"d\",x),p.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{isTransitioning:t._transitioning}),d.call(l,s,E,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text=\"\":s._text=h(s,r,E,e,S)||\"\";var T=i.ensureSingle(p,\"g\",\"slicetext\"),M=i.ensureSingle(T,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),I=i.ensureUniformFontSize(t,u.determineTextFont(E,s,S.font));M.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",C?\"end\":L?\"start\":\"middle\").call(a.font,I).call(o.convertToTspans,t),s.textBB=a.bBox(M.node()),s.transform=b(s,{fontSize:I.size}),s.transform.fontSize=I.size,w?M.transition().attrTween(\"transform\",(function(t){var e=A(t,!1,F(),[g,m]);return function(t){return _(e(t))}})):M.attr(\"transform\",_(s))})),D}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../sunburst/fx\":1050,\"../sunburst/helpers\":1051,\"../sunburst/plot\":1055,\"../treemap/constants\":1074,\"./partition\":842,\"./style\":844,\"@plotly/d3\":58}],839:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"icicle\",basePlotModule:t(\"./base_plot\"),categories:[],animatable:!0,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\"),style:t(\"./style\").style,colorbar:t(\"../scatter/marker_colorbar\"),meta:{}}},{\"../scatter/marker_colorbar\":944,\"./attributes\":834,\"./base_plot\":835,\"./calc\":836,\"./defaults\":837,\"./layout_attributes\":840,\"./layout_defaults\":841,\"./plot\":843,\"./style\":844}],840:[function(t,e,r){\"use strict\";e.exports={iciclecolorway:{valType:\"colorlist\",editType:\"calc\"},extendiciclecolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],841:[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(\"iciclecolorway\",e.colorway),r(\"extendiciclecolors\")}},{\"../../lib\":503,\"./layout_attributes\":840}],842:[function(t,e,r){\"use strict\";var n=t(\"d3-hierarchy\"),i=t(\"../treemap/flip_tree\");e.exports=function(t,e,r){var a=r.flipX,o=r.flipY,s=\"h\"===r.orientation,l=r.maxDepth,c=e[0],u=e[1];l&&(c=(t.height+1)*e[0]/Math.min(t.height+1,l),u=(t.height+1)*e[1]/Math.min(t.height+1,l));var f=n.partition().padding(r.pad.inner).size(s?[e[1],c]:[e[0],u])(t);return(s||a||o)&&i(f,e,{swapXY:s,flipX:a,flipY:o}),f}},{\"../treemap/flip_tree\":1079,\"d3-hierarchy\":115}],843:[function(t,e,r){\"use strict\";var n=t(\"../treemap/draw\"),i=t(\"./draw_descendants\");e.exports=function(t,e,r,a){return n(t,e,r,a,{type:\"icicle\",drawDescendants:i})}},{\"../treemap/draw\":1076,\"./draw_descendants\":838}],844:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../bar/uniform_text\").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,\"marker.line.color\")||i.defaultLine,c=a.castOption(r,s,\"marker.line.width\")||0;t.style(\"stroke-width\",c).call(i.fill,n.color).call(i.stroke,l).style(\"opacity\",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._iciclelayer.selectAll(\".trace\");o(t,e,\"icicle\"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style(\"opacity\",r.opacity),e.selectAll(\"path.surface\").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{\"../../components/color\":366,\"../../lib\":503,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],845:[function(t,e,r){\"use strict\";for(var n=t(\"../../plots/attributes\"),i=t(\"../../plots/template_attributes\").hovertemplateAttrs,a=t(\"../../lib/extend\").extendFlat,o=t(\"./constants\").colormodel,s=[\"rgb\",\"rgba\",\"rgba256\",\"hsl\",\"hsla\"],l=[],c=[],u=0;u0||n.inbox(r-o.y0,r-(o.y0+o.h*s.dy),0)>0)){var u,f=Math.floor((e-o.x0)/s.dx),h=Math.floor(Math.abs(r-o.y0)/s.dy);if(s._hasZ?u=o.z[h][f]:s._hasSource&&(u=s._canvas.el.getContext(\"2d\").getImageData(f,h,1,1).data),u){var p,d=o.hi||s.hoverinfo;if(d){var g=d.split(\"+\");-1!==g.indexOf(\"all\")&&(g=[\"color\"]),-1!==g.indexOf(\"color\")&&(p=!0)}var m,v=a.colormodel[s.colormodel],y=v.colormodel||s.colormodel,x=y.length,b=s._scaler(u),_=v.suffix,w=[];(s.hovertemplate||p)&&(w.push(\"[\"+[b[0]+_[0],b[1]+_[1],b[2]+_[2]].join(\", \")),4===x&&w.push(\", \"+b[3]+_[3]),w.push(\"]\"),w=w.join(\"\"),t.extraText=y.toUpperCase()+\": \"+w),Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[h])?m=s.hovertext[h][f]:Array.isArray(s.text)&&Array.isArray(s.text[h])&&(m=s.text[h][f]);var T=c.c2p(o.y0+(h+.5)*s.dy),k=o.x0+(f+.5)*s.dx,A=o.y0+(h+.5)*s.dy,M=\"[\"+u.slice(0,s.colormodel.length).join(\", \")+\"]\";return[i.extendFlat(t,{index:[h,f],x0:l.c2p(o.x0+f*s.dx),x1:l.c2p(o.x0+(f+1)*s.dx),y0:T,y1:T,color:b,xVal:k,xLabelVal:k,yVal:A,yLabelVal:A,zLabelVal:M,text:m,hovertemplateLabels:{zLabel:M,colorLabel:w,\"color[0]Label\":b[0]+_[0],\"color[1]Label\":b[1]+_[1],\"color[2]Label\":b[2]+_[2],\"color[3]Label\":b[3]+_[3]}})]}}}},{\"../../components/fx\":406,\"../../lib\":503,\"./constants\":847}],852:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"./style\"),hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"image\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"2dMap\",\"noSortingByValue\"],animatable:!1,meta:{}}},{\"../../plots/cartesian\":568,\"./attributes\":845,\"./calc\":846,\"./defaults\":848,\"./event_data\":849,\"./hover\":851,\"./plot\":853,\"./style\":854}],853:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.strTranslate,o=t(\"../../constants/xmlns_namespaces\"),s=t(\"./constants\"),l=i.isIOS()||i.isSafari()||i.isIE();e.exports=function(t,e,r,c){var u=e.xaxis,f=e.yaxis,h=!(l||t._context._exportedPlot);i.makeTraceGroups(c,r,\"im\").each((function(e){var r=n.select(this),l=e[0],c=l.trace,p=(\"fast\"===c.zsmooth||!1===c.zsmooth&&h)&&!c._hasZ&&c._hasSource&&\"linear\"===u.type&&\"linear\"===f.type;c._realImage=p;var d,g,m,v,y,x,b=l.z,_=l.x0,w=l.y0,T=l.w,k=l.h,A=c.dx,M=c.dy;for(x=0;void 0===d&&x0;)g=u.c2p(_+x*A),x--;for(x=0;void 0===v&&x0;)y=f.c2p(w+x*M),x--;if(gI[0];if(O||z){var D=d+S/2,R=v+E/2;C+=\"transform:\"+a(D+\"px\",R+\"px\")+\"scale(\"+(O?-1:1)+\",\"+(z?-1:1)+\")\"+a(-D+\"px\",-R+\"px\")+\";\"}}L.attr(\"style\",C);var F=new Promise((function(t){if(c._hasZ)t();else if(c._hasSource)if(c._canvas&&c._canvas.el.width===T&&c._canvas.el.height===k&&c._canvas.source===c.source)t();else{var e=document.createElement(\"canvas\");e.width=T,e.height=k;var r=e.getContext(\"2d\");c._image=c._image||new Image;var n=c._image;n.onload=function(){r.drawImage(n,0,0),c._canvas={el:e,source:c.source},t()},n.setAttribute(\"src\",c.source)}})).then((function(){var t;if(c._hasZ)t=B((function(t,e){return b[e][t]})).toDataURL(\"image/png\");else if(c._hasSource)if(p)t=c.source;else{var e=c._canvas.el.getContext(\"2d\").getImageData(0,0,T,k).data;t=B((function(t,r){var n=4*(r*T+t);return[e[n],e[n+1],e[n+2],e[n+3]]})).toDataURL(\"image/png\")}L.attr({\"xlink:href\":t,height:E,width:S,x:d,y:v})}));t._promises.push(F)}function B(t){var e=document.createElement(\"canvas\");e.width=S,e.height=E;var r,n=e.getContext(\"2d\"),a=function(t){return i.constrain(Math.round(u.c2p(_+t*A)-d),0,S)},o=function(t){return i.constrain(Math.round(f.c2p(w+t*M)-v),0,E)},h=s.colormodel[c.colormodel],p=h.colormodel||c.colormodel,g=h.fmt;for(x=0;x0}function T(t){t.each((function(t){y.stroke(n.select(this),t.line.color)})).each((function(t){y.fill(n.select(this),t.color)})).style(\"stroke-width\",(function(t){return t.line.width}))}function k(t,e,r){var n=t._fullLayout,i=o.extendFlat({type:\"linear\",ticks:\"outside\",range:r,showline:!0},e),a={type:\"linear\",_id:\"x\"+e._id},s={letter:\"x\",font:n.font,noHover:!0,noTickson:!0};function l(t,e){return o.coerce(i,a,v,t,e)}return g(i,a,l,s,n),m(i,a,l,s),a}function A(t,e,r){return[Math.min(e/t.width,r/t.height),t,e+\"x\"+r]}function M(t,e,r,i){var a=document.createElementNS(\"http://www.w3.org/2000/svg\",\"text\"),o=n.select(a);return o.text(t).attr(\"x\",0).attr(\"y\",0).attr(\"text-anchor\",r).attr(\"data-unformatted\",t).call(p.convertToTspans,i).call(f.font,e),f.bBox(o.node())}function S(t,e,r,n,i,a){var s=\"_cache\"+e;t[s]&&t[s].key===i||(t[s]={key:i,value:r});var l=o.aggNums(a,null,[t[s].value,n],2);return t[s].value=l,l}e.exports=function(t,e,r,g){var m,v=t._fullLayout;w(r)&&g&&(m=g()),o.makeTraceGroups(v._indicatorlayer,e,\"trace\").each((function(e){var g,E,L,C,P,I=e[0].trace,O=n.select(this),z=I._hasGauge,D=I._isAngular,R=I._isBullet,F=I.domain,B={w:v._size.w*(F.x[1]-F.x[0]),h:v._size.h*(F.y[1]-F.y[0]),l:v._size.l+v._size.w*F.x[0],r:v._size.r+v._size.w*(1-F.x[1]),t:v._size.t+v._size.h*(1-F.y[1]),b:v._size.b+v._size.h*F.y[0]},N=B.l+B.w/2,j=B.t+B.h/2,U=Math.min(B.w/2,B.h),V=h.innerRadius*U,H=I.align||\"center\";if(E=j,z){if(D&&(g=N,E=j+U/2,L=function(t){return function(t,e){var r=Math.sqrt(t.width/2*(t.width/2)+t.height*t.height);return[e/r,t,e]}(t,.9*V)}),R){var q=h.bulletPadding,G=1-h.bulletNumberDomainSize+q;g=B.l+(G+(1-G)*b[H])*B.w,L=function(t){return A(t,(h.bulletNumberDomainSize-q)*B.w,B.h)}}}else g=B.l+b[H]*B.w,L=function(t){return A(t,B.w,B.h)};!function(t,e,r,i){var c,u,h,g=r[0].trace,m=i.numbersX,v=i.numbersY,T=g.align||\"center\",A=x[T],E=i.transitionOpts,L=i.onComplete,C=o.ensureSingle(e,\"g\",\"numbers\"),P=[];g._hasNumber&&P.push(\"number\");g._hasDelta&&(P.push(\"delta\"),\"left\"===g.delta.position&&P.reverse());var I=C.selectAll(\"text\").data(P);function O(e,r,n,i){if(!e.match(\"s\")||n>=0==i>=0||r(n).slice(-1).match(_)||r(i).slice(-1).match(_))return r;var a=e.slice().replace(\"s\",\"f\").replace(/\\d+/,(function(t){return parseInt(t)-1})),o=k(t,{tickformat:a});return function(t){return Math.abs(t)<1?d.tickText(o,t).text:r(t)}}I.enter().append(\"text\"),I.attr(\"text-anchor\",(function(){return A})).attr(\"class\",(function(t){return t})).attr(\"x\",null).attr(\"y\",null).attr(\"dx\",null).attr(\"dy\",null),I.exit().remove();var z,D=g.mode+g.align;g._hasDelta&&(z=function(){var e=k(t,{tickformat:g.delta.valueformat},g._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=function(t){return g.delta.relative?t.relativeDelta:t.delta},s=function(t,e){return 0===t||\"number\"!=typeof t||isNaN(t)?\"-\":(t>0?g.delta.increasing.symbol:g.delta.decreasing.symbol)+e(t)},l=function(t){return t.delta>=0?g.delta.increasing.color:g.delta.decreasing.color};void 0===g._deltaLastValue&&(g._deltaLastValue=o(r[0]));var c=C.select(\"text.delta\");function h(){c.text(s(o(r[0]),i)).call(y.fill,l(r[0])).call(p.convertToTspans,t)}return c.call(f.font,g.delta.font).call(y.fill,l({delta:g._deltaLastValue})),w(E)?c.transition().duration(E.duration).ease(E.easing).tween(\"text\",(function(){var t=n.select(this),e=o(r[0]),c=g._deltaLastValue,u=O(g.delta.valueformat,i,c,e),f=a(c,e);return g._deltaLastValue=e,function(e){t.text(s(f(e),u)),t.call(y.fill,l({delta:f(e)}))}})).each(\"end\",(function(){h(),L&&L()})).each(\"interrupt\",(function(){h(),L&&L()})):h(),u=M(s(o(r[0]),i),g.delta.font,A,t),c}(),D+=g.delta.position+g.delta.font.size+g.delta.font.family+g.delta.valueformat,D+=g.delta.increasing.symbol+g.delta.decreasing.symbol,h=u);g._hasNumber&&(!function(){var e=k(t,{tickformat:g.number.valueformat},g._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=g.number.suffix,s=g.number.prefix,l=C.select(\"text.number\");function u(){var e=\"number\"==typeof r[0].y?s+i(r[0].y)+o:\"-\";l.text(e).call(f.font,g.number.font).call(p.convertToTspans,t)}w(E)?l.transition().duration(E.duration).ease(E.easing).each(\"end\",(function(){u(),L&&L()})).each(\"interrupt\",(function(){u(),L&&L()})).attrTween(\"text\",(function(){var t=n.select(this),e=a(r[0].lastY,r[0].y);g._lastValue=r[0].y;var l=O(g.number.valueformat,i,r[0].lastY,r[0].y);return function(r){t.text(s+l(e(r))+o)}})):u(),c=M(s+i(r[0].y)+o,g.number.font,A,t)}(),D+=g.number.font.size+g.number.font.family+g.number.valueformat+g.number.suffix+g.number.prefix,h=c);if(g._hasDelta&&g._hasNumber){var R,F,B=[(c.left+c.right)/2,(c.top+c.bottom)/2],N=[(u.left+u.right)/2,(u.top+u.bottom)/2],j=.75*g.delta.font.size;\"left\"===g.delta.position&&(R=S(g,\"deltaPos\",0,-1*(c.width*b[g.align]+u.width*(1-b[g.align])+j),D,Math.min),F=B[1]-N[1],h={width:c.width+u.width+j,height:Math.max(c.height,u.height),left:u.left+R,right:c.right,top:Math.min(c.top,u.top+F),bottom:Math.max(c.bottom,u.bottom+F)}),\"right\"===g.delta.position&&(R=S(g,\"deltaPos\",0,c.width*(1-b[g.align])+u.width*b[g.align]+j,D,Math.max),F=B[1]-N[1],h={width:c.width+u.width+j,height:Math.max(c.height,u.height),left:c.left,right:u.right+R,top:Math.min(c.top,u.top+F),bottom:Math.max(c.bottom,u.bottom+F)}),\"bottom\"===g.delta.position&&(R=null,F=u.height,h={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height,bottom:c.bottom+u.height}),\"top\"===g.delta.position&&(R=null,F=c.top,h={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height-u.height,bottom:c.bottom}),z.attr({dx:R,dy:F})}(g._hasNumber||g._hasDelta)&&C.attr(\"transform\",(function(){var t=i.numbersScaler(h);D+=t[2];var e,r=S(g,\"numbersScale\",1,t[0],D,Math.min);g._scaleNumbers||(r=1),e=g._isAngular?v-r*h.bottom:v-r*(h.top+h.bottom)/2,g._numbersTop=r*h.top+e;var n=h[T];\"center\"===T&&(n=(h.left+h.right)/2);var a=m-r*n;return a=S(g,\"numbersTranslate\",0,a,D,Math.max),l(a,e)+s(r)}))}(t,O,e,{numbersX:g,numbersY:E,numbersScaler:L,transitionOpts:r,onComplete:m}),z&&(C={range:I.gauge.axis.range,color:I.gauge.bgcolor,line:{color:I.gauge.bordercolor,width:0},thickness:1},P={range:I.gauge.axis.range,color:\"rgba(0, 0, 0, 0)\",line:{color:I.gauge.bordercolor,width:I.gauge.borderwidth},thickness:1});var Y=O.selectAll(\"g.angular\").data(D?e:[]);Y.exit().remove();var W=O.selectAll(\"g.angularaxis\").data(D?e:[]);W.exit().remove(),D&&function(t,e,r,a){var o,s,f,h,p=r[0].trace,g=a.size,m=a.radius,v=a.innerRadius,y=a.gaugeBg,x=a.gaugeOutline,b=[g.l+g.w/2,g.t+g.h/2+m/2],_=a.gauge,A=a.layer,M=a.transitionOpts,S=a.onComplete,E=Math.PI/2;function L(t){var e=p.gauge.axis.range[0],r=(t-e)/(p.gauge.axis.range[1]-e)*Math.PI-E;return r<-E?-E:r>E?E:r}function C(t){return n.svg.arc().innerRadius((v+m)/2-t/2*(m-v)).outerRadius((v+m)/2+t/2*(m-v)).startAngle(-E)}function P(t){t.attr(\"d\",(function(t){return C(t.thickness).startAngle(L(t.range[0])).endAngle(L(t.range[1]))()}))}_.enter().append(\"g\").classed(\"angular\",!0),_.attr(\"transform\",l(b[0],b[1])),A.enter().append(\"g\").classed(\"angularaxis\",!0).classed(\"crisp\",!0),A.selectAll(\"g.xangularaxistick,path,text\").remove(),(o=k(t,p.gauge.axis)).type=\"linear\",o.range=p.gauge.axis.range,o._id=\"xangularaxis\",o.ticklabeloverflow=\"allow\",o.setScale();var I=function(t){return(o.range[0]-t.x)/(o.range[1]-o.range[0])*Math.PI+Math.PI},O={},z=d.makeLabelFns(o,0).labelStandoff;O.xFn=function(t){var e=I(t);return Math.cos(e)*z},O.yFn=function(t){var e=I(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(z+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*u)},O.anchorFn=function(t){var e=I(t),r=Math.cos(e);return Math.abs(r)<.1?\"middle\":r>0?\"start\":\"end\"},O.heightFn=function(t,e,r){var n=I(t);return-.5*(1+Math.sin(n))*r};var D=function(t){return l(b[0]+m*Math.cos(t),b[1]-m*Math.sin(t))};f=function(t){return D(I(t))};if(s=d.calcTicks(o),h=d.getTickSigns(o)[2],o.visible){h=\"inside\"===o.ticks?-1:1;var R=(o.linewidth||1)/2;d.drawTicks(t,o,{vals:s,layer:A,path:\"M\"+h*R+\",0h\"+h*o.ticklen,transFn:function(t){var e=I(t);return D(e)+\"rotate(\"+-c(e)+\")\"}}),d.drawLabels(t,o,{vals:s,layer:A,transFn:f,labelFns:O})}var F=[y].concat(p.gauge.steps),B=_.selectAll(\"g.bg-arc\").data(F);B.enter().append(\"g\").classed(\"bg-arc\",!0).append(\"path\"),B.select(\"path\").call(P).call(T),B.exit().remove();var N=C(p.gauge.bar.thickness),j=_.selectAll(\"g.value-arc\").data([p.gauge.bar]);j.enter().append(\"g\").classed(\"value-arc\",!0).append(\"path\");var U=j.select(\"path\");w(M)?(U.transition().duration(M.duration).ease(M.easing).each(\"end\",(function(){S&&S()})).each(\"interrupt\",(function(){S&&S()})).attrTween(\"d\",(V=N,H=L(r[0].lastY),q=L(r[0].y),function(){var t=i(H,q);return function(e){return V.endAngle(t(e))()}})),p._lastValue=r[0].y):U.attr(\"d\",\"number\"==typeof r[0].y?N.endAngle(L(r[0].y)):\"M0,0Z\");var V,H,q;U.call(T),j.exit().remove(),F=[];var G=p.gauge.threshold.value;(G||0===G)&&F.push({range:[G,G],color:p.gauge.threshold.color,line:{color:p.gauge.threshold.line.color,width:p.gauge.threshold.line.width},thickness:p.gauge.threshold.thickness});var Y=_.selectAll(\"g.threshold-arc\").data(F);Y.enter().append(\"g\").classed(\"threshold-arc\",!0).append(\"path\"),Y.select(\"path\").call(P).call(T),Y.exit().remove();var W=_.selectAll(\"g.gauge-outline\").data([x]);W.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"path\"),W.select(\"path\").call(P).call(T),W.exit().remove()}(t,0,e,{radius:U,innerRadius:V,gauge:Y,layer:W,size:B,gaugeBg:C,gaugeOutline:P,transitionOpts:r,onComplete:m});var X=O.selectAll(\"g.bullet\").data(R?e:[]);X.exit().remove();var Z=O.selectAll(\"g.bulletaxis\").data(R?e:[]);Z.exit().remove(),R&&function(t,e,r,n){var i,a,o,s,c,u=r[0].trace,f=n.gauge,p=n.layer,g=n.gaugeBg,m=n.gaugeOutline,v=n.size,x=u.domain,b=n.transitionOpts,_=n.onComplete;f.enter().append(\"g\").classed(\"bullet\",!0),f.attr(\"transform\",l(v.l,v.t)),p.enter().append(\"g\").classed(\"bulletaxis\",!0).classed(\"crisp\",!0),p.selectAll(\"g.xbulletaxistick,path,text\").remove();var A=v.h,M=u.gauge.bar.thickness*A,S=x.x[0],E=x.x[0]+(x.x[1]-x.x[0])*(u._hasNumber||u._hasDelta?1-h.bulletNumberDomainSize:1);(i=k(t,u.gauge.axis))._id=\"xbulletaxis\",i.domain=[S,E],i.setScale(),a=d.calcTicks(i),o=d.makeTransTickFn(i),s=d.getTickSigns(i)[2],c=v.t+v.h,i.visible&&(d.drawTicks(t,i,{vals:\"inside\"===i.ticks?d.clipEnds(i,a):a,layer:p,path:d.makeTickPath(i,c,s),transFn:o}),d.drawLabels(t,i,{vals:a,layer:p,transFn:o,labelFns:d.makeLabelFns(i,c)}));function L(t){t.attr(\"width\",(function(t){return Math.max(0,i.c2p(t.range[1])-i.c2p(t.range[0]))})).attr(\"x\",(function(t){return i.c2p(t.range[0])})).attr(\"y\",(function(t){return.5*(1-t.thickness)*A})).attr(\"height\",(function(t){return t.thickness*A}))}var C=[g].concat(u.gauge.steps),P=f.selectAll(\"g.bg-bullet\").data(C);P.enter().append(\"g\").classed(\"bg-bullet\",!0).append(\"rect\"),P.select(\"rect\").call(L).call(T),P.exit().remove();var I=f.selectAll(\"g.value-bullet\").data([u.gauge.bar]);I.enter().append(\"g\").classed(\"value-bullet\",!0).append(\"rect\"),I.select(\"rect\").attr(\"height\",M).attr(\"y\",(A-M)/2).call(T),w(b)?I.select(\"rect\").transition().duration(b.duration).ease(b.easing).each(\"end\",(function(){_&&_()})).each(\"interrupt\",(function(){_&&_()})).attr(\"width\",Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y)))):I.select(\"rect\").attr(\"width\",\"number\"==typeof r[0].y?Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y))):0);I.exit().remove();var O=r.filter((function(){return u.gauge.threshold.value||0===u.gauge.threshold.value})),z=f.selectAll(\"g.threshold-bullet\").data(O);z.enter().append(\"g\").classed(\"threshold-bullet\",!0).append(\"line\"),z.select(\"line\").attr(\"x1\",i.c2p(u.gauge.threshold.value)).attr(\"x2\",i.c2p(u.gauge.threshold.value)).attr(\"y1\",(1-u.gauge.threshold.thickness)/2*A).attr(\"y2\",(1-(1-u.gauge.threshold.thickness)/2)*A).call(y.stroke,u.gauge.threshold.line.color).style(\"stroke-width\",u.gauge.threshold.line.width),z.exit().remove();var D=f.selectAll(\"g.gauge-outline\").data([m]);D.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"rect\"),D.select(\"rect\").call(L).call(T),D.exit().remove()}(t,0,e,{gauge:X,layer:Z,size:B,gaugeBg:C,gaugeOutline:P,transitionOpts:r,onComplete:m});var J=O.selectAll(\"text.title\").data(e);J.exit().remove(),J.enter().append(\"text\").classed(\"title\",!0),J.attr(\"text-anchor\",(function(){return R?x.right:x[I.title.align]})).text(I.title.text).call(f.font,I.title.font).call(p.convertToTspans,t),J.attr(\"transform\",(function(){var t,e=B.l+B.w*b[I.title.align],r=h.titlePadding,n=f.bBox(J.node());if(z){if(D)if(I.gauge.axis.visible)t=f.bBox(W.node()).top-r-n.bottom;else t=B.t+B.h/2-U/2-n.bottom-r;R&&(t=E-(n.top+n.bottom)/2,e=B.l-h.bulletPadding*B.w)}else t=I._numbersTop-r-n.bottom;return l(e,t)}))}))}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../plots/cartesian/axis_defaults\":556,\"../../plots/cartesian/layout_attributes\":569,\"../../plots/cartesian/position_defaults\":572,\"./constants\":858,\"@plotly/d3\":58,\"d3-interpolate\":116}],862:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../mesh3d/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=t(\"../../plot_api/edit_types\").overrideAll;var u=e.exports=c(l({x:{valType:\"data_array\"},y:{valType:\"data_array\"},z:{valType:\"data_array\"},value:{valType:\"data_array\"},isomin:{valType:\"number\"},isomax:{valType:\"number\"},surface:{show:{valType:\"boolean\",dflt:!0},count:{valType:\"integer\",dflt:2,min:1},fill:{valType:\"number\",min:0,max:1,dflt:1},pattern:{valType:\"flaglist\",flags:[\"A\",\"B\",\"C\",\"D\",\"E\"],extras:[\"all\",\"odd\",\"even\"],dflt:\"all\"}},spaceframe:{show:{valType:\"boolean\",dflt:!1},fill:{valType:\"number\",min:0,max:1,dflt:.15}},slices:{x:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}},y:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}},z:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}},y:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}},z:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}}},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:a(),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),valuehoverformat:i(\"value\",1),showlegend:l({},s.showlegend,{dflt:!1})},n(\"\",{colorAttr:\"`value`\",showScaleDflt:!0,editTypeOverride:\"calc\"}),{opacity:o.opacity,lightposition:o.lightposition,lighting:o.lighting,flatshading:o.flatshading,contour:o.contour,hoverinfo:l({},s.hoverinfo)}),\"calc\",\"nested\");u.flatshading.dflt=!0,u.lighting.facenormalsepsilon.dflt=0,u.x.editType=u.y.editType=u.z.editType=u.value.editType=\"calc+clearAxisTypes\",u.transforms=void 0},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/edit_types\":536,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../mesh3d/attributes\":867}],863:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\"),i=t(\"../streamtube/calc\").processGrid,a=t(\"../streamtube/calc\").filter;e.exports=function(t,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length),e._x=a(e.x,e._len),e._y=a(e.y,e._len),e._z=a(e.z,e._len),e._value=a(e.value,e._len);var r=i(e);e._gridFill=r.fill,e._Xs=r.Xs,e._Ys=r.Ys,e._Zs=r.Zs,e._len=r.len;for(var o=1/0,s=-1/0,l=0;l0;r--){var n=Math.min(e[r],e[r-1]),i=Math.max(e[r],e[r-1]);if(i>n&&n-1}function R(t,e){return null===t?e:t}function F(e,r,n){C();var i,a,o,l=[r],c=[n];if(s>=1)l=[r],c=[n];else if(s>0){var u=function(t,e){var r=t[0],n=t[1],i=t[2],a=function(t,e,r){for(var n=[],i=0;i-1?n[p]:L(d,g,v);h[p]=x>-1?x:I(d,g,v,R(e,y))}i=h[0],a=h[1],o=h[2],t._meshI.push(i),t._meshJ.push(a),t._meshK.push(o),++m}}function B(t,e,r,n){var i=t[3];in&&(i=n);for(var a=(t[3]-i)/(t[3]-e[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*t[s]+a*e[s];return o}function N(t,e,r){return t>=e&&t<=r}function j(t){var e=.001*(E-S);return t>=S-e&&t<=E+e}function U(e){for(var r=[],n=0;n<4;n++){var i=e[n];r.push([t._x[i],t._y[i],t._z[i],t._value[i]])}return r}function V(t,e,r,n,i,a){a||(a=1),r=[-1,-1,-1];var o=!1,s=[N(e[0][3],n,i),N(e[1][3],n,i),N(e[2][3],n,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(t,e,r){return j(e[0][3])&&j(e[1][3])&&j(e[2][3])?(F(t,e,r),!0):a<3&&V(t,e,r,S,E,++a)};if(s[0]&&s[1]&&s[2])return l(t,e,r)||o;var c=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach((function(a){if(s[a[0]]&&s[a[1]]&&!s[a[2]]){var u=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(h,u,n,i),d=B(h,f,n,i);o=l(t,[d,p,u],[-1,-1,r[a[0]]])||o,o=l(t,[u,f,d],[r[a[0]],r[a[1]],-1])||o,c=!0}})),c||[[0,1,2],[1,2,0],[2,0,1]].forEach((function(a){if(s[a[0]]&&!s[a[1]]&&!s[a[2]]){var u=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(f,u,n,i),d=B(h,u,n,i);o=l(t,[d,p,u],[-1,-1,r[a[0]]])||o,c=!0}})),o}function H(t,e,r,n){var i=!1,a=U(e),o=[N(a[0][3],r,n),N(a[1][3],r,n),N(a[2][3],r,n),N(a[3][3],r,n)];if(!(o[0]||o[1]||o[2]||o[3]))return i;if(o[0]&&o[1]&&o[2]&&o[3])return g&&(i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(3,0,1),n(2,3,0),n(1,2,3)}(t,a,e)||i),i;var s=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]];if(g)i=F(t,[c,u,f],[e[l[0]],e[l[1]],e[l[2]]])||i;else{var p=B(h,c,r,n),d=B(h,u,r,n),m=B(h,f,r,n);i=F(null,[p,d,m],[-1,-1,-1])||i}s=!0}})),s?i:([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(f,c,r,n),d=B(f,u,r,n),m=B(h,u,r,n),v=B(h,c,r,n);g?(i=F(t,[c,v,p],[e[l[0]],-1,-1])||i,i=F(t,[u,d,m],[e[l[1]],-1,-1])||i):i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(2,3,0)}(null,[p,d,m,v],[-1,-1,-1,-1])||i,s=!0}})),s||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach((function(l){if(o[l[0]]&&!o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(u,c,r,n),d=B(f,c,r,n),m=B(h,c,r,n);g?(i=F(t,[c,p,d],[e[l[0]],-1,-1])||i,i=F(t,[c,d,m],[e[l[0]],-1,-1])||i,i=F(t,[c,m,p],[e[l[0]],-1,-1])||i):i=F(null,[p,d,m],[-1,-1,-1])||i,s=!0}})),i)}function q(t,e,r,n,i,a,o,s,l,c,u){var f=!1;return d&&(D(t,\"A\")&&(f=H(null,[e,r,n,a],c,u)||f),D(t,\"B\")&&(f=H(null,[r,n,i,l],c,u)||f),D(t,\"C\")&&(f=H(null,[r,a,o,l],c,u)||f),D(t,\"D\")&&(f=H(null,[n,a,s,l],c,u)||f),D(t,\"E\")&&(f=H(null,[r,n,a,l],c,u)||f)),g&&(f=H(t,[r,n,a,l],c,u)||f),f}function G(t,e,r,n,i,a,o,s){return[!0===s[0]||V(t,U([e,r,n]),[e,r,n],a,o),!0===s[1]||V(t,U([n,i,e]),[n,i,e],a,o)]}function Y(t,e,r,n,i,a,o,s,l){return s?G(t,e,r,i,n,a,o,l):G(t,r,i,n,e,a,o,l)}function W(t,e,r,n,i,a,o){var s,l,c,u,f=!1,h=function(){f=V(t,[s,l,c],[-1,-1,-1],i,a)||f,f=V(t,[c,u,s],[-1,-1,-1],i,a)||f},p=o[0],d=o[1],g=o[2];return p&&(s=O(U([k(e,r-0,n-0)])[0],U([k(e-1,r-0,n-0)])[0],p),l=O(U([k(e,r-0,n-1)])[0],U([k(e-1,r-0,n-1)])[0],p),c=O(U([k(e,r-1,n-1)])[0],U([k(e-1,r-1,n-1)])[0],p),u=O(U([k(e,r-1,n-0)])[0],U([k(e-1,r-1,n-0)])[0],p),h()),d&&(s=O(U([k(e-0,r,n-0)])[0],U([k(e-0,r-1,n-0)])[0],d),l=O(U([k(e-0,r,n-1)])[0],U([k(e-0,r-1,n-1)])[0],d),c=O(U([k(e-1,r,n-1)])[0],U([k(e-1,r-1,n-1)])[0],d),u=O(U([k(e-1,r,n-0)])[0],U([k(e-1,r-1,n-0)])[0],d),h()),g&&(s=O(U([k(e-0,r-0,n)])[0],U([k(e-0,r-0,n-1)])[0],g),l=O(U([k(e-0,r-1,n)])[0],U([k(e-0,r-1,n-1)])[0],g),c=O(U([k(e-1,r-1,n)])[0],U([k(e-1,r-1,n-1)])[0],g),u=O(U([k(e-1,r-0,n)])[0],U([k(e-1,r-0,n-1)])[0],g),h()),f}function X(t,e,r,n,i,a,o,s,l,c,u,f){var h=t;return f?(d&&\"even\"===t&&(h=null),q(h,e,r,n,i,a,o,s,l,c,u)):(d&&\"odd\"===t&&(h=null),q(h,l,s,o,a,i,n,r,e,c,u))}function Z(t,e,r,n,i){for(var a=[],o=0,s=0;sMath.abs(d-M)?[A,d]:[d,M];$(e,T[0],T[1])}}var L=[[Math.min(S,M),Math.max(S,M)],[Math.min(A,E),Math.max(A,E)]];[\"x\",\"y\",\"z\"].forEach((function(e){for(var r=[],n=0;n0&&(u.push(p.id),\"x\"===e?f.push([p.distRatio,0,0]):\"y\"===e?f.push([0,p.distRatio,0]):f.push([0,0,p.distRatio]))}else c=nt(1,\"x\"===e?b-1:\"y\"===e?_-1:w-1);u.length>0&&(r[i]=\"x\"===e?tt(null,u,a,o,f,r[i]):\"y\"===e?et(null,u,a,o,f,r[i]):rt(null,u,a,o,f,r[i]),i++),c.length>0&&(r[i]=\"x\"===e?Z(null,c,a,o,r[i]):\"y\"===e?J(null,c,a,o,r[i]):K(null,c,a,o,r[i]),i++)}var d=t.caps[e];d.show&&d.fill&&(z(d.fill),r[i]=\"x\"===e?Z(null,[0,b-1],a,o,r[i]):\"y\"===e?J(null,[0,_-1],a,o,r[i]):K(null,[0,w-1],a,o,r[i]),i++)}})),0===m&&P(),t._meshX=n,t._meshY=i,t._meshZ=a,t._meshIntensity=o,t._Xs=v,t._Ys=y,t._Zs=x}(),t}e.exports={findNearestOnAxis:l,generateIsoMeshes:h,createIsosurfaceTrace:function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new c(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}}},{\"../../../stackgl_modules\":1120,\"../../components/colorscale\":378,\"../../lib/gl_format_color\":499,\"../../lib/str2rgbarray\":528,\"../../plots/gl3d/zip3\":609}],865:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"./attributes\"),o=t(\"../../components/colorscale/defaults\");function s(t,e,r,n,a){var s=a(\"isomin\"),l=a(\"isomax\");null!=l&&null!=s&&s>l&&(e.isomin=null,e.isomax=null);var c=a(\"x\"),u=a(\"y\"),f=a(\"z\"),h=a(\"value\");c&&c.length&&u&&u.length&&f&&f.length&&h&&h.length?(i.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\",\"z\"],n),a(\"valuehoverformat\"),[\"x\",\"y\",\"z\"].forEach((function(t){a(t+\"hoverformat\");var e=\"caps.\"+t;a(e+\".show\")&&a(e+\".fill\");var r=\"slices.\"+t;a(r+\".show\")&&(a(r+\".fill\"),a(r+\".locations\"))})),a(\"spaceframe.show\")&&a(\"spaceframe.fill\"),a(\"surface.show\")&&(a(\"surface.count\"),a(\"surface.fill\"),a(\"surface.pattern\")),a(\"contour.show\")&&(a(\"contour.color\"),a(\"contour.width\")),[\"text\",\"hovertext\",\"hovertemplate\",\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lighting.vertexnormalsepsilon\",\"lighting.facenormalsepsilon\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"flatshading\",\"opacity\"].forEach((function(t){a(t)})),o(t,e,n,a,{prefix:\"\",cLetter:\"c\"}),e._length=null):e.visible=!1}e.exports={supplyDefaults:function(t,e,r,i){s(t,e,r,i,(function(r,i){return n.coerce(t,e,a,r,i)}))},supplyIsoDefaults:s}},{\"../../components/colorscale/defaults\":376,\"../../lib\":503,\"../../registry\":638,\"./attributes\":862}],866:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,calc:t(\"./calc\"),colorbar:{min:\"cmin\",max:\"cmax\"},plot:t(\"./convert\").createIsosurfaceTrace,moduleType:\"trace\",name:\"isosurface\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"showLegend\"],meta:{}}},{\"../../plots/gl3d\":598,\"./attributes\":862,\"./calc\":863,\"./convert\":864,\"./defaults\":865}],867:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../surface/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat;e.exports=l({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\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:a({editType:\"calc\"}),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),delaunayaxis:{valType:\"enumerated\",values:[\"x\",\"y\",\"z\"],dflt:\"z\",editType:\"calc\"},alphahull:{valType:\"number\",dflt:-1,editType:\"calc\"},intensity:{valType:\"data_array\",editType:\"calc\"},intensitymode:{valType:\"enumerated\",values:[\"vertex\",\"cell\"],dflt:\"vertex\",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\"}),{opacity:o.opacity,flatshading:{valType:\"boolean\",dflt:!1,editType:\"calc\"},contour:{show:l({},o.contours.x.show,{}),color:o.contours.x.color,width:o.contours.x.width,editType:\"calc\"},lightposition:{x:l({},o.lightposition.x,{dflt:1e5}),y:l({},o.lightposition.y,{dflt:1e5}),z:l({},o.lightposition.z,{dflt:0}),editType:\"calc\"},lighting:l({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\"},o.lighting),hoverinfo:l({},s.hoverinfo,{editType:\"calc\"}),showlegend:l({},s.showlegend,{dflt:!1})})},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../surface/attributes\":1057}],868:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.intensity&&n(t,e,{vals:e.intensity,containerStr:\"\",cLetter:\"c\"})}},{\"../../components/colorscale/calc\":374}],869:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_mesh3d,i=t(\"../../../stackgl_modules\").delaunay_triangulate,a=t(\"../../../stackgl_modules\").alpha_shape,o=t(\"../../../stackgl_modules\").convex_hull,s=t(\"../../lib/gl_format_color\").parseColorScale,l=t(\"../../lib/str2rgbarray\"),c=t(\"../../components/colorscale\").extractOpts,u=t(\"../../plots/gl3d/zip3\");function f(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name=\"\",this.color=\"#fff\",this.data=null,this.showContour=!1}var h=f.prototype;function p(t){for(var e=[],r=t.length,n=0;n=e-.5)return!1;return!0}h.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.data._cellCenter?t.traceCoordinate=t.data.dataCoordinate:t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},h.update=function(t){var e=this.scene,r=e.fullSceneLayout;this.data=t;var n,f=t.x.length,h=u(d(r.xaxis,t.x,e.dataScale[0],t.xcalendar),d(r.yaxis,t.y,e.dataScale[1],t.ycalendar),d(r.zaxis,t.z,e.dataScale[2],t.zcalendar));if(t.i&&t.j&&t.k){if(t.i.length!==t.j.length||t.j.length!==t.k.length||!m(t.i,f)||!m(t.j,f)||!m(t.k,f))return;n=u(g(t.i),g(t.j),g(t.k))}else n=0===t.alphahull?o(h):t.alphahull>0?a(t.alphahull,h):function(t,e){for(var r=[\"x\",\"y\",\"z\"].indexOf(t),n=[],a=e.length,o=0;ov):m=A>w,v=A;var M=c(w,T,k,A);M.pos=_,M.yc=(w+A)/2,M.i=b,M.dir=m?\"increasing\":\"decreasing\",M.x=M.pos,M.y=[k,T],y&&(M.orig_p=r[b]),d&&(M.tx=e.text[b]),g&&(M.htx=e.hovertext[b]),x.push(M)}else x.push({pos:_,empty:!0})}return e._extremes[l._id]=a.findExtremes(l,n.concat(h,f),{padded:!0}),x.length&&(x[0].t={labels:{open:i(t,\"open:\")+\" \",high:i(t,\"high:\")+\" \",low:i(t,\"low:\")+\" \",close:i(t,\"close:\")+\" \"}}),x}e.exports={calc:function(t,e){var r=a.getFromId(t,e.xaxis),i=a.getFromId(t,e.yaxis),s=function(t,e,r){var i=r._minDiff;if(!i){var a,s=t._fullData,l=[];for(i=1/0,a=0;a\"+c.labels[x]+n.hoverLabelText(s,b,l.yhoverformat):((y=i.extendFlat({},h)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=c.labels[x]+n.hoverLabelText(s,b,l.yhoverformat),y.name=\"\",f.push(y),m[b]=y)}return f}function h(t,e,r,i){var a=t.cd,o=t.ya,l=a[0].trace,f=a[0].t,h=u(t,e,r,i);if(!h)return[];var p=a[h.index],d=h.index=p.i,g=p.dir;function m(t){return f.labels[t]+n.hoverLabelText(o,l[t][d],l.yhoverformat)}var v=p.hi||l.hoverinfo,y=v.split(\"+\"),x=\"all\"===v,b=x||-1!==y.indexOf(\"y\"),_=x||-1!==y.indexOf(\"text\"),w=b?[m(\"open\"),m(\"high\"),m(\"low\"),m(\"close\")+\" \"+c[g]]:[];return _&&s(p,l,w),h.extraText=w.join(\"
\"),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?f(t,e,r,n):h(t,e,r,n)},hoverSplit:f,hoverOnPoints:h}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../constants/delta.js\":473,\"../../lib\":503,\"../../plots/cartesian/axes\":554}],876:[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\":568,\"./attributes\":872,\"./calc\":873,\"./defaults\":874,\"./hover\":875,\"./plot\":878,\"./select\":879,\"./style\":880}],877:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o=r(\"x\"),s=r(\"open\"),l=r(\"high\"),c=r(\"low\"),u=r(\"close\");if(r(\"hoverlabel.split\"),n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\"],a),s&&l&&c&&u){var f=Math.min(s.length,l.length,c.length,u.length);return o&&(f=Math.min(f,i.minRowLength(o))),e._length=f,f}}},{\"../../lib\":503,\"../../registry\":638}],878:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o=e.yaxis,s=e.xaxis,l=!!s.rangebreaks;i.makeTraceGroups(a,r,\"trace ohlc\").each((function(t){var e=n.select(this),r=t[0],a=r.t;if(!0!==r.trace.visible||a.empty)e.remove();else{var c=a.tickLen,u=e.selectAll(\"path\").data(i.identity);u.enter().append(\"path\"),u.exit().remove(),u.attr(\"d\",(function(t){if(t.empty)return\"M0,0Z\";var e=s.c2p(t.pos-c,!0),r=s.c2p(t.pos+c,!0),n=l?(e+r)/2:s.c2p(t.pos,!0);return\"M\"+e+\",\"+o.c2p(t.o,!0)+\"H\"+n+\"M\"+n+\",\"+o.c2p(t.h,!0)+\"V\"+o.c2p(t.l,!0)+\"M\"+r+\",\"+o.c2p(t.c,!0)+\"H\"+n}))}}))}},{\"../../lib\":503,\"@plotly/d3\":58}],879:[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=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;e0;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\"),s(\"line.hovertemplate\");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(\"hovertemplate\"),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 m={family:f.font.family,size:Math.round(f.font.size/1.2),color:f.font.color};n.coerceFont(h,\"tickfont\",m)}},{\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503,\"../../plots/array_container_defaults\":549,\"../../plots/domain\":584,\"../parcoords/merge_length\":897,\"./attributes\":881}],885:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcats\",basePlotModule:t(\"./base_plot\"),categories:[\"noOpacity\"],meta:{}}},{\"./attributes\":881,\"./base_plot\":882,\"./calc\":883,\"./defaults\":884,\"./plot\":887}],886:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-interpolate\").interpolateNumber,a=t(\"../../plot_api/plot_api\"),o=t(\"../../components/fx\"),s=t(\"../../lib\"),l=s.strTranslate,c=t(\"../../components/drawing\"),u=t(\"tinycolor2\"),f=t(\"../../lib/svg_text_utils\");function h(t,e,r,i){var a=t.map(F.bind(0,e,r)),o=i.selectAll(\"g.parcatslayer\").data([null]);o.enter().append(\"g\").attr(\"class\",\"parcatslayer\").style(\"pointer-events\",\"all\");var u=o.selectAll(\"g.trace.parcats\").data(a,p),h=u.enter().append(\"g\").attr(\"class\",\"trace parcats\");u.attr(\"transform\",(function(t){return l(t.x,t.y)})),h.append(\"g\").attr(\"class\",\"paths\");var y=u.select(\"g.paths\").selectAll(\"path.path\").data((function(t){return t.paths}),p);y.attr(\"fill\",(function(t){return t.model.color}));var x=y.enter().append(\"path\").attr(\"class\",\"path\").attr(\"stroke-opacity\",0).attr(\"fill\",(function(t){return t.model.color})).attr(\"fill-opacity\",0);_(x),y.attr(\"d\",(function(t){return t.svgD})),x.empty()||y.sort(g),y.exit().remove(),y.on(\"mouseover\",m).on(\"mouseout\",v).on(\"click\",b),h.append(\"g\").attr(\"class\",\"dimensions\");var w=u.select(\"g.dimensions\").selectAll(\"g.dimension\").data((function(t){return t.dimensions}),p);w.enter().append(\"g\").attr(\"class\",\"dimension\"),w.attr(\"transform\",(function(t){return l(t.x,0)})),w.exit().remove();var A=w.selectAll(\"g.category\").data((function(t){return t.categories}),p),M=A.enter().append(\"g\").attr(\"class\",\"category\");A.attr(\"transform\",(function(t){return l(0,t.y)})),M.append(\"rect\").attr(\"class\",\"catrect\").attr(\"pointer-events\",\"none\"),A.select(\"rect.catrect\").attr(\"fill\",\"none\").attr(\"width\",(function(t){return t.width})).attr(\"height\",(function(t){return t.height})),T(M);var S=A.selectAll(\"rect.bandrect\").data((function(t){return t.bands}),p);S.each((function(){s.raiseToTop(this)})),S.attr(\"fill\",(function(t){return t.color}));var E=S.enter().append(\"rect\").attr(\"class\",\"bandrect\").attr(\"stroke-opacity\",0).attr(\"fill\",(function(t){return t.color})).attr(\"fill-opacity\",0);S.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\"})),k(E),S.exit().remove(),M.append(\"text\").attr(\"class\",\"catlabel\").attr(\"pointer-events\",\"none\");var z=e._fullLayout.paper_bgcolor;A.select(\"text.catlabel\").attr(\"text-anchor\",(function(t){return d(t)?\"start\":\"end\"})).attr(\"alignment-baseline\",\"middle\").style(\"text-shadow\",f.makeTextShadow(z)).style(\"fill\",\"rgb(0, 0, 0)\").attr(\"x\",(function(t){return d(t)?t.width+5:-5})).attr(\"y\",(function(t){return t.height/2})).text((function(t){return t.model.categoryLabel})).each((function(t){c.font(n.select(this),t.parcatsViewModel.categorylabelfont),f.convertToTspans(n.select(this),e)})),M.append(\"text\").attr(\"class\",\"dimlabel\"),A.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){c.font(n.select(this),t.parcatsViewModel.labelfont)})),A.selectAll(\"rect.bandrect\").on(\"mouseover\",L).on(\"mouseout\",C),A.exit().remove(),w.call(n.behavior.drag().origin((function(t){return{x:t.x,y:0}})).on(\"dragstart\",P).on(\"drag\",I).on(\"dragend\",O)),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 p(t){return t.key}function d(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function g(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor\"),L=n.mouse(f)[0];o.loneHover({trace:h,x:b-d.left+g.left,y:_-d.top+g.top,text:E,color:t.model.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:10,fontColor:T,idealAlign:L1&&h.displayInd===f.dimensions.length-1?(i=c.left,a=\"left\"):(i=c.left+c.width,a=\"right\");var g=u.model.count,m=u.model.categoryLabel,v=g/u.parcatsViewModel.model.count,y={countLabel:g,categoryLabel:m,probabilityLabel:v.toFixed(3)},x=[];-1!==u.parcatsViewModel.hoverinfoItems.indexOf(\"count\")&&x.push([\"Count:\",y.countLabel].join(\" \")),-1!==u.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")&&x.push([\"P(\"+y.categoryLabel+\"):\",y.probabilityLabel].join(\" \"));var b=x.join(\"
\");return{trace:p,x:o*(i-e.left),y:s*(d-e.top),text:b,color:\"lightgray\",borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:12,fontColor:\"black\",idealAlign:a,hovertemplate:p.hovertemplate,hovertemplateLabels:y,eventData:[{data:p._input,fullData:p,count:g,category:m,probability:v}]}}function L(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,a=i._paperdiv.node().getBoundingClientRect(),l=t.parcatsViewModel.hoveron;if(\"color\"===l?(!function(t){var e=n.select(t).datum(),r=A(e);w(r),r.each((function(){s.raiseToTop(this)})),n.select(t.parentNode).selectAll(\"rect.bandrect\").filter((function(t){return t.color===e.color})).each((function(){s.raiseToTop(this),n.select(this).attr(\"stroke\",\"black\").attr(\"stroke-width\",1.5)}))}(this),S(this,\"plotly_hover\",n.event)):(!function(t){n.select(t.parentNode).selectAll(\"rect.bandrect\").each((function(t){var e=A(t);w(e),e.each((function(){s.raiseToTop(this)}))})),n.select(t.parentNode).select(\"rect.catrect\").attr(\"stroke\",\"black\").attr(\"stroke-width\",2.5)}(this),M(this,\"plotly_hover\",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf(\"none\"))\"category\"===l?e=E(r,a,this):\"color\"===l?e=function(t,e,r){t._fullLayout._calcInverseTransform(t);var i,a,o=t._fullLayout._invScaleX,s=t._fullLayout._invScaleY,l=r.getBoundingClientRect(),c=n.select(r).datum(),f=c.categoryViewModel,h=f.parcatsViewModel,p=h.model.dimensions[f.model.dimensionInd],d=h.trace,g=l.y+l.height/2;h.dimensions.length>1&&p.displayInd===h.dimensions.length-1?(i=l.left,a=\"left\"):(i=l.left+l.width,a=\"right\");var m=f.model.categoryLabel,v=c.parcatsViewModel.model.count,y=0;c.categoryViewModel.bands.forEach((function(t){t.color===c.color&&(y+=t.count)}));var x=f.model.count,b=0;h.pathSelection.each((function(t){t.model.color===c.color&&(b+=t.model.count)}));var _=y/v,w=y/b,T=y/x,k={countLabel:v,categoryLabel:m,probabilityLabel:_.toFixed(3)},A=[];-1!==f.parcatsViewModel.hoverinfoItems.indexOf(\"count\")&&A.push([\"Count:\",k.countLabel].join(\" \")),-1!==f.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")&&(A.push(\"P(color \\u2229 \"+m+\"): \"+k.probabilityLabel),A.push(\"P(\"+m+\" | color): \"+w.toFixed(3)),A.push(\"P(color | \"+m+\"): \"+T.toFixed(3)));var M=A.join(\"
\"),S=u.mostReadable(c.color,[\"black\",\"white\"]);return{trace:d,x:o*(i-e.left),y:s*(g-e.top),text:M,color:c.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontColor:S,fontSize:10,idealAlign:a,hovertemplate:d.hovertemplate,hovertemplateLabels:k,eventData:[{data:d._input,fullData:d,category:m,count:v,probability:_,categorycount:x,colorcount:b,bandcolorcount:y}]}}(r,a,this):\"dimension\"===l&&(e=function(t,e,r){var i=[];return n.select(r.parentNode.parentNode).selectAll(\"g.category\").select(\"rect.catrect\").each((function(){i.push(E(t,e,this))})),i}(r,a,this)),e&&o.loneHover(e,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r})}}function C(t){var e=t.parcatsViewModel;if(!e.dragDimension&&(_(e.pathSelection),T(e.dimensionSelection.selectAll(\"g.category\")),k(e.dimensionSelection.selectAll(\"g.category\").selectAll(\"rect.bandrect\")),o.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(g),-1===e.hoverinfoItems.indexOf(\"skip\"))){\"color\"===t.parcatsViewModel.hoveron?S(this,\"plotly_unhover\",n.event):M(this,\"plotly_unhover\",n.event)}}function P(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,s.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll(\"rect.bandrect\").each((function(e){e.yf.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.dragXp.x&&(a.model.displayInd=p.model.displayInd,p.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=a.model.displayInd}j(t.parcatsViewModel),N(t.parcatsViewModel),R(t.parcatsViewModel),D(t.parcatsViewModel)}}function O(t){if(\"fixed\"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll(\"text\").attr(\"font-weight\",\"normal\");var e={},r=z(t.parcatsViewModel),i=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),o=t.initialDragDimensionDisplayInds.some((function(t,e){return t!==i[e]}));o&&i.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?S(t.potentialClickBand,\"plotly_click\",n.event.sourceEvent):M(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,j(t.parcatsViewModel),N(t.parcatsViewModel),n.transition().duration(300).ease(\"cubic-in-out\").each((function(){R(t.parcatsViewModel,!0),D(t.parcatsViewModel,!0)})).each(\"end\",(function(){(o||s)&&a.restyle(t.parcatsViewModel.graphDiv,e,[r])}))}}function z(t){for(var e,r=t.graphDiv._fullData,n=0;n=0;s--)u+=\"C\"+c[s]+\",\"+(e[s+1]+n)+\" \"+l[s]+\",\"+(e[s]+n)+\" \"+(t[s]+r[s])+\",\"+(e[s]+n),u+=\"l-\"+r[s]+\",0 \";return u+=\"Z\"}function N(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)),ni?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;g0?d*(v.count/p):0;for(var y,x=new Array(n.length),b=0;b1?(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,m=e.categories.map((function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}}));for(m.sort((function(t,e){return t.displayInd-e.displayInd})),c=0;c0?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){h(r,t,n,e)}},{\"../../components/drawing\":388,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plot_api/plot_api\":540,\"@plotly/d3\":58,\"d3-interpolate\":116,tinycolor2:312}],887:[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\":886}],888:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/layout_attributes\"),a=t(\"../../plots/font_attributes\"),o=t(\"../../plots/domain\").attributes,s=t(\"../../lib/extend\").extendFlat,l=t(\"../../plot_api/plot_template\").templatedArray;e.exports={domain:o({name:\"parcoords\",trace:!0,editType:\"plot\"}),labelangle:{valType:\"angle\",dflt:0,editType:\"plot\"},labelside:{valType:\"enumerated\",values:[\"top\",\"bottom\"],dflt:\"top\",editType:\"plot\"},labelfont:a({editType:\"plot\"}),tickfont:a({editType:\"plot\"}),rangefont:a({editType:\"plot\"}),dimensions:l(\"dimension\",{label:{valType:\"string\",editType:\"plot\"},tickvals:s({},i.tickvals,{editType:\"plot\"}),ticktext:s({},i.ticktext,{editType:\"plot\"}),tickformat:s({},i.tickformat,{editType:\"plot\"}),visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},range:{valType:\"info_array\",items:[{valType:\"number\",editType:\"plot\"},{valType:\"number\",editType:\"plot\"}],editType:\"plot\"},constraintrange:{valType:\"info_array\",freeLength:!0,dimensions:\"1-2\",items:[{valType:\"any\",editType:\"plot\"},{valType:\"any\",editType:\"plot\"}],editType:\"plot\"},multiselect:{valType:\"boolean\",dflt:!0,editType:\"plot\"},values:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\"}),line:s({editType:\"calc\"},n(\"line\",{colorscaleDflt:\"Viridis\",autoColorDflt:!1,editTypeOverride:\"calc\"}))}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/plot_template\":543,\"../../plots/cartesian/layout_attributes\":569,\"../../plots/domain\":584,\"../../plots/font_attributes\":585}],889:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"@plotly/d3\"),a=t(\"../../lib/gup\").keyFun,o=t(\"../../lib/gup\").repeat,s=t(\"../../lib\").sorterAsc,l=t(\"../../lib\").strTranslate,c=n.bar.snapRatio;function u(t,e){return t*(1-c)+e*c}var f=n.bar.snapClose;function h(t,e){return t*(1-f)+e*f}function p(t,e,r,n){if(function(t,e){for(var r=0;r=e[r][0]&&t<=e[r][1])return!0;return!1}(r,n))return r;var i=t?-1:1,a=0,o=e.length-1;if(i<0){var s=a;a=o,o=s}for(var l=e[a],c=l,f=a;i*fe){h=r;break}}if(a=u,isNaN(a)&&(a=isNaN(f)||isNaN(h)?isNaN(f)?h:f:e-c[f][1]t[1]+r||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 m=t.unitTickvals,y=t.unitToPaddedPx.invert(e);for(r=0;r=x[0]&&y<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function w(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[r-a.grabPoint,r+a.barLength-a.grabPoint].map(e.unitToPaddedPx.invert):a.newExtent=[a.startExtent,e.unitToPaddedPx.invert(r)].sort(s),e.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(e),b(t.parentNode)}function T(t,e){var r=_(e,e.height-i.mouse(t)[1]-2*n.verticalPadding),a=\"crosshair\";r.clickableOrdinalRange?a=\"pointer\":r.region&&(a=r.region+\"-resize\"),i.select(document.body).style(\"cursor\",a)}function k(t){t.on(\"mousemove\",(function(t){i.event.preventDefault(),t.parent.inBrushDrag||T(this,t)})).on(\"mouseleave\",(function(t){t.parent.inBrushDrag||y()})).call(i.behavior.drag().on(\"dragstart\",(function(t){!function(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.unitToPaddedPx.invert(r),o=e.brush,s=_(e,r),l=s.interval,c=o.svgBrush;if(c.wasDragged=!1,c.grabbingBar=\"ns\"===s.region,c.grabbingBar){var u=l.map(e.unitToPaddedPx);c.grabPoint=r-u[0]-n.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=e.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter((function(t){return t[0]!==l[0]&&t[1]!==l[1]}))),c.startExtent=s.region?l[\"s\"===s.region?1:0]:a,e.parent.inBrushDrag=!0,c.brushStartCallback()}(this,t)})).on(\"drag\",(function(t){w(this,t)})).on(\"dragend\",(function(t){!function(t,e){var r=e.brush,n=r.filter,a=r.svgBrush;a._dragging||(T(t,e),w(t,e),e.brush.svgBrush.wasDragged=!1),a._dragging=!1,i.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,e.parent.inBrushDrag=!1,y(),!a.wasDragged)return a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&e.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&M(r)):M(r),a.brushCallback(e),b(t.parentNode),void a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(e.ordinal){var l=e.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(c?[a.newExtent]:[]),a.extent.length||M(r),a.brushCallback(e),c?b(t.parentNode,s):(s(),b(t.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,t)})))}function A(t,e){return t[0]-e[0]}function M(t){t.filterSpecified=!1,t.svgBrush.extent=[[-1/0,1/0]]}function S(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 1===n.length&&n[0][0]>n[0][1]&&(n=[]),n}e.exports={makeBrush:function(t,e,r,n,i,a){var o,l=function(){var t,e,r=[];return{set:function(n){1===(r=n.map((function(t){return t.slice().sort(s)})).sort(A)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),t=S(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,e){var r=t.selectAll(\".\"+n.cn.axisBrush).data(o,a);r.enter().append(\"g\").classed(n.cn.axisBrush,!0),function(t,e){var r=t.selectAll(\".background\").data(o);r.enter().append(\"rect\").classed(\"background\",!0).call(d).call(g).style(\"pointer-events\",\"auto\").attr(\"transform\",l(0,n.verticalPadding)),r.call(k).attr(\"height\",(function(t){return t.height-n.verticalPadding}));var i=t.selectAll(\".highlight-shadow\").data(o);i.enter().append(\"line\").classed(\"highlight-shadow\",!0).attr(\"x\",-n.bar.width/2).attr(\"stroke-width\",n.bar.width+n.bar.strokeWidth).attr(\"stroke\",e).attr(\"opacity\",n.bar.strokeOpacity).attr(\"stroke-linecap\",\"butt\"),i.attr(\"y1\",(function(t){return t.height})).call(x);var a=t.selectAll(\".highlight\").data(o);a.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\"),a.attr(\"y1\",(function(t){return t.height})).call(x)}(r,e)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map((function(t){return t.sort(s)})),t=e.multiselect?S(t.sort(A)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map((function(t){var e=[p(0,r,t[0],[]),p(1,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\":503,\"../../lib/gup\":500,\"./constants\":892,\"@plotly/d3\":58}],890:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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.style.width,height:this.style.height})})),window.setTimeout((function(){n.selectAll(\"#filterBarPattern\").attr(\"id\",\"filterBarPattern\")}),60)}},{\"../../constants/xmlns_namespaces\":480,\"../../plots/get_data\":593,\"./plot\":899,\"@plotly/d3\":58}],891:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray,i=t(\"../../components/colorscale\"),a=t(\"../../lib/gup\").wrap;e.exports=function(t,e){var r,o;return i.hasColorscale(e,\"line\")&&n(e.line.color)?(r=e.line.color,o=i.extractOpts(e.line).colorscale,i.calc(t,e,{vals:r,containerStr:\"line\",cLetter:\"c\"})):(r=function(t){for(var e=new Array(t),r=0;rf&&(n.log(\"parcoords traces support up to \"+f+\" dimensions at the moment\"),d.splice(f));var g=s(t,e,{name:\"dimensions\",layout:l,handleItemDefaults:p}),m=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,l,u);o(e,l,u),Array.isArray(g)&&g.length||(e.visible=!1),h(e,g,\"values\",m);var v={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(u,\"labelfont\",v),n.coerceFont(u,\"tickfont\",v),n.coerceFont(u,\"rangefont\",v),u(\"labelangle\"),u(\"labelside\")}},{\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503,\"../../plots/array_container_defaults\":549,\"../../plots/cartesian/axes\":554,\"../../plots/domain\":584,\"./attributes\":888,\"./axisbrush\":889,\"./constants\":892,\"./merge_length\":897}],894:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isTypedArray;r.convertTypedArray=function(t){return n(t)?Array.prototype.slice.call(t):t},r.isOrdinal=function(t){return!!t.tickvals},r.isVisible=function(t){return t.visible||!(\"visible\"in t)}},{\"../../lib\":503}],895:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcoords\",basePlotModule:t(\"./base_plot\"),categories:[\"gl\",\"regl\",\"noOpacity\",\"noHover\"],meta:{}}},{\"./attributes\":888,\"./base_plot\":890,\"./calc\":891,\"./defaults\":893,\"./plot\":899}],896:[function(t,e,r){\"use strict\";var n=t(\"glslify\"),i=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nattribute vec4 p01_04, p05_08, p09_12, p13_16,\\n p17_20, p21_24, p25_28, p29_32,\\n p33_36, p37_40, p41_44, p45_48,\\n p49_52, p53_56, p57_60, colors;\\n\\nuniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,\\n loA, hiA, loB, hiB, loC, hiC, loD, hiD;\\n\\nuniform vec2 resolution, viewBoxPos, viewBoxSize;\\nuniform float maskHeight;\\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\\nuniform vec4 contextColor;\\nuniform sampler2D maskTexture, palette;\\n\\nbool isPick = (drwLayer > 1.5);\\nbool isContext = (drwLayer < 0.5);\\n\\nconst vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);\\nconst vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);\\n\\nfloat val(mat4 p, mat4 v) {\\n return dot(matrixCompMult(p, v) * UNITS, UNITS);\\n}\\n\\nfloat axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {\\n float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);\\n float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);\\n return y1 * (1.0 - ratio) + y2 * ratio;\\n}\\n\\nint iMod(int a, int b) {\\n return a - b * (a / b);\\n}\\n\\nbool fOutside(float p, float lo, float hi) {\\n return (lo < hi) && (lo > p || p > hi);\\n}\\n\\nbool vOutside(vec4 p, vec4 lo, vec4 hi) {\\n return (\\n fOutside(p[0], lo[0], hi[0]) ||\\n fOutside(p[1], lo[1], hi[1]) ||\\n fOutside(p[2], lo[2], hi[2]) ||\\n fOutside(p[3], lo[3], hi[3])\\n );\\n}\\n\\nbool mOutside(mat4 p, mat4 lo, mat4 hi) {\\n return (\\n vOutside(p[0], lo[0], hi[0]) ||\\n vOutside(p[1], lo[1], hi[1]) ||\\n vOutside(p[2], lo[2], hi[2]) ||\\n vOutside(p[3], lo[3], hi[3])\\n );\\n}\\n\\nbool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {\\n return mOutside(A, loA, hiA) ||\\n mOutside(B, loB, hiB) ||\\n mOutside(C, loC, hiC) ||\\n mOutside(D, loD, hiD);\\n}\\n\\nbool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {\\n mat4 pnts[4];\\n pnts[0] = A;\\n pnts[1] = B;\\n pnts[2] = C;\\n pnts[3] = D;\\n\\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 if(0 == iMod(\\n int(255.0 * texture2D(maskTexture,\\n vec2(\\n (float(i * 2 + j / 2) + 0.5) / 8.0,\\n (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight\\n ))[3]\\n ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),\\n 2\\n )) return true;\\n }\\n }\\n }\\n return false;\\n}\\n\\nvec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {\\n float x = 0.5 * sign(v) + 0.5;\\n float y = axisY(x, A, B, C, D);\\n float z = 1.0 - abs(v);\\n\\n z += isContext ? 0.0 : 2.0 * float(\\n outsideBoundingBox(A, B, C, D) ||\\n outsideRasterMask(A, B, C, D)\\n );\\n\\n return vec4(\\n 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,\\n z,\\n 1.0\\n );\\n}\\n\\nvoid main() {\\n mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);\\n mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);\\n mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);\\n mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);\\n\\n float v = colors[3];\\n\\n gl_Position = position(isContext, v, A, B, C, D);\\n\\n fragColor =\\n isContext ? vec4(contextColor) :\\n isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));\\n}\\n\"]),a=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n gl_FragColor = fragColor;\\n}\\n\"]),o=t(\"./constants\").maxDimensionCount,s=t(\"../../lib\"),l=new Uint8Array(4),c=new Uint8Array(4),u={shape:[256,1],format:\"rgba\",type:\"uint8\",mag:\"nearest\",min:\"nearest\"};function f(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 h(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:l})}(t),r.drawCompleted=!0),function s(l){var c=Math.min(n,i-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],f(t,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),r.clearOnly||(a.count=2*c,a.offset=2*l*n,e(a),l*n+c>>8*e)%256/255}function g(t,e,r){for(var n=new Array(8*e),i=0,a=0;au&&(u=t[i].dim1.canvasX,o=i);0===s&&f(T,0,0,r.canvasWidth,r.canvasHeight);var p=function(t){var e,r,n,i=[[],[]];for(n=0;n<64;n++){var a=!t&&no._length&&(S=S.slice(0,o._length));var L,C=o.tickvals;function P(t,e){return{val:t,text:L[e]}}function I(t,e){return t.val-e.val}if(Array.isArray(C)&&C.length){L=o.ticktext,Array.isArray(L)&&L.length?L.length>C.length?L=L.slice(0,C.length):C.length>L.length&&(C=C.slice(0,L.length)):L=C.map(a(o.tickformat));for(var O=1;O=r||l>=i)return;var c=t.lineLayer.readPixel(s,i-1-l),u=0!==c[3],f=u?c[2]+256*(c[1]+256*c[0]):null,h={x:s,y:l,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:f};f!==B&&(u?a.hover(h):a.unhover&&a.unhover(h),B=f)}})),F.style(\"opacity\",(function(t){return t.pick?0:1})),h.style(\"background\",\"rgba(255, 255, 255, 0)\");var N=h.selectAll(\".\"+y.cn.parcoords).data(R,d);N.exit().remove(),N.enter().append(\"g\").classed(y.cn.parcoords,!0).style(\"shape-rendering\",\"crispEdges\").style(\"pointer-events\",\"none\"),N.attr(\"transform\",(function(t){return c(t.model.translateX,t.model.translateY)}));var j=N.selectAll(\".\"+y.cn.parcoordsControlView).data(g,d);j.enter().append(\"g\").classed(y.cn.parcoordsControlView,!0),j.attr(\"transform\",(function(t){return c(t.model.pad.l,t.model.pad.t)}));var U=j.selectAll(\".\"+y.cn.yAxis).data((function(t){return t.dimensions}),d);U.enter().append(\"g\").classed(y.cn.yAxis,!0),j.each((function(t){O(U,t,_)})),F.each((function(t){if(t.viewModel){!t.lineLayer||a?t.lineLayer=b(this,t):t.lineLayer.update(t),(t.key||0===t.key)&&(t.viewModel[t.key]=t.lineLayer);var e=!t.context||a;t.lineLayer.render(t.viewModel.panels,e)}})),U.attr(\"transform\",(function(t){return c(t.xScale(t.xIndex),0)})),U.call(n.behavior.drag().origin((function(t){return t})).on(\"drag\",(function(t){var e=t.parent;S.linePickActive(!1),t.x=Math.max(-y.overdrag,Math.min(t.model.width+y.overdrag,n.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,U.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})),O(U,e,_),U.filter((function(e){return 0!==Math.abs(t.xIndex-e.xIndex)})).attr(\"transform\",(function(t){return c(t.xScale(t.xIndex),0)})),n.select(this).attr(\"transform\",c(t.x,0)),U.each((function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!E(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,O(U,e,_),n.select(this).attr(\"transform\",(function(t){return c(t.x,0)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!E(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),S.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(e.key,e.dimensions.map((function(t){return t.crossfilterDimensionIndex})))}))),U.exit().remove();var V=U.selectAll(\".\"+y.cn.axisOverlays).data(g,d);V.enter().append(\"g\").classed(y.cn.axisOverlays,!0),V.selectAll(\".\"+y.cn.axis).remove();var H=V.selectAll(\".\"+y.cn.axis).data(g,d);H.enter().append(\"g\").classed(y.cn.axis,!0),H.each((function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,i=r.domain();n.select(this).call(n.svg.axis().orient(\"left\").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?i:null).tickFormat((function(e){return v.isOrdinal(t)?e:z(t.model.dimensions[t.visibleIndex],e)})).scale(r)),f.font(H.selectAll(\"text\"),t.model.tickFont)})),H.selectAll(\".domain, .tick>line\").attr(\"fill\",\"none\").attr(\"stroke\",\"black\").attr(\"stroke-opacity\",.25).attr(\"stroke-width\",\"1px\"),H.selectAll(\"text\").style(\"text-shadow\",u.makeTextShadow(T)).style(\"cursor\",\"default\");var q=V.selectAll(\".\"+y.cn.axisHeading).data(g,d);q.enter().append(\"g\").classed(y.cn.axisHeading,!0);var G=q.selectAll(\".\"+y.cn.axisTitle).data(g,d);G.enter().append(\"text\").classed(y.cn.axisTitle,!0).attr(\"text-anchor\",\"middle\").style(\"cursor\",\"ew-resize\").style(\"pointer-events\",\"auto\"),G.text((function(t){return t.label})).each((function(e){var r=n.select(this);f.font(r,e.model.labelFont),u.convertToTspans(r,t)})).attr(\"transform\",(function(t){var e=I(t.model.labelAngle,t.model.labelSide),r=y.axisTitleOffset;return(e.dir>0?\"\":c(0,2*r+t.model.height))+l(e.degrees)+c(-r*e.dx,-r*e.dy)})).attr(\"text-anchor\",(function(t){var e=I(t.model.labelAngle,t.model.labelSide);return 2*Math.abs(e.dx)>Math.abs(e.dy)?e.dir*e.dx<0?\"start\":\"end\":\"middle\"}));var Y=V.selectAll(\".\"+y.cn.axisExtent).data(g,d);Y.enter().append(\"g\").classed(y.cn.axisExtent,!0);var W=Y.selectAll(\".\"+y.cn.axisExtentTop).data(g,d);W.enter().append(\"g\").classed(y.cn.axisExtentTop,!0),W.attr(\"transform\",c(0,-y.axisExtentOffset));var X=W.selectAll(\".\"+y.cn.axisExtentTopText).data(g,d);X.enter().append(\"text\").classed(y.cn.axisExtentTopText,!0).call(P),X.text((function(t){return D(t,!0)})).each((function(t){f.font(n.select(this),t.model.rangeFont)}));var Z=Y.selectAll(\".\"+y.cn.axisExtentBottom).data(g,d);Z.enter().append(\"g\").classed(y.cn.axisExtentBottom,!0),Z.attr(\"transform\",(function(t){return c(0,t.model.height+y.axisExtentOffset)}));var J=Z.selectAll(\".\"+y.cn.axisExtentBottomText).data(g,d);J.enter().append(\"text\").classed(y.cn.axisExtentBottomText,!0).attr(\"dy\",\"0.75em\").call(P),J.text((function(t){return D(t,!1)})).each((function(t){f.font(n.select(this),t.model.rangeFont)})),x.ensureAxisBrush(V,T)}},{\"../../components/colorscale\":378,\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/gup\":500,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"./axisbrush\":889,\"./constants\":892,\"./helpers\":894,\"./lines\":896,\"@plotly/d3\":58,\"color-rgba\":91}],899:[function(t,e,r){\"use strict\";var n=t(\"./parcoords\"),i=t(\"../../lib/prepare_regl\"),a=t(\"./helpers\").isVisible;function o(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return-1===i&&(i+=e.length),i}e.exports=function(t,e){var r=t._fullLayout;if(i(t)){var s={},l={},c={},u={},f=r._size;e.forEach((function(e,r){var n=e[0].trace;c[r]=n.index;var i=u[r]=n._fullInput.index;s[r]=t.data[i].dimensions,l[r]=t.data[i].dimensions.slice()}));n(t,e,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{filterChanged:function(e,n,i){var a=l[e][n],o=i.map((function(t){return t.slice()})),s=\"dimensions[\"+n+\"].constraintrange\",f=r._tracePreGUI[t._fullData[c[e]]._fullInput.uid];if(void 0===f[s]){var h=a.constraintrange;f[s]=h||null}var p=t._fullData[c[e]].dimensions[n];o.length?(1===o.length&&(o=o[0]),a.constraintrange=o,p.constraintrange=o.slice(),o=[o]):(delete a.constraintrange,delete p.constraintrange,o=null);var d={};d[s]=o,t.emit(\"plotly_restyle\",[d,[u[e]]])},hover:function(e){t.emit(\"plotly_hover\",e)},unhover:function(e){t.emit(\"plotly_unhover\",e)},axesMoved:function(e,r){var n=function(t,e){return function(r,n){return o(t,e,r)-o(t,e,n)}}(r,l[e].filter(a));s[e].sort(n),l[e].filter((function(t){return!a(t)})).sort((function(t){return l[e].indexOf(t)})).forEach((function(t){s[e].splice(s[e].indexOf(t),1),s[e].splice(l[e].indexOf(t),0,t)})),t.emit(\"plotly_restyle\",[{dimensions:[s[e]]},[u[e]]])}})}}},{\"../../lib/prepare_regl\":516,\"./helpers\":894,\"./parcoords\":898}],900:[function(t,e,r){\"use strict\";var n=t(\"../../plots/attributes\"),i=t(\"../../plots/domain\").attributes,a=t(\"../../plots/font_attributes\"),o=t(\"../../components/color/attributes\"),s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../plots/template_attributes\").texttemplateAttrs,c=t(\"../../lib/extend\").extendFlat,u=a({editType:\"plot\",arrayOk:!0,colorEditType:\"plot\"});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:o.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:\"plot\"},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:c({},n.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:s({},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),texttemplate:l({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),textposition:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"auto\",\"none\"],dflt:\"auto\",arrayOk:!0,editType:\"plot\"},textfont:c({},u,{}),insidetextorientation:{valType:\"enumerated\",values:[\"horizontal\",\"radial\",\"tangential\",\"auto\"],dflt:\"auto\",editType:\"plot\"},insidetextfont:c({},u,{}),outsidetextfont:c({},u,{}),automargin:{valType:\"boolean\",dflt:!1,editType:\"plot\"},title:{text:{valType:\"string\",dflt:\"\",editType:\"plot\"},font:c({},u,{}),position:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle center\",\"bottom left\",\"bottom center\",\"bottom right\"],editType:\"plot\"},editType:\"plot\"},domain:i({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\"},_deprecated:{title:{valType:\"string\",dflt:\"\",editType:\"calc\"},titlefont:c({},u,{}),titleposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle center\",\"bottom left\",\"bottom center\",\"bottom right\"],editType:\"calc\"}}}},{\"../../components/color/attributes\":365,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/domain\":584,\"../../plots/font_attributes\":585,\"../../plots/template_attributes\":633}],901:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"pie\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":619}],902:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"tinycolor2\"),a=t(\"../../components/color\"),o={};function s(t){return function(e,r){return!!e&&(!!(e=i(e)).isValid()&&(e=a.addOpacity(e,e.getAlpha()),t[r]||(t[r]=e),e))}}function l(t,e){var r,n=JSON.stringify(t),a=e[n];if(!a){for(a=t.slice(),r=0;r=0})),(\"funnelarea\"===e.type?v:e.sort)&&a.sort((function(t,e){return e.v-t.v})),a[0]&&(a[0].vTotal=m),a},crossTraceCalc:function(t,e){var r=(e||{}).type;r||(r=\"pie\");var n=t._fullLayout,i=t.calcdata,a=n[r+\"colorway\"],s=n[\"_\"+r+\"colormap\"];n[\"extend\"+r+\"colors\"]&&(a=l(a,o));for(var c=0,u=0;u0){s=!0;break}}s||(o=0)}return{hasLabels:r,hasValues:a,len:o}}e.exports={handleLabelsAndValues:l,supplyDefaults:function(t,e,r,n){function c(r,n){return i.coerce(t,e,a,r,n)}var u=l(c(\"labels\"),c(\"values\")),f=u.len;if(e._hasLabels=u.hasLabels,e._hasValues=u.hasValues,!e._hasLabels&&e._hasValues&&(c(\"label0\"),c(\"dlabel\")),f){e._length=f,c(\"marker.line.width\")&&c(\"marker.line.color\"),c(\"marker.colors\"),c(\"scalegroup\");var h,p=c(\"text\"),d=c(\"texttemplate\");if(d||(h=c(\"textinfo\",Array.isArray(p)?\"text+percent\":\"percent\")),c(\"hovertext\"),c(\"hovertemplate\"),d||h&&\"none\"!==h){var g=c(\"textposition\");s(t,e,n,c,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||\"auto\"===g||\"outside\"===g)&&c(\"automargin\"),(\"inside\"===g||\"auto\"===g||Array.isArray(g))&&c(\"insidetextorientation\")}o(e,n,c);var m=c(\"hole\");if(c(\"title.text\")){var v=c(\"title.position\",m?\"middle center\":\"top center\");m||\"middle center\"!==v||(e.title.position=\"top center\"),i.coerceFont(c,\"title.font\",n.font)}c(\"sort\"),c(\"direction\"),c(\"rotation\"),c(\"pull\")}else e.visible=!1}}},{\"../../lib\":503,\"../../plots/domain\":584,\"../bar/defaults\":652,\"./attributes\":900,\"fast-isnumeric\":190}],904:[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,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return 1===t.pts.length&&(r.pointNumber=r.i=t.pts[0]),n(r,e,t.pts),\"funnelarea\"===e.type&&(delete r.v,delete r.i),r}},{\"../../components/fx/helpers\":402}],905:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");function i(t){return-1!==t.indexOf(\"e\")?t.replace(/[.]?0+e/,\"e\"):-1!==t.indexOf(\".\")?t.replace(/[.]?0+$/,\"\"):t}r.formatPiePercent=function(t,e){var r=i((100*t).toPrecision(3));return n.numSeparate(r,e)+\"%\"},r.formatPieValue=function(t,e){var r=i(t.toPrecision(10));return n.numSeparate(r,e)},r.getFirstFilled=function(t,e){if(Array.isArray(t))for(var r=0;r\"),name:f.hovertemplate||-1!==h.indexOf(\"name\")?f.name:void 0,idealAlign:t.pxmid[0]<0?\"left\":\"right\",color:m.castOption(_.bgcolor,t.pts)||t.color,borderColor:m.castOption(_.bordercolor,t.pts),fontFamily:m.castOption(w.family,t.pts),fontSize:m.castOption(w.size,t.pts),fontColor:m.castOption(w.color,t.pts),nameLength:m.castOption(_.namelength,t.pts),textAlign:m.castOption(_.align,t.pts),hovertemplate:m.castOption(f.hovertemplate,t.pts),hovertemplateLabels:t,eventData:[v(t,f)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e,inOut_bbox:T}),t.bbox=T[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,e.emit(\"plotly_hover\",{points:[v(t,f)],event:n.event})}})),t.on(\"mouseout\",(function(t){var r=e._fullLayout,i=e._fullData[c.index],o=n.select(this).datum();c._hasHoverEvent&&(t.originalEvent=n.event,e.emit(\"plotly_unhover\",{points:[v(o,i)],event:n.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(a.loneUnhover(r._hoverlayer.node()),c._hasHoverLabel=!1)})),t.on(\"click\",(function(t){var r=e._fullLayout,i=e._fullData[c.index];e._dragging||!1===r.hovermode||(e._hoverdata=[v(t,i)],a.click(e,n.event))}))}function b(t,e,r){var n=m.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=m.castOption(t._input.textfont.color,e.pts));var i=m.castOption(t.insidetextfont.family,e.pts)||m.castOption(t.textfont.family,e.pts)||r.family,a=m.castOption(t.insidetextfont.size,e.pts)||m.castOption(t.textfont.size,e.pts)||r.size;return{color:n||o.contrast(e.color),family:i,size:a}}function _(t,e){for(var r,n,i=0;ie&&e>n||r=-4;m-=2)v(Math.PI*m,\"tan\");for(m=4;m>=-4;m-=2)v(Math.PI*(m+1),\"tan\")}if(f||p){for(m=4;m>=-4;m-=2)v(Math.PI*(m+1.5),\"rad\");for(m=4;m>=-4;m-=2)v(Math.PI*(m+.5),\"rad\")}}if(s||d||f){var y=Math.sqrt(t.width*t.width+t.height*t.height);if((a={scale:i*n*2/y,rCenter:1-i,rotate:0}).textPosAngle=(e.startangle+e.stopangle)/2,a.scale>=1)return a;g.push(a)}(d||p)&&((a=T(t,n,o,l,c)).textPosAngle=(e.startangle+e.stopangle)/2,g.push(a)),(d||h)&&((a=k(t,n,o,l,c)).textPosAngle=(e.startangle+e.stopangle)/2,g.push(a));for(var x=0,b=0,_=0;_=1)break}return g[x]}function T(t,e,r,n,i){e=Math.max(0,e-2*g);var a=t.width/t.height,o=S(a,n,e,r);return{scale:2*o/t.height,rCenter:A(a,o/e),rotate:M(i)}}function k(t,e,r,n,i){e=Math.max(0,e-2*g);var a=t.height/t.width,o=S(a,n,e,r);return{scale:2*o/t.width,rCenter:A(a,o/e),rotate:M(i+Math.PI/2)}}function A(t,e){return Math.cos(e)-t*e}function M(t){return(180/Math.PI*t+720)%180-90}function S(t,e,r,n){var i=t+1/(2*Math.tan(e));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(t*t+n/2)+t))}function E(t,e){return t.v!==e.vTotal||e.trace.hole?Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2):1}function L(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 C(t,e){var r,n,i,a=t.trace,o={x:t.cx,y:t.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=I(a),-1!==a.title.position.indexOf(\"top\")?(o.y-=(1+i)*t.r,s.ty-=t.titleBox.height):-1!==a.title.position.indexOf(\"bottom\")&&(o.y+=(1+i)*t.r);var l,c,u=(l=t.r,c=t.trace.aspectratio,l/(void 0===c?1:c)),f=e.w*(a.domain.x[1]-a.domain.x[0])/2;return-1!==a.title.position.indexOf(\"left\")?(f+=u,o.x-=(1+i)*u,s.tx+=t.titleBox.width/2):-1!==a.title.position.indexOf(\"center\")?f*=2:-1!==a.title.position.indexOf(\"right\")&&(f+=u,o.x+=(1+i)*u,s.tx-=t.titleBox.width/2),r=f/t.titleBox.width,n=P(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}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 I(t){var e,r=t.pull;if(!r)return 0;if(Array.isArray(r))for(r=0,e=0;er&&(r=t.pull[e]);return r}function O(t,e){for(var r=[],n=0;n1?(c=r.r,u=c/i.aspectratio):(u=r.r,c=u*i.aspectratio),c*=(1+i.baseratio)/2,l=c*u}o=Math.min(o,l/r.vTotal)}for(n=0;n\")}if(a){var x=l.castOption(i,e.i,\"texttemplate\");if(x){var b=function(t){return{label:t.label,value:t.v,valueLabel:m.formatPieValue(t.v,n.separators),percent:t.v/r.vTotal,percentLabel:m.formatPiePercent(t.v/r.vTotal,n.separators),color:t.color,text:t.text,customdata:l.castOption(i,t.i,\"customdata\")}}(e),_=m.getFirstFilled(i.text,e.pts);(y(_)||\"\"===_)&&(b.text=_),e.text=l.texttemplateString(x,b,t._fullLayout._d3locale,b,i._meta||{})}else e.text=\"\"}}function R(t,e){var r=t.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(e.left+e.right)/2,o=(e.top+e.bottom)/2;t.textX=a*n-o*i,t.textY=a*i+o*n,t.noCenter=!0}e.exports={plot:function(t,e){var r=t._fullLayout,a=r._size;d(\"pie\",r),_(e,t),O(e,a);var h=l.makeTraceGroups(r._pielayer,e,\"trace\").each((function(e){var h=n.select(this),d=e[0],g=d.trace;!function(t){var e,r,n,i=t[0],a=i.r,o=i.trace,s=m.getRotationAngle(o.rotation),l=2*Math.PI/i.vTotal,c=\"px0\",u=\"px1\";if(\"counterclockwise\"===o.direction){for(e=0;ei.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-o.hole,r.rInscribed=E(r,i))}(e),h.attr(\"stroke-linejoin\",\"round\"),h.each((function(){var v=n.select(this).selectAll(\"g.slice\").data(e);v.enter().append(\"g\").classed(\"slice\",!0),v.exit().remove();var y=[[[],[]],[[],[]]],_=!1;v.each((function(i,a){if(i.hidden)n.select(this).selectAll(\"path,g\").remove();else{i.pointNumber=i.i,i.curveNumber=g.index,y[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var o=d.cx,c=d.cy,u=n.select(this),h=u.selectAll(\"path.surface\").data([i]);if(h.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":\"all\"}),u.call(x,t,e),g.pull){var v=+m.castOption(g.pull,i.pts)||0;v>0&&(o+=v*i.pxmid[0],c+=v*i.pxmid[1])}i.cxFinal=o,i.cyFinal=c;var T=g.hole;if(i.v===d.vTotal){var k=\"M\"+(o+i.px0[0])+\",\"+(c+i.px0[1])+C(i.px0,i.pxmid,!0,1)+C(i.pxmid,i.px0,!0,1)+\"Z\";T?h.attr(\"d\",\"M\"+(o+T*i.px0[0])+\",\"+(c+T*i.px0[1])+C(i.px0,i.pxmid,!1,T)+C(i.pxmid,i.px0,!1,T)+\"Z\"+k):h.attr(\"d\",k)}else{var A=C(i.px0,i.px1,!0,1);if(T){var M=1-T;h.attr(\"d\",\"M\"+(o+T*i.px1[0])+\",\"+(c+T*i.px1[1])+C(i.px1,i.px0,!1,T)+\"l\"+M*i.px0[0]+\",\"+M*i.px0[1]+A+\"Z\")}else h.attr(\"d\",\"M\"+o+\",\"+c+\"l\"+i.px0[0]+\",\"+i.px0[1]+A+\"Z\")}D(t,i,d);var S=m.castOption(g.textposition,i.pts),E=u.selectAll(\"g.slicetext\").data(i.text&&\"none\"!==S?[0]:[]);E.enter().append(\"g\").classed(\"slicetext\",!0),E.exit().remove(),E.each((function(){var u=l.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),h=l.ensureUniformFontSize(t,\"outside\"===S?function(t,e,r){var n=m.castOption(t.outsidetextfont.color,e.pts)||m.castOption(t.textfont.color,e.pts)||r.color,i=m.castOption(t.outsidetextfont.family,e.pts)||m.castOption(t.textfont.family,e.pts)||r.family,a=m.castOption(t.outsidetextfont.size,e.pts)||m.castOption(t.textfont.size,e.pts)||r.size;return{color:n,family:i,size:a}}(g,i,r.font):b(g,i,r.font));u.text(i.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(s.font,h).call(f.convertToTspans,t);var v,y=s.bBox(u.node());if(\"outside\"===S)v=L(y,i);else if(v=w(y,i,d),\"auto\"===S&&v.scale<1){var x=l.ensureUniformFontSize(t,g.outsidetextfont);u.call(s.font,x),v=L(y=s.bBox(u.node()),i)}var T=v.textPosAngle,k=void 0===T?i.pxmid:z(d.r,T);if(v.targetX=o+k[0]*v.rCenter+(v.x||0),v.targetY=c+k[1]*v.rCenter+(v.y||0),R(v,y),v.outside){var A=v.targetY;i.yLabelMin=A-y.height/2,i.yLabelMid=A,i.yLabelMax=A+y.height/2,i.labelExtraX=0,i.labelExtraY=0,_=!0}v.fontSize=h.size,p(g.type,v,r),e[a].transform=v,u.attr(\"transform\",l.getTextTransform(v))}))}function C(t,e,r,n){var a=n*(e[0]-t[0]),o=n*(e[1]-t[1]);return\"a\"+n*d.r+\",\"+n*d.r+\" 0 \"+i.largeArc+(r?\" 1 \":\" 0 \")+a+\",\"+o}}));var T=n.select(this).selectAll(\"g.titletext\").data(g.title.text?[0]:[]);if(T.enter().append(\"g\").classed(\"titletext\",!0),T.exit().remove(),T.each((function(){var e,r=l.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),i=g.title.text;g._meta&&(i=l.templateString(i,g._meta)),r.text(i).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(s.font,g.title.font).call(f.convertToTspans,t),e=\"middle center\"===g.title.position?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.title.font.size}}(d):C(d,a),r.attr(\"transform\",u(e.x,e.y)+c(Math.min(1,e.scale))+u(e.tx,e.ty))})),_&&function(t,e){var r,n,i,a,o,s,l,c,u,f,h,p,d;function g(t,e){return t.pxmid[1]-e.pxmid[1]}function v(t,e){return e.pxmid[1]-t.pxmid[1]}function y(t,r){r||(r={});var i,c,u,h,p=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),d=n?t.yLabelMin:t.yLabelMax,g=n?t.yLabelMax:t.yLabelMin,v=t.cyFinal+o(t.px0[1],t.px1[1]),y=p-d;if(y*l>0&&(t.labelExtraY=y),Array.isArray(e.pull))for(c=0;c=(m.castOption(e.pull,u.pts)||0)||((t.pxmid[1]-u.pxmid[1])*l>0?(y=u.cyFinal+o(u.px0[1],u.px1[1])-d-t.labelExtraY)*l>0&&(t.labelExtraY+=y):(g+t.labelExtraY-v)*l>0&&(i=3*s*Math.abs(c-f.indexOf(t)),(h=u.cxFinal+a(u.px0[0],u.px1[0])+i-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=h)))}for(n=0;n<2;n++)for(i=n?g:v,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,(c=t[n][r]).sort(i),u=t[1-n][r],f=u.concat(c),p=[],h=0;hMath.abs(f)?s+=\"l\"+f*t.pxmid[0]/t.pxmid[1]+\",\"+f+\"H\"+(a+t.labelExtraX+c):s+=\"l\"+t.labelExtraX+\",\"+u+\"v\"+(f-u)+\"h\"+c}else s+=\"V\"+(t.yLabelMid+t.labelExtraY)+\"h\"+c;l.ensureSingle(r,\"path\",\"textline\").call(o.stroke,e.outsidetextfont.color).attr({\"stroke-width\":Math.min(2,e.outsidetextfont.size/8),d:s,fill:\"none\"})}else r.select(\"path.textline\").remove()}))}(v,g),_&&g.automargin){var k=s.bBox(h.node()),A=g.domain,M=a.w*(A.x[1]-A.x[0]),S=a.h*(A.y[1]-A.y[0]),E=(.5*M-d.r)/a.w,P=(.5*S-d.r)/a.h;i.autoMargin(t,\"pie.\"+g.uid+\".automargin\",{xl:A.x[0]-E,xr:A.x[1]+E,yb:A.y[0]-P,yt:A.y[1]+P,l:Math.max(d.cx-d.r-k.left,0),r:Math.max(k.right-(d.cx+d.r),0),b:Math.max(k.bottom-(d.cy+d.r),0),t:Math.max(d.cy-d.r-k.top,0),pad:5})}}))}));setTimeout((function(){h.selectAll(\"tspan\").each((function(){var t=n.select(this);t.attr(\"dy\")&&t.attr(\"dy\",t.attr(\"dy\"))}))}),0)},formatSliceLabel:D,transformInsideText:w,determineInsideTextFont:b,positionTitleOutside:C,prerenderTitles:_,layoutAreas:O,attachFxHandlers:x,computeTransform:R}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/plots\":619,\"../bar/constants\":650,\"../bar/uniform_text\":664,\"./event_data\":904,\"./helpers\":905,\"@plotly/d3\":58}],910:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"./style_one\"),a=t(\"../bar/uniform_text\").resizeText;e.exports=function(t){var e=t._fullLayout._pielayer.selectAll(\".trace\");a(t,e,\"pie\"),e.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)}))}))}},{\"../bar/uniform_text\":664,\"./style_one\":911,\"@plotly/d3\":58}],911:[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\":366,\"./helpers\":905}],912:[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\":926}],913:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").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;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);if(p)r=p;else for(r=new Int32Array(e),l=0;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var g=i(t.marker.color),m=i(t.marker.border.color),v=t.opacity*t.marker.opacity;g[3]*=v,this.pointcloudOptions.color=g;var y=t.marker.blend;if(null===y){y=c.length<100||u.length<100}this.pointcloudOptions.blend=y,m[3]*=v,this.pointcloudOptions.borderColor=m;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,T=b/2||.5;t._extremes[_._id]=a(_,[d[0],d[2]],{ppad:T}),t._extremes[w._id]=a(w,[d[1],d[3]],{ppad:T})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},{\"../../../stackgl_modules\":1120,\"../../lib/str2rgbarray\":528,\"../../plots/cartesian/autorange\":553,\"../scatter/get_trace_color\":936}],914:[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\":503,\"./attributes\":912}],915:[function(t,e,r){\"use strict\";[\"*pointcloud* trace is deprecated!\",\"Please consider switching to the *scattergl* trace type.\"].join(\" \");e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"../scatter3d/calc\"),plot:t(\"./convert\"),moduleType:\"trace\",name:\"pointcloud\",basePlotModule:t(\"../../plots/gl2d\"),categories:[\"gl\",\"gl2d\",\"showLegend\"],meta:{}}},{\"../../plots/gl2d\":596,\"../scatter3d/calc\":955,\"./attributes\":912,\"./convert\":913,\"./defaults\":914}],916:[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(\"../../plots/template_attributes\").hovertemplateAttrs,c=t(\"../../components/colorscale/attributes\"),u=t(\"../../plot_api/plot_template\").templatedArray,f=t(\"../../plots/cartesian/axis_format_attributes\").descriptionOnlyNumbers,h=t(\"../../lib/extend\").extendFlat,p=t(\"../../plot_api/edit_types\").overrideAll;(e.exports=p({hoverinfo:h({},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\",description:f(\"value\")},valuesuffix:{valType:\"string\",dflt:\"\"},arrangement:{valType:\"enumerated\",values:[\"snap\",\"perpendicular\",\"freeform\",\"fixed\"],dflt:\"snap\"},textfont:n({}),customdata:void 0,node:{label:{valType:\"data_array\",dflt:[]},groups:{valType:\"info_array\",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:\"number\",editType:\"calc\"}},x:{valType:\"data_array\",dflt:[]},y:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},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,hovertemplate:l({},{keys:[\"value\",\"label\"]})},link:{label:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},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,hovertemplate:l({},{keys:[\"value\",\"label\"]}),colorscales:u(\"concentrationscales\",{editType:\"calc\",label:{valType:\"string\",editType:\"calc\",dflt:\"\"},cmax:{valType:\"number\",editType:\"calc\",dflt:1},cmin:{valType:\"number\",editType:\"calc\",dflt:0},colorscale:h(c().colorscale,{dflt:[[0,\"white\"],[1,\"black\"]]})})}},\"calc\",\"nested\")).transforms=void 0},{\"../../components/color/attributes\":365,\"../../components/colorscale/attributes\":373,\"../../components/fx/attributes\":397,\"../../lib/extend\":493,\"../../plot_api/edit_types\":536,\"../../plot_api/plot_template\":543,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/domain\":584,\"../../plots/font_attributes\":585,\"../../plots/template_attributes\":633}],917:[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\"),s=t(\"../../lib/setcursor\"),l=t(\"../../components/dragelement\"),c=t(\"../../plots/cartesian/select\").prepSelect,u=t(\"../../lib\"),f=t(\"../../registry\");function h(t,e){var r=t._fullData[e],n=t._fullLayout,i=n.dragmode,a=\"pan\"===n.dragmode?\"move\":\"crosshair\",o=r._bgRect;if(\"pan\"!==i&&\"zoom\"!==i){s(o,a);var h={_id:\"x\",c2p:u.identity,_offset:r._sankey.translateX,_length:r._sankey.width},p={_id:\"y\",c2p:u.identity,_offset:r._sankey.translateY,_length:r._sankey.height},d={gd:t,element:o.node(),plotinfo:{id:e,xaxis:h,yaxis:p,fillRangeItems:u.noop},subplot:e,xaxes:[h],yaxes:[p],doneFnCompleted:function(r){var n,i=t._fullData[e],a=i.node.groups.slice(),o=[];function s(t){for(var e=i._sankey.graph.nodes,r=0;ry&&(y=a.source[e]),a.target[e]>y&&(y=a.target[e]);var x,b=y+1;t.node._count=b;var _=t.node.groups,w={};for(e=0;e<_.length;e++){var T=_[e];for(x=0;x0&&s(E,b)&&s(L,b)&&(!w.hasOwnProperty(E)||!w.hasOwnProperty(L)||w[E]!==w[L])){w.hasOwnProperty(L)&&(L=w[L]),w.hasOwnProperty(E)&&(E=w[E]),L=+L,h[E=+E]=h[L]=!0;var C=\"\";a.label&&a.label[e]&&(C=a.label[e]);var P=null;C&&p.hasOwnProperty(C)&&(P=p[C]),c.push({pointNumber:e,label:C,color:u?a.color[e]:a.color,customdata:f?a.customdata[e]:a.customdata,concentrationscale:P,source:E,target:L,value:+S}),M.source.push(E),M.target.push(L)}}var I=b+_.length,O=o(r.color),z=o(r.customdata),D=[];for(e=0;eb-1,childrenNodes:[],pointNumber:e,label:R,color:O?r.color[e]:r.color,customdata:z?r.customdata[e]:r.customdata})}var F=!1;return function(t,e,r){for(var a=i.init2dArray(t,0),o=0;o1}))}(I,M.source,M.target)&&(F=!0),{circular:F,links:c,nodes:D,groups:_,groupLookup:w}}e.exports=function(t,e){var r=c(e);return a({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},{\"../../components/colorscale\":378,\"../../lib\":503,\"../../lib/gup\":500,\"strongly-connected-components\":306}],919:[function(t,e,r){\"use strict\";e.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:\"linear\",cn:{sankey:\"sankey\",sankeyLinks:\"sankey-links\",sankeyLink:\"sankey-link\",sankeyNodeSet:\"sankey-node-set\",sankeyNode:\"sankey-node\",nodeRect:\"node-rect\",nodeLabel:\"node-label\"}}},{}],920:[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\"),u=t(\"../../plots/array_container_defaults\");function f(t,e){function r(r,a){return n.coerce(t,e,i.link.colorscales,r,a)}r(\"label\"),r(\"cmin\"),r(\"cmax\"),r(\"colorscale\")}e.exports=function(t,e,r,h){function p(r,a){return n.coerce(t,e,i,r,a)}var d=n.extendDeep(h.hoverlabel,t.hoverlabel),g=t.node,m=c.newContainer(e,\"node\");function v(t,e){return n.coerce(g,m,i.node,t,e)}v(\"label\"),v(\"groups\"),v(\"x\"),v(\"y\"),v(\"pad\"),v(\"thickness\"),v(\"line.color\"),v(\"line.width\"),v(\"hoverinfo\",t.hoverinfo),l(g,m,v,d),v(\"hovertemplate\");var y=h.colorway;v(\"color\",m.label.map((function(t,e){return a.addOpacity(function(t){return y[t%y.length]}(e),.8)}))),v(\"customdata\");var x=t.link||{},b=c.newContainer(e,\"link\");function _(t,e){return n.coerce(x,b,i.link,t,e)}_(\"label\"),_(\"source\"),_(\"target\"),_(\"value\"),_(\"line.color\"),_(\"line.width\"),_(\"hoverinfo\",t.hoverinfo),l(x,b,_,d),_(\"hovertemplate\");var w,T=o(h.paper_bgcolor).getLuminance()<.333?\"rgba(255, 255, 255, 0.6)\":\"rgba(0, 0, 0, 0.2)\";_(\"color\",n.repeat(T,b.value.length)),_(\"customdata\"),u(x,b,{name:\"colorscales\",handleItemDefaults:f}),s(e,h,p),p(\"orientation\"),p(\"valueformat\"),p(\"valuesuffix\"),m.x.length&&m.y.length&&(w=\"freeform\"),p(\"arrangement\",w),n.coerceFont(p,\"textfont\",n.extendFlat({},h.font)),e._length=null}},{\"../../components/color\":366,\"../../components/fx/hoverlabel_defaults\":404,\"../../lib\":503,\"../../plot_api/plot_template\":543,\"../../plots/array_container_defaults\":549,\"../../plots/domain\":584,\"./attributes\":916,tinycolor2:312}],921:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),moduleType:\"trace\",name:\"sankey\",basePlotModule:t(\"./base_plot\"),selectPoints:t(\"./select.js\"),categories:[\"noOpacity\"],meta:{}}},{\"./attributes\":916,\"./base_plot\":917,\"./calc\":918,\"./defaults\":920,\"./plot\":922,\"./select.js\":924}],922:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.numberFormat,o=t(\"./render\"),s=t(\"../../components/fx\"),l=t(\"../../components/color\"),c=t(\"./constants\").cn,u=i._;function f(t){return\"\"!==t}function h(t,e){return t.filter((function(t){return t.key===e.traceId}))}function p(t,e){n.select(t).select(\"path\").style(\"fill-opacity\",e),n.select(t).select(\"rect\").style(\"fill-opacity\",e)}function d(t){n.select(t).select(\"text.name\").style(\"fill\",\"black\")}function g(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function m(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&&h(r,e).selectAll(\".\"+c.sankeyLink).filter(g(e)).call(x.bind(0,e,r,!1))}function y(t,e,r){e&&r&&h(r,e).selectAll(\".\"+c.sankeyLink).filter(g(e)).call(b.bind(0,e,r,!1))}function x(t,e,r,n){var i=n.datum().link.label;n.style(\"fill-opacity\",(function(t){if(!t.link.concentrationscale)return.4})),i&&h(e,t).selectAll(\".\"+c.sankeyLink).filter((function(t){return t.link.label===i})).style(\"fill-opacity\",(function(t){if(!t.link.concentrationscale)return.4})),r&&h(e,t).selectAll(\".\"+c.sankeyNode).filter(m(t)).call(v)}function b(t,e,r,n){var i=n.datum().link.label;n.style(\"fill-opacity\",(function(t){return t.tinyColorAlpha})),i&&h(e,t).selectAll(\".\"+c.sankeyLink).filter((function(t){return t.link.label===i})).style(\"fill-opacity\",(function(t){return t.tinyColorAlpha})),r&&h(e,t).selectAll(c.sankeyNode).filter(m(t)).call(y)}function _(t,e){var r=t.hoverlabel||{},n=i.nestedProperty(r,e).get();return!Array.isArray(n)&&n}e.exports=function(t,e){for(var r=t._fullLayout,i=r._paper,h=r._size,g=0;g\"),color:_(o,\"bgcolor\")||l.addOpacity(g.color,1),borderColor:_(o,\"bordercolor\"),fontFamily:_(o,\"font.family\"),fontSize:_(o,\"font.size\"),fontColor:_(o,\"font.color\"),nameLength:_(o,\"namelength\"),textAlign:_(o,\"align\"),idealAlign:n.event.x\"),color:_(o,\"bgcolor\")||i.tinyColorHue,borderColor:_(o,\"bordercolor\"),fontFamily:_(o,\"font.family\"),fontSize:_(o,\"font.size\"),fontColor:_(o,\"font.color\"),nameLength:_(o,\"namelength\"),textAlign:_(o,\"align\"),idealAlign:\"left\",hovertemplate:o.hovertemplate,hovertemplateLabels:y,eventData:[i.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});p(w,.85),d(w)}}},unhover:function(e,i,a){!1!==t._fullLayout.hovermode&&(n.select(e).call(y,i,a),\"skip\"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,t.emit(\"plotly_unhover\",{event:n.event,points:[i.node]})),s.loneUnhover(r._hoverlayer.node()))},select:function(e,r,i){var a=r.node;a.originalEvent=n.event,t._hoverdata=[a],n.select(e).call(y,r,i),s.click(t,{target:!0})}}})}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../lib\":503,\"./constants\":919,\"./render\":923,\"@plotly/d3\":58}],923:[function(t,e,r){\"use strict\";var n=t(\"d3-force\"),i=t(\"d3-interpolate\").interpolateNumber,a=t(\"@plotly/d3\"),o=t(\"@plotly/d3-sankey\"),s=t(\"@plotly/d3-sankey-circular\"),l=t(\"./constants\"),c=t(\"tinycolor2\"),u=t(\"../../components/color\"),f=t(\"../../components/drawing\"),h=t(\"../../lib\"),p=h.strTranslate,d=h.strRotate,g=t(\"../../lib/gup\"),m=g.keyFun,v=g.repeat,y=g.unwrap,x=t(\"../../lib/svg_text_utils\"),b=t(\"../../registry\"),_=t(\"../../constants/alignment\"),w=_.CAP_SHIFT,T=_.LINE_SPACING;function k(t,e,r){var n,i=y(e),a=i.trace,u=a.domain,f=\"h\"===a.orientation,p=a.node.pad,d=a.node.thickness,g=t.width*(u.x[1]-u.x[0]),m=t.height*(u.y[1]-u.y[0]),v=i._nodes,x=i._links,b=i.circular;(n=b?s.sankeyCircular().circularLinkGap(0):o.sankey()).iterations(l.sankeyIterations).size(f?[g,m]:[m,g]).nodeWidth(d).nodePadding(p).nodeId((function(t){return t.pointNumber})).nodes(v).links(x);var _,w,T,k=n();for(var A in n.nodePadding()=i||(r=i-e.y0)>1e-6&&(e.y0+=r,e.y1+=r),i=e.y1+p}))}(function(t){var e,r,n=t.map((function(t,e){return{x0:t.x0,index:e}})).sort((function(t,e){return t.x0-e.x0})),i=[],a=-1,o=-1/0;for(_=0;_o+d&&(a+=1,e=s.x0),o=s.x0,i[a]||(i[a]=[]),i[a].push(s),r=e-s.x0,s.x0+=r,s.x1+=r}return i}(v=k.nodes));n.update(k)}return{circular:b,key:r,trace:a,guid:h.randstr(),horizontal:f,width:g,height:m,nodePad:a.node.pad,nodeLineColor:a.node.line.color,nodeLineWidth:a.node.line.width,linkLineColor:a.link.line.color,linkLineWidth:a.link.line.width,valueFormat:a.valueformat,valueSuffix:a.valuesuffix,textFont:a.textfont,translateX:u.x[0]*t.width+t.margin.l,translateY:t.height-u.y[1]*t.height+t.margin.t,dragParallel:f?m:g,dragPerpendicular:f?g:m,arrangement:a.arrangement,sankey:n,graph:k,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function A(t,e,r){var n=c(e.color),i=e.source.label+\"|\"+e.target.label+\"__\"+r;return e.trace=t.trace,e.curveNumber=t.trace.index,{circular:t.circular,key:i,traceId:t.key,pointNumber:e.pointNumber,link:e,tinyColorHue:u.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:M,linkLineColor:t.linkLineColor,linkLineWidth:t.linkLineWidth,valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,parent:t,interactionState:t.interactionState,flow:e.flow}}function M(){return function(t){if(t.link.circular)return e=t.link,r=e.width/2,n=e.circularPathData,\"top\"===e.circularLinkType?\"M \"+n.targetX+\" \"+(n.targetY+r)+\" L\"+n.rightInnerExtent+\" \"+(n.targetY+r)+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightSmallArcRadius+r)+\" 0 0 1 \"+(n.rightFullExtent-r)+\" \"+(n.targetY-n.rightSmallArcRadius)+\"L\"+(n.rightFullExtent-r)+\" \"+n.verticalRightInnerExtent+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightLargeArcRadius+r)+\" 0 0 1 \"+n.rightInnerExtent+\" \"+(n.verticalFullExtent-r)+\"L\"+n.leftInnerExtent+\" \"+(n.verticalFullExtent-r)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftLargeArcRadius+r)+\" 0 0 1 \"+(n.leftFullExtent+r)+\" \"+n.verticalLeftInnerExtent+\"L\"+(n.leftFullExtent+r)+\" \"+(n.sourceY-n.leftSmallArcRadius)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftSmallArcRadius+r)+\" 0 0 1 \"+n.leftInnerExtent+\" \"+(n.sourceY+r)+\"L\"+n.sourceX+\" \"+(n.sourceY+r)+\"L\"+n.sourceX+\" \"+(n.sourceY-r)+\"L\"+n.leftInnerExtent+\" \"+(n.sourceY-r)+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftSmallArcRadius-r)+\" 0 0 0 \"+(n.leftFullExtent-r)+\" \"+(n.sourceY-n.leftSmallArcRadius)+\"L\"+(n.leftFullExtent-r)+\" \"+n.verticalLeftInnerExtent+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftLargeArcRadius-r)+\" 0 0 0 \"+n.leftInnerExtent+\" \"+(n.verticalFullExtent+r)+\"L\"+n.rightInnerExtent+\" \"+(n.verticalFullExtent+r)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightLargeArcRadius-r)+\" 0 0 0 \"+(n.rightFullExtent+r)+\" \"+n.verticalRightInnerExtent+\"L\"+(n.rightFullExtent+r)+\" \"+(n.targetY-n.rightSmallArcRadius)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightSmallArcRadius-r)+\" 0 0 0 \"+n.rightInnerExtent+\" \"+(n.targetY-r)+\"L\"+n.targetX+\" \"+(n.targetY-r)+\"Z\":\"M \"+n.targetX+\" \"+(n.targetY-r)+\" L\"+n.rightInnerExtent+\" \"+(n.targetY-r)+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightSmallArcRadius+r)+\" 0 0 0 \"+(n.rightFullExtent-r)+\" \"+(n.targetY+n.rightSmallArcRadius)+\"L\"+(n.rightFullExtent-r)+\" \"+n.verticalRightInnerExtent+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightLargeArcRadius+r)+\" 0 0 0 \"+n.rightInnerExtent+\" \"+(n.verticalFullExtent+r)+\"L\"+n.leftInnerExtent+\" \"+(n.verticalFullExtent+r)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftLargeArcRadius+r)+\" 0 0 0 \"+(n.leftFullExtent+r)+\" \"+n.verticalLeftInnerExtent+\"L\"+(n.leftFullExtent+r)+\" \"+(n.sourceY+n.leftSmallArcRadius)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftSmallArcRadius+r)+\" 0 0 0 \"+n.leftInnerExtent+\" \"+(n.sourceY-r)+\"L\"+n.sourceX+\" \"+(n.sourceY-r)+\"L\"+n.sourceX+\" \"+(n.sourceY+r)+\"L\"+n.leftInnerExtent+\" \"+(n.sourceY+r)+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftSmallArcRadius-r)+\" 0 0 1 \"+(n.leftFullExtent-r)+\" \"+(n.sourceY+n.leftSmallArcRadius)+\"L\"+(n.leftFullExtent-r)+\" \"+n.verticalLeftInnerExtent+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftLargeArcRadius-r)+\" 0 0 1 \"+n.leftInnerExtent+\" \"+(n.verticalFullExtent-r)+\"L\"+n.rightInnerExtent+\" \"+(n.verticalFullExtent-r)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightLargeArcRadius-r)+\" 0 0 1 \"+(n.rightFullExtent+r)+\" \"+n.verticalRightInnerExtent+\"L\"+(n.rightFullExtent+r)+\" \"+(n.targetY+n.rightSmallArcRadius)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightSmallArcRadius-r)+\" 0 0 1 \"+n.rightInnerExtent+\" \"+(n.targetY+r)+\"L\"+n.targetX+\" \"+(n.targetY+r)+\"Z\";var e,r,n,a=t.link.source.x1,o=t.link.target.x0,s=i(a,o),l=s(.5),c=s(.5),u=t.link.y0-t.link.width/2,f=t.link.y0+t.link.width/2,h=t.link.y1-t.link.width/2,p=t.link.y1+t.link.width/2;return\"M\"+a+\",\"+u+\"C\"+l+\",\"+u+\" \"+c+\",\"+h+\" \"+o+\",\"+h+\"L\"+o+\",\"+p+\"C\"+c+\",\"+p+\" \"+l+\",\"+f+\" \"+a+\",\"+f+\"Z\"}}function S(t,e){var r=c(e.color),n=l.nodePadAcross,i=t.nodePad/2;e.dx=e.x1-e.x0,e.dy=e.y1-e.y0;var a=e.dx,o=Math.max(.5,e.dy),s=\"node_\"+e.pointNumber;return e.group&&(s=h.randstr()),e.trace=t.trace,e.curveNumber=t.trace.index,{index:e.pointNumber,key:s,partOfGroup:e.partOfGroup||!1,group:e.group,traceId:t.key,trace:t.trace,node:e,nodePad:t.nodePad,nodeLineColor:t.nodeLineColor,nodeLineWidth:t.nodeLineWidth,textFont:t.textFont,size:t.horizontal?t.height:t.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:t.horizontal?e.dy/2+1:e.dx/2+1,left:1===e.originalLayer,sizeAcross:t.width,forceLayouts:t.forceLayouts,horizontal:t.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:u.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,graph:t.graph,arrangement:t.arrangement,uniqueNodeLabelPathId:[t.guid,t.key,s].join(\"_\"),interactionState:t.interactionState,figure:t}}function E(t){t.attr(\"transform\",(function(t){return p(t.node.x0.toFixed(3),t.node.y0.toFixed(3))}))}function L(t){t.call(E)}function C(t,e){t.call(L),e.attr(\"d\",M())}function P(t){t.attr(\"width\",(function(t){return t.node.x1-t.node.x0})).attr(\"height\",(function(t){return t.visibleHeight}))}function I(t){return t.link.width>1||t.linkLineWidth>0}function O(t){return p(t.translateX,t.translateY)+(t.horizontal?\"matrix(1 0 0 1 0 0)\":\"matrix(0 1 1 0 0 0)\")}function z(t,e,r){t.on(\".basic\",null).on(\"mouseover.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.hover(this,t,e),t.interactionState.hovered=[this,t])})).on(\"mousemove.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.follow(this,t),t.interactionState.hovered=[this,t])})).on(\"mouseout.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(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||t.partOfGroup||r.select(this,t,e)}))}function D(t,e,r,i){var o=a.behavior.drag().origin((function(t){return{x:t.node.x0+t.visibleWidth/2,y:t.node.y0+t.visibleHeight/2}})).on(\"dragstart\",(function(a){if(\"fixed\"!==a.arrangement&&(h.ensureSingle(i._fullLayout._infolayer,\"g\",\"dragcover\",(function(t){i._fullLayout._dragCover=t})),h.raiseToTop(this),a.interactionState.dragInProgress=a.node,F(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),\"snap\"===a.arrangement)){var o=a.traceId+\"|\"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):function(t,e,r,i){!function(t){for(var e=0;e0&&n.forceLayouts[e].alpha(0)}}(0,e,a,r)).stop()}(0,o,a),function(t,e,r,n,i){window.requestAnimationFrame((function a(){var o;for(o=0;o0)window.requestAnimationFrame(a);else{var s=r.node.originalX;r.node.x0=s-r.visibleWidth/2,r.node.x1=s+r.visibleWidth/2,R(r,i)}}))}(t,e,a,o,i)}})).on(\"drag\",(function(r){if(\"fixed\"!==r.arrangement){var n=a.event.x,i=a.event.y;\"snap\"===r.arrangement?(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2,r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2):(\"freeform\"===r.arrangement&&(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2),i=Math.max(0,Math.min(r.size-r.visibleHeight/2,i)),r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2),F(r.node),\"snap\"!==r.arrangement&&(r.sankey.update(r.graph),C(t.filter(B(r)),e))}})).on(\"dragend\",(function(t){if(\"fixed\"!==t.arrangement){t.interactionState.dragInProgress=!1;for(var e=0;el&&C[v].gap;)v--;for(x=C[v].s,g=C.length-1;g>v;g--)C[g].s=x;for(;lM[u]&&u=0;i--){var a=t[i];if(\"scatter\"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],933:[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(\"./period_defaults\"),u=t(\"./stack_defaults\"),f=t(\"./marker_defaults\"),h=t(\"./line_defaults\"),p=t(\"./line_shape_defaults\"),d=t(\"./text_defaults\"),g=t(\"./fillcolor_defaults\");e.exports=function(t,e,r,m){function v(r,i){return n.coerce(t,e,a,r,i)}var y=l(t,e,m,v);if(y||(e.visible=!1),e.visible){c(t,e,m,v),v(\"xhoverformat\"),v(\"yhoverformat\");var x=u(t,e,m,v),b=!x&&y=Math.min(e,r)&&d<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(h.c2p(t.x)-d);return a=Math.min(e,r)&&g<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(p.c2p(t.y)-g);return aW!=(N=z[I][1])>=W&&(R=z[I-1][0],F=z[I][0],N-B&&(D=R+(F-R)*(W-B)/(N-B),H=Math.min(H,D),q=Math.max(q,D)));H=Math.max(H,0),q=Math.min(q,h._length);var X=s.defaultLine;return s.opacity(f.fillcolor)?X=f.fillcolor:s.opacity((f.line||{}).color)&&(X=f.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:H,x1:q,y0:W,y1:W,color:X,hovertemplate:!1}),delete t.index,f.text&&!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../lib\":503,\"../../registry\":638,\"./get_trace_color\":936}],938:[function(t,e,r){\"use strict\";var n=t(\"./subtypes\");e.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"./cross_trace_defaults\"),calc:t(\"./calc\").calc,crossTraceCalc:t(\"./cross_trace_calc\"),arraysToCalcdata:t(\"./arrays_to_calcdata\"),plot:t(\"./plot\"),colorbar:t(\"./marker_colorbar\"),formatLabels:t(\"./format_labels\"),style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"./select\"),animatable:!0,moduleType:\"trace\",name:\"scatter\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"symbols\",\"errorBarsOK\",\"showLegend\",\"scatter-like\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"./arrays_to_calcdata\":925,\"./attributes\":926,\"./calc\":927,\"./cross_trace_calc\":931,\"./cross_trace_defaults\":932,\"./defaults\":933,\"./format_labels\":935,\"./hover\":937,\"./marker_colorbar\":944,\"./plot\":947,\"./select\":948,\"./style\":950,\"./subtypes\":951}],939:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray,i=t(\"../../components/colorscale/helpers\").hasColorscale,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\"}):s(\"line.color\",!n(c)&&c||r);s(\"line.width\"),(l||{}).noDash||s(\"line.dash\")}},{\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503}],940:[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,m,v,y,x,b,_,w,T,k,A,M,S=e.xaxis,E=e.yaxis,L=\"log\"===S.type,C=\"log\"===E.type,P=S._length,I=E._length,O=e.connectGaps,z=e.baseTolerance,D=e.shape,R=\"linear\"===D,F=e.fill&&\"none\"!==e.fill,B=[],N=f.minTolerance,j=t.length,U=new Array(j),V=0;function H(r){var n=t[r];if(!n)return!1;var a=e.linearized?S.l2p(n.x):S.c2p(n.x),l=e.linearized?E.l2p(n.y):E.c2p(n.y);if(a===i){if(L&&(a=S.c2p(n.x,!0)),a===i)return!1;C&&l===i&&(a*=Math.abs(S._m*I*(S._m>0?o:s)/(E._m*P*(E._m>0?o:s)))),a*=1e3}if(l===i){if(C&&(l=E.c2p(n.y,!0)),l===i)return!1;l*=1e3}return[a,l]}function q(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&&crt||t[1]it)return[u(t[0],et,rt),u(t[1],nt,it)]}function st(t,e){return t[0]===e[0]&&(t[0]===et||t[0]===rt)||(t[1]===e[1]&&(t[1]===nt||t[1]===it)||void 0)}function lt(t,e,r){return function(n,i){var a=ot(n),o=ot(i),s=[];if(a&&o&&st(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 ct(t){var e=t[0],r=t[1],n=e===U[V-1][0],i=r===U[V-1][1];if(!n||!i)if(V>1){var a=e===U[V-2][0],o=r===U[V-2][1];n&&(e===et||e===rt)&&a?o?V--:U[V-1]=t:i&&(r===nt||r===it)&&o?a?V--:U[V-1]=t:U[V++]=t}else U[V++]=t}function ut(t){U[V-1][0]!==t[0]&&U[V-1][1]!==t[1]&&ct([Z,J]),ct(t),K=null,Z=J=0}function ft(t){if(A=t[0]/P,M=t[1]/I,W=t[0]rt?rt:0,X=t[1]it?it:0,W||X){if(V)if(K){var e=$(K,t);e.length>1&&(ut(e[0]),U[V++]=e[1])}else Q=$(U[V-1],t)[0],U[V++]=Q;else U[V++]=[W||t[0],X||t[1]];var r=U[V-1];W&&X&&(r[0]!==W||r[1]!==X)?(K&&(Z!==W&&J!==X?ct(Z&&J?(n=K,a=(i=t)[0]-n[0],o=(i[1]-n[1])/a,(n[1]*i[0]-i[1]*n[0])/a>0?[o>0?et:rt,it]:[o>0?rt:et,nt]):[Z||W,J||X]):Z&&J&&ct([Z,J])),ct([W,X])):Z-W&&J-X&&ct([W||Z,X||J]),K=t,Z=W,J=X}else K&&ut($(K,t)[0]),U[V++]=t;var n,i,a,o}for(\"linear\"===D||\"spline\"===D?$=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var a=at[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&&Y(o,t)G(d,ht))break;a=d,(_=v[0]*m[0]+v[1]*m[1])>x?(x=_,h=d,g=!1):_=t.length||!d)break;ft(d),n=d}}else ft(h)}K&&ct([Z||K[0],J||K[1]]),B.push(U.slice(0,V))}return B}},{\"../../constants/numerical\":479,\"../../lib\":503,\"./constants\":930}],941:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){\"spline\"===r(\"line.shape\")&&r(\"line.smoothing\")}},{}],942:[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=0?l=p:(l=p=h,h++),l0?Math.max(r,a):0}}},{\"fast-isnumeric\":190}],944:[function(t,e,r){\"use strict\";e.exports={container:\"marker\",min:\"cmin\",max:\"cmax\"}},{}],945:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/helpers\").hasColorscale,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\":366,\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"./subtypes\":951}],946:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").dateTick0,i=t(\"../../constants/numerical\").ONEWEEK;function a(t,e){return n(e,t%i==0?1:0)}e.exports=function(t,e,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n(\"xperiod\");o&&(n(\"xperiod0\",a(o,e.xcalendar)),n(\"xperiodalignment\"))}if(i.y){var s=n(\"yperiod\");s&&(n(\"yperiod0\",a(s,e.ycalendar)),n(\"yperiodalignment\"))}}},{\"../../constants/numerical\":479,\"../../lib\":503}],947:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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 m;!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),m=0;o.forEach((function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(t){return v?t.transition():t}var x=r.xaxis,b=r.yaxis,_=f[0].trace,w=_.line,T=n.select(d),k=o(T,\"g\",\"errorbars\"),A=o(T,\"g\",\"lines\"),M=o(T,\"g\",\"points\"),S=o(T,\"g\",\"text\");if(i.getComponentMethod(\"errorbars\",\"plot\")(t,k,r,g),!0===_.visible){var E,L;y(T).style(\"opacity\",_.opacity);var C=_.fill.charAt(_.fill.length-1);\"x\"!==C&&\"y\"!==C&&(C=\"\"),f[0][r.isRangePlot?\"nodeRangePlot3\":\"node3\"]=T;var P,I,O=\"\",z=[],D=_._prevtrace;D&&(O=D._prevRevpath||\"\",L=D._nextFill,z=D._polygons);var R,F,B,N,j,U,V,H=\"\",q=\"\",G=[],Y=a.noop;if(E=_._ownFill,c.hasLines(_)||\"none\"!==_.fill){for(L&&L.datum(f),-1!==[\"hv\",\"vh\",\"hvh\",\"vhv\"].indexOf(w.shape)?(R=l.steps(w.shape),F=l.steps(w.shape.split(\"\").reverse().join(\"\"))):R=F=\"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\")},B=function(t){return F(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,fill:_.fill}),V=_._polygons=new Array(G.length),m=0;m1){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 W=A.selectAll(\".js-line\").data(G);y(W.exit()).style(\"opacity\",0).remove(),W.each(Y(!1)),W.enter().append(\"path\").classed(\"js-line\",!0).style(\"vector-effect\",\"non-scaling-stroke\").call(l.lineGroupStyle).each(Y(!0)),l.setClipUrl(W,r.layerClipId,t),G.length?(E?(E.datum(f),N&&U&&(C?(\"y\"===C?N[1]=U[1]=b.c2p(0,!0):\"x\"===C&&(N[0]=U[0]=x.c2p(0,!0)),y(E).attr(\"d\",\"M\"+U+\"L\"+N+\"L\"+H.substr(1)).call(l.singleFillStyle)):y(E).attr(\"d\",H+\"Z\").call(l.singleFillStyle))):L&&(\"tonext\"===_.fill.substr(0,6)&&H&&O?(\"tonext\"===_.fill?y(L).attr(\"d\",H+\"Z\"+O+\"Z\").call(l.singleFillStyle):y(L).attr(\"d\",H+\"L\"+O.substr(1)+\"Z\").call(l.singleFillStyle),_._polygons=_._polygons.concat(z)):(Z(L),_._polygons=null)),_._prevRevpath=q,_._prevPolygons=V):(E?Z(E):L&&Z(L),_._polygons=_._prevRevpath=_._prevPolygons=null),M.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 m=s,_=u.stackgroup,w=_&&\"infer zero\"===t._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?m=w?K:J:_&&!w&&(m=Q),f&&(d=m),h&&(g=m)}var T,k=(o=e.selectAll(\"path.point\").data(d,p)).enter().append(\"path\").classed(\"point\",!0);v&&k.call(l.pointStyle,u,t).call(l.translatePoints,x,b).style(\"opacity\",0).transition().style(\"opacity\",1),o.order(),f&&(T=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,T,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()})),v?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()}(M,S,f);var X=!1===_.cliponaxis?null:r.layerClipId;l.setClipUrl(M,X,t),l.setClipUrl(S,X,t)}function Z(t){y(t).attr(\"d\",\"M0,0Z\")}function J(t){return t.filter((function(t){return!t.gap&&t.vis}))}function K(t){return t.filter((function(t){return t.vis}))}function Q(t){return t.filter((function(t){return!t.gap}))}function $(t){return t.id}function tt(t){if(t.ids)return $}function et(){return!1}}e.exports=function(t,e,r,i,a,c){var u,h,d=!a,g=!!a&&a.duration>0,m=f(t,e,r);((u=i.selectAll(\"g.trace\").data(m,(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(e){var i=o(n.select(this),\"g\",\"fills\");l.setClipUrl(i,r.layerClipId,t);var a=e[0].trace,c=[];a._ownfill&&c.push(\"_ownFill\"),a._nexttrace&&c.push(\"_nextFill\");var u=i.selectAll(\"g\").data(c,s);u.enter().append(\"g\"),u.exit().each((function(t){a[t]=null})).remove(),u.order().each((function(t){a[t]=o(n.select(this),\"path\",\"js-fill\")}))}))}(t,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,m,this,a)}))}))):u.each((function(r,n){p(t,n,e,r,m,this,a)}));d&&u.exit().remove(),i.selectAll(\"path:not([d])\").remove()}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/polygon\":515,\"../../registry\":638,\"./line_points\":940,\"./link_traces\":942,\"./subtypes\":951,\"@plotly/d3\":58}],948:[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;r0){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-1?-1:t.indexOf(\"right\")>-1?1:0}function b(t){return null==t?0:t.indexOf(\"top\")>-1?-1:t.indexOf(\"bottom\")>-1?1:0}function _(t,e){return e(4*t)}function w(t){return p[t]}function T(t,e,r,n,i){var a=null;if(l.isArrayOrTypedArray(t)){a=[];for(var o=0;o=0){var g=function(t,e,r){var n,i=(r+1)%3,a=(r+2)%3,o=[],l=[];for(n=0;n=0&&f(\"surfacecolor\",h||p);for(var d=[\"x\",\"y\",\"z\"],g=0;g<3;++g){var m=\"projection.\"+d[g];f(m+\".show\")&&(f(m+\".opacity\"),f(m+\".scale\"))}var v=n.getComponentMethod(\"errorbars\",\"supplyDefaults\");v(t,e,h||p||r,{axis:\"z\"}),v(t,e,h||p||r,{axis:\"y\",inherit:\"z\"}),v(t,e,h||p||r,{axis:\"x\",inherit:\"z\"})}else e.visible=!1}},{\"../../lib\":503,\"../../registry\":638,\"../scatter/line_defaults\":939,\"../scatter/marker_defaults\":945,\"../scatter/subtypes\":951,\"../scatter/text_defaults\":952,\"./attributes\":954}],959:[function(t,e,r){\"use strict\";e.exports={plot:t(\"./convert\"),attributes:t(\"./attributes\"),markerSymbols:t(\"../../constants/gl3d_markers\"),supplyDefaults:t(\"./defaults\"),colorbar:[{container:\"marker\",min:\"cmin\",max:\"cmax\"},{container:\"line\",min:\"cmin\",max:\"cmax\"}],calc:t(\"./calc\"),moduleType:\"trace\",name:\"scatter3d\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../constants/gl3d_markers\":477,\"../../plots/gl3d\":598,\"./attributes\":954,\"./calc\":955,\"./convert\":957,\"./defaults\":958}],960:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../../plots/template_attributes\").texttemplateAttrs,s=t(\"../../components/colorscale/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=n.marker,u=n.line,f=c.line;e.exports={carpet:{valType:\"string\",editType:\"calc\"},a:{valType:\"data_array\",editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},mode:l({},n.mode,{dflt:\"markers\"}),text:l({},n.text,{}),texttemplate:o({editType:\"plot\"},{keys:[\"a\",\"b\",\"text\"]}),hovertext:l({},n.hovertext,{}),line:{color:u.color,width:u.width,dash:u.dash,shape:l({},u.shape,{values:[\"linear\",\"spline\"]}),smoothing:u.smoothing,editType:\"calc\"},connectgaps:n.connectgaps,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\"},s(\"marker.line\")),gradient:c.gradient,editType:\"calc\"},s(\"marker\")),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:l({},i.hoverinfo,{flags:[\"a\",\"b\",\"text\",\"name\"]}),hoveron:n.hoveron,hovertemplate:a()}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926}],961:[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\")}return o}function y(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,\"\"):t._hovertitle,m.push(r+\": \"+e.toFixed(3)+t.labelsuffix)}}},{\"../../lib\":503,\"../scatter/hover\":937}],966:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../scatter/select\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"scattercarpet\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"svg\",\"carpet\",\"symbols\",\"showLegend\",\"carpetDependent\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":960,\"./calc\":961,\"./defaults\":962,\"./event_data\":963,\"./format_labels\":964,\"./hover\":965,\"./plot\":967}],967:[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\")}(c,g,t,l[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}},{\"../../components/fx\":406,\"../../constants/numerical\":479,\"../../lib\":503,\"../scatter/get_trace_color\":936,\"./attributes\":968}],974:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),calcGeoJSON:t(\"./plot\").calcGeoJSON,plot:t(\"./plot\").plot,style:t(\"./style\"),styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"scattergeo\",basePlotModule:t(\"../../plots/geo\"),categories:[\"geo\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/geo\":589,\"../scatter/marker_colorbar\":944,\"../scatter/style\":950,\"./attributes\":968,\"./calc\":969,\"./defaults\":970,\"./event_data\":971,\"./format_labels\":972,\"./hover\":973,\"./plot\":975,\"./select\":976,\"./style\":977}],975:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../lib/topojson_utils\").getTopojsonFeatures,o=t(\"../../lib/geojson_utils\"),s=t(\"../../lib/geo_location_utils\"),l=t(\"../../plots/cartesian/autorange\").findExtremes,c=t(\"../../constants/numerical\").BADNUM,u=t(\"../scatter/calc\").calcMarkerSize,f=t(\"../scatter/subtypes\"),h=t(\"./style\");e.exports={calcGeoJSON:function(t,e){var r,n,i=t[0].trace,o=e[i.geo],f=o._subplot,h=i._length;if(Array.isArray(i.locations)){var p=i.locationmode,d=\"geojson-id\"===p?s.extractTraceFeature(t):a(i,f.topojson);for(r=0;r=m,w=2*b,T={},k=l.makeCalcdata(e,\"x\"),A=y.makeCalcdata(e,\"y\"),M=s(e,l,\"x\",k),S=s(e,y,\"y\",A),E=M.vals,L=S.vals;e._x=E,e._y=L,e.xperiodalignment&&(e._origX=k,e._xStarts=M.starts,e._xEnds=M.ends),e.yperiodalignment&&(e._origY=A,e._yStarts=S.starts,e._yEnds=S.ends);var C=new Array(w),P=new Array(b);for(r=0;r1&&i.extendFlat(s.line,p.linePositions(t,r,n));if(s.errorX||s.errorY){var l=p.errorBarPositions(t,r,n,a,o);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}s.text&&(i.extendFlat(s.text,{positions:n},p.textPosition(t,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},p.textPosition(t,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},p.textPosition(t,r,s.text,s.markerUnsel)));return s}(t,0,e,C,E,L),z=d(t,x);return f(o,e),_?O.marker&&(I=O.marker.sizeAvg||Math.max(O.marker.size,3)):I=c(e,b),u(t,e,l,y,E,L,I),O.errorX&&v(e,l,O.errorX),O.errorY&&v(e,y,O.errorY),O.fill&&!z.fill2d&&(z.fill2d=!0),O.marker&&!z.scatter2d&&(z.scatter2d=!0),O.line&&!z.line2d&&(z.line2d=!0),!O.errorX&&!O.errorY||z.error2d||(z.error2d=!0),O.text&&!z.glText&&(z.glText=!0),O.marker&&(O.marker.snap=b),z.lineOptions.push(O.line),z.errorXOptions.push(O.errorX),z.errorYOptions.push(O.errorY),z.fillOptions.push(O.fill),z.markerOptions.push(O.marker),z.markerSelectedOptions.push(O.markerSel),z.markerUnselectedOptions.push(O.markerUnsel),z.textOptions.push(O.text),z.textSelectedOptions.push(O.textSel),z.textUnselectedOptions.push(O.textUnsel),z.selectBatch.push([]),z.unselectBatch.push([]),T._scene=z,T.index=z.count,T.x=E,T.y=L,T.positions=C,z.count++,[{x:!1,y:!1,t:T,trace:e}]}},{\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/align_period\":551,\"../../plots/cartesian/autorange\":553,\"../../plots/cartesian/axis_ids\":558,\"../scatter/calc\":927,\"../scatter/colorscale_calc\":929,\"./constants\":980,\"./convert\":981,\"./scene_update\":989,\"@plotly/point-cluster\":59}],980:[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]}}},{}],981:[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(\"./helpers\"),d=t(\"./constants\"),g=t(\"../../constants/interactions\").DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=t(\"../../components/fx/helpers\").appendArrayPointValue;function y(t,e){var r,i=t._fullLayout,a=e._length,o=e.textfont,l=e.textposition,c=Array.isArray(l)?l:[l],u=o.color,f=o.size,h=o.family,p={},d=t._context.plotGlPixelRatio,g=e.texttemplate;if(g){p.text=[];var m=i._d3locale,y=Array.isArray(g),x=y?Math.min(g.length,a):a,b=y?function(t){return g[t]}:function(){return g};for(r=0;rd.TOO_MANY_POINTS||f.hasMarkers(e)?\"rect\":\"round\";if(c&&e.connectgaps){var h=n[0],p=n[1];for(i=0;i1?l[i]:l[0]:l,d=Array.isArray(c)?c.length>1?c[i]:c[0]:c,g=m[p],v=m[d],y=u?u/.8+1:0,x=-v*y-.5*v;o.offset[i]=[g*y/h,x/h]}}return o}}},{\"../../components/drawing\":388,\"../../components/fx/helpers\":402,\"../../constants/interactions\":478,\"../../lib\":503,\"../../lib/gl_format_color\":499,\"../../plots/cartesian/axis_ids\":558,\"../../registry\":638,\"../scatter/make_bubble_size_func\":943,\"../scatter/subtypes\":951,\"./constants\":980,\"./helpers\":985,\"color-normalize\":89,\"fast-isnumeric\":190,\"svg-path-sdf\":310}],982:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"./helpers\"),o=t(\"./attributes\"),s=t(\"../scatter/constants\"),l=t(\"../scatter/subtypes\"),c=t(\"../scatter/xy_defaults\"),u=t(\"../scatter/period_defaults\"),f=t(\"../scatter/marker_defaults\"),h=t(\"../scatter/line_defaults\"),p=t(\"../scatter/fillcolor_defaults\"),d=t(\"../scatter/text_defaults\");e.exports=function(t,e,r,g){function m(r,i){return n.coerce(t,e,o,r,i)}var v=!!t.marker&&a.isOpenSymbol(t.marker.symbol),y=l.isBubble(t),x=c(t,e,g,m);if(x){u(t,e,g,m),m(\"xhoverformat\"),m(\"yhoverformat\");var b=x100},r.isDotSymbol=function(t){return\"string\"==typeof t?n.DOT_RE.test(t):t>200}},{\"./constants\":980}],986:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../scatter/get_trace_color\");function o(t,e,r,o){var s=t.xa,l=t.ya,c=t.distance,u=t.dxy,f=t.index,h={pointNumber:f,x:e[f],y:r[f]};h.tx=Array.isArray(o.text)?o.text[f]:o.text,h.htx=Array.isArray(o.hovertext)?o.hovertext[f]:o.hovertext,h.data=Array.isArray(o.customdata)?o.customdata[f]:o.customdata,h.tp=Array.isArray(o.textposition)?o.textposition[f]:o.textposition;var p=o.textfont;p&&(h.ts=i.isArrayOrTypedArray(p.size)?p.size[f]:p.size,h.tc=Array.isArray(p.color)?p.color[f]:p.color,h.tf=Array.isArray(p.family)?p.family[f]:p.family);var d=o.marker;d&&(h.ms=i.isArrayOrTypedArray(d.size)?d.size[f]:d.size,h.mo=i.isArrayOrTypedArray(d.opacity)?d.opacity[f]:d.opacity,h.mx=i.isArrayOrTypedArray(d.symbol)?d.symbol[f]:d.symbol,h.mc=i.isArrayOrTypedArray(d.color)?d.color[f]:d.color);var g=d&&d.line;g&&(h.mlc=Array.isArray(g.color)?g.color[f]:g.color,h.mlw=i.isArrayOrTypedArray(g.width)?g.width[f]:g.width);var m=d&&d.gradient;m&&\"none\"!==m.type&&(h.mgt=Array.isArray(m.type)?m.type[f]:m.type,h.mgc=Array.isArray(m.color)?m.color[f]:m.color);var v=s.c2p(h.x,!0),y=l.c2p(h.y,!0),x=h.mrc||1,b=o.hoverlabel;b&&(h.hbg=Array.isArray(b.bgcolor)?b.bgcolor[f]:b.bgcolor,h.hbc=Array.isArray(b.bordercolor)?b.bordercolor[f]:b.bordercolor,h.hts=i.isArrayOrTypedArray(b.font.size)?b.font.size[f]:b.font.size,h.htc=Array.isArray(b.font.color)?b.font.color[f]:b.font.color,h.htf=Array.isArray(b.font.family)?b.font.family[f]:b.font.family,h.hnl=i.isArrayOrTypedArray(b.namelength)?b.namelength[f]:b.namelength);var _=o.hoverinfo;_&&(h.hi=Array.isArray(_)?_[f]:_);var w=o.hovertemplate;w&&(h.ht=Array.isArray(w)?w[f]:w);var T={};T[t.index]=h;var k=o._origX,A=o._origY,M=i.extendFlat({},t,{color:a(o,h),x0:v-x,x1:v+x,xLabelVal:k?k[f]:h.x,y0:y-x,y1:y+x,yLabelVal:A?A[f]:h.y,cd:T,distance:c,spikeDistance:u,hovertemplate:h.ht});return h.htx?M.text=h.htx:h.tx?M.text=h.tx:o.text&&(M.text=o.text),i.fillText(h,o,M),n.getComponentMethod(\"errorbars\",\"hoverInfo\")(h,o,M),M}e.exports={hoverPoints:function(t,e,r,n){var i,a,s,l,c,u,f,h,p,d,g=t.cd,m=g[0].t,v=g[0].trace,y=t.xa,x=t.ya,b=m.x,_=m.y,w=y.c2p(e),T=x.c2p(r),k=t.distance;if(m.tree){var A=y.p2c(w-k),M=y.p2c(w+k),S=x.p2c(T-k),E=x.p2c(T+k);i=\"x\"===n?m.tree.range(Math.min(A,M),Math.min(x._rl[0],x._rl[1]),Math.max(A,M),Math.max(x._rl[0],x._rl[1])):m.tree.range(Math.min(A,M),Math.min(S,E),Math.max(A,M),Math.max(S,E))}else i=m.ids;var L=k;if(\"x\"===n){var C=!!v.xperiodalignment,P=!!v.yperiodalignment;for(u=0;u=Math.min(I,O)&&w<=Math.max(I,O)?0:1/0}if(f=Math.min(z,D)&&T<=Math.max(z,D)?0:1/0}d=Math.sqrt(f*f+h*h),s=i[u]}}}else for(u=i.length-1;u>-1;u--)l=b[a=i[u]],c=_[a],f=y.c2p(l)-w,h=x.c2p(c)-T,(p=Math.sqrt(f*f+h*h))v.glText.length){var w=b-v.glText.length;for(d=0;dr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t})),v.line2d.update(v.lineOptions)),v.error2d){var k=(v.errorXOptions||[]).concat(v.errorYOptions||[]);v.error2d.update(k)}v.scatter2d&&v.scatter2d.update(v.markerOptions),v.fillOrder=s.repeat(null,b),v.fill2d&&(v.fillOptions=v.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=v.lineOptions[e],u=[];s._ownfill&&u.push(e),s._nexttrace&&u.push(e+1),u.length&&(v.fillOrder[e]=u);var f,h,p=[],d=c&&c.positions||l.positions;if(\"tozeroy\"===s.fill){for(f=0;ff&&isNaN(d[h+1]);)h-=2;0!==d[f+1]&&(p=[d[f],0]),p=p.concat(d.slice(f,h+2)),0!==d[h+1]&&(p=p.concat([d[h],0]))}else if(\"tozerox\"===s.fill){for(f=0;ff&&isNaN(d[h]);)h-=2;0!==d[f]&&(p=[0,d[f+1]]),p=p.concat(d.slice(f,h+2)),0!==d[h]&&(p=p.concat([0,d[h+1]]))}else if(\"toself\"===s.fill||\"tonext\"===s.fill){for(p=[],i=0,t.splitNull=!0,a=0;a-1;for(d=0;d\")}function u(t){return t+\"\\xb0\"}}e.exports={hoverPoints:function(t,e,r){var o=t.cd,c=o[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(o,(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=o[t.index],m=g.lonlat,v=[i.modHalf(m[0],360)+p,m[1]],y=u.c2p(v),x=f.c2p(v),b=g.mrc||1;t.x0=y-b,t.x1=y+b,t.y0=x-b,t.y1=x+b;var _={};_[c.subplot]={_subplot:h};var w=c._module.formatLabels(g,c,_);return t.lonLabel=w.lonLabel,t.latLabel=w.latLabel,t.color=a(c,g),t.extraText=l(c,g,o[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}},getExtraText:l}},{\"../../components/fx\":406,\"../../constants/numerical\":479,\"../../lib\":503,\"../scatter/get_trace_color\":936}],997:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"../scattergeo/calc\"),plot:t(\"./plot\"),hoverPoints:t(\"./hover\").hoverPoints,eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),styleOnSelect:function(t,e){e&&e[0].trace._glTrace.update(e)},moduleType:\"trace\",name:\"scattermapbox\",basePlotModule:t(\"../../plots/mapbox\"),categories:[\"mapbox\",\"gl\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/mapbox\":613,\"../scatter/marker_colorbar\":944,\"../scattergeo/calc\":969,\"./attributes\":991,\"./defaults\":993,\"./event_data\":994,\"./format_labels\":995,\"./hover\":996,\"./plot\":998,\"./select\":999}],998:[function(t,e,r){\"use strict\";var n=t(\"./convert\"),i=t(\"../../plots/mapbox/constants\").traceLayerPrefix,a=[\"fill\",\"line\",\"circle\",\"symbol\"];function o(t,e){this.type=\"scattermapbox\",this.subplot=t,this.uid=e,this.sourceIds={fill:\"source-\"+e+\"-fill\",line:\"source-\"+e+\"-line\",circle:\"source-\"+e+\"-circle\",symbol:\"source-\"+e+\"-symbol\"},this.layerIds={fill:i+e+\"-fill\",line:i+e+\"-line\",circle:i+e+\"-circle\",symbol:i+e+\"-symbol\"},this.below=null}var s=o.prototype;s.addSource=function(t,e){this.subplot.map.addSource(this.sourceIds[t],{type:\"geojson\",data:e.geojson})},s.setSourceData=function(t,e){this.subplot.map.getSource(this.sourceIds[t]).setData(e.geojson)},s.addLayer=function(t,e,r){this.subplot.addLayer({type:t,id:this.layerIds[t],source:this.sourceIds[t],layout:e.layout,paint:e.paint},r)},s.update=function(t){var e,r,i,o=this.subplot,s=o.map,l=n(o.gd,t),c=o.belowLookup[\"trace-\"+this.uid];if(c!==this.below){for(e=a.length-1;e>=0;e--)r=a[e],s.removeLayer(this.layerIds[r]);for(e=0;e=0;e--){var r=a[e];t.removeLayer(this.layerIds[r]),t.removeSource(this.sourceIds[r])}},e.exports=function(t,e){for(var r=e[0].trace,i=new o(t,r.uid),s=n(t.gd,e),l=i.below=t.belowLookup[\"trace-\"+r.uid],c=0;c\")}}e.exports={hoverPoints: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)return o;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,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}},{\"../scatter/hover\":937}],1005:[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\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"../scatter/select\"),meta:{}}},{\"../../plots/polar\":622,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":1e3,\"./calc\":1001,\"./defaults\":1002,\"./format_labels\":1003,\"./hover\":1004,\"./plot\":1006}],1006:[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=c&&(y.marker.cluster=d.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=_),y.line&&_.length>1&&l.extendFlat(y.line,s.linePositions(t,p,_)),y.text&&(l.extendFlat(y.text,{positions:_},s.textPosition(t,p,y.text,y.marker)),l.extendFlat(y.textSel,{positions:_},s.textPosition(t,p,y.text,y.markerSel)),l.extendFlat(y.textUnsel,{positions:_},s.textPosition(t,p,y.text,y.markerUnsel))),y.fill&&!h.fill2d&&(h.fill2d=!0),y.marker&&!h.scatter2d&&(h.scatter2d=!0),y.line&&!h.line2d&&(h.line2d=!0),y.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(y.line),h.fillOptions.push(y.fill),h.markerOptions.push(y.marker),h.markerSelectedOptions.push(y.markerSel),h.markerUnselectedOptions.push(y.markerUnsel),h.textOptions.push(y.text),h.textSelectedOptions.push(y.textSel),h.textUnselectedOptions.push(y.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),d.x=w,d.y=T,d.rawx=w,d.rawy=T,d.r=m,d.theta=v,d.positions=_,d._scene=h,d.index=h.count,h.count++}})),a(t,e,r)}}},{\"../../lib\":503,\"../scattergl/constants\":980,\"../scattergl/convert\":981,\"../scattergl/plot\":988,\"../scattergl/scene_update\":989,\"@plotly/point-cluster\":59,\"fast-isnumeric\":190}],1014:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../plots/template_attributes\").texttemplateAttrs,a=t(\"../../lib/extend\").extendFlat,o=t(\"../scatter/attributes\"),s=t(\"../../plots/attributes\"),l=o.line;e.exports={mode:o.mode,real:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},imag:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},text:o.text,texttemplate:i({editType:\"plot\"},{keys:[\"real\",\"imag\",\"text\"]}),hovertext:o.hovertext,line:{color:l.color,width:l.width,dash:l.dash,shape:a({},l.shape,{values:[\"linear\",\"spline\"]}),smoothing:l.smoothing,editType:\"calc\"},connectgaps:o.connectgaps,marker:o.marker,cliponaxis:a({},o.cliponaxis,{dflt:!1}),textposition:o.textposition,textfont:o.textfont,fill:a({},o.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:o.fillcolor,hoverinfo:a({},s.hoverinfo,{flags:[\"real\",\"imag\",\"text\",\"name\"]}),hoveron:o.hoveron,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926}],1015:[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(\"../scatter/calc\").calcMarkerSize;e.exports=function(t,e){for(var r=t._fullLayout,c=e.subplot,u=r[c].realaxis,f=r[c].imaginaryaxis,h=u.makeCalcdata(e,\"real\"),p=f.makeCalcdata(e,\"imag\"),d=e._length,g=new Array(d),m=0;m\")}}e.exports={hoverPoints: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)return o;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,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}},{\"../scatter/hover\":937}],1019:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"scattersmith\",basePlotModule:t(\"../../plots/smith\"),categories:[\"smith\",\"symbols\",\"showLegend\",\"scatter-like\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"../scatter/select\"),meta:{}}},{\"../../plots/smith\":629,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":1014,\"./calc\":1015,\"./defaults\":1016,\"./format_labels\":1017,\"./hover\":1018,\"./plot\":1020}],1020:[function(t,e,r){\"use strict\";var n=t(\"../scatter/plot\"),i=t(\"../../constants/numerical\").BADNUM,a=t(\"../../plots/smith/helpers\").smith;e.exports=function(t,e,r){for(var o=e.layers.frontplot.select(\"g.scatterlayer\"),s={xaxis:e.xaxis,yaxis:e.yaxis,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},l=0;l\"),o.hovertemplate=h.hovertemplate,a}function x(t,e){v.push(t._hovertitle+\": \"+e)}}},{\"../scatter/hover\":937}],1027:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../scatter/select\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"scatterternary\",basePlotModule:t(\"../../plots/ternary\"),categories:[\"ternary\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/ternary\":634,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":1021,\"./calc\":1022,\"./defaults\":1023,\"./event_data\":1024,\"./format_labels\":1025,\"./hover\":1026,\"./plot\":1028}],1028:[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\":947}],1029:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../scattergl/attributes\"),l=t(\"../../plots/cartesian/constants\").idRegex,c=t(\"../../plot_api/plot_template\").templatedArray,u=t(\"../../lib/extend\").extendFlat,f=n.marker,h=f.line,p=u(i(\"marker.line\",{editTypeOverride:\"calc\"}),{width:u({},h.width,{editType:\"calc\"}),editType:\"calc\"}),d=u(i(\"marker\"),{symbol:f.symbol,size:u({},f.size,{editType:\"markerSize\"}),sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:f.opacity,colorbar:f.colorbar,line:p,editType:\"calc\"});function g(t){return{valType:\"info_array\",freeLength:!0,editType:\"calc\",items:{valType:\"subplotid\",regex:l[t],editType:\"plot\"}}}d.color.editType=d.cmin.editType=d.cmax.editType=\"style\",e.exports={dimensions:c(\"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\"},matches:{valType:\"boolean\",dflt:!1,editType:\"calc\"},editType:\"calc+clearAxisTypes\"},editType:\"calc+clearAxisTypes\"}),text:u({},s.text,{}),hovertext:u({},s.hovertext,{}),hovertemplate:o(),xhoverformat:a(\"x\"),yhoverformat:a(\"y\"),marker:d,xaxes:g(\"x\"),yaxes:g(\"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:s.selected.marker,editType:\"calc\"},unselected:{marker:s.unselected.marker,editType:\"calc\"},opacity:s.opacity}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/plot_template\":543,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/cartesian/constants\":561,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926,\"../scattergl/attributes\":978}],1030:[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;function u(t,e,r){for(var n=r.matrixOptions.data.length,i=e._visibleDims,a=r.viewOpts.ranges=new Array(n),o=0;oh?b.sizeAvg||Math.max(b.size,3):a(e,x),p=0;pa&&l||i-1,P=!0;if(o(x)||!!p.selectedpoints||C){var I=p._length;if(p.selectedpoints){g.selectBatch=p.selectedpoints;var O=p.selectedpoints,z={};for(l=0;l1&&(u=g[y-1],h=m[y-1],d=v[y-1]),e=0;eu?\"-\":\"+\")+\"x\")).replace(\"y\",(f>h?\"-\":\"+\")+\"y\")).replace(\"z\",(p>d?\"-\":\"+\")+\"z\");var L=function(){y=0,M=[],S=[],E=[]};(!y||y2?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,u=e._len,f={};function d(t,e){var n=r[e],o=i[c[e]];return a.simpleMap(t,(function(t){return n.d2l(t)*o}))}if(f.vectors=l(d(e._u,\"xaxis\"),d(e._v,\"yaxis\"),d(e._w,\"zaxis\"),u),!u)return{positions:[],cells:[]};var g=d(e._Xs,\"xaxis\"),m=d(e._Ys,\"yaxis\"),v=d(e._Zs,\"zaxis\");if(f.meshgrid=[g,m,v],f.gridFill=e._gridFill,e._slen)f.startingPositions=l(d(e._startsX,\"xaxis\"),d(e._startsY,\"yaxis\"),d(e._startsZ,\"zaxis\"));else{for(var y=m[0],x=h(g),b=h(v),_=new Array(x.length*b.length),w=0,T=0;T=0};v?(r=Math.min(m.length,x.length),l=function(t){return A(m[t])&&M(t)},f=function(t){return String(m[t])}):(r=Math.min(y.length,x.length),l=function(t){return A(y[t])&&M(t)},f=function(t){return String(y[t])}),_&&(r=Math.min(r,b.length));for(var S=0;S1){for(var P=a.randstr(),I=0;I\"),name:A||z(\"name\")?y.name:void 0,color:k(\"hoverlabel.bgcolor\")||x.color,borderColor:k(\"hoverlabel.bordercolor\"),fontFamily:k(\"hoverlabel.font.family\"),fontSize:k(\"hoverlabel.font.size\"),fontColor:k(\"hoverlabel.font.color\"),nameLength:k(\"hoverlabel.namelength\"),textAlign:k(\"hoverlabel.align\"),hovertemplate:A,hovertemplateLabels:P,eventData:l};m&&(F.x0=E-i.rInscribed*i.rpx1,F.x1=E+i.rInscribed*i.rpx1,F.idealAlign=i.pxmid[0]<0?\"left\":\"right\"),v&&(F.x=E,F.idealAlign=E<0?\"left\":\"right\");var B=[];o.loneHover(F,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:r,inOut_bbox:B}),l[0].bbox=B[0],d._hasHoverLabel=!0}if(v){var N=t.select(\"path.surface\");h.styleOne(N,i,y,{hovered:!0})}d._hasHoverEvent=!0,r.emit(\"plotly_hover\",{points:l||[f(i,y,h.eventDataKeys)],event:n.event})}})),t.on(\"mouseout\",(function(e){var i=r._fullLayout,a=r._fullData[d.index],s=n.select(this).datum();if(d._hasHoverEvent&&(e.originalEvent=n.event,r.emit(\"plotly_unhover\",{points:[f(s,a,h.eventDataKeys)],event:n.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(o.loneUnhover(i._hoverlayer.node()),d._hasHoverLabel=!1),v){var l=t.select(\"path.surface\");h.styleOne(l,s,a,{hovered:!1})}})),t.on(\"click\",(function(t){var e=r._fullLayout,a=r._fullData[d.index],s=m&&(c.isHierarchyRoot(t)||c.isLeaf(t)),u=c.getPtId(t),p=c.isEntry(t)?c.findEntryWithChild(g,u):c.findEntryWithLevel(g,u),v=c.getPtId(p),y={points:[f(t,a,h.eventDataKeys)],event:n.event};s||(y.nextLevel=v);var x=l.triggerHandler(r,\"plotly_\"+d.type+\"click\",y);if(!1!==x&&e.hovermode&&(r._hoverdata=[f(t,a,h.eventDataKeys)],o.click(r,n.event)),!s&&!1!==x&&!r._dragging&&!r._transitioning){i.call(\"_storeDirectGUIEdit\",a,e._tracePreGUI[a.uid],{level:a.level});var b={data:[{level:v}],traces:[d.index]},_={frame:{redraw:!1,duration:h.transitionTime},transition:{duration:h.transitionTime,easing:h.transitionEasing},mode:\"immediate\",fromcurrent:!0};o.loneUnhover(e._hoverlayer.node()),i.call(\"animate\",r,b,_)}}))}},{\"../../components/fx\":406,\"../../components/fx/helpers\":402,\"../../lib\":503,\"../../lib/events\":492,\"../../registry\":638,\"../pie/helpers\":905,\"./helpers\":1051,\"@plotly/d3\":58}],1051:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\"),a=t(\"../../lib/setcursor\"),o=t(\"../pie/helpers\");function s(t){return t.data.data.pid}r.findEntryWithLevel=function(t,e){var n;return e&&t.eachAfter((function(t){if(r.getPtId(t)===e)return n=t.copy()})),n||t},r.findEntryWithChild=function(t,e){var n;return t.eachAfter((function(t){for(var i=t.children||[],a=0;a0)},r.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},r.isHeader=function(t,e){return!(r.isLeaf(t)||t.depth===e._maxDepth-1)},r.getParent=function(t,e){return r.findEntryWithLevel(t,s(e))},r.listPath=function(t,e){var n=t.parent;if(!n)return[];var i=e?[n.data[e]]:[n];return r.listPath(n,e).concat(i)},r.getPath=function(t){return r.listPath(t,\"label\").join(\"/\")+\"/\"},r.formatValue=o.formatPieValue,r.formatPercent=function(t,e){var r=n.formatPercent(t,0);return\"0%\"===r&&(r=o.formatPiePercent(t,e)),r}},{\"../../components/color\":366,\"../../lib\":503,\"../../lib/setcursor\":524,\"../pie/helpers\":905}],1052:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"sunburst\",basePlotModule:t(\"./base_plot\"),categories:[],animatable:!0,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\").plot,style:t(\"./style\").style,colorbar:t(\"../scatter/marker_colorbar\"),meta:{}}},{\"../scatter/marker_colorbar\":944,\"./attributes\":1045,\"./base_plot\":1046,\"./calc\":1047,\"./defaults\":1049,\"./layout_attributes\":1053,\"./layout_defaults\":1054,\"./plot\":1055,\"./style\":1056}],1053:[function(t,e,r){\"use strict\";e.exports={sunburstcolorway:{valType:\"colorlist\",editType:\"calc\"},extendsunburstcolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],1054:[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(\"sunburstcolorway\",e.colorway),r(\"extendsunburstcolors\")}},{\"../../lib\":503,\"./layout_attributes\":1053}],1055:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-hierarchy\"),a=t(\"d3-interpolate\").interpolate,o=t(\"../../components/drawing\"),s=t(\"../../lib\"),l=t(\"../../lib/svg_text_utils\"),c=t(\"../bar/uniform_text\"),u=c.recordMinTextSize,f=c.clearMinTextSize,h=t(\"../pie/plot\"),p=t(\"../pie/helpers\").getRotationAngle,d=h.computeTransform,g=h.transformInsideText,m=t(\"./style\").styleOne,v=t(\"../bar/style\").resizeText,y=t(\"./fx\"),x=t(\"./constants\"),b=t(\"./helpers\");function _(t,e,c,f){var h=t._fullLayout,v=!h.uniformtext.mode&&b.hasTransition(f),_=n.select(c).selectAll(\"g.slice\"),T=e[0],k=T.trace,A=T.hierarchy,M=b.findEntryWithLevel(A,k.level),S=b.getMaxDepth(k),E=h._size,L=k.domain,C=E.w*(L.x[1]-L.x[0]),P=E.h*(L.y[1]-L.y[0]),I=.5*Math.min(C,P),O=T.cx=E.l+E.w*(L.x[1]+L.x[0])/2,z=T.cy=E.t+E.h*(1-L.y[0])-P/2;if(!M)return _.remove();var D=null,R={};v&&_.each((function(t){R[b.getPtId(t)]={rpx0:t.rpx0,rpx1:t.rpx1,x0:t.x0,x1:t.x1,transform:t.transform},!D&&b.isEntry(t)&&(D=t)}));var F=function(t){return i.partition().size([2*Math.PI,t.height+1])(t)}(M).descendants(),B=M.height+1,N=0,j=S;T.hasMultipleRoots&&b.isHierarchyRoot(M)&&(F=F.slice(1),B-=1,N=1,j+=1),F=F.filter((function(t){return t.y1<=j}));var U=p(k.rotation);U&&F.forEach((function(t){t.x0+=U,t.x1+=U}));var V=Math.min(B,S),H=function(t){return(t-N)/V*I},q=function(t,e){return[t*Math.cos(e),-t*Math.sin(e)]},G=function(t){return s.pathAnnulus(t.rpx0,t.rpx1,t.x0,t.x1,O,z)},Y=function(t){return O+w(t)[0]*(t.transform.rCenter||0)+(t.transform.x||0)},W=function(t){return z+w(t)[1]*(t.transform.rCenter||0)+(t.transform.y||0)};(_=_.data(F,b.getPtId)).enter().append(\"g\").classed(\"slice\",!0),v?_.exit().transition().each((function(){var t=n.select(this);t.select(\"path.surface\").transition().attrTween(\"d\",(function(t){var e=function(t){var e,r=b.getPtId(t),n=R[r],i=R[b.getPtId(M)];if(i){var o=(t.x1>i.x1?2*Math.PI:0)+U;e=t.rpx1X?2*Math.PI:0)+U;e={x0:i,x1:i}}else e={rpx0:I,rpx1:I},s.extendFlat(e,K(t));else e={rpx0:0,rpx1:0};else e={x0:U,x1:U};return a(e,n)}(t);return function(t){return G(e(t))}})):f.attr(\"d\",G),c.call(y,M,t,e,{eventDataKeys:x.eventDataKeys,transitionTime:x.CLICK_TRANSITION_TIME,transitionEasing:x.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,t,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:t._transitioning}),f.call(m,i,k);var p=s.ensureSingle(c,\"g\",\"slicetext\"),_=s.ensureSingle(p,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),w=s.ensureUniformFontSize(t,b.determineTextFont(k,i,h.font));_.text(r.formatSliceLabel(i,M,k,e,h)).classed(\"slicetext\",!0).attr(\"text-anchor\",\"middle\").call(o.font,w).call(l.convertToTspans,t);var A=o.bBox(_.node());i.transform=g(A,i,T),i.transform.targetX=Y(i),i.transform.targetY=W(i);var S=function(t,e){var r=t.transform;return d(r,e),r.fontSize=w.size,u(k.type,r,h),s.getTextTransform(r)};v?_.transition().attrTween(\"transform\",(function(t){var e=function(t){var e,r=R[b.getPtId(t)],n=t.transform;if(r)e=r;else if(e={rpx1:t.rpx1,transform:{textPosAngle:n.textPosAngle,scale:0,rotate:n.rotate,rCenter:n.rCenter,x:n.x,y:n.y}},D)if(t.parent)if(X){var i=t.x1>X?2*Math.PI:0;e.x0=e.x1=i}else s.extendFlat(e,K(t));else e.x0=e.x1=U;else e.x0=e.x1=U;var o=a(e.transform.textPosAngle,t.transform.textPosAngle),l=a(e.rpx1,t.rpx1),c=a(e.x0,t.x0),f=a(e.x1,t.x1),p=a(e.transform.scale,n.scale),d=a(e.transform.rotate,n.rotate),g=0===n.rCenter?3:0===e.transform.rCenter?1/3:1,m=a(e.transform.rCenter,n.rCenter);return function(t){var e=l(t),r=c(t),i=f(t),a=function(t){return m(Math.pow(t,g))}(t),s={pxmid:q(e,(r+i)/2),rpx1:e,transform:{textPosAngle:o(t),rCenter:a,x:n.x,y:n.y}};return u(k.type,n,h),{transform:{targetX:Y(s),targetY:W(s),scale:p(t),rotate:d(t),rCenter:a}}}}(t);return function(t){return S(e(t),A)}})):_.attr(\"transform\",S(i,A))}))}function w(t){return e=t.rpx1,r=t.transform.textPosAngle,[e*Math.sin(r),-e*Math.cos(r)];var e,r}r.plot=function(t,e,r,i){var a,o,s=t._fullLayout,l=s._sunburstlayer,c=!r,u=!s.uniformtext.mode&&b.hasTransition(r);(f(\"sunburst\",s),(a=l.selectAll(\"g.trace.sunburst\").data(e,(function(t){return t[0].trace.uid}))).enter().append(\"g\").classed(\"trace\",!0).classed(\"sunburst\",!0).attr(\"stroke-linejoin\",\"round\"),a.order(),u)?(i&&(o=i()),n.transition().duration(r.duration).ease(r.easing).each(\"end\",(function(){o&&o()})).each(\"interrupt\",(function(){o&&o()})).each((function(){l.selectAll(\"g.trace\").each((function(e){_(t,e,this,r)}))}))):(a.each((function(e){_(t,e,this,r)})),s.uniformtext.mode&&v(t,s._sunburstlayer.selectAll(\".trace\"),\"sunburst\"));c&&a.exit().remove()},r.formatSliceLabel=function(t,e,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!(a||o&&\"none\"!==o))return\"\";var l=i.separators,c=n[0],u=t.data.data,f=c.hierarchy,h=b.isHierarchyRoot(t),p=b.getParent(f,t),d=b.getValue(t);if(!a){var g,m=o.split(\"+\"),v=function(t){return-1!==m.indexOf(t)},y=[];if(v(\"label\")&&u.label&&y.push(u.label),u.hasOwnProperty(\"v\")&&v(\"value\")&&y.push(b.formatValue(u.v,l)),!h){v(\"current path\")&&y.push(b.getPath(t.data));var x=0;v(\"percent parent\")&&x++,v(\"percent entry\")&&x++,v(\"percent root\")&&x++;var _=x>1;if(x){var w,T=function(t){g=b.formatPercent(w,l),_&&(g+=\" of \"+t),y.push(g)};v(\"percent parent\")&&!h&&(w=d/b.getValue(p),T(\"parent\")),v(\"percent entry\")&&(w=d/b.getValue(e),T(\"entry\")),v(\"percent root\")&&(w=d/b.getValue(f),T(\"root\"))}}return v(\"text\")&&(g=s.castOption(r,u.i,\"text\"),s.isValidTextValue(g)&&y.push(g)),y.join(\"
\")}var k=s.castOption(r,u.i,\"texttemplate\");if(!k)return\"\";var A={};u.label&&(A.label=u.label),u.hasOwnProperty(\"v\")&&(A.value=u.v,A.valueLabel=b.formatValue(u.v,l)),A.currentPath=b.getPath(t.data),h||(A.percentParent=d/b.getValue(p),A.percentParentLabel=b.formatPercent(A.percentParent,l),A.parent=b.getPtLabel(p)),A.percentEntry=d/b.getValue(e),A.percentEntryLabel=b.formatPercent(A.percentEntry,l),A.entry=b.getPtLabel(e),A.percentRoot=d/b.getValue(f),A.percentRootLabel=b.formatPercent(A.percentRoot,l),A.root=b.getPtLabel(f),u.hasOwnProperty(\"color\")&&(A.color=u.color);var M=s.castOption(r,u.i,\"text\");return(s.isValidTextValue(M)||\"\"===M)&&(A.text=M),A.customdata=s.castOption(r,u.i,\"customdata\"),s.texttemplateString(k,A,i._d3locale,A,r._meta||{})}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../bar/style\":662,\"../bar/uniform_text\":664,\"../pie/helpers\":905,\"../pie/plot\":909,\"./constants\":1048,\"./fx\":1050,\"./helpers\":1051,\"./style\":1056,\"@plotly/d3\":58,\"d3-hierarchy\":115,\"d3-interpolate\":116}],1056:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../bar/uniform_text\").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,\"marker.line.color\")||i.defaultLine,c=a.castOption(r,s,\"marker.line.width\")||0;t.style(\"stroke-width\",c).call(i.fill,n.color).call(i.stroke,l).style(\"opacity\",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._sunburstlayer.selectAll(\".trace\");o(t,e,\"sunburst\"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style(\"opacity\",r.opacity),e.selectAll(\"path.surface\").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{\"../../components/color\":366,\"../../lib\":503,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],1057:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=t(\"../../plot_api/edit_types\").overrideAll;function u(t){return{show:{valType:\"boolean\",dflt:!1},start:{valType:\"number\",dflt:null,editType:\"plot\"},end:{valType:\"number\",dflt:null,editType:\"plot\"},size:{valType:\"number\",dflt:null,min:0,editType:\"plot\"},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 f=e.exports=c(l({z:{valType:\"data_array\"},x:{valType:\"data_array\"},y:{valType:\"data_array\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:o(),xhoverformat:a(\"x\"),yhoverformat:a(\"y\"),zhoverformat:a(\"z\"),connectgaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},surfacecolor:{valType:\"data_array\"}},i(\"\",{colorAttr:\"z or surfacecolor\",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:\"calc\"}),{contours:{x:u(),y:u(),z:u()},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},opacityscale:{valType:\"any\",editType:\"calc\"},_deprecated:{zauto:l({},i.zauto,{}),zmin:l({},i.zmin,{}),zmax:l({},i.zmax,{})},hoverinfo:l({},s.hoverinfo),showlegend:l({},s.showlegend,{dflt:!1})}),\"calc\",\"nested\");f.x.editType=f.y.editType=f.z.editType=\"calc+clearAxisTypes\",f.transforms=void 0},{\"../../components/color\":366,\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/edit_types\":536,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633}],1058:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.surfacecolor?n(t,e,{vals:e.surfacecolor,containerStr:\"\",cLetter:\"c\"}):n(t,e,{vals:e.z,containerStr:\"\",cLetter:\"c\"})}},{\"../../components/colorscale/calc\":374}],1059:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_surface3d,i=t(\"../../../stackgl_modules\").ndarray,a=t(\"../../../stackgl_modules\").ndarray_linear_interpolate.d2,o=t(\"../heatmap/interp2d\"),s=t(\"../heatmap/find_empties\"),l=t(\"../../lib\").isArrayOrTypedArray,c=t(\"../../lib/gl_format_color\").parseColorScale,u=t(\"../../lib/str2rgbarray\"),f=t(\"../../components/colorscale\").extractOpts;function h(t,e,r){this.scene=t,this.uid=r,this.surface=e,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var p=h.prototype;p.getXat=function(t,e,r,n){var i=l(this.data.x)?l(this.data.x[0])?this.data.x[e][t]:this.data.x[t]:t;return void 0===r?i:n.d2l(i,0,r)},p.getYat=function(t,e,r,n){var i=l(this.data.y)?l(this.data.y[0])?this.data.y[e][t]:this.data.y[e]:e;return void 0===r?i:n.d2l(i,0,r)},p.getZat=function(t,e,r,n){var i=this.data.z[e][t];return null===i&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[e][t]),void 0===r?i:n.d2l(i,0,r)},p.handlePick=function(t){if(t.object===this.surface){var e=(t.data.index[0]-1)/this.dataScaleX-1,r=(t.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(e),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);t.index=[n,i],t.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],t.dataCoordinate=[this.getXat(n,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=t.dataCoordinate[a];null!=o&&(t.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return Array.isArray(s)&&s[i]&&void 0!==s[i][n]?t.textLabel=s[i][n]:t.textLabel=s||\"\",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}};var d=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function g(t,e){if(t0){r=d[n];break}return r}function y(t,e){if(!(t<1||e<1)){for(var r=m(t),n=m(e),i=1,a=0;a_;)r--,r/=v(r),++r1?n:1},p.refineCoords=function(t){for(var e=this.dataScaleX,r=this.dataScaleY,n=t[0].shape[0],a=t[0].shape[1],o=0|Math.floor(t[0].shape[0]*e+1),s=0|Math.floor(t[0].shape[1]*r+1),l=1+n+1,c=1+a+1,u=i(new Float32Array(l*c),[l,c]),f=[1/e,0,0,0,1/r,0,0,0,1],h=0;h0&&null!==this.contourStart[t]&&null!==this.contourEnd[t]&&this.contourEnd[t]>this.contourStart[t]))for(i[t]=!0,e=this.contourStart[t];ea&&(this.minValues[e]=a),this.maxValues[e]\",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\"}}},{}],1066:[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=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)}))),m=e.domain,v=Math.floor(t._fullLayout._size.w*(m.x[1]-m.x[0])),y=Math.floor(t._fullLayout._size.h*(m.y[1]-m.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),T=f(h(x,_),[]),k=f(w,T),A={},M=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})),E=S.reduce(s,0);S=S.map((function(t){return t/E*v}));var L=Math.max(o(e.header.line.width),o(e.cells.line.width)),C={key:e.uid+t._context.staticPlot,translateX:m.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-m.y[1]),size:t._fullLayout._size,width:v,maxLineWidth:L,height:y,columnOrder:M,groupHeight:y,rowBlocks:k,headerRowBlocks:T,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:M[e],xScale:u,x:void 0,calcdata:void 0,columnWidth:S[e]}}))};return C.columns.forEach((function(t){t.calcdata=C,t.x=u(t)})),C}},{\"../../lib/extend\":493,\"./constants\":1065,\"fast-isnumeric\":190}],1067:[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\":493}],1068:[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/i),l=!o||s;t.mayHaveMarkup=o&&i.match(/[<&>]/);var c,u=\"string\"==typeof(c=i)&&c.match(n.latexCheck);t.latex=u;var f,h,p=u?\"\":T(t.calcdata.cells.prefix,e,r)||\"\",d=u?\"\":T(t.calcdata.cells.suffix,e,r)||\"\",g=u?null:T(t.calcdata.cells.format,e,r)||null,m=p+(g?a(g)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&&!l&&!u&&(f=w(m)),t.cellHeightMayIncrease=s||u||t.mayHaveMarkup||(void 0===f?w(m):f),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var v=(\" \"===n.wrapSplitCharacter?m.replace(/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){var e=D(t.rowBlocks,t.page)-t.scrollY;return u(0,e)})),t&&(C(t,r,e,c,n.prevPages,n,0),C(t,r,e,c,n.prevPages,n,1),x(r,t))}}function L(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,u=s.scrollY;s.scrollY=void 0===a?s.scrollY+c*i.event.dy:a;var f=l.selectAll(\".\"+n.cn.yColumn).selectAll(\".\"+n.cn.columnBlock).filter(A);return E(t,f,l),s.scrollY===u}}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]}));b(t,e,a,r),i[o]=n[o]})))}function P(t,e,r,a){return function(){var o=i.select(e.parentNode);o.each((function(t){var e=t.fragments;o.selectAll(\"tspan.line\").each((function(t,r){e[r].width=this.getComputedTextLength()}));var r,i,a=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+a)>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})),o.selectAll(\"tspan.line\").remove(),_(o.select(\".\"+n.cn.cellText),r,t,a),i.select(e.parentNode.parentNode).call(z)}}function I(t,e,r,a,o){return function(){if(!o.settledY){var s=i.select(e.parentNode),l=B(o),c=o.key-l.firstRowIndex,f=l.rows[c].rowHeight,h=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:f,p=Math.max(h,f);p-l.rows[c].rowHeight&&(l.rows[c].rowHeight=p,t.selectAll(\".\"+n.cn.columnCell).call(z),E(null,t.filter(A),0),x(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 u(O(o,i.select(this.parentNode).select(\".\"+n.cn.cellTextHolder).node().getBoundingClientRect().width),a)})),o.settledY=!0}}}function O(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 z(t){t.attr(\"transform\",(function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce((function(t,e){return t+R(e,1/0)}),0),r=R(B(t),t.key);return u(0,r+e)})).selectAll(\".\"+n.cn.cellRect).attr(\"height\",(function(t){return(e=B(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r}))}function D(t,e){for(var r=0,n=e-1;n>=0;n--)r+=F(t[n]);return r}function R(t,e){for(var r=0,n=0;n\",\"<\",\"|\",\"/\",\"\\\\\"],dflt:\">\",editType:\"plot\"},thickness:{valType:\"number\",min:12,editType:\"plot\"},textfont:u({},s.textfont,{}),editType:\"calc\"},text:s.text,textinfo:l.textinfo,texttemplate:i({editType:\"plot\"},{keys:c.eventDataKeys.concat([\"label\",\"value\"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:n({},{keys:c.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u({},s.outsidetextfont,{}),textposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle left\",\"middle center\",\"middle right\",\"bottom left\",\"bottom center\",\"bottom right\"],dflt:\"top left\",editType:\"plot\"},sort:s.sort,root:l.root,domain:o({name:\"treemap\",trace:!0,editType:\"calc\"})}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/domain\":584,\"../../plots/template_attributes\":633,\"../pie/attributes\":900,\"../sunburst/attributes\":1045,\"./constants\":1074}],1072:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"treemap\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":619}],1073:[function(t,e,r){\"use strict\";var n=t(\"../sunburst/calc\");r.calc=function(t,e){return n.calc(t,e)},r.crossTraceCalc=function(t){return n._runCrossTraceCalc(\"treemap\",t)}},{\"../sunburst/calc\":1047}],1074:[function(t,e,r){\"use strict\";e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:\"poly\",eventDataKeys:[\"currentPath\",\"root\",\"entry\",\"percentRoot\",\"percentEntry\",\"percentParent\"],gapWithPathbar:1}},{}],1075:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../components/color\"),o=t(\"../../plots/domain\").defaults,s=t(\"../bar/defaults\").handleText,l=t(\"../bar/constants\").TEXTPAD,c=t(\"../../components/colorscale\"),u=c.hasColorscale,f=c.handleDefaults;e.exports=function(t,e,r,c){function h(r,a){return n.coerce(t,e,i,r,a)}var p=h(\"labels\"),d=h(\"parents\");if(p&&p.length&&d&&d.length){var g=h(\"values\");g&&g.length?h(\"branchvalues\"):h(\"count\"),h(\"level\"),h(\"maxdepth\"),\"squarify\"===h(\"tiling.packing\")&&h(\"tiling.squarifyratio\"),h(\"tiling.flip\"),h(\"tiling.pad\");var m=h(\"text\");h(\"texttemplate\"),e.texttemplate||h(\"textinfo\",Array.isArray(m)?\"text+label\":\"label\"),h(\"hovertext\"),h(\"hovertemplate\");var v=h(\"pathbar.visible\");s(t,e,c,h,\"auto\",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h(\"textposition\");var y=-1!==e.textposition.indexOf(\"bottom\");h(\"marker.line.width\")&&h(\"marker.line.color\",c.paper_bgcolor);var x=h(\"marker.colors\");(e._hasColorscale=u(t,\"marker\",\"colors\")||(t.marker||{}).coloraxis)?f(t,e,c,h,{prefix:\"marker.\",cLetter:\"c\"}):h(\"marker.depthfade\",!(x||[]).length);var b=2*e.textfont.size;h(\"marker.pad.t\",y?b/4:b),h(\"marker.pad.l\",b/4),h(\"marker.pad.r\",b/4),h(\"marker.pad.b\",y?b:b/4),e._hovered={marker:{line:{width:2,color:a.contrast(c.paper_bgcolor)}}},v&&(h(\"pathbar.thickness\",e.pathbar.textfont.size+2*l),h(\"pathbar.side\"),h(\"pathbar.edgeshape\")),h(\"sort\"),h(\"root.color\"),o(e,c,h),e._length=null}else e.visible=!1}},{\"../../components/color\":366,\"../../components/colorscale\":378,\"../../lib\":503,\"../../plots/domain\":584,\"../bar/constants\":650,\"../bar/defaults\":652,\"./attributes\":1071}],1076:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../sunburst/helpers\"),a=t(\"../bar/uniform_text\").clearMinTextSize,o=t(\"../bar/style\").resizeText,s=t(\"./plot_one\");e.exports=function(t,e,r,l,c){var u,f,h=c.type,p=c.drawDescendants,d=t._fullLayout,g=d[\"_\"+h+\"layer\"],m=!r;(a(h,d),(u=g.selectAll(\"g.trace.\"+h).data(e,(function(t){return t[0].trace.uid}))).enter().append(\"g\").classed(\"trace\",!0).classed(h,!0),u.order(),!d.uniformtext.mode&&i.hasTransition(r))?(l&&(f=l()),n.transition().duration(r.duration).ease(r.easing).each(\"end\",(function(){f&&f()})).each(\"interrupt\",(function(){f&&f()})).each((function(){g.selectAll(\"g.trace\").each((function(e){s(t,e,this,r,p)}))}))):(u.each((function(e){s(t,e,this,r,p)})),d.uniformtext.mode&&o(t,g.selectAll(\".trace\"),h));m&&u.exit().remove()}},{\"../bar/style\":662,\"../bar/uniform_text\":664,\"../sunburst/helpers\":1051,\"./plot_one\":1085,\"@plotly/d3\":58}],1077:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../lib/svg_text_utils\"),s=t(\"./partition\"),l=t(\"./style\").styleOne,c=t(\"./constants\"),u=t(\"../sunburst/helpers\"),f=t(\"../sunburst/fx\");e.exports=function(t,e,r,h,p){var d=p.barDifY,g=p.width,m=p.height,v=p.viewX,y=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,T=p.handleSlicesExit,k=p.makeUpdateSliceInterpolator,A=p.makeUpdateTextInterpolator,M={},S=t._fullLayout,E=e[0],L=E.trace,C=E.hierarchy,P=g/L._entryDepth,I=u.listPath(r.data,\"id\"),O=s(C.copy(),[g,m],{packing:\"dice\",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(O=O.filter((function(t){var e=I.indexOf(t.data.id);return-1!==e&&(t.x0=P*e,t.x1=P*(e+1),t.y0=d,t.y1=d+m,t.onPathbar=!0,!0)}))).reverse(),(h=h.data(O,u.getPtId)).enter().append(\"g\").classed(\"pathbar\",!0),T(h,!0,M,[g,m],x),h.order();var z=h;w&&(z=z.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),z.each((function(s){s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-Math.min(g,m)/2),s._hoverY=y(s.y1-m/2);var h=n.select(this),p=i.ensureSingle(h,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?p.transition().attrTween(\"d\",(function(t){var e=k(t,!0,M,[g,m]);return function(t){return x(e(t))}})):p.attr(\"d\",x),h.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),p.call(l,s,L,{hovered:!1}),s._text=(u.getPtLabel(s)||\"\").split(\"
\").join(\" \")||\"\";var d=i.ensureSingle(h,\"g\",\"slicetext\"),T=i.ensureSingle(d,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),E=i.ensureUniformFontSize(t,u.determineTextFont(L,s,S.font,{onPathbar:!0}));T.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",\"start\").call(a.font,E).call(o.convertToTspans,t),s.textBB=a.bBox(T.node()),s.transform=b(s,{fontSize:E.size,onPathbar:!0}),s.transform.fontSize=E.size,w?T.transition().attrTween(\"transform\",(function(t){var e=A(t,!0,M,[g,m]);return function(t){return _(e(t))}})):T.attr(\"transform\",_(s))}))}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../sunburst/fx\":1050,\"../sunburst/helpers\":1051,\"./constants\":1074,\"./partition\":1083,\"./style\":1086,\"@plotly/d3\":58}],1078:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../lib/svg_text_utils\"),s=t(\"./partition\"),l=t(\"./style\").styleOne,c=t(\"./constants\"),u=t(\"../sunburst/helpers\"),f=t(\"../sunburst/fx\"),h=t(\"../sunburst/plot\").formatSliceLabel;e.exports=function(t,e,r,p,d){var g=d.width,m=d.height,v=d.viewX,y=d.viewY,x=d.pathSlice,b=d.toMoveInsideSlice,_=d.strTransform,w=d.hasTransition,T=d.handleSlicesExit,k=d.makeUpdateSliceInterpolator,A=d.makeUpdateTextInterpolator,M=d.prevEntry,S=t._fullLayout,E=e[0].trace,L=-1!==E.textposition.indexOf(\"left\"),C=-1!==E.textposition.indexOf(\"right\"),P=-1!==E.textposition.indexOf(\"bottom\"),I=!P&&!E.marker.pad.t||P&&!E.marker.pad.b,O=s(r,[g,m],{packing:E.tiling.packing,squarifyratio:E.tiling.squarifyratio,flipX:E.tiling.flip.indexOf(\"x\")>-1,flipY:E.tiling.flip.indexOf(\"y\")>-1,pad:{inner:E.tiling.pad,top:E.marker.pad.t,left:E.marker.pad.l,right:E.marker.pad.r,bottom:E.marker.pad.b}}).descendants(),z=1/0,D=-1/0;O.forEach((function(t){var e=t.depth;e>=E._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(z=Math.min(z,e),D=Math.max(D,e))})),p=p.data(O,u.getPtId),E._maxVisibleLayers=isFinite(D)?D-z+1:0,p.enter().append(\"g\").classed(\"slice\",!0),T(p,!1,{},[g,m],x),p.order();var R=null;if(w&&M){var F=u.getPtId(M);p.each((function(t){null===R&&u.getPtId(t)===F&&(R={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var B=function(){return R||{x0:0,x1:g,y0:0,y1:m}},N=p;return w&&(N=N.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),N.each((function(s){var p=u.isHeader(s,E);s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-E.marker.pad.r),s._hoverY=y(P?s.y1-E.marker.pad.b/2:s.y0+E.marker.pad.t/2);var d=n.select(this),T=i.ensureSingle(d,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?T.transition().attrTween(\"d\",(function(t){var e=k(t,!1,B(),[g,m]);return function(t){return x(e(t))}})):T.attr(\"d\",x),d.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{isTransitioning:t._transitioning}),T.call(l,s,E,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text=\"\":s._text=p?I?\"\":u.getPtLabel(s)||\"\":h(s,r,E,e,S)||\"\";var M=i.ensureSingle(d,\"g\",\"slicetext\"),O=i.ensureSingle(M,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),z=i.ensureUniformFontSize(t,u.determineTextFont(E,s,S.font));O.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",C?\"end\":L||p?\"start\":\"middle\").call(a.font,z).call(o.convertToTspans,t),s.textBB=a.bBox(O.node()),s.transform=b(s,{fontSize:z.size,isHeader:p}),s.transform.fontSize=z.size,w?O.transition().attrTween(\"transform\",(function(t){var e=A(t,!1,B(),[g,m]);return function(t){return _(e(t))}})):O.attr(\"transform\",_(s))})),R}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../sunburst/fx\":1050,\"../sunburst/helpers\":1051,\"../sunburst/plot\":1055,\"./constants\":1074,\"./partition\":1083,\"./style\":1086,\"@plotly/d3\":58}],1079:[function(t,e,r){\"use strict\";e.exports=function t(e,r,n){var i;n.swapXY&&(i=e.x0,e.x0=e.y0,e.y0=i,i=e.x1,e.x1=e.y1,e.y1=i),n.flipX&&(i=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-i),n.flipY&&(i=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-i);var a=e.children;if(a)for(var o=0;o-1?C+O:-(I+O):0,D={x0:P,x1:P,y0:z,y1:z+I},R=function(t,e,r){var n=v.tiling.pad,i=function(t){return t-n<=e.x0},a=function(t){return t+n>=e.x1},o=function(t){return t-n<=e.y0},s=function(t){return t+n>=e.y1};return t.x0===e.x0&&t.x1===e.x1&&t.y0===e.y0&&t.y1===e.y1?{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}:{x0:i(t.x0-n)?0:a(t.x0-n)?r[0]:t.x0,x1:i(t.x1+n)?0:a(t.x1+n)?r[0]:t.x1,y0:o(t.y0-n)?0:s(t.y0-n)?r[1]:t.y0,y1:o(t.y1+n)?0:s(t.y1+n)?r[1]:t.y1}},F=null,B={},N={},j=null,U=function(t,e){return e?B[h(t)]:N[h(t)]},V=function(t,e,r,n){if(e)return B[h(x)]||D;var i=N[v.level]||r;return function(t){return t.data.depth-b.data.depth=(n-=(y?m:m.r)-s)){var x=(r+n)/2;r=x,n=x}var b;f?i<(b=a-(y?m:m.b))&&b\"===tt?(l.x-=a,c.x-=a,u.x-=a,f.x-=a):\"/\"===tt?(u.x-=a,f.x-=a,o.x-=a/2,s.x-=a/2):\"\\\\\"===tt?(l.x-=a,c.x-=a,o.x-=a/2,s.x-=a/2):\"<\"===tt&&(o.x-=a,s.x-=a),$(l),$(f),$(o),$(c),$(u),$(s),\"M\"+K(l.x,l.y)+\"L\"+K(c.x,c.y)+\"L\"+K(s.x,s.y)+\"L\"+K(u.x,u.y)+\"L\"+K(f.x,f.y)+\"L\"+K(o.x,o.y)+\"Z\"},toMoveInsideSlice:et,makeUpdateSliceInterpolator:nt,makeUpdateTextInterpolator:it,handleSlicesExit:at,hasTransition:A,strTransform:ot}):w.remove()}},{\"../../lib\":503,\"../bar/constants\":650,\"../bar/plot\":659,\"../bar/uniform_text\":664,\"../sunburst/helpers\":1051,\"./constants\":1074,\"./draw_ancestors\":1077,\"@plotly/d3\":58,\"d3-interpolate\":116}],1086:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../sunburst/helpers\"),s=t(\"../bar/uniform_text\").resizeText;function l(t,e,r,n){var s,l,c=(n||{}).hovered,u=e.data.data,f=u.i,h=u.color,p=o.isHierarchyRoot(e),d=1;if(c)s=r._hovered.marker.line.color,l=r._hovered.marker.line.width;else if(p&&h===r.root.color)d=100,s=\"rgba(0,0,0,0)\",l=0;else if(s=a.castOption(r,f,\"marker.line.color\")||i.defaultLine,l=a.castOption(r,f,\"marker.line.width\")||0,!r._hasColorscale&&!e.onPathbar){var g=r.marker.depthfade;if(g){var m,v=i.combine(i.addOpacity(r._backgroundColor,.75),h);if(!0===g){var y=o.getMaxDepth(r);m=isFinite(y)?o.isLeaf(e)?0:r._maxVisibleLayers-(e.data.depth-r._entryDepth):e.data.height+1}else m=e.data.depth-r._entryDepth,r._atRootLevel||m++;if(m>0)for(var x=0;x0){var x,b,_,w,T,k=t.xa,A=t.ya;\"h\"===p.orientation?(T=e,x=\"y\",_=A,b=\"x\",w=k):(T=r,x=\"x\",_=k,b=\"y\",w=A);var M=h[t.index];if(T>=M.span[0]&&T<=M.span[1]){var S=n.extendFlat({},t),E=w.c2p(T,!0),L=o.getKdeValue(M,p,T),C=o.getPositionOnKdePath(M,p,E),P=_._offset,I=_._length;S[x+\"0\"]=C[0],S[x+\"1\"]=C[1],S[b+\"0\"]=S[b+\"1\"]=E,S[b+\"Label\"]=b+\": \"+i.hoverLabelText(w,T,p[b+\"hoverformat\"])+\", \"+h[0].t.labels.kde+\" \"+L.toFixed(3),S.spikeDistance=y[0].spikeDistance;var O=x+\"Spike\";S[O]=y[0][O],y[0].spikeDistance=void 0,y[0][O]=void 0,S.hovertemplate=!1,v.push(S),(u={stroke:t.color})[x+\"1\"]=n.constrain(P+C[0],P,P+I),u[x+\"2\"]=n.constrain(P+C[1],P,P+I),u[b+\"1\"]=u[b+\"2\"]=w._offset+E}}g&&(v=v.concat(y))}-1!==d.indexOf(\"points\")&&(c=a.hoverOnPoints(t,e,r));var z=f.selectAll(\".violinline-\"+p.uid).data(u?[0]:[]);return z.enter().append(\"line\").classed(\"violinline-\"+p.uid,!0).attr(\"stroke-width\",1.5),z.exit().remove(),z.attr(u),\"closest\"===s?c?[c]:v:c?(v.push(c),v):v}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"../box/hover\":678,\"./helpers\":1091}],1093:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"../box/defaults\").crossTraceDefaults,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\":568,\"../box/defaults\":676,\"../box/select\":683,\"../scatter/style\":950,\"./attributes\":1087,\"./calc\":1088,\"./cross_trace_calc\":1089,\"./defaults\":1090,\"./hover\":1092,\"./layout_attributes\":1094,\"./layout_defaults\":1095,\"./plot\":1096,\"./style\":1097}],1094:[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\":503,\"../box/layout_attributes\":680}],1095:[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\":503,\"../box/layout_defaults\":681,\"./layout_attributes\":1094}],1096:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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,linearized:!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;if(!0!==c.visible||s.empty)r.remove();else{var d=s.bPos,g=s.bdPos,m=e[s.valLetter+\"axis\"],v=e[s.posLetter+\"axis\"],y=\"both\"===c.side,x=y||\"positive\"===c.side,b=y||\"negative\"===c.side,_=r.selectAll(\"path.violin\").data(i.identity);_.enter().append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").attr(\"class\",\"violin\"),_.exit().remove(),_.each((function(t){var e,r,i,a,o,l,f,h,_=n.select(this),w=t.density,T=w.length,k=v.c2l(t.pos+d,!0),A=v.l2p(k);if(c.width)e=s.maxKDE/g;else{var M=u._violinScaleGroupStats[c.scalegroup];e=\"count\"===c.scalemode?M.maxKDE/g*(M.maxCount/t.pts.length):M.maxKDE/g}if(x){for(f=new Array(T),o=0;o\")),u.color=function(t,e){var r=t[e.dir].marker,n=r.color,a=r.line.color,o=r.line.width;if(i(n))return n;if(i(a)&&o)return a}(h,m),[u]}function k(t){return n(g,t,h[d+\"hoverformat\"])}}},{\"../../components/color\":366,\"../../constants/delta.js\":473,\"../../plots/cartesian/axes\":554,\"../bar/hover\":655}],1109:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\"),plot:t(\"./plot\"),style:t(\"./style\").style,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"../bar/select\"),moduleType:\"trace\",name:\"waterfall\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"../bar/select\":660,\"./attributes\":1102,\"./calc\":1103,\"./cross_trace_calc\":1105,\"./defaults\":1106,\"./event_data\":1107,\"./hover\":1108,\"./layout_attributes\":1110,\"./layout_defaults\":1111,\"./plot\":1112,\"./style\":1113}],1110:[function(t,e,r){\"use strict\";e.exports={waterfallmode:{valType:\"enumerated\",values:[\"group\",\"overlay\"],dflt:\"group\",editType:\"calc\"},waterfallgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},waterfallgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],1111:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s0&&(m+=h?\"M\"+f[0]+\",\"+d[1]+\"V\"+d[0]:\"M\"+f[1]+\",\"+d[0]+\"H\"+f[0]),\"between\"!==p&&(r.isSum||s path\").each((function(t){if(!t.isBlank){var e=s[t.dir].marker;n.select(this).call(a.fill,e.color).call(a.stroke,e.line.color).call(i.dashLine,e.line.dash,e.line.width).style(\"opacity\",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(\".lines\").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll(\"path\"),t.width,t.color,t.dash)}))}))}}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../constants/interactions\":478,\"../bar/style\":662,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],1114:[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,a=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,i=0;ii&&(i=u,o=c)}}return i?a(o):s};case\"rms\":return function(t,e){for(var r=0,i=0,o=0;o\":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[0]&&es[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 es[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[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?(m=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(f))},v=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(m=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},v=function(t,e){var r=x[t.astr][e];t.get().push(r)}),k(m);for(var w=o(e.transforms,r),T=0;T1?\"%{group} (%{trace})\":\"%{group}\");var l=t.styles,c=o.styles=[];if(l)for(a=0;a0?o-4:o;for(r=0;r>16&255,l[u++]=e>>8&255,l[u++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,l[u++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e);return l},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=0,s=r-i;os?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;s0)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>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join(\"\")}i[\"-\".charCodeAt(0)]=62,i[\"_\".charCodeAt(0)]=63},{}],2:[function(t,e,r){},{}],3:[function(t,e,r){(function(e){(function(){\n", "/*!\n", " * The buffer module from node.js, for the browser.\n", " *\n", @@ -156,7 +156,7 @@ " * Copyright (c) 2014-2015, Jon Schlinkert.\n", " * Licensed under the MIT License.\n", " */\n", - "\"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||void 0===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)}},{}],278:[function(t,e,r){(function(t){(function(){e.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this)}).call(this,void 0!==n?n:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}],279:[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];(l=o-((r=a+o)-a))&&(t[--n]=r,r=l)}var s=0;for(i=n;i0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=33306690738754716e-32*n;return o>=s||o<=-s?o:f(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],p=r[2]-n[2],d=a*c,g=o*l,m=o*s,v=i*c,y=i*l,x=a*s,b=u*(d-g)+f*(m-v)+p*(y-x),_=7771561172376103e-31*((Math.abs(d)+Math.abs(g))*Math.abs(u)+(Math.abs(m)+Math.abs(v))*Math.abs(f)+(Math.abs(y)+Math.abs(x))*Math.abs(p));return b>_||-b>_?b:h(t,e,r,n)}];function d(t){var e=p[t.length];return e||(e=p[t.length]=u(t.length)),e.apply(void 0,t)}function g(t,e,r,n,i,a,o){return function(e,r,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return n(e,r);case 3:return i(e,r,s);case 4:return a(e,r,s,l);case 5:return o(e,r,s,l,c)}for(var u=new Array(arguments.length),f=0;f0&&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);if(Math.max(c,u)=n?(i=f,(l+=1)=n?(i=f,(l+=1)>1,c=e[2*l+1];if(c===a)return l;a>1,c=e[2*l+1];if(c===a)return l;a>1,c=e[2*l+1];if(c===a)return l;a>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=t.length||0!==a(t[m],s)););}return r}function f(t,e){if(e<0)return[];for(var r=[],i=(1<>>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>1:(t>>1)-1}function x(t){for(var e=v(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n0;){var r=y(t);if(r>=0)if(e0){var t=k[0];return m(0,M-1),M-=1,x(0),t}return-1}function w(t,e){var r=k[t];return c[r]===e?t:(c[r]=-1/0,b(t),_(),c[r]=e,b((M+=1)-1))}function T(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))}}var k=[],A=new Array(a);for(f=0;f>1;f>=0;--f)x(f);for(;;){var S=_();if(S<0||c[S]>r)break;T(S)}var E=[];for(f=0;f=0&&r>=0&&e!==r){var n=A[e],i=A[r];n!==i&&C.push([n,i])}})),i.unique(i.normalize(C)),{positions:E,edges:C}};var n=t(\"robust-orientation\"),i=t(\"simplicial-complex\")},{\"robust-orientation\":284,\"simplicial-complex\":295}],298:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,a,o,s;if(e[0][0]e[1][0]))return i(e,t);r=e[1],a=e[0]}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])){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 lu?s-u:l-u}r=e[1],i=e[0]}t[0][1]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)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\":298,\"binary-search-bounds\":31,\"functional-red-black-tree\":69,\"robust-orientation\":284}],300:[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;l0||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;l0||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;l0||n>0&&c<0)&&r.push(o(i,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},{\"robust-dot-product\":281,\"robust-sum\":289}],301:[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(t){return i(o(t),arguments)}function n(t,r){return e.apply(null,[t].concat(r||[]))}function i(r,n){var i,a,o,s,l,c,u,f,h,p=1,d=r.length,g=\"\";for(a=0;a=0),s.type){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.width?parseInt(s.width):0);break;case\"e\":i=s.precision?parseFloat(i).toExponential(s.precision):parseFloat(i).toExponential();break;case\"f\":i=s.precision?parseFloat(i).toFixed(s.precision):parseFloat(i);break;case\"g\":i=s.precision?String(Number(i.toPrecision(s.precision))):parseFloat(i);break;case\"o\":i=(parseInt(i,10)>>>0).toString(8);break;case\"s\":i=String(i),i=s.precision?i.substring(0,s.precision):i;break;case\"t\":i=String(!!i),i=s.precision?i.substring(0,s.precision):i;break;case\"T\":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=s.precision?i.substring(0,s.precision):i;break;case\"u\":i=parseInt(i,10)>>>0;break;case\"v\":i=i.valueOf(),i=s.precision?i.substring(0,s.precision):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.type)?g+=i:(!t.number.test(s.type)||f&&!s.sign?h=\"\":(h=f?\"+\":\"-\",i=i.toString().replace(t.sign,\"\")),c=s.pad_char?\"0\"===s.pad_char?\"0\":s.pad_char.charAt(1):\" \",u=s.width-(h+i).length,l=s.width&&u>0?c.repeat(u):\"\",g+=s.align?h+i+l:\"0\"===c?h+l+i:l+h+i)}return g}var a=Object.create(null);function o(e){if(a[e])return a[e];for(var r,n=e,i=[],o=0;n;){if(null!==(r=t.text.exec(n)))i.push(r[0]);else if(null!==(r=t.modulo.exec(n)))i.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\");i.push({placeholder:r[0],param_no:r[1],keys:r[2],sign:r[3],pad_char:r[4],align:r[5],width:r[6],precision:r[7],type:r[8]})}n=n.substring(r[0].length)}return a[e]=i}void 0!==r&&(r.sprintf=e,r.vsprintf=n),\"undefined\"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}()},{}],302:[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=i(t,e),n=r.length,a=new Array(n),o=new Array(n),s=0;sn|0},vertex:function(t,e,r,n,i,a,o,s,l,c,u,f,h){var p=(o<<0)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==p&&15!==p)switch(p){case 0:u.push([t-.5,e-.5]);break;case 1:u.push([t-.25-.25*(n+r-2*h)/(r-n),e-.25-.25*(i+r-2*h)/(r-i)]);break;case 2:u.push([t-.75-.25*(-n-r+2*h)/(n-r),e-.25-.25*(a+n-2*h)/(n-a)]);break;case 3:u.push([t-.5,e-.5-.5*(i+r+a+n-4*h)/(r-i+n-a)]);break;case 4:u.push([t-.25-.25*(a+i-2*h)/(i-a),e-.75-.25*(-i-r+2*h)/(i-r)]);break;case 5:u.push([t-.5-.5*(n+r+a+i-4*h)/(r-n+i-a),e-.5]);break;case 6:u.push([t-.5-.25*(-n-r+a+i)/(n-r+i-a),e-.5-.25*(-i-r+a+n)/(i-r+n-a)]);break;case 7:u.push([t-.75-.25*(a+i-2*h)/(i-a),e-.75-.25*(a+n-2*h)/(n-a)]);break;case 8:u.push([t-.75-.25*(-a-i+2*h)/(a-i),e-.75-.25*(-a-n+2*h)/(a-n)]);break;case 9:u.push([t-.5-.25*(n+r+-a-i)/(r-n+a-i),e-.5-.25*(i+r+-a-n)/(r-i+a-n)]);break;case 10:u.push([t-.5-.5*(-n-r-a-i+4*h)/(n-r+a-i),e-.5]);break;case 11:u.push([t-.25-.25*(-a-i+2*h)/(a-i),e-.75-.25*(i+r-2*h)/(r-i)]);break;case 12:u.push([t-.5,e-.5-.5*(-i-r-a-n+4*h)/(i-r+a-n)]);break;case 13:u.push([t-.75-.25*(n+r-2*h)/(r-n),e-.25-.25*(-a-n+2*h)/(a-n)]);break;case 14:u.push([t-.25-.25*(-n-r+2*h)/(n-r),e-.25-.25*(-i-r+2*h)/(i-r)]);break;case 15:u.push([t-.5,e-.5])}},cell:function(t,e,r,n,i,a,o,s,l){i?s.push([t,e]):s.push([e,t])}});return function(t,e){var r=[],i=[];return n(t,r,i,e),{positions:r,cells:i}}}};var o={}},{\"ndarray-extract-contour\":251,\"zero-crossings\":318}],303:[function(t,e,r){(function(r){(function(){\"use strict\";e.exports=function t(e,r,i){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;o0&&(f+=.02);var p=new Float32Array(u),d=0,g=-.5*f;for(h=0;hMath.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],m=Math.cos(d),v=Math.sin(d),y=Math.cos(g),x=Math.sin(g),b=this.computedCenter,_=m*y,w=v*y,T=x,k=-m*x,A=-v*x,M=y,S=this.computedEye,E=this.computedMatrix;for(a=0;a<3;++a){var L=_*r[a]+w*h[a]+T*e[a];E[4*a+1]=k*r[a]+A*h[a]+M*e[a],E[4*a+2]=L,E[4*a+3]=0}var C=E[1],P=E[5],I=E[9],O=E[2],z=E[6],D=E[10],R=P*D-I*z,F=I*O-C*D,B=C*z-P*O,N=c(R,F,B);R/=N,F/=N,B/=N,E[0]=R,E[4]=F,E[8]=B;for(a=0;a<3;++a)S[a]=b[a]+E[2+4*a]*p;for(a=0;a<3;++a){u=0;for(var j=0;j<3;++j)u+=E[a+4*j]*S[j];E[12+a]=-u}E[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,m=(f/=d)*e+o*r,v=(h/=d)*e+s*r;this.center.move(t,g,m,v);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 m=c(s,l,f);s/=m,l/=m,f/=m}var v,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*f,T=c(x-=s*w,b-=l*w,_-=f*w),k=l*(_/=T)-f*(b/=T),A=f*(x/=T)-s*_,M=s*b-l*x,S=c(k,A,M);if(k/=S,A/=S,M/=S,this.center.jump(t,q,G,Y),this.radius.idle(t),this.up.jump(t,s,l,f),this.right.jump(t,x,b,_),2===a){var E=e[1],L=e[5],C=e[9],P=E*x+L*b+C*_,I=E*k+L*A+C*M;v=R<0?-Math.PI/2:Math.PI/2,y=Math.atan2(I,P)}else{var O=e[2],z=e[6],D=e[10],R=O*s+z*l+D*f,F=O*x+z*b+D*_,B=O*k+z*A+D*M;v=Math.asin(u(R)),y=Math.atan2(B,F)}this.angle.jump(t,y,v),this.recalcMatrix(t);var N=e[2],j=e[6],U=e[10],V=this.computedMatrix;i(V,e);var H=V[15],q=V[12]/H,G=V[13]/H,Y=V[14]/H,W=Math.exp(this.computedRadius[0]);this.center.jump(t,q-N*W,G-j*W,Y-U*W)},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],m=d[1],v=d[2],y=i*g+a*m+o*v,x=c(g-=y*i,m-=y*a,v-=y*o);if(!(x<.01&&(x=c(g=a*h-o*f,m=o*l-i*h,v=i*f-a*l))<1e-6)){g/=x,m/=x,v/=x,this.up.set(t,i,a,o),this.right.set(t,g,m,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var b=a*v-o*m,_=o*g-i*v,w=i*m-a*g,T=c(b,_,w),k=i*l+a*f+o*h,A=g*l+m*f+v*h,M=(b/=T)*l+(_/=T)*f+(w/=T)*h,S=Math.asin(u(k)),E=Math.atan2(M,A),L=this.angle._state,C=L[L.length-1],P=L[L.length-2];C%=2*Math.PI;var I=Math.abs(C+2*Math.PI-E),O=Math.abs(C-E),z=Math.abs(C-2*Math.PI-E);I0?r.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function g(t){return new Uint16Array(p(2*t),0,t)}function m(t){return new Uint32Array(p(4*t),0,t)}function v(t){return new Int8Array(p(t),0,t)}function y(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function T(t){return s?new BigUint64Array(p(8*t),0,t):null}function k(t){return l?new BigInt64Array(p(8*t),0,t):null}function A(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=f[e];return r.length>0?r.pop():new a(t)}r.free=function(t){if(a.isBuffer(t))f[n.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|n.log2(e);u[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeBigUint64=r.freeInt8=r.freeInt16=r.freeInt32=r.freeBigInt64=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){h(t.buffer)},r.freeArrayBuffer=h,r.freeBuffer=function(t){f[n.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||\"arraybuffer\"===e)return p(t);switch(e){case\"uint8\":return d(t);case\"uint16\":return g(t);case\"uint32\":return m(t);case\"int8\":return v(t);case\"int16\":return y(t);case\"int32\":return x(t);case\"float\":case\"float32\":return b(t);case\"double\":case\"float64\":return _(t);case\"uint8_clamped\":return w(t);case\"bigint64\":return k(t);case\"biguint64\":return T(t);case\"buffer\":return M(t);case\"data\":case\"dataview\":return A(t);default:return null}return null},r.mallocArrayBuffer=p,r.mallocUint8=d,r.mallocUint16=g,r.mallocUint32=m,r.mallocInt8=v,r.mallocInt16=y,r.mallocInt32=x,r.mallocFloat32=r.mallocFloat=b,r.mallocFloat64=r.mallocDouble=_,r.mallocUint8Clamped=w,r.mallocBigUint64=T,r.mallocBigInt64=k,r.mallocDataView=A,r.mallocBuffer=M,r.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,u[t].length=0,f[t].length=0}}).call(this)}).call(this,void 0!==n?n:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"bit-twiddle\":32,buffer:3,dup:65}],309:[function(t,e,r){\"use strict\";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e0&&(a=n.size),n.lineSpacing&&n.lineSpacing>0&&(o=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts));return r.font=[n.fontStyle,n.fontVariant,n.fontWeight,a+\"px\",n.font].filter((function(t){return t})).join(\" \"),r.textAlign=\"start\",r.textBaseline=\"alphabetic\",r.direction=\"ltr\",h(function(t,e,r,n,a,o){r=r.replace(/\\n/g,\"\"),r=!0===o.breaklines?r.replace(/\\/g,\"\\n\"):r.replace(/\\/g,\" \");var s=\"\",l=[];for(p=0;p-1?parseInt(t[1+i]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(n=n.replace(S(),\"?px \"),m*=Math.pow(.75,l-s),n=n.replace(\"?px \",S())),g+=.25*x*(l-s)}if(!0===o.superscripts){var c=t.indexOf(\"+\"),u=r.indexOf(\"+\"),f=c>-1?parseInt(t[1+c]):0,h=u>-1?parseInt(r[1+u]):0;f!==h&&(n=n.replace(S(),\"?px \"),m*=Math.pow(.75,h-f),n=n.replace(\"?px \",S())),g-=.25*x*(h-f)}if(!0===o.bolds){var p=t.indexOf(\"b|\")>-1,d=r.indexOf(\"b|\")>-1;!p&&d&&(n=v?n.replace(\"italic \",\"italic bold \"):\"bold \"+n),p&&!d&&(n=n.replace(\"bold \",\"\"))}if(!0===o.italics){var v=t.indexOf(\"i|\")>-1,y=r.indexOf(\"i|\")>-1;!v&&y&&(n=\"italic \"+n),v&&!y&&(n=n.replace(\"italic \",\"\"))}e.font=n}for(h=0;h\",a=\"\",o=i.length,s=a.length,l=\"+\"===e[0]||\"-\"===e[0],c=0,u=-s;c>-1&&-1!==(c=r.indexOf(i,c))&&-1!==(u=r.indexOf(a,c+o))&&!(u<=c);){for(var f=c;f=u)n[f]=null,r=r.substr(0,f)+\" \"+r.substr(f+1);else if(null!==n[f]){var h=n[f].indexOf(e[0]);-1===h?n[f]+=e:l&&(n[f]=n[f].substr(0,h+1)+(1+parseInt(n[f][h+1]))+n[f].substr(h+2))}var p=c+o,d=r.substr(p,u-p).indexOf(i);c=-1!==d?d:u+s}return n}function u(t,e){var r=n(t,128);return e?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function f(t,e,r,n){var i=u(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=0?e[a]:i}))},has___:{value:y((function(e){var n=v(e);return n?r in n:t.indexOf(e)>=0}))},set___:{value:y((function(n,i){var a,o=v(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:y((function(n){var i,a,o=v(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)}))}})};d.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 d||x();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 d),i.set(t,e)),this}:function(t,e){if(a)try{n.set(t,e)}catch(r){i||(i=new d),i.set___(t,e)}else n.set(t,e);return this},Object.create(d.prototype,{get___:{value:y((function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)}))},has___:{value:y((function(t){return n.has(t)||!!i&&i.has___(t)}))},set___:{value:y(e)},delete___:{value:y((function(t){var e=!!n.delete(t);return i&&i.delete___(t)||e}))},permitHostObjects___:{value:y((function(t){if(t!==g)throw new Error(\"bogus call to permitHostObjects___\");a=!0}))}})}t&&\"undefined\"!=typeof Proxy&&(Proxy=void 0),n.prototype=d.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=d)}function g(t){t.permitHostObjects___&&t.permitHostObjects___(g)}function m(t){return!(\"weakmap:\"==t.substr(0,\"weakmap:\".length)&&\"___\"===t.substr(t.length-3))}function v(t){if(t!==Object(t))throw new TypeError(\"Not an object: \"+t);var e=t[l];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return o(t,l,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function y(t){return t.prototype=null,Object.freeze(t)}function x(){h||\"undefined\"==typeof console||(h=!0,console.warn(\"WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future.\"))}}()},{}],314:[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\":315}],315:[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}},{}],316:[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\":314}],317:[function(t,e,r){\"use strict\";var n,i=function(){return function(t,e,r,n,i,a){var o=t[0],s=r[0],l=[0],c=s;n|=0;var u=0,f=s;for(u=0;u=0!=p>=0&&i.push(l[0]+.5+.5*(h+p)/(h-p)),n+=f,++l[0]}}};e.exports=(n={funcName:{funcName:\"zeroCrossings\"}.funcName},function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=[a,o.join()].join(),l=e[s];return l||(e[s]=l=t([a,o])),l(r.shape.slice(0),r.data,r.stride,0|r.offset,n,i)}}(i.bind(void 0,n)))},{}],318:[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\":317}]},{},[6])(6)}))}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}]},{},[27])(27)}));\n", + "\"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||void 0===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)}},{}],278:[function(t,e,r){(function(t){(function(){e.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this)}).call(this,void 0!==n?n:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}],279:[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];(l=o-((r=a+o)-a))&&(t[--n]=r,r=l)}var s=0;for(i=n;i0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=33306690738754716e-32*n;return o>=s||o<=-s?o:f(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],p=r[2]-n[2],d=a*c,g=o*l,m=o*s,v=i*c,y=i*l,x=a*s,b=u*(d-g)+f*(m-v)+p*(y-x),_=7771561172376103e-31*((Math.abs(d)+Math.abs(g))*Math.abs(u)+(Math.abs(m)+Math.abs(v))*Math.abs(f)+(Math.abs(y)+Math.abs(x))*Math.abs(p));return b>_||-b>_?b:h(t,e,r,n)}];function d(t){var e=p[t.length];return e||(e=p[t.length]=u(t.length)),e.apply(void 0,t)}function g(t,e,r,n,i,a,o){return function(e,r,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return n(e,r);case 3:return i(e,r,s);case 4:return a(e,r,s,l);case 5:return o(e,r,s,l,c)}for(var u=new Array(arguments.length),f=0;f0&&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);if(Math.max(c,u)=n?(i=f,(l+=1)=n?(i=f,(l+=1)>1,c=e[2*l+1];if(c===a)return l;a>1,c=e[2*l+1];if(c===a)return l;a>1,c=e[2*l+1];if(c===a)return l;a>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=t.length||0!==a(t[m],s)););}return r}function f(t,e){if(e<0)return[];for(var r=[],i=(1<>>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>1:(t>>1)-1}function x(t){for(var e=v(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n0;){var r=y(t);if(r>=0)if(e0){var t=k[0];return m(0,M-1),M-=1,x(0),t}return-1}function w(t,e){var r=k[t];return c[r]===e?t:(c[r]=-1/0,b(t),_(),c[r]=e,b((M+=1)-1))}function T(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))}}var k=[],A=new Array(a);for(f=0;f>1;f>=0;--f)x(f);for(;;){var S=_();if(S<0||c[S]>r)break;T(S)}var E=[];for(f=0;f=0&&r>=0&&e!==r){var n=A[e],i=A[r];n!==i&&C.push([n,i])}})),i.unique(i.normalize(C)),{positions:E,edges:C}};var n=t(\"robust-orientation\"),i=t(\"simplicial-complex\")},{\"robust-orientation\":284,\"simplicial-complex\":295}],298:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,a,o,s;if(e[0][0]e[1][0]))return i(e,t);r=e[1],a=e[0]}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])){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 lu?s-u:l-u}r=e[1],i=e[0]}t[0][1]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)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\":298,\"binary-search-bounds\":31,\"functional-red-black-tree\":69,\"robust-orientation\":284}],300:[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;l0||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;l0||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;l0||n>0&&c<0)&&r.push(o(i,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},{\"robust-dot-product\":281,\"robust-sum\":289}],301:[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(t){return i(o(t),arguments)}function n(t,r){return e.apply(null,[t].concat(r||[]))}function i(r,n){var i,a,o,s,l,c,u,f,h,p=1,d=r.length,g=\"\";for(a=0;a=0),s.type){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.width?parseInt(s.width):0);break;case\"e\":i=s.precision?parseFloat(i).toExponential(s.precision):parseFloat(i).toExponential();break;case\"f\":i=s.precision?parseFloat(i).toFixed(s.precision):parseFloat(i);break;case\"g\":i=s.precision?String(Number(i.toPrecision(s.precision))):parseFloat(i);break;case\"o\":i=(parseInt(i,10)>>>0).toString(8);break;case\"s\":i=String(i),i=s.precision?i.substring(0,s.precision):i;break;case\"t\":i=String(!!i),i=s.precision?i.substring(0,s.precision):i;break;case\"T\":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=s.precision?i.substring(0,s.precision):i;break;case\"u\":i=parseInt(i,10)>>>0;break;case\"v\":i=i.valueOf(),i=s.precision?i.substring(0,s.precision):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.type)?g+=i:(!t.number.test(s.type)||f&&!s.sign?h=\"\":(h=f?\"+\":\"-\",i=i.toString().replace(t.sign,\"\")),c=s.pad_char?\"0\"===s.pad_char?\"0\":s.pad_char.charAt(1):\" \",u=s.width-(h+i).length,l=s.width&&u>0?c.repeat(u):\"\",g+=s.align?h+i+l:\"0\"===c?h+l+i:l+h+i)}return g}var a=Object.create(null);function o(e){if(a[e])return a[e];for(var r,n=e,i=[],o=0;n;){if(null!==(r=t.text.exec(n)))i.push(r[0]);else if(null!==(r=t.modulo.exec(n)))i.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\");i.push({placeholder:r[0],param_no:r[1],keys:r[2],sign:r[3],pad_char:r[4],align:r[5],width:r[6],precision:r[7],type:r[8]})}n=n.substring(r[0].length)}return a[e]=i}void 0!==r&&(r.sprintf=e,r.vsprintf=n),\"undefined\"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}()},{}],302:[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=i(t,e),n=r.length,a=new Array(n),o=new Array(n),s=0;sn|0},vertex:function(t,e,r,n,i,a,o,s,l,c,u,f,h){var p=(o<<0)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==p&&15!==p)switch(p){case 0:u.push([t-.5,e-.5]);break;case 1:u.push([t-.25-.25*(n+r-2*h)/(r-n),e-.25-.25*(i+r-2*h)/(r-i)]);break;case 2:u.push([t-.75-.25*(-n-r+2*h)/(n-r),e-.25-.25*(a+n-2*h)/(n-a)]);break;case 3:u.push([t-.5,e-.5-.5*(i+r+a+n-4*h)/(r-i+n-a)]);break;case 4:u.push([t-.25-.25*(a+i-2*h)/(i-a),e-.75-.25*(-i-r+2*h)/(i-r)]);break;case 5:u.push([t-.5-.5*(n+r+a+i-4*h)/(r-n+i-a),e-.5]);break;case 6:u.push([t-.5-.25*(-n-r+a+i)/(n-r+i-a),e-.5-.25*(-i-r+a+n)/(i-r+n-a)]);break;case 7:u.push([t-.75-.25*(a+i-2*h)/(i-a),e-.75-.25*(a+n-2*h)/(n-a)]);break;case 8:u.push([t-.75-.25*(-a-i+2*h)/(a-i),e-.75-.25*(-a-n+2*h)/(a-n)]);break;case 9:u.push([t-.5-.25*(n+r+-a-i)/(r-n+a-i),e-.5-.25*(i+r+-a-n)/(r-i+a-n)]);break;case 10:u.push([t-.5-.5*(-n-r-a-i+4*h)/(n-r+a-i),e-.5]);break;case 11:u.push([t-.25-.25*(-a-i+2*h)/(a-i),e-.75-.25*(i+r-2*h)/(r-i)]);break;case 12:u.push([t-.5,e-.5-.5*(-i-r-a-n+4*h)/(i-r+a-n)]);break;case 13:u.push([t-.75-.25*(n+r-2*h)/(r-n),e-.25-.25*(-a-n+2*h)/(a-n)]);break;case 14:u.push([t-.25-.25*(-n-r+2*h)/(n-r),e-.25-.25*(-i-r+2*h)/(i-r)]);break;case 15:u.push([t-.5,e-.5])}},cell:function(t,e,r,n,i,a,o,s,l){i?s.push([t,e]):s.push([e,t])}});return function(t,e){var r=[],i=[];return n(t,r,i,e),{positions:r,cells:i}}}};var o={}},{\"ndarray-extract-contour\":251,\"zero-crossings\":318}],303:[function(t,e,r){(function(r){(function(){\"use strict\";e.exports=function t(e,r,i){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;o0&&(f+=.02);var p=new Float32Array(u),d=0,g=-.5*f;for(h=0;hMath.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],m=Math.cos(d),v=Math.sin(d),y=Math.cos(g),x=Math.sin(g),b=this.computedCenter,_=m*y,w=v*y,T=x,k=-m*x,A=-v*x,M=y,S=this.computedEye,E=this.computedMatrix;for(a=0;a<3;++a){var L=_*r[a]+w*h[a]+T*e[a];E[4*a+1]=k*r[a]+A*h[a]+M*e[a],E[4*a+2]=L,E[4*a+3]=0}var C=E[1],P=E[5],I=E[9],O=E[2],z=E[6],D=E[10],R=P*D-I*z,F=I*O-C*D,B=C*z-P*O,N=c(R,F,B);R/=N,F/=N,B/=N,E[0]=R,E[4]=F,E[8]=B;for(a=0;a<3;++a)S[a]=b[a]+E[2+4*a]*p;for(a=0;a<3;++a){u=0;for(var j=0;j<3;++j)u+=E[a+4*j]*S[j];E[12+a]=-u}E[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,m=(f/=d)*e+o*r,v=(h/=d)*e+s*r;this.center.move(t,g,m,v);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 m=c(s,l,f);s/=m,l/=m,f/=m}var v,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*f,T=c(x-=s*w,b-=l*w,_-=f*w),k=l*(_/=T)-f*(b/=T),A=f*(x/=T)-s*_,M=s*b-l*x,S=c(k,A,M);if(k/=S,A/=S,M/=S,this.center.jump(t,q,G,Y),this.radius.idle(t),this.up.jump(t,s,l,f),this.right.jump(t,x,b,_),2===a){var E=e[1],L=e[5],C=e[9],P=E*x+L*b+C*_,I=E*k+L*A+C*M;v=R<0?-Math.PI/2:Math.PI/2,y=Math.atan2(I,P)}else{var O=e[2],z=e[6],D=e[10],R=O*s+z*l+D*f,F=O*x+z*b+D*_,B=O*k+z*A+D*M;v=Math.asin(u(R)),y=Math.atan2(B,F)}this.angle.jump(t,y,v),this.recalcMatrix(t);var N=e[2],j=e[6],U=e[10],V=this.computedMatrix;i(V,e);var H=V[15],q=V[12]/H,G=V[13]/H,Y=V[14]/H,W=Math.exp(this.computedRadius[0]);this.center.jump(t,q-N*W,G-j*W,Y-U*W)},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],m=d[1],v=d[2],y=i*g+a*m+o*v,x=c(g-=y*i,m-=y*a,v-=y*o);if(!(x<.01&&(x=c(g=a*h-o*f,m=o*l-i*h,v=i*f-a*l))<1e-6)){g/=x,m/=x,v/=x,this.up.set(t,i,a,o),this.right.set(t,g,m,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var b=a*v-o*m,_=o*g-i*v,w=i*m-a*g,T=c(b,_,w),k=i*l+a*f+o*h,A=g*l+m*f+v*h,M=(b/=T)*l+(_/=T)*f+(w/=T)*h,S=Math.asin(u(k)),E=Math.atan2(M,A),L=this.angle._state,C=L[L.length-1],P=L[L.length-2];C%=2*Math.PI;var I=Math.abs(C+2*Math.PI-E),O=Math.abs(C-E),z=Math.abs(C-2*Math.PI-E);I0?r.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function g(t){return new Uint16Array(p(2*t),0,t)}function m(t){return new Uint32Array(p(4*t),0,t)}function v(t){return new Int8Array(p(t),0,t)}function y(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function T(t){return s?new BigUint64Array(p(8*t),0,t):null}function k(t){return l?new BigInt64Array(p(8*t),0,t):null}function A(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=f[e];return r.length>0?r.pop():new a(t)}r.free=function(t){if(a.isBuffer(t))f[n.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|n.log2(e);u[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeBigUint64=r.freeInt8=r.freeInt16=r.freeInt32=r.freeBigInt64=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){h(t.buffer)},r.freeArrayBuffer=h,r.freeBuffer=function(t){f[n.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||\"arraybuffer\"===e)return p(t);switch(e){case\"uint8\":return d(t);case\"uint16\":return g(t);case\"uint32\":return m(t);case\"int8\":return v(t);case\"int16\":return y(t);case\"int32\":return x(t);case\"float\":case\"float32\":return b(t);case\"double\":case\"float64\":return _(t);case\"uint8_clamped\":return w(t);case\"bigint64\":return k(t);case\"biguint64\":return T(t);case\"buffer\":return M(t);case\"data\":case\"dataview\":return A(t);default:return null}return null},r.mallocArrayBuffer=p,r.mallocUint8=d,r.mallocUint16=g,r.mallocUint32=m,r.mallocInt8=v,r.mallocInt16=y,r.mallocInt32=x,r.mallocFloat32=r.mallocFloat=b,r.mallocFloat64=r.mallocDouble=_,r.mallocUint8Clamped=w,r.mallocBigUint64=T,r.mallocBigInt64=k,r.mallocDataView=A,r.mallocBuffer=M,r.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,u[t].length=0,f[t].length=0}}).call(this)}).call(this,void 0!==n?n:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"bit-twiddle\":32,buffer:3,dup:65}],309:[function(t,e,r){\"use strict\";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e0&&(a=n.size),n.lineSpacing&&n.lineSpacing>0&&(o=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts));return r.font=[n.fontStyle,n.fontVariant,n.fontWeight,a+\"px\",n.font].filter((function(t){return t})).join(\" \"),r.textAlign=\"start\",r.textBaseline=\"alphabetic\",r.direction=\"ltr\",h(function(t,e,r,n,a,o){r=r.replace(/\\n/g,\"\"),r=!0===o.breaklines?r.replace(/\\/g,\"\\n\"):r.replace(/\\/g,\" \");var s=\"\",l=[];for(p=0;p-1?parseInt(t[1+i]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(n=n.replace(S(),\"?px \"),m*=Math.pow(.75,l-s),n=n.replace(\"?px \",S())),g+=.25*x*(l-s)}if(!0===o.superscripts){var c=t.indexOf(\"+\"),u=r.indexOf(\"+\"),f=c>-1?parseInt(t[1+c]):0,h=u>-1?parseInt(r[1+u]):0;f!==h&&(n=n.replace(S(),\"?px \"),m*=Math.pow(.75,h-f),n=n.replace(\"?px \",S())),g-=.25*x*(h-f)}if(!0===o.bolds){var p=t.indexOf(\"b|\")>-1,d=r.indexOf(\"b|\")>-1;!p&&d&&(n=v?n.replace(\"italic \",\"italic bold \"):\"bold \"+n),p&&!d&&(n=n.replace(\"bold \",\"\"))}if(!0===o.italics){var v=t.indexOf(\"i|\")>-1,y=r.indexOf(\"i|\")>-1;!v&&y&&(n=\"italic \"+n),v&&!y&&(n=n.replace(\"italic \",\"\"))}e.font=n}for(h=0;h\",a=\"\",o=i.length,s=a.length,l=\"+\"===e[0]||\"-\"===e[0],c=0,u=-s;c>-1&&-1!==(c=r.indexOf(i,c))&&-1!==(u=r.indexOf(a,c+o))&&!(u<=c);){for(var f=c;f=u)n[f]=null,r=r.substr(0,f)+\" \"+r.substr(f+1);else if(null!==n[f]){var h=n[f].indexOf(e[0]);-1===h?n[f]+=e:l&&(n[f]=n[f].substr(0,h+1)+(1+parseInt(n[f][h+1]))+n[f].substr(h+2))}var p=c+o,d=r.substr(p,u-p).indexOf(i);c=-1!==d?d:u+s}return n}function u(t,e){var r=n(t,128);return e?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function f(t,e,r,n){var i=u(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=0?e[a]:i}))},has___:{value:y((function(e){var n=v(e);return n?r in n:t.indexOf(e)>=0}))},set___:{value:y((function(n,i){var a,o=v(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:y((function(n){var i,a,o=v(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)}))}})};d.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 d||x();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 d),i.set(t,e)),this}:function(t,e){if(a)try{n.set(t,e)}catch(r){i||(i=new d),i.set___(t,e)}else n.set(t,e);return this},Object.create(d.prototype,{get___:{value:y((function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)}))},has___:{value:y((function(t){return n.has(t)||!!i&&i.has___(t)}))},set___:{value:y(e)},delete___:{value:y((function(t){var e=!!n.delete(t);return i&&i.delete___(t)||e}))},permitHostObjects___:{value:y((function(t){if(t!==g)throw new Error(\"bogus call to permitHostObjects___\");a=!0}))}})}t&&\"undefined\"!=typeof Proxy&&(Proxy=void 0),n.prototype=d.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=d)}function g(t){t.permitHostObjects___&&t.permitHostObjects___(g)}function m(t){return!(\"weakmap:\"==t.substr(0,\"weakmap:\".length)&&\"___\"===t.substr(t.length-3))}function v(t){if(t!==Object(t))throw new TypeError(\"Not an object: \"+t);var e=t[l];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return o(t,l,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function y(t){return t.prototype=null,Object.freeze(t)}function x(){h||\"undefined\"==typeof console||(h=!0,console.warn(\"WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future.\"))}}()},{}],314:[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\":315}],315:[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}},{}],316:[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\":314}],317:[function(t,e,r){\"use strict\";var n,i=function(){return function(t,e,r,n,i,a){var o=t[0],s=r[0],l=[0],c=s;n|=0;var u=0,f=s;for(u=0;u=0!=p>=0&&i.push(l[0]+.5+.5*(h+p)/(h-p)),n+=f,++l[0]}}};e.exports=(n={funcName:{funcName:\"zeroCrossings\"}.funcName},function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=[a,o.join()].join(),l=e[s];return l||(e[s]=l=t([a,o])),l(r.shape.slice(0),r.data,r.stride,0|r.offset,n,i)}}(i.bind(void 0,n)))},{}],318:[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\":317}]},{},[6])(6)}))}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}]},{},[27])(27)}));\n", " });\n", " require(['plotly'], function(Plotly) {\n", " window._Plotly = Plotly;\n", diff --git a/docs/_getstarted/04_UploadToDataverse.ipynb b/docs/_getstarted/04_UploadToDataverse.ipynb index 770da9c..9af3eb8 100644 --- a/docs/_getstarted/04_UploadToDataverse.ipynb +++ b/docs/_getstarted/04_UploadToDataverse.ipynb @@ -50,7 +50,7 @@ "id": "c749b3af-3de0-429a-b23e-e474bb7e2f4c", "metadata": {}, "source": [ - "For reasons of data quality, the resulting dataset cant be viewed on the web. In order to visit examples that have utilized the method, see the [EnzymeML at Work](https://darus.uni-stuttgart.de/dataverse/enzymeml_at_work) collection." + "For reasons of data quality, the resulting dataset can't be viewed on the web. In order to visit examples that have utilized the method, see the [EnzymeML at Work](https://darus.uni-stuttgart.de/dataverse/enzymeml_at_work) collection." ] }, { diff --git a/docs/_getstarted/04_UploadToDataverse.rst b/docs/_getstarted/04_UploadToDataverse.rst index 675f63d..3c0ea39 100644 --- a/docs/_getstarted/04_UploadToDataverse.rst +++ b/docs/_getstarted/04_UploadToDataverse.rst @@ -25,7 +25,7 @@ in this example: # Upload it to Dataverse (Dataset is private) enzmldoc.uploadToDataverse(dataverse_name="playground") -For reasons of data quality, the resulting dataset cant be viewed on the +For reasons of data quality, the resulting dataset can't be viewed on the web. In order to visit examples that have utilized the method, see the `EnzymeML at Work `__ diff --git a/docs/_getstarted/EnzymeML_Validation_Template.yaml b/docs/_getstarted/EnzymeML_Validation_Template.yaml index a9a04df..9937caa 100644 --- a/docs/_getstarted/EnzymeML_Validation_Template.yaml +++ b/docs/_getstarted/EnzymeML_Validation_Template.yaml @@ -140,7 +140,7 @@ protein_dict: - null unit: mandatory: true - description: Unit of the proteins intial concentration. + description: Unit of the proteins initial concentration. range: min: null max: null @@ -230,7 +230,7 @@ complex_dict: - null unit: mandatory: true - description: Unit of the proteins intial concentration. + description: Unit of the proteins initial concentration. range: min: null max: null @@ -279,7 +279,7 @@ reactant_dict: - null unit: mandatory: true - description: Unit of the reactant intial concentration. + description: Unit of the reactant initial concentration. range: min: null max: null diff --git a/docs/_getstarted/EnzymeML_Validation_Template_Example.yaml b/docs/_getstarted/EnzymeML_Validation_Template_Example.yaml index 876f520..dcf1b26 100644 --- a/docs/_getstarted/EnzymeML_Validation_Template_Example.yaml +++ b/docs/_getstarted/EnzymeML_Validation_Template_Example.yaml @@ -140,7 +140,7 @@ protein_dict: - null unit: mandatory: true - description: Unit of the proteins intial concentration. + description: Unit of the proteins initial concentration. range: min: null max: null @@ -230,7 +230,7 @@ complex_dict: - null unit: mandatory: true - description: Unit of the proteins intial concentration. + description: Unit of the proteins initial concentration. range: min: null max: null @@ -279,7 +279,7 @@ reactant_dict: - null unit: mandatory: true - description: Unit of the reactant intial concentration. + description: Unit of the reactant initial concentration. range: min: null max: null diff --git a/examples/Basic example/CreateEnzymeML.ipynb b/examples/Basic example/CreateEnzymeML.ipynb index 945612f..9bfc350 100644 --- a/examples/Basic example/CreateEnzymeML.ipynb +++ b/examples/Basic example/CreateEnzymeML.ipynb @@ -333,9 +333,9 @@ "source": [ "## Documenting measurement setups\n", "\n", - "Now that the theoretical foundation of the experiment has been layed out, it is time to specify the setup of teh measurement. PyEnzyme offers a lab-like system to document such setups. Typically, experiments involve multiple runs with varying initial concentrations of every element that occurs in the reaction network or/and varying conditions such as temperature and pH. Hence, PyEnzyme builts on top of a **measurement** system, where each of these represent a 'run'.\n", + "Now that the theoretical foundation of the experiment has been laid out, it is time to specify the setup of the measurement. PyEnzyme offers a lab-like system to document such setups. Typically, experiments involve multiple runs with varying initial concentrations of every element that occurs in the reaction network or/and varying conditions such as temperature and pH. Hence, PyEnzyme builts on top of a **measurement** system, where each of these represent a 'run'.\n", "\n", - "In this example, the following setups will be tracked including changing inital concentrations and temperatures:\n", + "In this example, the following setups will be tracked including changing initial concentrations and temperatures:\n", "\n", "| Measurement Name | Species | Initial concentration | Unit | Temperature | pH |\n", "|------------------|-----------|-----------------------|-----------|-------------|-----|\n", @@ -571,7 +571,7 @@ "source": [ "## Saving and distributing an EnzymeML document\n", "\n", - "Finally, the experiment has been finished and meta- as well as raw-data been documented. In order to make the data exchangable, PyEnzyme offers several options for data export. First and foremost, the complete experiment can be exported to EnzymeML which is SBML compatible and thus accessible by SBML-based modeling tools (e.g. COPASI, PySCeS). Furthermore, in regard of the web, PyEnzyme offers a JSON export too.\n", + "Finally, the experiment has been finished and meta- as well as raw-data been documented. In order to make the data exchangeable, PyEnzyme offers several options for data export. First and foremost, the complete experiment can be exported to EnzymeML which is SBML compatible and thus accessible by SBML-based modeling tools (e.g. COPASI, PySCeS). Furthermore, in regard of the web, PyEnzyme offers a JSON export too.\n", "\n", "Apart from raw exports, PyEnzyme can also interface with the federated databases system Dataverse by providing a simple upload method that automatically uploads and processes the document contents to a Dataverse compatible format. Please note, the Dataverse must support the 'EnzymeML' metadatablock for a successful upload.\n" ] @@ -659,7 +659,7 @@ "\n", "**Tips and hints:**\n", "\n", - "- PyEnzyme stores a history in the document, which keeps track of what has been changed and added in the course of an experiment. This is done, to spot potential errors and facilitate teh documentation of an experiment's lifeline." + "- PyEnzyme stores a history in the document, which keeps track of what has been changed and added in the course of an experiment. This is done, to spot potential errors and facilitate the documentation of an experiment's lifeline." ] }, { @@ -715,7 +715,7 @@ "source": [ "#### Special case: From the EnzymeML spreadsheet template\n", "\n", - "Apart from programmatic creation of an EnzymeML document, PyEnzyme offers a way to convert the 'EnzymeML spreadhseet template' to an OMEX file. Since spreadsheets are the bread and butter of current lab documentation, the template widely covers teh data model and thus provides an easy access to EnzymeML's capabilities." + "Apart from programmatic creation of an EnzymeML document, PyEnzyme offers a way to convert the 'EnzymeML spreadsheet template' to an OMEX file. Since spreadsheets are the bread and butter of current lab documentation, the template widely covers the data model and thus provides an easy access to EnzymeML's capabilities." ] }, { @@ -770,7 +770,7 @@ "source": [ "## Editing EnzymeML: Kinetic Modeling\n", "\n", - "Building on top of the previous section about loading an EnzymeML document, this example will demonstrate how to interact with an already created EnzymeML document using the OMEX loader. Since the purpose of an experiment is to generate data from a theory, modeling takes care of the interpretation of an experiment outcome. However, PyEnzyme and EnzymeML are no modeling platforms, but provides a convinient way to interface to such. Hence, this example will demonstrate how such an interfacing could look like.\n", + "Building on top of the previous section about loading an EnzymeML document, this example will demonstrate how to interact with an already created EnzymeML document using the OMEX loader. Since the purpose of an experiment is to generate data from a theory, modeling takes care of the interpretation of an experiment outcome. However, PyEnzyme and EnzymeML are no modeling platforms, but provides a convenient way to interface to such. Hence, this example will demonstrate how such an interfacing could look like.\n", "\n", "The enzyme-catalyzed reaction that has been reported in the course of this example obviously follows a simple Michaelis-Menten-Kinetic and thus will be reported as such. But first of all, the next part will demonstrate how measurement data can be exported to be used by a modeling framework/platform.\n", "\n", diff --git a/examples/Dataverse/UploadToDataverse.ipynb b/examples/Dataverse/UploadToDataverse.ipynb index d0f6852..c7fc1d9 100644 --- a/examples/Dataverse/UploadToDataverse.ipynb +++ b/examples/Dataverse/UploadToDataverse.ipynb @@ -50,7 +50,7 @@ "id": "c749b3af-3de0-429a-b23e-e474bb7e2f4c", "metadata": {}, "source": [ - "For reasons of data quality, the resulting dataset cant be viewed on the web. In order to visit examples that have utilized the method, see the [EnzymeML at Work](https://darus.uni-stuttgart.de/dataverse/enzymeml_at_work) collection." + "For reasons of data quality, the resulting dataset can't be viewed on the web. In order to visit examples that have utilized the method, see the [EnzymeML at Work](https://darus.uni-stuttgart.de/dataverse/enzymeml_at_work) collection." ] }, { diff --git a/examples/ThinLayers/COPASI/Untitled.ipynb b/examples/ThinLayers/COPASI/Untitled.ipynb index ed08470..c9f028e 100644 --- a/examples/ThinLayers/COPASI/Untitled.ipynb +++ b/examples/ThinLayers/COPASI/Untitled.ipynb @@ -140,7 +140,7 @@ " * @author Feross Aboukhadijeh \n", " * @license MIT\n", " */\n", - "\"use strict\";var e=t(\"base64-js\"),n=t(\"ieee754\");r.Buffer=a,r.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},r.INSPECT_MAX_BYTES=50;function i(t){if(t>2147483647)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"');var e=new Uint8Array(t);return e.__proto__=a.prototype,e}function a(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 l(t)}return o(t,e,r)}function o(t,e,r){if(\"string\"==typeof t)return function(t,e){\"string\"==typeof e&&\"\"!==e||(e=\"utf8\");if(!a.isEncoding(e))throw new TypeError(\"Unknown encoding: \"+e);var r=0|f(t,e),n=i(r),o=n.write(t,e);o!==r&&(n=n.slice(0,o));return n}(t,e);if(ArrayBuffer.isView(t))return c(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(B(t,ArrayBuffer)||t&&B(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength=2147483647)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+2147483647..toString(16)+\" bytes\");return 0|t}function f(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||B(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 D(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return R(t).length;default:if(i)return n?-1:D(t).length;e=(\"\"+e).toLowerCase(),i=!0}}function h(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 M(this,e,r);case\"utf8\":case\"utf-8\":return T(this,e,r);case\"ascii\":return k(this,e,r);case\"latin1\":case\"binary\":return A(this,e,r);case\"base64\":return w(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return S(this,e,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),n=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(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),N(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=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:g(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):g(t,[e],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function g(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;as&&(r=s-l),a=r;a>=0;a--){for(var f=!0,h=0;hi&&(n=i):n=i;var a=e.length;n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function w(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?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<=4096)return String.fromCharCode.apply(String,t);var r=\"\",n=0;for(;ne&&(t+=\" ... \"),\"\"},a.prototype.compare=function(t,e,r,n,i){if(B(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.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 o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),l=Math.min(o,s),c=this.slice(n,i),u=t.slice(e,r),f=0;f>>=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 v(this,t,e,r);case\"ascii\":return y(this,t,e,r);case\"latin1\":case\"binary\":return x(this,t,e,r);case\"base64\":return b(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return _(this,t,e,r);default:if(a)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};function k(t,e,r){var n=\"\";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i=\"\",a=e;ar)throw new RangeError(\"Trying to access beyond buffer length\")}function L(t,e,r,n,i,o){if(!a.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError(\"Index out of range\")}function C(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 P(t,e,r,i,a){return e=+e,r>>>=0,a||C(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function I(t,e,r,i,a){return e=+e,r>>>=0,a||C(t,0,r,8),n.write(t,e,r,i,52,8),r+8}a.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>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||E(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},a.prototype.readInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,n)||L(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},a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(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},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return I(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return I(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.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=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=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},a.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&&!a.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>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),\"number\"==typeof t)for(o=e;o55295&&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 R(t){return e.toByteArray(function(t){if((t=(t=t.split(\"=\")[0]).trim().replace(O,\"\")).length<2)return\"\";for(;t.length%4!=0;)t+=\"=\";return t}(t))}function F(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function B(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function N(t){return t!=t}}).call(this)}).call(this,t(\"buffer\").Buffer)},{\"base64-js\":79,buffer:85,ieee754:230}],86:[function(t,e,r){e.exports=function(t,e,r){return er?r:t:te?e:t}},{}],87:[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:86}],88:[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]}},{}],89:[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:86,\"color-rgba\":91,dtype:127}],90:[function(t,e,r){(function(r){(function(){\"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=(p=t.slice(1)).length;c=1,u<=4?(l=[parseInt(p[0]+p[0],16),parseInt(p[1]+p[1],16),parseInt(p[2]+p[2],16)],4===u&&(c=parseInt(p[3]+p[3],16)/255)):(l=[parseInt(p[0]+p[1],16),parseInt(p[2]+p[3],16),parseInt(p[4]+p[5],16)],8===u&&(c=parseInt(p[6]+p[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 f=e[1],h=\"rgb\"===f,p=f.replace(/a$/,\"\");s=p;u=\"cmyk\"===p?4:\"gray\"===p?1:3;l=e[2].trim().split(/\\s*,\\s*/).map((function(t,e){if(/%$/.test(t))return e===u?parseFloat(t)/100:\"rgb\"===p?255*parseFloat(t)/100:parseFloat(t);if(\"h\"===p[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)})),f===p&&l.push(1),c=h||void 0===l[u]?1:l[u],l=l.slice(0,u)}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)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"color-name\":88,defined:124,\"is-plain-obj\":236}],91:[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:86,\"color-parse\":90,\"color-space/hsl\":92}],92:[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\":93}],93:[function(t,e,r){\"use strict\";e.exports={name:\"rgb\",min:[0,0,0],max:[255,255,255],channel:[\"red\",\"green\",\"blue\"],alias:[\"RGB\"]}},{}],94:[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\"}},{}],95:[function(t,e,r){e.exports=[\"xx-small\",\"x-small\",\"small\",\"medium\",\"large\",\"x-large\",\"xx-large\",\"larger\",\"smaller\"]},{}],96:[function(t,e,r){e.exports=[\"normal\",\"condensed\",\"semi-condensed\",\"extra-condensed\",\"ultra-condensed\",\"expanded\",\"semi-expanded\",\"extra-expanded\",\"ultra-expanded\"]},{}],97:[function(t,e,r){e.exports=[\"normal\",\"italic\",\"oblique\"]},{}],98:[function(t,e,r){e.exports=[\"normal\",\"bold\",\"bolder\",\"lighter\",\"100\",\"200\",\"300\",\"400\",\"500\",\"600\",\"700\",\"800\",\"900\"]},{}],99:[function(t,e,r){\"use strict\";e.exports={parse:t(\"./parse\"),stringify:t(\"./stringify\")}},{\"./parse\":101,\"./stringify\":102}],100:[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\":95}],101:[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\":100,\"css-font-stretch-keywords\":96,\"css-font-style-keywords\":97,\"css-font-weight-keywords\":98,\"css-global-keywords\":103,\"css-system-font-keywords\":104,\"string-split-by\":305,unquote:328}],102:[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;re?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>>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>>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(;++o1)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=r)for(n=i=r;++or&&(n=r),i=r)for(n=i=r;++or&&(n=r),i=0?(a>=v?10:a>=y?5:a>=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=v?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>=v?i*=10:a>=y?i*=5:a>=x&&(i*=2),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 k(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a=r)for(n=r;++ar&&(n=r)}else for(;++a=r)for(n=r;++ar&&(n=r);return n}function A(t){if(!(i=t.length))return[];for(var e=-1,r=k(t,M),n=new Array(r);++et?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;af;)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=r)for(n=r;++an&&(n=r)}else for(;++a=r)for(n=r;++an&&(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=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r},t.min=k,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);r0)return[t];if((n=e0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s=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(),m=a();++hl.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})}))},{}],109:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(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,8})$/,l=new RegExp(\"^rgb\\\\(\"+[i,i,i]+\"\\\\)$\"),c=new RegExp(\"^rgb\\\\(\"+[o,o,o]+\"\\\\)$\"),u=new RegExp(\"^rgba\\\\(\"+[i,i,i,a]+\"\\\\)$\"),f=new RegExp(\"^rgba\\\\(\"+[o,o,o,a]+\"\\\\)$\"),h=new RegExp(\"^hsl\\\\(\"+[a,o,o]+\"\\\\)$\"),p=new RegExp(\"^hsla\\\\(\"+[a,o,o,a]+\"\\\\)$\"),d={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 g(){return this.rgb().formatHex()}function m(){return this.rgb().formatRgb()}function v(t){var e,r;return t=(t+\"\").trim().toLowerCase(),(e=s.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?y(e):3===r?new w(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?x(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?x(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=l.exec(t))?new w(e[1],e[2],e[3],1):(e=c.exec(t))?new w(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=u.exec(t))?x(e[1],e[2],e[3],e[4]):(e=f.exec(t))?x(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=h.exec(t))?M(e[1],e[2]/100,e[3]/100,1):(e=p.exec(t))?M(e[1],e[2]/100,e[3]/100,e[4]):d.hasOwnProperty(t)?y(d[t]):\"transparent\"===t?new w(NaN,NaN,NaN,0):null}function y(t){return new w(t>>16&255,t>>8&255,255&t,1)}function x(t,e,r,n){return n<=0&&(t=e=r=NaN),new w(t,e,r,n)}function b(t){return t instanceof n||(t=v(t)),t?new w((t=t.rgb()).r,t.g,t.b,t.opacity):new w}function _(t,e,r,n){return 1===arguments.length?b(t):new w(t,e,r,null==n?1:n)}function w(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function T(){return\"#\"+A(this.r)+A(this.g)+A(this.b)}function k(){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+\")\")}function A(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?\"0\":\"\")+t.toString(16)}function M(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new L(t,e,r,n)}function S(t){if(t instanceof L)return new L(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=v(t)),!t)return new L;if(t instanceof L)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*(r0&&c<1?0:s,new L(s,l,c,t.opacity)}function E(t,e,r,n){return 1===arguments.length?S(t):new L(t,e,r,null==n?1:n)}function L(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function C(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,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:g,formatHex:g,formatHsl:function(){return S(this).formatHsl()},formatRgb:m,toString:m}),e(w,_,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new w(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new w(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:T,formatHex:T,formatRgb:k,toString:k})),e(L,E,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new L(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new L(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 w(C(t>=240?t-240:t+120,i,n),C(t,i,n),C(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},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?\"hsl(\":\"hsla(\")+(this.h||0)+\", \"+100*(this.s||0)+\"%, \"+100*(this.l||0)+\"%\"+(1===t?\")\":\", \"+t+\")\")}}));var P=Math.PI/180,I=180/Math.PI,O=6/29,z=3*O*O;function D(t){if(t instanceof F)return new F(t.l,t.a,t.b,t.opacity);if(t instanceof q)return G(t);t instanceof w||(t=b(t));var e,r,n=U(t.r),i=U(t.g),a=U(t.b),o=B((.2225045*n+.7168786*i+.0606169*a)/1);return n===i&&i===a?e=r=o:(e=B((.4360747*n+.3850649*i+.1430804*a)/.96422),r=B((.0139322*n+.0971045*i+.7141733*a)/.82521)),new F(116*o-16,500*(e-o),200*(o-r),t.opacity)}function R(t,e,r,n){return 1===arguments.length?D(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 B(t){return t>.008856451679035631?Math.pow(t,1/3):t/z+4/29}function N(t){return t>O?t*t*t:z*(t-4/29)}function j(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 V(t){if(t instanceof q)return new q(t.h,t.c,t.l,t.opacity);if(t instanceof F||(t=D(t)),0===t.a&&0===t.b)return new q(NaN,0=0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);return{type:t,name:r}}))}function a(t,e){for(var r,n=0,i=t.length;n0)for(var r,n,i=new Array(r),a=0;ah+c||np+c||au.index){var f=h-s.x-s.vx,m=p-s.y-s.vy,v=f*f+m*m;vt.r&&(t.r=t[e].r)}function h(){if(r){var e,i,a=r.length;for(n=new Array(a),e=0;e=c)){(t.data!==r||t.next)&&(0===f&&(d+=(f=o())*f),0===h&&(d+=(h=o())*h),d1?(null==r?u.remove(t):u.set(t,v(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;c1?(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;a1?n[0]+n.slice(2):n,+t.slice(r+1)]}function r(t){return(t=e(Math.abs(t)))?t[1]:NaN}var n,i=/^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;function a(t){if(!(e=i.exec(t)))throw new Error(\"invalid format: \"+t);var e;return new o({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function o(t){this.fill=void 0===t.fill?\" \":t.fill+\"\",this.align=void 0===t.align?\">\":t.align+\"\",this.sign=void 0===t.sign?\"-\":t.sign+\"\",this.symbol=void 0===t.symbol?\"\":t.symbol+\"\",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?\"\":t.type+\"\"}function s(t,r){var n=e(t,r);if(!n)return t+\"\";var i=n[0],a=n[1];return a<0?\"0.\"+new Array(-a).join(\"0\")+i:i.length>a+1?i.slice(0,a+1)+\".\"+i.slice(a+1):i+new Array(a-i.length+2).join(\"0\")}a.prototype=o.prototype,o.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\"0\":\"\")+(void 0===this.width?\"\":Math.max(1,0|this.width))+(this.comma?\",\":\"\")+(void 0===this.precision?\"\":\".\"+Math.max(0,0|this.precision))+(this.trim?\"~\":\"\")+this.type};var l={\"%\":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+\"\"},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString(\"en\").replace(/,/g,\"\"):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return s(100*t,e)},r:s,s:function(t,r){var i=e(t,r);if(!i)return t+\"\";var a=i[0],o=i[1],s=o-(n=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+new Array(s-l+1).join(\"0\"):s>0?a.slice(0,s)+\".\"+a.slice(s):\"0.\"+new Array(1-s).join(\"0\")+e(t,Math.max(0,r+s-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function c(t){return t}var u,f=Array.prototype.map,h=[\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\\xb5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];function p(t){var e,i,o=void 0===t.grouping||void 0===t.thousands?c:(e=f.call(t.grouping,Number),i=t.thousands+\"\",function(t,r){for(var n=t.length,a=[],o=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(t.substring(n-=s,n+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(i)}),s=void 0===t.currency?\"\":t.currency[0]+\"\",u=void 0===t.currency?\"\":t.currency[1]+\"\",p=void 0===t.decimal?\".\":t.decimal+\"\",d=void 0===t.numerals?c:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(f.call(t.numerals,String)),g=void 0===t.percent?\"%\":t.percent+\"\",m=void 0===t.minus?\"-\":t.minus+\"\",v=void 0===t.nan?\"NaN\":t.nan+\"\";function y(t){var e=(t=a(t)).fill,r=t.align,i=t.sign,c=t.symbol,f=t.zero,y=t.width,x=t.comma,b=t.precision,_=t.trim,w=t.type;\"n\"===w?(x=!0,w=\"g\"):l[w]||(void 0===b&&(b=12),_=!0,w=\"g\"),(f||\"0\"===e&&\"=\"===r)&&(f=!0,e=\"0\",r=\"=\");var T=\"$\"===c?s:\"#\"===c&&/[boxX]/.test(w)?\"0\"+w.toLowerCase():\"\",k=\"$\"===c?u:/[%p]/.test(w)?g:\"\",A=l[w],M=/[defgprs%]/.test(w);function S(t){var a,s,l,c=T,u=k;if(\"c\"===w)u=A(t)+u,t=\"\";else{var g=(t=+t)<0||1/t<0;if(t=isNaN(t)?v:A(Math.abs(t),b),_&&(t=function(t){t:for(var e,r=t.length,n=1,i=-1;n0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),g&&0==+t&&\"+\"!==i&&(g=!1),c=(g?\"(\"===i?i:m:\"-\"===i||\"(\"===i?\"\":i)+c,u=(\"s\"===w?h[8+n/3]:\"\")+u+(g&&\"(\"===i?\")\":\"\"),M)for(a=-1,s=t.length;++a(l=t.charCodeAt(a))||l>57){u=(46===l?p+t.slice(a+1):t.slice(a))+u,t=t.slice(0,a);break}}x&&!f&&(t=o(t,1/0));var S=c.length+t.length+u.length,E=S>1)+c+t+u+E.slice(S);break;default:t=E+c+t+u}return d(t)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return t+\"\"},S}return{format:y,formatPrefix:function(t,e){var n=y(((t=a(t)).type=\"f\",t)),i=3*Math.max(-8,Math.min(8,Math.floor(r(e)/3))),o=Math.pow(10,-i),s=h[8+i/3];return function(t){return n(o*t)+s}}}}function d(e){return u=p(e),t.format=u.format,t.formatPrefix=u.formatPrefix,u}d({decimal:\".\",thousands:\",\",grouping:[3],currency:[\"$\",\"\"],minus:\"-\"}),t.FormatSpecifier=o,t.formatDefaultLocale=d,t.formatLocale=p,t.formatSpecifier=a,t.precisionFixed=function(t){return Math.max(0,-r(Math.abs(t)))},t.precisionPrefix=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(r(e)/3)))-r(Math.abs(t)))},t.precisionRound=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,r(e)-r(t))+1},Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],113:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-geo\"),t(\"d3-array\")):i(n.d3=n.d3||{},n.d3,n.d3)}(this,(function(t,e,r){\"use strict\";var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,c=Math.log,u=Math.max,f=Math.min,h=Math.pow,p=Math.round,d=Math.sign||function(t){return t>0?1:t<0?-1:0},g=Math.sin,m=Math.tan,v=1e-6,y=Math.PI,x=y/2,b=y/4,_=Math.SQRT1_2,w=L(2),T=L(y),k=2*y,A=180/y,M=y/180;function S(t){return t>1?x:t<-1?-x:Math.asin(t)}function E(t){return t>1?0:t<-1?y:Math.acos(t)}function L(t){return t>0?Math.sqrt(t):0}function C(t){return(s(t)-s(-t))/2}function P(t){return(s(t)+s(-t))/2}function I(t){var e=m(t/2),r=2*c(o(t/2))/(e*e);function i(t,e){var n=o(t),i=o(e),a=g(e),s=i*n,l=-((1-s?c((1+s)/2)/(1-s):-.5)+r/(1+s));return[l*i*g(t),l*a]}return i.invert=function(e,i){var s,l=L(e*e+i*i),u=-t/2,f=50;if(!l)return[0,0];do{var h=u/2,p=o(h),d=g(h),m=d/p,y=-c(n(p));u-=s=(2/m*y-r*m-l)/(-y/(d*d)+1-r/(2*p*p))*(p<0?.7:1)}while(n(s)>v&&--f>0);var x=g(u);return[a(e*x,l*o(u)),S(i*x/l)]},i}function O(t,e){var r=o(e),n=function(t){return t?t/Math.sin(t):1}(E(r*o(t/=2)));return[2*r*g(t)*n,g(e)*n]}function z(t){var e=g(t),r=o(t),i=t>=0?1:-1,s=m(i*t),l=(1+e-r)/2;function c(t,n){var c=o(n),u=o(t/=2);return[(1+c)*g(t),(i*n>-a(u,s)-.001?0:10*-i)+l+g(n)*r-(1+c)*e*u]}return c.invert=function(t,c){var u=0,f=0,h=50;do{var p=o(u),d=g(u),m=o(f),y=g(f),x=1+m,b=x*d-t,_=l+y*r-x*e*p-c,w=x*p/2,T=-d*y,k=e*x*d/2,A=r*m+e*p*y,M=T*k-A*w,S=(_*T-b*A)/M/2,E=(b*k-_*w)/M;n(E)>2&&(E/=2),u-=S,f-=E}while((n(S)>v||n(E)>v)&&--h>0);return i*f>-a(o(u),s)-.001?[2*u,f]:null},c}function D(t,e){var r=m(e/2),n=L(1-r*r),i=1+n*o(t/=2),a=g(t)*n/i,s=r/i,l=a*a,c=s*s;return[4/3*a*(3+l-3*c),4/3*s*(3+3*l-c)]}O.invert=function(t,e){if(!(t*t+4*e*e>y*y+v)){var r=t,i=e,a=25;do{var s,l=g(r),c=g(r/2),u=o(r/2),f=g(i),h=o(i),p=g(2*i),d=f*f,m=h*h,x=c*c,b=1-m*u*u,_=b?E(h*u)*L(s=1/b):s=0,w=2*_*h*c-t,T=_*f-e,k=s*(m*x+_*h*u*d),A=s*(.5*l*p-2*_*f*c),M=.25*s*(p*c-_*f*m*l),S=s*(d*u+_*x*h),C=A*M-S*k;if(!C)break;var P=(T*A-w*S)/C,I=(w*M-T*k)/C;r-=P,i-=I}while((n(P)>v||n(I)>v)&&--a>0);return[r,i]}},D.invert=function(t,e){if(e*=3/8,!(t*=3/8)&&n(e)>1)return null;var r=1+t*t+e*e,i=L((r-L(r*r-4*e*e))/2),s=S(i)/3,l=i?function(t){return c(t+L(t*t-1))}(n(e/i))/3:function(t){return c(t+L(t*t+1))}(n(t))/3,u=o(s),f=P(l),h=f*f-u*u;return[2*d(t)*a(C(l)*u,.25-h),2*d(e)*a(f*g(s),.25+h)]};var R=L(8),F=c(1+w);function B(t,e){var r=n(e);return rx){var l=a(s[1],s[0]),c=L(s[0]*s[0]+s[1]*s[1]),u=r*p((l-x)/r)+x,f=a(g(l-=u),2-o(l));l=u+S(y/c*g(f))-f,s[0]=c*o(l),s[1]=c*g(l)}return s}return s.invert=function(t,n){var s=L(t*t+n*n);if(s>x){var l=a(n,t),c=r*p((l-x)/r)+x,u=l>c?-1:1,f=s*o(c-l),h=1/m(u*E((f-y)/L(y*(y-2*f)+s*s)));l=c+2*i((h+u*L(h*h-3))/3),t=s*o(l),n=s*g(l)}return e.geoAzimuthalEquidistantRaw.invert(t,n)},s}function j(t,r){if(arguments.length<2&&(r=t),1===r)return e.geoAzimuthalEqualAreaRaw;if(r===1/0)return U;function n(n,i){var a=e.geoAzimuthalEqualAreaRaw(n/r,i);return a[0]*=t,a}return n.invert=function(n,i){var a=e.geoAzimuthalEqualAreaRaw.invert(n/t,i);return a[0]*=r,a},n}function U(t,e){return[t*o(e)/o(e/=2),2*g(e)]}function V(t,e,r){var i,a,o,s=100;r=void 0===r?0:+r,e=+e;do{(a=t(r))===(o=t(r+v))&&(o=a+v),r-=i=-1*v*(a-e)/(a-o)}while(s-- >0&&n(i)>v);return s<0?NaN:r}function H(t,e,r){return void 0===e&&(e=40),void 0===r&&(r=1e-12),function(i,a,o,s){var l,c,u;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var f=0;fl)o-=c/=2,s-=u/=2;else{l=g;var m=(o>0?-1:1)*r,v=(s>0?-1:1)*r,y=t(o+m,s),x=t(o,s+v),b=(y[0]-h[0])/m,_=(y[1]-h[1])/m,w=(x[0]-h[0])/v,T=(x[1]-h[1])/v,k=T*b-_*w,A=(n(k)<.5?.5:1)/k;if(o+=c=(d*w-p*T)*A,s+=u=(p*_-d*b)*A,n(c)0&&(i[1]*=1+a/1.5*i[0]*i[0]),i}return e.invert=H(e),e}function G(t,e){var r,i=t*g(e),a=30;do{e-=r=(e+g(e)-i)/(1+o(e))}while(n(r)>v&&--a>0);return e/2}function Y(t,e,r){function n(n,i){return[t*n*o(i=G(r,i)),e*g(i)]}return n.invert=function(n,i){return i=S(i/e),[n/(t*o(i)),S((2*i+g(2*i))/r)]},n}B.invert=function(t,e){if((a=n(e))1e-12&&--u>0);return[t/(o(l)*(R-1/g(l))),d(e)*l]},U.invert=function(t,e){var r=2*S(e/2);return[t*o(r/2)/o(r),r]};var W=Y(w/x,w,y);var X=2.00276,Z=1.11072;function J(t,e){var r=G(y,e);return[X*t/(1/o(e)+Z/o(r)),(e+w*g(r))/X]}function K(t){var r=0,n=e.geoProjectionMutator(t),i=n(r);return i.parallel=function(t){return arguments.length?n(r=t*M):r*A},i}function Q(t,e){return[t*o(e),e]}function $(t){if(!t)return Q;var e=1/m(t);function r(r,n){var i=e+t-n,a=i?r*o(n)/i:i;return[i*g(a),e-i*o(a)]}return r.invert=function(r,n){var i=L(r*r+(n=e-n)*n),s=e+t-i;return[i/o(s)*a(r,n),s]},r}function tt(t){function e(e,r){var n=x-r,i=n?e*t*g(n)/n:n;return[n*g(i)/t,x-n*o(i)]}return e.invert=function(e,r){var n=e*t,i=x-r,o=L(n*n+i*i),s=a(n,i);return[(o?o/g(o):1)*s/t,x-o]},e}J.invert=function(t,e){var r,i,a=X*e,s=e<0?-b:b,l=25;do{i=a-w*g(s),s-=r=(g(2*s)+2*s-y*g(i))/(2*o(2*s)+2+y*o(i)*w*o(s))}while(n(r)>v&&--l>0);return i=a-w*g(s),[t*(1/o(i)+Z/o(s))/X,i]},Q.invert=function(t,e){return[t/o(e),e]};var et=Y(1,4/y,y);function rt(t,e,r,i,s,l){var c,u=o(l);if(n(t)>1||n(l)>1)c=E(r*s+e*i*u);else{var f=g(t/2),h=g(l/2);c=2*S(L(f*f+e*i*h*h))}return n(c)>v?[c,a(i*g(l),e*s-r*i*u)]:[0,0]}function nt(t,e,r){return E((t*t+e*e-r*r)/(2*t*e))}function it(t){return t-2*y*l((t+y)/(2*y))}function at(t,e,r){for(var n,i=[[t[0],t[1],g(t[1]),o(t[1])],[e[0],e[1],g(e[1]),o(e[1])],[r[0],r[1],g(r[1]),o(r[1])]],a=i[2],s=0;s<3;++s,a=n)n=i[s],a.v=rt(n[1]-a[1],a[3],a[2],n[3],n[2],n[0]-a[0]),a.point=[0,0];var l=nt(i[0].v[0],i[2].v[0],i[1].v[0]),c=nt(i[0].v[0],i[1].v[0],i[2].v[0]),u=y-l;i[2].point[1]=0,i[0].point[0]=-(i[1].point[0]=i[0].v[0]/2);var f=[i[2].point[0]=i[0].point[0]+i[2].v[0]*o(l),2*(i[0].point[1]=i[1].point[1]=i[2].v[0]*g(l))];return function(t,e){var r,n=g(e),a=o(e),s=new Array(3);for(r=0;r<3;++r){var l=i[r];if(s[r]=rt(e-l[1],l[3],l[2],a,n,t-l[0]),!s[r][0])return l.point;s[r][1]=it(s[r][1]-l.v[1])}var h=f.slice();for(r=0;r<3;++r){var p=2==r?0:r+1,d=nt(i[r].v[0],s[r][0],s[p][0]);s[r][1]<0&&(d=-d),r?1==r?(d=c-d,h[0]-=s[r][0]*o(d),h[1]-=s[r][0]*g(d)):(d=u-d,h[0]+=s[r][0]*o(d),h[1]+=s[r][0]*g(d)):(h[0]+=s[r][0]*o(d),h[1]-=s[r][0]*g(d))}return h[0]/=3,h[1]/=3,h}}function ot(t){return t[0]*=M,t[1]*=M,t}function st(t,r,n){var i=e.geoCentroid({type:\"MultiPoint\",coordinates:[t,r,n]}),a=[-i[0],-i[1]],o=e.geoRotation(a),s=at(ot(o(t)),ot(o(r)),ot(o(n)));s.invert=H(s);var l=e.geoProjection(s).rotate(a),c=l.center;return delete l.rotate,l.center=function(t){return arguments.length?c(o(t)):o.invert(c())},l.clipAngle(90)}function lt(t,e){var r=L(1-g(e));return[2/T*t*r,T*(1-r)]}function ct(t){var e=m(t);function r(t,r){return[t,(t?t/g(t):1)*(g(r)*o(t)-e*o(r))]}return r.invert=e?function(t,r){t&&(r*=g(t)/t);var n=o(t);return[t,2*a(L(n*n+e*e-r*r)-n,e-r)]}:function(t,e){return[t,S(t?e*m(t)/t:e)]},r}lt.invert=function(t,e){var r=(r=e/T-1)*r;return[r>0?t*L(y/r)/2:0,S(1-r)]};var ut=L(3);function ft(t,e){return[ut*t*(2*o(2*e/3)-1)/T,ut*T*g(e/3)]}function ht(t){var e=o(t);function r(t,r){return[t*e,g(r)/e]}return r.invert=function(t,r){return[t/e,S(r*e)]},r}function pt(t){var e=o(t);function r(t,r){return[t*e,(1+e)*m(r/2)]}return r.invert=function(t,r){return[t/e,2*i(r/(1+e))]},r}function dt(t,e){var r=L(8/(3*y));return[r*t*(1-n(e)/y),r*e]}function gt(t,e){var r=L(4-3*g(n(e)));return[2/L(6*y)*t*r,d(e)*L(2*y/3)*(2-r)]}function mt(t,e){var r=L(y*(4+y));return[2/r*t*(1+L(1-4*e*e/(y*y))),4/r*e]}function vt(t,e){var r=(2+x)*g(e);e/=2;for(var i=0,a=1/0;i<10&&n(a)>v;i++){var s=o(e);e-=a=(e+g(e)*(s+2)-r)/(2*s*(1+s))}return[2/L(y*(4+y))*t*(1+o(e)),2*L(y/(4+y))*g(e)]}function yt(t,e){return[t*(1+o(e))/L(2+y),2*e/L(2+y)]}function xt(t,e){for(var r=(1+x)*g(e),i=0,a=1/0;i<10&&n(a)>v;i++)e-=a=(e+g(e)-r)/(1+o(e));return r=L(2+y),[t*(1+o(e))/r,2*e/r]}ft.invert=function(t,e){var r=3*S(e/(ut*T));return[T*t/(ut*(2*o(2*r/3)-1)),r]},dt.invert=function(t,e){var r=L(8/(3*y)),i=e/r;return[t/(r*(1-n(i)/y)),i]},gt.invert=function(t,e){var r=2-n(e)/L(2*y/3);return[t*L(6*y)/(2*r),d(e)*S((4-r*r)/3)]},mt.invert=function(t,e){var r=L(y*(4+y))/2;return[t*r/(1+L(1-e*e*(4+y)/(4*y))),e*r/2]},vt.invert=function(t,e){var r=e*L((4+y)/y)/2,n=S(r),i=o(n);return[t/(2/L(y*(4+y))*(1+i)),S((n+r*(i+2))/(2+x))]},yt.invert=function(t,e){var r=L(2+y),n=e*r/2;return[r*t/(1+o(n)),n]},xt.invert=function(t,e){var r=1+x,n=L(r/2);return[2*t*n/(1+o(e*=n)),S((e+g(e))/r)]};var bt=3+2*w;function _t(t,e){var r=g(t/=2),n=o(t),a=L(o(e)),s=o(e/=2),l=g(e)/(s+w*n*a),u=L(2/(1+l*l)),f=L((w*s+(n+r)*a)/(w*s+(n-r)*a));return[bt*(u*(f-1/f)-2*c(f)),bt*(u*l*(f+1/f)-2*i(l))]}_t.invert=function(t,e){if(!(r=D.invert(t/1.2,1.065*e)))return null;var r,a=r[0],s=r[1],l=20;t/=bt,e/=bt;do{var h=a/2,p=s/2,d=g(h),m=o(h),y=g(p),b=o(p),T=o(s),k=L(T),A=y/(b+w*m*k),M=A*A,S=L(2/(1+M)),E=(w*b+(m+d)*k)/(w*b+(m-d)*k),C=L(E),P=C-1/C,I=C+1/C,O=S*P-2*c(C)-t,z=S*A*I-2*i(A)-e,R=y&&_*k*d*M/y,F=(w*m*b+k)/(2*(b+w*m*k)*(b+w*m*k)*k),B=-.5*A*S*S*S,N=B*R,j=B*F,U=(U=2*b+w*k*(m-d))*U*C,V=(w*m*b*k+T)/U,H=-w*d*y/(k*U),q=P*N-2*V/C+S*(V+V/E),G=P*j-2*H/C+S*(H+H/E),Y=A*I*N-2*R/(1+M)+S*I*R+S*A*(V-V/E),W=A*I*j-2*F/(1+M)+S*I*F+S*A*(H-H/E),X=G*Y-W*q;if(!X)break;var Z=(z*G-O*W)/X,J=(O*Y-z*q)/X;a-=Z,s=u(-x,f(x,s-J))}while((n(Z)>v||n(J)>v)&&--l>0);return n(n(s)-x)s){var d=L(h),m=a(f,u),b=i*p(m/i),_=m-b,w=t*o(_),T=(t*g(_)-_*g(w))/(x-w),k=Lt(_,T),A=(y-t)/Ct(k,w,y);u=d;var M,S=50;do{u-=M=(t+Ct(k,w,u)*A-d)/(k(u)*A)}while(n(M)>v&&--S>0);f=_*g(u),us){var u=L(c),f=a(l,r),h=i*p(f/i),d=f-h;r=u*o(d),l=u*g(d);for(var m=r-x,v=g(r),b=l/v,_=rv||n(p)>v)&&--x>0);return[d,m]},u}Tt.invert=function(t,e){var r=e/(1+wt);return[t&&t/(wt*L(1-r*r)),2*i(r)]},kt.invert=function(t,e){var r=i(e/T),n=o(r),a=2*r;return[t*T/2/(o(a)*n*n),a]};var It=Pt(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);var Ot=Pt(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);var zt=Pt(5/6*y,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Dt(t,e){var r=t*t,n=e*e;return[t*(1-.162388*n)*(.87-952426e-9*r*r),e*(1+n/12)]}Dt.invert=function(t,e){var r,i=t,a=e,o=50;do{var s=a*a;a-=r=(a*(1+s/12)-e)/(1+s/4)}while(n(r)>v&&--o>0);o=50,t/=1-.162388*s;do{var l=(l=i*i)*l;i-=r=(i*(.87-952426e-9*l)-t)/(.87-.00476213*l)}while(n(r)>v&&--o>0);return[i,a]};var Rt=Pt(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Ft(t){var e=t(x,0)[0]-t(-x,0)[0];function r(r,n){var i=r>0?-.5:.5,a=t(r+i*y,n);return a[0]-=i*e,a}return t.invert&&(r.invert=function(r,n){var i=r>0?-.5:.5,a=t.invert(r+i*e,n),o=a[0]-i*y;return o<-y?o+=2*y:o>y&&(o-=2*y),a[0]=o,a}),r}function Bt(t,e){var r=d(t),i=d(e),s=o(e),l=o(t)*s,c=g(t)*s,u=g(i*e);t=n(a(c,u)),e=S(l),n(t-x)>v&&(t%=x);var f=function(t,e){if(e===x)return[0,0];var r,i,a=g(e),s=a*a,l=s*s,c=1+l,u=1+3*l,f=1-l,h=S(1/L(c)),p=f+s*c*h,d=(1-a)/p,m=L(d),b=d*c,_=L(b),w=m*f;if(0===t)return[0,-(w+s*_)];var T,k=o(e),A=1/k,M=2*a*k,E=(-p*k-(-3*s+h*u)*M*(1-a))/(p*p),C=-A*M,P=-A*(s*c*E+d*u*M),I=-2*A*(f*(.5*E/m)-2*s*m*M),O=4*t/y;if(t>.222*y||e.175*y){if(r=(w+s*L(b*(1+l)-w*w))/(1+l),t>y/4)return[r,r];var z=r,D=.5*r;r=.5*(D+z),i=50;do{var R=L(b-r*r),F=r*(I+C*R)+P*S(r/_)-O;if(!F)break;F<0?D=r:z=r,r=.5*(D+z)}while(n(z-D)>v&&--i>0)}else{r=v,i=25;do{var B=r*r,N=L(b-B),j=I+C*N,U=r*j+P*S(r/_)-O,V=j+(P-C*B)/N;r-=T=N?U/V:0}while(n(T)>v&&--i>0)}return[r,-w-s*L(b-r*r)]}(t>y/4?x-t:t,e);return t>y/4&&(u=f[0],f[0]=-f[1],f[1]=-u),f[0]*=r,f[1]*=-i,f}function Nt(t,e){var r,a,l,c,u,f;if(e=1-v)return r=(1-e)/4,l=1/(a=P(t)),[(c=((f=s(2*(f=t)))-1)/(f+1))+r*((u=a*C(t))-t)/(a*a),l-r*c*l*(u-t),l+r*c*l*(u+t),2*i(s(t))-x+r*(u-t)/a];var h=[1,0,0,0,0,0,0,0,0],p=[L(e),0,0,0,0,0,0,0,0],d=0;for(a=L(1-e),u=1;n(p[d]/h[d])>v&&d<8;)r=h[d++],p[d]=(r-a)/2,h[d]=(r+a)/2,a=L(r*a),u*=2;l=u*h[d]*t;do{l=(S(c=p[d]*g(a=l)/h[d])+l)/2}while(--d);return[g(l),c=o(l),c/o(l-a),l]}function jt(t,e){if(!e)return t;if(1===e)return c(m(t/2+b));for(var r=1,a=L(1-e),o=L(e),s=0;n(o)>v;s++){if(t%y){var l=i(a*m(t)/r);l<0&&(l+=y),t+=l+~~(t/y)*y}else t+=t;o=(r+a)/2,a=L(r*a),o=((r=o)-a)/2}return t/(h(2,s)*r)}function Ut(t,e){var r=(w-1)/(w+1),l=L(1-r*r),u=jt(x,l*l),f=c(m(y/4+n(e)/2)),h=s(-1*f)/L(r),p=function(t,e){var r=t*t,n=e+1,i=1-r-e*e;return[.5*((t>=0?x:-x)-a(i,2*t)),-.25*c(i*i+4*r)+.5*c(n*n+r)]}(h*o(-1*t),h*g(-1*t)),v=function(t,e,r){var a=n(t),o=C(n(e));if(a){var s=1/g(a),l=1/(m(a)*m(a)),c=-(l+r*(o*o*s*s)-1+r),u=(-c+L(c*c-4*((r-1)*l)))/2;return[jt(i(1/L(u)),r)*d(t),jt(i(L((u/l-1)/r)),1-r)*d(e)]}return[0,jt(i(o),1-r)*d(e)]}(p[0],p[1],l*l);return[-v[1],(e>=0?1:-1)*(.5*u-v[0])]}function Vt(t){var e=g(t),r=o(t),i=Ht(t);function s(t,a){var s=i(t,a);t=s[0],a=s[1];var l=g(a),c=o(a),u=o(t),f=E(e*l+r*c*u),h=g(f),p=n(h)>v?f/h:1;return[p*r*g(t),(n(t)>x?p:-p)*(e*c-r*l*u)]}return i.invert=Ht(-t),s.invert=function(t,r){var n=L(t*t+r*r),s=-g(n),l=o(n),c=n*l,u=-r*s,f=n*e,h=L(c*c+u*u-f*f),p=a(c*f+u*h,u*f-c*h),d=(n>x?-1:1)*a(t*s,n*o(p)*l+r*g(p)*s);return i.invert(d,p)},s}function Ht(t){var e=g(t),r=o(t);return function(t,n){var i=o(n),s=o(t)*i,l=g(t)*i,c=g(n);return[a(l,s*r-c*e),S(c*r+s*e)]}}Bt.invert=function(t,e){n(t)>1&&(t=2*d(t)-t),n(e)>1&&(e=2*d(e)-e);var r=d(t),i=d(e),s=-r*t,l=-i*e,c=l/s<1,u=function(t,e){var r=0,i=1,a=.5,s=50;for(;;){var l=a*a,c=L(a),u=S(1/L(1+l)),f=1-l+a*(1+l)*u,h=(1-c)/f,p=L(h),d=h*(1+l),g=p*(1-l),m=L(d-t*t),v=e+g+a*m;if(n(i-r)<1e-12||0==--s||0===v)break;v>0?r=a:i=a,a=.5*(r+i)}if(!s)return null;var x=S(c),b=o(x),_=1/b,w=2*c*b,T=(-f*b-(-3*a+u*(1+3*l))*w*(1-c))/(f*f);return[y/4*(t*(-2*_*(.5*T/p*(1-l)-2*a*p*w)+-_*w*m)+-_*(a*(1+l)*T+h*(1+3*l)*w)*S(t/L(d))),x]}(c?l:s,c?s:l),f=u[0],h=u[1],p=o(h);return c&&(f=-x-f),[r*(a(g(f)*p,-g(h))+y),i*S(o(f)*p)]},Ut.invert=function(t,e){var r,n,o,l,u,f,h=(w-1)/(w+1),p=L(1-h*h),d=jt(x,p*p),g=(n=-t,o=p*p,(r=.5*d-e)?(l=Nt(r,o),n?(f=(u=Nt(n,1-o))[1]*u[1]+o*l[0]*l[0]*u[0]*u[0],[[l[0]*u[2]/f,l[1]*l[2]*u[0]*u[1]/f],[l[1]*u[1]/f,-l[0]*l[2]*u[0]*u[2]/f],[l[2]*u[1]*u[2]/f,-o*l[0]*l[1]*u[0]/f]]):[[l[0],0],[l[1],0],[l[2],0]]):[[0,(u=Nt(n,1-o))[0]/u[1]],[1/u[1],0],[u[2]/u[1],0]]),m=function(t,e){var r=e[0]*e[0]+e[1]*e[1];return[(t[0]*e[0]+t[1]*e[1])/r,(t[1]*e[0]-t[0]*e[1])/r]}(g[0],g[1]);return[a(m[1],m[0])/-1,2*i(s(-.5*c(h*m[0]*m[0]+h*m[1]*m[1])))-x]};var qt=S(1-1/3)*A,Gt=ht(0);function Yt(t){var e=qt*M,r=lt(y,e)[0]-lt(-y,e)[0],i=Gt(0,e)[1],a=lt(0,e)[1],o=T-a,s=k/t,c=4/k,h=i+o*o*4/k;function p(p,d){var g,m=n(d);if(m>e){var v=f(t-1,u(0,l((p+y)/s)));(g=lt(p+=y*(t-1)/t-v*s,m))[0]=g[0]*k/r-k*(t-1)/(2*t)+v*k/t,g[1]=i+4*(g[1]-a)*o/k,d<0&&(g[1]=-g[1])}else g=Gt(p,d);return g[0]*=c,g[1]/=h,g}return p.invert=function(e,p){e/=c;var d=n(p*=h);if(d>i){var g=f(t-1,u(0,l((e+y)/s)));e=(e+y*(t-1)/t-g*s)*r/k;var m=lt.invert(e,.25*(d-i)*k/o+a);return m[0]-=y*(t-1)/t-g*s,p<0&&(m[1]=-m[1]),m}return Gt.invert(e,p)},p}function Wt(t,e){return[t,1&e?90-v:qt]}function Xt(t,e){return[t,1&e?-90+v:-qt]}function Zt(t){return[t[0]*(1-v),t[1]]}function Jt(t){var e,r=1+t,i=S(g(1/r)),s=2*L(y/(e=y+4*i*r)),l=.5*s*(r+L(t*(2+t))),c=t*t,u=r*r;function f(f,h){var p,d,m=1-g(h);if(m&&m<2){var v,b=x-h,_=25;do{var w=g(b),T=o(b),k=i+a(w,r-T),A=1+u-2*r*T;b-=v=(b-c*i-r*w+A*k-.5*m*e)/(2*r*w*k)}while(n(v)>1e-12&&--_>0);p=s*L(A),d=f*k/y}else p=s*(t+m),d=f*i/y;return[p*g(d),l-p*o(d)]}return f.invert=function(t,n){var o=t*t+(n-=l)*n,f=(1+u-o/(s*s))/(2*r),h=E(f),p=g(h),d=i+a(p,r-f);return[S(t/L(o))*y/d,S(1-2*(h-c*i-r*p+(1+u-2*r*f)*d)/e)]},f}function Kt(t,e){return e>-.7109889596207567?((t=W(t,e))[1]+=.0528035274542,t):Q(t,e)}function Qt(t,e){return n(e)>.7109889596207567?((t=W(t,e))[1]-=e>0?.0528035274542:-.0528035274542,t):Q(t,e)}function $t(t,e,r,n){var i=L(4*y/(2*r+(1+t-e/2)*g(2*r)+(t+e)/2*g(4*r)+e/2*g(6*r))),a=L(n*g(r)*L((1+t*o(2*r)+e*o(4*r))/(1+t+e))),s=r*c(1);function l(r){return L(1+t*o(2*r)+e*o(4*r))}function c(n){var i=n*r;return(2*i+(1+t-e/2)*g(2*i)+(t+e)/2*g(4*i)+e/2*g(6*i))/r}function u(t){return l(t)*g(t)}var f=function(t,e){var n=r*V(c,s*g(e)/r,e/y);isNaN(n)&&(n=r*d(e));var u=i*l(n);return[u*a*t/y*o(n),u/a*g(n)]};return f.invert=function(t,e){var n=V(u,e*a/i);return[t*y/(o(n)*i*a*l(n)),S(r*c(n/r)/s)]},0===r&&(i=L(n/y),(f=function(t,e){return[t*i,g(e)/i]}).invert=function(t,e){return[t/i,S(e*i)]}),f}function te(t,e,r,n,i){void 0===n&&(n=1e-8),void 0===i&&(i=20);var a=t(e),o=t(.5*(e+r)),s=t(r);return function t(e,r,n,i,a,o,s,l,c,u,f){if(f.nanEncountered)return NaN;var h,p,d,g,m,v,y,x,b,_;if(p=e(r+.25*(h=n-r)),d=e(n-.25*h),isNaN(p))f.nanEncountered=!0;else{if(!isNaN(d))return _=((v=(g=h*(i+4*p+a)/12)+(m=h*(a+4*d+o)/12))-s)/15,u>c?(f.maxDepthCount++,v+_):Math.abs(_)t?r=n:e=n,n=e+r>>1}while(n>e);var i=c[n+1]-c[n];return i&&(i=(t-c[n+1])/i),(n+1+i)/s}var p=2*f(1)/y*o/r,m=function(t,e){var r=f(n(g(e))),a=i(r)*t;return r/=p,[a,e>=0?r:-r]};return m.invert=function(t,e){var r;return n(e*=p)<1&&(r=d(e)*S(a(n(e))*o)),[t/i(n(e)),r]},m}function re(t,e){return n(t[0]-e[0])=0;--l)n=(e=t[1][l])[0][0],i=e[0][1],a=e[1][1],o=e[2][0],s=e[2][1],c.push(ne([[o-v,s-v],[o-v,a+v],[n+v,a+v],[n+v,i-v]],30));return{type:\"Polygon\",coordinates:[r.merge(c)]}}function ae(t,r,n){var i,a;function o(e,n){for(var i=n<0?-1:1,a=r[+(n<0)],o=0,s=a.length-1;oa[o][2][0];++o);var l=t(e-a[o][1][0],n);return l[0]+=t(a[o][1][0],i*n>i*a[o][0][1]?a[o][0][1]:n)[0],l}n?o.invert=n(o):t.invert&&(o.invert=function(e,n){for(var i=a[+(n<0)],s=r[+(n<0)],l=0,c=i.length;lo&&(r=a,a=o,o=r),[[n,a],[i,o]]}))})),s):r.map((function(t){return t.map((function(t){return[[t[0][0]*A,t[0][1]*A],[t[1][0]*A,t[1][1]*A],[t[2][0]*A,t[2][1]*A]]}))}))},null!=r&&s.lobes(r),s}Kt.invert=function(t,e){return e>-.7109889596207567?W.invert(t,e-.0528035274542):Q.invert(t,e)},Qt.invert=function(t,e){return n(e)>.7109889596207567?W.invert(t,e+(e>0?.0528035274542:-.0528035274542)):Q.invert(t,e)};var oe=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var se=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var le=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var ce=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];var ue=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];var fe=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function he(t,e){return[3/k*t*L(y*y/3-e*e),e]}function pe(t){function e(e,r){if(n(n(r)-x)2)return null;var o=(e/=2)*e,s=(r/=2)*r,l=2*r/(1+o+s);return l=h((1+l)/(1-l),1/t),[a(2*e,1-o-s)/t,S((l-1)/(l+1))]},e}he.invert=function(t,e){return[k/3*t/L(y*y/3-e*e),e]};var de=y/w;function ge(t,e){return[t*(1+L(o(e)))/2,e/(o(e/2)*o(t/6))]}function me(t,e){var r=t*t,n=e*e;return[t*(.975534+n*(-.0143059*r-.119161+-.0547009*n)),e*(1.00384+r*(.0802894+-.02855*n+199025e-9*r)+n*(.0998909+-.0491032*n))]}function ve(t,e){return[g(t)/o(e),m(e)*o(t)]}function ye(t){var e=o(t),r=m(b+t/2);function i(i,a){var o=a-t,s=n(o)=0;)h=(f=t[u])[0]+l*(i=h)-c*p,p=f[1]+l*p+c*i;return[h=l*(i=h)-c*p,p=l*p+c*i]}return r.invert=function(r,s){var l=20,c=r,u=s;do{for(var f,h=e,p=t[h],d=p[0],m=p[1],v=0,y=0;--h>=0;)v=d+c*(f=v)-u*y,y=m+c*y+u*f,d=(p=t[h])[0]+c*(f=d)-u*m,m=p[1]+c*m+u*f;var x,b,_=(v=d+c*(f=v)-u*y)*v+(y=m+c*y+u*f)*y;c-=x=((d=c*(f=d)-u*m-r)*v+(m=c*m+u*f-s)*y)/_,u-=b=(m*v-d*y)/_}while(n(x)+n(b)>1e-12&&--l>0);if(l){var w=L(c*c+u*u),T=2*i(.5*w),k=g(T);return[a(c*k,w*o(T)),w?S(u*k/w):0]}},r}ge.invert=function(t,e){var r=n(t),i=n(e),a=v,s=x;iv||n(b)>v)&&--a>0);return a&&[r,i]},ve.invert=function(t,e){var r=t*t,n=e*e+1,i=r+n,a=t?_*L((i-L(i*i-4*r))/r):1/L(n);return[S(t*a),d(e)*E(a)]},xe.invert=function(t,e){return[t,2.5*i(s(.8*e))-.625*y]};var _e=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],we=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Te=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ke=[[.9245,0],[0,0],[.01943,0]],Ae=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Me(t,r){var n=e.geoProjection(be(t)).rotate(r).clipAngle(90),i=e.geoRotation(r),a=n.center;return delete n.rotate,n.center=function(t){return arguments.length?a(i(t)):i.invert(a())},n}var Se=L(6),Ee=L(7);function Le(t,e){var r=S(7*g(e)/(3*Se));return[Se*t*(2*o(2*r/3)-1)/Ee,9*g(r/3)/Ee]}function Ce(t,e){for(var r,i=(1+_)*g(e),a=e,s=0;s<25&&(a-=r=(g(a/2)+g(a)-i)/(.5*o(a/2)+o(a)),!(n(r)1e-12&&--l>0);return[t/(.84719-.13063*(i=s*s)+(o=i*(a=i*i))*o*(.05494*i-.04515-.02326*a+.00331*o)),s]},Oe.invert=function(t,e){for(var r=e/2,i=0,a=1/0;i<10&&n(a)>v;++i){var s=o(e/2);e-=a=(e-m(e/2)-r)/(1-.5/(s*s))}return[2*t/(1+o(e)),e]};var ze=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function De(t,e){var r=g(e),i=o(e),a=d(t);if(0===t||n(e)===x)return[0,e];if(0===e)return[t,0];if(n(t)===x)return[t*i,x*r];var s=y/(2*t)-2*t/y,l=2*e/y,c=(1-l*l)/(r-l),u=s*s,f=c*c,h=1+u/f,p=1+f/u,m=(s*r/c-s/2)/h,v=(f*r/u+c/2)/p,b=v*v-(f*r*r/u+c*r-1)/p;return[x*(m+L(m*m+i*i/h)*a),x*(v+L(b<0?0:b)*d(-e*s)*a)]}De.invert=function(t,e){var r=(t/=x)*t,n=r+(e/=x)*e,i=y*y;return[t?(n-1+L((1-n)*(1-n)+4*r))/(2*t)*x:0,V((function(t){return n*(y*g(t)-2*t)*y+4*t*t*(e-g(t))+2*y*t-i*e}),0)]};function Re(t,e){var r=e*e;return[t,e*(1.0148+r*r*(.23185+r*(.02406*r-.14499)))]}function Fe(t,e){if(n(e)=0;)if(n=e[s],r[0]===n[0]&&r[1]===n[1]){if(a)return[a,r];a=r}}}(e.face,r.face),i=Be(n.map(r.project),n.map(e.project));e.transform=r.transform?Ne(r.transform,i):i;for(var a=r.edges,o=0,s=a.length;o1.790857183?e=1.790857183:e<-1.790857183&&(e=-1.790857183);var r,i=e;do{var a=i*i;i-=r=(i*(1.0148+a*a*(.23185+a*(.02406*a-.14499)))-e)/(1.0148+a*a*(5*.23185+a*(.21654*a-1.01493)))}while(n(r)>v);return[t,i]},Fe.invert=function(t,e){if(n(e)v&&--s>0);return l=m(a),[(n(e)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])})),nr=[],t.length?t.length>1?{type:\"MultiPolygon\",coordinates:t}:{type:\"Polygon\",coordinates:t[0]}:null}};function sr(t){var r=t(x,0)[0]-t(-x,0)[0];function i(e,i){var a=n(e)0?e-y:e+y,i),s=(o[0]-o[1])*_,l=(o[0]+o[1])*_;if(a)return[s,l];var c=r*_,u=s>0^l>0?-1:1;return[u*s-d(l)*c,u*l-d(s)*c]}return t.invert&&(i.invert=function(e,i){var a=(e+i)*_,o=(i-e)*_,s=n(a)<.5*r&&n(o)<.5*r;if(!s){var l=r*_,c=a>0^o>0?-1:1,u=-c*e+(o>0?1:-1)*l,f=-c*i+(a>0?1:-1)*l;a=(-u-f)*_,o=(u-f)*_}var h=t.invert(a,o);return s||(h[0]+=a>0?y:-y),h}),e.geoProjection(i).rotate([-90,-90,45]).clipAngle(179.999)}function lr(){return sr(Ut).scale(111.48)}function cr(t){var e=g(t);function r(r,n){var a=e?m(r*e/2)/e:r/2;if(!n)return[2*a,-t];var s=2*i(a*g(n)),l=1/m(n);return[g(s)*l,n+(1-o(s))*l-t]}return r.invert=function(r,a){if(n(a+=t)v&&--u>0);var d=r*(f=m(c)),x=m(n(a)0?x:-x)*(h+o*(d-c)/2+o*o*(d-2*h+c)/2)]}function hr(t,e){var r=function(t){function e(e,r){var n=o(r),i=(t-1)/(t-n*o(e));return[i*n*g(e),i*g(r)]}return e.invert=function(e,r){var n=e*e+r*r,i=L(n),o=(t-L(1-n*(t+1)/(t-1)))/((t-1)/i+i/(t-1));return[a(e*o,i*L(1-o*o)),i?S(r*o/i):0]},e}(t);if(!e)return r;var n=o(e),i=g(e);function s(e,a){var o=r(e,a),s=o[1],l=s*i/(t-1)+n;return[o[0]*n/l,s/l]}return s.invert=function(e,a){var o=(t-1)/(t-1-a*i);return r.invert(o*e,o*a*n)},s}ur.forEach((function(t){t[1]*=1.0144})),fr.invert=function(t,e){var r=e/x,i=90*r,a=f(18,n(i/5)),o=u(0,l(a));do{var s=ur[o][1],c=ur[o+1][1],h=ur[f(19,o+2)][1],p=h-s,d=h-2*c+s,g=2*(n(r)-c)/p,m=d/p,v=g*(1-m*g*(1-2*m*g));if(v>=0||1===o){i=(e>=0?5:-5)*(v+a);var y,b=50;do{v=(a=f(18,n(i)/5))-(o=l(a)),s=ur[o][1],c=ur[o+1][1],h=ur[f(19,o+2)][1],i-=(y=(e>=0?x:-x)*(c+v*(h-s)/2+v*v*(h-2*c+s)/2)-e)*A}while(n(y)>1e-12&&--b>0);break}}while(--o>=0);var _=ur[o][0],w=ur[o+1][0],T=ur[f(19,o+2)][0];return[t/(w+v*(T-_)/2+v*v*(T-2*w+_)/2),i*M]};var pr=-179.9999,dr=179.9999,gr=-89.9999;function mr(t){return t.length>0}function vr(t){return-90===t||90===t?[0,t]:[-180,(e=t,Math.floor(1e4*e)/1e4)];var e}function yr(t){var e=t[0],r=t[1],n=!1;return e<=pr?(e=-180,n=!0):e>=dr&&(e=180,n=!0),r<=gr?(r=-90,n=!0):r>=89.9999&&(r=90,n=!0),n?[e,r]:t}function xr(t){return t.map(yr)}function br(t,e,r){for(var n=0,i=t.length;n=dr||u<=gr||u>=89.9999){a[o]=yr(l);for(var f=o+1;fpr&&pgr&&d<89.9999)break}if(f===o+1)continue;if(o){var g={index:-1,polygon:e,ring:a.slice(0,o+1)};g.ring[g.ring.length-1]=vr(u),r[r.length-1]=g}else r.pop();if(f>=s)break;r.push({index:-1,polygon:e,ring:a=a.slice(f-1)}),a[0]=vr(a[0][1]),o=-1,s=a.length}}}}function _r(t){var e,r,n,i,a,o,s=t.length,l={},c={};for(e=0;e0?y-l:l)*A],u=e.geoProjection(t(s)).rotate(c),f=e.geoRotation(c),h=u.center;return delete u.rotate,u.center=function(t){return arguments.length?h(f(t)):f.invert(h())},u.clipAngle(90)}function Mr(t){var r=o(t);function n(t,n){var i=e.geoGnomonicRaw(t,n);return i[0]*=r,i}return n.invert=function(t,n){return e.geoGnomonicRaw.invert(t/r,n)},n}function Sr(t,e){return Ar(Mr,t,e)}function Er(t){if(!(t*=2))return e.geoAzimuthalEquidistantRaw;var r=-t/2,n=-r,i=t*t,s=m(n),l=.5/g(n);function c(e,a){var s=E(o(a)*o(e-r)),l=E(o(a)*o(e-n));return[((s*=s)-(l*=l))/(2*t),(a<0?-1:1)*L(4*i*l-(i-s+l)*(i-s+l))/(2*t)]}return c.invert=function(t,e){var i,c,u=e*e,f=o(L(u+(i=t+r)*i)),h=o(L(u+(i=t+n)*i));return[a(c=f-h,i=(f+h)*s),(e<0?-1:1)*E(L(i*i+c*c)*l)]},c}function Lr(t,e){return Ar(Er,t,e)}function Cr(t,e){if(n(e)v&&--l>0);return[d(t)*(L(a*a+4)+a)*y/4,x*s]};var Rr=4*y+3*L(3),Fr=2*L(2*y*L(3)/Rr),Br=Y(Fr*L(3)/y,Fr,Rr/6);function Nr(t,e){return[t*L(1-3*e*e/(y*y)),e]}function jr(t,e){var r=o(e),n=o(t)*r,i=1-n,s=o(t=a(g(t)*r,-g(e))),l=g(t);return[l*(r=L(1-n*n))-s*i,-s*r-l*i]}function Ur(t,e){var r=O(t,e);return[(r[0]+t/x)/2,(r[1]+e)/2]}Nr.invert=function(t,e){return[t/L(1-3*e*e/(y*y)),e]},jr.invert=function(t,e){var r=(t*t+e*e)/-2,n=L(-r*(2+r)),i=e*r+t*n,o=t*r-e*n,s=L(o*o+i*i);return[a(n*i,s*(1+r)),s?-S(n*o/s):0]},Ur.invert=function(t,e){var r=t,i=e,a=25;do{var s,l=o(i),c=g(i),u=g(2*i),f=c*c,h=l*l,p=g(r),d=o(r/2),m=g(r/2),y=m*m,b=1-h*d*d,_=b?E(l*d)*L(s=1/b):s=0,w=.5*(2*_*l*m+r/x)-t,T=.5*(_*c+i)-e,k=.5*s*(h*y+_*l*d*f)+.5/x,A=s*(p*u/4-_*c*m),M=.125*s*(u*m-_*c*h*p),S=.5*s*(f*d+_*y*l)+.5,C=A*M-S*k,P=(T*A-w*S)/C,I=(w*M-T*k)/C;r-=P,i-=I}while((n(P)>v||n(I)>v)&&--a>0);return[r,i]},t.geoNaturalEarth=e.geoNaturalEarth1,t.geoNaturalEarthRaw=e.geoNaturalEarth1Raw,t.geoAiry=function(){var t=x,r=e.geoProjectionMutator(I),n=r(t);return n.radius=function(e){return arguments.length?r(t=e*M):t*A},n.scale(179.976).clipAngle(147)},t.geoAiryRaw=I,t.geoAitoff=function(){return e.geoProjection(O).scale(152.63)},t.geoAitoffRaw=O,t.geoArmadillo=function(){var t=20*M,r=t>=0?1:-1,n=m(r*t),i=e.geoProjectionMutator(z),s=i(t),l=s.stream;return s.parallel=function(e){return arguments.length?(n=m((r=(t=e*M)>=0?1:-1)*t),i(t)):t*A},s.stream=function(e){var i=s.rotate(),c=l(e),u=(s.rotate([0,0]),l(e)),f=s.precision();return s.rotate(i),c.sphere=function(){u.polygonStart(),u.lineStart();for(var e=-180*r;r*e<180;e+=90*r)u.point(e,90*r);if(t)for(;r*(e-=3*r*f)>=-180;)u.point(e,r*-a(o(e*M/2),n)*A);u.lineEnd(),u.polygonEnd()},c},s.scale(218.695).center([0,28.0974])},t.geoArmadilloRaw=z,t.geoAugust=function(){return e.geoProjection(D).scale(66.1603)},t.geoAugustRaw=D,t.geoBaker=function(){return e.geoProjection(B).scale(112.314)},t.geoBakerRaw=B,t.geoBerghaus=function(){var t=5,r=e.geoProjectionMutator(N),n=r(t),i=n.stream,s=-o(.01*M),l=g(.01*M);return n.lobes=function(e){return arguments.length?r(t=+e):t},n.stream=function(e){var r=n.rotate(),c=i(e),u=(n.rotate([0,0]),i(e));return n.rotate(r),c.sphere=function(){u.polygonStart(),u.lineStart();for(var e=0,r=360/t,n=2*y/t,i=90-180/t,c=x;e=0;)t.point((e=r[i])[0],e[1]);t.lineEnd(),t.polygonEnd()},t},n.scale(79.4187).parallel(45).clipAngle(179.999)},t.geoHammerRetroazimuthalRaw=Vt,t.geoHealpix=function(){var t=4,n=e.geoProjectionMutator(Yt),i=n(t),a=i.stream;return i.lobes=function(e){return arguments.length?n(t=+e):t},i.stream=function(n){var o=i.rotate(),s=a(n),l=(i.rotate([0,0]),a(n));return i.rotate(o),s.sphere=function(){var n,i;e.geoStream((n=180/t,i=[].concat(r.range(-180,180+n/2,n).map(Wt),r.range(180,-180-n/2,-n).map(Xt)),{type:\"Polygon\",coordinates:[180===n?i.map(Zt):i]}),l)},s},i.scale(239.75)},t.geoHealpixRaw=Yt,t.geoHill=function(){var t=1,r=e.geoProjectionMutator(Jt),n=r(t);return n.ratio=function(e){return arguments.length?r(t=+e):t},n.scale(167.774).center([0,18.67])},t.geoHillRaw=Jt,t.geoHomolosine=function(){return e.geoProjection(Qt).scale(152.63)},t.geoHomolosineRaw=Qt,t.geoHufnagel=function(){var t=1,r=0,n=45*M,i=2,a=e.geoProjectionMutator($t),o=a(t,r,n,i);return o.a=function(e){return arguments.length?a(t=+e,r,n,i):t},o.b=function(e){return arguments.length?a(t,r=+e,n,i):r},o.psiMax=function(e){return arguments.length?a(t,r,n=+e*M,i):n*A},o.ratio=function(e){return arguments.length?a(t,r,n,i=+e):i},o.scale(180.739)},t.geoHufnagelRaw=$t,t.geoHyperelliptical=function(){var t=0,r=2.5,n=1.183136,i=e.geoProjectionMutator(ee),a=i(t,r,n);return a.alpha=function(e){return arguments.length?i(t=+e,r,n):t},a.k=function(e){return arguments.length?i(t,r=+e,n):r},a.gamma=function(e){return arguments.length?i(t,r,n=+e):n},a.scale(152.63)},t.geoHyperellipticalRaw=ee,t.geoInterrupt=ae,t.geoInterruptedBoggs=function(){return ae(J,oe).scale(160.857)},t.geoInterruptedHomolosine=function(){return ae(Qt,se).scale(152.63)},t.geoInterruptedMollweide=function(){return ae(W,le).scale(169.529)},t.geoInterruptedMollweideHemispheres=function(){return ae(W,ce).scale(169.529).rotate([20,0])},t.geoInterruptedSinuMollweide=function(){return ae(Kt,ue,H).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},t.geoInterruptedSinusoidal=function(){return ae(Q,fe).scale(152.63).rotate([-20,0])},t.geoKavrayskiy7=function(){return e.geoProjection(he).scale(158.837)},t.geoKavrayskiy7Raw=he,t.geoLagrange=function(){var t=.5,r=e.geoProjectionMutator(pe),n=r(t);return n.spacing=function(e){return arguments.length?r(t=+e):t},n.scale(124.75)},t.geoLagrangeRaw=pe,t.geoLarrivee=function(){return e.geoProjection(ge).scale(97.2672)},t.geoLarriveeRaw=ge,t.geoLaskowski=function(){return e.geoProjection(me).scale(139.98)},t.geoLaskowskiRaw=me,t.geoLittrow=function(){return e.geoProjection(ve).scale(144.049).clipAngle(89.999)},t.geoLittrowRaw=ve,t.geoLoximuthal=function(){return K(ye).parallel(40).scale(158.837)},t.geoLoximuthalRaw=ye,t.geoMiller=function(){return e.geoProjection(xe).scale(108.318)},t.geoMillerRaw=xe,t.geoModifiedStereographic=Me,t.geoModifiedStereographicRaw=be,t.geoModifiedStereographicAlaska=function(){return Me(_e,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},t.geoModifiedStereographicGs48=function(){return Me(we,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},t.geoModifiedStereographicGs50=function(){return Me(Te,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},t.geoModifiedStereographicMiller=function(){return Me(ke,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},t.geoModifiedStereographicLee=function(){return Me(Ae,[165,10]).scale(250).clipAngle(130).center([-165,-10])},t.geoMollweide=function(){return e.geoProjection(W).scale(169.529)},t.geoMollweideRaw=W,t.geoMtFlatPolarParabolic=function(){return e.geoProjection(Le).scale(164.859)},t.geoMtFlatPolarParabolicRaw=Le,t.geoMtFlatPolarQuartic=function(){return e.geoProjection(Ce).scale(188.209)},t.geoMtFlatPolarQuarticRaw=Ce,t.geoMtFlatPolarSinusoidal=function(){return e.geoProjection(Pe).scale(166.518)},t.geoMtFlatPolarSinusoidalRaw=Pe,t.geoNaturalEarth2=function(){return e.geoProjection(Ie).scale(175.295)},t.geoNaturalEarth2Raw=Ie,t.geoNellHammer=function(){return e.geoProjection(Oe).scale(152.63)},t.geoNellHammerRaw=Oe,t.geoInterruptedQuarticAuthalic=function(){return ae(j(1/0),ze).rotate([20,0]).scale(152.63)},t.geoNicolosi=function(){return e.geoProjection(De).scale(127.267)},t.geoNicolosiRaw=De,t.geoPatterson=function(){return e.geoProjection(Re).scale(139.319)},t.geoPattersonRaw=Re,t.geoPolyconic=function(){return e.geoProjection(Fe).scale(103.74)},t.geoPolyconicRaw=Fe,t.geoPolyhedral=Ve,t.geoPolyhedralButterfly=function(t){t=t||function(t){var r=e.geoCentroid({type:\"MultiPoint\",coordinates:t});return e.geoGnomonic().scale(1).translate([0,0]).rotate([-r[0],-r[1]])};var r=Ye.map((function(e){return{face:e,project:t(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var n=r[t];n&&(n.children||(n.children=[])).push(r[e])})),Ve(r[0],(function(t,e){return r[t<-y/2?e<0?6:4:t<0?e<0?2:0:t0?[-r[0],0]:[180-r[0],180])};var r=Ye.map((function(e){return{face:e,project:t(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var n=r[t];n&&(n.children||(n.children=[])).push(r[e])})),Ve(r[0],(function(t,e){return r[t<-y/2?e<0?6:4:t<0?e<0?2:0:t2||a[0]!=e[0]||a[1]!=e[1])&&(n.push(a),e=a)}return 1===n.length&&t.length>1&&n.push(r(t[t.length-1])),n}function a(t){return t.map(i)}function o(t){if(null==t)return t;var e;switch(t.type){case\"GeometryCollection\":e={type:\"GeometryCollection\",geometries:t.geometries.map(o)};break;case\"Point\":e={type:\"Point\",coordinates:r(t.coordinates)};break;case\"MultiPoint\":e={type:t.type,coordinates:n(t.coordinates)};break;case\"LineString\":e={type:t.type,coordinates:i(t.coordinates)};break;case\"MultiLineString\":case\"Polygon\":e={type:t.type,coordinates:a(t.coordinates)};break;case\"MultiPolygon\":e={type:\"MultiPolygon\",coordinates:t.coordinates.map(a)};break;default:return t}return null!=t.bbox&&(e.bbox=t.bbox),e}function s(t){var e={type:\"Feature\",properties:t.properties,geometry:o(t.geometry)};return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),e}if(null!=t)switch(t.type){case\"Feature\":return s(t);case\"FeatureCollection\":var l={type:\"FeatureCollection\",features:t.features.map(s)};return null!=t.bbox&&(l.bbox=t.bbox),l;default:return o(t)}return t},t.geoQuincuncial=sr,t.geoRectangularPolyconic=function(){return K(cr).scale(131.215)},t.geoRectangularPolyconicRaw=cr,t.geoRobinson=function(){return e.geoProjection(fr).scale(152.63)},t.geoRobinsonRaw=fr,t.geoSatellite=function(){var t=2,r=0,n=e.geoProjectionMutator(hr),i=n(t,r);return i.distance=function(e){return arguments.length?n(t=+e,r):t},i.tilt=function(e){return arguments.length?n(t,r=e*M):r*A},i.scale(432.147).clipAngle(E(1/t)*A-1e-6)},t.geoSatelliteRaw=hr,t.geoSinuMollweide=function(){return e.geoProjection(Kt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},t.geoSinuMollweideRaw=Kt,t.geoSinusoidal=function(){return e.geoProjection(Q).scale(152.63)},t.geoSinusoidalRaw=Q,t.geoStitch=function(t){if(null==t)return t;switch(t.type){case\"Feature\":return wr(t);case\"FeatureCollection\":var e={type:\"FeatureCollection\",features:t.features.map(wr)};return null!=t.bbox&&(e.bbox=t.bbox),e;default:return Tr(t)}},t.geoTimes=function(){return e.geoProjection(kr).scale(146.153)},t.geoTimesRaw=kr,t.geoTwoPointAzimuthal=Sr,t.geoTwoPointAzimuthalRaw=Mr,t.geoTwoPointAzimuthalUsa=function(){return Sr([-158,21.5],[-77,39]).clipAngle(60).scale(400)},t.geoTwoPointEquidistant=Lr,t.geoTwoPointEquidistantRaw=Er,t.geoTwoPointEquidistantUsa=function(){return Lr([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},t.geoVanDerGrinten=function(){return e.geoProjection(Cr).scale(79.4183)},t.geoVanDerGrintenRaw=Cr,t.geoVanDerGrinten2=function(){return e.geoProjection(Pr).scale(79.4183)},t.geoVanDerGrinten2Raw=Pr,t.geoVanDerGrinten3=function(){return e.geoProjection(Ir).scale(79.4183)},t.geoVanDerGrinten3Raw=Ir,t.geoVanDerGrinten4=function(){return e.geoProjection(Or).scale(127.16)},t.geoVanDerGrinten4Raw=Or,t.geoWagner=Dr,t.geoWagner7=function(){return Dr().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},t.geoWagnerRaw=zr,t.geoWagner4=function(){return e.geoProjection(Br).scale(176.84)},t.geoWagner4Raw=Br,t.geoWagner6=function(){return e.geoProjection(Nr).scale(152.63)},t.geoWagner6Raw=Nr,t.geoWiechel=function(){return e.geoProjection(jr).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},t.geoWiechelRaw=jr,t.geoWinkel3=function(){return e.geoProjection(Ur).scale(158.837)},t.geoWinkel3Raw=Ur,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{\"d3-array\":107,\"d3-geo\":114}],114:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-array\")):i((n=n||self).d3=n.d3||{},n.d3)}(this,(function(t,e){\"use strict\";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(t){a(i,t,this.t),a(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new n;function a(t,e,r){var n=t.s=e+r,i=n-e,a=n-i;t.t=e-a+(r-i)}var o=1e-6,s=Math.PI,l=s/2,c=s/4,u=2*s,f=180/s,h=s/180,p=Math.abs,d=Math.atan,g=Math.atan2,m=Math.cos,v=Math.ceil,y=Math.exp,x=Math.log,b=Math.pow,_=Math.sin,w=Math.sign||function(t){return t>0?1:t<0?-1:0},T=Math.sqrt,k=Math.tan;function A(t){return t>1?0:t<-1?s:Math.acos(t)}function M(t){return t>1?l:t<-1?-l:Math.asin(t)}function S(t){return(t=_(t/2))*t}function E(){}function L(t,e){t&&P.hasOwnProperty(t.type)&&P[t.type](t,e)}var C={Feature:function(t,e){L(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n=0?1:-1,i=n*r,a=m(e=(e*=h)/2+c),o=_(e),s=N*o,l=B*a+s*m(i),u=s*n*_(i);j.add(g(u,l)),F=t,B=a,N=o}function W(t){return[g(t[1],t[0]),M(t[2])]}function X(t){var e=t[0],r=t[1],n=m(r);return[n*m(e),n*_(e),_(r)]}function Z(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function J(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 K(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Q(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function $(t){var e=T(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var tt,et,rt,nt,it,at,ot,st,lt,ct,ut,ft,ht,pt,dt,gt,mt,vt,yt,xt,bt,_t,wt,Tt,kt,At,Mt=r(),St={point:Et,lineStart:Ct,lineEnd:Pt,polygonStart:function(){St.point=It,St.lineStart=Ot,St.lineEnd=zt,Mt.reset(),V.polygonStart()},polygonEnd:function(){V.polygonEnd(),St.point=Et,St.lineStart=Ct,St.lineEnd=Pt,j<0?(tt=-(rt=180),et=-(nt=90)):Mt>o?nt=90:Mt<-o&&(et=-90),ct[0]=tt,ct[1]=rt},sphere:function(){tt=-(rt=180),et=-(nt=90)}};function Et(t,e){lt.push(ct=[tt=t,rt=t]),ent&&(nt=e)}function Lt(t,e){var r=X([t*h,e*h]);if(st){var n=J(st,r),i=J([n[1],-n[0],0],n);$(i),i=W(i);var a,o=t-it,s=o>0?1:-1,l=i[0]*f*s,c=p(o)>180;c^(s*itnt&&(nt=a):c^(s*it<(l=(l+360)%360-180)&&lnt&&(nt=e)),c?tDt(tt,rt)&&(rt=t):Dt(t,rt)>Dt(tt,rt)&&(tt=t):rt>=tt?(trt&&(rt=t)):t>it?Dt(tt,t)>Dt(tt,rt)&&(rt=t):Dt(t,rt)>Dt(tt,rt)&&(tt=t)}else lt.push(ct=[tt=t,rt=t]);ent&&(nt=e),st=r,it=t}function Ct(){St.point=Lt}function Pt(){ct[0]=tt,ct[1]=rt,St.point=Et,st=null}function It(t,e){if(st){var r=t-it;Mt.add(p(r)>180?r+(r>0?360:-360):r)}else at=t,ot=e;V.point(t,e),Lt(t,e)}function Ot(){V.lineStart()}function zt(){It(at,ot),V.lineEnd(),p(Mt)>o&&(tt=-(rt=180)),ct[0]=tt,ct[1]=rt,st=null}function Dt(t,e){return(e-=t)<0?e+360:e}function Rt(t,e){return t[0]-e[0]}function Ft(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:es?t+Math.round(-t/u)*u:t,e]}function Qt(t,e,r){return(t%=u)?e||r?Jt(te(t),ee(e,r)):te(t):e||r?ee(e,r):Kt}function $t(t){return function(e,r){return[(e+=t)>s?e-u:e<-s?e+u:e,r]}}function te(t){var e=$t(t);return e.invert=$t(-t),e}function ee(t,e){var r=m(t),n=_(t),i=m(e),a=_(e);function o(t,e){var o=m(e),s=m(t)*o,l=_(t)*o,c=_(e),u=c*r+s*n;return[g(l*i-u*a,s*r-c*n),M(u*i+l*a)]}return o.invert=function(t,e){var o=m(e),s=m(t)*o,l=_(t)*o,c=_(e),u=c*i-l*a;return[g(l*i+c*a,s*r+u*n),M(u*r-s*n)]},o}function re(t){function e(e){return(e=t(e[0]*h,e[1]*h))[0]*=f,e[1]*=f,e}return t=Qt(t[0]*h,t[1]*h,t.length>2?t[2]*h:0),e.invert=function(e){return(e=t.invert(e[0]*h,e[1]*h))[0]*=f,e[1]*=f,e},e}function ne(t,e,r,n,i,a){if(r){var o=m(e),s=_(e),l=n*r;null==i?(i=e+n*u,a=e-l/2):(i=ie(o,i),a=ie(o,a),(n>0?ia)&&(i+=n*u));for(var c,f=i;n>0?f>a:f1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}function oe(t,e){return p(t[0]-e[0])=0;--a)i.point((f=u[a])[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 ce(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n=0?1:-1,z=O*I,D=z>s,R=T*C;if(ue.add(g(R*O*_(z),k*P+R*m(z))),f+=D?I+O*u:I,D^b>=r^E>=r){var F=J(X(x),X(S));$(F);var B=J(a,F);$(B);var N=(D^I>=0?-1:1)*M(B[2]);(n>N||n===N&&(F[0]||F[1]))&&(h+=D^I>=0?1:-1)}}return(f<-o||f0){for(h||(a.polygonStart(),h=!0),a.lineStart(),t=0;t1&&2&i&&c.push(c.pop().concat(c.shift())),s.push(c.filter(de))}return p}}function de(t){return t.length>1}function ge(t,e){return((t=t.x)[0]<0?t[1]-l-o:l-t[1])-((e=e.x)[0]<0?e[1]-l-o:l-e[1])}var me=pe((function(){return!0}),(function(t){var e,r=NaN,n=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,c){var u=a>0?s:-s,f=p(a-r);p(f-s)0?l:-l),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(u,n),t.point(a,n),e=0):i!==u&&f>=s&&(p(r-i)o?d((_(e)*(a=m(n))*_(r)-_(n)*(i=m(e))*_(t))/(i*a*s)):(e+n)/2}(r,n,a,c),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(u,n),e=0),t.point(r=a,n=c),i=u},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}}),(function(t,e,r,n){var i;if(null==t)i=r*l,n.point(-s,i),n.point(0,i),n.point(s,i),n.point(s,0),n.point(s,-i),n.point(0,-i),n.point(-s,-i),n.point(-s,0),n.point(-s,i);else if(p(t[0]-e[0])>o){var a=t[0]0,i=p(e)>o;function a(t,r){return m(t)*m(r)>e}function l(t,r,n){var i=[1,0,0],a=J(X(t),X(r)),l=Z(a,a),c=a[0],u=l-c*c;if(!u)return!n&&t;var f=e*l/u,h=-e*c/u,d=J(i,a),g=Q(i,f);K(g,Q(a,h));var m=d,v=Z(g,m),y=Z(m,m),x=v*v-y*(Z(g,g)-1);if(!(x<0)){var b=T(x),_=Q(m,(-v-b)/y);if(K(_,g),_=W(_),!n)return _;var w,k=t[0],A=r[0],M=t[1],S=r[1];A0^_[1]<(p(_[0]-k)s^(k<=_[0]&&_[0]<=A)){var C=Q(m,(-v+b)/y);return K(C,g),[_,W(C)]}}}function c(e,r){var i=n?t:s-t,a=0;return e<-i?a|=1:e>i&&(a|=2),r<-i?a|=4:r>i&&(a|=8),a}return pe(a,(function(t){var e,r,o,u,f;return{lineStart:function(){u=o=!1,f=1},point:function(h,p){var d,g=[h,p],m=a(h,p),v=n?m?0:c(h,p):m?c(h+(h<0?s:-s),p):0;if(!e&&(u=o=m)&&t.lineStart(),m!==o&&(!(d=l(e,g))||oe(e,d)||oe(g,d))&&(g[2]=1),m!==o)f=0,m?(t.lineStart(),d=l(g,e),t.point(d[0],d[1])):(d=l(e,g),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&n^m){var y;v&r||!(y=l(g,e,!0))||(f=0,n?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!m||e&&oe(e,g)||t.point(g[0],g[1]),e=g,o=m,r=v},lineEnd:function(){o&&t.lineEnd(),e=null},clean:function(){return f|(u&&o)<<1}}}),(function(e,n,i,a){ne(a,t,r,i,e,n)}),n?[0,-t]:[-s,t-s])}function ye(t,r,n,i){function a(e,a){return t<=e&&e<=n&&r<=a&&a<=i}function s(e,a,o,s){var c=0,f=0;if(null==e||(c=l(e,o))!==(f=l(a,o))||u(e,a)<0^o>0)do{s.point(0===c||3===c?t:n,c>1?i:r)}while((c=(c+o+4)%4)!==f);else s.point(a[0],a[1])}function l(e,i){return p(e[0]-t)0?0:3:p(e[0]-n)0?2:1:p(e[1]-r)0?1:0:i>0?3:2}function c(t,e){return u(t.x,e.x)}function u(t,e){var r=l(t,1),n=l(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]}return function(o){var l,u,f,h,p,d,g,m,v,y,x,b=o,_=ae(),w={point:T,lineStart:function(){w.point=k,u&&u.push(f=[]);y=!0,v=!1,g=m=NaN},lineEnd:function(){l&&(k(h,p),d&&v&&_.rejoin(),l.push(_.result()));w.point=T,v&&b.lineEnd()},polygonStart:function(){b=_,l=[],u=[],x=!0},polygonEnd:function(){var r=function(){for(var e=0,r=0,n=u.length;ri&&(h-a)*(i-o)>(p-o)*(t-a)&&++e:p<=i&&(h-a)*(i-o)<(p-o)*(t-a)&&--e;return e}(),n=x&&r,a=(l=e.merge(l)).length;(n||a)&&(o.polygonStart(),n&&(o.lineStart(),s(null,null,1,o),o.lineEnd()),a&&le(l,c,r,s,o),o.polygonEnd());b=o,l=u=f=null}};function T(t,e){a(t,e)&&b.point(t,e)}function k(e,o){var s=a(e,o);if(u&&f.push([e,o]),y)h=e,p=o,d=s,y=!1,s&&(b.lineStart(),b.point(e,o));else if(s&&v)b.point(e,o);else{var l=[g=Math.max(-1e9,Math.min(1e9,g)),m=Math.max(-1e9,Math.min(1e9,m))],c=[e=Math.max(-1e9,Math.min(1e9,e)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,r,n,i,a){var o,s=t[0],l=t[1],c=0,u=1,f=e[0]-s,h=e[1]-l;if(o=r-s,f||!(o>0)){if(o/=f,f<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=i-s,f||!(o<0)){if(o/=f,f<0){if(o>u)return;o>c&&(c=o)}else if(f>0){if(o0)){if(o/=h,h<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=a-l,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>c&&(c=o)}else if(h>0){if(o0&&(t[0]=s+c*f,t[1]=l+c*h),u<1&&(e[0]=s+u*f,e[1]=l+u*h),!0}}}}}(l,c,t,r,n,i)?s&&(b.lineStart(),b.point(e,o),x=!1):(v||(b.lineStart(),b.point(l[0],l[1])),b.point(c[0],c[1]),s||b.lineEnd(),x=!1)}g=e,m=o,v=s}return w}}var xe,be,_e,we=r(),Te={sphere:E,point:E,lineStart:function(){Te.point=Ae,Te.lineEnd=ke},lineEnd:E,polygonStart:E,polygonEnd:E};function ke(){Te.point=Te.lineEnd=E}function Ae(t,e){xe=t*=h,be=_(e*=h),_e=m(e),Te.point=Me}function Me(t,e){t*=h;var r=_(e*=h),n=m(e),i=p(t-xe),a=m(i),o=n*_(i),s=_e*r-be*n*a,l=be*r+_e*n*a;we.add(g(T(o*o+s*s),l)),xe=t,be=r,_e=n}function Se(t){return we.reset(),z(t,Te),+we}var Ee=[null,null],Le={type:\"LineString\",coordinates:Ee};function Ce(t,e){return Ee[0]=t,Ee[1]=e,Se(Le)}var Pe={Feature:function(t,e){return Oe(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n0&&(i=Ce(t[a],t[a-1]))>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))<1e-12*i)return!0;r=n}return!1}function Re(t,e){return!!he(t.map(Fe),Be(e))}function Fe(t){return(t=t.map(Be)).pop(),t}function Be(t){return[t[0]*h,t[1]*h]}function Ne(t,r,n){var i=e.range(t,r-o,n).concat(r);return function(t){return i.map((function(e){return[t,e]}))}}function je(t,r,n){var i=e.range(t,r-o,n).concat(r);return function(t){return i.map((function(e){return[e,t]}))}}function Ue(){var t,r,n,i,a,s,l,c,u,f,h,d,g=10,m=g,y=90,x=360,b=2.5;function _(){return{type:\"MultiLineString\",coordinates:w()}}function w(){return e.range(v(i/y)*y,n,y).map(h).concat(e.range(v(c/x)*x,l,x).map(d)).concat(e.range(v(r/g)*g,t,g).filter((function(t){return p(t%y)>o})).map(u)).concat(e.range(v(s/m)*m,a,m).filter((function(t){return p(t%x)>o})).map(f))}return _.lines=function(){return w().map((function(t){return{type:\"LineString\",coordinates:t}}))},_.outline=function(){return{type:\"Polygon\",coordinates:[h(i).concat(d(l).slice(1),h(n).reverse().slice(1),d(c).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],c=+t[0][1],l=+t[1][1],i>n&&(t=i,i=n,n=t),c>l&&(t=c,c=l,l=t),_.precision(b)):[[i,c],[n,l]]},_.extentMinor=function(e){return arguments.length?(r=+e[0][0],t=+e[1][0],s=+e[0][1],a=+e[1][1],r>t&&(e=r,r=t,t=e),s>a&&(e=s,s=a,a=e),_.precision(b)):[[r,s],[t,a]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(y=+t[0],x=+t[1],_):[y,x]},_.stepMinor=function(t){return arguments.length?(g=+t[0],m=+t[1],_):[g,m]},_.precision=function(e){return arguments.length?(b=+e,u=Ne(s,a,90),f=je(r,t,b),h=Ne(c,l,90),d=je(i,n,b),_):b},_.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function Ve(t){return t}var He,qe,Ge,Ye,We=r(),Xe=r(),Ze={point:E,lineStart:E,lineEnd:E,polygonStart:function(){Ze.lineStart=Je,Ze.lineEnd=$e},polygonEnd:function(){Ze.lineStart=Ze.lineEnd=Ze.point=E,We.add(p(Xe)),Xe.reset()},result:function(){var t=We/2;return We.reset(),t}};function Je(){Ze.point=Ke}function Ke(t,e){Ze.point=Qe,He=Ge=t,qe=Ye=e}function Qe(t,e){Xe.add(Ye*t-Ge*e),Ge=t,Ye=e}function $e(){Qe(He,qe)}var tr=1/0,er=tr,rr=-tr,nr=rr,ir={point:function(t,e){trr&&(rr=t);enr&&(nr=e)},lineStart:E,lineEnd:E,polygonStart:E,polygonEnd:E,result:function(){var t=[[tr,er],[rr,nr]];return rr=nr=-(er=tr=1/0),t}};var ar,or,sr,lr,cr=0,ur=0,fr=0,hr=0,pr=0,dr=0,gr=0,mr=0,vr=0,yr={point:xr,lineStart:br,lineEnd:Tr,polygonStart:function(){yr.lineStart=kr,yr.lineEnd=Ar},polygonEnd:function(){yr.point=xr,yr.lineStart=br,yr.lineEnd=Tr},result:function(){var t=vr?[gr/vr,mr/vr]:dr?[hr/dr,pr/dr]:fr?[cr/fr,ur/fr]:[NaN,NaN];return cr=ur=fr=hr=pr=dr=gr=mr=vr=0,t}};function xr(t,e){cr+=t,ur+=e,++fr}function br(){yr.point=_r}function _r(t,e){yr.point=wr,xr(sr=t,lr=e)}function wr(t,e){var r=t-sr,n=e-lr,i=T(r*r+n*n);hr+=i*(sr+t)/2,pr+=i*(lr+e)/2,dr+=i,xr(sr=t,lr=e)}function Tr(){yr.point=xr}function kr(){yr.point=Mr}function Ar(){Sr(ar,or)}function Mr(t,e){yr.point=Sr,xr(ar=sr=t,or=lr=e)}function Sr(t,e){var r=t-sr,n=e-lr,i=T(r*r+n*n);hr+=i*(sr+t)/2,pr+=i*(lr+e)/2,dr+=i,gr+=(i=lr*t-sr*e)*(sr+t),mr+=i*(lr+e),vr+=3*i,xr(sr=t,lr=e)}function Er(t){this._context=t}Er.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,u)}},result:E};var Lr,Cr,Pr,Ir,Or,zr=r(),Dr={point:E,lineStart:function(){Dr.point=Rr},lineEnd:function(){Lr&&Fr(Cr,Pr),Dr.point=E},polygonStart:function(){Lr=!0},polygonEnd:function(){Lr=null},result:function(){var t=+zr;return zr.reset(),t}};function Rr(t,e){Dr.point=Fr,Cr=Ir=t,Pr=Or=e}function Fr(t,e){Ir-=t,Or-=e,zr.add(T(Ir*Ir+Or*Or)),Ir=t,Or=e}function Br(){this._string=[]}function Nr(t){return\"m0,\"+t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+-2*t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+2*t+\"z\"}function jr(t){return function(e){var r=new Ur;for(var n in t)r[n]=t[n];return r.stream=e,r}}function Ur(){}function Vr(t,e,r){var n=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=n&&t.clipExtent(null),z(r,t.stream(ir)),e(ir.result()),null!=n&&t.clipExtent(n),t}function Hr(t,e,r){return Vr(t,(function(r){var n=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(n/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),o=+e[0][0]+(n-a*(r[1][0]+r[0][0]))/2,s=+e[0][1]+(i-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([o,s])}),r)}function qr(t,e,r){return Hr(t,[[0,0],e],r)}function Gr(t,e,r){return Vr(t,(function(r){var n=+e,i=n/(r[1][0]-r[0][0]),a=(n-i*(r[1][0]+r[0][0]))/2,o=-i*r[0][1];t.scale(150*i).translate([a,o])}),r)}function Yr(t,e,r){return Vr(t,(function(r){var n=+e,i=n/(r[1][1]-r[0][1]),a=-i*r[0][0],o=(n-i*(r[1][1]+r[0][1]))/2;t.scale(150*i).translate([a,o])}),r)}Br.prototype={_radius:4.5,_circle:Nr(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push(\"Z\"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push(\"M\",t,\",\",e),this._point=1;break;case 1:this._string.push(\"L\",t,\",\",e);break;default:null==this._circle&&(this._circle=Nr(this._radius)),this._string.push(\"M\",t,\",\",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join(\"\");return this._string=[],t}return null}},Ur.prototype={constructor:Ur,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()}};var Wr=m(30*h);function Xr(t,e){return+e?function(t,e){function r(n,i,a,s,l,c,u,f,h,d,m,v,y,x){var b=u-n,_=f-i,w=b*b+_*_;if(w>4*e&&y--){var k=s+d,A=l+m,S=c+v,E=T(k*k+A*A+S*S),L=M(S/=E),C=p(p(S)-1)e||p((b*z+_*D)/w-.5)>.3||s*d+l*m+c*v2?t[2]%360*h:0,I()):[y*f,x*f,b*f]},C.angle=function(t){return arguments.length?(_=t%360*h,I()):_*f},C.reflectX=function(t){return arguments.length?(w=t?-1:1,I()):w<0},C.reflectY=function(t){return arguments.length?(k=t?-1:1,I()):k<0},C.precision=function(t){return arguments.length?(o=Xr(s,L=t*t),O()):T(L)},C.fitExtent=function(t,e){return Hr(C,t,e)},C.fitSize=function(t,e){return qr(C,t,e)},C.fitWidth=function(t,e){return Gr(C,t,e)},C.fitHeight=function(t,e){return Yr(C,t,e)},function(){return e=t.apply(this,arguments),C.invert=e.invert&&P,I()}}function tn(t){var e=0,r=s/3,n=$r(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*h,r=t[1]*h):[e*f,r*f]},i}function en(t,e){var r=_(t),n=(r+_(e))/2;if(p(n)0?e<-l+o&&(e=-l+o):e>l-o&&(e=l-o);var r=i/b(fn(e),n);return[r*_(n*t),i-r*m(n*t)]}return a.invert=function(t,e){var r=i-e,a=w(n)*T(t*t+r*r),o=g(t,p(r))*w(r);return r*n<0&&(o-=s*w(t)*w(r)),[o/n,2*d(b(i/a,1/n))-l]},a}function pn(t,e){return[t,e]}function dn(t,e){var r=m(t),n=t===e?_(t):(r-m(e))/(e-t),i=r/n+t;if(p(n)o&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},Tn.invert=on(M),kn.invert=on((function(t){return 2*d(t)})),An.invert=function(t,e){return[-e,2*d(y(t))-l]},t.geoAlbers=nn,t.geoAlbersUsa=function(){var t,e,r,n,i,a,s=nn(),l=rn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=rn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){a=[t,e]}};function f(t){var e=t[0],o=t[1];return a=null,r.point(e,o),a||(n.point(e,o),a)||(i.point(e,o),a)}function h(){return t=e=null,f}return f.invert=function(t){var e=s.scale(),r=s.translate(),n=(t[0]-r[0])/e,i=(t[1]-r[1])/e;return(i>=.12&&i<.234&&n>=-.425&&n<-.214?l:i>=.166&&i<.234&&n>=-.214&&n<-.115?c:s).invert(t)},f.stream=function(r){return t&&e===r?t:(n=[s.stream(e=r),l.stream(r),c.stream(r)],i=n.length,t={point:function(t,e){for(var r=-1;++rDt(n[0],n[1])&&(n[1]=i[1]),Dt(i[0],n[1])>Dt(n[0],n[1])&&(n[0]=i[0])):a.push(n=i);for(o=-1/0,e=0,n=a[r=a.length-1];e<=r;n=i,++e)i=a[e],(s=Dt(n[1],i[0]))>o&&(o=s,tt=i[0],rt=n[1])}return lt=ct=null,tt===1/0||et===1/0?[[NaN,NaN],[NaN,NaN]]:[[tt,et],[rt,nt]]},t.geoCentroid=function(t){ut=ft=ht=pt=dt=gt=mt=vt=yt=xt=bt=0,z(t,Bt);var e=yt,r=xt,n=bt,i=e*e+r*r+n*n;return i<1e-12&&(e=gt,r=mt,n=vt,ft2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90]).scale(159.155)},t.geoTransverseMercatorRaw=An,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{\"d3-array\":107}],115:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){\"use strict\";function e(t,e){return t.parent===e.parent?1:2}function r(t,e){return t+e.x}function n(t,e){return Math.max(t,e.y)}function i(t){var e=0,r=t.children,n=r&&r.length;if(n)for(;--n>=0;)e+=r[n].value;else e=1;t.value=e}function a(t,e){var r,n,i,a,s,u=new c(t),f=+t.value&&(u.value=t.value),h=[u];for(null==e&&(e=o);r=h.pop();)if(f&&(r.value=+r.data.value),(i=e(r.data))&&(s=i.length))for(r.children=new Array(s),a=s-1;a>=0;--a)h.push(n=r.children[a]=new c(i[a])),n.parent=r,n.depth=r.depth+1;return u.eachBefore(l)}function o(t){return t.children}function s(t){t.data=t.data.data}function l(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function c(t){this.data=t,this.depth=this.height=0,this.parent=null}c.prototype=a.prototype={constructor:c,count:function(){return this.eachAfter(i)},each:function(t){var e,r,n,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),r=a.children)for(n=0,i=r.length;n=0;--r)i.push(e[r]);return this},sum:function(t){return this.eachAfter((function(e){for(var r=+t(e.data)||0,n=e.children,i=n&&n.length;--i>=0;)r+=n[i].value;e.value=r}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),i=null;t=r.pop(),e=n.pop();for(;t===e;)i=t,t=r.pop(),e=n.pop();return i}(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var i=n.length;t!==r;)n.splice(i,0,t),t=t.parent;return n},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(r){r!==t&&e.push({source:r.parent,target:r})})),e},copy:function(){return a(this).eachBefore(s)}};var u=Array.prototype.slice;function f(t){for(var e,r,n=0,i=(t=function(t){for(var e,r,n=t.length;n;)r=Math.random()*n--|0,e=t[n],t[n]=t[r],t[r]=e;return t}(u.call(t))).length,a=[];n0&&r*r>n*n+i*i}function g(t,e){for(var r=0;r(o*=o)?(n=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-n*n)),r.x=t.x-n*s-a*l,r.y=t.y-n*l+a*s):(n=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-n*n)),r.x=e.x+n*s-a*l,r.y=e.y+n*l+a*s)):(r.x=e.x+r.r,r.y=e.y)}function b(t,e){var r=t.r+e.r-1e-6,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function _(t){var e=t._,r=t.next._,n=e.r+r.r,i=(e.x*r.r+r.x*e.r)/n,a=(e.y*r.r+r.y*e.r)/n;return i*i+a*a}function w(t){this._=t,this.next=null,this.previous=null}function T(t){if(!(i=t.length))return 0;var e,r,n,i,a,o,s,l,c,u,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(r=t[1],e.x=-r.r,r.x=e.r,r.y=0,!(i>2))return e.r+r.r;x(r,e,n=t[2]),e=new w(e),r=new w(r),n=new w(n),e.next=n.previous=r,r.next=e.previous=n,n.next=r.previous=e;t:for(s=3;sh&&(h=s),m=u*u*g,(p=Math.max(h/m,m/f))>d){u-=s;break}d=p}v.push(o={value:u,dice:l1?e:1)},r}(G);var X=function t(e){function r(t,r,n,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,l,c,u,f=-1,h=o.length,p=t.value;++f1?e:1)},r}(G);t.cluster=function(){var t=e,i=1,a=1,o=!1;function s(e){var s,l=0;e.eachAfter((function(e){var i=e.children;i?(e.x=function(t){return t.reduce(r,0)/t.length}(i),e.y=function(t){return 1+t.reduce(n,0)}(i)):(e.x=s?l+=t(e,s):0,e.y=0,s=e)}));var c=function(t){for(var e;e=t.children;)t=e[0];return t}(e),u=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),f=c.x-t(c,u)/2,h=u.x+t(u,c)/2;return e.eachAfter(o?function(t){t.x=(t.x-e.x)*i,t.y=(e.y-t.y)*a}:function(t){t.x=(t.x-f)/(h-f)*i,t.y=(1-(e.y?t.y/e.y:1))*a})}return s.separation=function(e){return arguments.length?(t=e,s):t},s.size=function(t){return arguments.length?(o=!1,i=+t[0],a=+t[1],s):o?null:[i,a]},s.nodeSize=function(t){return arguments.length?(o=!0,i=+t[0],a=+t[1],s):o?[i,a]:null},s},t.hierarchy=a,t.pack=function(){var t=null,e=1,r=1,n=M;function i(i){return i.x=e/2,i.y=r/2,t?i.eachBefore(L(t)).eachAfter(C(n,.5)).eachBefore(P(1)):i.eachBefore(L(E)).eachAfter(C(M,1)).eachAfter(C(n,i.r/Math.min(e,r))).eachBefore(P(Math.min(e,r)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=k(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],r=+t[1],i):[e,r]},i.padding=function(t){return arguments.length?(n=\"function\"==typeof t?t:S(+t),i):n},i},t.packEnclose=f,t.packSiblings=function(t){return T(t),t},t.partition=function(){var t=1,e=1,r=0,n=!1;function i(i){var a=i.height+1;return i.x0=i.y0=r,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(n){n.children&&O(n,n.x0,t*(n.depth+1)/e,n.x1,t*(n.depth+2)/e);var i=n.x0,a=n.y0,o=n.x1-r,s=n.y1-r;o0)throw new Error(\"cycle\");return a}return r.id=function(e){return arguments.length?(t=A(e),r):t},r.parentId=function(t){return arguments.length?(e=A(t),r):e},r},t.tree=function(){var t=B,e=1,r=1,n=null;function i(i){var l=function(t){for(var e,r,n,i,a,o=new H(t,0),s=[o];e=s.pop();)if(n=e._.children)for(e.children=new Array(a=n.length),i=a-1;i>=0;--i)s.push(r=e.children[i]=new H(n[i],i)),r.parent=e;return(o.parent=new H(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),n)i.eachBefore(s);else{var c=i,u=i,f=i;i.eachBefore((function(t){t.xu.x&&(u=t),t.depth>f.depth&&(f=t)}));var h=c===u?1:t(c,u)/2,p=h-c.x,d=e/(u.x+h+p),g=r/(f.depth||1);i.eachBefore((function(t){t.x=(t.x+p)*d,t.y=t.depth*g}))}return i}function a(e){var r=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(r){!function(t){for(var e,r=0,n=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(e);var a=(r[0].z+r[r.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,r,n){if(r){for(var i,a=e,o=e,s=r,l=a.parent.children[0],c=a.m,u=o.m,f=s.m,h=l.m;s=j(s),a=N(a),s&&a;)l=N(l),(o=j(o)).a=e,(i=s.z+f-a.z-c+t(s._,a._))>0&&(U(V(s,e,n),e,i),c+=i,u+=i),f+=s.m,c+=a.m,h+=l.m,u+=o.m;s&&!j(o)&&(o.t=s,o.m+=f-u),a&&!N(l)&&(l.t=a,l.m+=c-h,n=e)}return n}(e,i,e.parent.A||n[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*r}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(n=!1,e=+t[0],r=+t[1],i):n?null:[e,r]},i.nodeSize=function(t){return arguments.length?(n=!0,e=+t[0],r=+t[1],i):n?[e,r]:null},i},t.treemap=function(){var t=W,e=!1,r=1,n=1,i=[0],a=M,o=M,s=M,l=M,c=M;function u(t){return t.x0=t.y0=0,t.x1=r,t.y1=n,t.eachBefore(f),i=[0],e&&t.eachBefore(I),t}function f(e){var r=i[e.depth],n=e.x0+r,u=e.y0+r,f=e.x1-r,h=e.y1-r;f=r-1){var u=s[e];return u.x0=i,u.y0=a,u.x1=o,void(u.y1=l)}var f=c[e],h=n/2+f,p=e+1,d=r-1;for(;p>>1;c[g]l-a){var y=(i*v+o*m)/n;t(e,p,m,i,a,y,l),t(p,r,v,y,a,o,l)}else{var x=(a*v+l*m)/n;t(e,p,m,i,a,o,x),t(p,r,v,i,x,o,l)}}(0,l,t.value,e,r,n,i)},t.treemapDice=O,t.treemapResquarify=X,t.treemapSlice=q,t.treemapSliceDice=function(t,e,r,n,i){(1&t.depth?q:O)(t,e,r,n,i)},t.treemapSquarify=W,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],116:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-color\")):i((n=n||self).d3=n.d3||{},n.d3)}(this,(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=i180||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;na&&(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:y(r,n)})),a=_.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+\"rotate(\",null,n)-2,x:y(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:y(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:y(t,r)},{i:s-2,x:y(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;++r1e-6)if(Math.abs(f*l-c*u)>1e-6&&a){var p=n-o,d=i-s,g=l*l+c*c,m=p*p+d*d,v=Math.sqrt(g),y=Math.sqrt(h),x=a*Math.tan((e-Math.acos((g+h-m)/(2*v*y)))/2),b=x/y,_=x/v;Math.abs(b-1)>1e-6&&(this._+=\"L\"+(t+b*u)+\",\"+(r+b*f)),this._+=\"A\"+a+\",\"+a+\",0,0,\"+ +(f*p>u*d)+\",\"+(this._x1=t+_*l)+\",\"+(this._y1=r+_*c)}else this._+=\"L\"+(this._x1=t)+\",\"+(this._y1=r);else;},arc:function(t,i,a,o,s,l){t=+t,i=+i,l=!!l;var c=(a=+a)*Math.cos(o),u=a*Math.sin(o),f=t+c,h=i+u,p=1^l,d=l?o-s:s-o;if(a<0)throw new Error(\"negative radius: \"+a);null===this._x1?this._+=\"M\"+f+\",\"+h:(Math.abs(this._x1-f)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+=\"L\"+f+\",\"+h),a&&(d<0&&(d=d%r+r),d>n?this._+=\"A\"+a+\",\"+a+\",0,1,\"+p+\",\"+(t-c)+\",\"+(i-u)+\"A\"+a+\",\"+a+\",0,1,\"+p+\",\"+(this._x1=f)+\",\"+(this._y1=h):d>1e-6&&(this._+=\"A\"+a+\",\"+a+\",0,\"+ +(d>=e)+\",\"+p+\",\"+(this._x1=t+a*Math.cos(s))+\",\"+(this._y1=i+a*Math.sin(s))))},rect:function(t,e,r,n){this._+=\"M\"+(this._x0=this._x1=+t)+\",\"+(this._y0=this._y1=+e)+\"h\"+ +r+\"v\"+ +n+\"h\"+-r+\"Z\"},toString:function(){return this._}},t.path=a,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],118:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(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,m=t._y0,v=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(a=(g+v)/2))?g=a:v=a,(u=r>=(o=(m+y)/2))?m=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+v)/2))?g=a:v=a,(u=r>=(o=(m+y)/2))?m=o:y=o}while((f=u<<1|c)==(h=(l>=o)<<1|s>=a));return i[h]=p,i[f]=d,t}function r(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;nf&&(f=i),ah&&(h=a));if(c>f||u>h)return this;for(this.cover(c,u).cover(f,h),n=0;nt||t>=i||n>e||e>=a;)switch(s=(ep||(o=c.y0)>d||(s=c.x1)=y)<<1|t>=v)&&(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,m.data),b=e-+this._y.call(null,m.data),_=x*x+b*b;if(_=(s=(d+m)/2))?d=s:m=s,(u=o>=(l=(g+v)/2))?g=l:v=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;e1?0:t<-1?u:Math.acos(t)}function d(t){return t>=1?f:t<=-1?-f:Math.asin(t)}function g(t){return t.innerRadius}function m(t){return t.outerRadius}function v(t){return t.startAngle}function y(t){return t.endAngle}function x(t){return t&&t.padAngle}function b(t,e,r,n,i,a,o,s){var l=r-t,c=n-e,u=o-i,f=s-a,h=f*l-u*c;if(!(h*h<1e-12))return[t+(h=(u*(e-a)-f*(t-i))/h)*l,e+h*c]}function _(t,e,r,n,i,a,s){var l=t-r,u=e-n,f=(s?a:-a)/c(l*l+u*u),h=f*u,p=-f*l,d=t+h,g=e+p,m=r+h,v=n+p,y=(d+m)/2,x=(g+v)/2,b=m-d,_=v-g,w=b*b+_*_,T=i-a,k=d*v-m*g,A=(_<0?-1:1)*c(o(0,T*T*w-k*k)),M=(k*_-b*A)/w,S=(-k*b-_*A)/w,E=(k*_+b*A)/w,L=(-k*b+_*A)/w,C=M-y,P=S-x,I=E-y,O=L-x;return C*C+P*P>I*I+O*O&&(M=E,S=L),{cx:M,cy:S,x01:-h,y01:-p,x11:M*(i/T-1),y11:S*(i/T-1)}}function w(t){this._context=t}function T(t){return new w(t)}function k(t){return t[0]}function A(t){return t[1]}function M(){var t=k,n=A,i=r(!0),a=null,o=T,s=null;function l(r){var l,c,u,f=r.length,h=!1;for(null==a&&(s=o(u=e.path())),l=0;l<=f;++l)!(l=f;--h)c.point(v[h],y[h]);c.lineEnd(),c.areaEnd()}m&&(v[u]=+t(p,u,r),y[u]=+i(p,u,r),c.point(n?+n(p,u,r):v[u],a?+a(p,u,r):y[u]))}if(d)return c=null,d+\"\"||null}function f(){return M().defined(o).curve(l).context(s)}return u.x=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),n=null,u):t},u.x0=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),u):t},u.x1=function(t){return arguments.length?(n=null==t?null:\"function\"==typeof t?t:r(+t),u):n},u.y=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),a=null,u):i},u.y0=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),u):i},u.y1=function(t){return arguments.length?(a=null==t?null:\"function\"==typeof t?t:r(+t),u):a},u.lineX0=u.lineY0=function(){return f().x(t).y(i)},u.lineY1=function(){return f().x(t).y(a)},u.lineX1=function(){return f().x(n).y(i)},u.defined=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(!!t),u):o},u.curve=function(t){return arguments.length?(l=t,null!=s&&(c=l(s)),u):l},u.context=function(t){return arguments.length?(null==t?s=c=null:c=l(s=t),u):s},u}function E(t,e){return et?1:e>=t?0:NaN}function L(t){return t}w.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var C=I(T);function P(t){this._curve=t}function I(t){function e(e){return new P(t(e))}return e._curve=t,e}function O(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(I(t)):e()._curve},t}function z(){return O(M().curve(C))}function D(){var t=S().curve(C),e=t.curve,r=t.lineX0,n=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return O(r())},delete t.lineX0,t.lineEndAngle=function(){return O(n())},delete t.lineX1,t.lineInnerRadius=function(){return O(i())},delete t.lineY0,t.lineOuterRadius=function(){return O(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(I(t)):e()._curve},t}function R(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var F=Array.prototype.slice;function B(t){return t.source}function N(t){return t.target}function j(t){var n=B,i=N,a=k,o=A,s=null;function l(){var r,l=F.call(arguments),c=n.apply(this,l),u=i.apply(this,l);if(s||(s=r=e.path()),t(s,+a.apply(this,(l[0]=c,l)),+o.apply(this,l),+a.apply(this,(l[0]=u,l)),+o.apply(this,l)),r)return s=null,r+\"\"||null}return l.source=function(t){return arguments.length?(n=t,l):n},l.target=function(t){return arguments.length?(i=t,l):i},l.x=function(t){return arguments.length?(a=\"function\"==typeof t?t:r(+t),l):a},l.y=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(+t),l):o},l.context=function(t){return arguments.length?(s=null==t?null:t,l):s},l}function U(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function V(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e,r=(r+i)/2,n,r,n,i)}function H(t,e,r,n,i){var a=R(e,r),o=R(e,r=(r+i)/2),s=R(n,r),l=R(n,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],l[0],l[1])}var q={draw:function(t,e){var r=Math.sqrt(e/u);t.moveTo(r,0),t.arc(0,0,r,0,h)}},G={draw:function(t,e){var r=Math.sqrt(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Y=Math.sqrt(1/3),W=2*Y,X={draw:function(t,e){var r=Math.sqrt(e/W),n=r*Y;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},Z=Math.sin(u/10)/Math.sin(7*u/10),J=Math.sin(h/10)*Z,K=-Math.cos(h/10)*Z,Q={draw:function(t,e){var r=Math.sqrt(.8908130915292852*e),n=J*r,i=K*r;t.moveTo(0,-r),t.lineTo(n,i);for(var a=1;a<5;++a){var o=h*a/5,s=Math.cos(o),l=Math.sin(o);t.lineTo(l*r,-s*r),t.lineTo(s*n-l*i,l*n+s*i)}t.closePath()}},$={draw:function(t,e){var r=Math.sqrt(e),n=-r/2;t.rect(n,n,r,r)}},tt=Math.sqrt(3),et={draw:function(t,e){var r=-Math.sqrt(e/(3*tt));t.moveTo(0,2*r),t.lineTo(-tt*r,-r),t.lineTo(tt*r,-r),t.closePath()}},rt=-.5,nt=Math.sqrt(3)/2,it=1/Math.sqrt(12),at=3*(it/2+1),ot={draw:function(t,e){var r=Math.sqrt(e/at),n=r/2,i=r*it,a=n,o=r*it+r,s=-a,l=o;t.moveTo(n,i),t.lineTo(a,o),t.lineTo(s,l),t.lineTo(rt*n-nt*i,nt*n+rt*i),t.lineTo(rt*a-nt*o,nt*a+rt*o),t.lineTo(rt*s-nt*l,nt*s+rt*l),t.lineTo(rt*n+nt*i,rt*i-nt*n),t.lineTo(rt*a+nt*o,rt*o-nt*a),t.lineTo(rt*s+nt*l,rt*l-nt*s),t.closePath()}},st=[q,G,X,$,Q,et,ot];function lt(){}function ct(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function ut(t){this._context=t}function ft(t){this._context=t}function ht(t){this._context=t}function pt(t,e){this._basis=new ut(t),this._beta=e}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ct(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ft.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ht.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},pt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n,i=t[0],a=e[0],o=t[r]-i,s=e[r]-a,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+n*o),this._beta*e[l]+(1-this._beta)*(a+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var dt=function t(e){function r(t){return 1===e?new ut(t):new pt(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function gt(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function mt(t,e){this._context=t,this._k=(1-e)/6}mt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:gt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var vt=function t(e){function r(t){return new mt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function yt(t,e){this._context=t,this._k=(1-e)/6}yt.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var xt=function t(e){function r(t){return new yt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function bt(t,e){this._context=t,this._k=(1-e)/6}bt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var _t=function t(e){function r(t){return new bt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function wt(t,e,r){var n=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>1e-12){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*c+t._y1*t._l23_2a-r*t._l12_2a)/u}t._context.bezierCurveTo(n,i,a,o,t._x2,t._y2)}function Tt(t,e){this._context=t,this._alpha=e}Tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var kt=function t(e){function r(t){return e?new Tt(t,e):new mt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function At(t,e){this._context=t,this._alpha=e}At.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Mt=function t(e){function r(t){return e?new At(t,e):new yt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function St(t,e){this._context=t,this._alpha=e}St.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Et=function t(e){function r(t){return e?new St(t,e):new bt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Lt(t){this._context=t}function Ct(t){return t<0?-1:1}function Pt(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),o=(r-t._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Ct(a)+Ct(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function It(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Ot(t,e,r){var n=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-n)/3;t._context.bezierCurveTo(n+s,i+s*e,a-s,o-s*r,a,o)}function zt(t){this._context=t}function Dt(t){this._context=new Rt(t)}function Rt(t){this._context=t}function Ft(t){this._context=t}function Bt(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[n-1]=(t[n]+i[n-1])/2,e=0;e1)for(var r,n,i,a=1,o=t[e[0]],s=o.length;a=0;)r[e]=e;return r}function Vt(t,e){return t[e]}function Ht(t){var e=t.map(qt);return Ut(t).sort((function(t,r){return e[t]-e[r]}))}function qt(t){for(var e,r=-1,n=0,i=t.length,a=-1/0;++ra&&(a=e,n=r);return n}function Gt(t){var e=t.map(Yt);return Ut(t).sort((function(t,r){return e[t]-e[r]}))}function Yt(t){for(var e,r=0,n=-1,i=t.length;++n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},t.arc=function(){var t=g,o=m,w=r(0),T=null,k=v,A=y,M=x,S=null;function E(){var r,g,m=+t.apply(this,arguments),v=+o.apply(this,arguments),y=k.apply(this,arguments)-f,x=A.apply(this,arguments)-f,E=n(x-y),L=x>y;if(S||(S=r=e.path()),v1e-12)if(E>h-1e-12)S.moveTo(v*a(y),v*l(y)),S.arc(0,0,v,y,x,!L),m>1e-12&&(S.moveTo(m*a(x),m*l(x)),S.arc(0,0,m,x,y,L));else{var C,P,I=y,O=x,z=y,D=x,R=E,F=E,B=M.apply(this,arguments)/2,N=B>1e-12&&(T?+T.apply(this,arguments):c(m*m+v*v)),j=s(n(v-m)/2,+w.apply(this,arguments)),U=j,V=j;if(N>1e-12){var H=d(N/m*l(B)),q=d(N/v*l(B));(R-=2*H)>1e-12?(z+=H*=L?1:-1,D-=H):(R=0,z=D=(y+x)/2),(F-=2*q)>1e-12?(I+=q*=L?1:-1,O-=q):(F=0,I=O=(y+x)/2)}var G=v*a(I),Y=v*l(I),W=m*a(D),X=m*l(D);if(j>1e-12){var Z,J=v*a(O),K=v*l(O),Q=m*a(z),$=m*l(z);if(E1e-12?V>1e-12?(C=_(Q,$,G,Y,v,V,L),P=_(J,K,W,X,v,V,L),S.moveTo(C.cx+C.x01,C.cy+C.y01),V1e-12&&R>1e-12?U>1e-12?(C=_(W,X,J,K,m,-U,L),P=_(G,Y,Q,$,m,-U,L),S.lineTo(C.cx+C.x01,C.cy+C.y01),U0&&(d+=f);for(null!=e?g.sort((function(t,r){return e(m[t],m[r])})):null!=n&&g.sort((function(t,e){return n(r[t],r[e])})),s=0,c=d?(y-p*b)/d:0;s0?f*c:0)+b,m[l]={data:r[l],index:s,value:f,startAngle:v,endAngle:u,padAngle:x};return m}return s.value=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),s):i},s.endAngle=function(t){return arguments.length?(a=\"function\"==typeof t?t:r(+t),s):a},s.padAngle=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(+t),s):o},s},t.pointRadial=R,t.radialArea=D,t.radialLine=z,t.stack=function(){var t=r([]),e=Ut,n=jt,i=Vt;function a(r){var a,o,s=t.apply(this,arguments),l=r.length,c=s.length,u=new Array(c);for(a=0;a0)for(var r,n,i,a,o,s,l=0,c=t[e[0]].length;l0?(n[0]=a,n[1]=a+=i):i<0?(n[1]=o,n[0]=o+=i):(n[0]=0,n[1]=i)},t.stackOffsetExpand=function(t,e){if((n=t.length)>0){for(var r,n,i,a=0,o=t[0].length;a0){for(var r,n=0,i=t[e[0]],a=i.length;n0&&(n=(r=t[e[0]]).length)>0){for(var r,n,i,a=0,o=1;o=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:mt,s:vt,S:H,u:q,U:G,V:Y,w:W,W:X,x:null,X:null,y:Z,Y:J,Z:K,\"%\":gt},Ct={a:function(t){return f[t.getUTCDay()]},A:function(t){return u[t.getUTCDay()]},b:function(t){return yt[t.getUTCMonth()]},B:function(t){return h[t.getUTCMonth()]},c:null,d:Q,e:Q,f:nt,H:$,I:tt,j:et,L:rt,m:it,M:at,p:function(t){return c[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:mt,s:vt,S:ot,u:st,U:lt,V:ct,w:ut,W:ft,x:null,X:null,y:ht,Y:pt,Z:dt,\"%\":gt},Pt={a:function(t,e,r){var n=Tt.exec(e.slice(r));return n?(t.w=kt[n[0].toLowerCase()],r+n[0].length):-1},A:function(t,e,r){var n=_t.exec(e.slice(r));return n?(t.w=wt[n[0].toLowerCase()],r+n[0].length):-1},b:function(t,e,r){var n=St.exec(e.slice(r));return n?(t.m=Et[n[0].toLowerCase()],r+n[0].length):-1},B:function(t,e,r){var n=At.exec(e.slice(r));return n?(t.m=Mt[n[0].toLowerCase()],r+n[0].length):-1},c:function(t,e,r){return zt(t,a,e,r)},d:A,e:A,f:P,H:S,I:S,j:M,L:C,m:k,M:E,p:function(t,e,r){var n=xt.exec(e.slice(r));return n?(t.p=bt[n[0].toLowerCase()],r+n[0].length):-1},q:T,Q:O,s:z,S:L,u:m,U:v,V:y,w:g,W:x,x:function(t,e,r){return zt(t,o,e,r)},X:function(t,e,r){return zt(t,l,e,r)},y:_,Y:b,Z:w,\"%\":I};function It(t,e){return function(r){var n,i,a,o=[],l=-1,c=0,u=t.length;for(r instanceof Date||(r=new Date(+r));++l53)return null;\"w\"in c||(c.w=1),\"Z\"in c?(l=(s=n(i(c.y,0,1))).getUTCDay(),s=l>4||0===l?e.utcMonday.ceil(s):e.utcMonday(s),s=e.utcDay.offset(s,7*(c.V-1)),c.y=s.getUTCFullYear(),c.m=s.getUTCMonth(),c.d=s.getUTCDate()+(c.w+6)%7):(l=(s=r(i(c.y,0,1))).getDay(),s=l>4||0===l?e.timeMonday.ceil(s):e.timeMonday(s),s=e.timeDay.offset(s,7*(c.V-1)),c.y=s.getFullYear(),c.m=s.getMonth(),c.d=s.getDate()+(c.w+6)%7)}else(\"W\"in c||\"U\"in c)&&(\"w\"in c||(c.w=\"u\"in c?c.u%7:\"W\"in c?1:0),l=\"Z\"in c?n(i(c.y,0,1)).getUTCDay():r(i(c.y,0,1)).getDay(),c.m=0,c.d=\"W\"in c?(c.w+6)%7+7*c.W-(l+5)%7:c.w+7*c.U-(l+6)%7);return\"Z\"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,n(c)):r(c)}}function zt(t,e,r,n){for(var i,a,o=0,l=e.length,c=r.length;o=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=Pt[i in s?e.charAt(o++):i])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return Lt.x=It(o,Lt),Lt.X=It(l,Lt),Lt.c=It(a,Lt),Ct.x=It(o,Ct),Ct.X=It(l,Ct),Ct.c=It(a,Ct),{format:function(t){var e=It(t+=\"\",Lt);return e.toString=function(){return t},e},parse:function(t){var e=Ot(t+=\"\",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=It(t+=\"\",Ct);return e.toString=function(){return t},e},utcParse:function(t){var e=Ot(t+=\"\",!0);return e.toString=function(){return t},e}}}var o,s={\"-\":\"\",_:\" \",0:\"0\"},l=/^\\s*\\d+/,c=/^%/,u=/[\\\\^$*+?|[\\]().{}]/g;function f(t,e,r){var n=t<0?\"-\":\"\",i=(n?-t:t)+\"\",a=i.length;return n+(a68?1900:2e3),r+n[0].length):-1}function w(t,e,r){var n=/^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||\"00\")),r+n[0].length):-1}function T(t,e,r){var n=l.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function k(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function A(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function M(t,e,r){var n=l.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function S(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function E(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function L(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function C(t,e,r){var n=l.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function P(t,e,r){var n=l.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function I(t,e,r){var n=c.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function O(t,e,r){var n=l.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function z(t,e,r){var n=l.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function D(t,e){return f(t.getDate(),e,2)}function R(t,e){return f(t.getHours(),e,2)}function F(t,e){return f(t.getHours()%12||12,e,2)}function B(t,r){return f(1+e.timeDay.count(e.timeYear(t),t),r,3)}function N(t,e){return f(t.getMilliseconds(),e,3)}function j(t,e){return N(t,e)+\"000\"}function U(t,e){return f(t.getMonth()+1,e,2)}function V(t,e){return f(t.getMinutes(),e,2)}function H(t,e){return f(t.getSeconds(),e,2)}function q(t){var e=t.getDay();return 0===e?7:e}function G(t,r){return f(e.timeSunday.count(e.timeYear(t)-1,t),r,2)}function Y(t,r){var n=t.getDay();return t=n>=4||0===n?e.timeThursday(t):e.timeThursday.ceil(t),f(e.timeThursday.count(e.timeYear(t),t)+(4===e.timeYear(t).getDay()),r,2)}function W(t){return t.getDay()}function X(t,r){return f(e.timeMonday.count(e.timeYear(t)-1,t),r,2)}function Z(t,e){return f(t.getFullYear()%100,e,2)}function J(t,e){return f(t.getFullYear()%1e4,e,4)}function K(t){var e=t.getTimezoneOffset();return(e>0?\"-\":(e*=-1,\"+\"))+f(e/60|0,\"0\",2)+f(e%60,\"0\",2)}function Q(t,e){return f(t.getUTCDate(),e,2)}function $(t,e){return f(t.getUTCHours(),e,2)}function tt(t,e){return f(t.getUTCHours()%12||12,e,2)}function et(t,r){return f(1+e.utcDay.count(e.utcYear(t),t),r,3)}function rt(t,e){return f(t.getUTCMilliseconds(),e,3)}function nt(t,e){return rt(t,e)+\"000\"}function it(t,e){return f(t.getUTCMonth()+1,e,2)}function at(t,e){return f(t.getUTCMinutes(),e,2)}function ot(t,e){return f(t.getUTCSeconds(),e,2)}function st(t){var e=t.getUTCDay();return 0===e?7:e}function lt(t,r){return f(e.utcSunday.count(e.utcYear(t)-1,t),r,2)}function ct(t,r){var n=t.getUTCDay();return t=n>=4||0===n?e.utcThursday(t):e.utcThursday.ceil(t),f(e.utcThursday.count(e.utcYear(t),t)+(4===e.utcYear(t).getUTCDay()),r,2)}function ut(t){return t.getUTCDay()}function ft(t,r){return f(e.utcMonday.count(e.utcYear(t)-1,t),r,2)}function ht(t,e){return f(t.getUTCFullYear()%100,e,2)}function pt(t,e){return f(t.getUTCFullYear()%1e4,e,4)}function dt(){return\"+0000\"}function gt(){return\"%\"}function mt(t){return+t}function vt(t){return Math.floor(+t/1e3)}function yt(e){return o=a(e),t.timeFormat=o.format,t.timeParse=o.parse,t.utcFormat=o.utcFormat,t.utcParse=o.utcParse,o}yt({dateTime:\"%x, %X\",date:\"%-m/%-d/%Y\",time:\"%-I:%M:%S %p\",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\"]});var xt=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat(\"%Y-%m-%dT%H:%M:%S.%LZ\");var bt=+new Date(\"2000-01-01T00:00:00.000Z\")?function(t){var e=new Date(t);return isNaN(e)?null:e}:t.utcParse(\"%Y-%m-%dT%H:%M:%S.%LZ\");t.isoFormat=xt,t.isoParse=bt,t.timeFormatDefaultLocale=yt,t.timeFormatLocale=a,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{\"d3-time\":121}],121:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){\"use strict\";var e=new Date,r=new Date;function n(t,i,a,o){function s(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return s.floor=function(e){return t(e=new Date(+e)),e},s.ceil=function(e){return t(e=new Date(e-1)),i(e,1),t(e),e},s.round=function(t){var e=s(t),r=s.ceil(t);return t-e0))return o;do{o.push(a=new Date(+e)),i(e,n),t(e)}while(a=r)for(;t(r),!e(r);)r.setTime(r-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;i(t,-1),!e(t););else for(;--r>=0;)for(;i(t,1),!e(t););}))},a&&(s.count=function(n,i){return e.setTime(+n),r.setTime(+i),t(e),t(r),Math.floor(a(e,r))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(o?function(e){return o(e)%t==0}:function(e){return s.count(0,e)%t==0}):s:null}),s}var i=n((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?n((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,r){e.setTime(+e+r*t)}),(function(e,r){return(r-e)/t})):i:null};var a=i.range,o=n((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),s=o.range,l=n((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),c=l.range,u=n((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),f=u.range,h=n((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),p=h.range;function d(t){return n((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var g=d(0),m=d(1),v=d(2),y=d(3),x=d(4),b=d(5),_=d(6),w=g.range,T=m.range,k=v.range,A=y.range,M=x.range,S=b.range,E=_.range,L=n((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),C=L.range,P=n((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));P.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,r){e.setFullYear(e.getFullYear()+r*t)})):null};var I=P.range,O=n((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()})),z=O.range,D=n((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()})),R=D.range,F=n((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1})),B=F.range;function N(t){return n((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var j=N(0),U=N(1),V=N(2),H=N(3),q=N(4),G=N(5),Y=N(6),W=j.range,X=U.range,Z=V.range,J=H.range,K=q.range,Q=G.range,$=Y.range,tt=n((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),et=tt.range,rt=n((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));rt.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null};var nt=rt.range;t.timeDay=h,t.timeDays=p,t.timeFriday=b,t.timeFridays=S,t.timeHour=u,t.timeHours=f,t.timeInterval=n,t.timeMillisecond=i,t.timeMilliseconds=a,t.timeMinute=l,t.timeMinutes=c,t.timeMonday=m,t.timeMondays=T,t.timeMonth=L,t.timeMonths=C,t.timeSaturday=_,t.timeSaturdays=E,t.timeSecond=o,t.timeSeconds=s,t.timeSunday=g,t.timeSundays=w,t.timeThursday=x,t.timeThursdays=M,t.timeTuesday=v,t.timeTuesdays=k,t.timeWednesday=y,t.timeWednesdays=A,t.timeWeek=g,t.timeWeeks=w,t.timeYear=P,t.timeYears=I,t.utcDay=F,t.utcDays=B,t.utcFriday=G,t.utcFridays=Q,t.utcHour=D,t.utcHours=R,t.utcMillisecond=i,t.utcMilliseconds=a,t.utcMinute=O,t.utcMinutes=z,t.utcMonday=U,t.utcMondays=X,t.utcMonth=tt,t.utcMonths=et,t.utcSaturday=Y,t.utcSaturdays=$,t.utcSecond=o,t.utcSeconds=s,t.utcSunday=j,t.utcSundays=W,t.utcThursday=q,t.utcThursdays=K,t.utcTuesday=V,t.utcTuesdays=Z,t.utcWednesday=H,t.utcWednesdays=J,t.utcWeek=j,t.utcWeeks=W,t.utcYear=rt,t.utcYears=nt,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],122:[function(t,e,r){arguments[4][121][0].apply(r,arguments)},{dup:121}],123:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){\"use strict\";var e,r,n=0,i=0,a=0,o=0,s=0,l=0,c=\"object\"==typeof performance&&performance.now?performance:Date,u=\"object\"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function f(){return s||(u(h),s=c.now()+l)}function h(){s=0}function p(){this._call=this._time=this._next=null}function d(t,e,r){var n=new p;return n.restart(t,e,r),n}function g(){f(),++n;for(var t,r=e;r;)(t=s-r._time)>=0&&r._call.call(null,t),r=r._next;--n}function m(){s=(o=c.now())+l,n=i=0;try{g()}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,y(a)}(),s=0}}function v(){var t=c.now(),e=t-o;e>1e3&&(l-=e,o=t)}function y(t){n||(i&&(i=clearTimeout(i)),t-s>24?(t<1/0&&(i=setTimeout(m,t-c.now()-l)),a&&(a=clearInterval(a))):(a||(o=c.now(),a=setInterval(v,1e3)),n=1,u(m)))}p.prototype=d.prototype={constructor:p,restart:function(t,n,i){if(\"function\"!=typeof t)throw new TypeError(\"callback is not a function\");i=(null==i?f():+i)+(null==n?0:+n),this._next||r===this||(r?r._next=this:e=this,r=this),this._call=t,this._time=i,y()},stop:function(){this._call&&(this._call=null,this._time=1/0,y())}},t.interval=function(t,e,r){var n=new p,i=e;return null==e?(n.restart(t,e,r),n):(e=+e,r=null==r?f():+r,n.restart((function a(o){o+=i,n.restart(a,i+=e,r),t(o)}),e,r),n)},t.now=f,t.timeout=function(t,e,r){var n=new p;return e=null==e?0:+e,n.restart((function(r){n.stop(),t(r+e)}),e,r),n},t.timer=d,t.timerFlush=g,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],124:[function(t,e,r){e.exports=function(){for(var t=0;ts*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];i0)return function(t,e){var r,n;for(r=new Array(t),n=0;n80*r){n=l=t[0],s=c=t[1];for(var b=r;bl&&(l=u),p>c&&(c=p);d=0!==(d=Math.max(l-n,c-s))?1/d:0}return o(y,x,r,n,s,d),x}function i(t,e,r,n,i){var a,o;if(i===E(t,e,r,n)>0)for(a=e;a=e;a-=n)o=A(a,t[a],t[a+1],o);return o&&x(o,o.next)&&(M(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||!x(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(M(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=d(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;e0||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 p,g,m=t;t.prev!==t.next;)if(p=t.prev,g=t.next,f?l(t,n,i,f):s(t))e.push(p.i/r),e.push(t.i/r),e.push(g.i/r),M(t),t=g.next,m=g.next;else if((t=g)===m){h?1===h?o(t=c(a(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(y(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(m(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&y(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(y(i,a,o)>=0)return!1;for(var s=i.xa.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=d(s,l,e,r,n),h=d(c,u,e,r,n),p=t.prevZ,g=t.nextZ;p&&p.z>=f&&g&&g.z<=h;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,g!==t.prev&&g!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;g&&g.z<=h;){if(g!==t.prev&&g!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function c(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!x(i,o)&&b(i,n,n.next,o)&&T(i,o)&&T(o,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(o.i/r),M(n),M(n.next),n=t=o),n=n.next}while(n!==t);return a(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=k(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.x&&n.x>=u&&i!==n.x&&m(ar.x||n.x===r.x&&p(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(t,e)){var r=k(e,t);a(e,e.next),a(r,r.next)}}function p(t,e){return y(t.prev,t,e.prev)<0&&y(e.next,t,t.next)<0}function d(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 g(t){var e=t,r=t;do{(e.x=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&&b(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(T(t,e)&&T(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)&&(y(t.prev,t,e.prev)||y(t,e.prev,e))||x(t,e)&&y(t.prev,t,t.next)>0&&y(e.prev,e,e.next)>0)}function y(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,r,n){var i=w(y(t,e,r)),a=w(y(t,e,n)),o=w(y(r,n,t)),s=w(y(r,n,e));return i!==a&&o!==s||(!(0!==i||!_(t,r,e))||(!(0!==a||!_(t,n,e))||(!(0!==o||!_(r,t,n))||!(0!==s||!_(r,e,n)))))}function _(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function w(t){return t>0?1:t<0?-1:0}function T(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function k(t,e){var r=new S(t.i,t.x,t.y),n=new S(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 A(t,e,r,n){var i=new S(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 M(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 S(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 E(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],130:[function(t,e,r){var n=t(\"strongly-connected-components\");e.exports=function(t,e){var r,i=[],a=[],o=[],s={},l=[];function c(t){var e,n,i=!1;for(a.push(t),o[t]=!0,e=0;e=e}))}(e);for(var r,i=n(t).components.filter((function(t){return t.length>1})),a=1/0,o=0;o=55296&&y<=56319&&(w+=t[++r]),w=T?h.call(T,k,w,g):w,e?(p.value=w,d(m,g,p)):m[g]=w,++g;v=g}if(void 0===v)for(v=o(t.length),e&&(m=new e(v)),r=0;r0?1:-1}},{}],141:[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\":138}],142:[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\":141}],143:[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\":160,\"./valid-value\":162}],144:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?Object.assign:t(\"./shim\")},{\"./is-implemented\":145,\"./shim\":146}],145:[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\")}},{}],146:[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-1}},{}],166:[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}},{}],167:[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}},{}],168:[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\"))},{\"./\":171,d:106,\"es5-ext/object/set-prototype-of\":157,\"es5-ext/string/#/contains\":163,\"es6-symbol\":175}],169:[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,m,v=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,v,u.value,f),h)return;u=t.next()}else for(d=t.length,p=0;p=55296&&m<=56319&&(g+=t[++p]),l.call(e,v,g,f),!h);++p);else c.call(t,(function(t){return l.call(e,v,t,f),h}))}},{\"./get\":170,\"es5-ext/function/is-arguments\":135,\"es5-ext/object/valid-callable\":160,\"es5-ext/string/is-string\":166}],170:[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\":168,\"./string\":173,\"./valid-iterable\":174,\"es5-ext/function/is-arguments\":135,\"es5-ext/string/is-string\":166,\"es6-symbol\":175}],171:[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.__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:106,\"d/auto-bind\":105,\"es5-ext/array/#/clear\":131,\"es5-ext/object/assign\":144,\"es5-ext/object/valid-callable\":160,\"es5-ext/object/valid-value\":162,\"es6-symbol\":175}],172:[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\":135,\"es5-ext/object/is-value\":151,\"es5-ext/string/is-string\":166,\"es6-symbol\":175}],173:[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__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,o.toStringTag,a(\"c\",\"String Iterator\"))},{\"./\":171,d:106,\"es5-ext/object/set-prototype-of\":157,\"es6-symbol\":175}],174:[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\":172}],175:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?t(\"ext/global-this\").Symbol:t(\"./polyfill\")},{\"./is-implemented\":176,\"./polyfill\":181,\"ext/global-this\":188}],176:[function(t,e,r){\"use strict\";var n=t(\"ext/global-this\"),i={object:!0,symbol:!0};e.exports=function(){var t,e=n.Symbol;if(\"function\"!=typeof e)return!1;t=e(\"test symbol\");try{String(t)}catch(t){return!1}return!!i[typeof e.iterator]&&(!!i[typeof e.toPrimitive]&&!!i[typeof e.toStringTag])}},{\"ext/global-this\":188}],177:[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]))}},{}],178:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=Object.create,a=Object.defineProperty,o=Object.prototype,s=i(null);e.exports=function(t){for(var e,r,i=0;s[t+(i||\"\")];)++i;return s[t+=i||\"\"]=!0,a(o,e=\"@@\"+t,n.gs(null,(function(t){r||(r=!0,a(this,e,n(t)),r=!1)}))),e}},{d:106}],179:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=t(\"ext/global-this\").Symbol;e.exports=function(t){return Object.defineProperties(t,{hasInstance:n(\"\",i&&i.hasInstance||t(\"hasInstance\")),isConcatSpreadable:n(\"\",i&&i.isConcatSpreadable||t(\"isConcatSpreadable\")),iterator:n(\"\",i&&i.iterator||t(\"iterator\")),match:n(\"\",i&&i.match||t(\"match\")),replace:n(\"\",i&&i.replace||t(\"replace\")),search:n(\"\",i&&i.search||t(\"search\")),species:n(\"\",i&&i.species||t(\"species\")),split:n(\"\",i&&i.split||t(\"split\")),toPrimitive:n(\"\",i&&i.toPrimitive||t(\"toPrimitive\")),toStringTag:n(\"\",i&&i.toStringTag||t(\"toStringTag\")),unscopables:n(\"\",i&&i.unscopables||t(\"unscopables\"))})}},{d:106,\"ext/global-this\":188}],180:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=t(\"../../../validate-symbol\"),a=Object.create(null);e.exports=function(t){return Object.defineProperties(t,{for:n((function(e){return a[e]?a[e]:a[e]=t(String(e))})),keyFor:n((function(t){var e;for(e in i(t),a)if(a[e]===t)return e}))})}},{\"../../../validate-symbol\":182,d:106}],181:[function(t,e,r){\"use strict\";var n,i,a,o=t(\"d\"),s=t(\"./validate-symbol\"),l=t(\"ext/global-this\").Symbol,c=t(\"./lib/private/generate-name\"),u=t(\"./lib/private/setup/standard-symbols\"),f=t(\"./lib/private/setup/symbol-registry\"),h=Object.create,p=Object.defineProperties,d=Object.defineProperty;if(\"function\"==typeof l)try{String(l()),a=!0}catch(t){}else l=null;i=function(t){if(this instanceof i)throw new TypeError(\"Symbol is not a constructor\");return n(t)},e.exports=n=function t(e){var r;if(this instanceof t)throw new TypeError(\"Symbol is not a constructor\");return a?l(e):(r=h(i.prototype),e=void 0===e?\"\":String(e),p(r,{__description__:o(\"\",e),__name__:o(\"\",c(e))}))},u(n),f(n),p(i.prototype,{constructor:o(n),toString:o(\"\",(function(){return this.__name__}))}),p(n.prototype,{toString:o((function(){return\"Symbol (\"+s(this).__description__+\")\"})),valueOf:o((function(){return s(this)}))}),d(n.prototype,n.toPrimitive,o(\"\",(function(){var t=s(this);return\"symbol\"==typeof t?t:t.toString()}))),d(n.prototype,n.toStringTag,o(\"c\",\"Symbol\")),d(i.prototype,n.toStringTag,o(\"c\",n.prototype[n.toStringTag])),d(i.prototype,n.toPrimitive,o(\"c\",n.prototype[n.toPrimitive]))},{\"./lib/private/generate-name\":178,\"./lib/private/setup/standard-symbols\":179,\"./lib/private/setup/symbol-registry\":180,\"./validate-symbol\":182,d:106,\"ext/global-this\":188}],182:[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\":177}],183:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?WeakMap:t(\"./polyfill\")},{\"./is-implemented\":184,\"./polyfill\":186}],184:[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)))))}},{}],185:[function(t,e,r){\"use strict\";e.exports=\"function\"==typeof WeakMap&&\"[object WeakMap]\"===Object.prototype.toString.call(new WeakMap)},{}],186:[function(t,e,r){\"use strict\";var n,i=t(\"es5-ext/object/is-value\"),a=t(\"es5-ext/object/set-prototype-of\"),o=t(\"es5-ext/object/valid-object\"),s=t(\"es5-ext/object/valid-value\"),l=t(\"es5-ext/string/random-uniq\"),c=t(\"d\"),u=t(\"es6-iterator/get\"),f=t(\"es6-iterator/for-of\"),h=t(\"es6-symbol\").toStringTag,p=t(\"./is-native-implemented\"),d=Array.isArray,g=Object.defineProperty,m=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=p&&a&&WeakMap!==n?a(new WeakMap,v(this)):this,i(e)&&(d(e)||(e=u(e))),g(t,\"__weakMapData__\",c(\"c\",\"$weakMap$\"+l())),e?(f(e,(function(e){s(e),t.set(e[0],e[1])})),t):t},p&&(a&&a(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:c(n)})),Object.defineProperties(n.prototype,{delete:c((function(t){return!!m.call(o(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)})),get:c((function(t){if(m.call(o(t),this.__weakMapData__))return t[this.__weakMapData__]})),has:c((function(t){return m.call(o(t),this.__weakMapData__)})),set:c((function(t,e){return g(o(t),this.__weakMapData__,c(\"c\",e)),this})),toString:c((function(){return\"[object WeakMap]\"}))}),g(n.prototype,h,c(\"c\",\"WeakMap\"))},{\"./is-native-implemented\":185,d:106,\"es5-ext/object/is-value\":151,\"es5-ext/object/set-prototype-of\":157,\"es5-ext/object/valid-object\":161,\"es5-ext/object/valid-value\":162,\"es5-ext/string/random-uniq\":167,\"es6-iterator/for-of\":169,\"es6-iterator/get\":170,\"es6-symbol\":175}],187:[function(t,e,r){var n=function(){if(\"object\"==typeof self&&self)return self;if(\"object\"==typeof window&&window)return window;throw new Error(\"Unable to resolve global `this`\")};e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,\"__global__\",{get:function(){return this},configurable:!0})}catch(t){return n()}try{return __global__||n()}finally{delete Object.prototype.__global__}}()},{}],188:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?globalThis:t(\"./implementation\")},{\"./implementation\":187,\"./is-implemented\":189}],189:[function(t,e,r){\"use strict\";e.exports=function(){return\"object\"==typeof globalThis&&(!!globalThis&&globalThis.Array===Array)}},{}],190:[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\":237}],191:[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;ie[0]-o[0]/2&&(h=o[0]/2,p+=o[1]);return r}},{\"css-font/stringify\":102}],193:[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 m=a(f.getImageData(0,0,p,p));d.lineHeight=d.bottom=p-m+g,f.clearRect(0,0,p,p),f.textBaseline=\"alphabetic\",f.fillText(\"H\",0,p);var v=p-a(f.getImageData(0,0,p,p))-1+g;d.baseline=d.alphabetic=v,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=_-v}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;n0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}e.exports=n,n.canvas=document.createElement(\"canvas\"),n.cache={}},{}],194:[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 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:{}}},T.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),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=T.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(T.baseFontSize+\"px \"+t)}else t=n.parse(n.stringify(t));var i=n.stringify({size:T.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]=T.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:v(c,{origin:\"top\",fontSize:T.baseFontSize,fontStyle:u.join(\" \")})},T.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;h2){for(var w=!t.position[0].length,k=u.mallocFloat(2*this.count),A=0,M=0;A1?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],i*=-1}))),null!=t.color)if(t.color||(t.color=\"transparent\"),\"string\"!=typeof t.color&&isNaN(t.color)){var q;if(\"number\"==typeof t.color[0]&&t.color.length>this.counts.length){var G=t.color.length;q=u.mallocUint8(G);for(var Y=(t.color.subarray||t.color.slice).bind(t.color),W=0;W4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var J=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(J);for(var K=0;K1?this.counts[K]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[K]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*K,4*K+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[K]:this.opacity,baseline:null!=this.baselineOffset[K]?this.baselineOffset[K]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[K]?this.alignOffset[K]:this.alignOffset[0]:0,atlas:this.fontAtlas[K]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*K,2*K+2):this.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=[]},T.prototype.destroy=function(){},T.prototype.kerning=!0,T.prototype.position={constant:new Float32Array(2)},T.prototype.translate=null,T.prototype.scale=null,T.prototype.font=null,T.prototype.text=\"\",T.prototype.positionOffset=[0,0],T.prototype.opacity=1,T.prototype.color=new Uint8Array([0,0,0,255]),T.prototype.alignOffset=[0,0],T.maxAtlasSize=1024,T.atlasCanvas=document.createElement(\"canvas\"),T.atlasContext=T.atlasCanvas.getContext(\"2d\",{alpha:!1}),T.baseFontSize=64,T.fonts={},e.exports=T},{\"bit-twiddle\":81,\"color-normalize\":89,\"css-font\":99,\"detect-kerning\":125,\"es6-weak-map\":183,\"flatten-vertex-data\":191,\"font-atlas\":192,\"font-measure\":193,\"gl-util/context\":226,\"is-plain-obj\":236,\"object-assign\":247,\"parse-rect\":249,\"parse-unit\":251,\"pick-by-alias\":253,regl:283,\"to-px\":314,\"typedarray-pool\":327}],226:[function(t,e,r){(function(r){(function(){\"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*r.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*r.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}function o(){var t=document.createElement(\"canvas\");return t.style.position=\"absolute\",t.style.top=0,t.style.left=0,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\",width:\"w width\",height:\"h height\"},!0),t.pixelRatio||(t.pixelRatio=r.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(\"string\"==typeof t.container){var s=document.querySelector(t.container);if(!s)throw Error(\"Element \"+t.container+\" is not found\");t.container=s}a(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=o(),t.container.appendChild(t.canvas),i(t))}else if(!t.canvas){if(\"undefined\"==typeof document)throw Error(\"Not DOM environment. Use headless-gl.\");t.container=document.body||document.documentElement,t.canvas=o(),t.container.appendChild(t.canvas),i(t)}return t.gl||[\"webgl\",\"experimental-webgl\",\"webgl-experimental\"].some((function(e){try{t.gl=t.canvas.getContext(e,t.attrs)}catch(t){}return t.gl})),t.gl}}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"pick-by-alias\":253}],227:[function(t,e,r){e.exports=function(t){\"string\"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n>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<>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<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g}},{}],231:[function(t,e,r){\"function\"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},{}],232:[function(t,e,r){e.exports=!0},{}],233:[function(t,e,r){\"use strict\";e.exports=\"undefined\"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\\//.test(navigator.appVersion))},{}],234:[function(t,e,r){\"use strict\";e.exports=a,e.exports.isMobile=a,e.exports.default=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[46]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[46]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;if(e||\"undefined\"==typeof navigator||(e=navigator.userAgent),e&&e.headers&&\"string\"==typeof e.headers[\"user-agent\"]&&(e=e.headers[\"user-agent\"]),\"string\"!=typeof e)return!1;var r=t.tablet?i.test(e):n.test(e);return!r&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==e.indexOf(\"Macintosh\")&&-1!==e.indexOf(\"Safari\")&&(r=!0),r}},{}],235:[function(t,e,r){\"use strict\";e.exports=function(t){var e=typeof t;return null!==t&&(\"object\"===e||\"function\"===e)}},{}],236:[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({}))}},{}],237:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e,r=t.length,n=0;n13)&&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}},{}],238:[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))}},{}],239:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?e.exports=n():(t=t||self).mapboxgl=n()}(this,(function(){\"use strict\";var t,e,r;function n(n,i){if(t)if(e){var a=\"var sharedChunk = {}; (\"+t+\")(sharedChunk); (\"+e+\")(sharedChunk);\",o={};t(o),(r=i(o)).workerUrl=window.URL.createObjectURL(new Blob([a],{type:\"text/javascript\"}))}else e=i;else t=i}return n(0,(function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r=n;function n(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}n.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},n.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},n.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},n.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)(n=1))return n;for(;ra?r=i:n=i,i=.5*(n-r)+r}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var i=a;function a(t,e){this.x=t,this.y=e}function o(t,e,n,i){var a=new r(t,e,n,i);return function(t){return a.solve(t)}}a.prototype={clone:function(){return new a(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}},a.convert=function(t){return t instanceof a?t:Array.isArray(t)?new a(t[0],t[1]):t};var s=o(.25,.1,.25,1);function l(t,e,r){return Math.min(r,Math.max(e,t))}function c(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i}function u(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function d(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function g(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e))}))}function m(t,e){return-1!==t.indexOf(e,t.length-e.length)}function v(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?v(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 T(t){for(var e=0,r=0,n=t.length,i=n-1,a=void 0,o=void 0;r@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\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}var M=null;function S(t){if(null==M){var e=t.navigator?t.navigator.userAgent:null;M=!!t.safari||!(!e||!(/\\b(iPad|iPhone|iPod)\\b/.test(e)||e.match(\"Safari\")&&!e.match(\"Chrome\")))}return M}function E(t){try{var e=self[t];return e.setItem(\"_mapbox_test_\",1),e.removeItem(\"_mapbox_test_\"),!0}catch(t){return!1}}var L,C,P,I,O=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),z=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,D=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,R={now:O,frame:function(t){var e=z(t);return{cancel:function(){return D(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var r=self.document.createElement(\"canvas\"),n=r.getContext(\"2d\");if(!n)throw new Error(\"failed to create canvas 2d context\");return r.width=t.width,r.height=t.height,n.drawImage(t,0,0,t.width,t.height),n.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:function(t){return L||(L=self.document.createElement(\"a\")),L.href=t,L.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==C&&(C=self.matchMedia(\"(prefers-reduced-motion: reduce)\")),C.matches)}},F={API_URL:\"https://api.mapbox.com\",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf(\"https://api.mapbox.cn\")?\"https://events.mapbox.cn/events/v2\":0===this.API_URL.indexOf(\"https://api.mapbox.com\")?\"https://events.mapbox.com/events/v2\":null:null},FEEDBACK_URL:\"https://apps.mapbox.com/feedback\",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},B={supported:!1,testSupport:function(t){if(N||!I)return;j?U(t):P=t}},N=!1,j=!1;function U(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,I),t.isContextLost())return;B.supported=!0}catch(t){}t.deleteTexture(e),N=!0}self.document&&((I=self.document.createElement(\"img\")).onload=function(){P&&U(P),P=null,j=!0},I.onerror=function(){N=!0,P=null},I.src=\"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\");var V=\"01\";var H=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function q(t){return 0===t.indexOf(\"mapbox:\")}H.prototype._createSkuToken=function(){var t=function(){for(var t=\"\",e=0;e<10;e++)t+=\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"[Math.floor(62*Math.random())];return{token:[\"1\",V,t].join(\"\"),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},H.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},H.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},H.prototype.normalizeStyleURL=function(t,e){if(!q(t))return t;var r=X(t);return r.path=\"/styles/v1\"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeGlyphsURL=function(t,e){if(!q(t))return t;var r=X(t);return r.path=\"/fonts/v1\"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeSourceURL=function(t,e){if(!q(t))return t;var r=X(t);return r.path=\"/v4/\"+r.authority+\".json\",r.params.push(\"secure\"),this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeSpriteURL=function(t,e,r,n){var i=X(t);return q(t)?(i.path=\"/styles/v1\"+i.path+\"/sprite\"+e+r,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=\"\"+e+r,Z(i))},H.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!q(t))return t;var r=X(t),n=R.devicePixelRatio>=2||512===e?\"@2x\":\"\",i=B.supported?\".webp\":\"$1\";r.path=r.path.replace(/(\\.(png|jpg)\\d*)(?=$)/,\"\"+n+i),r.path=r.path.replace(/^.+\\/v4\\//,\"/\"),r.path=\"/v4\"+r.path;var a=this._customAccessToken||function(t){for(var e=0,r=t;e=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){_(\"Unable to write to LocalStorage\")}},K.prototype.processRequests=function(t){},K.prototype.postEvent=function(t,e,r,n){var i=this;if(F.EVENTS_URL){var a=X(F.EVENTS_URL);a.params.push(\"access_token=\"+(n||F.ACCESS_TOKEN||\"\"));var o={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:\"mapbox-gl-js\",sdkVersion:\"1.10.1\",skuId:V,userId:this.anonId},s=e?u(o,e):o,l={url:Z(a),headers:{\"Content-Type\":\"text/plain\"},body:JSON.stringify([s])};this.pendingRequest=bt(l,(function(t){i.pendingRequest=null,r(t),i.saveEventData(),i.processRequests(n)}))}},K.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var Q,$,tt=function(t){function e(){t.call(this,\"map.load\"),this.success={},this.skuToken=\"\"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postMapLoadEvent=function(t,e,r,n){this.skuToken=r,(F.EVENTS_URL&&n||F.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return q(t)||Y(t)})))&&this.queueRequest({id:e,timestamp:Date.now()},n)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var r=this.queue.shift(),n=r.id,i=r.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),d(this.anonId)||(this.anonId=p()),this.postEvent(i,{skuToken:this.skuToken},(function(t){t||n&&(e.success[n]=!0)}),t))}},e}(K),et=new(function(t){function e(e){t.call(this,\"appUserTurnstile\"),this._customAccessToken=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postTurnstileEvent=function(t,e){F.EVENTS_URL&&F.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return q(t)||Y(t)}))&&this.queueRequest(Date.now(),e)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var r=J(F.ACCESS_TOKEN),n=r?r.u:F.ACCESS_TOKEN,i=n!==this.eventData.tokenU;d(this.anonId)||(this.anonId=p(),i=!0);var a=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(a),l=(a-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||o.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(a,{\"enabled.telemetry\":!1},(function(t){t||(e.eventData.lastSuccess=a,e.eventData.tokenU=n)}),t)}},e}(K)),rt=et.postTurnstileEvent.bind(et),nt=new tt,it=nt.postMapLoadEvent.bind(nt),at=500,ot=50;function st(){self.caches&&!Q&&(Q=self.caches.open(\"mapbox-tiles\"))}function lt(t,e,r){if(st(),Q){var n={status:e.status,statusText:e.statusText,headers:new self.Headers};e.headers.forEach((function(t,e){return n.headers.set(e,t)}));var i=A(e.headers.get(\"Cache-Control\")||\"\");if(!i[\"no-store\"])i[\"max-age\"]&&n.headers.set(\"Expires\",new Date(r+1e3*i[\"max-age\"]).toUTCString()),new Date(n.headers.get(\"Expires\")).getTime()-r<42e4||function(t,e){if(void 0===$)try{new Response(new ReadableStream),$=!0}catch(t){$=!1}$?e(t.body):t.blob().then(e)}(e,(function(e){var r=new self.Response(e,n);st(),Q&&Q.then((function(e){return e.put(ct(t.url),r)})).catch((function(t){return _(t.message)}))}))}}function ct(t){var e=t.indexOf(\"?\");return e<0?t:t.slice(0,e)}function ut(t,e){if(st(),!Q)return e(null);var r=ct(t.url);Q.then((function(t){t.match(r).then((function(n){var i=function(t){if(!t)return!1;var e=new Date(t.headers.get(\"Expires\")||0),r=A(t.headers.get(\"Cache-Control\")||\"\");return e>Date.now()&&!r[\"no-cache\"]}(n);t.delete(r),i&&t.put(r,n.clone()),e(null,n,i)})).catch(e)})).catch(e)}var ft,ht=1/0;function pt(){return null==ft&&(ft=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext(\"2d\")&&\"function\"==typeof self.createImageBitmap),ft}var dt={Unknown:\"Unknown\",Style:\"Style\",Source:\"Source\",Tile:\"Tile\",Glyphs:\"Glyphs\",SpriteImage:\"SpriteImage\",SpriteJSON:\"SpriteJSON\",Image:\"Image\"};\"function\"==typeof Object.freeze&&Object.freeze(dt);var gt=function(t){function e(e,r,n){401===r&&Y(n)&&(e+=\": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes\"),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),mt=k()?function(){return self.worker&&self.worker.referrer}:function(){return(\"blob:\"===self.location.protocol?self.parent:self).location.href};function vt(t,e){var r,n=new self.AbortController,i=new self.Request(t.url,{method:t.method||\"GET\",body:t.body,credentials:t.credentials,headers:t.headers,referrer:mt(),signal:n.signal}),a=!1,o=!1,s=(r=i.url).indexOf(\"sku=\")>0&&Y(r);\"json\"===t.type&&i.headers.set(\"Accept\",\"application/json\");var l=function(r,n,a){if(!o){if(r&&\"SecurityError\"!==r.message&&_(r),n&&a)return c(n);var l=Date.now();self.fetch(i).then((function(r){if(r.ok){var n=s?r.clone():null;return c(r,n,l)}return e(new gt(r.statusText,r.status,t.url))})).catch((function(t){20!==t.code&&e(new Error(t.message))}))}},c=function(r,n,s){(\"arrayBuffer\"===t.type?r.arrayBuffer():\"json\"===t.type?r.json():r.text()).then((function(t){o||(n&&s&<(i,n,s),a=!0,e(null,t,r.headers.get(\"Cache-Control\"),r.headers.get(\"Expires\")))})).catch((function(t){o||e(new Error(t.message))}))};return s?ut(i,l):l(null,null),{cancel:function(){o=!0,a||n.abort()}}}var yt=function(t,e){if(r=t.url,!(/^file:/.test(r)||/^file:/.test(mt())&&!/^\\w+:/.test(r))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty(\"signal\"))return vt(t,e);if(k()&&self.worker&&self.worker.actor){return self.worker.actor.send(\"getResource\",t,e,void 0,!0)}}var r;return function(t,e){var r=new self.XMLHttpRequest;for(var n in r.open(t.method||\"GET\",t.url,!0),\"arrayBuffer\"===t.type&&(r.responseType=\"arraybuffer\"),t.headers)r.setRequestHeader(n,t.headers[n]);return\"json\"===t.type&&(r.responseType=\"text\",r.setRequestHeader(\"Accept\",\"application/json\")),r.withCredentials=\"include\"===t.credentials,r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if(\"json\"===t.type)try{n=JSON.parse(r.response)}catch(t){return e(t)}e(null,n,r.getResponseHeader(\"Cache-Control\"),r.getResponseHeader(\"Expires\"))}else e(new gt(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},xt=function(t,e){return yt(u(t,{type:\"arrayBuffer\"}),e)},bt=function(t,e){return yt(u(t,{method:\"POST\"}),e)};var _t,wt;_t=[],wt=0;var Tt=function(t,e){if(B.supported&&(t.headers||(t.headers={}),t.headers.accept=\"image/webp,*/*\"),wt>=F.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return _t.push(r),r}wt++;var n=!1,i=function(){if(!n)for(n=!0,wt--;_t.length&&wt0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},Et.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var Lt={$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.051129,180,85.051129]},scheme:{type:\"enum\",values:{xyz:{},tms:{}},default:\"xyz\"},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},attribution:{type:\"string\"},promoteId:{type:\"promoteId\"},\"*\":{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.051129,180,85.051129]},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.051129,180,85.051129]},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},attribution:{type:\"string\"},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\"},clusterProperties:{type:\"*\"},lineMetrics:{type:\"boolean\",default:!1},generateId:{type:\"boolean\",default:!1},promoteId:{type:\"promoteId\"}},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\",\"property-type\":\"constant\"}},layout_fill:{\"fill-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_circle:{\"circle-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_heatmap:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},\"layout_fill-extrusion\":{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_line:{\"line-cap\":{type:\"enum\",values:{butt:{},round:{},square:{}},default:\"butt\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-join\":{type:\"enum\",values:{bevel:{},round:{},miter:{}},default:\"miter\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"line-miter-limit\":{type:\"number\",default:2,requires:[{\"line-join\":\"miter\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-round-limit\":{type:\"number\",default:1.05,requires:[{\"line-join\":\"round\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_symbol:{\"symbol-placement\":{type:\"enum\",values:{point:{},line:{},\"line-center\":{}},default:\"point\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-spacing\":{type:\"number\",default:250,minimum:1,units:\"pixels\",requires:[{\"symbol-placement\":\"line\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-avoid-edges\":{type:\"boolean\",default:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"symbol-z-order\":{type:\"enum\",values:{auto:{},\"viewport-y\":{},source:{}},default:\"auto\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-optional\":{type:\"boolean\",default:!1,requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-size\":{type:\"number\",default:1,minimum:0,units:\"factor of the original icon size\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-text-fit\":{type:\"enum\",values:{none:{},width:{},height:{},both:{}},default:\"none\",requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-text-fit-padding\":{type:\"array\",value:\"number\",length:4,default:[0,0,0,0],units:\"pixels\",requires:[\"icon-image\",\"text-field\",{\"icon-text-fit\":[\"both\",\"width\",\"height\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-image\":{type:\"resolvedImage\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-keep-upright\":{type:\"boolean\",default:!1,requires:[\"icon-image\",{\"icon-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-offset\":{type:\"array\",value:\"number\",length:2,default:[0,0],requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-field\":{type:\"formatted\",default:\"\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-font\":{type:\"array\",value:\"string\",default:[\"Open Sans Regular\",\"Arial Unicode MS Regular\"],requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-size\":{type:\"number\",default:16,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-width\":{type:\"number\",default:10,minimum:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-line-height\":{type:\"number\",default:1.2,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-letter-spacing\":{type:\"number\",default:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-justify\":{type:\"enum\",values:{auto:{},left:{},center:{},right:{}},default:\"center\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-radial-offset\":{type:\"number\",units:\"ems\",default:0,requires:[\"text-field\"],\"property-type\":\"data-driven\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]}},\"text-variable-anchor\":{type:\"array\",value:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"text-field\",{\"!\":\"text-variable-anchor\"}],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-angle\":{type:\"number\",default:45,units:\"degrees\",requires:[\"text-field\",{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-writing-mode\":{type:\"array\",value:\"enum\",values:{horizontal:{},vertical:{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-keep-upright\":{type:\"boolean\",default:!0,requires:[\"text-field\",{\"text-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-transform\":{type:\"enum\",values:{none:{},uppercase:{},lowercase:{}},default:\"none\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-offset\":{type:\"array\",value:\"number\",units:\"ems\",length:2,default:[0,0],requires:[\"text-field\",{\"!\":\"text-radial-offset\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-optional\":{type:\"boolean\",default:!1,requires:[\"text-field\",\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_raster:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_hillshade:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},filter:{type:\"array\",value:\"*\"},filter_operator:{type:\"enum\",values:{\"==\":{},\"!=\":{},\">\":{},\">=\":{},\"<\":{},\"<=\":{},in:{},\"!in\":{},all:{},any:{},none:{},has:{},\"!has\":{},within:{}}},geometry_type:{type:\"enum\",values:{Point:{},LineString:{},Polygon:{}}},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}},function_stop:{type:\"array\",minimum:0,maximum:24,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\"},in:{group:\"Lookup\"},\"index-of\":{group:\"Lookup\"},slice:{group:\"Lookup\"},case:{group:\"Decision\"},match:{group:\"Decision\"},coalesce:{group:\"Decision\"},step:{group:\"Ramps, scales, curves\"},interpolate:{group:\"Ramps, scales, curves\"},\"interpolate-hcl\":{group:\"Ramps, scales, curves\"},\"interpolate-lab\":{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\"},format:{group:\"Types\"},image:{group:\"Types\"},\"number-format\":{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\"},\"feature-state\":{group:\"Feature data\"},\"geometry-type\":{group:\"Feature data\"},id:{group:\"Feature data\"},zoom:{group:\"Zoom\"},\"heatmap-density\":{group:\"Heatmap\"},\"line-progress\":{group:\"Feature data\"},accumulated:{group:\"Feature data\"},\"+\":{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\"},distance:{group:\"Math\"},\"==\":{group:\"Decision\"},\"!=\":{group:\"Decision\"},\">\":{group:\"Decision\"},\"<\":{group:\"Decision\"},\">=\":{group:\"Decision\"},\"<=\":{group:\"Decision\"},all:{group:\"Decision\"},any:{group:\"Decision\"},\"!\":{group:\"Decision\"},within:{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:{}},\"property-type\":\"data-constant\",transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]}},position:{type:\"array\",default:[1.15,210,30],length:3,value:\"number\",\"property-type\":\"data-constant\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]}},color:{type:\"color\",\"property-type\":\"data-constant\",default:\"#ffffff\",expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},intensity:{type:\"number\",\"property-type\":\"data-constant\",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:[\"zoom\"]},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\",default:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-outline-color\":{type:\"color\",transition:!0,requires:[{\"!\":\"fill-pattern\"},{\"fill-antialias\":!0}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"}},\"paint_fill-extrusion\":{\"fill-extrusion-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-extrusion-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-extrusion-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"fill-extrusion-height\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-base\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,requires:[\"fill-extrusion-height\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-vertical-gradient\":{type:\"boolean\",default:!0,transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_line:{\"line-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"line-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-width\":{type:\"number\",default:1,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-gap-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-offset\":{type:\"number\",default:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-dasharray\":{type:\"array\",value:\"number\",minimum:0,transition:!0,units:\"line widths\",requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"line-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"line-gradient\":{type:\"color\",transition:!1,requires:[{\"!\":\"line-dasharray\"},{\"!\":\"line-pattern\"},{source:\"geojson\",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:[\"line-progress\"]},\"property-type\":\"color-ramp\"}},paint_circle:{\"circle-radius\":{type:\"number\",default:5,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-blur\":{type:\"number\",default:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"circle-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-scale\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-stroke-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"}},paint_heatmap:{\"heatmap-radius\":{type:\"number\",default:30,minimum:1,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-weight\":{type:\"number\",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-intensity\":{type:\"number\",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"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\"],transition:!1,expression:{interpolated:!0,parameters:[\"heatmap-density\"]},\"property-type\":\"color-ramp\"},\"heatmap-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_symbol:{\"icon-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"icon-image\",\"icon-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-color\":{type:\"color\",default:\"#000000\",transition:!0,overridable:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"text-field\",\"text-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_raster:{\"raster-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-hue-rotate\":{type:\"number\",default:0,period:360,transition:!0,units:\"degrees\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-min\":{type:\"number\",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-max\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-saturation\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-contrast\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-resampling\":{type:\"enum\",values:{linear:{},nearest:{}},default:\"linear\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-fade-duration\":{type:\"number\",default:300,minimum:0,transition:!1,units:\"milliseconds\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_hillshade:{\"hillshade-illumination-direction\":{type:\"number\",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-illumination-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-exaggeration\":{type:\"number\",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-shadow-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-highlight-color\":{type:\"color\",default:\"#FFFFFF\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-accent-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_background:{\"background-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"background-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"background-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"background-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},transition:{duration:{type:\"number\",default:300,minimum:0,units:\"milliseconds\"},delay:{type:\"number\",default:0,minimum:0,units:\"milliseconds\"}},\"property-type\":{\"data-driven\":{type:\"property-type\"},\"cross-faded\":{type:\"property-type\"},\"cross-faded-data-driven\":{type:\"property-type\"},\"color-ramp\":{type:\"property-type\"},\"data-constant\":{type:\"property-type\"},constant:{type:\"property-type\"}},promoteId:{\"*\":{type:\"string\"}}},Ct=function(t,e,r,n){this.message=(t?t+\": \":\"\")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function Pt(t){var e=t.key,r=t.value;return r?[new Ct(e,r,\"constants have been deprecated as of v8\")]:[]}function It(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n\":\"value\"===t.itemType.kind?\"array\":\"array<\"+e+\">\"}return t.kind}var Zt=[Ft,Bt,Nt,jt,Ut,Gt,Vt,Wt(Ht),Yt];function Jt(t,e){if(\"error\"===e.kind)return null;if(\"array\"===t.kind){if(\"array\"===e.kind&&(0===e.N&&\"value\"===e.itemType.kind||!Jt(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=Zt;r255?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]),m=g<=.5?g*(d+1):g+d-g*d,v=2*g-m;return[n(255*s(v,m,p+1/3)),n(255*s(v,m,p)),n(255*s(v,m,p-1/3)),h];default:return null}}return null}}catch(t){}})).parseCSSColor,te=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};te.parse=function(t){if(t){if(t instanceof te)return t;if(\"string\"==typeof t){var e=$t(t);if(e)return new te(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},te.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+\")\"},te.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]},te.black=new te(0,0,0,1),te.white=new te(1,1,1,1),te.transparent=new te(0,0,0,0),te.red=new te(1,0,0,1);var ee=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\"})};ee.prototype.compare=function(t,e){return this.collator.compare(t,e)},ee.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var re=function(t,e,r,n,i){this.text=t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i},ne=function(t){this.sections=t};ne.fromString=function(t){return new ne([new re(t,null,null,null,null)])},ne.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},ne.factory=function(t){return t instanceof ne?t:ne.fromString(t)},ne.prototype.toString=function(){return 0===this.sections.length?\"\":this.sections.map((function(t){return t.text})).join(\"\")},ne.prototype.serialize=function(){for(var t=[\"format\"],e=0,r=this.sections;e=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 oe(t){if(null===t)return!0;if(\"string\"==typeof t)return!0;if(\"boolean\"==typeof t)return!0;if(\"number\"==typeof t)return!0;if(t instanceof te)return!0;if(t instanceof ee)return!0;if(t instanceof ne)return!0;if(t instanceof ie)return!0;if(Array.isArray(t)){for(var e=0,r=t;e2){var s=t[1];if(\"string\"!=typeof s||!(s in fe)||\"object\"===s)return e.error('The item type argument of \"array\" must be one of string, number, boolean',1);a=fe[s],n++}else a=Ht;if(t.length>3){if(null!==t[2]&&(\"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);o=t[2],n++}r=Wt(a,o)}else r=fe[i];for(var l=[];n1)&&e.push(n)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var pe=function(t){this.type=Gt,this.sections=t};pe.parse=function(t,e){if(t.length<2)return e.error(\"Expected at least one argument.\");var r=t[1];if(!Array.isArray(r)&&\"object\"==typeof r)return e.error(\"First argument must be an image or text section.\");for(var n=[],i=!1,a=1;a<=t.length-1;++a){var o=t[a];if(i&&\"object\"==typeof o&&!Array.isArray(o)){i=!1;var s=null;if(o[\"font-scale\"]&&!(s=e.parse(o[\"font-scale\"],1,Bt)))return null;var l=null;if(o[\"text-font\"]&&!(l=e.parse(o[\"text-font\"],1,Wt(Nt))))return null;var c=null;if(o[\"text-color\"]&&!(c=e.parse(o[\"text-color\"],1,Ut)))return null;var u=n[n.length-1];u.scale=s,u.font=l,u.textColor=c}else{var f=e.parse(t[a],1,Ht);if(!f)return null;var h=f.type.kind;if(\"string\"!==h&&\"value\"!==h&&\"null\"!==h&&\"resolvedImage\"!==h)return e.error(\"Formatted text type must be 'string', 'value', 'image' or 'null'.\");i=!0,n.push({content:f,scale:null,font:null,textColor:null})}}return new pe(n)},pe.prototype.evaluate=function(t){return new ne(this.sections.map((function(e){var r=e.content.evaluate(t);return se(r)===Yt?new re(\"\",r,null,null,null):new re(le(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(\",\"):null,e.textColor?e.textColor.evaluate(t):null)})))},pe.prototype.eachChild=function(t){for(var e=0,r=this.sections;e-1),r},de.prototype.eachChild=function(t){t(this.input)},de.prototype.outputDefined=function(){return!1},de.prototype.serialize=function(){return[\"image\",this.input.serialize()]};var ge={\"to-boolean\":jt,\"to-color\":Ut,\"to-number\":Bt,\"to-string\":Nt},me=function(t,e){this.type=t,this.args=e};me.parse=function(t,e){if(t.length<2)return e.error(\"Expected at least one argument.\");var r=t[0];if((\"to-boolean\"===r||\"to-string\"===r)&&2!==t.length)return e.error(\"Expected one argument.\");for(var n=ge[r],i=[],a=1;a4?\"Invalid rbga value \"+JSON.stringify(e)+\": expected an array containing either three or four numeric values.\":ae(e[0],e[1],e[2],e[3])))return new te(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ue(r||\"Could not parse color from value '\"+(\"string\"==typeof e?e:String(JSON.stringify(e)))+\"'\")}if(\"number\"===this.type.kind){for(var o=null,s=0,l=this.args;s=e[2])&&(!(t[1]<=e[1])&&!(t[3]>=e[3])))}function Te(t,e){var r,n=(180+t[0])/360,i=(r=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360),a=Math.pow(2,e.z);return[Math.round(n*a*8192),Math.round(i*a*8192)]}function ke(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function Ae(t,e){for(var r,n,i,a,o,s,l,c=!1,u=0,f=e.length;u0&&f<0||u<0&&f>0}function Ee(t,e,r){for(var n=0,i=r;nr[2]){var i=.5*n,a=t[0]-r[0]>i?-n:r[0]-t[0]>i?n:0;0===a&&(a=t[0]-r[2]>i?-n:r[2]-t[0]>i?n:0),t[0]+=a}_e(e,t)}function ze(t,e,r,n){for(var i=8192*Math.pow(2,n.z),a=[8192*n.x,8192*n.y],o=[],s=0,l=t;s=0)return!1;var r=!0;return t.eachChild((function(t){r&&!Ne(t,e)&&(r=!1)})),r}Re.parse=function(t,e){if(2!==t.length)return e.error(\"'within' expression requires exactly one argument, but found \"+(t.length-1)+\" instead.\");if(oe(t[1])){var r=t[1];if(\"FeatureCollection\"===r.type)for(var n=0;ne))throw new ue(\"Input is not a number.\");o=s-1}return 0}Ue.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)},Ue.prototype._parse=function(t,e){function r(t,e,r){return\"assert\"===r?new he(e,[t]):\"coerce\"===r?new me(e,[t]):t}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 n=t[0];if(\"string\"!=typeof n)return this.error(\"Expression name must be a string, but found \"+typeof n+' instead. If you wanted a literal array, use [\"literal\", [...]].',0),null;var i=this.registry[n];if(i){var a=i.parse(t,this);if(!a)return null;if(this.expectedType){var o=this.expectedType,s=a.type;if(\"string\"!==o.kind&&\"number\"!==o.kind&&\"boolean\"!==o.kind&&\"object\"!==o.kind&&\"array\"!==o.kind||\"value\"!==s.kind)if(\"color\"!==o.kind&&\"formatted\"!==o.kind&&\"resolvedImage\"!==o.kind||\"value\"!==s.kind&&\"string\"!==s.kind){if(this.checkSubtype(o,s))return null}else a=r(a,o,e.typeAnnotation||\"coerce\");else a=r(a,o,e.typeAnnotation||\"assert\")}if(!(a instanceof ce)&&\"resolvedImage\"!==a.type.kind&&function t(e){if(e instanceof je)return t(e.boundExpression);if(e instanceof xe&&\"error\"===e.name)return!1;if(e instanceof be)return!1;if(e instanceof Re)return!1;var r=e instanceof me||e instanceof he,n=!0;if(e.eachChild((function(e){n=r?n&&t(e):n&&e instanceof ce})),!n)return!1;return Fe(e)&&Ne(e,[\"zoom\",\"heatmap-density\",\"line-progress\",\"accumulated\",\"is-supported-script\"])}(a)){var l=new ye;try{a=new ce(a.type,a.evaluate(l))}catch(t){return this.error(t.message),null}}return a}return this.error('Unknown expression \"'+n+'\". 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.\")},Ue.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 Ue(this.registry,n,e||null,i,this.errors)},Ue.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 Dt(n,t))},Ue.prototype.checkSubtype=function(t,e){var r=Jt(t,e);return r&&this.error(r),r};var He=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n=o)return e.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.',l);var u=e.parse(s,c,i);if(!u)return null;i=i||u.type,n.push([o,u])}return new He(i,r,n)},He.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[Ve(e,n)].evaluate(t)},He.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Ge=Object.freeze({__proto__:null,number:qe,color:function(t,e,r){return new te(qe(t.r,e.r,r),qe(t.g,e.g,r),qe(t.b,e.b,r),qe(t.a,e.a,r))},array:function(t,e,r){return t.map((function(t,n){return qe(t,e[n],r)}))}}),Ye=6/29,We=3*Ye*Ye,Xe=Math.PI/180,Ze=180/Math.PI;function Je(t){return t>.008856451679035631?Math.pow(t,1/3):t/We+4/29}function Ke(t){return t>Ye?t*t*t:We*(t-4/29)}function Qe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function $e(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function tr(t){var e=$e(t.r),r=$e(t.g),n=$e(t.b),i=Je((.4124564*e+.3575761*r+.1804375*n)/.95047),a=Je((.2126729*e+.7151522*r+.072175*n)/1);return{l:116*a-16,a:500*(i-a),b:200*(a-Je((.0193339*e+.119192*r+.9503041*n)/1.08883)),alpha:t.a}}function er(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=1*Ke(e),r=.95047*Ke(r),n=1.08883*Ke(n),new te(Qe(3.2404542*r-1.5371385*e-.4985314*n),Qe(-.969266*r+1.8760108*e+.041556*n),Qe(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function rr(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var nr={forward:tr,reverse:er,interpolate:function(t,e,r){return{l:qe(t.l,e.l,r),a:qe(t.a,e.a,r),b:qe(t.b,e.b,r),alpha:qe(t.alpha,e.alpha,r)}}},ir={forward:function(t){var e=tr(t),r=e.l,n=e.a,i=e.b,a=Math.atan2(i,n)*Ze;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*Xe,r=t.c;return er({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:rr(t.h,e.h,r),c:qe(t.c,e.c,r),l:qe(t.l,e.l,r),alpha:qe(t.alpha,e.alpha,r)}}},ar=Object.freeze({__proto__:null,lab:nr,hcl:ir}),or=function(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var a=0,o=i;a1})))return e.error(\"Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.\",1);n={name:\"cubic-bezier\",controlPoints:s}}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(!(i=e.parse(i,2,Bt)))return null;var l=[],c=null;\"interpolate-hcl\"===r||\"interpolate-lab\"===r?c=Ut:e.expectedType&&\"value\"!==e.expectedType.kind&&(c=e.expectedType);for(var u=0;u=f)return e.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.',p);var g=e.parse(h,d,c);if(!g)return null;c=c||g.type,l.push([f,g])}return\"number\"===c.kind||\"color\"===c.kind||\"array\"===c.kind&&\"number\"===c.itemType.kind&&\"number\"==typeof c.N?new or(c,r,n,i,l):e.error(\"Type \"+Xt(c)+\" is not interpolatable.\")},or.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=Ve(e,n),o=e[a],s=e[a+1],l=or.interpolationFactor(this.interpolation,n,o,s),c=r[a].evaluate(t),u=r[a+1].evaluate(t);return\"interpolate\"===this.operator?Ge[this.type.kind.toLowerCase()](c,u,l):\"interpolate-hcl\"===this.operator?ir.reverse(ir.interpolate(ir.forward(c),ir.forward(u),l)):nr.reverse(nr.interpolate(nr.forward(c),nr.forward(u),l))},or.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e=r.length)throw new ue(\"Array index out of bounds: \"+e+\" > \"+(r.length-1)+\".\");if(e!==Math.floor(e))throw new ue(\"Array index must be an integer, but found \"+e+\" instead.\");return r[e]},ur.prototype.eachChild=function(t){t(this.index),t(this.input)},ur.prototype.outputDefined=function(){return!1},ur.prototype.serialize=function(){return[\"at\",this.index.serialize(),this.input.serialize()]};var fr=function(t,e){this.type=jt,this.needle=t,this.haystack=e};fr.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,Ht),n=e.parse(t[2],2,Ht);return r&&n?Kt(r.type,[jt,Nt,Bt,Ft,Ht])?new fr(r,n):e.error(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(r.type)+\" instead\"):null},fr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!r)return!1;if(!Qt(e,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ue(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(se(e))+\" instead.\");if(!Qt(r,[\"string\",\"array\"]))throw new ue(\"Expected second argument to be of type array or string, but found \"+Xt(se(r))+\" instead.\");return r.indexOf(e)>=0},fr.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},fr.prototype.outputDefined=function(){return!0},fr.prototype.serialize=function(){return[\"in\",this.needle.serialize(),this.haystack.serialize()]};var hr=function(t,e,r){this.type=Bt,this.needle=t,this.haystack=e,this.fromIndex=r};hr.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error(\"Expected 3 or 4 arguments, but found \"+(t.length-1)+\" instead.\");var r=e.parse(t[1],1,Ht),n=e.parse(t[2],2,Ht);if(!r||!n)return null;if(!Kt(r.type,[jt,Nt,Bt,Ft,Ht]))return e.error(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(r.type)+\" instead\");if(4===t.length){var i=e.parse(t[3],3,Bt);return i?new hr(r,n,i):null}return new hr(r,n)},hr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!Qt(e,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ue(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(se(e))+\" instead.\");if(!Qt(r,[\"string\",\"array\"]))throw new ue(\"Expected second argument to be of type array or string, but found \"+Xt(se(r))+\" instead.\");if(this.fromIndex){var n=this.fromIndex.evaluate(t);return r.indexOf(e,n)}return r.indexOf(e)},hr.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},hr.prototype.outputDefined=function(){return!1},hr.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return[\"index-of\",this.needle.serialize(),this.haystack.serialize(),t]}return[\"index-of\",this.needle.serialize(),this.haystack.serialize()]};var pr=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};pr.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;oNumber.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,se(h)))return null}else r=se(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,Ht);if(!d)return null;var g=e.parse(t[t.length-1],t.length-1,n);return g?\"value\"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new pr(r,n,d,i,a,g):null},pr.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(se(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},pr.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},pr.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},pr.prototype.serialize=function(){for(var t=this,e=[\"match\",this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();i=5)return e.error(\"Expected 3 or 4 arguments, but found \"+(t.length-1)+\" instead.\");var r=e.parse(t[1],1,Ht),n=e.parse(t[2],2,Bt);if(!r||!n)return null;if(!Kt(r.type,[Wt(Ht),Nt,Ht]))return e.error(\"Expected first argument to be of type array or string, but found \"+Xt(r.type)+\" instead\");if(4===t.length){var i=e.parse(t[3],3,Bt);return i?new gr(r.type,r,n,i):null}return new gr(r.type,r,n)},gr.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!Qt(e,[\"string\",\"array\"]))throw new ue(\"Expected first argument to be of type array or string, but found \"+Xt(se(e))+\" instead.\");if(this.endIndex){var n=this.endIndex.evaluate(t);return e.slice(r,n)}return e.slice(r)},gr.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},gr.prototype.outputDefined=function(){return!1},gr.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return[\"slice\",this.input.serialize(),this.beginIndex.serialize(),t]}return[\"slice\",this.input.serialize(),this.beginIndex.serialize()]};var xr=yr(\"==\",(function(t,e,r){return e===r}),vr),br=yr(\"!=\",(function(t,e,r){return e!==r}),(function(t,e,r,n){return!vr(0,e,r,n)})),_r=yr(\"<\",(function(t,e,r){return e\",(function(t,e,r){return e>r}),(function(t,e,r,n){return n.compare(e,r)>0})),Tr=yr(\"<=\",(function(t,e,r){return e<=r}),(function(t,e,r,n){return n.compare(e,r)<=0})),kr=yr(\">=\",(function(t,e,r){return e>=r}),(function(t,e,r,n){return n.compare(e,r)>=0})),Ar=function(t,e,r,n,i){this.type=Nt,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};Ar.parse=function(t,e){if(3!==t.length)return e.error(\"Expected two arguments.\");var r=e.parse(t[1],1,Bt);if(!r)return null;var n=t[2];if(\"object\"!=typeof n||Array.isArray(n))return e.error(\"NumberFormat options argument must be an object.\");var i=null;if(n.locale&&!(i=e.parse(n.locale,1,Nt)))return null;var a=null;if(n.currency&&!(a=e.parse(n.currency,1,Nt)))return null;var o=null;if(n[\"min-fraction-digits\"]&&!(o=e.parse(n[\"min-fraction-digits\"],1,Bt)))return null;var s=null;return n[\"max-fraction-digits\"]&&!(s=e.parse(n[\"max-fraction-digits\"],1,Bt))?null:new Ar(r,i,a,o,s)},Ar.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?\"currency\":\"decimal\",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},Ar.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},Ar.prototype.outputDefined=function(){return!1},Ar.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t[\"min-fraction-digits\"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t[\"max-fraction-digits\"]=this.maxFractionDigits.serialize()),[\"number-format\",this.number.serialize(),t]};var Mr=function(t){this.type=Bt,this.input=t};Mr.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 \"+Xt(r.type)+\" instead.\"):new Mr(r):null},Mr.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 ue(\"Expected value to be of type string or array, but found \"+Xt(se(e))+\" instead.\")},Mr.prototype.eachChild=function(t){t(this.input)},Mr.prototype.outputDefined=function(){return!1},Mr.prototype.serialize=function(){var t=[\"length\"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Sr={\"==\":xr,\"!=\":br,\">\":wr,\"<\":_r,\">=\":kr,\"<=\":Tr,array:he,at:ur,boolean:he,case:dr,coalesce:lr,collator:be,format:pe,image:de,in:fr,\"index-of\":hr,interpolate:or,\"interpolate-hcl\":or,\"interpolate-lab\":or,length:Mr,let:cr,literal:ce,match:pr,number:he,\"number-format\":Ar,object:he,slice:gr,step:He,string:he,\"to-boolean\":me,\"to-color\":me,\"to-number\":me,\"to-string\":me,var:je,within:Re};function Er(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=ae(r,n,i,o);if(s)throw new ue(s);return new te(r/255*o,n/255*o,i/255*o,o)}function Lr(t,e){return t in e}function Cr(t,e){var r=e[t];return void 0===r?null:r}function Pr(t){return{type:t}}function Ir(t){return{result:\"success\",value:t}}function Or(t){return{result:\"error\",value:t}}function zr(t){return\"data-driven\"===t[\"property-type\"]||\"cross-faded-data-driven\"===t[\"property-type\"]}function Dr(t){return!!t.expression&&t.expression.parameters.indexOf(\"zoom\")>-1}function Rr(t){return!!t.expression&&t.expression.interpolated}function Fr(t){return t instanceof Number?\"number\":t instanceof String?\"string\":t instanceof Boolean?\"boolean\":Array.isArray(t)?\"array\":null===t?\"null\":typeof t}function Br(t){return\"object\"==typeof t&&null!==t&&!Array.isArray(t)}function Nr(t){return t}function jr(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function Ur(t,e,r,n,i){return jr(typeof r===i?n[r]:void 0,t.default,e.default)}function Vr(t,e,r){if(\"number\"!==Fr(r))return jr(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=Ve(t.stops.map((function(t){return t[0]})),r);return t.stops[i][1]}function Hr(t,e,r){var n=void 0!==t.base?t.base:1;if(\"number\"!==Fr(r))return jr(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=Ve(t.stops.map((function(t){return t[0]})),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=Ge[e.type]||Nr;if(t.colorSpace&&\"rgb\"!==t.colorSpace){var u=ar[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 qr(t,e,r){return\"color\"===e.type?r=te.parse(r):\"formatted\"===e.type?r=ne.fromString(r.toString()):\"resolvedImage\"===e.type?r=ie.fromString(r.toString()):Fr(r)===e.type||\"enum\"===e.type&&e.values[r]||(r=void 0),jr(r,t.default,e.default)}xe.register(Sr,{error:[{kind:\"error\"},[Nt],function(t,e){var r=e[0];throw new ue(r.evaluate(t))}],typeof:[Nt,[Ht],function(t,e){return Xt(se(e[0].evaluate(t)))}],\"to-rgba\":[Wt(Bt,4),[Ut],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Ut,[Bt,Bt,Bt],Er],rgba:[Ut,[Bt,Bt,Bt,Bt],Er],has:{type:jt,overloads:[[[Nt],function(t,e){return Lr(e[0].evaluate(t),t.properties())}],[[Nt,Vt],function(t,e){var r=e[0],n=e[1];return Lr(r.evaluate(t),n.evaluate(t))}]]},get:{type:Ht,overloads:[[[Nt],function(t,e){return Cr(e[0].evaluate(t),t.properties())}],[[Nt,Vt],function(t,e){var r=e[0],n=e[1];return Cr(r.evaluate(t),n.evaluate(t))}]]},\"feature-state\":[Ht,[Nt],function(t,e){return Cr(e[0].evaluate(t),t.featureState||{})}],properties:[Vt,[],function(t){return t.properties()}],\"geometry-type\":[Nt,[],function(t){return t.geometryType()}],id:[Ht,[],function(t){return t.id()}],zoom:[Bt,[],function(t){return t.globals.zoom}],\"heatmap-density\":[Bt,[],function(t){return t.globals.heatmapDensity||0}],\"line-progress\":[Bt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Ht,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],\"+\":[Bt,Pr(Bt),function(t,e){for(var r=0,n=0,i=e;n\":[jt,[Nt,Ht],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->\":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],\"filter-<=\":[jt,[Nt,Ht],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-<=\":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],\"filter->=\":[jt,[Nt,Ht],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->=\":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],\"filter-has\":[jt,[Ht],function(t,e){return e[0].value in t.properties()}],\"filter-has-id\":[jt,[],function(t){return null!==t.id()&&void 0!==t.id()}],\"filter-type-in\":[jt,[Wt(Nt)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],\"filter-id-in\":[jt,[Wt(Ht)],function(t,e){return e[0].value.indexOf(t.id())>=0}],\"filter-in-small\":[jt,[Nt,Wt(Ht)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],\"filter-in-large\":[jt,[Nt,Wt(Ht)],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)}],all:{type:jt,overloads:[[[jt,jt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[Pr(jt),function(t,e){for(var r=0,n=e;r0&&\"string\"==typeof t[0]&&t[0]in Sr}function Wr(t,e){var r=new Ue(Sr,[],e?function(t){var e={color:Ut,string:Nt,number:Bt,enum:Nt,boolean:jt,formatted:Gt,resolvedImage:Yt};if(\"array\"===t.type)return Wt(e[t.value]||Ht,t.length);return e[t.type]}(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&\"string\"===e.type?{typeAnnotation:\"coerce\"}:void 0);return n?Ir(new Gr(n,e)):Or(r.errors)}Gr.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)},Gr.prototype.evaluate=function(t,e,r,n,i,a){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||\"number\"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new ue(\"Expected value to be one of \"+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(\", \")+\", but found \"+JSON.stringify(o)+\" instead.\");return o}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,\"undefined\"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Xr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent=\"constant\"!==t&&!Be(e.expression)};Xr.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,a)},Xr.prototype.evaluate=function(t,e,r,n,i,a){return this._styleExpression.evaluate(t,e,r,n,i,a)};var Zr=function(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent=\"camera\"!==t&&!Be(e.expression),this.interpolationType=n};function Jr(t,e){if(\"error\"===(t=Wr(t,e)).result)return t;var r=t.value.expression,n=Fe(r);if(!n&&!zr(e))return Or([new Dt(\"\",\"data expressions not supported\")]);var i=Ne(r,[\"zoom\"]);if(!i&&!Dr(e))return Or([new Dt(\"\",\"zoom expressions not supported\")]);var a=function t(e){var r=null;if(e instanceof cr)r=t(e.result);else if(e instanceof lr)for(var n=0,i=e.args;nn.maximum?[new Ct(e,r,r+\" is greater than the maximum value \"+n.maximum)]:[]}function en(t){var e,r,n,i=t.valueSpec,a=Ot(t.value.type),o={},s=\"categorical\"!==a&&void 0===t.value.property,l=!s,c=\"array\"===Fr(t.value.stops)&&\"array\"===Fr(t.value.stops[0])&&\"object\"===Fr(t.value.stops[0][0]),u=Qr({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 Ct(t.key,t.value,'identity function may not have a \"stops\" property')];var e=[],r=t.value;e=e.concat($r({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:f})),\"array\"===Fr(r)&&0===r.length&&e.push(new Ct(t.key,r,\"array must have at least one stop\"));return e},default:function(t){return kn({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return\"identity\"===a&&s&&u.push(new Ct(t.key,t.value,'missing required property \"property\"')),\"identity\"===a||t.value.stops||u.push(new Ct(t.key,t.value,'missing required property \"stops\"')),\"exponential\"===a&&t.valueSpec.expression&&!Rr(t.valueSpec)&&u.push(new Ct(t.key,t.value,\"exponential functions not supported\")),t.styleSpec.$version>=8&&(l&&!zr(t.valueSpec)?u.push(new Ct(t.key,t.value,\"property functions not supported\")):s&&!Dr(t.valueSpec)&&u.push(new Ct(t.key,t.value,\"zoom functions not supported\"))),\"categorical\"!==a&&!c||void 0!==t.value.property||u.push(new Ct(t.key,t.value,'\"property\" property is required')),u;function f(t){var e=[],a=t.value,s=t.key;if(\"array\"!==Fr(a))return[new Ct(s,a,\"array expected, \"+Fr(a)+\" found\")];if(2!==a.length)return[new Ct(s,a,\"array length 2 expected, length \"+a.length+\" found\")];if(c){if(\"object\"!==Fr(a[0]))return[new Ct(s,a,\"object expected, \"+Fr(a[0])+\" found\")];if(void 0===a[0].zoom)return[new Ct(s,a,\"object stop key must have zoom\")];if(void 0===a[0].value)return[new Ct(s,a,\"object stop key must have value\")];if(n&&n>Ot(a[0].zoom))return[new Ct(s,a[0].zoom,\"stop zoom values must appear in ascending order\")];Ot(a[0].zoom)!==n&&(n=Ot(a[0].zoom),r=void 0,o={}),e=e.concat(Qr({key:s+\"[0]\",value:a[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:tn,value:h}}))}else e=e.concat(h({key:s+\"[0]\",value:a[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},a));return Yr(zt(a[1]))?e.concat([new Ct(s+\"[1]\",a[1],\"expressions are not allowed in function stops.\")]):e.concat(kn({key:s+\"[1]\",value:a[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,n){var s=Fr(t.value),l=Ot(t.value),c=null!==t.value?t.value:n;if(e){if(s!==e)return[new Ct(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 Ct(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 zr(i)&&void 0===a&&(u+='\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.'),[new Ct(t.key,c,u)]}return\"categorical\"!==a||\"number\"!==s||isFinite(l)&&Math.floor(l)===l?\"categorical\"!==a&&\"number\"===s&&void 0!==r&&l=2&&\"$id\"!==t[1]&&\"$type\"!==t[1];case\"in\":return t.length>=3&&(\"string\"!=typeof t[1]||Array.isArray(t[2]));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);ee?1:0}function cn(t){if(!t)return!0;var e,r=t[0];return t.length<=1?\"any\"!==r:\"==\"===r?un(t[1],t[2],\"==\"):\"!=\"===r?pn(un(t[1],t[2],\"==\")):\"<\"===r||\">\"===r||\"<=\"===r||\">=\"===r?un(t[1],t[2],r):\"any\"===r?(e=t.slice(1),[\"any\"].concat(e.map(cn))):\"all\"===r?[\"all\"].concat(t.slice(1).map(cn)):\"none\"===r?[\"all\"].concat(t.slice(1).map(cn).map(pn)):\"in\"===r?fn(t[1],t.slice(2)):\"!in\"===r?pn(fn(t[1],t.slice(2))):\"has\"===r?hn(t[1]):\"!has\"===r?pn(hn(t[1])):\"within\"!==r||t}function un(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 fn(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(ln)]]:[\"filter-in-small\",t,[\"literal\",e]]}}function hn(t){switch(t){case\"$type\":return!0;case\"$id\":return[\"filter-has-id\"];default:return[\"filter-has\",t]}}function pn(t){return[\"!\",t]}function dn(t){return an(zt(t.value))?rn(It({},t,{expressionContext:\"filter\",valueSpec:{value:\"boolean\"}})):function t(e){var r=e.value,n=e.key;if(\"array\"!==Fr(r))return[new Ct(n,r,\"array expected, \"+Fr(r)+\" found\")];var i,a=e.styleSpec,o=[];if(r.length<1)return[new Ct(n,r,\"filter array must have at least 1 element\")];switch(o=o.concat(nn({key:n+\"[0]\",value:r[0],valueSpec:a.filter_operator,style:e.style,styleSpec:e.styleSpec})),Ot(r[0])){case\"<\":case\"<=\":case\">\":case\">=\":r.length>=2&&\"$type\"===Ot(r[1])&&o.push(new Ct(n,r,'\"$type\" cannot be use with operator \"'+r[0]+'\"'));case\"==\":case\"!=\":3!==r.length&&o.push(new Ct(n,r,'filter array for operator \"'+r[0]+'\" must have 3 elements'));case\"in\":case\"!in\":r.length>=2&&\"string\"!==(i=Fr(r[1]))&&o.push(new Ct(n+\"[1]\",r[1],\"string expected, \"+i+\" found\"));for(var s=2;s=u[p+0]&&n>=u[p+1])?(o[h]=!0,a.push(c[h])):o[h]=!1}}},Dn.prototype._forEachCell=function(t,e,r,n,i,a,o,s){for(var l=this._convertToCellCoord(t),c=this._convertToCellCoord(e),u=this._convertToCellCoord(r),f=this._convertToCellCoord(n),h=l;h<=u;h++)for(var p=c;p<=f;p++){var d=this.d*p+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(p),this._convertFromCellCoord(h+1),this._convertFromCellCoord(p+1)))&&i.call(this,t,e,r,n,d,a,o,s))return}},Dn.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},Dn.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Dn.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+this.cells.length+1+1,r=0,n=0;n=0)){var f=t[u];c[u]=Bn[l].shallow.indexOf(u)>=0?f:Hn(f,e)}t instanceof Error&&(c.message=t.message)}if(c.$name)throw new Error(\"$name property is reserved for worker serialization logic.\");return\"Object\"!==l&&(c.$name=l),c}throw new Error(\"can't serialize object of type \"+typeof t)}function qn(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||Un(t)||Vn(t)||ArrayBuffer.isView(t)||t instanceof Rn)return t;if(Array.isArray(t))return t.map(qn);if(\"object\"==typeof t){var e=t.$name||\"Object\",r=Bn[e].klass;if(!r)throw new Error(\"can't deserialize unregistered class \"+e);if(r.deserialize)return r.deserialize(t);for(var n=Object.create(r.prototype),i=0,a=Object.keys(t);i=0?s:qn(s)}}return n}throw new Error(\"can't deserialize object of type \"+typeof t)}var Gn=function(){this.first=!0};Gn.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=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 Wn(t){for(var e=0,r=t;e=65097&&t<=65103)||(!!Yn[\"CJK Compatibility Ideographs\"](t)||(!!Yn[\"CJK Compatibility\"](t)||(!!Yn[\"CJK Radicals Supplement\"](t)||(!!Yn[\"CJK Strokes\"](t)||(!(!Yn[\"CJK Symbols and Punctuation\"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||(!!Yn[\"CJK Unified Ideographs Extension A\"](t)||(!!Yn[\"CJK Unified Ideographs\"](t)||(!!Yn[\"Enclosed CJK Letters and Months\"](t)||(!!Yn[\"Hangul Compatibility Jamo\"](t)||(!!Yn[\"Hangul Jamo Extended-A\"](t)||(!!Yn[\"Hangul Jamo Extended-B\"](t)||(!!Yn[\"Hangul Jamo\"](t)||(!!Yn[\"Hangul Syllables\"](t)||(!!Yn.Hiragana(t)||(!!Yn[\"Ideographic Description Characters\"](t)||(!!Yn.Kanbun(t)||(!!Yn[\"Kangxi Radicals\"](t)||(!!Yn[\"Katakana Phonetic Extensions\"](t)||(!(!Yn.Katakana(t)||12540===t)||(!(!Yn[\"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)||(!(!Yn[\"Small Form Variants\"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||(!!Yn[\"Unified Canadian Aboriginal Syllabics\"](t)||(!!Yn[\"Unified Canadian Aboriginal Syllabics Extended\"](t)||(!!Yn[\"Vertical Forms\"](t)||(!!Yn[\"Yijing Hexagram Symbols\"](t)||(!!Yn[\"Yi Syllables\"](t)||!!Yn[\"Yi Radicals\"](t))))))))))))))))))))))))))))))}function Jn(t){return!(Zn(t)||function(t){return!(!Yn[\"Latin-1 Supplement\"](t)||167!==t&&169!==t&&174!==t&&177!==t&&188!==t&&189!==t&&190!==t&&215!==t&&247!==t)||(!(!Yn[\"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)||(!!Yn[\"Letterlike Symbols\"](t)||(!!Yn[\"Number Forms\"](t)||(!(!Yn[\"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))||(!(!Yn[\"Control Pictures\"](t)||9251===t)||(!!Yn[\"Optical Character Recognition\"](t)||(!!Yn[\"Enclosed Alphanumerics\"](t)||(!!Yn[\"Geometric Shapes\"](t)||(!(!Yn[\"Miscellaneous Symbols\"](t)||t>=9754&&t<=9759)||(!(!Yn[\"Miscellaneous Symbols and Arrows\"](t)||!(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243))||(!!Yn[\"CJK Symbols and Punctuation\"](t)||(!!Yn.Katakana(t)||(!!Yn[\"Private Use Area\"](t)||(!!Yn[\"CJK Compatibility Forms\"](t)||(!!Yn[\"Small Form Variants\"](t)||(!!Yn[\"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 Kn(t){return t>=1424&&t<=2303||Yn[\"Arabic Presentation Forms-A\"](t)||Yn[\"Arabic Presentation Forms-B\"](t)}function Qn(t,e){return!(!e&&Kn(t))&&!(t>=2304&&t<=3583||t>=3840&&t<=4255||Yn.Khmer(t))}function $n(t){for(var e=0,r=t;e-1&&(ai=ni),ii&&ii(t)};function li(){ci.fire(new Mt(\"pluginStateChange\",{pluginStatus:ai,pluginURL:oi}))}var ci=new Et,ui=function(){return ai},fi=function(){if(ai!==ti||!oi)throw new Error(\"rtl-text-plugin cannot be downloaded unless a pluginURL is specified\");ai=ei,li(),oi&&xt({url:oi},(function(t){t?si(t):(ai=ri,li())}))},hi={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return ai===ri||null!=hi.applyArabicShaping},isLoading:function(){return ai===ei},setState:function(t){ai=t.pluginStatus,oi=t.pluginURL},isParsed:function(){return null!=hi.applyArabicShaping&&null!=hi.processBidirectionalText&&null!=hi.processStyledBidirectionalText},getPluginURL:function(){return oi}},pi=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 Gn,this.transition={})};pi.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,n=t;rthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}};var di=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(Br(t))return new Kr(t,e);if(Yr(t)){var r=Jr(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=te.parse(t)),{kind:\"constant\",evaluate:function(){return n}}}(void 0===e?t.specification.default:e,t.specification)};di.prototype.isDataDriven=function(){return\"source\"===this.expression.kind||\"composite\"===this.expression.kind},di.prototype.possiblyEvaluate=function(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)};var gi=function(t){this.property=t,this.value=new di(t,void 0)};gi.prototype.transitioned=function(t,e){return new vi(this.property,this.value,e,u({},t.transition,this.transition),t.now)},gi.prototype.untransitioned=function(){return new vi(this.property,this.value,null,{},0)};var mi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};mi.prototype.getValue=function(t){return x(this._values[t].value.value)},mi.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new gi(this._values[t].property)),this._values[t].value=new di(this._values[t].property,null===e?void 0:x(e))},mi.prototype.getTransition=function(t){return x(this._values[t].transition)},mi.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new gi(this._values[t].property)),this._values[t].transition=x(e)||void 0},mi.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);ethis.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(n=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}(o))}return i};var yi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};yi.prototype.possiblyEvaluate=function(t,e,r){for(var n=new _i(this._properties),i=0,a=Object.keys(this._values);in.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(Ti),Ai=function(t){this.specification=t};Ai.prototype.possiblyEvaluate=function(t,e,r,n){if(void 0!==t.value){if(\"constant\"===t.expression.kind){var i=t.expression.evaluate(e,null,{},r,n);return this._calculate(i,i,i,e)}return this._calculate(t.expression.evaluate(new pi(Math.floor(e.zoom-1),e)),t.expression.evaluate(new pi(Math.floor(e.zoom),e)),t.expression.evaluate(new pi(Math.floor(e.zoom+1),e)),e)}},Ai.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},Ai.prototype.interpolate=function(t){return t};var Mi=function(t){this.specification=t};Mi.prototype.possiblyEvaluate=function(t,e,r,n){return!!t.expression.evaluate(e,null,{},r,n)},Mi.prototype.interpolate=function(){return!1};var Si=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var r=t[e];r.specification.overridable&&this.overridableProperties.push(e);var n=this.defaultPropertyValues[e]=new di(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new gi(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};Nn(\"DataDrivenProperty\",Ti),Nn(\"DataConstantProperty\",wi),Nn(\"CrossFadedDataDrivenProperty\",ki),Nn(\"CrossFadedProperty\",Ai),Nn(\"ColorRampProperty\",Mi);var Ei=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},\"custom\"!==e.type&&(e=e,this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,\"background\"!==e.type&&(this.source=e.source,this.sourceLayer=e[\"source-layer\"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new xi(r.layout)),r.paint)){for(var n in this._transitionablePaint=new mi(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(),this.paint=new _i(r.paint)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return\"visibility\"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n=\"layers.\"+this.id+\".layout.\"+t;if(this._validate(In,n,t,e,r))return}\"visibility\"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e},e.prototype.getPaintProperty=function(t){return m(t,\"-transition\")?this._transitionablePaint.getTransition(t.slice(0,-\"-transition\".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n=\"layers.\"+this.id+\".paint.\"+t;if(this._validate(Pn,n,t,e,r))return!1}if(m(t,\"-transition\"))return this._transitionablePaint.setTransition(t.slice(0,-\"-transition\".length),e||void 0),!1;var i=this._transitionablePaint._values[t],a=\"cross-faded-data-driven\"===i.property.specification[\"property-type\"],o=i.value.isDataDriven(),s=i.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var l=this._transitionablePaint._values[t].value;return l.isDataDriven()||o||a||this._handleOverridablePaintPropertyUpdate(t,s,l)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype._handleOverridablePaintPropertyUpdate=function(t,e,r){return!1},e.prototype.isHidden=function(t){return!!(this.minzoom&&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,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)},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 this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),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 void 0===i&&(i={}),(!i||!1!==i.validate)&&On(this,t.call(Ln,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:Lt,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof bi&&zr(e.property.specification)&&((\"source\"===e.value.kind||\"composite\"===e.value.kind)&&e.value.isStateDependent))return!0}return!1},e}(Et),Li={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Ci=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},Pi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Ii(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map((function(t){var i,a=(i=t.type,Li[i].BYTES_PER_ELEMENT),o=r=Oi(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:Oi(r,Math.max(n,e)),alignment:e}}function Oi(t,e){return Math.ceil(t/e)*e}Pi.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Pi.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},Pi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Pi.prototype.clear=function(){this.length=0},Pi.prototype.resize=function(t){this.reserve(t),this.length=t},Pi.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)}},Pi.prototype._refreshViews=function(){throw new Error(\"_refreshViews() must be implemented by each concrete StructArray layout\")};var zi=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;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.int16[n+0]=e,this.int16[n+1]=r,t},e}(Pi);zi.prototype.bytesPerElement=4,Nn(\"StructArrayLayout2i4\",zi);var Di=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;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,t},e}(Pi);Di.prototype.bytesPerElement=8,Nn(\"StructArrayLayout4i8\",Di);var Ri=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;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(Pi);Ri.prototype.bytesPerElement=12,Nn(\"StructArrayLayout2i4i12\",Ri);var Fi=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;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=4*t,l=8*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=a,this.uint8[l+7]=o,t},e}(Pi);Fi.prototype.bytesPerElement=8,Nn(\"StructArrayLayout2i4ub8\",Fi);var Bi=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,n,i,a,o,s,l,c){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,n,i,a,o,s,l,c)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u){var f=9*t,h=18*t;return this.uint16[f+0]=e,this.uint16[f+1]=r,this.uint16[f+2]=n,this.uint16[f+3]=i,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.uint8[h+16]=c,this.uint8[h+17]=u,t},e}(Pi);Bi.prototype.bytesPerElement=18,Nn(\"StructArrayLayout8ui2ub18\",Bi);var Ni=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,l,c,u,f){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,n,i,a,o,s,l,c,u,f)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h){var p=12*t;return this.int16[p+0]=e,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=i,this.uint16[p+4]=a,this.uint16[p+5]=o,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=c,this.int16[p+9]=u,this.int16[p+10]=f,this.int16[p+11]=h,t},e}(Pi);Ni.prototype.bytesPerElement=24,Nn(\"StructArrayLayout4i4ui4i24\",Ni);var ji=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.float32[i+0]=e,this.float32[i+1]=r,this.float32[i+2]=n,t},e}(Pi);ji.prototype.bytesPerElement=12,Nn(\"StructArrayLayout3f12\",ji);var Ui=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;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint32[r+0]=e,t},e}(Pi);Ui.prototype.bytesPerElement=4,Nn(\"StructArrayLayout1ul4\",Ui);var Vi=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){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,r,n,i,a,o,s,l)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c){var u=10*t,f=5*t;return this.int16[u+0]=e,this.int16[u+1]=r,this.int16[u+2]=n,this.int16[u+3]=i,this.int16[u+4]=a,this.int16[u+5]=o,this.uint32[f+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,t},e}(Pi);Vi.prototype.bytesPerElement=20,Nn(\"StructArrayLayout6i1ul2ui20\",Vi);var Hi=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;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(Pi);Hi.prototype.bytesPerElement=12,Nn(\"StructArrayLayout2i2i2i12\",Hi);var qi=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),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i)},e.prototype.emplace=function(t,e,r,n,i,a){var o=4*t,s=8*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=n,this.int16[s+6]=i,this.int16[s+7]=a,t},e}(Pi);qi.prototype.bytesPerElement=16,Nn(\"StructArrayLayout2f1f2i16\",qi);var Gi=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;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=12*t,o=3*t;return this.uint8[a+0]=e,this.uint8[a+1]=r,this.float32[o+1]=n,this.float32[o+2]=i,t},e}(Pi);Gi.prototype.bytesPerElement=12,Nn(\"StructArrayLayout2ub2f12\",Gi);var Yi=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,this.uint16[i+2]=n,t},e}(Pi);Yi.prototype.bytesPerElement=6,Nn(\"StructArrayLayout3ui6\",Yi);var Wi=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,d,g,m){var v=this.length;return this.resize(v+1),this.emplace(v,t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v){var y=24*t,x=12*t,b=48*t;return this.int16[y+0]=e,this.int16[y+1]=r,this.uint16[y+2]=n,this.uint16[y+3]=i,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[y+10]=l,this.uint16[y+11]=c,this.uint16[y+12]=u,this.float32[x+7]=f,this.float32[x+8]=h,this.uint8[b+36]=p,this.uint8[b+37]=d,this.uint8[b+38]=g,this.uint32[x+10]=m,this.int16[y+22]=v,t},e}(Pi);Wi.prototype.bytesPerElement=48,Nn(\"StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48\",Wi);var Xi=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,d,g,m,v,y,x,b,_,w,T,k,A,M,S){var E=this.length;return this.resize(E+1),this.emplace(E,t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,w,T,k,A,M,S)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,w,T,k,A,M,S,E){var L=34*t,C=17*t;return this.int16[L+0]=e,this.int16[L+1]=r,this.int16[L+2]=n,this.int16[L+3]=i,this.int16[L+4]=a,this.int16[L+5]=o,this.int16[L+6]=s,this.int16[L+7]=l,this.uint16[L+8]=c,this.uint16[L+9]=u,this.uint16[L+10]=f,this.uint16[L+11]=h,this.uint16[L+12]=p,this.uint16[L+13]=d,this.uint16[L+14]=g,this.uint16[L+15]=m,this.uint16[L+16]=v,this.uint16[L+17]=y,this.uint16[L+18]=x,this.uint16[L+19]=b,this.uint16[L+20]=_,this.uint16[L+21]=w,this.uint16[L+22]=T,this.uint32[C+12]=k,this.float32[C+13]=A,this.float32[C+14]=M,this.float32[C+15]=S,this.float32[C+16]=E,t},e}(Pi);Xi.prototype.bytesPerElement=68,Nn(\"StructArrayLayout8i15ui1ul4f68\",Xi);var Zi=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;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.float32[r+0]=e,t},e}(Pi);Zi.prototype.bytesPerElement=4,Nn(\"StructArrayLayout1f4\",Zi);var Ji=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.int16[i+0]=e,this.int16[i+1]=r,this.int16[i+2]=n,t},e}(Pi);Ji.prototype.bytesPerElement=6,Nn(\"StructArrayLayout3i6\",Ji);var Ki=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=2*t,a=4*t;return this.uint32[i+0]=e,this.uint16[a+2]=r,this.uint16[a+3]=n,t},e}(Pi);Ki.prototype.bytesPerElement=8,Nn(\"StructArrayLayout1ul2ui8\",Ki);var Qi=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;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,t},e}(Pi);Qi.prototype.bytesPerElement=4,Nn(\"StructArrayLayout2ui4\",Qi);var $i=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){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint16[r+0]=e,t},e}(Pi);$i.prototype.bytesPerElement=2,Nn(\"StructArrayLayout1ui2\",$i);var ta=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;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.float32[n+0]=e,this.float32[n+1]=r,t},e}(Pi);ta.prototype.bytesPerElement=8,Nn(\"StructArrayLayout2f8\",ta);var ea=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;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,t},e}(Pi);ea.prototype.bytesPerElement=16,Nn(\"StructArrayLayout4f16\",ea);var ra=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},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Ci);ra.prototype.size=20;var na=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 ra(this,t)},e}(Vi);Nn(\"CollisionBoxArray\",na);var ia=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},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,r),e}(Ci);ia.prototype.size=48;var aa=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 ia(this,t)},e}(Wi);Nn(\"PlacedSymbolArray\",aa);var oa=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},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+12]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},r.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,r),e}(Ci);oa.prototype.size=68;var sa=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 oa(this,t)},e}(Xi);Nn(\"SymbolInstanceArray\",sa);var la=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}(Zi);Nn(\"GlyphOffsetArray\",la);var ca=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}(Ji);Nn(\"SymbolLineVertexArray\",ca);var ua=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.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,r),e}(Ci);ua.prototype.size=8;var fa=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 ua(this,t)},e}(Ki);Nn(\"FeatureIndexArray\",fa);var ha=Ii([{name:\"a_pos\",components:2,type:\"Int16\"}],4).members,pa=function(t){void 0===t&&(t=[]),this.segments=t};function da(t,e){return 256*(t=l(Math.floor(t),0,255))+(e=l(Math.floor(e),0,255))}pa.prototype.prepareSegment=function(t,e,r,n){var i=this.segments[this.segments.length-1];return t>pa.MAX_VERTEX_ARRAY_LENGTH&&_(\"Max vertices per segment is \"+pa.MAX_VERTEX_ARRAY_LENGTH+\": bucket requested \"+t),(!i||i.vertexLength+t>pa.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},pa.prototype.get=function(){return this.segments},pa.prototype.destroy=function(){for(var t=0,e=this.segments;t>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(a>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&t.charCodeAt(c+2))<<16;case 2:l^=(255&t.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(c)))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}})),va=e((function(t){t.exports=function(t,e){for(var r,n=t.length,i=e^n,a=0;n>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(a)|(255&t.charCodeAt(++a))<<8|(255&t.charCodeAt(++a))<<16|(255&t.charCodeAt(++a))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++a;switch(n){case 3:i^=(255&t.charCodeAt(a+2))<<16;case 2:i^=(255&t.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(a)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}})),ya=ma,xa=ma,ba=va;ya.murmur3=xa,ya.murmur2=ba;var _a=function(){this.ids=[],this.positions=[],this.indexed=!1};_a.prototype.add=function(t,e,r,n){this.ids.push(Ta(t)),this.positions.push(e,r,n)},_a.prototype.getPositions=function(t){for(var e=Ta(t),r=0,n=this.ids.length-1;r>1;this.ids[i]>=e?n=i:r=i+1}for(var a=[];this.ids[r]===e;){var o=this.positions[3*r],s=this.positions[3*r+1],l=this.positions[3*r+2];a.push({index:o,start:s,end:l}),r++}return a},_a.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return function t(e,r,n,i){for(;n>1],o=n-1,s=i+1;;){do{o++}while(e[o]a);if(o>=s)break;ka(e,o,s),ka(r,3*o,3*s),ka(r,3*o+1,3*s+1),ka(r,3*o+2,3*s+2)}s-nGa.max||o.yGa.max)&&(_(\"Geometry exceeds allowed extent, reduce your vector tile buffer size\"),o.x=l(o.x,Ga.min,Ga.max),o.y=l(o.y,Ga.min,Ga.max))}return r}function Wa(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var Xa=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.hasPattern=!1,this.layoutVertexArray=new zi,this.indexArray=new Yi,this.segments=new pa,this.programConfigurations=new Ua(ha,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function Za(t,e){for(var r=0;r1){if($a(t,e))return!0;for(var n=0;n1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function no(t,e){for(var r,n,i,a=!1,o=0;oe.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 io(t,e){for(var r=!1,n=0,i=t.length-1;ne.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 ao(t,e,r){var n=r[0],i=r[2];if(t.xi.x&&e.x>i.x||t.yi.y&&e.y>i.y)return!1;var a=w(t,e,r[0]);return a!==w(t,e,r[1])||a!==w(t,e,r[2])||a!==w(t,e,r[3])}function oo(t,e,r){var n=e.paint.get(t).value;return\"constant\"===n.kind?n.value:r.programConfigurations.get(e.id).getMaxValue(t)}function so(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function lo(t,e,r,n,a){if(!e[0]&&!e[1])return t;var o=i.convert(e)._mult(a);\"viewport\"===r&&o._rotate(-n);for(var s=[],l=0;l=8192||u<0||u>=8192)){var f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),h=f.vertexLength;Wa(this.layoutVertexArray,c,u,-1,-1),Wa(this.layoutVertexArray,c,u,1,-1),Wa(this.layoutVertexArray,c,u,1,1),Wa(this.layoutVertexArray,c,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),f.vertexLength+=4,f.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{},n)},Nn(\"CircleBucket\",Xa,{omit:[\"layers\"]});var co=new Si({\"circle-sort-key\":new Ti(Lt.layout_circle[\"circle-sort-key\"])}),uo={paint:new Si({\"circle-radius\":new Ti(Lt.paint_circle[\"circle-radius\"]),\"circle-color\":new Ti(Lt.paint_circle[\"circle-color\"]),\"circle-blur\":new Ti(Lt.paint_circle[\"circle-blur\"]),\"circle-opacity\":new Ti(Lt.paint_circle[\"circle-opacity\"]),\"circle-translate\":new wi(Lt.paint_circle[\"circle-translate\"]),\"circle-translate-anchor\":new wi(Lt.paint_circle[\"circle-translate-anchor\"]),\"circle-pitch-scale\":new wi(Lt.paint_circle[\"circle-pitch-scale\"]),\"circle-pitch-alignment\":new wi(Lt.paint_circle[\"circle-pitch-alignment\"]),\"circle-stroke-width\":new Ti(Lt.paint_circle[\"circle-stroke-width\"]),\"circle-stroke-color\":new Ti(Lt.paint_circle[\"circle-stroke-color\"]),\"circle-stroke-opacity\":new Ti(Lt.paint_circle[\"circle-stroke-opacity\"])}),layout:co},fo=\"undefined\"!=typeof Float32Array?Float32Array:Array;function ho(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}function po(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],m=e[13],v=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*m,t[2]=x*a+b*c+_*p+w*v,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*m,t[6]=x*a+b*c+_*p+w*v,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*m,t[10]=x*a+b*c+_*p+w*v,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*m,t[14]=x*a+b*c+_*p+w*v,t[15]=x*o+b*u+_*d+w*y,t}Math.hypot||(Math.hypot=function(){for(var t=arguments,e=0,r=arguments.length;r--;)e+=t[r]*t[r];return Math.sqrt(e)});var go=po;var mo,vo,yo=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t};mo=new fo(3),fo!=Float32Array&&(mo[0]=0,mo[1]=0,mo[2]=0),vo=mo;function xo(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}!function(){var t=function(){var t=new fo(4);return fo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}()}();var bo=function(t){var e=t[0],r=t[1];return e*e+r*r},_o=(function(){var t=function(){var t=new fo(2);return fo!=Float32Array&&(t[0]=0,t[1]=0),t}()}(),function(t){function e(e){t.call(this,e,uo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Xa(t)},e.prototype.queryRadius=function(t){var e=t;return oo(\"circle-radius\",this,e)+oo(\"circle-stroke-width\",this,e)+so(this.paint.get(\"circle-translate\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o,s){for(var l=lo(t,this.paint.get(\"circle-translate\"),this.paint.get(\"circle-translate-anchor\"),a.angle,o),c=this.paint.get(\"circle-radius\").evaluate(e,r)+this.paint.get(\"circle-stroke-width\").evaluate(e,r),u=\"map\"===this.paint.get(\"circle-pitch-alignment\"),f=u?l:function(t,e){return t.map((function(t){return wo(t,e)}))}(l,s),h=u?c*o:c,p=0,d=n;pt.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;l80*r){n=a=t[0],i=o=t[1];for(var d=r;da&&(a=s),l>o&&(o=l);c=0!==(c=Math.max(a-n,o-i))?1/c:0}return jo(h,p,r,n,i,c),p}function Bo(t,e,r,n,i){var a,o;if(i===ls(t,e,r,n)>0)for(a=e;a=e;a-=n)o=as(a,t[a],t[a+1],o);return o&&$o(o,o.next)&&(os(o),o=o.next),o}function No(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!$o(n,n.next)&&0!==Qo(n.prev,n,n.next))n=n.next;else{if(os(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function jo(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=Xo(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;e0||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?Vo(t,n,i,a):Uo(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),os(t),t=l.next,c=l.next;else if((t=l)===c){o?1===o?jo(t=Ho(No(t),e,r),e,r,n,i,a,2):2===o&&qo(t,e,r,n,i,a):jo(No(t),e,r,n,i,a,1);break}}}function Uo(t){var e=t.prev,r=t,n=t.next;if(Qo(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Jo(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&Qo(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Vo(t,e,r,n){var i=t.prev,a=t,o=t.next;if(Qo(i,a,o)>=0)return!1;for(var s=i.xa.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=Xo(s,l,e,r,n),h=Xo(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&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=h;){if(d!==t.prev&&d!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Ho(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!$o(i,a)&&ts(i,n,n.next,a)&&ns(i,a)&&ns(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),os(n),os(n.next),n=t=a),n=n.next}while(n!==t);return No(n)}function qo(t,e,r,n,i,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&Ko(o,s)){var l=is(o,s);return o=No(o,o.next),l=No(l,l.next),jo(o,e,r,n,i,a),void jo(l,e,r,n,i,a)}s=s.next}o=o.next}while(o!==t)}function Go(t,e){return t.x-e.x}function Yo(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.x&&n.x>=u&&i!==n.x&&Jo(ar.x||n.x===r.x&&Wo(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(t,e)){var r=is(e,t);No(e,e.next),No(r,r.next)}}function Wo(t,e){return Qo(t.prev,t,e.prev)<0&&Qo(e.next,t,t.next)<0}function Xo(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 Zo(t){var e=t,r=t;do{(e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function Ko(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&&ts(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(ns(t,e)&&ns(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)&&(Qo(t.prev,t,e.prev)||Qo(t,e.prev,e))||$o(t,e)&&Qo(t.prev,t,t.next)>0&&Qo(e.prev,e,e.next)>0)}function Qo(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function $o(t,e){return t.x===e.x&&t.y===e.y}function ts(t,e,r,n){var i=rs(Qo(t,e,r)),a=rs(Qo(t,e,n)),o=rs(Qo(r,n,t)),s=rs(Qo(r,n,e));return i!==a&&o!==s||(!(0!==i||!es(t,r,e))||(!(0!==a||!es(t,n,e))||(!(0!==o||!es(r,t,n))||!(0!==s||!es(r,e,n)))))}function es(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function rs(t){return t>0?1:t<0?-1:0}function ns(t,e){return Qo(t.prev,t,t.next)<0?Qo(t,e,t.next)>=0&&Qo(t,t.prev,e)>=0:Qo(t,e,t.prev)<0||Qo(t,t.next,e)<0}function is(t,e){var r=new ss(t.i,t.x,t.y),n=new ss(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 as(t,e,r,n){var i=new ss(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 os(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 ss(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 ls(t,e,r,n){for(var i=0,a=e,o=r-n;an;){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),f=Math.max(n,Math.floor(r-s*c/o+u)),h=Math.min(i,Math.floor(r+(o-s)*c/o+u));t(e,r,f,h,a)}var p=e[r],d=n,g=i;for(us(e,n,r),a(e[i],p)>0&&us(e,n,i);d0;)g--}0===a(e[n],p)?us(e,n,g):(g++,us(e,g,i)),g<=r&&(n=g+1),r<=g&&(i=g-1)}}(t,e,r||0,n||t.length-1,i||fs)}function us(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function fs(t,e){return te?1:0}function hs(t,e){var r=t.length;if(r<=1)return[t];for(var n,i,a=[],o=0;o1)for(var l=0;l0&&(n+=t[i-1].length,r.holes.push(n))}return r},Do.default=Ro;var ms=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.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new zi,this.indexArray=new Yi,this.indexArray2=new Qi,this.programConfigurations=new Ua(zo,t.layers,t.zoom),this.segments=new pa,this.segments2=new pa,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};ms.prototype.populate=function(t,e,r){this.hasPattern=ds(\"fill\",this.layers,e);for(var n=this.layers[0].layout.get(\"fill-sort-key\"),i=[],a=0,o=t;a>3}if(a--,1===n||2===n)o+=t.readSVarint(),s+=t.readSVarint(),1===n&&(e&&l.push(e),e=[]),e.push(new i(o,s));else{if(7!==n)throw new Error(\"unknown command \"+n);e&&e.push(e[0].clone())}}return e&&l.push(e),l},ws.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>3}if(n--,1===r||2===r)(i+=t.readSVarint())s&&(s=i),(a+=t.readSVarint())c&&(c=a);else if(7!==r)throw new Error(\"unknown command \"+r)}return[o,l,s,c]},ws.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=ws.types[this.type];function u(t){for(var e=0;e>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 Es(t,e,r){if(3===t){var n=new As(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}Ms.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 _s(this._pbf,e,this.extent,this._keys,this._values)};var Ls={VectorTile:function(t,e){this.layers=t.readFields(Es,{},e)},VectorTileFeature:_s,VectorTileLayer:As},Cs=Ls.VectorTileFeature.types,Ps=Math.pow(2,13);function Is(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,2*Math.floor(n*Ps)+o,i*Ps*2,a*Ps*2,Math.round(s))}var Os=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.hasPattern=!1,this.layoutVertexArray=new Ri,this.indexArray=new Yi,this.programConfigurations=new Ua(bs,t.layers,t.zoom),this.segments=new pa,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function zs(t,e){return t.x===e.x&&(t.x<0||t.x>8192)||t.y===e.y&&(t.y<0||t.y>8192)}function Ds(t){return t.every((function(t){return t.x<0}))||t.every((function(t){return t.x>8192}))||t.every((function(t){return t.y<0}))||t.every((function(t){return t.y>8192}))}Os.prototype.populate=function(t,e,r){this.features=[],this.hasPattern=ds(\"fill-extrusion\",this.layers,e);for(var n=0,i=t;n=1){var y=d[m-1];if(!zs(v,y)){f.vertexLength+4>pa.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var x=v.sub(y)._perp()._unit(),b=y.dist(v);g+b>32768&&(g=0),Is(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,0,g),Is(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,1,g),g+=b,Is(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,0,g),Is(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,1,g);var _=f.vertexLength;this.indexArray.emplaceBack(_,_+2,_+1),this.indexArray.emplaceBack(_+1,_+2,_+3),f.vertexLength+=4,f.primitiveLength+=2}}}}if(f.vertexLength+l>pa.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),\"Polygon\"===Cs[t.type]){for(var w=[],T=[],k=f.vertexLength,A=0,M=s;A=2&&t[l-1].equals(t[l-2]);)l--;for(var c=0;c0;if(T&&v>c){var A=u.dist(p);if(A>2*f){var M=u.sub(u.sub(p)._mult(f/A)._round());this.updateDistance(p,M),this.addCurrentVertex(M,g,0,0,h),p=M}}var S=p&&d,E=S?r:s?\"butt\":n;if(S&&\"round\"===E&&(_i&&(E=\"bevel\"),\"bevel\"===E&&(_>2&&(E=\"flipbevel\"),_100)y=m.mult(-1);else{var L=_*g.add(m).mag()/g.sub(m).mag();y._perp()._mult(L*(k?-1:1))}this.addCurrentVertex(u,y,0,0,h),this.addCurrentVertex(u,y.mult(-1),0,0,h)}else if(\"bevel\"===E||\"fakeround\"===E){var C=-Math.sqrt(_*_-1),P=k?C:0,I=k?0:C;if(p&&this.addCurrentVertex(u,g,P,I,h),\"fakeround\"===E)for(var O=Math.round(180*w/Math.PI/20),z=1;z2*f){var j=u.add(d.sub(u)._mult(f/N)._round());this.updateDistance(u,j),this.addCurrentVertex(j,m,0,0,h),u=j}}}}},qs.prototype.addCurrentVertex=function(t,e,r,n,i,a){void 0===a&&(a=!1);var o=e.x+e.y*r,s=e.y-e.x*r,l=-e.x+e.y*n,c=-e.y-e.x*n;this.addHalfVertex(t,o,s,a,!1,r,i),this.addHalfVertex(t,l,c,a,!0,-n,i),this.distance>Hs/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,n,i,a))},qs.prototype.addHalfVertex=function(t,e,r,n,i,a,o){var s=t.x,l=t.y,c=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(i?1:0),Math.round(63*e)+128,Math.round(63*r)+128,1+(0===a?0:a<0?-1:1)|(63&c)<<2,c>>6);var u=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,u),o.primitiveLength++),i?this.e2=u:this.e1=u},qs.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(Hs-1):this.distance},qs.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},Nn(\"LineBucket\",qs,{omit:[\"layers\",\"patternFeatures\"]});var Gs=new Si({\"line-cap\":new wi(Lt.layout_line[\"line-cap\"]),\"line-join\":new Ti(Lt.layout_line[\"line-join\"]),\"line-miter-limit\":new wi(Lt.layout_line[\"line-miter-limit\"]),\"line-round-limit\":new wi(Lt.layout_line[\"line-round-limit\"]),\"line-sort-key\":new Ti(Lt.layout_line[\"line-sort-key\"])}),Ys={paint:new Si({\"line-opacity\":new Ti(Lt.paint_line[\"line-opacity\"]),\"line-color\":new Ti(Lt.paint_line[\"line-color\"]),\"line-translate\":new wi(Lt.paint_line[\"line-translate\"]),\"line-translate-anchor\":new wi(Lt.paint_line[\"line-translate-anchor\"]),\"line-width\":new Ti(Lt.paint_line[\"line-width\"]),\"line-gap-width\":new Ti(Lt.paint_line[\"line-gap-width\"]),\"line-offset\":new Ti(Lt.paint_line[\"line-offset\"]),\"line-blur\":new Ti(Lt.paint_line[\"line-blur\"]),\"line-dasharray\":new Ai(Lt.paint_line[\"line-dasharray\"]),\"line-pattern\":new ki(Lt.paint_line[\"line-pattern\"]),\"line-gradient\":new Mi(Lt.paint_line[\"line-gradient\"])}),layout:Gs},Ws=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 pi(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,i){return r=u({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,i)},e}(Ti))(Ys.paint.properties[\"line-width\"].specification);Ws.useIntegerZoom=!0;var Xs=function(t){function e(e){t.call(this,e,Ys)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){\"line-gradient\"===t&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values[\"line-gradient\"].value.expression;this.gradient=Co(t,\"lineProgress\"),this.gradientTexture=null},e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r),this.paint._values[\"line-floorwidth\"]=Ws.possiblyEvaluate(this._transitioningPaint._values[\"line-width\"].value,e)},e.prototype.createBucket=function(t){return new qs(t)},e.prototype.queryRadius=function(t){var e=t,r=Zs(oo(\"line-width\",this,e),oo(\"line-gap-width\",this,e)),n=oo(\"line-offset\",this,e);return r/2+Math.abs(n)+so(this.paint.get(\"line-translate\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,a,o,s){var l=lo(t,this.paint.get(\"line-translate\"),this.paint.get(\"line-translate-anchor\"),o.angle,s),c=s/2*Zs(this.paint.get(\"line-width\").evaluate(e,r),this.paint.get(\"line-gap-width\").evaluate(e,r)),u=this.paint.get(\"line-offset\").evaluate(e,r);return u&&(n=function(t,e){for(var r=[],n=new i(0,0),a=0;a=3)for(var a=0;a0?e+2*t:t}var Js=Ii([{name:\"a_pos_offset\",components:4,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint16\"},{name:\"a_pixeloffset\",components:4,type:\"Int16\"}],4),Ks=Ii([{name:\"a_projected_pos\",components:3,type:\"Float32\"}],4),Qs=(Ii([{name:\"a_fade_opacity\",components:1,type:\"Uint32\"}],4),Ii([{name:\"a_placed\",components:2,type:\"Uint8\"},{name:\"a_shift\",components:2,type:\"Float32\"}])),$s=(Ii([{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\"}]),Ii([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_anchor_pos\",components:2,type:\"Int16\"},{name:\"a_extrude\",components:2,type:\"Int16\"}],4)),tl=Ii([{name:\"a_pos\",components:2,type:\"Float32\"},{name:\"a_radius\",components:1,type:\"Float32\"},{name:\"a_flags\",components:2,type:\"Int16\"}],4);Ii([{name:\"triangle\",components:3,type:\"Uint16\"}]),Ii([{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:\"placedOrientation\"},{type:\"Uint8\",name:\"hidden\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Int16\",name:\"associatedIconIndex\"}]),Ii([{type:\"Int16\",name:\"anchorX\"},{type:\"Int16\",name:\"anchorY\"},{type:\"Int16\",name:\"rightJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"centerJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"leftJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedTextSymbolIndex\"},{type:\"Int16\",name:\"placedIconSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedIconSymbolIndex\"},{type:\"Uint16\",name:\"key\"},{type:\"Uint16\",name:\"textBoxStartIndex\"},{type:\"Uint16\",name:\"textBoxEndIndex\"},{type:\"Uint16\",name:\"verticalTextBoxStartIndex\"},{type:\"Uint16\",name:\"verticalTextBoxEndIndex\"},{type:\"Uint16\",name:\"iconBoxStartIndex\"},{type:\"Uint16\",name:\"iconBoxEndIndex\"},{type:\"Uint16\",name:\"verticalIconBoxStartIndex\"},{type:\"Uint16\",name:\"verticalIconBoxEndIndex\"},{type:\"Uint16\",name:\"featureIndex\"},{type:\"Uint16\",name:\"numHorizontalGlyphVertices\"},{type:\"Uint16\",name:\"numVerticalGlyphVertices\"},{type:\"Uint16\",name:\"numIconVertices\"},{type:\"Uint16\",name:\"numVerticalIconVertices\"},{type:\"Uint16\",name:\"useRuntimeCollisionCircles\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Float32\",name:\"textBoxScale\"},{type:\"Float32\",components:2,name:\"textOffset\"},{type:\"Float32\",name:\"collisionCircleDiameter\"}]),Ii([{type:\"Float32\",name:\"offsetX\"}]),Ii([{type:\"Int16\",name:\"x\"},{type:\"Int16\",name:\"y\"},{type:\"Int16\",name:\"tileUnitDistanceFromAnchor\"}]);function el(t,e,r){return t.sections.forEach((function(t){t.text=function(t,e,r){var n=e.layout.get(\"text-transform\").evaluate(r,{});return\"uppercase\"===n?t=t.toLocaleUpperCase():\"lowercase\"===n&&(t=t.toLocaleLowerCase()),hi.applyArabicShaping&&(t=hi.applyArabicShaping(t)),t}(t.text,e,r)})),t}var rl={\"!\":\"\\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\"};var nl=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<>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)},il=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>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<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g},al=ol;function ol(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}ol.Varint=0,ol.Fixed64=1,ol.Bytes=2,ol.Fixed32=5;var sl=\"undefined\"==typeof TextDecoder?null:new TextDecoder(\"utf8\");function ll(t){return t.type===ol.Bytes?t.readVarint()+t.pos:t.pos+1}function cl(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function ul(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(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 fl(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function wl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}ol.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos>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=bl(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=wl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=bl(this.buf,this.pos)+4294967296*bl(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=bl(this.buf,this.pos)+4294967296*wl(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=nl(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=nl(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(i=a[r.pos++],n=(112&i)>>4,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<3,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<10,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<17,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<24,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(1&i)<<31,i<128)return cl(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=this.pos;return this.pos=t,t-e>=12&&sl?function(t,e,r){return sl.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){var n=\"\",i=e;for(;i239?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,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==ol.Bytes)return t.push(this.readVarint(e));var r=ll(this);for(t=t||[];this.pos127;);else if(e===ol.Bytes)this.pos=this.readVarint()+this.pos;else if(e===ol.Fixed32)this.pos+=4;else{if(e!==ol.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;e268435455||t<0?function(t,e){var r,n;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));if(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;if(e.buf[e.pos++]|=r|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;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;a55295&&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&&ul(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),il(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),il(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=128&&ul(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,ol.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,fl,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,hl,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,gl,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,pl,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,dl,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,ml,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,vl,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,yl,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,xl,e)},writeBytesField:function(t,e){this.writeTag(t,ol.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,ol.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,ol.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,ol.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,ol.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,ol.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,ol.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,ol.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,ol.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,ol.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};function Tl(t,e,r){1===t&&r.readMessage(kl,e)}function kl(t,e,r){if(3===t){var n=r.readMessage(Al,{}),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 So({width:o+6,height:s+6},a),metrics:{width:o,height:s,left:l,top:c,advance:u}})}}function Al(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())}function Ml(t){for(var e=0,r=0,n=0,i=t;n=0;h--){var p=o[h];if(!(f.w>p.w||f.h>p.h)){if(f.x=p.x,f.y=p.y,l=Math.max(l,f.y+f.h),s=Math.max(s,f.x+f.w),f.w===p.w&&f.h===p.h){var d=o.pop();h0&&N>A&&(A=N)}else{var j=r[S.fontStack],U=j&&j[L];if(U&&U.rect)I=U.rect,P=U.metrics;else{var V=e[S.fontStack],H=V&&V[L];if(!H)continue;P=H.metrics}C=24*(_-S.scale)}D?(t.verticalizable=!0,k.push({glyph:L,imageName:O,x:h,y:p+C,vertical:D,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:I}),h+=z*S.scale+c):(k.push({glyph:L,imageName:O,x:h,y:p+C,vertical:D,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:I}),h+=P.advance*S.scale+c)}if(0!==k.length){var q=h-c;d=Math.max(q,d),Vl(k,0,k.length-1,m,A)}h=0;var G=a*_+A;T.lineOffset=Math.max(A,w),p+=G,g=Math.max(G,g),++v}else p+=a,++v}var Y;var W=p- -17,X=Ul(o),Z=X.horizontalAlign,J=X.verticalAlign;(function(t,e,r,n,i,a,o,s,l){var c=(e-r)*i,u=0;u=a!==o?-s*n- -17:(-n*l+.5)*o;for(var f=0,h=t;f=0&&n>=t&&zl[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},Il.prototype.substring=function(t,e){var r=new Il;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},Il.prototype.toString=function(){return this.text},Il.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce((function(e,r){return Math.max(e,t.sections[r].scale)}),0)},Il.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(Pl.forText(t.scale,t.fontStack||e));for(var r=this.sections.length-1,n=0;n=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var zl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Dl={};function Rl(t,e,r,n,i,a){if(e.imageName){var o=n[e.imageName];return o?o.displaySize[0]*e.scale*24/a+i:0}var s=r[e.fontStack],l=s&&s[t];return l?l.metrics.advance*e.scale+i:0}function Fl(t,e,r,n){var i=Math.pow(t-e,2);return n?t=0,f=0,h=0;h-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;sn;)c-=l.shift().angleDelta;if(c>i)return!1;o++,s+=f.dist(h)}return!0}function Jl(t){for(var e=0,r=0;rc){var d=(c-l)/p,g=qe(f.x,h.x,d),m=qe(f.y,h.y,d),v=new ql(g,m,h.angleTo(f),u);return v._round(),!o||Zl(t,v,s,o,e)?v:void 0}l+=p}}function tc(t,e,r,n,i,a,o,s,l){var c=Kl(n,a,o),u=Ql(n,i),f=u*o,h=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-f=0&&_=0&&w=0&&p+u<=f){var T=new ql(_,w,x,g);T._round(),i&&!Zl(e,T,o,i,a)||d.push(T)}}h+=y}l||d.length||s||(d=t(e,h/2,n,i,a,o,s,!0,c));return d}(t,h?e/2*s%e:(u/2+2*a)*o*s%e,e,c,r,f,h,!1,l)}function ec(t,e,r,n,a){for(var o=[],s=0;s=n&&h.x>=n||(f.x>=n?f=new i(n,f.y+(h.y-f.y)*((n-f.x)/(h.x-f.x)))._round():h.x>=n&&(h=new i(n,f.y+(h.y-f.y)*((n-f.x)/(h.x-f.x)))._round()),f.y>=a&&h.y>=a||(f.y>=a?f=new i(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round():h.y>=a&&(h=new i(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}function rc(t,e,r,n){var a=[],o=t.image,s=o.pixelRatio,l=o.paddedRect.w-2,c=o.paddedRect.h-2,u=t.right-t.left,f=t.bottom-t.top,h=o.stretchX||[[0,l]],p=o.stretchY||[[0,c]],d=function(t,e){return t+e[1]-e[0]},g=h.reduce(d,0),m=p.reduce(d,0),v=l-g,y=c-m,x=0,b=g,_=0,w=m,T=0,k=v,A=0,M=y;if(o.content&&n){var S=o.content;x=nc(h,0,S[0]),_=nc(p,0,S[1]),b=nc(h,S[0],S[2]),w=nc(p,S[1],S[3]),T=S[0]-x,A=S[1]-_,k=S[2]-S[0]-b,M=S[3]-S[1]-w}var E=function(n,a,l,c){var h=ac(n.stretch-x,b,u,t.left),p=oc(n.fixed-T,k,n.stretch,g),d=ac(a.stretch-_,w,f,t.top),v=oc(a.fixed-A,M,a.stretch,m),y=ac(l.stretch-x,b,u,t.left),S=oc(l.fixed-T,k,l.stretch,g),E=ac(c.stretch-_,w,f,t.top),L=oc(c.fixed-A,M,c.stretch,m),C=new i(h,d),P=new i(y,d),I=new i(y,E),O=new i(h,E),z=new i(p/s,v/s),D=new i(S/s,L/s),R=e*Math.PI/180;if(R){var F=Math.sin(R),B=Math.cos(R),N=[B,-F,F,B];C._matMult(N),P._matMult(N),O._matMult(N),I._matMult(N)}var j=n.stretch+n.fixed,U=l.stretch+l.fixed,V=a.stretch+a.fixed,H=c.stretch+c.fixed;return{tl:C,tr:P,bl:O,br:I,tex:{x:o.paddedRect.x+1+j,y:o.paddedRect.y+1+V,w:U-j,h:H-V},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:z,pixelOffsetBR:D,minFontScaleX:k/s/u,minFontScaleY:M/s/f,isSDF:r}};if(n&&(o.stretchX||o.stretchY))for(var L=ic(h,v,g),C=ic(p,y,m),P=0;P0&&(d=Math.max(10,d),this.circleDiameter=d)}else{var g=o.top*s-l,m=o.bottom*s+l,v=o.left*s-l,y=o.right*s+l,x=o.collisionPadding;if(x&&(v-=x[0]*s,g-=x[1]*s,y+=x[2]*s,m+=x[3]*s),u){var b=new i(v,g),_=new i(y,g),w=new i(v,m),T=new i(y,m),k=u*Math.PI/180;b._rotate(k),_._rotate(k),w._rotate(k),T._rotate(k),v=Math.min(b.x,_.x,w.x,T.x),y=Math.max(b.x,_.x,w.x,T.x),g=Math.min(b.y,_.y,w.y,T.y),m=Math.max(b.y,_.y,w.y,T.y)}t.emplaceBack(e.x,e.y,v,g,y,m,r,n,a)}this.boxEndIndex=t.length},lc=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=cc),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function cc(t,e){return te?1:0}function uc(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var n=1/0,a=1/0,o=-1/0,s=-1/0,l=t[0],c=0;co)&&(o=u.x),(!c||u.y>s)&&(s=u.y)}var f=o-n,h=s-a,p=Math.min(f,h),d=p/2,g=new lc([],fc);if(0===p)return new i(n,a);for(var m=n;my.d||!y.d)&&(y=b,r&&console.log(\"found best %d after %d probes\",Math.round(1e4*b.d)/1e4,x)),b.max-y.d<=e||(d=b.h/2,g.push(new hc(b.p.x-d,b.p.y-d,d,t)),g.push(new hc(b.p.x+d,b.p.y-d,d,t)),g.push(new hc(b.p.x-d,b.p.y+d,d,t)),g.push(new hc(b.p.x+d,b.p.y+d,d,t)),x+=4)}return r&&(console.log(\"num probes: \"+x),console.log(\"best distance: \"+y.d)),y.p}function fc(t,e){return e.max-t.max}function hc(t,e,r,n){this.p=new i(t,e),this.h=r,this.d=function(t,e){for(var r=!1,n=1/0,i=0;it.y!=u.y>t.y&&t.x<(u.x-c.x)*(t.y-c.y)/(u.y-c.y)+c.x&&(r=!r),n=Math.min(n,ro(t,c,u))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}lc.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},lc.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}},lc.prototype.peek=function(){return this.data[0]},lc.prototype._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},lc.prototype._down=function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];t=0)break;e[t]=o,t=a}e[t]=i};var pc=Number.POSITIVE_INFINITY;function dc(t,e){return e[1]!==pc?function(t,e,r){var n=0,i=0;switch(e=Math.abs(e),r=Math.abs(r),t){case\"top-right\":case\"top-left\":case\"top\":i=r-7;break;case\"bottom-right\":case\"bottom-left\":case\"bottom\":i=7-r}switch(t){case\"top-right\":case\"bottom-right\":case\"right\":n=-e;break;case\"top-left\":case\"bottom-left\":case\"left\":n=e}return[n,i]}(t,e[0],e[1]):function(t,e){var r=0,n=0;e<0&&(e=0);var i=e/Math.sqrt(2);switch(t){case\"top-right\":case\"top-left\":n=i-7;break;case\"bottom-right\":case\"bottom-left\":n=7-i;break;case\"bottom\":n=7-e;break;case\"top\":n=e-7}switch(t){case\"top-right\":case\"bottom-right\":r=-i;break;case\"top-left\":case\"bottom-left\":r=i;break;case\"left\":r=e;break;case\"right\":r=-e}return[r,n]}(t,e[0])}function gc(t){switch(t){case\"right\":case\"top-right\":case\"bottom-right\":return\"right\";case\"left\":case\"top-left\":case\"bottom-left\":return\"left\"}return\"center\"}function mc(t,e,r,n,a,o,s,l,c,u,f,h,p,d,g){var m=function(t,e,r,n,a,o,s,l){for(var c=n.layout.get(\"text-rotate\").evaluate(o,{})*Math.PI/180,u=[],f=0,h=e.positionedLines;f32640&&_(t.layerIds[0]+': Value for \"text-size\" is >= 255. Reduce your \"text-size\".'):\"composite\"===v.kind&&((y=[128*d.compositeTextSizes[0].evaluate(s,{},g),128*d.compositeTextSizes[1].evaluate(s,{},g)])[0]>32640||y[1]>32640)&&_(t.layerIds[0]+': Value for \"text-size\" is >= 255. Reduce your \"text-size\".'),t.addSymbols(t.text,m,y,l,o,s,u,e,c.lineStartIndex,c.lineLength,p,g);for(var x=0,b=f;x=0;o--)if(n.dist(a[o])0)&&(\"constant\"!==a.value.kind||a.value.value.length>0),c=\"constant\"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,u=i.get(\"symbol-sort-key\");if(this.features=[],l||c){for(var f=e.iconDependencies,h=e.glyphDependencies,p=e.availableImages,d=new pi(this.zoom),g=0,m=t;g=0;for(var O=0,z=k.sections;O=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;l0},Mc.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Mc.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Mc.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Mc.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Mc.prototype.addIndicesForPlacedSymbol=function(t,e){for(var r=t.placedSymbolArray.get(e),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r=0&&n.indexOf(t)===r&&e.addIndicesForPlacedSymbol(e.text,t)})),a.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,a.verticalPlacedTextSymbolIndex),a.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.placedIconSymbolIndex),a.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Nn(\"SymbolBucket\",Mc,{omit:[\"layers\",\"collisionBoxArray\",\"features\",\"compareText\"]}),Mc.MAX_GLYPHS=65535,Mc.addDynamicAttributes=wc;var Sc=new Si({\"symbol-placement\":new wi(Lt.layout_symbol[\"symbol-placement\"]),\"symbol-spacing\":new wi(Lt.layout_symbol[\"symbol-spacing\"]),\"symbol-avoid-edges\":new wi(Lt.layout_symbol[\"symbol-avoid-edges\"]),\"symbol-sort-key\":new Ti(Lt.layout_symbol[\"symbol-sort-key\"]),\"symbol-z-order\":new wi(Lt.layout_symbol[\"symbol-z-order\"]),\"icon-allow-overlap\":new wi(Lt.layout_symbol[\"icon-allow-overlap\"]),\"icon-ignore-placement\":new wi(Lt.layout_symbol[\"icon-ignore-placement\"]),\"icon-optional\":new wi(Lt.layout_symbol[\"icon-optional\"]),\"icon-rotation-alignment\":new wi(Lt.layout_symbol[\"icon-rotation-alignment\"]),\"icon-size\":new Ti(Lt.layout_symbol[\"icon-size\"]),\"icon-text-fit\":new wi(Lt.layout_symbol[\"icon-text-fit\"]),\"icon-text-fit-padding\":new wi(Lt.layout_symbol[\"icon-text-fit-padding\"]),\"icon-image\":new Ti(Lt.layout_symbol[\"icon-image\"]),\"icon-rotate\":new Ti(Lt.layout_symbol[\"icon-rotate\"]),\"icon-padding\":new wi(Lt.layout_symbol[\"icon-padding\"]),\"icon-keep-upright\":new wi(Lt.layout_symbol[\"icon-keep-upright\"]),\"icon-offset\":new Ti(Lt.layout_symbol[\"icon-offset\"]),\"icon-anchor\":new Ti(Lt.layout_symbol[\"icon-anchor\"]),\"icon-pitch-alignment\":new wi(Lt.layout_symbol[\"icon-pitch-alignment\"]),\"text-pitch-alignment\":new wi(Lt.layout_symbol[\"text-pitch-alignment\"]),\"text-rotation-alignment\":new wi(Lt.layout_symbol[\"text-rotation-alignment\"]),\"text-field\":new Ti(Lt.layout_symbol[\"text-field\"]),\"text-font\":new Ti(Lt.layout_symbol[\"text-font\"]),\"text-size\":new Ti(Lt.layout_symbol[\"text-size\"]),\"text-max-width\":new Ti(Lt.layout_symbol[\"text-max-width\"]),\"text-line-height\":new wi(Lt.layout_symbol[\"text-line-height\"]),\"text-letter-spacing\":new Ti(Lt.layout_symbol[\"text-letter-spacing\"]),\"text-justify\":new Ti(Lt.layout_symbol[\"text-justify\"]),\"text-radial-offset\":new Ti(Lt.layout_symbol[\"text-radial-offset\"]),\"text-variable-anchor\":new wi(Lt.layout_symbol[\"text-variable-anchor\"]),\"text-anchor\":new Ti(Lt.layout_symbol[\"text-anchor\"]),\"text-max-angle\":new wi(Lt.layout_symbol[\"text-max-angle\"]),\"text-writing-mode\":new wi(Lt.layout_symbol[\"text-writing-mode\"]),\"text-rotate\":new Ti(Lt.layout_symbol[\"text-rotate\"]),\"text-padding\":new wi(Lt.layout_symbol[\"text-padding\"]),\"text-keep-upright\":new wi(Lt.layout_symbol[\"text-keep-upright\"]),\"text-transform\":new Ti(Lt.layout_symbol[\"text-transform\"]),\"text-offset\":new Ti(Lt.layout_symbol[\"text-offset\"]),\"text-allow-overlap\":new wi(Lt.layout_symbol[\"text-allow-overlap\"]),\"text-ignore-placement\":new wi(Lt.layout_symbol[\"text-ignore-placement\"]),\"text-optional\":new wi(Lt.layout_symbol[\"text-optional\"])}),Ec={paint:new Si({\"icon-opacity\":new Ti(Lt.paint_symbol[\"icon-opacity\"]),\"icon-color\":new Ti(Lt.paint_symbol[\"icon-color\"]),\"icon-halo-color\":new Ti(Lt.paint_symbol[\"icon-halo-color\"]),\"icon-halo-width\":new Ti(Lt.paint_symbol[\"icon-halo-width\"]),\"icon-halo-blur\":new Ti(Lt.paint_symbol[\"icon-halo-blur\"]),\"icon-translate\":new wi(Lt.paint_symbol[\"icon-translate\"]),\"icon-translate-anchor\":new wi(Lt.paint_symbol[\"icon-translate-anchor\"]),\"text-opacity\":new Ti(Lt.paint_symbol[\"text-opacity\"]),\"text-color\":new Ti(Lt.paint_symbol[\"text-color\"],{runtimeType:Ut,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),\"text-halo-color\":new Ti(Lt.paint_symbol[\"text-halo-color\"]),\"text-halo-width\":new Ti(Lt.paint_symbol[\"text-halo-width\"]),\"text-halo-blur\":new Ti(Lt.paint_symbol[\"text-halo-blur\"]),\"text-translate\":new wi(Lt.paint_symbol[\"text-translate\"]),\"text-translate-anchor\":new wi(Lt.paint_symbol[\"text-translate-anchor\"])}),layout:Sc},Lc=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Ft,this.defaultValue=t};Lc.prototype.evaluate=function(t){if(t.formattedSection){var e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default},Lc.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},Lc.prototype.outputDefined=function(){return!1},Lc.prototype.serialize=function(){return null},Nn(\"FormatSectionOverride\",Lc,{omit:[\"defaultValue\"]});var Cc=function(t){function e(e){t.call(this,e,Ec)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e,r){if(t.prototype.recalculate.call(this,e,r),\"auto\"===this.layout.get(\"icon-rotation-alignment\")&&(\"point\"!==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\")&&(\"point\"!==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\")),\"point\"===this.layout.get(\"symbol-placement\")){var n=this.layout.get(\"text-writing-mode\");if(n){for(var i=[],a=0,o=n;a\",targetMapId:n,sourceMapId:a.mapId})}}},qc.prototype.receive=function(t){var e=t.data,r=e.id;if(r&&(!e.targetMapId||this.mapId===e.targetMapId))if(\"\"===e.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else k()||e.mustQueue?(this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,e)},qc.prototype.process=function(){if(this.taskQueue.length){var t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}},qc.prototype.processTask=function(t,e){var r=this;if(\"\"===e.type){var n=this.callbacks[t];delete this.callbacks[t],n&&(e.error?n(qn(e.error)):n(null,qn(e.data)))}else{var i=!1,a=S(this.globalScope)?void 0:[],o=e.hasCallback?function(e,n){i=!0,delete r.cancelCallbacks[t],r.target.postMessage({id:t,type:\"\",sourceMapId:r.mapId,error:e?Hn(e):null,data:Hn(n,a)},a)}:function(t){i=!0},s=null,l=qn(e.data);if(this.parent[e.type])s=this.parent[e.type](e.sourceMapId,l,o);else if(this.parent.getWorkerSource){var c=e.type.split(\".\");s=this.parent.getWorkerSource(e.sourceMapId,c[0],l.source)[c[1]](l,o)}else o(new Error(\"Could not find function \"+e.type));!i&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},qc.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener(\"message\",this.receive,!1)};var Yc=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]))};Yc.prototype.setNorthEast=function(t){return this._ne=t instanceof Wc?new Wc(t.lng,t.lat):Wc.convert(t),this},Yc.prototype.setSouthWest=function(t){return this._sw=t instanceof Wc?new Wc(t.lng,t.lat):Wc.convert(t),this},Yc.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof Wc)e=t,r=t;else{if(!(t instanceof Yc)){if(Array.isArray(t)){if(4===t.length||t.every(Array.isArray)){var a=t;return this.extend(Yc.convert(a))}var o=t;return this.extend(Wc.convert(o))}return 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 Wc(e.lng,e.lat),this._ne=new Wc(r.lng,r.lat)),this},Yc.prototype.getCenter=function(){return new Wc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Yc.prototype.getSouthWest=function(){return this._sw},Yc.prototype.getNorthEast=function(){return this._ne},Yc.prototype.getNorthWest=function(){return new Wc(this.getWest(),this.getNorth())},Yc.prototype.getSouthEast=function(){return new Wc(this.getEast(),this.getSouth())},Yc.prototype.getWest=function(){return this._sw.lng},Yc.prototype.getSouth=function(){return this._sw.lat},Yc.prototype.getEast=function(){return this._ne.lng},Yc.prototype.getNorth=function(){return this._ne.lat},Yc.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Yc.prototype.toString=function(){return\"LngLatBounds(\"+this._sw.toString()+\", \"+this._ne.toString()+\")\"},Yc.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Yc.prototype.contains=function(t){var e=Wc.convert(t),r=e.lng,n=e.lat,i=this._sw.lat<=n&&n<=this._ne.lat,a=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=r&&r>=this._ne.lng),i&&a},Yc.convert=function(t){return!t||t instanceof Yc?t:new Yc(t)};var Wc=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\")};Wc.prototype.wrap=function(){return new Wc(c(this.lng,-180,180),this.lat)},Wc.prototype.toArray=function(){return[this.lng,this.lat]},Wc.prototype.toString=function(){return\"LngLat(\"+this.lng+\", \"+this.lat+\")\"},Wc.prototype.distanceTo=function(t){var e=Math.PI/180,r=this.lat*e,n=t.lat*e,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((t.lng-this.lng)*e);return 6371008.8*Math.acos(Math.min(i,1))},Wc.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new Yc(new Wc(this.lng-r,this.lat-e),new Wc(this.lng+r,this.lat+e))},Wc.convert=function(t){if(t instanceof Wc)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Wc(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&\"object\"==typeof t&&null!==t)return new Wc(Number(\"lng\"in t?t.lng:t.lon),Number(t.lat));throw new Error(\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]\")};var Xc=2*Math.PI*6371008.8;function Zc(t){return Xc*Math.cos(t*Math.PI/180)}function Jc(t){return(180+t)/360}function Kc(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Qc(t,e){return t/Zc(e)}function $c(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}var tu=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};tu.fromLngLat=function(t,e){void 0===e&&(e=0);var r=Wc.convert(t);return new tu(Jc(r.lng),Kc(r.lat),Qc(e,r.lat))},tu.prototype.toLngLat=function(){return new Wc(360*this.x-180,$c(this.y))},tu.prototype.toAltitude=function(){return t=this.z,e=this.y,t*Zc($c(e));var t,e},tu.prototype.meterInMercatorCoordinateUnits=function(){return 1/Xc*(t=$c(this.y),1/Math.cos(t*Math.PI/180));var t};var eu=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=iu(0,t,t,e,r)};eu.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},eu.prototype.url=function(t,e){var r,n,i,a,o,s=(r=this.x,n=this.y,i=this.z,a=Gc(256*r,256*(n=Math.pow(2,i)-n-1),i),o=Gc(256*(r+1),256*(n+1),i),a[0]+\",\"+a[1]+\",\"+o[0]+\",\"+o[1]),l=function(t,e,r){for(var n,i=\"\",a=t;a>0;a--)i+=(e&(n=1<this.canonical.z?new nu(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new nu(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},nu.prototype.calculateScaledKey=function(t,e){var r=this.canonical.z-t;return t>this.canonical.z?iu(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):iu(this.wrap*+e,t,t,this.canonical.x>>r,this.canonical.y>>r)},nu.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ>e&&t.canonical.y===this.canonical.y>>e},nu.prototype.children=function(t){if(this.overscaledZ>=t)return[new nu(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 nu(e,this.wrap,e,r,n),new nu(e,this.wrap,e,r+1,n),new nu(e,this.wrap,e,r,n+1),new nu(e,this.wrap,e,r+1,n+1)]},nu.prototype.isLessThan=function(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.y=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError(\"out of range source coordinates for DEM data\");return(e+1)*this.stride+(t+1)},au.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},au.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},au.prototype.getPixels=function(){return new Eo({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},au.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw new Error(\"dem dimension mismatch\");var n=e*this.dim,i=e*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(e){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:a=o-1;break;case 1:o=a+1}for(var s=-e*this.dim,l=-r*this.dim,c=a;c=0&&u[3]>=0&&s.insert(o,u[0],u[1],u[2],u[3])}},uu.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ls.VectorTile(new al(this.rawTileData)).layers,this.sourceLayerCoder=new ou(this.vtLayers?Object.keys(this.vtLayers).sort():[\"_geojsonTileLayer\"])),this.vtLayers},uu.prototype.query=function(t,e,r,n){var a=this;this.loadVTLayers();for(var o=t.params||{},s=8192/t.tileSize/t.scale,l=sn(o.filter),c=t.queryGeometry,u=t.queryPadding*s,f=hu(c),h=this.grid.query(f.minX-u,f.minY-u,f.maxX+u,f.maxY+u),p=hu(t.cameraQueryGeometry),d=this.grid3D.query(p.minX-u,p.minY-u,p.maxX+u,p.maxY+u,(function(e,r,n,a){return function(t,e,r,n,a){for(var o=0,s=t;o=l.x&&a>=l.y)return!0}var c=[new i(e,r),new i(e,a),new i(n,a),new i(n,r)];if(t.length>2)for(var u=0,f=c;u=0)return!0;return!1}(a,f)){var h=this.sourceLayerCoder.decode(r),p=this.vtLayers[h].feature(n);if(i.filter(new pi(this.tileID.overscaledZ),p))for(var d=this.getId(p,h),g=0;gn)i=!1;else if(e)if(this.expirationTimeot&&(t.getActor().send(\"enforceCacheSizeLimit\",at),ht=0)},t.clamp=l,t.clearTileCache=function(t){var e=self.caches.delete(\"mapbox-tiles\");t&&e.catch(t).then((function(){return t()}))},t.clipLine=ec,t.clone=function(t){var e=new fo(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},t.clone$1=x,t.clone$2=function(t){var e=new fo(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=tl,t.config=F,t.create=function(){var t=new fo(16);return fo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=function(){var t=new fo(9);return fo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},t.create$2=function(){var t=new fo(4);return fo!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=Wr,t.createLayout=Ii,t.createStyleLayer=function(t){return\"custom\"===t.type?new Dc(t):new Rc[t.type](t)},t.cross=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},t.deepEqual=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var n=0;n0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t},t.number=qe,t.offscreenCanvasSupported=pt,t.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},t.parseGlyphPBF=function(t){return new al(t).readFields(Tl,[])},t.pbf=al,t.performSymbolLayout=function(t,e,r,n,i,a,o){t.createArrays();var s=512*t.overscaling;t.tilePixelRatio=8192/s,t.compareText={},t.iconsNeedLinear=!1;var l=t.layers[0].layout,c=t.layers[0]._unevaluatedLayout._values,u={};if(\"composite\"===t.textSizeData.kind){var f=t.textSizeData,h=f.minZoom,p=f.maxZoom;u.compositeTextSizes=[c[\"text-size\"].possiblyEvaluate(new pi(h),o),c[\"text-size\"].possiblyEvaluate(new pi(p),o)]}if(\"composite\"===t.iconSizeData.kind){var d=t.iconSizeData,g=d.minZoom,m=d.maxZoom;u.compositeIconSizes=[c[\"icon-size\"].possiblyEvaluate(new pi(g),o),c[\"icon-size\"].possiblyEvaluate(new pi(m),o)]}u.layoutTextSize=c[\"text-size\"].possiblyEvaluate(new pi(t.zoom+1),o),u.layoutIconSize=c[\"icon-size\"].possiblyEvaluate(new pi(t.zoom+1),o),u.textMaxSize=c[\"text-size\"].possiblyEvaluate(new pi(18));for(var v=24*l.get(\"text-line-height\"),y=\"map\"===l.get(\"text-rotation-alignment\")&&\"point\"!==l.get(\"symbol-placement\"),x=l.get(\"text-keep-upright\"),b=l.get(\"text-size\"),w=function(){var a=k[T],s=l.get(\"text-font\").evaluate(a,{},o).join(\",\"),c=b.evaluate(a,{},o),f=u.layoutTextSize.evaluate(a,{},o),h=u.layoutIconSize.evaluate(a,{},o),p={horizontal:{},vertical:void 0},d=a.text,g=[0,0];if(d){var m=d.toString(),w=24*l.get(\"text-letter-spacing\").evaluate(a,{},o),A=function(t){for(var e=0,r=t;e=8192||f.y<0||f.y>=8192||function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,w,T,k,A){var M,S,E,L,C,P=t.addToLineVertexArray(e,r),I=0,O=0,z=0,D=0,R=-1,F=-1,B={},N=ya(\"\"),j=0,U=0;void 0===s._unevaluatedLayout.getValue(\"text-radial-offset\")?(M=s.layout.get(\"text-offset\").evaluate(b,{},k).map((function(t){return 24*t})),j=M[0],U=M[1]):(j=24*s.layout.get(\"text-radial-offset\").evaluate(b,{},k),U=pc);if(t.allowVerticalPlacement&&n.vertical){var V=s.layout.get(\"text-rotate\").evaluate(b,{},k)+90,H=n.vertical;L=new sc(l,e,c,u,f,H,h,p,d,V),o&&(C=new sc(l,e,c,u,f,o,m,v,d,V))}if(i){var q=s.layout.get(\"icon-rotate\").evaluate(b,{}),G=\"none\"!==s.layout.get(\"icon-text-fit\"),Y=rc(i,q,T,G),W=o?rc(o,q,T,G):void 0;E=new sc(l,e,c,u,f,i,m,v,!1,q),I=4*Y.length;var X=t.iconSizeData,Z=null;\"source\"===X.kind?(Z=[128*s.layout.get(\"icon-size\").evaluate(b,{})])[0]>32640&&_(t.layerIds[0]+': Value for \"icon-size\" is >= 255. Reduce your \"icon-size\".'):\"composite\"===X.kind&&((Z=[128*w.compositeIconSizes[0].evaluate(b,{},k),128*w.compositeIconSizes[1].evaluate(b,{},k)])[0]>32640||Z[1]>32640)&&_(t.layerIds[0]+': Value for \"icon-size\" is >= 255. Reduce your \"icon-size\".'),t.addSymbols(t.icon,Y,Z,x,y,b,!1,e,P.lineStartIndex,P.lineLength,-1,k),R=t.icon.placedSymbolArray.length-1,W&&(O=4*W.length,t.addSymbols(t.icon,W,Z,x,y,b,Cl.vertical,e,P.lineStartIndex,P.lineLength,-1,k),F=t.icon.placedSymbolArray.length-1)}for(var J in n.horizontal){var K=n.horizontal[J];if(!S){N=ya(K.text);var Q=s.layout.get(\"text-rotate\").evaluate(b,{},k);S=new sc(l,e,c,u,f,K,h,p,d,Q)}var $=1===K.positionedLines.length;if(z+=mc(t,e,K,a,s,d,b,g,P,n.vertical?Cl.horizontal:Cl.horizontalOnly,$?Object.keys(n.horizontal):[J],B,R,w,k),$)break}n.vertical&&(D+=mc(t,e,n.vertical,a,s,d,b,g,P,Cl.vertical,[\"vertical\"],B,F,w,k));var tt=S?S.boxStartIndex:t.collisionBoxArray.length,et=S?S.boxEndIndex:t.collisionBoxArray.length,rt=L?L.boxStartIndex:t.collisionBoxArray.length,nt=L?L.boxEndIndex:t.collisionBoxArray.length,it=E?E.boxStartIndex:t.collisionBoxArray.length,at=E?E.boxEndIndex:t.collisionBoxArray.length,ot=C?C.boxStartIndex:t.collisionBoxArray.length,st=C?C.boxEndIndex:t.collisionBoxArray.length,lt=-1,ct=function(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e};lt=ct(S,lt),lt=ct(L,lt),lt=ct(E,lt);var ut=(lt=ct(C,lt))>-1?1:0;ut&&(lt*=A/24);t.glyphOffsetArray.length>=Mc.MAX_GLYPHS&&_(\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\");void 0!==b.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey);t.symbolInstances.emplaceBack(e.x,e.y,B.right>=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,R,F,N,tt,et,rt,nt,it,at,ot,st,c,z,D,I,O,ut,0,h,j,U,lt)}(t,f,s,r,n,i,h,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,v,w,A,l,x,T,M,d,e,a,c,u,o)};if(\"line\"===S)for(var P=0,I=ec(e.geometry,0,0,8192,8192);P1){var V=$l(U,k,r.vertical||g,n,24,y);V&&C(U,V)}}else if(\"Polygon\"===e.type)for(var H=0,q=hs(e.geometry,0);H=E.maxzoom))if(\"none\"!==E.visibility)o(S,this.zoom,n),(g[E.id]=E.createBucket({index:u.bucketLayerIDs.length,layers:S,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:b,sourceID:this.source})).populate(_,m,this.tileID.canonical),u.bucketLayerIDs.push(S.map((function(t){return t.id})))}}}var L=t.mapObject(m.glyphDependencies,(function(t){return Object.keys(t).map(Number)}));Object.keys(L).length?a.send(\"getGlyphs\",{uid:this.uid,stacks:L},(function(t,e){f||(f=t,h=e,I.call(l))})):h={};var C=Object.keys(m.iconDependencies);C.length?a.send(\"getImages\",{icons:C,source:this.source,tileID:this.tileID,type:\"icons\"},(function(t,e){f||(f=t,p=e,I.call(l))})):p={};var P=Object.keys(m.patternDependencies);function I(){if(f)return s(f);if(h&&p&&d){var e=new i(h),r=new t.ImageAtlas(p,d);for(var a in g){var l=g[a];l instanceof t.SymbolBucket?(o(l.layers,this.zoom,n),t.performSymbolLayout(l,h,e.positions,p,r.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof t.LineBucket||l instanceof t.FillBucket||l instanceof t.FillExtrusionBucket)&&(o(l.layers,this.zoom,n),l.addFeatures(m,this.tileID.canonical,r.patternPositions))}this.status=\"done\",s(null,{buckets:t.values(g).filter((function(t){return!t.isEmpty()})),featureIndex:u,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?e.positions:null})}}P.length?a.send(\"getImages\",{icons:P,source:this.source,tileID:this.tileID,type:\"patterns\"},(function(t,e){f||(f=t,d=e,I.call(l))})):d={},I.call(this)};var l=function(t,e,r,n){this.actor=t,this.layerIndex=e,this.availableImages=r,this.loadVectorData=n||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(e,r){var n=this,i=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request),s=this.loading[i]=new a(e);s.abort=this.loadVectorData(e,(function(e,a){if(delete n.loading[i],e||!a)return s.status=\"done\",n.loaded[i]=s,r(e);var l=a.rawData,c={};a.expires&&(c.expires=a.expires),a.cacheControl&&(c.cacheControl=a.cacheControl);var u={};if(o){var f=o.finish();f&&(u.resourceTiming=JSON.parse(JSON.stringify(f)))}s.vectorTile=a.vectorTile,s.parse(a.vectorTile,n.layerIndex,n.availableImages,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]=s}))},l.prototype.reloadTile=function(t,e){var r=this,n=this.loaded,i=t.uid,a=this;if(n&&n[i]){var o=n[i];o.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,n){var i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,a.layerIndex,r.availableImages,a.actor,i)),e(t,n)};\"parsing\"===o.status?o.reloadCallback=s:\"done\"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.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()},l.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var c=t.window.ImageBitmap,u=function(){this.loaded={}};u.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,a=e.rawImageData,o=c&&a instanceof c?this.getImageData(a):a,s=new t.DEMData(n,o,i);this.loaded=this.loaded||{},this.loaded[n]=s,r(null,s)},u.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext(\"2d\")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var r=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:r.width,height:r.height},r.data)},u.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var f=function t(e,r){var n,i=e&&e.type;if(\"FeatureCollection\"===i)for(n=0;n=0!=!!e&&t.reverse()}var d=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,g=function(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,\"id\"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};g.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r>31}function P(t,e){for(var r=t.loadGeometry(),n=t.type,i=0,a=0,o=r.length,s=0;s>1;!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),h=Math.max(i,Math.floor(n-l*u/s+f)),p=Math.min(a,Math.floor(n+(s-l)*u/s+f));t(e,r,n,h,p,o)}var d=r[2*n+o],g=i,m=a;for(z(e,r,i,n),r[2*a+o]>d&&z(e,r,i,a);gd;)m--}r[2*i+o]===d?z(e,r,i,m):(m++,z(e,r,m,a)),m<=n&&(i=m+1),n<=m&&(a=m-1)}}(t,e,o,n,i,a%2),O(t,e,r,n,o-1,a+1),O(t,e,r,o+1,i,a+1)}}function z(t,e,r,n){D(t,r,n),D(e,2*r,2*n),D(e,2*r+1,2*n+1)}function D(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function R(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}_.fromVectorTileJs=w,_.fromGeojsonVt=T,_.GeoJSONWrapper=k;var F=function(t){return t[0]},B=function(t){return t[1]},N=function(t,e,r,n,i){void 0===e&&(e=F),void 0===r&&(r=B),void 0===n&&(n=64),void 0===i&&(i=Float64Array),this.nodeSize=n,this.points=t;for(var a=t.length<65536?Uint16Array:Uint32Array,o=this.ids=new a(t.length),s=this.coords=new i(2*t.length),l=0;l=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 m=(f+1)%2;(0===f?r<=s:n<=l)&&(c.push(p),c.push(g-1),c.push(m)),(0===f?i>=s:a>=l)&&(c.push(g+1),c.push(h),c.push(m))}}return u}(this.ids,this.coords,t,e,r,n,this.nodeSize)},N.prototype.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++)R(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];R(d,g,r,n)<=l&&s.push(t[p]);var m=(c+1)%2;(0===c?r-i<=d:n-i<=g)&&(o.push(f),o.push(p-1),o.push(m)),(0===c?r+i>=d:n+i>=g)&&(o.push(p+1),o.push(u),o.push(m))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var j={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},U=function(t){this.options=X(Object.create(j),t),this.trees=new Array(this.options.maxZoom+1)};function V(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function H(t,e){var r=t.geometry.coordinates,n=r[0],i=r[1];return{x:Y(n),y:W(i),zoom:1/0,index:e,parentId:-1}}function q(t){return{type:\"Feature\",id:t.id,properties:G(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 G(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+\"k\":e>=1e3?Math.round(e/100)/10+\"k\":e;return X(X({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function Y(t){return t/360+.5}function W(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 X(t,e){for(var r in e)t[r]=e[r];return t}function Z(t){return t.x}function J(t){return t.y}function K(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 Q(t,e,r,n){var i={id:void 0===t?null:t,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)$(t,e);else if(\"Polygon\"===r||\"MultiLineString\"===r)for(var n=0;n0&&(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=n-r>>1,l=n-r,c=e[r],u=e[r+1],f=e[n],h=e[n+1],p=r+3;po)a=p,o=d;else if(d===o){var g=Math.abs(p-s);gi&&(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 nt(t,e,r,n){for(var i=0;i1?1:r}function ot(t,e,r,n,i,a,o,s){if(n/=e,a>=(r/=e)&&o=n)return null;for(var l=[],c=0;c=r&&d=n)){var g=[];if(\"Point\"===h||\"MultiPoint\"===h)st(f,g,r,n,i);else if(\"LineString\"===h)lt(f,g,r,n,i,!1,s.lineMetrics);else if(\"MultiLineString\"===h)ut(f,g,r,n,i,!1);else if(\"Polygon\"===h)ut(f,g,r,n,i,!0);else if(\"MultiPolygon\"===h)for(var m=0;m=r&&o<=n&&(e.push(t[a]),e.push(t[a+1]),e.push(t[a+2]))}}function lt(t,e,r,n,i,a,o){for(var s,l,c=ct(t),u=0===i?ht:pt,f=t.start,h=0;hr&&(l=u(c,p,d,m,v,r),o&&(c.start=f+s*l)):y>n?x=r&&(l=u(c,p,d,m,v,r),b=!0),x>n&&y<=n&&(l=u(c,p,d,m,v,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&&ft(c,p,d,g),_=c.length-3,a&&_>=3&&(c[_]!==c[0]||c[_+1]!==c[1])&&ft(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 ut(t,e,r,n,i,a){for(var o=0;oo.maxX&&(o.maxX=u),f>o.maxY&&(o.maxY=f)}return o}function xt(t,e,r,n){var i=e.geometry,a=e.type,o=[];if(\"Point\"===a||\"MultiPoint\"===a)for(var s=0;s0&&e.size<(i?o:n))r.numPoints+=e.length/3;else{for(var s=[],l=0;lo)&&(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;n0===e)for(n=0,i=t.length;n24)throw new Error(\"maxZoom should be in the 0-24 range\");if(e.promoteId&&e.generateId)throw new Error(\"promoteId and generateId cannot be used together.\");var n=function(t,e){var r=[];if(\"FeatureCollection\"===t.type)for(var n=0;n=n;c--){var u=+Date.now();s=this._cluster(s,c),this.trees[c]=new N(s,Z,J,a,Float32Array),r&&console.log(\"z%d: %d clusters in %dms\",c,s.length,+Date.now()-u)}return r&&console.timeEnd(\"total time\"),this},U.prototype.getClusters=function(t,e){var r=((t[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,i=180;else if(r>i){var o=this.getClusters([r,n,180,a],e),s=this.getClusters([-180,n,i,a],e);return o.concat(s)}for(var l=this.trees[this._limitZoom(e)],c=[],u=0,f=l.range(Y(r),W(a),Y(i),W(n));u1?this._map(c,!0):null,m=(l<<5)+(e+1)+this.points.length,v=0,y=f;v>5},U.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},U.prototype._map=function(t,e){if(t.numPoints)return e?X({},t.properties):t.properties;var r=this.points[t.index].properties,n=this.options.map(r);return e&&n===r?X({},n):n},_t.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},_t.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<1&&console.time(\"creation\"),h=this.tiles[f]=yt(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<1&&console.time(\"clipping\");var g,m,v,y,x,b,_=.5*l.buffer/l.extent,w=.5-_,T=.5+_,k=1+_;g=m=v=y=null,x=ot(t,u,r-_,r+T,0,h.minX,h.maxX,l),b=ot(t,u,r+w,r+k,0,h.minX,h.maxX,l),t=null,x&&(g=ot(x,u,n-_,n+T,1,h.minY,h.maxY,l),m=ot(x,u,n+w,n+k,1,h.minY,h.maxY,l),x=null),b&&(v=ot(b,u,n-_,n+T,1,h.minY,h.maxY,l),y=ot(b,u,n+w,n+k,1,h.minY,h.maxY,l),b=null),c>1&&console.timeEnd(\"clipping\"),s.push(g||[],e+1,2*r,2*n),s.push(m||[],e+1,2*r,2*n+1),s.push(v||[],e+1,2*r+1,2*n),s.push(y||[],e+1,2*r+1,2*n+1)}}},_t.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<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[wt(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]?mt(this.tiles[s],i):null):null};var kt=function(e){function r(t,r,n,i){e.call(this,t,r,n,Tt),i&&(this.loadGeoJSON=i)}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 e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(n&&n.request&&n.request.collectResourceTiming)&&new t.RequestPerformance(n.request);this.loadGeoJSON(n,(function(a,o){if(a||!o)return r(a);if(\"object\"!=typeof o)return r(new Error(\"Input data given to '\"+n.source+\"' is not a valid GeoJSON object.\"));f(o,!0);try{e._geoJSONIndex=n.cluster?new U(function(e){var r=e.superclusterOptions,n=e.clusterProperties;if(!n||!r)return r;for(var i={},a={},o={accumulated:null,zoom:0},s={properties:null},l=Object.keys(n),c=0,u=l;c=0?0:e.button},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var h=function(e){function r(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requestors;e=0?1.2:1))}function v(t,e,r,n,i,a,o){for(var s=0;s65535)e(new Error(\"glyphs > 65535 not supported\"));else if(a.ranges[s])e(null,{stack:r,id:i,glyph:o});else{var l=a.requests[s];l||(l=a.requests[s]=[],x.loadGlyphRange(r,s,n.url,n.requestManager,(function(t,e){if(e){for(var r in e)n._doesCharSupportLocalGlyph(+r)||(a.glyphs[+r]=e[+r]);a.ranges[s]=!0}for(var i=0,o=l;i1&&(l=t[++s]);var u=Math.abs(c-l.left),f=Math.abs(c-l.right),h=Math.min(u,f),p=void 0,d=i/r*(n+1);if(l.isDash){var g=n-Math.abs(d);p=Math.sqrt(h*h+g*g)}else p=n-Math.sqrt(h*h+d*d);this.data[o+c]=Math.max(0,Math.min(255,p+128))}},T.prototype.addRegularDash=function(t){for(var e=t.length-1;e>=0;--e){var r=t[e],n=t[e+1];r.zeroLength?t.splice(e,1):n&&n.isDash===r.isDash&&(n.left=r.left,t.splice(e,1))}var i=t[0],a=t[t.length-1];i.isDash===a.isDash&&(i.left=a.left-this.width,a.right=i.right+this.width);for(var o=this.width*this.nextRow,s=0,l=t[s],c=0;c1&&(l=t[++s]);var u=Math.abs(c-l.left),f=Math.abs(c-l.right),h=Math.min(u,f),p=l.isDash?h:-h;this.data[o+c]=Math.max(0,Math.min(255,p+128))}},T.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=n&&e.x=i&&e.y0&&(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+10&&(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)r.fire(new t.ErrorEvent(e));else{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.getClusterExpansionZoom=function(t,e){return this.actor.send(\"geojson.getClusterExpansionZoom\",{clusterId:t,source:this.id},e),this},r.prototype.getClusterChildren=function(t,e){return this.actor.send(\"geojson.getClusterChildren\",{clusterId:t,source:this.id},e),this},r.prototype.getClusterLeaves=function(t,e,r,n){return this.actor.send(\"geojson.getClusterLeaves\",{source:this.id,clusterId:t,limit:e,offset:r},n),this},r.prototype._updateWorkerData=function(e){var r=this;this._loaded=!1;var n=t.extend({},this.workerOptions),i=this._data;\"string\"==typeof i?(n.request=this.map._requestManager.transformRequest(t.browser.resolveURL(i),t.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(i),this.actor.send(this.type+\".loadData\",n,(function(t,i){r._removed||i&&i.abandoned||(r._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[r.id]&&(r._resourceTiming=i.resourceTiming[r.id].slice(0)),r.actor.send(r.type+\".coalesce\",{source:n.source},null),e(t))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(e,r){var n=this,i=e.actor?\"reloadTile\":\"loadTile\";e.actor=this.actor;var a={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};e.request=this.actor.send(i,a,(function(t,a){return delete e.request,e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(a,n.map.painter,\"reloadTile\"===i),r(null))}))},r.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.actor.send(\"removeTile\",{uid:t.uid,type:this.type,source:this.id})},r.prototype.onRemove=function(){this._removed=!0,this.actor.send(\"removeSource\",{type:this.type,source:this.id})},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),P=t.createLayout([{name:\"a_pos\",type:\"Int16\",components:2},{name:\"a_texture_pos\",type:\"Int16\",components:2}]),I=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._loaded=!1,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(e,r){var n=this;this._loaded=!1,this.fire(new t.Event(\"dataloading\",{dataType:\"source\"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),(function(i,a){n._loaded=!0,i?n.fire(new t.ErrorEvent(i)):a&&(n.image=a,e&&(n.coordinates=e),r&&r(),n._finishLoading())}))},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,(function(){e.texture=null})),this):this},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){var r=this;this.coordinates=e;var n=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var r=1/0,n=1/0,i=-1/0,a=-1/0,o=0,s=e;or.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+this.id,null,\"Playback for this video can be set only between the \"+r.start(0)+\" and \"+r.end(0)+\"-second mark.\"))):this.video.currentTime=e}},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 e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,P.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,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:\"video\",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(I),z=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.ValidationError(\"sources.\"+r,null,'\"coordinates\" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+r,null,'missing required property \"coordinates\"'))),n.animate&&\"boolean\"!=typeof n.animate&&this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+r,null,'optional \"animate\" property must be a boolean value'))),n.canvas?\"string\"==typeof n.canvas||n.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError(\"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.ValidationError(\"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._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.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.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),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 e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,P.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var a=this.tiles[i];\"loaded\"!==a.state&&(a.state=\"loaded\",a.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];tthis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},N.prototype.has=function(t){return t.wrapped().key in this.data},N.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},N.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},N.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},N.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},N.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},N.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},N.prototype.filter=function(t){var e=[];for(var r in this.data)for(var n=0,i=this.data[r];n1||(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._retainLoadedChildren=function(t,e,r,n){for(var i in this._tiles){var a=this._tiles[i];if(!(n[i]||!a.hasData()||a.tileID.overscaledZ<=e||a.tileID.overscaledZ>r)){for(var o=a.tileID;a&&a.tileID.overscaledZ>e+1;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);(a=this._tiles[s.key])&&a.hasData()&&(o=s)}for(var l=o;l.overscaledZ>e;)if(t[(l=l.scaledTo(l.overscaledZ-1)).key]){n[o.key]=o;break}}}},r.prototype.findLoadedParent=function(t,e){if(t.key in this._loadedParentTiles){var r=this._loadedParentTiles[t.key];return r&&r.tileID.overscaledZ>=e?r:null}for(var n=t.overscaledZ-1;n>=e;n--){var i=t.scaledTo(n),a=this._getLoadedTile(i);if(a)return a}},r.prototype._getLoadedTile=function(t){var e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},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 a=e.coveringZoomLevel(this._source),o=Math.max(a-r.maxOverzooming,this._source.minzoom),s=Math.max(a+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,a);if(It(this._source.type)){for(var c={},u={},f=0,h=Object.keys(l);fthis._source.maxzoom){var m=d.children(this._source.maxzoom)[0],v=this.getTile(m);if(v&&v.hasData()){n[m.key]=m;continue}}else{var y=d.children(this._source.maxzoom);if(n[y[0].key]&&n[y[1].key]&&n[y[2].key]&&n[y[3].key])continue}for(var x=g.wasRequested(),b=d.overscaledZ-1;b>=a;--b){var _=d.scaledTo(b);if(i[_.key])break;if(i[_.key]=!0,!(g=this.getTile(_))&&x&&(g=this._addTile(_)),g&&(n[_.key]=_,x=g.wasRequested(),g.hasData()))break}}}return n},r.prototype._updateLoadedParentTileCache=function(){for(var t in this._loadedParentTiles={},this._tiles){for(var e=[],r=void 0,n=this._tiles[t].tileID;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}e.push(n.key);var i=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(i))break;n=i}for(var a=0,o=e;a0||(e.hasData()&&\"reloading\"!==e.state?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,n){var i=this,a=[],o=this.transform;if(!o)return a;for(var s=n?o.getCameraQueryGeometry(e):e,l=e.map((function(t){return o.pointCoordinate(t)})),c=s.map((function(t){return o.pointCoordinate(t)})),u=this.getIds(),f=1/0,h=1/0,p=-1/0,d=-1/0,g=0,m=c;g=0&&v[1].y+m>=0){var y=l.map((function(t){return s.getTilePoint(t)})),x=c.map((function(t){return s.getTilePoint(t)}));a.push({tile:n,tileID:s,queryGeometry:y,cameraQueryGeometry:x,scale:g})}}},x=0;x=t.browser.now())return!0}return!1},r.prototype.setFeatureState=function(t,e,r){t=t||\"_geojsonTileLayer\",this._state.updateState(t,e,r)},r.prototype.removeFeatureState=function(t,e,r){t=t||\"_geojsonTileLayer\",this._state.removeFeatureState(t,e,r)},r.prototype.getFeatureState=function(t,e){return t=t||\"_geojsonTileLayer\",this._state.getState(t,e)},r.prototype.setDependencies=function(t,e,r){var n=this._tiles[t];n&&n.setDependencies(e,r)},r.prototype.reloadTilesForDependencies=function(t,e){for(var r in this._tiles){this._tiles[r].hasDependency(t,e)&&this._reloadTile(r,\"reloading\")}this._cache.filter((function(r){return!r.hasDependency(t,e)}))},r}(t.Evented);function Pt(t,e){var r=Math.abs(2*t.wrap)-+(t.wrap<0),n=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||n-r||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function It(t){return\"raster\"===t||\"image\"===t||\"video\"===t}function Ot(){return new t.window.Worker(Zi.workerUrl)}Ct.maxOverzooming=10,Ct.maxUnderzooming=3;var zt=\"mapboxgl_preloaded_worker_pool\",Dt=function(){this.active={}};Dt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length0?(i-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))};var Kt=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=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function ne(e,r,n,i,a,o,s,l){var c=i?e.textSizeData:e.iconSizeData,u=t.evaluateSizeForZoom(c,n.transform.zoom),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,m=!1,v=0;vMath.abs(n.x-r.x)*i)return{useVertical:!0};return(e===t.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function oe(e,r,n,i,a,o,s,l,c,u,f,h,p,d){var g,m=r/24,v=e.lineOffsetX*m,y=e.lineOffsetY*m;if(e.numGlyphs>1){var x=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,_=e.lineStartIndex+e.lineLength,w=ie(m,l,v,y,n,f,h,e,c,o,p);if(!w)return{notEnoughRoom:!0};var T=te(w.first.point,s).point,k=te(w.last.point,s).point;if(i&&!n){var A=ae(e.writingMode,T,k,d);if(A)return A}g=[w.first];for(var M=e.glyphStartIndex+1;M0?C.point:se(h,L,S,1,a),I=ae(e.writingMode,S,P,d);if(I)return I}var O=le(m*l.getoffsetX(e.glyphStartIndex),v,y,n,f,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,c,o,p);if(!O)return{notEnoughRoom:!0};g=[O]}for(var z=0,D=g;z0?1:-1,g=0;i&&(d*=-1,g=Math.PI),d<0&&(g+=Math.PI);for(var m=d>0?l+s:l+s+1,v=a,y=a,x=0,b=0,_=Math.abs(p),w=[];x+b<=_;){if((m+=d)=c)return null;if(y=v,w.push(v),void 0===(v=h[m])){var T=new t.Point(u.getx(m),u.gety(m)),k=te(T,f);if(k.signedDistanceFromCamera>0)v=h[m]=k.point;else{var A=m-d;v=se(0===x?o:new t.Point(u.getx(A),u.gety(A)),T,y,_-x+1,f)}}x+=b,b=y.dist(v)}var M=(_-x)/b,S=v.sub(y),E=S.mult(M)._add(y);E._add(S._unit()._perp()._mult(n*d));var L=g+Math.atan2(v.y-y.y,v.x-y.x);return w.push(E),{point:E,angle:L,path:w}}Kt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Kt.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)},Kt.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)},Kt.prototype._insertBoxCell=function(t,e,r,n,i,a){this.boxCells[i].push(a)},Kt.prototype._insertCircleCell=function(t,e,r,n,i,a){this.circleCells[i].push(a)},Kt.prototype._query=function(t,e,r,n,i,a){if(r<0||t>this.width||n<0||e>this.height)return!i&&[];var o=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var s=0;s0:o},Kt.prototype._queryCircle=function(t,e,r,n,i){var a=t-r,o=t+r,s=e-r,l=e+r;if(o<0||a>this.width||l<0||s>this.height)return!n&&[];var c=[],u={hitTest:n,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(a,s,o,l,this._queryCellCircle,c,u,i),n?c.length>0:c},Kt.prototype.query=function(t,e,r,n,i){return this._query(t,e,r,n,!1,i)},Kt.prototype.hitTest=function(t,e,r,n,i){return this._query(t,e,r,n,!0,i)},Kt.prototype.hitTestCircle=function(t,e,r,n){return this._queryCircle(t,e,r,!0,n)},Kt.prototype._queryCell=function(t,e,r,n,i,a,o,s){var l=o.seenUids,c=this.boxCells[i];if(null!==c)for(var u=this.bboxes,f=0,h=c;f=u[d+0]&&n>=u[d+1]&&(!s||s(this.boxKeys[p]))){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[p],x1:u[d],y1:u[d+1],x2:u[d+2],y2:u[d+3]})}}}var g=this.circleCells[i];if(null!==g)for(var m=this.circles,v=0,y=g;vo*o+s*s},Kt.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 ce=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ue(t,e){for(var r=0;r=1;P--)C.push(E.path[P]);for(var I=1;I0){for(var R=C[0].clone(),F=C[0].clone(),B=1;B=A.x&&F.x<=M.x&&R.y>=A.y&&F.y<=M.y?[C]:F.xM.x||F.yM.y?[]:t.clipLine([C],A.x,A.y,M.x,M.y)}for(var N=0,j=D;N=this.screenRightBoundary||n<100||e>this.screenBottomBoundary},he.prototype.isInsideGrid=function(t,e,r,n){return r>=0&&t=0&&e0)return this.prevPlacement&&this.prevPlacement.variableOffsets[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID].text&&(g=this.prevPlacement.variableOffsets[f.crossTileID].anchor),this.variableOffsets[f.crossTileID]={textOffset:m,width:r,height:n,anchor:t,textBoxScale:i,prevAnchor:g},this.markUsedJustification(h,t,f,p),h.allowVerticalPlacement&&(this.markUsedOrientation(h,p,f),this.placedOrientations[f.crossTileID]=p),{shift:v,placedGlyphBoxes:y}},we.prototype.placeLayerBucketPart=function(e,r,n){var i=this,a=e.parameters,o=a.bucket,s=a.layout,l=a.posMatrix,c=a.textLabelPlaneMatrix,u=a.labelToScreenMatrix,f=a.textPixelRatio,h=a.holdingForFade,p=a.collisionBoxArray,d=a.partiallyEvaluatedTextSize,g=a.collisionGroup,m=s.get(\"text-optional\"),v=s.get(\"icon-optional\"),y=s.get(\"text-allow-overlap\"),x=s.get(\"icon-allow-overlap\"),b=\"map\"===s.get(\"text-rotation-alignment\"),_=\"map\"===s.get(\"text-pitch-alignment\"),w=\"none\"!==s.get(\"icon-text-fit\"),T=\"viewport-y\"===s.get(\"symbol-z-order\"),k=y&&(x||!o.hasIconData()||v),A=x&&(y||!o.hasTextData()||m);!o.collisionArrays&&p&&o.deserializeCollisionBoxes(p);var M=function(e,a){if(!r[e.crossTileID])if(h)i.placements[e.crossTileID]=new me(!1,!1,!1);else{var p,T=!1,M=!1,S=!0,E=null,L={box:null,offscreen:null},C={box:null,offscreen:null},P=null,I=null,O=0,z=0,D=0;a.textFeatureIndex?O=a.textFeatureIndex:e.useRuntimeCollisionCircles&&(O=e.featureIndex),a.verticalTextFeatureIndex&&(z=a.verticalTextFeatureIndex);var R=a.textBox;if(R){var F=function(r){var n=t.WritingMode.horizontal;if(o.allowVerticalPlacement&&!r&&i.prevPlacement){var a=i.prevPlacement.placedOrientations[e.crossTileID];a&&(i.placedOrientations[e.crossTileID]=a,n=a,i.markUsedOrientation(o,n,e))}return n},B=function(r,n){if(o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&a.verticalTextBox)for(var i=0,s=o.writingModes;i0&&(N=N.filter((function(t){return t!==j.anchor}))).unshift(j.anchor)}var U=function(t,r,n){for(var a=t.x2-t.x1,s=t.y2-t.y1,c=e.textBoxScale,u=w&&!x?r:null,h={box:[],offscreen:!1},p=y?2*N.length:N.length,d=0;d=N.length,k=i.attemptAnchorPlacement(m,t,a,s,c,b,_,f,l,g,v,e,o,n,u);if(k&&(h=k.placedGlyphBoxes)&&h.box&&h.box.length){T=!0,E=k.shift;break}}return h};B((function(){return U(R,a.iconBox,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox,n=L&&L.box&&L.box.length;return o.allowVerticalPlacement&&!n&&e.numVerticalGlyphVertices>0&&r?U(r,a.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}})),L&&(T=L.box,S=L.offscreen);var V=F(L&&L.box);if(!T&&i.prevPlacement){var H=i.prevPlacement.variableOffsets[e.crossTileID];H&&(i.variableOffsets[e.crossTileID]=H,i.markUsedJustification(o,H.anchor,e,V))}}else{var q=function(t,r){var n=i.collisionIndex.placeCollisionBox(t,y,f,l,g.predicate);return n&&n.box&&n.box.length&&(i.markUsedOrientation(o,r,e),i.placedOrientations[e.crossTileID]=r),n};B((function(){return q(R,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox;return o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?q(r,t.WritingMode.vertical):{box:null,offscreen:null}})),F(L&&L.box&&L.box.length)}}if(T=(p=L)&&p.box&&p.box.length>0,S=p&&p.offscreen,e.useRuntimeCollisionCircles){var G=o.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),Y=t.evaluateSizeForFeature(o.textSizeData,d,G),W=s.get(\"text-padding\"),X=e.collisionCircleDiameter;P=i.collisionIndex.placeCollisionCircles(y,G,o.lineVertexArray,o.glyphOffsetArray,Y,l,c,u,n,_,g.predicate,X,W),T=y||P.circles.length>0&&!P.collisionDetected,S=S&&P.offscreen}if(a.iconFeatureIndex&&(D=a.iconFeatureIndex),a.iconBox){var Z=function(t){var e=w&&E?_e(t,E.x,E.y,b,_,i.transform.angle):t;return i.collisionIndex.placeCollisionBox(e,x,f,l,g.predicate)};M=C&&C.box&&C.box.length&&a.verticalIconBox?(I=Z(a.verticalIconBox)).box.length>0:(I=Z(a.iconBox)).box.length>0,S=S&&I.offscreen}var J=m||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,K=v||0===e.numIconVertices;if(J||K?K?J||(M=M&&T):T=M&&T:M=T=M&&T,T&&p&&p.box&&(C&&C.box&&z?i.collisionIndex.insertCollisionBox(p.box,s.get(\"text-ignore-placement\"),o.bucketInstanceId,z,g.ID):i.collisionIndex.insertCollisionBox(p.box,s.get(\"text-ignore-placement\"),o.bucketInstanceId,O,g.ID)),M&&I&&i.collisionIndex.insertCollisionBox(I.box,s.get(\"icon-ignore-placement\"),o.bucketInstanceId,D,g.ID),P&&(T&&i.collisionIndex.insertCollisionCircles(P.circles,s.get(\"text-ignore-placement\"),o.bucketInstanceId,O,g.ID),n)){var Q=o.bucketInstanceId,$=i.collisionCircleArrays[Q];void 0===$&&($=i.collisionCircleArrays[Q]=new ve);for(var tt=0;tt=0;--E){var L=S[E];M(o.symbolInstances.get(L),o.collisionArrays[L])}else for(var C=e.symbolInstanceStart;C=0&&(e.text.placedSymbolArray.get(c).crossTileID=a>=0&&c!==a?0:n.crossTileID)}},we.prototype.markUsedOrientation=function(e,r,n){for(var i=r===t.WritingMode.horizontal||r===t.WritingMode.horizontalOnly?r:0,a=r===t.WritingMode.vertical?r:0,o=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];o0||l>0,x=a.numIconVertices>0,b=i.placedOrientations[a.crossTileID],_=b===t.WritingMode.vertical,w=b===t.WritingMode.horizontal||b===t.WritingMode.horizontalOnly;if(y){var T=Pe(v.text),k=_?Ie:T;d(e.text,s,k);var A=w?Ie:T;d(e.text,l,A);var M=v.text.isHidden();[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach((function(t){t>=0&&(e.text.placedSymbolArray.get(t).hidden=M||_?1:0)})),a.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).hidden=M||w?1:0);var S=i.variableOffsets[a.crossTileID];S&&i.markUsedJustification(e,S.anchor,a,b);var E=i.placedOrientations[a.crossTileID];E&&(i.markUsedJustification(e,\"left\",a,E),i.markUsedOrientation(e,E,a))}if(x){var L=Pe(v.icon),C=!(h&&a.verticalPlacedIconSymbolIndex&&_);if(a.placedIconSymbolIndex>=0){var P=C?L:Ie;d(e.icon,a.numIconVertices,P),e.icon.placedSymbolArray.get(a.placedIconSymbolIndex).hidden=v.icon.isHidden()}if(a.verticalPlacedIconSymbolIndex>=0){var I=C?Ie:L;d(e.icon,a.numVerticalIconVertices,I),e.icon.placedSymbolArray.get(a.verticalPlacedIconSymbolIndex).hidden=v.icon.isHidden()}}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var O=e.collisionArrays[n];if(O){var z=new t.Point(0,0);if(O.textBox||O.verticalTextBox){var D=!0;if(c){var R=i.variableOffsets[g];R?(z=be(R.anchor,R.width,R.height,R.textOffset,R.textBoxScale),u&&z._rotate(f?i.transform.angle:-i.transform.angle)):D=!1}O.textBox&&Te(e.textCollisionBox.collisionVertexArray,v.text.placed,!D||_,z.x,z.y),O.verticalTextBox&&Te(e.textCollisionBox.collisionVertexArray,v.text.placed,!D||w,z.x,z.y)}var F=Boolean(!w&&O.verticalIconBox);O.iconBox&&Te(e.iconCollisionBox.collisionVertexArray,v.icon.placed,F,h?z.x:0,h?z.y:0),O.verticalIconBox&&Te(e.iconCollisionBox.collisionVertexArray,v.icon.placed,!F,h?z.x:0,h?z.y:0)}}},m=0;mt},we.prototype.setStale=function(){this.stale=!0};var ke=Math.pow(2,25),Ae=Math.pow(2,24),Me=Math.pow(2,17),Se=Math.pow(2,16),Ee=Math.pow(2,9),Le=Math.pow(2,8),Ce=Math.pow(2,1);function Pe(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*ke+e*Ae+r*Me+e*Se+r*Ee+e*Le+r*Ce+e}var Ie=0,Oe=function(t){this._sortAcrossTiles=\"viewport-y\"!==t.layout.get(\"symbol-z-order\")&&void 0!==t.layout.get(\"symbol-sort-key\").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Oe.prototype.continuePlacement=function(t,e,r,n,i){for(var a=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=r[e[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if(\"symbol\"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new Oe(s)),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},ze.prototype.commit=function(t){return this.placement.commit(t),this.placement};var De=512/t.EXTENT/2,Re=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;nt.overscaledZ)for(var s in o){var l=o[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,i)}else{var c=o[t.scaledTo(Number(a)).key];c&&c.findMatches(e.symbolInstances,t,i)}}for(var u=0;u1?\"@2x\":\"\",l=t.getJSON(r.transformRequest(r.normalizeSpriteURL(e,s,\".json\"),t.ResourceType.SpriteJSON),(function(t,e){l=null,o||(o=t,i=e,u())})),c=t.getImage(r.transformRequest(r.normalizeSpriteURL(e,s,\".png\"),t.ResourceType.SpriteImage),(function(t,e){c=null,o||(o=t,a=e,u())}));function u(){if(o)n(o);else if(i&&a){var e=t.browser.getImageData(a),r={};for(var s in i){var l=i[s],c=l.width,u=l.height,f=l.x,h=l.y,p=l.sdf,d=l.pixelRatio,g=l.stretchX,m=l.stretchY,v=l.content,y=new t.RGBAImage({width:c,height:u});t.RGBAImage.copy(e,y,{x:f,y:h},{x:0,y:0},{width:c,height:u}),r[s]={data:y,pixelRatio:d,sdf:p,stretchX:g,stretchY:m,content:v}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(e,this.map._requestManager,(function(e,n){if(r._spriteRequest=null,e)r.fire(new t.ErrorEvent(e));else if(n)for(var i in n)r.imageManager.addImage(i,n[i]);r.imageManager.setLoaded(!0),r._availableImages=r.imageManager.listImages(),r.dispatcher.broadcast(\"setImages\",r._availableImages),r.fire(new t.Event(\"data\",{dataType:\"style\"}))}))},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){for(var e=[],r=0,n=t;r0)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._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event(\"data\",{dataType:\"style\"}))},r.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},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._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event(\"data\",{dataType:\"style\"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(e,r,n){var i=this;if(void 0===n&&(n={}),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 Ct(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){void 0===n&&(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{var a;if(\"custom\"===e.type){if(je(this,t.validateCustomStyleLayer(e)))return;a=t.createStyleLayer(e)}else{if(\"object\"==typeof e.source&&(this.addSource(i,e.source),e=t.clone$1(e),e=t.extend(e,{source:i})),this._validate(t.validateStyle.layer,\"layers.\"+i,e,{arrayIndex:-1},n))return;a=t.createStyleLayer(e),this._validateLayer(a),a.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[a.id]=a.serialize()}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&&\"custom\"!==a.type){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),a.onAdd&&a.onAdd(this.map)}}},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._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}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.hasLayer=function(t){return t in this._layers},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,n){void 0===n&&(n={}),this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.deepEqual(i.filter,r))return null==r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(t.validateStyle.filter,\"layers.\"+i.id+\".filter\",r,null,n)||(i.filter=t.clone$1(r),this._updateLayer(i)))}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$1(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getLayoutProperty(r),n)||(a.setLayoutProperty(r,n,i),this._updateLayer(a)):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(e,r){var n=this.getLayer(e);if(n)return n.getLayoutProperty(r);this.fire(new t.ErrorEvent(new Error(\"The layer '\"+e+\"' does not exist in the map's style.\")))},r.prototype.setPaintProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getPaintProperty(r),n)||(a.setPaintProperty(r,n,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[e]=!0):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.setFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=e.sourceLayer,a=this.sourceCaches[n];if(void 0!==a){var o=a.getSource().type;\"geojson\"===o&&i?this.fire(new t.ErrorEvent(new Error(\"GeoJSON sources cannot have a sourceLayer parameter.\"))):\"vector\"!==o||i?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error(\"The feature id parameter must be provided.\"))),a.setFeatureState(i,e.id,r)):this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+n+\"' does not exist in the map's style.\")))},r.prototype.removeFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=this.sourceCaches[n];if(void 0!==i){var a=i.getSource().type,o=\"vector\"===a?e.sourceLayer:void 0;\"vector\"!==a||o?r&&\"string\"!=typeof e.id&&\"number\"!=typeof e.id?this.fire(new t.ErrorEvent(new Error(\"A feature id is requred to remove its specific state property.\"))):i.removeFeatureState(o,e.id,r):this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+n+\"' does not exist in the map's style.\")))},r.prototype.getFeatureState=function(e){this._checkLoaded();var r=e.source,n=e.sourceLayer,i=this.sourceCaches[r];if(void 0!==i){if(\"vector\"!==i.getSource().type||n)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error(\"The feature id parameter must be provided.\"))),i.getFeatureState(n,e.id);this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+r+\"' does not exist in the map's style.\")))},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){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._serializeLayers(this._order)},(function(t){return void 0!==t}))},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&\"raster\"!==this.sourceCaches[t.source].getSource().type&&(this._updatedSources[t.source]=\"reload\",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,r=function(t){return\"fill-extrusion\"===e._layers[t].type},n={},i=[],a=this._order.length-1;a>=0;a--){var o=this._order[a];if(r(o)){n[o]=a;for(var s=0,l=t;s=0;d--){var g=this._order[d];if(r(g))for(var m=i.length-1;m>=0;m--){var v=i[m].feature;if(n[v.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}\",\"attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}\"),tr=yr(\"varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}\",\"attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}\"),er=yr(\"uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}\",\"attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}\"),rr=yr(\"#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float opacity\\ngl_FragColor=color*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"attribute vec2 a_pos;uniform mat4 u_matrix;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float opacity\\ngl_Position=u_matrix*vec4(a_pos,0,1);}\"),nr=yr(\"varying vec2 v_pos;\\n#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 outline_color\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\\n#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 outline_color\\n#pragma mapbox: initialize lowp float opacity\\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}\"),ir=yr(\"uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}\"),ar=yr(\"uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}\"),or=yr(\"varying vec4 v_color;void main() {gl_FragColor=v_color;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\\n#pragma mapbox: define highp float base\\n#pragma mapbox: define highp float height\\n#pragma mapbox: define highp vec4 color\\nvoid main() {\\n#pragma mapbox: initialize highp float base\\n#pragma mapbox: initialize highp float height\\n#pragma mapbox: initialize highp vec4 color\\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}\"),sr=yr(\"uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float base\\n#pragma mapbox: initialize lowp float height\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float base\\n#pragma mapbox: initialize lowp float height\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\\n? a_pos\\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}\"),lr=yr(\"#ifdef GL_ES\\nprecision highp float;\\n#endif\\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}\"),cr=yr(\"uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\\n#define PI 3.141592653589793\\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}\"),ur=yr(\"uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\\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\\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\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}\"),fr=yr(\"uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define MAX_LINE_DISTANCE 32767.0\\n#define scale 0.015873016\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\\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\\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\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}\"),hr=yr(\"uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\\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#pragma mapbox: define lowp float floorwidth\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\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#pragma mapbox: initialize lowp float floorwidth\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}\"),pr=yr(\"uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\\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\\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\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\\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\\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\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}\"),dr=yr(\"uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}\"),gr=yr(\"uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}\"),mr=yr(\"#define SDF_PX 8.0\\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\\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\\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\\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\\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\\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\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}\"),vr=yr(\"#define SDF_PX 8.0\\n#define SDF 1.0\\n#define ICON 0.0\\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\\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\\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\\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\\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\\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\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}\");function yr(t,e){var r=/#pragma mapbox: ([\\w]+) ([\\w]+) ([\\w]+) ([\\w]+)/g,n={};return{fragmentSource:t=t.replace(r,(function(t,e,r,i,a){return n[a]=!0,\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nvarying \"+r+\" \"+i+\" \"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"\\n#ifdef HAS_UNIFORM_u_\"+a+\"\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\"})),vertexSource:e=e.replace(r,(function(t,e,r,i,a){var o=\"float\"===i?\"vec2\":\"vec4\",s=a.match(/color/)?\"color\":o;return n[a]?\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nuniform lowp float u_\"+a+\"_t;\\nattribute \"+r+\" \"+o+\" a_\"+a+\";\\nvarying \"+r+\" \"+i+\" \"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"vec4\"===s?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+a+\" = a_\"+a+\";\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+a+\" = unpack_mix_\"+s+\"(a_\"+a+\", u_\"+a+\"_t);\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nuniform lowp float u_\"+a+\"_t;\\nattribute \"+r+\" \"+o+\" a_\"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"vec4\"===s?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+r+\" \"+i+\" \"+a+\" = a_\"+a+\";\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+r+\" \"+i+\" \"+a+\" = unpack_mix_\"+s+\"(a_\"+a+\", u_\"+a+\"_t);\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\"}))}}var xr=Object.freeze({__proto__:null,prelude:Ye,background:We,backgroundPattern:Xe,circle:Ze,clippingMask:Je,heatmap:Ke,heatmapTexture:Qe,collisionBox:$e,collisionCircle:tr,debug:er,fill:rr,fillOutline:nr,fillOutlinePattern:ir,fillPattern:ar,fillExtrusion:or,fillExtrusionPattern:sr,hillshadePrepare:lr,hillshade:cr,line:ur,lineGradient:fr,linePattern:hr,lineSDF:pr,raster:dr,symbolIcon:gr,symbolSDF:mr,symbolTextAndIcon:vr}),br=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};br.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>16,s>>16],u_pixel_coord_lower:[65535&o,65535&s]}}_r.prototype.draw=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g){var m,v=t.gl;if(!this.failedToCreate){for(var y in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(n),t.setColorMode(i),t.setCullFace(a),this.fixedUniforms)this.fixedUniforms[y].set(o[y]);p&&p.setUniforms(t,this.binderUniforms,f,{zoom:h});for(var x=(m={},m[v.LINES]=2,m[v.TRIANGLES]=3,m[v.LINE_STRIP]=1,m)[e],b=0,_=u.get();b<_.length;b+=1){var w=_[b],T=w.vaos||(w.vaos={});(T[s]||(T[s]=new br)).bind(t,this,l,p?p.getPaintVertexBuffers():[],c,w.vertexOffset,d,g),v.drawElements(e,w.primitiveLength*x,v.UNSIGNED_SHORT,w.primitiveOffset*x*2)}}};var Tr=function(e,r,n,i){var a=r.style.light,o=a.properties.get(\"position\"),s=[o.x,o.y,o.z],l=t.create$1();\"viewport\"===a.properties.get(\"anchor\")&&t.fromRotation(l,-r.transform.angle),t.transformMat3(s,s,l);var c=a.properties.get(\"color\");return{u_matrix:e,u_lightpos:s,u_lightintensity:a.properties.get(\"intensity\"),u_lightcolor:[c.r,c.g,c.b],u_vertical_gradient:+n,u_opacity:i}},kr=function(e,r,n,i,a,o,s){return t.extend(Tr(e,r,n,i),wr(o,r,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8})},Ar=function(t){return{u_matrix:t}},Mr=function(e,r,n,i){return t.extend(Ar(e),wr(n,r,i))},Sr=function(t,e){return{u_matrix:t,u_world:e}},Er=function(e,r,n,i,a){return t.extend(Mr(e,r,n,i),{u_world:a})},Lr=function(e,r,n,i){var a,o,s=e.transform;if(\"map\"===i.paint.get(\"circle-pitch-alignment\")){var l=pe(n,1,s.zoom);a=!0,o=[l,l]}else a=!1,o=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+(\"map\"===i.paint.get(\"circle-pitch-scale\")),u_matrix:e.translatePosMatrix(r.posMatrix,n,i.paint.get(\"circle-translate\"),i.paint.get(\"circle-translate-anchor\")),u_pitch_with_map:+a,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:o}},Cr=function(t,e,r){var n=pe(r,1,e.zoom),i=Math.pow(2,e.zoom-r.tileID.overscaledZ),a=r.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:n,u_extrude_scale:[e.pixelsToGLUnits[0]/(n*i),e.pixelsToGLUnits[1]/(n*i)],u_overscale_factor:a}},Pr=function(t,e,r){return{u_matrix:t,u_inv_matrix:e,u_camera_to_center_distance:r.cameraToCenterDistance,u_viewport_size:[r.width,r.height]}},Ir=function(t,e,r){return void 0===r&&(r=1),{u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:r}},Or=function(t){return{u_matrix:t}},zr=function(t,e,r,n){return{u_matrix:t,u_extrude_scale:pe(e,1,r),u_intensity:n}};function Dr(e,r){var n=Math.pow(2,r.canonical.z),i=r.canonical.y;return[new t.MercatorCoordinate(0,i/n).toLngLat().lat,new t.MercatorCoordinate(0,(i+1)/n).toLngLat().lat]}var Rr=function(e,r,n){var i=e.transform;return{u_matrix:Ur(e,r,n),u_ratio:1/pe(r,1,i.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Fr=function(e,r,n){return t.extend(Rr(e,r,n),{u_image:0})},Br=function(e,r,n,i){var a=e.transform,o=jr(r,a);return{u_matrix:Ur(e,r,n),u_texsize:r.imageAtlasTexture.size,u_ratio:1/pe(r,1,a.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[o,i.fromScale,i.toScale],u_fade:i.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},Nr=function(e,r,n,i,a){var o=e.transform,s=e.lineAtlas,l=jr(r,o),c=\"round\"===n.layout.get(\"line-cap\"),u=s.getDash(i.from,c),f=s.getDash(i.to,c),h=u.width*a.fromScale,p=f.width*a.toScale;return t.extend(Rr(e,r,n),{u_patternscale_a:[l/h,-u.height/2],u_patternscale_b:[l/p,-f.height/2],u_sdfgamma:s.width/(256*Math.min(h,p)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:f.y,u_mix:a.t})};function jr(t,e){return 1/pe(t,1,e.tileZoom)}function Ur(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get(\"line-translate\"),r.paint.get(\"line-translate-anchor\"))}var Vr=function(t,e,r,n,i){return{u_matrix:t,u_tl_parent:e,u_scale_parent:r,u_buffer_scale:1,u_fade_t:n.mix,u_opacity:n.opacity*i.paint.get(\"raster-opacity\"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get(\"raster-brightness-min\"),u_brightness_high:i.paint.get(\"raster-brightness-max\"),u_saturation_factor:(o=i.paint.get(\"raster-saturation\"),o>0?1-1/(1.001-o):-o),u_contrast_factor:(a=i.paint.get(\"raster-contrast\"),a>0?1/(1-a):1+a),u_spin_weights:Hr(i.paint.get(\"raster-hue-rotate\"))};var a,o};function Hr(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]}var qr,Gr=function(t,e,r,n,i,a,o,s,l,c){var u=i.transform;return{u_is_size_zoom_constant:+(\"constant\"===t||\"source\"===t),u_is_size_feature_constant:+(\"constant\"===t||\"camera\"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:u.cameraToCenterDistance,u_pitch:u.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:u.width/u.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:a,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:c,u_texture:0}},Yr=function(e,r,n,i,a,o,s,l,c,u,f){var h=a.transform;return t.extend(Gr(e,r,n,i,a,o,s,l,c,u),{u_gamma_scale:i?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+f})},Wr=function(e,r,n,i,a,o,s,l,c,u){return t.extend(Yr(e,r,n,i,a,o,s,l,!0,c,!0),{u_texsize_icon:u,u_texture_icon:1})},Xr=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Zr=function(e,r,n,i,a,o){return t.extend(function(t,e,r,n){var i=r.imageManager.getPattern(t.from.toString()),a=r.imageManager.getPattern(t.to.toString()),o=r.imageManager.getPixelSize(),s=o.width,l=o.height,c=Math.pow(2,n.tileID.overscaledZ),u=n.tileSize*Math.pow(2,r.transform.tileZoom)/c,f=u*(n.tileID.canonical.x+n.tileID.wrap*c),h=u*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[s,l],u_mix:e.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/pe(n,1,r.transform.tileZoom),u_pixel_coord_upper:[f>>16,h>>16],u_pixel_coord_lower:[65535&f,65535&h]}}(i,o,n,a),{u_matrix:e,u_opacity:r})},Jr={fillExtrusion:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fillExtrusionPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,r.u_height_factor),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fill:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},fillPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},fillOutline:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world)}},fillOutlinePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},circle:function(e,r){return{u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,r.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},collisionBox:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,r.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,r.u_overscale_factor)}},collisionCircle:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,r.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,r.u_viewport_size)}},debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_overlay:new t.Uniform1i(e,r.u_overlay),u_overlay_scale:new t.Uniform1f(e,r.u_overlay_scale)}},clippingMask:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmap:function(e,r){return{u_extrude_scale:new t.Uniform1f(e,r.u_extrude_scale),u_intensity:new t.Uniform1f(e,r.u_intensity),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmapTexture:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_color_ramp:new t.Uniform1i(e,r.u_color_ramp),u_opacity:new t.Uniform1f(e,r.u_opacity)}},hillshade:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_latrange:new t.Uniform2f(e,r.u_latrange),u_light:new t.Uniform2f(e,r.u_light),u_shadow:new t.UniformColor(e,r.u_shadow),u_highlight:new t.UniformColor(e,r.u_highlight),u_accent:new t.UniformColor(e,r.u_accent)}},hillshadePrepare:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_dimension:new t.Uniform2f(e,r.u_dimension),u_zoom:new t.Uniform1f(e,r.u_zoom),u_maxzoom:new t.Uniform1f(e,r.u_maxzoom),u_unpack:new t.Uniform4f(e,r.u_unpack)}},line:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels)}},lineGradient:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_image:new t.Uniform1i(e,r.u_image)}},linePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_texsize:new t.Uniform2f(e,r.u_texsize),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_image:new t.Uniform1i(e,r.u_image),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},lineSDF:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,r.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,r.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,r.u_sdfgamma),u_image:new t.Uniform1i(e,r.u_image),u_tex_y_a:new t.Uniform1f(e,r.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,r.u_tex_y_b),u_mix:new t.Uniform1f(e,r.u_mix)}},raster:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_tl_parent:new t.Uniform2f(e,r.u_tl_parent),u_scale_parent:new t.Uniform1f(e,r.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,r.u_buffer_scale),u_fade_t:new t.Uniform1f(e,r.u_fade_t),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image0:new t.Uniform1i(e,r.u_image0),u_image1:new t.Uniform1i(e,r.u_image1),u_brightness_low:new t.Uniform1f(e,r.u_brightness_low),u_brightness_high:new t.Uniform1f(e,r.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,r.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,r.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,r.u_spin_weights)}},symbolIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture)}},symbolSDF:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},symbolTextAndIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texsize_icon:new t.Uniform2f(e,r.u_texsize_icon),u_texture:new t.Uniform1i(e,r.u_texture),u_texture_icon:new t.Uniform1i(e,r.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},background:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_color:new t.UniformColor(e,r.u_color)}},backgroundPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image:new t.Uniform1i(e,r.u_image),u_pattern_tl_a:new t.Uniform2f(e,r.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,r.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,r.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,r.u_pattern_br_b),u_texsize:new t.Uniform2f(e,r.u_texsize),u_mix:new t.Uniform1f(e,r.u_mix),u_pattern_size_a:new t.Uniform2f(e,r.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,r.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,r.u_scale_a),u_scale_b:new t.Uniform1f(e,r.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,r.u_tile_units_to_pixels)}}};function Kr(e,r,n,i,a,o,s){for(var l=e.context,c=l.gl,u=e.useProgram(\"collisionBox\"),f=[],h=0,p=0,d=0;d0){var _=t.create(),w=y;t.mul(_,v.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(_,_,v.placementViewportMatrix),f.push({circleArray:b,circleOffset:p,transform:w,invTransform:_}),p=h+=b.length/4}x&&u.draw(l,c.LINES,At.disabled,Mt.disabled,e.colorModeForRenderPass(),Et.disabled,Cr(y,e.transform,m),n.id,x.layoutVertexBuffer,x.indexBuffer,x.segments,null,e.transform.zoom,null,null,x.collisionVertexBuffer)}}if(s&&f.length){var T=e.useProgram(\"collisionCircle\"),k=new t.StructArrayLayout2f1f2i16;k.resize(4*h),k._trim();for(var A=0,M=0,S=f;M=0&&(g[v.associatedIconIndex]={shiftedAnchor:S,angle:E})}else ue(v.numGlyphs,p)}if(f){d.clear();for(var C=e.icon.placedSymbolArray,P=0;P0){var s=t.browser.now(),l=(s-e.timeAdded)/o,c=r?(s-r.timeAdded)/o:-1,u=n.getSource(),f=a.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),h=!r||Math.abs(r.tileID.overscaledZ-f)>Math.abs(e.tileID.overscaledZ-f),p=h&&e.refreshedUponExpiration?1:t.clamp(h?l:1-c,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-p}:{opacity:p,mix:0}}return{opacity:1,mix:0}}var un=new t.Color(1,0,0,1),fn=new t.Color(0,1,0,1),hn=new t.Color(0,0,1,1),pn=new t.Color(1,0,1,1),dn=new t.Color(0,1,1,1);function gn(t){var e=t.transform.padding;mn(t,t.transform.height-(e.top||0),3,un),mn(t,e.bottom||0,3,fn),vn(t,e.left||0,3,hn),vn(t,t.transform.width-(e.right||0),3,pn);var r=t.transform.centerPoint;!function(t,e,r,n){yn(t,e-1,r-10,2,20,n),yn(t,e-10,r-1,20,2,n)}(t,r.x,t.transform.height-r.y,dn)}function mn(t,e,r,n){yn(t,0,e+r/2,t.transform.width,r,n)}function vn(t,e,r,n){yn(t,e-r/2,0,r,t.transform.height,n)}function yn(e,r,n,i,a,o){var s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*t.browser.devicePixelRatio,n*t.browser.devicePixelRatio,i*t.browser.devicePixelRatio,a*t.browser.devicePixelRatio),s.clear({color:o}),l.disable(l.SCISSOR_TEST)}function xn(e,r,n){var i=e.context,a=i.gl,o=n.posMatrix,s=e.useProgram(\"debug\"),l=At.disabled,c=Mt.disabled,u=e.colorModeForRenderPass();i.activeTexture.set(a.TEXTURE0),e.emptyTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE),s.draw(i,a.LINE_STRIP,l,c,u,Et.disabled,Ir(o,t.Color.red),\"$debug\",e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);var f=r.getTileByID(n.key).latestRawTileData,h=f&&f.byteLength||0,p=Math.floor(h/1024),d=r.getTile(n).tileSize,g=512/Math.min(d,512)*(n.overscaledZ/e.transform.zoom)*.5,m=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(m+=\" => \"+n.overscaledZ),function(t,e){t.initDebugOverlayCanvas();var r=t.debugOverlayCanvas,n=t.context.gl,i=t.debugOverlayCanvas.getContext(\"2d\");i.clearRect(0,0,r.width,r.height),i.shadowColor=\"white\",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle=\"white\",i.textBaseline=\"top\",i.font=\"bold 36px Open Sans, sans-serif\",i.fillText(e,5,5),i.strokeText(e,5,5),t.debugOverlayTexture.update(r),t.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}(e,m+\" \"+p+\"kb\"),s.draw(i,a.TRIANGLES,l,c,St.alphaBlended,Et.disabled,Ir(o,t.Color.transparent,g),\"$debug\",e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}var bn={symbol:function(e,r,n,i,a){if(\"translucent\"===e.renderPass){var o=Mt.disabled,s=e.colorModeForRenderPass();n.layout.get(\"text-variable-anchor\")&&function(e,r,n,i,a,o,s){for(var l=r.transform,c=\"map\"===a,u=\"map\"===o,f=0,h=e;f256&&this.clearStencil(),r.setColorMode(St.disabled),r.setDepthMode(At.disabled);var i=this.useProgram(\"clippingMask\");this._tileClippingMaskIDs={};for(var a=0,o=e;a256&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new Mt({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},_n.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Mt({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},_n.prototype.stencilConfigForOverlap=function(t){var e,r=this.context.gl,n=t.sort((function(t,e){return e.overscaledZ-t.overscaledZ})),i=n[n.length-1].overscaledZ,a=n[0].overscaledZ-i+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();for(var o={},s=0;s=0;this.currentLayer--){var w=this.style._layers[i[this.currentLayer]],T=a[w.source],k=u[w.source];this._renderTileClippingMasks(w,k),this.renderLayer(this,T,w,k)}for(this.renderPass=\"translucent\",this.currentLayer=0;this.currentLayer0?e.pop():null},_n.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),r=this.imageManager.getPattern(t.to.toString());return!e||!r},_n.prototype.useProgram=function(t,e){this.cache=this.cache||{};var r=\"\"+t+(e?e.cacheKey:\"\")+(this._showOverdrawInspector?\"/overdraw\":\"\");return this.cache[r]||(this.cache[r]=new _r(this.context,xr[t],e,Jr[t],this._showOverdrawInspector)),this.cache[r]},_n.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},_n.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)},_n.prototype.initDebugOverlayCanvas=function(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=t.window.document.createElement(\"canvas\"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var e=this.context.gl;this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,e.RGBA)}},_n.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var wn=function(t,e){this.points=t,this.planes=e};wn.fromInvProjectionMatrix=function(e,r,n){var i=Math.pow(2,n),a=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((function(r){return t.transformMat4([],r,e)})).map((function(e){return t.scale$1([],e,1/e[3]/r*i)})),o=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(e){var r=t.sub([],a[e[0]],a[e[1]]),n=t.sub([],a[e[2]],a[e[1]]),i=t.normalize([],t.cross([],r,n)),o=-t.dot(i,a[e[1]]);return i.concat(o)}));return new wn(a,o)};var Tn=function(e,r){this.min=e,this.max=r,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};Tn.prototype.quadrant=function(e){for(var r=[e%2==0,e<2],n=t.clone$2(this.min),i=t.clone$2(this.max),a=0;a=0;if(0===o)return 0;o!==r.length&&(n=!1)}if(n)return 2;for(var l=0;l<3;l++){for(var c=Number.MAX_VALUE,u=-Number.MAX_VALUE,f=0;fthis.max[l]-this.min[l])return 0}return 1};var kn=function(t,e,r,n){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),isNaN(t)||t<0||isNaN(e)||e<0||isNaN(r)||r<0||isNaN(n)||n<0)throw new Error(\"Invalid value for edge-insets, top, bottom, left and right must all be numbers\");this.top=t,this.bottom=e,this.left=r,this.right=n};kn.prototype.interpolate=function(e,r,n){return null!=r.top&&null!=e.top&&(this.top=t.number(e.top,r.top,n)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,r.bottom,n)),null!=r.left&&null!=e.left&&(this.left=t.number(e.left,r.left,n)),null!=r.right&&null!=e.right&&(this.right=t.number(e.right,r.right,n)),this},kn.prototype.getCenter=function(e,r){var n=t.clamp((this.left+e-this.right)/2,0,e),i=t.clamp((this.top+r-this.bottom)/2,0,r);return new t.Point(n,i)},kn.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},kn.prototype.clone=function(){return new kn(this.top,this.bottom,this.left,this.right)},kn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var An=function(e,r,n,i,a){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===a||a,this._minZoom=e||0,this._maxZoom=r||22,this._minPitch=null==n?0:n,this._maxPitch=null==i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new kn,this._posMatrixCache={},this._alignedPosMatrixCache={}},Mn={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};An.prototype.clone=function(){var t=new An(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,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._edgeInsets=this._edgeInsets.clone(),t._calcMatrices(),t},Mn.minZoom.get=function(){return this._minZoom},Mn.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Mn.maxZoom.get=function(){return this._maxZoom},Mn.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Mn.minPitch.get=function(){return this._minPitch},Mn.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},Mn.maxPitch.get=function(){return this._maxPitch},Mn.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},Mn.renderWorldCopies.get=function(){return this._renderWorldCopies},Mn.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},Mn.worldSize.get=function(){return this.tileSize*this.scale},Mn.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Mn.size.get=function(){return new t.Point(this.width,this.height)},Mn.bearing.get=function(){return-this.angle/Math.PI*180},Mn.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=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Mn.pitch.get=function(){return this._pitch/Math.PI*180},Mn.pitch.set=function(e){var r=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},Mn.fov.get=function(){return this._fov/Math.PI*180},Mn.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())},Mn.zoom.get=function(){return this._zoom},Mn.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())},Mn.center.get=function(){return this._center},Mn.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Mn.padding.get=function(){return this._edgeInsets.toJSON()},Mn.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},Mn.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},An.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},An.prototype.interpolatePadding=function(t,e,r){this._unmodified=!1,this._edgeInsets.interpolate(t,e,r),this._constrain(),this._calcMatrices()},An.prototype.coveringZoomLevel=function(t){var e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)},An.prototype.getVisibleUnwrappedCoordinates=function(e){var r=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new t.Point(0,0)),i=this.pointCoordinate(new t.Point(this.width,0)),a=this.pointCoordinate(new t.Point(this.width,this.height)),o=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(n.x,i.x,a.x,o.x)),l=Math.floor(Math.max(n.x,i.x,a.x,o.x)),c=s-1;c<=l+1;c++)0!==c&&r.push(new t.UnwrappedTileID(c,e));return r},An.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&&re.maxzoom&&(r=e.maxzoom);var i=t.MercatorCoordinate.fromLngLat(this.center),a=Math.pow(2,r),o=[a*i.x,a*i.y,0],s=wn.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),l=e.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=r);var c=function(t){return{aabb:new Tn([t*a,0,0],[(t+1)*a,a,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}},u=[],f=[],h=r,p=e.reparseOverscaled?n:r;if(this._renderWorldCopies)for(var d=1;d<=3;d++)u.push(c(-d)),u.push(c(d));for(u.push(c(0));u.length>0;){var g=u.pop(),m=g.x,v=g.y,y=g.fullyVisible;if(!y){var x=g.aabb.intersects(s);if(0===x)continue;y=2===x}var b=g.aabb.distanceX(o),_=g.aabb.distanceY(o),w=Math.max(Math.abs(b),Math.abs(_)),T=3+(1<T&&g.zoom>=l)f.push({tileID:new t.OverscaledTileID(g.zoom===h?p:g.zoom,g.wrap,g.zoom,m,v),distanceSq:t.sqrLen([o[0]-.5-m,o[1]-.5-v])});else for(var k=0;k<4;k++){var A=(m<<1)+k%2,M=(v<<1)+(k>>1);u.push({aabb:g.aabb.quadrant(k),zoom:g.zoom+1,x:A,y:M,wrap:g.wrap,fullyVisible:y})}}return f.sort((function(t,e){return t.distanceSq-e.distanceSq})).map((function(t){return t.tileID}))},An.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Mn.unmodified.get=function(){return this._unmodified},An.prototype.zoomScale=function(t){return Math.pow(2,t)},An.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},An.prototype.project=function(e){var r=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(r)*this.worldSize)},An.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},Mn.point.get=function(){return this.project(this.center)},An.prototype.setLocationAtPoint=function(e,r){var n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),a=this.locationCoordinate(e),o=new t.MercatorCoordinate(a.x-(n.x-i.x),a.y-(n.y-i.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())},An.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},An.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},An.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},An.prototype.coordinateLocation=function(t){return t.toLngLat()},An.prototype.pointCoordinate=function(e){var r=[e.x,e.y,0,1],n=[e.x,e.y,1,1];t.transformMat4(r,r,this.pixelMatrixInverse),t.transformMat4(n,n,this.pixelMatrixInverse);var i=r[3],a=n[3],o=r[0]/i,s=n[0]/a,l=r[1]/i,c=n[1]/a,u=r[2]/i,f=n[2]/a,h=u===f?0:(0-u)/(f-u);return new t.MercatorCoordinate(t.number(o,s,h)/this.worldSize,t.number(l,c,h)/this.worldSize)},An.prototype.coordinatePoint=function(e){var r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix),new t.Point(r[0]/r[3],r[1]/r[3])},An.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},An.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},An.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},An.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=t.identity(new Float64Array(16));return t.translate(l,l,[s*o,a.y*o,0]),t.scale(l,l,[o/t.EXTENT,o/t.EXTENT,1]),t.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},An.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},An.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=t.mercatorYfromLat(f[1])*this.worldSize,e=(o=t.mercatorYfromLat(f[0])*this.worldSize)-ao&&(i=o-m)}if(this.lngRange){var v=p.x,y=c.x/2;v-yl&&(n=l-y)}void 0===n&&void 0===i||(this.center=this.unproject(new t.Point(void 0!==n?n:p.x,void 0!==i?i:p.y))),this._unmodified=u,this._constraining=!1}},An.prototype._calcMatrices=function(){if(this.height){var e=this._fov/2,r=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(e)*this.height;var n=Math.PI/2+this._pitch,i=this._fov*(.5+r.y/this.height),a=Math.sin(i)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-n-i,.01,Math.PI-.01)),o=this.point,s=o.x,l=o.y,c=1.01*(Math.cos(Math.PI/2-this._pitch)*a+this.cameraToCenterDistance),u=this.height/50,f=new Float64Array(16);t.perspective(f,this._fov,this.width/this.height,u,c),f[8]=2*-r.x/this.width,f[9]=2*r.y/this.height,t.scale(f,f,[1,-1,1]),t.translate(f,f,[0,0,-this.cameraToCenterDistance]),t.rotateX(f,f,this._pitch),t.rotateZ(f,f,this.angle),t.translate(f,f,[-s,-l,0]),this.mercatorMatrix=t.scale([],f,[this.worldSize,this.worldSize,this.worldSize]),t.scale(f,f,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=f,this.invProjMatrix=t.invert([],this.projMatrix);var h=this.width%2/2,p=this.height%2/2,d=Math.cos(this.angle),g=Math.sin(this.angle),m=s-Math.round(s)+d*h+g*p,v=l-Math.round(l)+d*p+g*h,y=new Float64Array(f);if(t.translate(y,y,[m>.5?m-1:m,v>.5?v-1:v,0]),this.alignedProjMatrix=y,f=t.create(),t.scale(f,f,[this.width/2,-this.height/2,1]),t.translate(f,f,[1,-1,0]),this.labelPlaneMatrix=f,f=t.create(),t.scale(f,f,[1,-1,1]),t.translate(f,f,[-1,-1,0]),t.scale(f,f,[2/this.width,2/this.height,1]),this.glCoordMatrix=f,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(f=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error(\"failed to invert matrix\");this.pixelMatrixInverse=f,this._posMatrixCache={},this._alignedPosMatrixCache={}}},An.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},An.prototype.getCameraPoint=function(){var e=this._pitch,r=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,r))},An.prototype.getCameraQueryGeometry=function(e){var r=this.getCameraPoint();if(1===e.length)return[e[0],r];for(var n=r.x,i=r.y,a=r.x,o=r.y,s=0,l=e;s=3&&!t.some((function(t){return isNaN(t)}))){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0}return!1},Sn.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,\"\",e)}catch(t){}};var En={linearity:.3,easing:t.bezier(0,0,.3,1)},Ln=t.extend({deceleration:2500,maxSpeed:1400},En),Cn=t.extend({deceleration:20,maxSpeed:1400},En),Pn=t.extend({deceleration:1e3,maxSpeed:360},En),In=t.extend({deceleration:1e3,maxSpeed:90},En),On=function(t){this._map=t,this.clear()};function zn(t,e){(!t.duration||t.duration0&&r-e[0].time>160;)e.shift()},On.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var r={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},n=0,i=this._inertiaBuffer;n=this._clickTolerance||this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.dblclick=function(t){return this._firePreventable(new Rn(t.type,this._map,t))},Nn.prototype.mouseover=function(t){this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.mouseout=function(t){this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.touchstart=function(t){return this._firePreventable(new Fn(t.type,this._map,t))},Nn.prototype.touchmove=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype.touchend=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype.touchcancel=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Nn.prototype.isEnabled=function(){return!0},Nn.prototype.isActive=function(){return!1},Nn.prototype.enable=function(){},Nn.prototype.disable=function(){};var jn=function(t){this._map=t};jn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},jn.prototype.mousemove=function(t){this._map.fire(new Rn(t.type,this._map,t))},jn.prototype.mousedown=function(){this._delayContextMenu=!0},jn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Rn(\"contextmenu\",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},jn.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new Rn(t.type,this._map,t)),this._map.listens(\"contextmenu\")&&t.preventDefault()},jn.prototype.isEnabled=function(){return!0},jn.prototype.isActive=function(){return!1},jn.prototype.enable=function(){},jn.prototype.disable=function(){};var Un=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1};function Vn(t,e){for(var r={},n=0;nthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),n.length===this.numTouches&&(this.centroid=function(e){for(var r=new t.Point(0,0),n=0,i=e;n30)&&(this.aborted=!0)}}},Hn.prototype.touchend=function(t,e,r){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){var n=!this.aborted&&this.centroid;if(this.reset(),n)return n}};var qn=function(t){this.singleTap=new Hn(t),this.numTaps=t.numTaps,this.reset()};qn.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},qn.prototype.touchstart=function(t,e,r){this.singleTap.touchstart(t,e,r)},qn.prototype.touchmove=function(t,e,r){this.singleTap.touchmove(t,e,r)},qn.prototype.touchend=function(t,e,r){var n=this.singleTap.touchend(t,e,r);if(n){var i=t.timeStamp-this.lastTime<500,a=!this.lastTap||this.lastTap.dist(n)<30;if(i&&a||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}};var Gn=function(){this._zoomIn=new qn({numTouches:1,numTaps:2}),this._zoomOut=new qn({numTouches:2,numTaps:1}),this.reset()};Gn.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Gn.prototype.touchstart=function(t,e,r){this._zoomIn.touchstart(t,e,r),this._zoomOut.touchstart(t,e,r)},Gn.prototype.touchmove=function(t,e,r){this._zoomIn.touchmove(t,e,r),this._zoomOut.touchmove(t,e,r)},Gn.prototype.touchend=function(t,e,r){var n=this,i=this._zoomIn.touchend(t,e,r),a=this._zoomOut.touchend(t,e,r);return i?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(i)},{originalEvent:t})}}):a?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(a)},{originalEvent:t})}}):void 0},Gn.prototype.touchcancel=function(){this.reset()},Gn.prototype.enable=function(){this._enabled=!0},Gn.prototype.disable=function(){this._enabled=!1,this.reset()},Gn.prototype.isEnabled=function(){return this._enabled},Gn.prototype.isActive=function(){return this._active};var Yn=function(t){this.reset(),this._clickTolerance=t.clickTolerance||1};Yn.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Yn.prototype._correctButton=function(t,e){return!1},Yn.prototype._move=function(t,e){return{}},Yn.prototype.mousedown=function(t,e){if(!this._lastPoint){var n=r.mouseButton(t);this._correctButton(t,n)&&(this._lastPoint=e,this._eventButton=n)}},Yn.prototype.mousemoveWindow=function(t,e){var r=this._lastPoint;if(r&&(t.preventDefault(),this._moved||!(e.dist(r)0&&(this._active=!0);var i=Vn(n,r),a=new t.Point(0,0),o=new t.Point(0,0),s=0;for(var l in i){var c=i[l],u=this._touches[l];u&&(a._add(c),o._add(c.sub(u)),s++,i[l]=c)}if(this._touches=i,!(sMath.abs(t.x)}var ii=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.reset=function(){t.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},e.prototype._start=function(t){this._lastPoints=t,ni(t[0].sub(t[1]))&&(this._valid=!1)},e.prototype._move=function(t,e,r){var n=t[0].sub(this._lastPoints[0]),i=t[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid){this._lastPoints=t,this._active=!0;return{pitchDelta:-.5*((n.y+i.y)/2)}}},e.prototype.gestureBeginsVertically=function(t,e,r){if(void 0!==this._valid)return this._valid;var n=t.mag()>=2,i=e.mag()>=2;if(n||i){if(!n||!i)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;var a=t.y>0==e.y>0;return ni(t)&&ni(e)&&a}},e}(Kn),ai={panStep:100,bearingStep:15,pitchStep:10},oi=function(){var t=ai;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep};function si(t){return t*(2-t)}oi.prototype.reset=function(){this._active=!1},oi.prototype.keydown=function(t){var e=this;if(!(t.altKey||t.ctrlKey||t.metaKey)){var r=0,n=0,i=0,a=0,o=0;switch(t.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:t.shiftKey?n=-1:(t.preventDefault(),a=-1);break;case 39:t.shiftKey?n=1:(t.preventDefault(),a=1);break;case 38:t.shiftKey?i=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?i=-1:(t.preventDefault(),o=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:\"keyboardHandler\",easing:si,zoom:r?Math.round(l)+r*(t.shiftKey?2:1):l,bearing:s.getBearing()+n*e._bearingStep,pitch:s.getPitch()+i*e._pitchStep,offset:[-a*e._panStep,-o*e._panStep],center:s.getCenter()},{originalEvent:t})}}}},oi.prototype.enable=function(){this._enabled=!0},oi.prototype.disable=function(){this._enabled=!1,this.reset()},oi.prototype.isEnabled=function(){return this._enabled},oi.prototype.isActive=function(){return this._active};var li=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll([\"_onWheel\",\"_onTimeout\",\"_onScrollFrame\",\"_onScrollFinished\"],this)};li.prototype.setZoomRate=function(t){this._defaultZoomRate=t},li.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},li.prototype.isEnabled=function(){return!!this._enabled},li.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},li.prototype.isZooming=function(){return!!this._zooming},li.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&\"center\"===t.around)},li.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},li.prototype.wheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=t.browser.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._active||this._start(e)),e.preventDefault()}},li.prototype._onTimeout=function(t){this._type=\"wheel\",this._delta-=this._lastValue,this._active||this._start(t)},li.prototype._start=function(e){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var n=r.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},li.prototype.renderFrame=function(){return this._onScrollFrame()},li.prototype._onScrollFrame=function(){var e=this;if(this._frameId&&(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?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var a=\"number\"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(a*i))),\"wheel\"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o,s=\"number\"==typeof this._targetZoom?this._targetZoom:r.zoom,l=this._startZoom,c=this._easing,u=!1;if(\"wheel\"===this._type&&l&&c){var f=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=c(f);o=t.number(l,s,h),f<1?this._frameId||(this._frameId=!0):u=!0}else o=s,u=!0;return this._active=!0,u&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!u,zoomDelta:o-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},li.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var n=this._prevEase,i=(t.browser.now()-n.start)/n.duration,a=n.easing(i+.01)-n.easing(i),o=.27/Math.sqrt(a*a+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=t.bezier(o,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:r},r},li.prototype.reset=function(){this._active=!1};var ci=function(t,e){this._clickZoom=t,this._tapZoom=e};ci.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ci.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ci.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ci.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ui=function(){this.reset()};ui.prototype.reset=function(){this._active=!1},ui.prototype.dblclick=function(t,e){return t.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(t.shiftKey?-1:1),around:r.unproject(e)},{originalEvent:t})}}},ui.prototype.enable=function(){this._enabled=!0},ui.prototype.disable=function(){this._enabled=!1,this.reset()},ui.prototype.isEnabled=function(){return this._enabled},ui.prototype.isActive=function(){return this._active};var fi=function(){this._tap=new qn({numTouches:1,numTaps:1}),this.reset()};fi.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},fi.prototype.touchstart=function(t,e,r){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=e[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(t,e,r))},fi.prototype.touchmove=function(t,e,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;var n=e[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,t.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(t,e,r)},fi.prototype.touchend=function(t,e,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(t,e,r)&&(this._tapTime=t.timeStamp)},fi.prototype.touchcancel=function(){this.reset()},fi.prototype.enable=function(){this._enabled=!0},fi.prototype.disable=function(){this._enabled=!1,this.reset()},fi.prototype.isEnabled=function(){return this._enabled},fi.prototype.isActive=function(){return this._active};var hi=function(t,e,r){this._el=t,this._mousePan=e,this._touchPan=r};hi.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add(\"mapboxgl-touch-drag-pan\")},hi.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove(\"mapboxgl-touch-drag-pan\")},hi.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},hi.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var pi=function(t,e,r){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=r};pi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},pi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},pi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},pi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var di=function(t,e,r,n){this._el=t,this._touchZoom=e,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0};di.prototype.enable=function(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add(\"mapboxgl-touch-zoom-rotate\")},di.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove(\"mapboxgl-touch-zoom-rotate\")},di.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},di.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},di.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},di.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var gi=function(t){return t.zoom||t.drag||t.pitch||t.rotate},mi=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}(t.Event);function vi(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}var yi=function(e,n){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new On(e),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),t.bindAll([\"handleEvent\",\"handleWindowEvent\"],this);var i=this._el;this._listeners=[[i,\"touchstart\",{passive:!1}],[i,\"touchmove\",{passive:!1}],[i,\"touchend\",void 0],[i,\"touchcancel\",void 0],[i,\"mousedown\",void 0],[i,\"mousemove\",void 0],[i,\"mouseup\",void 0],[t.window.document,\"mousemove\",{capture:!0}],[t.window.document,\"mouseup\",void 0],[i,\"mouseover\",void 0],[i,\"mouseout\",void 0],[i,\"dblclick\",void 0],[i,\"click\",void 0],[i,\"keydown\",{capture:!1}],[i,\"keyup\",void 0],[i,\"wheel\",{passive:!1}],[i,\"contextmenu\",void 0],[t.window,\"blur\",void 0]];for(var a=0,o=this._listeners;aa?Math.min(2,_):Math.max(.5,_),w=Math.pow(m,1-e),T=i.unproject(x.add(b.mult(e*w)).mult(g));i.setLocationAtPoint(i.renderWorldCopies?T.wrap():T,d)}n._fireMoveEvents(r)}),(function(t){n._afterEase(r,t)}),e),this},r.prototype._prepareEase=function(e,r,n){void 0===n&&(n={}),this._moving=!0,r||n.moving||this.fire(new t.Event(\"movestart\",e)),this._zooming&&!n.zooming&&this.fire(new t.Event(\"zoomstart\",e)),this._rotating&&!n.rotating&&this.fire(new t.Event(\"rotatestart\",e)),this._pitching&&!n.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,r){if(!this._easeId||!r||this._easeId!==r){delete this._easeId;var n=this._zooming,i=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new t.Event(\"zoomend\",e)),i&&this.fire(new t.Event(\"rotateend\",e)),a&&this.fire(new t.Event(\"pitchend\",e)),this.fire(new t.Event(\"moveend\",e))}},r.prototype.flyTo=function(e,r){var n=this;if(!e.essential&&t.browser.prefersReducedMotion){var i=t.pick(e,[\"center\",\"zoom\",\"bearing\",\"pitch\",\"around\"]);return this.jumpTo(i,r)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var a=this.transform,o=this.getZoom(),s=this.getBearing(),l=this.getPitch(),c=this.getPadding(),u=\"zoom\"in e?t.clamp(+e.zoom,a.minZoom,a.maxZoom):o,f=\"bearing\"in e?this._normalizeBearing(e.bearing,s):s,h=\"pitch\"in e?+e.pitch:l,p=\"padding\"in e?e.padding:a.padding,d=a.zoomScale(u-o),g=t.Point.convert(e.offset),m=a.centerPoint.add(g),v=a.pointLocation(m),y=t.LngLat.convert(e.center||v);this._normalizeCenter(y);var x=a.project(v),b=a.project(y).sub(x),_=e.curve,w=Math.max(a.width,a.height),T=w/d,k=b.mag();if(\"minZoom\"in e){var A=t.clamp(Math.min(e.minZoom,o,u),a.minZoom,a.maxZoom),M=w/a.zoomScale(A-o);_=Math.sqrt(M/k*2)}var S=_*_;function E(t){var e=(T*T-w*w+(t?-1:1)*S*S*k*k)/(2*(t?T:w)*S*k);return Math.log(Math.sqrt(e*e+1)-e)}function L(t){return(Math.exp(t)-Math.exp(-t))/2}function C(t){return(Math.exp(t)+Math.exp(-t))/2}var P=E(0),I=function(t){return C(P)/C(P+_*t)},O=function(t){return w*((C(P)*(L(e=P+_*t)/C(e))-L(P))/S)/k;var e},z=(E(1)-P)/_;if(Math.abs(k)<1e-6||!isFinite(z)){if(Math.abs(w-T)<1e-6)return this.easeTo(e,r);var D=Te.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==f,this._pitching=h!==l,this._padding=!a.isPaddingEqual(p),this._prepareEase(r,!1),this._ease((function(e){var i=e*z,d=1/I(i);a.zoom=1===e?u:o+a.scaleZoom(d),n._rotating&&(a.bearing=t.number(s,f,e)),n._pitching&&(a.pitch=t.number(l,h,e)),n._padding&&(a.interpolatePadding(c,p,e),m=a.centerPoint.add(g));var v=1===e?y:a.unproject(x.add(b.mult(O(i))).mult(d));a.setLocationAtPoint(a.renderWorldCopies?v.wrap():v,m),n._fireMoveEvents(r)}),(function(){return n._afterEase(r)}),e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){return this._stop()},r.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,e)}if(!t){var n=this.handlers;n&&n.stop()}return this},r.prototype._ease=function(e,r,n){!1===n.animate||0===n.duration?(e(1),r()):(this._easeStart=t.browser.now(),this._easeOptions=n,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<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)180?-360:r<-180?360:0}},r}(t.Evented),bi=function(e){void 0===e&&(e={}),this.options=e,t.bindAll([\"_updateEditLink\",\"_updateData\",\"_updateCompact\"],this)};bi.prototype.getDefaultPosition=function(){return\"bottom-right\"},bi.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-attrib\"),this._innerContainer=r.create(\"div\",\"mapboxgl-ctrl-attrib-inner\",this._container),e&&this._container.classList.add(\"mapboxgl-compact\"),this._updateAttributions(),this._updateEditLink(),this._map.on(\"styledata\",this._updateData),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},bi.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"styledata\",this._updateData),this._map.off(\"sourcedata\",this._updateData),this._map.off(\"moveend\",this._updateEditLink),this._map.off(\"resize\",this._updateCompact),this._map=void 0,this._attribHTML=void 0},bi.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(\".mapbox-improve-map\"));var r=[{key:\"owner\",value:this.styleOwner},{key:\"id\",value:this.styleId},{key:\"access_token\",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){var n=r.reduce((function(t,e,n){return e.value&&(t+=e.key+\"=\"+e.value+(n=0)return!1;return!0}))).join(\" | \");o!==this._attribHTML&&(this._attribHTML=o,t.length?(this._innerContainer.innerHTML=o,this._container.classList.remove(\"mapboxgl-attrib-empty\")):this._container.classList.add(\"mapboxgl-attrib-empty\"),this._editLink=null)}},bi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add(\"mapboxgl-compact\"):this._container.classList.remove(\"mapboxgl-compact\")};var _i=function(){t.bindAll([\"_updateLogo\"],this),t.bindAll([\"_updateCompact\"],this)};_i.prototype.onAdd=function(t){this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl\");var e=r.create(\"a\",\"mapboxgl-ctrl-logo\");return e.target=\"_blank\",e.rel=\"noopener nofollow\",e.href=\"https://www.mapbox.com/\",e.setAttribute(\"aria-label\",this._map._getUIString(\"LogoControl.Title\")),e.setAttribute(\"rel\",\"noopener nofollow\"),this._container.appendChild(e),this._container.style.display=\"none\",this._map.on(\"sourcedata\",this._updateLogo),this._updateLogo(),this._map.on(\"resize\",this._updateCompact),this._updateCompact(),this._container},_i.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"sourcedata\",this._updateLogo),this._map.off(\"resize\",this._updateCompact)},_i.prototype.getDefaultPosition=function(){return\"bottom-left\"},_i.prototype._updateLogo=function(t){t&&\"metadata\"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?\"block\":\"none\")},_i.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}},_i.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add(\"mapboxgl-compact\"):e.classList.remove(\"mapboxgl-compact\")}};var wi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};wi.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},wi.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,n=e?this._queue.concat(e):this._queue;re.maxZoom)throw new Error(\"maxZoom must be greater than or equal to minZoom\");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error(\"maxPitch must be greater than or equal to minPitch\");if(null!=e.minPitch&&e.minPitch<0)throw new Error(\"minPitch must be greater than or equal to 0\");if(null!=e.maxPitch&&e.maxPitch>60)throw new Error(\"maxPitch must be less than or equal to 60\");var i=new An(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(n.call(this,i,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new wi,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},Ti,e.locale),this._requestManager=new t.RequestManager(e.transformRequest,e.accessToken),\"string\"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error(\"Container '\"+e.container+\"' not found.\")}else{if(!(e.container instanceof Ai))throw new Error(\"Invalid type: 'container' must be a String or HTMLElement.\");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll([\"_onWindowOnline\",\"_onWindowResize\",\"_contextLost\",\"_contextRestored\"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error(\"Failed to initialize WebGL.\");this.on(\"move\",(function(){return r._update(!1)})),this.on(\"moveend\",(function(){return r._update(!1)})),this.on(\"zoom\",(function(){return r._update(!0)})),void 0!==t.window&&(t.window.addEventListener(\"online\",this._onWindowOnline,!1),t.window.addEventListener(\"resize\",this._onWindowResize,!1)),this.handlers=new yi(this,e);var a=\"string\"==typeof e.hash&&e.hash||void 0;this._hash=e.hash&&new Sn(a).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new bi({customAttribution:e.customAttribution})),this.addControl(new _i,e.logoPosition),this.on(\"style.load\",(function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)})),this.on(\"data\",(function(e){r._update(\"style\"===e.dataType),r.fire(new t.Event(e.dataType+\"data\",e))})),this.on(\"dataloading\",(function(e){r.fire(new t.Event(e.dataType+\"dataloading\",e))}))}n&&(i.__proto__=n),i.prototype=Object.create(n&&n.prototype),i.prototype.constructor=i;var a={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(e,r){if(void 0===r&&e.getDefaultPosition&&(r=e.getDefaultPosition()),void 0===r&&(r=\"top-right\"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error(\"Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.\")));var n=e.onAdd(this);this._controls.push(e);var i=this._controlPositions[r];return-1!==r.indexOf(\"bottom\")?i.insertBefore(n,i.firstChild):i.appendChild(n),this},i.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error(\"Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.\")));var r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this},i.prototype.resize=function(e){var r=this._containerDimensions(),n=r[0],i=r[1];this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i);var a=!this._moving;return a&&(this.stop(),this.fire(new t.Event(\"movestart\",e)).fire(new t.Event(\"move\",e))),this.fire(new t.Event(\"resize\",e)),a&&this.fire(new t.Event(\"moveend\",e)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},i.prototype.setMinZoom=function(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=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\")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(t){if((t=null==t?0:t)<0)throw new Error(\"minPitch must be greater than or equal to 0\");if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()60)throw new Error(\"maxPitch must be less than or equal to 60\");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error(\"maxPitch must be greater than the current minPitch\")},i.prototype.getMaxPitch=function(){return this.transform.maxPitch},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},i.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},i.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},i.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},i.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},i.prototype._createDelegatedListener=function(t,e,r){var n,i=this;if(\"mouseenter\"===t||\"mouseover\"===t){var a=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){var o=i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[];o.length?a||(a=!0,r.call(i,new Rn(t,i,n.originalEvent,{features:o}))):a=!1},mouseout:function(){a=!1}}}}if(\"mouseleave\"===t||\"mouseout\"===t){var o=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){(i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[]).length?o=!0:o&&(o=!1,r.call(i,new Rn(t,i,n.originalEvent)))},mouseout:function(e){o&&(o=!1,r.call(i,new Rn(t,i,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(n={},n[t]=function(t){var n=i.getLayer(e)?i.queryRenderedFeatures(t.point,{layers:[e]}):[];n.length&&(t.features=n,r.call(i,t),delete t.features)},n)}},i.prototype.on=function(t,e,r){if(void 0===r)return n.prototype.on.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(i),i.delegates)this.on(a,i.delegates[a]);return this},i.prototype.once=function(t,e,r){if(void 0===r)return n.prototype.once.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in i.delegates)this.once(a,i.delegates[a]);return this},i.prototype.off=function(t,e,r){var i=this;if(void 0===r)return n.prototype.off.call(this,t,e);return this._delegatedListeners&&this._delegatedListeners[t]&&function(n){for(var a=n[t],o=0;o180;){var s=n.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;e.lng>n.center.lng?e.lng-=360:e.lng+=360}return e}Ii.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),r.disableDrag()},Ii.prototype.move=function(t,e){var r=this.map,n=this.mouseRotate.mousemoveWindow(t,e);if(n&&n.bearingDelta&&r.setBearing(r.getBearing()+n.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(t,e);i&&i.pitchDelta&&r.setPitch(r.getPitch()+i.pitchDelta)}},Ii.prototype.off=function(){var t=this.element;r.removeEventListener(t,\"mousedown\",this.mousedown),r.removeEventListener(t,\"touchstart\",this.touchstart,{passive:!1}),r.removeEventListener(t,\"touchmove\",this.touchmove),r.removeEventListener(t,\"touchend\",this.touchend),r.removeEventListener(t,\"touchcancel\",this.reset),this.offTemp()},Ii.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(t.window,\"mousemove\",this.mousemove),r.removeEventListener(t.window,\"mouseup\",this.mouseup)},Ii.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),r.mousePos(this.element,e)),r.addEventListener(t.window,\"mousemove\",this.mousemove),r.addEventListener(t.window,\"mouseup\",this.mouseup)},Ii.prototype.mousemove=function(t){this.move(t,r.mousePos(this.element,t))},Ii.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},Ii.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.down({type:\"mousedown\",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},Ii.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},Ii.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)e.getEast()||r.latitudee.getNorth())},n.prototype._setErrorState=function(){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\")}},n.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event(\"outofmaxbounds\",e)),this._updateMarker(),void this._finish();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()}},n.prototype._updateCamera=function(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude),n=e.coords.accuracy,i=this._map.getBearing(),a=t.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),a,{geolocateSource:!0})},n.prototype._updateMarker=function(e){if(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},n.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),r=this._map.unproject([1,t]),n=e.distanceTo(r),i=Math.ceil(2*this._accuracy/n);this._circleElement.style.width=i+\"px\",this._circleElement.style.height=i+\"px\"},n.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},n.prototype._onError=function(e){if(this._map){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\"),this._geolocateButton.disabled=!0;var r=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.title=r,this._geolocateButton.setAttribute(\"aria-label\",r),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&ji)return;this._setErrorState()}\"OFF\"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add(\"mapboxgl-user-location-dot-stale\"),this.fire(new t.Event(\"error\",e)),this._finish()}},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(e){var n=this;if(this._container.addEventListener(\"contextmenu\",(function(t){return t.preventDefault()})),this._geolocateButton=r.create(\"button\",\"mapboxgl-ctrl-geolocate\",this._container),r.create(\"span\",\"mapboxgl-ctrl-icon\",this._geolocateButton).setAttribute(\"aria-hidden\",!0),this._geolocateButton.type=\"button\",!1===e){t.warnOnce(\"Geolocation support is not available so the GeolocateControl will be disabled.\");var i=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute(\"aria-label\",i)}else{var a=this._map._getUIString(\"GeolocateControl.FindMyLocation\");this._geolocateButton.title=a,this._geolocateButton.setAttribute(\"aria-label\",a)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute(\"aria-pressed\",\"false\"),this._watchState=\"OFF\"),this.options.showUserLocation&&(this._dotElement=r.create(\"div\",\"mapboxgl-user-location-dot\"),this._userLocationDotMarker=new Fi(this._dotElement),this._circleElement=r.create(\"div\",\"mapboxgl-user-location-accuracy-circle\"),this._accuracyCircleMarker=new Fi({element:this._circleElement,pitchAlignment:\"map\"}),this.options.trackUserLocation&&(this._watchState=\"OFF\"),this._map.on(\"zoom\",this._onZoom)),this._geolocateButton.addEventListener(\"click\",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on(\"movestart\",(function(e){var r=e.originalEvent&&\"resize\"===e.originalEvent.type;e.geolocateSource||\"ACTIVE_LOCK\"!==n._watchState||r||(n._watchState=\"BACKGROUND\",n._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background\"),n._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),n.fire(new t.Event(\"trackuserlocationend\")))}))},n.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\":Ni--,ji=!1,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\")}if(\"OFF\"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.setAttribute(\"aria-pressed\",\"true\"),++Ni>1?(e={maximumAge:6e5,timeout:0},ji=!0):(e=this.options.positionOptions,ji=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},n.prototype._clearWatch=function(){t.window.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)},n}(t.Evented),Vi={maxWidth:100,unit:\"metric\"},Hi=function(e){this.options=t.extend({},Vi,e),t.bindAll([\"_onMove\",\"setUnit\"],this)};function qi(t,e,r){var n=r&&r.maxWidth||100,i=t._container.clientHeight/2,a=t.unproject([0,i]),o=t.unproject([n,i]),s=a.distanceTo(o);if(r&&\"imperial\"===r.unit){var l=3.2808*s;if(l>5280)Gi(e,n,l/5280,t._getUIString(\"ScaleControl.Miles\"));else Gi(e,n,l,t._getUIString(\"ScaleControl.Feet\"))}else if(r&&\"nautical\"===r.unit){Gi(e,n,s/1852,t._getUIString(\"ScaleControl.NauticalMiles\"))}else s>=1e3?Gi(e,n,s/1e3,t._getUIString(\"ScaleControl.Kilometers\")):Gi(e,n,s,t._getUIString(\"ScaleControl.Meters\"))}function Gi(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:o>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(o),a*o),l=s/r;t.style.width=e*l+\"px\",t.innerHTML=s+\" \"+n}Hi.prototype.getDefaultPosition=function(){return\"bottom-left\"},Hi.prototype._onMove=function(){qi(this._map,this._container,this.options)},Hi.prototype.onAdd=function(t){return this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-scale\",t.getContainer()),this._map.on(\"move\",this._onMove),this._onMove(),this._container},Hi.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"move\",this._onMove),this._map=void 0},Hi.prototype.setUnit=function(t){this.options.unit=t,qi(this._map,this._container,this.options)};var Yi=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce(\"Full screen control 'container' must be a DOM element.\")),t.bindAll([\"_onClickFullscreen\",\"_changeIcon\"],this),\"onfullscreenchange\"in t.window.document?this._fullscreenchange=\"fullscreenchange\":\"onmozfullscreenchange\"in t.window.document?this._fullscreenchange=\"mozfullscreenchange\":\"onwebkitfullscreenchange\"in t.window.document?this._fullscreenchange=\"webkitfullscreenchange\":\"onmsfullscreenchange\"in t.window.document&&(this._fullscreenchange=\"MSFullscreenChange\")};Yi.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-group\"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display=\"none\",t.warnOnce(\"This device does not support fullscreen mode.\")),this._controlContainer},Yi.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Yi.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Yi.prototype._setupUI=function(){var e=this._fullscreenButton=r.create(\"button\",\"mapboxgl-ctrl-fullscreen\",this._controlContainer);r.create(\"span\",\"mapboxgl-ctrl-icon\",e).setAttribute(\"aria-hidden\",!0),e.type=\"button\",this._updateTitle(),this._fullscreenButton.addEventListener(\"click\",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Yi.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute(\"aria-label\",t),this._fullscreenButton.title=t},Yi.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?\"FullscreenControl.Exit\":\"FullscreenControl.Enter\")},Yi.prototype._isFullscreen=function(){return this._fullscreen},Yi.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(\"mapboxgl-ctrl-shrink\"),this._fullscreenButton.classList.toggle(\"mapboxgl-ctrl-fullscreen\"),this._updateTitle())},Yi.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Wi={closeButton:!0,closeOnClick:!0,className:\"\",maxWidth:\"240px\"},Xi=function(e){function n(r){e.call(this),this.options=t.extend(Object.create(Wi),r),t.bindAll([\"_update\",\"_onClose\",\"remove\",\"_onMouseMove\",\"_onMouseUp\",\"_onDrag\"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on(\"click\",this._onClose),this.options.closeOnMove&&this._map.on(\"move\",this._onClose),this._map.on(\"remove\",this.remove),this._update(),this._trackPointer?(this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"mouseup\",this._onMouseUp),this._container&&this._container.classList.add(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"mapboxgl-track-pointer\")):this._map.on(\"move\",this._update),this.fire(new t.Event(\"open\")),this},n.prototype.isOpen=function(){return!!this._map},n.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off(\"move\",this._update),this._map.off(\"move\",this._onClose),this._map.off(\"click\",this._onClose),this._map.off(\"remove\",this.remove),this._map.off(\"mousemove\",this._onMouseMove),this._map.off(\"mouseup\",this._onMouseUp),this._map.off(\"drag\",this._onDrag),delete this._map),this.fire(new t.Event(\"close\")),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on(\"move\",this._update),this._map.off(\"mousemove\",this._onMouseMove),this._container&&this._container.classList.remove(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.remove(\"mapboxgl-track-pointer\")),this},n.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off(\"move\",this._update),this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"drag\",this._onDrag),this._container&&this._container.classList.add(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"mapboxgl-track-pointer\")),this},n.prototype.getElement=function(){return this._container},n.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},n.prototype.setHTML=function(e){var r,n=t.window.document.createDocumentFragment(),i=t.window.document.createElement(\"body\");for(i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},n.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},n.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},n.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},n.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},n.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},n.prototype._createContent=function(){this._content&&r.remove(this._content),this._content=r.create(\"div\",\"mapboxgl-popup-content\",this._container),this.options.closeButton&&(this._closeButton=r.create(\"button\",\"mapboxgl-popup-close-button\",this._content),this._closeButton.type=\"button\",this._closeButton.setAttribute(\"aria-label\",\"Close popup\"),this._closeButton.innerHTML=\"×\",this._closeButton.addEventListener(\"click\",this._onClose))},n.prototype._onMouseUp=function(t){this._update(t.point)},n.prototype._onMouseMove=function(t){this._update(t.point)},n.prototype._onDrag=function(t){this._update(t.point)},n.prototype._update=function(e){var n=this,i=this._lngLat||this._trackPointer;if(this._map&&i&&this._content&&(this._container||(this._container=r.create(\"div\",\"mapboxgl-popup\",this._map.getContainer()),this._tip=r.create(\"div\",\"mapboxgl-popup-tip\",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(\" \").forEach((function(t){return n._container.classList.add(t)})),this._trackPointer&&this._container.classList.add(\"mapboxgl-popup-track-pointer\")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Oi(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var a=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),o=this.options.anchor,s=function e(r){if(r){if(\"number\"==typeof r){var n=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new t.Point(0,0),top:new t.Point(0,r),\"top-left\":new t.Point(n,n),\"top-right\":new t.Point(-n,n),bottom:new t.Point(0,-r),\"bottom-left\":new t.Point(n,-n),\"bottom-right\":new t.Point(-n,-n),left:new t.Point(r,0),right:new t.Point(-r,0)}}if(r instanceof t.Point||Array.isArray(r)){var i=t.Point.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.Point.convert(r.center||[0,0]),top:t.Point.convert(r.top||[0,0]),\"top-left\":t.Point.convert(r[\"top-left\"]||[0,0]),\"top-right\":t.Point.convert(r[\"top-right\"]||[0,0]),bottom:t.Point.convert(r.bottom||[0,0]),\"bottom-left\":t.Point.convert(r[\"bottom-left\"]||[0,0]),\"bottom-right\":t.Point.convert(r[\"bottom-right\"]||[0,0]),left:t.Point.convert(r.left||[0,0]),right:t.Point.convert(r.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!o){var l,c=this._container.offsetWidth,u=this._container.offsetHeight;l=a.y+s.bottom.ythis._map.transform.height-u?[\"bottom\"]:[],a.xthis._map.transform.width-c/2&&l.push(\"right\"),o=0===l.length?\"bottom\":l.join(\"-\")}var f=a.add(s[o]).round();r.setTransform(this._container,zi[o]+\" translate(\"+f.x+\"px,\"+f.y+\"px)\"),Di(this._container,o,\"popup\")}},n.prototype._onClose=function(){this.remove()},n}(t.Evented);var Zi={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Ei,NavigationControl:Pi,GeolocateControl:Ui,AttributionControl:bi,ScaleControl:Hi,FullscreenControl:Yi,Popup:Xi,Marker:Fi,Style:qe,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:function(){Bt().acquire(zt)},clearPrewarmedResources:function(){var t=Rt;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(zt),Rt=null):console.warn(\"Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()\"))},get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return Dt.workerCount},set workerCount(t){Dt.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){t.clearTileCache(e)},workerUrl:\"\"};return Zi})),r}))},{}],240:[function(t,e,r){\"use strict\";e.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},{}],241:[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 m(){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)))}m();var v={element:t};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(e){e?m():function(){if(!s)return;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}}),v};var n=t(\"mouse-event\")},{\"mouse-event\":243}],242:[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}},{}],243:[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<=0)return 1<2147483647)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"');var e=new Uint8Array(t);return e.__proto__=a.prototype,e}function a(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 l(t)}return o(t,e,r)}function o(t,e,r){if(\"string\"==typeof t)return function(t,e){\"string\"==typeof e&&\"\"!==e||(e=\"utf8\");if(!a.isEncoding(e))throw new TypeError(\"Unknown encoding: \"+e);var r=0|f(t,e),n=i(r),o=n.write(t,e);o!==r&&(n=n.slice(0,o));return n}(t,e);if(ArrayBuffer.isView(t))return c(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(B(t,ArrayBuffer)||t&&B(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength=2147483647)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+2147483647..toString(16)+\" bytes\");return 0|t}function f(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||B(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 D(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return R(t).length;default:if(i)return n?-1:D(t).length;e=(\"\"+e).toLowerCase(),i=!0}}function h(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 M(this,e,r);case\"utf8\":case\"utf-8\":return T(this,e,r);case\"ascii\":return k(this,e,r);case\"latin1\":case\"binary\":return A(this,e,r);case\"base64\":return w(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return S(this,e,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),n=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(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),N(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=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:g(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):g(t,[e],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function g(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;as&&(r=s-l),a=r;a>=0;a--){for(var f=!0,h=0;hi&&(n=i):n=i;var a=e.length;n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function w(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?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<=4096)return String.fromCharCode.apply(String,t);var r=\"\",n=0;for(;ne&&(t+=\" ... \"),\"\"},a.prototype.compare=function(t,e,r,n,i){if(B(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.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 o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),l=Math.min(o,s),c=this.slice(n,i),u=t.slice(e,r),f=0;f>>=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 v(this,t,e,r);case\"ascii\":return y(this,t,e,r);case\"latin1\":case\"binary\":return x(this,t,e,r);case\"base64\":return b(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return _(this,t,e,r);default:if(a)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};function k(t,e,r){var n=\"\";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i=\"\",a=e;ar)throw new RangeError(\"Trying to access beyond buffer length\")}function L(t,e,r,n,i,o){if(!a.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError(\"Index out of range\")}function C(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 P(t,e,r,i,a){return e=+e,r>>>=0,a||C(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function I(t,e,r,i,a){return e=+e,r>>>=0,a||C(t,0,r,8),n.write(t,e,r,i,52,8),r+8}a.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>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||E(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},a.prototype.readInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,n)||L(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},a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(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},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return I(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return I(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.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=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=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},a.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&&!a.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>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),\"number\"==typeof t)for(o=e;o55295&&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 R(t){return e.toByteArray(function(t){if((t=(t=t.split(\"=\")[0]).trim().replace(O,\"\")).length<2)return\"\";for(;t.length%4!=0;)t+=\"=\";return t}(t))}function F(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function B(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function N(t){return t!=t}}).call(this)}).call(this,t(\"buffer\").Buffer)},{\"base64-js\":79,buffer:85,ieee754:230}],86:[function(t,e,r){e.exports=function(t,e,r){return er?r:t:te?e:t}},{}],87:[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:86}],88:[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]}},{}],89:[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:86,\"color-rgba\":91,dtype:127}],90:[function(t,e,r){(function(r){(function(){\"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=(p=t.slice(1)).length;c=1,u<=4?(l=[parseInt(p[0]+p[0],16),parseInt(p[1]+p[1],16),parseInt(p[2]+p[2],16)],4===u&&(c=parseInt(p[3]+p[3],16)/255)):(l=[parseInt(p[0]+p[1],16),parseInt(p[2]+p[3],16),parseInt(p[4]+p[5],16)],8===u&&(c=parseInt(p[6]+p[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 f=e[1],h=\"rgb\"===f,p=f.replace(/a$/,\"\");s=p;u=\"cmyk\"===p?4:\"gray\"===p?1:3;l=e[2].trim().split(/\\s*,\\s*/).map((function(t,e){if(/%$/.test(t))return e===u?parseFloat(t)/100:\"rgb\"===p?255*parseFloat(t)/100:parseFloat(t);if(\"h\"===p[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)})),f===p&&l.push(1),c=h||void 0===l[u]?1:l[u],l=l.slice(0,u)}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)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"color-name\":88,defined:124,\"is-plain-obj\":236}],91:[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:86,\"color-parse\":90,\"color-space/hsl\":92}],92:[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\":93}],93:[function(t,e,r){\"use strict\";e.exports={name:\"rgb\",min:[0,0,0],max:[255,255,255],channel:[\"red\",\"green\",\"blue\"],alias:[\"RGB\"]}},{}],94:[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\",CALF:\"\\\\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\",NAME:\"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\",SOME:\"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.?name|^(?=.*socialist).*viet.?name\",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\"}},{}],95:[function(t,e,r){e.exports=[\"xx-small\",\"x-small\",\"small\",\"medium\",\"large\",\"x-large\",\"xx-large\",\"larger\",\"smaller\"]},{}],96:[function(t,e,r){e.exports=[\"normal\",\"condensed\",\"semi-condensed\",\"extra-condensed\",\"ultra-condensed\",\"expanded\",\"semi-expanded\",\"extra-expanded\",\"ultra-expanded\"]},{}],97:[function(t,e,r){e.exports=[\"normal\",\"italic\",\"oblique\"]},{}],98:[function(t,e,r){e.exports=[\"normal\",\"bold\",\"bolder\",\"lighter\",\"100\",\"200\",\"300\",\"400\",\"500\",\"600\",\"700\",\"800\",\"900\"]},{}],99:[function(t,e,r){\"use strict\";e.exports={parse:t(\"./parse\"),stringify:t(\"./stringify\")}},{\"./parse\":101,\"./stringify\":102}],100:[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\":95}],101:[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\":100,\"css-font-stretch-keywords\":96,\"css-font-style-keywords\":97,\"css-font-weight-keywords\":98,\"css-global-keywords\":103,\"css-system-font-keywords\":104,\"string-split-by\":305,unquote:328}],102:[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;re?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>>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>>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(;++o1)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=r)for(n=i=r;++or&&(n=r),i=r)for(n=i=r;++or&&(n=r),i=0?(a>=v?10:a>=y?5:a>=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=v?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>=v?i*=10:a>=y?i*=5:a>=x&&(i*=2),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 k(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a=r)for(n=r;++ar&&(n=r)}else for(;++a=r)for(n=r;++ar&&(n=r);return n}function A(t){if(!(i=t.length))return[];for(var e=-1,r=k(t,M),n=new Array(r);++et?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;af;)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=r)for(n=r;++an&&(n=r)}else for(;++a=r)for(n=r;++an&&(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=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r},t.min=k,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);r0)return[t];if((n=e0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s=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(),m=a();++hl.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})}))},{}],109:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(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,8})$/,l=new RegExp(\"^rgb\\\\(\"+[i,i,i]+\"\\\\)$\"),c=new RegExp(\"^rgb\\\\(\"+[o,o,o]+\"\\\\)$\"),u=new RegExp(\"^rgba\\\\(\"+[i,i,i,a]+\"\\\\)$\"),f=new RegExp(\"^rgba\\\\(\"+[o,o,o,a]+\"\\\\)$\"),h=new RegExp(\"^hsl\\\\(\"+[a,o,o]+\"\\\\)$\"),p=new RegExp(\"^hsla\\\\(\"+[a,o,o,a]+\"\\\\)$\"),d={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 g(){return this.rgb().formatHex()}function m(){return this.rgb().formatRgb()}function v(t){var e,r;return t=(t+\"\").trim().toLowerCase(),(e=s.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?y(e):3===r?new w(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?x(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?x(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=l.exec(t))?new w(e[1],e[2],e[3],1):(e=c.exec(t))?new w(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=u.exec(t))?x(e[1],e[2],e[3],e[4]):(e=f.exec(t))?x(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=h.exec(t))?M(e[1],e[2]/100,e[3]/100,1):(e=p.exec(t))?M(e[1],e[2]/100,e[3]/100,e[4]):d.hasOwnProperty(t)?y(d[t]):\"transparent\"===t?new w(NaN,NaN,NaN,0):null}function y(t){return new w(t>>16&255,t>>8&255,255&t,1)}function x(t,e,r,n){return n<=0&&(t=e=r=NaN),new w(t,e,r,n)}function b(t){return t instanceof n||(t=v(t)),t?new w((t=t.rgb()).r,t.g,t.b,t.opacity):new w}function _(t,e,r,n){return 1===arguments.length?b(t):new w(t,e,r,null==n?1:n)}function w(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function T(){return\"#\"+A(this.r)+A(this.g)+A(this.b)}function k(){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+\")\")}function A(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?\"0\":\"\")+t.toString(16)}function M(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new L(t,e,r,n)}function S(t){if(t instanceof L)return new L(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=v(t)),!t)return new L;if(t instanceof L)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*(r0&&c<1?0:s,new L(s,l,c,t.opacity)}function E(t,e,r,n){return 1===arguments.length?S(t):new L(t,e,r,null==n?1:n)}function L(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function C(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,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:g,formatHex:g,formatHsl:function(){return S(this).formatHsl()},formatRgb:m,toString:m}),e(w,_,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new w(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new w(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:T,formatHex:T,formatRgb:k,toString:k})),e(L,E,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new L(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new L(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 w(C(t>=240?t-240:t+120,i,n),C(t,i,n),C(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},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?\"hsl(\":\"hsla(\")+(this.h||0)+\", \"+100*(this.s||0)+\"%, \"+100*(this.l||0)+\"%\"+(1===t?\")\":\", \"+t+\")\")}}));var P=Math.PI/180,I=180/Math.PI,O=6/29,z=3*O*O;function D(t){if(t instanceof F)return new F(t.l,t.a,t.b,t.opacity);if(t instanceof q)return G(t);t instanceof w||(t=b(t));var e,r,n=U(t.r),i=U(t.g),a=U(t.b),o=B((.2225045*n+.7168786*i+.0606169*a)/1);return n===i&&i===a?e=r=o:(e=B((.4360747*n+.3850649*i+.1430804*a)/.96422),r=B((.0139322*n+.0971045*i+.7141733*a)/.82521)),new F(116*o-16,500*(e-o),200*(o-r),t.opacity)}function R(t,e,r,n){return 1===arguments.length?D(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 B(t){return t>.008856451679035631?Math.pow(t,1/3):t/z+4/29}function N(t){return t>O?t*t*t:z*(t-4/29)}function j(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 V(t){if(t instanceof q)return new q(t.h,t.c,t.l,t.opacity);if(t instanceof F||(t=D(t)),0===t.a&&0===t.b)return new q(NaN,0=0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);return{type:t,name:r}}))}function a(t,e){for(var r,n=0,i=t.length;n0)for(var r,n,i=new Array(r),a=0;ah+c||np+c||au.index){var f=h-s.x-s.vx,m=p-s.y-s.vy,v=f*f+m*m;vt.r&&(t.r=t[e].r)}function h(){if(r){var e,i,a=r.length;for(n=new Array(a),e=0;e=c)){(t.data!==r||t.next)&&(0===f&&(d+=(f=o())*f),0===h&&(d+=(h=o())*h),d1?(null==r?u.remove(t):u.set(t,v(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;c1?(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;a1?n[0]+n.slice(2):n,+t.slice(r+1)]}function r(t){return(t=e(Math.abs(t)))?t[1]:NaN}var n,i=/^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;function a(t){if(!(e=i.exec(t)))throw new Error(\"invalid format: \"+t);var e;return new o({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function o(t){this.fill=void 0===t.fill?\" \":t.fill+\"\",this.align=void 0===t.align?\">\":t.align+\"\",this.sign=void 0===t.sign?\"-\":t.sign+\"\",this.symbol=void 0===t.symbol?\"\":t.symbol+\"\",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?\"\":t.type+\"\"}function s(t,r){var n=e(t,r);if(!n)return t+\"\";var i=n[0],a=n[1];return a<0?\"0.\"+new Array(-a).join(\"0\")+i:i.length>a+1?i.slice(0,a+1)+\".\"+i.slice(a+1):i+new Array(a-i.length+2).join(\"0\")}a.prototype=o.prototype,o.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\"0\":\"\")+(void 0===this.width?\"\":Math.max(1,0|this.width))+(this.comma?\",\":\"\")+(void 0===this.precision?\"\":\".\"+Math.max(0,0|this.precision))+(this.trim?\"~\":\"\")+this.type};var l={\"%\":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+\"\"},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString(\"en\").replace(/,/g,\"\"):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return s(100*t,e)},r:s,s:function(t,r){var i=e(t,r);if(!i)return t+\"\";var a=i[0],o=i[1],s=o-(n=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+new Array(s-l+1).join(\"0\"):s>0?a.slice(0,s)+\".\"+a.slice(s):\"0.\"+new Array(1-s).join(\"0\")+e(t,Math.max(0,r+s-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function c(t){return t}var u,f=Array.prototype.map,h=[\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\\xb5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];function p(t){var e,i,o=void 0===t.grouping||void 0===t.thousands?c:(e=f.call(t.grouping,Number),i=t.thousands+\"\",function(t,r){for(var n=t.length,a=[],o=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(t.substring(n-=s,n+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(i)}),s=void 0===t.currency?\"\":t.currency[0]+\"\",u=void 0===t.currency?\"\":t.currency[1]+\"\",p=void 0===t.decimal?\".\":t.decimal+\"\",d=void 0===t.numerals?c:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(f.call(t.numerals,String)),g=void 0===t.percent?\"%\":t.percent+\"\",m=void 0===t.minus?\"-\":t.minus+\"\",v=void 0===t.nan?\"NaN\":t.nan+\"\";function y(t){var e=(t=a(t)).fill,r=t.align,i=t.sign,c=t.symbol,f=t.zero,y=t.width,x=t.comma,b=t.precision,_=t.trim,w=t.type;\"n\"===w?(x=!0,w=\"g\"):l[w]||(void 0===b&&(b=12),_=!0,w=\"g\"),(f||\"0\"===e&&\"=\"===r)&&(f=!0,e=\"0\",r=\"=\");var T=\"$\"===c?s:\"#\"===c&&/[boxX]/.test(w)?\"0\"+w.toLowerCase():\"\",k=\"$\"===c?u:/[%p]/.test(w)?g:\"\",A=l[w],M=/[defgprs%]/.test(w);function S(t){var a,s,l,c=T,u=k;if(\"c\"===w)u=A(t)+u,t=\"\";else{var g=(t=+t)<0||1/t<0;if(t=isNaN(t)?v:A(Math.abs(t),b),_&&(t=function(t){t:for(var e,r=t.length,n=1,i=-1;n0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),g&&0==+t&&\"+\"!==i&&(g=!1),c=(g?\"(\"===i?i:m:\"-\"===i||\"(\"===i?\"\":i)+c,u=(\"s\"===w?h[8+n/3]:\"\")+u+(g&&\"(\"===i?\")\":\"\"),M)for(a=-1,s=t.length;++a(l=t.charCodeAt(a))||l>57){u=(46===l?p+t.slice(a+1):t.slice(a))+u,t=t.slice(0,a);break}}x&&!f&&(t=o(t,1/0));var S=c.length+t.length+u.length,E=S>1)+c+t+u+E.slice(S);break;default:t=E+c+t+u}return d(t)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return t+\"\"},S}return{format:y,formatPrefix:function(t,e){var n=y(((t=a(t)).type=\"f\",t)),i=3*Math.max(-8,Math.min(8,Math.floor(r(e)/3))),o=Math.pow(10,-i),s=h[8+i/3];return function(t){return n(o*t)+s}}}}function d(e){return u=p(e),t.format=u.format,t.formatPrefix=u.formatPrefix,u}d({decimal:\".\",thousands:\",\",grouping:[3],currency:[\"$\",\"\"],minus:\"-\"}),t.FormatSpecifier=o,t.formatDefaultLocale=d,t.formatLocale=p,t.formatSpecifier=a,t.precisionFixed=function(t){return Math.max(0,-r(Math.abs(t)))},t.precisionPrefix=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(r(e)/3)))-r(Math.abs(t)))},t.precisionRound=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,r(e)-r(t))+1},Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],113:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-geo\"),t(\"d3-array\")):i(n.d3=n.d3||{},n.d3,n.d3)}(this,(function(t,e,r){\"use strict\";var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,c=Math.log,u=Math.max,f=Math.min,h=Math.pow,p=Math.round,d=Math.sign||function(t){return t>0?1:t<0?-1:0},g=Math.sin,m=Math.tan,v=1e-6,y=Math.PI,x=y/2,b=y/4,_=Math.SQRT1_2,w=L(2),T=L(y),k=2*y,A=180/y,M=y/180;function S(t){return t>1?x:t<-1?-x:Math.asin(t)}function E(t){return t>1?0:t<-1?y:Math.acos(t)}function L(t){return t>0?Math.sqrt(t):0}function C(t){return(s(t)-s(-t))/2}function P(t){return(s(t)+s(-t))/2}function I(t){var e=m(t/2),r=2*c(o(t/2))/(e*e);function i(t,e){var n=o(t),i=o(e),a=g(e),s=i*n,l=-((1-s?c((1+s)/2)/(1-s):-.5)+r/(1+s));return[l*i*g(t),l*a]}return i.invert=function(e,i){var s,l=L(e*e+i*i),u=-t/2,f=50;if(!l)return[0,0];do{var h=u/2,p=o(h),d=g(h),m=d/p,y=-c(n(p));u-=s=(2/m*y-r*m-l)/(-y/(d*d)+1-r/(2*p*p))*(p<0?.7:1)}while(n(s)>v&&--f>0);var x=g(u);return[a(e*x,l*o(u)),S(i*x/l)]},i}function O(t,e){var r=o(e),n=function(t){return t?t/Math.sin(t):1}(E(r*o(t/=2)));return[2*r*g(t)*n,g(e)*n]}function z(t){var e=g(t),r=o(t),i=t>=0?1:-1,s=m(i*t),l=(1+e-r)/2;function c(t,n){var c=o(n),u=o(t/=2);return[(1+c)*g(t),(i*n>-a(u,s)-.001?0:10*-i)+l+g(n)*r-(1+c)*e*u]}return c.invert=function(t,c){var u=0,f=0,h=50;do{var p=o(u),d=g(u),m=o(f),y=g(f),x=1+m,b=x*d-t,_=l+y*r-x*e*p-c,w=x*p/2,T=-d*y,k=e*x*d/2,A=r*m+e*p*y,M=T*k-A*w,S=(_*T-b*A)/M/2,E=(b*k-_*w)/M;n(E)>2&&(E/=2),u-=S,f-=E}while((n(S)>v||n(E)>v)&&--h>0);return i*f>-a(o(u),s)-.001?[2*u,f]:null},c}function D(t,e){var r=m(e/2),n=L(1-r*r),i=1+n*o(t/=2),a=g(t)*n/i,s=r/i,l=a*a,c=s*s;return[4/3*a*(3+l-3*c),4/3*s*(3+3*l-c)]}O.invert=function(t,e){if(!(t*t+4*e*e>y*y+v)){var r=t,i=e,a=25;do{var s,l=g(r),c=g(r/2),u=o(r/2),f=g(i),h=o(i),p=g(2*i),d=f*f,m=h*h,x=c*c,b=1-m*u*u,_=b?E(h*u)*L(s=1/b):s=0,w=2*_*h*c-t,T=_*f-e,k=s*(m*x+_*h*u*d),A=s*(.5*l*p-2*_*f*c),M=.25*s*(p*c-_*f*m*l),S=s*(d*u+_*x*h),C=A*M-S*k;if(!C)break;var P=(T*A-w*S)/C,I=(w*M-T*k)/C;r-=P,i-=I}while((n(P)>v||n(I)>v)&&--a>0);return[r,i]}},D.invert=function(t,e){if(e*=3/8,!(t*=3/8)&&n(e)>1)return null;var r=1+t*t+e*e,i=L((r-L(r*r-4*e*e))/2),s=S(i)/3,l=i?function(t){return c(t+L(t*t-1))}(n(e/i))/3:function(t){return c(t+L(t*t+1))}(n(t))/3,u=o(s),f=P(l),h=f*f-u*u;return[2*d(t)*a(C(l)*u,.25-h),2*d(e)*a(f*g(s),.25+h)]};var R=L(8),F=c(1+w);function B(t,e){var r=n(e);return rx){var l=a(s[1],s[0]),c=L(s[0]*s[0]+s[1]*s[1]),u=r*p((l-x)/r)+x,f=a(g(l-=u),2-o(l));l=u+S(y/c*g(f))-f,s[0]=c*o(l),s[1]=c*g(l)}return s}return s.invert=function(t,n){var s=L(t*t+n*n);if(s>x){var l=a(n,t),c=r*p((l-x)/r)+x,u=l>c?-1:1,f=s*o(c-l),h=1/m(u*E((f-y)/L(y*(y-2*f)+s*s)));l=c+2*i((h+u*L(h*h-3))/3),t=s*o(l),n=s*g(l)}return e.geoAzimuthalEquidistantRaw.invert(t,n)},s}function j(t,r){if(arguments.length<2&&(r=t),1===r)return e.geoAzimuthalEqualAreaRaw;if(r===1/0)return U;function n(n,i){var a=e.geoAzimuthalEqualAreaRaw(n/r,i);return a[0]*=t,a}return n.invert=function(n,i){var a=e.geoAzimuthalEqualAreaRaw.invert(n/t,i);return a[0]*=r,a},n}function U(t,e){return[t*o(e)/o(e/=2),2*g(e)]}function V(t,e,r){var i,a,o,s=100;r=void 0===r?0:+r,e=+e;do{(a=t(r))===(o=t(r+v))&&(o=a+v),r-=i=-1*v*(a-e)/(a-o)}while(s-- >0&&n(i)>v);return s<0?NaN:r}function H(t,e,r){return void 0===e&&(e=40),void 0===r&&(r=1e-12),function(i,a,o,s){var l,c,u;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var f=0;fl)o-=c/=2,s-=u/=2;else{l=g;var m=(o>0?-1:1)*r,v=(s>0?-1:1)*r,y=t(o+m,s),x=t(o,s+v),b=(y[0]-h[0])/m,_=(y[1]-h[1])/m,w=(x[0]-h[0])/v,T=(x[1]-h[1])/v,k=T*b-_*w,A=(n(k)<.5?.5:1)/k;if(o+=c=(d*w-p*T)*A,s+=u=(p*_-d*b)*A,n(c)0&&(i[1]*=1+a/1.5*i[0]*i[0]),i}return e.invert=H(e),e}function G(t,e){var r,i=t*g(e),a=30;do{e-=r=(e+g(e)-i)/(1+o(e))}while(n(r)>v&&--a>0);return e/2}function Y(t,e,r){function n(n,i){return[t*n*o(i=G(r,i)),e*g(i)]}return n.invert=function(n,i){return i=S(i/e),[n/(t*o(i)),S((2*i+g(2*i))/r)]},n}B.invert=function(t,e){if((a=n(e))1e-12&&--u>0);return[t/(o(l)*(R-1/g(l))),d(e)*l]},U.invert=function(t,e){var r=2*S(e/2);return[t*o(r/2)/o(r),r]};var W=Y(w/x,w,y);var X=2.00276,Z=1.11072;function J(t,e){var r=G(y,e);return[X*t/(1/o(e)+Z/o(r)),(e+w*g(r))/X]}function K(t){var r=0,n=e.geoProjectionMutator(t),i=n(r);return i.parallel=function(t){return arguments.length?n(r=t*M):r*A},i}function Q(t,e){return[t*o(e),e]}function $(t){if(!t)return Q;var e=1/m(t);function r(r,n){var i=e+t-n,a=i?r*o(n)/i:i;return[i*g(a),e-i*o(a)]}return r.invert=function(r,n){var i=L(r*r+(n=e-n)*n),s=e+t-i;return[i/o(s)*a(r,n),s]},r}function tt(t){function e(e,r){var n=x-r,i=n?e*t*g(n)/n:n;return[n*g(i)/t,x-n*o(i)]}return e.invert=function(e,r){var n=e*t,i=x-r,o=L(n*n+i*i),s=a(n,i);return[(o?o/g(o):1)*s/t,x-o]},e}J.invert=function(t,e){var r,i,a=X*e,s=e<0?-b:b,l=25;do{i=a-w*g(s),s-=r=(g(2*s)+2*s-y*g(i))/(2*o(2*s)+2+y*o(i)*w*o(s))}while(n(r)>v&&--l>0);return i=a-w*g(s),[t*(1/o(i)+Z/o(s))/X,i]},Q.invert=function(t,e){return[t/o(e),e]};var et=Y(1,4/y,y);function rt(t,e,r,i,s,l){var c,u=o(l);if(n(t)>1||n(l)>1)c=E(r*s+e*i*u);else{var f=g(t/2),h=g(l/2);c=2*S(L(f*f+e*i*h*h))}return n(c)>v?[c,a(i*g(l),e*s-r*i*u)]:[0,0]}function nt(t,e,r){return E((t*t+e*e-r*r)/(2*t*e))}function it(t){return t-2*y*l((t+y)/(2*y))}function at(t,e,r){for(var n,i=[[t[0],t[1],g(t[1]),o(t[1])],[e[0],e[1],g(e[1]),o(e[1])],[r[0],r[1],g(r[1]),o(r[1])]],a=i[2],s=0;s<3;++s,a=n)n=i[s],a.v=rt(n[1]-a[1],a[3],a[2],n[3],n[2],n[0]-a[0]),a.point=[0,0];var l=nt(i[0].v[0],i[2].v[0],i[1].v[0]),c=nt(i[0].v[0],i[1].v[0],i[2].v[0]),u=y-l;i[2].point[1]=0,i[0].point[0]=-(i[1].point[0]=i[0].v[0]/2);var f=[i[2].point[0]=i[0].point[0]+i[2].v[0]*o(l),2*(i[0].point[1]=i[1].point[1]=i[2].v[0]*g(l))];return function(t,e){var r,n=g(e),a=o(e),s=new Array(3);for(r=0;r<3;++r){var l=i[r];if(s[r]=rt(e-l[1],l[3],l[2],a,n,t-l[0]),!s[r][0])return l.point;s[r][1]=it(s[r][1]-l.v[1])}var h=f.slice();for(r=0;r<3;++r){var p=2==r?0:r+1,d=nt(i[r].v[0],s[r][0],s[p][0]);s[r][1]<0&&(d=-d),r?1==r?(d=c-d,h[0]-=s[r][0]*o(d),h[1]-=s[r][0]*g(d)):(d=u-d,h[0]+=s[r][0]*o(d),h[1]+=s[r][0]*g(d)):(h[0]+=s[r][0]*o(d),h[1]-=s[r][0]*g(d))}return h[0]/=3,h[1]/=3,h}}function ot(t){return t[0]*=M,t[1]*=M,t}function st(t,r,n){var i=e.geoCentroid({type:\"MultiPoint\",coordinates:[t,r,n]}),a=[-i[0],-i[1]],o=e.geoRotation(a),s=at(ot(o(t)),ot(o(r)),ot(o(n)));s.invert=H(s);var l=e.geoProjection(s).rotate(a),c=l.center;return delete l.rotate,l.center=function(t){return arguments.length?c(o(t)):o.invert(c())},l.clipAngle(90)}function lt(t,e){var r=L(1-g(e));return[2/T*t*r,T*(1-r)]}function ct(t){var e=m(t);function r(t,r){return[t,(t?t/g(t):1)*(g(r)*o(t)-e*o(r))]}return r.invert=e?function(t,r){t&&(r*=g(t)/t);var n=o(t);return[t,2*a(L(n*n+e*e-r*r)-n,e-r)]}:function(t,e){return[t,S(t?e*m(t)/t:e)]},r}lt.invert=function(t,e){var r=(r=e/T-1)*r;return[r>0?t*L(y/r)/2:0,S(1-r)]};var ut=L(3);function ft(t,e){return[ut*t*(2*o(2*e/3)-1)/T,ut*T*g(e/3)]}function ht(t){var e=o(t);function r(t,r){return[t*e,g(r)/e]}return r.invert=function(t,r){return[t/e,S(r*e)]},r}function pt(t){var e=o(t);function r(t,r){return[t*e,(1+e)*m(r/2)]}return r.invert=function(t,r){return[t/e,2*i(r/(1+e))]},r}function dt(t,e){var r=L(8/(3*y));return[r*t*(1-n(e)/y),r*e]}function gt(t,e){var r=L(4-3*g(n(e)));return[2/L(6*y)*t*r,d(e)*L(2*y/3)*(2-r)]}function mt(t,e){var r=L(y*(4+y));return[2/r*t*(1+L(1-4*e*e/(y*y))),4/r*e]}function vt(t,e){var r=(2+x)*g(e);e/=2;for(var i=0,a=1/0;i<10&&n(a)>v;i++){var s=o(e);e-=a=(e+g(e)*(s+2)-r)/(2*s*(1+s))}return[2/L(y*(4+y))*t*(1+o(e)),2*L(y/(4+y))*g(e)]}function yt(t,e){return[t*(1+o(e))/L(2+y),2*e/L(2+y)]}function xt(t,e){for(var r=(1+x)*g(e),i=0,a=1/0;i<10&&n(a)>v;i++)e-=a=(e+g(e)-r)/(1+o(e));return r=L(2+y),[t*(1+o(e))/r,2*e/r]}ft.invert=function(t,e){var r=3*S(e/(ut*T));return[T*t/(ut*(2*o(2*r/3)-1)),r]},dt.invert=function(t,e){var r=L(8/(3*y)),i=e/r;return[t/(r*(1-n(i)/y)),i]},gt.invert=function(t,e){var r=2-n(e)/L(2*y/3);return[t*L(6*y)/(2*r),d(e)*S((4-r*r)/3)]},mt.invert=function(t,e){var r=L(y*(4+y))/2;return[t*r/(1+L(1-e*e*(4+y)/(4*y))),e*r/2]},vt.invert=function(t,e){var r=e*L((4+y)/y)/2,n=S(r),i=o(n);return[t/(2/L(y*(4+y))*(1+i)),S((n+r*(i+2))/(2+x))]},yt.invert=function(t,e){var r=L(2+y),n=e*r/2;return[r*t/(1+o(n)),n]},xt.invert=function(t,e){var r=1+x,n=L(r/2);return[2*t*n/(1+o(e*=n)),S((e+g(e))/r)]};var bt=3+2*w;function _t(t,e){var r=g(t/=2),n=o(t),a=L(o(e)),s=o(e/=2),l=g(e)/(s+w*n*a),u=L(2/(1+l*l)),f=L((w*s+(n+r)*a)/(w*s+(n-r)*a));return[bt*(u*(f-1/f)-2*c(f)),bt*(u*l*(f+1/f)-2*i(l))]}_t.invert=function(t,e){if(!(r=D.invert(t/1.2,1.065*e)))return null;var r,a=r[0],s=r[1],l=20;t/=bt,e/=bt;do{var h=a/2,p=s/2,d=g(h),m=o(h),y=g(p),b=o(p),T=o(s),k=L(T),A=y/(b+w*m*k),M=A*A,S=L(2/(1+M)),E=(w*b+(m+d)*k)/(w*b+(m-d)*k),C=L(E),P=C-1/C,I=C+1/C,O=S*P-2*c(C)-t,z=S*A*I-2*i(A)-e,R=y&&_*k*d*M/y,F=(w*m*b+k)/(2*(b+w*m*k)*(b+w*m*k)*k),B=-.5*A*S*S*S,N=B*R,j=B*F,U=(U=2*b+w*k*(m-d))*U*C,V=(w*m*b*k+T)/U,H=-w*d*y/(k*U),q=P*N-2*V/C+S*(V+V/E),G=P*j-2*H/C+S*(H+H/E),Y=A*I*N-2*R/(1+M)+S*I*R+S*A*(V-V/E),W=A*I*j-2*F/(1+M)+S*I*F+S*A*(H-H/E),X=G*Y-W*q;if(!X)break;var Z=(z*G-O*W)/X,J=(O*Y-z*q)/X;a-=Z,s=u(-x,f(x,s-J))}while((n(Z)>v||n(J)>v)&&--l>0);return n(n(s)-x)s){var d=L(h),m=a(f,u),b=i*p(m/i),_=m-b,w=t*o(_),T=(t*g(_)-_*g(w))/(x-w),k=Lt(_,T),A=(y-t)/Ct(k,w,y);u=d;var M,S=50;do{u-=M=(t+Ct(k,w,u)*A-d)/(k(u)*A)}while(n(M)>v&&--S>0);f=_*g(u),us){var u=L(c),f=a(l,r),h=i*p(f/i),d=f-h;r=u*o(d),l=u*g(d);for(var m=r-x,v=g(r),b=l/v,_=rv||n(p)>v)&&--x>0);return[d,m]},u}Tt.invert=function(t,e){var r=e/(1+wt);return[t&&t/(wt*L(1-r*r)),2*i(r)]},kt.invert=function(t,e){var r=i(e/T),n=o(r),a=2*r;return[t*T/2/(o(a)*n*n),a]};var It=Pt(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);var Ot=Pt(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);var zt=Pt(5/6*y,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Dt(t,e){var r=t*t,n=e*e;return[t*(1-.162388*n)*(.87-952426e-9*r*r),e*(1+n/12)]}Dt.invert=function(t,e){var r,i=t,a=e,o=50;do{var s=a*a;a-=r=(a*(1+s/12)-e)/(1+s/4)}while(n(r)>v&&--o>0);o=50,t/=1-.162388*s;do{var l=(l=i*i)*l;i-=r=(i*(.87-952426e-9*l)-t)/(.87-.00476213*l)}while(n(r)>v&&--o>0);return[i,a]};var Rt=Pt(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Ft(t){var e=t(x,0)[0]-t(-x,0)[0];function r(r,n){var i=r>0?-.5:.5,a=t(r+i*y,n);return a[0]-=i*e,a}return t.invert&&(r.invert=function(r,n){var i=r>0?-.5:.5,a=t.invert(r+i*e,n),o=a[0]-i*y;return o<-y?o+=2*y:o>y&&(o-=2*y),a[0]=o,a}),r}function Bt(t,e){var r=d(t),i=d(e),s=o(e),l=o(t)*s,c=g(t)*s,u=g(i*e);t=n(a(c,u)),e=S(l),n(t-x)>v&&(t%=x);var f=function(t,e){if(e===x)return[0,0];var r,i,a=g(e),s=a*a,l=s*s,c=1+l,u=1+3*l,f=1-l,h=S(1/L(c)),p=f+s*c*h,d=(1-a)/p,m=L(d),b=d*c,_=L(b),w=m*f;if(0===t)return[0,-(w+s*_)];var T,k=o(e),A=1/k,M=2*a*k,E=(-p*k-(-3*s+h*u)*M*(1-a))/(p*p),C=-A*M,P=-A*(s*c*E+d*u*M),I=-2*A*(f*(.5*E/m)-2*s*m*M),O=4*t/y;if(t>.222*y||e.175*y){if(r=(w+s*L(b*(1+l)-w*w))/(1+l),t>y/4)return[r,r];var z=r,D=.5*r;r=.5*(D+z),i=50;do{var R=L(b-r*r),F=r*(I+C*R)+P*S(r/_)-O;if(!F)break;F<0?D=r:z=r,r=.5*(D+z)}while(n(z-D)>v&&--i>0)}else{r=v,i=25;do{var B=r*r,N=L(b-B),j=I+C*N,U=r*j+P*S(r/_)-O,V=j+(P-C*B)/N;r-=T=N?U/V:0}while(n(T)>v&&--i>0)}return[r,-w-s*L(b-r*r)]}(t>y/4?x-t:t,e);return t>y/4&&(u=f[0],f[0]=-f[1],f[1]=-u),f[0]*=r,f[1]*=-i,f}function Nt(t,e){var r,a,l,c,u,f;if(e=1-v)return r=(1-e)/4,l=1/(a=P(t)),[(c=((f=s(2*(f=t)))-1)/(f+1))+r*((u=a*C(t))-t)/(a*a),l-r*c*l*(u-t),l+r*c*l*(u+t),2*i(s(t))-x+r*(u-t)/a];var h=[1,0,0,0,0,0,0,0,0],p=[L(e),0,0,0,0,0,0,0,0],d=0;for(a=L(1-e),u=1;n(p[d]/h[d])>v&&d<8;)r=h[d++],p[d]=(r-a)/2,h[d]=(r+a)/2,a=L(r*a),u*=2;l=u*h[d]*t;do{l=(S(c=p[d]*g(a=l)/h[d])+l)/2}while(--d);return[g(l),c=o(l),c/o(l-a),l]}function jt(t,e){if(!e)return t;if(1===e)return c(m(t/2+b));for(var r=1,a=L(1-e),o=L(e),s=0;n(o)>v;s++){if(t%y){var l=i(a*m(t)/r);l<0&&(l+=y),t+=l+~~(t/y)*y}else t+=t;o=(r+a)/2,a=L(r*a),o=((r=o)-a)/2}return t/(h(2,s)*r)}function Ut(t,e){var r=(w-1)/(w+1),l=L(1-r*r),u=jt(x,l*l),f=c(m(y/4+n(e)/2)),h=s(-1*f)/L(r),p=function(t,e){var r=t*t,n=e+1,i=1-r-e*e;return[.5*((t>=0?x:-x)-a(i,2*t)),-.25*c(i*i+4*r)+.5*c(n*n+r)]}(h*o(-1*t),h*g(-1*t)),v=function(t,e,r){var a=n(t),o=C(n(e));if(a){var s=1/g(a),l=1/(m(a)*m(a)),c=-(l+r*(o*o*s*s)-1+r),u=(-c+L(c*c-4*((r-1)*l)))/2;return[jt(i(1/L(u)),r)*d(t),jt(i(L((u/l-1)/r)),1-r)*d(e)]}return[0,jt(i(o),1-r)*d(e)]}(p[0],p[1],l*l);return[-v[1],(e>=0?1:-1)*(.5*u-v[0])]}function Vt(t){var e=g(t),r=o(t),i=Ht(t);function s(t,a){var s=i(t,a);t=s[0],a=s[1];var l=g(a),c=o(a),u=o(t),f=E(e*l+r*c*u),h=g(f),p=n(h)>v?f/h:1;return[p*r*g(t),(n(t)>x?p:-p)*(e*c-r*l*u)]}return i.invert=Ht(-t),s.invert=function(t,r){var n=L(t*t+r*r),s=-g(n),l=o(n),c=n*l,u=-r*s,f=n*e,h=L(c*c+u*u-f*f),p=a(c*f+u*h,u*f-c*h),d=(n>x?-1:1)*a(t*s,n*o(p)*l+r*g(p)*s);return i.invert(d,p)},s}function Ht(t){var e=g(t),r=o(t);return function(t,n){var i=o(n),s=o(t)*i,l=g(t)*i,c=g(n);return[a(l,s*r-c*e),S(c*r+s*e)]}}Bt.invert=function(t,e){n(t)>1&&(t=2*d(t)-t),n(e)>1&&(e=2*d(e)-e);var r=d(t),i=d(e),s=-r*t,l=-i*e,c=l/s<1,u=function(t,e){var r=0,i=1,a=.5,s=50;for(;;){var l=a*a,c=L(a),u=S(1/L(1+l)),f=1-l+a*(1+l)*u,h=(1-c)/f,p=L(h),d=h*(1+l),g=p*(1-l),m=L(d-t*t),v=e+g+a*m;if(n(i-r)<1e-12||0==--s||0===v)break;v>0?r=a:i=a,a=.5*(r+i)}if(!s)return null;var x=S(c),b=o(x),_=1/b,w=2*c*b,T=(-f*b-(-3*a+u*(1+3*l))*w*(1-c))/(f*f);return[y/4*(t*(-2*_*(.5*T/p*(1-l)-2*a*p*w)+-_*w*m)+-_*(a*(1+l)*T+h*(1+3*l)*w)*S(t/L(d))),x]}(c?l:s,c?s:l),f=u[0],h=u[1],p=o(h);return c&&(f=-x-f),[r*(a(g(f)*p,-g(h))+y),i*S(o(f)*p)]},Ut.invert=function(t,e){var r,n,o,l,u,f,h=(w-1)/(w+1),p=L(1-h*h),d=jt(x,p*p),g=(n=-t,o=p*p,(r=.5*d-e)?(l=Nt(r,o),n?(f=(u=Nt(n,1-o))[1]*u[1]+o*l[0]*l[0]*u[0]*u[0],[[l[0]*u[2]/f,l[1]*l[2]*u[0]*u[1]/f],[l[1]*u[1]/f,-l[0]*l[2]*u[0]*u[2]/f],[l[2]*u[1]*u[2]/f,-o*l[0]*l[1]*u[0]/f]]):[[l[0],0],[l[1],0],[l[2],0]]):[[0,(u=Nt(n,1-o))[0]/u[1]],[1/u[1],0],[u[2]/u[1],0]]),m=function(t,e){var r=e[0]*e[0]+e[1]*e[1];return[(t[0]*e[0]+t[1]*e[1])/r,(t[1]*e[0]-t[0]*e[1])/r]}(g[0],g[1]);return[a(m[1],m[0])/-1,2*i(s(-.5*c(h*m[0]*m[0]+h*m[1]*m[1])))-x]};var qt=S(1-1/3)*A,Gt=ht(0);function Yt(t){var e=qt*M,r=lt(y,e)[0]-lt(-y,e)[0],i=Gt(0,e)[1],a=lt(0,e)[1],o=T-a,s=k/t,c=4/k,h=i+o*o*4/k;function p(p,d){var g,m=n(d);if(m>e){var v=f(t-1,u(0,l((p+y)/s)));(g=lt(p+=y*(t-1)/t-v*s,m))[0]=g[0]*k/r-k*(t-1)/(2*t)+v*k/t,g[1]=i+4*(g[1]-a)*o/k,d<0&&(g[1]=-g[1])}else g=Gt(p,d);return g[0]*=c,g[1]/=h,g}return p.invert=function(e,p){e/=c;var d=n(p*=h);if(d>i){var g=f(t-1,u(0,l((e+y)/s)));e=(e+y*(t-1)/t-g*s)*r/k;var m=lt.invert(e,.25*(d-i)*k/o+a);return m[0]-=y*(t-1)/t-g*s,p<0&&(m[1]=-m[1]),m}return Gt.invert(e,p)},p}function Wt(t,e){return[t,1&e?90-v:qt]}function Xt(t,e){return[t,1&e?-90+v:-qt]}function Zt(t){return[t[0]*(1-v),t[1]]}function Jt(t){var e,r=1+t,i=S(g(1/r)),s=2*L(y/(e=y+4*i*r)),l=.5*s*(r+L(t*(2+t))),c=t*t,u=r*r;function f(f,h){var p,d,m=1-g(h);if(m&&m<2){var v,b=x-h,_=25;do{var w=g(b),T=o(b),k=i+a(w,r-T),A=1+u-2*r*T;b-=v=(b-c*i-r*w+A*k-.5*m*e)/(2*r*w*k)}while(n(v)>1e-12&&--_>0);p=s*L(A),d=f*k/y}else p=s*(t+m),d=f*i/y;return[p*g(d),l-p*o(d)]}return f.invert=function(t,n){var o=t*t+(n-=l)*n,f=(1+u-o/(s*s))/(2*r),h=E(f),p=g(h),d=i+a(p,r-f);return[S(t/L(o))*y/d,S(1-2*(h-c*i-r*p+(1+u-2*r*f)*d)/e)]},f}function Kt(t,e){return e>-.7109889596207567?((t=W(t,e))[1]+=.0528035274542,t):Q(t,e)}function Qt(t,e){return n(e)>.7109889596207567?((t=W(t,e))[1]-=e>0?.0528035274542:-.0528035274542,t):Q(t,e)}function $t(t,e,r,n){var i=L(4*y/(2*r+(1+t-e/2)*g(2*r)+(t+e)/2*g(4*r)+e/2*g(6*r))),a=L(n*g(r)*L((1+t*o(2*r)+e*o(4*r))/(1+t+e))),s=r*c(1);function l(r){return L(1+t*o(2*r)+e*o(4*r))}function c(n){var i=n*r;return(2*i+(1+t-e/2)*g(2*i)+(t+e)/2*g(4*i)+e/2*g(6*i))/r}function u(t){return l(t)*g(t)}var f=function(t,e){var n=r*V(c,s*g(e)/r,e/y);isNaN(n)&&(n=r*d(e));var u=i*l(n);return[u*a*t/y*o(n),u/a*g(n)]};return f.invert=function(t,e){var n=V(u,e*a/i);return[t*y/(o(n)*i*a*l(n)),S(r*c(n/r)/s)]},0===r&&(i=L(n/y),(f=function(t,e){return[t*i,g(e)/i]}).invert=function(t,e){return[t/i,S(e*i)]}),f}function te(t,e,r,n,i){void 0===n&&(n=1e-8),void 0===i&&(i=20);var a=t(e),o=t(.5*(e+r)),s=t(r);return function t(e,r,n,i,a,o,s,l,c,u,f){if(f.nanEncountered)return NaN;var h,p,d,g,m,v,y,x,b,_;if(p=e(r+.25*(h=n-r)),d=e(n-.25*h),isNaN(p))f.nanEncountered=!0;else{if(!isNaN(d))return _=((v=(g=h*(i+4*p+a)/12)+(m=h*(a+4*d+o)/12))-s)/15,u>c?(f.maxDepthCount++,v+_):Math.abs(_)t?r=n:e=n,n=e+r>>1}while(n>e);var i=c[n+1]-c[n];return i&&(i=(t-c[n+1])/i),(n+1+i)/s}var p=2*f(1)/y*o/r,m=function(t,e){var r=f(n(g(e))),a=i(r)*t;return r/=p,[a,e>=0?r:-r]};return m.invert=function(t,e){var r;return n(e*=p)<1&&(r=d(e)*S(a(n(e))*o)),[t/i(n(e)),r]},m}function re(t,e){return n(t[0]-e[0])=0;--l)n=(e=t[1][l])[0][0],i=e[0][1],a=e[1][1],o=e[2][0],s=e[2][1],c.push(ne([[o-v,s-v],[o-v,a+v],[n+v,a+v],[n+v,i-v]],30));return{type:\"Polygon\",coordinates:[r.merge(c)]}}function ae(t,r,n){var i,a;function o(e,n){for(var i=n<0?-1:1,a=r[+(n<0)],o=0,s=a.length-1;oa[o][2][0];++o);var l=t(e-a[o][1][0],n);return l[0]+=t(a[o][1][0],i*n>i*a[o][0][1]?a[o][0][1]:n)[0],l}n?o.invert=n(o):t.invert&&(o.invert=function(e,n){for(var i=a[+(n<0)],s=r[+(n<0)],l=0,c=i.length;lo&&(r=a,a=o,o=r),[[n,a],[i,o]]}))})),s):r.map((function(t){return t.map((function(t){return[[t[0][0]*A,t[0][1]*A],[t[1][0]*A,t[1][1]*A],[t[2][0]*A,t[2][1]*A]]}))}))},null!=r&&s.lobes(r),s}Kt.invert=function(t,e){return e>-.7109889596207567?W.invert(t,e-.0528035274542):Q.invert(t,e)},Qt.invert=function(t,e){return n(e)>.7109889596207567?W.invert(t,e+(e>0?.0528035274542:-.0528035274542)):Q.invert(t,e)};var oe=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var se=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var le=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var ce=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];var ue=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];var fe=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function he(t,e){return[3/k*t*L(y*y/3-e*e),e]}function pe(t){function e(e,r){if(n(n(r)-x)2)return null;var o=(e/=2)*e,s=(r/=2)*r,l=2*r/(1+o+s);return l=h((1+l)/(1-l),1/t),[a(2*e,1-o-s)/t,S((l-1)/(l+1))]},e}he.invert=function(t,e){return[k/3*t/L(y*y/3-e*e),e]};var de=y/w;function ge(t,e){return[t*(1+L(o(e)))/2,e/(o(e/2)*o(t/6))]}function me(t,e){var r=t*t,n=e*e;return[t*(.975534+n*(-.0143059*r-.119161+-.0547009*n)),e*(1.00384+r*(.0802894+-.02855*n+199025e-9*r)+n*(.0998909+-.0491032*n))]}function ve(t,e){return[g(t)/o(e),m(e)*o(t)]}function ye(t){var e=o(t),r=m(b+t/2);function i(i,a){var o=a-t,s=n(o)=0;)h=(f=t[u])[0]+l*(i=h)-c*p,p=f[1]+l*p+c*i;return[h=l*(i=h)-c*p,p=l*p+c*i]}return r.invert=function(r,s){var l=20,c=r,u=s;do{for(var f,h=e,p=t[h],d=p[0],m=p[1],v=0,y=0;--h>=0;)v=d+c*(f=v)-u*y,y=m+c*y+u*f,d=(p=t[h])[0]+c*(f=d)-u*m,m=p[1]+c*m+u*f;var x,b,_=(v=d+c*(f=v)-u*y)*v+(y=m+c*y+u*f)*y;c-=x=((d=c*(f=d)-u*m-r)*v+(m=c*m+u*f-s)*y)/_,u-=b=(m*v-d*y)/_}while(n(x)+n(b)>1e-12&&--l>0);if(l){var w=L(c*c+u*u),T=2*i(.5*w),k=g(T);return[a(c*k,w*o(T)),w?S(u*k/w):0]}},r}ge.invert=function(t,e){var r=n(t),i=n(e),a=v,s=x;iv||n(b)>v)&&--a>0);return a&&[r,i]},ve.invert=function(t,e){var r=t*t,n=e*e+1,i=r+n,a=t?_*L((i-L(i*i-4*r))/r):1/L(n);return[S(t*a),d(e)*E(a)]},xe.invert=function(t,e){return[t,2.5*i(s(.8*e))-.625*y]};var _e=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],we=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Te=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ke=[[.9245,0],[0,0],[.01943,0]],Ae=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Me(t,r){var n=e.geoProjection(be(t)).rotate(r).clipAngle(90),i=e.geoRotation(r),a=n.center;return delete n.rotate,n.center=function(t){return arguments.length?a(i(t)):i.invert(a())},n}var Se=L(6),Ee=L(7);function Le(t,e){var r=S(7*g(e)/(3*Se));return[Se*t*(2*o(2*r/3)-1)/Ee,9*g(r/3)/Ee]}function Ce(t,e){for(var r,i=(1+_)*g(e),a=e,s=0;s<25&&(a-=r=(g(a/2)+g(a)-i)/(.5*o(a/2)+o(a)),!(n(r)1e-12&&--l>0);return[t/(.84719-.13063*(i=s*s)+(o=i*(a=i*i))*o*(.05494*i-.04515-.02326*a+.00331*o)),s]},Oe.invert=function(t,e){for(var r=e/2,i=0,a=1/0;i<10&&n(a)>v;++i){var s=o(e/2);e-=a=(e-m(e/2)-r)/(1-.5/(s*s))}return[2*t/(1+o(e)),e]};var ze=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function De(t,e){var r=g(e),i=o(e),a=d(t);if(0===t||n(e)===x)return[0,e];if(0===e)return[t,0];if(n(t)===x)return[t*i,x*r];var s=y/(2*t)-2*t/y,l=2*e/y,c=(1-l*l)/(r-l),u=s*s,f=c*c,h=1+u/f,p=1+f/u,m=(s*r/c-s/2)/h,v=(f*r/u+c/2)/p,b=v*v-(f*r*r/u+c*r-1)/p;return[x*(m+L(m*m+i*i/h)*a),x*(v+L(b<0?0:b)*d(-e*s)*a)]}De.invert=function(t,e){var r=(t/=x)*t,n=r+(e/=x)*e,i=y*y;return[t?(n-1+L((1-n)*(1-n)+4*r))/(2*t)*x:0,V((function(t){return n*(y*g(t)-2*t)*y+4*t*t*(e-g(t))+2*y*t-i*e}),0)]};function Re(t,e){var r=e*e;return[t,e*(1.0148+r*r*(.23185+r*(.02406*r-.14499)))]}function Fe(t,e){if(n(e)=0;)if(n=e[s],r[0]===n[0]&&r[1]===n[1]){if(a)return[a,r];a=r}}}(e.face,r.face),i=Be(n.map(r.project),n.map(e.project));e.transform=r.transform?Ne(r.transform,i):i;for(var a=r.edges,o=0,s=a.length;o1.790857183?e=1.790857183:e<-1.790857183&&(e=-1.790857183);var r,i=e;do{var a=i*i;i-=r=(i*(1.0148+a*a*(.23185+a*(.02406*a-.14499)))-e)/(1.0148+a*a*(5*.23185+a*(.21654*a-1.01493)))}while(n(r)>v);return[t,i]},Fe.invert=function(t,e){if(n(e)v&&--s>0);return l=m(a),[(n(e)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])})),nr=[],t.length?t.length>1?{type:\"MultiPolygon\",coordinates:t}:{type:\"Polygon\",coordinates:t[0]}:null}};function sr(t){var r=t(x,0)[0]-t(-x,0)[0];function i(e,i){var a=n(e)0?e-y:e+y,i),s=(o[0]-o[1])*_,l=(o[0]+o[1])*_;if(a)return[s,l];var c=r*_,u=s>0^l>0?-1:1;return[u*s-d(l)*c,u*l-d(s)*c]}return t.invert&&(i.invert=function(e,i){var a=(e+i)*_,o=(i-e)*_,s=n(a)<.5*r&&n(o)<.5*r;if(!s){var l=r*_,c=a>0^o>0?-1:1,u=-c*e+(o>0?1:-1)*l,f=-c*i+(a>0?1:-1)*l;a=(-u-f)*_,o=(u-f)*_}var h=t.invert(a,o);return s||(h[0]+=a>0?y:-y),h}),e.geoProjection(i).rotate([-90,-90,45]).clipAngle(179.999)}function lr(){return sr(Ut).scale(111.48)}function cr(t){var e=g(t);function r(r,n){var a=e?m(r*e/2)/e:r/2;if(!n)return[2*a,-t];var s=2*i(a*g(n)),l=1/m(n);return[g(s)*l,n+(1-o(s))*l-t]}return r.invert=function(r,a){if(n(a+=t)v&&--u>0);var d=r*(f=m(c)),x=m(n(a)0?x:-x)*(h+o*(d-c)/2+o*o*(d-2*h+c)/2)]}function hr(t,e){var r=function(t){function e(e,r){var n=o(r),i=(t-1)/(t-n*o(e));return[i*n*g(e),i*g(r)]}return e.invert=function(e,r){var n=e*e+r*r,i=L(n),o=(t-L(1-n*(t+1)/(t-1)))/((t-1)/i+i/(t-1));return[a(e*o,i*L(1-o*o)),i?S(r*o/i):0]},e}(t);if(!e)return r;var n=o(e),i=g(e);function s(e,a){var o=r(e,a),s=o[1],l=s*i/(t-1)+n;return[o[0]*n/l,s/l]}return s.invert=function(e,a){var o=(t-1)/(t-1-a*i);return r.invert(o*e,o*a*n)},s}ur.forEach((function(t){t[1]*=1.0144})),fr.invert=function(t,e){var r=e/x,i=90*r,a=f(18,n(i/5)),o=u(0,l(a));do{var s=ur[o][1],c=ur[o+1][1],h=ur[f(19,o+2)][1],p=h-s,d=h-2*c+s,g=2*(n(r)-c)/p,m=d/p,v=g*(1-m*g*(1-2*m*g));if(v>=0||1===o){i=(e>=0?5:-5)*(v+a);var y,b=50;do{v=(a=f(18,n(i)/5))-(o=l(a)),s=ur[o][1],c=ur[o+1][1],h=ur[f(19,o+2)][1],i-=(y=(e>=0?x:-x)*(c+v*(h-s)/2+v*v*(h-2*c+s)/2)-e)*A}while(n(y)>1e-12&&--b>0);break}}while(--o>=0);var _=ur[o][0],w=ur[o+1][0],T=ur[f(19,o+2)][0];return[t/(w+v*(T-_)/2+v*v*(T-2*w+_)/2),i*M]};var pr=-179.9999,dr=179.9999,gr=-89.9999;function mr(t){return t.length>0}function vr(t){return-90===t||90===t?[0,t]:[-180,(e=t,Math.floor(1e4*e)/1e4)];var e}function yr(t){var e=t[0],r=t[1],n=!1;return e<=pr?(e=-180,n=!0):e>=dr&&(e=180,n=!0),r<=gr?(r=-90,n=!0):r>=89.9999&&(r=90,n=!0),n?[e,r]:t}function xr(t){return t.map(yr)}function br(t,e,r){for(var n=0,i=t.length;n=dr||u<=gr||u>=89.9999){a[o]=yr(l);for(var f=o+1;fpr&&pgr&&d<89.9999)break}if(f===o+1)continue;if(o){var g={index:-1,polygon:e,ring:a.slice(0,o+1)};g.ring[g.ring.length-1]=vr(u),r[r.length-1]=g}else r.pop();if(f>=s)break;r.push({index:-1,polygon:e,ring:a=a.slice(f-1)}),a[0]=vr(a[0][1]),o=-1,s=a.length}}}}function _r(t){var e,r,n,i,a,o,s=t.length,l={},c={};for(e=0;e0?y-l:l)*A],u=e.geoProjection(t(s)).rotate(c),f=e.geoRotation(c),h=u.center;return delete u.rotate,u.center=function(t){return arguments.length?h(f(t)):f.invert(h())},u.clipAngle(90)}function Mr(t){var r=o(t);function n(t,n){var i=e.geoGnomonicRaw(t,n);return i[0]*=r,i}return n.invert=function(t,n){return e.geoGnomonicRaw.invert(t/r,n)},n}function Sr(t,e){return Ar(Mr,t,e)}function Er(t){if(!(t*=2))return e.geoAzimuthalEquidistantRaw;var r=-t/2,n=-r,i=t*t,s=m(n),l=.5/g(n);function c(e,a){var s=E(o(a)*o(e-r)),l=E(o(a)*o(e-n));return[((s*=s)-(l*=l))/(2*t),(a<0?-1:1)*L(4*i*l-(i-s+l)*(i-s+l))/(2*t)]}return c.invert=function(t,e){var i,c,u=e*e,f=o(L(u+(i=t+r)*i)),h=o(L(u+(i=t+n)*i));return[a(c=f-h,i=(f+h)*s),(e<0?-1:1)*E(L(i*i+c*c)*l)]},c}function Lr(t,e){return Ar(Er,t,e)}function Cr(t,e){if(n(e)v&&--l>0);return[d(t)*(L(a*a+4)+a)*y/4,x*s]};var Rr=4*y+3*L(3),Fr=2*L(2*y*L(3)/Rr),Br=Y(Fr*L(3)/y,Fr,Rr/6);function Nr(t,e){return[t*L(1-3*e*e/(y*y)),e]}function jr(t,e){var r=o(e),n=o(t)*r,i=1-n,s=o(t=a(g(t)*r,-g(e))),l=g(t);return[l*(r=L(1-n*n))-s*i,-s*r-l*i]}function Ur(t,e){var r=O(t,e);return[(r[0]+t/x)/2,(r[1]+e)/2]}Nr.invert=function(t,e){return[t/L(1-3*e*e/(y*y)),e]},jr.invert=function(t,e){var r=(t*t+e*e)/-2,n=L(-r*(2+r)),i=e*r+t*n,o=t*r-e*n,s=L(o*o+i*i);return[a(n*i,s*(1+r)),s?-S(n*o/s):0]},Ur.invert=function(t,e){var r=t,i=e,a=25;do{var s,l=o(i),c=g(i),u=g(2*i),f=c*c,h=l*l,p=g(r),d=o(r/2),m=g(r/2),y=m*m,b=1-h*d*d,_=b?E(l*d)*L(s=1/b):s=0,w=.5*(2*_*l*m+r/x)-t,T=.5*(_*c+i)-e,k=.5*s*(h*y+_*l*d*f)+.5/x,A=s*(p*u/4-_*c*m),M=.125*s*(u*m-_*c*h*p),S=.5*s*(f*d+_*y*l)+.5,C=A*M-S*k,P=(T*A-w*S)/C,I=(w*M-T*k)/C;r-=P,i-=I}while((n(P)>v||n(I)>v)&&--a>0);return[r,i]},t.geoNaturalEarth=e.geoNaturalEarth1,t.geoNaturalEarthRaw=e.geoNaturalEarth1Raw,t.geoAiry=function(){var t=x,r=e.geoProjectionMutator(I),n=r(t);return n.radius=function(e){return arguments.length?r(t=e*M):t*A},n.scale(179.976).clipAngle(147)},t.geoAiryRaw=I,t.geoAitoff=function(){return e.geoProjection(O).scale(152.63)},t.geoAitoffRaw=O,t.geoArmadillo=function(){var t=20*M,r=t>=0?1:-1,n=m(r*t),i=e.geoProjectionMutator(z),s=i(t),l=s.stream;return s.parallel=function(e){return arguments.length?(n=m((r=(t=e*M)>=0?1:-1)*t),i(t)):t*A},s.stream=function(e){var i=s.rotate(),c=l(e),u=(s.rotate([0,0]),l(e)),f=s.precision();return s.rotate(i),c.sphere=function(){u.polygonStart(),u.lineStart();for(var e=-180*r;r*e<180;e+=90*r)u.point(e,90*r);if(t)for(;r*(e-=3*r*f)>=-180;)u.point(e,r*-a(o(e*M/2),n)*A);u.lineEnd(),u.polygonEnd()},c},s.scale(218.695).center([0,28.0974])},t.geoArmadilloRaw=z,t.geoAugust=function(){return e.geoProjection(D).scale(66.1603)},t.geoAugustRaw=D,t.geoBaker=function(){return e.geoProjection(B).scale(112.314)},t.geoBakerRaw=B,t.geoBerghaus=function(){var t=5,r=e.geoProjectionMutator(N),n=r(t),i=n.stream,s=-o(.01*M),l=g(.01*M);return n.lobes=function(e){return arguments.length?r(t=+e):t},n.stream=function(e){var r=n.rotate(),c=i(e),u=(n.rotate([0,0]),i(e));return n.rotate(r),c.sphere=function(){u.polygonStart(),u.lineStart();for(var e=0,r=360/t,n=2*y/t,i=90-180/t,c=x;e=0;)t.point((e=r[i])[0],e[1]);t.lineEnd(),t.polygonEnd()},t},n.scale(79.4187).parallel(45).clipAngle(179.999)},t.geoHammerRetroazimuthalRaw=Vt,t.geoHealpix=function(){var t=4,n=e.geoProjectionMutator(Yt),i=n(t),a=i.stream;return i.lobes=function(e){return arguments.length?n(t=+e):t},i.stream=function(n){var o=i.rotate(),s=a(n),l=(i.rotate([0,0]),a(n));return i.rotate(o),s.sphere=function(){var n,i;e.geoStream((n=180/t,i=[].concat(r.range(-180,180+n/2,n).map(Wt),r.range(180,-180-n/2,-n).map(Xt)),{type:\"Polygon\",coordinates:[180===n?i.map(Zt):i]}),l)},s},i.scale(239.75)},t.geoHealpixRaw=Yt,t.geoHill=function(){var t=1,r=e.geoProjectionMutator(Jt),n=r(t);return n.ratio=function(e){return arguments.length?r(t=+e):t},n.scale(167.774).center([0,18.67])},t.geoHillRaw=Jt,t.geoHomolosine=function(){return e.geoProjection(Qt).scale(152.63)},t.geoHomolosineRaw=Qt,t.geoHufnagel=function(){var t=1,r=0,n=45*M,i=2,a=e.geoProjectionMutator($t),o=a(t,r,n,i);return o.a=function(e){return arguments.length?a(t=+e,r,n,i):t},o.b=function(e){return arguments.length?a(t,r=+e,n,i):r},o.psiMax=function(e){return arguments.length?a(t,r,n=+e*M,i):n*A},o.ratio=function(e){return arguments.length?a(t,r,n,i=+e):i},o.scale(180.739)},t.geoHufnagelRaw=$t,t.geoHyperelliptical=function(){var t=0,r=2.5,n=1.183136,i=e.geoProjectionMutator(ee),a=i(t,r,n);return a.alpha=function(e){return arguments.length?i(t=+e,r,n):t},a.k=function(e){return arguments.length?i(t,r=+e,n):r},a.gamma=function(e){return arguments.length?i(t,r,n=+e):n},a.scale(152.63)},t.geoHyperellipticalRaw=ee,t.geoInterrupt=ae,t.geoInterruptedBoggs=function(){return ae(J,oe).scale(160.857)},t.geoInterruptedHomolosine=function(){return ae(Qt,se).scale(152.63)},t.geoInterruptedMollweide=function(){return ae(W,le).scale(169.529)},t.geoInterruptedMollweideHemispheres=function(){return ae(W,ce).scale(169.529).rotate([20,0])},t.geoInterruptedSinuMollweide=function(){return ae(Kt,ue,H).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},t.geoInterruptedSinusoidal=function(){return ae(Q,fe).scale(152.63).rotate([-20,0])},t.geoKavrayskiy7=function(){return e.geoProjection(he).scale(158.837)},t.geoKavrayskiy7Raw=he,t.geoLagrange=function(){var t=.5,r=e.geoProjectionMutator(pe),n=r(t);return n.spacing=function(e){return arguments.length?r(t=+e):t},n.scale(124.75)},t.geoLagrangeRaw=pe,t.geoLarrivee=function(){return e.geoProjection(ge).scale(97.2672)},t.geoLarriveeRaw=ge,t.geoLaskowski=function(){return e.geoProjection(me).scale(139.98)},t.geoLaskowskiRaw=me,t.geoLittrow=function(){return e.geoProjection(ve).scale(144.049).clipAngle(89.999)},t.geoLittrowRaw=ve,t.geoLoximuthal=function(){return K(ye).parallel(40).scale(158.837)},t.geoLoximuthalRaw=ye,t.geoMiller=function(){return e.geoProjection(xe).scale(108.318)},t.geoMillerRaw=xe,t.geoModifiedStereographic=Me,t.geoModifiedStereographicRaw=be,t.geoModifiedStereographicAlaska=function(){return Me(_e,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},t.geoModifiedStereographicGs48=function(){return Me(we,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},t.geoModifiedStereographicGs50=function(){return Me(Te,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},t.geoModifiedStereographicMiller=function(){return Me(ke,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},t.geoModifiedStereographicLee=function(){return Me(Ae,[165,10]).scale(250).clipAngle(130).center([-165,-10])},t.geoMollweide=function(){return e.geoProjection(W).scale(169.529)},t.geoMollweideRaw=W,t.geoMtFlatPolarParabolic=function(){return e.geoProjection(Le).scale(164.859)},t.geoMtFlatPolarParabolicRaw=Le,t.geoMtFlatPolarQuartic=function(){return e.geoProjection(Ce).scale(188.209)},t.geoMtFlatPolarQuarticRaw=Ce,t.geoMtFlatPolarSinusoidal=function(){return e.geoProjection(Pe).scale(166.518)},t.geoMtFlatPolarSinusoidalRaw=Pe,t.geoNaturalEarth2=function(){return e.geoProjection(Ie).scale(175.295)},t.geoNaturalEarth2Raw=Ie,t.geoNellHammer=function(){return e.geoProjection(Oe).scale(152.63)},t.geoNellHammerRaw=Oe,t.geoInterruptedQuarticAuthalic=function(){return ae(j(1/0),ze).rotate([20,0]).scale(152.63)},t.geoNicolosi=function(){return e.geoProjection(De).scale(127.267)},t.geoNicolosiRaw=De,t.geoPatterson=function(){return e.geoProjection(Re).scale(139.319)},t.geoPattersonRaw=Re,t.geoPolyconic=function(){return e.geoProjection(Fe).scale(103.74)},t.geoPolyconicRaw=Fe,t.geoPolyhedral=Ve,t.geoPolyhedralButterfly=function(t){t=t||function(t){var r=e.geoCentroid({type:\"MultiPoint\",coordinates:t});return e.geoGnomonic().scale(1).translate([0,0]).rotate([-r[0],-r[1]])};var r=Ye.map((function(e){return{face:e,project:t(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var n=r[t];n&&(n.children||(n.children=[])).push(r[e])})),Ve(r[0],(function(t,e){return r[t<-y/2?e<0?6:4:t<0?e<0?2:0:t0?[-r[0],0]:[180-r[0],180])};var r=Ye.map((function(e){return{face:e,project:t(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var n=r[t];n&&(n.children||(n.children=[])).push(r[e])})),Ve(r[0],(function(t,e){return r[t<-y/2?e<0?6:4:t<0?e<0?2:0:t2||a[0]!=e[0]||a[1]!=e[1])&&(n.push(a),e=a)}return 1===n.length&&t.length>1&&n.push(r(t[t.length-1])),n}function a(t){return t.map(i)}function o(t){if(null==t)return t;var e;switch(t.type){case\"GeometryCollection\":e={type:\"GeometryCollection\",geometries:t.geometries.map(o)};break;case\"Point\":e={type:\"Point\",coordinates:r(t.coordinates)};break;case\"MultiPoint\":e={type:t.type,coordinates:n(t.coordinates)};break;case\"LineString\":e={type:t.type,coordinates:i(t.coordinates)};break;case\"MultiLineString\":case\"Polygon\":e={type:t.type,coordinates:a(t.coordinates)};break;case\"MultiPolygon\":e={type:\"MultiPolygon\",coordinates:t.coordinates.map(a)};break;default:return t}return null!=t.bbox&&(e.bbox=t.bbox),e}function s(t){var e={type:\"Feature\",properties:t.properties,geometry:o(t.geometry)};return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),e}if(null!=t)switch(t.type){case\"Feature\":return s(t);case\"FeatureCollection\":var l={type:\"FeatureCollection\",features:t.features.map(s)};return null!=t.bbox&&(l.bbox=t.bbox),l;default:return o(t)}return t},t.geoQuincuncial=sr,t.geoRectangularPolyconic=function(){return K(cr).scale(131.215)},t.geoRectangularPolyconicRaw=cr,t.geoRobinson=function(){return e.geoProjection(fr).scale(152.63)},t.geoRobinsonRaw=fr,t.geoSatellite=function(){var t=2,r=0,n=e.geoProjectionMutator(hr),i=n(t,r);return i.distance=function(e){return arguments.length?n(t=+e,r):t},i.tilt=function(e){return arguments.length?n(t,r=e*M):r*A},i.scale(432.147).clipAngle(E(1/t)*A-1e-6)},t.geoSatelliteRaw=hr,t.geoSinuMollweide=function(){return e.geoProjection(Kt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},t.geoSinuMollweideRaw=Kt,t.geoSinusoidal=function(){return e.geoProjection(Q).scale(152.63)},t.geoSinusoidalRaw=Q,t.geoStitch=function(t){if(null==t)return t;switch(t.type){case\"Feature\":return wr(t);case\"FeatureCollection\":var e={type:\"FeatureCollection\",features:t.features.map(wr)};return null!=t.bbox&&(e.bbox=t.bbox),e;default:return Tr(t)}},t.geoTimes=function(){return e.geoProjection(kr).scale(146.153)},t.geoTimesRaw=kr,t.geoTwoPointAzimuthal=Sr,t.geoTwoPointAzimuthalRaw=Mr,t.geoTwoPointAzimuthalUsa=function(){return Sr([-158,21.5],[-77,39]).clipAngle(60).scale(400)},t.geoTwoPointEquidistant=Lr,t.geoTwoPointEquidistantRaw=Er,t.geoTwoPointEquidistantUsa=function(){return Lr([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},t.geoVanDerGrinten=function(){return e.geoProjection(Cr).scale(79.4183)},t.geoVanDerGrintenRaw=Cr,t.geoVanDerGrinten2=function(){return e.geoProjection(Pr).scale(79.4183)},t.geoVanDerGrinten2Raw=Pr,t.geoVanDerGrinten3=function(){return e.geoProjection(Ir).scale(79.4183)},t.geoVanDerGrinten3Raw=Ir,t.geoVanDerGrinten4=function(){return e.geoProjection(Or).scale(127.16)},t.geoVanDerGrinten4Raw=Or,t.geoWagner=Dr,t.geoWagner7=function(){return Dr().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},t.geoWagnerRaw=zr,t.geoWagner4=function(){return e.geoProjection(Br).scale(176.84)},t.geoWagner4Raw=Br,t.geoWagner6=function(){return e.geoProjection(Nr).scale(152.63)},t.geoWagner6Raw=Nr,t.geoWiechel=function(){return e.geoProjection(jr).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},t.geoWiechelRaw=jr,t.geoWinkel3=function(){return e.geoProjection(Ur).scale(158.837)},t.geoWinkel3Raw=Ur,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{\"d3-array\":107,\"d3-geo\":114}],114:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-array\")):i((n=n||self).d3=n.d3||{},n.d3)}(this,(function(t,e){\"use strict\";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(t){a(i,t,this.t),a(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new n;function a(t,e,r){var n=t.s=e+r,i=n-e,a=n-i;t.t=e-a+(r-i)}var o=1e-6,s=Math.PI,l=s/2,c=s/4,u=2*s,f=180/s,h=s/180,p=Math.abs,d=Math.atan,g=Math.atan2,m=Math.cos,v=Math.ceil,y=Math.exp,x=Math.log,b=Math.pow,_=Math.sin,w=Math.sign||function(t){return t>0?1:t<0?-1:0},T=Math.sqrt,k=Math.tan;function A(t){return t>1?0:t<-1?s:Math.acos(t)}function M(t){return t>1?l:t<-1?-l:Math.asin(t)}function S(t){return(t=_(t/2))*t}function E(){}function L(t,e){t&&P.hasOwnProperty(t.type)&&P[t.type](t,e)}var C={Feature:function(t,e){L(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n=0?1:-1,i=n*r,a=m(e=(e*=h)/2+c),o=_(e),s=N*o,l=B*a+s*m(i),u=s*n*_(i);j.add(g(u,l)),F=t,B=a,N=o}function W(t){return[g(t[1],t[0]),M(t[2])]}function X(t){var e=t[0],r=t[1],n=m(r);return[n*m(e),n*_(e),_(r)]}function Z(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function J(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 K(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Q(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function $(t){var e=T(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var tt,et,rt,nt,it,at,ot,st,lt,ct,ut,ft,ht,pt,dt,gt,mt,vt,yt,xt,bt,_t,wt,Tt,kt,At,Mt=r(),St={point:Et,lineStart:Ct,lineEnd:Pt,polygonStart:function(){St.point=It,St.lineStart=Ot,St.lineEnd=zt,Mt.reset(),V.polygonStart()},polygonEnd:function(){V.polygonEnd(),St.point=Et,St.lineStart=Ct,St.lineEnd=Pt,j<0?(tt=-(rt=180),et=-(nt=90)):Mt>o?nt=90:Mt<-o&&(et=-90),ct[0]=tt,ct[1]=rt},sphere:function(){tt=-(rt=180),et=-(nt=90)}};function Et(t,e){lt.push(ct=[tt=t,rt=t]),ent&&(nt=e)}function Lt(t,e){var r=X([t*h,e*h]);if(st){var n=J(st,r),i=J([n[1],-n[0],0],n);$(i),i=W(i);var a,o=t-it,s=o>0?1:-1,l=i[0]*f*s,c=p(o)>180;c^(s*itnt&&(nt=a):c^(s*it<(l=(l+360)%360-180)&&lnt&&(nt=e)),c?tDt(tt,rt)&&(rt=t):Dt(t,rt)>Dt(tt,rt)&&(tt=t):rt>=tt?(trt&&(rt=t)):t>it?Dt(tt,t)>Dt(tt,rt)&&(rt=t):Dt(t,rt)>Dt(tt,rt)&&(tt=t)}else lt.push(ct=[tt=t,rt=t]);ent&&(nt=e),st=r,it=t}function Ct(){St.point=Lt}function Pt(){ct[0]=tt,ct[1]=rt,St.point=Et,st=null}function It(t,e){if(st){var r=t-it;Mt.add(p(r)>180?r+(r>0?360:-360):r)}else at=t,ot=e;V.point(t,e),Lt(t,e)}function Ot(){V.lineStart()}function zt(){It(at,ot),V.lineEnd(),p(Mt)>o&&(tt=-(rt=180)),ct[0]=tt,ct[1]=rt,st=null}function Dt(t,e){return(e-=t)<0?e+360:e}function Rt(t,e){return t[0]-e[0]}function Ft(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:es?t+Math.round(-t/u)*u:t,e]}function Qt(t,e,r){return(t%=u)?e||r?Jt(te(t),ee(e,r)):te(t):e||r?ee(e,r):Kt}function $t(t){return function(e,r){return[(e+=t)>s?e-u:e<-s?e+u:e,r]}}function te(t){var e=$t(t);return e.invert=$t(-t),e}function ee(t,e){var r=m(t),n=_(t),i=m(e),a=_(e);function o(t,e){var o=m(e),s=m(t)*o,l=_(t)*o,c=_(e),u=c*r+s*n;return[g(l*i-u*a,s*r-c*n),M(u*i+l*a)]}return o.invert=function(t,e){var o=m(e),s=m(t)*o,l=_(t)*o,c=_(e),u=c*i-l*a;return[g(l*i+c*a,s*r+u*n),M(u*r-s*n)]},o}function re(t){function e(e){return(e=t(e[0]*h,e[1]*h))[0]*=f,e[1]*=f,e}return t=Qt(t[0]*h,t[1]*h,t.length>2?t[2]*h:0),e.invert=function(e){return(e=t.invert(e[0]*h,e[1]*h))[0]*=f,e[1]*=f,e},e}function ne(t,e,r,n,i,a){if(r){var o=m(e),s=_(e),l=n*r;null==i?(i=e+n*u,a=e-l/2):(i=ie(o,i),a=ie(o,a),(n>0?ia)&&(i+=n*u));for(var c,f=i;n>0?f>a:f1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}function oe(t,e){return p(t[0]-e[0])=0;--a)i.point((f=u[a])[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 ce(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n=0?1:-1,z=O*I,D=z>s,R=T*C;if(ue.add(g(R*O*_(z),k*P+R*m(z))),f+=D?I+O*u:I,D^b>=r^E>=r){var F=J(X(x),X(S));$(F);var B=J(a,F);$(B);var N=(D^I>=0?-1:1)*M(B[2]);(n>N||n===N&&(F[0]||F[1]))&&(h+=D^I>=0?1:-1)}}return(f<-o||f0){for(h||(a.polygonStart(),h=!0),a.lineStart(),t=0;t1&&2&i&&c.push(c.pop().concat(c.shift())),s.push(c.filter(de))}return p}}function de(t){return t.length>1}function ge(t,e){return((t=t.x)[0]<0?t[1]-l-o:l-t[1])-((e=e.x)[0]<0?e[1]-l-o:l-e[1])}var me=pe((function(){return!0}),(function(t){var e,r=NaN,n=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,c){var u=a>0?s:-s,f=p(a-r);p(f-s)0?l:-l),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(u,n),t.point(a,n),e=0):i!==u&&f>=s&&(p(r-i)o?d((_(e)*(a=m(n))*_(r)-_(n)*(i=m(e))*_(t))/(i*a*s)):(e+n)/2}(r,n,a,c),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(u,n),e=0),t.point(r=a,n=c),i=u},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}}),(function(t,e,r,n){var i;if(null==t)i=r*l,n.point(-s,i),n.point(0,i),n.point(s,i),n.point(s,0),n.point(s,-i),n.point(0,-i),n.point(-s,-i),n.point(-s,0),n.point(-s,i);else if(p(t[0]-e[0])>o){var a=t[0]0,i=p(e)>o;function a(t,r){return m(t)*m(r)>e}function l(t,r,n){var i=[1,0,0],a=J(X(t),X(r)),l=Z(a,a),c=a[0],u=l-c*c;if(!u)return!n&&t;var f=e*l/u,h=-e*c/u,d=J(i,a),g=Q(i,f);K(g,Q(a,h));var m=d,v=Z(g,m),y=Z(m,m),x=v*v-y*(Z(g,g)-1);if(!(x<0)){var b=T(x),_=Q(m,(-v-b)/y);if(K(_,g),_=W(_),!n)return _;var w,k=t[0],A=r[0],M=t[1],S=r[1];A0^_[1]<(p(_[0]-k)s^(k<=_[0]&&_[0]<=A)){var C=Q(m,(-v+b)/y);return K(C,g),[_,W(C)]}}}function c(e,r){var i=n?t:s-t,a=0;return e<-i?a|=1:e>i&&(a|=2),r<-i?a|=4:r>i&&(a|=8),a}return pe(a,(function(t){var e,r,o,u,f;return{lineStart:function(){u=o=!1,f=1},point:function(h,p){var d,g=[h,p],m=a(h,p),v=n?m?0:c(h,p):m?c(h+(h<0?s:-s),p):0;if(!e&&(u=o=m)&&t.lineStart(),m!==o&&(!(d=l(e,g))||oe(e,d)||oe(g,d))&&(g[2]=1),m!==o)f=0,m?(t.lineStart(),d=l(g,e),t.point(d[0],d[1])):(d=l(e,g),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&n^m){var y;v&r||!(y=l(g,e,!0))||(f=0,n?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!m||e&&oe(e,g)||t.point(g[0],g[1]),e=g,o=m,r=v},lineEnd:function(){o&&t.lineEnd(),e=null},clean:function(){return f|(u&&o)<<1}}}),(function(e,n,i,a){ne(a,t,r,i,e,n)}),n?[0,-t]:[-s,t-s])}function ye(t,r,n,i){function a(e,a){return t<=e&&e<=n&&r<=a&&a<=i}function s(e,a,o,s){var c=0,f=0;if(null==e||(c=l(e,o))!==(f=l(a,o))||u(e,a)<0^o>0)do{s.point(0===c||3===c?t:n,c>1?i:r)}while((c=(c+o+4)%4)!==f);else s.point(a[0],a[1])}function l(e,i){return p(e[0]-t)0?0:3:p(e[0]-n)0?2:1:p(e[1]-r)0?1:0:i>0?3:2}function c(t,e){return u(t.x,e.x)}function u(t,e){var r=l(t,1),n=l(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]}return function(o){var l,u,f,h,p,d,g,m,v,y,x,b=o,_=ae(),w={point:T,lineStart:function(){w.point=k,u&&u.push(f=[]);y=!0,v=!1,g=m=NaN},lineEnd:function(){l&&(k(h,p),d&&v&&_.rejoin(),l.push(_.result()));w.point=T,v&&b.lineEnd()},polygonStart:function(){b=_,l=[],u=[],x=!0},polygonEnd:function(){var r=function(){for(var e=0,r=0,n=u.length;ri&&(h-a)*(i-o)>(p-o)*(t-a)&&++e:p<=i&&(h-a)*(i-o)<(p-o)*(t-a)&&--e;return e}(),n=x&&r,a=(l=e.merge(l)).length;(n||a)&&(o.polygonStart(),n&&(o.lineStart(),s(null,null,1,o),o.lineEnd()),a&&le(l,c,r,s,o),o.polygonEnd());b=o,l=u=f=null}};function T(t,e){a(t,e)&&b.point(t,e)}function k(e,o){var s=a(e,o);if(u&&f.push([e,o]),y)h=e,p=o,d=s,y=!1,s&&(b.lineStart(),b.point(e,o));else if(s&&v)b.point(e,o);else{var l=[g=Math.max(-1e9,Math.min(1e9,g)),m=Math.max(-1e9,Math.min(1e9,m))],c=[e=Math.max(-1e9,Math.min(1e9,e)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,r,n,i,a){var o,s=t[0],l=t[1],c=0,u=1,f=e[0]-s,h=e[1]-l;if(o=r-s,f||!(o>0)){if(o/=f,f<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=i-s,f||!(o<0)){if(o/=f,f<0){if(o>u)return;o>c&&(c=o)}else if(f>0){if(o0)){if(o/=h,h<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=a-l,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>c&&(c=o)}else if(h>0){if(o0&&(t[0]=s+c*f,t[1]=l+c*h),u<1&&(e[0]=s+u*f,e[1]=l+u*h),!0}}}}}(l,c,t,r,n,i)?s&&(b.lineStart(),b.point(e,o),x=!1):(v||(b.lineStart(),b.point(l[0],l[1])),b.point(c[0],c[1]),s||b.lineEnd(),x=!1)}g=e,m=o,v=s}return w}}var xe,be,_e,we=r(),Te={sphere:E,point:E,lineStart:function(){Te.point=Ae,Te.lineEnd=ke},lineEnd:E,polygonStart:E,polygonEnd:E};function ke(){Te.point=Te.lineEnd=E}function Ae(t,e){xe=t*=h,be=_(e*=h),_e=m(e),Te.point=Me}function Me(t,e){t*=h;var r=_(e*=h),n=m(e),i=p(t-xe),a=m(i),o=n*_(i),s=_e*r-be*n*a,l=be*r+_e*n*a;we.add(g(T(o*o+s*s),l)),xe=t,be=r,_e=n}function Se(t){return we.reset(),z(t,Te),+we}var Ee=[null,null],Le={type:\"LineString\",coordinates:Ee};function Ce(t,e){return Ee[0]=t,Ee[1]=e,Se(Le)}var Pe={Feature:function(t,e){return Oe(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n0&&(i=Ce(t[a],t[a-1]))>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))<1e-12*i)return!0;r=n}return!1}function Re(t,e){return!!he(t.map(Fe),Be(e))}function Fe(t){return(t=t.map(Be)).pop(),t}function Be(t){return[t[0]*h,t[1]*h]}function Ne(t,r,n){var i=e.range(t,r-o,n).concat(r);return function(t){return i.map((function(e){return[t,e]}))}}function je(t,r,n){var i=e.range(t,r-o,n).concat(r);return function(t){return i.map((function(e){return[e,t]}))}}function Ue(){var t,r,n,i,a,s,l,c,u,f,h,d,g=10,m=g,y=90,x=360,b=2.5;function _(){return{type:\"MultiLineString\",coordinates:w()}}function w(){return e.range(v(i/y)*y,n,y).map(h).concat(e.range(v(c/x)*x,l,x).map(d)).concat(e.range(v(r/g)*g,t,g).filter((function(t){return p(t%y)>o})).map(u)).concat(e.range(v(s/m)*m,a,m).filter((function(t){return p(t%x)>o})).map(f))}return _.lines=function(){return w().map((function(t){return{type:\"LineString\",coordinates:t}}))},_.outline=function(){return{type:\"Polygon\",coordinates:[h(i).concat(d(l).slice(1),h(n).reverse().slice(1),d(c).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],c=+t[0][1],l=+t[1][1],i>n&&(t=i,i=n,n=t),c>l&&(t=c,c=l,l=t),_.precision(b)):[[i,c],[n,l]]},_.extentMinor=function(e){return arguments.length?(r=+e[0][0],t=+e[1][0],s=+e[0][1],a=+e[1][1],r>t&&(e=r,r=t,t=e),s>a&&(e=s,s=a,a=e),_.precision(b)):[[r,s],[t,a]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(y=+t[0],x=+t[1],_):[y,x]},_.stepMinor=function(t){return arguments.length?(g=+t[0],m=+t[1],_):[g,m]},_.precision=function(e){return arguments.length?(b=+e,u=Ne(s,a,90),f=je(r,t,b),h=Ne(c,l,90),d=je(i,n,b),_):b},_.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function Ve(t){return t}var He,qe,Ge,Ye,We=r(),Xe=r(),Ze={point:E,lineStart:E,lineEnd:E,polygonStart:function(){Ze.lineStart=Je,Ze.lineEnd=$e},polygonEnd:function(){Ze.lineStart=Ze.lineEnd=Ze.point=E,We.add(p(Xe)),Xe.reset()},result:function(){var t=We/2;return We.reset(),t}};function Je(){Ze.point=Ke}function Ke(t,e){Ze.point=Qe,He=Ge=t,qe=Ye=e}function Qe(t,e){Xe.add(Ye*t-Ge*e),Ge=t,Ye=e}function $e(){Qe(He,qe)}var tr=1/0,er=tr,rr=-tr,nr=rr,ir={point:function(t,e){trr&&(rr=t);enr&&(nr=e)},lineStart:E,lineEnd:E,polygonStart:E,polygonEnd:E,result:function(){var t=[[tr,er],[rr,nr]];return rr=nr=-(er=tr=1/0),t}};var ar,or,sr,lr,cr=0,ur=0,fr=0,hr=0,pr=0,dr=0,gr=0,mr=0,vr=0,yr={point:xr,lineStart:br,lineEnd:Tr,polygonStart:function(){yr.lineStart=kr,yr.lineEnd=Ar},polygonEnd:function(){yr.point=xr,yr.lineStart=br,yr.lineEnd=Tr},result:function(){var t=vr?[gr/vr,mr/vr]:dr?[hr/dr,pr/dr]:fr?[cr/fr,ur/fr]:[NaN,NaN];return cr=ur=fr=hr=pr=dr=gr=mr=vr=0,t}};function xr(t,e){cr+=t,ur+=e,++fr}function br(){yr.point=_r}function _r(t,e){yr.point=wr,xr(sr=t,lr=e)}function wr(t,e){var r=t-sr,n=e-lr,i=T(r*r+n*n);hr+=i*(sr+t)/2,pr+=i*(lr+e)/2,dr+=i,xr(sr=t,lr=e)}function Tr(){yr.point=xr}function kr(){yr.point=Mr}function Ar(){Sr(ar,or)}function Mr(t,e){yr.point=Sr,xr(ar=sr=t,or=lr=e)}function Sr(t,e){var r=t-sr,n=e-lr,i=T(r*r+n*n);hr+=i*(sr+t)/2,pr+=i*(lr+e)/2,dr+=i,gr+=(i=lr*t-sr*e)*(sr+t),mr+=i*(lr+e),vr+=3*i,xr(sr=t,lr=e)}function Er(t){this._context=t}Er.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,u)}},result:E};var Lr,Cr,Pr,Ir,Or,zr=r(),Dr={point:E,lineStart:function(){Dr.point=Rr},lineEnd:function(){Lr&&Fr(Cr,Pr),Dr.point=E},polygonStart:function(){Lr=!0},polygonEnd:function(){Lr=null},result:function(){var t=+zr;return zr.reset(),t}};function Rr(t,e){Dr.point=Fr,Cr=Ir=t,Pr=Or=e}function Fr(t,e){Ir-=t,Or-=e,zr.add(T(Ir*Ir+Or*Or)),Ir=t,Or=e}function Br(){this._string=[]}function Nr(t){return\"m0,\"+t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+-2*t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+2*t+\"z\"}function jr(t){return function(e){var r=new Ur;for(var n in t)r[n]=t[n];return r.stream=e,r}}function Ur(){}function Vr(t,e,r){var n=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=n&&t.clipExtent(null),z(r,t.stream(ir)),e(ir.result()),null!=n&&t.clipExtent(n),t}function Hr(t,e,r){return Vr(t,(function(r){var n=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(n/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),o=+e[0][0]+(n-a*(r[1][0]+r[0][0]))/2,s=+e[0][1]+(i-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([o,s])}),r)}function qr(t,e,r){return Hr(t,[[0,0],e],r)}function Gr(t,e,r){return Vr(t,(function(r){var n=+e,i=n/(r[1][0]-r[0][0]),a=(n-i*(r[1][0]+r[0][0]))/2,o=-i*r[0][1];t.scale(150*i).translate([a,o])}),r)}function Yr(t,e,r){return Vr(t,(function(r){var n=+e,i=n/(r[1][1]-r[0][1]),a=-i*r[0][0],o=(n-i*(r[1][1]+r[0][1]))/2;t.scale(150*i).translate([a,o])}),r)}Br.prototype={_radius:4.5,_circle:Nr(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push(\"Z\"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push(\"M\",t,\",\",e),this._point=1;break;case 1:this._string.push(\"L\",t,\",\",e);break;default:null==this._circle&&(this._circle=Nr(this._radius)),this._string.push(\"M\",t,\",\",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join(\"\");return this._string=[],t}return null}},Ur.prototype={constructor:Ur,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()}};var Wr=m(30*h);function Xr(t,e){return+e?function(t,e){function r(n,i,a,s,l,c,u,f,h,d,m,v,y,x){var b=u-n,_=f-i,w=b*b+_*_;if(w>4*e&&y--){var k=s+d,A=l+m,S=c+v,E=T(k*k+A*A+S*S),L=M(S/=E),C=p(p(S)-1)e||p((b*z+_*D)/w-.5)>.3||s*d+l*m+c*v2?t[2]%360*h:0,I()):[y*f,x*f,b*f]},C.angle=function(t){return arguments.length?(_=t%360*h,I()):_*f},C.reflectX=function(t){return arguments.length?(w=t?-1:1,I()):w<0},C.reflectY=function(t){return arguments.length?(k=t?-1:1,I()):k<0},C.precision=function(t){return arguments.length?(o=Xr(s,L=t*t),O()):T(L)},C.fitExtent=function(t,e){return Hr(C,t,e)},C.fitSize=function(t,e){return qr(C,t,e)},C.fitWidth=function(t,e){return Gr(C,t,e)},C.fitHeight=function(t,e){return Yr(C,t,e)},function(){return e=t.apply(this,arguments),C.invert=e.invert&&P,I()}}function tn(t){var e=0,r=s/3,n=$r(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*h,r=t[1]*h):[e*f,r*f]},i}function en(t,e){var r=_(t),n=(r+_(e))/2;if(p(n)0?e<-l+o&&(e=-l+o):e>l-o&&(e=l-o);var r=i/b(fn(e),n);return[r*_(n*t),i-r*m(n*t)]}return a.invert=function(t,e){var r=i-e,a=w(n)*T(t*t+r*r),o=g(t,p(r))*w(r);return r*n<0&&(o-=s*w(t)*w(r)),[o/n,2*d(b(i/a,1/n))-l]},a}function pn(t,e){return[t,e]}function dn(t,e){var r=m(t),n=t===e?_(t):(r-m(e))/(e-t),i=r/n+t;if(p(n)o&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},Tn.invert=on(M),kn.invert=on((function(t){return 2*d(t)})),An.invert=function(t,e){return[-e,2*d(y(t))-l]},t.geoAlbers=nn,t.geoAlbersUsa=function(){var t,e,r,n,i,a,s=nn(),l=rn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=rn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){a=[t,e]}};function f(t){var e=t[0],o=t[1];return a=null,r.point(e,o),a||(n.point(e,o),a)||(i.point(e,o),a)}function h(){return t=e=null,f}return f.invert=function(t){var e=s.scale(),r=s.translate(),n=(t[0]-r[0])/e,i=(t[1]-r[1])/e;return(i>=.12&&i<.234&&n>=-.425&&n<-.214?l:i>=.166&&i<.234&&n>=-.214&&n<-.115?c:s).invert(t)},f.stream=function(r){return t&&e===r?t:(n=[s.stream(e=r),l.stream(r),c.stream(r)],i=n.length,t={point:function(t,e){for(var r=-1;++rDt(n[0],n[1])&&(n[1]=i[1]),Dt(i[0],n[1])>Dt(n[0],n[1])&&(n[0]=i[0])):a.push(n=i);for(o=-1/0,e=0,n=a[r=a.length-1];e<=r;n=i,++e)i=a[e],(s=Dt(n[1],i[0]))>o&&(o=s,tt=i[0],rt=n[1])}return lt=ct=null,tt===1/0||et===1/0?[[NaN,NaN],[NaN,NaN]]:[[tt,et],[rt,nt]]},t.geoCentroid=function(t){ut=ft=ht=pt=dt=gt=mt=vt=yt=xt=bt=0,z(t,Bt);var e=yt,r=xt,n=bt,i=e*e+r*r+n*n;return i<1e-12&&(e=gt,r=mt,n=vt,ft2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90]).scale(159.155)},t.geoTransverseMercatorRaw=An,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{\"d3-array\":107}],115:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){\"use strict\";function e(t,e){return t.parent===e.parent?1:2}function r(t,e){return t+e.x}function n(t,e){return Math.max(t,e.y)}function i(t){var e=0,r=t.children,n=r&&r.length;if(n)for(;--n>=0;)e+=r[n].value;else e=1;t.value=e}function a(t,e){var r,n,i,a,s,u=new c(t),f=+t.value&&(u.value=t.value),h=[u];for(null==e&&(e=o);r=h.pop();)if(f&&(r.value=+r.data.value),(i=e(r.data))&&(s=i.length))for(r.children=new Array(s),a=s-1;a>=0;--a)h.push(n=r.children[a]=new c(i[a])),n.parent=r,n.depth=r.depth+1;return u.eachBefore(l)}function o(t){return t.children}function s(t){t.data=t.data.data}function l(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function c(t){this.data=t,this.depth=this.height=0,this.parent=null}c.prototype=a.prototype={constructor:c,count:function(){return this.eachAfter(i)},each:function(t){var e,r,n,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),r=a.children)for(n=0,i=r.length;n=0;--r)i.push(e[r]);return this},sum:function(t){return this.eachAfter((function(e){for(var r=+t(e.data)||0,n=e.children,i=n&&n.length;--i>=0;)r+=n[i].value;e.value=r}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),i=null;t=r.pop(),e=n.pop();for(;t===e;)i=t,t=r.pop(),e=n.pop();return i}(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var i=n.length;t!==r;)n.splice(i,0,t),t=t.parent;return n},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(r){r!==t&&e.push({source:r.parent,target:r})})),e},copy:function(){return a(this).eachBefore(s)}};var u=Array.prototype.slice;function f(t){for(var e,r,n=0,i=(t=function(t){for(var e,r,n=t.length;n;)r=Math.random()*n--|0,e=t[n],t[n]=t[r],t[r]=e;return t}(u.call(t))).length,a=[];n0&&r*r>n*n+i*i}function g(t,e){for(var r=0;r(o*=o)?(n=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-n*n)),r.x=t.x-n*s-a*l,r.y=t.y-n*l+a*s):(n=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-n*n)),r.x=e.x+n*s-a*l,r.y=e.y+n*l+a*s)):(r.x=e.x+r.r,r.y=e.y)}function b(t,e){var r=t.r+e.r-1e-6,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function _(t){var e=t._,r=t.next._,n=e.r+r.r,i=(e.x*r.r+r.x*e.r)/n,a=(e.y*r.r+r.y*e.r)/n;return i*i+a*a}function w(t){this._=t,this.next=null,this.previous=null}function T(t){if(!(i=t.length))return 0;var e,r,n,i,a,o,s,l,c,u,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(r=t[1],e.x=-r.r,r.x=e.r,r.y=0,!(i>2))return e.r+r.r;x(r,e,n=t[2]),e=new w(e),r=new w(r),n=new w(n),e.next=n.previous=r,r.next=e.previous=n,n.next=r.previous=e;t:for(s=3;sh&&(h=s),m=u*u*g,(p=Math.max(h/m,m/f))>d){u-=s;break}d=p}v.push(o={value:u,dice:l1?e:1)},r}(G);var X=function t(e){function r(t,r,n,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,l,c,u,f=-1,h=o.length,p=t.value;++f1?e:1)},r}(G);t.cluster=function(){var t=e,i=1,a=1,o=!1;function s(e){var s,l=0;e.eachAfter((function(e){var i=e.children;i?(e.x=function(t){return t.reduce(r,0)/t.length}(i),e.y=function(t){return 1+t.reduce(n,0)}(i)):(e.x=s?l+=t(e,s):0,e.y=0,s=e)}));var c=function(t){for(var e;e=t.children;)t=e[0];return t}(e),u=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),f=c.x-t(c,u)/2,h=u.x+t(u,c)/2;return e.eachAfter(o?function(t){t.x=(t.x-e.x)*i,t.y=(e.y-t.y)*a}:function(t){t.x=(t.x-f)/(h-f)*i,t.y=(1-(e.y?t.y/e.y:1))*a})}return s.separation=function(e){return arguments.length?(t=e,s):t},s.size=function(t){return arguments.length?(o=!1,i=+t[0],a=+t[1],s):o?null:[i,a]},s.nodeSize=function(t){return arguments.length?(o=!0,i=+t[0],a=+t[1],s):o?[i,a]:null},s},t.hierarchy=a,t.pack=function(){var t=null,e=1,r=1,n=M;function i(i){return i.x=e/2,i.y=r/2,t?i.eachBefore(L(t)).eachAfter(C(n,.5)).eachBefore(P(1)):i.eachBefore(L(E)).eachAfter(C(M,1)).eachAfter(C(n,i.r/Math.min(e,r))).eachBefore(P(Math.min(e,r)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=k(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],r=+t[1],i):[e,r]},i.padding=function(t){return arguments.length?(n=\"function\"==typeof t?t:S(+t),i):n},i},t.packEnclose=f,t.packSiblings=function(t){return T(t),t},t.partition=function(){var t=1,e=1,r=0,n=!1;function i(i){var a=i.height+1;return i.x0=i.y0=r,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(n){n.children&&O(n,n.x0,t*(n.depth+1)/e,n.x1,t*(n.depth+2)/e);var i=n.x0,a=n.y0,o=n.x1-r,s=n.y1-r;o0)throw new Error(\"cycle\");return a}return r.id=function(e){return arguments.length?(t=A(e),r):t},r.parentId=function(t){return arguments.length?(e=A(t),r):e},r},t.tree=function(){var t=B,e=1,r=1,n=null;function i(i){var l=function(t){for(var e,r,n,i,a,o=new H(t,0),s=[o];e=s.pop();)if(n=e._.children)for(e.children=new Array(a=n.length),i=a-1;i>=0;--i)s.push(r=e.children[i]=new H(n[i],i)),r.parent=e;return(o.parent=new H(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),n)i.eachBefore(s);else{var c=i,u=i,f=i;i.eachBefore((function(t){t.xu.x&&(u=t),t.depth>f.depth&&(f=t)}));var h=c===u?1:t(c,u)/2,p=h-c.x,d=e/(u.x+h+p),g=r/(f.depth||1);i.eachBefore((function(t){t.x=(t.x+p)*d,t.y=t.depth*g}))}return i}function a(e){var r=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(r){!function(t){for(var e,r=0,n=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(e);var a=(r[0].z+r[r.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,r,n){if(r){for(var i,a=e,o=e,s=r,l=a.parent.children[0],c=a.m,u=o.m,f=s.m,h=l.m;s=j(s),a=N(a),s&&a;)l=N(l),(o=j(o)).a=e,(i=s.z+f-a.z-c+t(s._,a._))>0&&(U(V(s,e,n),e,i),c+=i,u+=i),f+=s.m,c+=a.m,h+=l.m,u+=o.m;s&&!j(o)&&(o.t=s,o.m+=f-u),a&&!N(l)&&(l.t=a,l.m+=c-h,n=e)}return n}(e,i,e.parent.A||n[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*r}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(n=!1,e=+t[0],r=+t[1],i):n?null:[e,r]},i.nodeSize=function(t){return arguments.length?(n=!0,e=+t[0],r=+t[1],i):n?[e,r]:null},i},t.treemap=function(){var t=W,e=!1,r=1,n=1,i=[0],a=M,o=M,s=M,l=M,c=M;function u(t){return t.x0=t.y0=0,t.x1=r,t.y1=n,t.eachBefore(f),i=[0],e&&t.eachBefore(I),t}function f(e){var r=i[e.depth],n=e.x0+r,u=e.y0+r,f=e.x1-r,h=e.y1-r;f=r-1){var u=s[e];return u.x0=i,u.y0=a,u.x1=o,void(u.y1=l)}var f=c[e],h=n/2+f,p=e+1,d=r-1;for(;p>>1;c[g]l-a){var y=(i*v+o*m)/n;t(e,p,m,i,a,y,l),t(p,r,v,y,a,o,l)}else{var x=(a*v+l*m)/n;t(e,p,m,i,a,o,x),t(p,r,v,i,x,o,l)}}(0,l,t.value,e,r,n,i)},t.treemapDice=O,t.treemapResquarify=X,t.treemapSlice=q,t.treemapSliceDice=function(t,e,r,n,i){(1&t.depth?q:O)(t,e,r,n,i)},t.treemapSquarify=W,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],116:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-color\")):i((n=n||self).d3=n.d3||{},n.d3)}(this,(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=i180||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;na&&(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:y(r,n)})),a=_.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+\"rotate(\",null,n)-2,x:y(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:y(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:y(t,r)},{i:s-2,x:y(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;++r1e-6)if(Math.abs(f*l-c*u)>1e-6&&a){var p=n-o,d=i-s,g=l*l+c*c,m=p*p+d*d,v=Math.sqrt(g),y=Math.sqrt(h),x=a*Math.tan((e-Math.acos((g+h-m)/(2*v*y)))/2),b=x/y,_=x/v;Math.abs(b-1)>1e-6&&(this._+=\"L\"+(t+b*u)+\",\"+(r+b*f)),this._+=\"A\"+a+\",\"+a+\",0,0,\"+ +(f*p>u*d)+\",\"+(this._x1=t+_*l)+\",\"+(this._y1=r+_*c)}else this._+=\"L\"+(this._x1=t)+\",\"+(this._y1=r);else;},arc:function(t,i,a,o,s,l){t=+t,i=+i,l=!!l;var c=(a=+a)*Math.cos(o),u=a*Math.sin(o),f=t+c,h=i+u,p=1^l,d=l?o-s:s-o;if(a<0)throw new Error(\"negative radius: \"+a);null===this._x1?this._+=\"M\"+f+\",\"+h:(Math.abs(this._x1-f)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+=\"L\"+f+\",\"+h),a&&(d<0&&(d=d%r+r),d>n?this._+=\"A\"+a+\",\"+a+\",0,1,\"+p+\",\"+(t-c)+\",\"+(i-u)+\"A\"+a+\",\"+a+\",0,1,\"+p+\",\"+(this._x1=f)+\",\"+(this._y1=h):d>1e-6&&(this._+=\"A\"+a+\",\"+a+\",0,\"+ +(d>=e)+\",\"+p+\",\"+(this._x1=t+a*Math.cos(s))+\",\"+(this._y1=i+a*Math.sin(s))))},rect:function(t,e,r,n){this._+=\"M\"+(this._x0=this._x1=+t)+\",\"+(this._y0=this._y1=+e)+\"h\"+ +r+\"v\"+ +n+\"h\"+-r+\"Z\"},toString:function(){return this._}},t.path=a,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],118:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(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,m=t._y0,v=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(a=(g+v)/2))?g=a:v=a,(u=r>=(o=(m+y)/2))?m=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+v)/2))?g=a:v=a,(u=r>=(o=(m+y)/2))?m=o:y=o}while((f=u<<1|c)==(h=(l>=o)<<1|s>=a));return i[h]=p,i[f]=d,t}function r(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;nf&&(f=i),ah&&(h=a));if(c>f||u>h)return this;for(this.cover(c,u).cover(f,h),n=0;nt||t>=i||n>e||e>=a;)switch(s=(ep||(o=c.y0)>d||(s=c.x1)=y)<<1|t>=v)&&(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,m.data),b=e-+this._y.call(null,m.data),_=x*x+b*b;if(_=(s=(d+m)/2))?d=s:m=s,(u=o>=(l=(g+v)/2))?g=l:v=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;e1?0:t<-1?u:Math.acos(t)}function d(t){return t>=1?f:t<=-1?-f:Math.asin(t)}function g(t){return t.innerRadius}function m(t){return t.outerRadius}function v(t){return t.startAngle}function y(t){return t.endAngle}function x(t){return t&&t.padAngle}function b(t,e,r,n,i,a,o,s){var l=r-t,c=n-e,u=o-i,f=s-a,h=f*l-u*c;if(!(h*h<1e-12))return[t+(h=(u*(e-a)-f*(t-i))/h)*l,e+h*c]}function _(t,e,r,n,i,a,s){var l=t-r,u=e-n,f=(s?a:-a)/c(l*l+u*u),h=f*u,p=-f*l,d=t+h,g=e+p,m=r+h,v=n+p,y=(d+m)/2,x=(g+v)/2,b=m-d,_=v-g,w=b*b+_*_,T=i-a,k=d*v-m*g,A=(_<0?-1:1)*c(o(0,T*T*w-k*k)),M=(k*_-b*A)/w,S=(-k*b-_*A)/w,E=(k*_+b*A)/w,L=(-k*b+_*A)/w,C=M-y,P=S-x,I=E-y,O=L-x;return C*C+P*P>I*I+O*O&&(M=E,S=L),{cx:M,cy:S,x01:-h,y01:-p,x11:M*(i/T-1),y11:S*(i/T-1)}}function w(t){this._context=t}function T(t){return new w(t)}function k(t){return t[0]}function A(t){return t[1]}function M(){var t=k,n=A,i=r(!0),a=null,o=T,s=null;function l(r){var l,c,u,f=r.length,h=!1;for(null==a&&(s=o(u=e.path())),l=0;l<=f;++l)!(l=f;--h)c.point(v[h],y[h]);c.lineEnd(),c.areaEnd()}m&&(v[u]=+t(p,u,r),y[u]=+i(p,u,r),c.point(n?+n(p,u,r):v[u],a?+a(p,u,r):y[u]))}if(d)return c=null,d+\"\"||null}function f(){return M().defined(o).curve(l).context(s)}return u.x=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),n=null,u):t},u.x0=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),u):t},u.x1=function(t){return arguments.length?(n=null==t?null:\"function\"==typeof t?t:r(+t),u):n},u.y=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),a=null,u):i},u.y0=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),u):i},u.y1=function(t){return arguments.length?(a=null==t?null:\"function\"==typeof t?t:r(+t),u):a},u.lineX0=u.lineY0=function(){return f().x(t).y(i)},u.lineY1=function(){return f().x(t).y(a)},u.lineX1=function(){return f().x(n).y(i)},u.defined=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(!!t),u):o},u.curve=function(t){return arguments.length?(l=t,null!=s&&(c=l(s)),u):l},u.context=function(t){return arguments.length?(null==t?s=c=null:c=l(s=t),u):s},u}function E(t,e){return et?1:e>=t?0:NaN}function L(t){return t}w.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var C=I(T);function P(t){this._curve=t}function I(t){function e(e){return new P(t(e))}return e._curve=t,e}function O(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(I(t)):e()._curve},t}function z(){return O(M().curve(C))}function D(){var t=S().curve(C),e=t.curve,r=t.lineX0,n=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return O(r())},delete t.lineX0,t.lineEndAngle=function(){return O(n())},delete t.lineX1,t.lineInnerRadius=function(){return O(i())},delete t.lineY0,t.lineOuterRadius=function(){return O(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(I(t)):e()._curve},t}function R(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var F=Array.prototype.slice;function B(t){return t.source}function N(t){return t.target}function j(t){var n=B,i=N,a=k,o=A,s=null;function l(){var r,l=F.call(arguments),c=n.apply(this,l),u=i.apply(this,l);if(s||(s=r=e.path()),t(s,+a.apply(this,(l[0]=c,l)),+o.apply(this,l),+a.apply(this,(l[0]=u,l)),+o.apply(this,l)),r)return s=null,r+\"\"||null}return l.source=function(t){return arguments.length?(n=t,l):n},l.target=function(t){return arguments.length?(i=t,l):i},l.x=function(t){return arguments.length?(a=\"function\"==typeof t?t:r(+t),l):a},l.y=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(+t),l):o},l.context=function(t){return arguments.length?(s=null==t?null:t,l):s},l}function U(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function V(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e,r=(r+i)/2,n,r,n,i)}function H(t,e,r,n,i){var a=R(e,r),o=R(e,r=(r+i)/2),s=R(n,r),l=R(n,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],l[0],l[1])}var q={draw:function(t,e){var r=Math.sqrt(e/u);t.moveTo(r,0),t.arc(0,0,r,0,h)}},G={draw:function(t,e){var r=Math.sqrt(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Y=Math.sqrt(1/3),W=2*Y,X={draw:function(t,e){var r=Math.sqrt(e/W),n=r*Y;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},Z=Math.sin(u/10)/Math.sin(7*u/10),J=Math.sin(h/10)*Z,K=-Math.cos(h/10)*Z,Q={draw:function(t,e){var r=Math.sqrt(.8908130915292852*e),n=J*r,i=K*r;t.moveTo(0,-r),t.lineTo(n,i);for(var a=1;a<5;++a){var o=h*a/5,s=Math.cos(o),l=Math.sin(o);t.lineTo(l*r,-s*r),t.lineTo(s*n-l*i,l*n+s*i)}t.closePath()}},$={draw:function(t,e){var r=Math.sqrt(e),n=-r/2;t.rect(n,n,r,r)}},tt=Math.sqrt(3),et={draw:function(t,e){var r=-Math.sqrt(e/(3*tt));t.moveTo(0,2*r),t.lineTo(-tt*r,-r),t.lineTo(tt*r,-r),t.closePath()}},rt=-.5,nt=Math.sqrt(3)/2,it=1/Math.sqrt(12),at=3*(it/2+1),ot={draw:function(t,e){var r=Math.sqrt(e/at),n=r/2,i=r*it,a=n,o=r*it+r,s=-a,l=o;t.moveTo(n,i),t.lineTo(a,o),t.lineTo(s,l),t.lineTo(rt*n-nt*i,nt*n+rt*i),t.lineTo(rt*a-nt*o,nt*a+rt*o),t.lineTo(rt*s-nt*l,nt*s+rt*l),t.lineTo(rt*n+nt*i,rt*i-nt*n),t.lineTo(rt*a+nt*o,rt*o-nt*a),t.lineTo(rt*s+nt*l,rt*l-nt*s),t.closePath()}},st=[q,G,X,$,Q,et,ot];function lt(){}function ct(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function ut(t){this._context=t}function ft(t){this._context=t}function ht(t){this._context=t}function pt(t,e){this._basis=new ut(t),this._beta=e}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ct(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ft.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ht.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},pt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n,i=t[0],a=e[0],o=t[r]-i,s=e[r]-a,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+n*o),this._beta*e[l]+(1-this._beta)*(a+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var dt=function t(e){function r(t){return 1===e?new ut(t):new pt(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function gt(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function mt(t,e){this._context=t,this._k=(1-e)/6}mt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:gt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var vt=function t(e){function r(t){return new mt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function yt(t,e){this._context=t,this._k=(1-e)/6}yt.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var xt=function t(e){function r(t){return new yt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function bt(t,e){this._context=t,this._k=(1-e)/6}bt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var _t=function t(e){function r(t){return new bt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function wt(t,e,r){var n=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>1e-12){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*c+t._y1*t._l23_2a-r*t._l12_2a)/u}t._context.bezierCurveTo(n,i,a,o,t._x2,t._y2)}function Tt(t,e){this._context=t,this._alpha=e}Tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var kt=function t(e){function r(t){return e?new Tt(t,e):new mt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function At(t,e){this._context=t,this._alpha=e}At.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Mt=function t(e){function r(t){return e?new At(t,e):new yt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function St(t,e){this._context=t,this._alpha=e}St.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Et=function t(e){function r(t){return e?new St(t,e):new bt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Lt(t){this._context=t}function Ct(t){return t<0?-1:1}function Pt(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),o=(r-t._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Ct(a)+Ct(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function It(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Ot(t,e,r){var n=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-n)/3;t._context.bezierCurveTo(n+s,i+s*e,a-s,o-s*r,a,o)}function zt(t){this._context=t}function Dt(t){this._context=new Rt(t)}function Rt(t){this._context=t}function Ft(t){this._context=t}function Bt(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[n-1]=(t[n]+i[n-1])/2,e=0;e1)for(var r,n,i,a=1,o=t[e[0]],s=o.length;a=0;)r[e]=e;return r}function Vt(t,e){return t[e]}function Ht(t){var e=t.map(qt);return Ut(t).sort((function(t,r){return e[t]-e[r]}))}function qt(t){for(var e,r=-1,n=0,i=t.length,a=-1/0;++ra&&(a=e,n=r);return n}function Gt(t){var e=t.map(Yt);return Ut(t).sort((function(t,r){return e[t]-e[r]}))}function Yt(t){for(var e,r=0,n=-1,i=t.length;++n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},t.arc=function(){var t=g,o=m,w=r(0),T=null,k=v,A=y,M=x,S=null;function E(){var r,g,m=+t.apply(this,arguments),v=+o.apply(this,arguments),y=k.apply(this,arguments)-f,x=A.apply(this,arguments)-f,E=n(x-y),L=x>y;if(S||(S=r=e.path()),v1e-12)if(E>h-1e-12)S.moveTo(v*a(y),v*l(y)),S.arc(0,0,v,y,x,!L),m>1e-12&&(S.moveTo(m*a(x),m*l(x)),S.arc(0,0,m,x,y,L));else{var C,P,I=y,O=x,z=y,D=x,R=E,F=E,B=M.apply(this,arguments)/2,N=B>1e-12&&(T?+T.apply(this,arguments):c(m*m+v*v)),j=s(n(v-m)/2,+w.apply(this,arguments)),U=j,V=j;if(N>1e-12){var H=d(N/m*l(B)),q=d(N/v*l(B));(R-=2*H)>1e-12?(z+=H*=L?1:-1,D-=H):(R=0,z=D=(y+x)/2),(F-=2*q)>1e-12?(I+=q*=L?1:-1,O-=q):(F=0,I=O=(y+x)/2)}var G=v*a(I),Y=v*l(I),W=m*a(D),X=m*l(D);if(j>1e-12){var Z,J=v*a(O),K=v*l(O),Q=m*a(z),$=m*l(z);if(E1e-12?V>1e-12?(C=_(Q,$,G,Y,v,V,L),P=_(J,K,W,X,v,V,L),S.moveTo(C.cx+C.x01,C.cy+C.y01),V1e-12&&R>1e-12?U>1e-12?(C=_(W,X,J,K,m,-U,L),P=_(G,Y,Q,$,m,-U,L),S.lineTo(C.cx+C.x01,C.cy+C.y01),U0&&(d+=f);for(null!=e?g.sort((function(t,r){return e(m[t],m[r])})):null!=n&&g.sort((function(t,e){return n(r[t],r[e])})),s=0,c=d?(y-p*b)/d:0;s0?f*c:0)+b,m[l]={data:r[l],index:s,value:f,startAngle:v,endAngle:u,padAngle:x};return m}return s.value=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),s):i},s.endAngle=function(t){return arguments.length?(a=\"function\"==typeof t?t:r(+t),s):a},s.padAngle=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(+t),s):o},s},t.pointRadial=R,t.radialArea=D,t.radialLine=z,t.stack=function(){var t=r([]),e=Ut,n=jt,i=Vt;function a(r){var a,o,s=t.apply(this,arguments),l=r.length,c=s.length,u=new Array(c);for(a=0;a0)for(var r,n,i,a,o,s,l=0,c=t[e[0]].length;l0?(n[0]=a,n[1]=a+=i):i<0?(n[1]=o,n[0]=o+=i):(n[0]=0,n[1]=i)},t.stackOffsetExpand=function(t,e){if((n=t.length)>0){for(var r,n,i,a=0,o=t[0].length;a0){for(var r,n=0,i=t[e[0]],a=i.length;n0&&(n=(r=t[e[0]]).length)>0){for(var r,n,i,a=0,o=1;o=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:mt,s:vt,S:H,u:q,U:G,V:Y,w:W,W:X,x:null,X:null,y:Z,Y:J,Z:K,\"%\":gt},Ct={a:function(t){return f[t.getUTCDay()]},A:function(t){return u[t.getUTCDay()]},b:function(t){return yt[t.getUTCMonth()]},B:function(t){return h[t.getUTCMonth()]},c:null,d:Q,e:Q,f:nt,H:$,I:tt,j:et,L:rt,m:it,M:at,p:function(t){return c[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:mt,s:vt,S:ot,u:st,U:lt,V:ct,w:ut,W:ft,x:null,X:null,y:ht,Y:pt,Z:dt,\"%\":gt},Pt={a:function(t,e,r){var n=Tt.exec(e.slice(r));return n?(t.w=kt[n[0].toLowerCase()],r+n[0].length):-1},A:function(t,e,r){var n=_t.exec(e.slice(r));return n?(t.w=wt[n[0].toLowerCase()],r+n[0].length):-1},b:function(t,e,r){var n=St.exec(e.slice(r));return n?(t.m=Et[n[0].toLowerCase()],r+n[0].length):-1},B:function(t,e,r){var n=At.exec(e.slice(r));return n?(t.m=Mt[n[0].toLowerCase()],r+n[0].length):-1},c:function(t,e,r){return zt(t,a,e,r)},d:A,e:A,f:P,H:S,I:S,j:M,L:C,m:k,M:E,p:function(t,e,r){var n=xt.exec(e.slice(r));return n?(t.p=bt[n[0].toLowerCase()],r+n[0].length):-1},q:T,Q:O,s:z,S:L,u:m,U:v,V:y,w:g,W:x,x:function(t,e,r){return zt(t,o,e,r)},X:function(t,e,r){return zt(t,l,e,r)},y:_,Y:b,Z:w,\"%\":I};function It(t,e){return function(r){var n,i,a,o=[],l=-1,c=0,u=t.length;for(r instanceof Date||(r=new Date(+r));++l53)return null;\"w\"in c||(c.w=1),\"Z\"in c?(l=(s=n(i(c.y,0,1))).getUTCDay(),s=l>4||0===l?e.utcMonday.ceil(s):e.utcMonday(s),s=e.utcDay.offset(s,7*(c.V-1)),c.y=s.getUTCFullYear(),c.m=s.getUTCMonth(),c.d=s.getUTCDate()+(c.w+6)%7):(l=(s=r(i(c.y,0,1))).getDay(),s=l>4||0===l?e.timeMonday.ceil(s):e.timeMonday(s),s=e.timeDay.offset(s,7*(c.V-1)),c.y=s.getFullYear(),c.m=s.getMonth(),c.d=s.getDate()+(c.w+6)%7)}else(\"W\"in c||\"U\"in c)&&(\"w\"in c||(c.w=\"u\"in c?c.u%7:\"W\"in c?1:0),l=\"Z\"in c?n(i(c.y,0,1)).getUTCDay():r(i(c.y,0,1)).getDay(),c.m=0,c.d=\"W\"in c?(c.w+6)%7+7*c.W-(l+5)%7:c.w+7*c.U-(l+6)%7);return\"Z\"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,n(c)):r(c)}}function zt(t,e,r,n){for(var i,a,o=0,l=e.length,c=r.length;o=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=Pt[i in s?e.charAt(o++):i])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return Lt.x=It(o,Lt),Lt.X=It(l,Lt),Lt.c=It(a,Lt),Ct.x=It(o,Ct),Ct.X=It(l,Ct),Ct.c=It(a,Ct),{format:function(t){var e=It(t+=\"\",Lt);return e.toString=function(){return t},e},parse:function(t){var e=Ot(t+=\"\",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=It(t+=\"\",Ct);return e.toString=function(){return t},e},utcParse:function(t){var e=Ot(t+=\"\",!0);return e.toString=function(){return t},e}}}var o,s={\"-\":\"\",_:\" \",0:\"0\"},l=/^\\s*\\d+/,c=/^%/,u=/[\\\\^$*+?|[\\]().{}]/g;function f(t,e,r){var n=t<0?\"-\":\"\",i=(n?-t:t)+\"\",a=i.length;return n+(a68?1900:2e3),r+n[0].length):-1}function w(t,e,r){var n=/^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||\"00\")),r+n[0].length):-1}function T(t,e,r){var n=l.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function k(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function A(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function M(t,e,r){var n=l.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function S(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function E(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function L(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function C(t,e,r){var n=l.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function P(t,e,r){var n=l.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function I(t,e,r){var n=c.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function O(t,e,r){var n=l.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function z(t,e,r){var n=l.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function D(t,e){return f(t.getDate(),e,2)}function R(t,e){return f(t.getHours(),e,2)}function F(t,e){return f(t.getHours()%12||12,e,2)}function B(t,r){return f(1+e.timeDay.count(e.timeYear(t),t),r,3)}function N(t,e){return f(t.getMilliseconds(),e,3)}function j(t,e){return N(t,e)+\"000\"}function U(t,e){return f(t.getMonth()+1,e,2)}function V(t,e){return f(t.getMinutes(),e,2)}function H(t,e){return f(t.getSeconds(),e,2)}function q(t){var e=t.getDay();return 0===e?7:e}function G(t,r){return f(e.timeSunday.count(e.timeYear(t)-1,t),r,2)}function Y(t,r){var n=t.getDay();return t=n>=4||0===n?e.timeThursday(t):e.timeThursday.ceil(t),f(e.timeThursday.count(e.timeYear(t),t)+(4===e.timeYear(t).getDay()),r,2)}function W(t){return t.getDay()}function X(t,r){return f(e.timeMonday.count(e.timeYear(t)-1,t),r,2)}function Z(t,e){return f(t.getFullYear()%100,e,2)}function J(t,e){return f(t.getFullYear()%1e4,e,4)}function K(t){var e=t.getTimezoneOffset();return(e>0?\"-\":(e*=-1,\"+\"))+f(e/60|0,\"0\",2)+f(e%60,\"0\",2)}function Q(t,e){return f(t.getUTCDate(),e,2)}function $(t,e){return f(t.getUTCHours(),e,2)}function tt(t,e){return f(t.getUTCHours()%12||12,e,2)}function et(t,r){return f(1+e.utcDay.count(e.utcYear(t),t),r,3)}function rt(t,e){return f(t.getUTCMilliseconds(),e,3)}function nt(t,e){return rt(t,e)+\"000\"}function it(t,e){return f(t.getUTCMonth()+1,e,2)}function at(t,e){return f(t.getUTCMinutes(),e,2)}function ot(t,e){return f(t.getUTCSeconds(),e,2)}function st(t){var e=t.getUTCDay();return 0===e?7:e}function lt(t,r){return f(e.utcSunday.count(e.utcYear(t)-1,t),r,2)}function ct(t,r){var n=t.getUTCDay();return t=n>=4||0===n?e.utcThursday(t):e.utcThursday.ceil(t),f(e.utcThursday.count(e.utcYear(t),t)+(4===e.utcYear(t).getUTCDay()),r,2)}function ut(t){return t.getUTCDay()}function ft(t,r){return f(e.utcMonday.count(e.utcYear(t)-1,t),r,2)}function ht(t,e){return f(t.getUTCFullYear()%100,e,2)}function pt(t,e){return f(t.getUTCFullYear()%1e4,e,4)}function dt(){return\"+0000\"}function gt(){return\"%\"}function mt(t){return+t}function vt(t){return Math.floor(+t/1e3)}function yt(e){return o=a(e),t.timeFormat=o.format,t.timeParse=o.parse,t.utcFormat=o.utcFormat,t.utcParse=o.utcParse,o}yt({dateTime:\"%x, %X\",date:\"%-m/%-d/%Y\",time:\"%-I:%M:%S %p\",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\"]});var xt=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat(\"%Y-%m-%dT%H:%M:%S.%LZ\");var bt=+new Date(\"2000-01-01T00:00:00.000Z\")?function(t){var e=new Date(t);return isNaN(e)?null:e}:t.utcParse(\"%Y-%m-%dT%H:%M:%S.%LZ\");t.isoFormat=xt,t.isoParse=bt,t.timeFormatDefaultLocale=yt,t.timeFormatLocale=a,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{\"d3-time\":121}],121:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){\"use strict\";var e=new Date,r=new Date;function n(t,i,a,o){function s(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return s.floor=function(e){return t(e=new Date(+e)),e},s.ceil=function(e){return t(e=new Date(e-1)),i(e,1),t(e),e},s.round=function(t){var e=s(t),r=s.ceil(t);return t-e0))return o;do{o.push(a=new Date(+e)),i(e,n),t(e)}while(a=r)for(;t(r),!e(r);)r.setTime(r-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;i(t,-1),!e(t););else for(;--r>=0;)for(;i(t,1),!e(t););}))},a&&(s.count=function(n,i){return e.setTime(+n),r.setTime(+i),t(e),t(r),Math.floor(a(e,r))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(o?function(e){return o(e)%t==0}:function(e){return s.count(0,e)%t==0}):s:null}),s}var i=n((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?n((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,r){e.setTime(+e+r*t)}),(function(e,r){return(r-e)/t})):i:null};var a=i.range,o=n((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),s=o.range,l=n((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),c=l.range,u=n((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),f=u.range,h=n((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),p=h.range;function d(t){return n((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var g=d(0),m=d(1),v=d(2),y=d(3),x=d(4),b=d(5),_=d(6),w=g.range,T=m.range,k=v.range,A=y.range,M=x.range,S=b.range,E=_.range,L=n((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),C=L.range,P=n((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));P.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,r){e.setFullYear(e.getFullYear()+r*t)})):null};var I=P.range,O=n((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()})),z=O.range,D=n((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()})),R=D.range,F=n((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1})),B=F.range;function N(t){return n((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var j=N(0),U=N(1),V=N(2),H=N(3),q=N(4),G=N(5),Y=N(6),W=j.range,X=U.range,Z=V.range,J=H.range,K=q.range,Q=G.range,$=Y.range,tt=n((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),et=tt.range,rt=n((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));rt.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null};var nt=rt.range;t.timeDay=h,t.timeDays=p,t.timeFriday=b,t.timeFridays=S,t.timeHour=u,t.timeHours=f,t.timeInterval=n,t.timeMillisecond=i,t.timeMilliseconds=a,t.timeMinute=l,t.timeMinutes=c,t.timeMonday=m,t.timeMondays=T,t.timeMonth=L,t.timeMonths=C,t.timeSaturday=_,t.timeSaturdays=E,t.timeSecond=o,t.timeSeconds=s,t.timeSunday=g,t.timeSundays=w,t.timeThursday=x,t.timeThursdays=M,t.timeTuesday=v,t.timeTuesdays=k,t.timeWednesday=y,t.timeWednesdays=A,t.timeWeek=g,t.timeWeeks=w,t.timeYear=P,t.timeYears=I,t.utcDay=F,t.utcDays=B,t.utcFriday=G,t.utcFridays=Q,t.utcHour=D,t.utcHours=R,t.utcMillisecond=i,t.utcMilliseconds=a,t.utcMinute=O,t.utcMinutes=z,t.utcMonday=U,t.utcMondays=X,t.utcMonth=tt,t.utcMonths=et,t.utcSaturday=Y,t.utcSaturdays=$,t.utcSecond=o,t.utcSeconds=s,t.utcSunday=j,t.utcSundays=W,t.utcThursday=q,t.utcThursdays=K,t.utcTuesday=V,t.utcTuesdays=Z,t.utcWednesday=H,t.utcWednesdays=J,t.utcWeek=j,t.utcWeeks=W,t.utcYear=rt,t.utcYears=nt,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],122:[function(t,e,r){arguments[4][121][0].apply(r,arguments)},{dup:121}],123:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){\"use strict\";var e,r,n=0,i=0,a=0,o=0,s=0,l=0,c=\"object\"==typeof performance&&performance.now?performance:Date,u=\"object\"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function f(){return s||(u(h),s=c.now()+l)}function h(){s=0}function p(){this._call=this._time=this._next=null}function d(t,e,r){var n=new p;return n.restart(t,e,r),n}function g(){f(),++n;for(var t,r=e;r;)(t=s-r._time)>=0&&r._call.call(null,t),r=r._next;--n}function m(){s=(o=c.now())+l,n=i=0;try{g()}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,y(a)}(),s=0}}function v(){var t=c.now(),e=t-o;e>1e3&&(l-=e,o=t)}function y(t){n||(i&&(i=clearTimeout(i)),t-s>24?(t<1/0&&(i=setTimeout(m,t-c.now()-l)),a&&(a=clearInterval(a))):(a||(o=c.now(),a=setInterval(v,1e3)),n=1,u(m)))}p.prototype=d.prototype={constructor:p,restart:function(t,n,i){if(\"function\"!=typeof t)throw new TypeError(\"callback is not a function\");i=(null==i?f():+i)+(null==n?0:+n),this._next||r===this||(r?r._next=this:e=this,r=this),this._call=t,this._time=i,y()},stop:function(){this._call&&(this._call=null,this._time=1/0,y())}},t.interval=function(t,e,r){var n=new p,i=e;return null==e?(n.restart(t,e,r),n):(e=+e,r=null==r?f():+r,n.restart((function a(o){o+=i,n.restart(a,i+=e,r),t(o)}),e,r),n)},t.now=f,t.timeout=function(t,e,r){var n=new p;return e=null==e?0:+e,n.restart((function(r){n.stop(),t(r+e)}),e,r),n},t.timer=d,t.timerFlush=g,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],124:[function(t,e,r){e.exports=function(){for(var t=0;ts*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];i0)return function(t,e){var r,n;for(r=new Array(t),n=0;n80*r){n=l=t[0],s=c=t[1];for(var b=r;bl&&(l=u),p>c&&(c=p);d=0!==(d=Math.max(l-n,c-s))?1/d:0}return o(y,x,r,n,s,d),x}function i(t,e,r,n,i){var a,o;if(i===E(t,e,r,n)>0)for(a=e;a=e;a-=n)o=A(a,t[a],t[a+1],o);return o&&x(o,o.next)&&(M(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||!x(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(M(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=d(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;e0||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 p,g,m=t;t.prev!==t.next;)if(p=t.prev,g=t.next,f?l(t,n,i,f):s(t))e.push(p.i/r),e.push(t.i/r),e.push(g.i/r),M(t),t=g.next,m=g.next;else if((t=g)===m){h?1===h?o(t=c(a(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(y(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(m(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&y(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(y(i,a,o)>=0)return!1;for(var s=i.xa.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=d(s,l,e,r,n),h=d(c,u,e,r,n),p=t.prevZ,g=t.nextZ;p&&p.z>=f&&g&&g.z<=h;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,g!==t.prev&&g!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;g&&g.z<=h;){if(g!==t.prev&&g!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function c(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!x(i,o)&&b(i,n,n.next,o)&&T(i,o)&&T(o,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(o.i/r),M(n),M(n.next),n=t=o),n=n.next}while(n!==t);return a(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=k(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.x&&n.x>=u&&i!==n.x&&m(ar.x||n.x===r.x&&p(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(t,e)){var r=k(e,t);a(e,e.next),a(r,r.next)}}function p(t,e){return y(t.prev,t,e.prev)<0&&y(e.next,t,t.next)<0}function d(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 g(t){var e=t,r=t;do{(e.x=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&&b(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(T(t,e)&&T(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)&&(y(t.prev,t,e.prev)||y(t,e.prev,e))||x(t,e)&&y(t.prev,t,t.next)>0&&y(e.prev,e,e.next)>0)}function y(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,r,n){var i=w(y(t,e,r)),a=w(y(t,e,n)),o=w(y(r,n,t)),s=w(y(r,n,e));return i!==a&&o!==s||(!(0!==i||!_(t,r,e))||(!(0!==a||!_(t,n,e))||(!(0!==o||!_(r,t,n))||!(0!==s||!_(r,e,n)))))}function _(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function w(t){return t>0?1:t<0?-1:0}function T(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function k(t,e){var r=new S(t.i,t.x,t.y),n=new S(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 A(t,e,r,n){var i=new S(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 M(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 S(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 E(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],130:[function(t,e,r){var n=t(\"strongly-connected-components\");e.exports=function(t,e){var r,i=[],a=[],o=[],s={},l=[];function c(t){var e,n,i=!1;for(a.push(t),o[t]=!0,e=0;e=e}))}(e);for(var r,i=n(t).components.filter((function(t){return t.length>1})),a=1/0,o=0;o=55296&&y<=56319&&(w+=t[++r]),w=T?h.call(T,k,w,g):w,e?(p.value=w,d(m,g,p)):m[g]=w,++g;v=g}if(void 0===v)for(v=o(t.length),e&&(m=new e(v)),r=0;r0?1:-1}},{}],141:[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\":138}],142:[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\":141}],143:[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\":160,\"./valid-value\":162}],144:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?Object.assign:t(\"./shim\")},{\"./is-implemented\":145,\"./shim\":146}],145:[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\")}},{}],146:[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-1}},{}],166:[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}},{}],167:[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}},{}],168:[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\"))},{\"./\":171,d:106,\"es5-ext/object/set-prototype-of\":157,\"es5-ext/string/#/contains\":163,\"es6-symbol\":175}],169:[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,m,v=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,v,u.value,f),h)return;u=t.next()}else for(d=t.length,p=0;p=55296&&m<=56319&&(g+=t[++p]),l.call(e,v,g,f),!h);++p);else c.call(t,(function(t){return l.call(e,v,t,f),h}))}},{\"./get\":170,\"es5-ext/function/is-arguments\":135,\"es5-ext/object/valid-callable\":160,\"es5-ext/string/is-string\":166}],170:[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\":168,\"./string\":173,\"./valid-iterable\":174,\"es5-ext/function/is-arguments\":135,\"es5-ext/string/is-string\":166,\"es6-symbol\":175}],171:[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.__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:106,\"d/auto-bind\":105,\"es5-ext/array/#/clear\":131,\"es5-ext/object/assign\":144,\"es5-ext/object/valid-callable\":160,\"es5-ext/object/valid-value\":162,\"es6-symbol\":175}],172:[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\":135,\"es5-ext/object/is-value\":151,\"es5-ext/string/is-string\":166,\"es6-symbol\":175}],173:[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__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,o.toStringTag,a(\"c\",\"String Iterator\"))},{\"./\":171,d:106,\"es5-ext/object/set-prototype-of\":157,\"es6-symbol\":175}],174:[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\":172}],175:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?t(\"ext/global-this\").Symbol:t(\"./polyfill\")},{\"./is-implemented\":176,\"./polyfill\":181,\"ext/global-this\":188}],176:[function(t,e,r){\"use strict\";var n=t(\"ext/global-this\"),i={object:!0,symbol:!0};e.exports=function(){var t,e=n.Symbol;if(\"function\"!=typeof e)return!1;t=e(\"test symbol\");try{String(t)}catch(t){return!1}return!!i[typeof e.iterator]&&(!!i[typeof e.toPrimitive]&&!!i[typeof e.toStringTag])}},{\"ext/global-this\":188}],177:[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]))}},{}],178:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=Object.create,a=Object.defineProperty,o=Object.prototype,s=i(null);e.exports=function(t){for(var e,r,i=0;s[t+(i||\"\")];)++i;return s[t+=i||\"\"]=!0,a(o,e=\"@@\"+t,n.gs(null,(function(t){r||(r=!0,a(this,e,n(t)),r=!1)}))),e}},{d:106}],179:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=t(\"ext/global-this\").Symbol;e.exports=function(t){return Object.defineProperties(t,{hasInstance:n(\"\",i&&i.hasInstance||t(\"hasInstance\")),isConcatSpreadable:n(\"\",i&&i.isConcatSpreadable||t(\"isConcatSpreadable\")),iterator:n(\"\",i&&i.iterator||t(\"iterator\")),match:n(\"\",i&&i.match||t(\"match\")),replace:n(\"\",i&&i.replace||t(\"replace\")),search:n(\"\",i&&i.search||t(\"search\")),species:n(\"\",i&&i.species||t(\"species\")),split:n(\"\",i&&i.split||t(\"split\")),toPrimitive:n(\"\",i&&i.toPrimitive||t(\"toPrimitive\")),toStringTag:n(\"\",i&&i.toStringTag||t(\"toStringTag\")),unscopables:n(\"\",i&&i.unscopables||t(\"unscopables\"))})}},{d:106,\"ext/global-this\":188}],180:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=t(\"../../../validate-symbol\"),a=Object.create(null);e.exports=function(t){return Object.defineProperties(t,{for:n((function(e){return a[e]?a[e]:a[e]=t(String(e))})),keyFor:n((function(t){var e;for(e in i(t),a)if(a[e]===t)return e}))})}},{\"../../../validate-symbol\":182,d:106}],181:[function(t,e,r){\"use strict\";var n,i,a,o=t(\"d\"),s=t(\"./validate-symbol\"),l=t(\"ext/global-this\").Symbol,c=t(\"./lib/private/generate-name\"),u=t(\"./lib/private/setup/standard-symbols\"),f=t(\"./lib/private/setup/symbol-registry\"),h=Object.create,p=Object.defineProperties,d=Object.defineProperty;if(\"function\"==typeof l)try{String(l()),a=!0}catch(t){}else l=null;i=function(t){if(this instanceof i)throw new TypeError(\"Symbol is not a constructor\");return n(t)},e.exports=n=function t(e){var r;if(this instanceof t)throw new TypeError(\"Symbol is not a constructor\");return a?l(e):(r=h(i.prototype),e=void 0===e?\"\":String(e),p(r,{__description__:o(\"\",e),__name__:o(\"\",c(e))}))},u(n),f(n),p(i.prototype,{constructor:o(n),toString:o(\"\",(function(){return this.__name__}))}),p(n.prototype,{toString:o((function(){return\"Symbol (\"+s(this).__description__+\")\"})),valueOf:o((function(){return s(this)}))}),d(n.prototype,n.toPrimitive,o(\"\",(function(){var t=s(this);return\"symbol\"==typeof t?t:t.toString()}))),d(n.prototype,n.toStringTag,o(\"c\",\"Symbol\")),d(i.prototype,n.toStringTag,o(\"c\",n.prototype[n.toStringTag])),d(i.prototype,n.toPrimitive,o(\"c\",n.prototype[n.toPrimitive]))},{\"./lib/private/generate-name\":178,\"./lib/private/setup/standard-symbols\":179,\"./lib/private/setup/symbol-registry\":180,\"./validate-symbol\":182,d:106,\"ext/global-this\":188}],182:[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\":177}],183:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?WeakMap:t(\"./polyfill\")},{\"./is-implemented\":184,\"./polyfill\":186}],184:[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)))))}},{}],185:[function(t,e,r){\"use strict\";e.exports=\"function\"==typeof WeakMap&&\"[object WeakMap]\"===Object.prototype.toString.call(new WeakMap)},{}],186:[function(t,e,r){\"use strict\";var n,i=t(\"es5-ext/object/is-value\"),a=t(\"es5-ext/object/set-prototype-of\"),o=t(\"es5-ext/object/valid-object\"),s=t(\"es5-ext/object/valid-value\"),l=t(\"es5-ext/string/random-uniq\"),c=t(\"d\"),u=t(\"es6-iterator/get\"),f=t(\"es6-iterator/for-of\"),h=t(\"es6-symbol\").toStringTag,p=t(\"./is-native-implemented\"),d=Array.isArray,g=Object.defineProperty,m=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=p&&a&&WeakMap!==n?a(new WeakMap,v(this)):this,i(e)&&(d(e)||(e=u(e))),g(t,\"__weakMapData__\",c(\"c\",\"$weakMap$\"+l())),e?(f(e,(function(e){s(e),t.set(e[0],e[1])})),t):t},p&&(a&&a(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:c(n)})),Object.defineProperties(n.prototype,{delete:c((function(t){return!!m.call(o(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)})),get:c((function(t){if(m.call(o(t),this.__weakMapData__))return t[this.__weakMapData__]})),has:c((function(t){return m.call(o(t),this.__weakMapData__)})),set:c((function(t,e){return g(o(t),this.__weakMapData__,c(\"c\",e)),this})),toString:c((function(){return\"[object WeakMap]\"}))}),g(n.prototype,h,c(\"c\",\"WeakMap\"))},{\"./is-native-implemented\":185,d:106,\"es5-ext/object/is-value\":151,\"es5-ext/object/set-prototype-of\":157,\"es5-ext/object/valid-object\":161,\"es5-ext/object/valid-value\":162,\"es5-ext/string/random-uniq\":167,\"es6-iterator/for-of\":169,\"es6-iterator/get\":170,\"es6-symbol\":175}],187:[function(t,e,r){var n=function(){if(\"object\"==typeof self&&self)return self;if(\"object\"==typeof window&&window)return window;throw new Error(\"Unable to resolve global `this`\")};e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,\"__global__\",{get:function(){return this},configurable:!0})}catch(t){return n()}try{return __global__||n()}finally{delete Object.prototype.__global__}}()},{}],188:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?globalThis:t(\"./implementation\")},{\"./implementation\":187,\"./is-implemented\":189}],189:[function(t,e,r){\"use strict\";e.exports=function(){return\"object\"==typeof globalThis&&(!!globalThis&&globalThis.Array===Array)}},{}],190:[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\":237}],191:[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;ie[0]-o[0]/2&&(h=o[0]/2,p+=o[1]);return r}},{\"css-font/stringify\":102}],193:[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\",title:void 0!==e.title?e.title:\"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 m=a(f.getImageData(0,0,p,p));d.lineHeight=d.bottom=p-m+g,f.clearRect(0,0,p,p),f.textBaseline=\"alphabetic\",f.fillText(\"H\",0,p);var v=p-a(f.getImageData(0,0,p,p))-1+g;d.baseline=d.alphabetic=v,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.title&&(f.clearRect(0,0,p,p),f.textBaseline=\"top\",f.fillText(h.title,0,0),d.title=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=_-v}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;n0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}e.exports=n,n.canvas=document.createElement(\"canvas\"),n.cache={}},{}],194:[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 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:{}}},T.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),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=T.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(T.baseFontSize+\"px \"+t)}else t=n.parse(n.stringify(t));var i=n.stringify({size:T.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]=T.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:v(c,{origin:\"top\",fontSize:T.baseFontSize,fontStyle:u.join(\" \")})},T.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;h2){for(var w=!t.position[0].length,k=u.mallocFloat(2*this.count),A=0,M=0;A1?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],i*=-1}))),null!=t.color)if(t.color||(t.color=\"transparent\"),\"string\"!=typeof t.color&&isNaN(t.color)){var q;if(\"number\"==typeof t.color[0]&&t.color.length>this.counts.length){var G=t.color.length;q=u.mallocUint8(G);for(var Y=(t.color.subarray||t.color.slice).bind(t.color),W=0;W4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var J=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(J);for(var K=0;K1?this.counts[K]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[K]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*K,4*K+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[K]:this.opacity,baseline:null!=this.baselineOffset[K]?this.baselineOffset[K]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[K]?this.alignOffset[K]:this.alignOffset[0]:0,atlas:this.fontAtlas[K]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*K,2*K+2):this.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=[]},T.prototype.destroy=function(){},T.prototype.kerning=!0,T.prototype.position={constant:new Float32Array(2)},T.prototype.translate=null,T.prototype.scale=null,T.prototype.font=null,T.prototype.text=\"\",T.prototype.positionOffset=[0,0],T.prototype.opacity=1,T.prototype.color=new Uint8Array([0,0,0,255]),T.prototype.alignOffset=[0,0],T.maxAtlasSize=1024,T.atlasCanvas=document.createElement(\"canvas\"),T.atlasContext=T.atlasCanvas.getContext(\"2d\",{alpha:!1}),T.baseFontSize=64,T.fonts={},e.exports=T},{\"bit-twiddle\":81,\"color-normalize\":89,\"css-font\":99,\"detect-kerning\":125,\"es6-weak-map\":183,\"flatten-vertex-data\":191,\"font-atlas\":192,\"font-measure\":193,\"gl-util/context\":226,\"is-plain-obj\":236,\"object-assign\":247,\"parse-rect\":249,\"parse-unit\":251,\"pick-by-alias\":253,regl:283,\"to-px\":314,\"typedarray-pool\":327}],226:[function(t,e,r){(function(r){(function(){\"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*r.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*r.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}function o(){var t=document.createElement(\"canvas\");return t.style.position=\"absolute\",t.style.top=0,t.style.left=0,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\",width:\"w width\",height:\"h height\"},!0),t.pixelRatio||(t.pixelRatio=r.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(\"string\"==typeof t.container){var s=document.querySelector(t.container);if(!s)throw Error(\"Element \"+t.container+\" is not found\");t.container=s}a(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=o(),t.container.appendChild(t.canvas),i(t))}else if(!t.canvas){if(\"undefined\"==typeof document)throw Error(\"Not DOM environment. Use headless-gl.\");t.container=document.body||document.documentElement,t.canvas=o(),t.container.appendChild(t.canvas),i(t)}return t.gl||[\"webgl\",\"experimental-webgl\",\"webgl-experimental\"].some((function(e){try{t.gl=t.canvas.getContext(e,t.attrs)}catch(t){}return t.gl})),t.gl}}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"pick-by-alias\":253}],227:[function(t,e,r){e.exports=function(t){\"string\"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n>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<>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<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g}},{}],231:[function(t,e,r){\"function\"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},{}],232:[function(t,e,r){e.exports=!0},{}],233:[function(t,e,r){\"use strict\";e.exports=\"undefined\"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\\//.test(navigator.appVersion))},{}],234:[function(t,e,r){\"use strict\";e.exports=a,e.exports.isMobile=a,e.exports.default=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[46]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[46]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;if(e||\"undefined\"==typeof navigator||(e=navigator.userAgent),e&&e.headers&&\"string\"==typeof e.headers[\"user-agent\"]&&(e=e.headers[\"user-agent\"]),\"string\"!=typeof e)return!1;var r=t.tablet?i.test(e):n.test(e);return!r&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==e.indexOf(\"Macintosh\")&&-1!==e.indexOf(\"Safari\")&&(r=!0),r}},{}],235:[function(t,e,r){\"use strict\";e.exports=function(t){var e=typeof t;return null!==t&&(\"object\"===e||\"function\"===e)}},{}],236:[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({}))}},{}],237:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e,r=t.length,n=0;n13)&&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}},{}],238:[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))}},{}],239:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?e.exports=n():(t=t||self).mapboxgl=n()}(this,(function(){\"use strict\";var t,e,r;function n(n,i){if(t)if(e){var a=\"var sharedChunk = {}; (\"+t+\")(sharedChunk); (\"+e+\")(sharedChunk);\",o={};t(o),(r=i(o)).workerUrl=window.URL.createObjectURL(new Blob([a],{type:\"text/javascript\"}))}else e=i;else t=i}return n(0,(function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r=n;function n(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}n.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},n.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},n.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},n.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)(n=1))return n;for(;ra?r=i:n=i,i=.5*(n-r)+r}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var i=a;function a(t,e){this.x=t,this.y=e}function o(t,e,n,i){var a=new r(t,e,n,i);return function(t){return a.solve(t)}}a.prototype={clone:function(){return new a(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}},a.convert=function(t){return t instanceof a?t:Array.isArray(t)?new a(t[0],t[1]):t};var s=o(.25,.1,.25,1);function l(t,e,r){return Math.min(r,Math.max(e,t))}function c(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i}function u(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function d(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function g(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e))}))}function m(t,e){return-1!==t.indexOf(e,t.length-e.length)}function v(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?v(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 T(t){for(var e=0,r=0,n=t.length,i=n-1,a=void 0,o=void 0;r@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\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}var M=null;function S(t){if(null==M){var e=t.navigator?t.navigator.userAgent:null;M=!!t.safari||!(!e||!(/\\b(iPad|iPhone|iPod)\\b/.test(e)||e.match(\"Safari\")&&!e.match(\"Chrome\")))}return M}function E(t){try{var e=self[t];return e.setItem(\"_mapbox_test_\",1),e.removeItem(\"_mapbox_test_\"),!0}catch(t){return!1}}var L,C,P,I,O=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),z=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,D=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,R={now:O,frame:function(t){var e=z(t);return{cancel:function(){return D(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var r=self.document.createElement(\"canvas\"),n=r.getContext(\"2d\");if(!n)throw new Error(\"failed to create canvas 2d context\");return r.width=t.width,r.height=t.height,n.drawImage(t,0,0,t.width,t.height),n.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:function(t){return L||(L=self.document.createElement(\"a\")),L.href=t,L.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==C&&(C=self.matchMedia(\"(prefers-reduced-motion: reduce)\")),C.matches)}},F={API_URL:\"https://api.mapbox.com\",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf(\"https://api.mapbox.cn\")?\"https://events.mapbox.cn/events/v2\":0===this.API_URL.indexOf(\"https://api.mapbox.com\")?\"https://events.mapbox.com/events/v2\":null:null},FEEDBACK_URL:\"https://apps.mapbox.com/feedback\",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},B={supported:!1,testSupport:function(t){if(N||!I)return;j?U(t):P=t}},N=!1,j=!1;function U(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,I),t.isContextLost())return;B.supported=!0}catch(t){}t.deleteTexture(e),N=!0}self.document&&((I=self.document.createElement(\"img\")).onload=function(){P&&U(P),P=null,j=!0},I.onerror=function(){N=!0,P=null},I.src=\"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\");var V=\"01\";var H=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function q(t){return 0===t.indexOf(\"mapbox:\")}H.prototype._createSkuToken=function(){var t=function(){for(var t=\"\",e=0;e<10;e++)t+=\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"[Math.floor(62*Math.random())];return{token:[\"1\",V,t].join(\"\"),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},H.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},H.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},H.prototype.normalizeStyleURL=function(t,e){if(!q(t))return t;var r=X(t);return r.path=\"/styles/v1\"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeGlyphsURL=function(t,e){if(!q(t))return t;var r=X(t);return r.path=\"/fonts/v1\"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeSourceURL=function(t,e){if(!q(t))return t;var r=X(t);return r.path=\"/v4/\"+r.authority+\".json\",r.params.push(\"secure\"),this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeSpriteURL=function(t,e,r,n){var i=X(t);return q(t)?(i.path=\"/styles/v1\"+i.path+\"/sprite\"+e+r,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=\"\"+e+r,Z(i))},H.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!q(t))return t;var r=X(t),n=R.devicePixelRatio>=2||512===e?\"@2x\":\"\",i=B.supported?\".webp\":\"$1\";r.path=r.path.replace(/(\\.(png|jpg)\\d*)(?=$)/,\"\"+n+i),r.path=r.path.replace(/^.+\\/v4\\//,\"/\"),r.path=\"/v4\"+r.path;var a=this._customAccessToken||function(t){for(var e=0,r=t;e=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){_(\"Unable to write to LocalStorage\")}},K.prototype.processRequests=function(t){},K.prototype.postEvent=function(t,e,r,n){var i=this;if(F.EVENTS_URL){var a=X(F.EVENTS_URL);a.params.push(\"access_token=\"+(n||F.ACCESS_TOKEN||\"\"));var o={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:\"mapbox-gl-js\",sdkVersion:\"1.10.1\",skuId:V,userId:this.anonId},s=e?u(o,e):o,l={url:Z(a),headers:{\"Content-Type\":\"text/plain\"},body:JSON.stringify([s])};this.pendingRequest=bt(l,(function(t){i.pendingRequest=null,r(t),i.saveEventData(),i.processRequests(n)}))}},K.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var Q,$,tt=function(t){function e(){t.call(this,\"map.load\"),this.success={},this.skuToken=\"\"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postMapLoadEvent=function(t,e,r,n){this.skuToken=r,(F.EVENTS_URL&&n||F.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return q(t)||Y(t)})))&&this.queueRequest({id:e,timestamp:Date.now()},n)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var r=this.queue.shift(),n=r.id,i=r.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),d(this.anonId)||(this.anonId=p()),this.postEvent(i,{skuToken:this.skuToken},(function(t){t||n&&(e.success[n]=!0)}),t))}},e}(K),et=new(function(t){function e(e){t.call(this,\"appUserTurnstile\"),this._customAccessToken=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postTurnstileEvent=function(t,e){F.EVENTS_URL&&F.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return q(t)||Y(t)}))&&this.queueRequest(Date.now(),e)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var r=J(F.ACCESS_TOKEN),n=r?r.u:F.ACCESS_TOKEN,i=n!==this.eventData.tokenU;d(this.anonId)||(this.anonId=p(),i=!0);var a=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(a),l=(a-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||o.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(a,{\"enabled.telemetry\":!1},(function(t){t||(e.eventData.lastSuccess=a,e.eventData.tokenU=n)}),t)}},e}(K)),rt=et.postTurnstileEvent.bind(et),nt=new tt,it=nt.postMapLoadEvent.bind(nt),at=500,ot=50;function st(){self.caches&&!Q&&(Q=self.caches.open(\"mapbox-tiles\"))}function lt(t,e,r){if(st(),Q){var n={status:e.status,statusText:e.statusText,headers:new self.Headers};e.headers.forEach((function(t,e){return n.headers.set(e,t)}));var i=A(e.headers.get(\"Cache-Control\")||\"\");if(!i[\"no-store\"])i[\"max-age\"]&&n.headers.set(\"Expires\",new Date(r+1e3*i[\"max-age\"]).toUTCString()),new Date(n.headers.get(\"Expires\")).getTime()-r<42e4||function(t,e){if(void 0===$)try{new Response(new ReadableStream),$=!0}catch(t){$=!1}$?e(t.body):t.blob().then(e)}(e,(function(e){var r=new self.Response(e,n);st(),Q&&Q.then((function(e){return e.put(ct(t.url),r)})).catch((function(t){return _(t.message)}))}))}}function ct(t){var e=t.indexOf(\"?\");return e<0?t:t.slice(0,e)}function ut(t,e){if(st(),!Q)return e(null);var r=ct(t.url);Q.then((function(t){t.match(r).then((function(n){var i=function(t){if(!t)return!1;var e=new Date(t.headers.get(\"Expires\")||0),r=A(t.headers.get(\"Cache-Control\")||\"\");return e>Date.now()&&!r[\"no-cache\"]}(n);t.delete(r),i&&t.put(r,n.clone()),e(null,n,i)})).catch(e)})).catch(e)}var ft,ht=1/0;function pt(){return null==ft&&(ft=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext(\"2d\")&&\"function\"==typeof self.createImageBitmap),ft}var dt={Unknown:\"Unknown\",Style:\"Style\",Source:\"Source\",Tile:\"Tile\",Glyphs:\"Glyphs\",SpriteImage:\"SpriteImage\",SpriteJSON:\"SpriteJSON\",Image:\"Image\"};\"function\"==typeof Object.freeze&&Object.freeze(dt);var gt=function(t){function e(e,r,n){401===r&&Y(n)&&(e+=\": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes\"),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),mt=k()?function(){return self.worker&&self.worker.referrer}:function(){return(\"blob:\"===self.location.protocol?self.parent:self).location.href};function vt(t,e){var r,n=new self.AbortController,i=new self.Request(t.url,{method:t.method||\"GET\",body:t.body,credentials:t.credentials,headers:t.headers,referrer:mt(),signal:n.signal}),a=!1,o=!1,s=(r=i.url).indexOf(\"sku=\")>0&&Y(r);\"json\"===t.type&&i.headers.set(\"Accept\",\"application/json\");var l=function(r,n,a){if(!o){if(r&&\"SecurityError\"!==r.message&&_(r),n&&a)return c(n);var l=Date.now();self.fetch(i).then((function(r){if(r.ok){var n=s?r.clone():null;return c(r,n,l)}return e(new gt(r.statusText,r.status,t.url))})).catch((function(t){20!==t.code&&e(new Error(t.message))}))}},c=function(r,n,s){(\"arrayBuffer\"===t.type?r.arrayBuffer():\"json\"===t.type?r.json():r.text()).then((function(t){o||(n&&s&<(i,n,s),a=!0,e(null,t,r.headers.get(\"Cache-Control\"),r.headers.get(\"Expires\")))})).catch((function(t){o||e(new Error(t.message))}))};return s?ut(i,l):l(null,null),{cancel:function(){o=!0,a||n.abort()}}}var yt=function(t,e){if(r=t.url,!(/^file:/.test(r)||/^file:/.test(mt())&&!/^\\w+:/.test(r))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty(\"signal\"))return vt(t,e);if(k()&&self.worker&&self.worker.actor){return self.worker.actor.send(\"getResource\",t,e,void 0,!0)}}var r;return function(t,e){var r=new self.XMLHttpRequest;for(var n in r.open(t.method||\"GET\",t.url,!0),\"arrayBuffer\"===t.type&&(r.responseType=\"arraybuffer\"),t.headers)r.setRequestHeader(n,t.headers[n]);return\"json\"===t.type&&(r.responseType=\"text\",r.setRequestHeader(\"Accept\",\"application/json\")),r.withCredentials=\"include\"===t.credentials,r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if(\"json\"===t.type)try{n=JSON.parse(r.response)}catch(t){return e(t)}e(null,n,r.getResponseHeader(\"Cache-Control\"),r.getResponseHeader(\"Expires\"))}else e(new gt(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},xt=function(t,e){return yt(u(t,{type:\"arrayBuffer\"}),e)},bt=function(t,e){return yt(u(t,{method:\"POST\"}),e)};var _t,wt;_t=[],wt=0;var Tt=function(t,e){if(B.supported&&(t.headers||(t.headers={}),t.headers.accept=\"image/webp,*/*\"),wt>=F.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return _t.push(r),r}wt++;var n=!1,i=function(){if(!n)for(n=!0,wt--;_t.length&&wt0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},Et.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var Lt={$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.051129,180,85.051129]},scheme:{type:\"enum\",values:{xyz:{},tms:{}},default:\"xyz\"},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},attribution:{type:\"string\"},promoteId:{type:\"promoteId\"},\"*\":{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.051129,180,85.051129]},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.051129,180,85.051129]},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},attribution:{type:\"string\"},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\"},clusterProperties:{type:\"*\"},lineMetrics:{type:\"boolean\",default:!1},generateId:{type:\"boolean\",default:!1},promoteId:{type:\"promoteId\"}},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\",\"property-type\":\"constant\"}},layout_fill:{\"fill-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_circle:{\"circle-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_heatmap:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},\"layout_fill-extrusion\":{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_line:{\"line-cap\":{type:\"enum\",values:{butt:{},round:{},square:{}},default:\"butt\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-join\":{type:\"enum\",values:{bevel:{},round:{},miter:{}},default:\"miter\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"line-miter-limit\":{type:\"number\",default:2,requires:[{\"line-join\":\"miter\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-round-limit\":{type:\"number\",default:1.05,requires:[{\"line-join\":\"round\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_symbol:{\"symbol-placement\":{type:\"enum\",values:{point:{},line:{},\"line-center\":{}},default:\"point\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-spacing\":{type:\"number\",default:250,minimum:1,units:\"pixels\",requires:[{\"symbol-placement\":\"line\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-avoid-edges\":{type:\"boolean\",default:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"symbol-z-order\":{type:\"enum\",values:{auto:{},\"viewport-y\":{},source:{}},default:\"auto\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-optional\":{type:\"boolean\",default:!1,requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-size\":{type:\"number\",default:1,minimum:0,units:\"factor of the original icon size\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-text-fit\":{type:\"enum\",values:{none:{},width:{},height:{},both:{}},default:\"none\",requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-text-fit-padding\":{type:\"array\",value:\"number\",length:4,default:[0,0,0,0],units:\"pixels\",requires:[\"icon-image\",\"text-field\",{\"icon-text-fit\":[\"both\",\"width\",\"height\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-image\":{type:\"resolvedImage\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-keep-upright\":{type:\"boolean\",default:!1,requires:[\"icon-image\",{\"icon-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-offset\":{type:\"array\",value:\"number\",length:2,default:[0,0],requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-field\":{type:\"formatted\",default:\"\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-font\":{type:\"array\",value:\"string\",default:[\"Open Sans Regular\",\"Arial Unicode MS Regular\"],requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-size\":{type:\"number\",default:16,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-width\":{type:\"number\",default:10,minimum:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-line-height\":{type:\"number\",default:1.2,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-letter-spacing\":{type:\"number\",default:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-justify\":{type:\"enum\",values:{auto:{},left:{},center:{},right:{}},default:\"center\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-radial-offset\":{type:\"number\",units:\"ems\",default:0,requires:[\"text-field\"],\"property-type\":\"data-driven\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]}},\"text-variable-anchor\":{type:\"array\",value:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"text-field\",{\"!\":\"text-variable-anchor\"}],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-angle\":{type:\"number\",default:45,units:\"degrees\",requires:[\"text-field\",{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-writing-mode\":{type:\"array\",value:\"enum\",values:{horizontal:{},vertical:{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-keep-upright\":{type:\"boolean\",default:!0,requires:[\"text-field\",{\"text-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-transform\":{type:\"enum\",values:{none:{},uppercase:{},lowercase:{}},default:\"none\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-offset\":{type:\"array\",value:\"number\",units:\"ems\",length:2,default:[0,0],requires:[\"text-field\",{\"!\":\"text-radial-offset\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-optional\":{type:\"boolean\",default:!1,requires:[\"text-field\",\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_raster:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_hillshade:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},filter:{type:\"array\",value:\"*\"},filter_operator:{type:\"enum\",values:{\"==\":{},\"!=\":{},\">\":{},\">=\":{},\"<\":{},\"<=\":{},in:{},\"!in\":{},all:{},any:{},none:{},has:{},\"!has\":{},within:{}}},geometry_type:{type:\"enum\",values:{Point:{},LineString:{},Polygon:{}}},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}},function_stop:{type:\"array\",minimum:0,maximum:24,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\"},in:{group:\"Lookup\"},\"index-of\":{group:\"Lookup\"},slice:{group:\"Lookup\"},case:{group:\"Decision\"},match:{group:\"Decision\"},coalesce:{group:\"Decision\"},step:{group:\"Ramps, scales, curves\"},interpolate:{group:\"Ramps, scales, curves\"},\"interpolate-hcl\":{group:\"Ramps, scales, curves\"},\"interpolate-lab\":{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\"},format:{group:\"Types\"},image:{group:\"Types\"},\"number-format\":{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\"},\"feature-state\":{group:\"Feature data\"},\"geometry-type\":{group:\"Feature data\"},id:{group:\"Feature data\"},zoom:{group:\"Zoom\"},\"heatmap-density\":{group:\"Heatmap\"},\"line-progress\":{group:\"Feature data\"},accumulated:{group:\"Feature data\"},\"+\":{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\"},distance:{group:\"Math\"},\"==\":{group:\"Decision\"},\"!=\":{group:\"Decision\"},\">\":{group:\"Decision\"},\"<\":{group:\"Decision\"},\">=\":{group:\"Decision\"},\"<=\":{group:\"Decision\"},all:{group:\"Decision\"},any:{group:\"Decision\"},\"!\":{group:\"Decision\"},within:{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:{}},\"property-type\":\"data-constant\",transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]}},position:{type:\"array\",default:[1.15,210,30],length:3,value:\"number\",\"property-type\":\"data-constant\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]}},color:{type:\"color\",\"property-type\":\"data-constant\",default:\"#ffffff\",expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},intensity:{type:\"number\",\"property-type\":\"data-constant\",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:[\"zoom\"]},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\",default:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-outline-color\":{type:\"color\",transition:!0,requires:[{\"!\":\"fill-pattern\"},{\"fill-antialias\":!0}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"}},\"paint_fill-extrusion\":{\"fill-extrusion-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-extrusion-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-extrusion-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"fill-extrusion-height\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-base\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,requires:[\"fill-extrusion-height\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-vertical-gradient\":{type:\"boolean\",default:!0,transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_line:{\"line-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"line-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-width\":{type:\"number\",default:1,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-gap-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-offset\":{type:\"number\",default:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-dasharray\":{type:\"array\",value:\"number\",minimum:0,transition:!0,units:\"line widths\",requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"line-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"line-gradient\":{type:\"color\",transition:!1,requires:[{\"!\":\"line-dasharray\"},{\"!\":\"line-pattern\"},{source:\"geojson\",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:[\"line-progress\"]},\"property-type\":\"color-ramp\"}},paint_circle:{\"circle-radius\":{type:\"number\",default:5,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-blur\":{type:\"number\",default:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"circle-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-scale\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-stroke-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"}},paint_heatmap:{\"heatmap-radius\":{type:\"number\",default:30,minimum:1,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-weight\":{type:\"number\",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-intensity\":{type:\"number\",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"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\"],transition:!1,expression:{interpolated:!0,parameters:[\"heatmap-density\"]},\"property-type\":\"color-ramp\"},\"heatmap-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_symbol:{\"icon-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"icon-image\",\"icon-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-color\":{type:\"color\",default:\"#000000\",transition:!0,overridable:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"text-field\",\"text-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_raster:{\"raster-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-hue-rotate\":{type:\"number\",default:0,period:360,transition:!0,units:\"degrees\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-min\":{type:\"number\",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-max\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-saturation\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-contrast\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-resampling\":{type:\"enum\",values:{linear:{},nearest:{}},default:\"linear\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-fade-duration\":{type:\"number\",default:300,minimum:0,transition:!1,units:\"milliseconds\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_hillshade:{\"hillshade-illumination-direction\":{type:\"number\",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-illumination-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-exaggeration\":{type:\"number\",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-shadow-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-highlight-color\":{type:\"color\",default:\"#FFFFFF\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-accent-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_background:{\"background-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"background-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"background-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"background-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},transition:{duration:{type:\"number\",default:300,minimum:0,units:\"milliseconds\"},delay:{type:\"number\",default:0,minimum:0,units:\"milliseconds\"}},\"property-type\":{\"data-driven\":{type:\"property-type\"},\"cross-faded\":{type:\"property-type\"},\"cross-faded-data-driven\":{type:\"property-type\"},\"color-ramp\":{type:\"property-type\"},\"data-constant\":{type:\"property-type\"},constant:{type:\"property-type\"}},promoteId:{\"*\":{type:\"string\"}}},Ct=function(t,e,r,n){this.message=(t?t+\": \":\"\")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function Pt(t){var e=t.key,r=t.value;return r?[new Ct(e,r,\"constants have been deprecated as of v8\")]:[]}function It(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n\":\"value\"===t.itemType.kind?\"array\":\"array<\"+e+\">\"}return t.kind}var Zt=[Ft,Bt,Nt,jt,Ut,Gt,Vt,Wt(Ht),Yt];function Jt(t,e){if(\"error\"===e.kind)return null;if(\"array\"===t.kind){if(\"array\"===e.kind&&(0===e.N&&\"value\"===e.itemType.kind||!Jt(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=Zt;r255?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]),m=g<=.5?g*(d+1):g+d-g*d,v=2*g-m;return[n(255*s(v,m,p+1/3)),n(255*s(v,m,p)),n(255*s(v,m,p-1/3)),h];default:return null}}return null}}catch(t){}})).parseCSSColor,te=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};te.parse=function(t){if(t){if(t instanceof te)return t;if(\"string\"==typeof t){var e=$t(t);if(e)return new te(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},te.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+\")\"},te.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]},te.black=new te(0,0,0,1),te.white=new te(1,1,1,1),te.transparent=new te(0,0,0,0),te.red=new te(1,0,0,1);var ee=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\"})};ee.prototype.compare=function(t,e){return this.collator.compare(t,e)},ee.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var re=function(t,e,r,n,i){this.text=t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i},ne=function(t){this.sections=t};ne.fromString=function(t){return new ne([new re(t,null,null,null,null)])},ne.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},ne.factory=function(t){return t instanceof ne?t:ne.fromString(t)},ne.prototype.toString=function(){return 0===this.sections.length?\"\":this.sections.map((function(t){return t.text})).join(\"\")},ne.prototype.serialize=function(){for(var t=[\"format\"],e=0,r=this.sections;e=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 oe(t){if(null===t)return!0;if(\"string\"==typeof t)return!0;if(\"boolean\"==typeof t)return!0;if(\"number\"==typeof t)return!0;if(t instanceof te)return!0;if(t instanceof ee)return!0;if(t instanceof ne)return!0;if(t instanceof ie)return!0;if(Array.isArray(t)){for(var e=0,r=t;e2){var s=t[1];if(\"string\"!=typeof s||!(s in fe)||\"object\"===s)return e.error('The item type argument of \"array\" must be one of string, number, boolean',1);a=fe[s],n++}else a=Ht;if(t.length>3){if(null!==t[2]&&(\"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);o=t[2],n++}r=Wt(a,o)}else r=fe[i];for(var l=[];n1)&&e.push(n)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var pe=function(t){this.type=Gt,this.sections=t};pe.parse=function(t,e){if(t.length<2)return e.error(\"Expected at least one argument.\");var r=t[1];if(!Array.isArray(r)&&\"object\"==typeof r)return e.error(\"First argument must be an image or text section.\");for(var n=[],i=!1,a=1;a<=t.length-1;++a){var o=t[a];if(i&&\"object\"==typeof o&&!Array.isArray(o)){i=!1;var s=null;if(o[\"font-scale\"]&&!(s=e.parse(o[\"font-scale\"],1,Bt)))return null;var l=null;if(o[\"text-font\"]&&!(l=e.parse(o[\"text-font\"],1,Wt(Nt))))return null;var c=null;if(o[\"text-color\"]&&!(c=e.parse(o[\"text-color\"],1,Ut)))return null;var u=n[n.length-1];u.scale=s,u.font=l,u.textColor=c}else{var f=e.parse(t[a],1,Ht);if(!f)return null;var h=f.type.kind;if(\"string\"!==h&&\"value\"!==h&&\"null\"!==h&&\"resolvedImage\"!==h)return e.error(\"Formatted text type must be 'string', 'value', 'image' or 'null'.\");i=!0,n.push({content:f,scale:null,font:null,textColor:null})}}return new pe(n)},pe.prototype.evaluate=function(t){return new ne(this.sections.map((function(e){var r=e.content.evaluate(t);return se(r)===Yt?new re(\"\",r,null,null,null):new re(le(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(\",\"):null,e.textColor?e.textColor.evaluate(t):null)})))},pe.prototype.eachChild=function(t){for(var e=0,r=this.sections;e-1),r},de.prototype.eachChild=function(t){t(this.input)},de.prototype.outputDefined=function(){return!1},de.prototype.serialize=function(){return[\"image\",this.input.serialize()]};var ge={\"to-boolean\":jt,\"to-color\":Ut,\"to-number\":Bt,\"to-string\":Nt},me=function(t,e){this.type=t,this.args=e};me.parse=function(t,e){if(t.length<2)return e.error(\"Expected at least one argument.\");var r=t[0];if((\"to-boolean\"===r||\"to-string\"===r)&&2!==t.length)return e.error(\"Expected one argument.\");for(var n=ge[r],i=[],a=1;a4?\"Invalid rbga value \"+JSON.stringify(e)+\": expected an array containing either three or four numeric values.\":ae(e[0],e[1],e[2],e[3])))return new te(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ue(r||\"Could not parse color from value '\"+(\"string\"==typeof e?e:String(JSON.stringify(e)))+\"'\")}if(\"number\"===this.type.kind){for(var o=null,s=0,l=this.args;s=e[2])&&(!(t[1]<=e[1])&&!(t[3]>=e[3])))}function Te(t,e){var r,n=(180+t[0])/360,i=(r=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360),a=Math.pow(2,e.z);return[Math.round(n*a*8192),Math.round(i*a*8192)]}function ke(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function Ae(t,e){for(var r,n,i,a,o,s,l,c=!1,u=0,f=e.length;u0&&f<0||u<0&&f>0}function Ee(t,e,r){for(var n=0,i=r;nr[2]){var i=.5*n,a=t[0]-r[0]>i?-n:r[0]-t[0]>i?n:0;0===a&&(a=t[0]-r[2]>i?-n:r[2]-t[0]>i?n:0),t[0]+=a}_e(e,t)}function ze(t,e,r,n){for(var i=8192*Math.pow(2,n.z),a=[8192*n.x,8192*n.y],o=[],s=0,l=t;s=0)return!1;var r=!0;return t.eachChild((function(t){r&&!Ne(t,e)&&(r=!1)})),r}Re.parse=function(t,e){if(2!==t.length)return e.error(\"'within' expression requires exactly one argument, but found \"+(t.length-1)+\" instead.\");if(oe(t[1])){var r=t[1];if(\"FeatureCollection\"===r.type)for(var n=0;ne))throw new ue(\"Input is not a number.\");o=s-1}return 0}Ue.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)},Ue.prototype._parse=function(t,e){function r(t,e,r){return\"assert\"===r?new he(e,[t]):\"coerce\"===r?new me(e,[t]):t}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 n=t[0];if(\"string\"!=typeof n)return this.error(\"Expression name must be a string, but found \"+typeof n+' instead. If you wanted a literal array, use [\"literal\", [...]].',0),null;var i=this.registry[n];if(i){var a=i.parse(t,this);if(!a)return null;if(this.expectedType){var o=this.expectedType,s=a.type;if(\"string\"!==o.kind&&\"number\"!==o.kind&&\"boolean\"!==o.kind&&\"object\"!==o.kind&&\"array\"!==o.kind||\"value\"!==s.kind)if(\"color\"!==o.kind&&\"formatted\"!==o.kind&&\"resolvedImage\"!==o.kind||\"value\"!==s.kind&&\"string\"!==s.kind){if(this.checkSubtype(o,s))return null}else a=r(a,o,e.typeAnnotation||\"coerce\");else a=r(a,o,e.typeAnnotation||\"assert\")}if(!(a instanceof ce)&&\"resolvedImage\"!==a.type.kind&&function t(e){if(e instanceof je)return t(e.boundExpression);if(e instanceof xe&&\"error\"===e.name)return!1;if(e instanceof be)return!1;if(e instanceof Re)return!1;var r=e instanceof me||e instanceof he,n=!0;if(e.eachChild((function(e){n=r?n&&t(e):n&&e instanceof ce})),!n)return!1;return Fe(e)&&Ne(e,[\"zoom\",\"heatmap-density\",\"line-progress\",\"accumulated\",\"is-supported-script\"])}(a)){var l=new ye;try{a=new ce(a.type,a.evaluate(l))}catch(t){return this.error(t.message),null}}return a}return this.error('Unknown expression \"'+n+'\". 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.\")},Ue.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 Ue(this.registry,n,e||null,i,this.errors)},Ue.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 Dt(n,t))},Ue.prototype.checkSubtype=function(t,e){var r=Jt(t,e);return r&&this.error(r),r};var He=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n=o)return e.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.',l);var u=e.parse(s,c,i);if(!u)return null;i=i||u.type,n.push([o,u])}return new He(i,r,n)},He.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[Ve(e,n)].evaluate(t)},He.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Ge=Object.freeze({__proto__:null,number:qe,color:function(t,e,r){return new te(qe(t.r,e.r,r),qe(t.g,e.g,r),qe(t.b,e.b,r),qe(t.a,e.a,r))},array:function(t,e,r){return t.map((function(t,n){return qe(t,e[n],r)}))}}),Ye=6/29,We=3*Ye*Ye,Xe=Math.PI/180,Ze=180/Math.PI;function Je(t){return t>.008856451679035631?Math.pow(t,1/3):t/We+4/29}function Ke(t){return t>Ye?t*t*t:We*(t-4/29)}function Qe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function $e(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function tr(t){var e=$e(t.r),r=$e(t.g),n=$e(t.b),i=Je((.4124564*e+.3575761*r+.1804375*n)/.95047),a=Je((.2126729*e+.7151522*r+.072175*n)/1);return{l:116*a-16,a:500*(i-a),b:200*(a-Je((.0193339*e+.119192*r+.9503041*n)/1.08883)),alpha:t.a}}function er(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=1*Ke(e),r=.95047*Ke(r),n=1.08883*Ke(n),new te(Qe(3.2404542*r-1.5371385*e-.4985314*n),Qe(-.969266*r+1.8760108*e+.041556*n),Qe(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function rr(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var nr={forward:tr,reverse:er,interpolate:function(t,e,r){return{l:qe(t.l,e.l,r),a:qe(t.a,e.a,r),b:qe(t.b,e.b,r),alpha:qe(t.alpha,e.alpha,r)}}},ir={forward:function(t){var e=tr(t),r=e.l,n=e.a,i=e.b,a=Math.atan2(i,n)*Ze;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*Xe,r=t.c;return er({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:rr(t.h,e.h,r),c:qe(t.c,e.c,r),l:qe(t.l,e.l,r),alpha:qe(t.alpha,e.alpha,r)}}},ar=Object.freeze({__proto__:null,lab:nr,hcl:ir}),or=function(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var a=0,o=i;a1})))return e.error(\"Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.\",1);n={name:\"cubic-bezier\",controlPoints:s}}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(!(i=e.parse(i,2,Bt)))return null;var l=[],c=null;\"interpolate-hcl\"===r||\"interpolate-lab\"===r?c=Ut:e.expectedType&&\"value\"!==e.expectedType.kind&&(c=e.expectedType);for(var u=0;u=f)return e.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.',p);var g=e.parse(h,d,c);if(!g)return null;c=c||g.type,l.push([f,g])}return\"number\"===c.kind||\"color\"===c.kind||\"array\"===c.kind&&\"number\"===c.itemType.kind&&\"number\"==typeof c.N?new or(c,r,n,i,l):e.error(\"Type \"+Xt(c)+\" is not interpolatable.\")},or.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=Ve(e,n),o=e[a],s=e[a+1],l=or.interpolationFactor(this.interpolation,n,o,s),c=r[a].evaluate(t),u=r[a+1].evaluate(t);return\"interpolate\"===this.operator?Ge[this.type.kind.toLowerCase()](c,u,l):\"interpolate-hcl\"===this.operator?ir.reverse(ir.interpolate(ir.forward(c),ir.forward(u),l)):nr.reverse(nr.interpolate(nr.forward(c),nr.forward(u),l))},or.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e=r.length)throw new ue(\"Array index out of bounds: \"+e+\" > \"+(r.length-1)+\".\");if(e!==Math.floor(e))throw new ue(\"Array index must be an integer, but found \"+e+\" instead.\");return r[e]},ur.prototype.eachChild=function(t){t(this.index),t(this.input)},ur.prototype.outputDefined=function(){return!1},ur.prototype.serialize=function(){return[\"at\",this.index.serialize(),this.input.serialize()]};var fr=function(t,e){this.type=jt,this.needle=t,this.haystack=e};fr.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,Ht),n=e.parse(t[2],2,Ht);return r&&n?Kt(r.type,[jt,Nt,Bt,Ft,Ht])?new fr(r,n):e.error(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(r.type)+\" instead\"):null},fr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!r)return!1;if(!Qt(e,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ue(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(se(e))+\" instead.\");if(!Qt(r,[\"string\",\"array\"]))throw new ue(\"Expected second argument to be of type array or string, but found \"+Xt(se(r))+\" instead.\");return r.indexOf(e)>=0},fr.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},fr.prototype.outputDefined=function(){return!0},fr.prototype.serialize=function(){return[\"in\",this.needle.serialize(),this.haystack.serialize()]};var hr=function(t,e,r){this.type=Bt,this.needle=t,this.haystack=e,this.fromIndex=r};hr.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error(\"Expected 3 or 4 arguments, but found \"+(t.length-1)+\" instead.\");var r=e.parse(t[1],1,Ht),n=e.parse(t[2],2,Ht);if(!r||!n)return null;if(!Kt(r.type,[jt,Nt,Bt,Ft,Ht]))return e.error(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(r.type)+\" instead\");if(4===t.length){var i=e.parse(t[3],3,Bt);return i?new hr(r,n,i):null}return new hr(r,n)},hr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!Qt(e,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ue(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(se(e))+\" instead.\");if(!Qt(r,[\"string\",\"array\"]))throw new ue(\"Expected second argument to be of type array or string, but found \"+Xt(se(r))+\" instead.\");if(this.fromIndex){var n=this.fromIndex.evaluate(t);return r.indexOf(e,n)}return r.indexOf(e)},hr.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},hr.prototype.outputDefined=function(){return!1},hr.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return[\"index-of\",this.needle.serialize(),this.haystack.serialize(),t]}return[\"index-of\",this.needle.serialize(),this.haystack.serialize()]};var pr=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};pr.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;oNumber.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,se(h)))return null}else r=se(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,Ht);if(!d)return null;var g=e.parse(t[t.length-1],t.length-1,n);return g?\"value\"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new pr(r,n,d,i,a,g):null},pr.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(se(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},pr.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},pr.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},pr.prototype.serialize=function(){for(var t=this,e=[\"match\",this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();i=5)return e.error(\"Expected 3 or 4 arguments, but found \"+(t.length-1)+\" instead.\");var r=e.parse(t[1],1,Ht),n=e.parse(t[2],2,Bt);if(!r||!n)return null;if(!Kt(r.type,[Wt(Ht),Nt,Ht]))return e.error(\"Expected first argument to be of type array or string, but found \"+Xt(r.type)+\" instead\");if(4===t.length){var i=e.parse(t[3],3,Bt);return i?new gr(r.type,r,n,i):null}return new gr(r.type,r,n)},gr.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!Qt(e,[\"string\",\"array\"]))throw new ue(\"Expected first argument to be of type array or string, but found \"+Xt(se(e))+\" instead.\");if(this.endIndex){var n=this.endIndex.evaluate(t);return e.slice(r,n)}return e.slice(r)},gr.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},gr.prototype.outputDefined=function(){return!1},gr.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return[\"slice\",this.input.serialize(),this.beginIndex.serialize(),t]}return[\"slice\",this.input.serialize(),this.beginIndex.serialize()]};var xr=yr(\"==\",(function(t,e,r){return e===r}),vr),br=yr(\"!=\",(function(t,e,r){return e!==r}),(function(t,e,r,n){return!vr(0,e,r,n)})),_r=yr(\"<\",(function(t,e,r){return e\",(function(t,e,r){return e>r}),(function(t,e,r,n){return n.compare(e,r)>0})),Tr=yr(\"<=\",(function(t,e,r){return e<=r}),(function(t,e,r,n){return n.compare(e,r)<=0})),kr=yr(\">=\",(function(t,e,r){return e>=r}),(function(t,e,r,n){return n.compare(e,r)>=0})),Ar=function(t,e,r,n,i){this.type=Nt,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};Ar.parse=function(t,e){if(3!==t.length)return e.error(\"Expected two arguments.\");var r=e.parse(t[1],1,Bt);if(!r)return null;var n=t[2];if(\"object\"!=typeof n||Array.isArray(n))return e.error(\"NumberFormat options argument must be an object.\");var i=null;if(n.locale&&!(i=e.parse(n.locale,1,Nt)))return null;var a=null;if(n.currency&&!(a=e.parse(n.currency,1,Nt)))return null;var o=null;if(n[\"min-fraction-digits\"]&&!(o=e.parse(n[\"min-fraction-digits\"],1,Bt)))return null;var s=null;return n[\"max-fraction-digits\"]&&!(s=e.parse(n[\"max-fraction-digits\"],1,Bt))?null:new Ar(r,i,a,o,s)},Ar.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?\"currency\":\"decimal\",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},Ar.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},Ar.prototype.outputDefined=function(){return!1},Ar.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t[\"min-fraction-digits\"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t[\"max-fraction-digits\"]=this.maxFractionDigits.serialize()),[\"number-format\",this.number.serialize(),t]};var Mr=function(t){this.type=Bt,this.input=t};Mr.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 \"+Xt(r.type)+\" instead.\"):new Mr(r):null},Mr.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 ue(\"Expected value to be of type string or array, but found \"+Xt(se(e))+\" instead.\")},Mr.prototype.eachChild=function(t){t(this.input)},Mr.prototype.outputDefined=function(){return!1},Mr.prototype.serialize=function(){var t=[\"length\"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Sr={\"==\":xr,\"!=\":br,\">\":wr,\"<\":_r,\">=\":kr,\"<=\":Tr,array:he,at:ur,boolean:he,case:dr,coalesce:lr,collator:be,format:pe,image:de,in:fr,\"index-of\":hr,interpolate:or,\"interpolate-hcl\":or,\"interpolate-lab\":or,length:Mr,let:cr,literal:ce,match:pr,number:he,\"number-format\":Ar,object:he,slice:gr,step:He,string:he,\"to-boolean\":me,\"to-color\":me,\"to-number\":me,\"to-string\":me,var:je,within:Re};function Er(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=ae(r,n,i,o);if(s)throw new ue(s);return new te(r/255*o,n/255*o,i/255*o,o)}function Lr(t,e){return t in e}function Cr(t,e){var r=e[t];return void 0===r?null:r}function Pr(t){return{type:t}}function Ir(t){return{result:\"success\",value:t}}function Or(t){return{result:\"error\",value:t}}function zr(t){return\"data-driven\"===t[\"property-type\"]||\"cross-faded-data-driven\"===t[\"property-type\"]}function Dr(t){return!!t.expression&&t.expression.parameters.indexOf(\"zoom\")>-1}function Rr(t){return!!t.expression&&t.expression.interpolated}function Fr(t){return t instanceof Number?\"number\":t instanceof String?\"string\":t instanceof Boolean?\"boolean\":Array.isArray(t)?\"array\":null===t?\"null\":typeof t}function Br(t){return\"object\"==typeof t&&null!==t&&!Array.isArray(t)}function Nr(t){return t}function jr(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function Ur(t,e,r,n,i){return jr(typeof r===i?n[r]:void 0,t.default,e.default)}function Vr(t,e,r){if(\"number\"!==Fr(r))return jr(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=Ve(t.stops.map((function(t){return t[0]})),r);return t.stops[i][1]}function Hr(t,e,r){var n=void 0!==t.base?t.base:1;if(\"number\"!==Fr(r))return jr(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=Ve(t.stops.map((function(t){return t[0]})),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=Ge[e.type]||Nr;if(t.colorSpace&&\"rgb\"!==t.colorSpace){var u=ar[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 qr(t,e,r){return\"color\"===e.type?r=te.parse(r):\"formatted\"===e.type?r=ne.fromString(r.toString()):\"resolvedImage\"===e.type?r=ie.fromString(r.toString()):Fr(r)===e.type||\"enum\"===e.type&&e.values[r]||(r=void 0),jr(r,t.default,e.default)}xe.register(Sr,{error:[{kind:\"error\"},[Nt],function(t,e){var r=e[0];throw new ue(r.evaluate(t))}],typeof:[Nt,[Ht],function(t,e){return Xt(se(e[0].evaluate(t)))}],\"to-rgba\":[Wt(Bt,4),[Ut],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Ut,[Bt,Bt,Bt],Er],rgba:[Ut,[Bt,Bt,Bt,Bt],Er],has:{type:jt,overloads:[[[Nt],function(t,e){return Lr(e[0].evaluate(t),t.properties())}],[[Nt,Vt],function(t,e){var r=e[0],n=e[1];return Lr(r.evaluate(t),n.evaluate(t))}]]},get:{type:Ht,overloads:[[[Nt],function(t,e){return Cr(e[0].evaluate(t),t.properties())}],[[Nt,Vt],function(t,e){var r=e[0],n=e[1];return Cr(r.evaluate(t),n.evaluate(t))}]]},\"feature-state\":[Ht,[Nt],function(t,e){return Cr(e[0].evaluate(t),t.featureState||{})}],properties:[Vt,[],function(t){return t.properties()}],\"geometry-type\":[Nt,[],function(t){return t.geometryType()}],id:[Ht,[],function(t){return t.id()}],zoom:[Bt,[],function(t){return t.globals.zoom}],\"heatmap-density\":[Bt,[],function(t){return t.globals.heatmapDensity||0}],\"line-progress\":[Bt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Ht,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],\"+\":[Bt,Pr(Bt),function(t,e){for(var r=0,n=0,i=e;n\":[jt,[Nt,Ht],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->\":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],\"filter-<=\":[jt,[Nt,Ht],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-<=\":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],\"filter->=\":[jt,[Nt,Ht],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->=\":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],\"filter-has\":[jt,[Ht],function(t,e){return e[0].value in t.properties()}],\"filter-has-id\":[jt,[],function(t){return null!==t.id()&&void 0!==t.id()}],\"filter-type-in\":[jt,[Wt(Nt)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],\"filter-id-in\":[jt,[Wt(Ht)],function(t,e){return e[0].value.indexOf(t.id())>=0}],\"filter-in-small\":[jt,[Nt,Wt(Ht)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],\"filter-in-large\":[jt,[Nt,Wt(Ht)],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)}],all:{type:jt,overloads:[[[jt,jt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[Pr(jt),function(t,e){for(var r=0,n=e;r0&&\"string\"==typeof t[0]&&t[0]in Sr}function Wr(t,e){var r=new Ue(Sr,[],e?function(t){var e={color:Ut,string:Nt,number:Bt,enum:Nt,boolean:jt,formatted:Gt,resolvedImage:Yt};if(\"array\"===t.type)return Wt(e[t.value]||Ht,t.length);return e[t.type]}(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&\"string\"===e.type?{typeAnnotation:\"coerce\"}:void 0);return n?Ir(new Gr(n,e)):Or(r.errors)}Gr.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)},Gr.prototype.evaluate=function(t,e,r,n,i,a){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||\"number\"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new ue(\"Expected value to be one of \"+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(\", \")+\", but found \"+JSON.stringify(o)+\" instead.\");return o}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,\"undefined\"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Xr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent=\"constant\"!==t&&!Be(e.expression)};Xr.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,a)},Xr.prototype.evaluate=function(t,e,r,n,i,a){return this._styleExpression.evaluate(t,e,r,n,i,a)};var Zr=function(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent=\"camera\"!==t&&!Be(e.expression),this.interpolationType=n};function Jr(t,e){if(\"error\"===(t=Wr(t,e)).result)return t;var r=t.value.expression,n=Fe(r);if(!n&&!zr(e))return Or([new Dt(\"\",\"data expressions not supported\")]);var i=Ne(r,[\"zoom\"]);if(!i&&!Dr(e))return Or([new Dt(\"\",\"zoom expressions not supported\")]);var a=function t(e){var r=null;if(e instanceof cr)r=t(e.result);else if(e instanceof lr)for(var n=0,i=e.args;nn.maximum?[new Ct(e,r,r+\" is greater than the maximum value \"+n.maximum)]:[]}function en(t){var e,r,n,i=t.valueSpec,a=Ot(t.value.type),o={},s=\"categorical\"!==a&&void 0===t.value.property,l=!s,c=\"array\"===Fr(t.value.stops)&&\"array\"===Fr(t.value.stops[0])&&\"object\"===Fr(t.value.stops[0][0]),u=Qr({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 Ct(t.key,t.value,'identity function may not have a \"stops\" property')];var e=[],r=t.value;e=e.concat($r({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:f})),\"array\"===Fr(r)&&0===r.length&&e.push(new Ct(t.key,r,\"array must have at least one stop\"));return e},default:function(t){return kn({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return\"identity\"===a&&s&&u.push(new Ct(t.key,t.value,'missing required property \"property\"')),\"identity\"===a||t.value.stops||u.push(new Ct(t.key,t.value,'missing required property \"stops\"')),\"exponential\"===a&&t.valueSpec.expression&&!Rr(t.valueSpec)&&u.push(new Ct(t.key,t.value,\"exponential functions not supported\")),t.styleSpec.$version>=8&&(l&&!zr(t.valueSpec)?u.push(new Ct(t.key,t.value,\"property functions not supported\")):s&&!Dr(t.valueSpec)&&u.push(new Ct(t.key,t.value,\"zoom functions not supported\"))),\"categorical\"!==a&&!c||void 0!==t.value.property||u.push(new Ct(t.key,t.value,'\"property\" property is required')),u;function f(t){var e=[],a=t.value,s=t.key;if(\"array\"!==Fr(a))return[new Ct(s,a,\"array expected, \"+Fr(a)+\" found\")];if(2!==a.length)return[new Ct(s,a,\"array length 2 expected, length \"+a.length+\" found\")];if(c){if(\"object\"!==Fr(a[0]))return[new Ct(s,a,\"object expected, \"+Fr(a[0])+\" found\")];if(void 0===a[0].zoom)return[new Ct(s,a,\"object stop key must have zoom\")];if(void 0===a[0].value)return[new Ct(s,a,\"object stop key must have value\")];if(n&&n>Ot(a[0].zoom))return[new Ct(s,a[0].zoom,\"stop zoom values must appear in ascending order\")];Ot(a[0].zoom)!==n&&(n=Ot(a[0].zoom),r=void 0,o={}),e=e.concat(Qr({key:s+\"[0]\",value:a[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:tn,value:h}}))}else e=e.concat(h({key:s+\"[0]\",value:a[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},a));return Yr(zt(a[1]))?e.concat([new Ct(s+\"[1]\",a[1],\"expressions are not allowed in function stops.\")]):e.concat(kn({key:s+\"[1]\",value:a[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,n){var s=Fr(t.value),l=Ot(t.value),c=null!==t.value?t.value:n;if(e){if(s!==e)return[new Ct(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 Ct(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 zr(i)&&void 0===a&&(u+='\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.'),[new Ct(t.key,c,u)]}return\"categorical\"!==a||\"number\"!==s||isFinite(l)&&Math.floor(l)===l?\"categorical\"!==a&&\"number\"===s&&void 0!==r&&l=2&&\"$id\"!==t[1]&&\"$type\"!==t[1];case\"in\":return t.length>=3&&(\"string\"!=typeof t[1]||Array.isArray(t[2]));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);ee?1:0}function cn(t){if(!t)return!0;var e,r=t[0];return t.length<=1?\"any\"!==r:\"==\"===r?un(t[1],t[2],\"==\"):\"!=\"===r?pn(un(t[1],t[2],\"==\")):\"<\"===r||\">\"===r||\"<=\"===r||\">=\"===r?un(t[1],t[2],r):\"any\"===r?(e=t.slice(1),[\"any\"].concat(e.map(cn))):\"all\"===r?[\"all\"].concat(t.slice(1).map(cn)):\"none\"===r?[\"all\"].concat(t.slice(1).map(cn).map(pn)):\"in\"===r?fn(t[1],t.slice(2)):\"!in\"===r?pn(fn(t[1],t.slice(2))):\"has\"===r?hn(t[1]):\"!has\"===r?pn(hn(t[1])):\"within\"!==r||t}function un(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 fn(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(ln)]]:[\"filter-in-small\",t,[\"literal\",e]]}}function hn(t){switch(t){case\"$type\":return!0;case\"$id\":return[\"filter-has-id\"];default:return[\"filter-has\",t]}}function pn(t){return[\"!\",t]}function dn(t){return an(zt(t.value))?rn(It({},t,{expressionContext:\"filter\",valueSpec:{value:\"boolean\"}})):function t(e){var r=e.value,n=e.key;if(\"array\"!==Fr(r))return[new Ct(n,r,\"array expected, \"+Fr(r)+\" found\")];var i,a=e.styleSpec,o=[];if(r.length<1)return[new Ct(n,r,\"filter array must have at least 1 element\")];switch(o=o.concat(nn({key:n+\"[0]\",value:r[0],valueSpec:a.filter_operator,style:e.style,styleSpec:e.styleSpec})),Ot(r[0])){case\"<\":case\"<=\":case\">\":case\">=\":r.length>=2&&\"$type\"===Ot(r[1])&&o.push(new Ct(n,r,'\"$type\" cannot be use with operator \"'+r[0]+'\"'));case\"==\":case\"!=\":3!==r.length&&o.push(new Ct(n,r,'filter array for operator \"'+r[0]+'\" must have 3 elements'));case\"in\":case\"!in\":r.length>=2&&\"string\"!==(i=Fr(r[1]))&&o.push(new Ct(n+\"[1]\",r[1],\"string expected, \"+i+\" found\"));for(var s=2;s=u[p+0]&&n>=u[p+1])?(o[h]=!0,a.push(c[h])):o[h]=!1}}},Dn.prototype._forEachCell=function(t,e,r,n,i,a,o,s){for(var l=this._convertToCellCoord(t),c=this._convertToCellCoord(e),u=this._convertToCellCoord(r),f=this._convertToCellCoord(n),h=l;h<=u;h++)for(var p=c;p<=f;p++){var d=this.d*p+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(p),this._convertFromCellCoord(h+1),this._convertFromCellCoord(p+1)))&&i.call(this,t,e,r,n,d,a,o,s))return}},Dn.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},Dn.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Dn.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+this.cells.length+1+1,r=0,n=0;n=0)){var f=t[u];c[u]=Bn[l].shallow.indexOf(u)>=0?f:Hn(f,e)}t instanceof Error&&(c.message=t.message)}if(c.$name)throw new Error(\"$name property is reserved for worker serialization logic.\");return\"Object\"!==l&&(c.$name=l),c}throw new Error(\"can't serialize object of type \"+typeof t)}function qn(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||Un(t)||Vn(t)||ArrayBuffer.isView(t)||t instanceof Rn)return t;if(Array.isArray(t))return t.map(qn);if(\"object\"==typeof t){var e=t.$name||\"Object\",r=Bn[e].klass;if(!r)throw new Error(\"can't deserialize unregistered class \"+e);if(r.deserialize)return r.deserialize(t);for(var n=Object.create(r.prototype),i=0,a=Object.keys(t);i=0?s:qn(s)}}return n}throw new Error(\"can't deserialize object of type \"+typeof t)}var Gn=function(){this.first=!0};Gn.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=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 Wn(t){for(var e=0,r=t;e=65097&&t<=65103)||(!!Yn[\"CJK Compatibility Ideographs\"](t)||(!!Yn[\"CJK Compatibility\"](t)||(!!Yn[\"CJK Radicals Supplement\"](t)||(!!Yn[\"CJK Strokes\"](t)||(!(!Yn[\"CJK Symbols and Punctuation\"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||(!!Yn[\"CJK Unified Ideographs Extension A\"](t)||(!!Yn[\"CJK Unified Ideographs\"](t)||(!!Yn[\"Enclosed CJK Letters and Months\"](t)||(!!Yn[\"Hangul Compatibility Jamo\"](t)||(!!Yn[\"Hangul Jamo Extended-A\"](t)||(!!Yn[\"Hangul Jamo Extended-B\"](t)||(!!Yn[\"Hangul Jamo\"](t)||(!!Yn[\"Hangul Syllables\"](t)||(!!Yn.Hiragana(t)||(!!Yn[\"Ideographic Description Characters\"](t)||(!!Yn.Kanbun(t)||(!!Yn[\"Kangxi Radicals\"](t)||(!!Yn[\"Katakana Phonetic Extensions\"](t)||(!(!Yn.Katakana(t)||12540===t)||(!(!Yn[\"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)||(!(!Yn[\"Small Form Variants\"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||(!!Yn[\"Unified Canadian Aboriginal Syllabics\"](t)||(!!Yn[\"Unified Canadian Aboriginal Syllabics Extended\"](t)||(!!Yn[\"Vertical Forms\"](t)||(!!Yn[\"Yijing Hexagram Symbols\"](t)||(!!Yn[\"Yi Syllables\"](t)||!!Yn[\"Yi Radicals\"](t))))))))))))))))))))))))))))))}function Jn(t){return!(Zn(t)||function(t){return!(!Yn[\"Latin-1 Supplement\"](t)||167!==t&&169!==t&&174!==t&&177!==t&&188!==t&&189!==t&&190!==t&&215!==t&&247!==t)||(!(!Yn[\"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)||(!!Yn[\"Letterlike Symbols\"](t)||(!!Yn[\"Number Forms\"](t)||(!(!Yn[\"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))||(!(!Yn[\"Control Pictures\"](t)||9251===t)||(!!Yn[\"Optical Character Recognition\"](t)||(!!Yn[\"Enclosed Alphanumerics\"](t)||(!!Yn[\"Geometric Shapes\"](t)||(!(!Yn[\"Miscellaneous Symbols\"](t)||t>=9754&&t<=9759)||(!(!Yn[\"Miscellaneous Symbols and Arrows\"](t)||!(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243))||(!!Yn[\"CJK Symbols and Punctuation\"](t)||(!!Yn.Katakana(t)||(!!Yn[\"Private Use Area\"](t)||(!!Yn[\"CJK Compatibility Forms\"](t)||(!!Yn[\"Small Form Variants\"](t)||(!!Yn[\"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 Kn(t){return t>=1424&&t<=2303||Yn[\"Arabic Presentation Forms-A\"](t)||Yn[\"Arabic Presentation Forms-B\"](t)}function Qn(t,e){return!(!e&&Kn(t))&&!(t>=2304&&t<=3583||t>=3840&&t<=4255||Yn.Khmer(t))}function $n(t){for(var e=0,r=t;e-1&&(ai=ni),ii&&ii(t)};function li(){ci.fire(new Mt(\"pluginStateChange\",{pluginStatus:ai,pluginURL:oi}))}var ci=new Et,ui=function(){return ai},fi=function(){if(ai!==ti||!oi)throw new Error(\"rtl-text-plugin cannot be downloaded unless a pluginURL is specified\");ai=ei,li(),oi&&xt({url:oi},(function(t){t?si(t):(ai=ri,li())}))},hi={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return ai===ri||null!=hi.applyArabicShaping},isLoading:function(){return ai===ei},setState:function(t){ai=t.pluginStatus,oi=t.pluginURL},isParsed:function(){return null!=hi.applyArabicShaping&&null!=hi.processBidirectionalText&&null!=hi.processStyledBidirectionalText},getPluginURL:function(){return oi}},pi=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 Gn,this.transition={})};pi.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,n=t;rthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}};var di=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(Br(t))return new Kr(t,e);if(Yr(t)){var r=Jr(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=te.parse(t)),{kind:\"constant\",evaluate:function(){return n}}}(void 0===e?t.specification.default:e,t.specification)};di.prototype.isDataDriven=function(){return\"source\"===this.expression.kind||\"composite\"===this.expression.kind},di.prototype.possiblyEvaluate=function(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)};var gi=function(t){this.property=t,this.value=new di(t,void 0)};gi.prototype.transitioned=function(t,e){return new vi(this.property,this.value,e,u({},t.transition,this.transition),t.now)},gi.prototype.untransitioned=function(){return new vi(this.property,this.value,null,{},0)};var mi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};mi.prototype.getValue=function(t){return x(this._values[t].value.value)},mi.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new gi(this._values[t].property)),this._values[t].value=new di(this._values[t].property,null===e?void 0:x(e))},mi.prototype.getTransition=function(t){return x(this._values[t].transition)},mi.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new gi(this._values[t].property)),this._values[t].transition=x(e)||void 0},mi.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);ethis.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(n=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}(o))}return i};var yi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};yi.prototype.possiblyEvaluate=function(t,e,r){for(var n=new _i(this._properties),i=0,a=Object.keys(this._values);in.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(Ti),Ai=function(t){this.specification=t};Ai.prototype.possiblyEvaluate=function(t,e,r,n){if(void 0!==t.value){if(\"constant\"===t.expression.kind){var i=t.expression.evaluate(e,null,{},r,n);return this._calculate(i,i,i,e)}return this._calculate(t.expression.evaluate(new pi(Math.floor(e.zoom-1),e)),t.expression.evaluate(new pi(Math.floor(e.zoom),e)),t.expression.evaluate(new pi(Math.floor(e.zoom+1),e)),e)}},Ai.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},Ai.prototype.interpolate=function(t){return t};var Mi=function(t){this.specification=t};Mi.prototype.possiblyEvaluate=function(t,e,r,n){return!!t.expression.evaluate(e,null,{},r,n)},Mi.prototype.interpolate=function(){return!1};var Si=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var r=t[e];r.specification.overridable&&this.overridableProperties.push(e);var n=this.defaultPropertyValues[e]=new di(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new gi(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};Nn(\"DataDrivenProperty\",Ti),Nn(\"DataConstantProperty\",wi),Nn(\"CrossFadedDataDrivenProperty\",ki),Nn(\"CrossFadedProperty\",Ai),Nn(\"ColorRampProperty\",Mi);var Ei=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},\"custom\"!==e.type&&(e=e,this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,\"background\"!==e.type&&(this.source=e.source,this.sourceLayer=e[\"source-layer\"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new xi(r.layout)),r.paint)){for(var n in this._transitionablePaint=new mi(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(),this.paint=new _i(r.paint)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return\"visibility\"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n=\"layers.\"+this.id+\".layout.\"+t;if(this._validate(In,n,t,e,r))return}\"visibility\"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e},e.prototype.getPaintProperty=function(t){return m(t,\"-transition\")?this._transitionablePaint.getTransition(t.slice(0,-\"-transition\".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n=\"layers.\"+this.id+\".paint.\"+t;if(this._validate(Pn,n,t,e,r))return!1}if(m(t,\"-transition\"))return this._transitionablePaint.setTransition(t.slice(0,-\"-transition\".length),e||void 0),!1;var i=this._transitionablePaint._values[t],a=\"cross-faded-data-driven\"===i.property.specification[\"property-type\"],o=i.value.isDataDriven(),s=i.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var l=this._transitionablePaint._values[t].value;return l.isDataDriven()||o||a||this._handleOverridablePaintPropertyUpdate(t,s,l)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype._handleOverridablePaintPropertyUpdate=function(t,e,r){return!1},e.prototype.isHidden=function(t){return!!(this.minzoom&&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,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)},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 this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),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 void 0===i&&(i={}),(!i||!1!==i.validate)&&On(this,t.call(Ln,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:Lt,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof bi&&zr(e.property.specification)&&((\"source\"===e.value.kind||\"composite\"===e.value.kind)&&e.value.isStateDependent))return!0}return!1},e}(Et),Li={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Ci=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},Pi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Ii(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map((function(t){var i,a=(i=t.type,Li[i].BYTES_PER_ELEMENT),o=r=Oi(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:Oi(r,Math.max(n,e)),alignment:e}}function Oi(t,e){return Math.ceil(t/e)*e}Pi.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Pi.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},Pi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Pi.prototype.clear=function(){this.length=0},Pi.prototype.resize=function(t){this.reserve(t),this.length=t},Pi.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)}},Pi.prototype._refreshViews=function(){throw new Error(\"_refreshViews() must be implemented by each concrete StructArray layout\")};var zi=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;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.int16[n+0]=e,this.int16[n+1]=r,t},e}(Pi);zi.prototype.bytesPerElement=4,Nn(\"StructArrayLayout2i4\",zi);var Di=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;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,t},e}(Pi);Di.prototype.bytesPerElement=8,Nn(\"StructArrayLayout4i8\",Di);var Ri=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;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(Pi);Ri.prototype.bytesPerElement=12,Nn(\"StructArrayLayout2i4i12\",Ri);var Fi=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;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=4*t,l=8*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=a,this.uint8[l+7]=o,t},e}(Pi);Fi.prototype.bytesPerElement=8,Nn(\"StructArrayLayout2i4ub8\",Fi);var Bi=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,n,i,a,o,s,l,c){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,n,i,a,o,s,l,c)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u){var f=9*t,h=18*t;return this.uint16[f+0]=e,this.uint16[f+1]=r,this.uint16[f+2]=n,this.uint16[f+3]=i,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.uint8[h+16]=c,this.uint8[h+17]=u,t},e}(Pi);Bi.prototype.bytesPerElement=18,Nn(\"StructArrayLayout8ui2ub18\",Bi);var Ni=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,l,c,u,f){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,n,i,a,o,s,l,c,u,f)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h){var p=12*t;return this.int16[p+0]=e,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=i,this.uint16[p+4]=a,this.uint16[p+5]=o,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=c,this.int16[p+9]=u,this.int16[p+10]=f,this.int16[p+11]=h,t},e}(Pi);Ni.prototype.bytesPerElement=24,Nn(\"StructArrayLayout4i4ui4i24\",Ni);var ji=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.float32[i+0]=e,this.float32[i+1]=r,this.float32[i+2]=n,t},e}(Pi);ji.prototype.bytesPerElement=12,Nn(\"StructArrayLayout3f12\",ji);var Ui=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;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint32[r+0]=e,t},e}(Pi);Ui.prototype.bytesPerElement=4,Nn(\"StructArrayLayout1ul4\",Ui);var Vi=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){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,r,n,i,a,o,s,l)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c){var u=10*t,f=5*t;return this.int16[u+0]=e,this.int16[u+1]=r,this.int16[u+2]=n,this.int16[u+3]=i,this.int16[u+4]=a,this.int16[u+5]=o,this.uint32[f+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,t},e}(Pi);Vi.prototype.bytesPerElement=20,Nn(\"StructArrayLayout6i1ul2ui20\",Vi);var Hi=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;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(Pi);Hi.prototype.bytesPerElement=12,Nn(\"StructArrayLayout2i2i2i12\",Hi);var qi=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),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i)},e.prototype.emplace=function(t,e,r,n,i,a){var o=4*t,s=8*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=n,this.int16[s+6]=i,this.int16[s+7]=a,t},e}(Pi);qi.prototype.bytesPerElement=16,Nn(\"StructArrayLayout2f1f2i16\",qi);var Gi=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;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=12*t,o=3*t;return this.uint8[a+0]=e,this.uint8[a+1]=r,this.float32[o+1]=n,this.float32[o+2]=i,t},e}(Pi);Gi.prototype.bytesPerElement=12,Nn(\"StructArrayLayout2ub2f12\",Gi);var Yi=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,this.uint16[i+2]=n,t},e}(Pi);Yi.prototype.bytesPerElement=6,Nn(\"StructArrayLayout3ui6\",Yi);var Wi=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,d,g,m){var v=this.length;return this.resize(v+1),this.emplace(v,t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v){var y=24*t,x=12*t,b=48*t;return this.int16[y+0]=e,this.int16[y+1]=r,this.uint16[y+2]=n,this.uint16[y+3]=i,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[y+10]=l,this.uint16[y+11]=c,this.uint16[y+12]=u,this.float32[x+7]=f,this.float32[x+8]=h,this.uint8[b+36]=p,this.uint8[b+37]=d,this.uint8[b+38]=g,this.uint32[x+10]=m,this.int16[y+22]=v,t},e}(Pi);Wi.prototype.bytesPerElement=48,Nn(\"StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48\",Wi);var Xi=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,d,g,m,v,y,x,b,_,w,T,k,A,M,S){var E=this.length;return this.resize(E+1),this.emplace(E,t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,w,T,k,A,M,S)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,w,T,k,A,M,S,E){var L=34*t,C=17*t;return this.int16[L+0]=e,this.int16[L+1]=r,this.int16[L+2]=n,this.int16[L+3]=i,this.int16[L+4]=a,this.int16[L+5]=o,this.int16[L+6]=s,this.int16[L+7]=l,this.uint16[L+8]=c,this.uint16[L+9]=u,this.uint16[L+10]=f,this.uint16[L+11]=h,this.uint16[L+12]=p,this.uint16[L+13]=d,this.uint16[L+14]=g,this.uint16[L+15]=m,this.uint16[L+16]=v,this.uint16[L+17]=y,this.uint16[L+18]=x,this.uint16[L+19]=b,this.uint16[L+20]=_,this.uint16[L+21]=w,this.uint16[L+22]=T,this.uint32[C+12]=k,this.float32[C+13]=A,this.float32[C+14]=M,this.float32[C+15]=S,this.float32[C+16]=E,t},e}(Pi);Xi.prototype.bytesPerElement=68,Nn(\"StructArrayLayout8i15ui1ul4f68\",Xi);var Zi=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;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.float32[r+0]=e,t},e}(Pi);Zi.prototype.bytesPerElement=4,Nn(\"StructArrayLayout1f4\",Zi);var Ji=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.int16[i+0]=e,this.int16[i+1]=r,this.int16[i+2]=n,t},e}(Pi);Ji.prototype.bytesPerElement=6,Nn(\"StructArrayLayout3i6\",Ji);var Ki=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=2*t,a=4*t;return this.uint32[i+0]=e,this.uint16[a+2]=r,this.uint16[a+3]=n,t},e}(Pi);Ki.prototype.bytesPerElement=8,Nn(\"StructArrayLayout1ul2ui8\",Ki);var Qi=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;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,t},e}(Pi);Qi.prototype.bytesPerElement=4,Nn(\"StructArrayLayout2ui4\",Qi);var $i=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){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint16[r+0]=e,t},e}(Pi);$i.prototype.bytesPerElement=2,Nn(\"StructArrayLayout1ui2\",$i);var ta=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;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.float32[n+0]=e,this.float32[n+1]=r,t},e}(Pi);ta.prototype.bytesPerElement=8,Nn(\"StructArrayLayout2f8\",ta);var ea=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;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,t},e}(Pi);ea.prototype.bytesPerElement=16,Nn(\"StructArrayLayout4f16\",ea);var ra=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},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Ci);ra.prototype.size=20;var na=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 ra(this,t)},e}(Vi);Nn(\"CollisionBoxArray\",na);var ia=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},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,r),e}(Ci);ia.prototype.size=48;var aa=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 ia(this,t)},e}(Wi);Nn(\"PlacedSymbolArray\",aa);var oa=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},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+12]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},r.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,r),e}(Ci);oa.prototype.size=68;var sa=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 oa(this,t)},e}(Xi);Nn(\"SymbolInstanceArray\",sa);var la=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}(Zi);Nn(\"GlyphOffsetArray\",la);var ca=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}(Ji);Nn(\"SymbolLineVertexArray\",ca);var ua=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.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,r),e}(Ci);ua.prototype.size=8;var fa=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 ua(this,t)},e}(Ki);Nn(\"FeatureIndexArray\",fa);var ha=Ii([{name:\"a_pos\",components:2,type:\"Int16\"}],4).members,pa=function(t){void 0===t&&(t=[]),this.segments=t};function da(t,e){return 256*(t=l(Math.floor(t),0,255))+(e=l(Math.floor(e),0,255))}pa.prototype.prepareSegment=function(t,e,r,n){var i=this.segments[this.segments.length-1];return t>pa.MAX_VERTEX_ARRAY_LENGTH&&_(\"Max vertices per segment is \"+pa.MAX_VERTEX_ARRAY_LENGTH+\": bucket requested \"+t),(!i||i.vertexLength+t>pa.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},pa.prototype.get=function(){return this.segments},pa.prototype.destroy=function(){for(var t=0,e=this.segments;t>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(a>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&t.charCodeAt(c+2))<<16;case 2:l^=(255&t.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(c)))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}})),va=e((function(t){t.exports=function(t,e){for(var r,n=t.length,i=e^n,a=0;n>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(a)|(255&t.charCodeAt(++a))<<8|(255&t.charCodeAt(++a))<<16|(255&t.charCodeAt(++a))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++a;switch(n){case 3:i^=(255&t.charCodeAt(a+2))<<16;case 2:i^=(255&t.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(a)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}})),ya=ma,xa=ma,ba=va;ya.murmur3=xa,ya.murmur2=ba;var _a=function(){this.ids=[],this.positions=[],this.indexed=!1};_a.prototype.add=function(t,e,r,n){this.ids.push(Ta(t)),this.positions.push(e,r,n)},_a.prototype.getPositions=function(t){for(var e=Ta(t),r=0,n=this.ids.length-1;r>1;this.ids[i]>=e?n=i:r=i+1}for(var a=[];this.ids[r]===e;){var o=this.positions[3*r],s=this.positions[3*r+1],l=this.positions[3*r+2];a.push({index:o,start:s,end:l}),r++}return a},_a.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return function t(e,r,n,i){for(;n>1],o=n-1,s=i+1;;){do{o++}while(e[o]a);if(o>=s)break;ka(e,o,s),ka(r,3*o,3*s),ka(r,3*o+1,3*s+1),ka(r,3*o+2,3*s+2)}s-nGa.max||o.yGa.max)&&(_(\"Geometry exceeds allowed extent, reduce your vector tile buffer size\"),o.x=l(o.x,Ga.min,Ga.max),o.y=l(o.y,Ga.min,Ga.max))}return r}function Wa(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var Xa=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.hasPattern=!1,this.layoutVertexArray=new zi,this.indexArray=new Yi,this.segments=new pa,this.programConfigurations=new Ua(ha,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function Za(t,e){for(var r=0;r1){if($a(t,e))return!0;for(var n=0;n1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function no(t,e){for(var r,n,i,a=!1,o=0;oe.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 io(t,e){for(var r=!1,n=0,i=t.length-1;ne.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 ao(t,e,r){var n=r[0],i=r[2];if(t.xi.x&&e.x>i.x||t.yi.y&&e.y>i.y)return!1;var a=w(t,e,r[0]);return a!==w(t,e,r[1])||a!==w(t,e,r[2])||a!==w(t,e,r[3])}function oo(t,e,r){var n=e.paint.get(t).value;return\"constant\"===n.kind?n.value:r.programConfigurations.get(e.id).getMaxValue(t)}function so(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function lo(t,e,r,n,a){if(!e[0]&&!e[1])return t;var o=i.convert(e)._mult(a);\"viewport\"===r&&o._rotate(-n);for(var s=[],l=0;l=8192||u<0||u>=8192)){var f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),h=f.vertexLength;Wa(this.layoutVertexArray,c,u,-1,-1),Wa(this.layoutVertexArray,c,u,1,-1),Wa(this.layoutVertexArray,c,u,1,1),Wa(this.layoutVertexArray,c,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),f.vertexLength+=4,f.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{},n)},Nn(\"CircleBucket\",Xa,{omit:[\"layers\"]});var co=new Si({\"circle-sort-key\":new Ti(Lt.layout_circle[\"circle-sort-key\"])}),uo={paint:new Si({\"circle-radius\":new Ti(Lt.paint_circle[\"circle-radius\"]),\"circle-color\":new Ti(Lt.paint_circle[\"circle-color\"]),\"circle-blur\":new Ti(Lt.paint_circle[\"circle-blur\"]),\"circle-opacity\":new Ti(Lt.paint_circle[\"circle-opacity\"]),\"circle-translate\":new wi(Lt.paint_circle[\"circle-translate\"]),\"circle-translate-anchor\":new wi(Lt.paint_circle[\"circle-translate-anchor\"]),\"circle-pitch-scale\":new wi(Lt.paint_circle[\"circle-pitch-scale\"]),\"circle-pitch-alignment\":new wi(Lt.paint_circle[\"circle-pitch-alignment\"]),\"circle-stroke-width\":new Ti(Lt.paint_circle[\"circle-stroke-width\"]),\"circle-stroke-color\":new Ti(Lt.paint_circle[\"circle-stroke-color\"]),\"circle-stroke-opacity\":new Ti(Lt.paint_circle[\"circle-stroke-opacity\"])}),layout:co},fo=\"undefined\"!=typeof Float32Array?Float32Array:Array;function ho(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}function po(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],m=e[13],v=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*m,t[2]=x*a+b*c+_*p+w*v,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*m,t[6]=x*a+b*c+_*p+w*v,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*m,t[10]=x*a+b*c+_*p+w*v,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*m,t[14]=x*a+b*c+_*p+w*v,t[15]=x*o+b*u+_*d+w*y,t}Math.hypot||(Math.hypot=function(){for(var t=arguments,e=0,r=arguments.length;r--;)e+=t[r]*t[r];return Math.sqrt(e)});var go=po;var mo,vo,yo=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t};mo=new fo(3),fo!=Float32Array&&(mo[0]=0,mo[1]=0,mo[2]=0),vo=mo;function xo(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}!function(){var t=function(){var t=new fo(4);return fo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}()}();var bo=function(t){var e=t[0],r=t[1];return e*e+r*r},_o=(function(){var t=function(){var t=new fo(2);return fo!=Float32Array&&(t[0]=0,t[1]=0),t}()}(),function(t){function e(e){t.call(this,e,uo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Xa(t)},e.prototype.queryRadius=function(t){var e=t;return oo(\"circle-radius\",this,e)+oo(\"circle-stroke-width\",this,e)+so(this.paint.get(\"circle-translate\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o,s){for(var l=lo(t,this.paint.get(\"circle-translate\"),this.paint.get(\"circle-translate-anchor\"),a.angle,o),c=this.paint.get(\"circle-radius\").evaluate(e,r)+this.paint.get(\"circle-stroke-width\").evaluate(e,r),u=\"map\"===this.paint.get(\"circle-pitch-alignment\"),f=u?l:function(t,e){return t.map((function(t){return wo(t,e)}))}(l,s),h=u?c*o:c,p=0,d=n;pt.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;l80*r){n=a=t[0],i=o=t[1];for(var d=r;da&&(a=s),l>o&&(o=l);c=0!==(c=Math.max(a-n,o-i))?1/c:0}return jo(h,p,r,n,i,c),p}function Bo(t,e,r,n,i){var a,o;if(i===ls(t,e,r,n)>0)for(a=e;a=e;a-=n)o=as(a,t[a],t[a+1],o);return o&&$o(o,o.next)&&(os(o),o=o.next),o}function No(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!$o(n,n.next)&&0!==Qo(n.prev,n,n.next))n=n.next;else{if(os(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function jo(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=Xo(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;e0||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?Vo(t,n,i,a):Uo(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),os(t),t=l.next,c=l.next;else if((t=l)===c){o?1===o?jo(t=Ho(No(t),e,r),e,r,n,i,a,2):2===o&&qo(t,e,r,n,i,a):jo(No(t),e,r,n,i,a,1);break}}}function Uo(t){var e=t.prev,r=t,n=t.next;if(Qo(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Jo(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&Qo(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Vo(t,e,r,n){var i=t.prev,a=t,o=t.next;if(Qo(i,a,o)>=0)return!1;for(var s=i.xa.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=Xo(s,l,e,r,n),h=Xo(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&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=h;){if(d!==t.prev&&d!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Ho(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!$o(i,a)&&ts(i,n,n.next,a)&&ns(i,a)&&ns(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),os(n),os(n.next),n=t=a),n=n.next}while(n!==t);return No(n)}function qo(t,e,r,n,i,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&Ko(o,s)){var l=is(o,s);return o=No(o,o.next),l=No(l,l.next),jo(o,e,r,n,i,a),void jo(l,e,r,n,i,a)}s=s.next}o=o.next}while(o!==t)}function Go(t,e){return t.x-e.x}function Yo(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.x&&n.x>=u&&i!==n.x&&Jo(ar.x||n.x===r.x&&Wo(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(t,e)){var r=is(e,t);No(e,e.next),No(r,r.next)}}function Wo(t,e){return Qo(t.prev,t,e.prev)<0&&Qo(e.next,t,t.next)<0}function Xo(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 Zo(t){var e=t,r=t;do{(e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function Ko(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&&ts(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(ns(t,e)&&ns(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)&&(Qo(t.prev,t,e.prev)||Qo(t,e.prev,e))||$o(t,e)&&Qo(t.prev,t,t.next)>0&&Qo(e.prev,e,e.next)>0)}function Qo(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function $o(t,e){return t.x===e.x&&t.y===e.y}function ts(t,e,r,n){var i=rs(Qo(t,e,r)),a=rs(Qo(t,e,n)),o=rs(Qo(r,n,t)),s=rs(Qo(r,n,e));return i!==a&&o!==s||(!(0!==i||!es(t,r,e))||(!(0!==a||!es(t,n,e))||(!(0!==o||!es(r,t,n))||!(0!==s||!es(r,e,n)))))}function es(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function rs(t){return t>0?1:t<0?-1:0}function ns(t,e){return Qo(t.prev,t,t.next)<0?Qo(t,e,t.next)>=0&&Qo(t,t.prev,e)>=0:Qo(t,e,t.prev)<0||Qo(t,t.next,e)<0}function is(t,e){var r=new ss(t.i,t.x,t.y),n=new ss(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 as(t,e,r,n){var i=new ss(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 os(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 ss(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 ls(t,e,r,n){for(var i=0,a=e,o=r-n;an;){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),f=Math.max(n,Math.floor(r-s*c/o+u)),h=Math.min(i,Math.floor(r+(o-s)*c/o+u));t(e,r,f,h,a)}var p=e[r],d=n,g=i;for(us(e,n,r),a(e[i],p)>0&&us(e,n,i);d0;)g--}0===a(e[n],p)?us(e,n,g):(g++,us(e,g,i)),g<=r&&(n=g+1),r<=g&&(i=g-1)}}(t,e,r||0,n||t.length-1,i||fs)}function us(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function fs(t,e){return te?1:0}function hs(t,e){var r=t.length;if(r<=1)return[t];for(var n,i,a=[],o=0;o1)for(var l=0;l0&&(n+=t[i-1].length,r.holes.push(n))}return r},Do.default=Ro;var ms=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.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new zi,this.indexArray=new Yi,this.indexArray2=new Qi,this.programConfigurations=new Ua(zo,t.layers,t.zoom),this.segments=new pa,this.segments2=new pa,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};ms.prototype.populate=function(t,e,r){this.hasPattern=ds(\"fill\",this.layers,e);for(var n=this.layers[0].layout.get(\"fill-sort-key\"),i=[],a=0,o=t;a>3}if(a--,1===n||2===n)o+=t.readSVarint(),s+=t.readSVarint(),1===n&&(e&&l.push(e),e=[]),e.push(new i(o,s));else{if(7!==n)throw new Error(\"unknown command \"+n);e&&e.push(e[0].clone())}}return e&&l.push(e),l},ws.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>3}if(n--,1===r||2===r)(i+=t.readSVarint())s&&(s=i),(a+=t.readSVarint())c&&(c=a);else if(7!==r)throw new Error(\"unknown command \"+r)}return[o,l,s,c]},ws.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=ws.types[this.type];function u(t){for(var e=0;e>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 Es(t,e,r){if(3===t){var n=new As(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}Ms.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 _s(this._pbf,e,this.extent,this._keys,this._values)};var Ls={VectorTile:function(t,e){this.layers=t.readFields(Es,{},e)},VectorTileFeature:_s,VectorTileLayer:As},Cs=Ls.VectorTileFeature.types,Ps=Math.pow(2,13);function Is(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,2*Math.floor(n*Ps)+o,i*Ps*2,a*Ps*2,Math.round(s))}var Os=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.hasPattern=!1,this.layoutVertexArray=new Ri,this.indexArray=new Yi,this.programConfigurations=new Ua(bs,t.layers,t.zoom),this.segments=new pa,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function zs(t,e){return t.x===e.x&&(t.x<0||t.x>8192)||t.y===e.y&&(t.y<0||t.y>8192)}function Ds(t){return t.every((function(t){return t.x<0}))||t.every((function(t){return t.x>8192}))||t.every((function(t){return t.y<0}))||t.every((function(t){return t.y>8192}))}Os.prototype.populate=function(t,e,r){this.features=[],this.hasPattern=ds(\"fill-extrusion\",this.layers,e);for(var n=0,i=t;n=1){var y=d[m-1];if(!zs(v,y)){f.vertexLength+4>pa.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var x=v.sub(y)._perp()._unit(),b=y.dist(v);g+b>32768&&(g=0),Is(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,0,g),Is(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,1,g),g+=b,Is(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,0,g),Is(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,1,g);var _=f.vertexLength;this.indexArray.emplaceBack(_,_+2,_+1),this.indexArray.emplaceBack(_+1,_+2,_+3),f.vertexLength+=4,f.primitiveLength+=2}}}}if(f.vertexLength+l>pa.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),\"Polygon\"===Cs[t.type]){for(var w=[],T=[],k=f.vertexLength,A=0,M=s;A=2&&t[l-1].equals(t[l-2]);)l--;for(var c=0;c0;if(T&&v>c){var A=u.dist(p);if(A>2*f){var M=u.sub(u.sub(p)._mult(f/A)._round());this.updateDistance(p,M),this.addCurrentVertex(M,g,0,0,h),p=M}}var S=p&&d,E=S?r:s?\"butt\":n;if(S&&\"round\"===E&&(_i&&(E=\"bevel\"),\"bevel\"===E&&(_>2&&(E=\"flipbevel\"),_100)y=m.mult(-1);else{var L=_*g.add(m).mag()/g.sub(m).mag();y._perp()._mult(L*(k?-1:1))}this.addCurrentVertex(u,y,0,0,h),this.addCurrentVertex(u,y.mult(-1),0,0,h)}else if(\"bevel\"===E||\"fakeround\"===E){var C=-Math.sqrt(_*_-1),P=k?C:0,I=k?0:C;if(p&&this.addCurrentVertex(u,g,P,I,h),\"fakeround\"===E)for(var O=Math.round(180*w/Math.PI/20),z=1;z2*f){var j=u.add(d.sub(u)._mult(f/N)._round());this.updateDistance(u,j),this.addCurrentVertex(j,m,0,0,h),u=j}}}}},qs.prototype.addCurrentVertex=function(t,e,r,n,i,a){void 0===a&&(a=!1);var o=e.x+e.y*r,s=e.y-e.x*r,l=-e.x+e.y*n,c=-e.y-e.x*n;this.addHalfVertex(t,o,s,a,!1,r,i),this.addHalfVertex(t,l,c,a,!0,-n,i),this.distance>Hs/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,n,i,a))},qs.prototype.addHalfVertex=function(t,e,r,n,i,a,o){var s=t.x,l=t.y,c=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(i?1:0),Math.round(63*e)+128,Math.round(63*r)+128,1+(0===a?0:a<0?-1:1)|(63&c)<<2,c>>6);var u=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,u),o.primitiveLength++),i?this.e2=u:this.e1=u},qs.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(Hs-1):this.distance},qs.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},Nn(\"LineBucket\",qs,{omit:[\"layers\",\"patternFeatures\"]});var Gs=new Si({\"line-cap\":new wi(Lt.layout_line[\"line-cap\"]),\"line-join\":new Ti(Lt.layout_line[\"line-join\"]),\"line-miter-limit\":new wi(Lt.layout_line[\"line-miter-limit\"]),\"line-round-limit\":new wi(Lt.layout_line[\"line-round-limit\"]),\"line-sort-key\":new Ti(Lt.layout_line[\"line-sort-key\"])}),Ys={paint:new Si({\"line-opacity\":new Ti(Lt.paint_line[\"line-opacity\"]),\"line-color\":new Ti(Lt.paint_line[\"line-color\"]),\"line-translate\":new wi(Lt.paint_line[\"line-translate\"]),\"line-translate-anchor\":new wi(Lt.paint_line[\"line-translate-anchor\"]),\"line-width\":new Ti(Lt.paint_line[\"line-width\"]),\"line-gap-width\":new Ti(Lt.paint_line[\"line-gap-width\"]),\"line-offset\":new Ti(Lt.paint_line[\"line-offset\"]),\"line-blur\":new Ti(Lt.paint_line[\"line-blur\"]),\"line-dasharray\":new Ai(Lt.paint_line[\"line-dasharray\"]),\"line-pattern\":new ki(Lt.paint_line[\"line-pattern\"]),\"line-gradient\":new Mi(Lt.paint_line[\"line-gradient\"])}),layout:Gs},Ws=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 pi(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,i){return r=u({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,i)},e}(Ti))(Ys.paint.properties[\"line-width\"].specification);Ws.useIntegerZoom=!0;var Xs=function(t){function e(e){t.call(this,e,Ys)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){\"line-gradient\"===t&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values[\"line-gradient\"].value.expression;this.gradient=Co(t,\"lineProgress\"),this.gradientTexture=null},e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r),this.paint._values[\"line-floorwidth\"]=Ws.possiblyEvaluate(this._transitioningPaint._values[\"line-width\"].value,e)},e.prototype.createBucket=function(t){return new qs(t)},e.prototype.queryRadius=function(t){var e=t,r=Zs(oo(\"line-width\",this,e),oo(\"line-gap-width\",this,e)),n=oo(\"line-offset\",this,e);return r/2+Math.abs(n)+so(this.paint.get(\"line-translate\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,a,o,s){var l=lo(t,this.paint.get(\"line-translate\"),this.paint.get(\"line-translate-anchor\"),o.angle,s),c=s/2*Zs(this.paint.get(\"line-width\").evaluate(e,r),this.paint.get(\"line-gap-width\").evaluate(e,r)),u=this.paint.get(\"line-offset\").evaluate(e,r);return u&&(n=function(t,e){for(var r=[],n=new i(0,0),a=0;a=3)for(var a=0;a0?e+2*t:t}var Js=Ii([{name:\"a_pos_offset\",components:4,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint16\"},{name:\"a_pixeloffset\",components:4,type:\"Int16\"}],4),Ks=Ii([{name:\"a_projected_pos\",components:3,type:\"Float32\"}],4),Qs=(Ii([{name:\"a_fade_opacity\",components:1,type:\"Uint32\"}],4),Ii([{name:\"a_placed\",components:2,type:\"Uint8\"},{name:\"a_shift\",components:2,type:\"Float32\"}])),$s=(Ii([{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\"}]),Ii([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_anchor_pos\",components:2,type:\"Int16\"},{name:\"a_extrude\",components:2,type:\"Int16\"}],4)),tl=Ii([{name:\"a_pos\",components:2,type:\"Float32\"},{name:\"a_radius\",components:1,type:\"Float32\"},{name:\"a_flags\",components:2,type:\"Int16\"}],4);Ii([{name:\"triangle\",components:3,type:\"Uint16\"}]),Ii([{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:\"placedOrientation\"},{type:\"Uint8\",name:\"hidden\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Int16\",name:\"associatedIconIndex\"}]),Ii([{type:\"Int16\",name:\"anchorX\"},{type:\"Int16\",name:\"anchorY\"},{type:\"Int16\",name:\"rightJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"centerJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"leftJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedTextSymbolIndex\"},{type:\"Int16\",name:\"placedIconSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedIconSymbolIndex\"},{type:\"Uint16\",name:\"key\"},{type:\"Uint16\",name:\"textBoxStartIndex\"},{type:\"Uint16\",name:\"textBoxEndIndex\"},{type:\"Uint16\",name:\"verticalTextBoxStartIndex\"},{type:\"Uint16\",name:\"verticalTextBoxEndIndex\"},{type:\"Uint16\",name:\"iconBoxStartIndex\"},{type:\"Uint16\",name:\"iconBoxEndIndex\"},{type:\"Uint16\",name:\"verticalIconBoxStartIndex\"},{type:\"Uint16\",name:\"verticalIconBoxEndIndex\"},{type:\"Uint16\",name:\"featureIndex\"},{type:\"Uint16\",name:\"numHorizontalGlyphVertices\"},{type:\"Uint16\",name:\"numVerticalGlyphVertices\"},{type:\"Uint16\",name:\"numIconVertices\"},{type:\"Uint16\",name:\"numVerticalIconVertices\"},{type:\"Uint16\",name:\"useRuntimeCollisionCircles\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Float32\",name:\"textBoxScale\"},{type:\"Float32\",components:2,name:\"textOffset\"},{type:\"Float32\",name:\"collisionCircleDiameter\"}]),Ii([{type:\"Float32\",name:\"offsetX\"}]),Ii([{type:\"Int16\",name:\"x\"},{type:\"Int16\",name:\"y\"},{type:\"Int16\",name:\"tileUnitDistanceFromAnchor\"}]);function el(t,e,r){return t.sections.forEach((function(t){t.text=function(t,e,r){var n=e.layout.get(\"text-transform\").evaluate(r,{});return\"uppercase\"===n?t=t.toLocaleUpperCase():\"lowercase\"===n&&(t=t.toLocaleLowerCase()),hi.applyArabicShaping&&(t=hi.applyArabicShaping(t)),t}(t.text,e,r)})),t}var rl={\"!\":\"\\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\"};var nl=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<>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)},il=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>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<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g},al=ol;function ol(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}ol.Varint=0,ol.Fixed64=1,ol.Bytes=2,ol.Fixed32=5;var sl=\"undefined\"==typeof TextDecoder?null:new TextDecoder(\"utf8\");function ll(t){return t.type===ol.Bytes?t.readVarint()+t.pos:t.pos+1}function cl(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function ul(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(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 fl(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function wl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}ol.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos>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=bl(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=wl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=bl(this.buf,this.pos)+4294967296*bl(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=bl(this.buf,this.pos)+4294967296*wl(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=nl(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=nl(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(i=a[r.pos++],n=(112&i)>>4,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<3,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<10,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<17,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<24,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(1&i)<<31,i<128)return cl(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=this.pos;return this.pos=t,t-e>=12&&sl?function(t,e,r){return sl.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){var n=\"\",i=e;for(;i239?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,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==ol.Bytes)return t.push(this.readVarint(e));var r=ll(this);for(t=t||[];this.pos127;);else if(e===ol.Bytes)this.pos=this.readVarint()+this.pos;else if(e===ol.Fixed32)this.pos+=4;else{if(e!==ol.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;e268435455||t<0?function(t,e){var r,n;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));if(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;if(e.buf[e.pos++]|=r|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;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;a55295&&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&&ul(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),il(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),il(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=128&&ul(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,ol.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,fl,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,hl,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,gl,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,pl,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,dl,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,ml,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,vl,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,yl,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,xl,e)},writeBytesField:function(t,e){this.writeTag(t,ol.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,ol.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,ol.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,ol.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,ol.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,ol.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,ol.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,ol.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,ol.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,ol.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};function Tl(t,e,r){1===t&&r.readMessage(kl,e)}function kl(t,e,r){if(3===t){var n=r.readMessage(Al,{}),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 So({width:o+6,height:s+6},a),metrics:{width:o,height:s,left:l,top:c,advance:u}})}}function Al(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())}function Ml(t){for(var e=0,r=0,n=0,i=t;n=0;h--){var p=o[h];if(!(f.w>p.w||f.h>p.h)){if(f.x=p.x,f.y=p.y,l=Math.max(l,f.y+f.h),s=Math.max(s,f.x+f.w),f.w===p.w&&f.h===p.h){var d=o.pop();h0&&N>A&&(A=N)}else{var j=r[S.fontStack],U=j&&j[L];if(U&&U.rect)I=U.rect,P=U.metrics;else{var V=e[S.fontStack],H=V&&V[L];if(!H)continue;P=H.metrics}C=24*(_-S.scale)}D?(t.verticalizable=!0,k.push({glyph:L,imageName:O,x:h,y:p+C,vertical:D,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:I}),h+=z*S.scale+c):(k.push({glyph:L,imageName:O,x:h,y:p+C,vertical:D,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:I}),h+=P.advance*S.scale+c)}if(0!==k.length){var q=h-c;d=Math.max(q,d),Vl(k,0,k.length-1,m,A)}h=0;var G=a*_+A;T.lineOffset=Math.max(A,w),p+=G,g=Math.max(G,g),++v}else p+=a,++v}var Y;var W=p- -17,X=Ul(o),Z=X.horizontalAlign,J=X.verticalAlign;(function(t,e,r,n,i,a,o,s,l){var c=(e-r)*i,u=0;u=a!==o?-s*n- -17:(-n*l+.5)*o;for(var f=0,h=t;f=0&&n>=t&&zl[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},Il.prototype.substring=function(t,e){var r=new Il;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},Il.prototype.toString=function(){return this.text},Il.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce((function(e,r){return Math.max(e,t.sections[r].scale)}),0)},Il.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(Pl.forText(t.scale,t.fontStack||e));for(var r=this.sections.length-1,n=0;n=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var zl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Dl={};function Rl(t,e,r,n,i,a){if(e.imageName){var o=n[e.imageName];return o?o.displaySize[0]*e.scale*24/a+i:0}var s=r[e.fontStack],l=s&&s[t];return l?l.metrics.advance*e.scale+i:0}function Fl(t,e,r,n){var i=Math.pow(t-e,2);return n?t=0,f=0,h=0;h-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;sn;)c-=l.shift().angleDelta;if(c>i)return!1;o++,s+=f.dist(h)}return!0}function Jl(t){for(var e=0,r=0;rc){var d=(c-l)/p,g=qe(f.x,h.x,d),m=qe(f.y,h.y,d),v=new ql(g,m,h.angleTo(f),u);return v._round(),!o||Zl(t,v,s,o,e)?v:void 0}l+=p}}function tc(t,e,r,n,i,a,o,s,l){var c=Kl(n,a,o),u=Ql(n,i),f=u*o,h=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-f=0&&_=0&&w=0&&p+u<=f){var T=new ql(_,w,x,g);T._round(),i&&!Zl(e,T,o,i,a)||d.push(T)}}h+=y}l||d.length||s||(d=t(e,h/2,n,i,a,o,s,!0,c));return d}(t,h?e/2*s%e:(u/2+2*a)*o*s%e,e,c,r,f,h,!1,l)}function ec(t,e,r,n,a){for(var o=[],s=0;s=n&&h.x>=n||(f.x>=n?f=new i(n,f.y+(h.y-f.y)*((n-f.x)/(h.x-f.x)))._round():h.x>=n&&(h=new i(n,f.y+(h.y-f.y)*((n-f.x)/(h.x-f.x)))._round()),f.y>=a&&h.y>=a||(f.y>=a?f=new i(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round():h.y>=a&&(h=new i(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}function rc(t,e,r,n){var a=[],o=t.image,s=o.pixelRatio,l=o.paddedRect.w-2,c=o.paddedRect.h-2,u=t.right-t.left,f=t.bottom-t.top,h=o.stretchX||[[0,l]],p=o.stretchY||[[0,c]],d=function(t,e){return t+e[1]-e[0]},g=h.reduce(d,0),m=p.reduce(d,0),v=l-g,y=c-m,x=0,b=g,_=0,w=m,T=0,k=v,A=0,M=y;if(o.content&&n){var S=o.content;x=nc(h,0,S[0]),_=nc(p,0,S[1]),b=nc(h,S[0],S[2]),w=nc(p,S[1],S[3]),T=S[0]-x,A=S[1]-_,k=S[2]-S[0]-b,M=S[3]-S[1]-w}var E=function(n,a,l,c){var h=ac(n.stretch-x,b,u,t.left),p=oc(n.fixed-T,k,n.stretch,g),d=ac(a.stretch-_,w,f,t.top),v=oc(a.fixed-A,M,a.stretch,m),y=ac(l.stretch-x,b,u,t.left),S=oc(l.fixed-T,k,l.stretch,g),E=ac(c.stretch-_,w,f,t.top),L=oc(c.fixed-A,M,c.stretch,m),C=new i(h,d),P=new i(y,d),I=new i(y,E),O=new i(h,E),z=new i(p/s,v/s),D=new i(S/s,L/s),R=e*Math.PI/180;if(R){var F=Math.sin(R),B=Math.cos(R),N=[B,-F,F,B];C._matMult(N),P._matMult(N),O._matMult(N),I._matMult(N)}var j=n.stretch+n.fixed,U=l.stretch+l.fixed,V=a.stretch+a.fixed,H=c.stretch+c.fixed;return{tl:C,tr:P,bl:O,br:I,tex:{x:o.paddedRect.x+1+j,y:o.paddedRect.y+1+V,w:U-j,h:H-V},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:z,pixelOffsetBR:D,minFontScaleX:k/s/u,minFontScaleY:M/s/f,isSDF:r}};if(n&&(o.stretchX||o.stretchY))for(var L=ic(h,v,g),C=ic(p,y,m),P=0;P0&&(d=Math.max(10,d),this.circleDiameter=d)}else{var g=o.top*s-l,m=o.bottom*s+l,v=o.left*s-l,y=o.right*s+l,x=o.collisionPadding;if(x&&(v-=x[0]*s,g-=x[1]*s,y+=x[2]*s,m+=x[3]*s),u){var b=new i(v,g),_=new i(y,g),w=new i(v,m),T=new i(y,m),k=u*Math.PI/180;b._rotate(k),_._rotate(k),w._rotate(k),T._rotate(k),v=Math.min(b.x,_.x,w.x,T.x),y=Math.max(b.x,_.x,w.x,T.x),g=Math.min(b.y,_.y,w.y,T.y),m=Math.max(b.y,_.y,w.y,T.y)}t.emplaceBack(e.x,e.y,v,g,y,m,r,n,a)}this.boxEndIndex=t.length},lc=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=cc),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function cc(t,e){return te?1:0}function uc(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var n=1/0,a=1/0,o=-1/0,s=-1/0,l=t[0],c=0;co)&&(o=u.x),(!c||u.y>s)&&(s=u.y)}var f=o-n,h=s-a,p=Math.min(f,h),d=p/2,g=new lc([],fc);if(0===p)return new i(n,a);for(var m=n;my.d||!y.d)&&(y=b,r&&console.log(\"found best %d after %d probes\",Math.round(1e4*b.d)/1e4,x)),b.max-y.d<=e||(d=b.h/2,g.push(new hc(b.p.x-d,b.p.y-d,d,t)),g.push(new hc(b.p.x+d,b.p.y-d,d,t)),g.push(new hc(b.p.x-d,b.p.y+d,d,t)),g.push(new hc(b.p.x+d,b.p.y+d,d,t)),x+=4)}return r&&(console.log(\"num probes: \"+x),console.log(\"best distance: \"+y.d)),y.p}function fc(t,e){return e.max-t.max}function hc(t,e,r,n){this.p=new i(t,e),this.h=r,this.d=function(t,e){for(var r=!1,n=1/0,i=0;it.y!=u.y>t.y&&t.x<(u.x-c.x)*(t.y-c.y)/(u.y-c.y)+c.x&&(r=!r),n=Math.min(n,ro(t,c,u))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}lc.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},lc.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}},lc.prototype.peek=function(){return this.data[0]},lc.prototype._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},lc.prototype._down=function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];t=0)break;e[t]=o,t=a}e[t]=i};var pc=Number.POSITIVE_INFINITY;function dc(t,e){return e[1]!==pc?function(t,e,r){var n=0,i=0;switch(e=Math.abs(e),r=Math.abs(r),t){case\"top-right\":case\"top-left\":case\"top\":i=r-7;break;case\"bottom-right\":case\"bottom-left\":case\"bottom\":i=7-r}switch(t){case\"top-right\":case\"bottom-right\":case\"right\":n=-e;break;case\"top-left\":case\"bottom-left\":case\"left\":n=e}return[n,i]}(t,e[0],e[1]):function(t,e){var r=0,n=0;e<0&&(e=0);var i=e/Math.sqrt(2);switch(t){case\"top-right\":case\"top-left\":n=i-7;break;case\"bottom-right\":case\"bottom-left\":n=7-i;break;case\"bottom\":n=7-e;break;case\"top\":n=e-7}switch(t){case\"top-right\":case\"bottom-right\":r=-i;break;case\"top-left\":case\"bottom-left\":r=i;break;case\"left\":r=e;break;case\"right\":r=-e}return[r,n]}(t,e[0])}function gc(t){switch(t){case\"right\":case\"top-right\":case\"bottom-right\":return\"right\";case\"left\":case\"top-left\":case\"bottom-left\":return\"left\"}return\"center\"}function mc(t,e,r,n,a,o,s,l,c,u,f,h,p,d,g){var m=function(t,e,r,n,a,o,s,l){for(var c=n.layout.get(\"text-rotate\").evaluate(o,{})*Math.PI/180,u=[],f=0,h=e.positionedLines;f32640&&_(t.layerIds[0]+': Value for \"text-size\" is >= 255. Reduce your \"text-size\".'):\"composite\"===v.kind&&((y=[128*d.compositeTextSizes[0].evaluate(s,{},g),128*d.compositeTextSizes[1].evaluate(s,{},g)])[0]>32640||y[1]>32640)&&_(t.layerIds[0]+': Value for \"text-size\" is >= 255. Reduce your \"text-size\".'),t.addSymbols(t.text,m,y,l,o,s,u,e,c.lineStartIndex,c.lineLength,p,g);for(var x=0,b=f;x=0;o--)if(n.dist(a[o])0)&&(\"constant\"!==a.value.kind||a.value.value.length>0),c=\"constant\"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,u=i.get(\"symbol-sort-key\");if(this.features=[],l||c){for(var f=e.iconDependencies,h=e.glyphDependencies,p=e.availableImages,d=new pi(this.zoom),g=0,m=t;g=0;for(var O=0,z=k.sections;O=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;l0},Mc.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Mc.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Mc.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Mc.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Mc.prototype.addIndicesForPlacedSymbol=function(t,e){for(var r=t.placedSymbolArray.get(e),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r=0&&n.indexOf(t)===r&&e.addIndicesForPlacedSymbol(e.text,t)})),a.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,a.verticalPlacedTextSymbolIndex),a.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.placedIconSymbolIndex),a.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Nn(\"SymbolBucket\",Mc,{omit:[\"layers\",\"collisionBoxArray\",\"features\",\"compareText\"]}),Mc.MAX_GLYPHS=65535,Mc.addDynamicAttributes=wc;var Sc=new Si({\"symbol-placement\":new wi(Lt.layout_symbol[\"symbol-placement\"]),\"symbol-spacing\":new wi(Lt.layout_symbol[\"symbol-spacing\"]),\"symbol-avoid-edges\":new wi(Lt.layout_symbol[\"symbol-avoid-edges\"]),\"symbol-sort-key\":new Ti(Lt.layout_symbol[\"symbol-sort-key\"]),\"symbol-z-order\":new wi(Lt.layout_symbol[\"symbol-z-order\"]),\"icon-allow-overlap\":new wi(Lt.layout_symbol[\"icon-allow-overlap\"]),\"icon-ignore-placement\":new wi(Lt.layout_symbol[\"icon-ignore-placement\"]),\"icon-optional\":new wi(Lt.layout_symbol[\"icon-optional\"]),\"icon-rotation-alignment\":new wi(Lt.layout_symbol[\"icon-rotation-alignment\"]),\"icon-size\":new Ti(Lt.layout_symbol[\"icon-size\"]),\"icon-text-fit\":new wi(Lt.layout_symbol[\"icon-text-fit\"]),\"icon-text-fit-padding\":new wi(Lt.layout_symbol[\"icon-text-fit-padding\"]),\"icon-image\":new Ti(Lt.layout_symbol[\"icon-image\"]),\"icon-rotate\":new Ti(Lt.layout_symbol[\"icon-rotate\"]),\"icon-padding\":new wi(Lt.layout_symbol[\"icon-padding\"]),\"icon-keep-upright\":new wi(Lt.layout_symbol[\"icon-keep-upright\"]),\"icon-offset\":new Ti(Lt.layout_symbol[\"icon-offset\"]),\"icon-anchor\":new Ti(Lt.layout_symbol[\"icon-anchor\"]),\"icon-pitch-alignment\":new wi(Lt.layout_symbol[\"icon-pitch-alignment\"]),\"text-pitch-alignment\":new wi(Lt.layout_symbol[\"text-pitch-alignment\"]),\"text-rotation-alignment\":new wi(Lt.layout_symbol[\"text-rotation-alignment\"]),\"text-field\":new Ti(Lt.layout_symbol[\"text-field\"]),\"text-font\":new Ti(Lt.layout_symbol[\"text-font\"]),\"text-size\":new Ti(Lt.layout_symbol[\"text-size\"]),\"text-max-width\":new Ti(Lt.layout_symbol[\"text-max-width\"]),\"text-line-height\":new wi(Lt.layout_symbol[\"text-line-height\"]),\"text-letter-spacing\":new Ti(Lt.layout_symbol[\"text-letter-spacing\"]),\"text-justify\":new Ti(Lt.layout_symbol[\"text-justify\"]),\"text-radial-offset\":new Ti(Lt.layout_symbol[\"text-radial-offset\"]),\"text-variable-anchor\":new wi(Lt.layout_symbol[\"text-variable-anchor\"]),\"text-anchor\":new Ti(Lt.layout_symbol[\"text-anchor\"]),\"text-max-angle\":new wi(Lt.layout_symbol[\"text-max-angle\"]),\"text-writing-mode\":new wi(Lt.layout_symbol[\"text-writing-mode\"]),\"text-rotate\":new Ti(Lt.layout_symbol[\"text-rotate\"]),\"text-padding\":new wi(Lt.layout_symbol[\"text-padding\"]),\"text-keep-upright\":new wi(Lt.layout_symbol[\"text-keep-upright\"]),\"text-transform\":new Ti(Lt.layout_symbol[\"text-transform\"]),\"text-offset\":new Ti(Lt.layout_symbol[\"text-offset\"]),\"text-allow-overlap\":new wi(Lt.layout_symbol[\"text-allow-overlap\"]),\"text-ignore-placement\":new wi(Lt.layout_symbol[\"text-ignore-placement\"]),\"text-optional\":new wi(Lt.layout_symbol[\"text-optional\"])}),Ec={paint:new Si({\"icon-opacity\":new Ti(Lt.paint_symbol[\"icon-opacity\"]),\"icon-color\":new Ti(Lt.paint_symbol[\"icon-color\"]),\"icon-halo-color\":new Ti(Lt.paint_symbol[\"icon-halo-color\"]),\"icon-halo-width\":new Ti(Lt.paint_symbol[\"icon-halo-width\"]),\"icon-halo-blur\":new Ti(Lt.paint_symbol[\"icon-halo-blur\"]),\"icon-translate\":new wi(Lt.paint_symbol[\"icon-translate\"]),\"icon-translate-anchor\":new wi(Lt.paint_symbol[\"icon-translate-anchor\"]),\"text-opacity\":new Ti(Lt.paint_symbol[\"text-opacity\"]),\"text-color\":new Ti(Lt.paint_symbol[\"text-color\"],{runtimeType:Ut,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),\"text-halo-color\":new Ti(Lt.paint_symbol[\"text-halo-color\"]),\"text-halo-width\":new Ti(Lt.paint_symbol[\"text-halo-width\"]),\"text-halo-blur\":new Ti(Lt.paint_symbol[\"text-halo-blur\"]),\"text-translate\":new wi(Lt.paint_symbol[\"text-translate\"]),\"text-translate-anchor\":new wi(Lt.paint_symbol[\"text-translate-anchor\"])}),layout:Sc},Lc=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Ft,this.defaultValue=t};Lc.prototype.evaluate=function(t){if(t.formattedSection){var e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default},Lc.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},Lc.prototype.outputDefined=function(){return!1},Lc.prototype.serialize=function(){return null},Nn(\"FormatSectionOverride\",Lc,{omit:[\"defaultValue\"]});var Cc=function(t){function e(e){t.call(this,e,Ec)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e,r){if(t.prototype.recalculate.call(this,e,r),\"auto\"===this.layout.get(\"icon-rotation-alignment\")&&(\"point\"!==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\")&&(\"point\"!==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\")),\"point\"===this.layout.get(\"symbol-placement\")){var n=this.layout.get(\"text-writing-mode\");if(n){for(var i=[],a=0,o=n;a\",targetMapId:n,sourceMapId:a.mapId})}}},qc.prototype.receive=function(t){var e=t.data,r=e.id;if(r&&(!e.targetMapId||this.mapId===e.targetMapId))if(\"\"===e.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else k()||e.mustQueue?(this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,e)},qc.prototype.process=function(){if(this.taskQueue.length){var t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}},qc.prototype.processTask=function(t,e){var r=this;if(\"\"===e.type){var n=this.callbacks[t];delete this.callbacks[t],n&&(e.error?n(qn(e.error)):n(null,qn(e.data)))}else{var i=!1,a=S(this.globalScope)?void 0:[],o=e.hasCallback?function(e,n){i=!0,delete r.cancelCallbacks[t],r.target.postMessage({id:t,type:\"\",sourceMapId:r.mapId,error:e?Hn(e):null,data:Hn(n,a)},a)}:function(t){i=!0},s=null,l=qn(e.data);if(this.parent[e.type])s=this.parent[e.type](e.sourceMapId,l,o);else if(this.parent.getWorkerSource){var c=e.type.split(\".\");s=this.parent.getWorkerSource(e.sourceMapId,c[0],l.source)[c[1]](l,o)}else o(new Error(\"Could not find function \"+e.type));!i&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},qc.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener(\"message\",this.receive,!1)};var Yc=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]))};Yc.prototype.setNorthEast=function(t){return this._ne=t instanceof Wc?new Wc(t.lng,t.lat):Wc.convert(t),this},Yc.prototype.setSouthWest=function(t){return this._sw=t instanceof Wc?new Wc(t.lng,t.lat):Wc.convert(t),this},Yc.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof Wc)e=t,r=t;else{if(!(t instanceof Yc)){if(Array.isArray(t)){if(4===t.length||t.every(Array.isArray)){var a=t;return this.extend(Yc.convert(a))}var o=t;return this.extend(Wc.convert(o))}return 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 Wc(e.lng,e.lat),this._ne=new Wc(r.lng,r.lat)),this},Yc.prototype.getCenter=function(){return new Wc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Yc.prototype.getSouthWest=function(){return this._sw},Yc.prototype.getNorthEast=function(){return this._ne},Yc.prototype.getNorthWest=function(){return new Wc(this.getWest(),this.getNorth())},Yc.prototype.getSouthEast=function(){return new Wc(this.getEast(),this.getSouth())},Yc.prototype.getWest=function(){return this._sw.lng},Yc.prototype.getSouth=function(){return this._sw.lat},Yc.prototype.getEast=function(){return this._ne.lng},Yc.prototype.getNorth=function(){return this._ne.lat},Yc.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Yc.prototype.toString=function(){return\"LngLatBounds(\"+this._sw.toString()+\", \"+this._ne.toString()+\")\"},Yc.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Yc.prototype.contains=function(t){var e=Wc.convert(t),r=e.lng,n=e.lat,i=this._sw.lat<=n&&n<=this._ne.lat,a=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=r&&r>=this._ne.lng),i&&a},Yc.convert=function(t){return!t||t instanceof Yc?t:new Yc(t)};var Wc=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\")};Wc.prototype.wrap=function(){return new Wc(c(this.lng,-180,180),this.lat)},Wc.prototype.toArray=function(){return[this.lng,this.lat]},Wc.prototype.toString=function(){return\"LngLat(\"+this.lng+\", \"+this.lat+\")\"},Wc.prototype.distanceTo=function(t){var e=Math.PI/180,r=this.lat*e,n=t.lat*e,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((t.lng-this.lng)*e);return 6371008.8*Math.acos(Math.min(i,1))},Wc.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new Yc(new Wc(this.lng-r,this.lat-e),new Wc(this.lng+r,this.lat+e))},Wc.convert=function(t){if(t instanceof Wc)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Wc(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&\"object\"==typeof t&&null!==t)return new Wc(Number(\"lng\"in t?t.lng:t.lon),Number(t.lat));throw new Error(\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]\")};var Xc=2*Math.PI*6371008.8;function Zc(t){return Xc*Math.cos(t*Math.PI/180)}function Jc(t){return(180+t)/360}function Kc(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Qc(t,e){return t/Zc(e)}function $c(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}var tu=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};tu.fromLngLat=function(t,e){void 0===e&&(e=0);var r=Wc.convert(t);return new tu(Jc(r.lng),Kc(r.lat),Qc(e,r.lat))},tu.prototype.toLngLat=function(){return new Wc(360*this.x-180,$c(this.y))},tu.prototype.toAltitude=function(){return t=this.z,e=this.y,t*Zc($c(e));var t,e},tu.prototype.meterInMercatorCoordinateUnits=function(){return 1/Xc*(t=$c(this.y),1/Math.cos(t*Math.PI/180));var t};var eu=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=iu(0,t,t,e,r)};eu.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},eu.prototype.url=function(t,e){var r,n,i,a,o,s=(r=this.x,n=this.y,i=this.z,a=Gc(256*r,256*(n=Math.pow(2,i)-n-1),i),o=Gc(256*(r+1),256*(n+1),i),a[0]+\",\"+a[1]+\",\"+o[0]+\",\"+o[1]),l=function(t,e,r){for(var n,i=\"\",a=t;a>0;a--)i+=(e&(n=1<this.canonical.z?new nu(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new nu(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},nu.prototype.calculateScaledKey=function(t,e){var r=this.canonical.z-t;return t>this.canonical.z?iu(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):iu(this.wrap*+e,t,t,this.canonical.x>>r,this.canonical.y>>r)},nu.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ>e&&t.canonical.y===this.canonical.y>>e},nu.prototype.children=function(t){if(this.overscaledZ>=t)return[new nu(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 nu(e,this.wrap,e,r,n),new nu(e,this.wrap,e,r+1,n),new nu(e,this.wrap,e,r,n+1),new nu(e,this.wrap,e,r+1,n+1)]},nu.prototype.isLessThan=function(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.y=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError(\"out of range source coordinates for DEM data\");return(e+1)*this.stride+(t+1)},au.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},au.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},au.prototype.getPixels=function(){return new Eo({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},au.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw new Error(\"dem dimension mismatch\");var n=e*this.dim,i=e*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(e){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:a=o-1;break;case 1:o=a+1}for(var s=-e*this.dim,l=-r*this.dim,c=a;c=0&&u[3]>=0&&s.insert(o,u[0],u[1],u[2],u[3])}},uu.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ls.VectorTile(new al(this.rawTileData)).layers,this.sourceLayerCoder=new ou(this.vtLayers?Object.keys(this.vtLayers).sort():[\"_geojsonTileLayer\"])),this.vtLayers},uu.prototype.query=function(t,e,r,n){var a=this;this.loadVTLayers();for(var o=t.params||{},s=8192/t.tileSize/t.scale,l=sn(o.filter),c=t.queryGeometry,u=t.queryPadding*s,f=hu(c),h=this.grid.query(f.minX-u,f.minY-u,f.maxX+u,f.maxY+u),p=hu(t.cameraQueryGeometry),d=this.grid3D.query(p.minX-u,p.minY-u,p.maxX+u,p.maxY+u,(function(e,r,n,a){return function(t,e,r,n,a){for(var o=0,s=t;o=l.x&&a>=l.y)return!0}var c=[new i(e,r),new i(e,a),new i(n,a),new i(n,r)];if(t.length>2)for(var u=0,f=c;u=0)return!0;return!1}(a,f)){var h=this.sourceLayerCoder.decode(r),p=this.vtLayers[h].feature(n);if(i.filter(new pi(this.tileID.overscaledZ),p))for(var d=this.getId(p,h),g=0;gn)i=!1;else if(e)if(this.expirationTimeot&&(t.getActor().send(\"enforceCacheSizeLimit\",at),ht=0)},t.clamp=l,t.clearTileCache=function(t){var e=self.caches.delete(\"mapbox-tiles\");t&&e.catch(t).then((function(){return t()}))},t.clipLine=ec,t.clone=function(t){var e=new fo(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},t.clone$1=x,t.clone$2=function(t){var e=new fo(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=tl,t.config=F,t.create=function(){var t=new fo(16);return fo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=function(){var t=new fo(9);return fo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},t.create$2=function(){var t=new fo(4);return fo!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=Wr,t.createLayout=Ii,t.createStyleLayer=function(t){return\"custom\"===t.type?new Dc(t):new Rc[t.type](t)},t.cross=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},t.deepEqual=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var n=0;n0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t},t.number=qe,t.offscreenCanvasSupported=pt,t.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},t.parseGlyphPBF=function(t){return new al(t).readFields(Tl,[])},t.pbf=al,t.performSymbolLayout=function(t,e,r,n,i,a,o){t.createArrays();var s=512*t.overscaling;t.tilePixelRatio=8192/s,t.compareText={},t.iconsNeedLinear=!1;var l=t.layers[0].layout,c=t.layers[0]._unevaluatedLayout._values,u={};if(\"composite\"===t.textSizeData.kind){var f=t.textSizeData,h=f.minZoom,p=f.maxZoom;u.compositeTextSizes=[c[\"text-size\"].possiblyEvaluate(new pi(h),o),c[\"text-size\"].possiblyEvaluate(new pi(p),o)]}if(\"composite\"===t.iconSizeData.kind){var d=t.iconSizeData,g=d.minZoom,m=d.maxZoom;u.compositeIconSizes=[c[\"icon-size\"].possiblyEvaluate(new pi(g),o),c[\"icon-size\"].possiblyEvaluate(new pi(m),o)]}u.layoutTextSize=c[\"text-size\"].possiblyEvaluate(new pi(t.zoom+1),o),u.layoutIconSize=c[\"icon-size\"].possiblyEvaluate(new pi(t.zoom+1),o),u.textMaxSize=c[\"text-size\"].possiblyEvaluate(new pi(18));for(var v=24*l.get(\"text-line-height\"),y=\"map\"===l.get(\"text-rotation-alignment\")&&\"point\"!==l.get(\"symbol-placement\"),x=l.get(\"text-keep-upright\"),b=l.get(\"text-size\"),w=function(){var a=k[T],s=l.get(\"text-font\").evaluate(a,{},o).join(\",\"),c=b.evaluate(a,{},o),f=u.layoutTextSize.evaluate(a,{},o),h=u.layoutIconSize.evaluate(a,{},o),p={horizontal:{},vertical:void 0},d=a.text,g=[0,0];if(d){var m=d.toString(),w=24*l.get(\"text-letter-spacing\").evaluate(a,{},o),A=function(t){for(var e=0,r=t;e=8192||f.y<0||f.y>=8192||function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,w,T,k,A){var M,S,E,L,C,P=t.addToLineVertexArray(e,r),I=0,O=0,z=0,D=0,R=-1,F=-1,B={},N=ya(\"\"),j=0,U=0;void 0===s._unevaluatedLayout.getValue(\"text-radial-offset\")?(M=s.layout.get(\"text-offset\").evaluate(b,{},k).map((function(t){return 24*t})),j=M[0],U=M[1]):(j=24*s.layout.get(\"text-radial-offset\").evaluate(b,{},k),U=pc);if(t.allowVerticalPlacement&&n.vertical){var V=s.layout.get(\"text-rotate\").evaluate(b,{},k)+90,H=n.vertical;L=new sc(l,e,c,u,f,H,h,p,d,V),o&&(C=new sc(l,e,c,u,f,o,m,v,d,V))}if(i){var q=s.layout.get(\"icon-rotate\").evaluate(b,{}),G=\"none\"!==s.layout.get(\"icon-text-fit\"),Y=rc(i,q,T,G),W=o?rc(o,q,T,G):void 0;E=new sc(l,e,c,u,f,i,m,v,!1,q),I=4*Y.length;var X=t.iconSizeData,Z=null;\"source\"===X.kind?(Z=[128*s.layout.get(\"icon-size\").evaluate(b,{})])[0]>32640&&_(t.layerIds[0]+': Value for \"icon-size\" is >= 255. Reduce your \"icon-size\".'):\"composite\"===X.kind&&((Z=[128*w.compositeIconSizes[0].evaluate(b,{},k),128*w.compositeIconSizes[1].evaluate(b,{},k)])[0]>32640||Z[1]>32640)&&_(t.layerIds[0]+': Value for \"icon-size\" is >= 255. Reduce your \"icon-size\".'),t.addSymbols(t.icon,Y,Z,x,y,b,!1,e,P.lineStartIndex,P.lineLength,-1,k),R=t.icon.placedSymbolArray.length-1,W&&(O=4*W.length,t.addSymbols(t.icon,W,Z,x,y,b,Cl.vertical,e,P.lineStartIndex,P.lineLength,-1,k),F=t.icon.placedSymbolArray.length-1)}for(var J in n.horizontal){var K=n.horizontal[J];if(!S){N=ya(K.text);var Q=s.layout.get(\"text-rotate\").evaluate(b,{},k);S=new sc(l,e,c,u,f,K,h,p,d,Q)}var $=1===K.positionedLines.length;if(z+=mc(t,e,K,a,s,d,b,g,P,n.vertical?Cl.horizontal:Cl.horizontalOnly,$?Object.keys(n.horizontal):[J],B,R,w,k),$)break}n.vertical&&(D+=mc(t,e,n.vertical,a,s,d,b,g,P,Cl.vertical,[\"vertical\"],B,F,w,k));var tt=S?S.boxStartIndex:t.collisionBoxArray.length,et=S?S.boxEndIndex:t.collisionBoxArray.length,rt=L?L.boxStartIndex:t.collisionBoxArray.length,nt=L?L.boxEndIndex:t.collisionBoxArray.length,it=E?E.boxStartIndex:t.collisionBoxArray.length,at=E?E.boxEndIndex:t.collisionBoxArray.length,ot=C?C.boxStartIndex:t.collisionBoxArray.length,st=C?C.boxEndIndex:t.collisionBoxArray.length,lt=-1,ct=function(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e};lt=ct(S,lt),lt=ct(L,lt),lt=ct(E,lt);var ut=(lt=ct(C,lt))>-1?1:0;ut&&(lt*=A/24);t.glyphOffsetArray.length>=Mc.MAX_GLYPHS&&_(\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\");void 0!==b.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey);t.symbolInstances.emplaceBack(e.x,e.y,B.right>=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,R,F,N,tt,et,rt,nt,it,at,ot,st,c,z,D,I,O,ut,0,h,j,U,lt)}(t,f,s,r,n,i,h,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,v,w,A,l,x,T,M,d,e,a,c,u,o)};if(\"line\"===S)for(var P=0,I=ec(e.geometry,0,0,8192,8192);P1){var V=$l(U,k,r.vertical||g,n,24,y);V&&C(U,V)}}else if(\"Polygon\"===e.type)for(var H=0,q=hs(e.geometry,0);H=E.maxzoom))if(\"none\"!==E.visibility)o(S,this.zoom,n),(g[E.id]=E.createBucket({index:u.bucketLayerIDs.length,layers:S,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:b,sourceID:this.source})).populate(_,m,this.tileID.canonical),u.bucketLayerIDs.push(S.map((function(t){return t.id})))}}}var L=t.mapObject(m.glyphDependencies,(function(t){return Object.keys(t).map(Number)}));Object.keys(L).length?a.send(\"getGlyphs\",{uid:this.uid,stacks:L},(function(t,e){f||(f=t,h=e,I.call(l))})):h={};var C=Object.keys(m.iconDependencies);C.length?a.send(\"getImages\",{icons:C,source:this.source,tileID:this.tileID,type:\"icons\"},(function(t,e){f||(f=t,p=e,I.call(l))})):p={};var P=Object.keys(m.patternDependencies);function I(){if(f)return s(f);if(h&&p&&d){var e=new i(h),r=new t.ImageAtlas(p,d);for(var a in g){var l=g[a];l instanceof t.SymbolBucket?(o(l.layers,this.zoom,n),t.performSymbolLayout(l,h,e.positions,p,r.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof t.LineBucket||l instanceof t.FillBucket||l instanceof t.FillExtrusionBucket)&&(o(l.layers,this.zoom,n),l.addFeatures(m,this.tileID.canonical,r.patternPositions))}this.status=\"done\",s(null,{buckets:t.values(g).filter((function(t){return!t.isEmpty()})),featureIndex:u,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?e.positions:null})}}P.length?a.send(\"getImages\",{icons:P,source:this.source,tileID:this.tileID,type:\"patterns\"},(function(t,e){f||(f=t,d=e,I.call(l))})):d={},I.call(this)};var l=function(t,e,r,n){this.actor=t,this.layerIndex=e,this.availableImages=r,this.loadVectorData=n||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(e,r){var n=this,i=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request),s=this.loading[i]=new a(e);s.abort=this.loadVectorData(e,(function(e,a){if(delete n.loading[i],e||!a)return s.status=\"done\",n.loaded[i]=s,r(e);var l=a.rawData,c={};a.expires&&(c.expires=a.expires),a.cacheControl&&(c.cacheControl=a.cacheControl);var u={};if(o){var f=o.finish();f&&(u.resourceTiming=JSON.parse(JSON.stringify(f)))}s.vectorTile=a.vectorTile,s.parse(a.vectorTile,n.layerIndex,n.availableImages,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]=s}))},l.prototype.reloadTile=function(t,e){var r=this,n=this.loaded,i=t.uid,a=this;if(n&&n[i]){var o=n[i];o.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,n){var i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,a.layerIndex,r.availableImages,a.actor,i)),e(t,n)};\"parsing\"===o.status?o.reloadCallback=s:\"done\"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.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()},l.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var c=t.window.ImageBitmap,u=function(){this.loaded={}};u.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,a=e.rawImageData,o=c&&a instanceof c?this.getImageData(a):a,s=new t.DEMData(n,o,i);this.loaded=this.loaded||{},this.loaded[n]=s,r(null,s)},u.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext(\"2d\")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var r=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:r.width,height:r.height},r.data)},u.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var f=function t(e,r){var n,i=e&&e.type;if(\"FeatureCollection\"===i)for(n=0;n=0!=!!e&&t.reverse()}var d=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,g=function(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,\"id\"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};g.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r>31}function P(t,e){for(var r=t.loadGeometry(),n=t.type,i=0,a=0,o=r.length,s=0;s>1;!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),h=Math.max(i,Math.floor(n-l*u/s+f)),p=Math.min(a,Math.floor(n+(s-l)*u/s+f));t(e,r,n,h,p,o)}var d=r[2*n+o],g=i,m=a;for(z(e,r,i,n),r[2*a+o]>d&&z(e,r,i,a);gd;)m--}r[2*i+o]===d?z(e,r,i,m):(m++,z(e,r,m,a)),m<=n&&(i=m+1),n<=m&&(a=m-1)}}(t,e,o,n,i,a%2),O(t,e,r,n,o-1,a+1),O(t,e,r,o+1,i,a+1)}}function z(t,e,r,n){D(t,r,n),D(e,2*r,2*n),D(e,2*r+1,2*n+1)}function D(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function R(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}_.fromVectorTileJs=w,_.fromGeojsonVt=T,_.GeoJSONWrapper=k;var F=function(t){return t[0]},B=function(t){return t[1]},N=function(t,e,r,n,i){void 0===e&&(e=F),void 0===r&&(r=B),void 0===n&&(n=64),void 0===i&&(i=Float64Array),this.nodeSize=n,this.points=t;for(var a=t.length<65536?Uint16Array:Uint32Array,o=this.ids=new a(t.length),s=this.coords=new i(2*t.length),l=0;l=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 m=(f+1)%2;(0===f?r<=s:n<=l)&&(c.push(p),c.push(g-1),c.push(m)),(0===f?i>=s:a>=l)&&(c.push(g+1),c.push(h),c.push(m))}}return u}(this.ids,this.coords,t,e,r,n,this.nodeSize)},N.prototype.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++)R(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];R(d,g,r,n)<=l&&s.push(t[p]);var m=(c+1)%2;(0===c?r-i<=d:n-i<=g)&&(o.push(f),o.push(p-1),o.push(m)),(0===c?r+i>=d:n+i>=g)&&(o.push(p+1),o.push(u),o.push(m))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var j={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},U=function(t){this.options=X(Object.create(j),t),this.trees=new Array(this.options.maxZoom+1)};function V(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function H(t,e){var r=t.geometry.coordinates,n=r[0],i=r[1];return{x:Y(n),y:W(i),zoom:1/0,index:e,parentId:-1}}function q(t){return{type:\"Feature\",id:t.id,properties:G(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 G(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+\"k\":e>=1e3?Math.round(e/100)/10+\"k\":e;return X(X({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function Y(t){return t/360+.5}function W(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 X(t,e){for(var r in e)t[r]=e[r];return t}function Z(t){return t.x}function J(t){return t.y}function K(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 Q(t,e,r,n){var i={id:void 0===t?null:t,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)$(t,e);else if(\"Polygon\"===r||\"MultiLineString\"===r)for(var n=0;n0&&(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=n-r>>1,l=n-r,c=e[r],u=e[r+1],f=e[n],h=e[n+1],p=r+3;po)a=p,o=d;else if(d===o){var g=Math.abs(p-s);gi&&(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 nt(t,e,r,n){for(var i=0;i1?1:r}function ot(t,e,r,n,i,a,o,s){if(n/=e,a>=(r/=e)&&o=n)return null;for(var l=[],c=0;c=r&&d=n)){var g=[];if(\"Point\"===h||\"MultiPoint\"===h)st(f,g,r,n,i);else if(\"LineString\"===h)lt(f,g,r,n,i,!1,s.lineMetrics);else if(\"MultiLineString\"===h)ut(f,g,r,n,i,!1);else if(\"Polygon\"===h)ut(f,g,r,n,i,!0);else if(\"MultiPolygon\"===h)for(var m=0;m=r&&o<=n&&(e.push(t[a]),e.push(t[a+1]),e.push(t[a+2]))}}function lt(t,e,r,n,i,a,o){for(var s,l,c=ct(t),u=0===i?ht:pt,f=t.start,h=0;hr&&(l=u(c,p,d,m,v,r),o&&(c.start=f+s*l)):y>n?x=r&&(l=u(c,p,d,m,v,r),b=!0),x>n&&y<=n&&(l=u(c,p,d,m,v,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&&ft(c,p,d,g),_=c.length-3,a&&_>=3&&(c[_]!==c[0]||c[_+1]!==c[1])&&ft(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 ut(t,e,r,n,i,a){for(var o=0;oo.maxX&&(o.maxX=u),f>o.maxY&&(o.maxY=f)}return o}function xt(t,e,r,n){var i=e.geometry,a=e.type,o=[];if(\"Point\"===a||\"MultiPoint\"===a)for(var s=0;s0&&e.size<(i?o:n))r.numPoints+=e.length/3;else{for(var s=[],l=0;lo)&&(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;n0===e)for(n=0,i=t.length;n24)throw new Error(\"maxZoom should be in the 0-24 range\");if(e.promoteId&&e.generateId)throw new Error(\"promoteId and generateId cannot be used together.\");var n=function(t,e){var r=[];if(\"FeatureCollection\"===t.type)for(var n=0;n=n;c--){var u=+Date.now();s=this._cluster(s,c),this.trees[c]=new N(s,Z,J,a,Float32Array),r&&console.log(\"z%d: %d clusters in %dms\",c,s.length,+Date.now()-u)}return r&&console.timeEnd(\"total time\"),this},U.prototype.getClusters=function(t,e){var r=((t[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,i=180;else if(r>i){var o=this.getClusters([r,n,180,a],e),s=this.getClusters([-180,n,i,a],e);return o.concat(s)}for(var l=this.trees[this._limitZoom(e)],c=[],u=0,f=l.range(Y(r),W(a),Y(i),W(n));u1?this._map(c,!0):null,m=(l<<5)+(e+1)+this.points.length,v=0,y=f;v>5},U.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},U.prototype._map=function(t,e){if(t.numPoints)return e?X({},t.properties):t.properties;var r=this.points[t.index].properties,n=this.options.map(r);return e&&n===r?X({},n):n},_t.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},_t.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<1&&console.time(\"creation\"),h=this.tiles[f]=yt(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<1&&console.time(\"clipping\");var g,m,v,y,x,b,_=.5*l.buffer/l.extent,w=.5-_,T=.5+_,k=1+_;g=m=v=y=null,x=ot(t,u,r-_,r+T,0,h.minX,h.maxX,l),b=ot(t,u,r+w,r+k,0,h.minX,h.maxX,l),t=null,x&&(g=ot(x,u,n-_,n+T,1,h.minY,h.maxY,l),m=ot(x,u,n+w,n+k,1,h.minY,h.maxY,l),x=null),b&&(v=ot(b,u,n-_,n+T,1,h.minY,h.maxY,l),y=ot(b,u,n+w,n+k,1,h.minY,h.maxY,l),b=null),c>1&&console.timeEnd(\"clipping\"),s.push(g||[],e+1,2*r,2*n),s.push(m||[],e+1,2*r,2*n+1),s.push(v||[],e+1,2*r+1,2*n),s.push(y||[],e+1,2*r+1,2*n+1)}}},_t.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<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[wt(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]?mt(this.tiles[s],i):null):null};var kt=function(e){function r(t,r,n,i){e.call(this,t,r,n,Tt),i&&(this.loadGeoJSON=i)}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 e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(n&&n.request&&n.request.collectResourceTiming)&&new t.RequestPerformance(n.request);this.loadGeoJSON(n,(function(a,o){if(a||!o)return r(a);if(\"object\"!=typeof o)return r(new Error(\"Input data given to '\"+n.source+\"' is not a valid GeoJSON object.\"));f(o,!0);try{e._geoJSONIndex=n.cluster?new U(function(e){var r=e.superclusterOptions,n=e.clusterProperties;if(!n||!r)return r;for(var i={},a={},o={accumulated:null,zoom:0},s={properties:null},l=Object.keys(n),c=0,u=l;c=0?0:e.button},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var h=function(e){function r(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requesters=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requesters;e=0?1.2:1))}function v(t,e,r,n,i,a,o){for(var s=0;s65535)e(new Error(\"glyphs > 65535 not supported\"));else if(a.ranges[s])e(null,{stack:r,id:i,glyph:o});else{var l=a.requests[s];l||(l=a.requests[s]=[],x.loadGlyphRange(r,s,n.url,n.requestManager,(function(t,e){if(e){for(var r in e)n._doesCharSupportLocalGlyph(+r)||(a.glyphs[+r]=e[+r]);a.ranges[s]=!0}for(var i=0,o=l;i1&&(l=t[++s]);var u=Math.abs(c-l.left),f=Math.abs(c-l.right),h=Math.min(u,f),p=void 0,d=i/r*(n+1);if(l.isDash){var g=n-Math.abs(d);p=Math.sqrt(h*h+g*g)}else p=n-Math.sqrt(h*h+d*d);this.data[o+c]=Math.max(0,Math.min(255,p+128))}},T.prototype.addRegularDash=function(t){for(var e=t.length-1;e>=0;--e){var r=t[e],n=t[e+1];r.zeroLength?t.splice(e,1):n&&n.isDash===r.isDash&&(n.left=r.left,t.splice(e,1))}var i=t[0],a=t[t.length-1];i.isDash===a.isDash&&(i.left=a.left-this.width,a.right=i.right+this.width);for(var o=this.width*this.nextRow,s=0,l=t[s],c=0;c1&&(l=t[++s]);var u=Math.abs(c-l.left),f=Math.abs(c-l.right),h=Math.min(u,f),p=l.isDash?h:-h;this.data[o+c]=Math.max(0,Math.min(255,p+128))}},T.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=n&&e.x=i&&e.y0&&(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+10&&(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)r.fire(new t.ErrorEvent(e));else{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.getClusterExpansionZoom=function(t,e){return this.actor.send(\"geojson.getClusterExpansionZoom\",{clusterId:t,source:this.id},e),this},r.prototype.getClusterChildren=function(t,e){return this.actor.send(\"geojson.getClusterChildren\",{clusterId:t,source:this.id},e),this},r.prototype.getClusterLeaves=function(t,e,r,n){return this.actor.send(\"geojson.getClusterLeaves\",{source:this.id,clusterId:t,limit:e,offset:r},n),this},r.prototype._updateWorkerData=function(e){var r=this;this._loaded=!1;var n=t.extend({},this.workerOptions),i=this._data;\"string\"==typeof i?(n.request=this.map._requestManager.transformRequest(t.browser.resolveURL(i),t.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(i),this.actor.send(this.type+\".loadData\",n,(function(t,i){r._removed||i&&i.abandoned||(r._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[r.id]&&(r._resourceTiming=i.resourceTiming[r.id].slice(0)),r.actor.send(r.type+\".coalesce\",{source:n.source},null),e(t))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(e,r){var n=this,i=e.actor?\"reloadTile\":\"loadTile\";e.actor=this.actor;var a={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};e.request=this.actor.send(i,a,(function(t,a){return delete e.request,e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(a,n.map.painter,\"reloadTile\"===i),r(null))}))},r.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.actor.send(\"removeTile\",{uid:t.uid,type:this.type,source:this.id})},r.prototype.onRemove=function(){this._removed=!0,this.actor.send(\"removeSource\",{type:this.type,source:this.id})},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),P=t.createLayout([{name:\"a_pos\",type:\"Int16\",components:2},{name:\"a_texture_pos\",type:\"Int16\",components:2}]),I=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._loaded=!1,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(e,r){var n=this;this._loaded=!1,this.fire(new t.Event(\"dataloading\",{dataType:\"source\"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),(function(i,a){n._loaded=!0,i?n.fire(new t.ErrorEvent(i)):a&&(n.image=a,e&&(n.coordinates=e),r&&r(),n._finishLoading())}))},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,(function(){e.texture=null})),this):this},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){var r=this;this.coordinates=e;var n=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var r=1/0,n=1/0,i=-1/0,a=-1/0,o=0,s=e;or.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+this.id,null,\"Playback for this video can be set only between the \"+r.start(0)+\" and \"+r.end(0)+\"-second mark.\"))):this.video.currentTime=e}},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 e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,P.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,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:\"video\",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(I),z=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.ValidationError(\"sources.\"+r,null,'\"coordinates\" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+r,null,'missing required property \"coordinates\"'))),n.animate&&\"boolean\"!=typeof n.animate&&this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+r,null,'optional \"animate\" property must be a boolean value'))),n.canvas?\"string\"==typeof n.canvas||n.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError(\"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.ValidationError(\"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._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.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.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),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 e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,P.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var a=this.tiles[i];\"loaded\"!==a.state&&(a.state=\"loaded\",a.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];tthis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},N.prototype.has=function(t){return t.wrapped().key in this.data},N.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},N.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},N.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},N.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},N.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},N.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},N.prototype.filter=function(t){var e=[];for(var r in this.data)for(var n=0,i=this.data[r];n1||(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._retainLoadedChildren=function(t,e,r,n){for(var i in this._tiles){var a=this._tiles[i];if(!(n[i]||!a.hasData()||a.tileID.overscaledZ<=e||a.tileID.overscaledZ>r)){for(var o=a.tileID;a&&a.tileID.overscaledZ>e+1;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);(a=this._tiles[s.key])&&a.hasData()&&(o=s)}for(var l=o;l.overscaledZ>e;)if(t[(l=l.scaledTo(l.overscaledZ-1)).key]){n[o.key]=o;break}}}},r.prototype.findLoadedParent=function(t,e){if(t.key in this._loadedParentTiles){var r=this._loadedParentTiles[t.key];return r&&r.tileID.overscaledZ>=e?r:null}for(var n=t.overscaledZ-1;n>=e;n--){var i=t.scaledTo(n),a=this._getLoadedTile(i);if(a)return a}},r.prototype._getLoadedTile=function(t){var e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},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 a=e.coveringZoomLevel(this._source),o=Math.max(a-r.maxOverzooming,this._source.minzoom),s=Math.max(a+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,a);if(It(this._source.type)){for(var c={},u={},f=0,h=Object.keys(l);fthis._source.maxzoom){var m=d.children(this._source.maxzoom)[0],v=this.getTile(m);if(v&&v.hasData()){n[m.key]=m;continue}}else{var y=d.children(this._source.maxzoom);if(n[y[0].key]&&n[y[1].key]&&n[y[2].key]&&n[y[3].key])continue}for(var x=g.wasRequested(),b=d.overscaledZ-1;b>=a;--b){var _=d.scaledTo(b);if(i[_.key])break;if(i[_.key]=!0,!(g=this.getTile(_))&&x&&(g=this._addTile(_)),g&&(n[_.key]=_,x=g.wasRequested(),g.hasData()))break}}}return n},r.prototype._updateLoadedParentTileCache=function(){for(var t in this._loadedParentTiles={},this._tiles){for(var e=[],r=void 0,n=this._tiles[t].tileID;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}e.push(n.key);var i=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(i))break;n=i}for(var a=0,o=e;a0||(e.hasData()&&\"reloading\"!==e.state?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,n){var i=this,a=[],o=this.transform;if(!o)return a;for(var s=n?o.getCameraQueryGeometry(e):e,l=e.map((function(t){return o.pointCoordinate(t)})),c=s.map((function(t){return o.pointCoordinate(t)})),u=this.getIds(),f=1/0,h=1/0,p=-1/0,d=-1/0,g=0,m=c;g=0&&v[1].y+m>=0){var y=l.map((function(t){return s.getTilePoint(t)})),x=c.map((function(t){return s.getTilePoint(t)}));a.push({tile:n,tileID:s,queryGeometry:y,cameraQueryGeometry:x,scale:g})}}},x=0;x=t.browser.now())return!0}return!1},r.prototype.setFeatureState=function(t,e,r){t=t||\"_geojsonTileLayer\",this._state.updateState(t,e,r)},r.prototype.removeFeatureState=function(t,e,r){t=t||\"_geojsonTileLayer\",this._state.removeFeatureState(t,e,r)},r.prototype.getFeatureState=function(t,e){return t=t||\"_geojsonTileLayer\",this._state.getState(t,e)},r.prototype.setDependencies=function(t,e,r){var n=this._tiles[t];n&&n.setDependencies(e,r)},r.prototype.reloadTilesForDependencies=function(t,e){for(var r in this._tiles){this._tiles[r].hasDependency(t,e)&&this._reloadTile(r,\"reloading\")}this._cache.filter((function(r){return!r.hasDependency(t,e)}))},r}(t.Evented);function Pt(t,e){var r=Math.abs(2*t.wrap)-+(t.wrap<0),n=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||n-r||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function It(t){return\"raster\"===t||\"image\"===t||\"video\"===t}function Ot(){return new t.window.Worker(Zi.workerUrl)}Ct.maxOverzooming=10,Ct.maxUnderzooming=3;var zt=\"mapboxgl_preloaded_worker_pool\",Dt=function(){this.active={}};Dt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length0?(i-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))};var Kt=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=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function ne(e,r,n,i,a,o,s,l){var c=i?e.textSizeData:e.iconSizeData,u=t.evaluateSizeForZoom(c,n.transform.zoom),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,m=!1,v=0;vMath.abs(n.x-r.x)*i)return{useVertical:!0};return(e===t.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function oe(e,r,n,i,a,o,s,l,c,u,f,h,p,d){var g,m=r/24,v=e.lineOffsetX*m,y=e.lineOffsetY*m;if(e.numGlyphs>1){var x=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,_=e.lineStartIndex+e.lineLength,w=ie(m,l,v,y,n,f,h,e,c,o,p);if(!w)return{notEnoughRoom:!0};var T=te(w.first.point,s).point,k=te(w.last.point,s).point;if(i&&!n){var A=ae(e.writingMode,T,k,d);if(A)return A}g=[w.first];for(var M=e.glyphStartIndex+1;M0?C.point:se(h,L,S,1,a),I=ae(e.writingMode,S,P,d);if(I)return I}var O=le(m*l.getoffsetX(e.glyphStartIndex),v,y,n,f,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,c,o,p);if(!O)return{notEnoughRoom:!0};g=[O]}for(var z=0,D=g;z0?1:-1,g=0;i&&(d*=-1,g=Math.PI),d<0&&(g+=Math.PI);for(var m=d>0?l+s:l+s+1,v=a,y=a,x=0,b=0,_=Math.abs(p),w=[];x+b<=_;){if((m+=d)=c)return null;if(y=v,w.push(v),void 0===(v=h[m])){var T=new t.Point(u.getx(m),u.gety(m)),k=te(T,f);if(k.signedDistanceFromCamera>0)v=h[m]=k.point;else{var A=m-d;v=se(0===x?o:new t.Point(u.getx(A),u.gety(A)),T,y,_-x+1,f)}}x+=b,b=y.dist(v)}var M=(_-x)/b,S=v.sub(y),E=S.mult(M)._add(y);E._add(S._unit()._perp()._mult(n*d));var L=g+Math.atan2(v.y-y.y,v.x-y.x);return w.push(E),{point:E,angle:L,path:w}}Kt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Kt.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)},Kt.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)},Kt.prototype._insertBoxCell=function(t,e,r,n,i,a){this.boxCells[i].push(a)},Kt.prototype._insertCircleCell=function(t,e,r,n,i,a){this.circleCells[i].push(a)},Kt.prototype._query=function(t,e,r,n,i,a){if(r<0||t>this.width||n<0||e>this.height)return!i&&[];var o=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var s=0;s0:o},Kt.prototype._queryCircle=function(t,e,r,n,i){var a=t-r,o=t+r,s=e-r,l=e+r;if(o<0||a>this.width||l<0||s>this.height)return!n&&[];var c=[],u={hitTest:n,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(a,s,o,l,this._queryCellCircle,c,u,i),n?c.length>0:c},Kt.prototype.query=function(t,e,r,n,i){return this._query(t,e,r,n,!1,i)},Kt.prototype.hitTest=function(t,e,r,n,i){return this._query(t,e,r,n,!0,i)},Kt.prototype.hitTestCircle=function(t,e,r,n){return this._queryCircle(t,e,r,!0,n)},Kt.prototype._queryCell=function(t,e,r,n,i,a,o,s){var l=o.seenUids,c=this.boxCells[i];if(null!==c)for(var u=this.bboxes,f=0,h=c;f=u[d+0]&&n>=u[d+1]&&(!s||s(this.boxKeys[p]))){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[p],x1:u[d],y1:u[d+1],x2:u[d+2],y2:u[d+3]})}}}var g=this.circleCells[i];if(null!==g)for(var m=this.circles,v=0,y=g;vo*o+s*s},Kt.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 ce=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ue(t,e){for(var r=0;r=1;P--)C.push(E.path[P]);for(var I=1;I0){for(var R=C[0].clone(),F=C[0].clone(),B=1;B=A.x&&F.x<=M.x&&R.y>=A.y&&F.y<=M.y?[C]:F.xM.x||F.yM.y?[]:t.clipLine([C],A.x,A.y,M.x,M.y)}for(var N=0,j=D;N=this.screenRightBoundary||n<100||e>this.screenBottomBoundary},he.prototype.isInsideGrid=function(t,e,r,n){return r>=0&&t=0&&e0)return this.prevPlacement&&this.prevPlacement.variableOffsets[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID].text&&(g=this.prevPlacement.variableOffsets[f.crossTileID].anchor),this.variableOffsets[f.crossTileID]={textOffset:m,width:r,height:n,anchor:t,textBoxScale:i,prevAnchor:g},this.markUsedJustification(h,t,f,p),h.allowVerticalPlacement&&(this.markUsedOrientation(h,p,f),this.placedOrientations[f.crossTileID]=p),{shift:v,placedGlyphBoxes:y}},we.prototype.placeLayerBucketPart=function(e,r,n){var i=this,a=e.parameters,o=a.bucket,s=a.layout,l=a.posMatrix,c=a.textLabelPlaneMatrix,u=a.labelToScreenMatrix,f=a.textPixelRatio,h=a.holdingForFade,p=a.collisionBoxArray,d=a.partiallyEvaluatedTextSize,g=a.collisionGroup,m=s.get(\"text-optional\"),v=s.get(\"icon-optional\"),y=s.get(\"text-allow-overlap\"),x=s.get(\"icon-allow-overlap\"),b=\"map\"===s.get(\"text-rotation-alignment\"),_=\"map\"===s.get(\"text-pitch-alignment\"),w=\"none\"!==s.get(\"icon-text-fit\"),T=\"viewport-y\"===s.get(\"symbol-z-order\"),k=y&&(x||!o.hasIconData()||v),A=x&&(y||!o.hasTextData()||m);!o.collisionArrays&&p&&o.deserializeCollisionBoxes(p);var M=function(e,a){if(!r[e.crossTileID])if(h)i.placements[e.crossTileID]=new me(!1,!1,!1);else{var p,T=!1,M=!1,S=!0,E=null,L={box:null,offscreen:null},C={box:null,offscreen:null},P=null,I=null,O=0,z=0,D=0;a.textFeatureIndex?O=a.textFeatureIndex:e.useRuntimeCollisionCircles&&(O=e.featureIndex),a.verticalTextFeatureIndex&&(z=a.verticalTextFeatureIndex);var R=a.textBox;if(R){var F=function(r){var n=t.WritingMode.horizontal;if(o.allowVerticalPlacement&&!r&&i.prevPlacement){var a=i.prevPlacement.placedOrientations[e.crossTileID];a&&(i.placedOrientations[e.crossTileID]=a,n=a,i.markUsedOrientation(o,n,e))}return n},B=function(r,n){if(o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&a.verticalTextBox)for(var i=0,s=o.writingModes;i0&&(N=N.filter((function(t){return t!==j.anchor}))).unshift(j.anchor)}var U=function(t,r,n){for(var a=t.x2-t.x1,s=t.y2-t.y1,c=e.textBoxScale,u=w&&!x?r:null,h={box:[],offscreen:!1},p=y?2*N.length:N.length,d=0;d=N.length,k=i.attemptAnchorPlacement(m,t,a,s,c,b,_,f,l,g,v,e,o,n,u);if(k&&(h=k.placedGlyphBoxes)&&h.box&&h.box.length){T=!0,E=k.shift;break}}return h};B((function(){return U(R,a.iconBox,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox,n=L&&L.box&&L.box.length;return o.allowVerticalPlacement&&!n&&e.numVerticalGlyphVertices>0&&r?U(r,a.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}})),L&&(T=L.box,S=L.offscreen);var V=F(L&&L.box);if(!T&&i.prevPlacement){var H=i.prevPlacement.variableOffsets[e.crossTileID];H&&(i.variableOffsets[e.crossTileID]=H,i.markUsedJustification(o,H.anchor,e,V))}}else{var q=function(t,r){var n=i.collisionIndex.placeCollisionBox(t,y,f,l,g.predicate);return n&&n.box&&n.box.length&&(i.markUsedOrientation(o,r,e),i.placedOrientations[e.crossTileID]=r),n};B((function(){return q(R,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox;return o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?q(r,t.WritingMode.vertical):{box:null,offscreen:null}})),F(L&&L.box&&L.box.length)}}if(T=(p=L)&&p.box&&p.box.length>0,S=p&&p.offscreen,e.useRuntimeCollisionCircles){var G=o.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),Y=t.evaluateSizeForFeature(o.textSizeData,d,G),W=s.get(\"text-padding\"),X=e.collisionCircleDiameter;P=i.collisionIndex.placeCollisionCircles(y,G,o.lineVertexArray,o.glyphOffsetArray,Y,l,c,u,n,_,g.predicate,X,W),T=y||P.circles.length>0&&!P.collisionDetected,S=S&&P.offscreen}if(a.iconFeatureIndex&&(D=a.iconFeatureIndex),a.iconBox){var Z=function(t){var e=w&&E?_e(t,E.x,E.y,b,_,i.transform.angle):t;return i.collisionIndex.placeCollisionBox(e,x,f,l,g.predicate)};M=C&&C.box&&C.box.length&&a.verticalIconBox?(I=Z(a.verticalIconBox)).box.length>0:(I=Z(a.iconBox)).box.length>0,S=S&&I.offscreen}var J=m||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,K=v||0===e.numIconVertices;if(J||K?K?J||(M=M&&T):T=M&&T:M=T=M&&T,T&&p&&p.box&&(C&&C.box&&z?i.collisionIndex.insertCollisionBox(p.box,s.get(\"text-ignore-placement\"),o.bucketInstanceId,z,g.ID):i.collisionIndex.insertCollisionBox(p.box,s.get(\"text-ignore-placement\"),o.bucketInstanceId,O,g.ID)),M&&I&&i.collisionIndex.insertCollisionBox(I.box,s.get(\"icon-ignore-placement\"),o.bucketInstanceId,D,g.ID),P&&(T&&i.collisionIndex.insertCollisionCircles(P.circles,s.get(\"text-ignore-placement\"),o.bucketInstanceId,O,g.ID),n)){var Q=o.bucketInstanceId,$=i.collisionCircleArrays[Q];void 0===$&&($=i.collisionCircleArrays[Q]=new ve);for(var tt=0;tt=0;--E){var L=S[E];M(o.symbolInstances.get(L),o.collisionArrays[L])}else for(var C=e.symbolInstanceStart;C=0&&(e.text.placedSymbolArray.get(c).crossTileID=a>=0&&c!==a?0:n.crossTileID)}},we.prototype.markUsedOrientation=function(e,r,n){for(var i=r===t.WritingMode.horizontal||r===t.WritingMode.horizontalOnly?r:0,a=r===t.WritingMode.vertical?r:0,o=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];o0||l>0,x=a.numIconVertices>0,b=i.placedOrientations[a.crossTileID],_=b===t.WritingMode.vertical,w=b===t.WritingMode.horizontal||b===t.WritingMode.horizontalOnly;if(y){var T=Pe(v.text),k=_?Ie:T;d(e.text,s,k);var A=w?Ie:T;d(e.text,l,A);var M=v.text.isHidden();[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach((function(t){t>=0&&(e.text.placedSymbolArray.get(t).hidden=M||_?1:0)})),a.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).hidden=M||w?1:0);var S=i.variableOffsets[a.crossTileID];S&&i.markUsedJustification(e,S.anchor,a,b);var E=i.placedOrientations[a.crossTileID];E&&(i.markUsedJustification(e,\"left\",a,E),i.markUsedOrientation(e,E,a))}if(x){var L=Pe(v.icon),C=!(h&&a.verticalPlacedIconSymbolIndex&&_);if(a.placedIconSymbolIndex>=0){var P=C?L:Ie;d(e.icon,a.numIconVertices,P),e.icon.placedSymbolArray.get(a.placedIconSymbolIndex).hidden=v.icon.isHidden()}if(a.verticalPlacedIconSymbolIndex>=0){var I=C?Ie:L;d(e.icon,a.numVerticalIconVertices,I),e.icon.placedSymbolArray.get(a.verticalPlacedIconSymbolIndex).hidden=v.icon.isHidden()}}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var O=e.collisionArrays[n];if(O){var z=new t.Point(0,0);if(O.textBox||O.verticalTextBox){var D=!0;if(c){var R=i.variableOffsets[g];R?(z=be(R.anchor,R.width,R.height,R.textOffset,R.textBoxScale),u&&z._rotate(f?i.transform.angle:-i.transform.angle)):D=!1}O.textBox&&Te(e.textCollisionBox.collisionVertexArray,v.text.placed,!D||_,z.x,z.y),O.verticalTextBox&&Te(e.textCollisionBox.collisionVertexArray,v.text.placed,!D||w,z.x,z.y)}var F=Boolean(!w&&O.verticalIconBox);O.iconBox&&Te(e.iconCollisionBox.collisionVertexArray,v.icon.placed,F,h?z.x:0,h?z.y:0),O.verticalIconBox&&Te(e.iconCollisionBox.collisionVertexArray,v.icon.placed,!F,h?z.x:0,h?z.y:0)}}},m=0;mt},we.prototype.setStale=function(){this.stale=!0};var ke=Math.pow(2,25),Ae=Math.pow(2,24),Me=Math.pow(2,17),Se=Math.pow(2,16),Ee=Math.pow(2,9),Le=Math.pow(2,8),Ce=Math.pow(2,1);function Pe(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*ke+e*Ae+r*Me+e*Se+r*Ee+e*Le+r*Ce+e}var Ie=0,Oe=function(t){this._sortAcrossTiles=\"viewport-y\"!==t.layout.get(\"symbol-z-order\")&&void 0!==t.layout.get(\"symbol-sort-key\").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Oe.prototype.continuePlacement=function(t,e,r,n,i){for(var a=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=r[e[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if(\"symbol\"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new Oe(s)),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},ze.prototype.commit=function(t){return this.placement.commit(t),this.placement};var De=512/t.EXTENT/2,Re=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;nt.overscaledZ)for(var s in o){var l=o[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,i)}else{var c=o[t.scaledTo(Number(a)).key];c&&c.findMatches(e.symbolInstances,t,i)}}for(var u=0;u1?\"@2x\":\"\",l=t.getJSON(r.transformRequest(r.normalizeSpriteURL(e,s,\".json\"),t.ResourceType.SpriteJSON),(function(t,e){l=null,o||(o=t,i=e,u())})),c=t.getImage(r.transformRequest(r.normalizeSpriteURL(e,s,\".png\"),t.ResourceType.SpriteImage),(function(t,e){c=null,o||(o=t,a=e,u())}));function u(){if(o)n(o);else if(i&&a){var e=t.browser.getImageData(a),r={};for(var s in i){var l=i[s],c=l.width,u=l.height,f=l.x,h=l.y,p=l.sdf,d=l.pixelRatio,g=l.stretchX,m=l.stretchY,v=l.content,y=new t.RGBAImage({width:c,height:u});t.RGBAImage.copy(e,y,{x:f,y:h},{x:0,y:0},{width:c,height:u}),r[s]={data:y,pixelRatio:d,sdf:p,stretchX:g,stretchY:m,content:v}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(e,this.map._requestManager,(function(e,n){if(r._spriteRequest=null,e)r.fire(new t.ErrorEvent(e));else if(n)for(var i in n)r.imageManager.addImage(i,n[i]);r.imageManager.setLoaded(!0),r._availableImages=r.imageManager.listImages(),r.dispatcher.broadcast(\"setImages\",r._availableImages),r.fire(new t.Event(\"data\",{dataType:\"style\"}))}))},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){for(var e=[],r=0,n=t;r0)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._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event(\"data\",{dataType:\"style\"}))},r.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},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._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event(\"data\",{dataType:\"style\"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(e,r,n){var i=this;if(void 0===n&&(n={}),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 Ct(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){void 0===n&&(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{var a;if(\"custom\"===e.type){if(je(this,t.validateCustomStyleLayer(e)))return;a=t.createStyleLayer(e)}else{if(\"object\"==typeof e.source&&(this.addSource(i,e.source),e=t.clone$1(e),e=t.extend(e,{source:i})),this._validate(t.validateStyle.layer,\"layers.\"+i,e,{arrayIndex:-1},n))return;a=t.createStyleLayer(e),this._validateLayer(a),a.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[a.id]=a.serialize()}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&&\"custom\"!==a.type){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),a.onAdd&&a.onAdd(this.map)}}},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._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}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.hasLayer=function(t){return t in this._layers},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,n){void 0===n&&(n={}),this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.deepEqual(i.filter,r))return null==r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(t.validateStyle.filter,\"layers.\"+i.id+\".filter\",r,null,n)||(i.filter=t.clone$1(r),this._updateLayer(i)))}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$1(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getLayoutProperty(r),n)||(a.setLayoutProperty(r,n,i),this._updateLayer(a)):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(e,r){var n=this.getLayer(e);if(n)return n.getLayoutProperty(r);this.fire(new t.ErrorEvent(new Error(\"The layer '\"+e+\"' does not exist in the map's style.\")))},r.prototype.setPaintProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getPaintProperty(r),n)||(a.setPaintProperty(r,n,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[e]=!0):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.setFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=e.sourceLayer,a=this.sourceCaches[n];if(void 0!==a){var o=a.getSource().type;\"geojson\"===o&&i?this.fire(new t.ErrorEvent(new Error(\"GeoJSON sources cannot have a sourceLayer parameter.\"))):\"vector\"!==o||i?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error(\"The feature id parameter must be provided.\"))),a.setFeatureState(i,e.id,r)):this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+n+\"' does not exist in the map's style.\")))},r.prototype.removeFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=this.sourceCaches[n];if(void 0!==i){var a=i.getSource().type,o=\"vector\"===a?e.sourceLayer:void 0;\"vector\"!==a||o?r&&\"string\"!=typeof e.id&&\"number\"!=typeof e.id?this.fire(new t.ErrorEvent(new Error(\"A feature id is required to remove its specific state property.\"))):i.removeFeatureState(o,e.id,r):this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+n+\"' does not exist in the map's style.\")))},r.prototype.getFeatureState=function(e){this._checkLoaded();var r=e.source,n=e.sourceLayer,i=this.sourceCaches[r];if(void 0!==i){if(\"vector\"!==i.getSource().type||n)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error(\"The feature id parameter must be provided.\"))),i.getFeatureState(n,e.id);this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+r+\"' does not exist in the map's style.\")))},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){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._serializeLayers(this._order)},(function(t){return void 0!==t}))},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&\"raster\"!==this.sourceCaches[t.source].getSource().type&&(this._updatedSources[t.source]=\"reload\",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,r=function(t){return\"fill-extrusion\"===e._layers[t].type},n={},i=[],a=this._order.length-1;a>=0;a--){var o=this._order[a];if(r(o)){n[o]=a;for(var s=0,l=t;s=0;d--){var g=this._order[d];if(r(g))for(var m=i.length-1;m>=0;m--){var v=i[m].feature;if(n[v.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}\",\"attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}\"),tr=yr(\"varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}\",\"attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}\"),er=yr(\"uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}\",\"attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}\"),rr=yr(\"#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float opacity\\ngl_FragColor=color*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"attribute vec2 a_pos;uniform mat4 u_matrix;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float opacity\\ngl_Position=u_matrix*vec4(a_pos,0,1);}\"),nr=yr(\"varying vec2 v_pos;\\n#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 outline_color\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\\n#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 outline_color\\n#pragma mapbox: initialize lowp float opacity\\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}\"),ir=yr(\"uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}\"),ar=yr(\"uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}\"),or=yr(\"varying vec4 v_color;void main() {gl_FragColor=v_color;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\\n#pragma mapbox: define highp float base\\n#pragma mapbox: define highp float height\\n#pragma mapbox: define highp vec4 color\\nvoid main() {\\n#pragma mapbox: initialize highp float base\\n#pragma mapbox: initialize highp float height\\n#pragma mapbox: initialize highp vec4 color\\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}\"),sr=yr(\"uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float base\\n#pragma mapbox: initialize lowp float height\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float base\\n#pragma mapbox: initialize lowp float height\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\\n? a_pos\\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}\"),lr=yr(\"#ifdef GL_ES\\nprecision highp float;\\n#endif\\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}\"),cr=yr(\"uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\\n#define PI 3.141592653589793\\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}\"),ur=yr(\"uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\\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\\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\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}\"),fr=yr(\"uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define MAX_LINE_DISTANCE 32767.0\\n#define scale 0.015873016\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\\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\\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\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}\"),hr=yr(\"uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\\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#pragma mapbox: define lowp float floorwidth\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\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#pragma mapbox: initialize lowp float floorwidth\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}\"),pr=yr(\"uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\\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\\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\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\\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\\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\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}\"),dr=yr(\"uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}\"),gr=yr(\"uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}\"),mr=yr(\"#define SDF_PX 8.0\\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\\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\\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\\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\\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\\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\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}\"),vr=yr(\"#define SDF_PX 8.0\\n#define SDF 1.0\\n#define ICON 0.0\\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\\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\\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\\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\\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\\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\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}\");function yr(t,e){var r=/#pragma mapbox: ([\\w]+) ([\\w]+) ([\\w]+) ([\\w]+)/g,n={};return{fragmentSource:t=t.replace(r,(function(t,e,r,i,a){return n[a]=!0,\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nvarying \"+r+\" \"+i+\" \"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"\\n#ifdef HAS_UNIFORM_u_\"+a+\"\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\"})),vertexSource:e=e.replace(r,(function(t,e,r,i,a){var o=\"float\"===i?\"vec2\":\"vec4\",s=a.match(/color/)?\"color\":o;return n[a]?\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nuniform lowp float u_\"+a+\"_t;\\nattribute \"+r+\" \"+o+\" a_\"+a+\";\\nvarying \"+r+\" \"+i+\" \"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"vec4\"===s?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+a+\" = a_\"+a+\";\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+a+\" = unpack_mix_\"+s+\"(a_\"+a+\", u_\"+a+\"_t);\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nuniform lowp float u_\"+a+\"_t;\\nattribute \"+r+\" \"+o+\" a_\"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"vec4\"===s?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+r+\" \"+i+\" \"+a+\" = a_\"+a+\";\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+r+\" \"+i+\" \"+a+\" = unpack_mix_\"+s+\"(a_\"+a+\", u_\"+a+\"_t);\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\"}))}}var xr=Object.freeze({__proto__:null,prelude:Ye,background:We,backgroundPattern:Xe,circle:Ze,clippingMask:Je,heatmap:Ke,heatmapTexture:Qe,collisionBox:$e,collisionCircle:tr,debug:er,fill:rr,fillOutline:nr,fillOutlinePattern:ir,fillPattern:ar,fillExtrusion:or,fillExtrusionPattern:sr,hillshadePrepare:lr,hillshade:cr,line:ur,lineGradient:fr,linePattern:hr,lineSDF:pr,raster:dr,symbolIcon:gr,symbolSDF:mr,symbolTextAndIcon:vr}),br=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};br.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>16,s>>16],u_pixel_coord_lower:[65535&o,65535&s]}}_r.prototype.draw=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g){var m,v=t.gl;if(!this.failedToCreate){for(var y in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(n),t.setColorMode(i),t.setCullFace(a),this.fixedUniforms)this.fixedUniforms[y].set(o[y]);p&&p.setUniforms(t,this.binderUniforms,f,{zoom:h});for(var x=(m={},m[v.LINES]=2,m[v.TRIANGLES]=3,m[v.LINE_STRIP]=1,m)[e],b=0,_=u.get();b<_.length;b+=1){var w=_[b],T=w.vaos||(w.vaos={});(T[s]||(T[s]=new br)).bind(t,this,l,p?p.getPaintVertexBuffers():[],c,w.vertexOffset,d,g),v.drawElements(e,w.primitiveLength*x,v.UNSIGNED_SHORT,w.primitiveOffset*x*2)}}};var Tr=function(e,r,n,i){var a=r.style.light,o=a.properties.get(\"position\"),s=[o.x,o.y,o.z],l=t.create$1();\"viewport\"===a.properties.get(\"anchor\")&&t.fromRotation(l,-r.transform.angle),t.transformMat3(s,s,l);var c=a.properties.get(\"color\");return{u_matrix:e,u_lightpos:s,u_lightintensity:a.properties.get(\"intensity\"),u_lightcolor:[c.r,c.g,c.b],u_vertical_gradient:+n,u_opacity:i}},kr=function(e,r,n,i,a,o,s){return t.extend(Tr(e,r,n,i),wr(o,r,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8})},Ar=function(t){return{u_matrix:t}},Mr=function(e,r,n,i){return t.extend(Ar(e),wr(n,r,i))},Sr=function(t,e){return{u_matrix:t,u_world:e}},Er=function(e,r,n,i,a){return t.extend(Mr(e,r,n,i),{u_world:a})},Lr=function(e,r,n,i){var a,o,s=e.transform;if(\"map\"===i.paint.get(\"circle-pitch-alignment\")){var l=pe(n,1,s.zoom);a=!0,o=[l,l]}else a=!1,o=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+(\"map\"===i.paint.get(\"circle-pitch-scale\")),u_matrix:e.translatePosMatrix(r.posMatrix,n,i.paint.get(\"circle-translate\"),i.paint.get(\"circle-translate-anchor\")),u_pitch_with_map:+a,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:o}},Cr=function(t,e,r){var n=pe(r,1,e.zoom),i=Math.pow(2,e.zoom-r.tileID.overscaledZ),a=r.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:n,u_extrude_scale:[e.pixelsToGLUnits[0]/(n*i),e.pixelsToGLUnits[1]/(n*i)],u_overscale_factor:a}},Pr=function(t,e,r){return{u_matrix:t,u_inv_matrix:e,u_camera_to_center_distance:r.cameraToCenterDistance,u_viewport_size:[r.width,r.height]}},Ir=function(t,e,r){return void 0===r&&(r=1),{u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:r}},Or=function(t){return{u_matrix:t}},zr=function(t,e,r,n){return{u_matrix:t,u_extrude_scale:pe(e,1,r),u_intensity:n}};function Dr(e,r){var n=Math.pow(2,r.canonical.z),i=r.canonical.y;return[new t.MercatorCoordinate(0,i/n).toLngLat().lat,new t.MercatorCoordinate(0,(i+1)/n).toLngLat().lat]}var Rr=function(e,r,n){var i=e.transform;return{u_matrix:Ur(e,r,n),u_ratio:1/pe(r,1,i.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Fr=function(e,r,n){return t.extend(Rr(e,r,n),{u_image:0})},Br=function(e,r,n,i){var a=e.transform,o=jr(r,a);return{u_matrix:Ur(e,r,n),u_texsize:r.imageAtlasTexture.size,u_ratio:1/pe(r,1,a.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[o,i.fromScale,i.toScale],u_fade:i.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},Nr=function(e,r,n,i,a){var o=e.transform,s=e.lineAtlas,l=jr(r,o),c=\"round\"===n.layout.get(\"line-cap\"),u=s.getDash(i.from,c),f=s.getDash(i.to,c),h=u.width*a.fromScale,p=f.width*a.toScale;return t.extend(Rr(e,r,n),{u_patternscale_a:[l/h,-u.height/2],u_patternscale_b:[l/p,-f.height/2],u_sdfgamma:s.width/(256*Math.min(h,p)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:f.y,u_mix:a.t})};function jr(t,e){return 1/pe(t,1,e.tileZoom)}function Ur(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get(\"line-translate\"),r.paint.get(\"line-translate-anchor\"))}var Vr=function(t,e,r,n,i){return{u_matrix:t,u_tl_parent:e,u_scale_parent:r,u_buffer_scale:1,u_fade_t:n.mix,u_opacity:n.opacity*i.paint.get(\"raster-opacity\"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get(\"raster-brightness-min\"),u_brightness_high:i.paint.get(\"raster-brightness-max\"),u_saturation_factor:(o=i.paint.get(\"raster-saturation\"),o>0?1-1/(1.001-o):-o),u_contrast_factor:(a=i.paint.get(\"raster-contrast\"),a>0?1/(1-a):1+a),u_spin_weights:Hr(i.paint.get(\"raster-hue-rotate\"))};var a,o};function Hr(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]}var qr,Gr=function(t,e,r,n,i,a,o,s,l,c){var u=i.transform;return{u_is_size_zoom_constant:+(\"constant\"===t||\"source\"===t),u_is_size_feature_constant:+(\"constant\"===t||\"camera\"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:u.cameraToCenterDistance,u_pitch:u.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:u.width/u.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:a,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:c,u_texture:0}},Yr=function(e,r,n,i,a,o,s,l,c,u,f){var h=a.transform;return t.extend(Gr(e,r,n,i,a,o,s,l,c,u),{u_gamma_scale:i?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+f})},Wr=function(e,r,n,i,a,o,s,l,c,u){return t.extend(Yr(e,r,n,i,a,o,s,l,!0,c,!0),{u_texsize_icon:u,u_texture_icon:1})},Xr=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Zr=function(e,r,n,i,a,o){return t.extend(function(t,e,r,n){var i=r.imageManager.getPattern(t.from.toString()),a=r.imageManager.getPattern(t.to.toString()),o=r.imageManager.getPixelSize(),s=o.width,l=o.height,c=Math.pow(2,n.tileID.overscaledZ),u=n.tileSize*Math.pow(2,r.transform.tileZoom)/c,f=u*(n.tileID.canonical.x+n.tileID.wrap*c),h=u*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[s,l],u_mix:e.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/pe(n,1,r.transform.tileZoom),u_pixel_coord_upper:[f>>16,h>>16],u_pixel_coord_lower:[65535&f,65535&h]}}(i,o,n,a),{u_matrix:e,u_opacity:r})},Jr={fillExtrusion:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fillExtrusionPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,r.u_height_factor),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fill:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},fillPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},fillOutline:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world)}},fillOutlinePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},circle:function(e,r){return{u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,r.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},collisionBox:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,r.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,r.u_overscale_factor)}},collisionCircle:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,r.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,r.u_viewport_size)}},debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_overlay:new t.Uniform1i(e,r.u_overlay),u_overlay_scale:new t.Uniform1f(e,r.u_overlay_scale)}},clippingMask:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmap:function(e,r){return{u_extrude_scale:new t.Uniform1f(e,r.u_extrude_scale),u_intensity:new t.Uniform1f(e,r.u_intensity),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmapTexture:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_color_ramp:new t.Uniform1i(e,r.u_color_ramp),u_opacity:new t.Uniform1f(e,r.u_opacity)}},hillshade:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_latrange:new t.Uniform2f(e,r.u_latrange),u_light:new t.Uniform2f(e,r.u_light),u_shadow:new t.UniformColor(e,r.u_shadow),u_highlight:new t.UniformColor(e,r.u_highlight),u_accent:new t.UniformColor(e,r.u_accent)}},hillshadePrepare:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_dimension:new t.Uniform2f(e,r.u_dimension),u_zoom:new t.Uniform1f(e,r.u_zoom),u_maxzoom:new t.Uniform1f(e,r.u_maxzoom),u_unpack:new t.Uniform4f(e,r.u_unpack)}},line:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels)}},lineGradient:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_image:new t.Uniform1i(e,r.u_image)}},linePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_texsize:new t.Uniform2f(e,r.u_texsize),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_image:new t.Uniform1i(e,r.u_image),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},lineSDF:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,r.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,r.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,r.u_sdfgamma),u_image:new t.Uniform1i(e,r.u_image),u_tex_y_a:new t.Uniform1f(e,r.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,r.u_tex_y_b),u_mix:new t.Uniform1f(e,r.u_mix)}},raster:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_tl_parent:new t.Uniform2f(e,r.u_tl_parent),u_scale_parent:new t.Uniform1f(e,r.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,r.u_buffer_scale),u_fade_t:new t.Uniform1f(e,r.u_fade_t),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image0:new t.Uniform1i(e,r.u_image0),u_image1:new t.Uniform1i(e,r.u_image1),u_brightness_low:new t.Uniform1f(e,r.u_brightness_low),u_brightness_high:new t.Uniform1f(e,r.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,r.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,r.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,r.u_spin_weights)}},symbolIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture)}},symbolSDF:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},symbolTextAndIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texsize_icon:new t.Uniform2f(e,r.u_texsize_icon),u_texture:new t.Uniform1i(e,r.u_texture),u_texture_icon:new t.Uniform1i(e,r.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},background:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_color:new t.UniformColor(e,r.u_color)}},backgroundPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image:new t.Uniform1i(e,r.u_image),u_pattern_tl_a:new t.Uniform2f(e,r.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,r.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,r.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,r.u_pattern_br_b),u_texsize:new t.Uniform2f(e,r.u_texsize),u_mix:new t.Uniform1f(e,r.u_mix),u_pattern_size_a:new t.Uniform2f(e,r.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,r.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,r.u_scale_a),u_scale_b:new t.Uniform1f(e,r.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,r.u_tile_units_to_pixels)}}};function Kr(e,r,n,i,a,o,s){for(var l=e.context,c=l.gl,u=e.useProgram(\"collisionBox\"),f=[],h=0,p=0,d=0;d0){var _=t.create(),w=y;t.mul(_,v.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(_,_,v.placementViewportMatrix),f.push({circleArray:b,circleOffset:p,transform:w,invTransform:_}),p=h+=b.length/4}x&&u.draw(l,c.LINES,At.disabled,Mt.disabled,e.colorModeForRenderPass(),Et.disabled,Cr(y,e.transform,m),n.id,x.layoutVertexBuffer,x.indexBuffer,x.segments,null,e.transform.zoom,null,null,x.collisionVertexBuffer)}}if(s&&f.length){var T=e.useProgram(\"collisionCircle\"),k=new t.StructArrayLayout2f1f2i16;k.resize(4*h),k._trim();for(var A=0,M=0,S=f;M=0&&(g[v.associatedIconIndex]={shiftedAnchor:S,angle:E})}else ue(v.numGlyphs,p)}if(f){d.clear();for(var C=e.icon.placedSymbolArray,P=0;P0){var s=t.browser.now(),l=(s-e.timeAdded)/o,c=r?(s-r.timeAdded)/o:-1,u=n.getSource(),f=a.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),h=!r||Math.abs(r.tileID.overscaledZ-f)>Math.abs(e.tileID.overscaledZ-f),p=h&&e.refreshedUponExpiration?1:t.clamp(h?l:1-c,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-p}:{opacity:p,mix:0}}return{opacity:1,mix:0}}var un=new t.Color(1,0,0,1),fn=new t.Color(0,1,0,1),hn=new t.Color(0,0,1,1),pn=new t.Color(1,0,1,1),dn=new t.Color(0,1,1,1);function gn(t){var e=t.transform.padding;mn(t,t.transform.height-(e.top||0),3,un),mn(t,e.bottom||0,3,fn),vn(t,e.left||0,3,hn),vn(t,t.transform.width-(e.right||0),3,pn);var r=t.transform.centerPoint;!function(t,e,r,n){yn(t,e-1,r-10,2,20,n),yn(t,e-10,r-1,20,2,n)}(t,r.x,t.transform.height-r.y,dn)}function mn(t,e,r,n){yn(t,0,e+r/2,t.transform.width,r,n)}function vn(t,e,r,n){yn(t,e-r/2,0,r,t.transform.height,n)}function yn(e,r,n,i,a,o){var s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*t.browser.devicePixelRatio,n*t.browser.devicePixelRatio,i*t.browser.devicePixelRatio,a*t.browser.devicePixelRatio),s.clear({color:o}),l.disable(l.SCISSOR_TEST)}function xn(e,r,n){var i=e.context,a=i.gl,o=n.posMatrix,s=e.useProgram(\"debug\"),l=At.disabled,c=Mt.disabled,u=e.colorModeForRenderPass();i.activeTexture.set(a.TEXTURE0),e.emptyTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE),s.draw(i,a.LINE_STRIP,l,c,u,Et.disabled,Ir(o,t.Color.red),\"$debug\",e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);var f=r.getTileByID(n.key).latestRawTileData,h=f&&f.byteLength||0,p=Math.floor(h/1024),d=r.getTile(n).tileSize,g=512/Math.min(d,512)*(n.overscaledZ/e.transform.zoom)*.5,m=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(m+=\" => \"+n.overscaledZ),function(t,e){t.initDebugOverlayCanvas();var r=t.debugOverlayCanvas,n=t.context.gl,i=t.debugOverlayCanvas.getContext(\"2d\");i.clearRect(0,0,r.width,r.height),i.shadowColor=\"white\",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle=\"white\",i.textBaseline=\"top\",i.font=\"bold 36px Open Sans, sans-serif\",i.fillText(e,5,5),i.strokeText(e,5,5),t.debugOverlayTexture.update(r),t.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}(e,m+\" \"+p+\"kb\"),s.draw(i,a.TRIANGLES,l,c,St.alphaBlended,Et.disabled,Ir(o,t.Color.transparent,g),\"$debug\",e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}var bn={symbol:function(e,r,n,i,a){if(\"translucent\"===e.renderPass){var o=Mt.disabled,s=e.colorModeForRenderPass();n.layout.get(\"text-variable-anchor\")&&function(e,r,n,i,a,o,s){for(var l=r.transform,c=\"map\"===a,u=\"map\"===o,f=0,h=e;f256&&this.clearStencil(),r.setColorMode(St.disabled),r.setDepthMode(At.disabled);var i=this.useProgram(\"clippingMask\");this._tileClippingMaskIDs={};for(var a=0,o=e;a256&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new Mt({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},_n.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Mt({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},_n.prototype.stencilConfigForOverlap=function(t){var e,r=this.context.gl,n=t.sort((function(t,e){return e.overscaledZ-t.overscaledZ})),i=n[n.length-1].overscaledZ,a=n[0].overscaledZ-i+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();for(var o={},s=0;s=0;this.currentLayer--){var w=this.style._layers[i[this.currentLayer]],T=a[w.source],k=u[w.source];this._renderTileClippingMasks(w,k),this.renderLayer(this,T,w,k)}for(this.renderPass=\"translucent\",this.currentLayer=0;this.currentLayer0?e.pop():null},_n.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),r=this.imageManager.getPattern(t.to.toString());return!e||!r},_n.prototype.useProgram=function(t,e){this.cache=this.cache||{};var r=\"\"+t+(e?e.cacheKey:\"\")+(this._showOverdrawInspector?\"/overdraw\":\"\");return this.cache[r]||(this.cache[r]=new _r(this.context,xr[t],e,Jr[t],this._showOverdrawInspector)),this.cache[r]},_n.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},_n.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)},_n.prototype.initDebugOverlayCanvas=function(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=t.window.document.createElement(\"canvas\"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var e=this.context.gl;this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,e.RGBA)}},_n.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var wn=function(t,e){this.points=t,this.planes=e};wn.fromInvProjectionMatrix=function(e,r,n){var i=Math.pow(2,n),a=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((function(r){return t.transformMat4([],r,e)})).map((function(e){return t.scale$1([],e,1/e[3]/r*i)})),o=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(e){var r=t.sub([],a[e[0]],a[e[1]]),n=t.sub([],a[e[2]],a[e[1]]),i=t.normalize([],t.cross([],r,n)),o=-t.dot(i,a[e[1]]);return i.concat(o)}));return new wn(a,o)};var Tn=function(e,r){this.min=e,this.max=r,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};Tn.prototype.quadrant=function(e){for(var r=[e%2==0,e<2],n=t.clone$2(this.min),i=t.clone$2(this.max),a=0;a=0;if(0===o)return 0;o!==r.length&&(n=!1)}if(n)return 2;for(var l=0;l<3;l++){for(var c=Number.MAX_VALUE,u=-Number.MAX_VALUE,f=0;fthis.max[l]-this.min[l])return 0}return 1};var kn=function(t,e,r,n){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),isNaN(t)||t<0||isNaN(e)||e<0||isNaN(r)||r<0||isNaN(n)||n<0)throw new Error(\"Invalid value for edge-insets, top, bottom, left and right must all be numbers\");this.top=t,this.bottom=e,this.left=r,this.right=n};kn.prototype.interpolate=function(e,r,n){return null!=r.top&&null!=e.top&&(this.top=t.number(e.top,r.top,n)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,r.bottom,n)),null!=r.left&&null!=e.left&&(this.left=t.number(e.left,r.left,n)),null!=r.right&&null!=e.right&&(this.right=t.number(e.right,r.right,n)),this},kn.prototype.getCenter=function(e,r){var n=t.clamp((this.left+e-this.right)/2,0,e),i=t.clamp((this.top+r-this.bottom)/2,0,r);return new t.Point(n,i)},kn.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},kn.prototype.clone=function(){return new kn(this.top,this.bottom,this.left,this.right)},kn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var An=function(e,r,n,i,a){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===a||a,this._minZoom=e||0,this._maxZoom=r||22,this._minPitch=null==n?0:n,this._maxPitch=null==i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new kn,this._posMatrixCache={},this._alignedPosMatrixCache={}},Mn={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};An.prototype.clone=function(){var t=new An(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,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._edgeInsets=this._edgeInsets.clone(),t._calcMatrices(),t},Mn.minZoom.get=function(){return this._minZoom},Mn.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Mn.maxZoom.get=function(){return this._maxZoom},Mn.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Mn.minPitch.get=function(){return this._minPitch},Mn.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},Mn.maxPitch.get=function(){return this._maxPitch},Mn.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},Mn.renderWorldCopies.get=function(){return this._renderWorldCopies},Mn.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},Mn.worldSize.get=function(){return this.tileSize*this.scale},Mn.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Mn.size.get=function(){return new t.Point(this.width,this.height)},Mn.bearing.get=function(){return-this.angle/Math.PI*180},Mn.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=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Mn.pitch.get=function(){return this._pitch/Math.PI*180},Mn.pitch.set=function(e){var r=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},Mn.fov.get=function(){return this._fov/Math.PI*180},Mn.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())},Mn.zoom.get=function(){return this._zoom},Mn.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())},Mn.center.get=function(){return this._center},Mn.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Mn.padding.get=function(){return this._edgeInsets.toJSON()},Mn.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},Mn.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},An.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},An.prototype.interpolatePadding=function(t,e,r){this._unmodified=!1,this._edgeInsets.interpolate(t,e,r),this._constrain(),this._calcMatrices()},An.prototype.coveringZoomLevel=function(t){var e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)},An.prototype.getVisibleUnwrappedCoordinates=function(e){var r=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new t.Point(0,0)),i=this.pointCoordinate(new t.Point(this.width,0)),a=this.pointCoordinate(new t.Point(this.width,this.height)),o=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(n.x,i.x,a.x,o.x)),l=Math.floor(Math.max(n.x,i.x,a.x,o.x)),c=s-1;c<=l+1;c++)0!==c&&r.push(new t.UnwrappedTileID(c,e));return r},An.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&&re.maxzoom&&(r=e.maxzoom);var i=t.MercatorCoordinate.fromLngLat(this.center),a=Math.pow(2,r),o=[a*i.x,a*i.y,0],s=wn.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),l=e.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=r);var c=function(t){return{aabb:new Tn([t*a,0,0],[(t+1)*a,a,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}},u=[],f=[],h=r,p=e.reparseOverscaled?n:r;if(this._renderWorldCopies)for(var d=1;d<=3;d++)u.push(c(-d)),u.push(c(d));for(u.push(c(0));u.length>0;){var g=u.pop(),m=g.x,v=g.y,y=g.fullyVisible;if(!y){var x=g.aabb.intersects(s);if(0===x)continue;y=2===x}var b=g.aabb.distanceX(o),_=g.aabb.distanceY(o),w=Math.max(Math.abs(b),Math.abs(_)),T=3+(1<T&&g.zoom>=l)f.push({tileID:new t.OverscaledTileID(g.zoom===h?p:g.zoom,g.wrap,g.zoom,m,v),distanceSq:t.sqrLen([o[0]-.5-m,o[1]-.5-v])});else for(var k=0;k<4;k++){var A=(m<<1)+k%2,M=(v<<1)+(k>>1);u.push({aabb:g.aabb.quadrant(k),zoom:g.zoom+1,x:A,y:M,wrap:g.wrap,fullyVisible:y})}}return f.sort((function(t,e){return t.distanceSq-e.distanceSq})).map((function(t){return t.tileID}))},An.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Mn.unmodified.get=function(){return this._unmodified},An.prototype.zoomScale=function(t){return Math.pow(2,t)},An.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},An.prototype.project=function(e){var r=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(r)*this.worldSize)},An.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},Mn.point.get=function(){return this.project(this.center)},An.prototype.setLocationAtPoint=function(e,r){var n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),a=this.locationCoordinate(e),o=new t.MercatorCoordinate(a.x-(n.x-i.x),a.y-(n.y-i.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())},An.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},An.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},An.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},An.prototype.coordinateLocation=function(t){return t.toLngLat()},An.prototype.pointCoordinate=function(e){var r=[e.x,e.y,0,1],n=[e.x,e.y,1,1];t.transformMat4(r,r,this.pixelMatrixInverse),t.transformMat4(n,n,this.pixelMatrixInverse);var i=r[3],a=n[3],o=r[0]/i,s=n[0]/a,l=r[1]/i,c=n[1]/a,u=r[2]/i,f=n[2]/a,h=u===f?0:(0-u)/(f-u);return new t.MercatorCoordinate(t.number(o,s,h)/this.worldSize,t.number(l,c,h)/this.worldSize)},An.prototype.coordinatePoint=function(e){var r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix),new t.Point(r[0]/r[3],r[1]/r[3])},An.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},An.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},An.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},An.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=t.identity(new Float64Array(16));return t.translate(l,l,[s*o,a.y*o,0]),t.scale(l,l,[o/t.EXTENT,o/t.EXTENT,1]),t.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},An.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},An.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=t.mercatorYfromLat(f[1])*this.worldSize,e=(o=t.mercatorYfromLat(f[0])*this.worldSize)-ao&&(i=o-m)}if(this.lngRange){var v=p.x,y=c.x/2;v-yl&&(n=l-y)}void 0===n&&void 0===i||(this.center=this.unproject(new t.Point(void 0!==n?n:p.x,void 0!==i?i:p.y))),this._unmodified=u,this._constraining=!1}},An.prototype._calcMatrices=function(){if(this.height){var e=this._fov/2,r=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(e)*this.height;var n=Math.PI/2+this._pitch,i=this._fov*(.5+r.y/this.height),a=Math.sin(i)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-n-i,.01,Math.PI-.01)),o=this.point,s=o.x,l=o.y,c=1.01*(Math.cos(Math.PI/2-this._pitch)*a+this.cameraToCenterDistance),u=this.height/50,f=new Float64Array(16);t.perspective(f,this._fov,this.width/this.height,u,c),f[8]=2*-r.x/this.width,f[9]=2*r.y/this.height,t.scale(f,f,[1,-1,1]),t.translate(f,f,[0,0,-this.cameraToCenterDistance]),t.rotateX(f,f,this._pitch),t.rotateZ(f,f,this.angle),t.translate(f,f,[-s,-l,0]),this.mercatorMatrix=t.scale([],f,[this.worldSize,this.worldSize,this.worldSize]),t.scale(f,f,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=f,this.invProjMatrix=t.invert([],this.projMatrix);var h=this.width%2/2,p=this.height%2/2,d=Math.cos(this.angle),g=Math.sin(this.angle),m=s-Math.round(s)+d*h+g*p,v=l-Math.round(l)+d*p+g*h,y=new Float64Array(f);if(t.translate(y,y,[m>.5?m-1:m,v>.5?v-1:v,0]),this.alignedProjMatrix=y,f=t.create(),t.scale(f,f,[this.width/2,-this.height/2,1]),t.translate(f,f,[1,-1,0]),this.labelPlaneMatrix=f,f=t.create(),t.scale(f,f,[1,-1,1]),t.translate(f,f,[-1,-1,0]),t.scale(f,f,[2/this.width,2/this.height,1]),this.glCoordMatrix=f,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(f=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error(\"failed to invert matrix\");this.pixelMatrixInverse=f,this._posMatrixCache={},this._alignedPosMatrixCache={}}},An.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},An.prototype.getCameraPoint=function(){var e=this._pitch,r=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,r))},An.prototype.getCameraQueryGeometry=function(e){var r=this.getCameraPoint();if(1===e.length)return[e[0],r];for(var n=r.x,i=r.y,a=r.x,o=r.y,s=0,l=e;s=3&&!t.some((function(t){return isNaN(t)}))){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0}return!1},Sn.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,\"\",e)}catch(t){}};var En={linearity:.3,easing:t.bezier(0,0,.3,1)},Ln=t.extend({deceleration:2500,maxSpeed:1400},En),Cn=t.extend({deceleration:20,maxSpeed:1400},En),Pn=t.extend({deceleration:1e3,maxSpeed:360},En),In=t.extend({deceleration:1e3,maxSpeed:90},En),On=function(t){this._map=t,this.clear()};function zn(t,e){(!t.duration||t.duration0&&r-e[0].time>160;)e.shift()},On.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var r={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},n=0,i=this._inertiaBuffer;n=this._clickTolerance||this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.dblclick=function(t){return this._firePreventable(new Rn(t.type,this._map,t))},Nn.prototype.mouseover=function(t){this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.mouseout=function(t){this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.touchstart=function(t){return this._firePreventable(new Fn(t.type,this._map,t))},Nn.prototype.touchmove=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype.touchend=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype.touchcancel=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Nn.prototype.isEnabled=function(){return!0},Nn.prototype.isActive=function(){return!1},Nn.prototype.enable=function(){},Nn.prototype.disable=function(){};var jn=function(t){this._map=t};jn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},jn.prototype.mousemove=function(t){this._map.fire(new Rn(t.type,this._map,t))},jn.prototype.mousedown=function(){this._delayContextMenu=!0},jn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Rn(\"contextmenu\",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},jn.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new Rn(t.type,this._map,t)),this._map.listens(\"contextmenu\")&&t.preventDefault()},jn.prototype.isEnabled=function(){return!0},jn.prototype.isActive=function(){return!1},jn.prototype.enable=function(){},jn.prototype.disable=function(){};var Un=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1};function Vn(t,e){for(var r={},n=0;nthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),n.length===this.numTouches&&(this.centroid=function(e){for(var r=new t.Point(0,0),n=0,i=e;n30)&&(this.aborted=!0)}}},Hn.prototype.touchend=function(t,e,r){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){var n=!this.aborted&&this.centroid;if(this.reset(),n)return n}};var qn=function(t){this.singleTap=new Hn(t),this.numTaps=t.numTaps,this.reset()};qn.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},qn.prototype.touchstart=function(t,e,r){this.singleTap.touchstart(t,e,r)},qn.prototype.touchmove=function(t,e,r){this.singleTap.touchmove(t,e,r)},qn.prototype.touchend=function(t,e,r){var n=this.singleTap.touchend(t,e,r);if(n){var i=t.timeStamp-this.lastTime<500,a=!this.lastTap||this.lastTap.dist(n)<30;if(i&&a||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}};var Gn=function(){this._zoomIn=new qn({numTouches:1,numTaps:2}),this._zoomOut=new qn({numTouches:2,numTaps:1}),this.reset()};Gn.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Gn.prototype.touchstart=function(t,e,r){this._zoomIn.touchstart(t,e,r),this._zoomOut.touchstart(t,e,r)},Gn.prototype.touchmove=function(t,e,r){this._zoomIn.touchmove(t,e,r),this._zoomOut.touchmove(t,e,r)},Gn.prototype.touchend=function(t,e,r){var n=this,i=this._zoomIn.touchend(t,e,r),a=this._zoomOut.touchend(t,e,r);return i?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(i)},{originalEvent:t})}}):a?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(a)},{originalEvent:t})}}):void 0},Gn.prototype.touchcancel=function(){this.reset()},Gn.prototype.enable=function(){this._enabled=!0},Gn.prototype.disable=function(){this._enabled=!1,this.reset()},Gn.prototype.isEnabled=function(){return this._enabled},Gn.prototype.isActive=function(){return this._active};var Yn=function(t){this.reset(),this._clickTolerance=t.clickTolerance||1};Yn.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Yn.prototype._correctButton=function(t,e){return!1},Yn.prototype._move=function(t,e){return{}},Yn.prototype.mousedown=function(t,e){if(!this._lastPoint){var n=r.mouseButton(t);this._correctButton(t,n)&&(this._lastPoint=e,this._eventButton=n)}},Yn.prototype.mousemoveWindow=function(t,e){var r=this._lastPoint;if(r&&(t.preventDefault(),this._moved||!(e.dist(r)0&&(this._active=!0);var i=Vn(n,r),a=new t.Point(0,0),o=new t.Point(0,0),s=0;for(var l in i){var c=i[l],u=this._touches[l];u&&(a._add(c),o._add(c.sub(u)),s++,i[l]=c)}if(this._touches=i,!(sMath.abs(t.x)}var ii=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.reset=function(){t.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},e.prototype._start=function(t){this._lastPoints=t,ni(t[0].sub(t[1]))&&(this._valid=!1)},e.prototype._move=function(t,e,r){var n=t[0].sub(this._lastPoints[0]),i=t[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid){this._lastPoints=t,this._active=!0;return{pitchDelta:-.5*((n.y+i.y)/2)}}},e.prototype.gestureBeginsVertically=function(t,e,r){if(void 0!==this._valid)return this._valid;var n=t.mag()>=2,i=e.mag()>=2;if(n||i){if(!n||!i)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;var a=t.y>0==e.y>0;return ni(t)&&ni(e)&&a}},e}(Kn),ai={panStep:100,bearingStep:15,pitchStep:10},oi=function(){var t=ai;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep};function si(t){return t*(2-t)}oi.prototype.reset=function(){this._active=!1},oi.prototype.keydown=function(t){var e=this;if(!(t.altKey||t.ctrlKey||t.metaKey)){var r=0,n=0,i=0,a=0,o=0;switch(t.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:t.shiftKey?n=-1:(t.preventDefault(),a=-1);break;case 39:t.shiftKey?n=1:(t.preventDefault(),a=1);break;case 38:t.shiftKey?i=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?i=-1:(t.preventDefault(),o=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:\"keyboardHandler\",easing:si,zoom:r?Math.round(l)+r*(t.shiftKey?2:1):l,bearing:s.getBearing()+n*e._bearingStep,pitch:s.getPitch()+i*e._pitchStep,offset:[-a*e._panStep,-o*e._panStep],center:s.getCenter()},{originalEvent:t})}}}},oi.prototype.enable=function(){this._enabled=!0},oi.prototype.disable=function(){this._enabled=!1,this.reset()},oi.prototype.isEnabled=function(){return this._enabled},oi.prototype.isActive=function(){return this._active};var li=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll([\"_onWheel\",\"_onTimeout\",\"_onScrollFrame\",\"_onScrollFinished\"],this)};li.prototype.setZoomRate=function(t){this._defaultZoomRate=t},li.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},li.prototype.isEnabled=function(){return!!this._enabled},li.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},li.prototype.isZooming=function(){return!!this._zooming},li.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&\"center\"===t.around)},li.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},li.prototype.wheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=t.browser.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._active||this._start(e)),e.preventDefault()}},li.prototype._onTimeout=function(t){this._type=\"wheel\",this._delta-=this._lastValue,this._active||this._start(t)},li.prototype._start=function(e){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var n=r.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},li.prototype.renderFrame=function(){return this._onScrollFrame()},li.prototype._onScrollFrame=function(){var e=this;if(this._frameId&&(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?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var a=\"number\"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(a*i))),\"wheel\"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o,s=\"number\"==typeof this._targetZoom?this._targetZoom:r.zoom,l=this._startZoom,c=this._easing,u=!1;if(\"wheel\"===this._type&&l&&c){var f=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=c(f);o=t.number(l,s,h),f<1?this._frameId||(this._frameId=!0):u=!0}else o=s,u=!0;return this._active=!0,u&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!u,zoomDelta:o-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},li.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var n=this._prevEase,i=(t.browser.now()-n.start)/n.duration,a=n.easing(i+.01)-n.easing(i),o=.27/Math.sqrt(a*a+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=t.bezier(o,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:r},r},li.prototype.reset=function(){this._active=!1};var ci=function(t,e){this._clickZoom=t,this._tapZoom=e};ci.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ci.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ci.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ci.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ui=function(){this.reset()};ui.prototype.reset=function(){this._active=!1},ui.prototype.dblclick=function(t,e){return t.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(t.shiftKey?-1:1),around:r.unproject(e)},{originalEvent:t})}}},ui.prototype.enable=function(){this._enabled=!0},ui.prototype.disable=function(){this._enabled=!1,this.reset()},ui.prototype.isEnabled=function(){return this._enabled},ui.prototype.isActive=function(){return this._active};var fi=function(){this._tap=new qn({numTouches:1,numTaps:1}),this.reset()};fi.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},fi.prototype.touchstart=function(t,e,r){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=e[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(t,e,r))},fi.prototype.touchmove=function(t,e,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;var n=e[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,t.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(t,e,r)},fi.prototype.touchend=function(t,e,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(t,e,r)&&(this._tapTime=t.timeStamp)},fi.prototype.touchcancel=function(){this.reset()},fi.prototype.enable=function(){this._enabled=!0},fi.prototype.disable=function(){this._enabled=!1,this.reset()},fi.prototype.isEnabled=function(){return this._enabled},fi.prototype.isActive=function(){return this._active};var hi=function(t,e,r){this._el=t,this._mousePan=e,this._touchPan=r};hi.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add(\"mapboxgl-touch-drag-pan\")},hi.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove(\"mapboxgl-touch-drag-pan\")},hi.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},hi.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var pi=function(t,e,r){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=r};pi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},pi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},pi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},pi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var di=function(t,e,r,n){this._el=t,this._touchZoom=e,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0};di.prototype.enable=function(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add(\"mapboxgl-touch-zoom-rotate\")},di.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove(\"mapboxgl-touch-zoom-rotate\")},di.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},di.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},di.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},di.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var gi=function(t){return t.zoom||t.drag||t.pitch||t.rotate},mi=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}(t.Event);function vi(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}var yi=function(e,n){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new On(e),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),t.bindAll([\"handleEvent\",\"handleWindowEvent\"],this);var i=this._el;this._listeners=[[i,\"touchstart\",{passive:!1}],[i,\"touchmove\",{passive:!1}],[i,\"touchend\",void 0],[i,\"touchcancel\",void 0],[i,\"mousedown\",void 0],[i,\"mousemove\",void 0],[i,\"mouseup\",void 0],[t.window.document,\"mousemove\",{capture:!0}],[t.window.document,\"mouseup\",void 0],[i,\"mouseover\",void 0],[i,\"mouseout\",void 0],[i,\"dblclick\",void 0],[i,\"click\",void 0],[i,\"keydown\",{capture:!1}],[i,\"keyup\",void 0],[i,\"wheel\",{passive:!1}],[i,\"contextmenu\",void 0],[t.window,\"blur\",void 0]];for(var a=0,o=this._listeners;aa?Math.min(2,_):Math.max(.5,_),w=Math.pow(m,1-e),T=i.unproject(x.add(b.mult(e*w)).mult(g));i.setLocationAtPoint(i.renderWorldCopies?T.wrap():T,d)}n._fireMoveEvents(r)}),(function(t){n._afterEase(r,t)}),e),this},r.prototype._prepareEase=function(e,r,n){void 0===n&&(n={}),this._moving=!0,r||n.moving||this.fire(new t.Event(\"movestart\",e)),this._zooming&&!n.zooming&&this.fire(new t.Event(\"zoomstart\",e)),this._rotating&&!n.rotating&&this.fire(new t.Event(\"rotatestart\",e)),this._pitching&&!n.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,r){if(!this._easeId||!r||this._easeId!==r){delete this._easeId;var n=this._zooming,i=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new t.Event(\"zoomend\",e)),i&&this.fire(new t.Event(\"rotateend\",e)),a&&this.fire(new t.Event(\"pitchend\",e)),this.fire(new t.Event(\"moveend\",e))}},r.prototype.flyTo=function(e,r){var n=this;if(!e.essential&&t.browser.prefersReducedMotion){var i=t.pick(e,[\"center\",\"zoom\",\"bearing\",\"pitch\",\"around\"]);return this.jumpTo(i,r)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var a=this.transform,o=this.getZoom(),s=this.getBearing(),l=this.getPitch(),c=this.getPadding(),u=\"zoom\"in e?t.clamp(+e.zoom,a.minZoom,a.maxZoom):o,f=\"bearing\"in e?this._normalizeBearing(e.bearing,s):s,h=\"pitch\"in e?+e.pitch:l,p=\"padding\"in e?e.padding:a.padding,d=a.zoomScale(u-o),g=t.Point.convert(e.offset),m=a.centerPoint.add(g),v=a.pointLocation(m),y=t.LngLat.convert(e.center||v);this._normalizeCenter(y);var x=a.project(v),b=a.project(y).sub(x),_=e.curve,w=Math.max(a.width,a.height),T=w/d,k=b.mag();if(\"minZoom\"in e){var A=t.clamp(Math.min(e.minZoom,o,u),a.minZoom,a.maxZoom),M=w/a.zoomScale(A-o);_=Math.sqrt(M/k*2)}var S=_*_;function E(t){var e=(T*T-w*w+(t?-1:1)*S*S*k*k)/(2*(t?T:w)*S*k);return Math.log(Math.sqrt(e*e+1)-e)}function L(t){return(Math.exp(t)-Math.exp(-t))/2}function C(t){return(Math.exp(t)+Math.exp(-t))/2}var P=E(0),I=function(t){return C(P)/C(P+_*t)},O=function(t){return w*((C(P)*(L(e=P+_*t)/C(e))-L(P))/S)/k;var e},z=(E(1)-P)/_;if(Math.abs(k)<1e-6||!isFinite(z)){if(Math.abs(w-T)<1e-6)return this.easeTo(e,r);var D=Te.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==f,this._pitching=h!==l,this._padding=!a.isPaddingEqual(p),this._prepareEase(r,!1),this._ease((function(e){var i=e*z,d=1/I(i);a.zoom=1===e?u:o+a.scaleZoom(d),n._rotating&&(a.bearing=t.number(s,f,e)),n._pitching&&(a.pitch=t.number(l,h,e)),n._padding&&(a.interpolatePadding(c,p,e),m=a.centerPoint.add(g));var v=1===e?y:a.unproject(x.add(b.mult(O(i))).mult(d));a.setLocationAtPoint(a.renderWorldCopies?v.wrap():v,m),n._fireMoveEvents(r)}),(function(){return n._afterEase(r)}),e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){return this._stop()},r.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,e)}if(!t){var n=this.handlers;n&&n.stop()}return this},r.prototype._ease=function(e,r,n){!1===n.animate||0===n.duration?(e(1),r()):(this._easeStart=t.browser.now(),this._easeOptions=n,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<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)180?-360:r<-180?360:0}},r}(t.Evented),bi=function(e){void 0===e&&(e={}),this.options=e,t.bindAll([\"_updateEditLink\",\"_updateData\",\"_updateCompact\"],this)};bi.prototype.getDefaultPosition=function(){return\"bottom-right\"},bi.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-attrib\"),this._innerContainer=r.create(\"div\",\"mapboxgl-ctrl-attrib-inner\",this._container),e&&this._container.classList.add(\"mapboxgl-compact\"),this._updateAttributions(),this._updateEditLink(),this._map.on(\"styledata\",this._updateData),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},bi.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"styledata\",this._updateData),this._map.off(\"sourcedata\",this._updateData),this._map.off(\"moveend\",this._updateEditLink),this._map.off(\"resize\",this._updateCompact),this._map=void 0,this._attribHTML=void 0},bi.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(\".mapbox-improve-map\"));var r=[{key:\"owner\",value:this.styleOwner},{key:\"id\",value:this.styleId},{key:\"access_token\",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){var n=r.reduce((function(t,e,n){return e.value&&(t+=e.key+\"=\"+e.value+(n=0)return!1;return!0}))).join(\" | \");o!==this._attribHTML&&(this._attribHTML=o,t.length?(this._innerContainer.innerHTML=o,this._container.classList.remove(\"mapboxgl-attrib-empty\")):this._container.classList.add(\"mapboxgl-attrib-empty\"),this._editLink=null)}},bi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add(\"mapboxgl-compact\"):this._container.classList.remove(\"mapboxgl-compact\")};var _i=function(){t.bindAll([\"_updateLogo\"],this),t.bindAll([\"_updateCompact\"],this)};_i.prototype.onAdd=function(t){this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl\");var e=r.create(\"a\",\"mapboxgl-ctrl-logo\");return e.target=\"_blank\",e.rel=\"noopener nofollow\",e.href=\"https://www.mapbox.com/\",e.setAttribute(\"aria-label\",this._map._getUIString(\"LogoControl.Title\")),e.setAttribute(\"rel\",\"noopener nofollow\"),this._container.appendChild(e),this._container.style.display=\"none\",this._map.on(\"sourcedata\",this._updateLogo),this._updateLogo(),this._map.on(\"resize\",this._updateCompact),this._updateCompact(),this._container},_i.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"sourcedata\",this._updateLogo),this._map.off(\"resize\",this._updateCompact)},_i.prototype.getDefaultPosition=function(){return\"bottom-left\"},_i.prototype._updateLogo=function(t){t&&\"metadata\"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?\"block\":\"none\")},_i.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}},_i.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add(\"mapboxgl-compact\"):e.classList.remove(\"mapboxgl-compact\")}};var wi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};wi.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},wi.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,n=e?this._queue.concat(e):this._queue;re.maxZoom)throw new Error(\"maxZoom must be greater than or equal to minZoom\");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error(\"maxPitch must be greater than or equal to minPitch\");if(null!=e.minPitch&&e.minPitch<0)throw new Error(\"minPitch must be greater than or equal to 0\");if(null!=e.maxPitch&&e.maxPitch>60)throw new Error(\"maxPitch must be less than or equal to 60\");var i=new An(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(n.call(this,i,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new wi,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},Ti,e.locale),this._requestManager=new t.RequestManager(e.transformRequest,e.accessToken),\"string\"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error(\"Container '\"+e.container+\"' not found.\")}else{if(!(e.container instanceof Ai))throw new Error(\"Invalid type: 'container' must be a String or HTMLElement.\");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll([\"_onWindowOnline\",\"_onWindowResize\",\"_contextLost\",\"_contextRestored\"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error(\"Failed to initialize WebGL.\");this.on(\"move\",(function(){return r._update(!1)})),this.on(\"moveend\",(function(){return r._update(!1)})),this.on(\"zoom\",(function(){return r._update(!0)})),void 0!==t.window&&(t.window.addEventListener(\"online\",this._onWindowOnline,!1),t.window.addEventListener(\"resize\",this._onWindowResize,!1)),this.handlers=new yi(this,e);var a=\"string\"==typeof e.hash&&e.hash||void 0;this._hash=e.hash&&new Sn(a).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new bi({customAttribution:e.customAttribution})),this.addControl(new _i,e.logoPosition),this.on(\"style.load\",(function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)})),this.on(\"data\",(function(e){r._update(\"style\"===e.dataType),r.fire(new t.Event(e.dataType+\"data\",e))})),this.on(\"dataloading\",(function(e){r.fire(new t.Event(e.dataType+\"dataloading\",e))}))}n&&(i.__proto__=n),i.prototype=Object.create(n&&n.prototype),i.prototype.constructor=i;var a={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(e,r){if(void 0===r&&e.getDefaultPosition&&(r=e.getDefaultPosition()),void 0===r&&(r=\"top-right\"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error(\"Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.\")));var n=e.onAdd(this);this._controls.push(e);var i=this._controlPositions[r];return-1!==r.indexOf(\"bottom\")?i.insertBefore(n,i.firstChild):i.appendChild(n),this},i.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error(\"Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.\")));var r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this},i.prototype.resize=function(e){var r=this._containerDimensions(),n=r[0],i=r[1];this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i);var a=!this._moving;return a&&(this.stop(),this.fire(new t.Event(\"movestart\",e)).fire(new t.Event(\"move\",e))),this.fire(new t.Event(\"resize\",e)),a&&this.fire(new t.Event(\"moveend\",e)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},i.prototype.setMinZoom=function(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=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\")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(t){if((t=null==t?0:t)<0)throw new Error(\"minPitch must be greater than or equal to 0\");if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()60)throw new Error(\"maxPitch must be less than or equal to 60\");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error(\"maxPitch must be greater than the current minPitch\")},i.prototype.getMaxPitch=function(){return this.transform.maxPitch},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},i.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},i.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},i.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},i.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},i.prototype._createDelegatedListener=function(t,e,r){var n,i=this;if(\"mouseenter\"===t||\"mouseover\"===t){var a=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){var o=i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[];o.length?a||(a=!0,r.call(i,new Rn(t,i,n.originalEvent,{features:o}))):a=!1},mouseout:function(){a=!1}}}}if(\"mouseleave\"===t||\"mouseout\"===t){var o=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){(i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[]).length?o=!0:o&&(o=!1,r.call(i,new Rn(t,i,n.originalEvent)))},mouseout:function(e){o&&(o=!1,r.call(i,new Rn(t,i,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(n={},n[t]=function(t){var n=i.getLayer(e)?i.queryRenderedFeatures(t.point,{layers:[e]}):[];n.length&&(t.features=n,r.call(i,t),delete t.features)},n)}},i.prototype.on=function(t,e,r){if(void 0===r)return n.prototype.on.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(i),i.delegates)this.on(a,i.delegates[a]);return this},i.prototype.once=function(t,e,r){if(void 0===r)return n.prototype.once.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in i.delegates)this.once(a,i.delegates[a]);return this},i.prototype.off=function(t,e,r){var i=this;if(void 0===r)return n.prototype.off.call(this,t,e);return this._delegatedListeners&&this._delegatedListeners[t]&&function(n){for(var a=n[t],o=0;o180;){var s=n.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;e.lng>n.center.lng?e.lng-=360:e.lng+=360}return e}Ii.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),r.disableDrag()},Ii.prototype.move=function(t,e){var r=this.map,n=this.mouseRotate.mousemoveWindow(t,e);if(n&&n.bearingDelta&&r.setBearing(r.getBearing()+n.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(t,e);i&&i.pitchDelta&&r.setPitch(r.getPitch()+i.pitchDelta)}},Ii.prototype.off=function(){var t=this.element;r.removeEventListener(t,\"mousedown\",this.mousedown),r.removeEventListener(t,\"touchstart\",this.touchstart,{passive:!1}),r.removeEventListener(t,\"touchmove\",this.touchmove),r.removeEventListener(t,\"touchend\",this.touchend),r.removeEventListener(t,\"touchcancel\",this.reset),this.offTemp()},Ii.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(t.window,\"mousemove\",this.mousemove),r.removeEventListener(t.window,\"mouseup\",this.mouseup)},Ii.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),r.mousePos(this.element,e)),r.addEventListener(t.window,\"mousemove\",this.mousemove),r.addEventListener(t.window,\"mouseup\",this.mouseup)},Ii.prototype.mousemove=function(t){this.move(t,r.mousePos(this.element,t))},Ii.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},Ii.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.down({type:\"mousedown\",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},Ii.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},Ii.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)e.getEast()||r.latitudee.getNorth())},n.prototype._setErrorState=function(){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\")}},n.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event(\"outofmaxbounds\",e)),this._updateMarker(),void this._finish();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()}},n.prototype._updateCamera=function(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude),n=e.coords.accuracy,i=this._map.getBearing(),a=t.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),a,{geolocateSource:!0})},n.prototype._updateMarker=function(e){if(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},n.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),r=this._map.unproject([1,t]),n=e.distanceTo(r),i=Math.ceil(2*this._accuracy/n);this._circleElement.style.width=i+\"px\",this._circleElement.style.height=i+\"px\"},n.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},n.prototype._onError=function(e){if(this._map){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\"),this._geolocateButton.disabled=!0;var r=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.title=r,this._geolocateButton.setAttribute(\"aria-label\",r),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&ji)return;this._setErrorState()}\"OFF\"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add(\"mapboxgl-user-location-dot-stale\"),this.fire(new t.Event(\"error\",e)),this._finish()}},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(e){var n=this;if(this._container.addEventListener(\"contextmenu\",(function(t){return t.preventDefault()})),this._geolocateButton=r.create(\"button\",\"mapboxgl-ctrl-geolocate\",this._container),r.create(\"span\",\"mapboxgl-ctrl-icon\",this._geolocateButton).setAttribute(\"aria-hidden\",!0),this._geolocateButton.type=\"button\",!1===e){t.warnOnce(\"Geolocation support is not available so the GeolocateControl will be disabled.\");var i=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute(\"aria-label\",i)}else{var a=this._map._getUIString(\"GeolocateControl.FindMyLocation\");this._geolocateButton.title=a,this._geolocateButton.setAttribute(\"aria-label\",a)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute(\"aria-pressed\",\"false\"),this._watchState=\"OFF\"),this.options.showUserLocation&&(this._dotElement=r.create(\"div\",\"mapboxgl-user-location-dot\"),this._userLocationDotMarker=new Fi(this._dotElement),this._circleElement=r.create(\"div\",\"mapboxgl-user-location-accuracy-circle\"),this._accuracyCircleMarker=new Fi({element:this._circleElement,pitchAlignment:\"map\"}),this.options.trackUserLocation&&(this._watchState=\"OFF\"),this._map.on(\"zoom\",this._onZoom)),this._geolocateButton.addEventListener(\"click\",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on(\"movestart\",(function(e){var r=e.originalEvent&&\"resize\"===e.originalEvent.type;e.geolocateSource||\"ACTIVE_LOCK\"!==n._watchState||r||(n._watchState=\"BACKGROUND\",n._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background\"),n._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),n.fire(new t.Event(\"trackuserlocationend\")))}))},n.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\":Ni--,ji=!1,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\")}if(\"OFF\"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.setAttribute(\"aria-pressed\",\"true\"),++Ni>1?(e={maximumAge:6e5,timeout:0},ji=!0):(e=this.options.positionOptions,ji=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},n.prototype._clearWatch=function(){t.window.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)},n}(t.Evented),Vi={maxWidth:100,unit:\"metric\"},Hi=function(e){this.options=t.extend({},Vi,e),t.bindAll([\"_onMove\",\"setUnit\"],this)};function qi(t,e,r){var n=r&&r.maxWidth||100,i=t._container.clientHeight/2,a=t.unproject([0,i]),o=t.unproject([n,i]),s=a.distanceTo(o);if(r&&\"imperial\"===r.unit){var l=3.2808*s;if(l>5280)Gi(e,n,l/5280,t._getUIString(\"ScaleControl.Miles\"));else Gi(e,n,l,t._getUIString(\"ScaleControl.Feet\"))}else if(r&&\"nautical\"===r.unit){Gi(e,n,s/1852,t._getUIString(\"ScaleControl.NauticalMiles\"))}else s>=1e3?Gi(e,n,s/1e3,t._getUIString(\"ScaleControl.Kilometers\")):Gi(e,n,s,t._getUIString(\"ScaleControl.Meters\"))}function Gi(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:o>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(o),a*o),l=s/r;t.style.width=e*l+\"px\",t.innerHTML=s+\" \"+n}Hi.prototype.getDefaultPosition=function(){return\"bottom-left\"},Hi.prototype._onMove=function(){qi(this._map,this._container,this.options)},Hi.prototype.onAdd=function(t){return this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-scale\",t.getContainer()),this._map.on(\"move\",this._onMove),this._onMove(),this._container},Hi.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"move\",this._onMove),this._map=void 0},Hi.prototype.setUnit=function(t){this.options.unit=t,qi(this._map,this._container,this.options)};var Yi=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce(\"Full screen control 'container' must be a DOM element.\")),t.bindAll([\"_onClickFullscreen\",\"_changeIcon\"],this),\"onfullscreenchange\"in t.window.document?this._fullscreenchange=\"fullscreenchange\":\"onmozfullscreenchange\"in t.window.document?this._fullscreenchange=\"mozfullscreenchange\":\"onwebkitfullscreenchange\"in t.window.document?this._fullscreenchange=\"webkitfullscreenchange\":\"onmsfullscreenchange\"in t.window.document&&(this._fullscreenchange=\"MSFullscreenChange\")};Yi.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-group\"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display=\"none\",t.warnOnce(\"This device does not support fullscreen mode.\")),this._controlContainer},Yi.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Yi.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Yi.prototype._setupUI=function(){var e=this._fullscreenButton=r.create(\"button\",\"mapboxgl-ctrl-fullscreen\",this._controlContainer);r.create(\"span\",\"mapboxgl-ctrl-icon\",e).setAttribute(\"aria-hidden\",!0),e.type=\"button\",this._updateTitle(),this._fullscreenButton.addEventListener(\"click\",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Yi.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute(\"aria-label\",t),this._fullscreenButton.title=t},Yi.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?\"FullscreenControl.Exit\":\"FullscreenControl.Enter\")},Yi.prototype._isFullscreen=function(){return this._fullscreen},Yi.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(\"mapboxgl-ctrl-shrink\"),this._fullscreenButton.classList.toggle(\"mapboxgl-ctrl-fullscreen\"),this._updateTitle())},Yi.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Wi={closeButton:!0,closeOnClick:!0,className:\"\",maxWidth:\"240px\"},Xi=function(e){function n(r){e.call(this),this.options=t.extend(Object.create(Wi),r),t.bindAll([\"_update\",\"_onClose\",\"remove\",\"_onMouseMove\",\"_onMouseUp\",\"_onDrag\"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on(\"click\",this._onClose),this.options.closeOnMove&&this._map.on(\"move\",this._onClose),this._map.on(\"remove\",this.remove),this._update(),this._trackPointer?(this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"mouseup\",this._onMouseUp),this._container&&this._container.classList.add(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"mapboxgl-track-pointer\")):this._map.on(\"move\",this._update),this.fire(new t.Event(\"open\")),this},n.prototype.isOpen=function(){return!!this._map},n.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off(\"move\",this._update),this._map.off(\"move\",this._onClose),this._map.off(\"click\",this._onClose),this._map.off(\"remove\",this.remove),this._map.off(\"mousemove\",this._onMouseMove),this._map.off(\"mouseup\",this._onMouseUp),this._map.off(\"drag\",this._onDrag),delete this._map),this.fire(new t.Event(\"close\")),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on(\"move\",this._update),this._map.off(\"mousemove\",this._onMouseMove),this._container&&this._container.classList.remove(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.remove(\"mapboxgl-track-pointer\")),this},n.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off(\"move\",this._update),this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"drag\",this._onDrag),this._container&&this._container.classList.add(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"mapboxgl-track-pointer\")),this},n.prototype.getElement=function(){return this._container},n.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},n.prototype.setHTML=function(e){var r,n=t.window.document.createDocumentFragment(),i=t.window.document.createElement(\"body\");for(i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},n.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},n.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},n.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},n.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},n.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},n.prototype._createContent=function(){this._content&&r.remove(this._content),this._content=r.create(\"div\",\"mapboxgl-popup-content\",this._container),this.options.closeButton&&(this._closeButton=r.create(\"button\",\"mapboxgl-popup-close-button\",this._content),this._closeButton.type=\"button\",this._closeButton.setAttribute(\"aria-label\",\"Close popup\"),this._closeButton.innerHTML=\"×\",this._closeButton.addEventListener(\"click\",this._onClose))},n.prototype._onMouseUp=function(t){this._update(t.point)},n.prototype._onMouseMove=function(t){this._update(t.point)},n.prototype._onDrag=function(t){this._update(t.point)},n.prototype._update=function(e){var n=this,i=this._lngLat||this._trackPointer;if(this._map&&i&&this._content&&(this._container||(this._container=r.create(\"div\",\"mapboxgl-popup\",this._map.getContainer()),this._tip=r.create(\"div\",\"mapboxgl-popup-tip\",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(\" \").forEach((function(t){return n._container.classList.add(t)})),this._trackPointer&&this._container.classList.add(\"mapboxgl-popup-track-pointer\")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Oi(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var a=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),o=this.options.anchor,s=function e(r){if(r){if(\"number\"==typeof r){var n=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new t.Point(0,0),top:new t.Point(0,r),\"top-left\":new t.Point(n,n),\"top-right\":new t.Point(-n,n),bottom:new t.Point(0,-r),\"bottom-left\":new t.Point(n,-n),\"bottom-right\":new t.Point(-n,-n),left:new t.Point(r,0),right:new t.Point(-r,0)}}if(r instanceof t.Point||Array.isArray(r)){var i=t.Point.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.Point.convert(r.center||[0,0]),top:t.Point.convert(r.top||[0,0]),\"top-left\":t.Point.convert(r[\"top-left\"]||[0,0]),\"top-right\":t.Point.convert(r[\"top-right\"]||[0,0]),bottom:t.Point.convert(r.bottom||[0,0]),\"bottom-left\":t.Point.convert(r[\"bottom-left\"]||[0,0]),\"bottom-right\":t.Point.convert(r[\"bottom-right\"]||[0,0]),left:t.Point.convert(r.left||[0,0]),right:t.Point.convert(r.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!o){var l,c=this._container.offsetWidth,u=this._container.offsetHeight;l=a.y+s.bottom.ythis._map.transform.height-u?[\"bottom\"]:[],a.xthis._map.transform.width-c/2&&l.push(\"right\"),o=0===l.length?\"bottom\":l.join(\"-\")}var f=a.add(s[o]).round();r.setTransform(this._container,zi[o]+\" translate(\"+f.x+\"px,\"+f.y+\"px)\"),Di(this._container,o,\"popup\")}},n.prototype._onClose=function(){this.remove()},n}(t.Evented);var Zi={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Ei,NavigationControl:Pi,GeolocateControl:Ui,AttributionControl:bi,ScaleControl:Hi,FullscreenControl:Yi,Popup:Xi,Marker:Fi,Style:qe,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:function(){Bt().acquire(zt)},clearPrewarmedResources:function(){var t=Rt;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(zt),Rt=null):console.warn(\"Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()\"))},get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return Dt.workerCount},set workerCount(t){Dt.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){t.clearTileCache(e)},workerUrl:\"\"};return Zi})),r}))},{}],240:[function(t,e,r){\"use strict\";e.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},{}],241:[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 m(){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)))}m();var v={element:t};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(e){e?m():function(){if(!s)return;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}}),v};var n=t(\"mouse-event\")},{\"mouse-event\":243}],242:[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}},{}],243:[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<=0)return 1<=-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)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])t!=o-i>t&&(a-c)*(i-u)/(o-u)+c-n>t&&(s=!s),a=c,o=u}return s}};return e}},{}],257:[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;i0}))}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 m(){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 v,y=m();if(y){var x;if(t)(x=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above);else y.seg.otherFill=h.seg.myFill;r&&r.segmentUpdate(y.seg),h.other.remove(),h.remove()}if(a.getHead()!==h){r&&r.rewind(h.seg);continue}if(t)x=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=x?!h.seg.myFill.below:h.seg.myFill.below;else if(null===h.seg.otherFill)v=g?h.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:h.primary?o:i,h.seg.otherFill={above:v,below:v};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;l0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,t)}},a.prototype.read_uint16=function(t){var e=this.input;if(t+2>e.length)throw n(\"unexpected EOF\",\"EBADDATA\");return this.big_endian?256*e[t]+e[t+1]:e[t]+256*e[t+1]},a.prototype.read_uint32=function(t){var e=this.input;if(t+4>e.length)throw n(\"unexpected EOF\",\"EBADDATA\");return this.big_endian?16777216*e[t]+65536*e[t+1]+256*e[t+2]+e[t+3]:e[t]+256*e[t+1]+65536*e[t+2]+16777216*e[t+3]},a.prototype.is_subifd_link=function(t,e){return 0===t&&34665===e||0===t&&34853===e||34665===t&&40965===e},a.prototype.exif_format_length=function(t){switch(t){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},a.prototype.exif_format_read=function(t,e){var r;switch(t){case 1:case 2:return r=this.input[e];case 6:return(r=this.input[e])|33554430*(128&r);case 3:return r=this.read_uint16(e);case 8:return(r=this.read_uint16(e))|131070*(32768&r);case 4:return r=this.read_uint32(e);case 9:return 0|(r=this.read_uint32(e));case 5:case 10:case 11:case 12:case 7:default:return null}},a.prototype.scan_ifd=function(t,e,r){var a=this.read_uint16(e);e+=2;for(var o=0;othis.input.length)throw n(\"unexpected EOF\",\"EBADDATA\");for(var d=[],g=h,m=0;m0&&(this.ifds_to_read.push({id:s,offset:d[0]}),p=!0),!1===r({is_big_endian:this.big_endian,ifd:t,tag:s,format:l,count:c,entry_offset:e+this.start,data_length:f,data_offset:h+this.start,value:d,is_subifd_link:p}))return void(this.aborted=!0);e+=12}0===t&&this.ifds_to_read.push({id:1,offset:this.read_uint32(e)})},e.exports.ExifParser=a,e.exports.get_orientation=function(t){var e=0;try{return new a(t,0,t.length).each((function(t){if(0===t.ifd&&274===t.tag&&Array.isArray(t.value))return e=t.value[0],!1})),e}catch(t){return-1}}},{}],264:[function(t,e,r){\"use strict\";var n=t(\"./common\").readUInt16BE,i=t(\"./common\").readUInt32BE;function a(t,e){if(t.length<4+e)return null;var r=i(t,e);return t.length>4&15,i=15&t[4],a=t[5]>>4&15,o=n(t,6),l=8,c=0;ce.width||t.width===e.width&&t.height>e.height?t:e})),i=r.reduce((function(t,e){return t.height>e.height||t.height===e.height&&t.width>e.width?t:e})),n.width>i.height||n.width===i.height&&n.height>i.width?n:i),s=1;e.transforms.forEach((function(t){var e={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},r={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(\"imir\"===t.type&&(s=0===t.value?r[s]:e[s=e[s=r[s]]]),\"irot\"===t.type)for(var n=0;n1&&(h.variants=f.variants),f.orientation&&(h.orientation=f.orientation),f.exif_location&&f.exif_location.offset+f.exif_location.length<=t.length){var p=a(t,f.exif_location.offset),d=t.slice(f.exif_location.offset+p+4,f.exif_location.offset+f.exif_location.length),g=s.get_orientation(d);g>0&&(h.orientation=g)}return h}}}}}}},{\"../common\":262,\"../exif_utils\":263,\"../miaf_utils\":264}],266:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt16LE,o=n(\"BM\");e.exports=function(t){if(!(t.length<26)&&i(t,0,o))return{width:a(t,18),height:a(t,22),type:\"bmp\",mime:\"image/bmp\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],267:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt16LE,o=n(\"GIF87a\"),s=n(\"GIF89a\");e.exports=function(t){if(!(t.length<10)&&(i(t,0,o)||i(t,0,s)))return{width:a(t,6),height:a(t,8),type:\"gif\",mime:\"image/gif\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],268:[function(t,e,r){\"use strict\";var n=t(\"../common\").readUInt16LE;e.exports=function(t){var e=n(t,0),r=n(t,2),i=n(t,4);if(0===e&&1===r&&i){for(var a=[],o={width:0,height:0},s=0;so.width||c>o.height)&&(o=u)}return{width:o.width,height:o.height,variants:a,type:\"ico\",mime:\"image/x-icon\",wUnits:\"px\",hUnits:\"px\"}}}},{\"../common\":262}],269:[function(t,e,r){\"use strict\";var n=t(\"../common\").readUInt16BE,i=t(\"../common\").str2arr,a=t(\"../common\").sliceEq,o=t(\"../exif_utils\"),s=i(\"Exif\\0\\0\");e.exports=function(t){if(!(t.length<2)&&255===t[0]&&216===t[1]&&255===t[2])for(var e=2;;){for(;;){if(t.length-e<2)return;if(255===t[e++])break}for(var r,i,l=t[e++];255===l;)l=t[e++];if(208<=l&&l<=217||1===l)r=0;else{if(!(192<=l&&l<=254))return;if(t.length-e<2)return;r=n(t,e)-2,e+=2}if(217===l||218===l)return;if(225===l&&r>=10&&a(t,e,s)&&(i=o.get_orientation(t.slice(e+6,e+r))),r>=5&&192<=l&&l<=207&&196!==l&&200!==l&&204!==l){if(t.length-e0&&(c.orientation=i),c}e+=r}}},{\"../common\":262,\"../exif_utils\":263}],270:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt32BE,o=n(\"\\x89PNG\\r\\n\\x1a\\n\"),s=n(\"IHDR\");e.exports=function(t){if(!(t.length<24)&&i(t,0,o)&&i(t,12,s))return{width:a(t,16),height:a(t,20),type:\"png\",mime:\"image/png\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],271:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt32BE,o=n(\"8BPS\\0\\x01\");e.exports=function(t){if(!(t.length<22)&&i(t,0,o))return{width:a(t,18),height:a(t,14),type:\"psd\",mime:\"image/vnd.adobe.photoshop\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],272:[function(t,e,r){\"use strict\";function n(t){return\"number\"==typeof t&&isFinite(t)&&t>0}var i=/<[-_.:a-zA-Z0-9][^>]*>/,a=/^<([-_.:a-zA-Z0-9]+:)?svg\\s/,o=/[^-]\\bwidth=\"([^%]+?)\"|[^-]\\bwidth='([^%]+?)'/,s=/\\bheight=\"([^%]+?)\"|\\bheight='([^%]+?)'/,l=/\\bview[bB]ox=\"(.+?)\"|\\bview[bB]ox='(.+?)'/,c=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function u(t){return c.test(t)?t.match(c)[0]:\"px\"}e.exports=function(t){if(function(t){var e,r=0,n=t.length;for(239===t[0]&&187===t[1]&&191===t[2]&&(r=3);r>14&16383),type:\"webp\",mime:\"image/webp\",wUnits:\"px\",hUnits:\"px\"}}}function h(t,e){return{width:1+(t[e+6]<<16|t[e+5]<<8|t[e+4]),height:1+(t[e+9]<t.length)){for(;e+8=10?r=r||u(t,e+8):\"VP8L\"===p&&d>=9?r=r||f(t,e+8):\"VP8X\"===p&&d>=10?r=r||h(t,e+8):\"EXIF\"===p&&(n=s.get_orientation(t.slice(e+8,e+8+d)),e=1/0),e+=8+d}else e++;if(r)return n>0&&(r.orientation=n),r}}}},{\"../common\":262,\"../exif_utils\":263}],275:[function(t,e,r){\"use strict\";e.exports={avif:t(\"./parse_sync/avif\"),bmp:t(\"./parse_sync/bmp\"),gif:t(\"./parse_sync/gif\"),ico:t(\"./parse_sync/ico\"),jpeg:t(\"./parse_sync/jpeg\"),png:t(\"./parse_sync/png\"),psd:t(\"./parse_sync/psd\"),svg:t(\"./parse_sync/svg\"),tiff:t(\"./parse_sync/tiff\"),webp:t(\"./parse_sync/webp\")}},{\"./parse_sync/avif\":265,\"./parse_sync/bmp\":266,\"./parse_sync/gif\":267,\"./parse_sync/ico\":268,\"./parse_sync/jpeg\":269,\"./parse_sync/png\":270,\"./parse_sync/psd\":271,\"./parse_sync/svg\":272,\"./parse_sync/tiff\":273,\"./parse_sync/webp\":274}],276:[function(t,e,r){\"use strict\";var n=t(\"./lib/parsers_sync\");e.exports=function(t){return function(t){for(var e=Object.keys(n),r=0;r1)for(var r=1;r1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function T(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 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 float dashLength, pixelRatio, thickness, opacity, id, miterMode;\\nuniform sampler2D dashTexture;\\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) / dashLength) * .5 + .25;\\n\\tfloat dash = texture2D(dashTexture, 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||\"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\",splitNull:\"splitNull\"}),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=D}));(I=I.slice(0,R)).push(D)}for(var F=function(t){var e=k.slice(2*z,2*I[t]).concat(D?k.slice(2*D):[]),r=(d.hole||[]).map((function(e){return e-D+(I[t]-z)})),n=c(e,r);n=n.map((function(e){return e+z+(e+zt.length)&&(e=t.length);for(var r=0,n=new Array(e);r 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\"]),l.vert=h([\"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 bool constPointSize;\\nuniform float pixelRatio;\\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\\nuniform sampler2D paletteTexture;\\n\\nconst float maxSize = 100.;\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragBorderRadius, fragWidth;\\n\\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\\n\\nbool isDirect = (paletteSize.x < 1.);\\n\\nvec4 getColor(vec4 id) {\\n return isDirect ? id / 255. : texture2D(paletteTexture,\\n vec2(\\n (id.x + .5) / paletteSize.x,\\n (id.y + .5) / paletteSize.y\\n )\\n );\\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) * pointSizeScale;\\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\"]),m&&(l.frag=l.frag.replace(\"smoothstep\",\"smoothStep\"),s.frag=s.frag.replace(\"smoothstep\",\"smoothStep\")),this.drawCircle=t(l)}b.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},b.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},b.prototype.draw=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;nn)?e.tree=u(t,{bounds:f}):n&&n.length&&(e.tree=n),e.tree){var h={primitive:\"points\",usage:\"static\",data:e.tree,type:\"uint32\"};e.elements?e.elements(h):e.elements=o.elements(h)}var p=v.float32(t);return i({data:p,usage:\"dynamic\"}),a({data:v.fract32(t,p),usage:\"dynamic\"}),s({data:new Uint8Array(c),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=[],s=0,l=Math.min(e.length,r.count);s=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;o4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===i.length?i[0]:i},b.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;i2?(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;nk))&&(s.lower||!(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)||W(t.data))}function c(t,e,r,n,i,a){for(var o=0;o(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)||W(t)||l(t)?e=t:(\"data\"in t&&(e=t.data),\"usage\"in t&&(r=Q[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>>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,r.height>>=i,p(r,n[i]),t.mipmask|=1<e;++e)t.images[e]=null;return t}function C(t){for(var e=t.images,r=0;re){for(var r=0;r=--this.refCount&&F(this)}}),o.profile&&(a.getTotalTextureSize=function(){var t=0;return Object.keys(yt).forEach((function(e){t+=yt[e].stats.size})),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;P.call(r);var a=L();return\"number\"==typeof t?M(a,0|t,\"number\"==typeof e?0|e:0|t):t?(I(r,t),S(a,t)):M(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),E(a,3553),O(r,3553),R(),C(a),o.profile&&(i.stats.size=T(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 z(3553);return yt[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=v();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(),k(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=0;i.mipmask>>l;++l){var c=a>>l,u=s>>l;if(!c||!u)break;t.texImage2D(3553,l,i.format,c,u,0,i.format,i.type,null)}return R(),o.profile&&(i.stats.size=T(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(P.call(l),s=0;6>s;++s)g[s]=L();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(I(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)M(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)E(g[s],34069+s);for(O(l,34067),R(),o.profile&&(h.stats.size=T(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)C(g[s]);return f}var h=new z(34067);yt[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=v();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(),k(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=T(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;er;++r)if(0!=(e.mipmask&1<>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);O(e.texInfo,e.target)}))},refresh:function(){for(var e=0;ei;++i){for(c=0;ct;++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(k).forEach(m)},restore:function(){x.cur=null,x.next=null,x.dirty=!0,X(k).forEach((function(e){e.framebuffer=t.createFramebuffer(),v(e)}))}})}function M(){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,i,a,o){function s(){this.id=++f,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var t=e.oes_vertex_array_object;this.vao=t?t.createVertexArrayOES():null,h[this.id]=this,this.buffers=[]}var c=r.maxAttributes,u=Array(c);for(r=0;r=h.byteLength?c.subdata(h):(c.destroy(),r.buffers[s]=null)),r.buffers[s]||(c=r.buffers[s]=i.create(u,34962,!1,!0)),f.buffer=i.getBuffer(c),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1,t[s]=1;else i.getBuffer(u)?(f.buffer=i.getBuffer(u),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1):i.getBuffer(u.buffer)?(f.buffer=i.getBuffer(u.buffer),f.size=0|(+u.size||f.buffer.dimension),f.normalized=!!u.normalized||!1,f.type=\"type\"in u?K[u.type]:f.buffer.dtype,f.offset=0|(u.offset||0),f.stride=0|(u.stride||0),f.divisor=0|(u.divisor||0),f.state=1):\"x\"in u&&(f.x=+u.x||0,f.y=+u.y||0,f.z=+u.z||0,f.w=+u.w||0,f.state=2)}for(c=0;ct&&(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(e,n,i,a){var o=f[n];o||(o=f[n]={});var p=o[e];if(p&&(p.refCount++,!a))return p;var d=new s(n,e);return r.shaderCount++,l(d,i,a),p||(o[e]=d),h.push(d),j(d,{destroy:function(){if(d.refCount--,0>=d.refCount){t.deleteProgram(d.program);var e=h.indexOf(d);h.splice(e,1),r.shaderCount--}0>=o[d.vertId].refCount&&(t.deleteShader(u[d.vertId]),delete u[d.vertId],delete f[d.fragId][d.vertId]),Object.keys(f[d.fragId]).length||(t.deleteShader(c[d.fragId]),delete c[d.fragId],delete f[d.fragId])}})},restore:function(){c={},u={};for(var t=0;t\"+e+\"?\"+i+\".constant[\"+e+\"]:0;\"})).join(\"\"),\"}}else{\",\"if(\",s,\"(\",i,\".buffer)){\",u,\"=\",a,\".createStream(\",34962,\",\",i,\".buffer);\",\"}else{\",u,\"=\",a,\".getBuffer(\",i,\".buffer);\",\"}\",f,'=\"type\" in ',i,\"?\",o.glTypes,\"[\",i,\".type]:\",u,\".dtype;\",l.normalized,\"=!!\",i,\".normalized;\"),n(\"size\"),n(\"offset\"),n(\"stride\"),n(\"divisor\"),r(\"}}\"),r.exit(\"if(\",l.isStream,\"){\",a,\".destroyStream(\",u,\");\",\"}\"),l}))})),o}function A(t,e,n,i,o){function s(t){var e=c[t];e&&(h[t]=e)}var l=function(t,e){if(\"string\"==typeof(r=t.static).frag&&\"string\"==typeof r.vert){if(0>1)\",s],\");\")}function e(){r(l,\".drawArraysInstancedANGLE(\",[d,g,m,s],\");\")}p&&\"null\"!==p?y?t():(r(\"if(\",p,\"){\"),t(),r(\"}else{\"),e(),r(\"}\")):e()}function o(){function t(){r(u+\".drawElements(\"+[d,m,v,g+\"<<((\"+v+\"-5121)>>1)\"]+\");\")}function e(){r(u+\".drawArrays(\"+[d,g,m]+\");\")}p&&\"null\"!==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),h.elementsActive&&a(\"if(\"+i+\")\"+u+\".bindBuffer(34963,\"+i+\".buffer.buffer);\")):(i=a.def(),a(i,\"=\",f,\".\",\"elements\",\";\",\"if(\",i,\"){\",u,\".bindBuffer(\",34963,\",\",i,\".buffer.buffer);}\",\"else if(\",c.vao,\".currentVAO){\",i,\"=\",t.shared.elements+\".getElements(\"+c.vao,\".currentVAO.elements);\",nt?\"\":\"if(\"+i+\")\"+u+\".bindBuffer(34963,\"+i+\".buffer.buffer);\",\"}\")),i}(),d=i(\"primitive\"),g=i(\"offset\"),m=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 m){if(0===m)return}else r(\"if(\",m,\"){\"),r.exit(\"}\");tt&&(s=i(\"instances\"),l=t.instancing);var v=p+\".type\",y=h.elements&&D(h.elements)&&!h.vaoActive;tt&&(\"number\"!=typeof s||0<=s)?\"string\"==typeof s?(r(\"if(\",s,\">0){\"),a(),r(\"}else if(\",s,\"<0){\"),o(),r(\"}\")):a():o()}function G(t,e,r,n,i){return i=(e=b()).proc(\"body\",i),tt&&(e.instancing=i.def(e.shared.extensions,\".angle_instanced_arrays\")),t(e,i,r,n),e.compile().body}function Y(t,e,r,n){B(t,e),r.useVAO?r.drawVAO?e(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,e),\");\"):e(t.shared.vao,\".setVAO(\",t.shared.vao,\".targetVAO);\"):(e(t.shared.vao,\".setVAO(null);\"),U(t,e,r,n.attributes,(function(){return!0}))),H(t,e,r,n.uniforms,(function(){return!0}),!1),q(t,e,e,r)}function W(t,e,r,n){function i(){return!0}t.batchId=\"a1\",B(t,e),U(t,e,r,n.attributes,i),H(t,e,r,n.uniforms,i,!1),q(t,e,e,r)}function X(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}B(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&&M(t,u,r.context),r.needsFramebuffer&&S(t,u,r.framebuffer),L(t,u,r.state,i),r.profile&&i(r.profile)&&N(t,u,r,!1,!0),n?(r.useVAO?r.drawVAO?i(r.drawVAO)?u(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,u),\");\"):c(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,c),\");\"):c(t.shared.vao,\".setVAO(\",t.shared.vao,\".targetVAO);\"):(c(t.shared.vao,\".setVAO(null);\"),U(t,c,r,n.attributes,a),U(t,u,r,n.attributes,i)),H(t,c,r,n.uniforms,a,!1),H(t,u,r,n.uniforms,i,!0),q(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 G(W,t,r,e,2)})),\"(\",n,\");}\",c,\".call(this,a0[\",s,\"],\",s,\");\"))}function Z(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;M(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),O(Object.keys(r.state)).forEach((function(e){var n=r.state[e].append(t,i);m(n)?n.forEach((function(r,n){i.set(t.next[e],\"[\"+n+\"]\",r)})):i.set(a.next,\".\"+e,n)})),N(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){var o=r.uniforms[n].append(t,i);Array.isArray(o)&&(o=\"[\"+o.join()+\"]\"),i.set(a.uniforms,\"[\"+e.id(n)+\"]\",o)})),Object.keys(r.attributes).forEach((function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new Q).forEach((function(t){i.set(a,\".\"+t,n[t])}))})),r.scopeVAO&&i.set(a.vao,\".targetVAO\",r.scopeVAO.append(t,i)),n(\"vert\"),n(\"frag\"),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.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)}}},xt=[];xt[6408]=4,xt[6407]=3;var bt=[];bt[5121]=1,bt[5126]=4,bt[36193]=2;var _t=[\"x\",\"y\",\"z\",\"w\"],wt=\"blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset\".split(\" \"),Tt={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},At={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,\"increment wrap\":34055,\"decrement wrap\":34056,invert:5386},Mt={cw:2304,ccw:2305},St=new z(!1,!1,!1,(function(){}));return function(t){function e(){if(0===J.length)w&&w.update(),tt=null;else{tt=H.next(e),f();for(var t=J.length-1;0<=t;--t){var r=J[t];r&&r(P,null,0)}m.flush(),w&&w.update()}}function r(){!tt&&0=J.length&&n()}}}}function u(){var t=X.viewport,e=X.scissor_box;t[0]=t[1]=e[0]=e[1]=0,P.viewportWidth=P.framebufferWidth=P.drawingBufferWidth=t[2]=e[2]=m.drawingBufferWidth,P.viewportHeight=P.framebufferHeight=P.drawingBufferHeight=t[3]=e[3]=m.drawingBufferHeight}function f(){P.tick+=1,P.time=g(),u(),W.procs.poll()}function h(){F.refresh(),u(),W.procs.refresh(),w&&w.update()}function g(){return(q()-T)/1e3}if(!(t=i(t)))return null;var m=t.gl,v=m.getContextAttributes();m.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;ie;++e)et(j({framebuffer:t.framebuffer.faces[e]},t),l);else et(t,l);else l(0,t)},prop:V.define.bind(null,1),context:V.define.bind(null,2),this:V.define.bind(null,3),draw:s({}),buffer:function(t){return O.create(t,34962,!1,!1)},elements:function(t){return z.create(t,!1)},texture:F.create2D,cube:F.createCube,renderbuffer:U.create,framebuffer:G.create,framebufferCube:G.createCube,vao:D.createVAO,attributes:v,frame:c,on:function(t,e){var r;switch(t){case\"frame\":return c(e);case\"lost\":r=K;break;case\"restore\":r=Q;break;case\"destroy\":r=$}return r.push(e),{cancel:function(){for(var t=0;t2?\"one of \".concat(e,\" \").concat(t.slice(0,r-1).join(\", \"),\", or \")+t[r-1]:2===r?\"one of \".concat(e,\" \").concat(t[0],\" or \").concat(t[1]):\"of \".concat(e,\" \").concat(t[0])}return\"of \".concat(e,\" \").concat(String(t))}i(\"ERR_INVALID_OPT_VALUE\",(function(t,e){return'The value \"'+e+'\" is invalid for option \"'+t+'\"'}),TypeError),i(\"ERR_INVALID_ARG_TYPE\",(function(t,e,r){var n,i,o,s;if(\"string\"==typeof e&&(i=\"not \",e.substr(!o||o<0?0:+o,i.length)===i)?(n=\"must not be\",e=e.replace(/^not /,\"\")):n=\"must be\",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t,\" argument\"))s=\"The \".concat(t,\" \").concat(n,\" \").concat(a(e,\"type\"));else{var l=function(t,e,r){return\"number\"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,\".\")?\"property\":\"argument\";s='The \"'.concat(t,'\" ').concat(l,\" \").concat(n,\" \").concat(a(e,\"type\"))}return s+=\". Received type \".concat(typeof r)}),TypeError),i(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\"),i(\"ERR_METHOD_NOT_IMPLEMENTED\",(function(t){return\"The \"+t+\" method is not implemented\"})),i(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\"),i(\"ERR_STREAM_DESTROYED\",(function(t){return\"Cannot call \"+t+\" after a stream was destroyed\"})),i(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\"),i(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\"),i(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\"),i(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError),i(\"ERR_UNKNOWN_ENCODING\",(function(t){return\"Unknown encoding: \"+t}),TypeError),i(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\"),e.exports.codes=n},{}],287:[function(t,e,r){(function(r){(function(){\"use strict\";var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=c;var i=t(\"./_stream_readable\"),a=t(\"./_stream_writable\");t(\"inherits\")(c,i);for(var o=n(a.prototype),s=0;s0)if(\"string\"==typeof e||o.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),n)o.endEmitted?w(t,new _):S(t,o,e,!0);else if(o.ended)w(t,new x);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?S(t,o,e,!1):P(t,o)):S(t,o,e,!1)}else n||(o.reading=!1,P(t,o));return!o.ended&&(o.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function L(t){var e=t._readableState;c(\"emitReadable\",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c(\"emitReadable\",e.flowing),e.emittedReadable=!0,r.nextTick(C,t))}function C(t){var e=t._readableState;c(\"emitReadable_\",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit(\"readable\"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,R(t)}function P(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(I,t,e))}function I(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount(\"data\")>0&&t.resume()}function z(t){c(\"readable nexttick read 0\"),t.read(0)}function D(t,e){c(\"resume\",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit(\"resume\"),R(t),e.flowing&&!e.reading&&t.read(0)}function R(t){var e=t._readableState;for(c(\"flow\",e.flowing);e.flowing&&null!==t.read(););}function F(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(\"\"):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function B(t){var e=t._readableState;c(\"endReadable\",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(N,e,t))}function N(t,e){if(c(\"endReadableNT\",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit(\"end\"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function j(t,e){for(var r=0,n=t.length;r=e.highWaterMark:e.length>0)||e.ended))return c(\"read: emitReadable\",e.length,e.ended),0===e.length&&e.ended?B(this):L(this),null;if(0===(t=E(t,e))&&e.ended)return 0===e.length&&B(this),null;var n,i=e.needReadable;return c(\"need readable\",i),(0===e.length||e.length-t0?F(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&B(this)),null!==n&&this.emit(\"data\",n),n},A.prototype._read=function(t){w(this,new b(\"_read()\"))},A.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c(\"pipe count=%d opts=%j\",i.pipesCount,e);var o=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?l:m;function s(e,r){c(\"onunpipe\"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c(\"cleanup\"),t.removeListener(\"close\",d),t.removeListener(\"finish\",g),t.removeListener(\"drain\",u),t.removeListener(\"error\",p),t.removeListener(\"unpipe\",s),n.removeListener(\"end\",l),n.removeListener(\"end\",m),n.removeListener(\"data\",h),f=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function l(){c(\"onend\"),t.end()}i.endEmitted?r.nextTick(o):n.once(\"end\",o),t.on(\"unpipe\",s);var u=function(t){return function(){var e=t._readableState;c(\"pipeOnDrain\",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,\"data\")&&(e.flowing=!0,R(t))}}(n);t.on(\"drain\",u);var f=!1;function h(e){c(\"ondata\");var r=t.write(e);c(\"dest.write\",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==j(i.pipes,t))&&!f&&(c(\"false write response, pause\",i.awaitDrain),i.awaitDrain++),n.pause())}function p(e){c(\"onerror\",e),m(),t.removeListener(\"error\",p),0===a(t,\"error\")&&w(t,e)}function d(){t.removeListener(\"finish\",g),m()}function g(){c(\"onfinish\"),t.removeListener(\"close\",d),m()}function m(){c(\"unpipe\"),n.unpipe(t)}return n.on(\"data\",h),function(t,e,r){if(\"function\"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,\"error\",p),t.once(\"close\",d),t.once(\"finish\",g),t.emit(\"pipe\",n),i.flowing||(c(\"pipe resume\"),n.resume()),t},A.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit(\"unpipe\",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a0,!1!==i.flowing&&this.resume()):\"readable\"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c(\"on readable\",i.length,i.reading),i.length?L(this):i.reading||r.nextTick(z,this))),n},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(t,e){var n=o.prototype.removeListener.call(this,t,e);return\"readable\"===t&&r.nextTick(O,this),n},A.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return\"readable\"!==t&&void 0!==t||r.nextTick(O,this),e},A.prototype.resume=function(){var t=this._readableState;return t.flowing||(c(\"resume\"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(D,t,e))}(this,t)),t.paused=!1,this},A.prototype.pause=function(){return c(\"call pause flowing=%j\",this._readableState.flowing),!1!==this._readableState.flowing&&(c(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this},A.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on(\"end\",(function(){if(c(\"wrapped end\"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on(\"data\",(function(i){(c(\"wrapped data\"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&\"function\"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var a=0;a-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(A.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(t,e,r){r(new g(\"_write()\"))},A.prototype._writev=null,A.prototype.end=function(t,e,n){var i=this._writableState;return\"function\"==typeof t?(n=t,t=null,e=null):\"function\"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,P(t,e),n&&(e.finished?r.nextTick(n):t.once(\"finish\",n));e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(A.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,\"destroyed\",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),A.prototype.destroy=f.destroy,A.prototype._undestroy=f.undestroy,A.prototype._destroy=function(t,e){e(t)}}).call(this)}).call(this,t(\"_process\"),\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"../errors\":286,\"./_stream_duplex\":287,\"./internal/streams/destroy\":294,\"./internal/streams/state\":298,\"./internal/streams/stream\":299,_process:277,buffer:85,inherits:231,\"util-deprecate\":330}],292:[function(t,e,r){(function(r){(function(){\"use strict\";var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var a=t(\"./end-of-stream\"),o=Symbol(\"lastResolve\"),s=Symbol(\"lastReject\"),l=Symbol(\"error\"),c=Symbol(\"ended\"),u=Symbol(\"lastPromise\"),f=Symbol(\"handlePromise\"),h=Symbol(\"stream\");function p(t,e){return{value:t,done:e}}function d(t){var e=t[o];if(null!==e){var r=t[h].read();null!==r&&(t[u]=null,t[o]=null,t[s]=null,e(p(r,!1)))}}function g(t){r.nextTick(d,t)}var m=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var t=this,e=this[l];if(null!==e)return Promise.reject(e);if(this[c])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise((function(e,n){r.nextTick((function(){t[l]?n(t[l]):e(p(void 0,!0))}))}));var n,i=this[u];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(p(void 0,!0)):e[f](r,n)}),n)}}(i,this));else{var a=this[h].read();if(null!==a)return Promise.resolve(p(a,!1));n=new Promise(this[f])}return this[u]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,\"return\",(function(){var t=this;return new Promise((function(e,r){t[h].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),n),m);e.exports=function(t){var e,r=Object.create(v,(i(e={},h,{value:t,writable:!0}),i(e,o,{value:null,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,l,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,f,{value:function(t,e){var n=r[h].read();n?(r[u]=null,r[o]=null,r[s]=null,t(p(n,!1))):(r[o]=t,r[s]=e)},writable:!0}),e));return r[u]=null,a(t,(function(t){if(t&&\"ERR_STREAM_PREMATURE_CLOSE\"!==t.code){var e=r[s];return null!==e&&(r[u]=null,r[o]=null,r[s]=null,e(t)),void(r[l]=t)}var n=r[o];null!==n&&(r[u]=null,r[o]=null,r[s]=null,n(p(void 0,!0))),r[c]=!0})),t.on(\"readable\",g.bind(null,r)),r}}).call(this)}).call(this,t(\"_process\"))},{\"./end-of-stream\":295,_process:277}],293:[function(t,e,r){\"use strict\";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){for(var r=0;r0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:\"unshift\",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:\"shift\",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:\"clear\",value:function(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function(t){if(0===this.length)return\"\";for(var e=this.head,r=\"\"+e.data;e=e.next;)r+=t+e.data;return r}},{key:\"concat\",value:function(t){if(0===this.length)return o.alloc(0);for(var e,r,n,i=o.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,r=i,n=s,o.prototype.copy.call(e,r,n),s+=a.data.length,a=a.next;return i}},{key:\"consume\",value:function(t,e){var r;return ti.length?i.length:t;if(a===i.length?n+=i:n+=i.slice(0,t),0==(t-=a)){a===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(a));break}++r}return this.length-=r,n}},{key:\"_getBuffer\",value:function(t){var e=o.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,a=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,a),0==(t-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,e}},{key:l,value:function(t,e){return s(this,function(t){for(var e=1;e0,(function(t){n||(n=t),t&&o.forEach(c),a||(o.forEach(c),i(n))}))}));return e.reduce(u)}},{\"../../../errors\":286,\"./end-of-stream\":295}],298:[function(t,e,r){\"use strict\";var n=t(\"../../../errors\").codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(t,e,r,i){var a=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new n(i?r:\"highWaterMark\",a);return Math.floor(a)}return t.objectMode?16:16384}}},{\"../../../errors\":286}],299:[function(t,e,r){e.exports=t(\"events\").EventEmitter},{events:84}],300:[function(t,e,r){\"use strict\";var n=t(\"safe-buffer\").Buffer,i=n.isEncoding||function(t){switch((t=\"\"+t)&&t.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return\"utf8\";for(var e;;)switch(t){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return t;default:if(e)return;t=(\"\"+t).toLowerCase(),e=!0}}(t);if(\"string\"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error(\"Unknown encoding: \"+t);return e||t}(t),this.encoding){case\"utf16le\":this.text=l,this.end=c,e=4;break;case\"utf8\":this.fillLast=s,e=4;break;case\"base64\":this.text=u,this.end=f,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,\"\\ufffd\";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,\"\\ufffd\";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,\"\\ufffd\"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){if((t.length-e)%2==0){var r=t.toString(\"utf16le\",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,r)}return e}function u(t,e){var r=(t.length-e)%3;return 0===r?t.toString(\"base64\",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):\"\"}r.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return\"\";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString(\"utf8\",e,n)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{\"safe-buffer\":284}],301:[function(t,e,r){(function(r,n){(function(){var r=t(\"assert\"),i=t(\"debug\")(\"stream-parser\");e.exports=function(t){var e=t&&\"function\"==typeof t._transform,r=t&&\"function\"==typeof t._write;if(!e&&!r)throw new Error(\"must pass a Writable or Transform stream in\");i(\"extending Parser into stream\"),t._bytes=o,t._skipBytes=s,e&&(t._passthrough=l);e?t._transform=u:t._write=c};function a(t){i(\"initializing parser stream\"),t._parserBytesLeft=0,t._parserBuffers=[],t._parserBuffered=0,t._parserState=-1,t._parserCallback=null,\"function\"==typeof t.push&&(t._parserOutput=t.push.bind(t)),t._parserInit=!0}function o(t,e){r(!this._parserCallback,'there is already a \"callback\" set!'),r(isFinite(t)&&t>0,'can only buffer a finite number of bytes > 0, got \"'+t+'\"'),this._parserInit||a(this),i(\"buffering %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=0}function s(t,e){r(!this._parserCallback,'there is already a \"callback\" set!'),r(t>0,'can only skip > 0 bytes, got \"'+t+'\"'),this._parserInit||a(this),i(\"skipping %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=1}function l(t,e){r(!this._parserCallback,'There is already a \"callback\" set!'),r(t>0,'can only pass through > 0 bytes, got \"'+t+'\"'),this._parserInit||a(this),i(\"passing through %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=2}function c(t,e,r){this._parserInit||a(this),i(\"write(%o bytes)\",t.length),\"function\"==typeof e&&(r=e),h(this,t,null,r)}function u(t,e,r){this._parserInit||a(this),i(\"transform(%o bytes)\",t.length),\"function\"!=typeof e&&(e=this._parserOutput),h(this,t,e,r)}function f(t,e,r,a){if(t._parserBytesLeft-=e.length,i(\"%o bytes left for stream piece\",t._parserBytesLeft),0===t._parserState?(t._parserBuffers.push(e),t._parserBuffered+=e.length):2===t._parserState&&r(e),0!==t._parserBytesLeft)return a;var o=t._parserCallback;if(o&&0===t._parserState&&t._parserBuffers.length>1&&(e=n.concat(t._parserBuffers,t._parserBuffered)),0!==t._parserState&&(e=null),t._parserCallback=null,t._parserBuffered=0,t._parserState=-1,t._parserBuffers.splice(0),o){var s=[];e&&s.push(e),r&&s.push(r);var l=o.length>s.length;l&&s.push(p(a));var c=o.apply(t,s);if(!l||a===c)return a}}var h=p((function t(e,r,n,i){return e._parserBytesLeft<=0?i(new Error(\"got data but not currently parsing anything\")):r.length<=e._parserBytesLeft?function(){return f(e,r,n,i)}:function(){var a=r.slice(0,e._parserBytesLeft);return f(e,a,n,(function(o){return o?i(o):r.length>a.length?function(){return t(e,r.slice(a.length),n,i)}:void 0}))}}));function p(t){return function(){for(var e=t.apply(this,arguments);\"function\"==typeof e;)e=e();return e}}}).call(this)}).call(this,t(\"_process\"),t(\"buffer\").Buffer)},{_process:277,assert:75,buffer:85,debug:302}],302:[function(t,e,r){(function(n){(function(){function i(){var t;try{t=r.storage.debug}catch(t){}return!t&&void 0!==n&&\"env\"in n&&(t=n.env.DEBUG),t}(r=e.exports=t(\"./debug\")).log=function(){return\"object\"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},r.formatArgs=function(t){var e=this.useColors;if(t[0]=(e?\"%c\":\"\")+this.namespace+(e?\" %c\":\" \")+t[0]+(e?\"%c \":\" \")+\"+\"+r.humanize(this.diff),!e)return;var n=\"color: \"+this.color;t.splice(1,0,n,\"color: inherit\");var i=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){\"%%\"!==t&&(i++,\"%c\"===t&&(a=i))})),t.splice(a,0,n)},r.save=function(t){try{null==t?r.storage.removeItem(\"debug\"):r.storage.debug=t}catch(t){}},r.load=i,r.useColors=function(){if(\"undefined\"!=typeof window&&window.process&&\"renderer\"===window.process.type)return!0;return\"undefined\"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||\"undefined\"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},r.storage=\"undefined\"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),r.colors=[\"lightseagreen\",\"forestgreen\",\"goldenrod\",\"dodgerblue\",\"darkorchid\",\"crimson\"],r.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return\"[UnexpectedJSONParseError]: \"+t.message}},r.enable(i())}).call(this)}).call(this,t(\"_process\"))},{\"./debug\":303,_process:277}],303:[function(t,e,r){var n;function i(t){function e(){if(e.enabled){var t=e,i=+new Date,a=i-(n||i);t.diff=a,t.prev=n,t.curr=i,n=i;for(var o=new Array(arguments.length),s=0;s0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var r=parseFloat(e[1]);switch((e[2]||\"ms\").toLowerCase()){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return 315576e5*r;case\"days\":case\"day\":case\"d\":return r*o;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return r*a;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return r*i;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return r*n;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return r;default:return}}(t);if(\"number\"===l&&!1===isNaN(t))return e.long?s(r=t,o,\"day\")||s(r,a,\"hour\")||s(r,i,\"minute\")||s(r,n,\"second\")||r+\" ms\":function(t){if(t>=o)return Math.round(t/o)+\"d\";if(t>=a)return Math.round(t/a)+\"h\";if(t>=i)return Math.round(t/i)+\"m\";if(t>=n)return Math.round(t/n)+\"s\";return t+\"ms\"}(t);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(t))}},{}],305:[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;s0;){e=c[c.length-1];var p=t[e];if(a[e]=0&&s[e].push(o[g])}a[e]=d}else{if(n[e]===r[e]){var m=[],v=[],y=0;for(d=l.length-1;d>=0;--d){var x=l[d];if(i[x]=!1,m.push(x),v.push(s[x]),y+=s[x].length,o[x]=f.length,x===e){l.length=d;break}}f.push(m);var b=new Array(y);for(d=0;d1&&(i=1),i<-1&&(i=-1),(t*n-e*r<0?-1:1)*Math.acos(i)};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,m=t.sweepFlag,v=void 0===m?0:m,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 T=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(f,2);T>1&&(u*=Math.sqrt(T),f*=Math.sqrt(T));var k=function(t,e,r,n,a,o,l,c,u,f,h,p){var d=Math.pow(a,2),g=Math.pow(o,2),m=Math.pow(h,2),v=Math.pow(p,2),y=d*g-d*v-g*m;y<0&&(y=0),y/=d*v+g*m;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,T=(h-x)/a,k=(p-b)/o,A=(-h-x)/a,M=(-p-b)/o,S=s(1,0,T,k),E=s(T,k,A,M);return 0===c&&E>0&&(E-=i),1===c&&E<0&&(E+=i),[_,w,S,E]}(e,r,l,c,u,f,g,v,x,b,_,w),A=n(k,4),M=A[0],S=A[1],E=A[2],L=A[3],C=Math.abs(L)/(i/4);Math.abs(1-C)<1e-7&&(C=1);var P=Math.max(Math.ceil(C),1);L/=P;for(var I=0;Ie[2]&&(e[2]=c[u+0]),c[u+1]>e[3]&&(e[3]=c[u+1]);return e}},{\"abs-svg-path\":70,assert:75,\"is-svg-path\":238,\"normalize-svg-path\":309,\"parse-svg-path\":250}],309:[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;d4?(o=m[m.length-4],s=m[m.length-3]):(o=h,s=p),r.push(m)}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\":307}],310:[function(t,e,r){\"use strict\";var n,i=t(\"svg-path-bounds\"),a=t(\"parse-svg-path\"),o=t(\"draw-svg-path\"),s=t(\"is-svg-path\"),l=t(\"bitmap-sdf\"),c=document.createElement(\"canvas\"),u=c.getContext(\"2d\");e.exports=function(t,e){if(!s(t))throw Error(\"Argument should be valid svg path string\");e||(e={});var r,f;e.shape?(r=e.shape[0],f=e.shape[1]):(r=c.width=e.w||e.width||200,f=c.height=e.h||e.height||200);var h=Math.min(r,f),p=e.stroke||0,d=e.viewbox||e.viewBox||i(t),g=[r/(d[2]-d[0]),f/(d[3]-d[1])],m=Math.min(g[0]||0,g[1]||0)/2;u.fillStyle=\"black\",u.fillRect(0,0,r,f),u.fillStyle=\"white\",p&&(\"number\"!=typeof p&&(p=1),u.strokeStyle=p>0?\"white\":\"black\",u.lineWidth=Math.abs(p));if(u.translate(.5*r,.5*f),u.scale(m,m),function(){if(null!=n)return n;var t=document.createElement(\"canvas\").getContext(\"2d\");if(t.canvas.width=t.canvas.height=1,!window.Path2D)return n=!1;var e=new Path2D(\"M0,0h1v1h-1v-1Z\");t.fillStyle=\"black\",t.fill(e);var r=t.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var v=new Path2D(t);u.fill(v),p&&u.stroke(v)}else{var y=a(t);o(u,y),u.fill(),p&&u.stroke()}return u.setTransform(1,0,0,1,0,0),l(u,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*h})}},{\"bitmap-sdf\":82,\"draw-svg-path\":126,\"is-svg-path\":238,\"parse-svg-path\":250,\"svg-path-bounds\":308}],311:[function(t,e,r){(function(e,n){(function(){var i=t(\"process/browser.js\").nextTick,a=Function.prototype.apply,o=Array.prototype.slice,s={},l=0;function c(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new c(a.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(a.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate=\"function\"==typeof e?e:function(t){var e=l++,n=!(arguments.length<2)&&o.call(arguments,1);return s[e]=!0,i((function(){s[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate=\"function\"==typeof n?n:function(t){delete s[t]}}).call(this)}).call(this,t(\"timers\").setImmediate,t(\"timers\").clearImmediate)},{\"process/browser.js\":277,timers:311}],312:[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:I(e[1]),g:I(e[2]),b:I(e[3]),a:R(e[4]),format:i?\"name\":\"hex8\"};if(e=j.hex6.exec(t))return{r:I(e[1]),g:I(e[2]),b:I(e[3]),format:i?\"name\":\"hex\"};if(e=j.hex4.exec(t))return{r:I(e[1]+\"\"+e[1]),g:I(e[2]+\"\"+e[2]),b:I(e[3]+\"\"+e[3]),a:R(e[4]+\"\"+e[4]),format:i?\"name\":\"hex8\"};if(e=j.hex3.exec(t))return{r:I(e[1]+\"\"+e[1]),g:I(e[2]+\"\"+e[2]),b:I(e[3]+\"\"+e[3]),format:i?\"name\":\"hex\"};return!1}(e));\"object\"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(p=e.r,d=e.g,g=e.b,i={r:255*C(p,255),g:255*C(d,255),b:255*C(g,255)},f=!0,h=\"%\"===String(e.r).substr(-1)?\"prgb\":\"rgb\"):U(e.h)&&U(e.s)&&U(e.v)?(l=z(e.s),c=z(e.v),i=function(e,r,n){e=6*C(e,360),r=C(r,100),n=C(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\"):U(e.h)&&U(e.s)&&U(e.l)&&(l=z(e.s),u=z(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=C(t,360),e=C(e,100),r=C(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=L(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=C(t,255),e=C(e,255),r=C(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>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(c(n));return a}function M(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=L(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=[O(a(t).toString(16)),O(a(e).toString(16)),O(a(r).toString(16)),O(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*C(this._r,255))+\"%\",g:a(100*C(this._g,255))+\"%\",b:a(100*C(this._b,255))+\"%\",a:this._a}},toPercentageRgbString:function(){return 1==this._a?\"rgb(\"+a(100*C(this._r,255))+\"%, \"+a(100*C(this._g,255))+\"%, \"+a(100*C(this._b,255))+\"%)\":\"rgba(\"+a(100*C(this._r,255))+\"%, \"+a(100*C(this._g,255))+\"%, \"+a(100*C(this._b,255))+\"%, \"+this._roundA+\")\"},toName:function(){return 0===this._a?\"transparent\":!(this._a<1)&&(E[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(v,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(m,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(M,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(T,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]:z(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;ul&&(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\"},E=c.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(S);function L(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function C(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 P(t){return o(1,s(0,t))}function I(t){return parseInt(t,16)}function O(t){return 1==t.length?\"0\"+t:\"\"+t}function z(t){return t<=1&&(t=100*t+\"%\"),t}function D(e){return t.round(255*parseFloat(e)).toString(16)}function R(t){return I(t)/255}var F,B,N,j=(B=\"[\\\\s|\\\\(]+(\"+(F=\"(?:[-\\\\+]?\\\\d*\\\\.\\\\d+%?)|(?:[-\\\\+]?\\\\d+%?)\")+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")\\\\s*\\\\)?\",N=\"[\\\\s|\\\\(]+(\"+F+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")\\\\s*\\\\)?\",{CSS_UNIT:new RegExp(F),rgb:new RegExp(\"rgb\"+B),rgba:new RegExp(\"rgba\"+N),hsl:new RegExp(\"hsl\"+B),hsla:new RegExp(\"hsla\"+N),hsv:new RegExp(\"hsv\"+B),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 U(t){return!!j.CSS_UNIT.exec(t)}void 0!==e&&e.exports?e.exports=c:window.tinycolor=c}(Math)},{}],313:[function(t,e,r){\"use strict\";e.exports=i,e.exports.float32=e.exports.float=i,e.exports.fract32=e.exports.fract=function(t,e){if(t.length){if(t instanceof Float32Array)return new Float32Array(t.length);e instanceof Float32Array||(e=i(t));for(var r=0,n=e.length;ro&&(o=t[0]),t[1]s&&(s=t[1])}function c(t){switch(t.type){case\"GeometryCollection\":t.geometries.forEach(c);break;case\"Point\":l(t.coordinates);break;case\"MultiPoint\":t.coordinates.forEach(l)}}for(e in t.arcs.forEach((function(t){for(var e,r=-1,l=t.length;++ro&&(o=e[0]),e[1]s&&(s=e[1])})),t.objects)c(t.objects[e]);return[i,a,o,s]}function i(t,e){var r=e.id,n=e.bbox,i=null==e.properties?{}:e.properties,o=a(t,e);return null==r&&null==n?{type:\"Feature\",properties:i,geometry:o}:null==n?{type:\"Feature\",id:r,properties:i,geometry:o}:{type:\"Feature\",id:r,bbox:n,properties:i,geometry:o}}function a(t,e){var n=r(t.transform),i=t.arcs;function a(t,e){e.length&&e.pop();for(var r=i[t<0?~t:t],a=0,o=r.length;a1)n=l(t,e,r);else for(i=0,n=new Array(a=t.arcs.length);i1)for(var a,s,c=1,u=l(i[0]);cu&&(s=i[0],i[0]=i[c],i[c]=s,u=a);return i})).filter((function(t){return t.length>0}))}}function u(t,e){for(var r=0,n=t.length;r>>1;t[i]=2))throw new Error(\"n must be \\u22652\");var r,i=(l=t.bbox||n(t))[0],a=l[1],o=l[2],s=l[3];e={scale:[o-i?(o-i)/(r-1):1,s-a?(s-a)/(r-1):1],translate:[i,a]}}var l,c,u=f(e),h=t.objects,p={};function d(t){return u(t)}function g(t){var e;switch(t.type){case\"GeometryCollection\":e={type:\"GeometryCollection\",geometries:t.geometries.map(g)};break;case\"Point\":e={type:\"Point\",coordinates:d(t.coordinates)};break;case\"MultiPoint\":e={type:\"MultiPoint\",coordinates:t.coordinates.map(d)};break;default:return t}return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),null!=t.properties&&(e.properties=t.properties),e}for(c in h)p[c]=g(h[c]);return{type:\"Topology\",bbox:l,transform:e,objects:p,arcs:t.arcs.map((function(t){var e,r=0,n=1,i=t.length,a=new Array(i);for(a[0]=u(t[0],0);++r\":(e.length>100&&(e=e.slice(0,99)+\"\\u2026\"),e=e.replace(i,(function(t){switch(t){case\"\\n\":return\"\\\\n\";case\"\\r\":return\"\\\\r\";case\"\\u2028\":return\"\\\\u2028\";case\"\\u2029\":return\"\\\\u2029\";default:throw new Error(\"Unexpected character\")}})))}},{\"./safe-to-string\":318}],320:[function(t,e,r){\"use strict\";var n=t(\"../value/is\"),i={object:!0,function:!0,undefined:!0};e.exports=function(t){return!!n(t)&&hasOwnProperty.call(i,typeof t)}},{\"../value/is\":326}],321:[function(t,e,r){\"use strict\";var n=t(\"../lib/resolve-exception\"),i=t(\"./is\");e.exports=function(t){return i(t)?t:n(t,\"%v is not a plain function\",arguments[1])}},{\"../lib/resolve-exception\":317,\"./is\":322}],322:[function(t,e,r){\"use strict\";var n=t(\"../function/is\"),i=/^\\s*class[\\s{/}]/,a=Function.prototype.toString;e.exports=function(t){return!!n(t)&&!i.test(a.call(t))}},{\"../function/is\":316}],323:[function(t,e,r){\"use strict\";var n=t(\"../object/is\");e.exports=function(t){if(!n(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(t){return!1}}},{\"../object/is\":320}],324:[function(t,e,r){\"use strict\";var n=t(\"../value/is\"),i=t(\"../object/is\"),a=Object.prototype.toString;e.exports=function(t){if(!n(t))return null;if(i(t)){var e=t.toString;if(\"function\"!=typeof e)return null;if(e===a)return null}try{return\"\"+t}catch(t){return null}}},{\"../object/is\":320,\"../value/is\":326}],325:[function(t,e,r){\"use strict\";var n=t(\"../lib/resolve-exception\"),i=t(\"./is\");e.exports=function(t){return i(t)?t:n(t,\"Cannot use %v\",arguments[1])}},{\"../lib/resolve-exception\":317,\"./is\":326}],326:[function(t,e,r){\"use strict\";e.exports=function(t){return null!=t}},{}],327:[function(t,e,r){(function(e){(function(){\"use strict\";var n=t(\"bit-twiddle\"),i=t(\"dup\"),a=t(\"buffer\").Buffer;e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var o=\"undefined\"!=typeof Uint8ClampedArray,s=\"undefined\"!=typeof BigUint64Array,l=\"undefined\"!=typeof BigInt64Array,c=e.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=i([32,0])),c.BIGUINT64||(c.BIGUINT64=i([32,0])),c.BIGINT64||(c.BIGINT64=i([32,0])),c.BUFFER||(c.BUFFER=i([32,0]));var u=c.DATA,f=c.BUFFER;function h(t){if(t){var e=t.length||t.byteLength,r=n.log2(e);u[r].push(t)}}function p(t){t=n.nextPow2(t);var e=n.log2(t),r=u[e];return r.length>0?r.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function g(t){return new Uint16Array(p(2*t),0,t)}function m(t){return new Uint32Array(p(4*t),0,t)}function v(t){return new Int8Array(p(t),0,t)}function y(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function T(t){return s?new BigUint64Array(p(8*t),0,t):null}function k(t){return l?new BigInt64Array(p(8*t),0,t):null}function A(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=f[e];return r.length>0?r.pop():new a(t)}r.free=function(t){if(a.isBuffer(t))f[n.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|n.log2(e);u[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeBigUint64=r.freeInt8=r.freeInt16=r.freeInt32=r.freeBigInt64=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){h(t.buffer)},r.freeArrayBuffer=h,r.freeBuffer=function(t){f[n.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||\"arraybuffer\"===e)return p(t);switch(e){case\"uint8\":return d(t);case\"uint16\":return g(t);case\"uint32\":return m(t);case\"int8\":return v(t);case\"int16\":return y(t);case\"int32\":return x(t);case\"float\":case\"float32\":return b(t);case\"double\":case\"float64\":return _(t);case\"uint8_clamped\":return w(t);case\"bigint64\":return k(t);case\"biguint64\":return T(t);case\"buffer\":return M(t);case\"data\":case\"dataview\":return A(t);default:return null}return null},r.mallocArrayBuffer=p,r.mallocUint8=d,r.mallocUint16=g,r.mallocUint32=m,r.mallocInt8=v,r.mallocInt16=y,r.mallocInt32=x,r.mallocFloat32=r.mallocFloat=b,r.mallocFloat64=r.mallocDouble=_,r.mallocUint8Clamped=w,r.mallocBigUint64=T,r.mallocBigInt64=k,r.mallocDataView=A,r.mallocBuffer=M,r.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,u[t].length=0,f[t].length=0}}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"bit-twiddle\":81,buffer:85,dup:128}],328:[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):\"\"}},{}],329:[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;n2111)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>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;if(!(\"number\"==typeof t&&t>=1888&&t<=2111))throw new Error(\"Lunar year outside range 1888-2111\");if(!(\"number\"==typeof e&&e>=1&&e<=12))throw new Error(\"Lunar month outside range 1 - 12\");if(!(\"number\"==typeof r&&r>=1&&r<=30))throw new Error(\"Lunar day outside range 1 - 30\");\"object\"==typeof n?(l=!1,a=n):(l=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:l}}s=o.day-1;var c,u=f[o.year-f[0]],p=u>>13;c=p&&(o.month>p||o.isIntercalary)?o.month:o.month-1;for(var d=0;d>9&4095,(g>>5&15)-1,(31&g)+s);return a.year=m.getFullYear(),a.month=1+m.getMonth(),a.day=m.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{if(!(\"number\"==typeof t&&t>=1888&&t<=2111))throw new Error(\"Solar year outside range 1888-2111\");if(!(\"number\"==typeof e&&e>=1&&e<=12))throw new Error(\"Solar month outside range 1 - 12\");if(!(\"number\"==typeof r&&r>=1&&r<=31))throw new Error(\"Solar day outside range 1 - 31\");i={year:t,month:e,day:r},a=n||{}}var o=h[i.year-h[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=h[a.year-h[0]];var l,c=new Date(o>>9&4095,(o>>5&15)-1,31&o),u=new Date(i.year,i.month-1,i.day);l=Math.round((u-c)/864e5);var p,d=f[a.year-f[0]];for(p=0;p<13;p++){var g=d&1<<12-p?30:29;if(l>13;!m||p=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\":346,\"object-assign\":247}],335:[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\":346,\"object-assign\":247}],336:[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)||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=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=tthis.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\":346,\"object-assign\":247}],337:[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\":346,\"object-assign\":247}],338:[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\":346,\"object-assign\":247}],339:[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;r19||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\":346,\"object-assign\":247}],340:[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=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\":346,\"object-assign\":247}],341:[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(),void 0===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),void 0===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;r0?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\":346,\"object-assign\":247}],343:[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\":346,\"object-assign\":247}],344:[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\":346,\"object-assign\":247}],345:[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;ar)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;ne);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\":346,\"object-assign\":247}],346:[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(;oe-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.minDay&&r-this.minDay13.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\":247}],347:[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+n1}),d=function(t,e,r,n){var i=\"\"+e;if(p(t,n))for(;i.length1},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-1){p=1,d=g;for(var E=this.daysInMonth(h,p);d>E;E=this.daysInMonth(h,p))p++,d-=E}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\":346,\"object-assign\":247}],348:[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}]},{}],349:[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;t(\"../../constants/axis_placeable_objects\");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\"}}})},{\"../../constants/axis_placeable_objects\":472,\"../../plot_api/plot_template\":543,\"../../plots/cartesian/constants\":561,\"../../plots/font_attributes\":585,\"./arrow_paths\":348}],350:[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),a=i.getRefType(e.xref),o=i.getRefType(e.yref);e._extremes={},\"range\"===a&&s(e,r),\"range\"===o&&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,m=3*t.startarrowsize*t.arrowwidth||0,v=m+h,y=m-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,v),ppadminus:Math.max(f,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else v=s?v+s:v,y=s?y-s:y,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(u,d,v),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\":503,\"../../plots/cartesian/axes\":554,\"./draw\":355}],351:[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;r0||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;r2/3?\"right\":\"center\"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var W=!1,X=[\"x\",\"y\"],Z=0;Z1)&&(nt===rt?((pt=it.r2fraction(e[\"a\"+et]))<0||pt>1)&&(W=!0):W=!0),J=it._offset+it.r2p(e[et]),$=.5}else{var dt=\"domain\"===ht;\"x\"===et?(Q=e[et],J=dt?it._offset+it._length*Q:J=T.l+T.w*Q):(Q=1-e[et],J=dt?it._offset+it._length*Q:J=T.t+T.h*Q),$=e.showarrow?.5:Q}if(e.showarrow){ft.head=J;var gt=e[\"a\"+et];if(tt=ot*q(.5,e.xanchor)-st*q(.5,e.yanchor),nt===rt){var mt=l.getRefType(nt);\"domain\"===mt?(\"y\"===et&&(gt=1-gt),ft.tail=it._offset+it._length*gt):\"paper\"===mt?\"y\"===et?(gt=1-gt,ft.tail=T.t+T.h*gt):ft.tail=T.l+T.w*gt:ft.tail=it._offset+it.r2p(gt),K=tt}else ft.tail=J+gt,K=tt+gt;ft.text=ft.tail+tt;var vt=w[\"x\"===et?\"width\":\"height\"];if(\"paper\"===rt&&(ft.head=o.constrain(ft.head,1,vt-1)),\"pixel\"===nt){var yt=-Math.max(ft.tail-3,ft.text),xt=Math.min(ft.tail+3,ft.text)-vt;yt>0?(ft.tail+=yt,ft.text+=yt):xt>0&&(ft.tail-=xt,ft.text-=xt)}ft.tail+=ut,ft.head+=ut}else K=tt=lt*q($,ct),ft.text=J+tt;ft.text+=ut,tt+=ut,K+=ut,e[\"_\"+et+\"padplus\"]=lt/2+K,e[\"_\"+et+\"padminus\"]=lt/2-K,e[\"_\"+et+\"size\"]=lt,e[\"_\"+et+\"shift\"]=tt}if(W)R.remove();else{var bt=0,_t=0;if(\"left\"!==e.align&&(bt=(A-b)*(\"center\"===e.align?.5:1)),\"top\"!==e.valign&&(_t=(D-_)*(\"middle\"===e.valign?.5:1)),f)n.select(\"svg\").attr({x:N+bt-1,y:N+_t}).call(u.setClipUrl,U?L:null,t);else{var wt=N+_t-g.top,Tt=N+bt-g.left;G.call(h.positionText,Tt,wt).call(u.setClipUrl,U?L:null,t)}V.select(\"rect\").call(u.setRect,N,N,A,D),j.call(u.setRect,F/2,F/2,B-F,H-F),R.call(u.setTranslate,Math.round(C.x.text-B/2),Math.round(C.y.text-H/2)),O.attr({transform:\"rotate(\"+P+\",\"+C.x.text+\",\"+C.y.text+\")\"});var kt,At=function(r,n){I.selectAll(\".annotation-arrow-g\").remove();var l=C.x.head,f=C.y.head,h=C.x.tail+r,p=C.y.tail+n,g=C.x.text+r,b=C.y.text+n,_=o.rotationXYMatrix(P,g,b),w=o.apply2DTransform(_),A=o.apply2DTransform2(_),L=+j.attr(\"width\"),z=+j.attr(\"height\"),D=g-.5*L,F=D+L,B=b-.5*z,N=B+z,U=[[D,B,D,N],[D,N,F,N],[F,N,F,B],[F,B,D,B]].map(A);if(!U.reduce((function(t,e){return t^!!o.segmentsIntersect(l,f,l+1e6,f+1e6,e[0],e[1],e[2],e[3])}),!1)){U.forEach((function(t){var e=o.segmentsIntersect(h,p,l,f,t[0],t[1],t[2],t[3]);e&&(h=e.x,p=e.y)}));var V=e.arrowwidth,H=e.arrowcolor,q=e.arrowside,G=I.append(\"g\").style({opacity:c.opacity(H)}).classed(\"annotation-arrow-g\",!0),Y=G.append(\"path\").attr(\"d\",\"M\"+h+\",\"+p+\"L\"+l+\",\"+f).style(\"stroke-width\",V+\"px\").call(c.stroke,c.rgb(H));if(m(Y,q,e),k.annotationPosition&&Y.node().parentNode&&!a){var W=l,X=f;if(e.standoff){var Z=Math.sqrt(Math.pow(l-h,2)+Math.pow(f-p,2));W+=e.standoff*(h-l)/Z,X+=e.standoff*(p-f)/Z}var J,K,Q=G.append(\"path\").classed(\"annotation-arrow\",!0).classed(\"anndrag\",!0).classed(\"cursor-move\",!0).attr({d:\"M3,3H-3V-3H3ZM0,0L\"+(h-W)+\",\"+(p-X),transform:s(W,X)}).style(\"stroke-width\",V+6+\"px\").call(c.stroke,\"rgba(0,0,0,0)\").call(c.fill,\"rgba(0,0,0,0)\");d.init({element:Q.node(),gd:t,prepFn:function(){var t=u.getTranslate(R);J=t.x,K=t.y,v&&v.autorange&&M(v._name+\".autorange\",!0),x&&x.autorange&&M(x._name+\".autorange\",!0)},moveFn:function(t,r){var n=w(J,K),i=n[0]+t,a=n[1]+r;R.call(u.setTranslate,i,a),S(\"x\",y(v,t,\"x\",T,e)),S(\"y\",y(x,r,\"y\",T,e)),e.axref===e.xref&&S(\"ax\",y(v,t,\"ax\",T,e)),e.ayref===e.yref&&S(\"ay\",y(x,r,\"ay\",T,e)),G.attr(\"transform\",s(t,r)),O.attr({transform:\"rotate(\"+P+\",\"+i+\",\"+a+\")\"})},doneFn:function(){i.call(\"_guiRelayout\",t,E());var e=document.querySelector(\".js-notes-box-panel\");e&&e.redraw(e.selectedObj)}})}}};if(e.showarrow&&At(0,0),z)d.init({element:R.node(),gd:t,prepFn:function(){kt=O.attr(\"transform\")},moveFn:function(t,r){var n=\"pointer\";if(e.showarrow)e.axref===e.xref?S(\"ax\",y(v,t,\"ax\",T,e)):S(\"ax\",e.ax+t),e.ayref===e.yref?S(\"ay\",y(x,r,\"ay\",T.w,e)):S(\"ay\",e.ay+r),At(t,r);else{if(a)return;var i,o;if(v)i=y(v,t,\"x\",T,e);else{var l=e._xsize/T.w,c=e.x+(e._xshift-e.xshift)/T.w-l/2;i=d.align(c+t/T.w,l,0,1,e.xanchor)}if(x)o=y(x,r,\"y\",T,e);else{var u=e._ysize/T.h,f=e.y-(e._yshift+e.yshift)/T.h-u/2;o=d.align(f-r/T.h,u,0,1,e.yanchor)}S(\"x\",i),S(\"y\",o),v&&x||(n=d.getCursor(v?.5:i,x?.5:o,e.xanchor,e.yanchor))}O.attr({transform:s(t,r)+kt}),p(R,n)},clickFn:function(r,n){e.captureevents&&t.emit(\"plotly_clickannotation\",Y(n))},doneFn:function(){p(R),i.call(\"_guiRelayout\",t,E());var e=document.querySelector(\".js-notes-box-panel\");e&&e.redraw(e.selectedObj)}})}}}e.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(\".annotation\").remove();for(var r=0;r=0,x=e.indexOf(\"end\")>=0,b=d.backoff*m+r.standoff,_=g.backoff*v+r.startstandoff;if(\"line\"===p.nodeName){o={x:+t.attr(\"x1\"),y:+t.attr(\"y1\")},u={x:+t.attr(\"x2\"),y:+t.attr(\"y2\")};var w=o.x-u.x,T=o.y-u.y;if(h=(f=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T))return void z();if(b){if(b*b>w*w+T*T)return void z();var k=b*Math.cos(f),A=b*Math.sin(f);u.x+=k,u.y+=A,t.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+T*T)return void z();var M=_*Math.cos(f),S=_*Math.sin(f);o.x-=M,o.y-=S,t.attr({x1:o.x,y1:o.y})}}else if(\"path\"===p.nodeName){var E=p.getTotalLength(),L=\"\";if(E1){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\":607,\"../annotations/draw\":355}],362:[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=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+\")\"}o.tinyRGB=function(t){var e=t.toRgb();return\"rgb(\"+Math.round(e.r)+\", \"+Math.round(e.g)+\", \"+Math.round(e.b)+\")\"},o.rgb=function(t){return o.tinyRGB(n(t))},o.opacity=function(t){return t?n(t).getAlpha():0},o.addOpacity=function(t,e){var r=n(t).toRgb();return\"rgba(\"+Math.round(r.r)+\", \"+Math.round(r.g)+\", \"+Math.round(r.b)+\", \"+e+\")\"},o.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||c).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()},o.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(o.combine(t,c))),(i.isDark()?e?i.lighten(e):c:r?i.darken(r):l).toString()},o.stroke=function(t,e){var r=n(e);t.style({stroke:o.tinyRGB(r),\"stroke-opacity\":r.getAlpha()})},o.fill=function(t,e){var r=n(e);t.style({fill:o.tinyRGB(r),\"fill-opacity\":r.getAlpha()})},o.clean=function(t){if(t&&\"object\"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e0?n>=l:n<=l));i++)n>u&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var ct=Math.pow(10,Math.floor(Math.log(lt)/Math.LN10));ot*=ct*c.roundUp(lt/ct,[2,5,10]),(Math.abs(q.start)/q.size+1e-6)%1<2e-6&&(it.tick0=0)}it.dtick=ot}it.domain=o?[rt+I/R.h,rt+K-I/R.h]:[rt+P/R.w,rt+K-P/R.w],it.setScale(),t.attr(\"transform\",u(Math.round(R.l),Math.round(R.t)));var ut,ft=t.select(\".\"+A.cbtitleunshift).attr(\"transform\",u(-Math.round(R.l),-Math.round(R.t))),ht=it.ticklabelposition,pt=it.title.font.size,dt=t.select(\".\"+A.cbaxis),gt=0,mt=0;function vt(n,i){var a={propContainer:it,propName:e._propPrefix+\"title\",traceIndex:e._traceIndex,_meta:e._meta,placeholder:D._dfltTitle.colorbar,containerGroup:t.select(\".\"+A.cbtitle)},o=\"h\"===n.charAt(0)?n.substr(1):\"h\"+n;t.selectAll(\".\"+o+\",.\"+o+\"-math-group\").remove(),g.draw(r,n,f(a,i||{}))}return c.syncOrAsync([a.previousPromises,function(){var t,e;(o&&at||!o&&!at)&&(\"top\"===j&&(t=P+R.l+R.w*O,e=I+R.t+R.h*(1-rt-K)+3+.75*pt),\"bottom\"===j&&(t=P+R.l+R.w*O,e=I+R.t+R.h*(1-rt)-3-.25*pt),\"right\"===j&&(e=I+R.t+R.h*z+3+.75*pt,t=P+R.l+R.w*rt),vt(it._id+\"title\",{attributes:{x:t,y:e,\"text-anchor\":o?\"start\":\"middle\"}}))},function(){if(!o&&!at||o&&at){var a,l=t.select(\".\"+A.cbtitle),f=l.select(\"text\"),h=[-M/2,M/2],d=l.select(\".h\"+it._id+\"title-math-group\").node(),g=15.6;if(f.node()&&(g=parseInt(f.node().style.fontSize,10)*w),d?(a=p.bBox(d),mt=a.width,(gt=a.height)>g&&(h[1]-=(gt-g)/2)):f.node()&&!f.classed(A.jsPlaceholder)&&(a=p.bBox(f.node()),mt=a.width,gt=a.height),o){if(gt){if(gt+=5,\"top\"===j)it.domain[1]-=gt/R.h,h[1]*=-1;else{it.domain[0]+=gt/R.h;var v=m.lineCount(f);h[1]+=(1-v)*g}l.attr(\"transform\",u(h[0],h[1])),it.setScale()}}else mt&&(\"right\"===j&&(it.domain[0]+=(mt+pt/2)/R.w),l.attr(\"transform\",u(h[0],h[1])),it.setScale())}t.selectAll(\".\"+A.cbfills+\",.\"+A.cblines).attr(\"transform\",o?u(0,Math.round(R.h*(1-it.domain[1]))):u(Math.round(R.w*it.domain[0]),0)),dt.attr(\"transform\",o?u(0,Math.round(-R.t)):u(Math.round(-R.l),0));var y=t.select(\".\"+A.cbfills).selectAll(\"rect.\"+A.cbfill).attr(\"style\",\"\").data(Y);y.enter().append(\"rect\").classed(A.cbfill,!0).style(\"stroke\",\"none\"),y.exit().remove();var x=U.map(it.c2p).map(Math.round).sort((function(t,e){return t-e}));y.each((function(t,a){var s=[0===a?U[0]:(Y[a]+Y[a-1])/2,a===Y.length-1?U[1]:(Y[a]+Y[a+1])/2].map(it.c2p).map(Math.round);o&&(s[1]=c.constrain(s[1]+(s[1]>s[0])?1:-1,x[0],x[1]));var l=n.select(this).attr(o?\"x\":\"y\",Q).attr(o?\"y\":\"x\",n.min(s)).attr(o?\"width\":\"height\",Math.max(X,2)).attr(o?\"height\":\"width\",Math.max(n.max(s)-n.min(s),2));if(e._fillgradient)p.gradient(l,r,e._id,o?\"vertical\":\"horizontalreversed\",e._fillgradient,\"fill\");else{var u=H(t).replace(\"e-\",\"\");l.attr(\"fill\",i(u).toHexString())}}));var b=t.select(\".\"+A.cblines).selectAll(\"path.\"+A.cbline).data(B.color&&B.width?W:[]);b.enter().append(\"path\").classed(A.cbline,!0),b.exit().remove(),b.each((function(t){var e=Q,r=Math.round(it.c2p(t))+B.width/2%1;n.select(this).attr(\"d\",\"M\"+(o?e+\",\"+r:r+\",\"+e)+(o?\"h\":\"v\")+X).call(p.lineGroupStyle,B.width,V(t),B.dash)})),dt.selectAll(\"g.\"+it._id+\"tick,path\").remove();var _=Q+X+(M||0)/2-(\"outside\"===e.ticks?1:0),T=s.calcTicks(it),k=s.getTickSigns(it)[2];return s.drawTicks(r,it,{vals:\"inside\"===it.ticks?s.clipEnds(it,T):T,layer:dt,path:s.makeTickPath(it,_,k),transFn:s.makeTransTickFn(it)}),s.drawLabels(r,it,{vals:T,layer:dt,transFn:s.makeTransTickLabelFn(it),labelFns:s.makeLabelFns(it,_)})},function(){if(o&&!at||!o&&at){var t,i,a=it.position||0,s=it._offset+it._length/2;if(\"right\"===j)i=s,t=R.l+R.w*a+10+pt*(it.showticklabels?1:.5);else if(t=s,\"bottom\"===j&&(i=R.t+R.h*a+10+(-1===ht.indexOf(\"inside\")?it.tickfont.size:0)+(\"intside\"!==it.ticks&&e.ticklen||0)),\"top\"===j){var l=N.text.split(\"
\").length;i=R.t+R.h*a+10-X-w*pt*l}vt((o?\"h\":\"v\")+it._id+\"title\",{avoid:{selection:n.select(r).selectAll(\"g.\"+it._id+\"tick\"),side:j,offsetTop:o?0:R.t,offsetLeft:o?R.l:0,maxShift:o?D.width:D.height},attributes:{x:t,y:i,\"text-anchor\":\"middle\"},transform:{rotate:o?-90:0,offset:0}})}},a.previousPromises,function(){var n,s=X+M/2;-1===ht.indexOf(\"inside\")&&(n=p.bBox(dt.node()),s+=o?n.width:n.height),ut=ft.select(\"text\");var c=0,f=o&&\"top\"===j,g=!o&&\"right\"===j,m=0;if(ut.node()&&!ut.classed(A.jsPlaceholder)){var y,x=ft.select(\".h\"+it._id+\"title-math-group\").node();x&&(o&&at||!o&&!at)?(c=(n=p.bBox(x)).width,y=n.height):(c=(n=p.bBox(ft.node())).right-R.l-(o?Q:nt),y=n.bottom-R.t-(o?nt:Q),o||\"top\"!==j||(s+=n.height,m=n.height)),g&&(ut.attr(\"transform\",u(c/2+pt/2,0)),c*=2),s=Math.max(s,o?c:y)}var b=2*(o?P:I)+s+S+M/2,w=0;!o&&N.text&&\"bottom\"===C&&z<=0&&(b+=w=b/2,m+=w),D._hColorbarMoveTitle=w,D._hColorbarMoveCBTitle=m;var F=S+M;t.select(\".\"+A.cbbg).attr(\"x\",(o?Q:nt)-F/2-(o?P:0)).attr(\"y\",(o?nt:Q)-(o?J:I+m-w)).attr(o?\"width\":\"height\",Math.max(b-w,2)).attr(o?\"height\":\"width\",Math.max(J+F,2)).call(d.fill,E).call(d.stroke,e.bordercolor).style(\"stroke-width\",S);var B=g?Math.max(c-10,0):0;if(t.selectAll(\".\"+A.cboutline).attr(\"x\",(o?Q:nt+P)+B).attr(\"y\",(o?nt+I-J:Q)+(f?gt:0)).attr(o?\"width\":\"height\",Math.max(X,2)).attr(o?\"height\":\"width\",Math.max(J-(o?2*I+gt:2*P+B),2)).call(d.stroke,e.outlinecolor).style({fill:\"none\",\"stroke-width\":M}),t.attr(\"transform\",u(R.l-(o?$*b:0),R.t-(o?0:(1-tt)*b-m))),!o&&(S||i(E).getAlpha()&&!i.equals(D.paper_bgcolor,E))){var U=dt.selectAll(\"text\"),V=U[0].length,H=t.select(\".\"+A.cbbg).node(),q=p.bBox(H),G=p.getTranslate(t);U.each((function(t,e){var r=V-1;if(0===e||e===r){var n,i=p.bBox(this),a=p.getTranslate(this);if(e===r){var o=i.right+a.x;(n=q.right+G.x+nt-S-2+O-o)>0&&(n=0)}else if(0===e){var s=i.left+a.x;(n=q.left+G.x+nt+S+2-s)<0&&(n=0)}n&&(V<3?this.setAttribute(\"transform\",\"translate(\"+n+\",0) \"+this.getAttribute(\"transform\")):this.setAttribute(\"visibility\",\"hidden\"))}}))}var Y={},W=T[L],Z=k[L],K=T[C],et=k[C],rt=b-X;o?(\"pixels\"===h?(Y.y=z,Y.t=J*K,Y.b=J*et):(Y.t=Y.b=0,Y.yt=z+l*K,Y.yb=z-l*et),\"pixels\"===_?(Y.x=O,Y.l=b*W,Y.r=b*Z):(Y.l=rt*W,Y.r=rt*Z,Y.xl=O-v*W,Y.xr=O+v*Z)):(\"pixels\"===h?(Y.x=O,Y.l=J*W,Y.r=J*Z):(Y.l=Y.r=0,Y.xl=O+l*W,Y.xr=O-l*Z),\"pixels\"===_?(Y.y=1-z,Y.t=b*K,Y.b=b*et):(Y.t=rt*K,Y.b=rt*et,Y.yt=z-v*K,Y.yb=z+v*et)),a.autoMargin(r,e._id,Y)}],r)}(r,e,t);v&&v.then&&(t._promises||[]).push(v),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,a,s=\"v\"===e.orientation,c=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr(\"transform\"),h(t)},moveFn:function(r,o){t.attr(\"transform\",n+u(r,o)),i=l.align((s?e._uFrac:e._vFrac)+r/c.w,s?e._thickFrac:e._lenFrac,0,1,e.xanchor),a=l.align((s?e._vFrac:1-e._uFrac)-o/c.h,s?e._lenFrac:e._thickFrac,0,1,e.yanchor);var f=l.getCursor(i,a,e.xanchor,e.yanchor);h(t,f)},doneFn:function(){if(h(t),void 0!==i&&void 0!==a){var n={};n[e._propPrefix+\"x\"]=i,n[e._propPrefix+\"y\"]=a,void 0!==e._traceIndex?o.call(\"_guiRestyle\",r,n,e._traceIndex):o.call(\"_guiRelayout\",r,n)}}})}(r,e,t)})),e.exit().each((function(e){a.autoMargin(t,e._id)})).remove(),e.order()}}},{\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/extend\":493,\"../../lib/setcursor\":524,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../plots/cartesian/axis_defaults\":556,\"../../plots/cartesian/layout_attributes\":569,\"../../plots/cartesian/position_defaults\":572,\"../../plots/plots\":619,\"../../registry\":638,\"../color\":366,\"../colorscale/helpers\":377,\"../dragelement\":385,\"../drawing\":388,\"../titles\":464,\"./constants\":368,\"@plotly/d3\":58,tinycolor2:312}],371:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t){return n.isPlainObject(t.colorbar)}},{\"../../lib\":503}],372:[function(t,e,r){\"use strict\";e.exports={moduleType:\"component\",name:\"colorbar\",attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),draw:t(\"./draw\").draw,hasColorbar:t(\"./has_colorbar\")}},{\"./attributes\":367,\"./defaults\":369,\"./draw\":370,\"./has_colorbar\":371}],373:[function(t,e,r){\"use strict\";var n=t(\"../colorbar/attributes\"),i=t(\"../../lib/regex\").counter,a=t(\"../../lib/sort_object_keys\"),o=t(\"./scales.js\").scales;a(o);function s(t){return\"`\"+t+\"`\"}e.exports=function(t,e){t=t||\"\";var r,a=(e=e||{}).cLetter||\"c\",l=(\"onlyIfNumerical\"in e?e.onlyIfNumerical:Boolean(t),\"noScale\"in e?e.noScale:\"marker.line\"===t),c=\"showScaleDflt\"in e?e.showScaleDflt:\"z\"===a,u=\"string\"==typeof e.colorscaleDflt?o[e.colorscaleDflt]:null,f=e.editTypeOverride||\"\",h=t?t+\".\":\"\";\"colorAttr\"in e?(r=e.colorAttr,e.colorAttr):s(h+(r={z:\"z\",c:\"color\"}[a]));var p=a+\"auto\",d=a+\"min\",g=a+\"max\",m=a+\"mid\",v=(s(h+p),s(h+d),s(h+g),{});v[d]=v[g]=void 0;var y={};y[p]=!1;var x={};return\"color\"===r&&(x.color={valType:\"color\",arrayOk:!0,editType:f||\"style\"},e.anim&&(x.color.anim=!0)),x[p]={valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:v},x[d]={valType:\"number\",dflt:null,editType:f||\"plot\",impliedEdits:y},x[g]={valType:\"number\",dflt:null,editType:f||\"plot\",impliedEdits:y},x[m]={valType:\"number\",dflt:null,editType:\"calc\",impliedEdits:v},x.colorscale={valType:\"colorscale\",editType:\"calc\",dflt:u,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:\"boolean\",dflt:!1!==e.autoColorDflt,editType:\"calc\",impliedEdits:{colorscale:void 0}},x.reversescale={valType:\"boolean\",dflt:!1,editType:\"plot\"},l||(x.showscale={valType:\"boolean\",dflt:c,editType:\"calc\"},x.colorbar=n),e.noColorAxis||(x.coloraxis={valType:\"subplotid\",regex:i(\"coloraxis\"),dflt:null,editType:\"calc\"}),x}},{\"../../lib/regex\":520,\"../../lib/sort_object_keys\":526,\"../colorbar/attributes\":367,\"./scales.js\":381}],374:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"./helpers\").extractOpts;e.exports=function(t,e,r){var o,s=t._fullLayout,l=r.vals,c=r.containerStr,u=c?i.nestedProperty(e,c).get():e,f=a(u),h=!1!==f.auto,p=f.min,d=f.max,g=f.mid,m=function(){return i.aggNums(Math.min,null,l)},v=function(){return i.aggNums(Math.max,null,l)};(void 0===p?p=m():h&&(p=u._colorAx&&n(p)?Math.min(p,m()):m()),void 0===d?d=v():h&&(d=u._colorAx&&n(d)?Math.max(d,v()):v()),h&&void 0!==g&&(d-g>g-p?p=g-(d-g):d-g=0?s.colorscale.sequential:s.colorscale.sequentialminus,f._sync(\"colorscale\",o))}},{\"../../lib\":503,\"./helpers\":377,\"fast-isnumeric\":190}],375:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./helpers\").hasColorscale,a=t(\"./helpers\").extractOpts;e.exports=function(t,e){function r(t,e){var r=t[\"_\"+e];void 0!==r&&(t[e]=r)}function o(t,i){var o=i.container?n.nestedProperty(t,i.container).get():t;if(o)if(o.coloraxis)o._colorAx=e[o.coloraxis];else{var s=a(o),l=s.auto;(l||void 0===s.min)&&r(o,i.min),(l||void 0===s.max)&&r(o,i.max),s.autocolorscale&&r(o,\"colorscale\")}}for(var s=0;s=0;n--,i++){var a=t[n];r[i]=[1-a[0],a[1]]}return r}function d(t,e){e=e||{};for(var r=t.domain,o=t.range,l=o.length,c=new Array(l),u=0;u4/3-s?o:s}},{}],383:[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\":503}],384:[function(t,e,r){\"use strict\";r.selectMode=function(t){return\"lasso\"===t||\"select\"===t},r.drawMode=function(t){return\"drawclosedpath\"===t||\"drawopenpath\"===t||\"drawline\"===t||\"drawrect\"===t||\"drawcircle\"===t},r.openMode=function(t){return\"drawline\"===t||\"drawopenpath\"===t},r.rectMode=function(t){return\"select\"===t||\"drawline\"===t||\"drawrect\"===t||\"drawcircle\"===t},r.freeMode=function(t){return\"lasso\"===t||\"drawclosedpath\"===t||\"drawopenpath\"===t},r.selectingOrDrawing=function(t){return r.freeMode(t)||r.rectMode(t)}},{}],385:[function(t,e,r){\"use strict\";var n=t(\"mouse-event-offset\"),i=t(\"has-hover\"),a=t(\"has-passive-events\"),o=t(\"../../lib\").removeElement,s=t(\"../../plots/cartesian/constants\"),l=e.exports={};l.align=t(\"./align\"),l.getCursor=t(\"./cursor\");var c=t(\"./unhover\");function u(){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 f(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(t){var e,r,n,c,h,p,d,g,m=t.gd,v=1,y=m._context.doubleClickDelay,x=t.element;m._mouseDownTime||(m._mouseDownTime=0),x.style.pointerEvents=\"all\",x.onmousedown=_,a?(x._ontouchstart&&x.removeEventListener(\"touchstart\",x._ontouchstart),x._ontouchstart=_,x.addEventListener(\"touchstart\",_,{passive:!1})):x.ontouchstart=_;var b=t.clampFn||function(t,e,r){return Math.abs(t)y&&(v=Math.max(v-1,1)),m._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(v,p),!g){var r;try{r=new MouseEvent(\"click\",e)}catch(t){var n=f(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)}d.dispatchEvent(r)}m._dragging=!1,m._dragged=!1}else m._dragged=!1}},l.coverSlip=u},{\"../../lib\":503,\"../../plots/cartesian/constants\":561,\"./align\":382,\"./cursor\":383,\"./unhover\":386,\"has-hover\":228,\"has-passive-events\":229,\"mouse-event-offset\":242}],386:[function(t,e,r){\"use strict\";var n=t(\"../../lib/events\"),i=t(\"../../lib/throttle\"),a=t(\"../../lib/dom\").getGraphDiv,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&&!t._dragged&&!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/dom\":491,\"../../lib/events\":492,\"../../lib/throttle\":530,\"../fx/constants\":400}],387:[function(t,e,r){\"use strict\";r.dash={valType:\"string\",values:[\"solid\",\"dot\",\"dash\",\"longdash\",\"dashdot\",\"longdashdot\"],dflt:\"solid\",editType:\"style\"},r.pattern={shape:{valType:\"enumerated\",values:[\"\",\"/\",\"\\\\\",\"x\",\"-\",\"|\",\"+\",\".\"],dflt:\"\",arrayOk:!0,editType:\"style\"},fillmode:{valType:\"enumerated\",values:[\"replace\",\"overlay\"],dflt:\"replace\",editType:\"style\"},bgcolor:{valType:\"color\",arrayOk:!0,editType:\"style\"},fgcolor:{valType:\"color\",arrayOk:!0,editType:\"style\"},fgopacity:{valType:\"number\",editType:\"style\",min:0,max:1},size:{valType:\"number\",min:0,dflt:8,arrayOk:!0,editType:\"style\"},solidity:{valType:\"number\",min:0,max:1,dflt:.3,arrayOk:!0,editType:\"style\"},editType:\"style\"}},{}],388:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.numberFormat,o=t(\"fast-isnumeric\"),s=t(\"tinycolor2\"),l=t(\"../../registry\"),c=t(\"../color\"),u=t(\"../colorscale\"),f=i.strTranslate,h=t(\"../../lib/svg_text_utils\"),p=t(\"../../constants/xmlns_namespaces\"),d=t(\"../../constants/alignment\").LINE_SPACING,g=t(\"../../constants/interactions\").DESELECTDIM,m=t(\"../../traces/scatter/subtypes\"),v=t(\"../../traces/scatter/make_bubble_size_func\"),y=t(\"../../components/fx/helpers\").appendArrayPointValue,x=e.exports={};x.font=function(t,e,r,n){i.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(c.fill,n)},x.setPosition=function(t,e,r){t.attr(\"x\",e).attr(\"y\",r)},x.setSize=function(t,e,r){t.attr(\"width\",e).attr(\"height\",r)},x.setRect=function(t,e,r,n,i){t.call(x.setPosition,e,r).call(x.setSize,n,i)},x.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),a=n.c2p(t.y);return!!(o(i)&&o(a)&&e.node())&&(\"text\"===e.node().nodeName?e.attr(\"x\",i).attr(\"y\",a):e.attr(\"transform\",f(i,a)),!0)},x.translatePoints=function(t,e,r){t.each((function(t){var i=n.select(this);x.translatePoint(t,i,e,r)}))},x.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr(\"display\",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:\"none\")},x.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,c=l.traceIs(a,\"bar-like\")?\".bartext\":\".point,.textpoint\";t.selectAll(c).each((function(t){x.hideOutsideRangePoint(t,n.select(this),r,i,o,s)}))}))}},x.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},x.singleLineStyle=function(t,e,r,n,i){e.style(\"fill\",\"none\");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||\"\";c.stroke(e,n||a.color),x.dashLine(e,s,o)},x.lineGroupStyle=function(t,e,r,i){t.style(\"fill\",\"none\").each((function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,s=i||a.dash||\"\";n.select(this).call(c.stroke,r||a.color).call(x.dashLine,s,o)}))},x.dashLine=function(t,e,r){r=+r||0,e=x.dashStyle(e,r),t.style({\"stroke-dasharray\":e,\"stroke-width\":r+\"px\"})},x.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},x.singleFillStyle=function(t){var e=(((n.select(t.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;e&&t.call(c.fill,e)},x.fillGroupStyle=function(t){t.style(\"stroke-width\",0).each((function(t){var e=n.select(this);t[0].trace&&e.call(c.fill,t[0].trace.fillcolor)}))};var b=t(\"./symbol_defs\");x.symbolNames=[],x.symbolFuncs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(b).forEach((function(t){var e=b[t],r=e.n;x.symbolList.push(r,String(r),t,r+100,String(r+100),t+\"-open\"),x.symbolNames[r]=t,x.symbolFuncs[r]=e.f,e.needLine&&(x.symbolNeedLines[r]=!0),e.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),t+\"-dot\",r+300,String(r+300),t+\"-open-dot\"),e.noFill&&(x.symbolNoFill[r]=!0)}));var _=x.symbolNames.length;function w(t,e){var r=t%100;return x.symbolFuncs[r](e)+(t>=200?\"M0,0.5L0.5,0L0,-0.5L-0.5,0Z\":\"\")}x.symbolNumber=function(t){if(o(t))t=+t;else 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=x.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=_||t>=400?0:Math.floor(Math.max(t,0))};var T={x1:1,x2:0,y1:0,y2:0},k={x1:0,x2:0,y1:1,y2:0},A=a(\"~f\"),M={radial:{node:\"radialGradient\"},radialreversed:{node:\"radialGradient\",reversed:!0},horizontal:{node:\"linearGradient\",attrs:T},horizontalreversed:{node:\"linearGradient\",attrs:T,reversed:!0},vertical:{node:\"linearGradient\",attrs:k},verticalreversed:{node:\"linearGradient\",attrs:k,reversed:!0}};x.gradient=function(t,e,r,a,o,l){for(var u=o.length,f=M[a],h=new Array(u),p=0;p\"+v(t);d._gradientUrlQueryParts[y]=1},x.pattern=function(t,e,r,a,o,s,l,u,f,h,p,d){var g=\"legend\"===e;u&&(\"overlay\"===f?(h=u,p=c.contrast(h)):(h=void 0,p=u));var m,v,y,x,b,_,w,T,k,A,M,S=r._fullLayout,E=\"p\"+S._uid+\"-\"+a,L={};switch(o){case\"/\":m=s*Math.sqrt(2),v=s*Math.sqrt(2),_=\"path\",L={d:y=\"M-\"+m/4+\",\"+v/4+\"l\"+m/2+\",-\"+v/2+\"M0,\"+v+\"L\"+m+\",0M\"+m/4*3+\",\"+v/4*5+\"l\"+m/2+\",-\"+v/2,opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"\\\\\":m=s*Math.sqrt(2),v=s*Math.sqrt(2),_=\"path\",L={d:y=\"M\"+m/4*3+\",-\"+v/4+\"l\"+m/2+\",\"+v/2+\"M0,0L\"+m+\",\"+v+\"M-\"+m/4+\",\"+v/4*3+\"l\"+m/2+\",\"+v/2,opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"x\":m=s*Math.sqrt(2),v=s*Math.sqrt(2),y=\"M-\"+m/4+\",\"+v/4+\"l\"+m/2+\",-\"+v/2+\"M0,\"+v+\"L\"+m+\",0M\"+m/4*3+\",\"+v/4*5+\"l\"+m/2+\",-\"+v/2+\"M\"+m/4*3+\",-\"+v/4+\"l\"+m/2+\",\"+v/2+\"M0,0L\"+m+\",\"+v+\"M-\"+m/4+\",\"+v/4*3+\"l\"+m/2+\",\"+v/2,x=s-s*Math.sqrt(1-l),_=\"path\",L={d:y,opacity:d,stroke:p,\"stroke-width\":x+\"px\"};break;case\"|\":_=\"path\",_=\"path\",L={d:y=\"M\"+(m=s)/2+\",0L\"+m/2+\",\"+(v=s),opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"-\":_=\"path\",_=\"path\",L={d:y=\"M0,\"+(v=s)/2+\"L\"+(m=s)+\",\"+v/2,opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"+\":_=\"path\",y=\"M\"+(m=s)/2+\",0L\"+m/2+\",\"+(v=s)+\"M0,\"+v/2+\"L\"+m+\",\"+v/2,x=s-s*Math.sqrt(1-l),_=\"path\",L={d:y,opacity:d,stroke:p,\"stroke-width\":x+\"px\"};break;case\".\":m=s,v=s,l.pattern_filled\";S._patternUrlQueryParts[I]=1},x.initGradients=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,\"g\",\"gradients\").selectAll(\"linearGradient,radialGradient\").remove(),e._gradientUrlQueryParts={}},x.initPatterns=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,\"g\",\"patterns\").selectAll(\"pattern\").remove(),e._patternUrlQueryParts={}},x.getPatternAttr=function(t,e,r){return t&&i.isArrayOrTypedArray(t)?e=100,e.attr(\"d\",w(u,l))}var f,h,p,d=!1;if(t.so)p=s.outlierwidth,h=s.outliercolor,f=o.outliercolor;else{var g=(s||{}).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):i.isArrayOrTypedArray(s.color)?c.defaultLine:s.color,i.isArrayOrTypedArray(o.color)&&(f=c.defaultLine,d=!0),f=\"mc\"in t?t.mcc=n.markerScale(t.mc):o.color||\"rgba(0,0,0,0)\",n.selectedColorFn&&(f=n.selectedColorFn(t))}if(t.om)e.call(c.stroke,f).style({\"stroke-width\":(p||1)+\"px\",fill:\"none\"});else{e.style(\"stroke-width\",(t.isBlank?0:p)+\"px\");var m=o.gradient,v=t.mgt;v?d=!0:v=m&&m.type,i.isArrayOrTypedArray(v)&&(v=v[0],M[v]||(v=0));var y=o.pattern,b=y&&x.getPatternAttr(y.shape,t.i,\"\");if(v&&\"none\"!==v){var _=t.mgc;_?d=!0:_=m.color;var T=r.uid;d&&(T+=\"-\"+t.i),x.gradient(e,a,T,v,[[0,_],[1,f]],\"fill\")}else if(b){var k=x.getPatternAttr(y.bgcolor,t.i,null),A=x.getPatternAttr(y.fgcolor,t.i,null),S=y.fgopacity,E=x.getPatternAttr(y.size,t.i,8),L=x.getPatternAttr(y.solidity,t.i,.3),C=t.mcc||i.isArrayOrTypedArray(y.shape)||i.isArrayOrTypedArray(y.bgcolor)||i.isArrayOrTypedArray(y.size)||i.isArrayOrTypedArray(y.solidity),P=r.uid;C&&(P+=\"-\"+t.i),x.pattern(e,\"point\",a,P,b,E,L,t.mcc,y.fillmode,k,A,S)}else c.fill(e,f);p&&c.stroke(e,h)}},x.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=x.tryColorscale(r,\"\"),e.lineScale=x.tryColorscale(r,\"line\"),l.traceIs(t,\"symbols\")&&(e.ms2mrc=m.isBubble(t)?v(t):function(){return(r.size||6)/2}),t.selectedpoints&&i.extendFlat(e,x.makeSelectedPointStyleFns(t)),e},x.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.marker||{},o=r.marker||{},s=n.marker||{},c=a.opacity,u=o.opacity,f=s.opacity,h=void 0!==u,p=void 0!==f;(i.isArrayOrTypedArray(c)||h||p)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?a.opacity:t.mo;return t.selected?h?u:e:p?f:g*e});var d=a.color,m=o.color,v=s.color;(m||v)&&(e.selectedColorFn=function(t){var e=t.mcc||d;return t.selected?m||e:v||e});var y=a.size,x=o.size,b=s.size,_=void 0!==x,w=void 0!==b;return l.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},x.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:u||(l?e:c.addOpacity(e,g))},e},x.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.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){c.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\",w(x.symbolNumber(n),a)),e.mrc2=a})),a.length&&t.each((function(t){for(var e=n.select(this),r=0;r0?r:0}x.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var o=x.makeSelectedTextStyleFns(e);a=o.selectedTextColorFn}var s=e.texttemplate,l=r._fullLayout;t.each((function(t){var o=n.select(this),c=s?i.extractOption(t,e,\"txt\",\"texttemplate\"):i.extractOption(t,e,\"tx\",\"text\");if(c||0===c){if(s){var u=e._module.formatLabels,f=u?u(t,e,l):{},p={};y(p,e,t.i);var d=e._meta||{};c=i.texttemplateString(c,f,l._d3locale,p,t,d)}var g=t.tp||e.textposition,m=L(t,e),v=a?a(t):t.tc||e.textfont.color;o.call(x.font,t.tf||e.textfont.family,m,v).text(c).call(h.convertToTspans,r).call(E,g,m,t.mrc)}else o.remove()}))}},x.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.makeSelectedTextStyleFns(e);t.each((function(t){var i=n.select(this),a=r.selectedTextColorFn(t),o=t.tp||e.textposition,s=L(t,e);c.fill(i,a);var u=l.traceIs(e,\"bar-like\");E(i,o,s,t.mrc2||t.mrc,u)}))}};function C(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,.25),u=Math.pow(s*s+l*l,.25),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)]]}x.smoothopen=function(t,e){if(t.length<3)return\"M\"+t.join(\"L\");var r,n=\"M\"+t[0],i=[];for(r=1;r=1e4&&(x.savedBBoxes={},O=0),r&&(x.savedBBoxes[r]=m),O++,i.extendFlat({},m)},x.setClipUrl=function(t,e,r){t.attr(\"clip-path\",D(e,r))},x.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}},x.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+=f(e,r)).trim(),t[i](\"transform\",a),a},x.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}},x.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 R=/\\s*sc.*/;x.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(R,\"\");t=(t+=n).trim(),this.setAttribute(\"transform\",t)}))}};var F=/translate\\([^)]*\\)\\s*$/;x.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(F);t=1===e&&1===r?[]:[f(o,s),\"scale(\"+e+\",\"+r+\")\",f(-o,-s)],l&&t.push(l),i.attr(\"transform\",t.join(\"\"))}}))}},{\"../../components/fx/helpers\":402,\"../../constants/alignment\":471,\"../../constants/interactions\":478,\"../../constants/xmlns_namespaces\":480,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../registry\":638,\"../../traces/scatter/make_bubble_size_func\":943,\"../../traces/scatter/subtypes\":951,\"../color\":366,\"../colorscale\":378,\"./symbol_defs\":389,\"@plotly/d3\":58,\"fast-isnumeric\":190,tinycolor2:312}],389:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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},\"arrow-up\":{n:45,f:function(t){var e=n.round(t,2);return\"M0,0L-\"+e+\",\"+n.round(2*t,2)+\"H\"+e+\"Z\"},noDot:!0},\"arrow-down\":{n:46,f:function(t){var e=n.round(t,2);return\"M0,0L-\"+e+\",-\"+n.round(2*t,2)+\"H\"+e+\"Z\"},noDot:!0},\"arrow-left\":{n:47,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,0L\"+e+\",-\"+r+\"V\"+r+\"Z\"},noDot:!0},\"arrow-right\":{n:48,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,0L-\"+e+\",-\"+r+\"V\"+r+\"Z\"},noDot:!0},\"arrow-bar-up\":{n:49,f:function(t){var e=n.round(t,2);return\"M-\"+e+\",0H\"+e+\"M0,0L-\"+e+\",\"+n.round(2*t,2)+\"H\"+e+\"Z\"},needLine:!0,noDot:!0},\"arrow-bar-down\":{n:50,f:function(t){var e=n.round(t,2);return\"M-\"+e+\",0H\"+e+\"M0,0L-\"+e+\",-\"+n.round(2*t,2)+\"H\"+e+\"Z\"},needLine:!0,noDot:!0},\"arrow-bar-left\":{n:51,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,-\"+r+\"V\"+r+\"M0,0L\"+e+\",-\"+r+\"V\"+r+\"Z\"},needLine:!0,noDot:!0},\"arrow-bar-right\":{n:52,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,-\"+r+\"V\"+r+\"M0,0L-\"+e+\",-\"+r+\"V\"+r+\"Z\"},needLine:!0,noDot:!0}}},{\"@plotly/d3\":58}],390:[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\"}}}},{}],391:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../registry\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../lib\"),s=t(\"./compute_error\");function l(t,e,r,i){var l=e[\"error_\"+i]||{},c=[];if(l.visible&&-1!==[\"linear\",\"log\"].indexOf(r.type)){for(var u=s(l),f=0;f0;e.each((function(e){var f,h=e[0].trace,p=h.error_x||{},d=h.error_y||{};h.ids&&(f=function(t){return t.id});var g=o.hasMarkers(h)&&h.marker.maxdisplayed>0;d.visible||p.visible||(e=[]);var m=n.select(this).selectAll(\"g.errorbar\").data(e,f);if(m.exit().remove(),e.length){p.visible||m.selectAll(\"path.xerror\").remove(),d.visible||m.selectAll(\"path.yerror\").remove(),m.style(\"opacity\",1);var v=m.enter().append(\"g\").classed(\"errorbar\",!0);u&&v.style(\"opacity\",0).transition().duration(s.duration).style(\"opacity\",1),a.setClipUrl(m,r.layerClipId,t),m.each((function(t){var e=n.select(this),r=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,l,c);if(!g||t.vis){var a,o=e.select(\"path.yerror\");if(d.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var f=d.width;a=\"M\"+(r.x-f)+\",\"+r.yh+\"h\"+2*f+\"m-\"+f+\",0V\"+r.ys,r.noYS||(a+=\"m-\"+f+\",0h\"+2*f),!o.size()?o=e.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").classed(\"yerror\",!0):u&&(o=o.transition().duration(s.duration).ease(s.easing)),o.attr(\"d\",a)}else o.remove();var h=e.select(\"path.xerror\");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var m=(p.copy_ystyle?d:p).width;a=\"M\"+r.xh+\",\"+(r.y-m)+\"v\"+2*m+\"m0,-\"+m+\"H\"+r.xs,r.noXS||(a+=\"m0,-\"+m+\"v\"+2*m),!h.size()?h=e.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").classed(\"xerror\",!0):u&&(h=h.transition().duration(s.duration).ease(s.easing)),h.attr(\"d\",a)}else h.remove()}}))}}))}},{\"../../traces/scatter/subtypes\":951,\"../drawing\":388,\"@plotly/d3\":58,\"fast-isnumeric\":190}],396:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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\":366,\"@plotly/d3\":58}],397:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"./layout_attributes\").hoverlabel,a=t(\"../../lib/extend\").extendFlat;e.exports={hoverlabel:{bgcolor:a({},i.bgcolor,{arrayOk:!0}),bordercolor:a({},i.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:\"none\"}),align:a({},i.align,{arrayOk:!0}),namelength:a({},i.namelength,{arrayOk:!0}),editType:\"none\"}}},{\"../../lib/extend\":493,\"../../plots/font_attributes\":585,\"./layout_attributes\":407}],398:[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=0&&r.index_[0]._length||ot<0||ot>w[0]._length)return d.unhoverRaw(t,e)}if(e.pointerX=at+_[0]._offset,e.pointerY=ot+w[0]._offset,V=\"xval\"in e?v.flat(l,e.xval):v.p2c(_,at),H=\"yval\"in e?v.flat(l,e.yval):v.p2c(w,ot),!i(V[0])||!i(H[0]))return o.warn(\"Fx.hover failed\",e,t),d.unhoverRaw(t,e)}var ct=1/0;function ut(t,r){for(G=0;Gtt&&(et.splice(0,tt),ct=et[0].distance),y&&0!==B&&0===et.length){$.distance=B,$.index=!1;var f=W._module.hoverPoints($,K,Q,\"closest\",{hoverLayer:u._hoverlayer});if(f&&(f=f.filter((function(t){return t.spikeDistance<=B}))),f&&f.length){var h,d=f.filter((function(t){return t.xa.showspikes&&\"hovered data\"!==t.xa.spikesnap}));if(d.length){var g=d[0];i(g.x0)&&i(g.y0)&&(h=ht(g),(!nt.vLinePoint||nt.vLinePoint.spikeDistance>h.spikeDistance)&&(nt.vLinePoint=h))}var m=f.filter((function(t){return t.ya.showspikes&&\"hovered data\"!==t.ya.spikesnap}));if(m.length){var x=m[0];i(x.x0)&&i(x.y0)&&(h=ht(x),(!nt.hLinePoint||nt.hLinePoint.spikeDistance>h.spikeDistance)&&(nt.hLinePoint=h))}}}}}function ft(t,e,r){for(var n,i=null,a=1/0,o=0;o0&&Math.abs(t.distance)Tt-1;Mt--)Ct(et[Mt]);et=St,mt()}var Pt=t._hoverdata,It=[],Ot=j(t),zt=U(t);for(q=0;q1||et.length>1)||\"closest\"===P&&it&&et.length>1,Wt=p.combine(u.plot_bgcolor||p.background,u.paper_bgcolor),Xt=I(et,{gd:t,hovermode:P,rotateLabels:Yt,bgColor:Wt,container:u._hoverlayer,outerContainer:u._paper.node(),commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance});v.isUnifiedHover(P)||(!function(t,e,r){var n,i,a,o,s,l,c,u=0,f=1,h=t.size(),p=new Array(h),d=0;function g(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;oe.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=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--)}}}t.each((function(t){var n=t[e],i=\"x\"===n._id.charAt(0),a=n.range;0===d&&a&&a[0]>a[1]!==i&&(f=-1),p[d++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(i?T:1)/2,pmin:0,pmax:i?r.width:r.height}]})),p.sort((function(t,e){return t[0].posref-e[0].posref||f*(e[0].traceIndex-t[0].traceIndex)}));for(;!n&&u<=h;){for(u++,n=!0,o=0;o.01&&y.pmin===x.pmin&&y.pmax===x.pmax){for(s=v.length-1;s>=0;s--)v[s].dp+=i;for(m.push.apply(m,v),p.splice(o+1,1),c=0,s=m.length-1;s>=0;s--)c+=m[s].dp;for(a=c/m.length,s=m.length-1;s>=0;s--)m[s].dp-=a;n=!1}else o++}p.forEach(g)}for(o=p.length-1;o>=0;o--){var b=p[o];for(s=b.length-1;s>=0;s--){var _=b[s],w=_.datum;w.offset=_.dp,w.del=_.del}}}(Xt,Yt?\"xa\":\"ya\",u),z(Xt,Yt,u._invScaleX,u._invScaleY));if(s&&s.tagName){var Zt=m.getComponentMethod(\"annotations\",\"hasClickToShow\")(t,It);f(n.select(s),Zt?\"pointer\":\"\")}if(!s||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)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(t,0,Pt))return;Pt&&t.emit(\"plotly_unhover\",{event:e,points:Pt});t.emit(\"plotly_hover\",{event:e,points:t._hoverdata,xaxes:_,yaxes:w,xvals:V,yvals:H})}(t,e,r,a,s)}))},r.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=e.gd,a=j(i),o=U(i),s=I(t.map((function(t){var r=t._x0||t.x0||t.x||0,n=t._x1||t.x1||t.x||0,s=t._y0||t.y0||t.y||0,l=t._y1||t.y1||t.y||0,c=t.eventData;if(c){var u=Math.min(r,n),f=Math.max(r,n),h=Math.min(s,l),d=Math.max(s,l),g=t.trace;if(m.traceIs(g,\"gl3d\")){var v=i._fullLayout[g.scene]._scene.container,y=v.offsetLeft,x=v.offsetTop;u+=y,f+=y,h+=x,d+=x}c.bbox={x0:u+o,x1:f+o,y0:h+a,y1:d+a},e.inOut_bbox&&e.inOut_bbox.push(c.bbox)}else c=!1;return{color:t.color||p.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,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:\"\"},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData:c}})),{gd:i,hovermode:\"closest\",rotateLabels:!1,bgColor:e.bgColor||p.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}),l=0,c=0;return s.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5([\\s\\S]*)<\\/extra>/;function I(t,e){var r=e.gd,i=r._fullLayout,a=e.hovermode,c=e.rotateLabels,f=e.bgColor,d=e.container,g=e.outerContainer,w=e.commonLabelOpts||{};if(0===t.length)return[[]];var T=e.fontFamily||y.HOVERFONT,k=e.fontSize||y.HOVERFONTSIZE,A=t[0],E=A.xa,L=A.ya,P=a.charAt(0),I=A[P+\"Label\"],z=V(r,g),D=z.top,R=z.width,F=z.height,B=void 0!==I&&A.distance<=e.hoverdistance&&(\"x\"===a||\"y\"===a);if(B){var N,j,U=!0;for(N=0;Ni.width-b?(m=i.width-b,e.attr(\"d\",\"M\"+(b-M)+\",0L\"+b+\",\"+x+M+\"v\"+x+(2*S+y.height)+\"H-\"+b+\"V\"+x+M+\"H\"+(b-2*M)+\"Z\")):e.attr(\"d\",\"M0,0L\"+M+\",\"+x+M+\"H\"+(S+y.width/2)+\"v\"+x+(2*S+y.height)+\"H-\"+(S+y.width/2)+\"V\"+x+M+\"H-\"+M+\"Z\")}else{var _,C,P;\"right\"===L.side?(_=\"start\",C=1,P=\"\",m=E._offset+E._length):(_=\"end\",C=-1,P=\"-\",m=E._offset),v=L._offset+(A.y0+A.y1)/2,l.attr(\"text-anchor\",_),e.attr(\"d\",\"M0,0L\"+P+M+\",\"+M+\"V\"+(S+y.height/2)+\"h\"+P+(2*S+y.width)+\"V-\"+(S+y.height/2)+\"H\"+P+M+\"V-\"+M+\"Z\");var O,z=y.height/2,R=D-y.top-z,F=\"clip\"+i._uid+\"commonlabel\"+L._id;if(m=0?at:ot+ct=0?ot:vt+ct=0?nt:it+ut=0?it:yt+ut=0,\"top\"!==t.idealAlign&&G||!Y?G?(z+=j/2,t.anchor=\"start\"):t.anchor=\"middle\":(z-=j/2,t.anchor=\"end\");else if(t.pos=z,G=P+N/2+W<=R,Y=P-N/2-W>=0,\"left\"!==t.idealAlign&&G||!Y)if(G)P+=N/2,t.anchor=\"start\";else{t.anchor=\"middle\";var X=W/2,Z=P+X-R,J=P-X;Z>0&&(P-=Z),J<0&&(P+=-J)}else P-=N/2,t.anchor=\"end\";w.attr(\"text-anchor\",t.anchor),E&&A.attr(\"text-anchor\",t.anchor),e.attr(\"transform\",s(P,z)+(c?l(_):\"\"))})),xt}function O(t,e,r,n,i,a){var s=\"\",l=\"\";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=o.templateString(t.name,t.trace._meta)),s=B(t.name,t.nameLength));var c=r.charAt(0),u=\"x\"===c?\"y\":\"x\";void 0!==t.zLabel?(void 0!==t.xLabel&&(l+=\"x: \"+t.xLabel+\"
\"),void 0!==t.yLabel&&(l+=\"y: \"+t.yLabel+\"
\"),\"choropleth\"!==t.trace.type&&\"choroplethmapbox\"!==t.trace.type&&(l+=(l?\"z: \":\"\")+t.zLabel)):e&&t[c+\"Label\"]===i?l=t[u+\"Label\"]||\"\":void 0===t.xLabel?void 0!==t.yLabel&&\"scattercarpet\"!==t.trace.type&&(l=t.yLabel):l=void 0===t.yLabel?t.xLabel:\"(\"+t.xLabel+\", \"+t.yLabel+\")\",!t.text&&0!==t.text||Array.isArray(t.text)||(l+=(l?\"
\":\"\")+t.text),void 0!==t.extraText&&(l+=(l?\"
\":\"\")+t.extraText),a&&\"\"===l&&!t.hovertemplate&&(\"\"===s&&a.remove(),l=s);var f=t.hovertemplate||!1;if(f){var h=t.hovertemplateLabels||t;t[c+\"Label\"]!==i&&(h[c+\"other\"]=h[c+\"Val\"],h[c+\"otherLabel\"]=h[c+\"Label\"]),l=(l=o.hovertemplateString(f,h,n._d3locale,t.eventData[0]||{},t.trace._meta)).replace(P,(function(e,r){return s=B(r,t.nameLength),\"\"}))}return[l,s]}function z(t,e,r,i){var a=function(t){return t*r},o=function(t){return t*i};t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var i=r.select(\"text.nums\"),s=t.anchor,l=\"end\"===s?-1:1,c={start:1,end:-1,middle:0}[s],f=c*(M+S),p=f+c*(t.txwidth+S),d=0,g=t.offset,m=\"middle\"===s;m&&(f-=t.tx2width/2,p+=t.txwidth/2+S),e&&(g*=-A,d=t.offset*k),r.select(\"path\").attr(\"d\",m?\"M-\"+a(t.bx/2+t.tx2width/2)+\",\"+o(g-t.by/2)+\"h\"+a(t.bx)+\"v\"+o(t.by)+\"h-\"+a(t.bx)+\"Z\":\"M0,0L\"+a(l*M+d)+\",\"+o(M+g)+\"v\"+o(t.by/2-M)+\"h\"+a(l*t.bx)+\"v-\"+o(t.by)+\"H\"+a(l*M+d)+\"V\"+o(g-M)+\"Z\");var v=d+f,y=g+t.ty0-t.by/2+S,x=t.textAlign||\"auto\";\"auto\"!==x&&(\"left\"===x&&\"start\"!==s?(i.attr(\"text-anchor\",\"start\"),v=m?-t.bx/2-t.tx2width/2+S:-t.bx-S):\"right\"===x&&\"end\"!==s&&(i.attr(\"text-anchor\",\"end\"),v=m?t.bx/2-t.tx2width/2-S:t.bx+S)),i.call(u.positionText,a(v),o(y)),t.tx2width&&(r.select(\"text.name\").call(u.positionText,a(p+c*S+d),o(g+t.ty0-t.by/2+S)),r.select(\"rect\").call(h.setRect,a(p+(c-1)*t.tx2width/2+d),o(g-t.by/2-1),a(t.tx2width),o(t.by+2)))}))}function D(t,e){var r=t.index,n=t.trace||{},a=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var c=Array.isArray(r)?function(t,e){var i=o.castOption(a,r,t);return l(i)?i:o.extractOption({},n,\"\",e)}:function(t,e){return o.extractOption(s,n,t,e)};function u(e,r,n){var i=c(r,n);l(i)&&(t[e]=i)}if(u(\"hoverinfo\",\"hi\",\"hoverinfo\"),u(\"bgcolor\",\"hbg\",\"hoverlabel.bgcolor\"),u(\"borderColor\",\"hbc\",\"hoverlabel.bordercolor\"),u(\"fontFamily\",\"htf\",\"hoverlabel.font.family\"),u(\"fontSize\",\"hts\",\"hoverlabel.font.size\"),u(\"fontColor\",\"htc\",\"hoverlabel.font.color\"),u(\"nameLength\",\"hnl\",\"hoverlabel.namelength\"),u(\"textAlign\",\"hta\",\"hoverlabel.align\"),t.posref=\"y\"===e||\"closest\"===e&&\"h\"===n.orientation?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:g.hoverLabelText(t.xa,t.xLabelVal,n.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel=\"yLabel\"in t?t.yLabel:g.hoverLabelText(t.ya,t.yLabelVal,n.yhoverformat),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 f=g.tickText(t.xa,t.xa.c2l(t.xerr),\"hover\").text;void 0!==t.xerrneg?t.xLabel+=\" +\"+f+\" / -\"+g.tickText(t.xa,t.xa.c2l(t.xerrneg),\"hover\").text:t.xLabel+=\" \\xb1 \"+f,\"x\"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||\"log\"===t.ya.type&&t.yerr<=0)){var h=g.tickText(t.ya,t.ya.c2l(t.yerr),\"hover\").text;void 0!==t.yerrneg?t.yLabel+=\" +\"+h+\" / -\"+g.tickText(t.ya,t.ya.c2l(t.yerrneg),\"hover\").text:t.yLabel+=\" \\xb1 \"+h,\"y\"===e&&(t.distance+=1)}var p=t.hoverinfo||t.trace.hoverinfo;return p&&\"all\"!==p&&(-1===(p=Array.isArray(p)?p:p.split(\"+\")).indexOf(\"x\")&&(t.xLabel=void 0),-1===p.indexOf(\"y\")&&(t.yLabel=void 0),-1===p.indexOf(\"z\")&&(t.zLabel=void 0),-1===p.indexOf(\"text\")&&(t.text=void 0),-1===p.indexOf(\"name\")&&(t.name=void 0)),t}function R(t,e,r){var n,i,o=r.container,s=r.fullLayout,l=s._size,c=r.event,u=!!e.hLinePoint,f=!!e.vLinePoint;if(o.selectAll(\".spikeline\").remove(),f||u){var d=p.combine(s.plot_bgcolor,s.paper_bgcolor);if(u){var m,v,y=e.hLinePoint;n=y&&y.xa,\"cursor\"===(i=y&&y.ya).spikesnap?(m=c.pointerX,v=c.pointerY):(m=n._offset+y.x,v=i._offset+y.y);var x,b,_=a.readability(y.color,d)<1.5?p.contrast(d):y.color,w=i.spikemode,T=i.spikethickness,k=i.spikecolor||_,A=g.getPxPosition(t,i);if(-1!==w.indexOf(\"toaxis\")||-1!==w.indexOf(\"across\")){if(-1!==w.indexOf(\"toaxis\")&&(x=A,b=m),-1!==w.indexOf(\"across\")){var M=i._counterDomainMin,S=i._counterDomainMax;\"free\"===i.anchor&&(M=Math.min(M,i.position),S=Math.max(S,i.position)),x=l.l+M*l.w,b=l.l+S*l.w}o.insert(\"line\",\":first-child\").attr({x1:x,x2:b,y1:v,y2:v,\"stroke-width\":T,stroke:k,\"stroke-dasharray\":h.dashStyle(i.spikedash,T)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),o.insert(\"line\",\":first-child\").attr({x1:x,x2:b,y1:v,y2:v,\"stroke-width\":T+2,stroke:d}).classed(\"spikeline\",!0).classed(\"crisp\",!0)}-1!==w.indexOf(\"marker\")&&o.insert(\"circle\",\":first-child\").attr({cx:A+(\"right\"!==i.side?T:-T),cy:v,r:T,fill:k}).classed(\"spikeline\",!0)}if(f){var E,L,C=e.vLinePoint;n=C&&C.xa,i=C&&C.ya,\"cursor\"===n.spikesnap?(E=c.pointerX,L=c.pointerY):(E=n._offset+C.x,L=i._offset+C.y);var P,I,O=a.readability(C.color,d)<1.5?p.contrast(d):C.color,z=n.spikemode,D=n.spikethickness,R=n.spikecolor||O,F=g.getPxPosition(t,n);if(-1!==z.indexOf(\"toaxis\")||-1!==z.indexOf(\"across\")){if(-1!==z.indexOf(\"toaxis\")&&(P=F,I=L),-1!==z.indexOf(\"across\")){var B=n._counterDomainMin,N=n._counterDomainMax;\"free\"===n.anchor&&(B=Math.min(B,n.position),N=Math.max(N,n.position)),P=l.t+(1-N)*l.h,I=l.t+(1-B)*l.h}o.insert(\"line\",\":first-child\").attr({x1:E,x2:E,y1:P,y2:I,\"stroke-width\":D,stroke:R,\"stroke-dasharray\":h.dashStyle(n.spikedash,D)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),o.insert(\"line\",\":first-child\").attr({x1:E,x2:E,y1:P,y2:I,\"stroke-width\":D+2,stroke:d}).classed(\"spikeline\",!0).classed(\"crisp\",!0)}-1!==z.indexOf(\"marker\")&&o.insert(\"circle\",\":first-child\").attr({cx:E,cy:F-(\"top\"!==n.side?D:-D),r:D,fill:R}).classed(\"spikeline\",!0)}}}function F(t,e){return!e||(e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint)}function B(t,e){return u.plainText(t||\"\",{len:e,allowedTags:[\"br\",\"sub\",\"sup\",\"b\",\"i\",\"em\"]})}function N(t,e,r){var n=e[t+\"a\"],i=e[t+\"Val\"],a=e.cd[0];if(\"category\"===n.type)i=n._categoriesMap[i];else if(\"date\"===n.type){var o=e.trace[t+\"periodalignment\"];if(o){var s=e.cd[e.index],l=s[t+\"Start\"];void 0===l&&(l=s[t]);var c=s[t+\"End\"];void 0===c&&(c=s[t]);var u=c-l;\"end\"===o?i+=u:\"middle\"===o&&(i+=u/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&(\"group\"!==r.boxmode&&\"group\"!==r.violinmode||(i+=a.t.dPos)),i}function j(t){return t.offsetTop+t.clientTop}function U(t){return t.offsetLeft+t.clientLeft}function V(t,e){var r=t._fullLayout,n=e.getBoundingClientRect(),i=n.x,a=n.y,s=i+n.width,l=a+n.height,c=o.apply3DTransform(r._invTransform)(i,a),u=o.apply3DTransform(r._invTransform)(s,l),f=c[0],h=c[1],p=u[0],d=u[1];return{x:f,y:h,width:p-f,height:d-h,top:Math.min(h,d),left:Math.min(f,p),right:Math.max(f,p),bottom:Math.max(h,d)}}},{\"../../lib\":503,\"../../lib/events\":492,\"../../lib/override_cursor\":514,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"../color\":366,\"../dragelement\":385,\"../drawing\":388,\"../legend/defaults\":418,\"../legend/draw\":419,\"./constants\":400,\"./helpers\":402,\"@plotly/d3\":58,\"fast-isnumeric\":190,tinycolor2:312}],404:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../color\"),a=t(\"./helpers\").isUnifiedHover;e.exports=function(t,e,r,o){o=o||{};var s=e.legend;function l(t){o.font[t]||(o.font[t]=s?e.legend.font[t]:e.font[t])}e&&a(e.hovermode)&&(o.font||(o.font={}),l(\"size\"),l(\"family\"),l(\"color\"),s?(o.bgcolor||(o.bgcolor=i.combine(e.legend.bgcolor,e.paper_bgcolor)),o.bordercolor||(o.bordercolor=e.legend.bordercolor)):o.bgcolor||(o.bgcolor=e.paper_bgcolor)),r(\"hoverlabel.bgcolor\",o.bgcolor),r(\"hoverlabel.bordercolor\",o.bordercolor),r(\"hoverlabel.namelength\",o.namelength),n.coerceFont(r,\"hoverlabel.font\",o.font),r(\"hoverlabel.align\",o.align)}},{\"../../lib\":503,\"../color\":366,\"./helpers\":402}],405:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e){function r(r,a){return void 0!==e[r]?e[r]:n.coerce(t,e,i,r,a)}return r(\"clickmode\"),r(\"hovermode\")}},{\"../../lib\":503,\"./layout_attributes\":407}],406:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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,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\":503,\"../dragelement\":385,\"./attributes\":397,\"./calc\":398,\"./click\":399,\"./constants\":400,\"./defaults\":401,\"./helpers\":402,\"./hover\":403,\"./layout_attributes\":407,\"./layout_defaults\":408,\"./layout_global_defaults\":409,\"@plotly/d3\":58}],407:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"../../plots/font_attributes\"),a=i({editType:\"none\"});a.family.dflt=n.HOVERFONT,a.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\",\"drawclosedpath\",\"drawopenpath\",\"drawline\",\"drawrect\",\"drawcircle\",\"orbit\",\"turntable\",!1],dflt:\"zoom\",editType:\"modebar\"},hovermode:{valType:\"enumerated\",values:[\"x\",\"y\",\"closest\",!1,\"x unified\",\"y unified\"],dflt:\"closest\",editType:\"modebar\"},hoverdistance:{valType:\"integer\",min:-1,dflt:20,editType:\"none\"},spikedistance:{valType:\"integer\",min:-1,dflt:-1,editType:\"none\"},hoverlabel:{bgcolor:{valType:\"color\",editType:\"none\"},bordercolor:{valType:\"color\",editType:\"none\"},font:a,grouptitlefont:i({editType:\"none\"}),align:{valType:\"enumerated\",values:[\"left\",\"right\",\"auto\"],dflt:\"auto\",editType:\"none\"},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\":585,\"./constants\":400}],408:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\"),a=t(\"./hovermode_defaults\"),o=t(\"./hoverlabel_defaults\");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}a(t,e)&&(r(\"hoverdistance\"),r(\"spikedistance\")),\"select\"===r(\"dragmode\")&&r(\"selectdirection\");var s=e._has(\"mapbox\"),l=e._has(\"geo\"),c=e._basePlotModules.length;\"zoom\"===e.dragmode&&((s||l)&&1===c||s&&l&&2===c)&&(e.dragmode=\"pan\"),o(t,e,r),n.coerceFont(r,\"hoverlabel.grouptitlefont\",e.hoverlabel.font)}},{\"../../lib\":503,\"./hoverlabel_defaults\":404,\"./hovermode_defaults\":405,\"./layout_attributes\":407}],409:[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\":503,\"./hoverlabel_defaults\":404,\"./layout_attributes\":407}],410:[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;h1){if(!h&&!p&&!d)\"independent\"===k(\"pattern\")&&(h=!0);m._hasSubplotGrid=h;var x,b,_=\"top to bottom\"===k(\"roworder\"),w=h?.2:.1,T=h?.3:.1;g&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),m._domains={x:u(\"x\",k,w,x,y),y:u(\"y\",k,T,b,v,_)}}else delete e.grid}function k(t,e){return n.coerce(r,m,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,m=r.columns,v=\"independent\"===r.pattern,y=r._axisMap={};if(d){var x=h.subplots||[];l=r.subplots=new Array(g);var b=1;for(n=0;n1);if(!1===_&&(e.legend=void 0),(!1!==_||f.uirevision)&&(p(\"uirevision\",e.uirevision),!1!==_)){p(\"bgcolor\",e.paper_bgcolor),p(\"bordercolor\"),p(\"borderwidth\");var w,T,k,A=i.coerceFont(p,\"font\",e.font),M=\"h\"===p(\"orientation\");if(M?(w=0,n.getComponentMethod(\"rangeslider\",\"isVisible\")(t.xaxis)?(T=1.1,k=\"bottom\"):(T=-.1,k=\"top\")):(w=1.02,T=1,k=\"auto\"),p(\"traceorder\",x),c.isGrouped(e.legend)&&p(\"tracegroupgap\"),p(\"itemsizing\"),p(\"itemwidth\"),p(\"itemclick\"),p(\"itemdoubleclick\"),p(\"groupclick\"),p(\"x\",w),p(\"xanchor\"),p(\"y\",T),p(\"yanchor\",k),p(\"valign\"),i.noneOrAll(f,h,[\"x\",\"y\"]),p(\"title.text\")){p(\"title.side\",M?\"left\":\"top\");var S=i.extendFlat({},A,{size:i.bigFont(A.size)});i.coerceFont(p,\"title.font\",S)}}}},{\"../../lib\":503,\"../../plot_api/plot_template\":543,\"../../plots/attributes\":550,\"../../plots/layout_attributes\":610,\"../../registry\":638,\"./attributes\":416,\"./helpers\":422}],419:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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/alignment\"),g=d.LINE_SPACING,m=d.FROM_TL,v=d.FROM_BR,y=t(\"./get_legend_data\"),x=t(\"./style\"),b=t(\"./helpers\");function _(t,e,r,n,i){var a=r.data()[0][0].trace,l={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&&(l.group=a._group),o.traceIs(a,\"pie-like\")&&(l.label=r.datum()[0].label),!1!==s.triggerHandler(t,\"plotly_legendclick\",l))if(1===n)e._clickTimeout=setTimeout((function(){t._fullLayout&&h(r,t,n)}),t._context.doubleClickDelay);else if(2===n){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,\"plotly_legenddoubleclick\",l)&&h(r,t,n)}}function w(t,e,r){var n,a,s=t.data()[0][0],l=s.trace,u=o.traceIs(l,\"pie-like\"),h=!r._inHover&&e._context.edits.legendText&&!u,d=r._maxNameLength;s.groupTitle?(n=s.groupTitle.text,a=s.groupTitle.font):(a=r.font,r.entries?n=s.text:(n=u?s.label:l.name,l._meta&&(n=i.templateString(n,l._meta))));var g=i.ensureSingle(t,\"text\",\"legendtext\");g.attr(\"text-anchor\",\"start\").call(c.font,a).text(h?T(n,d):n);var m=r.itemwidth+2*p.itemGap;f.positionText(g,m,0),h?g.call(f.makeEditable,{gd:e,text:n}).call(A,t,e,r).on(\"edit\",(function(n){this.text(T(n,d)).call(A,t,e,r);var a=s.trace._fullInput||{},c={};if(o.hasTransform(a,\"groupby\")){var u=o.getTransformIndices(a,\"groupby\"),f=u[u.length-1],h=i.keyedContainer(a,\"transforms[\"+f+\"].styles\",\"target\",\"value.name\");h.set(s.trace._group,n),c=h.constructUpdate()}else c.name=n;return o.call(\"_guiRestyle\",e,c,l.index)})):A(g,t,e,r)}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 k(t,e){var r,a=e._context.doubleClickDelay,o=1,s=i.ensureSingle(t,\"rect\",\"legendtoggle\",(function(t){e._context.staticPlot||t.style(\"cursor\",\"pointer\").attr(\"pointer-events\",\"all\"),t.call(u.fill,\"rgba(0,0,0,0)\")}));e._context.staticPlot||(s.on(\"mousedown\",(function(){(r=(new Date).getTime())-e._legendMouseDownTimea&&(o=Math.max(o-1,1)),_(e,r,t,o,n.event)}})))}function A(t,e,r,n,i){n._inHover&&t.attr(\"data-notex\",!0),f.convertToTspans(t,r,(function(){!function(t,e,r,n){var i=t.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend)return void t.remove();var a=t.select(\"g[class*=math-group]\"),o=a.node();r||(r=e._fullLayout.legend);var s,l=r.borderwidth;s=1===n?r.title.font:i.groupTitle?i.groupTitle.font:r.font;var u,h,d=s.size*g;if(o){var m=c.bBox(o);u=m.height,h=m.width,1===n?c.setTranslate(a,l,l+.75*u):c.setTranslate(a,0,.25*u)}else{var v=t.select(1===n?\".legendtitletext\":\".legendtext\"),y=f.lineCount(v),x=v.node();if(u=d*y,h=x?c.bBox(x).width:0,1===n)\"left\"===r.title.side&&(h+=2*p.itemGap),f.positionText(v,l+p.titlePad,l+d);else{var b=2*p.itemGap+r.itemwidth;i.groupTitle&&(b=p.itemGap,h-=r.itemwidth),f.positionText(v,b,-d*((y-1)/2-.3))}}1===n?(r._titleWidth=h,r._titleHeight=u):(i.lineHeight=d,i.height=Math.max(u,16)+3,i.width=h)}(e,r,n,i)}))}function M(t){return i.isRightAnchor(t)?\"right\":i.isCenterAnchor(t)?\"center\":\"left\"}function S(t){return i.isBottomAnchor(t)?\"bottom\":i.isMiddleAnchor(t)?\"middle\":\"top\"}e.exports=function(t,e){return e||(e=t._fullLayout.legend||{}),function(t,e){var r,s,f=t._fullLayout,h=\"legend\"+f._uid,d=e._inHover;d?(r=e.layer,h+=\"-hover\"):r=f._infolayer;if(!r)return;t._legendMouseDownTime||(t._legendMouseDownTime=0);if(d){if(!e.entries)return;s=y(e.entries,e)}else{if(!t.calcdata)return;s=f.showlegend&&y(t.calcdata,e)}var g=f.hiddenlabels||[];if(!(d||f.showlegend&&s.length))return r.selectAll(\".legend\").remove(),f._topdefs.select(\"#\"+h).remove(),a.autoMargin(t,\"legend\");var T=i.ensureSingle(r,\"g\",\"legend\",(function(t){d||t.attr(\"pointer-events\",\"all\")})),E=i.ensureSingleById(f._topdefs,\"clipPath\",h,(function(t){t.append(\"rect\")})),L=i.ensureSingle(T,\"rect\",\"bg\",(function(t){t.attr(\"shape-rendering\",\"crispEdges\")}));L.call(u.stroke,e.bordercolor).call(u.fill,e.bgcolor).style(\"stroke-width\",e.borderwidth+\"px\");var C=i.ensureSingle(T,\"g\",\"scrollbox\"),P=e.title;if(e._titleWidth=0,e._titleHeight=0,P.text){var I=i.ensureSingle(C,\"text\",\"legendtitletext\");I.attr(\"text-anchor\",\"start\").call(c.font,P.font).text(P.text),A(I,C,t,e,1)}else C.selectAll(\".legendtitletext\").remove();var O=i.ensureSingle(T,\"rect\",\"scrollbar\",(function(t){t.attr(p.scrollBarEnterAttrs).call(u.fill,p.scrollBarColor)})),z=C.selectAll(\"g.groups\").data(s);z.enter().append(\"g\").attr(\"class\",\"groups\"),z.exit().remove();var D=z.selectAll(\"g.traces\").data(i.identity);D.enter().append(\"g\").attr(\"class\",\"traces\"),D.exit().remove(),D.style(\"opacity\",(function(t){var e=t[0].trace;return o.traceIs(e,\"pie-like\")?-1!==g.indexOf(t[0].label)?.5:1:\"legendonly\"===e.visible?.5:1})).each((function(){n.select(this).call(w,t,e)})).call(x,t,e).each((function(){d||n.select(this).call(k,t)})),i.syncOrAsync([a.previousPromises,function(){return function(t,e,r,i){var a=t._fullLayout;i||(i=a.legend);var o=a._size,s=b.isVertical(i),l=b.isGrouped(i),u=i.borderwidth,f=2*u,h=p.itemGap,d=i.itemwidth+2*h,g=2*(u+h),m=S(i),v=i.y<0||0===i.y&&\"top\"===m,y=i.y>1||1===i.y&&\"bottom\"===m,x=i.tracegroupgap;i._maxHeight=Math.max(v||y?a.height/2:o.h,30);var _=0;i._width=0,i._height=0;var w=function(t){var e=0,r=0,n=t.title.side;n&&(-1!==n.indexOf(\"left\")&&(e=t._titleWidth),-1!==n.indexOf(\"top\")&&(r=t._titleHeight));return[e,r]}(i);if(s)r.each((function(t){var e=t[0].height;c.setTranslate(this,u+w[0],u+w[1]+i._height+e/2+h),i._height+=e,i._width=Math.max(i._width,t[0].width)})),_=d+i._width,i._width+=h+d+f,i._height+=g,l&&(e.each((function(t,e){c.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var T=M(i),k=i.x<0||0===i.x&&\"right\"===T,A=i.x>1||1===i.x&&\"left\"===T,E=y||v,L=a.width/2;i._maxWidth=Math.max(k?E&&\"left\"===T?o.l+o.w:L:A?E&&\"right\"===T?o.r+o.w:L:o.w,2*d);var C=0,P=0;r.each((function(t){var e=t[0].width+d;C=Math.max(C,e),P+=e})),_=null;var I=0;if(l){var O=0,z=0,D=0;e.each((function(){var t=0,e=0;n.select(this).selectAll(\"g.traces\").each((function(r){var n=r[0].width,i=r[0].height;c.setTranslate(this,w[0],w[1]+u+h+i/2+e),e+=i,t=Math.max(t,d+n)}));var r=t+h;z>0&&r+u+z>i._maxWidth?(I=Math.max(I,z),z=0,D+=O+x,O=e):O=Math.max(O,e),c.setTranslate(this,z,D),z+=r})),i._width=Math.max(I,z)+u,i._height=D+O+g}else{var R=r.size(),F=P+f+(R-1)*h=i._maxWidth&&(I=Math.max(I,U),N=0,j+=B,i._height+=B,B=0),c.setTranslate(this,w[0]+u+N,w[1]+u+j+e/2+h),U=N+r+h,N+=n,B=Math.max(B,e)})),F?(i._width=N+f,i._height=B+g):(i._width=Math.max(I,U)+f,i._height+=B+g)}}i._width=Math.ceil(Math.max(i._width+w[0],i._titleWidth+2*(u+p.titlePad))),i._height=Math.ceil(Math.max(i._height+w[1],i._titleHeight+2*(u+p.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var V=t._context.edits,H=V.legendText||V.legendPosition;r.each((function(t){var e=n.select(this).select(\".legendtoggle\"),r=t[0].height,i=H?d:_||d+t[0].width;s||(i+=h/2),c.setRect(e,0,-r/2,i,r)}))}(t,z,D,e)},function(){var s,u,g,y,x=f._size,b=e.borderwidth;if(!d){if(function(t){var e=t._fullLayout.legend,r=M(e),n=S(e);return a.autoMargin(t,\"legend\",{x:e.x,y:e.y,l:e._width*m[r],r:e._width*v[r],b:e._effHeight*v[n],t:e._effHeight*m[n]})}(t))return;var w=x.l+x.w*e.x-m[M(e)]*e._width,k=x.t+x.h*(1-e.y)-m[S(e)]*e._effHeight;if(f.margin.autoexpand){var A=w,P=k;w=i.constrain(w,0,f.width-e._width),k=i.constrain(k,0,f.height-e._effHeight),w!==A&&i.log(\"Constrain legend.x to make legend fit inside graph\"),k!==P&&i.log(\"Constrain legend.y to make legend fit inside graph\")}c.setTranslate(T,w,k)}if(O.on(\".drag\",null),T.on(\"wheel\",null),d||e._height<=e._maxHeight||t._context.staticPlot){var I=e._effHeight;d&&(I=e._height),L.attr({width:e._width-b,height:I-b,x:b/2,y:b/2}),c.setTranslate(C,0,0),E.select(\"rect\").attr({width:e._width-2*b,height:I-2*b,x:b,y:b}),c.setClipUrl(C,h,t),c.setRect(O,0,0,0,0),delete e._scrollY}else{var z,D,R,F=Math.max(p.scrollBarMinHeight,e._effHeight*e._effHeight/e._height),B=e._effHeight-F-2*p.scrollBarMargin,N=e._height-e._effHeight,j=B/N,U=Math.min(e._scrollY||0,N);L.attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-b,x:b/2,y:b/2}),E.select(\"rect\").attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-2*b,x:b,y:b+U}),c.setClipUrl(C,h,t),q(U,F,j),T.on(\"wheel\",(function(){q(U=i.constrain(e._scrollY+n.event.deltaY/B*N,0,N),F,j),0!==U&&U!==N&&n.event.preventDefault()}));var V=n.behavior.drag().on(\"dragstart\",(function(){var t=n.event.sourceEvent;z=\"touchstart\"===t.type?t.changedTouches[0].clientY:t.clientY,R=U})).on(\"drag\",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(D=\"touchmove\"===t.type?t.changedTouches[0].clientY:t.clientY,q(U=function(t,e,r){var n=(r-e)/j+t;return i.constrain(n,0,N)}(R,z,D),F,j))}));O.call(V);var H=n.behavior.drag().on(\"dragstart\",(function(){var t=n.event.sourceEvent;\"touchstart\"===t.type&&(z=t.changedTouches[0].clientY,R=U)})).on(\"drag\",(function(){var t=n.event.sourceEvent;\"touchmove\"===t.type&&(D=t.changedTouches[0].clientY,q(U=function(t,e,r){var n=(e-r)/j+t;return i.constrain(n,0,N)}(R,z,D),F,j))}));C.call(H)}function q(r,n,i){e._scrollY=t._fullLayout.legend._scrollY=r,c.setTranslate(C,0,-r),c.setRect(O,e._width,p.scrollBarMargin+r*i,p.scrollBarWidth,n),E.select(\"rect\").attr(\"y\",b+r)}t._context.edits.legendPosition&&(T.classed(\"cursor-move\",!0),l.init({element:T.node(),gd:t,prepFn:function(){var t=c.getTranslate(T);g=t.x,y=t.y},moveFn:function(t,r){var n=g+t,i=y+r;c.setTranslate(T,n,i),s=l.align(n,0,x.l,x.l+x.w,e.xanchor),u=l.align(i,0,x.t+x.h,x.t,e.yanchor)},doneFn:function(){void 0!==s&&void 0!==u&&o.call(\"_guiRelayout\",t,{\"legend.x\":s,\"legend.y\":u})},clickFn:function(e,n){var i=r.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&&_(t,T,i,e,n)}}))}],t)}(t,e)}},{\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/events\":492,\"../../lib/svg_text_utils\":529,\"../../plots/plots\":619,\"../../registry\":638,\"../color\":366,\"../dragelement\":385,\"../drawing\":388,\"./constants\":417,\"./get_legend_data\":420,\"./handle_click\":421,\"./helpers\":422,\"./style\":424,\"@plotly/d3\":58}],420:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"./helpers\");e.exports=function(t,e){var r,a,o=e._inHover,s=i.isGrouped(e),l=i.isReversed(e),c={},u=[],f=!1,h={},p=0,d=0;function g(t,r){if(\"\"!==t&&i.isGrouped(e))-1===u.indexOf(t)?(u.push(t),f=!0,c[t]=[r]):c[t].push(r);else{var n=\"~~i\"+p;u.push(n),c[n]=[r],p++}}for(r=0;rA&&(k=A)}w[r][0]._groupMinRank=k,w[r][0]._preGroupSort=r}var M=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(w.forEach((function(t,e){t[0]._preGroupSort=e})),w.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),r=0;rr?r:t}e.exports=function(t,e,r){var v=e._fullLayout;r||(r=v.legend);var y=\"constant\"===r.itemsizing,x=r.itemwidth,b=(x+2*p.itemGap)/2,_=o(b,0),w=function(t,e,r,n){var i;if(t+1)i=t;else{if(!(e&&e.width>0))return 0;i=e.width}return y?n:Math.min(i,r)};function T(t,a,o){var u=t[0].trace,f=u.marker||{},h=f.line||{},p=o?u.visible&&u.type===o:i.traceIs(u,\"bar\"),d=n.select(a).select(\"g.legendpoints\").selectAll(\"path.legend\"+o).data(p?[t]:[]);d.enter().append(\"path\").classed(\"legend\"+o,!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),d.exit().remove(),d.each((function(t){var i=n.select(this),a=t[0],o=w(a.mlw,f.line,5,2);i.style(\"stroke-width\",o+\"px\");var p=a.mcc;if(!r._inHover&&\"mc\"in a){var d=c(f),g=d.mid;void 0===g&&(g=(d.max+d.min)/2),p=s.tryColorscale(f,\"\")(g)}var v=p||a.mc||f.color,y=f.pattern,x=y&&s.getPatternAttr(y.shape,0,\"\");if(x){var b=s.getPatternAttr(y.bgcolor,0,null),_=s.getPatternAttr(y.fgcolor,0,null),T=y.fgopacity,k=m(y.size,8,10),A=m(y.solidity,.5,1),M=\"legend-\"+u.uid;i.call(s.pattern,\"legend\",e,M,x,k,A,p,y.fillmode,b,_,T)}else i.call(l.fill,v);o&&l.stroke(i,a.mlc||h.color)}))}function k(t,e,r){var o=t[0],s=o.trace,l=r?s.visible&&s.type===r:i.traceIs(s,r),c=n.select(e).select(\"g.legendpoints\").selectAll(\"path.legend\"+r).data(l?[t]:[]);if(c.enter().append(\"path\").classed(\"legend\"+r,!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),c.exit().remove(),c.size()){var u=(s.marker||{}).line,p=w(h(u.width,o.pts),u,5,2),d=a.minExtend(s,{marker:{line:{width:p}}});d.marker.line.color=u.color;var g=a.minExtend(o,{trace:d});f(c,g,d)}}t.each((function(t){var e=n.select(this),i=a.ensureSingle(e,\"g\",\"layers\");i.style(\"opacity\",t[0].trace.opacity);var s=r.valign,l=t[0].lineHeight,c=t[0].height;if(\"middle\"!==s&&l&&c){var u={top:1,bottom:-1}[s]*(.5*(l-c+3));i.attr(\"transform\",o(0,u))}else i.attr(\"transform\",null);i.selectAll(\"g.legendfill\").data([t]).enter().append(\"g\").classed(\"legendfill\",!0),i.selectAll(\"g.legendlines\").data([t]).enter().append(\"g\").classed(\"legendlines\",!0);var f=i.selectAll(\"g.legendsymbols\").data([t]);f.enter().append(\"g\").classed(\"legendsymbols\",!0),f.selectAll(\"g.legendpoints\").data([t]).enter().append(\"g\").classed(\"legendpoints\",!0)})).each((function(t){var r,i=t[0].trace,o=[];if(i.visible)switch(i.type){case\"histogram2d\":case\"heatmap\":o=[[\"M-15,-2V4H15V-2Z\"]],r=!0;break;case\"choropleth\":case\"choroplethmapbox\":o=[[\"M-6,-6V6H6V-6Z\"]],r=!0;break;case\"densitymapbox\":o=[[\"M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0\"]],r=\"radial\";break;case\"cone\":o=[[\"M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z\"],[\"M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z\"],[\"M-6,-2 A2,2 0 0,0 -6,2 L6,0Z\"]],r=!1;break;case\"streamtube\":o=[[\"M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z\"],[\"M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z\"],[\"M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z\"]],r=!1;break;case\"surface\":o=[[\"M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z\"],[\"M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z\"]],r=!0;break;case\"mesh3d\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6H6L0,6Z\"]],r=!1;break;case\"volume\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6H6L0,6Z\"]],r=!0;break;case\"isosurface\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6 A12,24 0 0,0 6,-6 L0,6Z\"]],r=!1}var u=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legend3dandfriends\").data(o);u.enter().append(\"path\").classed(\"legend3dandfriends\",!0).attr(\"transform\",_).style(\"stroke-miterlimit\",1),u.exit().remove(),u.each((function(t,o){var u,f=n.select(this),h=c(i),p=h.colorscale,g=h.reversescale;if(p){if(!r){var m=p.length;u=0===o?p[g?m-1:0][1]:1===o?p[g?0:m-1][1]:p[Math.floor((m-1)/2)][1]}}else{var v=i.vertexcolor||i.facecolor||i.color;u=a.isArrayOrTypedArray(v)?v[o]||v[0]:v}f.attr(\"d\",t[0]),u?f.call(l.fill,u):f.call((function(t){if(t.size()){var n=\"legendfill-\"+i.uid;s.gradient(t,e,n,d(g,\"radial\"===r),p,\"fill\")}}))}))})).each((function(t){var e=t[0].trace,r=\"waterfall\"===e.type;if(t[0]._distinct&&r){var i=t[0].trace[t[0].dir].marker;return t[0].mc=i.color,t[0].mlw=i.line.width,t[0].mlc=i.line.color,T(t,this,\"waterfall\")}var a=[];e.visible&&r&&(a=t[0].hasTotals?[[\"increasing\",\"M-6,-6V6H0Z\"],[\"totals\",\"M6,6H0L-6,-6H-0Z\"],[\"decreasing\",\"M6,6V-6H0Z\"]]:[[\"increasing\",\"M-6,-6V6H6Z\"],[\"decreasing\",\"M6,6V-6H-6Z\"]]);var o=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendwaterfall\").data(a);o.enter().append(\"path\").classed(\"legendwaterfall\",!0).attr(\"transform\",_).style(\"stroke-miterlimit\",1),o.exit().remove(),o.each((function(t){var r=n.select(this),i=e[t[0]].marker,a=w(void 0,i.line,5,2);r.attr(\"d\",t[1]).style(\"stroke-width\",a+\"px\").call(l.fill,i.color),a&&r.call(l.stroke,i.line.color)}))})).each((function(t){T(t,this,\"funnel\")})).each((function(t){T(t,this)})).each((function(t){var r=t[0].trace,o=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendbox\").data(r.visible&&i.traceIs(r,\"box-violin\")?[t]:[]);o.enter().append(\"path\").classed(\"legendbox\",!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),o.exit().remove(),o.each((function(){var t=n.select(this);if(\"all\"!==r.boxpoints&&\"all\"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=w(void 0,r.line,5,2);t.style(\"stroke-width\",i+\"px\").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var c=a.minExtend(r,{marker:{size:y?12:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:\"diameter\"}});o.call(s.pointStyle,c,e)}}))})).each((function(t){k(t,this,\"funnelarea\")})).each((function(t){k(t,this,\"pie\")})).each((function(t){var r,i,o=g(t),l=o.showFill,f=o.showLine,h=o.showGradientLine,p=o.showGradientFill,m=o.anyFill,v=o.anyLine,y=t[0],b=y.trace,_=c(b),T=_.colorscale,k=_.reversescale,A=u.hasMarkers(b)||!m?\"M5,0\":v?\"M5,-2\":\"M5,-3\",M=n.select(this),S=M.select(\".legendfill\").selectAll(\"path\").data(l||p?[t]:[]);if(S.enter().append(\"path\").classed(\"js-fill\",!0),S.exit().remove(),S.attr(\"d\",A+\"h\"+x+\"v6h-\"+x+\"z\").call(l?s.fillGroupStyle:function(t){if(t.size()){var r=\"legendfill-\"+b.uid;s.gradient(t,e,r,d(k),T,\"fill\")}}),f||h){var E=w(void 0,b.line,10,5);i=a.minExtend(b,{line:{width:E}}),r=[a.minExtend(y,{trace:i})]}var L=M.select(\".legendlines\").selectAll(\"path\").data(f||h?[r]:[]);L.enter().append(\"path\").classed(\"js-line\",!0),L.exit().remove(),L.attr(\"d\",A+(h?\"l\"+x+\",0.0001\":\"h\"+x)).call(f?s.lineGroupStyle:function(t){if(t.size()){var r=\"legendline-\"+b.uid;s.lineGroupStyle(t),s.gradient(t,e,r,d(k),T,\"stroke\")}})})).each((function(t){var r,i,o=g(t),l=o.anyFill,c=o.anyLine,f=o.showLine,h=o.showMarker,p=t[0],d=p.trace,m=!h&&!c&&!l&&u.hasText(d);function v(t,e,r,n){var i=a.nestedProperty(d,t).get(),o=a.isArrayOrTypedArray(i)&&e?e(i):i;if(y&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function x(t){return p._distinct&&p.index&&t[p.index]?t[p.index]:t[0]}if(h||m||f){var b={},w={};if(h){b.mc=v(\"marker.color\",x),b.mx=v(\"marker.symbol\",x),b.mo=v(\"marker.opacity\",a.mean,[.2,1]),b.mlc=v(\"marker.line.color\",x),b.mlw=v(\"marker.line.width\",a.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:\"diameter\"};var T=v(\"marker.size\",a.mean,[2,16],12);b.ms=T,w.marker.size=T}f&&(w.line={width:v(\"line.width\",x,[0,10],5)}),m&&(b.tx=\"Aa\",b.tp=v(\"textposition\",x),b.ts=10,b.tc=v(\"textfont.color\",x),b.tf=v(\"textfont.family\",x)),r=[a.minExtend(p,b)],(i=a.minExtend(d,w)).selectedpoints=null,i.texttemplate=null}var k=n.select(this).select(\"g.legendpoints\"),A=k.selectAll(\"path.scatterpts\").data(h?r:[]);A.enter().insert(\"path\",\":first-child\").classed(\"scatterpts\",!0).attr(\"transform\",_),A.exit().remove(),A.call(s.pointStyle,i,e),h&&(r[0].mrc=3);var M=k.selectAll(\"g.pointtext\").data(m?r:[]);M.enter().append(\"g\").classed(\"pointtext\",!0).append(\"text\").attr(\"transform\",_),M.exit().remove(),M.selectAll(\"text\").call(s.textPointStyle,i,e)})).each((function(t){var e=t[0].trace,r=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendcandle\").data(e.visible&&\"candlestick\"===e.type?[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\",_).style(\"stroke-miterlimit\",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?\"increasing\":\"decreasing\"],o=w(void 0,a.line,5,2);i.style(\"stroke-width\",o+\"px\").call(l.fill,a.fillcolor),o&&l.stroke(i,a.line.color)}))})).each((function(t){var e=t[0].trace,r=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendohlc\").data(e.visible&&\"ohlc\"===e.type?[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\",_).style(\"stroke-miterlimit\",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?\"increasing\":\"decreasing\"],o=w(void 0,a.line,5,2);i.style(\"fill\",\"none\").call(s.dashLine,a.line.dash,o),o&&l.stroke(i,a.line.color)}))}))}},{\"../../lib\":503,\"../../registry\":638,\"../../traces/pie/helpers\":905,\"../../traces/pie/style_one\":911,\"../../traces/scatter/subtypes\":951,\"../color\":366,\"../colorscale/helpers\":377,\"../drawing\":388,\"./constants\":417,\"@plotly/d3\":58}],425:[function(t,e,r){\"use strict\";t(\"./constants\");e.exports={editType:\"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\"},uirevision:{valType:\"any\",editType:\"none\"},add:{valType:\"string\",arrayOk:!0,dflt:\"\",editType:\"modebar\"},remove:{valType:\"string\",arrayOk:!0,dflt:\"\",editType:\"modebar\"}}},{\"./constants\":427}],426:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../plots/plots\"),a=t(\"../../plots/cartesian/axis_ids\"),o=t(\"../../fonts/ploticon\"),s=t(\"../shapes/draw\").eraseActiveShape,l=t(\"../../lib\"),c=l._,u=e.exports={};function f(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=c._cartesianSpikesEnabled;if(\"zoom\"===s){var p,d=\"in\"===l?.5:2,g=(1+d)/2,m=(1-d)/2;for(i=0;i1?(I=[\"toggleHover\"],O=[\"resetViews\"]):v?(P=[\"zoomInGeo\",\"zoomOutGeo\"],I=[\"hoverClosestGeo\"],O=[\"resetGeo\"]):m?(I=[\"hoverClosest3d\"],O=[\"resetCameraDefault3d\",\"resetCameraLastSave3d\"]):w?(P=[\"zoomInMapbox\",\"zoomOutMapbox\"],I=[\"toggleHover\"],O=[\"resetViewMapbox\"]):b?I=[\"hoverClosestGl2d\"]:y?I=[\"hoverClosestPie\"]:A?(I=[\"hoverClosestCartesian\",\"hoverCompareCartesian\"],O=[\"resetViewSankey\"]):I=[\"toggleHover\"];g&&(I=[\"toggleSpikelines\",\"hoverClosestCartesian\",\"hoverCompareCartesian\"]);(function(t){for(var e=0;e0)){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.max)e=F[r+1];else if(t=n.pmax)e=F[r+1];else if(t0?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||\"multicategory\"===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;lp&&(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;oy?(k=f,E=\"y0\",A=y,L=\"y1\"):(k=y,E=\"y1\",A=f,L=\"y0\");Z(n),Q(s,r),function(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),s=a.getFromId(r,i),l=\"\";\"paper\"===n||o.autorange||(l+=n);\"paper\"===i||s.autorange||(l+=i);u.setClipUrl(t,l?\"clip\"+r._fullLayout._uid+l:null,r)}(e,r,t),X.moveFn=\"move\"===O?J:K,X.altKey=n.altKey},doneFn:function(){if(v(t))return;p(e),$(s),b(e,t,r),n.call(\"_guiRelayout\",t,l.getUpdateObj())},clickFn:function(){if(v(t))return;$(s)}};function Z(r){if(v(t))O=null;else if(R)O=\"path\"===r.target.tagName?\"move\":\"start-point\"===r.target.attributes[\"data-line-point\"].value?\"resize-over-start-point\":\"resize-over-end-point\";else{var n=X.element.getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top,o=r.clientX-n.left,s=r.clientY-n.top,l=!F&&i>10&&a>10&&!r.shiftKey?h.getCursor(o/i,1-s/a):\"move\";p(e,l),O=l.split(\"-\")[0]}}function J(n,i){if(\"path\"===r.type){var a=function(t){return t},o=a,l=a;z?B(\"xanchor\",r.xanchor=G(x+n)):(o=function(t){return G(H(t)+n)},N&&\"date\"===N.type&&(o=g.encodeDate(o))),D?B(\"yanchor\",r.yanchor=Y(T+i)):(l=function(t){return Y(q(t)+i)},U&&\"date\"===U.type&&(l=g.encodeDate(l))),B(\"path\",r.path=w(I,o,l))}else z?B(\"xanchor\",r.xanchor=G(x+n)):(B(\"x0\",r.x0=G(c+n)),B(\"x1\",r.x1=G(m+n))),D?B(\"yanchor\",r.yanchor=Y(T+i)):(B(\"y0\",r.y0=Y(f+i)),B(\"y1\",r.y1=Y(y+i)));e.attr(\"d\",_(t,r)),Q(s,r)}function K(n,i){if(F){var a=function(t){return t},o=a,l=a;z?B(\"xanchor\",r.xanchor=G(x+n)):(o=function(t){return G(H(t)+n)},N&&\"date\"===N.type&&(o=g.encodeDate(o))),D?B(\"yanchor\",r.yanchor=Y(T+i)):(l=function(t){return Y(q(t)+i)},U&&\"date\"===U.type&&(l=g.encodeDate(l))),B(\"path\",r.path=w(I,o,l))}else if(R){if(\"resize-over-start-point\"===O){var u=c+n,h=D?f-i:f+i;B(\"x0\",r.x0=z?u:G(u)),B(\"y0\",r.y0=D?h:Y(h))}else if(\"resize-over-end-point\"===O){var p=m+n,d=D?y-i:y+i;B(\"x1\",r.x1=z?p:G(p)),B(\"y1\",r.y1=D?d:Y(d))}}else{var v=function(t){return-1!==O.indexOf(t)},b=v(\"n\"),j=v(\"s\"),V=v(\"w\"),W=v(\"e\"),X=b?k+i:k,Z=j?A+i:A,J=V?M+n:M,K=W?S+n:S;D&&(b&&(X=k-i),j&&(Z=A-i)),(!D&&Z-X>10||D&&X-Z>10)&&(B(E,r[E]=D?X:Y(X)),B(L,r[L]=D?Z:Y(Z))),K-J>10&&(B(C,r[C]=z?J:G(J)),B(P,r[P]=z?K:G(K)))}e.attr(\"d\",_(t,r)),Q(s,r)}function Q(t,e){(z||D)&&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=H(z?e.xanchor:i.midRange(r?[e.x0,e.x1]:g.extractPathCoords(e.path,d.paramIsX))),o=q(D?e.yanchor:i.midRange(r?[e.y0,e.y1]:g.extractPathCoords(e.path,d.paramIsY)));if(a=g.roundPositionForSharpStrokeRendering(a,1),o=g.roundPositionForSharpStrokeRendering(o,1),z&&D){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(z){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 $(t){t.selectAll(\".visual-cue\").remove()}h.init(X),W.node().onmousemove=Z}(t,z,l,e,r,O):!0===l.editable&&z.style(\"pointer-events\",P||c.opacity(S)*M<=.5?\"stroke\":\"all\");z.node().addEventListener(\"click\",(function(){return function(t,e){if(!y(t))return;var r=+e.node().getAttribute(\"data-index\");if(r>=0){if(r===t._fullLayout._activeShapeIndex)return void T(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=T,m(t)}}(t,z)}))}}function b(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,\"\").replace(/[xyz][1-9]* *domain/g,\"\");u.setClipUrl(t,n?\"clip\"+e._fullLayout._uid+n:null,e)}function _(t,e){var r,n,o,s,l,c,u,f,h=e.type,p=a.getRefType(e.xref),m=a.getRefType(e.yref),v=a.getFromId(t,e.xref),y=a.getFromId(t,e.yref),x=t._fullLayout._size;if(v?\"domain\"===p?n=function(t){return v._offset+v._length*t}:(r=g.shapePositionToRange(v),n=function(t){return v._offset+v.r2p(r(t,!0))}):n=function(t){return x.l+x.w*t},y?\"domain\"===m?s=function(t){return y._offset+y._length*(1-t)}:(o=g.shapePositionToRange(y),s=function(t){return y._offset+y.r2p(o(t,!0))}):s=function(t){return x.t+x.h*(1-t)},\"path\"===h)return v&&\"date\"===v.type&&(n=g.decodeDate(n)),y&&\"date\"===y.type&&(s=g.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(d.segmentRE,(function(t){var n=0,c=t.charAt(0),u=d.paramIsX[c],f=d.paramIsY[c],h=d.numParams[c],p=t.substr(1).replace(d.paramRE,(function(t){return u[n]?t=\"pixel\"===a?e(s)+Number(t):e(t):f[n]&&(t=\"pixel\"===o?r(l)-Number(t):r(t)),++n>h&&(t=\"X\"),t}));return n>h&&(p=p.replace(/[\\s,]*X.*/,\"\"),i.log(\"Ignoring extra params in segment \"+t)),c+p}))}(e,n,s);if(\"pixel\"===e.xsizemode){var b=n(e.xanchor);l=b+e.x0,c=b+e.x1}else l=n(e.x0),c=n(e.x1);if(\"pixel\"===e.ysizemode){var _=s(e.yanchor);u=_-e.y0,f=_-e.y1}else u=s(e.y0),f=s(e.y1);if(\"line\"===h)return\"M\"+l+\",\"+u+\"L\"+c+\",\"+f;if(\"rect\"===h)return\"M\"+l+\",\"+u+\"H\"+c+\"V\"+f+\"H\"+l+\"Z\";var w=(l+c)/2,T=(u+f)/2,k=Math.abs(w-l),A=Math.abs(T-u),M=\"A\"+k+\",\"+A,S=w+k+\",\"+T;return\"M\"+S+M+\" 0 1,1 \"+(w+\",\"+(T-A))+M+\" 0 0,1 \"+S+\"Z\"}function w(t,e,r){return t.replace(d.segmentRE,(function(t){var n=0,i=t.charAt(0),a=d.paramIsX[i],o=d.paramIsY[i],s=d.numParams[i];return i+t.substr(1).replace(d.paramRE,(function(t){return n>=s||(a[n]?t=e(t):o[n]&&(t=r(t)),n++),t}))}))}function T(t){y(t)&&(t._fullLayout._activeShapeIndex>=0&&(l(t),delete t._fullLayout._activeShapeIndex,m(t)))}e.exports={draw:m,drawOne:x,eraseActiveShape:function(t){if(!y(t))return;l(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e=0&&f(v),r.attr(\"d\",g(e)),A&&!h)&&(k=function(t,e){for(var r=0;r1&&(2!==t.length||\"Z\"!==t[1][0])&&(0===T&&(t[0][0]=\"M\"),e[w]=t,y(),x())}}()}}function I(t,r){!function(t,r){if(e.length)for(var n=0;n0&&l0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr(\"transform\",l(o-.5*f.gripWidth,e._dims.currentValueTotalHeight))}}function E(t,e){var r=t._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,e))}function L(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 C(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 P(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;i0?[0]:[]);function s(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,m(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,v);l.enter().append(\"g\").classed(f.groupClassName,!0),l.exit().each(s).remove();for(var c=0;c0||h<0){var v={left:[-d,0],right:[d,0],top:[0,-d],bottom:[0,d]}[b.side];e.attr(\"transform\",l(v[0],v[1]))}}}return R.call(F),O&&(E?R.on(\".opacity\",null):(A=0,M=!0,R.text(y).on(\"mouseover.opacity\",(function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style(\"opacity\",1)})).on(\"mouseout.opacity\",(function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style(\"opacity\",0)}))),R.call(f.makeEditable,{gd:t}).on(\"edit\",(function(e){void 0!==x?o.call(\"_guiRestyle\",t,v,e,x):o.call(\"_guiRelayout\",t,v,e)})).on(\"cancel\",(function(){this.text(this.attr(\"data-unformatted\")).call(F)})).on(\"input\",(function(t){this.text(t||\" \").call(f.positionText,_.x,_.y)}))),R.classed(\"js-placeholder\",M),T}}},{\"../../constants/alignment\":471,\"../../constants/interactions\":478,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/plots\":619,\"../../registry\":638,\"../color\":366,\"../drawing\":388,\"@plotly/d3\":58,\"fast-isnumeric\":190}],465:[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\"}]},args2:{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({editType:\"arraydraw\"}),{}),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\":493,\"../../plot_api/edit_types\":536,\"../../plot_api/plot_template\":543,\"../../plots/font_attributes\":585,\"../../plots/pad_attributes\":618,\"../color/attributes\":365}],466:[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\"}}},{}],467:[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(\"args2\"),r(\"label\"),r(\"execute\"))}e.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},{\"../../lib\":503,\"../../plots/array_container_defaults\":549,\"./attributes\":465,\"./constants\":466}],468:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../plots/plots\"),a=t(\"../color\"),o=t(\"../drawing\"),s=t(\"../../lib\"),l=t(\"../../lib/svg_text_utils\"),c=t(\"../../plot_api/plot_template\").arrayEditor,u=t(\"../../constants/alignment\").LINE_SPACING,f=t(\"./constants\"),h=t(\"./scrollbox\");function p(t){return t._index}function d(t,e){return+t.attr(f.menuIndexAttrName)===e._index}function g(t,e,r,n,i,a,o,s){e.active=o,c(t.layout,f.name,e).applyUpdate(\"active\",o),\"buttons\"===e.type?v(t,n,null,null,e):\"dropdown\"===e.type&&(i.attr(f.menuIndexAttrName,\"-1\"),m(t,n,i,a,e),s||v(t,n,i,a,e))}function m(t,e,r,n,i){var a=s.ensureSingle(e,\"g\",f.headerClassName,(function(t){t.style(\"pointer-events\",\"all\")})),l=i._dims,c=i.active,u=i.buttons[c]||f.blankHeaderOpts,h={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};a.call(y,i,u,t).call(M,i,h,p),s.ensureSingle(e,\"text\",f.headerArrowClassName,(function(t){t.attr(\"text-anchor\",\"end\").call(o.font,i.font).text(f.arrowSymbol[i.direction])})).attr({x:l.headerWidth-f.arrowOffsetX+i.pad.l,y:l.headerHeight/2+f.textOffsetY+i.pad.t}),a.on(\"click\",(function(){r.call(S,String(d(r,i)?-1:i._index)),v(t,e,r,n,i)})),a.on(\"mouseover\",(function(){a.call(w)})),a.on(\"mouseout\",(function(){a.call(T,i)})),o.setTranslate(e,l.lx,l.ly)}function v(t,e,r,a,o){r||(r=e).attr(\"pointer-events\",\"all\");var l=function(t){return-1==+t.attr(f.menuIndexAttrName)}(r)&&\"buttons\"!==o.type?[]:o.buttons,c=\"dropdown\"===o.type?f.dropdownButtonClassName:f.buttonClassName,u=r.selectAll(\"g.\"+c).data(s.filterVisible(l)),h=u.enter().append(\"g\").classed(c,!0),p=u.exit();\"dropdown\"===o.type?(h.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\"),p.transition().attr(\"opacity\",\"0\").remove()):p.remove();var d=0,m=0,v=o._dims,x=-1!==[\"up\",\"down\"].indexOf(o.direction);\"dropdown\"===o.type&&(x?m=v.headerHeight+f.gapButtonHeader:d=v.headerWidth+f.gapButtonHeader),\"dropdown\"===o.type&&\"up\"===o.direction&&(m=-f.gapButtonHeader+f.gapButton-v.openHeight),\"dropdown\"===o.type&&\"left\"===o.direction&&(d=-f.gapButtonHeader+f.gapButton-v.openWidth);var b={x:v.lx+d+o.pad.l,y:v.ly+m+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},k={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each((function(s,l){var c=n.select(this);c.call(y,o,s,t).call(M,o,b),c.on(\"click\",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(g(t,o,0,e,r,a,-1),i.executeAPICommand(t,s.method,s.args2)):(g(t,o,0,e,r,a,l),i.executeAPICommand(t,s.method,s.args))),t.emit(\"plotly_buttonclicked\",{menu:o,button:s,active:o.active}))})),c.on(\"mouseover\",(function(){c.call(w)})),c.on(\"mouseout\",(function(){c.call(T,o),u.call(_,o)}))})),u.call(_,o),x?(k.w=Math.max(v.openWidth,v.headerWidth),k.h=b.y-k.t):(k.w=b.x-k.l,k.h=Math.max(v.openHeight,v.headerHeight)),k.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,h=i._dims,p=i.active;if(u)for(s=0,l=0;l0?[0]:[]);if(o.enter().append(\"g\").classed(f.containerClassName,!0).style(\"cursor\",\"pointer\"),o.exit().each((function(){n.select(this).selectAll(\"g.\"+f.headerGroupClassName).each(a)})).remove(),0!==r.length){var l=o.selectAll(\"g.\"+f.headerGroupClassName).data(r,p);l.enter().append(\"g\").classed(f.headerGroupClassName,!0);for(var c=s.ensureSingle(o,\"g\",f.dropdownButtonGroupClassName,(function(t){t.style(\"pointer-events\",\"all\")})),u=0;uw,A=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,S=d,E=m+v;E+M>c&&(E=c-M);var L=this.container.selectAll(\"rect.scrollbar-horizontal\").data(k?[0]:[]);L.exit().on(\".drag\",null).remove(),L.enter().append(\"rect\").classed(\"scrollbar-horizontal\",!0).call(i.fill,s.barColor),k?(this.hbar=L.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:E,width:A,height:M}),this._hbarXMin=S+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=v>T,P=s.barWidth+2*s.barPad,I=s.barLength+2*s.barPad,O=d+g,z=m;O+P>l&&(O=l-P);var D=this.container.selectAll(\"rect.scrollbar-vertical\").data(C?[0]:[]);D.exit().on(\".drag\",null).remove(),D.enter().append(\"rect\").classed(\"scrollbar-vertical\",!0).call(i.fill,s.barColor),C?(this.vbar=D.attr({rx:s.barRadius,ry:s.barRadius,x:O,y:z,width:P,height:I}),this._vbarYMin=z+I/2,this._vbarTranslateMax=T-I):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,B=C?f+P+.5:f+.5,N=h-.5,j=k?p+M+.5:p+.5,U=o._topdefs.selectAll(\"#\"+R).data(k||C?[0]:[]);if(U.exit().remove(),U.enter().append(\"clipPath\").attr(\"id\",R).append(\"rect\"),k||C?(this._clipRect=U.select(\"rect\").attr({x:Math.floor(F),y:Math.floor(N),width:Math.ceil(B)-Math.floor(F),height:Math.ceil(j)-Math.floor(N)}),this.container.call(a.setClipUrl,R,this.gd),this.bg.attr({x:d,y:m,width:g,height:v})):(this.bg.attr({width:0,height:0}),this.container.on(\"wheel\",null).on(\".drag\",null).call(a.setClipUrl,null),delete this._clipRect),k||C){var V=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(V);var H=n.behavior.drag().on(\"dragstart\",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on(\"drag\",this._onBarDrag.bind(this));k&&this.hbar.on(\".drag\",null).call(H),C&&this.vbar.on(\".drag\",null).call(H)}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\":503,\"../color\":366,\"../drawing\":388,\"@plotly/d3\":58}],471:[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,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:\"right\",right:\"left\",top:\"bottom\",bottom:\"top\"}}},{}],472:[function(t,e,r){\"use strict\";e.exports={axisRefDescription:function(t,e,r){return[\"If set to a\",t,\"axis id (e.g. *\"+t+\"* or\",\"*\"+t+\"2*), the `\"+t+\"` position refers to a\",t,\"coordinate. If set to *paper*, the `\"+t+\"`\",\"position refers to the distance from the\",e,\"of the plotting\",\"area in normalized coordinates where *0* (*1*) corresponds to the\",e,\"(\"+r+\"). If set to a\",t,\"axis ID followed by\",\"*domain* (separated by a space), the position behaves like for\",\"*paper*, but refers to the distance in fractions of the domain\",\"length from the\",e,\"of the domain of that axis: e.g.,\",\"*\"+t+\"2 domain* refers to the domain of the second\",t,\" axis and a\",t,\"position of 0.5 refers to the\",\"point between the\",e,\"and the\",r,\"of the domain of the\",\"second\",t,\"axis.\"].join(\" \")}}},{}],473:[function(t,e,r){\"use strict\";e.exports={INCREASING:{COLOR:\"#3D9970\",SYMBOL:\"\\u25b2\"},DECREASING:{COLOR:\"#FF4136\",SYMBOL:\"\\u25bc\"}}},{}],474:[function(t,e,r){\"use strict\";e.exports={FORMAT_LINK:\"https://github.com/d3/d3-format/tree/v1.4.5#d3-format\",DATE_FORMAT_LINK:\"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format\"}},{}],475:[function(t,e,r){\"use strict\";e.exports={COMPARISON_OPS:[\"=\",\"!=\",\"<\",\">=\",\">\",\"<=\"],COMPARISON_OPS2:[\"=\",\"<\",\">=\",\">\",\"<=\"],INTERVAL_OPS:[\"[]\",\"()\",\"[)\",\"(]\",\"][\",\")(\",\"](\",\")[\"],SET_OPS:[\"{}\",\"}{\"],CONSTRAINT_REDUCTION:{\"=\":\"=\",\"<\":\"<\",\"<=\":\"<\",\">\":\">\",\">=\":\">\",\"[]\":\"[]\",\"()\":\"[]\",\"[)\":\"[]\",\"(]\":\"[]\",\"][\":\"][\",\")(\":\"][\",\"](\":\"][\",\")[\":\"][\"}}},{}],476:[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]}},{}],477:[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\"}},{}],478:[function(t,e,r){\"use strict\";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],479:[function(t,e,r){\"use strict\";e.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:\"\\u2212\"}},{}],480:[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}},{}],481:[function(t,e,r){\"use strict\";r.version=t(\"./version\").version,t(\"native-promise-only\"),t(\"../build/plotcss\");for(var n=t(\"./registry\"),i=r.register=n.register,a=t(\"./plot_api\"),o=Object.keys(a),s=0;splotly-logomark\"}}},{}],483:[function(t,e,r){\"use strict\";r.isLeftAnchor=function(t){return\"left\"===t.xanchor||\"auto\"===t.xanchor&&t.x<=1/3},r.isCenterAnchor=function(t){return\"center\"===t.xanchor||\"auto\"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isRightAnchor=function(t){return\"right\"===t.xanchor||\"auto\"===t.xanchor&&t.x>=2/3},r.isTopAnchor=function(t){return\"top\"===t.yanchor||\"auto\"===t.yanchor&&t.y>=2/3},r.isMiddleAnchor=function(t){return\"middle\"===t.yanchor||\"auto\"===t.yanchor&&t.y>1/3&&t.y<2/3},r.isBottomAnchor=function(t){return\"bottom\"===t.yanchor||\"auto\"===t.yanchor&&t.y<=1/3}},{}],484:[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-14}function c(t,e){return a(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0](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 m(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}g?(u=0,f=o,h=s):r=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\":510}],485:[function(t,e,r){\"use strict\";var n=Array.isArray,i=ArrayBuffer,a=DataView;function o(t){return i.isView(t)&&!(t instanceof a)}function s(t){return n(t)||o(t)}function l(t,e,r){if(s(t)){if(s(t[0])){for(var n=r,i=0;ii.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&ti.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.get(t,r))}},angle:{coerceFunction:function(t,e,r){\"auto\"===t?e.set(\"auto\"):n(t)?e.set(f(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||u(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&&!!u(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=n&&t<=i?t:u}if(\"string\"!=typeof t&&\"number\"!=typeof t)return u;t=String(t);var c=_(e),v=t.charAt(0);!c||\"G\"!==v&&\"g\"!==v||(t=t.substr(1),e=\"\");var w=c&&\"chinese\"===e.substr(0,7),T=t.match(w?x:y);if(!T)return u;var k=T[1],A=T[3]||\"1\",M=Number(T[5]||1),S=Number(T[7]||0),E=Number(T[9]||0),L=Number(T[11]||0);if(c){if(2===k.length)return u;var C;k=Number(k);try{var P=m.getComponentMethod(\"calendars\",\"getCal\")(e);if(w){var I=\"i\"===A.charAt(A.length-1);A=parseInt(A,10),C=P.newDate(k,P.toMonthIndex(k,A,I),M)}else C=P.newDate(k,Number(A),M)}catch(t){return u}return C?(C.toJD()-g)*f+S*h+E*p+L*d:u}k=2===k.length?(Number(k)+2e3-b)%100+b:Number(k),A-=1;var O=new Date(Date.UTC(2e3,A,M,S,E));return O.setUTCFullYear(k),O.getUTCMonth()!==A||O.getUTCDate()!==M?u:O.getTime()+L*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 T=90*f,k=3*h,A=5*p;function M(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,E=Math.floor(l(t,f));try{a=m.getComponentMethod(\"calendars\",\"getCal\")(r).fromJD(S).formatDate(\"yyyy-mm-dd\")}catch(t){a=v(\"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=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 M(a(\"%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,E=/%h/g,L={1:\"1\",2:\"1\",3:\"2\",4:\"2\"};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(t=t.replace(E,(function(){return L[r(\"%q\")(i)]})),_(n))try{t=m.getComponentMethod(\"calendars\",\"worldCalFmt\")(t,e,n)}catch(t){return\"Invalid\"}return r(t)(i)}var P=[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),P[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 I=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=m.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+I);return c.setUTCMonth(c.getUTCMonth()+e)+n-I},r.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,c=_(e)&&m.getComponentMethod(\"calendars\",\"getCal\")(e),u=0;u0&&t[e+1][0]<0)return e;return null}switch(e=\"RUS\"===s||\"FJI\"===s?function(t){var e;if(null===c(t))e=t;else for(e=new Array(t.length),i=0;ie?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 a=h.tester(r);a.pts.pop(),l.push(a)}:function(t){l.push(h.tester(t))},a.type){case\"MultiPolygon\":for(r=0;ri&&(i=c,e=l)}else e=r;return o.default(e).geometry.coordinates}(u),n.fIn=t,n.fOut=u,s.push(u)}else c.log([\"Location\",n.loc,\"does not have a valid GeoJSON geometry.\",\"Traces with locationmode *geojson-id* only support\",\"*Polygon* and *MultiPolygon* geometries.\"].join(\" \"))}delete i[r]}switch(r.type){case\"FeatureCollection\":var h=r.features;for(n=0;n100?(clearInterval(a),n(\"Unexpected error while fetching from \"+t)):void i++}),50)}))}for(var o=0;o0&&(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;r1||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,m=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(m)},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.xo?r.x-o:0,f=r.yl?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;f0?p=i:h=i,f++}return a}},{\"./mod\":510}],499:[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(\"./array\").isArrayOrTypedArray,c=a(s);function u(t,e){var r=t;return r[3]*=e,r}function f(t){if(n(t))return c;var e=a(t);return e.length?e:c}function h(t){return n(t)?t:1}e.exports={formatColor:function(t,e,r){var n,i,s,p,d,g=t.color,m=l(g),v=l(e),y=o.extractOpts(t),x=[];if(n=void 0!==y.colorscale?o.makeColorScaleFuncFromTrace(t):f,i=m?function(t,e){return void 0===t[e]?c:a(n(t[e]))}:f,s=v?function(t,e){return void 0===t[e]?1:h(t[e])}:h,m||v)for(var b=0;b1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var a=String(e).length;if(i>=String(t).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf(\"e+\")&&(n=+o)}}return n}},{}],503:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-time-format\").utcFormat,a=t(\"d3-format\").format,o=t(\"fast-isnumeric\"),s=t(\"../constants/numerical\"),l=s.FP_SAFE,c=-l,u=s.BADNUM,f=e.exports={};f.adjustFormat=function(t){return!t||/^\\d[.]\\df/.test(t)||/[.]\\d%/.test(t)?t:\"0.f\"===t?\"~f\":/^\\d%/.test(t)?\"~%\":/^\\ds/.test(t)?\"~s\":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?\"~\"+t:t};var h={};f.warnBadFormat=function(t){var e=String(t);h[e]||(h[e]=1,f.warn('encountered bad format: \"'+e+'\"'))},f.noFormat=function(t){return String(t)},f.numberFormat=function(t){var e;try{e=a(f.adjustFormat(t))}catch(e){return f.warnBadFormat(t),f.noFormat}return e},f.nestedProperty=t(\"./nested_property\"),f.keyedContainer=t(\"./keyed_container\"),f.relativeAttr=t(\"./relative_attr\"),f.isPlainObject=t(\"./is_plain_object\"),f.toLogRange=t(\"./to_log_range\"),f.relinkPrivateKeys=t(\"./relink_private\");var p=t(\"./array\");f.isTypedArray=p.isTypedArray,f.isArrayOrTypedArray=p.isArrayOrTypedArray,f.isArray1D=p.isArray1D,f.ensureArray=p.ensureArray,f.concat=p.concat,f.maxRowLength=p.maxRowLength,f.minRowLength=p.minRowLength;var d=t(\"./mod\");f.mod=d.mod,f.modHalf=d.modHalf;var g=t(\"./coerce\");f.valObjectMeta=g.valObjectMeta,f.coerce=g.coerce,f.coerce2=g.coerce2,f.coerceFont=g.coerceFont,f.coercePattern=g.coercePattern,f.coerceHoverinfo=g.coerceHoverinfo,f.coerceSelectionMarkerOpacity=g.coerceSelectionMarkerOpacity,f.validate=g.validate;var m=t(\"./dates\");f.dateTime2ms=m.dateTime2ms,f.isDateTime=m.isDateTime,f.ms2DateTime=m.ms2DateTime,f.ms2DateTimeLocal=m.ms2DateTimeLocal,f.cleanDate=m.cleanDate,f.isJSDate=m.isJSDate,f.formatDate=m.formatDate,f.incrementMonth=m.incrementMonth,f.dateTick0=m.dateTick0,f.dfltRange=m.dfltRange,f.findExactDates=m.findExactDates,f.MIN_MS=m.MIN_MS,f.MAX_MS=m.MAX_MS;var v=t(\"./search\");f.findBin=v.findBin,f.sorterAsc=v.sorterAsc,f.sorterDes=v.sorterDes,f.distinctVals=v.distinctVals,f.roundUp=v.roundUp,f.sort=v.sort,f.findIndexOfMin=v.findIndexOfMin,f.sortObjectKeys=t(\"./sort_object_keys\");var y=t(\"./stats\");f.aggNums=y.aggNums,f.len=y.len,f.mean=y.mean,f.median=y.median,f.midRange=y.midRange,f.variance=y.variance,f.stdev=y.stdev,f.interp=y.interp;var x=t(\"./matrix\");f.init2dArray=x.init2dArray,f.transposeRagged=x.transposeRagged,f.dot=x.dot,f.translationMatrix=x.translationMatrix,f.rotationMatrix=x.rotationMatrix,f.rotationXYMatrix=x.rotationXYMatrix,f.apply3DTransform=x.apply3DTransform,f.apply2DTransform=x.apply2DTransform,f.apply2DTransform2=x.apply2DTransform2,f.convertCssMatrix=x.convertCssMatrix,f.inverseTransformMatrix=x.inverseTransformMatrix;var b=t(\"./angles\");f.deg2rad=b.deg2rad,f.rad2deg=b.rad2deg,f.angleDelta=b.angleDelta,f.angleDist=b.angleDist,f.isFullCircle=b.isFullCircle,f.isAngleInsideSector=b.isAngleInsideSector,f.isPtInsideSector=b.isPtInsideSector,f.pathArc=b.pathArc,f.pathSector=b.pathSector,f.pathAnnulus=b.pathAnnulus;var _=t(\"./anchor_utils\");f.isLeftAnchor=_.isLeftAnchor,f.isCenterAnchor=_.isCenterAnchor,f.isRightAnchor=_.isRightAnchor,f.isTopAnchor=_.isTopAnchor,f.isMiddleAnchor=_.isMiddleAnchor,f.isBottomAnchor=_.isBottomAnchor;var w=t(\"./geometry2d\");f.segmentsIntersect=w.segmentsIntersect,f.segmentDistance=w.segmentDistance,f.getTextLocation=w.getTextLocation,f.clearLocationCache=w.clearLocationCache,f.getVisibleSegment=w.getVisibleSegment,f.findPointOnPath=w.findPointOnPath;var T=t(\"./extend\");f.extendFlat=T.extendFlat,f.extendDeep=T.extendDeep,f.extendDeepAll=T.extendDeepAll,f.extendDeepNoArrays=T.extendDeepNoArrays;var k=t(\"./loggers\");f.log=k.log,f.warn=k.warn,f.error=k.error;var A=t(\"./regex\");f.counterRegex=A.counter;var M=t(\"./throttle\");f.throttle=M.throttle,f.throttleDone=M.done,f.clearThrottle=M.clear;var S=t(\"./dom\");function E(t){var e={};for(var r in t)for(var n=t[r],i=0;il||t=e)&&(o(t)&&t>=0&&t%1==0)},f.noop=t(\"./noop\"),f.identity=t(\"./identity\"),f.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},f.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},f.simpleMap=function(t,e,r,n,i){for(var a=t.length,o=new Array(a),s=0;s=Math.pow(2,r)?i>10?(f.warn(\"randstr failed uniqueness\"),l):t(e,r,n,(i||0)+1):l},f.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},f.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=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},f.syncOrAsync=function(t,e,r){var n;function i(){return f.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},f.stripTrailingSlash=function(t){return\"/\"===t.substr(-1)?t.substr(0,t.length-1):t},f.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n0?e:0}))},f.fillArray=function(t,e,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(t))for(var i=0;i1?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},f.TEMPLATE_STRING_REGEX=/%{([^\\s%{}:]*)([:|\\|][^}]*)?}/g;var z=/^\\w*$/;f.templateString=function(t,e){var r={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,n){var i;return z.test(n)?i=e[n]:(r[n]=r[n]||f.nestedProperty(e,n).get,i=r[n]()),f.isValidTextValue(i)?i:\"\"}))};var D={max:10,count:0,name:\"hovertemplate\"};f.hovertemplateString=function(){return B.apply(D,arguments)};var R={max:10,count:0,name:\"texttemplate\"};f.texttemplateString=function(){return B.apply(R,arguments)};var F=/^[:|\\|]/;function B(t,e,r){var n=this,a=arguments;e||(e={});var o={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,s,l){var c,u,h,p=\"_xother\"===s||\"_yother\"===s,d=\"_xother_\"===s||\"_yother_\"===s,g=\"xother_\"===s||\"yother_\"===s,m=\"xother\"===s||\"yother\"===s||p||g||d,v=s;if((p||d)&&(v=v.substring(1)),(g||d)&&(v=v.substring(0,v.length-1)),m){if(void 0===(c=e[v]))return\"\"}else for(h=3;h=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 N=2e9;f.seedPseudoRandom=function(){N=2e9},f.pseudoRandom=function(){var t=N;return N=(69069*N+1)%4294967296,Math.abs(N-t)<429496729?f.pseudoRandom():N/4294967296},f.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=f.extractOption(t,e,\"htx\",\"hovertext\");if(f.isValidTextValue(i))return n(i);var a=f.extractOption(t,e,\"tx\",\"text\");return f.isValidTextValue(a)?n(a):void 0},f.isValidTextValue=function(t){return t||0===t},f.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+\"%\",n=0;n1&&(c=1):c=0,f.strTranslate(i-c*(r+o),a-c*(n+s))+f.strScale(c)+(l?\"rotate(\"+l+(e?\"\":\" \"+r+\" \"+n)+\")\":\"\")},f.ensureUniformFontSize=function(t,e){var r=f.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},f.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)},f.bigFont=function(t){return Math.round(1.2*t)};var j=f.getFirefoxVersion(),U=null!==j&&j<86;f.getPositionFromD3Event=function(){return U?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},{\"../constants/numerical\":479,\"./anchor_utils\":483,\"./angles\":484,\"./array\":485,\"./clean_number\":486,\"./clear_responsive\":488,\"./coerce\":489,\"./dates\":490,\"./dom\":491,\"./extend\":493,\"./filter_unique\":494,\"./filter_visible\":495,\"./geometry2d\":498,\"./identity\":501,\"./increment\":502,\"./is_plain_object\":504,\"./keyed_container\":505,\"./localize\":506,\"./loggers\":507,\"./make_trace_groups\":508,\"./matrix\":509,\"./mod\":510,\"./nested_property\":511,\"./noop\":512,\"./notifier\":513,\"./preserve_drawing_buffer\":517,\"./push_unique\":518,\"./regex\":520,\"./relative_attr\":521,\"./relink_private\":522,\"./search\":523,\"./sort_object_keys\":526,\"./stats\":527,\"./throttle\":530,\"./to_log_range\":531,\"@plotly/d3\":58,\"d3-format\":112,\"d3-time-format\":120,\"fast-isnumeric\":190}],504:[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).hasOwnProperty(\"hasOwnProperty\")}},{}],505:[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;o2)return c[e]=2|c[e],h.set(t,null);if(f){for(o=e;o1){var e=[\"LOG:\"];for(t=0;t1){var r=[];for(t=0;t\"),\"long\")}},a.warn=function(){var t;if(n.logging>0){var e=[\"WARN:\"];for(t=0;t0){var r=[];for(t=0;t\"),\"stick\")}},a.error=function(){var t;if(n.logging>0){var e=[\"ERROR:\"];for(t=0;t0){var r=[];for(t=0;t\"),\"stick\")}}},{\"../plot_api/plot_config\":541,\"./notifier\":513}],508:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\");e.exports=function(t,e,r){var i=t.selectAll(\"g.\"+r.replace(/\\s/g,\".\")).data(e,(function(t){return t[0].trace.uid}));i.exit().remove(),i.enter().append(\"g\").attr(\"class\",r),i.order();var a=t.classed(\"rangeplot\")?\"nodeRangePlot3\":\"node3\";return i.each((function(t){t[0][a]=n.select(this)})),i}},{\"@plotly/d3\":58}],509:[function(t,e,r){\"use strict\";var n=t(\"gl-mat4\");r.init2dArray=function(t,e){for(var r=new Array(t),n=0;ne/2?t-Math.round(t/e)*e:t}}},{}],511:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./array\").isArrayOrTypedArray;function a(t,e){return function(){var r,n,o,s,l,c=t;for(s=0;s/g),l=0;la||c===i||cs)&&(!e||!l(t))}:function(t,e){var l=t[0],c=t[1];if(l===i||la||c===i||cs)return!1;var u,f,h,p,d,g=r.length,m=r[0][0],v=r[0][1],y=0;for(u=1;uMath.max(f,m)||c>Math.max(h,v)))if(cu||Math.abs(n(o,h))>i)return!0;return!1},a.filter=function(t,e){var r=[t[0]],n=0,i=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c1&&o(t.pop());return{addPt:o,raw:t,filtered:r}}},{\"../constants/numerical\":479,\"./matrix\":509}],516:[function(t,e,r){(function(r){(function(){\"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}n.regl||(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)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./show_no_webgl_msg\":525,regl:283}],517:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"is-mobile\");e.exports=function(t){var e;if(\"string\"!=typeof(e=t&&t.hasOwnProperty(\"userAgent\")?t.userAgent:function(){var t;\"undefined\"!=typeof navigator&&(t=navigator.userAgent);t&&t.headers&&\"string\"==typeof t.headers[\"user-agent\"]&&(t=t.headers[\"user-agent\"]);return t}()))return!0;var r=i({ua:{headers:{\"user-agent\":e}},tablet:!0,featureDetect:!1});if(!r)for(var a=e.split(\" \"),o=1;o-1;s--){var l=a[s];if(\"Version/\"===l.substr(0,8)){var c=l.substr(8).split(\".\")[0];if(n(c)&&(c=+c),c>=13)return!0}}}return r}},{\"fast-isnumeric\":190,\"is-mobile\":234}],518:[function(t,e,r){\"use strict\";e.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;ni.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(!(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=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function u(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,o,f=0,h=e.length,p=0,d=h>1?(e[h-1]-e[0])/(h-1):1;for(o=d>=0?r?s:l:r?u:c,t+=1e-9*d*(r?-1:1)*(d>=0?1:-1);f90&&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,n=t.slice();for(n.sort(r.sorterAsc),e=n.length-1;e>-1&&n[e]===o;e--);for(var i,a=n[e]-n[0]||1,s=a/(e||1)/1e4,l=[],c=0;c<=e;c++){var u=n[c],f=u-i;void 0===i?(l.push(u),i=u):f>s&&(a=Math.min(a,f),l.push(u),i=u)}return{vals:l,minDiff:a}},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;i0&&(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;ia.length)&&(o=a.length),n(e)||(e=!1),i(a[0])){for(l=new Array(o),s=0;st.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{\"./array\":485,\"fast-isnumeric\":190}],528:[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\":89}],529:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../lib\"),a=i.strTranslate,o=t(\"../constants/xmlns_namespaces\"),s=t(\"../constants/alignment\").LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,d){var A=t.text(),M=!t.attr(\"data-notex\")&&\"undefined\"!=typeof MathJax&&A.match(l),L=n.select(t.node().parentNode);if(!L.empty()){var C=t.attr(\"class\")?t.attr(\"class\").split(\" \")[0]:\"text\";return C+=\"-math\",L.selectAll(\"svg.\"+C).remove(),L.selectAll(\"g.\"+C+\"-group\").remove(),t.style(\"display\",null).attr({\"data-unformatted\":A,\"data-math\":\"N\"}),M?(e&&e._promises||[]).push(new Promise((function(e){t.style(\"display\",\"none\");var r=parseInt(t.node().style.fontSize,10),o={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)}))}(M[2],o,(function(n,i,o){L.selectAll(\"svg.\"+C).remove(),L.selectAll(\"g.\"+C+\"-group\").remove();var s=n&&n.select(\"svg\");if(!s||!s.node())return P(),void e();var l=L.append(\"g\").classed(C+\"-group\",!0).attr({\"pointer-events\":\"none\",\"data-unformatted\":A,\"data-math\":\"Y\"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var c=o.width,u=o.height;s.attr({class:C,height:u,preserveAspectRatio:\"xMinYMin meet\"}).style({overflow:\"visible\",\"pointer-events\":\"none\"});var f=t.node().style.fill||\"black\",h=s.select(\"g\");h.attr({fill:f,stroke:f});var p=h.node().getBoundingClientRect(),g=p.width,m=p.height;(g>c||m>u)&&(s.style(\"overflow\",\"hidden\"),g=(p=s.node().getBoundingClientRect()).width,m=p.height);var v=+t.attr(\"x\"),y=+t.attr(\"y\"),x=-(r||t.node().getBoundingClientRect().height)/4;if(\"y\"===C[0])l.attr({transform:\"rotate(\"+[-90,v,y]+\")\"+a(-g/2,x-m/2)});else if(\"l\"===C[0])y=x-m/2;else if(\"a\"===C[0]&&0!==C.indexOf(\"atitle\"))v=0,y=x;else{var b=t.attr(\"text-anchor\");v-=g*(\"middle\"===b?.5:\"end\"===b?1:0),y=y+x-m/2}s.attr({x:v,y:y}),d&&d.call(t,l),e(l)}))}))):P(),t}function P(){L.empty()||(C=t.attr(\"class\")+\"-math\",L.select(\"svg.\"+C).remove()),t.text(\"\").style(\"white-space\",\"pre\"),function(t,e){e=e.replace(g,\" \");var r,a=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(o.svg,\"tspan\");n.select(e).attr({class:\"line\",dy:c*s+\"em\"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var a=1;a doesnt match end tag <\"+t+\">. Pretending it did match.\",e),r=l[l.length-1].node}else i.log(\"Ignoring unexpected end tag .\",e)}y.test(e)?u():(r=t,l=[{node:t}]);for(var L=e.split(m),C=0;C|>|>)/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=[\"http:\",\"https:\",\"mailto:\",\"\",void 0,\":\"],g=r.NEWLINES=/(\\r\\n?|\\n)/g,m=/(<[^<>]*>)/,v=/<(\\/?)([^ >]*)(\\s+(.*))?>/i,y=//i;r.BR_TAG_ALL=//gi;var x=/(^|[\\s\"'])style\\s*=\\s*(\"([^\"]*);?\"|'([^']*);?')/i,b=/(^|[\\s\"'])href\\s*=\\s*(\"([^\"]*)\"|'([^']*)')/i,_=/(^|[\\s\"'])target\\s*=\\s*(\"([^\"\\s]*)\"|'([^'\\s]*)')/i,w=/(^|[\\s\"'])popup\\s*=\\s*(\"([\\w=,]*)\"|'([\\w=,]*)')/i;function T(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&S(n)}var k=/(^|;)\\s*color:/;r.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:[\"br\"],i=\"...\".length,a=t.split(m),o=[],s=\"\",l=0,c=0;ci?o.push(u.substr(0,d-i)+\"...\"):o.push(u.substr(0,d));break}s=\"\"}}return o.join(\"\")};var A={mu:\"\\u03bc\",amp:\"&\",lt:\"<\",gt:\">\",nbsp:\"\\xa0\",times:\"\\xd7\",plusmn:\"\\xb1\",deg:\"\\xb0\"},M=/&(#\\d+|#x[\\da-fA-F]+|[a-z]+);/g;function S(t){return t.replace(M,(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)):A[e])||t}))}function E(t){var e=encodeURI(decodeURI(t)),r=document.createElement(\"a\"),n=document.createElement(\"a\");r.href=t,n.href=e;var i=r.protocol,a=n.protocol;return-1!==d.indexOf(i)&&-1!==d.indexOf(a)?e:\"\"}function L(t,e,r){var n,a,o,s=r.horizontalAlign,l=r.verticalAlign||\"top\",c=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return a=\"bottom\"===l?function(){return c.bottom-n.height}:\"middle\"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},o=\"right\"===s?function(){return c.right-n.width}:\"center\"===s?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var t=o()-u.left,e=a()-u.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+\"px\",left:t+\"px\",\"z-index\":1e3}),this}}r.convertEntities=S,r.sanitizeHTML=function(t){t=t.replace(g,\" \");for(var e=document.createElement(\"p\"),r=e,i=[],a=t.split(m),o=0;oa.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)}},{}],531:[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\":190}],532:[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\":587,\"topojson-client\":315}],533:[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\"}}},{}],534:[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\"}}},{}],535:[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;s0&&o.log(\"Clearing previous rejected promises from queue.\"),t._promises=[]},r.cleanLayout=function(t){var e,n;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 a=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,f=(s.subplotsRegistry.ternary||{}).attrRegex,h=(s.subplotsRegistry.gl3d||{}).attrRegex,g=Object.keys(t);for(e=0;e3?(O.x=1.02,O.xanchor=\"left\"):O.x<-2&&(O.x=-.02,O.xanchor=\"right\"),O.y>3?(O.y=1.02,O.yanchor=\"bottom\"):O.y<-2&&(O.y=-.02,O.yanchor=\"top\")),d(t),\"rotate\"===t.dragmode&&(t.dragmode=\"orbit\"),c.clean(t),t.template&&t.template.layout&&r.cleanLayout(t.template.layout),t},r.cleanData=function(t){for(var e=0;e0)return t.substr(0,e)}r.hasParent=function(t,e){for(var r=b(e);r;){if(r in t)return!0;r=b(r)}return!1};var _=[\"x\",\"y\",\"z\"];r.clearAxisTypes=function(t,e,r){for(var n=0;n1&&a.warn(\"Full array edits are incompatible with other edits\",f);var y=r[\"\"][\"\"];if(c(y))e.set(null);else{if(!Array.isArray(y))return a.warn(\"Unrecognized full array edit value\",f,y),!0;e.set(y)}return!g&&(h(m,v),p(t),!0)}var x,b,_,w,T,k,A,M,S=Object.keys(r).map(Number).sort(o),E=e.get(),L=E||[],C=u(v,f).get(),P=[],I=-1,O=L.length;for(x=0;xL.length-(A?0:1))a.warn(\"index out of range\",f,_);else if(void 0!==k)T.length>1&&a.warn(\"Insertion & removal are incompatible with edits to the same index.\",f,_),c(k)?P.push(_):A?(\"add\"===k&&(k={}),L.splice(_,0,k),C&&C.splice(_,0,{})):a.warn(\"Unrecognized full object edit value\",f,_,k),-1===I&&(I=_);else for(b=0;b=0;x--)L.splice(P[x],1),C&&C.splice(P[x],1);if(L.length?E||e.set(L):e.set(null),g)return!1;if(h(m,v),d!==i){var z;if(-1===I)z=S;else{for(O=Math.max(L.length,O),z=[],x=0;x=I);x++)z.push(_);for(x=I;x=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(void 0===e)throw new Error(\"currentIndices is a required argument.\");if(Array.isArray(e)||(e=[e]),P(t,e,\"currentIndices\"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&P(t,r,\"newIndices\"),void 0!==r&&e.length!==r.length)throw new Error(\"current and new indices must be of equal length.\")}function O(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(void 0===r)throw new Error(\"indices must be an integer or array of integers\");for(var a in P(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 l=function(t,e,r,n){var a,l,c,u,f,h=o.isPlainObject(n),p=[];for(var d in Array.isArray(r)||(r=[r]),r=C(r,t.data.length-1),e)for(var g=0;g-1&&-1===r.indexOf(\"grouptitlefont\")?l(r,r.replace(\"titlefont\",\"title.font\")):r.indexOf(\"titleposition\")>-1?l(r,r.replace(\"titleposition\",\"title.position\")):r.indexOf(\"titleside\")>-1?l(r,r.replace(\"titleside\",\"title.side\")):r.indexOf(\"titleoffset\")>-1&&l(r,r.replace(\"titleoffset\",\"title.offset\")):l(r,r.replace(\"title\",\"title.text\"));function l(e,r){t[r]=t[e],delete t[e]}}function U(t,e,r){t=o.getGraphDiv(t),_.clearPromiseQueue(t);var n={};if(\"string\"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn(\"Relayout fail.\",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=W(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[h.previousPromises];a.layoutReplot?s.push(w.layoutReplot):Object.keys(n).length&&(V(t,a,i)||h.supplyDefaults(t),a.legend&&s.push(w.doLegend),a.layoutstyle&&s.push(w.layoutStyles),a.axrange&&H(s,i.rangesAltered),a.ticks&&s.push(w.doTicksRelayout),a.modebar&&s.push(w.doModeBar),a.camera&&s.push(w.doCamera),a.colorbars&&s.push(w.doColorBars),s.push(M)),s.push(h.rehover,h.redrag),c.add(t,U,[t,i.undoit],U,[t,i.redoit]);var l=o.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit(\"plotly_relayout\",i.eventData),t}))}function V(t,e,r){var n=t._fullLayout;if(!e.axrange)return!1;for(var i in e)if(\"axrange\"!==i&&e[i])return!1;for(var a in r.rangesAltered){var o=p.id2name(a),s=t.layout[o],l=n[o];if(l.autorange=s.autorange,s.range&&(l.range=s.range.slice()),l.cleanRange(),l._matchGroup)for(var c in l._matchGroup)if(c!==a){var u=n[p.id2name(c)];u.autorange=l.autorange,u.range=l.range.slice(),u._input.range=l.range.slice()}}return!0}function H(t,e){var r=e?function(t){var r=[],n=!0;for(var i in e){var a=p.getFromId(t,i);if(r.push(i),-1!==(a.ticklabelposition||\"\").indexOf(\"inside\")&&a._anchorAxis&&r.push(a._anchorAxis._id),a._matchGroup)for(var o in a._matchGroup)e[o]||r.push(o);a.automargin&&(n=!1)}return p.draw(t,r,{skipTitle:n})}:function(t){return p.draw(t,\"redraw\")};t.push(y,w.doAutoRangeAndConstraints,r,w.drawData,w.finalDraw)}var q=/^[xyz]axis[0-9]*\\.range(\\[[0|1]\\])?$/,G=/^[xyz]axis[0-9]*\\.autorange$/,Y=/^[xyz]axis[0-9]*\\.domain(\\[[0|1]\\])?$/;function W(t,e){var r,n,i,a=t.layout,l=t._fullLayout,c=l._guiEditing,h=F(l._preGUI,c),d=Object.keys(e),g=p.list(t),m=o.extendDeepAll({},e),v={};for(j(e),d=Object.keys(e),n=0;n0&&\"string\"!=typeof O.parts[D];)D--;var B=O.parts[D],N=O.parts[D-1]+\".\"+B,U=O.parts.slice(0,D).join(\".\"),V=s(t.layout,U).get(),H=s(l,U).get(),W=O.get();if(void 0!==z){M[I]=z,S[I]=\"reverse\"===B?z:R(W);var Z=f.getLayoutValObject(l,O.parts);if(Z&&Z.impliedEdits&&null!==z)for(var J in Z.impliedEdits)E(o.relativeAttr(I,J),Z.impliedEdits[J]);if(-1!==[\"width\",\"height\"].indexOf(I))if(z){E(\"autosize\",null);var K=\"height\"===I?\"width\":\"height\";E(K,l[K])}else l[I]=t._initialAutoSize[I];else if(\"autosize\"===I)E(\"width\",z?null:l.width),E(\"height\",z?null:l.height);else if(N.match(q))P(N),s(l,U+\"._inputRange\").set(null);else if(N.match(G)){P(N),s(l,U+\"._inputRange\").set(null);var Q=s(l,U).get();Q._inputDomain&&(Q._input.domain=Q._inputDomain.slice())}else N.match(Y)&&s(l,U+\"._inputDomain\").set(null);if(\"type\"===B){L=V;var $=\"linear\"===H.type&&\"log\"===z,tt=\"log\"===H.type&&\"linear\"===z;if($||tt){if(L&&L.range)if(H.autorange)$&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var et=L.range[0],rt=L.range[1];$?(et<=0&&rt<=0&&E(U+\".autorange\",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),E(U+\".range[0]\",Math.log(et)/Math.LN10),E(U+\".range[1]\",Math.log(rt)/Math.LN10)):(E(U+\".range[0]\",Math.pow(10,et)),E(U+\".range[1]\",Math.pow(10,rt)))}else E(U+\".autorange\",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[O.parts[0]]&&\"radialaxis\"===O.parts[1]&&delete l[O.parts[0]]._subplot.viewInitial[\"radialaxis.range\"],u.getComponentMethod(\"annotations\",\"convertCoords\")(t,H,z,E),u.getComponentMethod(\"images\",\"convertCoords\")(t,H,z,E)}else E(U+\".autorange\",!0),E(U+\".range\",null);s(l,U+\"._inputRange\").set(null)}else if(B.match(k)){var nt=s(l,I).get(),it=(z||{}).type;it&&\"-\"!==it||(it=\"linear\"),u.getComponentMethod(\"annotations\",\"convertCoords\")(t,nt,it,E),u.getComponentMethod(\"images\",\"convertCoords\")(t,nt,it,E)}var at=b.containerArrayMatch(I);if(at){r=at.array,n=at.index;var ot=at.property,st=Z||{editType:\"calc\"};\"\"!==n&&\"\"===ot&&(b.isAddVal(z)?S[I]=null:b.isRemoveVal(z)?S[I]=(s(a,r).get()||[])[n]:o.warn(\"unrecognized full object value\",e)),T.update(A,st),v[r]||(v[r]={});var lt=v[r][n];lt||(lt=v[r][n]={}),lt[ot]=z,delete e[I]}else\"reverse\"===B?(V.range?V.range.reverse():(E(U+\".autorange\",!0),V.range=[1,0]),H.autorange?A.calc=!0:A.plot=!0):(l._has(\"scatter-like\")&&l._has(\"regl\")&&\"dragmode\"===I&&(\"lasso\"===z||\"select\"===z)&&\"lasso\"!==W&&\"select\"!==W||l._has(\"gl2d\")?A.plot=!0:Z?T.update(A,Z):A.calc=!0,O.set(z))}}for(r in v){b.applyContainerArrayChanges(t,h(a,r),v[r],A,h)||(A.plot=!0)}for(var ct in C){var ut=(L=p.getFromId(t,ct))&&L._constraintGroup;if(ut)for(var ft in A.calc=!0,ut)C[ft]||(p.getFromId(t,ft)._constraintShrinkable=!0)}return(X(t)||e.height||e.width)&&(A.plot=!0),(A.plot||A.calc)&&(A.layoutReplot=!0),{flags:A,rangesAltered:C,undoit:S,redoit:M,eventData:m}}function X(t){var e=t._fullLayout,r=e.width,n=e.height;return t.layout.autosize&&h.plotAutoSize(t,t.layout,e),e.width!==r||e.height!==n}function Z(t,e,n,i){t=o.getGraphDiv(t),_.clearPromiseQueue(t),o.isPlainObject(e)||(e={}),o.isPlainObject(n)||(n={}),Object.keys(e).length&&(t.changed=!0),Object.keys(n).length&&(t.changed=!0);var a=_.coerceTraceIndices(t,i),s=N(t,o.extendFlat({},e),a),l=s.flags,u=W(t,o.extendFlat({},n)),f=u.flags;(l.calc||f.calc)&&(t.calcdata=void 0),l.clearAxisTypes&&_.clearAxisTypes(t,a,n);var p=[];f.layoutReplot?p.push(w.layoutReplot):l.fullReplot?p.push(r._doPlot):(p.push(h.previousPromises),V(t,f,u)||h.supplyDefaults(t),l.style&&p.push(w.doTraceStyle),(l.colorbars||f.colorbars)&&p.push(w.doColorBars),f.legend&&p.push(w.doLegend),f.layoutstyle&&p.push(w.layoutStyles),f.axrange&&H(p,u.rangesAltered),f.ticks&&p.push(w.doTicksRelayout),f.modebar&&p.push(w.doModeBar),f.camera&&p.push(w.doCamera),p.push(M)),p.push(h.rehover,h.redrag),c.add(t,Z,[t,s.undoit,u.undoit,s.traces],Z,[t,s.redoit,u.redoit,s.traces]);var d=o.syncOrAsync(p,t);return d&&d.then||(d=Promise.resolve(t)),d.then((function(){return t.emit(\"plotly_update\",{data:s.eventData,layout:u.eventData}),t}))}function J(t){return function(e){e._fullLayout._guiEditing=!0;var r=t.apply(null,arguments);return e._fullLayout._guiEditing=!1,r}}var K=[{pattern:/^hiddenlabels/,attr:\"legend.uirevision\"},{pattern:/^((x|y)axis\\d*)\\.((auto)?range|title\\.text)/},{pattern:/axis\\d*\\.showspikes$/,attr:\"modebar.uirevision\"},{pattern:/(hover|drag)mode$/,attr:\"modebar.uirevision\"},{pattern:/^(scene\\d*)\\.camera/},{pattern:/^(geo\\d*)\\.(projection|center|fitbounds)/},{pattern:/^(ternary\\d*\\.[abc]axis)\\.(min|title\\.text)$/},{pattern:/^(polar\\d*\\.radialaxis)\\.((auto)?range|angle|title\\.text)/},{pattern:/^(polar\\d*\\.angularaxis)\\.rotation/},{pattern:/^(mapbox\\d*)\\.(center|zoom|bearing|pitch)/},{pattern:/^legend\\.(x|y)$/,attr:\"editrevision\"},{pattern:/^(shapes|annotations)/,attr:\"editrevision\"},{pattern:/^title\\.text$/,attr:\"editrevision\"}],Q=[{pattern:/^selectedpoints$/,attr:\"selectionrevision\"},{pattern:/(^|value\\.)visible$/,attr:\"legend.uirevision\"},{pattern:/^dimensions\\[\\d+\\]\\.constraintrange/},{pattern:/^node\\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\\.)name$/},{pattern:/colorbar\\.title\\.text$/},{pattern:/colorbar\\.(x|y)$/,attr:\"editrevision\"}];function $(t,e){for(var r=0;r1;)if(n.pop(),void 0!==(r=s(e,n.join(\".\")+\".uirevision\").get()))return r;return e.uirevision}function et(t,e){for(var r=0;r=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 f(){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,h.transition(t,e.frame.data,e.frame.layout,_.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&&f()};e()}var d,g,m=0;function v(t){return Array.isArray(i)?m>=i.length?t.transitionOpts=i[m]:t.transitionOpts=i[0]:t.transitionOpts=i,m++,t}var y=[],x=null==e,b=Array.isArray(e);if(!x&&!b&&o.isPlainObject(e))y.push({type:\"object\",data:v(o.extendFlat({},e))});else if(x||-1!==[\"string\",\"number\"].indexOf(typeof e))for(d=0;d0&&kk)&&A.push(g);y=A}}y.length>0?function(e){if(0!==e.length){for(var i=0;i=0;n--)if(o.isPlainObject(e[n])){var g=e[n].name,m=(u[g]||d[g]||{}).name,v=e[n].name,y=u[m]||d[m];m&&v&&\"number\"==typeof v&&y&&A<5&&(A++,o.warn('addFrames: overwriting frame \"'+(u[m]||d[m]).name+'\" with a frame whose name of type \"number\" also equates to \"'+m+'\". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===A&&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:h.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}p.sort((function(t,e){return t.index>e.index?-1:t.index=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=0;r--)n=e[r],a.push({type:\"delete\",index:n}),s.unshift({type:\"insert\",index:n,value:i[n]});var l=h.modifyFrames,u=h.modifyFrames,f=[t,s],p=[t,a];return c&&c.add(t,l,f,u,p),h.modifyFrames(t,a)},r.addTraces=function t(e,n,i){e=o.getGraphDiv(e);var a,s,l=[],u=r.deleteTraces,f=t,h=[e,l],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(void 0===e)throw new Error(\"traces must be defined.\");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!y(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function y(t){return t===Math.round(t)&&t>=0}function x(){var t,e,r={};for(t in f(r,o),n.subplotsRegistry){if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i=l.length)return!1;i=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else{var u=t._module;if(u||(u=(n.modules[t.type||a.type.dflt]||{})._module),!u)return!1;if(!(i=(r=u.attributes)&&r[o])){var f=u.basePlotModule;f&&f.attributes&&(i=f.attributes[o])}i||(i=a[o])}return v(i,e,s)},r.getLayoutValObject=function(t,e){return v(function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var c;for(r=0;r=i&&(r._input||{})._templateitemname;o&&(a=i);var s,l=e+\"[\"+a+\"]\";function c(){s={},o&&(s[l]={},s[l].templateitemname=o)}function u(t,e){o?n.nestedProperty(s[l],t).set(e):s[l+\".\"+t]=e}function f(){var t=s;return c(),t}return c(),{modifyBase:function(t,e){s[t]=e},modifyItem:u,getUpdateObj:f,applyUpdate:function(e,r){e&&u(e,r);var i=f();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},{\"../lib\":503,\"../plots/attributes\":550}],544:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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,m=d.clean,v=t(\"../plots/cartesian/autorange\").doAutoRange;function y(t,e,r){for(var n=0;n=t[1]||i[1]<=t[0])&&(a[0]e[0]))return!0}return!1}function x(t){var e,i,s,u,d,g,m=t._fullLayout,v=m._size,x=v.p,_=h.list(t,\"\",!0);if(m._paperdiv.style({width:t._context.responsive&&m.autosize&&!t._context._hasZeroWidth&&!t.layout.width?\"100%\":m.width+\"px\",height:t._context.responsive&&m.autosize&&!t._context._hasZeroHeight&&!t.layout.height?\"100%\":m.height+\"px\"}).selectAll(\".main-svg\").call(c.setSize,m.width,m.height),t._context.setBackground(t,m.paper_bgcolor),r.drawMainTitle(t),f.manage(t),!m._has(\"cartesian\"))return a.previousPromises(t);function T(t,e,r){var n=t._lw/2;return\"x\"===t._id.charAt(0)?e?\"top\"===r?e._offset-x-n:e._offset+e._length+x+n:v.t+v.h*(1-(t.position||0))+n%1:e?\"right\"===r?e._offset+e._length+x+n:e._offset-x-n:v.l+v.w*(t.position||0)+n%1}for(e=0;e<_.length;e++){var k=(u=_[e])._anchorAxis;u._linepositions={},u._lw=c.crispRound(t,u.linewidth,1),u._mainLinePosition=T(u,k,u.side),u._mainMirrorPosition=u.mirror&&k?T(u,k,p.OPPOSITE_SIDE[u.side]):null}var A=[],M=[],S=[],E=1===l.opacity(m.paper_bgcolor)&&1===l.opacity(m.plot_bgcolor)&&m.paper_bgcolor===m.plot_bgcolor;for(i in m._plots)if((s=m._plots[i]).mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var L=s.xaxis.domain,C=s.yaxis.domain,P=s.plotgroup;if(y(L,C,S)){var I=P.node(),O=s.bg=o.ensureSingle(P,\"rect\",\"bg\");I.insertBefore(O.node(),I.childNodes[0]),M.push(i)}else P.select(\"rect.bg\").remove(),S.push([L,C]),E||(A.push(i),M.push(i))}var z,D,R,F,B,N,j,U,V,H,q,G,Y,W=m._bgLayer.selectAll(\".bg\").data(A);for(W.enter().append(\"rect\").classed(\"bg\",!0),W.exit().remove(),W.each((function(t){m._plots[t].bg=n.select(this)})),e=0;eT?u.push({code:\"unused\",traceType:y,templateCount:w,dataCount:T}):T>w&&u.push({code:\"reused\",traceType:y,templateCount:w,dataCount:T})}}else u.push({code:\"data\"});if(function t(e,r){for(var n in e)if(\"_\"!==n.charAt(0)){var a=e[n],o=g(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)&&m(a)&&t(a,o)}}({data:p,layout:h},\"\"),u.length)return u.map(v)}},{\"../lib\":503,\"../plots/attributes\":550,\"../plots/plots\":619,\"./plot_config\":541,\"./plot_schema\":542,\"./plot_template\":543}],546:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./plot_api\"),a=t(\"../plots/plots\"),o=t(\"../lib\"),s=t(\"../snapshot/helpers\"),l=t(\"../snapshot/tosvg\"),c=t(\"../snapshot/svgtoimg\"),u=t(\"../version\").version,f={format:{valType:\"enumerated\",values:[\"png\",\"jpeg\",\"webp\",\"svg\",\"full-json\"],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}};e.exports=function(t,e){var r,h,p,d;function g(t){return!(t in e)||o.validate(e[t],f[t])}if(e=e||{},o.isPlainObject(t)?(r=t.data||[],h=t.layout||{},p=t.config||{},d={}):(t=o.getGraphDiv(t),r=o.extendDeep([],t.data),h=o.extendDeep({},t.layout),p=t._context,d=t._fullLayout||{}),!g(\"width\")&&null!==e.width||!g(\"height\")&&null!==e.height)throw new Error(\"Height and width should be pixel values.\");if(!g(\"format\"))throw new Error(\"Export format is not \"+o.join2(f.format.values,\", \",\" or \")+\".\");var m={};function v(t,r){return o.coerce(e,m,f,t,r)}var y=v(\"format\"),x=v(\"width\"),b=v(\"height\"),_=v(\"scale\"),w=v(\"setBackground\"),T=v(\"imageDataOnly\"),k=document.createElement(\"div\");k.style.position=\"absolute\",k.style.left=\"-5000px\",document.body.appendChild(k);var A=o.extendFlat({},h);x?A.width=x:null===e.width&&n(d.width)&&(A.width=d.width),b?A.height=b:null===e.height&&n(d.height)&&(A.height=d.height);var M=o.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=s.getRedrawFunc(k);function E(){return new Promise((function(t){setTimeout(t,s.getDelay(k._fullLayout))}))}function L(){return new Promise((function(t,e){var r=l(k,y,_),n=k._fullLayout.width,f=k._fullLayout.height;function h(){i.purge(k),document.body.removeChild(k)}if(\"full-json\"===y){var p=a.graphJson(k,!1,\"keepdata\",\"object\",!0,!0);return p.version=u,p=JSON.stringify(p),h(),t(T?p:s.encodeJSON(p))}if(h(),\"svg\"===y)return t(T?r:s.encodeSVG(r));var d=document.createElement(\"canvas\");d.id=o.randstr(),c({format:y,width:n,height:f,scale:_,canvas:d,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.newPlot(k,r,A,M).then(S).then(E).then(L).then((function(e){t(function(t){return T?t.replace(s.IMAGE_URL_PREFIX,\"\"):t}(e))})).catch((function(t){e(t)}))}))}},{\"../lib\":503,\"../plots/plots\":619,\"../snapshot/helpers\":642,\"../snapshot/svgtoimg\":644,\"../snapshot/tosvg\":646,\"../version\":1119,\"./plot_api\":540,\"fast-isnumeric\":190}],547:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plots/plots\"),a=t(\"./plot_schema\"),o=t(\"./plot_config\").dfltConfig,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;hx.length&&i.push(d(\"unused\",a,v.concat(x.length)));var A,M,S,E,L,C=x.length,P=Array.isArray(k);if(P&&(C=Math.min(C,k.length)),2===b.dimensions)for(M=0;Mx[M].length&&i.push(d(\"unused\",a,v.concat(M,x[M].length)));var I=x[M].length;for(A=0;A<(P?Math.min(I,k[M].length):I);A++)S=P?k[M][A]:k,E=y[M][A],L=x[M][A],n.validate(E,S)?L!==E&&L!==+E&&i.push(d(\"dynamic\",a,v.concat(M,A),E,L)):i.push(d(\"value\",a,v.concat(M,A),E))}else i.push(d(\"array\",a,v.concat(M),y[M]));else for(M=0;M1&&p.push(d(\"object\",\"layout\"))),i.supplyDefaults(g);for(var m=g._fullData,v=r.length,y=0;y0&&Math.round(f)===f))return{vals:i};c=f}for(var h=e.calendar,p=\"start\"===l,d=\"end\"===l,g=t[r+\"period0\"],m=a(g,h)||0,v=[],y=[],x=[],b=i.length,_=0;_A;)k=o(k,-c,h);for(;k<=A;)k=o(k,c,h);T=o(k,-c,h)}else{for(k=m+(w=Math.round((A-m)/u))*u;k>A;)k-=u;for(;k<=A;)k+=u;T=k-u}v[_]=p?T:d?k:(T+k)/2,y[_]=T,x[_]=k}return{vals:v,starts:y,ends:x}}},{\"../../constants/numerical\":479,\"../../lib\":503,\"fast-isnumeric\":190}],552:[function(t,e,r){\"use strict\";e.exports={xaxis:{valType:\"subplotid\",dflt:\"x\",editType:\"calc+clearAxisTypes\"},yaxis:{valType:\"subplotid\",dflt:\"y\",editType:\"calc+clearAxisTypes\"}}},{}],553:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../lib\"),o=t(\"../../constants/numerical\").FP_SAFE,s=t(\"../../registry\"),l=t(\"../../components/drawing\"),c=t(\"./axis_ids\"),u=c.getFromId,f=c.isLinked;function h(t,e){var r,n,i=[],o=t._fullLayout,s=d(o,e,0),l=d(o,e,1),c=g(t,e),u=c.min,f=c.max;if(0===u.length||0===f.length)return a.simpleMap(e.range,e.r2l);var h=u[0].val,m=f[0].val;for(r=1;r0&&((T=E-s(x)-l(b))>L?k/T>C&&(_=x,w=b,C=k/T):k/E>C&&(_={val:x.val,nopad:1},w={val:b.val,nopad:1},C=k/E));if(h===m){var P=h-1,I=h+1;if(M)if(0===h)i=[0,1];else{var O=(h>0?f:u).reduce((function(t,e){return Math.max(t,l(e))}),0),z=h/(1-Math.min(.5,O/E));i=h>0?[0,z]:[z,0]}else i=S?[Math.max(0,P),Math.max(1,I)]:[P,I]}else M?(_.val>=0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:0,nopad:1})):S&&(_.val-C*s(_)<0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:1,nopad:1})),C=(w.val-_.val-p(e,x.val,b.val))/(E-s(_)-l(w)),i=[_.val-C*s(_),w.val+C*l(w)];return v&&i.reverse(),a.simpleMap(i,e.l2r||Number)}function p(t,e,r){var n=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),S=A((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=A(r.vpadplus||r.vpad),L=A(r.vpadminus||r.vpad);if(!T){if(h=1/0,p=-1/0,w)for(n=0;n0&&(h=a),a>p&&a-o&&(h=a),a>p&&a=I;n--)P(n);return{min:d,max:g,opts:r}},concatExtremes:g};function g(t,e,r){var n,i,a,o=e._id,s=t._fullData,l=t._fullLayout,c=[],f=[];function h(t,e){for(n=0;n=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 x(t){return i(t)&&Math.abs(t)=e}},{\"../../components/drawing\":388,\"../../constants/numerical\":479,\"../../lib\":503,\"../../registry\":638,\"./axis_ids\":558,\"@plotly/d3\":58,\"fast-isnumeric\":190}],554:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../plots/plots\"),o=t(\"../../registry\"),s=t(\"../../lib\"),l=s.strTranslate,c=t(\"../../lib/svg_text_utils\"),u=t(\"../../components/titles\"),f=t(\"../../components/color\"),h=t(\"../../components/drawing\"),p=t(\"./layout_attributes\"),d=t(\"./clean_ticks\"),g=t(\"../../constants/numerical\"),m=g.ONEMAXYEAR,v=g.ONEAVGYEAR,y=g.ONEMINYEAR,x=g.ONEMAXQUARTER,b=g.ONEAVGQUARTER,_=g.ONEMINQUARTER,w=g.ONEMAXMONTH,T=g.ONEAVGMONTH,k=g.ONEMINMONTH,A=g.ONEWEEK,M=g.ONEDAY,S=M/2,E=g.ONEHOUR,L=g.ONEMIN,C=g.ONESEC,P=g.MINUS_SIGN,I=g.BADNUM,O={K:\"zeroline\"},z={K:\"gridline\",L:\"path\"},D={K:\"tick\",L:\"path\"},R={K:\"tick\",L:\"text\"},F=t(\"../../constants/alignment\"),B=F.MID_SHIFT,N=F.CAP_SHIFT,j=F.LINE_SPACING,U=F.OPPOSITE_SIDE,V=e.exports={};V.setConvert=t(\"./set_convert\");var H=t(\"./axis_autotype\"),q=t(\"./axis_ids\"),G=q.idSort,Y=q.isLinked;V.id2name=q.id2name,V.name2id=q.name2id,V.cleanId=q.cleanId,V.list=q.list,V.listIds=q.listIds,V.getFromId=q.getFromId,V.getFromTrace=q.getFromTrace;var W=t(\"./autorange\");V.getAutoRange=W.getAutoRange,V.findExtremes=W.findExtremes;function X(t){var e=1e-4*(t[1]-t[0]);return[t[0]-e,t[1]+e]}V.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]||(\"string\"==typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(t){return t+\" domain\"}))),u[c]={valType:\"enumerated\",values:l.concat(a?\"string\"==typeof a?[a]:a:[]),dflt:i},s.coerce(t,e,u,c)},V.getRefType=function(t){return void 0===t?t:\"paper\"===t?\"paper\":\"pixel\"===t?\"pixel\":/( domain)$/.test(t)?\"domain\":\"range\"},V.coercePosition=function(t,e,r,n,i,a){var o,l;if(\"range\"!==V.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var c=V.getFromId(e,n);l=r(i,a=c.fraction2r(a)),o=c.cleanPos}t[i]=o(l)},V.cleanPosition=function(t,e,r){return(\"paper\"===r||\"pixel\"===r?s.ensureNumber:V.getFromId(e,r).cleanPos)(t)},V.redrawComponents=function(t,e){e=e||V.listIds(t);var r=t._fullLayout;function n(n,i,a,s){for(var l=o.getComponentMethod(n,i),c={},u=0;u2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},V.saveRangeInitial=function(t,e){for(var r=V.list(t,\"\",!0),n=!1,i=0;i.3*h||u(n)||u(a))){var p=r.dtick/2;t+=t+p.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=V.tickIncrement(t,\"M6\",\"reverse\")+1.5*M:a.exactMonths>.8?t=V.tickIncrement(t,\"M1\",\"reverse\")+15.5*M:t-=S;var l=V.tickIncrement(t,r);if(l<=n)return l}return t}(y,t,v,c,a)),m=y,0;m<=u;)m=V.tickIncrement(m,v,!1,a);return{start:e.c2r(y,0,a),end:e.c2r(m,0,a),size:v,_dataSpan:u-c}},V.prepTicks=function(t,e){var r=s.simpleMap(t.range,t.r2l,void 0,void 0,e);if(t._dtickInit=t.dtick,t._tick0Init=t.tick0,\"auto\"===t.tickmode||!t.dtick){var n,a=t.nticks;a||(\"category\"===t.type||\"multicategory\"===t.type?(n=t.tickfont?s.bigFont(t.tickfont.size||12):15,a=t._length/n):(n=\"y\"===t._id.charAt(0)?40:80,a=s.constrain(t._length/n,4,9)+1),\"radialaxis\"===t._name&&(a*=2)),\"array\"===t.tickmode&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,V.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}\"period\"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||\"M\"!==t.dtick.charAt(0))}var n=r(),a=V.getTickFormat(t);if(a){var o=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(e=E,o&&!n&&t.dticka&&f=o:d<=o;d=V.tickIncrement(d,t.dtick,l,t.calendar)){if(R++,t.rangebreaks&&!l){if(d=u)break}if(P.length>C||d===O)break;O=d;var F=!1;h&&d!==(0|d)&&(F=!0);var B={minor:F,value:d};L>1&&R%L&&(B.skipLabel=!0),P.push(B)}if(p&&function(t,e,r){for(var n=0;n0?(a=n-1,o=n):(a=n,o=n);var s,l=t[a].value,c=t[o].value,u=Math.abs(c-l),f=r||u,h=0;f>=y?h=u>=y&&u<=m?u:v:r===b&&f>=_?h=u>=_&&u<=x?u:b:f>=k?h=u>=k&&u<=w?u:T:r===A&&f>=A?h=A:f>=M?h=M:r===S&&f>=S?h=S:r===E&&f>=E&&(h=E),h>=u&&(h=u,s=!0);var p=i+h;if(e.rangebreaks&&h>0){for(var d=0,g=0;g<84;g++){var L=(g+.5)/84;e.maskBreaks(i*(1-L)+L*p)!==I&&d++}(h*=d/84)||(t[n].drop=!0),s&&u>A&&(h=u)}(h>0||0===n)&&(t[n].periodX=i+h/2)}}(P,t,t._definedDelta),t.rangebreaks){var N=\"y\"===t._id.charAt(0),j=1;\"auto\"===t.tickmode&&(j=t.tickfont?t.tickfont.size:12);var U=NaN;for(z=P.length-1;z>-1;z--)if(P[z].drop)P.splice(z,1);else{P[z].value=Mt(P[z].value,t);var H=t.c2p(P[z].value);(N?U>H-j:Uu||Gu&&(q.periodX=u),G10||\"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>=L&&a<=16||e>=E)t._tickround=\"M\";else if(e>=C&&a<=19||e>=L)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),u=void 0===t.minexponent?3:t.minexponent;Math.abs(c)>u&&(ut(t.exponentformat)&&!ft(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function lt(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}}V.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,0);var a=2*e;if(a>v)e/=v,r=n(10),t.dtick=\"M\"+12*ot(e,r,$);else if(a>T)e/=T,t.dtick=\"M\"+ot(e,1,tt);else if(a>M){t.dtick=ot(e,M,t._hasDayOfWeekBreaks?[1,2,7,14]:rt);var o=V.getTickFormat(t),l=\"period\"===t.ticklabelmode;l&&(t._rawTick0=t.tick0),/%[uVW]/.test(o)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),l&&(t._dowTick0=t.tick0)}else a>E?t.dtick=ot(e,E,tt):a>L?t.dtick=ot(e,L,et):a>C?t.dtick=ot(e,C,et):(r=n(10),t.dtick=ot(e,r,$))}else if(\"log\"===t.type){t.tick0=0;var c=s.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(c[1]-c[0])<1){var u=1.5*Math.abs((c[1]-c[0])/e);e=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/u,r=n(10),t.dtick=\"L\"+ot(e,r,$)}else t.dtick=e>.3?\"D2\":\"D1\"}else\"category\"===t.type||\"multicategory\"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):At(t)?(t.tick0=0,r=1,t.dtick=ot(e,r,at)):(t.tick0=0,r=n(10),t.dtick=ot(e,r,$));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&\"string\"!=typeof t.dtick){var f=t.dtick;throw t.dtick=1,\"ax.dtick error: \"+String(f)}},V.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return s.increment(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?it:nt,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)},V.tickFirst=function(t,e){var r=t.r2l||Number,a=s.simpleMap(t.range,r,void 0,void 0,e),o=a[1] \")}else t._prevDateHead=l,c+=\"
\"+l;e.text=c}(t,o,r,c):\"log\"===u?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=ht(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||ut(p)&&ft(f)?(e.text=0===f?1:1===f?\"10\":\"10\"+(f>1?\"\":P)+h+\"\",e.fontSize*=1.25):(\"e\"===p||\"E\"===p)&&h>2?e.text=\"1\"+p+(f>0?\"+\":P)+h:(e.text=ht(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,g):\"category\"===u?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=\"\");e.text=String(r)}(t,o):\"multicategory\"===u?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],a=void 0===i[1]?\"\":String(i[1]),o=void 0===i[0]?\"\":String(i[0]);r?e.text=o+\" - \"+a:(e.text=a,e.text2=o)}(t,o,r):At(t)?function(t,e,r,n,i){if(\"radians\"!==t.thetaunit||r)e.text=ht(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){for(var r=1;!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=ht(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=[\"\",o[0],\"\",\"\\u2044\",\"\",o[1],\"\",\"\\u03c0\"].join(\"\"),l&&(e.text=P+e.text)}}}}(t,o,r,c,g):function(t,e,r,n,i){\"never\"===i?i=\"\":\"all\"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i=\"hide\");e.text=ht(e.x,t,i,n)}(t,o,0,c,g),n||(t.tickprefix&&!d(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!d(t.showticksuffix)&&(o.text+=t.ticksuffix)),\"boundaries\"===t.tickson||t.showdividers){var m=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};o.xbnd=[m(o.x-.5),m(o.x+t.dtick-.5)]}return o},V.hoverLabelText=function(t,e,r){r&&(t=s.extendFlat({},t,{hoverformat:r}));var n=Array.isArray(e)?e[0]:e,i=Array.isArray(e)?e[1]:void 0;if(void 0!==i&&i!==n)return V.hoverLabelText(t,n,r)+\" - \"+V.hoverLabelText(t,i,r);var a=\"log\"===t.type&&n<=0,o=V.tickText(t,t.c2l(a?-n:n),\"hover\").text;return a?0===n?\"0\":P+o:o};var ct=[\"f\",\"p\",\"n\",\"\\u03bc\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\"];function ut(t){return\"SI\"===t||\"B\"===t}function ft(t){return t>14||t<-15}function ht(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||\"B\",c=e._tickexponent,u=V.getTickFormat(e),f=e.separatethousands;if(n){var h={exponentformat:l,minexponent:e.minexponent,dtick:\"none\"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:\"none\"===e.showexponent?e.range.map(e.r2d):[0,t||1]};st(h),o=(Number(h._tickround)||0)+4,c=h._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,P);var p,d=Math.pow(10,-o)/2;if(\"none\"===l&&(c=0),(t=Math.abs(t))\"+p+\"\":\"B\"===l&&9===c?t+=\"B\":ut(l)&&(t+=ct[c/3+5]));return a?P+t:t}function pt(t,e){for(var r=[],n={},i=0;i1&&r=i.min&&t=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=o(i)))){r=n;break}break;case\"log\":for(e=0;e0?r.bottom-f:0,h)))),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1];if(\"x\"===d){if(\"b\"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?f-r.top:0,h),p.reverse()),r.width>0){var m=r.right-(e._offset+e._length);m>0&&(n.xr=1,n.r=m);var v=e._offset-r.left;v>0&&(n.xl=0,n.l=v)}}else if(\"l\"===l?n[l]=e._depth=Math.max(r.height>0?f-r.left:0,h):(n[l]=e._depth=Math.max(r.height>0?r.right-f:0,h),p.reverse()),r.height>0){var y=r.bottom-(e._offset+e._length);y>0&&(n.yb=0,n.b=y);var x=e._offset-r.top;x>0&&(n.yt=1,n.t=x)}n[g]=\"free\"===e.anchor?e.position:e._anchorAxis.domain[p[0]],e.title.text!==c._dfltTitle[d]&&(n[l]+=mt(e)+(e.title.standoff||0)),e.mirror&&\"free\"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[u]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[u]+=h),!0===e.mirror||\"ticks\"===e.mirror?i[g]=e._anchorAxis.domain[p[1]]:\"all\"!==e.mirror&&\"allticks\"!==e.mirror||(i[g]=[e._counterDomainMin,e._counterDomainMax][p[1]]))}K&&(s=o.getComponentMethod(\"rangeslider\",\"autoMarginOpts\")(t,e)),a.autoMargin(t,xt(e),n),a.autoMargin(t,bt(e),i),a.autoMargin(t,_t(e),s)})),r.skipTitle||K&&\"bottom\"===e.side||Z.push((function(){return function(t,e){var r,n=t._fullLayout,i=e._id,a=i.charAt(0),o=e.title.font.size;if(e.title.hasOwnProperty(\"standoff\"))r=e._depth+e.title.standoff+mt(e);else{var s=St(e);if(\"multicategory\"===e.type)r=e._depth;else{var l=1.5*o;s&&(l=.5*o,\"outside\"===e.ticks&&(l+=e.ticklen)),r=10+l+(e.linewidth?e.linewidth-1:0)}s||(r+=\"x\"===a?\"top\"===e.side?o*(e.showticklabels?1:0):o*(e.showticklabels?1.5:.5):\"right\"===e.side?o*(e.showticklabels?1:.5):o*(e.showticklabels?.5:0))}var c,f,p,d,g=V.getPxPosition(t,e);\"x\"===a?(f=e._offset+e._length/2,p=\"top\"===e.side?g-r:g+r):(p=e._offset+e._length/2,f=\"right\"===e.side?g+r:g-r,c={rotate:\"-90\",offset:0});if(\"multicategory\"!==e.type){var m=e._selections[e._id+\"tick\"];if(d={selection:m,side:e.side},m&&m.node()&&m.node().parentNode){var v=h.getTranslate(m.node().parentNode);d.offsetLeft=v.x,d.offsetTop=v.y}e.title.hasOwnProperty(\"standoff\")&&(d.pad=0)}return u.draw(t,i+\"title\",{propContainer:e,propName:e._name+\".title.text\",placeholder:n._dfltTitle[a],avoid:d,transform:c,attributes:{x:f,y:p,\"text-anchor\":\"middle\"}})}(t,e)})),s.syncOrAsync(Z)}}function Q(t){var r=p+(t||\"tick\");return w[r]||(w[r]=function(t,e){var r,n,i,a;t._selections[e].size()?(r=1/0,n=-1/0,i=1/0,a=-1/0,t._selections[e].each((function(){var t=yt(this),e=h.bBox(t.node().parentNode);r=Math.min(r,e.top),n=Math.max(n,e.bottom),i=Math.min(i,e.left),a=Math.max(a,e.right)}))):(r=0,n=0,i=0,a=0);return{top:r,bottom:n,left:i,right:a,height:n-r,width:a-i}}(e,r)),w[r]}},V.getTickSigns=function(t){var e=t._id.charAt(0),r={x:\"top\",y:\"right\"}[e],n=t.side===r?1:-1,i=[-1,1,n,-n];return\"inside\"!==t.ticks==(\"x\"===e)&&(i=i.map((function(t){return-t}))),t.side&&i.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),i},V.makeTransTickFn=function(t){return\"x\"===t._id.charAt(0)?function(e){return l(t._offset+t.l2p(e.x),0)}:function(e){return l(0,t._offset+t.l2p(e.x))}},V.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||\"\",r=function(t){return-1!==e.indexOf(t)},n=r(\"top\"),i=r(\"left\"),a=r(\"right\"),o=r(\"bottom\"),s=r(\"inside\"),l=o||i||n||a;if(!l&&!s)return[0,0];var c=t.side,u=l?(t.tickwidth||0)/2:0,f=3,h=t.tickfont?t.tickfont.size:12;(o||n)&&(u+=h*N,f+=(t.linewidth||0)/2);(i||a)&&(u+=(t.linewidth||0)/2,f+=3);s&&\"top\"===c&&(f-=h*(1-N));(i||n)&&(u=-u);\"bottom\"!==c&&\"right\"!==c||(f=-f);return[l?u:0,s?f:0]}(t),r=e[0],n=e[1];return\"x\"===t._id.charAt(0)?function(e){return l(r+t._offset+t.l2p(dt(e)),n)}:function(e){return l(n,r+t._offset+t.l2p(dt(e)))}},V.makeTickPath=function(t,e,r,n){n=void 0!==n?n:t.ticklen;var i=t._id.charAt(0),a=(t.linewidth||1)/2;return\"x\"===i?\"M0,\"+(e+a*r)+\"v\"+n*r:\"M\"+(e+a*r)+\",0h\"+n*r},V.makeLabelFns=function(t,e,r){var n=t.ticklabelposition||\"\",a=function(t){return-1!==n.indexOf(t)},o=a(\"top\"),l=a(\"left\"),c=a(\"right\"),u=a(\"bottom\")||l||o||c,f=a(\"inside\"),h=\"inside\"===n&&\"inside\"===t.ticks||!f&&\"outside\"===t.ticks&&\"boundaries\"!==t.tickson,p=0,d=0,g=h?t.ticklen:0;if(f?g*=-1:u&&(g=0),h&&(p+=g,r)){var m=s.deg2rad(r);p=g*Math.cos(m)+1,d=g*Math.sin(m)}t.showticklabels&&(h||t.showline)&&(p+=.2*t.tickfont.size);var v,y,x,b,_,w={labelStandoff:p+=(t.linewidth||1)/2*(f?-1:1),labelShift:d},T=0,k=t.side,A=t._id.charAt(0),M=t.tickangle;if(\"x\"===A)b=(_=!f&&\"bottom\"===k||f&&\"top\"===k)?1:-1,f&&(b*=-1),v=d*b,y=e+p*b,x=_?1:-.2,90===Math.abs(M)&&(f?x+=B:x=-90===M&&\"bottom\"===k?N:90===M&&\"top\"===k?B:.5,T=B/2*(M/90)),w.xFn=function(t){return t.dx+v+T*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*x},w.anchorFn=function(t,e){if(u){if(l)return\"end\";if(c)return\"start\"}return i(e)&&0!==e&&180!==e?e*b<0!==f?\"end\":\"start\":\"middle\"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:\"top\"===t.side!==f?-n:0};else if(\"y\"===A){if(b=(_=!f&&\"left\"===k||f&&\"right\"===k)?1:-1,f&&(b*=-1),v=p,y=d*b,x=0,f||90!==Math.abs(M)||(x=-90===M&&\"left\"===k||90===M&&\"right\"===k?N:.5),f){var S=i(M)?+M:0;if(0!==S){var E=s.deg2rad(S);T=Math.abs(Math.sin(E))*N*b,x=0}}w.xFn=function(t){return t.dx+e-(v+t.fontSize*x)*b+T*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*B},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?\"middle\":_?\"end\":\"start\"},w.heightFn=function(e,r,n){return\"right\"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},V.drawTicks=function(t,e,r){r=r||{};var n=e._id+\"tick\",i=r.vals;\"period\"===e.ticklabelmode&&(i=i.slice()).shift();var a=r.layer.selectAll(\"path.\"+n).data(e.ticks?i:[],gt);a.exit().remove(),a.enter().append(\"path\").classed(n,1).classed(\"ticks\",1).classed(\"crisp\",!1!==r.crisp).call(f.stroke,e.tickcolor).style(\"stroke-width\",h.crispRound(t,e.tickwidth,1)+\"px\").attr(\"d\",r.path).style(\"display\",null),Et(e,[D]),a.attr(\"transform\",r.transFn)},V.drawGrid=function(t,e,r){r=r||{};var n=e._id+\"grid\",i=r.vals,a=r.counterAxis;if(!1===e.showgrid)i=[];else if(a&&V.shouldShowZeroLine(t,e,a))for(var o=\"array\"===e.tickmode,s=0;sp||a.leftp||a.top+(e.tickangle?0:t.fontSize/4)e[\"_visibleLabelMin_\"+r._id]?l.style(\"display\",\"none\"):\"tick\"!==t.K||i||l.style(\"display\",null)}))}))}))}))},x(v,m+1?m:g);var b=null;e._selections&&(e._selections[f]=v);var _=[function(){return y.length&&Promise.all(y)}];e.automargin&&a._redrawFromAutoMarginCount&&90===m?(b=90,_.push((function(){x(v,m)}))):_.push((function(){if(x(v,g),p.length&&\"x\"===u&&!i(g)&&(\"log\"!==e.type||\"D\"!==String(e.dtick).charAt(0))){b=0;var t,n=0,a=[];if(v.each((function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),i=yt(this),o=h.bBox(i.node());a.push({top:0,bottom:10,height:10,left:r-o.width/2,right:r+o.width/2+2,width:o.width+2})})),\"boundaries\"!==e.tickson&&!e.showdividers||r.secondary){var o=p.length,l=Math.abs((p[o-1].x-p[0].x)*e._m)/(o-1),c=e.ticklabelposition||\"\",f=function(t){return-1!==c.indexOf(t)},d=f(\"top\"),m=f(\"left\"),y=f(\"right\"),_=f(\"bottom\")||m||d||y?(e.tickwidth||0)+6:0,w=l<2.5*n||\"multicategory\"===e.type||\"realaxis\"===e._name;for(t=0;t1)for(n=1;n2*o}(i,e))return\"date\";var m=\"strict\"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=f(r),i=0,o=0,s={},u=0;u2*i}(i,m)?\"category\":function(t,e){for(var r=t.length,n=0;n=2){var l,c,u=\"\";if(2===o.length)for(l=0;l<2;l++)if(c=x(o[l])){u=g;break}var f=i(\"pattern\",u);if(f===g)for(l=0;l<2;l++)(c=x(o[l]))&&(e.bounds[l]=o[l]=c-1);if(f)for(l=0;l<2;l++)switch(c=o[l],f){case g:if(!n(c))return void(e.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(e.enabled=!1);e.bounds[l]=o[l]=c;break;case m:if(!n(c))return void(e.enabled=!1);if((c=+c)<0||c>24)return void(e.enabled=!1);e.bounds[l]=o[l]=c}if(!1===r.autorange){var h=r.range;if(h[0]h[1])return void(e.enabled=!1)}else if(o[0]>h[0]&&o[1]n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},r.ref2id=function(t){return!!/^[xyz]/.test(t)&&t.split(\" \")[0]},r.isLinked=function(t,e){return a(e,t._axisMatchGroups)||a(e,t._axisConstraintGroups)}},{\"../../registry\":638,\"./constants\":561}],559:[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;nn?i.substr(n):a.substr(r))+o:i+a+t*e:o}function m(t,e){for(var r=e._size,n=r.h/r.w,i={},a=Object.keys(t),o=0;oc*x)||T)for(r=0;rO&&FP&&(P=F);h/=(P-C)/(2*I),C=l.l2r(C),P=l.l2r(P),l.range=l._input.range=S=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function N(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\",c(r,n)).attr(\"d\",i+\"Z\")}function j(t,e,r){return t.append(\"path\").attr(\"class\",\"zoombox-corners\").style({fill:f.background,stroke:f.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"transform\",c(e,r)).attr(\"d\",\"M0,0Z\")}function U(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\"),V(t,e,i,a)}function V(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 H(t){n.select(t).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}function q(t){I&&t.data&&t._context.showTips&&(i.notifier(i._(t,\"Double-click to zoom back out\"),\"long\"),I=!1)}function G(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,P)/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 Y(t,e,r,n,a){for(var o,s,l,c,u=!1,f={},h={},p=(a||{}).xaHash,d=(a||{}).yaHash,g=0;g=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(H(i),2!==t||vt||qt(),mt)o.indexOf(\"select\")>-1&&S(r,i,J,K,e.id,Pt),o.indexOf(\"event\")>-1&&p.click(i,r,e.id);else if(1===t&&vt){var s=g?O:I,c=\"s\"===g||\"w\"===v?0:1,f=s._name+\".range[\"+c+\"]\",h=function(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return\"date\"===t.type?n:\"log\"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a(\".\"+r+\"g\")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a(\".\"+String(r)+\"g\")(n))}(s,c),d=\"left\",m=\"middle\";if(s.fixedrange)return;g?(m=\"n\"===g?\"top\":\"bottom\",\"right\"===s.side&&(d=\"right\")):\"e\"===v&&(d=\"right\"),i._context.showAxisRangeEntryBoxes&&n.select(bt).call(u.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(h),fill:s.tickfont?s.tickfont.color:\"#444\",horizontalAlign:d,verticalAlign:m}).on(\"edit\",(function(t){var e=s.d2r(t);void 0!==e&&l.call(\"_guiRelayout\",i,f,e)}))}}}function zt(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(tt,pt*e+_t)),i=Math.max(0,Math.min(et,dt*r+wt)),a=Math.abs(n-_t),o=Math.abs(i-wt);function s(){St=\"\",Tt.r=Tt.l,Tt.t=Tt.b,Lt.attr(\"d\",\"M0,0Z\")}if(Tt.l=Math.min(_t,n),Tt.r=Math.max(_t,n),Tt.t=Math.min(wt,i),Tt.b=Math.max(wt,i),rt.isSubplotConstrained)a>P||o>P?(St=\"xy\",a/tt>o/et?(o=a*et/tt,wt>i?Tt.t=wt-o:Tt.b=wt+o):(a=o*tt/et,_t>n?Tt.l=_t-a:Tt.r=_t+a),Lt.attr(\"d\",G(Tt))):s();else if(nt.isSubplotConstrained)if(a>P||o>P){St=\"xy\";var l=Math.min(Tt.l/tt,(et-Tt.b)/et),c=Math.max(Tt.r/tt,(et-Tt.t)/et);Tt.l=l*tt,Tt.r=c*tt,Tt.b=(1-l)*et,Tt.t=(1-c)*et,Lt.attr(\"d\",G(Tt))}else s();else!at||o0){var u;if(nt.isSubplotConstrained||!it&&1===at.length){for(u=0;ug[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s)}return r(\"layer\"),e}},{\"../../lib\":503,\"fast-isnumeric\":190}],573:[function(t,e,r){\"use strict\";var n=t(\"./show_dflt\");e.exports=function(t,e,r,i,a){a||(a={});var o=a.tickSuffixDflt,s=n(t);r(\"tickprefix\")&&r(\"showtickprefix\",s),r(\"ticksuffix\",o)&&r(\"showticksuffix\",s)}},{\"./show_dflt\":577}],574:[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)],t.setScale()}},{\"../../constants/alignment\":471}],575:[function(t,e,r){\"use strict\";var n=t(\"polybooljs\"),i=t(\"../../registry\"),a=t(\"../../components/drawing\").dashStyle,o=t(\"../../components/color\"),s=t(\"../../components/fx\"),l=t(\"../../components/fx/helpers\").makeEventData,c=t(\"../../components/dragelement/helpers\"),u=c.freeMode,f=c.rectMode,h=c.drawMode,p=c.openMode,d=c.selectMode,g=t(\"../../components/shapes/draw_newshape/display_outlines\"),m=t(\"../../components/shapes/draw_newshape/helpers\").handleEllipse,v=t(\"../../components/shapes/draw_newshape/newshapes\"),y=t(\"../../lib\"),x=t(\"../../lib/polygon\"),b=t(\"../../lib/throttle\"),_=t(\"./axis_ids\").getFromId,w=t(\"../../lib/clear_gl_canvases\"),T=t(\"../../plot_api/subroutines\").redrawReglTraces,k=t(\"./constants\"),A=k.MINSELECT,M=x.filter,S=x.tester,E=t(\"./handle_outline\").clearSelect,L=t(\"./helpers\"),C=L.p2r,P=L.axValue,I=L.getTransform;function O(t,e,r,n,i,a,o){var s,l,c,u,f,h,d,m,v,y=e._hoverdata,x=e._fullLayout.clickmode.indexOf(\"event\")>-1,b=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(y)){F(t,e,a);var _=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n0?function(t,e){var r,n,i,a=[];for(i=0;i0&&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;i1)return!1;if((i+=r.selectedpoints.length)>1)return!1}return 1===i}(s)&&(h=j(_))){for(o&&o.remove(),v=0;v=0&&n._fullLayout._deactivateShape(n),h(e)){var a=n._fullLayout._zoomlayer.selectAll(\".select-outline-\"+r.id);if(a&&n._fullLayout._drawing){var o=v(a,t);o&&i.call(\"_guiRelayout\",n,{shapes:o}),n._fullLayout._drawing=!1}}r.selection={},r.selection.selectionDefs=t.selectionDefs=[],r.selection.mergedPolygons=t.mergedPolygons=[]}function N(t,e,r,n){var i,a,o,s=[],l=e.map((function(t){return t._id})),c=r.map((function(t){return t._id}));for(o=0;o0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function U(t,e,r){var n,a,o,s;for(n=0;n=0)L._fullLayout._deactivateShape(L);else if(!_){var r=z.clickmode;b.done(gt).then((function(){if(b.clear(gt),2===t){for(ft.remove(),$=0;$-1&&O(e,L,i.xaxes,i.yaxes,i.subplot,i,ft),\"event\"===r&&L.emit(\"plotly_selected\",void 0);s.click(L,e)})).catch(y.error)}},i.doneFn=function(){dt.remove(),b.done(gt).then((function(){b.clear(gt),i.gd.emit(\"plotly_selected\",et),Q&&i.selectionDefs&&(Q.subtract=ut,i.selectionDefs.push(Q),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,K)),i.doneFnCompleted&&i.doneFnCompleted(mt)})).catch(y.error),_&&B(i)}},clearSelect:E,clearSelectionsCache:B,selectOnClick:O}},{\"../../components/color\":366,\"../../components/dragelement/helpers\":384,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../components/fx/helpers\":402,\"../../components/shapes/draw_newshape/display_outlines\":454,\"../../components/shapes/draw_newshape/helpers\":455,\"../../components/shapes/draw_newshape/newshapes\":456,\"../../lib\":503,\"../../lib/clear_gl_canvases\":487,\"../../lib/polygon\":515,\"../../lib/throttle\":530,\"../../plot_api/subroutines\":544,\"../../registry\":638,\"./axis_ids\":558,\"./constants\":561,\"./handle_outline\":565,\"./helpers\":566,polybooljs:254}],576:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-time-format\").utcFormat,a=t(\"../../lib\"),o=a.numberFormat,s=t(\"fast-isnumeric\"),l=a.cleanNumber,c=a.ms2DateTime,u=a.dateTime2ms,f=a.ensureNumber,h=a.isArrayOrTypedArray,p=t(\"../../constants/numerical\"),d=p.FP_SAFE,g=p.BADNUM,m=p.LOG_CLIP,v=p.ONEWEEK,y=p.ONEDAY,x=p.ONEHOUR,b=p.ONEMIN,_=p.ONESEC,w=t(\"./axis_ids\"),T=t(\"./constants\"),k=T.HOUR_PATTERN,A=T.WEEKDAY_PATTERN;function M(t){return Math.pow(10,t)}function S(t){return null!=t}e.exports=function(t,e){e=e||{};var r=t._id||\"x\",p=r.charAt(0);function E(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*m*Math.abs(n-i))}return g}function L(e,r,n,i){if((i||{}).msUTC&&s(e))return+e;var o=u(e,n||t.calendar);if(o===g){if(!s(e))return g;e=+e;var l=Math.floor(10*a.mod(e+.05,1)),c=Math.round(e-l/10);o=u(new Date(c))+l/10}return o}function C(e,r,n){return c(e,r,n||t.calendar)}function P(e){return t._categories[Math.round(e)]}function I(e){if(S(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push(\"number\"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return g}function O(e){if(t._categoriesMap)return t._categoriesMap[e]}function z(t){var e=O(t);return void 0!==e?e:s(t)?+t:void 0}function D(t){return s(t)?+t:O(t)}function R(t,e,r){return n.round(r+e*t,2)}function F(t,e,r){return(t-r)/e}var B=function(e){return s(e)?R(e,t._m,t._b):g},N=function(e){return F(e,t._m,t._b)};if(t.rangebreaks){var j=\"y\"===p;B=function(e){if(!s(e))return g;var r=t._rangebreaks.length;if(!r)return R(e,t._m,t._b);var n=j;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,a=i*e,o=0,l=0;lu)){o=a<(c+u)/2?l:l+1;break}o=l+1}var f=t._B[o]||0;return isFinite(f)?R(e,t._m2,f):0},N=function(e){var r=t._rangebreaks.length;if(!r)return F(e,t._m,t._b);for(var n=0,i=0;it._rangebreaks[i].pmax&&(n=i+1);return F(e,t._m2,t._B[n])}}t.c2l=\"log\"===t.type?E:f,t.l2c=\"log\"===t.type?M:f,t.l2p=B,t.p2l=N,t.c2p=\"log\"===t.type?function(t,e){return B(E(t,e))}:B,t.p2c=\"log\"===t.type?function(t){return M(N(t))}:N,-1!==[\"linear\",\"-\"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=f,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=N,t.cleanPos=f):\"log\"===t.type?(t.d2r=t.d2l=function(t,e){return E(l(t),e)},t.r2d=t.r2c=function(t){return M(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=f,t.c2r=E,t.l2d=M,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return M(N(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=N,t.cleanPos=f):\"date\"===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=L,t.c2d=t.c2r=t.l2d=t.l2r=C,t.d2p=t.r2p=function(e,r,n){return t.l2p(L(e,0,n))},t.p2d=t.p2r=function(t,e,r){return C(N(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,g,t.calendar)}):\"category\"===t.type?(t.d2c=t.d2l=I,t.r2d=t.c2d=t.l2d=P,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=D(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=f,t.r2l=D,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return\"string\"==typeof t&&\"\"!==t?t:f(t)}):\"multicategory\"===t.type&&(t.r2d=t.c2d=t.l2d=P,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=z(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=O,t.l2r=t.c2r=f,t.r2l=z,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return Array.isArray(t)||\"string\"==typeof t&&\"\"!==t?t:f(t)},t.setupMultiCategory=function(n){var i,o,s=t._traceIndices,l=t._matchGroup;if(l&&0===t._categories.length)for(var c in l)if(c!==r){var u=e[w.id2name(c)];s=s.concat(u._traceIndices)}var f=[[0,{}],[0,{}]],d=[];for(i=0;id&&(o[n]=d),o[0]===o[1]){var c=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=c,o[1]+=c}}else a.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=w.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?\"_r\":\"range\",o=t.calendar;t.cleanRange(a);var s,l,c=t.r2l(t[a][0],o),u=t.r2l(t[a][1],o),f=\"y\"===p;if((f?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks)&&(t._rangebreaks=t.locateBreaks(Math.min(c,u),Math.max(c,u)),t._rangebreaks.length)){for(s=0;su&&(h=!h),h&&t._rangebreaks.reverse();var d=h?-1:1;for(t._m2=d*t._length/(Math.abs(u-c)-t._lBreaks),t._B.push(-t._m2*(f?u:c)),s=0;si&&(i+=7,oi&&(i+=24,o=n&&o=n&&e=s.min&&(ts.max&&(s.max=n),i=!1)}i&&c.push({min:t,max:n})}};for(n=0;nr.duration?(!function(){for(var r={},n=0;n rect\").call(o.setTranslate,0,0).call(o.setScale,1,1),t.plot.call(o.setTranslate,e._offset,r._offset).call(o.setScale,1,1);var n=t.plot.selectAll(\".scatterlayer .trace\");n.selectAll(\".point\").call(o.setPointGroupScale,1,1),n.selectAll(\".textpoint\").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,t)}function m(e,r){var n=e.plotinfo,i=n.xaxis,l=n.yaxis,c=i._length,u=l._length,f=!!e.xr1,h=!!e.yr1,p=[];if(f){var d=a.simpleMap(e.xr0,i.r2l),g=a.simpleMap(e.xr1,i.r2l),m=d[1]-d[0],v=g[1]-g[0];p[0]=(d[0]*(1-r)+r*g[0]-d[0])/(d[1]-d[0])*c,p[2]=c*(1-r+r*v/m),i.range[0]=i.l2r(d[0]*(1-r)+r*g[0]),i.range[1]=i.l2r(d[1]*(1-r)+r*g[1])}else p[0]=0,p[2]=c;if(h){var y=a.simpleMap(e.yr0,l.r2l),x=a.simpleMap(e.yr1,l.r2l),b=y[1]-y[0],_=x[1]-x[0];p[1]=(y[1]*(1-r)+r*x[1]-y[1])/(y[0]-y[1])*u,p[3]=u*(1-r+r*_/b),l.range[0]=i.l2r(y[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(y[1]*(1-r)+r*x[1])}else p[1]=0,p[3]=u;s.drawOne(t,i,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[i._id,l._id]);var w=f?c/p[2]:1,T=h?u/p[3]:1,k=f?p[0]:0,A=h?p[1]:0,M=f?p[0]/p[2]*c:0,S=h?p[1]/p[3]*u:0,E=i._offset-M,L=l._offset-S;n.clipRect.call(o.setTranslate,k,A).call(o.setScale,1/w,1/T),n.plot.call(o.setTranslate,E,L).call(o.setScale,w,T),o.setPointGroupScale(n.zoomScalePts,1/w,1/T),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}s.redrawComponents(t)}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../registry\":638,\"./axes\":554,\"@plotly/d3\":58}],582:[function(t,e,r){\"use strict\";var n=t(\"../../registry\").traceIs,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(t,\"box-violin\"),o=n(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(\"autotypenumbers\",s.autotypenumbersDflt),\"-\"===r(\"type\",(s.splomStash||{}).type)&&(!function(t,e){if(\"-\"!==t.type)return;var r,s=t._id,l=s.charAt(0);-1!==s.indexOf(\"scene\")&&(s=l);var c=function(t,e,r){for(var n=0;n0&&(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,s,l);if(!c)return;if(\"histogram\"===c.type&&l==={v:\"y\",h:\"x\"}[c.orientation||\"v\"])return void(t.type=\"linear\");var u=l+\"calendar\",f=c[u],h={noMultiCategory:!n(c,\"cartesian\")||n(c,\"noMultiCategory\")};\"box\"===c.type&&c._hasPreCompStats&&l==={h:\"x\",v:\"y\"}[c.orientation||\"v\"]&&(h.noMultiCategory=!0);if(h.autotypenumbers=t.autotypenumbers,o(c,l)){var p=a(c),d=[];for(r=0;r0?\".\":\"\")+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;f0&&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]]]}}e.exports=function(t){return new M(t)},S.plot=function(t,e,r){var n=this,i=e[this.id],a=[],o=!1;for(var s in w.layerNameToAdjective)if(\"frame\"!==s&&i[\"show\"+s]){o=!0;break}for(var l=0;l0&&a._module.calcGeoJSON(i,e)}if(!this.updateProjection(t,e)){this.viewInitial&&this.scope===r.scope||this.saveViewInitial(r),this.scope=r.scope,this.updateBaseLayers(e,r),this.updateDims(e,r),this.updateFx(e,r),d.generalUpdatePerTraceModule(this.graphDiv,this,t,r);var o=this.layers.frontplot.select(\".scatterlayer\");this.dataPoints.point=o.selectAll(\".point\"),this.dataPoints.text=o.selectAll(\"text\"),this.dataPaths.line=o.selectAll(\".js-line\");var s=this.layers.backplot.select(\".choroplethlayer\");this.dataPaths.choropleth=s.selectAll(\"path\"),this.render()}},S.updateProjection=function(t,e){var r=this.graphDiv,n=e[this.id],l=e._size,u=n.domain,f=n.projection,h=n.lonaxis,p=n.lataxis,d=h._ax,g=p._ax,v=this.projection=function(t){var e=t.projection,r=e.type,n=w.projNames[r];n=\"geo\"+c.titleCase(n);for(var l=(i[n]||s[n])(),u=t._isSatellite?180*Math.acos(1/e.distance)/Math.PI:t._isClipped?w.lonaxisSpan[r]/2:null,f=[\"center\",\"rotate\",\"parallels\",\"clipExtent\"],h=function(t){return t?l:[]},p=0;pu*Math.PI/180}return!1},l.getPath=function(){return a().projection(l)},l.getBounds=function(t){return l.getPath().bounds(t)},l.precision(w.precision),t._isSatellite&&l.tilt(e.tilt).distance(e.distance);u&&l.clipAngle(u-w.clipPad);return l}(n),y=[[l.l+l.w*u.x[0],l.t+l.h*(1-u.y[1])],[l.l+l.w*u.x[1],l.t+l.h*(1-u.y[0])]],x=n.center||{},b=f.rotation||{},_=h.range||[],T=p.range||[];if(n.fitbounds){d._length=y[1][0]-y[0][0],g._length=y[1][1]-y[0][1],d.range=m(r,d),g.range=m(r,g);var k=(d.range[0]+d.range[1])/2,A=(g.range[0]+g.range[1])/2;if(n._isScoped)x={lon:k,lat:A};else if(n._isClipped){x={lon:k,lat:A},b={lon:k,lat:A,roll:b.roll};var M=f.type,S=w.lonaxisSpan[M]/2||180,L=w.lataxisSpan[M]/2||90;_=[k-S,k+S],T=[A-L,A+L]}else x={lon:k,lat:A},b={lon:k,lat:b.lat,roll:b.roll}}v.center([x.lon-b.lon,x.lat-b.lat]).rotate([-b.lon,-b.lat,b.roll]).parallels(f.parallels);var C=E(_,T);v.fitExtent(y,C);var P=this.bounds=v.getBounds(C),I=this.fitScale=v.scale(),O=v.translate();if(n.fitbounds){var z=v.getBounds(E(d.range,g.range)),D=Math.min((P[1][0]-P[0][0])/(z[1][0]-z[0][0]),(P[1][1]-P[0][1])/(z[1][1]-z[0][1]));isFinite(D)?v.scale(D*I):c.warn(\"Something went wrong during\"+this.id+\"fitbounds computations.\")}else v.scale(f.scale*I);var R=this.midPt=[(P[0][0]+P[1][0])/2,(P[0][1]+P[1][1])/2];if(v.translate([O[0]+(R[0]-O[0]),O[1]+(R[1]-O[1])]).clipExtent(P),n._isAlbersUsa){var F=v([x.lon,x.lat]),B=v.translate();v.translate([B[0]-(F[0]-B[0]),B[1]-(F[1]-B[1])])}},S.updateBaseLayers=function(t,e){var r=this,i=r.topojson,a=r.layers,o=r.basePaths;function s(t){return\"lonaxis\"===t||\"lataxis\"===t}function l(t){return Boolean(w.lineLayers[t])}function c(t){return Boolean(w.fillLayers[t])}var u=(this.hasChoropleth?w.layersForChoropleth:w.layers).filter((function(t){return l(t)||c(t)?e[\"show\"+t]:!s(t)||e[t].showgrid})),p=r.framework.selectAll(\".layer\").data(u,String);p.exit().each((function(t){delete a[t],delete o[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\"):s(t)?o[t]=e.append(\"path\").style(\"fill\",\"none\"):\"backplot\"===t?e.append(\"g\").classed(\"choroplethlayer\",!0):\"frontplot\"===t?e.append(\"g\").classed(\"scatterlayer\",!0):l(t)?o[t]=e.append(\"path\").style(\"fill\",\"none\").style(\"stroke-miterlimit\",2):c(t)&&(o[t]=e.append(\"path\").style(\"stroke\",\"none\"))})),p.order(),p.each((function(r){var n=o[r],a=w.layerNameToAdjective[r];\"frame\"===r?n.datum(w.sphereSVG):l(r)||c(r)?n.datum(A(i,i.objects[r])):s(r)&&n.datum(function(t,e,r){var n,i,a,o=e[t],s=w.scopeDefaults[e.scope];\"lonaxis\"===t?(n=s.lonaxisRange,i=s.lataxisRange,a=function(t,e){return[t,e]}):\"lataxis\"===t&&(n=s.lataxisRange,i=s.lonaxisRange,a=function(t,e){return[e,t]});var l={type:\"linear\",range:[n[0],n[1]-1e-6],tick0:o.tick0,dtick:o.dtick};g.setConvert(l,r);var c=g.calcTicks(l);e.isScoped||\"lonaxis\"!==t||c.pop();for(var u=c.length,f=new Array(u),h=0;h-1&&b(n.event,i,[r.xaxis],[r.yaxis],r.id,f),s.indexOf(\"event\")>-1&&p.click(i,n.event))}))}function h(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},S.makeFramework=function(){var t=this,e=t.graphDiv,r=e._fullLayout,i=\"clip\"+r._uid+t.id;t.clipDef=r._clips.append(\"clipPath\").attr(\"id\",i),t.clipRect=t.clipDef.append(\"rect\"),t.framework=n.select(t.container).append(\"g\").attr(\"class\",\"geo \"+t.id).call(h.setClipUrl,i,e),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\"},g.setConvert(t.mockAxis,r)},S.saveViewInitial=function(t){var e,r=t.center||{},n=t.projection,i=n.rotation||{};this.viewInitial={fitbounds:t.fitbounds,\"projection.scale\":n.scale},e=t._isScoped?{\"center.lon\":r.lon,\"center.lat\":r.lat}:t._isClipped?{\"projection.rotation.lon\":i.lon,\"projection.rotation.lat\":i.lat}:{\"center.lon\":r.lon,\"center.lat\":r.lat,\"projection.rotation.lon\":i.lon},c.extendFlat(this.viewInitial,e)},S.render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?u(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\":366,\"../../components/dragelement\":385,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/geo_location_utils\":496,\"../../lib/topojson_utils\":532,\"../../registry\":638,\"../cartesian/autorange\":553,\"../cartesian/axes\":554,\"../cartesian/select\":575,\"../plots\":619,\"./constants\":587,\"./zoom\":592,\"@plotly/d3\":58,\"d3-geo\":114,\"d3-geo-projection\":113,\"topojson-client\":315}],589:[function(t,e,r){\"use strict\";var n=t(\"../../plots/get_data\").getSubplotCalcData,i=t(\"../../lib\").counterRegex,a=t(\"./geo\"),o=\"geo\",s=i(o),l={};l.geo={valType:\"subplotid\",dflt:o,editType:\"calc\"},e.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:t(\"./layout_attributes\"),supplyLayoutDefaults:t(\"./layout_defaults\"),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots.geo,s=0;s0&&P<0&&(P+=360);var I,O,z,D=(C+P)/2;if(!p){var R=d?f.projRotate:[D,0,0];I=r(\"projection.rotation.lon\",R[0]),r(\"projection.rotation.lat\",R[1]),r(\"projection.rotation.roll\",R[2]),r(\"showcoastlines\",!d&&x)&&(r(\"coastlinecolor\"),r(\"coastlinewidth\")),r(\"showocean\",!!x&&void 0)&&r(\"oceancolor\")}(p?(O=-96.6,z=38.7):(O=d?D:I,z=(L[0]+L[1])/2),r(\"center.lon\",O),r(\"center.lat\",z),g&&(r(\"projection.tilt\"),r(\"projection.distance\")),m)&&r(\"projection.parallels\",f.projParallels||[0,60]);r(\"projection.scale\"),r(\"showland\",!!x&&void 0)&&r(\"landcolor\"),r(\"showlakes\",!!x&&void 0)&&r(\"lakecolor\"),r(\"showrivers\",!!x&&void 0)&&(r(\"rivercolor\"),r(\"riverwidth\")),r(\"showcountries\",d&&\"usa\"!==u&&x)&&(r(\"countrycolor\"),r(\"countrywidth\")),(\"usa\"===u||\"north america\"===u&&50===c)&&(r(\"showsubunits\",x),r(\"subunitcolor\"),r(\"subunitwidth\")),d||r(\"showframe\",x)&&(r(\"framecolor\"),r(\"framewidth\")),r(\"bgcolor\"),r(\"fitbounds\")&&(delete e.projection.scale,d?(delete e.center.lon,delete e.center.lat):v?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}e.exports=function(t,e,r){i(t,e,r,{type:\"geo\",attributes:s,handleDefaults:c,fullData:r,partition:\"y\"})}},{\"../../lib\":503,\"../get_data\":593,\"../subplot_defaults\":632,\"./constants\":587,\"./layout_attributes\":590}],592:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../registry\"),o=Math.PI/180,s=180/Math.PI,l={cursor:\"pointer\"},c={cursor:\"auto\"};function u(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function f(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],c=o._fullLayout,u=c[n],f={},h={};function p(t,e){f[n+\".\"+t]=i.nestedProperty(l,t).get(),a.call(\"_storeDirectGUIEdit\",s,c._preGUI,f);var r=i.nestedProperty(u,t);r.get()!==e&&(r.set(e),i.nestedProperty(l,t).set(e),h[n+\".\"+t]=e)}r(p),p(\"projection.scale\",e.scale()/t.fitScale),p(\"fitbounds\",!1),o.emit(\"plotly_relayout\",h)}function h(t,e){var r=u(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(l)})).on(\"zoom\",(function(){e.scale(n.event.scale).translate(n.event.translate),t.render();var r=e.invert(t.midPt);t.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":e.scale()/t.fitScale,\"geo.center.lon\":r[0],\"geo.center.lat\":r[1]})})).on(\"zoomend\",(function(){n.select(this).style(c),f(t,e,i)})),r}function p(t,e){var r,i,a,o,s,h,p,d,g,m=u(0,e);function v(t){return e.invert(t)}function y(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 m.on(\"zoomstart\",(function(){n.select(this).style(l),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,s=v(r)})).on(\"zoom\",(function(){if(h=n.mouse(this),function(t){var r=v(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>2||Math.abs(n[1]-t[1])>2}(r))return m.scale(e.scale()),void m.translate(e.translate());e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),s?v(h)&&(d=v(h),p=[o[0]+(d[0]-s[0]),i[1],i[2]],e.rotate(p),o=p):s=v(r=h),g=!0,t.render();var l=e.rotate(),c=e.invert(t.midPt);t.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":e.scale()/t.fitScale,\"geo.center.lon\":c[0],\"geo.center.lat\":c[1],\"geo.projection.rotation.lon\":-l[0]})})).on(\"zoomend\",(function(){n.select(this).style(c),g&&f(t,e,y)})),m}function d(t,e){var r,i={r:e.rotate(),k:e.scale()},a=u(0,e),o=function(t){var e=0,r=arguments.length,i=[];for(;++ed?(a=(f>0?90:-90)-p,i=0):(a=Math.asin(f/d)*s-p,i=Math.sqrt(d*d-f*f));var g=180-a-2*p,m=(Math.atan2(h,u)-Math.atan2(c,i))*s,v=(Math.atan2(h,u)-Math.atan2(c,-i))*s;return b(r[0],r[1],a,m)<=b(r[0],r[1],g,v)?[a,m,r[2]]:[g,v,r[2]]}function b(t,e,r,n){var i=_(r-t),a=_(n-e);return Math.sqrt(i*i+a*a)}function _(t){return(t%360+540)%360-180}function w(t,e,r){var n=r*o,i=t.slice(),a=0===e?1:0,s=2===e?1:2,l=Math.cos(n),c=Math.sin(n);return i[a]=t[a]*l-t[s]*c,i[s]=t[s]*l+t[a]*c,i}function T(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*s,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*s]}function k(t,e){for(var r=0,n=0,i=t.length;nMath.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(a)*_*(s>=0?1:-1),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[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&&(m(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&&(m(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).999&&(g=\"turntable\"):g=\"turntable\")}else g=\"turntable\";r(\"dragmode\",g),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:u,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{\"../../../components/color\":366,\"../../../lib\":503,\"../../../registry\":638,\"../../get_data\":593,\"../../subplot_defaults\":632,\"./axis_defaults\":601,\"./layout_attributes\":604}],604:[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),{}),projection:{type:{valType:\"enumerated\",values:[\"perspective\",\"orthographic\"],dflt:\"perspective\",editType:\"calc\"},editType:\"calc\"},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],editType:\"plot\"},hovermode:{valType:\"enumerated\",values:[\"closest\",!1],dflt:\"closest\",editType:\"modebar\"},uirevision:{valType:\"any\",editType:\"none\"},editType:\"plot\",_deprecated:{cameraposition:{valType:\"info_array\",editType:\"camera\"}}}},{\"../../../lib\":503,\"../../../lib/extend\":493,\"../../domain\":584,\"./axis_attributes\":600}],605:[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\":528}],606:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[a[c]];if(u._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/t.dataScale[c],Math.abs(u._length)===1/0||isNaN(u._length))l[c]=[];else{u._input_range=u.range.slice(),u.range[0]=r[c].lo/t.dataScale[c],u.range[1]=r[c].hi/t.dataScale[c],u._m=1/(t.dataScale[c]*r[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var f=u.tickmode;if(\"auto\"===u.tickmode){u.tickmode=\"linear\";var h=u.nticks||i.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/h)}for(var p=n.calcTicks(u,{msUTC:!0}),d=0;d/g,\" \"));l[c]=p,u.tickmode=f}}e.ticks=l;for(c=0;c<3;++c){o[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]);for(d=0;d<2;++d)e.bounds[d][c]=t.glplot.bounds[d][c]}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;ar.deltaY?1.1:1/1.1,a=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(t)}}),!!c&&{passive:!1}),t.glplot.canvas.addEventListener(\"mousemove\",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit(\"plotly_relayouting\",e)}})),t.staticMode||t.glplot.canvas.addEventListener(\"webglcontextlost\",(function(r){e&&e.emit&&e.emit(\"plotly_webglcontextlost\",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},w.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,\"viewBox\",\"0 0 \"+s+\" \"+l),n.setAttributeNS(null,\"width\",s),n.setAttributeNS(null,\"height\",l),b(e),e.glplot.axes.update(e.axesOptions);for(var c=Object.keys(e.traces),u=null,h=e.glplot.selection,g=0;g\")):\"isosurface\"===t.type||\"volume\"===t.type?(T.valueLabel=p.hoverLabelText(e._mockAxis,e._mockAxis.d2l(h.traceCoordinate[3]),t.valuehoverformat),S.push(\"value: \"+T.valueLabel),h.textLabel&&S.push(h.textLabel),x=S.join(\"
\")):x=h.textLabel;var E={x:h.traceCoordinate[0],y:h.traceCoordinate[1],z:h.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:w};d.appendArrayPointValue(E,_,w),t._module.eventData&&(E=_._module.eventData(E,h,_,{},w));var L={points:[E]};if(e.fullSceneLayout.hovermode){var C=[];d.loneHover({trace:_,x:(.5+.5*y[0]/y[3])*s,y:(.5-.5*y[1]/y[3])*l,xLabel:T.xLabel,yLabel:T.yLabel,zLabel:T.zLabel,text:x,name:u.name,color:d.castHoverOption(_,w,\"bgcolor\")||u.color,borderColor:d.castHoverOption(_,w,\"bordercolor\"),fontFamily:d.castHoverOption(_,w,\"font.family\"),fontSize:d.castHoverOption(_,w,\"font.size\"),fontColor:d.castHoverOption(_,w,\"font.color\"),nameLength:d.castHoverOption(_,w,\"namelength\"),textAlign:d.castHoverOption(_,w,\"align\"),hovertemplate:f.castOption(_,w,\"hovertemplate\"),hovertemplateLabels:f.extendFlat({},E,T),eventData:[E]},{container:n,gd:r,inOut_bbox:C}),E.bbox=C[0]}h.buttons&&h.distance<5?r.emit(\"plotly_click\",L):r.emit(\"plotly_hover\",L),this.oldEventData=L}else d.loneUnhover(n),this.oldEventData&&r.emit(\"plotly_unhover\",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)},w.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):f.error(\"Catastrophic and unrecoverable WebGL error. Context lost.\")};requestAnimationFrame(e)};var k=[\"xaxis\",\"yaxis\",\"zaxis\"];function A(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var a=k[i],o=a.charAt(0),s=n[a],l=e[o],c=e[o+\"calendar\"],u=e[\"_\"+o+\"length\"];if(f.isArrayOrTypedArray(l))for(var h,p=0;p<(u||l.length);p++)if(f.isArrayOrTypedArray(l[p]))for(var d=0;dm[1][a])m[0][a]=-1,m[1][a]=1;else{var L=m[1][a]-m[0][a];m[0][a]-=L/32,m[1][a]+=L/32}if(\"reversed\"===s.autorange){var C=m[0][a];m[0][a]=m[1][a],m[1][a]=C}}else{var P=s.range;m[0][a]=s.r2l(P[0]),m[1][a]=s.r2l(P[1])}m[0][a]===m[1][a]&&(m[0][a]-=1,m[1][a]+=1),v[a]=m[1][a]-m[0][a],this.glplot.setBounds(a,{min:m[0][a]*h[a],max:m[1][a]*h[a]})}var I=c.aspectmode;if(\"cube\"===I)d=[1,1,1];else if(\"manual\"===I){var O=c.aspectratio;d=[O.x,O.y,O.z]}else{if(\"auto\"!==I&&\"data\"!==I)throw new Error(\"scene.js aspectRatio was not one of the enumerated types\");var z=[1,1,1];for(a=0;a<3;++a){var D=y[l=(s=c[k[a]]).type];z[a]=Math.pow(D.acc,1/D.count)/h[a]}d=\"data\"===I||Math.max.apply(null,z)/Math.min.apply(null,z)<=4?z:[1,1,1]}c.aspectratio.x=u.aspectratio.x=d[0],c.aspectratio.y=u.aspectratio.y=d[1],c.aspectratio.z=u.aspectratio.z=d[2],this.glplot.setAspectratio(c.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),this.viewInitial.aspectmode||(this.viewInitial.aspectmode=c.aspectmode);var R=c.domain||null,F=e._size||null;if(R&&F){var B=this.container.style;B.position=\"absolute\",B.left=F.l+R.x[0]*F.w+\"px\",B.top=F.t+(1-R.y[1])*F.h+\"px\",B.width=F.w*(R.x[1]-R.x[0])+\"px\",B.height=F.h*(R.y[1]-R.y[0])+\"px\"}this.glplot.redraw()}},w.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener(\"wheel\",this.camera.wheelListener),this.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},w.getCamera=function(){var t;return this.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(t=this.camera).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]},projection:{type:!0===t._ortho?\"orthographic\":\"perspective\"}}},w.setViewport=function(t){var e,r=t.camera;this.camera.lookAt.apply(this,[[(e=r).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]]),this.glplot.setAspectratio(t.aspectratio),\"orthographic\"===r.projection.type!==this.camera._ortho&&(this.glplot.redraw(),this.glplot.clearRGBA(),this.glplot.dispose(),this.initializeGLPlot())},w.isCameraChanged=function(t){var e=this.getCamera(),r=f.nestedProperty(t,this.id+\".camera\").get();function n(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]]}var i=!1;if(void 0===r)i=!0;else{for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!n(e,r,a,o)){i=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(i=!0)}return i},w.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=f.nestedProperty(t,this.id+\".aspectratio\").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},w.saveLayout=function(t){var e,r,n,i,a,o,s=this.fullLayout,l=this.isCameraChanged(t),c=this.isAspectChanged(t),h=l||c;if(h){var p={};if(l&&(e=this.getCamera(),n=(r=f.nestedProperty(t,this.id+\".camera\")).get(),p[this.id+\".camera\"]=n),c&&(i=this.glplot.getAspectratio(),o=(a=f.nestedProperty(t,this.id+\".aspectratio\")).get(),p[this.id+\".aspectratio\"]=o),u.call(\"_storeDirectGUIEdit\",t,s._preGUI,p),l)r.set(e),f.nestedProperty(s,this.id+\".camera\").set(e);if(c)a.set(i),f.nestedProperty(s,this.id+\".aspectratio\").set(i),this.glplot.redraw()}return h},w.updateFx=function(t,e){var r=this.camera;if(r)if(\"orbit\"===t)r.mode=\"orbit\",r.keyBindingMode=\"rotate\";else if(\"turntable\"===t){r.up=[0,0,1],r.mode=\"turntable\",r.keyBindingMode=\"rotate\";var n=this.graphDiv,i=n._fullLayout,a=this.fullSceneLayout.camera,o=a.up.x,s=a.up.y,l=a.up.z;if(l/Math.sqrt(o*o+s*s+l*l)<.999){var c=this.id+\".camera.up\",h={x:0,y:0,z:1},p={};p[c]=h;var d=n.layout;u.call(\"_storeDirectGUIEdit\",d,i._preGUI,p),a.up=h,f.nestedProperty(d,c).set(h)}}else r.keyBindingMode=t;this.fullSceneLayout.hovermode=e},w.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),function(t,e,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)t[a+l]=Math.min(s*t[a+l],255)}}(a,r,i);var o=document.createElement(\"canvas\");o.width=r,o.height=i;var s,l=o.getContext(\"2d\"),c=l.createImageData(r,i);switch(c.data.set(a),l.putImageData(c,0,0),t){case\"jpeg\":s=o.toDataURL(\"image/jpeg\");break;case\"webp\":s=o.toDataURL(\"image/webp\");break;default:s=o.toDataURL(\"image/png\")}return this.staticMode&&this.container.removeChild(n),s},w.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[k[t]];p.setConvert(e,this.fullLayout),e.setScale=f.noop}},w.make4thDimension=function(){var t=this.graphDiv._fullLayout;this._mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},p.setConvert(this._mockAxis,t)},e.exports=_},{\"../../../stackgl_modules\":1120,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/show_no_webgl_msg\":525,\"../../lib/str2rgbarray\":528,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"./layout/convert\":602,\"./layout/spikes\":605,\"./layout/tick_marks\":606,\"./project\":607,\"has-passive-events\":229,\"webgl-context\":331}],609:[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;aOpenStreetMap
contributors',a=['\\xa9 Carto',i].join(\" \"),o=['Map tiles by Stamen Design','under CC BY 3.0',\"|\",'Data by OpenStreetMap contributors','under ODbL'].join(\" \"),s={\"open-street-map\":{id:\"osm\",version:8,sources:{\"plotly-osm-tiles\":{type:\"raster\",attribution:i,tiles:[\"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png\",\"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-osm-tiles\",type:\"raster\",source:\"plotly-osm-tiles\",minzoom:0,maxzoom:22}]},\"white-bg\":{id:\"white-bg\",version:8,sources:{},layers:[{id:\"white-bg\",type:\"background\",paint:{\"background-color\":\"#FFFFFF\"},minzoom:0,maxzoom:22}]},\"carto-positron\":{id:\"carto-positron\",version:8,sources:{\"plotly-carto-positron\":{type:\"raster\",attribution:a,tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-positron\",type:\"raster\",source:\"plotly-carto-positron\",minzoom:0,maxzoom:22}]},\"carto-darkmatter\":{id:\"carto-darkmatter\",version:8,sources:{\"plotly-carto-darkmatter\":{type:\"raster\",attribution:a,tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-darkmatter\",type:\"raster\",source:\"plotly-carto-darkmatter\",minzoom:0,maxzoom:22}]},\"stamen-terrain\":{id:\"stamen-terrain\",version:8,sources:{\"plotly-stamen-terrain\":{type:\"raster\",attribution:o,tiles:[\"https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-terrain\",type:\"raster\",source:\"plotly-stamen-terrain\",minzoom:0,maxzoom:22}]},\"stamen-toner\":{id:\"stamen-toner\",version:8,sources:{\"plotly-stamen-toner\":{type:\"raster\",attribution:o,tiles:[\"https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-toner\",type:\"raster\",source:\"plotly-stamen-toner\",minzoom:0,maxzoom:22}]},\"stamen-watercolor\":{id:\"stamen-watercolor\",version:8,sources:{\"plotly-stamen-watercolor\":{type:\"raster\",attribution:['Map tiles by Stamen Design','under CC BY 3.0',\"|\",'Data by OpenStreetMap contributors','under CC BY SA'].join(\" \"),tiles:[\"https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-watercolor\",type:\"raster\",source:\"plotly-stamen-watercolor\",minzoom:0,maxzoom:22}]}},l=n(s);e.exports={requiredVersion:\"1.10.1\",styleUrlPrefix:\"mapbox://styles/mapbox/\",styleUrlSuffix:\"v9\",styleValuesMapbox:[\"basic\",\"streets\",\"outdoors\",\"light\",\"dark\",\"satellite\",\"satellite-streets\"],styleValueDflt:\"basic\",stylesNonMapbox:s,styleValuesNonMapbox:l,traceLayerPrefix:\"plotly-trace-layer-\",layoutLayerPrefix:\"plotly-layout-layer-\",wrongVersionErrorMsg:[\"Your custom plotly.js bundle is not using the correct mapbox-gl version\",\"Please install mapbox-gl@1.10.1.\"].join(\"\\n\"),noAccessTokenErrorMsg:[\"Missing Mapbox access token.\",\"Mapbox trace type require a Mapbox access token to be registered.\",\"For example:\",\" Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });\",\"More info here: https://www.mapbox.com/help/define-access-token/\"].join(\"\\n\"),missingStyleErrorMsg:[\"No valid mapbox style found, please set `mapbox.style` to one of:\",l.join(\", \"),\"or register a Mapbox access token to use a Mapbox-served style.\"].join(\"\\n\"),multipleTokensErrorMsg:[\"Set multiple mapbox access token across different mapbox subplot,\",\"using first token found as mapbox-gl does not allow multipleaccess tokens on the same page.\"].join(\"\\n\"),mapOnErrorMsg:\"Mapbox error.\",mapboxLogo:{path0:\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\",path1:\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\",path2:\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\",polygon:\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34\"},styleRules:{map:\"overflow:hidden;position:relative;\",\"missing-css\":\"display:none;\",canary:\"background-color:salmon;\",\"ctrl-bottom-left\":\"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;\",\"ctrl-bottom-right\":\"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;\",ctrl:\"clear: both; pointer-events: auto; transform: translate(0, 0);\",\"ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner\":\"display: none;\",\"ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner\":\"display: block; margin-top:2px\",\"ctrl-attrib.mapboxgl-compact:hover\":\"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;\",\"ctrl-attrib.mapboxgl-compact::after\":'content: \"\"; cursor: pointer; position: absolute; background-image: url(\\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"%3E %3Cpath fill=\"%23333333\" fill-rule=\"evenodd\" d=\"M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0\"/%3E %3C/svg%3E\\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',\"ctrl-attrib.mapboxgl-compact\":\"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;\",\"ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; right: 0\",\"ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; left: 0\",\"ctrl-bottom-left .mapboxgl-ctrl\":\"margin: 0 0 10px 10px; float: left;\",\"ctrl-bottom-right .mapboxgl-ctrl\":\"margin: 0 10px 10px 0; float: right;\",\"ctrl-attrib\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a:hover\":\"color: inherit; text-decoration: underline;\",\"ctrl-attrib .mapbox-improve-map\":\"font-weight: bold; margin-left: 2px;\",\"attrib-empty\":\"display: none;\",\"ctrl-logo\":'display:block; width: 21px; height: 21px; background-image: url(\\'data:image/svg+xml;charset=utf-8,%3C?xml version=\"1.0\" encoding=\"utf-8\"?%3E %3Csvg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 21 21\" style=\"enable-background:new 0 0 21 21;\" xml:space=\"preserve\"%3E%3Cg transform=\"translate(0,0.01)\"%3E%3Cpath d=\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3Cpath d=\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpath d=\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpolygon points=\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 \" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3C/g%3E%3C/svg%3E\\')'}}},{\"../../lib/sort_object_keys\":526}],612:[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\":503}],613:[function(t,e,r){\"use strict\";var n=t(\"mapbox-gl/dist/mapbox-gl-unminified\"),i=t(\"../../lib\"),a=i.strTranslate,o=i.strScale,s=t(\"../../plots/get_data\").getSubplotCalcData,l=t(\"../../constants/xmlns_namespaces\"),c=t(\"@plotly/d3\"),u=t(\"../../components/drawing\"),f=t(\"../../lib/svg_text_utils\"),h=t(\"./mapbox\"),p=r.constants=t(\"./constants\");function d(t){return\"string\"==typeof t&&(-1!==p.styleValuesMapbox.indexOf(t)||0===t.indexOf(\"mapbox://\"))}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,a=e._subplots.mapbox;if(n.version!==p.requiredVersion)throw new Error(p.wrongVersionErrorMsg);var o=function(t,e){var r=t._fullLayout;if(\"\"===t._context.mapboxAccessToken)return\"\";for(var n=[],a=[],o=!1,s=!1,l=0;l1&&i.warn(p.multipleTokensErrorMsg),n[0]):(a.length&&i.log([\"Listed mapbox access token(s)\",a.join(\",\"),\"but did not use a Mapbox map style, ignoring token(s).\"].join(\" \")),\"\")}(t,a);n.accessToken=o;for(var l=0;l_/2){var w=v.split(\"|\").join(\"
\");x.text(w).attr(\"data-unformatted\",w).call(f.convertToTspans,t),b=u.bBox(x.node())}x.attr(\"transform\",a(-3,8-b.height)),y.insert(\"rect\",\".static-attribution\").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:\"rgba(255, 255, 255, 0.75)\"});var T=1;b.width+6>_&&(T=_/(b.width+6));var k=[n.l+n.w*h.x[1],n.t+n.h*(1-h.y[0])];y.attr(\"transform\",a(k[0],k[1])+o(T))}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n0){for(var r=0;r0}function u(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,\"line-dasharray\":t.line.dash});break;case\"fill\":n.extendFlat(r,{\"fill-color\":t.color,\"fill-outline-color\":t.fill.outlinecolor,\"fill-opacity\":t.opacity});break;case\"symbol\":var i=t.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(e,{\"icon-image\":i.icon+\"-15\",\"icon-size\":i.iconsize/10,\"text-field\":i.text,\"text-size\":i.textfont.size,\"text-anchor\":o.anchor,\"text-offset\":o.offset,\"symbol-placement\":i.placement}),n.extendFlat(r,{\"icon-color\":t.color,\"text-color\":i.textfont.color,\"text-opacity\":t.opacity});break;case\"raster\":n.extendFlat(r,{\"raster-fade-duration\":0,\"raster-opacity\":t.opacity})}return{layout:e,paint:r}}l.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):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=c(t)},l.needsNewImage=function(t){return this.subplot.map.getSource(this.idSource)&&\"image\"===this.sourceType&&\"image\"===t.sourcetype&&(this.source!==t.source||JSON.stringify(this.coordinates)!==JSON.stringify(t.coordinates))},l.needsNewSource=function(t){return this.sourceType!==t.sourcetype||JSON.stringify(this.source)!==JSON.stringify(t.source)||this.layerType!==t.type},l.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup[\"layout-\"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup[\"layout-\"+this.index]},l.updateImage=function(t){this.subplot.map.getSource(this.idSource).updateImage({url:t.source,coordinates:t.coordinates});var e=this.findFollowingMapboxLayerId(this.lookupBelow());null!==e&&this.subplot.map.moveLayer(this.idLayer,e)},l.updateSource=function(t){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,c(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,a={type:r};\"geojson\"===r?e=\"data\":\"vector\"===r?e=\"string\"==typeof n?\"url\":\"tiles\":\"raster\"===r?(e=\"tiles\",a.tileSize=256):\"image\"===r&&(e=\"url\",a.coordinates=t.coordinates);a[e]=n,t.sourceattribution&&(a.attribution=i(t.sourceattribution));return a}(t);e.addSource(this.idSource,r)}},l.findFollowingMapboxLayerId=function(t){if(\"traces\"===t)for(var e=this.subplot.getMapLayers(),r=0;r1)for(r=0;r-1&&v(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf(\"event\")>-1&&c.click(n,e.originalEvent)}}},_.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,o=t.dragmode;a=f(o)?function(t,r){(t.range={})[e.id]=[c([r.xmin,r.ymin]),c([r.xmax,r.ymax])]}:function(t,r,n){(t.lassoPoints={})[e.id]=n.filtered.map(c)};var s=e.dragOptions;e.dragOptions=i.extendDeep(s||{},{dragmode:t.dragmode,element:e.div,gd:n,plotinfo:{id:e.id,domain:t[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off(\"click\",e.onClickInPanHandler),p(o)||h(o)?(r.dragPan.disable(),r.on(\"zoomstart\",e.clearSelect),e.dragOptions.prepFn=function(t,r,n){d(t,r,n,e.dragOptions,o)},l.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 c(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},_.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])},_.updateLayers=function(t){var e,r=t[this.id].layers,n=this.layerList;if(r.length!==n.length){for(e=0;e=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\"),l=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(){b.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()&&l.text()?\" - \":\"\")}},b.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit(\"plotly_beforeexport\");var 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=b.graphJson(t,!1,\"keepdata\"),i.node().submit(),r.remove(),t.emit(\"plotly_afterexport\"),!1}};var T=[\"days\",\"shortDays\",\"months\",\"shortMonths\",\"periods\",\"dateTime\",\"date\",\"time\",\"decimal\",\"thousands\",\"grouping\",\"currency\"],k=[\"year\",\"month\",\"dayMonth\",\"dayMonthYear\"];function A(t,e){var r=t._context.locale;r||(r=\"en-US\");var n=!1,i={};function a(t){for(var r=!0,a=0;a1&&z.length>1){for(s.getComponentMethod(\"grid\",\"sizeDefaults\")(c,l),o=0;o15&&z.length>15&&0===l.shapes.length&&0===l.images.length,b.linkSubplots(h,l,f,n),b.cleanPlot(h,l,f,n);var N=!(!n._has||!n._has(\"gl2d\")),j=!(!l._has||!l._has(\"gl2d\")),U=!(!n._has||!n._has(\"cartesian\"))||N,V=!(!l._has||!l._has(\"cartesian\"))||j;U&&!V?n._bgLayer.remove():V&&!U&&(l._shouldCreateBgLayer=!0),n._zoomlayer&&!t._dragging&&d({_fullLayout:n}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i0){var f=1-2*s;n=Math.round(f*n),i=Math.round(f*i)}}var h=b.layoutAttributes.width.min,p=b.layoutAttributes.height.min;n1,g=!e.height&&Math.abs(r.height-i)>1;(g||d)&&(d&&(r.width=n),g&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),b.sanitizeMargins(r)},b.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a,o,l=s.componentsRegistry,c=e._basePlotModules,f=s.subplotsRegistry.cartesian;for(i in l)(o=l[i]).includeBasePlot&&o.includeBasePlot(t,e);for(var h in c.length||c.push(f),e._has(\"cartesian\")&&(s.getComponentMethod(\"grid\",\"contentDefaults\")(t,e),f.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(u.subplotSort);for(a=0;a1&&(r.l/=g,r.r/=g)}if(f){var m=(r.t+r.b)/f;m>1&&(r.t/=m,r.b/=m)}var v=void 0!==r.xl?r.xl:r.x,y=void 0!==r.xr?r.xr:r.x,x=void 0!==r.yt?r.yt:r.y,_=void 0!==r.yb?r.yb:r.y;h[e]={l:{val:v,size:r.l+d},r:{val:y,size:r.r+d},b:{val:_,size:r.b+d},t:{val:x,size:r.t+d}},p[e]=1}else delete h[e],delete p[e];if(!n._replotting)return b.doAutoMargin(t)}},b.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,n=e.height;e._size||(e._size={}),C(e);var i=e._size,a=e.margin,l=u.extendFlat({},i),c=a.l,f=a.r,h=a.t,d=a.b,g=e._pushmargin,m=e._pushmarginIds;if(!1!==e.margin.autoexpand){for(var v in g)m[v]||delete g[v];for(var y in g.base={l:{val:0,size:c},r:{val:1,size:f},t:{val:1,size:h},b:{val:0,size:d}},g){var x=g[y].l||{},_=g[y].b||{},w=x.val,T=x.size,k=_.val,A=_.size;for(var M in g){if(o(T)&&g[M].r){var S=g[M].r.val,E=g[M].r.size;if(S>w){var L=(T*S+(E-r)*w)/(S-w),P=(E*(1-w)+(T-r)*(1-S))/(S-w);L+P>c+f&&(c=L,f=P)}}if(o(A)&&g[M].t){var I=g[M].t.val,O=g[M].t.size;if(I>k){var z=(A*I+(O-n)*k)/(I-k),D=(O*(1-k)+(A-n)*(1-I))/(I-k);z+D>d+h&&(d=z,h=D)}}}}}var R=u.constrain(r-a.l-a.r,2,64),F=u.constrain(n-a.t-a.b,2,64),B=Math.max(0,r-R),N=Math.max(0,n-F);if(B){var j=(c+f)/B;j>1&&(c/=j,f/=j)}if(N){var U=(d+h)/N;U>1&&(d/=U,h/=U)}if(i.l=Math.round(c),i.r=Math.round(f),i.t=Math.round(h),i.b=Math.round(d),i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e._replotting&&b.didMarginChange(l,i)){\"_redrawFromAutoMarginCount\"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var V=3*(1+Object.keys(m).length);if(e._redrawFromAutoMarginCount0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return s.call(\"redraw\",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit(\"plotly_transitioninterrupted\",[])}));var a=0,o=0;function l(){return a++,function(){o++,n||o!==a||function(e){if(!t._transitionData)return;(function(t){if(t)for(;t.length;)t.shift()})(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return s.call(\"redraw\",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit(\"plotly_transitioned\",[])})).then(e)}(i)}}r.runFn(l),setTimeout(l())}))}],a=u.syncOrAsync(i,t);return a&&a.then||(a=Promise.resolve()),a.then((function(){return t}))}b.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},b.graphJson=function(t,e,r,n,i,a){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&b.supplyDefaults(t);var o=i?t._fullData:t.data,s=i?t._fullLayout:t.layout,l=(t._transitionData||{})._frames;function c(t,e){if(\"function\"==typeof t)return e?\"_function_\":null;if(u.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(a){if(-1===[\"_\",\"[\"].indexOf(a.charAt(0)))if(\"function\"!=typeof t[a]){if(\"keepdata\"===r){if(\"src\"===a.substr(a.length-3))return}else if(\"keepstream\"===r){if(\"string\"==typeof(n=t[a+\"src\"])&&n.indexOf(\":\")>0&&!u.isPlainObject(t.stream))return}else if(\"keepall\"!==r&&\"string\"==typeof(n=t[a+\"src\"])&&n.indexOf(\":\")>0)return;i[a]=c(t[a],e)}else e&&(i[a]=\"_function\")})),i}return Array.isArray(t)?t.map((function(t){return c(t,e)})):u.isTypedArray(t)?u.simpleMap(t,u.identity):u.isJSDate(t)?u.ms2DateTimeLocal(+t):t}var f={data:(o||[]).map((function(t){var r=c(t);return e&&delete r.fit,r}))};if(!e&&(f.layout=c(s),i)){var h=s._size;f.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return l&&(f.frames=c(l)),a&&(f.config=c(t._context,!0)),\"object\"===n?f:JSON.stringify(f)},b.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r=0;a--)if(s[a].enabled){r._indexToPoints=s[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(t,r))}Array.isArray(o)&&o[0]||(o=[{x:h,y:h}]),o[0].t||(o[0].t={}),o[0].trace=r,d[e]=o}}for(z(o,c,f),i=0;i1e-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;a0?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=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]}(p),b=x[2]-x[0],_=x[3]-x[1],w=h/f,T=Math.abs(_/b);w>T?(d=f,y=(h-(g=f*T))/n.h/2,m=[o[0],o[1]],v=[s[0]+y,s[1]-y]):(g=h,y=(f-(d=h/T))/n.w/2,m=[o[0]+y,o[1]-y],v=[s[0],s[1]]),this.xLength2=d,this.yLength2=g,this.xDomain2=m,this.yDomain2=v;var k,A=this.xOffset2=n.l+n.w*m[0],M=this.yOffset2=n.t+n.h*(1-v[1]),S=this.radius=d/b,E=this.innerRadius=this.getHole(e)*S,L=this.cx=A-S*x[0],C=this.cy=M+S*x[3],P=this.cxx=L-A,I=this.cyy=C-M,O=i.side;\"counterclockwise\"===O?(k=O,O=\"top\"):\"clockwise\"===O&&(k=O,O=\"bottom\"),this.radialAxis=this.mockAxis(t,e,i,{_id:\"x\",side:O,_trueSide:k,domain:[E/n.w,S/n.w]}),this.angularAxis=this.mockAxis(t,e,a,{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:m}),this.yaxis=this.mockCartesianAxis(t,e,{_id:\"y\",domain:v});var z=this.pathSubplot();this.clipPaths.forTraces.select(\"path\").attr(\"d\",z).attr(\"transform\",l(P,I)),r.frontplot.attr(\"transform\",l(A,M)).call(u.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr(\"d\",z).attr(\"transform\",l(L,C)).call(c.fill,e.bgcolor)},N.mockAxis=function(t,e,r,n){var i=o.extendFlat({},r,n);return d(i,e,t),i},N.mockCartesianAxis=function(t,e,r){var n=this,i=n.isSmith,a=r._id,s=o.extendFlat({type:\"linear\"},r);p(s,t);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var t=n.sectorBBox,r=l[a],i=n.radialAxis._rl,o=(i[1]-i[0])/(1-n.getHole(e));s.range=[t[r[0]]*o,t[r[1]]*o]},s.isPtWithinRange=\"x\"!==a||i?function(){return!0}:function(t){return n.isPtInside(t)},s.setRange(),s.setScale(),s},N.doAutoRange=function(t,e){var r=this.gd,n=this.radialAxis,i=this.getRadial(e);g(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\")]},N.updateRadialAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=r.getRadial(e),g=D(r.getSector(e)[0],360),m=r.radialAxis,v=u90&&g<=270&&(m.tickangle=180);var x=y?function(t){var e=O(r,C([t.x,0]));return l(e[0]-f,e[1]-p)}:function(t){return l(m.l2p(t.x)+u,0)},b=y?function(t){return I(r,t.x,-1/0,1/0)}:function(t){return r.pathArc(m.r2p(t.x)+u)},_=j(d);if(r.radialTickLayout!==_&&(i[\"radial-axis\"].selectAll(\".xtick\").remove(),r.radialTickLayout=_),v){m.setScale();var w=0,T=y?(m.tickvals||[]).filter((function(t){return t>=0})).map((function(t){return h.tickText(m,t,!0,!1)})):h.calcTicks(m),k=y?T:h.clipEnds(m,T),A=h.getTickSigns(m)[2];y&&((\"top\"===m.ticks&&\"bottom\"===m.side||\"bottom\"===m.ticks&&\"top\"===m.side)&&(A=-A),\"top\"===m.ticks&&\"top\"===m.side&&(w=-m.ticklen),\"bottom\"===m.ticks&&\"bottom\"===m.side&&(w=m.ticklen)),h.drawTicks(n,m,{vals:T,layer:i[\"radial-axis\"],path:h.makeTickPath(m,0,A),transFn:x,crisp:!1}),h.drawGrid(n,m,{vals:k,layer:i[\"radial-grid\"],path:b,transFn:o.noop,crisp:!1}),h.drawLabels(n,m,{vals:T,layer:i[\"radial-axis\"],transFn:x,labelFns:h.makeLabelFns(m,w)})}var M=r.radialAxisAngle=r.vangles?F(U(R(d.angle),r.vangles)):d.angle,S=l(f,p),E=S+s(-M);V(i[\"radial-axis\"],v&&(d.showticklabels||d.ticks),{transform:E}),V(i[\"radial-grid\"],v&&d.showgrid,{transform:y?\"\":S}),V(i[\"radial-line\"].select(\"line\"),v&&d.showline,{x1:y?-a:u,y1:0,x2:a,y2:0,transform:E}).attr(\"stroke-width\",d.linewidth).call(c.stroke,d.linecolor)},N.updateRadialAxisTitle=function(t,e,r){if(!this.isSmith){var n=this.gd,i=this.radius,a=this.cx,o=this.cy,s=this.getRadial(e),l=this.id+\"title\",c=0;if(s.title){var f=u.bBox(this.layers[\"radial-axis\"].node()).height,h=s.title.font.size,p=s.side;c=\"top\"===p?h:\"counterclockwise\"===p?-(f+.4*h):f+.8*h}var d=void 0!==r?r:this.radialAxisAngle,g=R(d),m=Math.cos(g),v=Math.sin(g),y=a+i/2*m+c*v,b=o-i/2*v+c*m;this.layers[\"radial-axis-title\"]=x.draw(n,l,{propContainer:s,propName:this.id+\".radialaxis.title\",placeholder:z(n,\"Click to enter radial axis title\"),attributes:{x:y,y:b,\"text-anchor\":\"middle\"},transform:{rotate:-d}})}},N.updateAngularAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=r.getAngular(e),g=r.angularAxis,m=r.isSmith;m||(r.fillViewInitialKey(\"angularaxis.rotation\",d.rotation),g.setGeometry(),g.setScale());var v=m?function(t){var e=O(r,C([0,t.x]));return Math.atan2(e[0]-f,e[1]-p)-Math.PI/2}:function(t){return g.t2g(t.x)};\"linear\"===g.type&&\"radians\"===g.thetaunit&&(g.tick0=F(g.tick0),g.dtick=F(g.dtick));var y=function(t){return l(f+a*Math.cos(t),p-a*Math.sin(t))},x=m?function(t){var e=O(r,C([0,t.x]));return l(e[0],e[1])}:function(t){return y(v(t))},b=m?function(t){var e=O(r,C([0,t.x])),n=Math.atan2(e[0]-f,e[1]-p)-Math.PI/2;return l(e[0],e[1])+s(-F(n))}:function(t){var e=v(t);return y(e)+s(-F(e))},_=m?function(t){return P(r,t.x,0,1/0)}:function(t){var e=v(t),r=Math.cos(e),n=Math.sin(e);return\"M\"+[f+u*r,p-u*n]+\"L\"+[f+a*r,p-a*n]},w=h.makeLabelFns(g,0).labelStandoff,T={xFn:function(t){var e=v(t);return Math.cos(e)*w},yFn:function(t){var e=v(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(w+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*M)},anchorFn:function(t){var e=v(t),r=Math.cos(e);return Math.abs(r)<.1?\"middle\":r>0?\"start\":\"end\"},heightFn:function(t,e,r){var n=v(t);return-.5*(1+Math.sin(n))*r}},k=j(d);r.angularTickLayout!==k&&(i[\"angular-axis\"].selectAll(\".\"+g._id+\"tick\").remove(),r.angularTickLayout=k);var A,S=m?[1/0].concat(g.tickvals||[]).map((function(t){return h.tickText(g,t,!0,!1)})):h.calcTicks(g);if(m&&(S[0].text=\"\\u221e\",S[0].fontSize*=1.75),\"linear\"===e.gridshape?(A=S.map(v),o.angleDelta(A[0],A[1])<0&&(A=A.slice().reverse())):A=null,r.vangles=A,\"category\"===g.type&&(S=S.filter((function(t){return o.isAngleInsideSector(v(t),r.sectorInRad)}))),g.visible){var E=\"inside\"===g.ticks?-1:1,L=(g.linewidth||1)/2;h.drawTicks(n,g,{vals:S,layer:i[\"angular-axis\"],path:\"M\"+E*L+\",0h\"+E*g.ticklen,transFn:b,crisp:!1}),h.drawGrid(n,g,{vals:S,layer:i[\"angular-grid\"],path:_,transFn:o.noop,crisp:!1}),h.drawLabels(n,g,{vals:S,layer:i[\"angular-axis\"],repositionOnUpdate:!0,transFn:x,labelFns:T})}V(i[\"angular-line\"].select(\"path\"),d.showline,{d:r.pathSubplot(),transform:l(f,p)}).attr(\"stroke-width\",d.linewidth).call(c.stroke,d.linecolor)},N.updateFx=function(t,e){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1)),this.updateHoverAndMainDrag(t))},N.updateHoverAndMainDrag=function(t){var e,r,s=this,c=s.isSmith,u=s.gd,f=s.layers,h=t._zoomlayer,p=S.MINZOOM,d=S.OFFEDGE,g=s.radius,x=s.innerRadius,T=s.cx,k=s.cy,A=s.cxx,M=s.cyy,L=s.sectorInRad,C=s.vangles,P=s.radialAxis,I=E.clampTiny,O=E.findXYatLength,z=E.findEnclosingVertexAngles,D=S.cornerHalfWidth,R=S.cornerLen/2,F=m.makeDragger(f,\"path\",\"maindrag\",\"crosshair\");n.select(F).attr(\"d\",s.pathSubplot()).attr(\"transform\",l(T,k)),F.onmousemove=function(t){y.hover(u,t,s.id),u._fullLayout._lasthover=F,u._fullLayout._hoversubplot=s.id},F.onmouseout=function(t){u._dragging||v.unhover(u,t)};var B,N,j,U,V,H,q,G,Y,W={element:F,gd:u,subplot:s.id,plotinfo:{id:s.id,xaxis:s.xaxis,yaxis:s.yaxis},xaxes:[s.xaxis],yaxes:[s.yaxis]};function X(t,e){return Math.sqrt(t*t+e*e)}function Z(t,e){return X(t-A,e-M)}function J(t,e){return Math.atan2(M-e,t-A)}function K(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function Q(t,e){if(0===t)return s.pathSector(2*D);var r=R/t,n=e-r,i=e+r,a=Math.max(0,Math.min(t,g)),o=a-D,l=a+D;return\"M\"+K(o,n)+\"A\"+[o,o]+\" 0,0,0 \"+K(o,i)+\"L\"+K(l,i)+\"A\"+[l,l]+\" 0,0,1 \"+K(l,n)+\"Z\"}function $(t,e,r){if(0===t)return s.pathSector(2*D);var n,i,a=K(t,e),o=K(t,r),l=I((a[0]+o[0])/2),c=I((a[1]+o[1])/2);if(l&&c){var u=c/l,f=-1/u,h=O(D,u,l,c);n=O(R,f,h[0][0],h[0][1]),i=O(R,f,h[1][0],h[1][1])}else{var p,d;c?(p=R,d=D):(p=D,d=R),n=[[l-p,c-d],[l+p,c-d]],i=[[l-p,c+d],[l+p,c+d]]}return\"M\"+n.join(\"L\")+\"L\"+i.reverse().join(\"L\")+\"Z\"}function tt(t,e){return e=Math.max(Math.min(e,g),x),tp?(t-1&&1===t&&_(e,u,[s.xaxis],[s.yaxis],s.id,W),r.indexOf(\"event\")>-1&&y.click(u,e,s.id)}W.prepFn=function(t,n,a){var l=u._fullLayout.dragmode,f=F.getBoundingClientRect();u._fullLayout._calcInverseTransform(u);var p=u._fullLayout._invTransform;e=u._fullLayout._invScaleX,r=u._fullLayout._invScaleY;var d=o.apply3DTransform(p)(n-f.left,a-f.top);if(B=d[0],N=d[1],C){var v=E.findPolygonOffset(g,L[0],L[1],C);B+=A+v[0],N+=M+v[1]}switch(l){case\"zoom\":W.clickFn=st,c||(W.moveFn=C?it:rt,W.doneFn=at,function(){j=null,U=null,V=s.pathSubplot(),H=!1;var t=u._fullLayout[s.id];q=i(t.bgcolor).getLuminance(),(G=m.makeZoombox(h,q,T,k,V)).attr(\"fill-rule\",\"evenodd\"),Y=m.makeCorners(h,T,k),w(u)}());break;case\"select\":case\"lasso\":b(t,n,a,W,l)}},v.init(W)},N.updateRadialDrag=function(t,e,r){var i=this,c=i.gd,u=i.layers,f=i.radius,h=i.innerRadius,p=i.cx,d=i.cy,g=i.radialAxis,y=S.radialDragBoxSize,x=y/2;if(g.visible){var b,_,T,M=R(i.radialAxisAngle),E=g._rl,L=E[0],C=E[1],P=E[r],I=.75*(E[1]-E[0])/(1-i.getHole(e))/f;r?(b=p+(f+x)*Math.cos(M),_=d-(f+x)*Math.sin(M),T=\"radialdrag\"):(b=p+(h-x)*Math.cos(M),_=d-(h-x)*Math.sin(M),T=\"radialdrag-inner\");var O,z,D,B=m.makeRectDragger(u,T,\"crosshair\",-x,-x,y,y),N={element:B,gd:c};V(n.select(B),g.visible&&h0==(r?D>L:Dn?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;o0?1:0}function i(t){var e=t[0],r=t[1];if(!isFinite(e)||!isFinite(r))return[1,0];var n=(e+1)*(e+1)+r*r;return[(e*e+r*r-1)/n,2*r/n]}function a(t,e){var r=e[0],n=e[1];return[r*t.radius+t.cx,-n*t.radius+t.cy]}function o(t,e){return e*t.radius}e.exports={smith:i,reactanceArc:function(t,e,r,n){var s=a(t,i([r,e])),l=s[0],c=s[1],u=a(t,i([n,e])),f=u[0],h=u[1];if(0===e)return[\"M\"+l+\",\"+c,\"L\"+f+\",\"+h].join(\" \");var p=o(t,1/Math.abs(e));return[\"M\"+l+\",\"+c,\"A\"+p+\",\"+p+\" 0 0,\"+(e<0?1:0)+\" \"+f+\",\"+h].join(\" \")},resistanceArc:function(t,e,r,s){var l=o(t,1/(e+1)),c=a(t,i([e,r])),u=c[0],f=c[1],h=a(t,i([e,s])),p=h[0],d=h[1];if(n(r)!==n(s)){var g=a(t,i([e,0]));return[\"M\"+u+\",\"+f,\"A\"+l+\",\"+l+\" 0 0,\"+(00){for(var n=[],i=0;i=u&&(h.min=0,d.min=0,m.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function g(t,e,r,n){var i=h[e._name];function o(r,n){return a.coerce(t,e,i,r,n)}o(\"uirevision\",n.uirevision),e.type=\"linear\";var p=o(\"color\"),d=p!==i.color.dflt?p:r.font.color,g=e._name.charAt(0).toUpperCase(),m=\"Component \"+g,v=o(\"title.text\",m);e._hovertitle=v===m?v:g,a.coerceFont(o,\"title.font\",{family:r.font.family,size:a.bigFont(r.font.size),color:d}),o(\"min\"),u(t,e,o,\"linear\"),l(t,e,o,\"linear\"),s(t,e,o,\"linear\"),c(t,e,o,{outerTicks:!0}),o(\"showticklabels\")&&(a.coerceFont(o,\"tickfont\",{family:r.font.family,size:r.font.size,color:d}),o(\"tickangle\"),o(\"tickformat\")),f(t,e,o,{dfltColor:p,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),o(\"hoverformat\"),o(\"layer\")}e.exports=function(t,e,r){o(t,e,r,{type:\"ternary\",attributes:h,handleDefaults:d,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{\"../../components/color\":366,\"../../lib\":503,\"../../plot_api/plot_template\":543,\"../cartesian/line_grid_defaults\":571,\"../cartesian/prefix_suffix_defaults\":573,\"../cartesian/tick_label_defaults\":578,\"../cartesian/tick_mark_defaults\":579,\"../cartesian/tick_value_defaults\":580,\"../subplot_defaults\":632,\"./layout_attributes\":635}],637:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"tinycolor2\"),a=t(\"../../registry\"),o=t(\"../../lib\"),s=o.strTranslate,l=o._,c=t(\"../../components/color\"),u=t(\"../../components/drawing\"),f=t(\"../cartesian/set_convert\"),h=t(\"../../lib/extend\").extendFlat,p=t(\"../plots\"),d=t(\"../cartesian/axes\"),g=t(\"../../components/dragelement\"),m=t(\"../../components/fx\"),v=t(\"../../components/dragelement/helpers\"),y=v.freeMode,x=v.rectMode,b=t(\"../../components/titles\"),_=t(\"../cartesian/select\").prepSelect,w=t(\"../cartesian/select\").selectOnClick,T=t(\"../cartesian/select\").clearSelect,k=t(\"../cartesian/select\").clearSelectionsCache,A=t(\"../cartesian/constants\");function M(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=M;var S=M.prototype;S.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},S.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var i=0;iE*b?i=(a=b)*E:a=(i=x)/E,o=v*i/x,l=y*a/b,r=e.l+e.w*g-i/2,n=e.t+e.h*(1-m)-a/2,p.x0=r,p.y0=n,p.w=i,p.h=a,p.sum=_,p.xaxis={type:\"linear\",range:[w+2*k-_,_-w-2*T],domain:[g-o/2,g+o/2],_id:\"x\"},f(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(t){return t.a>=p.aaxis.range[0]&&t.a<=p.aaxis.range[1]&&t.b>=p.baxis.range[1]&&t.b<=p.baxis.range[0]&&t.c>=p.caxis.range[1]&&t.c<=p.caxis.range[0]},p.yaxis={type:\"linear\",range:[w,_-T-k],domain:[m-l/2,m+l/2],_id:\"y\"},f(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var A=p.yaxis.domain[0],M=p.aaxis=h({},t.aaxis,{range:[w,_-T-k],side:\"left\",tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+l*E],anchor:\"free\",position:0,_id:\"y\",_length:i});f(M,p.graphDiv._fullLayout),M.setScale();var S=p.baxis=h({},t.baxis,{range:[_-w-k,T],side:\"bottom\",domain:p.xaxis.domain,anchor:\"free\",position:0,_id:\"x\",_length:i});f(S,p.graphDiv._fullLayout),S.setScale();var L=p.caxis=h({},t.caxis,{range:[_-w-T,k],side:\"right\",tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+l*E],anchor:\"free\",position:0,_id:\"y\",_length:i});f(L,p.graphDiv._fullLayout),L.setScale();var C=\"M\"+r+\",\"+(n+a)+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";p.clipDef.select(\"path\").attr(\"d\",C),p.layers.plotbg.select(\"path\").attr(\"d\",C);var P=\"M0,\"+a+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";p.clipDefRelative.select(\"path\").attr(\"d\",P);var I=s(r,n);p.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",I),p.clipDefRelative.select(\"path\").attr(\"transform\",null);var O=s(r-S._offset,n+a);p.layers.baxis.attr(\"transform\",O),p.layers.bgrid.attr(\"transform\",O);var z=s(r+i/2,n)+\"rotate(30)\"+s(0,-M._offset);p.layers.aaxis.attr(\"transform\",z),p.layers.agrid.attr(\"transform\",z);var D=s(r+i/2,n)+\"rotate(-30)\"+s(0,-L._offset);p.layers.caxis.attr(\"transform\",D),p.layers.cgrid.attr(\"transform\",D),p.drawAxes(!0),p.layers.aline.select(\"path\").attr(\"d\",M.showline?\"M\"+r+\",\"+(n+a)+\"l\"+i/2+\",-\"+a:\"M0,0\").call(c.stroke,M.linecolor||\"#000\").style(\"stroke-width\",(M.linewidth||0)+\"px\"),p.layers.bline.select(\"path\").attr(\"d\",S.showline?\"M\"+r+\",\"+(n+a)+\"h\"+i:\"M0,0\").call(c.stroke,S.linecolor||\"#000\").style(\"stroke-width\",(S.linewidth||0)+\"px\"),p.layers.cline.select(\"path\").attr(\"d\",L.showline?\"M\"+(r+i/2)+\",\"+n+\"l\"+i/2+\",\"+a:\"M0,0\").call(c.stroke,L.linecolor||\"#000\").style(\"stroke-width\",(L.linewidth||0)+\"px\"),p.graphDiv._context.staticPlot||p.initInteractions(),u.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},S.drawAxes=function(t){var e=this.graphDiv,r=this.id.substr(7)+\"title\",n=this.layers,i=this.aaxis,a=this.baxis,o=this.caxis;if(this.drawAx(i),this.drawAx(a),this.drawAx(o),t){var s=Math.max(i.showticklabels?i.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+(\"outside\"===o.ticks?.87*o.ticklen:0)),c=(a.showticklabels?a.tickfont.size:0)+(\"outside\"===a.ticks?a.ticklen:0)+3;n[\"a-title\"]=b.draw(e,\"a\"+r,{propContainer:i,propName:this.id+\".aaxis.title\",placeholder:l(e,\"Click to enter Component A title\"),attributes:{x:this.x0+this.w/2,y:this.y0-i.title.font.size/3-s,\"text-anchor\":\"middle\"}}),n[\"b-title\"]=b.draw(e,\"b\"+r,{propContainer:a,propName:this.id+\".baxis.title\",placeholder:l(e,\"Click to enter Component B title\"),attributes:{x:this.x0-c,y:this.y0+this.h+.83*a.title.font.size+c,\"text-anchor\":\"middle\"}}),n[\"c-title\"]=b.draw(e,\"c\"+r,{propContainer:o,propName:this.id+\".caxis.title\",placeholder:l(e,\"Click to enter Component C title\"),attributes:{x:this.x0+this.w+c,y:this.y0+this.h+.83*o.title.font.size+c,\"text-anchor\":\"middle\"}})}},S.drawAx=function(t){var e,r=this.graphDiv,n=t._name,i=n.charAt(0),a=t._id,s=this.layers[n],l=i+\"tickLayout\",c=(e=t).ticks+String(e.ticklen)+String(e.showticklabels);this[l]!==c&&(s.selectAll(\".\"+a+\"tick\").remove(),this[l]=c),t.setScale();var u=d.calcTicks(t),f=d.clipEnds(t,u),h=d.makeTransTickFn(t),p=d.getTickSigns(t)[2],g=o.deg2rad(30),m=p*(t.linewidth||1)/2,v=p*t.ticklen,y=this.w,x=this.h,b=\"b\"===i?\"M0,\"+m+\"l\"+Math.sin(g)*v+\",\"+Math.cos(g)*v:\"M\"+m+\",0l\"+Math.cos(g)*v+\",\"+-Math.sin(g)*v,_={a:\"M0,0l\"+x+\",-\"+y/2,b:\"M0,0l-\"+y/2+\",-\"+x,c:\"M0,0l-\"+x+\",\"+y/2}[i];d.drawTicks(r,t,{vals:\"inside\"===t.ticks?f:u,layer:s,path:b,transFn:h,crisp:!1}),d.drawGrid(r,t,{vals:f,layer:this.layers[i+\"grid\"],path:_,transFn:h,crisp:!1}),d.drawLabels(r,t,{vals:u,layer:s,transFn:h,labelFns:d.makeLabelFns(t,0,30)})};var L=A.MINZOOM/2+.87,C=\"m-0.87,.5h\"+L+\"v3h-\"+(L+5.2)+\"l\"+(L/2+2.6)+\",-\"+(.87*L+4.5)+\"l2.6,1.5l-\"+L/2+\",\"+.87*L+\"Z\",P=\"m0.87,.5h-\"+L+\"v3h\"+(L+5.2)+\"l-\"+(L/2+2.6)+\",-\"+(.87*L+4.5)+\"l-2.6,1.5l\"+L/2+\",\"+.87*L+\"Z\",I=\"m0,1l\"+L/2+\",\"+.87*L+\"l2.6,-1.5l-\"+(L/2+2.6)+\",-\"+(.87*L+4.5)+\"l-\"+(L/2+2.6)+\",\"+(.87*L+4.5)+\"l2.6,1.5l\"+L/2+\",-\"+.87*L+\"Z\",O=!0;function z(t){n.select(t).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}S.clearSelect=function(){k(this.dragOptions),T(this.dragOptions.gd)},S.initInteractions=function(){var t,e,r,n,f,h,p,d,v,b,T,k,M=this,S=M.layers.plotbg.select(\"path\").node(),L=M.graphDiv,D=L._fullLayout._zoomlayer;function R(t){var e={};return e[M.id+\".aaxis.min\"]=t.a,e[M.id+\".baxis.min\"]=t.b,e[M.id+\".caxis.min\"]=t.c,e}function F(t,e){var r=L._fullLayout.clickmode;z(L),2===t&&(L.emit(\"plotly_doubleclick\",null),a.call(\"_guiRelayout\",L,R({a:0,b:0,c:0}))),r.indexOf(\"select\")>-1&&1===t&&w(e,L,[M.xaxis],[M.yaxis],M.id,M.dragOptions),r.indexOf(\"event\")>-1&&m.click(L,e,M.id)}function B(t,e){return 1-e/M.h}function N(t,e){return 1-(t+(M.h-e)/Math.sqrt(3))/M.w}function j(t,e){return(t-(M.h-e)/Math.sqrt(3))/M.w}function U(i,a){var o=r+i*t,s=n+a*e,l=Math.max(0,Math.min(1,B(0,n),B(0,s))),c=Math.max(0,Math.min(1,N(r,n),N(o,s))),u=Math.max(0,Math.min(1,j(r,n),j(o,s))),g=(l/2+u)*M.w,m=(1-l/2-c)*M.w,y=(g+m)/2,x=m-g,_=(1-l)*M.h,w=_-x/E;x.2?\"rgba(0,0,0,0.4)\":\"rgba(255,255,255,0.3)\").duration(200),k.transition().style(\"opacity\",1).duration(200),b=!0),L.emit(\"plotly_relayouting\",R(p))}function V(){z(L),p!==f&&(a.call(\"_guiRelayout\",L,R(p)),O&&L.data&&L._context.showTips&&(o.notifier(l(L,\"Double-click to zoom back out\"),\"long\"),O=!1))}function H(t,e){var r=t/M.xaxis._m,n=e/M.yaxis._m,i=[(p={a:f.a-n,b:f.b+(r+n)/2,c:f.c-(r-n)/2}).a,p.b,p.c].sort(o.sorterAsc),a=i.indexOf(p.a),l=i.indexOf(p.b),c=i.indexOf(p.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),p={a:i[a],b:i[l],c:i[c]},e=(f.a-p.a)*M.yaxis._m,t=(f.c-p.c-f.b+p.b)*M.xaxis._m);var h=s(M.x0+t,M.y0+e);M.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",h);var d=s(-t,-e);M.clipDefRelative.select(\"path\").attr(\"transform\",d),M.aaxis.range=[p.a,M.sum-p.b-p.c],M.baxis.range=[M.sum-p.a-p.c,p.b],M.caxis.range=[M.sum-p.a-p.b,p.c],M.drawAxes(!1),M._hasClipOnAxisFalse&&M.plotContainer.select(\".scatterlayer\").selectAll(\".trace\").call(u.hideOutsideRangePoints,M),L.emit(\"plotly_relayouting\",R(p))}function q(){a.call(\"_guiRelayout\",L,R(p))}this.dragOptions={element:S,gd:L,plotinfo:{id:M.id,domain:L._fullLayout[M.id].domain,xaxis:M.xaxis,yaxis:M.yaxis},subplot:M.id,prepFn:function(a,l,u){M.dragOptions.xaxes=[M.xaxis],M.dragOptions.yaxes=[M.yaxis],t=L._fullLayout._invScaleX,e=L._fullLayout._invScaleY;var g=M.dragOptions.dragmode=L._fullLayout.dragmode;y(g)?M.dragOptions.minDrag=1:M.dragOptions.minDrag=void 0,\"zoom\"===g?(M.dragOptions.moveFn=U,M.dragOptions.clickFn=F,M.dragOptions.doneFn=V,function(t,e,a){var l=S.getBoundingClientRect();r=e-l.left,n=a-l.top,L._fullLayout._calcInverseTransform(L);var u=L._fullLayout._invTransform,g=o.apply3DTransform(u)(r,n);r=g[0],n=g[1],f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=f,h=M.aaxis.range[1]-f.a,d=i(M.graphDiv._fullLayout[M.id].bgcolor).getLuminance(),v=\"M0,\"+M.h+\"L\"+M.w/2+\", 0L\"+M.w+\",\"+M.h+\"Z\",b=!1,T=D.append(\"path\").attr(\"class\",\"zoombox\").attr(\"transform\",s(M.x0,M.y0)).style({fill:d>.2?\"rgba(0,0,0,0)\":\"rgba(255,255,255,0)\",\"stroke-width\":0}).attr(\"d\",v),k=D.append(\"path\").attr(\"class\",\"zoombox-corners\").attr(\"transform\",s(M.x0,M.y0)).style({fill:c.background,stroke:c.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"d\",\"M0,0Z\"),M.clearSelect(L)}(0,l,u)):\"pan\"===g?(M.dragOptions.moveFn=H,M.dragOptions.clickFn=F,M.dragOptions.doneFn=q,f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=f,M.clearSelect(L)):(x(g)||y(g))&&_(a,l,u,M.dragOptions,g)}},S.onmousemove=function(t){m.hover(L,t,M.id),L._fullLayout._lasthover=S,L._fullLayout._hoversubplot=M.id},S.onmouseout=function(t){L._dragging||g.unhover(L,t)},g.init(this.dragOptions)}},{\"../../components/color\":366,\"../../components/dragelement\":385,\"../../components/dragelement/helpers\":384,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../components/titles\":464,\"../../lib\":503,\"../../lib/extend\":493,\"../../registry\":638,\"../cartesian/axes\":554,\"../cartesian/constants\":561,\"../cartesian/select\":575,\"../cartesian/set_convert\":576,\"../plots\":619,\"@plotly/d3\":58,tinycolor2:312}],638:[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/dom\").addStyleRule,l=t(\"./lib/extend\"),c=t(\"./plots/attributes\"),u=t(\"./plots/layout_attributes\"),f=l.extendFlat,h=l.extendDeepAll;function p(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)b(i,t.name)}(t.basePlotModule);for(var o={},l=0;l-1&&(f[p[r]].title={text:\"\"});for(r=0;r\")?\"\":e.html(t).text()}));return e.remove(),r}(T),T=(T=T.replace(/&(?!\\w+;|\\#[0-9]+;| \\#x[0-9A-F]+;)/g,\"&\")).replace(c,\"'\"),i.isIE()&&(T=(T=(T=T.replace(/\"/gi,\"'\")).replace(/(\\('#)([^']*)('\\))/gi,'(\"#$2\")')).replace(/(\\\\')/gi,'\"')),T}},{\"../components/color\":366,\"../components/drawing\":388,\"../constants/xmlns_namespaces\":480,\"../lib\":503,\"@plotly/d3\":58}],647:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){for(var r=0;rf+c||!n(u))}for(var p=0;pa))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)?e0?e+=r:u<0&&(e-=r)}return e}function z(t){var e=u,r=t.b,i=O(t);return n.inbox(r-e,i-e,_+(i-e)/(i-r)-1)}var D=t[f+\"a\"],R=t[h+\"a\"];g=Math.abs(D.r2c(D.range[1])-D.r2c(D.range[0]));var F=n.getDistanceFunction(i,p,d,(function(t){return(p(t)+d(t))/2}));if(n.getClosest(m,F,t),!1!==t.index&&m[t.index].p!==c){k||(L=function(t){return Math.min(A(t),t.p-y.bargroupwidth/2)},C=function(t){return Math.max(M(t),t.p+y.bargroupwidth/2)});var B=m[t.index],N=v.base?B.b+B.s:B.s;t[h+\"0\"]=t[h+\"1\"]=R.c2p(B[h],!0),t[h+\"LabelVal\"]=N;var j=y.extents[y.extents.round(B.p)];t[f+\"0\"]=D.c2p(x?L(B):j[0],!0),t[f+\"1\"]=D.c2p(x?C(B):j[1],!0);var U=void 0!==B.orig_p;return t[f+\"LabelVal\"]=U?B.orig_p:B.p,t.labelLabel=l(D,t[f+\"LabelVal\"],v[f+\"hoverformat\"]),t.valueLabel=l(R,t[h+\"LabelVal\"],v[h+\"hoverformat\"]),t.baseLabel=l(R,B.b,v[h+\"hoverformat\"]),t.spikeDistance=(function(t){var e=u,r=t.b,i=O(t);return n.inbox(r-e,i-e,w+(i-e)/(i-r)-1)}(B)+function(t){return P(A(t),M(t),w)}(B))/2,t[f+\"Spike\"]=D.c2p(B.p,!0),o(B,v,t),t.hovertemplate=v.hovertemplate,t}}function f(t,e){var r=e.mcc||t.marker.color,n=e.mlcc||t.marker.line.color,i=s(t,e);return a.opacity(r)?r:a.opacity(n)&&i?n:void 0}e.exports={hoverPoints:function(t,e,r,n,a){var o=u(t,e,r,n,a);if(o){var s=o.cd,l=s[0].trace,c=s[o.index];return o.color=f(l,c),i.getComponentMethod(\"errorbars\",\"hoverInfo\")(c,l,o),[o]}},hoverOnBars:u,getTraceColor:f}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"./helpers\":654}],656:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\").crossTraceCalc,colorbar:t(\"../scatter/marker_colorbar\"),arraysToCalcdata:t(\"./arrays_to_calcdata\"),plot:t(\"./plot\").plot,style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"bar\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"bar\",\"oriented\",\"errorBarsOK\",\"showLegend\",\"zoomScale\"],animatable:!0,meta:{}}},{\"../../plots/cartesian\":568,\"../scatter/marker_colorbar\":944,\"./arrays_to_calcdata\":647,\"./attributes\":648,\"./calc\":649,\"./cross_trace_calc\":651,\"./defaults\":652,\"./event_data\":653,\"./hover\":655,\"./layout_attributes\":657,\"./layout_defaults\":658,\"./plot\":659,\"./select\":660,\"./style\":662}],657:[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\"}}},{}],658:[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=s(\"barmode\"),p=0;p0}function S(t){return\"auto\"===t?0:t}function E(t,e){var r=Math.PI/180*e,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:t.width*i+t.height*n,y:t.width*n+t.height*i}}function L(t,e,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,c=a.anchor||\"end\",u=\"end\"===c,f=\"start\"===c,h=((a.leftToRight||0)+1)/2,p=1-h,d=i.width,g=i.height,m=Math.abs(e-t),v=Math.abs(n-r),y=m>2*_&&v>2*_?_:0;m-=2*y,v-=2*y;var x=S(l);\"auto\"!==l||d<=m&&g<=v||!(d>m||g>v)||(d>v||g>m)&&d.01?q:function(t,e,r){return r&&t===e?t:Math.abs(t-e)>=2?q(t):t>e?Math.ceil(t):Math.floor(t)};B=G(B,N,D),N=G(N,B,D),j=G(j,U,!D),U=G(U,j,!D)}var Y=A(a.ensureSingle(I,\"path\"),P,m,v);if(Y.style(\"vector-effect\",\"non-scaling-stroke\").attr(\"d\",isNaN((N-B)*(U-j))||V&&t._context.staticPlot?\"M0,0Z\":\"M\"+B+\",\"+j+\"V\"+U+\"H\"+N+\"V\"+j+\"Z\").call(l.setClipUrl,e.layerClipId,t),!P.uniformtext.mode&&R){var W=l.makePointStyleFns(f);l.singlePointStyle(c,Y,f,W,t)}!function(t,e,r,n,i,s,c,f,p,m,v){var w,T=e.xaxis,M=e.yaxis,C=t._fullLayout;function P(e,r,n){return a.ensureSingle(e,\"text\").text(r).attr({class:\"bartext bartext-\"+w,\"text-anchor\":\"middle\",\"data-notex\":1}).call(l.font,n).call(o.convertToTspans,t)}var I=n[0].trace,O=\"h\"===I.orientation,z=function(t,e,r,n,i){var o,s=e[0].trace;o=s.texttemplate?function(t,e,r,n,i){var o=e[0].trace,s=a.castOption(o,r,\"texttemplate\");if(!s)return\"\";var l,c,f,h,p=\"histogram\"===o.type,d=\"waterfall\"===o.type,g=\"funnel\"===o.type,m=\"h\"===o.orientation;m?(l=\"y\",c=i,f=\"x\",h=n):(l=\"x\",c=n,f=\"y\",h=i);function v(t){return u(h,h.c2l(t),!0).text}var y=e[r],x={};x.label=y.p,x.labelLabel=x[l+\"Label\"]=(_=y.p,u(c,c.c2l(_),!0).text);var _;var w=a.castOption(o,y.i,\"text\");(0===w||w)&&(x.text=w);x.value=y.s,x.valueLabel=x[f+\"Label\"]=v(y.s);var T={};b(T,o,y.i),(p||void 0===T.x)&&(T.x=m?x.value:x.label);(p||void 0===T.y)&&(T.y=m?x.label:x.value);(p||void 0===T.xLabel)&&(T.xLabel=m?x.valueLabel:x.labelLabel);(p||void 0===T.yLabel)&&(T.yLabel=m?x.labelLabel:x.valueLabel);d&&(x.delta=+y.rawS||y.s,x.deltaLabel=v(x.delta),x.final=y.v,x.finalLabel=v(x.final),x.initial=x.final-x.delta,x.initialLabel=v(x.initial));g&&(x.value=y.s,x.valueLabel=v(x.value),x.percentInitial=y.begR,x.percentInitialLabel=a.formatPercent(y.begR),x.percentPrevious=y.difR,x.percentPreviousLabel=a.formatPercent(y.difR),x.percentTotal=y.sumR,x.percenTotalLabel=a.formatPercent(y.sumR));var k=a.castOption(o,y.i,\"customdata\");k&&(x.customdata=k);return a.texttemplateString(s,x,t._d3locale,T,x,o._meta||{})}(t,e,r,n,i):s.textinfo?function(t,e,r,n){var i=t[0].trace,o=\"h\"===i.orientation,s=\"waterfall\"===i.type,l=\"funnel\"===i.type;function c(t){return u(o?r:n,+t,!0).text}var f,h=i.textinfo,p=t[e],d=h.split(\"+\"),g=[],m=function(t){return-1!==d.indexOf(t)};m(\"label\")&&g.push((v=t[e].p,u(o?n:r,v,!0).text));var v;m(\"text\")&&(0===(f=a.castOption(i,p.i,\"text\"))||f)&&g.push(f);if(s){var y=+p.rawS||p.s,x=p.v,b=x-y;m(\"initial\")&&g.push(c(b)),m(\"delta\")&&g.push(c(y)),m(\"final\")&&g.push(c(x))}if(l){m(\"value\")&&g.push(c(p.s));var _=0;m(\"percent initial\")&&_++,m(\"percent previous\")&&_++,m(\"percent total\")&&_++;var w=_>1;m(\"percent initial\")&&(f=a.formatPercent(p.begR),w&&(f+=\" of initial\"),g.push(f)),m(\"percent previous\")&&(f=a.formatPercent(p.difR),w&&(f+=\" of previous\"),g.push(f)),m(\"percent total\")&&(f=a.formatPercent(p.sumR),w&&(f+=\" of total\"),g.push(f))}return g.join(\"
\")}(e,r,n,i):g.getValue(s.text,r);return g.coerceString(y,o)}(C,n,i,T,M);w=function(t,e){var r=g.getValue(t.textposition,e);return g.coerceEnumerated(x,r)}(I,i);var D=\"stack\"===m.mode||\"relative\"===m.mode,R=n[i],F=!D||R._outmost;if(!z||\"none\"===w||(R.isBlank||s===c||f===p)&&(\"auto\"===w||\"inside\"===w))return void r.select(\"text\").remove();var B=C.font,N=d.getBarColor(n[i],I),j=d.getInsideTextFont(I,i,B,N),U=d.getOutsideTextFont(I,i,B),V=r.datum();O?\"log\"===T.type&&V.s0<=0&&(s=T.range[0]=G*(Z/Y):Z>=Y*(X/G);G>0&&Y>0&&(J||K||Q)?w=\"inside\":(w=\"outside\",H.remove(),H=null)}else w=\"inside\";if(!H){W=a.ensureUniformFontSize(t,\"outside\"===w?U:j);var $=(H=P(r,z,W)).attr(\"transform\");if(H.attr(\"transform\",\"\"),q=l.bBox(H.node()),G=q.width,Y=q.height,H.attr(\"transform\",$),G<=0||Y<=0)return void H.remove()}var tt,et,rt=I.textangle;\"outside\"===w?(et=\"both\"===I.constraintext||\"outside\"===I.constraintext,tt=function(t,e,r,n,i,a){var o,s=!!a.isHorizontal,l=!!a.constrained,c=a.angle||0,u=i.width,f=i.height,h=Math.abs(e-t),p=Math.abs(n-r);o=s?p>2*_?_:0:h>2*_?_:0;var d=1;l&&(d=s?Math.min(1,p/f):Math.min(1,h/u));var g=S(c),m=E(i,g),v=(s?m.x:m.y)/2,y=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=(t+e)/2,w=(r+n)/2,T=0,A=0,M=s?k(e,t):k(r,n);s?(b=e-M*o,T=M*v):(w=n+M*o,A=-M*v);return{textX:y,textY:x,targetX:b,targetY:w,anchorX:T,anchorY:A,scale:d,rotate:g}}(s,c,f,p,q,{isHorizontal:O,constrained:et,angle:rt})):(et=\"both\"===I.constraintext||\"inside\"===I.constraintext,tt=L(s,c,f,p,q,{isHorizontal:O,constrained:et,angle:rt,anchor:I.insidetextanchor}));tt.fontSize=W.size,h(\"histogram\"===I.type?\"bar\":I.type,tt,C),R.transform=tt,A(H,C,m,v).attr(\"transform\",a.getTextTransform(tt))}(t,e,I,r,p,B,N,j,U,m,v),e.layerClipId&&l.hideOutsideRangePoint(c,I.select(\"text\"),w,C,f.xcalendar,f.ycalendar)}));var j=!1===f.cliponaxis;l.setClipUrl(c,j?null:e.layerClipId,t)}));c.getComponentMethod(\"errorbars\",\"plot\")(t,I,e,m)},toMoveInsideBar:L}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../components/fx/helpers\":402,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"./attributes\":648,\"./constants\":650,\"./helpers\":654,\"./style\":662,\"./uniform_text\":664,\"@plotly/d3\":58,\"fast-isnumeric\":190}],660:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){var a=e.c2p(n?t.s0:t.p0,!0),o=e.c2p(n?t.s1:t.p1,!0),s=r.c2p(n?t.p0:t.s0,!0),l=r.c2p(n?t.p1:t.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}e.exports=function(t,e){var r,i=t.cd,a=t.xaxis,o=t.yaxis,s=i[0].trace,l=\"funnel\"===s.type,c=\"h\"===s.orientation,u=[];if(!1===e)for(r=0;r1||0===i.bargap&&0===i.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr(\"shape-rendering\",\"crispEdges\")})),e.selectAll(\"g.points\").each((function(e){d(n.select(this),e[0].trace,t)})),s.getComponentMethod(\"errorbars\",\"style\")(e)},styleTextPoints:g,styleOnSelect:function(t,e,r){var 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.ensureUniformFontSize(r,m(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):(d(r,i,t),s.getComponentMethod(\"errorbars\",\"style\")(r))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:_,resizeText:l}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../lib\":503,\"../../registry\":638,\"./attributes\":648,\"./helpers\":654,\"./uniform_text\":664,\"@plotly/d3\":58}],663:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/helpers\").hasColorscale,a=t(\"../../components/colorscale/defaults\"),o=t(\"../../lib\").coercePattern;e.exports=function(t,e,r,s,l){var c=r(\"marker.color\",s),u=i(t,\"marker\");u&&a(t,e,l,r,{prefix:\"marker.\",cLetter:\"c\"}),r(\"marker.line.color\",n.defaultLine),i(t,\"marker.line\")&&a(t,e,l,r,{prefix:\"marker.line.\",cLetter:\"c\"}),r(\"marker.line.width\"),r(\"marker.opacity\"),o(r,\"marker.pattern\",c,u),r(\"selected.marker.color\"),r(\"unselected.marker.color\")}},{\"../../components/color\":366,\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503}],664:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\");function a(t){return\"_\"+t+\"Text_minsize\"}e.exports={recordMinTextSize:function(t,e,r){if(r.uniformtext.mode){var n=a(t),i=r.uniformtext.minsize,o=e.scale*e.fontSize;e.hide=o g.point\"}e.selectAll(s).each((function(t){var e=t.transform;e&&(e.scale=l&&e.hide?0:o/e.fontSize,n.select(this).select(\"text\").attr(\"transform\",i.getTextTransform(e)))}))}}}},{\"../../lib\":503,\"@plotly/d3\":58}],665:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../lib/extend\").extendFlat,a=t(\"../scatterpolar/attributes\"),o=t(\"../bar/attributes\");e.exports={r:a.r,theta:a.theta,r0:a.r0,dr:a.dr,theta0:a.theta0,dtheta:a.dtheta,thetaunit:a.thetaunit,base:i({},o.base,{}),offset:i({},o.offset,{}),width:i({},o.width,{}),text:i({},o.text,{}),hovertext:i({},o.hovertext,{}),marker:o.marker,hoverinfo:a.hoverinfo,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{\"../../lib/extend\":493,\"../../plots/template_attributes\":633,\"../bar/attributes\":648,\"../scatterpolar/attributes\":1e3}],666:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/helpers\").hasColorscale,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,m=0;mh.range[1]&&(x+=Math.PI);if(n.getClosest(c,(function(t){return g(y,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?m+Math.min(1,Math.abs(t.thetag1-t.thetag0)/v)-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.hovertemplate=u.hovertemplate,t.color=a(u,b),t.xLabelVal=t.yLabelVal=void 0,b.s<0&&(t.idealAlign=\"left\"),[t]}}},{\"../../components/fx\":406,\"../../lib\":503,\"../../plots/polar/helpers\":621,\"../bar/hover\":655,\"../scatterpolar/hover\":1004}],669:[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\"),formatLabels:t(\"../scatterpolar/format_labels\"),style:t(\"../bar/style\").style,styleOnSelect:t(\"../bar/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../bar/select\"),meta:{}}},{\"../../plots/polar\":622,\"../bar/select\":660,\"../bar/style\":662,\"../scatter/marker_colorbar\":944,\"../scatterpolar/format_labels\":1003,\"./attributes\":665,\"./calc\":666,\"./defaults\":667,\"./hover\":668,\"./layout_attributes\":670,\"./layout_defaults\":671,\"./plot\":672}],670:[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\"}}},{}],671:[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;l0?(c=o,u=l):(c=l,u=o);var f=[s.findEnclosingVertexAngles(c,t.vangles)[0],(c+u)/2,s.findEnclosingVertexAngles(u,t.vangles)[1]];return s.pathPolygonAnnulus(n,i,c,u,f,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(){var r=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),m=(p+d)/2;t.ct=[l.c2p(g*Math.cos(m)),c.c2p(g*Math.sin(m))],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,t)}))}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../plots/polar/helpers\":621,\"@plotly/d3\":58,\"fast-isnumeric\":190}],673:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../bar/attributes\"),a=t(\"../../components/color/attributes\"),o=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../lib/extend\").extendFlat,c=n.marker,u=c.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\"},dx:{valType:\"number\",editType:\"calc\"},dy:{valType:\"number\",editType:\"calc\"},xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,xhoverformat:o(\"x\"),yhoverformat:o(\"y\"),name:{valType:\"string\",editType:\"calc+clearAxisTypes\"},q1:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},median:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},q3:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},lowerfence:{valType:\"data_array\",editType:\"calc\"},upperfence:{valType:\"data_array\",editType:\"calc\"},notched:{valType:\"boolean\",editType:\"calc\"},notchwidth:{valType:\"number\",min:0,max:.5,dflt:.25,editType:\"calc\"},notchspan:{valType:\"data_array\",editType:\"calc\"},boxpoints:{valType:\"enumerated\",values:[\"all\",\"outliers\",\"suspectedoutliers\",!1],editType:\"calc\"},jitter:{valType:\"number\",min:0,max:1,editType:\"calc\"},pointpos:{valType:\"number\",min:-2,max:2,editType:\"calc\"},boxmean:{valType:\"enumerated\",values:[!0,\"sd\",!1],editType:\"calc\"},mean:{valType:\"data_array\",editType:\"calc\"},sd:{valType:\"data_array\",editType:\"calc\"},orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc+clearAxisTypes\"},quartilemethod:{valType:\"enumerated\",values:[\"linear\",\"exclusive\",\"inclusive\"],dflt:\"linear\",editType:\"calc\"},width:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},marker:{outliercolor:{valType:\"color\",dflt:\"rgba(0, 0, 0, 0)\",editType:\"style\"},symbol:l({},c.symbol,{arrayOk:!1,editType:\"plot\"}),opacity:l({},c.opacity,{arrayOk:!1,dflt:1,editType:\"style\"}),size:l({},c.size,{arrayOk:!1,editType:\"calc\"}),color:l({},c.color,{arrayOk:!1,editType:\"style\"}),line:{color:l({},u.color,{arrayOk:!1,dflt:a.defaultLine,editType:\"style\"}),width:l({},u.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,whiskerwidth:{valType:\"number\",min:0,max:1,dflt:.5,editType:\"calc\"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:n.selected.marker,editType:\"style\"},unselected:{marker:n.unselected.marker,editType:\"style\"},text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),hovertemplate:s({}),hoveron:{valType:\"flaglist\",flags:[\"boxes\",\"points\"],dflt:\"boxes+points\",editType:\"style\"}}},{\"../../components/color/attributes\":365,\"../../lib/extend\":493,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../bar/attributes\":648,\"../scatter/attributes\":926}],674:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../plots/cartesian/align_period\"),o=t(\"../../lib\"),s=t(\"../../constants/numerical\").BADNUM,l=o._;e.exports=function(t,e){var r,c,y,x,b,_,w,T=t._fullLayout,k=i.getFromId(t,e.xaxis||\"x\"),A=i.getFromId(t,e.yaxis||\"y\"),M=[],S=\"violin\"===e.type?\"_numViolins\":\"_numBoxes\";\"h\"===e.orientation?(y=k,x=\"x\",b=A,_=\"y\",w=!!e.yperiodalignment):(y=A,x=\"y\",b=k,_=\"x\",w=!!e.xperiodalignment);var E,L,C,P,I,O,z=function(t,e,r,i){var s,l=e+\"0\"in t,c=\"d\"+e in t;if(e in t||l&&c){var u=r.makeCalcdata(t,e);return[a(t,r,e,u).vals,u]}s=l?t[e+\"0\"]:\"name\"in t&&(\"category\"===r.type||n(t.name)&&-1!==[\"linear\",\"log\"].indexOf(r.type)||o.isDateTime(t.name)&&\"date\"===r.type)?t.name:i;for(var f=\"multicategory\"===r.type?r.r2c_just_indices(s):r.d2c(s,0,t[e+\"calendar\"]),h=t._length,p=new Array(h),d=0;dE.uf};if(e._hasPreCompStats){var U=e[x],V=function(t){return y.d2c((e[t]||[])[r])},H=1/0,q=-1/0;for(r=0;r=E.q1&&E.q3>=E.med){var Y=V(\"lowerfence\");E.lf=Y!==s&&Y<=E.q1?Y:p(E,C,P);var W=V(\"upperfence\");E.uf=W!==s&&W>=E.q3?W:d(E,C,P);var X=V(\"mean\");E.mean=X!==s?X:P?o.mean(C,P):(E.q1+E.q3)/2;var Z=V(\"sd\");E.sd=X!==s&&Z>=0?Z:P?o.stdev(C,P,E.mean):E.q3-E.q1,E.lo=g(E),E.uo=m(E);var J=V(\"notchspan\");J=J!==s&&J>0?J:v(E,P),E.ln=E.med-J,E.un=E.med+J;var K=E.lf,Q=E.uf;e.boxpoints&&C.length&&(K=Math.min(K,C[0]),Q=Math.max(Q,C[P-1])),e.notched&&(K=Math.min(K,E.ln),Q=Math.max(Q,E.un)),E.min=K,E.max=Q}else{var $;o.warn([\"Invalid input - make sure that q1 <= median <= q3\",\"q1 = \"+E.q1,\"median = \"+E.med,\"q3 = \"+E.q3].join(\"\\n\")),$=E.med!==s?E.med:E.q1!==s?E.q3!==s?(E.q1+E.q3)/2:E.q1:E.q3!==s?E.q3:0,E.med=$,E.q1=E.q3=$,E.lf=E.uf=$,E.mean=E.sd=$,E.ln=E.un=$,E.min=E.max=$}H=Math.min(H,E.min),q=Math.max(q,E.max),E.pts2=L.filter(j),M.push(E)}}e._extremes[y._id]=i.findExtremes(y,[H,q],{padded:!0})}else{var tt=y.makeCalcdata(e,x),et=function(t,e){for(var r=t.length,n=new Array(r+1),i=0;i=0&&it0){var ut,ft;if((E={}).pos=E[_]=B[r],L=E.pts=nt[r].sort(f),P=(C=E[x]=L.map(h)).length,E.min=C[0],E.max=C[P-1],E.mean=o.mean(C,P),E.sd=o.stdev(C,P,E.mean),E.med=o.interp(C,.5),P%2&&(lt||ct))lt?(ut=C.slice(0,P/2),ft=C.slice(P/2+1)):ct&&(ut=C.slice(0,P/2+1),ft=C.slice(P/2)),E.q1=o.interp(ut,.5),E.q3=o.interp(ft,.5);else E.q1=o.interp(C,.25),E.q3=o.interp(C,.75);E.lf=p(E,C,P),E.uf=d(E,C,P),E.lo=g(E),E.uo=m(E);var ht=v(E,P);E.ln=E.med-ht,E.un=E.med+ht,at=Math.min(at,E.ln),ot=Math.max(ot,E.un),E.pts2=L.filter(j),M.push(E)}e._extremes[y._id]=i.findExtremes(y,e.notched?tt.concat([at,ot]):tt,{padded:!0})}return function(t,e){if(o.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r0?(M[0].t={num:T[S],dPos:N,posLetter:_,valLetter:x,labels:{med:l(t,\"median:\"),min:l(t,\"min:\"),q1:l(t,\"q1:\"),q3:l(t,\"q3:\"),max:l(t,\"max:\"),mean:\"sd\"===e.boxmean?l(t,\"mean \\xb1 \\u03c3:\"):l(t,\"mean:\"),lf:l(t,\"lower fence:\"),uf:l(t,\"upper fence:\")}},T[S]++,M):[{t:{empty:!0}}]};var c={text:\"tx\",hovertext:\"htx\"};function u(t,e,r){for(var n in c)o.isArrayOrTypedArray(e[n])&&(Array.isArray(r)?o.isArrayOrTypedArray(e[n][r[0]])&&(t[c[n]]=e[n][r[0]][r[1]]):t[c[n]]=e[n][r])}function f(t,e){return t.v-e.v}function h(t){return t.v}function p(t,e,r){return 0===r?t.q1:Math.min(t.q1,e[Math.min(o.findBin(2.5*t.q1-1.5*t.q3,e,!0)+1,r-1)])}function d(t,e,r){return 0===r?t.q3:Math.max(t.q3,e[Math.max(o.findBin(2.5*t.q3-1.5*t.q1,e),0)])}function g(t){return 4*t.q1-3*t.q3}function m(t){return 4*t.q3-3*t.q1}function v(t,e){return 0===e?0:1.57*(t.q3-t.q1)/Math.sqrt(e)}},{\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/align_period\":551,\"../../plots/cartesian/axes\":554,\"fast-isnumeric\":190}],675:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/constraints\").getAxisGroup,o=[\"v\",\"h\"];function s(t,e,r,o){var s,l,c,u=e.calcdata,f=e._fullLayout,h=o._id,p=h.charAt(0),d=[],g=0;for(s=0;s1,b=1-f[t+\"gap\"],_=1-f[t+\"groupgap\"];for(s=0;s0){var q=E.pointpos,G=E.jitter,Y=E.marker.size/2,W=0;q+G>=0&&((W=V*(q+G))>M?(H=!0,j=Y,B=W):W>R&&(j=Y,B=M)),W<=M&&(B=M);var X=0;q-G<=0&&((X=-V*(q-G))>S?(H=!0,U=Y,N=X):X>F&&(U=Y,N=S)),X<=S&&(N=S)}else B=M,N=S;var Z=new Array(c.length);for(l=0;l0?(m=\"v\",v=x>0?Math.min(_,b):Math.min(b)):x>0?(m=\"h\",v=Math.min(_)):v=0;if(v){e._length=v;var S=r(\"orientation\",m);e._hasPreCompStats?\"v\"===S&&0===x?(r(\"x0\",0),r(\"dx\",1)):\"h\"===S&&0===y&&(r(\"y0\",0),r(\"dy\",1)):\"v\"===S&&0===x?r(\"x0\"):\"h\"===S&&0===y&&r(\"y0\"),i.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\"],a)}else e.visible=!1}function f(t,e,r,i){var a=i.prefix,o=n.coerce2(t,e,c,\"marker.outliercolor\"),s=r(\"marker.line.outliercolor\"),l=\"outliers\";e._hasPreCompStats?l=\"all\":(o||s)&&(l=\"suspectedoutliers\");var u=r(a+\"points\",l);u?(r(\"jitter\",\"all\"===u?.3:0),r(\"pointpos\",\"all\"===u?-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\"===u&&(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\"),r(\"hovertext\")):delete e.marker;var f=r(\"hoveron\");\"all\"!==f&&-1===f.indexOf(\"points\")||r(\"hovertemplate\"),n.coerceSelectionMarkerOpacity(e,r)}e.exports={supplyDefaults:function(t,e,r,i){function s(r,i){return n.coerce(t,e,c,r,i)}if(u(t,e,s,i),!1!==e.visible){o(t,e,i,s),s(\"xhoverformat\"),s(\"yhoverformat\");var l=e._hasPreCompStats;l&&(s(\"lowerfence\"),s(\"upperfence\")),s(\"line.color\",(t.marker||{}).color||r),s(\"line.width\"),s(\"fillcolor\",a.addOpacity(e.line.color,.5));var h=!1;if(l){var p=s(\"mean\"),d=s(\"sd\");p&&p.length&&(h=!0,d&&d.length&&(h=\"sd\"))}s(\"boxmean\",h),s(\"whiskerwidth\"),s(\"width\"),s(\"quartilemethod\");var g=!1;if(l){var m=s(\"notchspan\");m&&m.length&&(g=!0)}else n.validate(t.notchwidth,c.notchwidth)&&(g=!0);s(\"notched\",g)&&s(\"notchwidth\"),f(t,e,s,{prefix:\"box\"})}},crossTraceDefaults:function(t,e){var r,i;function a(t){return n.coerce(i._input,i,c,t)}for(var o=0;ot.lo&&(x.so=!0)}return a}));h.enter().append(\"path\").classed(\"point\",!0),h.exit().remove(),h.call(a.translatePoints,o,s)}function l(t,e,r,a){var o,s,l=e.val,c=e.pos,u=!!c.rangebreaks,f=a.bPos,h=a.bPosPxOffset||0,p=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var d=t.selectAll(\"path.mean\").data(\"box\"===r.type&&r.boxmean||\"violin\"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);d.enter().append(\"path\").attr(\"class\",\"mean\").style({fill:\"none\",\"vector-effect\":\"non-scaling-stroke\"}),d.exit().remove(),d.each((function(t){var e=c.c2l(t.pos+f,!0),i=c.l2p(e-o)+h,a=c.l2p(e+s)+h,d=u?(i+a)/2:c.l2p(e)+h,g=l.c2p(t.mean,!0),m=l.c2p(t.mean-t.sd,!0),v=l.c2p(t.mean+t.sd,!0);\"h\"===r.orientation?n.select(this).attr(\"d\",\"M\"+g+\",\"+i+\"V\"+a+(\"sd\"===p?\"m0,0L\"+m+\",\"+d+\"L\"+g+\",\"+i+\"L\"+v+\",\"+d+\"Z\":\"\")):n.select(this).attr(\"d\",\"M\"+i+\",\"+g+\"H\"+a+(\"sd\"===p?\"m0,0L\"+d+\",\"+m+\"L\"+i+\",\"+g+\"L\"+d+\",\"+v+\"Z\":\"\"))}))}e.exports={plot:function(t,e,r,a){var c=e.xaxis,u=e.yaxis;i.makeTraceGroups(a,r,\"trace boxes\").each((function(t){var e,r,i=n.select(this),a=t[0],f=a.t,h=a.trace;(f.wdPos=f.bdPos*h.whiskerwidth,!0!==h.visible||f.empty)?i.remove():(\"h\"===h.orientation?(e=u,r=c):(e=c,r=u),o(i,{pos:e,val:r},h,f),s(i,{x:c,y:u},h,f),l(i,{pos:e,val:r},h,f))}))},plotBoxAndWhiskers:o,plotPoints:s,plotBoxMean:l}},{\"../../components/drawing\":388,\"../../lib\":503,\"@plotly/d3\":58}],683:[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=10)return null;for(var i=1/0,a=-1/0,o=e.length,s=0;s0?Math.floor:Math.ceil,I=L>0?Math.ceil:Math.floor,O=L>0?Math.min:Math.max,z=L>0?Math.max:Math.min,D=P(S+C),R=I(E-C),F=[[f=M(S)]];for(a=D;a*L=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}},{}],697:[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,m,v,y,x=t[\"_\"+e],b=t[e+\"axis\"],_=b._gridlines=[],w=b._minorgridlines=[],T=b._boundarylines=[],k=t[\"_\"+r],A=t[r+\"axis\"];\"array\"===b.tickmode&&(b.tickvals=x.slice());var M=t._xctrl,S=t._yctrl,E=M[0].length,L=M.length,C=t._a.length,P=t._b.length;n.prepTicks(b),\"array\"===b.tickmode&&delete b.tickvals;var I=b.smoothing?3:1;function O(n){var i,a,o,s,l,c,u,f,p,d,g,m,v=[],y=[],x={};if(\"b\"===e)for(a=t.b2j(n),o=Math.floor(Math.max(0,Math.min(P-2,a))),s=a-o,x.length=P,x.crossLength=C,x.xy=function(e){return t.evalxy([],e,a)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},i=0;i0&&(p=t.dxydi([],i-1,o,0,s),v.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),d=t.dxydi([],i-1,o,1,s),v.push(f[0]-d[0]/3),y.push(f[1]-d[1]/3)),v.push(f[0]),y.push(f[1]),l=f;else for(i=t.a2i(n),c=Math.floor(Math.max(0,Math.min(C-2,i))),u=i-c,x.length=C,x.crossLength=P,x.xy=function(e){return t.evalxy([],i,e)},x.dxy=function(e,r){return t.dxydj([],c,e,u,r)},a=0;a0&&(g=t.dxydj([],c,a-1,u,0),v.push(l[0]+g[0]/3),y.push(l[1]+g[1]/3),m=t.dxydj([],c,a-1,u,1),v.push(f[0]-m[0]/3),y.push(f[1]-m[1]/3)),v.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=v,x.y=y,x.smoothing=A.smoothing,x}function z(n){var i,a,o,s,l,c=[],u=[],f={};if(f.length=x.length,f.crossLength=k.length,\"b\"===e)for(o=Math.max(0,Math.min(P-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;ix.length-1||_.push(i(z(o),{color:b.gridcolor,width:b.gridwidth}));for(h=u;hx.length-1||g<0||g>x.length-1))for(m=x[s],v=x[g],a=0;ax[x.length-1]||w.push(i(O(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&T.push(i(z(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(z(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(O(p),{color:b.gridcolor,width:b.gridwidth}));for(h=u-1;hx[x.length-1]||w.push(i(O(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&T.push(i(O(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(O(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{\"../../lib/extend\":493,\"../../plots/cartesian/axes\":554}],698:[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;re.length&&(t=t.slice(0,e.length)):t=[],i=0;i90&&(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(n,e,r),offsetMultplier:c}}},{}],712:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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=c.strRotate,f=c.strTranslate,h=t(\"../../constants/alignment\");function p(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 d(t,e,r,a,o,c,h,p){var d=c.selectAll(\"text.\"+p).data(h);d.enter().append(\"text\").classed(p,!0);var g=0,m={};return d.each((function(o,c){var h;if(\"auto\"===o.axis.tickangle)h=s(a,e,r,o.xy,o.dxy);else{var p=(o.axis.tickangle+180)*Math.PI/180;h=s(a,e,r,o.xy,[Math.cos(p),Math.sin(p)])}c||(m={angle:h.angle,flip:h.flip});var d=(o.endAnchor?-1:1)*h.flip,v=n.select(this).attr({\"text-anchor\":d>0?\"start\":\"end\",\"data-notex\":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,t),y=i.bBox(this);v.attr(\"transform\",f(h.p[0],h.p[1])+u(h.angle)+f(o.axis.labelpadding*d,.3*y.height)),g=Math.max(g,y.width+o.axis.labelpadding)})),d.exit().remove(),m.maxExtent=g,m}e.exports=function(t,e,r,i){var l=e.xaxis,u=e.yaxis,f=t._fullLayout._clips;c.makeTraceGroups(i,r,\"trace\").each((function(e){var r=n.select(this),i=e[0],h=i.trace,g=h.aaxis,m=h.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\",h.opacity),p(l,u,x,g,\"a\",g._gridlines),p(l,u,x,m,\"b\",m._gridlines),p(l,u,y,g,\"a\",g._minorgridlines),p(l,u,y,m,\"b\",m._minorgridlines),p(l,u,b,g,\"a-boundary\",g._boundarylines),p(l,u,b,m,\"b-boundary\",m._boundarylines);var w=d(t,l,u,h,i,_,g._labels,\"a-label\"),T=d(t,l,u,h,i,_,m._labels,\"b-label\");!function(t,e,r,n,i,a,o,l){var u,f,h,p,d=c.aggNums(Math.min,null,r.a),g=c.aggNums(Math.max,null,r.a),m=c.aggNums(Math.min,null,r.b),y=c.aggNums(Math.max,null,r.b);u=.5*(d+g),f=m,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)));v(t,e,r,n,h,p,r.aaxis,i,a,o,\"a-title\"),u=d,f=.5*(m+y),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)));v(t,e,r,n,h,p,r.baxis,i,a,l,\"b-title\")}(t,_,h,i,l,u,w,T),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;f90&&y<270,b=n.select(this);b.text(h.title.text).call(l.convertToTspans,t),x&&(_=(-l.lineCount(b)+m)*g*a-_),b.attr(\"transform\",f(e.p[0],e.p[1])+u(e.angle)+f(0,_)).attr(\"text-anchor\",\"middle\").call(i.font,h.title.font)})),b.exit().remove()}},{\"../../components/drawing\":388,\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"./makepath\":709,\"./map_1d_array\":710,\"./orient_text\":711,\"@plotly/d3\":58}],713:[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],m=r[u-1],v=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=v*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;p-=x,d+=x,g-=b,m+=b,t.isVisible=function(t,e){return t>p&&tg&&ed||em},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&&(ne[c-1]|ir[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,m=0,v=[];ne[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)))),ir[u-1]?(p=u-2,d=1,m=(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(v,f,p,h,d),l[0]+=v[0]*g,l[1]+=v[1]*g),m&&(t.dxydj(v,f,p,h,d),l[0]+=v[0]*m,l[1]+=v[1]*m)}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=v*(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\":523,\"./compute_control_points\":701,\"./constants\":702,\"./create_i_derivative_evaluator\":703,\"./create_j_derivative_evaluator\":704,\"./create_spline_evaluator\":705}],714:[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),e0&&void 0!==(n=t[r-1][e])&&(a++,i+=n),r0&&a0&&i1e-5);return n.log(\"Smoother converged to\",k,\"after\",A,\"iterations\"),t}},{\"../../lib\":503}],715:[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\":503}],716:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../scattergeo/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../plots/attributes\"),s=t(\"../../components/color/attributes\").defaultLine,l=t(\"../../lib/extend\").extendFlat,c=i.marker.line;e.exports=l({locations:{valType:\"data_array\",editType:\"calc\"},locationmode:i.locationmode,z:{valType:\"data_array\",editType:\"calc\"},geojson:l({},i.geojson,{}),featureidkey:i.featureidkey,text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),marker:{line:{color:l({},c.color,{dflt:s}),width:l({},c.width,{dflt:1}),editType:\"calc\"},opacity:{valType:\"number\",arrayOk:!0,min:0,max:1,dflt:1,editType:\"style\"},editType:\"calc\"},selected:{marker:{opacity:i.selected.marker.opacity,editType:\"plot\"},editType:\"plot\"},unselected:{marker:{opacity:i.unselected.marker.opacity,editType:\"plot\"},editType:\"plot\"},hoverinfo:l({},o.hoverinfo,{editType:\"calc\",flags:[\"location\",\"z\",\"text\",\"name\"]}),hovertemplate:n(),showlegend:l({},o.showlegend,{dflt:!1})},a(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))},{\"../../components/color/attributes\":365,\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/template_attributes\":633,\"../scattergeo/attributes\":968}],717:[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\");function l(t){return t&&\"string\"==typeof t}e.exports=function(t,e){var r,c=e._length,u=new Array(c);r=e.geojson?function(t){return l(t)||n(t)}:l;for(var f=0;f\")}(t,f,o),[t]}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"./attributes\":716}],721:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../heatmap/colorbar\"),calc:t(\"./calc\"),calcGeoJSON:t(\"./plot\").calcGeoJSON,plot:t(\"./plot\").plot,style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"choropleth\",basePlotModule:t(\"../../plots/geo\"),categories:[\"geo\",\"noOpacity\",\"showLegend\"],meta:{}}},{\"../../plots/geo\":589,\"../heatmap/colorbar\":795,\"./attributes\":716,\"./calc\":717,\"./defaults\":718,\"./event_data\":719,\"./hover\":720,\"./plot\":722,\"./select\":723,\"./style\":724}],722:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../lib/geo_location_utils\"),o=t(\"../../lib/topojson_utils\").getTopojsonFeatures,s=t(\"../../plots/cartesian/autorange\").findExtremes,l=t(\"./style\").style;e.exports={calcGeoJSON:function(t,e){for(var r=t[0].trace,n=e[r.geo],i=n._subplot,l=r.locationmode,c=r._length,u=\"geojson-id\"===l?a.extractTraceFeature(t):o(r,i.topojson),f=[],h=[],p=0;p=0;n--){var i=r[n].id;if(\"string\"==typeof i&&0===i.indexOf(\"water\"))for(var a=n+1;a=0;r--)t.removeLayer(e[r][1])},s.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new o(t,r.uid),a=i.sourceId,s=n(e),l=i.below=t.belowLookup[\"trace-\"+r.uid];return t.map.addSource(a,{type:\"geojson\",data:s.geojson}),i._addLayers(s,l),e[0].trace._glTrace=i,i}},{\"../../plots/mapbox/constants\":611,\"./convert\":726}],730:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../mesh3d/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,c={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\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:a({editType:\"calc\"},{keys:[\"norm\"]}),uhoverformat:i(\"u\",1),vhoverformat:i(\"v\",1),whoverformat:i(\"w\",1),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),showlegend:l({},s.showlegend,{dflt:!1})};l(c,n(\"\",{colorAttr:\"u/v/w norm\",showScaleDflt:!0,editTypeOverride:\"calc\"}));[\"opacity\",\"lightposition\",\"lighting\"].forEach((function(t){c[t]=o[t]})),c.hoverinfo=l({},s.hoverinfo,{editType:\"calc\",flags:[\"x\",\"y\",\"z\",\"u\",\"v\",\"w\",\"norm\",\"text\",\"name\"],dflt:\"x+y+z+norm+text+name\"}),c.transforms=void 0,e.exports=c},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../mesh3d/attributes\":867}],731:[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;co.level||o.starts.length&&a===o.level)}break;case\"constraint\":if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,l=n.y.length,c=-1/0,u=1/0;for(r=0;r\":p>c&&(n.prefixBoundary=!0);break;case\"<\":(pc||n.starts.length&&h===u)&&(n.prefixBoundary=!0);break;case\"][\":f=Math.min(p[0],p[1]),h=Math.max(p[0],p[1]),fc&&(n.prefixBoundary=!0)}}}},{}],738:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale\"),i=t(\"./make_color_map\"),a=t(\"./end_plus\");e.exports={min:\"zmin\",max:\"zmax\",calc:function(t,e,r){var o=e.contours,s=e.line,l=o.size||1,c=o.coloring,u=i(e,{isColorbar:!0});if(\"heatmap\"===c){var f=n.extractOpts(e);r._fillgradient=f.reversescale?n.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else\"fill\"===c&&(r._fillcolor=u);r._line={color:\"lines\"===c?u:s.color,width:!1!==o.showlines?s.width:0,dash:s.dash},r._levels={start:o.start,end:a(o),size:l}}}},{\"../../components/colorscale\":378,\"./end_plus\":746,\"./make_color_map\":751}],739:[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}}},{}],740:[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,m=r(\"contours.operation\");(g._operation=c[m],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),\"=\"===m?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\":366,\"../../constants/filter_ops\":475,\"./label_defaults\":750,\"fast-isnumeric\":190}],741:[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\":475,\"fast-isnumeric\":190}],742:[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\")}},{}],743:[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),starts:n.extendDeep([],t.starts)})}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;r1e3){n.warn(\"Too many contours, clipping at 1000\",t);break}return l}},{\"../../lib\":503,\"./constraint_mapping\":741,\"./end_plus\":746}],746:[function(t,e,r){\"use strict\";e.exports=function(t){return t.end+t.size/1e6}},{}],747:[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])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]}(f,r,e),p=[s(t,e,[-h[0],-h[1]])],d=t.z.length,g=t.z[0].length,m=e.slice(),v=h.slice();for(c=0;c<1e4;c++){if(f>20?(f=i.CHOOSESADDLE[f][(h[0]||h[1])<0?0:1],t.crossings[u]=i.SADDLEREMAINDER[f]):delete t.crossings[u],!(h=i.NEWDELTA[f])){n.log(\"Found bad marching index:\",f,e,t.level);break}p.push(s(t,e,h)),e[0]+=h[0],e[1]+=h[1],u=e.join(\",\"),a(p[p.length-1],p[p.length-2],o,l)&&p.pop();var y=h[0]&&(e[0]<0||e[0]>g-2)||h[1]&&(e[1]<0||e[1]>d-2);if(e[0]===m[0]&&e[1]===m[1]&&h[0]===v[0]&&h[1]===v[1]||r&&y)break;f=t.crossings[u]}1e4===c&&n.log(\"Infinite loop in contour?\");var x,b,_,w,T,k,A,M,S,E,L,C,P,I,O,z=a(p[0],p[p.length-1],o,l),D=0,R=.2*t.smoothing,F=[],B=0;for(c=1;c=B;c--)if((x=F[c])=B&&x+F[b]M&&S--,t.edgepaths[S]=L.concat(p,E));break}V||(t.edgepaths[M]=p.concat(E))}for(M=0;Mt?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=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;hn.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;b2*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.fontSize,a=e.width+i/3,o=Math.max(0,e.height-i/3),s=t.x,l=t.y,c=t.theta,u=Math.sin(c),f=Math.cos(c),h=function(t,e){return[s+t*f-e*u,l+t*u+e*f]},p=[h(-a/2,-o/2),h(-a/2,o/2),h(a/2,o/2),h(a/2,-o/2)];r.push({text:e.text,x:s,y:l,dy:e.dy,theta:c,level:e.level,width:a,height:o}),n.push(p)},r.drawLabels=function(t,e,r,a,o){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(s.convertToTspans,r)})),o){for(var c=\"\",u=0;ur.end&&(r.start=r.end=(r.start+r.end)/2),t._input.contours||(t._input.contours={}),i.extendFlat(t._input.contours,{start:r.start,end:r.end,size:r.size}),t._input.autocontour=!0}else if(\"constraint\"!==r.type){var c,u=r.start,f=r.end,h=t._input.contours;if(u>f&&(r.start=h.start=f,f=r.end=h.end=u,u=r.start),!(r.size>0))c=u===f?1:a(u,f,t.ncontours).dtick,h.size=r.size=c}}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554}],755:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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\":388,\"../heatmap/style\":805,\"./make_color_map\":751,\"@plotly/d3\":58}],756:[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\":376,\"./label_defaults\":750}],757:[function(t,e,r){\"use strict\";var n=t(\"../heatmap/attributes\"),i=t(\"../contour/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../lib/extend\").extendFlat,s=i.contours;e.exports=o({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,hovertext:n.hovertext,transpose:n.transpose,atype:n.xtype,btype:n.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:s.type,start:s.start,end:s.end,size:s.size,coloring:{valType:\"enumerated\",values:[\"fill\",\"lines\",\"none\"],dflt:\"fill\",editType:\"calc\"},showlines:s.showlines,showlabels:s.showlabels,labelfont:s.labelfont,labelformat:s.labelformat,operation:s.operation,value:s.value,editType:\"calc\",impliedEdits:{autocontour:!1}},line:{color:i.line.color,width:i.line.width,dash:i.line.dash,smoothing:i.line.smoothing,editType:\"plot\"},transforms:void 0},a(\"\",{cLetter:\"z\",autoColorDflt:!1}))},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../contour/attributes\":735,\"../heatmap/attributes\":792}],758:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\"),i=t(\"../../lib\"),a=t(\"../heatmap/convert_column_xyz\"),o=t(\"../heatmap/clean_2d_array\"),s=t(\"../heatmap/interp2d\"),l=t(\"../heatmap/find_empties\"),c=t(\"../heatmap/make_bound_array\"),u=t(\"./defaults\"),f=t(\"../carpet/lookup_carpetid\"),h=t(\"../contour/set_contours\");e.exports=function(t,e){var r=e._carpetTrace=f(t,e);if(r&&r.visible&&\"legendonly\"!==r.visible){if(!e.a||!e.b){var p=t.data[r.index],d=t.data[e.index];d.a||(d.a=p.a),d.b||(d.b=p.b),u(d,e,e._defaultColor,t._fullLayout)}var g=function(t,e){var r,u,f,h,p,d,g,m=e._carpetTrace,v=m.aaxis,y=m.baxis;v._minDtick=0,y._minDtick=0,i.isArray1D(e.z)&&a(e,v,y,\"a\",\"b\",[\"z\"]);r=e._a=e._a||e.a,h=e._b=e._b||e.b,r=r?v.makeCalcdata(e,\"_a\"):[],h=h?y.makeCalcdata(e,\"_b\"):[],u=e.a0||0,f=e.da||1,p=e.b0||0,d=e.db||1,g=e._z=o(e._z||e.z,e.transpose),e._emptypoints=l(g),s(g,e._emptypoints);var x=i.maxRowLength(g),b=\"scaled\"===e.xtype?\"\":r,_=c(e,b,u,f,x,v),w=\"scaled\"===e.ytype?\"\":h,T=c(e,w,p,d,g.length,y),k={a:_,b:T,z:g};\"levels\"===e.contours.type&&\"none\"!==e.contours.coloring&&n(t,e,{vals:g,containerStr:\"\",cLetter:\"z\"});return[k]}(t,e);return h(e,e._z),g}}},{\"../../components/colorscale/calc\":374,\"../../lib\":503,\"../carpet/lookup_carpetid\":708,\"../contour/set_contours\":754,\"../heatmap/clean_2d_array\":794,\"../heatmap/convert_column_xyz\":796,\"../heatmap/find_empties\":798,\"../heatmap/interp2d\":801,\"../heatmap/make_bound_array\":803,\"./defaults\":759}],759:[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\":503,\"../contour/constraint_defaults\":740,\"../contour/contours_defaults\":742,\"../contour/style_defaults\":756,\"../heatmap/xyz_defaults\":807,\"./attributes\":757}],760:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../contour/colorbar\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../contour/style\"),moduleType:\"trace\",name:\"contourcarpet\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"carpet\",\"contour\",\"symbols\",\"showLegend\",\"hasLines\",\"carpetDependent\",\"noHover\",\"noSortingByValue\"],meta:{}}},{\"../../plots/cartesian\":568,\"../contour/colorbar\":738,\"../contour/style\":755,\"./attributes\":757,\"./calc\":758,\"./defaults\":759,\"./plot\":761}],761:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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(\"../contour/empty_pathinfo\"),d=t(\"../contour/close_boundaries\"),g=t(\"../carpet/lookup_carpetid\"),m=t(\"../carpet/axis_aligned_line\");function v(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 y(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function x(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,b){var _=e.xaxis,w=e.yaxis;s.makeTraceGroups(b,r,\"contour\").each((function(r){var b=n.select(this),T=r[0],k=T.trace,A=k._carpetTrace=g(t,k),M=t.calcdata[A.index][0];if(A.visible&&\"legendonly\"!==A.visible){var S=T.a,E=T.b,L=k.contours,C=p(L,e,T),P=\"constraint\"===L.type,I=L._operation,O=P?\"=\"===I?\"lines\":\"fill\":L.coloring,z=[[S[0],E[E.length-1]],[S[S.length-1],E[E.length-1]],[S[S.length-1],E[0]],[S[0],E[0]]];l(C);var D=1e-8*(S[S.length-1]-S[0]),R=1e-8*(E[E.length-1]-E[0]);c(C,D,R);var F,B,N,j,U=C;\"constraint\"===L.type&&(U=h(C,I)),function(t,e){var r,n,i,a,o,s,l,c,u;for(r=0;r=0;j--)F=M.clipsegments[j],B=i([],F.x,_.c2p),N=i([],F.y,w.c2p),B.reverse(),N.reverse(),V.push(a(B,N,F.bicubic));var H=\"M\"+V.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=0&&(h=L,d=g):Math.abs(f[1]-h[1])=0&&(h=L,d=g):s.log(\"endpt to newendpt is not vert. or horz.\",f,h,L)}if(d>=0)break;y+=S(f,h),f=h}if(d===e.edgepaths.length){s.log(\"unclosed perimeter path\");break}u=d,(b=-1===x.indexOf(u))&&(u=x[0],y+=S(f,h)+\"Z\",f=null)}for(u=0;um&&(n.max=m);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/I),f.LABELMAX),a=0;a0?+p[u]:0),f.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:v},properties:y})}}var b=o.extractOpts(e),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],T=[\"interpolate\",[\"linear\"],[\"heatmap-density\"],0,a.opacity(w)<1?w:a.addOpacity(w,0)];for(u=1;u<_.length;u++)T.push(_[u][0],_[u][1]);var k=[\"interpolate\",[\"linear\"],[\"get\",\"z\"],b.min,0,b.max,1];return i.extendFlat(c.heatmap.paint,{\"heatmap-weight\":d?k:1/(b.max-b.min),\"heatmap-color\":T,\"heatmap-radius\":g?{type:\"identity\",property:\"r\"}:e.radius,\"heatmap-opacity\":e.opacity}),c.geojson={type:\"FeatureCollection\",features:f},c.heatmap.layout.visibility=\"visible\",c}},{\"../../components/color\":366,\"../../components/colorscale\":378,\"../../constants/numerical\":479,\"../../lib\":503,\"../../lib/geojson_utils\":497,\"fast-isnumeric\":190}],765:[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(\"lon\")||[],c=s(\"lat\")||[],u=Math.min(l.length,c.length);u?(e._length=u,s(\"z\"),s(\"radius\"),s(\"below\"),s(\"text\"),s(\"hovertext\"),s(\"hovertemplate\"),i(t,e,o,s,{prefix:\"\",cLetter:\"z\"})):e.visible=!1}},{\"../../components/colorscale/defaults\":376,\"../../lib\":503,\"./attributes\":762}],766:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.z=e.z,t}},{}],767:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../scattermapbox/hover\").hoverPoints,a=t(\"../scattermapbox/hover\").getExtraText;e.exports=function(t,e,r){var o=i(t,e,r);if(o){var s=o[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,\"z\"in u){var f=s.subplot.mockAxis;s.z=u.z,s.zLabel=n.tickText(f,f.c2l(u.z),\"hover\").text}return s.extraText=a(c,u,l[0].t.labels),[s]}}},{\"../../plots/cartesian/axes\":554,\"../scattermapbox/hover\":996}],768:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../heatmap/colorbar\"),formatLabels:t(\"../scattermapbox/format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),getBelow:function(t,e){for(var r=e.getMapLayers(),n=0;n=0;r--)t.removeLayer(e[r][1])},o.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new a(t,r.uid),o=i.sourceId,s=n(e),l=i.below=t.belowLookup[\"trace-\"+r.uid];return t.map.addSource(o,{type:\"geojson\",data:s.geojson}),i._addLayers(s,l),i}},{\"../../plots/mapbox/constants\":611,\"./convert\":764}],770:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){for(var r=0;r\"),l.color=function(t,e){var r=t.marker,i=e.mc||r.color,a=e.mlc||r.line.color,o=e.mlw||r.line.width;if(n(i))return i;if(n(a)&&o)return a}(u,h),[l]}}},{\"../../components/color\":366,\"../../lib\":503,\"../bar/hover\":655}],778:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\"),plot:t(\"./plot\"),style:t(\"./style\").style,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"../bar/select\"),moduleType:\"trace\",name:\"funnel\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"../bar/select\":660,\"./attributes\":771,\"./calc\":772,\"./cross_trace_calc\":774,\"./defaults\":775,\"./event_data\":776,\"./hover\":777,\"./layout_attributes\":779,\"./layout_defaults\":780,\"./plot\":781,\"./style\":782}],779:[function(t,e,r){\"use strict\";e.exports={funnelmode:{valType:\"enumerated\",values:[\"stack\",\"group\",\"overlay\"],dflt:\"stack\",editType:\"calc\"},funnelgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},funnelgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],780:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s path\").each((function(t){if(!t.isBlank){var e=s.marker;n.select(this).call(a.fill,t.mc||e.color).call(a.stroke,t.mlc||e.line.color).call(i.dashLine,e.line.dash,t.mlw||e.line.width).style(\"opacity\",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(\".regions\").each((function(){n.select(this).selectAll(\"path\").style(\"stroke-width\",0).call(a.fill,s.connector.fillcolor)})),r.selectAll(\".lines\").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll(\"path\"),t.width,t.color,t.dash)}))}))}}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../constants/interactions\":478,\"../bar/style\":662,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],783:[function(t,e,r){\"use strict\";var n=t(\"../pie/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/domain\").attributes,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../../plots/template_attributes\").texttemplateAttrs,l=t(\"../../lib/extend\").extendFlat;e.exports={labels:n.labels,label0:n.label0,dlabel:n.dlabel,values:n.values,marker:{colors:n.marker.colors,line:{color:l({},n.marker.line.color,{dflt:null}),width:l({},n.marker.line.width,{dflt:1}),editType:\"calc\"},editType:\"calc\"},text:n.text,hovertext:n.hovertext,scalegroup:l({},n.scalegroup,{}),textinfo:l({},n.textinfo,{flags:[\"label\",\"text\",\"value\",\"percent\"]}),texttemplate:s({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),hoverinfo:l({},i.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:o({},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),textposition:l({},n.textposition,{values:[\"inside\",\"none\"],dflt:\"inside\"}),textfont:n.textfont,insidetextfont:n.insidetextfont,title:{text:n.title.text,font:n.title.font,position:l({},n.title.position,{values:[\"top left\",\"top center\",\"top right\"],dflt:\"top center\"}),editType:\"plot\"},domain:a({name:\"funnelarea\",trace:!0,editType:\"calc\"}),aspectratio:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},baseratio:{valType:\"number\",min:0,max:1,dflt:.333,editType:\"plot\"}}},{\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/domain\":584,\"../../plots/template_attributes\":633,\"../pie/attributes\":900}],784:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"funnelarea\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":619}],785:[function(t,e,r){\"use strict\";var n=t(\"../pie/calc\");e.exports={calc:function(t,e){return n.calc(t,e)},crossTraceCalc:function(t){n.crossTraceCalc(t,{type:\"funnelarea\"})}}},{\"../pie/calc\":902}],786:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../plots/domain\").defaults,o=t(\"../bar/defaults\").handleText,s=t(\"../pie/defaults\").handleLabelsAndValues;e.exports=function(t,e,r,l){function c(r,a){return n.coerce(t,e,i,r,a)}var u=c(\"labels\"),f=c(\"values\"),h=s(u,f),p=h.len;if(e._hasLabels=h.hasLabels,e._hasValues=h.hasValues,!e._hasLabels&&e._hasValues&&(c(\"label0\"),c(\"dlabel\")),p){e._length=p,c(\"marker.line.width\")&&c(\"marker.line.color\",l.paper_bgcolor),c(\"marker.colors\"),c(\"scalegroup\");var d,g=c(\"text\"),m=c(\"texttemplate\");if(m||(d=c(\"textinfo\",Array.isArray(g)?\"text+percent\":\"percent\")),c(\"hovertext\"),c(\"hovertemplate\"),m||d&&\"none\"!==d){var v=c(\"textposition\");o(t,e,l,c,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}a(e,l,c),c(\"title.text\")&&(c(\"title.position\"),n.coerceFont(c,\"title.font\",l.font)),c(\"aspectratio\"),c(\"baseratio\")}else e.visible=!1}},{\"../../lib\":503,\"../../plots/domain\":584,\"../bar/defaults\":652,\"../pie/defaults\":903,\"./attributes\":783}],787:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"funnelarea\",basePlotModule:t(\"./base_plot\"),categories:[\"pie-like\",\"funnelarea\",\"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\"),style:t(\"./style\"),styleOne:t(\"../pie/style_one\"),meta:{}}},{\"../pie/style_one\":911,\"./attributes\":783,\"./base_plot\":784,\"./calc\":785,\"./defaults\":786,\"./layout_attributes\":788,\"./layout_defaults\":789,\"./plot\":790,\"./style\":791}],788:[function(t,e,r){\"use strict\";var n=t(\"../pie/layout_attributes\").hiddenlabels;e.exports={hiddenlabels:n,funnelareacolorway:{valType:\"colorlist\",editType:\"calc\"},extendfunnelareacolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{\"../pie/layout_attributes\":907}],789:[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(\"funnelareacolorway\",e.colorway),r(\"extendfunnelareacolors\")}},{\"../../lib\":503,\"./layout_attributes\":788}],790:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/drawing\"),a=t(\"../../lib\"),o=a.strScale,s=a.strTranslate,l=t(\"../../lib/svg_text_utils\"),c=t(\"../bar/plot\").toMoveInsideBar,u=t(\"../bar/uniform_text\"),f=u.recordMinTextSize,h=u.clearMinTextSize,p=t(\"../pie/helpers\"),d=t(\"../pie/plot\"),g=d.attachFxHandlers,m=d.determineInsideTextFont,v=d.layoutAreas,y=d.prerenderTitles,x=d.positionTitleOutside,b=d.formatSliceLabel;function _(t,e){return\"l\"+(e[0]-t[0])+\",\"+(e[1]-t[1])}e.exports=function(t,e){var r=t._fullLayout;h(\"funnelarea\",r),y(e,t),v(e,r._size),a.makeTraceGroups(r._funnelarealayer,e,\"trace\").each((function(e){var u=n.select(this),h=e[0],d=h.trace;!function(t){if(!t.length)return;var e=t[0],r=e.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a,o=Math.pow(i,2),s=e.vTotal,l=s,c=s*o/(1-o)/s;function u(){var t,e={x:t=Math.sqrt(c),y:-t};return[e.x,e.y]}var f,h,p=[];for(p.push(u()),f=t.length-1;f>-1;f--)if(!(h=t[f]).hidden){var d=h.v/l;c+=d,p.push(u())}var g=1/0,m=-1/0;for(f=0;f-1;f--)if(!(h=t[f]).hidden){var A=p[k+=1][0],M=p[k][1];h.TL=[-A,M],h.TR=[A,M],h.BL=w,h.BR=T,h.pxmid=(S=h.TR,E=h.BR,[.5*(S[0]+E[0]),.5*(S[1]+E[1])]),w=h.TL,T=h.TR}var S,E}(e),u.each((function(){var u=n.select(this).selectAll(\"g.slice\").data(e);u.enter().append(\"g\").classed(\"slice\",!0),u.exit().remove(),u.each((function(o,s){if(o.hidden)n.select(this).selectAll(\"path,g\").remove();else{o.pointNumber=o.i,o.curveNumber=d.index;var u=h.cx,v=h.cy,y=n.select(this),x=y.selectAll(\"path.surface\").data([o]);x.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":\"all\"}),y.call(g,t,e);var w=\"M\"+(u+o.TR[0])+\",\"+(v+o.TR[1])+_(o.TR,o.BR)+_(o.BR,o.BL)+_(o.BL,o.TL)+\"Z\";x.attr(\"d\",w),b(t,o,h);var T=p.castOption(d.textposition,o.pts),k=y.selectAll(\"g.slicetext\").data(o.text&&\"none\"!==T?[0]:[]);k.enter().append(\"g\").classed(\"slicetext\",!0),k.exit().remove(),k.each((function(){var h=a.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),p=a.ensureUniformFontSize(t,m(d,o,r.font));h.text(o.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(i.font,p).call(l.convertToTspans,t);var g,y,x,b=i.bBox(h.node()),_=Math.min(o.BL[1],o.BR[1])+v,w=Math.max(o.TL[1],o.TR[1])+v;y=Math.max(o.TL[0],o.BL[0])+u,x=Math.min(o.TR[0],o.BR[0])+u,(g=c(y,x,_,w,b,{isHorizontal:!0,constrained:!0,angle:0,anchor:\"middle\"})).fontSize=p.size,f(d.type,g,r),e[s].transform=g,h.attr(\"transform\",a.getTextTransform(g))}))}}));var v=n.select(this).selectAll(\"g.titletext\").data(d.title.text?[0]:[]);v.enter().append(\"g\").classed(\"titletext\",!0),v.exit().remove(),v.each((function(){var e=a.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),c=d.title.text;d._meta&&(c=a.templateString(c,d._meta)),e.text(c).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(i.font,d.title.font).call(l.convertToTspans,t);var u=x(h,r._size);e.attr(\"transform\",s(u.x,u.y)+o(Math.min(1,u.scale))+s(u.tx,u.ty))}))}))}))}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../bar/plot\":659,\"../bar/uniform_text\":664,\"../pie/helpers\":905,\"../pie/plot\":909,\"@plotly/d3\":58}],791:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../pie/style_one\"),a=t(\"../bar/uniform_text\").resizeText;e.exports=function(t){var e=t._fullLayout._funnelarealayer.selectAll(\".trace\");a(t,e,\"funnelarea\"),e.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)}))}))}},{\"../bar/uniform_text\":664,\"../pie/style_one\":911,\"@plotly/d3\":58}],792:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/font_attributes\"),o=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../plots/template_attributes\").texttemplateAttrs,c=t(\"../../components/colorscale/attributes\"),u=t(\"../../lib/extend\").extendFlat;e.exports=u({z:{valType:\"data_array\",editType:\"calc\"},x:u({},n.x,{impliedEdits:{xtype:\"array\"}}),x0:u({},n.x0,{impliedEdits:{xtype:\"scaled\"}}),dx:u({},n.dx,{impliedEdits:{xtype:\"scaled\"}}),y:u({},n.y,{impliedEdits:{ytype:\"array\"}}),y0:u({},n.y0,{impliedEdits:{ytype:\"scaled\"}}),dy:u({},n.dy,{impliedEdits:{ytype:\"scaled\"}}),xperiod:u({},n.xperiod,{impliedEdits:{xtype:\"scaled\"}}),yperiod:u({},n.yperiod,{impliedEdits:{ytype:\"scaled\"}}),xperiod0:u({},n.xperiod0,{impliedEdits:{xtype:\"scaled\"}}),yperiod0:u({},n.yperiod0,{impliedEdits:{ytype:\"scaled\"}}),xperiodalignment:u({},n.xperiodalignment,{impliedEdits:{xtype:\"scaled\"}}),yperiodalignment:u({},n.yperiodalignment,{impliedEdits:{ytype:\"scaled\"}}),text:{valType:\"data_array\",editType:\"calc\"},hovertext:{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\"},hoverongaps:{valType:\"boolean\",dflt:!0,editType:\"none\"},connectgaps:{valType:\"boolean\",editType:\"calc\"},xgap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},ygap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},xhoverformat:o(\"x\"),yhoverformat:o(\"y\"),zhoverformat:o(\"z\",1),hovertemplate:s(),texttemplate:l({arrayOk:!1,editType:\"plot\"},{keys:[\"x\",\"y\",\"z\",\"text\"]}),textfont:a({editType:\"plot\",autoSize:!0,autoColor:!0,colorEditType:\"style\"}),showlegend:u({},i.showlegend,{dflt:!1})},{transforms:void 0},c(\"\",{cLetter:\"z\",autoColorDflt:!1}))},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/font_attributes\":585,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926}],793:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../plots/cartesian/align_period\"),s=t(\"../histogram2d/calc\"),l=t(\"../../components/colorscale/calc\"),c=t(\"./convert_column_xyz\"),u=t(\"./clean_2d_array\"),f=t(\"./interp2d\"),h=t(\"./find_empties\"),p=t(\"./make_bound_array\"),d=t(\"../../constants/numerical\").BADNUM;function g(t){for(var e=[],r=t.length,n=0;nD){O(\"x scale is not linear\");break}}if(x.length&&\"fast\"===P){var R=(x[x.length-1]-x[0])/(x.length-1),F=Math.abs(R/100);for(k=0;kF){O(\"y scale is not linear\");break}}}var B=i.maxRowLength(T),N=\"scaled\"===e.xtype?\"\":r,j=p(e,N,m,v,B,M),U=\"scaled\"===e.ytype?\"\":x,V=p(e,U,b,_,T.length,S);C||(e._extremes[M._id]=a.findExtremes(M,j),e._extremes[S._id]=a.findExtremes(S,V));var H={x:j,y:V,z:T,text:e._text||e.text,hovertext:e._hovertext||e.hovertext};if(e.xperiodalignment&&y&&(H.orig_x=y),e.yperiodalignment&&w&&(H.orig_y=w),N&&N.length===j.length-1&&(H.xCenter=N),U&&U.length===V.length-1&&(H.yCenter=U),L&&(H.xRanges=A.xRanges,H.yRanges=A.yRanges,H.pts=A.pts),E||l(t,e,{vals:T,cLetter:\"z\"}),E&&e.contours&&\"heatmap\"===e.contours.coloring){var q={type:\"contour\"===e.type?\"heatmap\":\"histogram2d\",xcalendar:e.xcalendar,ycalendar:e.ycalendar};H.xfill=p(q,N,m,v,B,M),H.yfill=p(q,U,b,_,T.length,S)}return[H]}},{\"../../components/colorscale/calc\":374,\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/align_period\":551,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"../histogram2d/calc\":826,\"./clean_2d_array\":794,\"./convert_column_xyz\":796,\"./find_empties\":798,\"./interp2d\":801,\"./make_bound_array\":803}],794:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e,r,o){var s,l,c,u,f,h;function p(t){if(n(t))return+t}if(e&&e.transpose){for(s=0,f=0;f=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]}))}},{\"../../lib\":503}],799:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../components/colorscale\").extractOpts;e.exports=function(t,e,r,s,l){l||(l={});var c,u,f,h,p=l.isContour,d=t.cd[0],g=d.trace,m=t.xa,v=t.ya,y=d.x,x=d.y,b=d.z,_=d.xCenter,w=d.yCenter,T=d.zmask,k=g.zhoverformat,A=y,M=x;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>=b[0].length||h<0||h>b.length)return}else{if(n.inbox(e-y[0],e-y[y.length-1],0)>0||n.inbox(r-x[0],r-x[x.length-1],0)>0)return;if(p){var S;for(A=[2*y[0]-y[1]],S=1;Sg&&(v=Math.max(v,Math.abs(t[a][o]-d)/(m-g))))}return v}e.exports=function(t,e){var r,i=1;for(o(t,e),r=0;r.01;r++)i=o(t,e,a(i));return i>.01&&n.log(\"interp2d didn't converge quickly\",i),t}},{\"../../lib\":503}],802:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){t(\"texttemplate\");var r=n.extendFlat({},e.font,{color:\"auto\",size:\"auto\"});n.coerceFont(t,\"textfont\",r)}},{\"../../lib\":503}],803:[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;u0;)_=w.c2p(R[S]),S--;for(_0;)M=T.c2p(F[S]),S--;if(MGt||Gt>T._length))for(E=Ut;EWt||Wt>w._length)){var Xt=u({x:Yt,y:qt},I,t._fullLayout);Xt.x=Yt,Xt.y=qt;var Zt=P.z[S][E];void 0===Zt?(Xt.z=\"\",Xt.zLabel=\"\"):(Xt.z=Zt,Xt.zLabel=s.tickText(Ft,Zt,\"hover\").text);var Jt=P.text&&P.text[S]&&P.text[S][E];void 0!==Jt&&!1!==Jt||(Jt=\"\"),Xt.text=Jt;var Kt=l.texttemplateString(Dt,Xt,t._fullLayout._d3locale,Xt,I._meta||{});if(Kt){var Qt=Kt.split(\"
\"),$t=Qt.length,te=0;for(L=0;L<$t;L++)te=Math.max(te,Qt[L].length);Ht.push({l:$t,c:te,t:Kt,x:Wt,y:Gt,z:Zt})}}}}var ee=I.textfont,re=ee.family,ne=ee.size,ie=t._fullLayout.font.size;if(!ne||\"auto\"===ne){var ae=1/0,oe=1/0,se=0,le=0;for(L=0;L0&&(a=!0);for(var l=0;la){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]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],m=Math.min(f(d+h,d+p,n,a),f(g+h,g+p,n,a)),v=Math.min(f(d+c,d+h,n,a),f(g+c,g+h,n,a));if(m>v&&vo){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(cr.r2l(B)&&(j=o.tickIncrement(j,b.size,!0,p)),z.start=r.l2r(j),F||i.nestedProperty(e,v+\".start\").set(z.start)}var U=b.end,V=r.r2l(O.end),H=void 0!==V;if((b.endFound||H)&&V!==r.r2l(U)){var q=H?V:i.aggNums(Math.max,null,d);z.end=r.l2r(q),H||i.nestedProperty(e,v+\".start\").set(z.end)}var G=\"autobin\"+s;return!1===e._input[G]&&(e._input[v]=i.extendFlat({},e[v]||{}),delete e._input[G],delete e[G]),[z,d]}e.exports={calc:function(t,e){var r,a,p,d,g=[],m=[],v=\"h\"===e.orientation,y=o.getFromId(t,v?e.yaxis:e.xaxis),x=v?\"y\":\"x\",b={x:\"y\",y:\"x\"}[x],_=e[x+\"calendar\"],w=e.cumulative,T=h(t,e,y,x),k=T[0],A=T[1],M=\"string\"==typeof k.size,S=[],E=M?S:k,L=[],C=[],P=[],I=0,O=e.histnorm,z=e.histfunc,D=-1!==O.indexOf(\"density\");w.enabled&&D&&(O=O.replace(/ ?density$/,\"\"),D=!1);var R,F=\"max\"===z||\"min\"===z?null:0,B=l.count,N=c[O],j=!1,U=function(t){return y.r2c(t,0,_)};for(i.isArrayOrTypedArray(e[b])&&\"count\"!==z&&(R=e[b],j=\"avg\"===z,B=l[z]),r=U(k.start),p=U(k.end)+(r-o.tickIncrement(r,k.size,!1,_))/1e6;r=0&&d=0;n--)s(n);else if(\"increasing\"===e){for(n=1;n=0;n--)t[n]+=t[n+1];\"exclude\"===r&&(t.push(0),t.shift())}}(m,w.direction,w.currentbin);var K=Math.min(g.length,m.length),Q=[],$=0,tt=K-1;for(r=0;r=$;r--)if(m[r]){tt=r;break}for(r=$;r<=tt;r++)if(n(g[r])&&n(m[r])){var et={p:g[r],s:m[r],b:0};w.enabled||(et.pts=P[r],Y?et.ph0=et.ph1=P[r].length?A[P[r][0]]:g[r]:(e._computePh=!0,et.ph0=q(S[r]),et.ph1=q(S[r+1],!0))),Q.push(et)}return 1===Q.length&&(Q[0].width1=o.tickIncrement(Q[0].p,k.size,!1,_)-Q[0].p),s(Q,e),i.isArrayOrTypedArray(e.selectedpoints)&&i.tagSelected(Q,e,Z),Q},calcAllAutoBins:h}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"../bar/arrays_to_calcdata\":647,\"./average\":813,\"./bin_functions\":815,\"./bin_label_vals\":816,\"./norm_functions\":824,\"fast-isnumeric\":190}],818:[function(t,e,r){\"use strict\";e.exports={eventDataKeys:[\"binNumber\"]}},{}],819:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axis_ids\"),a=t(\"../../registry\").traceIs,o=t(\"../bar/defaults\").handleGroupingDefaults,s=n.nestedProperty,l=t(\"../../plots/cartesian/constraints\").getAxisGroup,c=[{aStr:{x:\"xbins.start\",y:\"ybins.start\"},name:\"start\"},{aStr:{x:\"xbins.end\",y:\"ybins.end\"},name:\"end\"},{aStr:{x:\"xbins.size\",y:\"ybins.size\"},name:\"size\"},{aStr:{x:\"nbinsx\",y:\"nbinsy\"},name:\"nbins\"}],u=[\"x\",\"y\"];e.exports=function(t,e){var r,f,h,p,d,g,m,v=e._histogramBinOpts={},y=[],x={},b=[];function _(t,e){return n.coerce(r._input,r,r._module.attributes,t,e)}function w(t){return\"v\"===t.orientation?\"x\":\"y\"}function T(t,r,a){var o=t.uid+\"__\"+a;r||(r=o);var s=function(t,r){return i.getFromTrace({_fullLayout:e},t,r).type}(t,a),l=t[a+\"calendar\"]||\"\",c=v[r],u=!0;c&&(s===c.axType&&l===c.calendar?(u=!1,c.traces.push(t),c.dirs.push(a)):(r=o,s!==c.axType&&n.warn([\"Attempted to group the bins of trace\",t.index,\"set on a\",\"type:\"+s,\"axis\",\"with bins on\",\"type:\"+c.axType,\"axis.\"].join(\" \")),l!==c.calendar&&n.warn([\"Attempted to group the bins of trace\",t.index,\"set with a\",l,\"calendar\",\"with bins\",c.calendar?\"on a \"+c.calendar+\" calendar\":\"w/o a set calendar\"].join(\" \")))),u&&(v[r]={traces:[t],dirs:[a],axType:s,calendar:t[a+\"calendar\"]||\"\"}),t[\"_\"+a+\"bingroup\"]=r}for(d=0;dS&&T.splice(S,T.length-S),M.length>S&&M.splice(S,M.length-S);var E=[],L=[],C=[],P=\"string\"==typeof w.size,I=\"string\"==typeof A.size,O=[],z=[],D=P?O:w,R=I?z:A,F=0,B=[],N=[],j=e.histnorm,U=e.histfunc,V=-1!==j.indexOf(\"density\"),H=\"max\"===U||\"min\"===U?null:0,q=a.count,G=o[j],Y=!1,W=[],X=[],Z=\"z\"in e?e.z:\"marker\"in e&&Array.isArray(e.marker.color)?e.marker.color:\"\";Z&&\"count\"!==U&&(Y=\"avg\"===U,q=a[U]);var J=w.size,K=x(w.start),Q=x(w.end)+(K-i.tickIncrement(K,J,!1,v))/1e6;for(r=K;r=0&&p=0&&d-1,flipY:E.tiling.flip.indexOf(\"y\")>-1,orientation:E.tiling.orientation,pad:{inner:E.tiling.pad},maxDepth:E._maxDepth}).descendants(),O=1/0,z=-1/0;I.forEach((function(t){var e=t.depth;e>=E._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(O=Math.min(O,e),z=Math.max(z,e))})),p=p.data(I,u.getPtId),E._maxVisibleLayers=isFinite(z)?z-O+1:0,p.enter().append(\"g\").classed(\"slice\",!0),T(p,!1,{},[g,m],x),p.order();var D=null;if(w&&M){var R=u.getPtId(M);p.each((function(t){null===D&&u.getPtId(t)===R&&(D={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var F=function(){return D||{x0:0,x1:g,y0:0,y1:m}},B=p;return w&&(B=B.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),B.each((function(s){s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-E.tiling.pad),s._hoverY=y(P?s.y1-E.tiling.pad/2:s.y0+E.tiling.pad/2);var p=n.select(this),d=i.ensureSingle(p,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?d.transition().attrTween(\"d\",(function(t){var e=k(t,!1,F(),[g,m],{orientation:E.tiling.orientation,flipX:E.tiling.flip.indexOf(\"x\")>-1,flipY:E.tiling.flip.indexOf(\"y\")>-1});return function(t){return x(e(t))}})):d.attr(\"d\",x),p.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{isTransitioning:t._transitioning}),d.call(l,s,E,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text=\"\":s._text=h(s,r,E,e,S)||\"\";var T=i.ensureSingle(p,\"g\",\"slicetext\"),M=i.ensureSingle(T,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),I=i.ensureUniformFontSize(t,u.determineTextFont(E,s,S.font));M.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",C?\"end\":L?\"start\":\"middle\").call(a.font,I).call(o.convertToTspans,t),s.textBB=a.bBox(M.node()),s.transform=b(s,{fontSize:I.size}),s.transform.fontSize=I.size,w?M.transition().attrTween(\"transform\",(function(t){var e=A(t,!1,F(),[g,m]);return function(t){return _(e(t))}})):M.attr(\"transform\",_(s))})),D}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../sunburst/fx\":1050,\"../sunburst/helpers\":1051,\"../sunburst/plot\":1055,\"../treemap/constants\":1074,\"./partition\":842,\"./style\":844,\"@plotly/d3\":58}],839:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"icicle\",basePlotModule:t(\"./base_plot\"),categories:[],animatable:!0,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\"),style:t(\"./style\").style,colorbar:t(\"../scatter/marker_colorbar\"),meta:{}}},{\"../scatter/marker_colorbar\":944,\"./attributes\":834,\"./base_plot\":835,\"./calc\":836,\"./defaults\":837,\"./layout_attributes\":840,\"./layout_defaults\":841,\"./plot\":843,\"./style\":844}],840:[function(t,e,r){\"use strict\";e.exports={iciclecolorway:{valType:\"colorlist\",editType:\"calc\"},extendiciclecolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],841:[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(\"iciclecolorway\",e.colorway),r(\"extendiciclecolors\")}},{\"../../lib\":503,\"./layout_attributes\":840}],842:[function(t,e,r){\"use strict\";var n=t(\"d3-hierarchy\"),i=t(\"../treemap/flip_tree\");e.exports=function(t,e,r){var a=r.flipX,o=r.flipY,s=\"h\"===r.orientation,l=r.maxDepth,c=e[0],u=e[1];l&&(c=(t.height+1)*e[0]/Math.min(t.height+1,l),u=(t.height+1)*e[1]/Math.min(t.height+1,l));var f=n.partition().padding(r.pad.inner).size(s?[e[1],c]:[e[0],u])(t);return(s||a||o)&&i(f,e,{swapXY:s,flipX:a,flipY:o}),f}},{\"../treemap/flip_tree\":1079,\"d3-hierarchy\":115}],843:[function(t,e,r){\"use strict\";var n=t(\"../treemap/draw\"),i=t(\"./draw_descendants\");e.exports=function(t,e,r,a){return n(t,e,r,a,{type:\"icicle\",drawDescendants:i})}},{\"../treemap/draw\":1076,\"./draw_descendants\":838}],844:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../bar/uniform_text\").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,\"marker.line.color\")||i.defaultLine,c=a.castOption(r,s,\"marker.line.width\")||0;t.style(\"stroke-width\",c).call(i.fill,n.color).call(i.stroke,l).style(\"opacity\",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._iciclelayer.selectAll(\".trace\");o(t,e,\"icicle\"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style(\"opacity\",r.opacity),e.selectAll(\"path.surface\").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{\"../../components/color\":366,\"../../lib\":503,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],845:[function(t,e,r){\"use strict\";for(var n=t(\"../../plots/attributes\"),i=t(\"../../plots/template_attributes\").hovertemplateAttrs,a=t(\"../../lib/extend\").extendFlat,o=t(\"./constants\").colormodel,s=[\"rgb\",\"rgba\",\"rgba256\",\"hsl\",\"hsla\"],l=[],c=[],u=0;u0||n.inbox(r-o.y0,r-(o.y0+o.h*s.dy),0)>0)){var u,f=Math.floor((e-o.x0)/s.dx),h=Math.floor(Math.abs(r-o.y0)/s.dy);if(s._hasZ?u=o.z[h][f]:s._hasSource&&(u=s._canvas.el.getContext(\"2d\").getImageData(f,h,1,1).data),u){var p,d=o.hi||s.hoverinfo;if(d){var g=d.split(\"+\");-1!==g.indexOf(\"all\")&&(g=[\"color\"]),-1!==g.indexOf(\"color\")&&(p=!0)}var m,v=a.colormodel[s.colormodel],y=v.colormodel||s.colormodel,x=y.length,b=s._scaler(u),_=v.suffix,w=[];(s.hovertemplate||p)&&(w.push(\"[\"+[b[0]+_[0],b[1]+_[1],b[2]+_[2]].join(\", \")),4===x&&w.push(\", \"+b[3]+_[3]),w.push(\"]\"),w=w.join(\"\"),t.extraText=y.toUpperCase()+\": \"+w),Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[h])?m=s.hovertext[h][f]:Array.isArray(s.text)&&Array.isArray(s.text[h])&&(m=s.text[h][f]);var T=c.c2p(o.y0+(h+.5)*s.dy),k=o.x0+(f+.5)*s.dx,A=o.y0+(h+.5)*s.dy,M=\"[\"+u.slice(0,s.colormodel.length).join(\", \")+\"]\";return[i.extendFlat(t,{index:[h,f],x0:l.c2p(o.x0+f*s.dx),x1:l.c2p(o.x0+(f+1)*s.dx),y0:T,y1:T,color:b,xVal:k,xLabelVal:k,yVal:A,yLabelVal:A,zLabelVal:M,text:m,hovertemplateLabels:{zLabel:M,colorLabel:w,\"color[0]Label\":b[0]+_[0],\"color[1]Label\":b[1]+_[1],\"color[2]Label\":b[2]+_[2],\"color[3]Label\":b[3]+_[3]}})]}}}},{\"../../components/fx\":406,\"../../lib\":503,\"./constants\":847}],852:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"./style\"),hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"image\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"2dMap\",\"noSortingByValue\"],animatable:!1,meta:{}}},{\"../../plots/cartesian\":568,\"./attributes\":845,\"./calc\":846,\"./defaults\":848,\"./event_data\":849,\"./hover\":851,\"./plot\":853,\"./style\":854}],853:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.strTranslate,o=t(\"../../constants/xmlns_namespaces\"),s=t(\"./constants\"),l=i.isIOS()||i.isSafari()||i.isIE();e.exports=function(t,e,r,c){var u=e.xaxis,f=e.yaxis,h=!(l||t._context._exportedPlot);i.makeTraceGroups(c,r,\"im\").each((function(e){var r=n.select(this),l=e[0],c=l.trace,p=(\"fast\"===c.zsmooth||!1===c.zsmooth&&h)&&!c._hasZ&&c._hasSource&&\"linear\"===u.type&&\"linear\"===f.type;c._realImage=p;var d,g,m,v,y,x,b=l.z,_=l.x0,w=l.y0,T=l.w,k=l.h,A=c.dx,M=c.dy;for(x=0;void 0===d&&x0;)g=u.c2p(_+x*A),x--;for(x=0;void 0===v&&x0;)y=f.c2p(w+x*M),x--;if(gI[0];if(O||z){var D=d+S/2,R=v+E/2;C+=\"transform:\"+a(D+\"px\",R+\"px\")+\"scale(\"+(O?-1:1)+\",\"+(z?-1:1)+\")\"+a(-D+\"px\",-R+\"px\")+\";\"}}L.attr(\"style\",C);var F=new Promise((function(t){if(c._hasZ)t();else if(c._hasSource)if(c._canvas&&c._canvas.el.width===T&&c._canvas.el.height===k&&c._canvas.source===c.source)t();else{var e=document.createElement(\"canvas\");e.width=T,e.height=k;var r=e.getContext(\"2d\");c._image=c._image||new Image;var n=c._image;n.onload=function(){r.drawImage(n,0,0),c._canvas={el:e,source:c.source},t()},n.setAttribute(\"src\",c.source)}})).then((function(){var t;if(c._hasZ)t=B((function(t,e){return b[e][t]})).toDataURL(\"image/png\");else if(c._hasSource)if(p)t=c.source;else{var e=c._canvas.el.getContext(\"2d\").getImageData(0,0,T,k).data;t=B((function(t,r){var n=4*(r*T+t);return[e[n],e[n+1],e[n+2],e[n+3]]})).toDataURL(\"image/png\")}L.attr({\"xlink:href\":t,height:E,width:S,x:d,y:v})}));t._promises.push(F)}function B(t){var e=document.createElement(\"canvas\");e.width=S,e.height=E;var r,n=e.getContext(\"2d\"),a=function(t){return i.constrain(Math.round(u.c2p(_+t*A)-d),0,S)},o=function(t){return i.constrain(Math.round(f.c2p(w+t*M)-v),0,E)},h=s.colormodel[c.colormodel],p=h.colormodel||c.colormodel,g=h.fmt;for(x=0;x0}function T(t){t.each((function(t){y.stroke(n.select(this),t.line.color)})).each((function(t){y.fill(n.select(this),t.color)})).style(\"stroke-width\",(function(t){return t.line.width}))}function k(t,e,r){var n=t._fullLayout,i=o.extendFlat({type:\"linear\",ticks:\"outside\",range:r,showline:!0},e),a={type:\"linear\",_id:\"x\"+e._id},s={letter:\"x\",font:n.font,noHover:!0,noTickson:!0};function l(t,e){return o.coerce(i,a,v,t,e)}return g(i,a,l,s,n),m(i,a,l,s),a}function A(t,e,r){return[Math.min(e/t.width,r/t.height),t,e+\"x\"+r]}function M(t,e,r,i){var a=document.createElementNS(\"http://www.w3.org/2000/svg\",\"text\"),o=n.select(a);return o.text(t).attr(\"x\",0).attr(\"y\",0).attr(\"text-anchor\",r).attr(\"data-unformatted\",t).call(p.convertToTspans,i).call(f.font,e),f.bBox(o.node())}function S(t,e,r,n,i,a){var s=\"_cache\"+e;t[s]&&t[s].key===i||(t[s]={key:i,value:r});var l=o.aggNums(a,null,[t[s].value,n],2);return t[s].value=l,l}e.exports=function(t,e,r,g){var m,v=t._fullLayout;w(r)&&g&&(m=g()),o.makeTraceGroups(v._indicatorlayer,e,\"trace\").each((function(e){var g,E,L,C,P,I=e[0].trace,O=n.select(this),z=I._hasGauge,D=I._isAngular,R=I._isBullet,F=I.domain,B={w:v._size.w*(F.x[1]-F.x[0]),h:v._size.h*(F.y[1]-F.y[0]),l:v._size.l+v._size.w*F.x[0],r:v._size.r+v._size.w*(1-F.x[1]),t:v._size.t+v._size.h*(1-F.y[1]),b:v._size.b+v._size.h*F.y[0]},N=B.l+B.w/2,j=B.t+B.h/2,U=Math.min(B.w/2,B.h),V=h.innerRadius*U,H=I.align||\"center\";if(E=j,z){if(D&&(g=N,E=j+U/2,L=function(t){return function(t,e){var r=Math.sqrt(t.width/2*(t.width/2)+t.height*t.height);return[e/r,t,e]}(t,.9*V)}),R){var q=h.bulletPadding,G=1-h.bulletNumberDomainSize+q;g=B.l+(G+(1-G)*b[H])*B.w,L=function(t){return A(t,(h.bulletNumberDomainSize-q)*B.w,B.h)}}}else g=B.l+b[H]*B.w,L=function(t){return A(t,B.w,B.h)};!function(t,e,r,i){var c,u,h,g=r[0].trace,m=i.numbersX,v=i.numbersY,T=g.align||\"center\",A=x[T],E=i.transitionOpts,L=i.onComplete,C=o.ensureSingle(e,\"g\",\"numbers\"),P=[];g._hasNumber&&P.push(\"number\");g._hasDelta&&(P.push(\"delta\"),\"left\"===g.delta.position&&P.reverse());var I=C.selectAll(\"text\").data(P);function O(e,r,n,i){if(!e.match(\"s\")||n>=0==i>=0||r(n).slice(-1).match(_)||r(i).slice(-1).match(_))return r;var a=e.slice().replace(\"s\",\"f\").replace(/\\d+/,(function(t){return parseInt(t)-1})),o=k(t,{tickformat:a});return function(t){return Math.abs(t)<1?d.tickText(o,t).text:r(t)}}I.enter().append(\"text\"),I.attr(\"text-anchor\",(function(){return A})).attr(\"class\",(function(t){return t})).attr(\"x\",null).attr(\"y\",null).attr(\"dx\",null).attr(\"dy\",null),I.exit().remove();var z,D=g.mode+g.align;g._hasDelta&&(z=function(){var e=k(t,{tickformat:g.delta.valueformat},g._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=function(t){return g.delta.relative?t.relativeDelta:t.delta},s=function(t,e){return 0===t||\"number\"!=typeof t||isNaN(t)?\"-\":(t>0?g.delta.increasing.symbol:g.delta.decreasing.symbol)+e(t)},l=function(t){return t.delta>=0?g.delta.increasing.color:g.delta.decreasing.color};void 0===g._deltaLastValue&&(g._deltaLastValue=o(r[0]));var c=C.select(\"text.delta\");function h(){c.text(s(o(r[0]),i)).call(y.fill,l(r[0])).call(p.convertToTspans,t)}return c.call(f.font,g.delta.font).call(y.fill,l({delta:g._deltaLastValue})),w(E)?c.transition().duration(E.duration).ease(E.easing).tween(\"text\",(function(){var t=n.select(this),e=o(r[0]),c=g._deltaLastValue,u=O(g.delta.valueformat,i,c,e),f=a(c,e);return g._deltaLastValue=e,function(e){t.text(s(f(e),u)),t.call(y.fill,l({delta:f(e)}))}})).each(\"end\",(function(){h(),L&&L()})).each(\"interrupt\",(function(){h(),L&&L()})):h(),u=M(s(o(r[0]),i),g.delta.font,A,t),c}(),D+=g.delta.position+g.delta.font.size+g.delta.font.family+g.delta.valueformat,D+=g.delta.increasing.symbol+g.delta.decreasing.symbol,h=u);g._hasNumber&&(!function(){var e=k(t,{tickformat:g.number.valueformat},g._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=g.number.suffix,s=g.number.prefix,l=C.select(\"text.number\");function u(){var e=\"number\"==typeof r[0].y?s+i(r[0].y)+o:\"-\";l.text(e).call(f.font,g.number.font).call(p.convertToTspans,t)}w(E)?l.transition().duration(E.duration).ease(E.easing).each(\"end\",(function(){u(),L&&L()})).each(\"interrupt\",(function(){u(),L&&L()})).attrTween(\"text\",(function(){var t=n.select(this),e=a(r[0].lastY,r[0].y);g._lastValue=r[0].y;var l=O(g.number.valueformat,i,r[0].lastY,r[0].y);return function(r){t.text(s+l(e(r))+o)}})):u(),c=M(s+i(r[0].y)+o,g.number.font,A,t)}(),D+=g.number.font.size+g.number.font.family+g.number.valueformat+g.number.suffix+g.number.prefix,h=c);if(g._hasDelta&&g._hasNumber){var R,F,B=[(c.left+c.right)/2,(c.top+c.bottom)/2],N=[(u.left+u.right)/2,(u.top+u.bottom)/2],j=.75*g.delta.font.size;\"left\"===g.delta.position&&(R=S(g,\"deltaPos\",0,-1*(c.width*b[g.align]+u.width*(1-b[g.align])+j),D,Math.min),F=B[1]-N[1],h={width:c.width+u.width+j,height:Math.max(c.height,u.height),left:u.left+R,right:c.right,top:Math.min(c.top,u.top+F),bottom:Math.max(c.bottom,u.bottom+F)}),\"right\"===g.delta.position&&(R=S(g,\"deltaPos\",0,c.width*(1-b[g.align])+u.width*b[g.align]+j,D,Math.max),F=B[1]-N[1],h={width:c.width+u.width+j,height:Math.max(c.height,u.height),left:c.left,right:u.right+R,top:Math.min(c.top,u.top+F),bottom:Math.max(c.bottom,u.bottom+F)}),\"bottom\"===g.delta.position&&(R=null,F=u.height,h={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height,bottom:c.bottom+u.height}),\"top\"===g.delta.position&&(R=null,F=c.top,h={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height-u.height,bottom:c.bottom}),z.attr({dx:R,dy:F})}(g._hasNumber||g._hasDelta)&&C.attr(\"transform\",(function(){var t=i.numbersScaler(h);D+=t[2];var e,r=S(g,\"numbersScale\",1,t[0],D,Math.min);g._scaleNumbers||(r=1),e=g._isAngular?v-r*h.bottom:v-r*(h.top+h.bottom)/2,g._numbersTop=r*h.top+e;var n=h[T];\"center\"===T&&(n=(h.left+h.right)/2);var a=m-r*n;return a=S(g,\"numbersTranslate\",0,a,D,Math.max),l(a,e)+s(r)}))}(t,O,e,{numbersX:g,numbersY:E,numbersScaler:L,transitionOpts:r,onComplete:m}),z&&(C={range:I.gauge.axis.range,color:I.gauge.bgcolor,line:{color:I.gauge.bordercolor,width:0},thickness:1},P={range:I.gauge.axis.range,color:\"rgba(0, 0, 0, 0)\",line:{color:I.gauge.bordercolor,width:I.gauge.borderwidth},thickness:1});var Y=O.selectAll(\"g.angular\").data(D?e:[]);Y.exit().remove();var W=O.selectAll(\"g.angularaxis\").data(D?e:[]);W.exit().remove(),D&&function(t,e,r,a){var o,s,f,h,p=r[0].trace,g=a.size,m=a.radius,v=a.innerRadius,y=a.gaugeBg,x=a.gaugeOutline,b=[g.l+g.w/2,g.t+g.h/2+m/2],_=a.gauge,A=a.layer,M=a.transitionOpts,S=a.onComplete,E=Math.PI/2;function L(t){var e=p.gauge.axis.range[0],r=(t-e)/(p.gauge.axis.range[1]-e)*Math.PI-E;return r<-E?-E:r>E?E:r}function C(t){return n.svg.arc().innerRadius((v+m)/2-t/2*(m-v)).outerRadius((v+m)/2+t/2*(m-v)).startAngle(-E)}function P(t){t.attr(\"d\",(function(t){return C(t.thickness).startAngle(L(t.range[0])).endAngle(L(t.range[1]))()}))}_.enter().append(\"g\").classed(\"angular\",!0),_.attr(\"transform\",l(b[0],b[1])),A.enter().append(\"g\").classed(\"angularaxis\",!0).classed(\"crisp\",!0),A.selectAll(\"g.xangularaxistick,path,text\").remove(),(o=k(t,p.gauge.axis)).type=\"linear\",o.range=p.gauge.axis.range,o._id=\"xangularaxis\",o.ticklabeloverflow=\"allow\",o.setScale();var I=function(t){return(o.range[0]-t.x)/(o.range[1]-o.range[0])*Math.PI+Math.PI},O={},z=d.makeLabelFns(o,0).labelStandoff;O.xFn=function(t){var e=I(t);return Math.cos(e)*z},O.yFn=function(t){var e=I(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(z+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*u)},O.anchorFn=function(t){var e=I(t),r=Math.cos(e);return Math.abs(r)<.1?\"middle\":r>0?\"start\":\"end\"},O.heightFn=function(t,e,r){var n=I(t);return-.5*(1+Math.sin(n))*r};var D=function(t){return l(b[0]+m*Math.cos(t),b[1]-m*Math.sin(t))};f=function(t){return D(I(t))};if(s=d.calcTicks(o),h=d.getTickSigns(o)[2],o.visible){h=\"inside\"===o.ticks?-1:1;var R=(o.linewidth||1)/2;d.drawTicks(t,o,{vals:s,layer:A,path:\"M\"+h*R+\",0h\"+h*o.ticklen,transFn:function(t){var e=I(t);return D(e)+\"rotate(\"+-c(e)+\")\"}}),d.drawLabels(t,o,{vals:s,layer:A,transFn:f,labelFns:O})}var F=[y].concat(p.gauge.steps),B=_.selectAll(\"g.bg-arc\").data(F);B.enter().append(\"g\").classed(\"bg-arc\",!0).append(\"path\"),B.select(\"path\").call(P).call(T),B.exit().remove();var N=C(p.gauge.bar.thickness),j=_.selectAll(\"g.value-arc\").data([p.gauge.bar]);j.enter().append(\"g\").classed(\"value-arc\",!0).append(\"path\");var U=j.select(\"path\");w(M)?(U.transition().duration(M.duration).ease(M.easing).each(\"end\",(function(){S&&S()})).each(\"interrupt\",(function(){S&&S()})).attrTween(\"d\",(V=N,H=L(r[0].lastY),q=L(r[0].y),function(){var t=i(H,q);return function(e){return V.endAngle(t(e))()}})),p._lastValue=r[0].y):U.attr(\"d\",\"number\"==typeof r[0].y?N.endAngle(L(r[0].y)):\"M0,0Z\");var V,H,q;U.call(T),j.exit().remove(),F=[];var G=p.gauge.threshold.value;(G||0===G)&&F.push({range:[G,G],color:p.gauge.threshold.color,line:{color:p.gauge.threshold.line.color,width:p.gauge.threshold.line.width},thickness:p.gauge.threshold.thickness});var Y=_.selectAll(\"g.threshold-arc\").data(F);Y.enter().append(\"g\").classed(\"threshold-arc\",!0).append(\"path\"),Y.select(\"path\").call(P).call(T),Y.exit().remove();var W=_.selectAll(\"g.gauge-outline\").data([x]);W.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"path\"),W.select(\"path\").call(P).call(T),W.exit().remove()}(t,0,e,{radius:U,innerRadius:V,gauge:Y,layer:W,size:B,gaugeBg:C,gaugeOutline:P,transitionOpts:r,onComplete:m});var X=O.selectAll(\"g.bullet\").data(R?e:[]);X.exit().remove();var Z=O.selectAll(\"g.bulletaxis\").data(R?e:[]);Z.exit().remove(),R&&function(t,e,r,n){var i,a,o,s,c,u=r[0].trace,f=n.gauge,p=n.layer,g=n.gaugeBg,m=n.gaugeOutline,v=n.size,x=u.domain,b=n.transitionOpts,_=n.onComplete;f.enter().append(\"g\").classed(\"bullet\",!0),f.attr(\"transform\",l(v.l,v.t)),p.enter().append(\"g\").classed(\"bulletaxis\",!0).classed(\"crisp\",!0),p.selectAll(\"g.xbulletaxistick,path,text\").remove();var A=v.h,M=u.gauge.bar.thickness*A,S=x.x[0],E=x.x[0]+(x.x[1]-x.x[0])*(u._hasNumber||u._hasDelta?1-h.bulletNumberDomainSize:1);(i=k(t,u.gauge.axis))._id=\"xbulletaxis\",i.domain=[S,E],i.setScale(),a=d.calcTicks(i),o=d.makeTransTickFn(i),s=d.getTickSigns(i)[2],c=v.t+v.h,i.visible&&(d.drawTicks(t,i,{vals:\"inside\"===i.ticks?d.clipEnds(i,a):a,layer:p,path:d.makeTickPath(i,c,s),transFn:o}),d.drawLabels(t,i,{vals:a,layer:p,transFn:o,labelFns:d.makeLabelFns(i,c)}));function L(t){t.attr(\"width\",(function(t){return Math.max(0,i.c2p(t.range[1])-i.c2p(t.range[0]))})).attr(\"x\",(function(t){return i.c2p(t.range[0])})).attr(\"y\",(function(t){return.5*(1-t.thickness)*A})).attr(\"height\",(function(t){return t.thickness*A}))}var C=[g].concat(u.gauge.steps),P=f.selectAll(\"g.bg-bullet\").data(C);P.enter().append(\"g\").classed(\"bg-bullet\",!0).append(\"rect\"),P.select(\"rect\").call(L).call(T),P.exit().remove();var I=f.selectAll(\"g.value-bullet\").data([u.gauge.bar]);I.enter().append(\"g\").classed(\"value-bullet\",!0).append(\"rect\"),I.select(\"rect\").attr(\"height\",M).attr(\"y\",(A-M)/2).call(T),w(b)?I.select(\"rect\").transition().duration(b.duration).ease(b.easing).each(\"end\",(function(){_&&_()})).each(\"interrupt\",(function(){_&&_()})).attr(\"width\",Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y)))):I.select(\"rect\").attr(\"width\",\"number\"==typeof r[0].y?Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y))):0);I.exit().remove();var O=r.filter((function(){return u.gauge.threshold.value||0===u.gauge.threshold.value})),z=f.selectAll(\"g.threshold-bullet\").data(O);z.enter().append(\"g\").classed(\"threshold-bullet\",!0).append(\"line\"),z.select(\"line\").attr(\"x1\",i.c2p(u.gauge.threshold.value)).attr(\"x2\",i.c2p(u.gauge.threshold.value)).attr(\"y1\",(1-u.gauge.threshold.thickness)/2*A).attr(\"y2\",(1-(1-u.gauge.threshold.thickness)/2)*A).call(y.stroke,u.gauge.threshold.line.color).style(\"stroke-width\",u.gauge.threshold.line.width),z.exit().remove();var D=f.selectAll(\"g.gauge-outline\").data([m]);D.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"rect\"),D.select(\"rect\").call(L).call(T),D.exit().remove()}(t,0,e,{gauge:X,layer:Z,size:B,gaugeBg:C,gaugeOutline:P,transitionOpts:r,onComplete:m});var J=O.selectAll(\"text.title\").data(e);J.exit().remove(),J.enter().append(\"text\").classed(\"title\",!0),J.attr(\"text-anchor\",(function(){return R?x.right:x[I.title.align]})).text(I.title.text).call(f.font,I.title.font).call(p.convertToTspans,t),J.attr(\"transform\",(function(){var t,e=B.l+B.w*b[I.title.align],r=h.titlePadding,n=f.bBox(J.node());if(z){if(D)if(I.gauge.axis.visible)t=f.bBox(W.node()).top-r-n.bottom;else t=B.t+B.h/2-U/2-n.bottom-r;R&&(t=E-(n.top+n.bottom)/2,e=B.l-h.bulletPadding*B.w)}else t=I._numbersTop-r-n.bottom;return l(e,t)}))}))}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../plots/cartesian/axis_defaults\":556,\"../../plots/cartesian/layout_attributes\":569,\"../../plots/cartesian/position_defaults\":572,\"./constants\":858,\"@plotly/d3\":58,\"d3-interpolate\":116}],862:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../mesh3d/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=t(\"../../plot_api/edit_types\").overrideAll;var u=e.exports=c(l({x:{valType:\"data_array\"},y:{valType:\"data_array\"},z:{valType:\"data_array\"},value:{valType:\"data_array\"},isomin:{valType:\"number\"},isomax:{valType:\"number\"},surface:{show:{valType:\"boolean\",dflt:!0},count:{valType:\"integer\",dflt:2,min:1},fill:{valType:\"number\",min:0,max:1,dflt:1},pattern:{valType:\"flaglist\",flags:[\"A\",\"B\",\"C\",\"D\",\"E\"],extras:[\"all\",\"odd\",\"even\"],dflt:\"all\"}},spaceframe:{show:{valType:\"boolean\",dflt:!1},fill:{valType:\"number\",min:0,max:1,dflt:.15}},slices:{x:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}},y:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}},z:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}},y:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}},z:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}}},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:a(),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),valuehoverformat:i(\"value\",1),showlegend:l({},s.showlegend,{dflt:!1})},n(\"\",{colorAttr:\"`value`\",showScaleDflt:!0,editTypeOverride:\"calc\"}),{opacity:o.opacity,lightposition:o.lightposition,lighting:o.lighting,flatshading:o.flatshading,contour:o.contour,hoverinfo:l({},s.hoverinfo)}),\"calc\",\"nested\");u.flatshading.dflt=!0,u.lighting.facenormalsepsilon.dflt=0,u.x.editType=u.y.editType=u.z.editType=u.value.editType=\"calc+clearAxisTypes\",u.transforms=void 0},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/edit_types\":536,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../mesh3d/attributes\":867}],863:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\"),i=t(\"../streamtube/calc\").processGrid,a=t(\"../streamtube/calc\").filter;e.exports=function(t,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length),e._x=a(e.x,e._len),e._y=a(e.y,e._len),e._z=a(e.z,e._len),e._value=a(e.value,e._len);var r=i(e);e._gridFill=r.fill,e._Xs=r.Xs,e._Ys=r.Ys,e._Zs=r.Zs,e._len=r.len;for(var o=1/0,s=-1/0,l=0;l0;r--){var n=Math.min(e[r],e[r-1]),i=Math.max(e[r],e[r-1]);if(i>n&&n-1}function R(t,e){return null===t?e:t}function F(e,r,n){C();var i,a,o,l=[r],c=[n];if(s>=1)l=[r],c=[n];else if(s>0){var u=function(t,e){var r=t[0],n=t[1],i=t[2],a=function(t,e,r){for(var n=[],i=0;i-1?n[p]:L(d,g,v);h[p]=x>-1?x:I(d,g,v,R(e,y))}i=h[0],a=h[1],o=h[2],t._meshI.push(i),t._meshJ.push(a),t._meshK.push(o),++m}}function B(t,e,r,n){var i=t[3];in&&(i=n);for(var a=(t[3]-i)/(t[3]-e[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*t[s]+a*e[s];return o}function N(t,e,r){return t>=e&&t<=r}function j(t){var e=.001*(E-S);return t>=S-e&&t<=E+e}function U(e){for(var r=[],n=0;n<4;n++){var i=e[n];r.push([t._x[i],t._y[i],t._z[i],t._value[i]])}return r}function V(t,e,r,n,i,a){a||(a=1),r=[-1,-1,-1];var o=!1,s=[N(e[0][3],n,i),N(e[1][3],n,i),N(e[2][3],n,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(t,e,r){return j(e[0][3])&&j(e[1][3])&&j(e[2][3])?(F(t,e,r),!0):a<3&&V(t,e,r,S,E,++a)};if(s[0]&&s[1]&&s[2])return l(t,e,r)||o;var c=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach((function(a){if(s[a[0]]&&s[a[1]]&&!s[a[2]]){var u=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(h,u,n,i),d=B(h,f,n,i);o=l(t,[d,p,u],[-1,-1,r[a[0]]])||o,o=l(t,[u,f,d],[r[a[0]],r[a[1]],-1])||o,c=!0}})),c||[[0,1,2],[1,2,0],[2,0,1]].forEach((function(a){if(s[a[0]]&&!s[a[1]]&&!s[a[2]]){var u=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(f,u,n,i),d=B(h,u,n,i);o=l(t,[d,p,u],[-1,-1,r[a[0]]])||o,c=!0}})),o}function H(t,e,r,n){var i=!1,a=U(e),o=[N(a[0][3],r,n),N(a[1][3],r,n),N(a[2][3],r,n),N(a[3][3],r,n)];if(!(o[0]||o[1]||o[2]||o[3]))return i;if(o[0]&&o[1]&&o[2]&&o[3])return g&&(i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(3,0,1),n(2,3,0),n(1,2,3)}(t,a,e)||i),i;var s=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]];if(g)i=F(t,[c,u,f],[e[l[0]],e[l[1]],e[l[2]]])||i;else{var p=B(h,c,r,n),d=B(h,u,r,n),m=B(h,f,r,n);i=F(null,[p,d,m],[-1,-1,-1])||i}s=!0}})),s?i:([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(f,c,r,n),d=B(f,u,r,n),m=B(h,u,r,n),v=B(h,c,r,n);g?(i=F(t,[c,v,p],[e[l[0]],-1,-1])||i,i=F(t,[u,d,m],[e[l[1]],-1,-1])||i):i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(2,3,0)}(null,[p,d,m,v],[-1,-1,-1,-1])||i,s=!0}})),s||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach((function(l){if(o[l[0]]&&!o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(u,c,r,n),d=B(f,c,r,n),m=B(h,c,r,n);g?(i=F(t,[c,p,d],[e[l[0]],-1,-1])||i,i=F(t,[c,d,m],[e[l[0]],-1,-1])||i,i=F(t,[c,m,p],[e[l[0]],-1,-1])||i):i=F(null,[p,d,m],[-1,-1,-1])||i,s=!0}})),i)}function q(t,e,r,n,i,a,o,s,l,c,u){var f=!1;return d&&(D(t,\"A\")&&(f=H(null,[e,r,n,a],c,u)||f),D(t,\"B\")&&(f=H(null,[r,n,i,l],c,u)||f),D(t,\"C\")&&(f=H(null,[r,a,o,l],c,u)||f),D(t,\"D\")&&(f=H(null,[n,a,s,l],c,u)||f),D(t,\"E\")&&(f=H(null,[r,n,a,l],c,u)||f)),g&&(f=H(t,[r,n,a,l],c,u)||f),f}function G(t,e,r,n,i,a,o,s){return[!0===s[0]||V(t,U([e,r,n]),[e,r,n],a,o),!0===s[1]||V(t,U([n,i,e]),[n,i,e],a,o)]}function Y(t,e,r,n,i,a,o,s,l){return s?G(t,e,r,i,n,a,o,l):G(t,r,i,n,e,a,o,l)}function W(t,e,r,n,i,a,o){var s,l,c,u,f=!1,h=function(){f=V(t,[s,l,c],[-1,-1,-1],i,a)||f,f=V(t,[c,u,s],[-1,-1,-1],i,a)||f},p=o[0],d=o[1],g=o[2];return p&&(s=O(U([k(e,r-0,n-0)])[0],U([k(e-1,r-0,n-0)])[0],p),l=O(U([k(e,r-0,n-1)])[0],U([k(e-1,r-0,n-1)])[0],p),c=O(U([k(e,r-1,n-1)])[0],U([k(e-1,r-1,n-1)])[0],p),u=O(U([k(e,r-1,n-0)])[0],U([k(e-1,r-1,n-0)])[0],p),h()),d&&(s=O(U([k(e-0,r,n-0)])[0],U([k(e-0,r-1,n-0)])[0],d),l=O(U([k(e-0,r,n-1)])[0],U([k(e-0,r-1,n-1)])[0],d),c=O(U([k(e-1,r,n-1)])[0],U([k(e-1,r-1,n-1)])[0],d),u=O(U([k(e-1,r,n-0)])[0],U([k(e-1,r-1,n-0)])[0],d),h()),g&&(s=O(U([k(e-0,r-0,n)])[0],U([k(e-0,r-0,n-1)])[0],g),l=O(U([k(e-0,r-1,n)])[0],U([k(e-0,r-1,n-1)])[0],g),c=O(U([k(e-1,r-1,n)])[0],U([k(e-1,r-1,n-1)])[0],g),u=O(U([k(e-1,r-0,n)])[0],U([k(e-1,r-0,n-1)])[0],g),h()),f}function X(t,e,r,n,i,a,o,s,l,c,u,f){var h=t;return f?(d&&\"even\"===t&&(h=null),q(h,e,r,n,i,a,o,s,l,c,u)):(d&&\"odd\"===t&&(h=null),q(h,l,s,o,a,i,n,r,e,c,u))}function Z(t,e,r,n,i){for(var a=[],o=0,s=0;sMath.abs(d-M)?[A,d]:[d,M];$(e,T[0],T[1])}}var L=[[Math.min(S,M),Math.max(S,M)],[Math.min(A,E),Math.max(A,E)]];[\"x\",\"y\",\"z\"].forEach((function(e){for(var r=[],n=0;n0&&(u.push(p.id),\"x\"===e?f.push([p.distRatio,0,0]):\"y\"===e?f.push([0,p.distRatio,0]):f.push([0,0,p.distRatio]))}else c=nt(1,\"x\"===e?b-1:\"y\"===e?_-1:w-1);u.length>0&&(r[i]=\"x\"===e?tt(null,u,a,o,f,r[i]):\"y\"===e?et(null,u,a,o,f,r[i]):rt(null,u,a,o,f,r[i]),i++),c.length>0&&(r[i]=\"x\"===e?Z(null,c,a,o,r[i]):\"y\"===e?J(null,c,a,o,r[i]):K(null,c,a,o,r[i]),i++)}var d=t.caps[e];d.show&&d.fill&&(z(d.fill),r[i]=\"x\"===e?Z(null,[0,b-1],a,o,r[i]):\"y\"===e?J(null,[0,_-1],a,o,r[i]):K(null,[0,w-1],a,o,r[i]),i++)}})),0===m&&P(),t._meshX=n,t._meshY=i,t._meshZ=a,t._meshIntensity=o,t._Xs=v,t._Ys=y,t._Zs=x}(),t}e.exports={findNearestOnAxis:l,generateIsoMeshes:h,createIsosurfaceTrace:function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new c(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}}},{\"../../../stackgl_modules\":1120,\"../../components/colorscale\":378,\"../../lib/gl_format_color\":499,\"../../lib/str2rgbarray\":528,\"../../plots/gl3d/zip3\":609}],865:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"./attributes\"),o=t(\"../../components/colorscale/defaults\");function s(t,e,r,n,a){var s=a(\"isomin\"),l=a(\"isomax\");null!=l&&null!=s&&s>l&&(e.isomin=null,e.isomax=null);var c=a(\"x\"),u=a(\"y\"),f=a(\"z\"),h=a(\"value\");c&&c.length&&u&&u.length&&f&&f.length&&h&&h.length?(i.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\",\"z\"],n),a(\"valuehoverformat\"),[\"x\",\"y\",\"z\"].forEach((function(t){a(t+\"hoverformat\");var e=\"caps.\"+t;a(e+\".show\")&&a(e+\".fill\");var r=\"slices.\"+t;a(r+\".show\")&&(a(r+\".fill\"),a(r+\".locations\"))})),a(\"spaceframe.show\")&&a(\"spaceframe.fill\"),a(\"surface.show\")&&(a(\"surface.count\"),a(\"surface.fill\"),a(\"surface.pattern\")),a(\"contour.show\")&&(a(\"contour.color\"),a(\"contour.width\")),[\"text\",\"hovertext\",\"hovertemplate\",\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lighting.vertexnormalsepsilon\",\"lighting.facenormalsepsilon\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"flatshading\",\"opacity\"].forEach((function(t){a(t)})),o(t,e,n,a,{prefix:\"\",cLetter:\"c\"}),e._length=null):e.visible=!1}e.exports={supplyDefaults:function(t,e,r,i){s(t,e,r,i,(function(r,i){return n.coerce(t,e,a,r,i)}))},supplyIsoDefaults:s}},{\"../../components/colorscale/defaults\":376,\"../../lib\":503,\"../../registry\":638,\"./attributes\":862}],866:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,calc:t(\"./calc\"),colorbar:{min:\"cmin\",max:\"cmax\"},plot:t(\"./convert\").createIsosurfaceTrace,moduleType:\"trace\",name:\"isosurface\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"showLegend\"],meta:{}}},{\"../../plots/gl3d\":598,\"./attributes\":862,\"./calc\":863,\"./convert\":864,\"./defaults\":865}],867:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../surface/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat;e.exports=l({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\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:a({editType:\"calc\"}),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),delaunayaxis:{valType:\"enumerated\",values:[\"x\",\"y\",\"z\"],dflt:\"z\",editType:\"calc\"},alphahull:{valType:\"number\",dflt:-1,editType:\"calc\"},intensity:{valType:\"data_array\",editType:\"calc\"},intensitymode:{valType:\"enumerated\",values:[\"vertex\",\"cell\"],dflt:\"vertex\",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\"}),{opacity:o.opacity,flatshading:{valType:\"boolean\",dflt:!1,editType:\"calc\"},contour:{show:l({},o.contours.x.show,{}),color:o.contours.x.color,width:o.contours.x.width,editType:\"calc\"},lightposition:{x:l({},o.lightposition.x,{dflt:1e5}),y:l({},o.lightposition.y,{dflt:1e5}),z:l({},o.lightposition.z,{dflt:0}),editType:\"calc\"},lighting:l({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\"},o.lighting),hoverinfo:l({},s.hoverinfo,{editType:\"calc\"}),showlegend:l({},s.showlegend,{dflt:!1})})},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../surface/attributes\":1057}],868:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.intensity&&n(t,e,{vals:e.intensity,containerStr:\"\",cLetter:\"c\"})}},{\"../../components/colorscale/calc\":374}],869:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_mesh3d,i=t(\"../../../stackgl_modules\").delaunay_triangulate,a=t(\"../../../stackgl_modules\").alpha_shape,o=t(\"../../../stackgl_modules\").convex_hull,s=t(\"../../lib/gl_format_color\").parseColorScale,l=t(\"../../lib/str2rgbarray\"),c=t(\"../../components/colorscale\").extractOpts,u=t(\"../../plots/gl3d/zip3\");function f(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name=\"\",this.color=\"#fff\",this.data=null,this.showContour=!1}var h=f.prototype;function p(t){for(var e=[],r=t.length,n=0;n=e-.5)return!1;return!0}h.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.data._cellCenter?t.traceCoordinate=t.data.dataCoordinate:t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},h.update=function(t){var e=this.scene,r=e.fullSceneLayout;this.data=t;var n,f=t.x.length,h=u(d(r.xaxis,t.x,e.dataScale[0],t.xcalendar),d(r.yaxis,t.y,e.dataScale[1],t.ycalendar),d(r.zaxis,t.z,e.dataScale[2],t.zcalendar));if(t.i&&t.j&&t.k){if(t.i.length!==t.j.length||t.j.length!==t.k.length||!m(t.i,f)||!m(t.j,f)||!m(t.k,f))return;n=u(g(t.i),g(t.j),g(t.k))}else n=0===t.alphahull?o(h):t.alphahull>0?a(t.alphahull,h):function(t,e){for(var r=[\"x\",\"y\",\"z\"].indexOf(t),n=[],a=e.length,o=0;ov):m=A>w,v=A;var M=c(w,T,k,A);M.pos=_,M.yc=(w+A)/2,M.i=b,M.dir=m?\"increasing\":\"decreasing\",M.x=M.pos,M.y=[k,T],y&&(M.orig_p=r[b]),d&&(M.tx=e.text[b]),g&&(M.htx=e.hovertext[b]),x.push(M)}else x.push({pos:_,empty:!0})}return e._extremes[l._id]=a.findExtremes(l,n.concat(h,f),{padded:!0}),x.length&&(x[0].t={labels:{open:i(t,\"open:\")+\" \",high:i(t,\"high:\")+\" \",low:i(t,\"low:\")+\" \",close:i(t,\"close:\")+\" \"}}),x}e.exports={calc:function(t,e){var r=a.getFromId(t,e.xaxis),i=a.getFromId(t,e.yaxis),s=function(t,e,r){var i=r._minDiff;if(!i){var a,s=t._fullData,l=[];for(i=1/0,a=0;a\"+c.labels[x]+n.hoverLabelText(s,b,l.yhoverformat):((y=i.extendFlat({},h)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=c.labels[x]+n.hoverLabelText(s,b,l.yhoverformat),y.name=\"\",f.push(y),m[b]=y)}return f}function h(t,e,r,i){var a=t.cd,o=t.ya,l=a[0].trace,f=a[0].t,h=u(t,e,r,i);if(!h)return[];var p=a[h.index],d=h.index=p.i,g=p.dir;function m(t){return f.labels[t]+n.hoverLabelText(o,l[t][d],l.yhoverformat)}var v=p.hi||l.hoverinfo,y=v.split(\"+\"),x=\"all\"===v,b=x||-1!==y.indexOf(\"y\"),_=x||-1!==y.indexOf(\"text\"),w=b?[m(\"open\"),m(\"high\"),m(\"low\"),m(\"close\")+\" \"+c[g]]:[];return _&&s(p,l,w),h.extraText=w.join(\"
\"),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?f(t,e,r,n):h(t,e,r,n)},hoverSplit:f,hoverOnPoints:h}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../constants/delta.js\":473,\"../../lib\":503,\"../../plots/cartesian/axes\":554}],876:[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\":568,\"./attributes\":872,\"./calc\":873,\"./defaults\":874,\"./hover\":875,\"./plot\":878,\"./select\":879,\"./style\":880}],877:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o=r(\"x\"),s=r(\"open\"),l=r(\"high\"),c=r(\"low\"),u=r(\"close\");if(r(\"hoverlabel.split\"),n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\"],a),s&&l&&c&&u){var f=Math.min(s.length,l.length,c.length,u.length);return o&&(f=Math.min(f,i.minRowLength(o))),e._length=f,f}}},{\"../../lib\":503,\"../../registry\":638}],878:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o=e.yaxis,s=e.xaxis,l=!!s.rangebreaks;i.makeTraceGroups(a,r,\"trace ohlc\").each((function(t){var e=n.select(this),r=t[0],a=r.t;if(!0!==r.trace.visible||a.empty)e.remove();else{var c=a.tickLen,u=e.selectAll(\"path\").data(i.identity);u.enter().append(\"path\"),u.exit().remove(),u.attr(\"d\",(function(t){if(t.empty)return\"M0,0Z\";var e=s.c2p(t.pos-c,!0),r=s.c2p(t.pos+c,!0),n=l?(e+r)/2:s.c2p(t.pos,!0);return\"M\"+e+\",\"+o.c2p(t.o,!0)+\"H\"+n+\"M\"+n+\",\"+o.c2p(t.h,!0)+\"V\"+o.c2p(t.l,!0)+\"M\"+r+\",\"+o.c2p(t.c,!0)+\"H\"+n}))}}))}},{\"../../lib\":503,\"@plotly/d3\":58}],879:[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=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;e0;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\"),s(\"line.hovertemplate\");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(\"hovertemplate\"),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 m={family:f.font.family,size:Math.round(f.font.size/1.2),color:f.font.color};n.coerceFont(h,\"tickfont\",m)}},{\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503,\"../../plots/array_container_defaults\":549,\"../../plots/domain\":584,\"../parcoords/merge_length\":897,\"./attributes\":881}],885:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcats\",basePlotModule:t(\"./base_plot\"),categories:[\"noOpacity\"],meta:{}}},{\"./attributes\":881,\"./base_plot\":882,\"./calc\":883,\"./defaults\":884,\"./plot\":887}],886:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-interpolate\").interpolateNumber,a=t(\"../../plot_api/plot_api\"),o=t(\"../../components/fx\"),s=t(\"../../lib\"),l=s.strTranslate,c=t(\"../../components/drawing\"),u=t(\"tinycolor2\"),f=t(\"../../lib/svg_text_utils\");function h(t,e,r,i){var a=t.map(F.bind(0,e,r)),o=i.selectAll(\"g.parcatslayer\").data([null]);o.enter().append(\"g\").attr(\"class\",\"parcatslayer\").style(\"pointer-events\",\"all\");var u=o.selectAll(\"g.trace.parcats\").data(a,p),h=u.enter().append(\"g\").attr(\"class\",\"trace parcats\");u.attr(\"transform\",(function(t){return l(t.x,t.y)})),h.append(\"g\").attr(\"class\",\"paths\");var y=u.select(\"g.paths\").selectAll(\"path.path\").data((function(t){return t.paths}),p);y.attr(\"fill\",(function(t){return t.model.color}));var x=y.enter().append(\"path\").attr(\"class\",\"path\").attr(\"stroke-opacity\",0).attr(\"fill\",(function(t){return t.model.color})).attr(\"fill-opacity\",0);_(x),y.attr(\"d\",(function(t){return t.svgD})),x.empty()||y.sort(g),y.exit().remove(),y.on(\"mouseover\",m).on(\"mouseout\",v).on(\"click\",b),h.append(\"g\").attr(\"class\",\"dimensions\");var w=u.select(\"g.dimensions\").selectAll(\"g.dimension\").data((function(t){return t.dimensions}),p);w.enter().append(\"g\").attr(\"class\",\"dimension\"),w.attr(\"transform\",(function(t){return l(t.x,0)})),w.exit().remove();var A=w.selectAll(\"g.category\").data((function(t){return t.categories}),p),M=A.enter().append(\"g\").attr(\"class\",\"category\");A.attr(\"transform\",(function(t){return l(0,t.y)})),M.append(\"rect\").attr(\"class\",\"catrect\").attr(\"pointer-events\",\"none\"),A.select(\"rect.catrect\").attr(\"fill\",\"none\").attr(\"width\",(function(t){return t.width})).attr(\"height\",(function(t){return t.height})),T(M);var S=A.selectAll(\"rect.bandrect\").data((function(t){return t.bands}),p);S.each((function(){s.raiseToTop(this)})),S.attr(\"fill\",(function(t){return t.color}));var E=S.enter().append(\"rect\").attr(\"class\",\"bandrect\").attr(\"stroke-opacity\",0).attr(\"fill\",(function(t){return t.color})).attr(\"fill-opacity\",0);S.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\"})),k(E),S.exit().remove(),M.append(\"text\").attr(\"class\",\"catlabel\").attr(\"pointer-events\",\"none\");var z=e._fullLayout.paper_bgcolor;A.select(\"text.catlabel\").attr(\"text-anchor\",(function(t){return d(t)?\"start\":\"end\"})).attr(\"alignment-baseline\",\"middle\").style(\"text-shadow\",f.makeTextShadow(z)).style(\"fill\",\"rgb(0, 0, 0)\").attr(\"x\",(function(t){return d(t)?t.width+5:-5})).attr(\"y\",(function(t){return t.height/2})).text((function(t){return t.model.categoryLabel})).each((function(t){c.font(n.select(this),t.parcatsViewModel.categorylabelfont),f.convertToTspans(n.select(this),e)})),M.append(\"text\").attr(\"class\",\"dimlabel\"),A.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){c.font(n.select(this),t.parcatsViewModel.labelfont)})),A.selectAll(\"rect.bandrect\").on(\"mouseover\",L).on(\"mouseout\",C),A.exit().remove(),w.call(n.behavior.drag().origin((function(t){return{x:t.x,y:0}})).on(\"dragstart\",P).on(\"drag\",I).on(\"dragend\",O)),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 p(t){return t.key}function d(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function g(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor\"),L=n.mouse(f)[0];o.loneHover({trace:h,x:b-d.left+g.left,y:_-d.top+g.top,text:E,color:t.model.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:10,fontColor:T,idealAlign:L1&&h.displayInd===f.dimensions.length-1?(i=c.left,a=\"left\"):(i=c.left+c.width,a=\"right\");var g=u.model.count,m=u.model.categoryLabel,v=g/u.parcatsViewModel.model.count,y={countLabel:g,categoryLabel:m,probabilityLabel:v.toFixed(3)},x=[];-1!==u.parcatsViewModel.hoverinfoItems.indexOf(\"count\")&&x.push([\"Count:\",y.countLabel].join(\" \")),-1!==u.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")&&x.push([\"P(\"+y.categoryLabel+\"):\",y.probabilityLabel].join(\" \"));var b=x.join(\"
\");return{trace:p,x:o*(i-e.left),y:s*(d-e.top),text:b,color:\"lightgray\",borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:12,fontColor:\"black\",idealAlign:a,hovertemplate:p.hovertemplate,hovertemplateLabels:y,eventData:[{data:p._input,fullData:p,count:g,category:m,probability:v}]}}function L(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,a=i._paperdiv.node().getBoundingClientRect(),l=t.parcatsViewModel.hoveron;if(\"color\"===l?(!function(t){var e=n.select(t).datum(),r=A(e);w(r),r.each((function(){s.raiseToTop(this)})),n.select(t.parentNode).selectAll(\"rect.bandrect\").filter((function(t){return t.color===e.color})).each((function(){s.raiseToTop(this),n.select(this).attr(\"stroke\",\"black\").attr(\"stroke-width\",1.5)}))}(this),S(this,\"plotly_hover\",n.event)):(!function(t){n.select(t.parentNode).selectAll(\"rect.bandrect\").each((function(t){var e=A(t);w(e),e.each((function(){s.raiseToTop(this)}))})),n.select(t.parentNode).select(\"rect.catrect\").attr(\"stroke\",\"black\").attr(\"stroke-width\",2.5)}(this),M(this,\"plotly_hover\",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf(\"none\"))\"category\"===l?e=E(r,a,this):\"color\"===l?e=function(t,e,r){t._fullLayout._calcInverseTransform(t);var i,a,o=t._fullLayout._invScaleX,s=t._fullLayout._invScaleY,l=r.getBoundingClientRect(),c=n.select(r).datum(),f=c.categoryViewModel,h=f.parcatsViewModel,p=h.model.dimensions[f.model.dimensionInd],d=h.trace,g=l.y+l.height/2;h.dimensions.length>1&&p.displayInd===h.dimensions.length-1?(i=l.left,a=\"left\"):(i=l.left+l.width,a=\"right\");var m=f.model.categoryLabel,v=c.parcatsViewModel.model.count,y=0;c.categoryViewModel.bands.forEach((function(t){t.color===c.color&&(y+=t.count)}));var x=f.model.count,b=0;h.pathSelection.each((function(t){t.model.color===c.color&&(b+=t.model.count)}));var _=y/v,w=y/b,T=y/x,k={countLabel:v,categoryLabel:m,probabilityLabel:_.toFixed(3)},A=[];-1!==f.parcatsViewModel.hoverinfoItems.indexOf(\"count\")&&A.push([\"Count:\",k.countLabel].join(\" \")),-1!==f.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")&&(A.push(\"P(color \\u2229 \"+m+\"): \"+k.probabilityLabel),A.push(\"P(\"+m+\" | color): \"+w.toFixed(3)),A.push(\"P(color | \"+m+\"): \"+T.toFixed(3)));var M=A.join(\"
\"),S=u.mostReadable(c.color,[\"black\",\"white\"]);return{trace:d,x:o*(i-e.left),y:s*(g-e.top),text:M,color:c.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontColor:S,fontSize:10,idealAlign:a,hovertemplate:d.hovertemplate,hovertemplateLabels:k,eventData:[{data:d._input,fullData:d,category:m,count:v,probability:_,categorycount:x,colorcount:b,bandcolorcount:y}]}}(r,a,this):\"dimension\"===l&&(e=function(t,e,r){var i=[];return n.select(r.parentNode.parentNode).selectAll(\"g.category\").select(\"rect.catrect\").each((function(){i.push(E(t,e,this))})),i}(r,a,this)),e&&o.loneHover(e,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r})}}function C(t){var e=t.parcatsViewModel;if(!e.dragDimension&&(_(e.pathSelection),T(e.dimensionSelection.selectAll(\"g.category\")),k(e.dimensionSelection.selectAll(\"g.category\").selectAll(\"rect.bandrect\")),o.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(g),-1===e.hoverinfoItems.indexOf(\"skip\"))){\"color\"===t.parcatsViewModel.hoveron?S(this,\"plotly_unhover\",n.event):M(this,\"plotly_unhover\",n.event)}}function P(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,s.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll(\"rect.bandrect\").each((function(e){e.yf.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.dragXp.x&&(a.model.displayInd=p.model.displayInd,p.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=a.model.displayInd}j(t.parcatsViewModel),N(t.parcatsViewModel),R(t.parcatsViewModel),D(t.parcatsViewModel)}}function O(t){if(\"fixed\"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll(\"text\").attr(\"font-weight\",\"normal\");var e={},r=z(t.parcatsViewModel),i=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),o=t.initialDragDimensionDisplayInds.some((function(t,e){return t!==i[e]}));o&&i.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?S(t.potentialClickBand,\"plotly_click\",n.event.sourceEvent):M(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,j(t.parcatsViewModel),N(t.parcatsViewModel),n.transition().duration(300).ease(\"cubic-in-out\").each((function(){R(t.parcatsViewModel,!0),D(t.parcatsViewModel,!0)})).each(\"end\",(function(){(o||s)&&a.restyle(t.parcatsViewModel.graphDiv,e,[r])}))}}function z(t){for(var e,r=t.graphDiv._fullData,n=0;n=0;s--)u+=\"C\"+c[s]+\",\"+(e[s+1]+n)+\" \"+l[s]+\",\"+(e[s]+n)+\" \"+(t[s]+r[s])+\",\"+(e[s]+n),u+=\"l-\"+r[s]+\",0 \";return u+=\"Z\"}function N(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)),ni?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;g0?d*(v.count/p):0;for(var y,x=new Array(n.length),b=0;b1?(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,m=e.categories.map((function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}}));for(m.sort((function(t,e){return t.displayInd-e.displayInd})),c=0;c0?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){h(r,t,n,e)}},{\"../../components/drawing\":388,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plot_api/plot_api\":540,\"@plotly/d3\":58,\"d3-interpolate\":116,tinycolor2:312}],887:[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\":886}],888:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/layout_attributes\"),a=t(\"../../plots/font_attributes\"),o=t(\"../../plots/domain\").attributes,s=t(\"../../lib/extend\").extendFlat,l=t(\"../../plot_api/plot_template\").templatedArray;e.exports={domain:o({name:\"parcoords\",trace:!0,editType:\"plot\"}),labelangle:{valType:\"angle\",dflt:0,editType:\"plot\"},labelside:{valType:\"enumerated\",values:[\"top\",\"bottom\"],dflt:\"top\",editType:\"plot\"},labelfont:a({editType:\"plot\"}),tickfont:a({editType:\"plot\"}),rangefont:a({editType:\"plot\"}),dimensions:l(\"dimension\",{label:{valType:\"string\",editType:\"plot\"},tickvals:s({},i.tickvals,{editType:\"plot\"}),ticktext:s({},i.ticktext,{editType:\"plot\"}),tickformat:s({},i.tickformat,{editType:\"plot\"}),visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},range:{valType:\"info_array\",items:[{valType:\"number\",editType:\"plot\"},{valType:\"number\",editType:\"plot\"}],editType:\"plot\"},constraintrange:{valType:\"info_array\",freeLength:!0,dimensions:\"1-2\",items:[{valType:\"any\",editType:\"plot\"},{valType:\"any\",editType:\"plot\"}],editType:\"plot\"},multiselect:{valType:\"boolean\",dflt:!0,editType:\"plot\"},values:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\"}),line:s({editType:\"calc\"},n(\"line\",{colorscaleDflt:\"Viridis\",autoColorDflt:!1,editTypeOverride:\"calc\"}))}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/plot_template\":543,\"../../plots/cartesian/layout_attributes\":569,\"../../plots/domain\":584,\"../../plots/font_attributes\":585}],889:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"@plotly/d3\"),a=t(\"../../lib/gup\").keyFun,o=t(\"../../lib/gup\").repeat,s=t(\"../../lib\").sorterAsc,l=t(\"../../lib\").strTranslate,c=n.bar.snapRatio;function u(t,e){return t*(1-c)+e*c}var f=n.bar.snapClose;function h(t,e){return t*(1-f)+e*f}function p(t,e,r,n){if(function(t,e){for(var r=0;r=e[r][0]&&t<=e[r][1])return!0;return!1}(r,n))return r;var i=t?-1:1,a=0,o=e.length-1;if(i<0){var s=a;a=o,o=s}for(var l=e[a],c=l,f=a;i*fe){h=r;break}}if(a=u,isNaN(a)&&(a=isNaN(f)||isNaN(h)?isNaN(f)?h:f:e-c[f][1]t[1]+r||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 m=t.unitTickvals,y=t.unitToPaddedPx.invert(e);for(r=0;r=x[0]&&y<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function w(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[r-a.grabPoint,r+a.barLength-a.grabPoint].map(e.unitToPaddedPx.invert):a.newExtent=[a.startExtent,e.unitToPaddedPx.invert(r)].sort(s),e.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(e),b(t.parentNode)}function T(t,e){var r=_(e,e.height-i.mouse(t)[1]-2*n.verticalPadding),a=\"crosshair\";r.clickableOrdinalRange?a=\"pointer\":r.region&&(a=r.region+\"-resize\"),i.select(document.body).style(\"cursor\",a)}function k(t){t.on(\"mousemove\",(function(t){i.event.preventDefault(),t.parent.inBrushDrag||T(this,t)})).on(\"mouseleave\",(function(t){t.parent.inBrushDrag||y()})).call(i.behavior.drag().on(\"dragstart\",(function(t){!function(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.unitToPaddedPx.invert(r),o=e.brush,s=_(e,r),l=s.interval,c=o.svgBrush;if(c.wasDragged=!1,c.grabbingBar=\"ns\"===s.region,c.grabbingBar){var u=l.map(e.unitToPaddedPx);c.grabPoint=r-u[0]-n.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=e.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter((function(t){return t[0]!==l[0]&&t[1]!==l[1]}))),c.startExtent=s.region?l[\"s\"===s.region?1:0]:a,e.parent.inBrushDrag=!0,c.brushStartCallback()}(this,t)})).on(\"drag\",(function(t){w(this,t)})).on(\"dragend\",(function(t){!function(t,e){var r=e.brush,n=r.filter,a=r.svgBrush;a._dragging||(T(t,e),w(t,e),e.brush.svgBrush.wasDragged=!1),a._dragging=!1,i.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,e.parent.inBrushDrag=!1,y(),!a.wasDragged)return a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&e.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&M(r)):M(r),a.brushCallback(e),b(t.parentNode),void a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(e.ordinal){var l=e.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(c?[a.newExtent]:[]),a.extent.length||M(r),a.brushCallback(e),c?b(t.parentNode,s):(s(),b(t.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,t)})))}function A(t,e){return t[0]-e[0]}function M(t){t.filterSpecified=!1,t.svgBrush.extent=[[-1/0,1/0]]}function S(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 1===n.length&&n[0][0]>n[0][1]&&(n=[]),n}e.exports={makeBrush:function(t,e,r,n,i,a){var o,l=function(){var t,e,r=[];return{set:function(n){1===(r=n.map((function(t){return t.slice().sort(s)})).sort(A)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),t=S(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,e){var r=t.selectAll(\".\"+n.cn.axisBrush).data(o,a);r.enter().append(\"g\").classed(n.cn.axisBrush,!0),function(t,e){var r=t.selectAll(\".background\").data(o);r.enter().append(\"rect\").classed(\"background\",!0).call(d).call(g).style(\"pointer-events\",\"auto\").attr(\"transform\",l(0,n.verticalPadding)),r.call(k).attr(\"height\",(function(t){return t.height-n.verticalPadding}));var i=t.selectAll(\".highlight-shadow\").data(o);i.enter().append(\"line\").classed(\"highlight-shadow\",!0).attr(\"x\",-n.bar.width/2).attr(\"stroke-width\",n.bar.width+n.bar.strokeWidth).attr(\"stroke\",e).attr(\"opacity\",n.bar.strokeOpacity).attr(\"stroke-linecap\",\"butt\"),i.attr(\"y1\",(function(t){return t.height})).call(x);var a=t.selectAll(\".highlight\").data(o);a.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\"),a.attr(\"y1\",(function(t){return t.height})).call(x)}(r,e)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map((function(t){return t.sort(s)})),t=e.multiselect?S(t.sort(A)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map((function(t){var e=[p(0,r,t[0],[]),p(1,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\":503,\"../../lib/gup\":500,\"./constants\":892,\"@plotly/d3\":58}],890:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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.style.width,height:this.style.height})})),window.setTimeout((function(){n.selectAll(\"#filterBarPattern\").attr(\"id\",\"filterBarPattern\")}),60)}},{\"../../constants/xmlns_namespaces\":480,\"../../plots/get_data\":593,\"./plot\":899,\"@plotly/d3\":58}],891:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray,i=t(\"../../components/colorscale\"),a=t(\"../../lib/gup\").wrap;e.exports=function(t,e){var r,o;return i.hasColorscale(e,\"line\")&&n(e.line.color)?(r=e.line.color,o=i.extractOpts(e.line).colorscale,i.calc(t,e,{vals:r,containerStr:\"line\",cLetter:\"c\"})):(r=function(t){for(var e=new Array(t),r=0;rf&&(n.log(\"parcoords traces support up to \"+f+\" dimensions at the moment\"),d.splice(f));var g=s(t,e,{name:\"dimensions\",layout:l,handleItemDefaults:p}),m=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,l,u);o(e,l,u),Array.isArray(g)&&g.length||(e.visible=!1),h(e,g,\"values\",m);var v={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(u,\"labelfont\",v),n.coerceFont(u,\"tickfont\",v),n.coerceFont(u,\"rangefont\",v),u(\"labelangle\"),u(\"labelside\")}},{\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503,\"../../plots/array_container_defaults\":549,\"../../plots/cartesian/axes\":554,\"../../plots/domain\":584,\"./attributes\":888,\"./axisbrush\":889,\"./constants\":892,\"./merge_length\":897}],894:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isTypedArray;r.convertTypedArray=function(t){return n(t)?Array.prototype.slice.call(t):t},r.isOrdinal=function(t){return!!t.tickvals},r.isVisible=function(t){return t.visible||!(\"visible\"in t)}},{\"../../lib\":503}],895:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcoords\",basePlotModule:t(\"./base_plot\"),categories:[\"gl\",\"regl\",\"noOpacity\",\"noHover\"],meta:{}}},{\"./attributes\":888,\"./base_plot\":890,\"./calc\":891,\"./defaults\":893,\"./plot\":899}],896:[function(t,e,r){\"use strict\";var n=t(\"glslify\"),i=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nattribute vec4 p01_04, p05_08, p09_12, p13_16,\\n p17_20, p21_24, p25_28, p29_32,\\n p33_36, p37_40, p41_44, p45_48,\\n p49_52, p53_56, p57_60, colors;\\n\\nuniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,\\n loA, hiA, loB, hiB, loC, hiC, loD, hiD;\\n\\nuniform vec2 resolution, viewBoxPos, viewBoxSize;\\nuniform float maskHeight;\\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\\nuniform vec4 contextColor;\\nuniform sampler2D maskTexture, palette;\\n\\nbool isPick = (drwLayer > 1.5);\\nbool isContext = (drwLayer < 0.5);\\n\\nconst vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);\\nconst vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);\\n\\nfloat val(mat4 p, mat4 v) {\\n return dot(matrixCompMult(p, v) * UNITS, UNITS);\\n}\\n\\nfloat axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {\\n float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);\\n float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);\\n return y1 * (1.0 - ratio) + y2 * ratio;\\n}\\n\\nint iMod(int a, int b) {\\n return a - b * (a / b);\\n}\\n\\nbool fOutside(float p, float lo, float hi) {\\n return (lo < hi) && (lo > p || p > hi);\\n}\\n\\nbool vOutside(vec4 p, vec4 lo, vec4 hi) {\\n return (\\n fOutside(p[0], lo[0], hi[0]) ||\\n fOutside(p[1], lo[1], hi[1]) ||\\n fOutside(p[2], lo[2], hi[2]) ||\\n fOutside(p[3], lo[3], hi[3])\\n );\\n}\\n\\nbool mOutside(mat4 p, mat4 lo, mat4 hi) {\\n return (\\n vOutside(p[0], lo[0], hi[0]) ||\\n vOutside(p[1], lo[1], hi[1]) ||\\n vOutside(p[2], lo[2], hi[2]) ||\\n vOutside(p[3], lo[3], hi[3])\\n );\\n}\\n\\nbool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {\\n return mOutside(A, loA, hiA) ||\\n mOutside(B, loB, hiB) ||\\n mOutside(C, loC, hiC) ||\\n mOutside(D, loD, hiD);\\n}\\n\\nbool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {\\n mat4 pnts[4];\\n pnts[0] = A;\\n pnts[1] = B;\\n pnts[2] = C;\\n pnts[3] = D;\\n\\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 if(0 == iMod(\\n int(255.0 * texture2D(maskTexture,\\n vec2(\\n (float(i * 2 + j / 2) + 0.5) / 8.0,\\n (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight\\n ))[3]\\n ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),\\n 2\\n )) return true;\\n }\\n }\\n }\\n return false;\\n}\\n\\nvec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {\\n float x = 0.5 * sign(v) + 0.5;\\n float y = axisY(x, A, B, C, D);\\n float z = 1.0 - abs(v);\\n\\n z += isContext ? 0.0 : 2.0 * float(\\n outsideBoundingBox(A, B, C, D) ||\\n outsideRasterMask(A, B, C, D)\\n );\\n\\n return vec4(\\n 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,\\n z,\\n 1.0\\n );\\n}\\n\\nvoid main() {\\n mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);\\n mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);\\n mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);\\n mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);\\n\\n float v = colors[3];\\n\\n gl_Position = position(isContext, v, A, B, C, D);\\n\\n fragColor =\\n isContext ? vec4(contextColor) :\\n isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));\\n}\\n\"]),a=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n gl_FragColor = fragColor;\\n}\\n\"]),o=t(\"./constants\").maxDimensionCount,s=t(\"../../lib\"),l=new Uint8Array(4),c=new Uint8Array(4),u={shape:[256,1],format:\"rgba\",type:\"uint8\",mag:\"nearest\",min:\"nearest\"};function f(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 h(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:l})}(t),r.drawCompleted=!0),function s(l){var c=Math.min(n,i-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],f(t,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),r.clearOnly||(a.count=2*c,a.offset=2*l*n,e(a),l*n+c>>8*e)%256/255}function g(t,e,r){for(var n=new Array(8*e),i=0,a=0;au&&(u=t[i].dim1.canvasX,o=i);0===s&&f(T,0,0,r.canvasWidth,r.canvasHeight);var p=function(t){var e,r,n,i=[[],[]];for(n=0;n<64;n++){var a=!t&&no._length&&(S=S.slice(0,o._length));var L,C=o.tickvals;function P(t,e){return{val:t,text:L[e]}}function I(t,e){return t.val-e.val}if(Array.isArray(C)&&C.length){L=o.ticktext,Array.isArray(L)&&L.length?L.length>C.length?L=L.slice(0,C.length):C.length>L.length&&(C=C.slice(0,L.length)):L=C.map(a(o.tickformat));for(var O=1;O=r||l>=i)return;var c=t.lineLayer.readPixel(s,i-1-l),u=0!==c[3],f=u?c[2]+256*(c[1]+256*c[0]):null,h={x:s,y:l,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:f};f!==B&&(u?a.hover(h):a.unhover&&a.unhover(h),B=f)}})),F.style(\"opacity\",(function(t){return t.pick?0:1})),h.style(\"background\",\"rgba(255, 255, 255, 0)\");var N=h.selectAll(\".\"+y.cn.parcoords).data(R,d);N.exit().remove(),N.enter().append(\"g\").classed(y.cn.parcoords,!0).style(\"shape-rendering\",\"crispEdges\").style(\"pointer-events\",\"none\"),N.attr(\"transform\",(function(t){return c(t.model.translateX,t.model.translateY)}));var j=N.selectAll(\".\"+y.cn.parcoordsControlView).data(g,d);j.enter().append(\"g\").classed(y.cn.parcoordsControlView,!0),j.attr(\"transform\",(function(t){return c(t.model.pad.l,t.model.pad.t)}));var U=j.selectAll(\".\"+y.cn.yAxis).data((function(t){return t.dimensions}),d);U.enter().append(\"g\").classed(y.cn.yAxis,!0),j.each((function(t){O(U,t,_)})),F.each((function(t){if(t.viewModel){!t.lineLayer||a?t.lineLayer=b(this,t):t.lineLayer.update(t),(t.key||0===t.key)&&(t.viewModel[t.key]=t.lineLayer);var e=!t.context||a;t.lineLayer.render(t.viewModel.panels,e)}})),U.attr(\"transform\",(function(t){return c(t.xScale(t.xIndex),0)})),U.call(n.behavior.drag().origin((function(t){return t})).on(\"drag\",(function(t){var e=t.parent;S.linePickActive(!1),t.x=Math.max(-y.overdrag,Math.min(t.model.width+y.overdrag,n.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,U.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})),O(U,e,_),U.filter((function(e){return 0!==Math.abs(t.xIndex-e.xIndex)})).attr(\"transform\",(function(t){return c(t.xScale(t.xIndex),0)})),n.select(this).attr(\"transform\",c(t.x,0)),U.each((function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!E(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,O(U,e,_),n.select(this).attr(\"transform\",(function(t){return c(t.x,0)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!E(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),S.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(e.key,e.dimensions.map((function(t){return t.crossfilterDimensionIndex})))}))),U.exit().remove();var V=U.selectAll(\".\"+y.cn.axisOverlays).data(g,d);V.enter().append(\"g\").classed(y.cn.axisOverlays,!0),V.selectAll(\".\"+y.cn.axis).remove();var H=V.selectAll(\".\"+y.cn.axis).data(g,d);H.enter().append(\"g\").classed(y.cn.axis,!0),H.each((function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,i=r.domain();n.select(this).call(n.svg.axis().orient(\"left\").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?i:null).tickFormat((function(e){return v.isOrdinal(t)?e:z(t.model.dimensions[t.visibleIndex],e)})).scale(r)),f.font(H.selectAll(\"text\"),t.model.tickFont)})),H.selectAll(\".domain, .tick>line\").attr(\"fill\",\"none\").attr(\"stroke\",\"black\").attr(\"stroke-opacity\",.25).attr(\"stroke-width\",\"1px\"),H.selectAll(\"text\").style(\"text-shadow\",u.makeTextShadow(T)).style(\"cursor\",\"default\");var q=V.selectAll(\".\"+y.cn.axisHeading).data(g,d);q.enter().append(\"g\").classed(y.cn.axisHeading,!0);var G=q.selectAll(\".\"+y.cn.axisTitle).data(g,d);G.enter().append(\"text\").classed(y.cn.axisTitle,!0).attr(\"text-anchor\",\"middle\").style(\"cursor\",\"ew-resize\").style(\"pointer-events\",\"auto\"),G.text((function(t){return t.label})).each((function(e){var r=n.select(this);f.font(r,e.model.labelFont),u.convertToTspans(r,t)})).attr(\"transform\",(function(t){var e=I(t.model.labelAngle,t.model.labelSide),r=y.axisTitleOffset;return(e.dir>0?\"\":c(0,2*r+t.model.height))+l(e.degrees)+c(-r*e.dx,-r*e.dy)})).attr(\"text-anchor\",(function(t){var e=I(t.model.labelAngle,t.model.labelSide);return 2*Math.abs(e.dx)>Math.abs(e.dy)?e.dir*e.dx<0?\"start\":\"end\":\"middle\"}));var Y=V.selectAll(\".\"+y.cn.axisExtent).data(g,d);Y.enter().append(\"g\").classed(y.cn.axisExtent,!0);var W=Y.selectAll(\".\"+y.cn.axisExtentTop).data(g,d);W.enter().append(\"g\").classed(y.cn.axisExtentTop,!0),W.attr(\"transform\",c(0,-y.axisExtentOffset));var X=W.selectAll(\".\"+y.cn.axisExtentTopText).data(g,d);X.enter().append(\"text\").classed(y.cn.axisExtentTopText,!0).call(P),X.text((function(t){return D(t,!0)})).each((function(t){f.font(n.select(this),t.model.rangeFont)}));var Z=Y.selectAll(\".\"+y.cn.axisExtentBottom).data(g,d);Z.enter().append(\"g\").classed(y.cn.axisExtentBottom,!0),Z.attr(\"transform\",(function(t){return c(0,t.model.height+y.axisExtentOffset)}));var J=Z.selectAll(\".\"+y.cn.axisExtentBottomText).data(g,d);J.enter().append(\"text\").classed(y.cn.axisExtentBottomText,!0).attr(\"dy\",\"0.75em\").call(P),J.text((function(t){return D(t,!1)})).each((function(t){f.font(n.select(this),t.model.rangeFont)})),x.ensureAxisBrush(V,T)}},{\"../../components/colorscale\":378,\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/gup\":500,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"./axisbrush\":889,\"./constants\":892,\"./helpers\":894,\"./lines\":896,\"@plotly/d3\":58,\"color-rgba\":91}],899:[function(t,e,r){\"use strict\";var n=t(\"./parcoords\"),i=t(\"../../lib/prepare_regl\"),a=t(\"./helpers\").isVisible;function o(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return-1===i&&(i+=e.length),i}e.exports=function(t,e){var r=t._fullLayout;if(i(t)){var s={},l={},c={},u={},f=r._size;e.forEach((function(e,r){var n=e[0].trace;c[r]=n.index;var i=u[r]=n._fullInput.index;s[r]=t.data[i].dimensions,l[r]=t.data[i].dimensions.slice()}));n(t,e,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{filterChanged:function(e,n,i){var a=l[e][n],o=i.map((function(t){return t.slice()})),s=\"dimensions[\"+n+\"].constraintrange\",f=r._tracePreGUI[t._fullData[c[e]]._fullInput.uid];if(void 0===f[s]){var h=a.constraintrange;f[s]=h||null}var p=t._fullData[c[e]].dimensions[n];o.length?(1===o.length&&(o=o[0]),a.constraintrange=o,p.constraintrange=o.slice(),o=[o]):(delete a.constraintrange,delete p.constraintrange,o=null);var d={};d[s]=o,t.emit(\"plotly_restyle\",[d,[u[e]]])},hover:function(e){t.emit(\"plotly_hover\",e)},unhover:function(e){t.emit(\"plotly_unhover\",e)},axesMoved:function(e,r){var n=function(t,e){return function(r,n){return o(t,e,r)-o(t,e,n)}}(r,l[e].filter(a));s[e].sort(n),l[e].filter((function(t){return!a(t)})).sort((function(t){return l[e].indexOf(t)})).forEach((function(t){s[e].splice(s[e].indexOf(t),1),s[e].splice(l[e].indexOf(t),0,t)})),t.emit(\"plotly_restyle\",[{dimensions:[s[e]]},[u[e]]])}})}}},{\"../../lib/prepare_regl\":516,\"./helpers\":894,\"./parcoords\":898}],900:[function(t,e,r){\"use strict\";var n=t(\"../../plots/attributes\"),i=t(\"../../plots/domain\").attributes,a=t(\"../../plots/font_attributes\"),o=t(\"../../components/color/attributes\"),s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../plots/template_attributes\").texttemplateAttrs,c=t(\"../../lib/extend\").extendFlat,u=a({editType:\"plot\",arrayOk:!0,colorEditType:\"plot\"});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:o.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:\"plot\"},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:c({},n.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:s({},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),texttemplate:l({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),textposition:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"auto\",\"none\"],dflt:\"auto\",arrayOk:!0,editType:\"plot\"},textfont:c({},u,{}),insidetextorientation:{valType:\"enumerated\",values:[\"horizontal\",\"radial\",\"tangential\",\"auto\"],dflt:\"auto\",editType:\"plot\"},insidetextfont:c({},u,{}),outsidetextfont:c({},u,{}),automargin:{valType:\"boolean\",dflt:!1,editType:\"plot\"},title:{text:{valType:\"string\",dflt:\"\",editType:\"plot\"},font:c({},u,{}),position:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle center\",\"bottom left\",\"bottom center\",\"bottom right\"],editType:\"plot\"},editType:\"plot\"},domain:i({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\"},_deprecated:{title:{valType:\"string\",dflt:\"\",editType:\"calc\"},titlefont:c({},u,{}),titleposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle center\",\"bottom left\",\"bottom center\",\"bottom right\"],editType:\"calc\"}}}},{\"../../components/color/attributes\":365,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/domain\":584,\"../../plots/font_attributes\":585,\"../../plots/template_attributes\":633}],901:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"pie\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":619}],902:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"tinycolor2\"),a=t(\"../../components/color\"),o={};function s(t){return function(e,r){return!!e&&(!!(e=i(e)).isValid()&&(e=a.addOpacity(e,e.getAlpha()),t[r]||(t[r]=e),e))}}function l(t,e){var r,n=JSON.stringify(t),a=e[n];if(!a){for(a=t.slice(),r=0;r=0})),(\"funnelarea\"===e.type?v:e.sort)&&a.sort((function(t,e){return e.v-t.v})),a[0]&&(a[0].vTotal=m),a},crossTraceCalc:function(t,e){var r=(e||{}).type;r||(r=\"pie\");var n=t._fullLayout,i=t.calcdata,a=n[r+\"colorway\"],s=n[\"_\"+r+\"colormap\"];n[\"extend\"+r+\"colors\"]&&(a=l(a,o));for(var c=0,u=0;u0){s=!0;break}}s||(o=0)}return{hasLabels:r,hasValues:a,len:o}}e.exports={handleLabelsAndValues:l,supplyDefaults:function(t,e,r,n){function c(r,n){return i.coerce(t,e,a,r,n)}var u=l(c(\"labels\"),c(\"values\")),f=u.len;if(e._hasLabels=u.hasLabels,e._hasValues=u.hasValues,!e._hasLabels&&e._hasValues&&(c(\"label0\"),c(\"dlabel\")),f){e._length=f,c(\"marker.line.width\")&&c(\"marker.line.color\"),c(\"marker.colors\"),c(\"scalegroup\");var h,p=c(\"text\"),d=c(\"texttemplate\");if(d||(h=c(\"textinfo\",Array.isArray(p)?\"text+percent\":\"percent\")),c(\"hovertext\"),c(\"hovertemplate\"),d||h&&\"none\"!==h){var g=c(\"textposition\");s(t,e,n,c,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||\"auto\"===g||\"outside\"===g)&&c(\"automargin\"),(\"inside\"===g||\"auto\"===g||Array.isArray(g))&&c(\"insidetextorientation\")}o(e,n,c);var m=c(\"hole\");if(c(\"title.text\")){var v=c(\"title.position\",m?\"middle center\":\"top center\");m||\"middle center\"!==v||(e.title.position=\"top center\"),i.coerceFont(c,\"title.font\",n.font)}c(\"sort\"),c(\"direction\"),c(\"rotation\"),c(\"pull\")}else e.visible=!1}}},{\"../../lib\":503,\"../../plots/domain\":584,\"../bar/defaults\":652,\"./attributes\":900,\"fast-isnumeric\":190}],904:[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,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return 1===t.pts.length&&(r.pointNumber=r.i=t.pts[0]),n(r,e,t.pts),\"funnelarea\"===e.type&&(delete r.v,delete r.i),r}},{\"../../components/fx/helpers\":402}],905:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");function i(t){return-1!==t.indexOf(\"e\")?t.replace(/[.]?0+e/,\"e\"):-1!==t.indexOf(\".\")?t.replace(/[.]?0+$/,\"\"):t}r.formatPiePercent=function(t,e){var r=i((100*t).toPrecision(3));return n.numSeparate(r,e)+\"%\"},r.formatPieValue=function(t,e){var r=i(t.toPrecision(10));return n.numSeparate(r,e)},r.getFirstFilled=function(t,e){if(Array.isArray(t))for(var r=0;r\"),name:f.hovertemplate||-1!==h.indexOf(\"name\")?f.name:void 0,idealAlign:t.pxmid[0]<0?\"left\":\"right\",color:m.castOption(_.bgcolor,t.pts)||t.color,borderColor:m.castOption(_.bordercolor,t.pts),fontFamily:m.castOption(w.family,t.pts),fontSize:m.castOption(w.size,t.pts),fontColor:m.castOption(w.color,t.pts),nameLength:m.castOption(_.namelength,t.pts),textAlign:m.castOption(_.align,t.pts),hovertemplate:m.castOption(f.hovertemplate,t.pts),hovertemplateLabels:t,eventData:[v(t,f)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e,inOut_bbox:T}),t.bbox=T[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,e.emit(\"plotly_hover\",{points:[v(t,f)],event:n.event})}})),t.on(\"mouseout\",(function(t){var r=e._fullLayout,i=e._fullData[c.index],o=n.select(this).datum();c._hasHoverEvent&&(t.originalEvent=n.event,e.emit(\"plotly_unhover\",{points:[v(o,i)],event:n.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(a.loneUnhover(r._hoverlayer.node()),c._hasHoverLabel=!1)})),t.on(\"click\",(function(t){var r=e._fullLayout,i=e._fullData[c.index];e._dragging||!1===r.hovermode||(e._hoverdata=[v(t,i)],a.click(e,n.event))}))}function b(t,e,r){var n=m.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=m.castOption(t._input.textfont.color,e.pts));var i=m.castOption(t.insidetextfont.family,e.pts)||m.castOption(t.textfont.family,e.pts)||r.family,a=m.castOption(t.insidetextfont.size,e.pts)||m.castOption(t.textfont.size,e.pts)||r.size;return{color:n||o.contrast(e.color),family:i,size:a}}function _(t,e){for(var r,n,i=0;ie&&e>n||r=-4;m-=2)v(Math.PI*m,\"tan\");for(m=4;m>=-4;m-=2)v(Math.PI*(m+1),\"tan\")}if(f||p){for(m=4;m>=-4;m-=2)v(Math.PI*(m+1.5),\"rad\");for(m=4;m>=-4;m-=2)v(Math.PI*(m+.5),\"rad\")}}if(s||d||f){var y=Math.sqrt(t.width*t.width+t.height*t.height);if((a={scale:i*n*2/y,rCenter:1-i,rotate:0}).textPosAngle=(e.startangle+e.stopangle)/2,a.scale>=1)return a;g.push(a)}(d||p)&&((a=T(t,n,o,l,c)).textPosAngle=(e.startangle+e.stopangle)/2,g.push(a)),(d||h)&&((a=k(t,n,o,l,c)).textPosAngle=(e.startangle+e.stopangle)/2,g.push(a));for(var x=0,b=0,_=0;_=1)break}return g[x]}function T(t,e,r,n,i){e=Math.max(0,e-2*g);var a=t.width/t.height,o=S(a,n,e,r);return{scale:2*o/t.height,rCenter:A(a,o/e),rotate:M(i)}}function k(t,e,r,n,i){e=Math.max(0,e-2*g);var a=t.height/t.width,o=S(a,n,e,r);return{scale:2*o/t.width,rCenter:A(a,o/e),rotate:M(i+Math.PI/2)}}function A(t,e){return Math.cos(e)-t*e}function M(t){return(180/Math.PI*t+720)%180-90}function S(t,e,r,n){var i=t+1/(2*Math.tan(e));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(t*t+n/2)+t))}function E(t,e){return t.v!==e.vTotal||e.trace.hole?Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2):1}function L(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 C(t,e){var r,n,i,a=t.trace,o={x:t.cx,y:t.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=I(a),-1!==a.title.position.indexOf(\"top\")?(o.y-=(1+i)*t.r,s.ty-=t.titleBox.height):-1!==a.title.position.indexOf(\"bottom\")&&(o.y+=(1+i)*t.r);var l,c,u=(l=t.r,c=t.trace.aspectratio,l/(void 0===c?1:c)),f=e.w*(a.domain.x[1]-a.domain.x[0])/2;return-1!==a.title.position.indexOf(\"left\")?(f+=u,o.x-=(1+i)*u,s.tx+=t.titleBox.width/2):-1!==a.title.position.indexOf(\"center\")?f*=2:-1!==a.title.position.indexOf(\"right\")&&(f+=u,o.x+=(1+i)*u,s.tx-=t.titleBox.width/2),r=f/t.titleBox.width,n=P(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}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 I(t){var e,r=t.pull;if(!r)return 0;if(Array.isArray(r))for(r=0,e=0;er&&(r=t.pull[e]);return r}function O(t,e){for(var r=[],n=0;n1?(c=r.r,u=c/i.aspectratio):(u=r.r,c=u*i.aspectratio),c*=(1+i.baseratio)/2,l=c*u}o=Math.min(o,l/r.vTotal)}for(n=0;n\")}if(a){var x=l.castOption(i,e.i,\"texttemplate\");if(x){var b=function(t){return{label:t.label,value:t.v,valueLabel:m.formatPieValue(t.v,n.separators),percent:t.v/r.vTotal,percentLabel:m.formatPiePercent(t.v/r.vTotal,n.separators),color:t.color,text:t.text,customdata:l.castOption(i,t.i,\"customdata\")}}(e),_=m.getFirstFilled(i.text,e.pts);(y(_)||\"\"===_)&&(b.text=_),e.text=l.texttemplateString(x,b,t._fullLayout._d3locale,b,i._meta||{})}else e.text=\"\"}}function R(t,e){var r=t.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(e.left+e.right)/2,o=(e.top+e.bottom)/2;t.textX=a*n-o*i,t.textY=a*i+o*n,t.noCenter=!0}e.exports={plot:function(t,e){var r=t._fullLayout,a=r._size;d(\"pie\",r),_(e,t),O(e,a);var h=l.makeTraceGroups(r._pielayer,e,\"trace\").each((function(e){var h=n.select(this),d=e[0],g=d.trace;!function(t){var e,r,n,i=t[0],a=i.r,o=i.trace,s=m.getRotationAngle(o.rotation),l=2*Math.PI/i.vTotal,c=\"px0\",u=\"px1\";if(\"counterclockwise\"===o.direction){for(e=0;ei.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-o.hole,r.rInscribed=E(r,i))}(e),h.attr(\"stroke-linejoin\",\"round\"),h.each((function(){var v=n.select(this).selectAll(\"g.slice\").data(e);v.enter().append(\"g\").classed(\"slice\",!0),v.exit().remove();var y=[[[],[]],[[],[]]],_=!1;v.each((function(i,a){if(i.hidden)n.select(this).selectAll(\"path,g\").remove();else{i.pointNumber=i.i,i.curveNumber=g.index,y[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var o=d.cx,c=d.cy,u=n.select(this),h=u.selectAll(\"path.surface\").data([i]);if(h.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":\"all\"}),u.call(x,t,e),g.pull){var v=+m.castOption(g.pull,i.pts)||0;v>0&&(o+=v*i.pxmid[0],c+=v*i.pxmid[1])}i.cxFinal=o,i.cyFinal=c;var T=g.hole;if(i.v===d.vTotal){var k=\"M\"+(o+i.px0[0])+\",\"+(c+i.px0[1])+C(i.px0,i.pxmid,!0,1)+C(i.pxmid,i.px0,!0,1)+\"Z\";T?h.attr(\"d\",\"M\"+(o+T*i.px0[0])+\",\"+(c+T*i.px0[1])+C(i.px0,i.pxmid,!1,T)+C(i.pxmid,i.px0,!1,T)+\"Z\"+k):h.attr(\"d\",k)}else{var A=C(i.px0,i.px1,!0,1);if(T){var M=1-T;h.attr(\"d\",\"M\"+(o+T*i.px1[0])+\",\"+(c+T*i.px1[1])+C(i.px1,i.px0,!1,T)+\"l\"+M*i.px0[0]+\",\"+M*i.px0[1]+A+\"Z\")}else h.attr(\"d\",\"M\"+o+\",\"+c+\"l\"+i.px0[0]+\",\"+i.px0[1]+A+\"Z\")}D(t,i,d);var S=m.castOption(g.textposition,i.pts),E=u.selectAll(\"g.slicetext\").data(i.text&&\"none\"!==S?[0]:[]);E.enter().append(\"g\").classed(\"slicetext\",!0),E.exit().remove(),E.each((function(){var u=l.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),h=l.ensureUniformFontSize(t,\"outside\"===S?function(t,e,r){var n=m.castOption(t.outsidetextfont.color,e.pts)||m.castOption(t.textfont.color,e.pts)||r.color,i=m.castOption(t.outsidetextfont.family,e.pts)||m.castOption(t.textfont.family,e.pts)||r.family,a=m.castOption(t.outsidetextfont.size,e.pts)||m.castOption(t.textfont.size,e.pts)||r.size;return{color:n,family:i,size:a}}(g,i,r.font):b(g,i,r.font));u.text(i.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(s.font,h).call(f.convertToTspans,t);var v,y=s.bBox(u.node());if(\"outside\"===S)v=L(y,i);else if(v=w(y,i,d),\"auto\"===S&&v.scale<1){var x=l.ensureUniformFontSize(t,g.outsidetextfont);u.call(s.font,x),v=L(y=s.bBox(u.node()),i)}var T=v.textPosAngle,k=void 0===T?i.pxmid:z(d.r,T);if(v.targetX=o+k[0]*v.rCenter+(v.x||0),v.targetY=c+k[1]*v.rCenter+(v.y||0),R(v,y),v.outside){var A=v.targetY;i.yLabelMin=A-y.height/2,i.yLabelMid=A,i.yLabelMax=A+y.height/2,i.labelExtraX=0,i.labelExtraY=0,_=!0}v.fontSize=h.size,p(g.type,v,r),e[a].transform=v,u.attr(\"transform\",l.getTextTransform(v))}))}function C(t,e,r,n){var a=n*(e[0]-t[0]),o=n*(e[1]-t[1]);return\"a\"+n*d.r+\",\"+n*d.r+\" 0 \"+i.largeArc+(r?\" 1 \":\" 0 \")+a+\",\"+o}}));var T=n.select(this).selectAll(\"g.titletext\").data(g.title.text?[0]:[]);if(T.enter().append(\"g\").classed(\"titletext\",!0),T.exit().remove(),T.each((function(){var e,r=l.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),i=g.title.text;g._meta&&(i=l.templateString(i,g._meta)),r.text(i).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(s.font,g.title.font).call(f.convertToTspans,t),e=\"middle center\"===g.title.position?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.title.font.size}}(d):C(d,a),r.attr(\"transform\",u(e.x,e.y)+c(Math.min(1,e.scale))+u(e.tx,e.ty))})),_&&function(t,e){var r,n,i,a,o,s,l,c,u,f,h,p,d;function g(t,e){return t.pxmid[1]-e.pxmid[1]}function v(t,e){return e.pxmid[1]-t.pxmid[1]}function y(t,r){r||(r={});var i,c,u,h,p=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),d=n?t.yLabelMin:t.yLabelMax,g=n?t.yLabelMax:t.yLabelMin,v=t.cyFinal+o(t.px0[1],t.px1[1]),y=p-d;if(y*l>0&&(t.labelExtraY=y),Array.isArray(e.pull))for(c=0;c=(m.castOption(e.pull,u.pts)||0)||((t.pxmid[1]-u.pxmid[1])*l>0?(y=u.cyFinal+o(u.px0[1],u.px1[1])-d-t.labelExtraY)*l>0&&(t.labelExtraY+=y):(g+t.labelExtraY-v)*l>0&&(i=3*s*Math.abs(c-f.indexOf(t)),(h=u.cxFinal+a(u.px0[0],u.px1[0])+i-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=h)))}for(n=0;n<2;n++)for(i=n?g:v,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,(c=t[n][r]).sort(i),u=t[1-n][r],f=u.concat(c),p=[],h=0;hMath.abs(f)?s+=\"l\"+f*t.pxmid[0]/t.pxmid[1]+\",\"+f+\"H\"+(a+t.labelExtraX+c):s+=\"l\"+t.labelExtraX+\",\"+u+\"v\"+(f-u)+\"h\"+c}else s+=\"V\"+(t.yLabelMid+t.labelExtraY)+\"h\"+c;l.ensureSingle(r,\"path\",\"textline\").call(o.stroke,e.outsidetextfont.color).attr({\"stroke-width\":Math.min(2,e.outsidetextfont.size/8),d:s,fill:\"none\"})}else r.select(\"path.textline\").remove()}))}(v,g),_&&g.automargin){var k=s.bBox(h.node()),A=g.domain,M=a.w*(A.x[1]-A.x[0]),S=a.h*(A.y[1]-A.y[0]),E=(.5*M-d.r)/a.w,P=(.5*S-d.r)/a.h;i.autoMargin(t,\"pie.\"+g.uid+\".automargin\",{xl:A.x[0]-E,xr:A.x[1]+E,yb:A.y[0]-P,yt:A.y[1]+P,l:Math.max(d.cx-d.r-k.left,0),r:Math.max(k.right-(d.cx+d.r),0),b:Math.max(k.bottom-(d.cy+d.r),0),t:Math.max(d.cy-d.r-k.top,0),pad:5})}}))}));setTimeout((function(){h.selectAll(\"tspan\").each((function(){var t=n.select(this);t.attr(\"dy\")&&t.attr(\"dy\",t.attr(\"dy\"))}))}),0)},formatSliceLabel:D,transformInsideText:w,determineInsideTextFont:b,positionTitleOutside:C,prerenderTitles:_,layoutAreas:O,attachFxHandlers:x,computeTransform:R}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/plots\":619,\"../bar/constants\":650,\"../bar/uniform_text\":664,\"./event_data\":904,\"./helpers\":905,\"@plotly/d3\":58}],910:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"./style_one\"),a=t(\"../bar/uniform_text\").resizeText;e.exports=function(t){var e=t._fullLayout._pielayer.selectAll(\".trace\");a(t,e,\"pie\"),e.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)}))}))}},{\"../bar/uniform_text\":664,\"./style_one\":911,\"@plotly/d3\":58}],911:[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\":366,\"./helpers\":905}],912:[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\":926}],913:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").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;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);if(p)r=p;else for(r=new Int32Array(e),l=0;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var g=i(t.marker.color),m=i(t.marker.border.color),v=t.opacity*t.marker.opacity;g[3]*=v,this.pointcloudOptions.color=g;var y=t.marker.blend;if(null===y){y=c.length<100||u.length<100}this.pointcloudOptions.blend=y,m[3]*=v,this.pointcloudOptions.borderColor=m;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,T=b/2||.5;t._extremes[_._id]=a(_,[d[0],d[2]],{ppad:T}),t._extremes[w._id]=a(w,[d[1],d[3]],{ppad:T})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},{\"../../../stackgl_modules\":1120,\"../../lib/str2rgbarray\":528,\"../../plots/cartesian/autorange\":553,\"../scatter/get_trace_color\":936}],914:[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\":503,\"./attributes\":912}],915:[function(t,e,r){\"use strict\";[\"*pointcloud* trace is deprecated!\",\"Please consider switching to the *scattergl* trace type.\"].join(\" \");e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"../scatter3d/calc\"),plot:t(\"./convert\"),moduleType:\"trace\",name:\"pointcloud\",basePlotModule:t(\"../../plots/gl2d\"),categories:[\"gl\",\"gl2d\",\"showLegend\"],meta:{}}},{\"../../plots/gl2d\":596,\"../scatter3d/calc\":955,\"./attributes\":912,\"./convert\":913,\"./defaults\":914}],916:[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(\"../../plots/template_attributes\").hovertemplateAttrs,c=t(\"../../components/colorscale/attributes\"),u=t(\"../../plot_api/plot_template\").templatedArray,f=t(\"../../plots/cartesian/axis_format_attributes\").descriptionOnlyNumbers,h=t(\"../../lib/extend\").extendFlat,p=t(\"../../plot_api/edit_types\").overrideAll;(e.exports=p({hoverinfo:h({},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\",description:f(\"value\")},valuesuffix:{valType:\"string\",dflt:\"\"},arrangement:{valType:\"enumerated\",values:[\"snap\",\"perpendicular\",\"freeform\",\"fixed\"],dflt:\"snap\"},textfont:n({}),customdata:void 0,node:{label:{valType:\"data_array\",dflt:[]},groups:{valType:\"info_array\",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:\"number\",editType:\"calc\"}},x:{valType:\"data_array\",dflt:[]},y:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},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,hovertemplate:l({},{keys:[\"value\",\"label\"]})},link:{label:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},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,hovertemplate:l({},{keys:[\"value\",\"label\"]}),colorscales:u(\"concentrationscales\",{editType:\"calc\",label:{valType:\"string\",editType:\"calc\",dflt:\"\"},cmax:{valType:\"number\",editType:\"calc\",dflt:1},cmin:{valType:\"number\",editType:\"calc\",dflt:0},colorscale:h(c().colorscale,{dflt:[[0,\"white\"],[1,\"black\"]]})})}},\"calc\",\"nested\")).transforms=void 0},{\"../../components/color/attributes\":365,\"../../components/colorscale/attributes\":373,\"../../components/fx/attributes\":397,\"../../lib/extend\":493,\"../../plot_api/edit_types\":536,\"../../plot_api/plot_template\":543,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/domain\":584,\"../../plots/font_attributes\":585,\"../../plots/template_attributes\":633}],917:[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\"),s=t(\"../../lib/setcursor\"),l=t(\"../../components/dragelement\"),c=t(\"../../plots/cartesian/select\").prepSelect,u=t(\"../../lib\"),f=t(\"../../registry\");function h(t,e){var r=t._fullData[e],n=t._fullLayout,i=n.dragmode,a=\"pan\"===n.dragmode?\"move\":\"crosshair\",o=r._bgRect;if(\"pan\"!==i&&\"zoom\"!==i){s(o,a);var h={_id:\"x\",c2p:u.identity,_offset:r._sankey.translateX,_length:r._sankey.width},p={_id:\"y\",c2p:u.identity,_offset:r._sankey.translateY,_length:r._sankey.height},d={gd:t,element:o.node(),plotinfo:{id:e,xaxis:h,yaxis:p,fillRangeItems:u.noop},subplot:e,xaxes:[h],yaxes:[p],doneFnCompleted:function(r){var n,i=t._fullData[e],a=i.node.groups.slice(),o=[];function s(t){for(var e=i._sankey.graph.nodes,r=0;ry&&(y=a.source[e]),a.target[e]>y&&(y=a.target[e]);var x,b=y+1;t.node._count=b;var _=t.node.groups,w={};for(e=0;e<_.length;e++){var T=_[e];for(x=0;x0&&s(E,b)&&s(L,b)&&(!w.hasOwnProperty(E)||!w.hasOwnProperty(L)||w[E]!==w[L])){w.hasOwnProperty(L)&&(L=w[L]),w.hasOwnProperty(E)&&(E=w[E]),L=+L,h[E=+E]=h[L]=!0;var C=\"\";a.label&&a.label[e]&&(C=a.label[e]);var P=null;C&&p.hasOwnProperty(C)&&(P=p[C]),c.push({pointNumber:e,label:C,color:u?a.color[e]:a.color,customdata:f?a.customdata[e]:a.customdata,concentrationscale:P,source:E,target:L,value:+S}),M.source.push(E),M.target.push(L)}}var I=b+_.length,O=o(r.color),z=o(r.customdata),D=[];for(e=0;eb-1,childrenNodes:[],pointNumber:e,label:R,color:O?r.color[e]:r.color,customdata:z?r.customdata[e]:r.customdata})}var F=!1;return function(t,e,r){for(var a=i.init2dArray(t,0),o=0;o1}))}(I,M.source,M.target)&&(F=!0),{circular:F,links:c,nodes:D,groups:_,groupLookup:w}}e.exports=function(t,e){var r=c(e);return a({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},{\"../../components/colorscale\":378,\"../../lib\":503,\"../../lib/gup\":500,\"strongly-connected-components\":306}],919:[function(t,e,r){\"use strict\";e.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:\"linear\",cn:{sankey:\"sankey\",sankeyLinks:\"sankey-links\",sankeyLink:\"sankey-link\",sankeyNodeSet:\"sankey-node-set\",sankeyNode:\"sankey-node\",nodeRect:\"node-rect\",nodeLabel:\"node-label\"}}},{}],920:[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\"),u=t(\"../../plots/array_container_defaults\");function f(t,e){function r(r,a){return n.coerce(t,e,i.link.colorscales,r,a)}r(\"label\"),r(\"cmin\"),r(\"cmax\"),r(\"colorscale\")}e.exports=function(t,e,r,h){function p(r,a){return n.coerce(t,e,i,r,a)}var d=n.extendDeep(h.hoverlabel,t.hoverlabel),g=t.node,m=c.newContainer(e,\"node\");function v(t,e){return n.coerce(g,m,i.node,t,e)}v(\"label\"),v(\"groups\"),v(\"x\"),v(\"y\"),v(\"pad\"),v(\"thickness\"),v(\"line.color\"),v(\"line.width\"),v(\"hoverinfo\",t.hoverinfo),l(g,m,v,d),v(\"hovertemplate\");var y=h.colorway;v(\"color\",m.label.map((function(t,e){return a.addOpacity(function(t){return y[t%y.length]}(e),.8)}))),v(\"customdata\");var x=t.link||{},b=c.newContainer(e,\"link\");function _(t,e){return n.coerce(x,b,i.link,t,e)}_(\"label\"),_(\"source\"),_(\"target\"),_(\"value\"),_(\"line.color\"),_(\"line.width\"),_(\"hoverinfo\",t.hoverinfo),l(x,b,_,d),_(\"hovertemplate\");var w,T=o(h.paper_bgcolor).getLuminance()<.333?\"rgba(255, 255, 255, 0.6)\":\"rgba(0, 0, 0, 0.2)\";_(\"color\",n.repeat(T,b.value.length)),_(\"customdata\"),u(x,b,{name:\"colorscales\",handleItemDefaults:f}),s(e,h,p),p(\"orientation\"),p(\"valueformat\"),p(\"valuesuffix\"),m.x.length&&m.y.length&&(w=\"freeform\"),p(\"arrangement\",w),n.coerceFont(p,\"textfont\",n.extendFlat({},h.font)),e._length=null}},{\"../../components/color\":366,\"../../components/fx/hoverlabel_defaults\":404,\"../../lib\":503,\"../../plot_api/plot_template\":543,\"../../plots/array_container_defaults\":549,\"../../plots/domain\":584,\"./attributes\":916,tinycolor2:312}],921:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),moduleType:\"trace\",name:\"sankey\",basePlotModule:t(\"./base_plot\"),selectPoints:t(\"./select.js\"),categories:[\"noOpacity\"],meta:{}}},{\"./attributes\":916,\"./base_plot\":917,\"./calc\":918,\"./defaults\":920,\"./plot\":922,\"./select.js\":924}],922:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.numberFormat,o=t(\"./render\"),s=t(\"../../components/fx\"),l=t(\"../../components/color\"),c=t(\"./constants\").cn,u=i._;function f(t){return\"\"!==t}function h(t,e){return t.filter((function(t){return t.key===e.traceId}))}function p(t,e){n.select(t).select(\"path\").style(\"fill-opacity\",e),n.select(t).select(\"rect\").style(\"fill-opacity\",e)}function d(t){n.select(t).select(\"text.name\").style(\"fill\",\"black\")}function g(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function m(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&&h(r,e).selectAll(\".\"+c.sankeyLink).filter(g(e)).call(x.bind(0,e,r,!1))}function y(t,e,r){e&&r&&h(r,e).selectAll(\".\"+c.sankeyLink).filter(g(e)).call(b.bind(0,e,r,!1))}function x(t,e,r,n){var i=n.datum().link.label;n.style(\"fill-opacity\",(function(t){if(!t.link.concentrationscale)return.4})),i&&h(e,t).selectAll(\".\"+c.sankeyLink).filter((function(t){return t.link.label===i})).style(\"fill-opacity\",(function(t){if(!t.link.concentrationscale)return.4})),r&&h(e,t).selectAll(\".\"+c.sankeyNode).filter(m(t)).call(v)}function b(t,e,r,n){var i=n.datum().link.label;n.style(\"fill-opacity\",(function(t){return t.tinyColorAlpha})),i&&h(e,t).selectAll(\".\"+c.sankeyLink).filter((function(t){return t.link.label===i})).style(\"fill-opacity\",(function(t){return t.tinyColorAlpha})),r&&h(e,t).selectAll(c.sankeyNode).filter(m(t)).call(y)}function _(t,e){var r=t.hoverlabel||{},n=i.nestedProperty(r,e).get();return!Array.isArray(n)&&n}e.exports=function(t,e){for(var r=t._fullLayout,i=r._paper,h=r._size,g=0;g\"),color:_(o,\"bgcolor\")||l.addOpacity(g.color,1),borderColor:_(o,\"bordercolor\"),fontFamily:_(o,\"font.family\"),fontSize:_(o,\"font.size\"),fontColor:_(o,\"font.color\"),nameLength:_(o,\"namelength\"),textAlign:_(o,\"align\"),idealAlign:n.event.x\"),color:_(o,\"bgcolor\")||i.tinyColorHue,borderColor:_(o,\"bordercolor\"),fontFamily:_(o,\"font.family\"),fontSize:_(o,\"font.size\"),fontColor:_(o,\"font.color\"),nameLength:_(o,\"namelength\"),textAlign:_(o,\"align\"),idealAlign:\"left\",hovertemplate:o.hovertemplate,hovertemplateLabels:y,eventData:[i.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});p(w,.85),d(w)}}},unhover:function(e,i,a){!1!==t._fullLayout.hovermode&&(n.select(e).call(y,i,a),\"skip\"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,t.emit(\"plotly_unhover\",{event:n.event,points:[i.node]})),s.loneUnhover(r._hoverlayer.node()))},select:function(e,r,i){var a=r.node;a.originalEvent=n.event,t._hoverdata=[a],n.select(e).call(y,r,i),s.click(t,{target:!0})}}})}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../lib\":503,\"./constants\":919,\"./render\":923,\"@plotly/d3\":58}],923:[function(t,e,r){\"use strict\";var n=t(\"d3-force\"),i=t(\"d3-interpolate\").interpolateNumber,a=t(\"@plotly/d3\"),o=t(\"@plotly/d3-sankey\"),s=t(\"@plotly/d3-sankey-circular\"),l=t(\"./constants\"),c=t(\"tinycolor2\"),u=t(\"../../components/color\"),f=t(\"../../components/drawing\"),h=t(\"../../lib\"),p=h.strTranslate,d=h.strRotate,g=t(\"../../lib/gup\"),m=g.keyFun,v=g.repeat,y=g.unwrap,x=t(\"../../lib/svg_text_utils\"),b=t(\"../../registry\"),_=t(\"../../constants/alignment\"),w=_.CAP_SHIFT,T=_.LINE_SPACING;function k(t,e,r){var n,i=y(e),a=i.trace,u=a.domain,f=\"h\"===a.orientation,p=a.node.pad,d=a.node.thickness,g=t.width*(u.x[1]-u.x[0]),m=t.height*(u.y[1]-u.y[0]),v=i._nodes,x=i._links,b=i.circular;(n=b?s.sankeyCircular().circularLinkGap(0):o.sankey()).iterations(l.sankeyIterations).size(f?[g,m]:[m,g]).nodeWidth(d).nodePadding(p).nodeId((function(t){return t.pointNumber})).nodes(v).links(x);var _,w,T,k=n();for(var A in n.nodePadding()=i||(r=i-e.y0)>1e-6&&(e.y0+=r,e.y1+=r),i=e.y1+p}))}(function(t){var e,r,n=t.map((function(t,e){return{x0:t.x0,index:e}})).sort((function(t,e){return t.x0-e.x0})),i=[],a=-1,o=-1/0;for(_=0;_o+d&&(a+=1,e=s.x0),o=s.x0,i[a]||(i[a]=[]),i[a].push(s),r=e-s.x0,s.x0+=r,s.x1+=r}return i}(v=k.nodes));n.update(k)}return{circular:b,key:r,trace:a,guid:h.randstr(),horizontal:f,width:g,height:m,nodePad:a.node.pad,nodeLineColor:a.node.line.color,nodeLineWidth:a.node.line.width,linkLineColor:a.link.line.color,linkLineWidth:a.link.line.width,valueFormat:a.valueformat,valueSuffix:a.valuesuffix,textFont:a.textfont,translateX:u.x[0]*t.width+t.margin.l,translateY:t.height-u.y[1]*t.height+t.margin.t,dragParallel:f?m:g,dragPerpendicular:f?g:m,arrangement:a.arrangement,sankey:n,graph:k,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function A(t,e,r){var n=c(e.color),i=e.source.label+\"|\"+e.target.label+\"__\"+r;return e.trace=t.trace,e.curveNumber=t.trace.index,{circular:t.circular,key:i,traceId:t.key,pointNumber:e.pointNumber,link:e,tinyColorHue:u.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:M,linkLineColor:t.linkLineColor,linkLineWidth:t.linkLineWidth,valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,parent:t,interactionState:t.interactionState,flow:e.flow}}function M(){return function(t){if(t.link.circular)return e=t.link,r=e.width/2,n=e.circularPathData,\"top\"===e.circularLinkType?\"M \"+n.targetX+\" \"+(n.targetY+r)+\" L\"+n.rightInnerExtent+\" \"+(n.targetY+r)+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightSmallArcRadius+r)+\" 0 0 1 \"+(n.rightFullExtent-r)+\" \"+(n.targetY-n.rightSmallArcRadius)+\"L\"+(n.rightFullExtent-r)+\" \"+n.verticalRightInnerExtent+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightLargeArcRadius+r)+\" 0 0 1 \"+n.rightInnerExtent+\" \"+(n.verticalFullExtent-r)+\"L\"+n.leftInnerExtent+\" \"+(n.verticalFullExtent-r)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftLargeArcRadius+r)+\" 0 0 1 \"+(n.leftFullExtent+r)+\" \"+n.verticalLeftInnerExtent+\"L\"+(n.leftFullExtent+r)+\" \"+(n.sourceY-n.leftSmallArcRadius)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftSmallArcRadius+r)+\" 0 0 1 \"+n.leftInnerExtent+\" \"+(n.sourceY+r)+\"L\"+n.sourceX+\" \"+(n.sourceY+r)+\"L\"+n.sourceX+\" \"+(n.sourceY-r)+\"L\"+n.leftInnerExtent+\" \"+(n.sourceY-r)+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftSmallArcRadius-r)+\" 0 0 0 \"+(n.leftFullExtent-r)+\" \"+(n.sourceY-n.leftSmallArcRadius)+\"L\"+(n.leftFullExtent-r)+\" \"+n.verticalLeftInnerExtent+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftLargeArcRadius-r)+\" 0 0 0 \"+n.leftInnerExtent+\" \"+(n.verticalFullExtent+r)+\"L\"+n.rightInnerExtent+\" \"+(n.verticalFullExtent+r)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightLargeArcRadius-r)+\" 0 0 0 \"+(n.rightFullExtent+r)+\" \"+n.verticalRightInnerExtent+\"L\"+(n.rightFullExtent+r)+\" \"+(n.targetY-n.rightSmallArcRadius)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightSmallArcRadius-r)+\" 0 0 0 \"+n.rightInnerExtent+\" \"+(n.targetY-r)+\"L\"+n.targetX+\" \"+(n.targetY-r)+\"Z\":\"M \"+n.targetX+\" \"+(n.targetY-r)+\" L\"+n.rightInnerExtent+\" \"+(n.targetY-r)+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightSmallArcRadius+r)+\" 0 0 0 \"+(n.rightFullExtent-r)+\" \"+(n.targetY+n.rightSmallArcRadius)+\"L\"+(n.rightFullExtent-r)+\" \"+n.verticalRightInnerExtent+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightLargeArcRadius+r)+\" 0 0 0 \"+n.rightInnerExtent+\" \"+(n.verticalFullExtent+r)+\"L\"+n.leftInnerExtent+\" \"+(n.verticalFullExtent+r)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftLargeArcRadius+r)+\" 0 0 0 \"+(n.leftFullExtent+r)+\" \"+n.verticalLeftInnerExtent+\"L\"+(n.leftFullExtent+r)+\" \"+(n.sourceY+n.leftSmallArcRadius)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftSmallArcRadius+r)+\" 0 0 0 \"+n.leftInnerExtent+\" \"+(n.sourceY-r)+\"L\"+n.sourceX+\" \"+(n.sourceY-r)+\"L\"+n.sourceX+\" \"+(n.sourceY+r)+\"L\"+n.leftInnerExtent+\" \"+(n.sourceY+r)+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftSmallArcRadius-r)+\" 0 0 1 \"+(n.leftFullExtent-r)+\" \"+(n.sourceY+n.leftSmallArcRadius)+\"L\"+(n.leftFullExtent-r)+\" \"+n.verticalLeftInnerExtent+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftLargeArcRadius-r)+\" 0 0 1 \"+n.leftInnerExtent+\" \"+(n.verticalFullExtent-r)+\"L\"+n.rightInnerExtent+\" \"+(n.verticalFullExtent-r)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightLargeArcRadius-r)+\" 0 0 1 \"+(n.rightFullExtent+r)+\" \"+n.verticalRightInnerExtent+\"L\"+(n.rightFullExtent+r)+\" \"+(n.targetY+n.rightSmallArcRadius)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightSmallArcRadius-r)+\" 0 0 1 \"+n.rightInnerExtent+\" \"+(n.targetY+r)+\"L\"+n.targetX+\" \"+(n.targetY+r)+\"Z\";var e,r,n,a=t.link.source.x1,o=t.link.target.x0,s=i(a,o),l=s(.5),c=s(.5),u=t.link.y0-t.link.width/2,f=t.link.y0+t.link.width/2,h=t.link.y1-t.link.width/2,p=t.link.y1+t.link.width/2;return\"M\"+a+\",\"+u+\"C\"+l+\",\"+u+\" \"+c+\",\"+h+\" \"+o+\",\"+h+\"L\"+o+\",\"+p+\"C\"+c+\",\"+p+\" \"+l+\",\"+f+\" \"+a+\",\"+f+\"Z\"}}function S(t,e){var r=c(e.color),n=l.nodePadAcross,i=t.nodePad/2;e.dx=e.x1-e.x0,e.dy=e.y1-e.y0;var a=e.dx,o=Math.max(.5,e.dy),s=\"node_\"+e.pointNumber;return e.group&&(s=h.randstr()),e.trace=t.trace,e.curveNumber=t.trace.index,{index:e.pointNumber,key:s,partOfGroup:e.partOfGroup||!1,group:e.group,traceId:t.key,trace:t.trace,node:e,nodePad:t.nodePad,nodeLineColor:t.nodeLineColor,nodeLineWidth:t.nodeLineWidth,textFont:t.textFont,size:t.horizontal?t.height:t.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:t.horizontal?e.dy/2+1:e.dx/2+1,left:1===e.originalLayer,sizeAcross:t.width,forceLayouts:t.forceLayouts,horizontal:t.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:u.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,graph:t.graph,arrangement:t.arrangement,uniqueNodeLabelPathId:[t.guid,t.key,s].join(\"_\"),interactionState:t.interactionState,figure:t}}function E(t){t.attr(\"transform\",(function(t){return p(t.node.x0.toFixed(3),t.node.y0.toFixed(3))}))}function L(t){t.call(E)}function C(t,e){t.call(L),e.attr(\"d\",M())}function P(t){t.attr(\"width\",(function(t){return t.node.x1-t.node.x0})).attr(\"height\",(function(t){return t.visibleHeight}))}function I(t){return t.link.width>1||t.linkLineWidth>0}function O(t){return p(t.translateX,t.translateY)+(t.horizontal?\"matrix(1 0 0 1 0 0)\":\"matrix(0 1 1 0 0 0)\")}function z(t,e,r){t.on(\".basic\",null).on(\"mouseover.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.hover(this,t,e),t.interactionState.hovered=[this,t])})).on(\"mousemove.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.follow(this,t),t.interactionState.hovered=[this,t])})).on(\"mouseout.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(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||t.partOfGroup||r.select(this,t,e)}))}function D(t,e,r,i){var o=a.behavior.drag().origin((function(t){return{x:t.node.x0+t.visibleWidth/2,y:t.node.y0+t.visibleHeight/2}})).on(\"dragstart\",(function(a){if(\"fixed\"!==a.arrangement&&(h.ensureSingle(i._fullLayout._infolayer,\"g\",\"dragcover\",(function(t){i._fullLayout._dragCover=t})),h.raiseToTop(this),a.interactionState.dragInProgress=a.node,F(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),\"snap\"===a.arrangement)){var o=a.traceId+\"|\"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):function(t,e,r,i){!function(t){for(var e=0;e0&&n.forceLayouts[e].alpha(0)}}(0,e,a,r)).stop()}(0,o,a),function(t,e,r,n,i){window.requestAnimationFrame((function a(){var o;for(o=0;o0)window.requestAnimationFrame(a);else{var s=r.node.originalX;r.node.x0=s-r.visibleWidth/2,r.node.x1=s+r.visibleWidth/2,R(r,i)}}))}(t,e,a,o,i)}})).on(\"drag\",(function(r){if(\"fixed\"!==r.arrangement){var n=a.event.x,i=a.event.y;\"snap\"===r.arrangement?(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2,r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2):(\"freeform\"===r.arrangement&&(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2),i=Math.max(0,Math.min(r.size-r.visibleHeight/2,i)),r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2),F(r.node),\"snap\"!==r.arrangement&&(r.sankey.update(r.graph),C(t.filter(B(r)),e))}})).on(\"dragend\",(function(t){if(\"fixed\"!==t.arrangement){t.interactionState.dragInProgress=!1;for(var e=0;el&&C[v].gap;)v--;for(x=C[v].s,g=C.length-1;g>v;g--)C[g].s=x;for(;lM[u]&&u=0;i--){var a=t[i];if(\"scatter\"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],933:[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(\"./period_defaults\"),u=t(\"./stack_defaults\"),f=t(\"./marker_defaults\"),h=t(\"./line_defaults\"),p=t(\"./line_shape_defaults\"),d=t(\"./text_defaults\"),g=t(\"./fillcolor_defaults\");e.exports=function(t,e,r,m){function v(r,i){return n.coerce(t,e,a,r,i)}var y=l(t,e,m,v);if(y||(e.visible=!1),e.visible){c(t,e,m,v),v(\"xhoverformat\"),v(\"yhoverformat\");var x=u(t,e,m,v),b=!x&&y=Math.min(e,r)&&d<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(h.c2p(t.x)-d);return a=Math.min(e,r)&&g<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(p.c2p(t.y)-g);return aW!=(N=z[I][1])>=W&&(R=z[I-1][0],F=z[I][0],N-B&&(D=R+(F-R)*(W-B)/(N-B),H=Math.min(H,D),q=Math.max(q,D)));H=Math.max(H,0),q=Math.min(q,h._length);var X=s.defaultLine;return s.opacity(f.fillcolor)?X=f.fillcolor:s.opacity((f.line||{}).color)&&(X=f.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:H,x1:q,y0:W,y1:W,color:X,hovertemplate:!1}),delete t.index,f.text&&!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../lib\":503,\"../../registry\":638,\"./get_trace_color\":936}],938:[function(t,e,r){\"use strict\";var n=t(\"./subtypes\");e.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"./cross_trace_defaults\"),calc:t(\"./calc\").calc,crossTraceCalc:t(\"./cross_trace_calc\"),arraysToCalcdata:t(\"./arrays_to_calcdata\"),plot:t(\"./plot\"),colorbar:t(\"./marker_colorbar\"),formatLabels:t(\"./format_labels\"),style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"./select\"),animatable:!0,moduleType:\"trace\",name:\"scatter\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"symbols\",\"errorBarsOK\",\"showLegend\",\"scatter-like\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"./arrays_to_calcdata\":925,\"./attributes\":926,\"./calc\":927,\"./cross_trace_calc\":931,\"./cross_trace_defaults\":932,\"./defaults\":933,\"./format_labels\":935,\"./hover\":937,\"./marker_colorbar\":944,\"./plot\":947,\"./select\":948,\"./style\":950,\"./subtypes\":951}],939:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray,i=t(\"../../components/colorscale/helpers\").hasColorscale,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\"}):s(\"line.color\",!n(c)&&c||r);s(\"line.width\"),(l||{}).noDash||s(\"line.dash\")}},{\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503}],940:[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,m,v,y,x,b,_,w,T,k,A,M,S=e.xaxis,E=e.yaxis,L=\"log\"===S.type,C=\"log\"===E.type,P=S._length,I=E._length,O=e.connectGaps,z=e.baseTolerance,D=e.shape,R=\"linear\"===D,F=e.fill&&\"none\"!==e.fill,B=[],N=f.minTolerance,j=t.length,U=new Array(j),V=0;function H(r){var n=t[r];if(!n)return!1;var a=e.linearized?S.l2p(n.x):S.c2p(n.x),l=e.linearized?E.l2p(n.y):E.c2p(n.y);if(a===i){if(L&&(a=S.c2p(n.x,!0)),a===i)return!1;C&&l===i&&(a*=Math.abs(S._m*I*(S._m>0?o:s)/(E._m*P*(E._m>0?o:s)))),a*=1e3}if(l===i){if(C&&(l=E.c2p(n.y,!0)),l===i)return!1;l*=1e3}return[a,l]}function q(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&&crt||t[1]it)return[u(t[0],et,rt),u(t[1],nt,it)]}function st(t,e){return t[0]===e[0]&&(t[0]===et||t[0]===rt)||(t[1]===e[1]&&(t[1]===nt||t[1]===it)||void 0)}function lt(t,e,r){return function(n,i){var a=ot(n),o=ot(i),s=[];if(a&&o&&st(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 ct(t){var e=t[0],r=t[1],n=e===U[V-1][0],i=r===U[V-1][1];if(!n||!i)if(V>1){var a=e===U[V-2][0],o=r===U[V-2][1];n&&(e===et||e===rt)&&a?o?V--:U[V-1]=t:i&&(r===nt||r===it)&&o?a?V--:U[V-1]=t:U[V++]=t}else U[V++]=t}function ut(t){U[V-1][0]!==t[0]&&U[V-1][1]!==t[1]&&ct([Z,J]),ct(t),K=null,Z=J=0}function ft(t){if(A=t[0]/P,M=t[1]/I,W=t[0]rt?rt:0,X=t[1]it?it:0,W||X){if(V)if(K){var e=$(K,t);e.length>1&&(ut(e[0]),U[V++]=e[1])}else Q=$(U[V-1],t)[0],U[V++]=Q;else U[V++]=[W||t[0],X||t[1]];var r=U[V-1];W&&X&&(r[0]!==W||r[1]!==X)?(K&&(Z!==W&&J!==X?ct(Z&&J?(n=K,a=(i=t)[0]-n[0],o=(i[1]-n[1])/a,(n[1]*i[0]-i[1]*n[0])/a>0?[o>0?et:rt,it]:[o>0?rt:et,nt]):[Z||W,J||X]):Z&&J&&ct([Z,J])),ct([W,X])):Z-W&&J-X&&ct([W||Z,X||J]),K=t,Z=W,J=X}else K&&ut($(K,t)[0]),U[V++]=t;var n,i,a,o}for(\"linear\"===D||\"spline\"===D?$=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var a=at[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&&Y(o,t)G(d,ht))break;a=d,(_=v[0]*m[0]+v[1]*m[1])>x?(x=_,h=d,g=!1):_=t.length||!d)break;ft(d),n=d}}else ft(h)}K&&ct([Z||K[0],J||K[1]]),B.push(U.slice(0,V))}return B}},{\"../../constants/numerical\":479,\"../../lib\":503,\"./constants\":930}],941:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){\"spline\"===r(\"line.shape\")&&r(\"line.smoothing\")}},{}],942:[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=0?l=p:(l=p=h,h++),l0?Math.max(r,a):0}}},{\"fast-isnumeric\":190}],944:[function(t,e,r){\"use strict\";e.exports={container:\"marker\",min:\"cmin\",max:\"cmax\"}},{}],945:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/helpers\").hasColorscale,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\":366,\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"./subtypes\":951}],946:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").dateTick0,i=t(\"../../constants/numerical\").ONEWEEK;function a(t,e){return n(e,t%i==0?1:0)}e.exports=function(t,e,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n(\"xperiod\");o&&(n(\"xperiod0\",a(o,e.xcalendar)),n(\"xperiodalignment\"))}if(i.y){var s=n(\"yperiod\");s&&(n(\"yperiod0\",a(s,e.ycalendar)),n(\"yperiodalignment\"))}}},{\"../../constants/numerical\":479,\"../../lib\":503}],947:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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 m;!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),m=0;o.forEach((function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(t){return v?t.transition():t}var x=r.xaxis,b=r.yaxis,_=f[0].trace,w=_.line,T=n.select(d),k=o(T,\"g\",\"errorbars\"),A=o(T,\"g\",\"lines\"),M=o(T,\"g\",\"points\"),S=o(T,\"g\",\"text\");if(i.getComponentMethod(\"errorbars\",\"plot\")(t,k,r,g),!0===_.visible){var E,L;y(T).style(\"opacity\",_.opacity);var C=_.fill.charAt(_.fill.length-1);\"x\"!==C&&\"y\"!==C&&(C=\"\"),f[0][r.isRangePlot?\"nodeRangePlot3\":\"node3\"]=T;var P,I,O=\"\",z=[],D=_._prevtrace;D&&(O=D._prevRevpath||\"\",L=D._nextFill,z=D._polygons);var R,F,B,N,j,U,V,H=\"\",q=\"\",G=[],Y=a.noop;if(E=_._ownFill,c.hasLines(_)||\"none\"!==_.fill){for(L&&L.datum(f),-1!==[\"hv\",\"vh\",\"hvh\",\"vhv\"].indexOf(w.shape)?(R=l.steps(w.shape),F=l.steps(w.shape.split(\"\").reverse().join(\"\"))):R=F=\"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\")},B=function(t){return F(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,fill:_.fill}),V=_._polygons=new Array(G.length),m=0;m1){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 W=A.selectAll(\".js-line\").data(G);y(W.exit()).style(\"opacity\",0).remove(),W.each(Y(!1)),W.enter().append(\"path\").classed(\"js-line\",!0).style(\"vector-effect\",\"non-scaling-stroke\").call(l.lineGroupStyle).each(Y(!0)),l.setClipUrl(W,r.layerClipId,t),G.length?(E?(E.datum(f),N&&U&&(C?(\"y\"===C?N[1]=U[1]=b.c2p(0,!0):\"x\"===C&&(N[0]=U[0]=x.c2p(0,!0)),y(E).attr(\"d\",\"M\"+U+\"L\"+N+\"L\"+H.substr(1)).call(l.singleFillStyle)):y(E).attr(\"d\",H+\"Z\").call(l.singleFillStyle))):L&&(\"tonext\"===_.fill.substr(0,6)&&H&&O?(\"tonext\"===_.fill?y(L).attr(\"d\",H+\"Z\"+O+\"Z\").call(l.singleFillStyle):y(L).attr(\"d\",H+\"L\"+O.substr(1)+\"Z\").call(l.singleFillStyle),_._polygons=_._polygons.concat(z)):(Z(L),_._polygons=null)),_._prevRevpath=q,_._prevPolygons=V):(E?Z(E):L&&Z(L),_._polygons=_._prevRevpath=_._prevPolygons=null),M.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 m=s,_=u.stackgroup,w=_&&\"infer zero\"===t._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?m=w?K:J:_&&!w&&(m=Q),f&&(d=m),h&&(g=m)}var T,k=(o=e.selectAll(\"path.point\").data(d,p)).enter().append(\"path\").classed(\"point\",!0);v&&k.call(l.pointStyle,u,t).call(l.translatePoints,x,b).style(\"opacity\",0).transition().style(\"opacity\",1),o.order(),f&&(T=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,T,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()})),v?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()}(M,S,f);var X=!1===_.cliponaxis?null:r.layerClipId;l.setClipUrl(M,X,t),l.setClipUrl(S,X,t)}function Z(t){y(t).attr(\"d\",\"M0,0Z\")}function J(t){return t.filter((function(t){return!t.gap&&t.vis}))}function K(t){return t.filter((function(t){return t.vis}))}function Q(t){return t.filter((function(t){return!t.gap}))}function $(t){return t.id}function tt(t){if(t.ids)return $}function et(){return!1}}e.exports=function(t,e,r,i,a,c){var u,h,d=!a,g=!!a&&a.duration>0,m=f(t,e,r);((u=i.selectAll(\"g.trace\").data(m,(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(e){var i=o(n.select(this),\"g\",\"fills\");l.setClipUrl(i,r.layerClipId,t);var a=e[0].trace,c=[];a._ownfill&&c.push(\"_ownFill\"),a._nexttrace&&c.push(\"_nextFill\");var u=i.selectAll(\"g\").data(c,s);u.enter().append(\"g\"),u.exit().each((function(t){a[t]=null})).remove(),u.order().each((function(t){a[t]=o(n.select(this),\"path\",\"js-fill\")}))}))}(t,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,m,this,a)}))}))):u.each((function(r,n){p(t,n,e,r,m,this,a)}));d&&u.exit().remove(),i.selectAll(\"path:not([d])\").remove()}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/polygon\":515,\"../../registry\":638,\"./line_points\":940,\"./link_traces\":942,\"./subtypes\":951,\"@plotly/d3\":58}],948:[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;r0){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-1?-1:t.indexOf(\"right\")>-1?1:0}function b(t){return null==t?0:t.indexOf(\"top\")>-1?-1:t.indexOf(\"bottom\")>-1?1:0}function _(t,e){return e(4*t)}function w(t){return p[t]}function T(t,e,r,n,i){var a=null;if(l.isArrayOrTypedArray(t)){a=[];for(var o=0;o=0){var g=function(t,e,r){var n,i=(r+1)%3,a=(r+2)%3,o=[],l=[];for(n=0;n=0&&f(\"surfacecolor\",h||p);for(var d=[\"x\",\"y\",\"z\"],g=0;g<3;++g){var m=\"projection.\"+d[g];f(m+\".show\")&&(f(m+\".opacity\"),f(m+\".scale\"))}var v=n.getComponentMethod(\"errorbars\",\"supplyDefaults\");v(t,e,h||p||r,{axis:\"z\"}),v(t,e,h||p||r,{axis:\"y\",inherit:\"z\"}),v(t,e,h||p||r,{axis:\"x\",inherit:\"z\"})}else e.visible=!1}},{\"../../lib\":503,\"../../registry\":638,\"../scatter/line_defaults\":939,\"../scatter/marker_defaults\":945,\"../scatter/subtypes\":951,\"../scatter/text_defaults\":952,\"./attributes\":954}],959:[function(t,e,r){\"use strict\";e.exports={plot:t(\"./convert\"),attributes:t(\"./attributes\"),markerSymbols:t(\"../../constants/gl3d_markers\"),supplyDefaults:t(\"./defaults\"),colorbar:[{container:\"marker\",min:\"cmin\",max:\"cmax\"},{container:\"line\",min:\"cmin\",max:\"cmax\"}],calc:t(\"./calc\"),moduleType:\"trace\",name:\"scatter3d\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../constants/gl3d_markers\":477,\"../../plots/gl3d\":598,\"./attributes\":954,\"./calc\":955,\"./convert\":957,\"./defaults\":958}],960:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../../plots/template_attributes\").texttemplateAttrs,s=t(\"../../components/colorscale/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=n.marker,u=n.line,f=c.line;e.exports={carpet:{valType:\"string\",editType:\"calc\"},a:{valType:\"data_array\",editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},mode:l({},n.mode,{dflt:\"markers\"}),text:l({},n.text,{}),texttemplate:o({editType:\"plot\"},{keys:[\"a\",\"b\",\"text\"]}),hovertext:l({},n.hovertext,{}),line:{color:u.color,width:u.width,dash:u.dash,shape:l({},u.shape,{values:[\"linear\",\"spline\"]}),smoothing:u.smoothing,editType:\"calc\"},connectgaps:n.connectgaps,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\"},s(\"marker.line\")),gradient:c.gradient,editType:\"calc\"},s(\"marker\")),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:l({},i.hoverinfo,{flags:[\"a\",\"b\",\"text\",\"name\"]}),hoveron:n.hoveron,hovertemplate:a()}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926}],961:[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\")}return o}function y(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,\"\"):t._hovertitle,m.push(r+\": \"+e.toFixed(3)+t.labelsuffix)}}},{\"../../lib\":503,\"../scatter/hover\":937}],966:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../scatter/select\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"scattercarpet\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"svg\",\"carpet\",\"symbols\",\"showLegend\",\"carpetDependent\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":960,\"./calc\":961,\"./defaults\":962,\"./event_data\":963,\"./format_labels\":964,\"./hover\":965,\"./plot\":967}],967:[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\")}(c,g,t,l[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}},{\"../../components/fx\":406,\"../../constants/numerical\":479,\"../../lib\":503,\"../scatter/get_trace_color\":936,\"./attributes\":968}],974:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),calcGeoJSON:t(\"./plot\").calcGeoJSON,plot:t(\"./plot\").plot,style:t(\"./style\"),styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"scattergeo\",basePlotModule:t(\"../../plots/geo\"),categories:[\"geo\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/geo\":589,\"../scatter/marker_colorbar\":944,\"../scatter/style\":950,\"./attributes\":968,\"./calc\":969,\"./defaults\":970,\"./event_data\":971,\"./format_labels\":972,\"./hover\":973,\"./plot\":975,\"./select\":976,\"./style\":977}],975:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../lib/topojson_utils\").getTopojsonFeatures,o=t(\"../../lib/geojson_utils\"),s=t(\"../../lib/geo_location_utils\"),l=t(\"../../plots/cartesian/autorange\").findExtremes,c=t(\"../../constants/numerical\").BADNUM,u=t(\"../scatter/calc\").calcMarkerSize,f=t(\"../scatter/subtypes\"),h=t(\"./style\");e.exports={calcGeoJSON:function(t,e){var r,n,i=t[0].trace,o=e[i.geo],f=o._subplot,h=i._length;if(Array.isArray(i.locations)){var p=i.locationmode,d=\"geojson-id\"===p?s.extractTraceFeature(t):a(i,f.topojson);for(r=0;r=m,w=2*b,T={},k=l.makeCalcdata(e,\"x\"),A=y.makeCalcdata(e,\"y\"),M=s(e,l,\"x\",k),S=s(e,y,\"y\",A),E=M.vals,L=S.vals;e._x=E,e._y=L,e.xperiodalignment&&(e._origX=k,e._xStarts=M.starts,e._xEnds=M.ends),e.yperiodalignment&&(e._origY=A,e._yStarts=S.starts,e._yEnds=S.ends);var C=new Array(w),P=new Array(b);for(r=0;r1&&i.extendFlat(s.line,p.linePositions(t,r,n));if(s.errorX||s.errorY){var l=p.errorBarPositions(t,r,n,a,o);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}s.text&&(i.extendFlat(s.text,{positions:n},p.textPosition(t,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},p.textPosition(t,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},p.textPosition(t,r,s.text,s.markerUnsel)));return s}(t,0,e,C,E,L),z=d(t,x);return f(o,e),_?O.marker&&(I=O.marker.sizeAvg||Math.max(O.marker.size,3)):I=c(e,b),u(t,e,l,y,E,L,I),O.errorX&&v(e,l,O.errorX),O.errorY&&v(e,y,O.errorY),O.fill&&!z.fill2d&&(z.fill2d=!0),O.marker&&!z.scatter2d&&(z.scatter2d=!0),O.line&&!z.line2d&&(z.line2d=!0),!O.errorX&&!O.errorY||z.error2d||(z.error2d=!0),O.text&&!z.glText&&(z.glText=!0),O.marker&&(O.marker.snap=b),z.lineOptions.push(O.line),z.errorXOptions.push(O.errorX),z.errorYOptions.push(O.errorY),z.fillOptions.push(O.fill),z.markerOptions.push(O.marker),z.markerSelectedOptions.push(O.markerSel),z.markerUnselectedOptions.push(O.markerUnsel),z.textOptions.push(O.text),z.textSelectedOptions.push(O.textSel),z.textUnselectedOptions.push(O.textUnsel),z.selectBatch.push([]),z.unselectBatch.push([]),T._scene=z,T.index=z.count,T.x=E,T.y=L,T.positions=C,z.count++,[{x:!1,y:!1,t:T,trace:e}]}},{\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/align_period\":551,\"../../plots/cartesian/autorange\":553,\"../../plots/cartesian/axis_ids\":558,\"../scatter/calc\":927,\"../scatter/colorscale_calc\":929,\"./constants\":980,\"./convert\":981,\"./scene_update\":989,\"@plotly/point-cluster\":59}],980:[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]}}},{}],981:[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(\"./helpers\"),d=t(\"./constants\"),g=t(\"../../constants/interactions\").DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=t(\"../../components/fx/helpers\").appendArrayPointValue;function y(t,e){var r,i=t._fullLayout,a=e._length,o=e.textfont,l=e.textposition,c=Array.isArray(l)?l:[l],u=o.color,f=o.size,h=o.family,p={},d=t._context.plotGlPixelRatio,g=e.texttemplate;if(g){p.text=[];var m=i._d3locale,y=Array.isArray(g),x=y?Math.min(g.length,a):a,b=y?function(t){return g[t]}:function(){return g};for(r=0;rd.TOO_MANY_POINTS||f.hasMarkers(e)?\"rect\":\"round\";if(c&&e.connectgaps){var h=n[0],p=n[1];for(i=0;i1?l[i]:l[0]:l,d=Array.isArray(c)?c.length>1?c[i]:c[0]:c,g=m[p],v=m[d],y=u?u/.8+1:0,x=-v*y-.5*v;o.offset[i]=[g*y/h,x/h]}}return o}}},{\"../../components/drawing\":388,\"../../components/fx/helpers\":402,\"../../constants/interactions\":478,\"../../lib\":503,\"../../lib/gl_format_color\":499,\"../../plots/cartesian/axis_ids\":558,\"../../registry\":638,\"../scatter/make_bubble_size_func\":943,\"../scatter/subtypes\":951,\"./constants\":980,\"./helpers\":985,\"color-normalize\":89,\"fast-isnumeric\":190,\"svg-path-sdf\":310}],982:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"./helpers\"),o=t(\"./attributes\"),s=t(\"../scatter/constants\"),l=t(\"../scatter/subtypes\"),c=t(\"../scatter/xy_defaults\"),u=t(\"../scatter/period_defaults\"),f=t(\"../scatter/marker_defaults\"),h=t(\"../scatter/line_defaults\"),p=t(\"../scatter/fillcolor_defaults\"),d=t(\"../scatter/text_defaults\");e.exports=function(t,e,r,g){function m(r,i){return n.coerce(t,e,o,r,i)}var v=!!t.marker&&a.isOpenSymbol(t.marker.symbol),y=l.isBubble(t),x=c(t,e,g,m);if(x){u(t,e,g,m),m(\"xhoverformat\"),m(\"yhoverformat\");var b=x100},r.isDotSymbol=function(t){return\"string\"==typeof t?n.DOT_RE.test(t):t>200}},{\"./constants\":980}],986:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../scatter/get_trace_color\");function o(t,e,r,o){var s=t.xa,l=t.ya,c=t.distance,u=t.dxy,f=t.index,h={pointNumber:f,x:e[f],y:r[f]};h.tx=Array.isArray(o.text)?o.text[f]:o.text,h.htx=Array.isArray(o.hovertext)?o.hovertext[f]:o.hovertext,h.data=Array.isArray(o.customdata)?o.customdata[f]:o.customdata,h.tp=Array.isArray(o.textposition)?o.textposition[f]:o.textposition;var p=o.textfont;p&&(h.ts=i.isArrayOrTypedArray(p.size)?p.size[f]:p.size,h.tc=Array.isArray(p.color)?p.color[f]:p.color,h.tf=Array.isArray(p.family)?p.family[f]:p.family);var d=o.marker;d&&(h.ms=i.isArrayOrTypedArray(d.size)?d.size[f]:d.size,h.mo=i.isArrayOrTypedArray(d.opacity)?d.opacity[f]:d.opacity,h.mx=i.isArrayOrTypedArray(d.symbol)?d.symbol[f]:d.symbol,h.mc=i.isArrayOrTypedArray(d.color)?d.color[f]:d.color);var g=d&&d.line;g&&(h.mlc=Array.isArray(g.color)?g.color[f]:g.color,h.mlw=i.isArrayOrTypedArray(g.width)?g.width[f]:g.width);var m=d&&d.gradient;m&&\"none\"!==m.type&&(h.mgt=Array.isArray(m.type)?m.type[f]:m.type,h.mgc=Array.isArray(m.color)?m.color[f]:m.color);var v=s.c2p(h.x,!0),y=l.c2p(h.y,!0),x=h.mrc||1,b=o.hoverlabel;b&&(h.hbg=Array.isArray(b.bgcolor)?b.bgcolor[f]:b.bgcolor,h.hbc=Array.isArray(b.bordercolor)?b.bordercolor[f]:b.bordercolor,h.hts=i.isArrayOrTypedArray(b.font.size)?b.font.size[f]:b.font.size,h.htc=Array.isArray(b.font.color)?b.font.color[f]:b.font.color,h.htf=Array.isArray(b.font.family)?b.font.family[f]:b.font.family,h.hnl=i.isArrayOrTypedArray(b.namelength)?b.namelength[f]:b.namelength);var _=o.hoverinfo;_&&(h.hi=Array.isArray(_)?_[f]:_);var w=o.hovertemplate;w&&(h.ht=Array.isArray(w)?w[f]:w);var T={};T[t.index]=h;var k=o._origX,A=o._origY,M=i.extendFlat({},t,{color:a(o,h),x0:v-x,x1:v+x,xLabelVal:k?k[f]:h.x,y0:y-x,y1:y+x,yLabelVal:A?A[f]:h.y,cd:T,distance:c,spikeDistance:u,hovertemplate:h.ht});return h.htx?M.text=h.htx:h.tx?M.text=h.tx:o.text&&(M.text=o.text),i.fillText(h,o,M),n.getComponentMethod(\"errorbars\",\"hoverInfo\")(h,o,M),M}e.exports={hoverPoints:function(t,e,r,n){var i,a,s,l,c,u,f,h,p,d,g=t.cd,m=g[0].t,v=g[0].trace,y=t.xa,x=t.ya,b=m.x,_=m.y,w=y.c2p(e),T=x.c2p(r),k=t.distance;if(m.tree){var A=y.p2c(w-k),M=y.p2c(w+k),S=x.p2c(T-k),E=x.p2c(T+k);i=\"x\"===n?m.tree.range(Math.min(A,M),Math.min(x._rl[0],x._rl[1]),Math.max(A,M),Math.max(x._rl[0],x._rl[1])):m.tree.range(Math.min(A,M),Math.min(S,E),Math.max(A,M),Math.max(S,E))}else i=m.ids;var L=k;if(\"x\"===n){var C=!!v.xperiodalignment,P=!!v.yperiodalignment;for(u=0;u=Math.min(I,O)&&w<=Math.max(I,O)?0:1/0}if(f=Math.min(z,D)&&T<=Math.max(z,D)?0:1/0}d=Math.sqrt(f*f+h*h),s=i[u]}}}else for(u=i.length-1;u>-1;u--)l=b[a=i[u]],c=_[a],f=y.c2p(l)-w,h=x.c2p(c)-T,(p=Math.sqrt(f*f+h*h))v.glText.length){var w=b-v.glText.length;for(d=0;dr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t})),v.line2d.update(v.lineOptions)),v.error2d){var k=(v.errorXOptions||[]).concat(v.errorYOptions||[]);v.error2d.update(k)}v.scatter2d&&v.scatter2d.update(v.markerOptions),v.fillOrder=s.repeat(null,b),v.fill2d&&(v.fillOptions=v.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=v.lineOptions[e],u=[];s._ownfill&&u.push(e),s._nexttrace&&u.push(e+1),u.length&&(v.fillOrder[e]=u);var f,h,p=[],d=c&&c.positions||l.positions;if(\"tozeroy\"===s.fill){for(f=0;ff&&isNaN(d[h+1]);)h-=2;0!==d[f+1]&&(p=[d[f],0]),p=p.concat(d.slice(f,h+2)),0!==d[h+1]&&(p=p.concat([d[h],0]))}else if(\"tozerox\"===s.fill){for(f=0;ff&&isNaN(d[h]);)h-=2;0!==d[f]&&(p=[0,d[f+1]]),p=p.concat(d.slice(f,h+2)),0!==d[h]&&(p=p.concat([0,d[h+1]]))}else if(\"toself\"===s.fill||\"tonext\"===s.fill){for(p=[],i=0,t.splitNull=!0,a=0;a-1;for(d=0;d\")}function u(t){return t+\"\\xb0\"}}e.exports={hoverPoints:function(t,e,r){var o=t.cd,c=o[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(o,(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=o[t.index],m=g.lonlat,v=[i.modHalf(m[0],360)+p,m[1]],y=u.c2p(v),x=f.c2p(v),b=g.mrc||1;t.x0=y-b,t.x1=y+b,t.y0=x-b,t.y1=x+b;var _={};_[c.subplot]={_subplot:h};var w=c._module.formatLabels(g,c,_);return t.lonLabel=w.lonLabel,t.latLabel=w.latLabel,t.color=a(c,g),t.extraText=l(c,g,o[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}},getExtraText:l}},{\"../../components/fx\":406,\"../../constants/numerical\":479,\"../../lib\":503,\"../scatter/get_trace_color\":936}],997:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"../scattergeo/calc\"),plot:t(\"./plot\"),hoverPoints:t(\"./hover\").hoverPoints,eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),styleOnSelect:function(t,e){e&&e[0].trace._glTrace.update(e)},moduleType:\"trace\",name:\"scattermapbox\",basePlotModule:t(\"../../plots/mapbox\"),categories:[\"mapbox\",\"gl\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/mapbox\":613,\"../scatter/marker_colorbar\":944,\"../scattergeo/calc\":969,\"./attributes\":991,\"./defaults\":993,\"./event_data\":994,\"./format_labels\":995,\"./hover\":996,\"./plot\":998,\"./select\":999}],998:[function(t,e,r){\"use strict\";var n=t(\"./convert\"),i=t(\"../../plots/mapbox/constants\").traceLayerPrefix,a=[\"fill\",\"line\",\"circle\",\"symbol\"];function o(t,e){this.type=\"scattermapbox\",this.subplot=t,this.uid=e,this.sourceIds={fill:\"source-\"+e+\"-fill\",line:\"source-\"+e+\"-line\",circle:\"source-\"+e+\"-circle\",symbol:\"source-\"+e+\"-symbol\"},this.layerIds={fill:i+e+\"-fill\",line:i+e+\"-line\",circle:i+e+\"-circle\",symbol:i+e+\"-symbol\"},this.below=null}var s=o.prototype;s.addSource=function(t,e){this.subplot.map.addSource(this.sourceIds[t],{type:\"geojson\",data:e.geojson})},s.setSourceData=function(t,e){this.subplot.map.getSource(this.sourceIds[t]).setData(e.geojson)},s.addLayer=function(t,e,r){this.subplot.addLayer({type:t,id:this.layerIds[t],source:this.sourceIds[t],layout:e.layout,paint:e.paint},r)},s.update=function(t){var e,r,i,o=this.subplot,s=o.map,l=n(o.gd,t),c=o.belowLookup[\"trace-\"+this.uid];if(c!==this.below){for(e=a.length-1;e>=0;e--)r=a[e],s.removeLayer(this.layerIds[r]);for(e=0;e=0;e--){var r=a[e];t.removeLayer(this.layerIds[r]),t.removeSource(this.sourceIds[r])}},e.exports=function(t,e){for(var r=e[0].trace,i=new o(t,r.uid),s=n(t.gd,e),l=i.below=t.belowLookup[\"trace-\"+r.uid],c=0;c\")}}e.exports={hoverPoints: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)return o;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,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}},{\"../scatter/hover\":937}],1005:[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\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"../scatter/select\"),meta:{}}},{\"../../plots/polar\":622,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":1e3,\"./calc\":1001,\"./defaults\":1002,\"./format_labels\":1003,\"./hover\":1004,\"./plot\":1006}],1006:[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=c&&(y.marker.cluster=d.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=_),y.line&&_.length>1&&l.extendFlat(y.line,s.linePositions(t,p,_)),y.text&&(l.extendFlat(y.text,{positions:_},s.textPosition(t,p,y.text,y.marker)),l.extendFlat(y.textSel,{positions:_},s.textPosition(t,p,y.text,y.markerSel)),l.extendFlat(y.textUnsel,{positions:_},s.textPosition(t,p,y.text,y.markerUnsel))),y.fill&&!h.fill2d&&(h.fill2d=!0),y.marker&&!h.scatter2d&&(h.scatter2d=!0),y.line&&!h.line2d&&(h.line2d=!0),y.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(y.line),h.fillOptions.push(y.fill),h.markerOptions.push(y.marker),h.markerSelectedOptions.push(y.markerSel),h.markerUnselectedOptions.push(y.markerUnsel),h.textOptions.push(y.text),h.textSelectedOptions.push(y.textSel),h.textUnselectedOptions.push(y.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),d.x=w,d.y=T,d.rawx=w,d.rawy=T,d.r=m,d.theta=v,d.positions=_,d._scene=h,d.index=h.count,h.count++}})),a(t,e,r)}}},{\"../../lib\":503,\"../scattergl/constants\":980,\"../scattergl/convert\":981,\"../scattergl/plot\":988,\"../scattergl/scene_update\":989,\"@plotly/point-cluster\":59,\"fast-isnumeric\":190}],1014:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../plots/template_attributes\").texttemplateAttrs,a=t(\"../../lib/extend\").extendFlat,o=t(\"../scatter/attributes\"),s=t(\"../../plots/attributes\"),l=o.line;e.exports={mode:o.mode,real:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},imag:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},text:o.text,texttemplate:i({editType:\"plot\"},{keys:[\"real\",\"imag\",\"text\"]}),hovertext:o.hovertext,line:{color:l.color,width:l.width,dash:l.dash,shape:a({},l.shape,{values:[\"linear\",\"spline\"]}),smoothing:l.smoothing,editType:\"calc\"},connectgaps:o.connectgaps,marker:o.marker,cliponaxis:a({},o.cliponaxis,{dflt:!1}),textposition:o.textposition,textfont:o.textfont,fill:a({},o.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:o.fillcolor,hoverinfo:a({},s.hoverinfo,{flags:[\"real\",\"imag\",\"text\",\"name\"]}),hoveron:o.hoveron,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926}],1015:[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(\"../scatter/calc\").calcMarkerSize;e.exports=function(t,e){for(var r=t._fullLayout,c=e.subplot,u=r[c].realaxis,f=r[c].imaginaryaxis,h=u.makeCalcdata(e,\"real\"),p=f.makeCalcdata(e,\"imag\"),d=e._length,g=new Array(d),m=0;m\")}}e.exports={hoverPoints: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)return o;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,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}},{\"../scatter/hover\":937}],1019:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"scattersmith\",basePlotModule:t(\"../../plots/smith\"),categories:[\"smith\",\"symbols\",\"showLegend\",\"scatter-like\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"../scatter/select\"),meta:{}}},{\"../../plots/smith\":629,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":1014,\"./calc\":1015,\"./defaults\":1016,\"./format_labels\":1017,\"./hover\":1018,\"./plot\":1020}],1020:[function(t,e,r){\"use strict\";var n=t(\"../scatter/plot\"),i=t(\"../../constants/numerical\").BADNUM,a=t(\"../../plots/smith/helpers\").smith;e.exports=function(t,e,r){for(var o=e.layers.frontplot.select(\"g.scatterlayer\"),s={xaxis:e.xaxis,yaxis:e.yaxis,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},l=0;l\"),o.hovertemplate=h.hovertemplate,a}function x(t,e){v.push(t._hovertitle+\": \"+e)}}},{\"../scatter/hover\":937}],1027:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../scatter/select\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"scatterternary\",basePlotModule:t(\"../../plots/ternary\"),categories:[\"ternary\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/ternary\":634,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":1021,\"./calc\":1022,\"./defaults\":1023,\"./event_data\":1024,\"./format_labels\":1025,\"./hover\":1026,\"./plot\":1028}],1028:[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\":947}],1029:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../scattergl/attributes\"),l=t(\"../../plots/cartesian/constants\").idRegex,c=t(\"../../plot_api/plot_template\").templatedArray,u=t(\"../../lib/extend\").extendFlat,f=n.marker,h=f.line,p=u(i(\"marker.line\",{editTypeOverride:\"calc\"}),{width:u({},h.width,{editType:\"calc\"}),editType:\"calc\"}),d=u(i(\"marker\"),{symbol:f.symbol,size:u({},f.size,{editType:\"markerSize\"}),sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:f.opacity,colorbar:f.colorbar,line:p,editType:\"calc\"});function g(t){return{valType:\"info_array\",freeLength:!0,editType:\"calc\",items:{valType:\"subplotid\",regex:l[t],editType:\"plot\"}}}d.color.editType=d.cmin.editType=d.cmax.editType=\"style\",e.exports={dimensions:c(\"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\"},matches:{valType:\"boolean\",dflt:!1,editType:\"calc\"},editType:\"calc+clearAxisTypes\"},editType:\"calc+clearAxisTypes\"}),text:u({},s.text,{}),hovertext:u({},s.hovertext,{}),hovertemplate:o(),xhoverformat:a(\"x\"),yhoverformat:a(\"y\"),marker:d,xaxes:g(\"x\"),yaxes:g(\"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:s.selected.marker,editType:\"calc\"},unselected:{marker:s.unselected.marker,editType:\"calc\"},opacity:s.opacity}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/plot_template\":543,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/cartesian/constants\":561,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926,\"../scattergl/attributes\":978}],1030:[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;function u(t,e,r){for(var n=r.matrixOptions.data.length,i=e._visibleDims,a=r.viewOpts.ranges=new Array(n),o=0;oh?b.sizeAvg||Math.max(b.size,3):a(e,x),p=0;pa&&l||i-1,P=!0;if(o(x)||!!p.selectedpoints||C){var I=p._length;if(p.selectedpoints){g.selectBatch=p.selectedpoints;var O=p.selectedpoints,z={};for(l=0;l1&&(u=g[y-1],h=m[y-1],d=v[y-1]),e=0;eu?\"-\":\"+\")+\"x\")).replace(\"y\",(f>h?\"-\":\"+\")+\"y\")).replace(\"z\",(p>d?\"-\":\"+\")+\"z\");var L=function(){y=0,M=[],S=[],E=[]};(!y||y2?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,u=e._len,f={};function d(t,e){var n=r[e],o=i[c[e]];return a.simpleMap(t,(function(t){return n.d2l(t)*o}))}if(f.vectors=l(d(e._u,\"xaxis\"),d(e._v,\"yaxis\"),d(e._w,\"zaxis\"),u),!u)return{positions:[],cells:[]};var g=d(e._Xs,\"xaxis\"),m=d(e._Ys,\"yaxis\"),v=d(e._Zs,\"zaxis\");if(f.meshgrid=[g,m,v],f.gridFill=e._gridFill,e._slen)f.startingPositions=l(d(e._startsX,\"xaxis\"),d(e._startsY,\"yaxis\"),d(e._startsZ,\"zaxis\"));else{for(var y=m[0],x=h(g),b=h(v),_=new Array(x.length*b.length),w=0,T=0;T=0};v?(r=Math.min(m.length,x.length),l=function(t){return A(m[t])&&M(t)},f=function(t){return String(m[t])}):(r=Math.min(y.length,x.length),l=function(t){return A(y[t])&&M(t)},f=function(t){return String(y[t])}),_&&(r=Math.min(r,b.length));for(var S=0;S1){for(var P=a.randstr(),I=0;I\"),name:A||z(\"name\")?y.name:void 0,color:k(\"hoverlabel.bgcolor\")||x.color,borderColor:k(\"hoverlabel.bordercolor\"),fontFamily:k(\"hoverlabel.font.family\"),fontSize:k(\"hoverlabel.font.size\"),fontColor:k(\"hoverlabel.font.color\"),nameLength:k(\"hoverlabel.namelength\"),textAlign:k(\"hoverlabel.align\"),hovertemplate:A,hovertemplateLabels:P,eventData:l};m&&(F.x0=E-i.rInscribed*i.rpx1,F.x1=E+i.rInscribed*i.rpx1,F.idealAlign=i.pxmid[0]<0?\"left\":\"right\"),v&&(F.x=E,F.idealAlign=E<0?\"left\":\"right\");var B=[];o.loneHover(F,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:r,inOut_bbox:B}),l[0].bbox=B[0],d._hasHoverLabel=!0}if(v){var N=t.select(\"path.surface\");h.styleOne(N,i,y,{hovered:!0})}d._hasHoverEvent=!0,r.emit(\"plotly_hover\",{points:l||[f(i,y,h.eventDataKeys)],event:n.event})}})),t.on(\"mouseout\",(function(e){var i=r._fullLayout,a=r._fullData[d.index],s=n.select(this).datum();if(d._hasHoverEvent&&(e.originalEvent=n.event,r.emit(\"plotly_unhover\",{points:[f(s,a,h.eventDataKeys)],event:n.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(o.loneUnhover(i._hoverlayer.node()),d._hasHoverLabel=!1),v){var l=t.select(\"path.surface\");h.styleOne(l,s,a,{hovered:!1})}})),t.on(\"click\",(function(t){var e=r._fullLayout,a=r._fullData[d.index],s=m&&(c.isHierarchyRoot(t)||c.isLeaf(t)),u=c.getPtId(t),p=c.isEntry(t)?c.findEntryWithChild(g,u):c.findEntryWithLevel(g,u),v=c.getPtId(p),y={points:[f(t,a,h.eventDataKeys)],event:n.event};s||(y.nextLevel=v);var x=l.triggerHandler(r,\"plotly_\"+d.type+\"click\",y);if(!1!==x&&e.hovermode&&(r._hoverdata=[f(t,a,h.eventDataKeys)],o.click(r,n.event)),!s&&!1!==x&&!r._dragging&&!r._transitioning){i.call(\"_storeDirectGUIEdit\",a,e._tracePreGUI[a.uid],{level:a.level});var b={data:[{level:v}],traces:[d.index]},_={frame:{redraw:!1,duration:h.transitionTime},transition:{duration:h.transitionTime,easing:h.transitionEasing},mode:\"immediate\",fromcurrent:!0};o.loneUnhover(e._hoverlayer.node()),i.call(\"animate\",r,b,_)}}))}},{\"../../components/fx\":406,\"../../components/fx/helpers\":402,\"../../lib\":503,\"../../lib/events\":492,\"../../registry\":638,\"../pie/helpers\":905,\"./helpers\":1051,\"@plotly/d3\":58}],1051:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\"),a=t(\"../../lib/setcursor\"),o=t(\"../pie/helpers\");function s(t){return t.data.data.pid}r.findEntryWithLevel=function(t,e){var n;return e&&t.eachAfter((function(t){if(r.getPtId(t)===e)return n=t.copy()})),n||t},r.findEntryWithChild=function(t,e){var n;return t.eachAfter((function(t){for(var i=t.children||[],a=0;a0)},r.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},r.isHeader=function(t,e){return!(r.isLeaf(t)||t.depth===e._maxDepth-1)},r.getParent=function(t,e){return r.findEntryWithLevel(t,s(e))},r.listPath=function(t,e){var n=t.parent;if(!n)return[];var i=e?[n.data[e]]:[n];return r.listPath(n,e).concat(i)},r.getPath=function(t){return r.listPath(t,\"label\").join(\"/\")+\"/\"},r.formatValue=o.formatPieValue,r.formatPercent=function(t,e){var r=n.formatPercent(t,0);return\"0%\"===r&&(r=o.formatPiePercent(t,e)),r}},{\"../../components/color\":366,\"../../lib\":503,\"../../lib/setcursor\":524,\"../pie/helpers\":905}],1052:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"sunburst\",basePlotModule:t(\"./base_plot\"),categories:[],animatable:!0,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\").plot,style:t(\"./style\").style,colorbar:t(\"../scatter/marker_colorbar\"),meta:{}}},{\"../scatter/marker_colorbar\":944,\"./attributes\":1045,\"./base_plot\":1046,\"./calc\":1047,\"./defaults\":1049,\"./layout_attributes\":1053,\"./layout_defaults\":1054,\"./plot\":1055,\"./style\":1056}],1053:[function(t,e,r){\"use strict\";e.exports={sunburstcolorway:{valType:\"colorlist\",editType:\"calc\"},extendsunburstcolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],1054:[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(\"sunburstcolorway\",e.colorway),r(\"extendsunburstcolors\")}},{\"../../lib\":503,\"./layout_attributes\":1053}],1055:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-hierarchy\"),a=t(\"d3-interpolate\").interpolate,o=t(\"../../components/drawing\"),s=t(\"../../lib\"),l=t(\"../../lib/svg_text_utils\"),c=t(\"../bar/uniform_text\"),u=c.recordMinTextSize,f=c.clearMinTextSize,h=t(\"../pie/plot\"),p=t(\"../pie/helpers\").getRotationAngle,d=h.computeTransform,g=h.transformInsideText,m=t(\"./style\").styleOne,v=t(\"../bar/style\").resizeText,y=t(\"./fx\"),x=t(\"./constants\"),b=t(\"./helpers\");function _(t,e,c,f){var h=t._fullLayout,v=!h.uniformtext.mode&&b.hasTransition(f),_=n.select(c).selectAll(\"g.slice\"),T=e[0],k=T.trace,A=T.hierarchy,M=b.findEntryWithLevel(A,k.level),S=b.getMaxDepth(k),E=h._size,L=k.domain,C=E.w*(L.x[1]-L.x[0]),P=E.h*(L.y[1]-L.y[0]),I=.5*Math.min(C,P),O=T.cx=E.l+E.w*(L.x[1]+L.x[0])/2,z=T.cy=E.t+E.h*(1-L.y[0])-P/2;if(!M)return _.remove();var D=null,R={};v&&_.each((function(t){R[b.getPtId(t)]={rpx0:t.rpx0,rpx1:t.rpx1,x0:t.x0,x1:t.x1,transform:t.transform},!D&&b.isEntry(t)&&(D=t)}));var F=function(t){return i.partition().size([2*Math.PI,t.height+1])(t)}(M).descendants(),B=M.height+1,N=0,j=S;T.hasMultipleRoots&&b.isHierarchyRoot(M)&&(F=F.slice(1),B-=1,N=1,j+=1),F=F.filter((function(t){return t.y1<=j}));var U=p(k.rotation);U&&F.forEach((function(t){t.x0+=U,t.x1+=U}));var V=Math.min(B,S),H=function(t){return(t-N)/V*I},q=function(t,e){return[t*Math.cos(e),-t*Math.sin(e)]},G=function(t){return s.pathAnnulus(t.rpx0,t.rpx1,t.x0,t.x1,O,z)},Y=function(t){return O+w(t)[0]*(t.transform.rCenter||0)+(t.transform.x||0)},W=function(t){return z+w(t)[1]*(t.transform.rCenter||0)+(t.transform.y||0)};(_=_.data(F,b.getPtId)).enter().append(\"g\").classed(\"slice\",!0),v?_.exit().transition().each((function(){var t=n.select(this);t.select(\"path.surface\").transition().attrTween(\"d\",(function(t){var e=function(t){var e,r=b.getPtId(t),n=R[r],i=R[b.getPtId(M)];if(i){var o=(t.x1>i.x1?2*Math.PI:0)+U;e=t.rpx1X?2*Math.PI:0)+U;e={x0:i,x1:i}}else e={rpx0:I,rpx1:I},s.extendFlat(e,K(t));else e={rpx0:0,rpx1:0};else e={x0:U,x1:U};return a(e,n)}(t);return function(t){return G(e(t))}})):f.attr(\"d\",G),c.call(y,M,t,e,{eventDataKeys:x.eventDataKeys,transitionTime:x.CLICK_TRANSITION_TIME,transitionEasing:x.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,t,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:t._transitioning}),f.call(m,i,k);var p=s.ensureSingle(c,\"g\",\"slicetext\"),_=s.ensureSingle(p,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),w=s.ensureUniformFontSize(t,b.determineTextFont(k,i,h.font));_.text(r.formatSliceLabel(i,M,k,e,h)).classed(\"slicetext\",!0).attr(\"text-anchor\",\"middle\").call(o.font,w).call(l.convertToTspans,t);var A=o.bBox(_.node());i.transform=g(A,i,T),i.transform.targetX=Y(i),i.transform.targetY=W(i);var S=function(t,e){var r=t.transform;return d(r,e),r.fontSize=w.size,u(k.type,r,h),s.getTextTransform(r)};v?_.transition().attrTween(\"transform\",(function(t){var e=function(t){var e,r=R[b.getPtId(t)],n=t.transform;if(r)e=r;else if(e={rpx1:t.rpx1,transform:{textPosAngle:n.textPosAngle,scale:0,rotate:n.rotate,rCenter:n.rCenter,x:n.x,y:n.y}},D)if(t.parent)if(X){var i=t.x1>X?2*Math.PI:0;e.x0=e.x1=i}else s.extendFlat(e,K(t));else e.x0=e.x1=U;else e.x0=e.x1=U;var o=a(e.transform.textPosAngle,t.transform.textPosAngle),l=a(e.rpx1,t.rpx1),c=a(e.x0,t.x0),f=a(e.x1,t.x1),p=a(e.transform.scale,n.scale),d=a(e.transform.rotate,n.rotate),g=0===n.rCenter?3:0===e.transform.rCenter?1/3:1,m=a(e.transform.rCenter,n.rCenter);return function(t){var e=l(t),r=c(t),i=f(t),a=function(t){return m(Math.pow(t,g))}(t),s={pxmid:q(e,(r+i)/2),rpx1:e,transform:{textPosAngle:o(t),rCenter:a,x:n.x,y:n.y}};return u(k.type,n,h),{transform:{targetX:Y(s),targetY:W(s),scale:p(t),rotate:d(t),rCenter:a}}}}(t);return function(t){return S(e(t),A)}})):_.attr(\"transform\",S(i,A))}))}function w(t){return e=t.rpx1,r=t.transform.textPosAngle,[e*Math.sin(r),-e*Math.cos(r)];var e,r}r.plot=function(t,e,r,i){var a,o,s=t._fullLayout,l=s._sunburstlayer,c=!r,u=!s.uniformtext.mode&&b.hasTransition(r);(f(\"sunburst\",s),(a=l.selectAll(\"g.trace.sunburst\").data(e,(function(t){return t[0].trace.uid}))).enter().append(\"g\").classed(\"trace\",!0).classed(\"sunburst\",!0).attr(\"stroke-linejoin\",\"round\"),a.order(),u)?(i&&(o=i()),n.transition().duration(r.duration).ease(r.easing).each(\"end\",(function(){o&&o()})).each(\"interrupt\",(function(){o&&o()})).each((function(){l.selectAll(\"g.trace\").each((function(e){_(t,e,this,r)}))}))):(a.each((function(e){_(t,e,this,r)})),s.uniformtext.mode&&v(t,s._sunburstlayer.selectAll(\".trace\"),\"sunburst\"));c&&a.exit().remove()},r.formatSliceLabel=function(t,e,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!(a||o&&\"none\"!==o))return\"\";var l=i.separators,c=n[0],u=t.data.data,f=c.hierarchy,h=b.isHierarchyRoot(t),p=b.getParent(f,t),d=b.getValue(t);if(!a){var g,m=o.split(\"+\"),v=function(t){return-1!==m.indexOf(t)},y=[];if(v(\"label\")&&u.label&&y.push(u.label),u.hasOwnProperty(\"v\")&&v(\"value\")&&y.push(b.formatValue(u.v,l)),!h){v(\"current path\")&&y.push(b.getPath(t.data));var x=0;v(\"percent parent\")&&x++,v(\"percent entry\")&&x++,v(\"percent root\")&&x++;var _=x>1;if(x){var w,T=function(t){g=b.formatPercent(w,l),_&&(g+=\" of \"+t),y.push(g)};v(\"percent parent\")&&!h&&(w=d/b.getValue(p),T(\"parent\")),v(\"percent entry\")&&(w=d/b.getValue(e),T(\"entry\")),v(\"percent root\")&&(w=d/b.getValue(f),T(\"root\"))}}return v(\"text\")&&(g=s.castOption(r,u.i,\"text\"),s.isValidTextValue(g)&&y.push(g)),y.join(\"
\")}var k=s.castOption(r,u.i,\"texttemplate\");if(!k)return\"\";var A={};u.label&&(A.label=u.label),u.hasOwnProperty(\"v\")&&(A.value=u.v,A.valueLabel=b.formatValue(u.v,l)),A.currentPath=b.getPath(t.data),h||(A.percentParent=d/b.getValue(p),A.percentParentLabel=b.formatPercent(A.percentParent,l),A.parent=b.getPtLabel(p)),A.percentEntry=d/b.getValue(e),A.percentEntryLabel=b.formatPercent(A.percentEntry,l),A.entry=b.getPtLabel(e),A.percentRoot=d/b.getValue(f),A.percentRootLabel=b.formatPercent(A.percentRoot,l),A.root=b.getPtLabel(f),u.hasOwnProperty(\"color\")&&(A.color=u.color);var M=s.castOption(r,u.i,\"text\");return(s.isValidTextValue(M)||\"\"===M)&&(A.text=M),A.customdata=s.castOption(r,u.i,\"customdata\"),s.texttemplateString(k,A,i._d3locale,A,r._meta||{})}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../bar/style\":662,\"../bar/uniform_text\":664,\"../pie/helpers\":905,\"../pie/plot\":909,\"./constants\":1048,\"./fx\":1050,\"./helpers\":1051,\"./style\":1056,\"@plotly/d3\":58,\"d3-hierarchy\":115,\"d3-interpolate\":116}],1056:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../bar/uniform_text\").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,\"marker.line.color\")||i.defaultLine,c=a.castOption(r,s,\"marker.line.width\")||0;t.style(\"stroke-width\",c).call(i.fill,n.color).call(i.stroke,l).style(\"opacity\",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._sunburstlayer.selectAll(\".trace\");o(t,e,\"sunburst\"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style(\"opacity\",r.opacity),e.selectAll(\"path.surface\").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{\"../../components/color\":366,\"../../lib\":503,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],1057:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=t(\"../../plot_api/edit_types\").overrideAll;function u(t){return{show:{valType:\"boolean\",dflt:!1},start:{valType:\"number\",dflt:null,editType:\"plot\"},end:{valType:\"number\",dflt:null,editType:\"plot\"},size:{valType:\"number\",dflt:null,min:0,editType:\"plot\"},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 f=e.exports=c(l({z:{valType:\"data_array\"},x:{valType:\"data_array\"},y:{valType:\"data_array\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:o(),xhoverformat:a(\"x\"),yhoverformat:a(\"y\"),zhoverformat:a(\"z\"),connectgaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},surfacecolor:{valType:\"data_array\"}},i(\"\",{colorAttr:\"z or surfacecolor\",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:\"calc\"}),{contours:{x:u(),y:u(),z:u()},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},opacityscale:{valType:\"any\",editType:\"calc\"},_deprecated:{zauto:l({},i.zauto,{}),zmin:l({},i.zmin,{}),zmax:l({},i.zmax,{})},hoverinfo:l({},s.hoverinfo),showlegend:l({},s.showlegend,{dflt:!1})}),\"calc\",\"nested\");f.x.editType=f.y.editType=f.z.editType=\"calc+clearAxisTypes\",f.transforms=void 0},{\"../../components/color\":366,\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/edit_types\":536,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633}],1058:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.surfacecolor?n(t,e,{vals:e.surfacecolor,containerStr:\"\",cLetter:\"c\"}):n(t,e,{vals:e.z,containerStr:\"\",cLetter:\"c\"})}},{\"../../components/colorscale/calc\":374}],1059:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_surface3d,i=t(\"../../../stackgl_modules\").ndarray,a=t(\"../../../stackgl_modules\").ndarray_linear_interpolate.d2,o=t(\"../heatmap/interp2d\"),s=t(\"../heatmap/find_empties\"),l=t(\"../../lib\").isArrayOrTypedArray,c=t(\"../../lib/gl_format_color\").parseColorScale,u=t(\"../../lib/str2rgbarray\"),f=t(\"../../components/colorscale\").extractOpts;function h(t,e,r){this.scene=t,this.uid=r,this.surface=e,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var p=h.prototype;p.getXat=function(t,e,r,n){var i=l(this.data.x)?l(this.data.x[0])?this.data.x[e][t]:this.data.x[t]:t;return void 0===r?i:n.d2l(i,0,r)},p.getYat=function(t,e,r,n){var i=l(this.data.y)?l(this.data.y[0])?this.data.y[e][t]:this.data.y[e]:e;return void 0===r?i:n.d2l(i,0,r)},p.getZat=function(t,e,r,n){var i=this.data.z[e][t];return null===i&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[e][t]),void 0===r?i:n.d2l(i,0,r)},p.handlePick=function(t){if(t.object===this.surface){var e=(t.data.index[0]-1)/this.dataScaleX-1,r=(t.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(e),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);t.index=[n,i],t.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],t.dataCoordinate=[this.getXat(n,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=t.dataCoordinate[a];null!=o&&(t.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return Array.isArray(s)&&s[i]&&void 0!==s[i][n]?t.textLabel=s[i][n]:t.textLabel=s||\"\",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}};var d=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function g(t,e){if(t0){r=d[n];break}return r}function y(t,e){if(!(t<1||e<1)){for(var r=m(t),n=m(e),i=1,a=0;a_;)r--,r/=v(r),++r1?n:1},p.refineCoords=function(t){for(var e=this.dataScaleX,r=this.dataScaleY,n=t[0].shape[0],a=t[0].shape[1],o=0|Math.floor(t[0].shape[0]*e+1),s=0|Math.floor(t[0].shape[1]*r+1),l=1+n+1,c=1+a+1,u=i(new Float32Array(l*c),[l,c]),f=[1/e,0,0,0,1/r,0,0,0,1],h=0;h0&&null!==this.contourStart[t]&&null!==this.contourEnd[t]&&this.contourEnd[t]>this.contourStart[t]))for(i[t]=!0,e=this.contourStart[t];ea&&(this.minValues[e]=a),this.maxValues[e]\",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\"}}},{}],1066:[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=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)}))),m=e.domain,v=Math.floor(t._fullLayout._size.w*(m.x[1]-m.x[0])),y=Math.floor(t._fullLayout._size.h*(m.y[1]-m.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),T=f(h(x,_),[]),k=f(w,T),A={},M=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})),E=S.reduce(s,0);S=S.map((function(t){return t/E*v}));var L=Math.max(o(e.header.line.width),o(e.cells.line.width)),C={key:e.uid+t._context.staticPlot,translateX:m.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-m.y[1]),size:t._fullLayout._size,width:v,maxLineWidth:L,height:y,columnOrder:M,groupHeight:y,rowBlocks:k,headerRowBlocks:T,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:M[e],xScale:u,x:void 0,calcdata:void 0,columnWidth:S[e]}}))};return C.columns.forEach((function(t){t.calcdata=C,t.x=u(t)})),C}},{\"../../lib/extend\":493,\"./constants\":1065,\"fast-isnumeric\":190}],1067:[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\":493}],1068:[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/i),l=!o||s;t.mayHaveMarkup=o&&i.match(/[<&>]/);var c,u=\"string\"==typeof(c=i)&&c.match(n.latexCheck);t.latex=u;var f,h,p=u?\"\":T(t.calcdata.cells.prefix,e,r)||\"\",d=u?\"\":T(t.calcdata.cells.suffix,e,r)||\"\",g=u?null:T(t.calcdata.cells.format,e,r)||null,m=p+(g?a(g)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&&!l&&!u&&(f=w(m)),t.cellHeightMayIncrease=s||u||t.mayHaveMarkup||(void 0===f?w(m):f),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var v=(\" \"===n.wrapSplitCharacter?m.replace(/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){var e=D(t.rowBlocks,t.page)-t.scrollY;return u(0,e)})),t&&(C(t,r,e,c,n.prevPages,n,0),C(t,r,e,c,n.prevPages,n,1),x(r,t))}}function L(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,u=s.scrollY;s.scrollY=void 0===a?s.scrollY+c*i.event.dy:a;var f=l.selectAll(\".\"+n.cn.yColumn).selectAll(\".\"+n.cn.columnBlock).filter(A);return E(t,f,l),s.scrollY===u}}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]}));b(t,e,a,r),i[o]=n[o]})))}function P(t,e,r,a){return function(){var o=i.select(e.parentNode);o.each((function(t){var e=t.fragments;o.selectAll(\"tspan.line\").each((function(t,r){e[r].width=this.getComputedTextLength()}));var r,i,a=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+a)>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})),o.selectAll(\"tspan.line\").remove(),_(o.select(\".\"+n.cn.cellText),r,t,a),i.select(e.parentNode.parentNode).call(z)}}function I(t,e,r,a,o){return function(){if(!o.settledY){var s=i.select(e.parentNode),l=B(o),c=o.key-l.firstRowIndex,f=l.rows[c].rowHeight,h=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:f,p=Math.max(h,f);p-l.rows[c].rowHeight&&(l.rows[c].rowHeight=p,t.selectAll(\".\"+n.cn.columnCell).call(z),E(null,t.filter(A),0),x(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 u(O(o,i.select(this.parentNode).select(\".\"+n.cn.cellTextHolder).node().getBoundingClientRect().width),a)})),o.settledY=!0}}}function O(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 z(t){t.attr(\"transform\",(function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce((function(t,e){return t+R(e,1/0)}),0),r=R(B(t),t.key);return u(0,r+e)})).selectAll(\".\"+n.cn.cellRect).attr(\"height\",(function(t){return(e=B(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r}))}function D(t,e){for(var r=0,n=e-1;n>=0;n--)r+=F(t[n]);return r}function R(t,e){for(var r=0,n=0;n\",\"<\",\"|\",\"/\",\"\\\\\"],dflt:\">\",editType:\"plot\"},thickness:{valType:\"number\",min:12,editType:\"plot\"},textfont:u({},s.textfont,{}),editType:\"calc\"},text:s.text,textinfo:l.textinfo,texttemplate:i({editType:\"plot\"},{keys:c.eventDataKeys.concat([\"label\",\"value\"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:n({},{keys:c.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u({},s.outsidetextfont,{}),textposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle left\",\"middle center\",\"middle right\",\"bottom left\",\"bottom center\",\"bottom right\"],dflt:\"top left\",editType:\"plot\"},sort:s.sort,root:l.root,domain:o({name:\"treemap\",trace:!0,editType:\"calc\"})}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/domain\":584,\"../../plots/template_attributes\":633,\"../pie/attributes\":900,\"../sunburst/attributes\":1045,\"./constants\":1074}],1072:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"treemap\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":619}],1073:[function(t,e,r){\"use strict\";var n=t(\"../sunburst/calc\");r.calc=function(t,e){return n.calc(t,e)},r.crossTraceCalc=function(t){return n._runCrossTraceCalc(\"treemap\",t)}},{\"../sunburst/calc\":1047}],1074:[function(t,e,r){\"use strict\";e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:\"poly\",eventDataKeys:[\"currentPath\",\"root\",\"entry\",\"percentRoot\",\"percentEntry\",\"percentParent\"],gapWithPathbar:1}},{}],1075:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../components/color\"),o=t(\"../../plots/domain\").defaults,s=t(\"../bar/defaults\").handleText,l=t(\"../bar/constants\").TEXTPAD,c=t(\"../../components/colorscale\"),u=c.hasColorscale,f=c.handleDefaults;e.exports=function(t,e,r,c){function h(r,a){return n.coerce(t,e,i,r,a)}var p=h(\"labels\"),d=h(\"parents\");if(p&&p.length&&d&&d.length){var g=h(\"values\");g&&g.length?h(\"branchvalues\"):h(\"count\"),h(\"level\"),h(\"maxdepth\"),\"squarify\"===h(\"tiling.packing\")&&h(\"tiling.squarifyratio\"),h(\"tiling.flip\"),h(\"tiling.pad\");var m=h(\"text\");h(\"texttemplate\"),e.texttemplate||h(\"textinfo\",Array.isArray(m)?\"text+label\":\"label\"),h(\"hovertext\"),h(\"hovertemplate\");var v=h(\"pathbar.visible\");s(t,e,c,h,\"auto\",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h(\"textposition\");var y=-1!==e.textposition.indexOf(\"bottom\");h(\"marker.line.width\")&&h(\"marker.line.color\",c.paper_bgcolor);var x=h(\"marker.colors\");(e._hasColorscale=u(t,\"marker\",\"colors\")||(t.marker||{}).coloraxis)?f(t,e,c,h,{prefix:\"marker.\",cLetter:\"c\"}):h(\"marker.depthfade\",!(x||[]).length);var b=2*e.textfont.size;h(\"marker.pad.t\",y?b/4:b),h(\"marker.pad.l\",b/4),h(\"marker.pad.r\",b/4),h(\"marker.pad.b\",y?b:b/4),e._hovered={marker:{line:{width:2,color:a.contrast(c.paper_bgcolor)}}},v&&(h(\"pathbar.thickness\",e.pathbar.textfont.size+2*l),h(\"pathbar.side\"),h(\"pathbar.edgeshape\")),h(\"sort\"),h(\"root.color\"),o(e,c,h),e._length=null}else e.visible=!1}},{\"../../components/color\":366,\"../../components/colorscale\":378,\"../../lib\":503,\"../../plots/domain\":584,\"../bar/constants\":650,\"../bar/defaults\":652,\"./attributes\":1071}],1076:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../sunburst/helpers\"),a=t(\"../bar/uniform_text\").clearMinTextSize,o=t(\"../bar/style\").resizeText,s=t(\"./plot_one\");e.exports=function(t,e,r,l,c){var u,f,h=c.type,p=c.drawDescendants,d=t._fullLayout,g=d[\"_\"+h+\"layer\"],m=!r;(a(h,d),(u=g.selectAll(\"g.trace.\"+h).data(e,(function(t){return t[0].trace.uid}))).enter().append(\"g\").classed(\"trace\",!0).classed(h,!0),u.order(),!d.uniformtext.mode&&i.hasTransition(r))?(l&&(f=l()),n.transition().duration(r.duration).ease(r.easing).each(\"end\",(function(){f&&f()})).each(\"interrupt\",(function(){f&&f()})).each((function(){g.selectAll(\"g.trace\").each((function(e){s(t,e,this,r,p)}))}))):(u.each((function(e){s(t,e,this,r,p)})),d.uniformtext.mode&&o(t,g.selectAll(\".trace\"),h));m&&u.exit().remove()}},{\"../bar/style\":662,\"../bar/uniform_text\":664,\"../sunburst/helpers\":1051,\"./plot_one\":1085,\"@plotly/d3\":58}],1077:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../lib/svg_text_utils\"),s=t(\"./partition\"),l=t(\"./style\").styleOne,c=t(\"./constants\"),u=t(\"../sunburst/helpers\"),f=t(\"../sunburst/fx\");e.exports=function(t,e,r,h,p){var d=p.barDifY,g=p.width,m=p.height,v=p.viewX,y=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,T=p.handleSlicesExit,k=p.makeUpdateSliceInterpolator,A=p.makeUpdateTextInterpolator,M={},S=t._fullLayout,E=e[0],L=E.trace,C=E.hierarchy,P=g/L._entryDepth,I=u.listPath(r.data,\"id\"),O=s(C.copy(),[g,m],{packing:\"dice\",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(O=O.filter((function(t){var e=I.indexOf(t.data.id);return-1!==e&&(t.x0=P*e,t.x1=P*(e+1),t.y0=d,t.y1=d+m,t.onPathbar=!0,!0)}))).reverse(),(h=h.data(O,u.getPtId)).enter().append(\"g\").classed(\"pathbar\",!0),T(h,!0,M,[g,m],x),h.order();var z=h;w&&(z=z.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),z.each((function(s){s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-Math.min(g,m)/2),s._hoverY=y(s.y1-m/2);var h=n.select(this),p=i.ensureSingle(h,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?p.transition().attrTween(\"d\",(function(t){var e=k(t,!0,M,[g,m]);return function(t){return x(e(t))}})):p.attr(\"d\",x),h.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),p.call(l,s,L,{hovered:!1}),s._text=(u.getPtLabel(s)||\"\").split(\"
\").join(\" \")||\"\";var d=i.ensureSingle(h,\"g\",\"slicetext\"),T=i.ensureSingle(d,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),E=i.ensureUniformFontSize(t,u.determineTextFont(L,s,S.font,{onPathbar:!0}));T.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",\"start\").call(a.font,E).call(o.convertToTspans,t),s.textBB=a.bBox(T.node()),s.transform=b(s,{fontSize:E.size,onPathbar:!0}),s.transform.fontSize=E.size,w?T.transition().attrTween(\"transform\",(function(t){var e=A(t,!0,M,[g,m]);return function(t){return _(e(t))}})):T.attr(\"transform\",_(s))}))}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../sunburst/fx\":1050,\"../sunburst/helpers\":1051,\"./constants\":1074,\"./partition\":1083,\"./style\":1086,\"@plotly/d3\":58}],1078:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../lib/svg_text_utils\"),s=t(\"./partition\"),l=t(\"./style\").styleOne,c=t(\"./constants\"),u=t(\"../sunburst/helpers\"),f=t(\"../sunburst/fx\"),h=t(\"../sunburst/plot\").formatSliceLabel;e.exports=function(t,e,r,p,d){var g=d.width,m=d.height,v=d.viewX,y=d.viewY,x=d.pathSlice,b=d.toMoveInsideSlice,_=d.strTransform,w=d.hasTransition,T=d.handleSlicesExit,k=d.makeUpdateSliceInterpolator,A=d.makeUpdateTextInterpolator,M=d.prevEntry,S=t._fullLayout,E=e[0].trace,L=-1!==E.textposition.indexOf(\"left\"),C=-1!==E.textposition.indexOf(\"right\"),P=-1!==E.textposition.indexOf(\"bottom\"),I=!P&&!E.marker.pad.t||P&&!E.marker.pad.b,O=s(r,[g,m],{packing:E.tiling.packing,squarifyratio:E.tiling.squarifyratio,flipX:E.tiling.flip.indexOf(\"x\")>-1,flipY:E.tiling.flip.indexOf(\"y\")>-1,pad:{inner:E.tiling.pad,top:E.marker.pad.t,left:E.marker.pad.l,right:E.marker.pad.r,bottom:E.marker.pad.b}}).descendants(),z=1/0,D=-1/0;O.forEach((function(t){var e=t.depth;e>=E._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(z=Math.min(z,e),D=Math.max(D,e))})),p=p.data(O,u.getPtId),E._maxVisibleLayers=isFinite(D)?D-z+1:0,p.enter().append(\"g\").classed(\"slice\",!0),T(p,!1,{},[g,m],x),p.order();var R=null;if(w&&M){var F=u.getPtId(M);p.each((function(t){null===R&&u.getPtId(t)===F&&(R={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var B=function(){return R||{x0:0,x1:g,y0:0,y1:m}},N=p;return w&&(N=N.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),N.each((function(s){var p=u.isHeader(s,E);s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-E.marker.pad.r),s._hoverY=y(P?s.y1-E.marker.pad.b/2:s.y0+E.marker.pad.t/2);var d=n.select(this),T=i.ensureSingle(d,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?T.transition().attrTween(\"d\",(function(t){var e=k(t,!1,B(),[g,m]);return function(t){return x(e(t))}})):T.attr(\"d\",x),d.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{isTransitioning:t._transitioning}),T.call(l,s,E,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text=\"\":s._text=p?I?\"\":u.getPtLabel(s)||\"\":h(s,r,E,e,S)||\"\";var M=i.ensureSingle(d,\"g\",\"slicetext\"),O=i.ensureSingle(M,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),z=i.ensureUniformFontSize(t,u.determineTextFont(E,s,S.font));O.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",C?\"end\":L||p?\"start\":\"middle\").call(a.font,z).call(o.convertToTspans,t),s.textBB=a.bBox(O.node()),s.transform=b(s,{fontSize:z.size,isHeader:p}),s.transform.fontSize=z.size,w?O.transition().attrTween(\"transform\",(function(t){var e=A(t,!1,B(),[g,m]);return function(t){return _(e(t))}})):O.attr(\"transform\",_(s))})),R}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../sunburst/fx\":1050,\"../sunburst/helpers\":1051,\"../sunburst/plot\":1055,\"./constants\":1074,\"./partition\":1083,\"./style\":1086,\"@plotly/d3\":58}],1079:[function(t,e,r){\"use strict\";e.exports=function t(e,r,n){var i;n.swapXY&&(i=e.x0,e.x0=e.y0,e.y0=i,i=e.x1,e.x1=e.y1,e.y1=i),n.flipX&&(i=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-i),n.flipY&&(i=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-i);var a=e.children;if(a)for(var o=0;o-1?C+O:-(I+O):0,D={x0:P,x1:P,y0:z,y1:z+I},R=function(t,e,r){var n=v.tiling.pad,i=function(t){return t-n<=e.x0},a=function(t){return t+n>=e.x1},o=function(t){return t-n<=e.y0},s=function(t){return t+n>=e.y1};return t.x0===e.x0&&t.x1===e.x1&&t.y0===e.y0&&t.y1===e.y1?{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}:{x0:i(t.x0-n)?0:a(t.x0-n)?r[0]:t.x0,x1:i(t.x1+n)?0:a(t.x1+n)?r[0]:t.x1,y0:o(t.y0-n)?0:s(t.y0-n)?r[1]:t.y0,y1:o(t.y1+n)?0:s(t.y1+n)?r[1]:t.y1}},F=null,B={},N={},j=null,U=function(t,e){return e?B[h(t)]:N[h(t)]},V=function(t,e,r,n){if(e)return B[h(x)]||D;var i=N[v.level]||r;return function(t){return t.data.depth-b.data.depth=(n-=(y?m:m.r)-s)){var x=(r+n)/2;r=x,n=x}var b;f?i<(b=a-(y?m:m.b))&&b\"===tt?(l.x-=a,c.x-=a,u.x-=a,f.x-=a):\"/\"===tt?(u.x-=a,f.x-=a,o.x-=a/2,s.x-=a/2):\"\\\\\"===tt?(l.x-=a,c.x-=a,o.x-=a/2,s.x-=a/2):\"<\"===tt&&(o.x-=a,s.x-=a),$(l),$(f),$(o),$(c),$(u),$(s),\"M\"+K(l.x,l.y)+\"L\"+K(c.x,c.y)+\"L\"+K(s.x,s.y)+\"L\"+K(u.x,u.y)+\"L\"+K(f.x,f.y)+\"L\"+K(o.x,o.y)+\"Z\"},toMoveInsideSlice:et,makeUpdateSliceInterpolator:nt,makeUpdateTextInterpolator:it,handleSlicesExit:at,hasTransition:A,strTransform:ot}):w.remove()}},{\"../../lib\":503,\"../bar/constants\":650,\"../bar/plot\":659,\"../bar/uniform_text\":664,\"../sunburst/helpers\":1051,\"./constants\":1074,\"./draw_ancestors\":1077,\"@plotly/d3\":58,\"d3-interpolate\":116}],1086:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../sunburst/helpers\"),s=t(\"../bar/uniform_text\").resizeText;function l(t,e,r,n){var s,l,c=(n||{}).hovered,u=e.data.data,f=u.i,h=u.color,p=o.isHierarchyRoot(e),d=1;if(c)s=r._hovered.marker.line.color,l=r._hovered.marker.line.width;else if(p&&h===r.root.color)d=100,s=\"rgba(0,0,0,0)\",l=0;else if(s=a.castOption(r,f,\"marker.line.color\")||i.defaultLine,l=a.castOption(r,f,\"marker.line.width\")||0,!r._hasColorscale&&!e.onPathbar){var g=r.marker.depthfade;if(g){var m,v=i.combine(i.addOpacity(r._backgroundColor,.75),h);if(!0===g){var y=o.getMaxDepth(r);m=isFinite(y)?o.isLeaf(e)?0:r._maxVisibleLayers-(e.data.depth-r._entryDepth):e.data.height+1}else m=e.data.depth-r._entryDepth,r._atRootLevel||m++;if(m>0)for(var x=0;x0){var x,b,_,w,T,k=t.xa,A=t.ya;\"h\"===p.orientation?(T=e,x=\"y\",_=A,b=\"x\",w=k):(T=r,x=\"x\",_=k,b=\"y\",w=A);var M=h[t.index];if(T>=M.span[0]&&T<=M.span[1]){var S=n.extendFlat({},t),E=w.c2p(T,!0),L=o.getKdeValue(M,p,T),C=o.getPositionOnKdePath(M,p,E),P=_._offset,I=_._length;S[x+\"0\"]=C[0],S[x+\"1\"]=C[1],S[b+\"0\"]=S[b+\"1\"]=E,S[b+\"Label\"]=b+\": \"+i.hoverLabelText(w,T,p[b+\"hoverformat\"])+\", \"+h[0].t.labels.kde+\" \"+L.toFixed(3),S.spikeDistance=y[0].spikeDistance;var O=x+\"Spike\";S[O]=y[0][O],y[0].spikeDistance=void 0,y[0][O]=void 0,S.hovertemplate=!1,v.push(S),(u={stroke:t.color})[x+\"1\"]=n.constrain(P+C[0],P,P+I),u[x+\"2\"]=n.constrain(P+C[1],P,P+I),u[b+\"1\"]=u[b+\"2\"]=w._offset+E}}g&&(v=v.concat(y))}-1!==d.indexOf(\"points\")&&(c=a.hoverOnPoints(t,e,r));var z=f.selectAll(\".violinline-\"+p.uid).data(u?[0]:[]);return z.enter().append(\"line\").classed(\"violinline-\"+p.uid,!0).attr(\"stroke-width\",1.5),z.exit().remove(),z.attr(u),\"closest\"===s?c?[c]:v:c?(v.push(c),v):v}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"../box/hover\":678,\"./helpers\":1091}],1093:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"../box/defaults\").crossTraceDefaults,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\":568,\"../box/defaults\":676,\"../box/select\":683,\"../scatter/style\":950,\"./attributes\":1087,\"./calc\":1088,\"./cross_trace_calc\":1089,\"./defaults\":1090,\"./hover\":1092,\"./layout_attributes\":1094,\"./layout_defaults\":1095,\"./plot\":1096,\"./style\":1097}],1094:[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\":503,\"../box/layout_attributes\":680}],1095:[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\":503,\"../box/layout_defaults\":681,\"./layout_attributes\":1094}],1096:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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,linearized:!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;if(!0!==c.visible||s.empty)r.remove();else{var d=s.bPos,g=s.bdPos,m=e[s.valLetter+\"axis\"],v=e[s.posLetter+\"axis\"],y=\"both\"===c.side,x=y||\"positive\"===c.side,b=y||\"negative\"===c.side,_=r.selectAll(\"path.violin\").data(i.identity);_.enter().append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").attr(\"class\",\"violin\"),_.exit().remove(),_.each((function(t){var e,r,i,a,o,l,f,h,_=n.select(this),w=t.density,T=w.length,k=v.c2l(t.pos+d,!0),A=v.l2p(k);if(c.width)e=s.maxKDE/g;else{var M=u._violinScaleGroupStats[c.scalegroup];e=\"count\"===c.scalemode?M.maxKDE/g*(M.maxCount/t.pts.length):M.maxKDE/g}if(x){for(f=new Array(T),o=0;o\")),u.color=function(t,e){var r=t[e.dir].marker,n=r.color,a=r.line.color,o=r.line.width;if(i(n))return n;if(i(a)&&o)return a}(h,m),[u]}function k(t){return n(g,t,h[d+\"hoverformat\"])}}},{\"../../components/color\":366,\"../../constants/delta.js\":473,\"../../plots/cartesian/axes\":554,\"../bar/hover\":655}],1109:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\"),plot:t(\"./plot\"),style:t(\"./style\").style,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"../bar/select\"),moduleType:\"trace\",name:\"waterfall\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"../bar/select\":660,\"./attributes\":1102,\"./calc\":1103,\"./cross_trace_calc\":1105,\"./defaults\":1106,\"./event_data\":1107,\"./hover\":1108,\"./layout_attributes\":1110,\"./layout_defaults\":1111,\"./plot\":1112,\"./style\":1113}],1110:[function(t,e,r){\"use strict\";e.exports={waterfallmode:{valType:\"enumerated\",values:[\"group\",\"overlay\"],dflt:\"group\",editType:\"calc\"},waterfallgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},waterfallgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],1111:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s0&&(m+=h?\"M\"+f[0]+\",\"+d[1]+\"V\"+d[0]:\"M\"+f[1]+\",\"+d[0]+\"H\"+f[0]),\"between\"!==p&&(r.isSum||s path\").each((function(t){if(!t.isBlank){var e=s[t.dir].marker;n.select(this).call(a.fill,e.color).call(a.stroke,e.line.color).call(i.dashLine,e.line.dash,e.line.width).style(\"opacity\",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(\".lines\").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll(\"path\"),t.width,t.color,t.dash)}))}))}}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../constants/interactions\":478,\"../bar/style\":662,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],1114:[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,a=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,i=0;ii&&(i=u,o=c)}}return i?a(o):s};case\"rms\":return function(t,e){for(var r=0,i=0,o=0;o\":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[0]&&es[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 es[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[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?(m=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(f))},v=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(m=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},v=function(t,e){var r=x[t.astr][e];t.get().push(r)}),k(m);for(var w=o(e.transforms,r),T=0;T1?\"%{group} (%{trace})\":\"%{group}\");var l=t.styles,c=o.styles=[];if(l)for(a=0;a0?o-4:o;for(r=0;r>16&255,l[u++]=e>>8&255,l[u++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,l[u++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e);return l},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=0,s=r-i;os?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;s0)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>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join(\"\")}i[\"-\".charCodeAt(0)]=62,i[\"_\".charCodeAt(0)]=63},{}],2:[function(t,e,r){},{}],3:[function(t,e,r){(function(e){(function(){\n", + "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\":255,\"./lib/epsilon\":256,\"./lib/geojson\":257,\"./lib/intersecter\":258,\"./lib/segment-chainer\":260,\"./lib/segment-selector\":261}],255:[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\")}}}},{}],256:[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)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])t!=o-i>t&&(a-c)*(i-u)/(o-u)+c-n>t&&(s=!s),a=c,o=u}return s}};return e}},{}],257:[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;i0}))}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 m(){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 v,y=m();if(y){var x;if(t)(x=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above);else y.seg.otherFill=h.seg.myFill;r&&r.segmentUpdate(y.seg),h.other.remove(),h.remove()}if(a.getHead()!==h){r&&r.rewind(h.seg);continue}if(t)x=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=x?!h.seg.myFill.below:h.seg.myFill.below;else if(null===h.seg.otherFill)v=g?h.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:h.primary?o:i,h.seg.otherFill={above:v,below:v};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;l0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,t)}},a.prototype.read_uint16=function(t){var e=this.input;if(t+2>e.length)throw n(\"unexpected EOF\",\"EBADDATA\");return this.big_endian?256*e[t]+e[t+1]:e[t]+256*e[t+1]},a.prototype.read_uint32=function(t){var e=this.input;if(t+4>e.length)throw n(\"unexpected EOF\",\"EBADDATA\");return this.big_endian?16777216*e[t]+65536*e[t+1]+256*e[t+2]+e[t+3]:e[t]+256*e[t+1]+65536*e[t+2]+16777216*e[t+3]},a.prototype.is_subifd_link=function(t,e){return 0===t&&34665===e||0===t&&34853===e||34665===t&&40965===e},a.prototype.exif_format_length=function(t){switch(t){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},a.prototype.exif_format_read=function(t,e){var r;switch(t){case 1:case 2:return r=this.input[e];case 6:return(r=this.input[e])|33554430*(128&r);case 3:return r=this.read_uint16(e);case 8:return(r=this.read_uint16(e))|131070*(32768&r);case 4:return r=this.read_uint32(e);case 9:return 0|(r=this.read_uint32(e));case 5:case 10:case 11:case 12:case 7:default:return null}},a.prototype.scan_ifd=function(t,e,r){var a=this.read_uint16(e);e+=2;for(var o=0;othis.input.length)throw n(\"unexpected EOF\",\"EBADDATA\");for(var d=[],g=h,m=0;m0&&(this.ifds_to_read.push({id:s,offset:d[0]}),p=!0),!1===r({is_big_endian:this.big_endian,ifd:t,tag:s,format:l,count:c,entry_offset:e+this.start,data_length:f,data_offset:h+this.start,value:d,is_subifd_link:p}))return void(this.aborted=!0);e+=12}0===t&&this.ifds_to_read.push({id:1,offset:this.read_uint32(e)})},e.exports.ExifParser=a,e.exports.get_orientation=function(t){var e=0;try{return new a(t,0,t.length).each((function(t){if(0===t.ifd&&274===t.tag&&Array.isArray(t.value))return e=t.value[0],!1})),e}catch(t){return-1}}},{}],264:[function(t,e,r){\"use strict\";var n=t(\"./common\").readUInt16BE,i=t(\"./common\").readUInt32BE;function a(t,e){if(t.length<4+e)return null;var r=i(t,e);return t.length>4&15,i=15&t[4],a=t[5]>>4&15,o=n(t,6),l=8,c=0;ce.width||t.width===e.width&&t.height>e.height?t:e})),i=r.reduce((function(t,e){return t.height>e.height||t.height===e.height&&t.width>e.width?t:e})),n.width>i.height||n.width===i.height&&n.height>i.width?n:i),s=1;e.transforms.forEach((function(t){var e={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},r={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(\"imir\"===t.type&&(s=0===t.value?r[s]:e[s=e[s=r[s]]]),\"irot\"===t.type)for(var n=0;n1&&(h.variants=f.variants),f.orientation&&(h.orientation=f.orientation),f.exif_location&&f.exif_location.offset+f.exif_location.length<=t.length){var p=a(t,f.exif_location.offset),d=t.slice(f.exif_location.offset+p+4,f.exif_location.offset+f.exif_location.length),g=s.get_orientation(d);g>0&&(h.orientation=g)}return h}}}}}}},{\"../common\":262,\"../exif_utils\":263,\"../miaf_utils\":264}],266:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt16LE,o=n(\"BM\");e.exports=function(t){if(!(t.length<26)&&i(t,0,o))return{width:a(t,18),height:a(t,22),type:\"bmp\",mime:\"image/bmp\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],267:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt16LE,o=n(\"GIF87a\"),s=n(\"GIF89a\");e.exports=function(t){if(!(t.length<10)&&(i(t,0,o)||i(t,0,s)))return{width:a(t,6),height:a(t,8),type:\"gif\",mime:\"image/gif\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],268:[function(t,e,r){\"use strict\";var n=t(\"../common\").readUInt16LE;e.exports=function(t){var e=n(t,0),r=n(t,2),i=n(t,4);if(0===e&&1===r&&i){for(var a=[],o={width:0,height:0},s=0;so.width||c>o.height)&&(o=u)}return{width:o.width,height:o.height,variants:a,type:\"ico\",mime:\"image/x-icon\",wUnits:\"px\",hUnits:\"px\"}}}},{\"../common\":262}],269:[function(t,e,r){\"use strict\";var n=t(\"../common\").readUInt16BE,i=t(\"../common\").str2arr,a=t(\"../common\").sliceEq,o=t(\"../exif_utils\"),s=i(\"Exif\\0\\0\");e.exports=function(t){if(!(t.length<2)&&255===t[0]&&216===t[1]&&255===t[2])for(var e=2;;){for(;;){if(t.length-e<2)return;if(255===t[e++])break}for(var r,i,l=t[e++];255===l;)l=t[e++];if(208<=l&&l<=217||1===l)r=0;else{if(!(192<=l&&l<=254))return;if(t.length-e<2)return;r=n(t,e)-2,e+=2}if(217===l||218===l)return;if(225===l&&r>=10&&a(t,e,s)&&(i=o.get_orientation(t.slice(e+6,e+r))),r>=5&&192<=l&&l<=207&&196!==l&&200!==l&&204!==l){if(t.length-e0&&(c.orientation=i),c}e+=r}}},{\"../common\":262,\"../exif_utils\":263}],270:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt32BE,o=n(\"\\x89PNG\\r\\n\\x1a\\n\"),s=n(\"IHDR\");e.exports=function(t){if(!(t.length<24)&&i(t,0,o)&&i(t,12,s))return{width:a(t,16),height:a(t,20),type:\"png\",mime:\"image/png\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],271:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt32BE,o=n(\"8BPS\\0\\x01\");e.exports=function(t){if(!(t.length<22)&&i(t,0,o))return{width:a(t,18),height:a(t,14),type:\"psd\",mime:\"image/vnd.adobe.photoshop\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],272:[function(t,e,r){\"use strict\";function n(t){return\"number\"==typeof t&&isFinite(t)&&t>0}var i=/<[-_.:a-zA-Z0-9][^>]*>/,a=/^<([-_.:a-zA-Z0-9]+:)?svg\\s/,o=/[^-]\\bwidth=\"([^%]+?)\"|[^-]\\bwidth='([^%]+?)'/,s=/\\bheight=\"([^%]+?)\"|\\bheight='([^%]+?)'/,l=/\\bview[bB]ox=\"(.+?)\"|\\bview[bB]ox='(.+?)'/,c=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function u(t){return c.test(t)?t.match(c)[0]:\"px\"}e.exports=function(t){if(function(t){var e,r=0,n=t.length;for(239===t[0]&&187===t[1]&&191===t[2]&&(r=3);r>14&16383),type:\"webp\",mime:\"image/webp\",wUnits:\"px\",hUnits:\"px\"}}}function h(t,e){return{width:1+(t[e+6]<<16|t[e+5]<<8|t[e+4]),height:1+(t[e+9]<t.length)){for(;e+8=10?r=r||u(t,e+8):\"VP8L\"===p&&d>=9?r=r||f(t,e+8):\"VP8X\"===p&&d>=10?r=r||h(t,e+8):\"EXIF\"===p&&(n=s.get_orientation(t.slice(e+8,e+8+d)),e=1/0),e+=8+d}else e++;if(r)return n>0&&(r.orientation=n),r}}}},{\"../common\":262,\"../exif_utils\":263}],275:[function(t,e,r){\"use strict\";e.exports={avif:t(\"./parse_sync/avif\"),bmp:t(\"./parse_sync/bmp\"),gif:t(\"./parse_sync/gif\"),ico:t(\"./parse_sync/ico\"),jpeg:t(\"./parse_sync/jpeg\"),png:t(\"./parse_sync/png\"),psd:t(\"./parse_sync/psd\"),svg:t(\"./parse_sync/svg\"),tiff:t(\"./parse_sync/tiff\"),webp:t(\"./parse_sync/webp\")}},{\"./parse_sync/avif\":265,\"./parse_sync/bmp\":266,\"./parse_sync/gif\":267,\"./parse_sync/ico\":268,\"./parse_sync/jpeg\":269,\"./parse_sync/png\":270,\"./parse_sync/psd\":271,\"./parse_sync/svg\":272,\"./parse_sync/tiff\":273,\"./parse_sync/webp\":274}],276:[function(t,e,r){\"use strict\";var n=t(\"./lib/parsers_sync\");e.exports=function(t){return function(t){for(var e=Object.keys(n),r=0;r1)for(var r=1;r1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function T(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 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 float dashLength, pixelRatio, thickness, opacity, id, miterMode;\\nuniform sampler2D dashTexture;\\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) / dashLength) * .5 + .25;\\n\\tfloat dash = texture2D(dashTexture, 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||\"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\",splitNull:\"splitNull\"}),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=D}));(I=I.slice(0,R)).push(D)}for(var F=function(t){var e=k.slice(2*z,2*I[t]).concat(D?k.slice(2*D):[]),r=(d.hole||[]).map((function(e){return e-D+(I[t]-z)})),n=c(e,r);n=n.map((function(e){return e+z+(e+zt.length)&&(e=t.length);for(var r=0,n=new Array(e);r 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\"]),l.vert=h([\"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 bool constPointSize;\\nuniform float pixelRatio;\\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\\nuniform sampler2D paletteTexture;\\n\\nconst float maxSize = 100.;\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragBorderRadius, fragWidth;\\n\\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\\n\\nbool isDirect = (paletteSize.x < 1.);\\n\\nvec4 getColor(vec4 id) {\\n return isDirect ? id / 255. : texture2D(paletteTexture,\\n vec2(\\n (id.x + .5) / paletteSize.x,\\n (id.y + .5) / paletteSize.y\\n )\\n );\\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) * pointSizeScale;\\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\"]),m&&(l.frag=l.frag.replace(\"smoothstep\",\"smoothStep\"),s.frag=s.frag.replace(\"smoothstep\",\"smoothStep\")),this.drawCircle=t(l)}b.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},b.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},b.prototype.draw=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;nn)?e.tree=u(t,{bounds:f}):n&&n.length&&(e.tree=n),e.tree){var h={primitive:\"points\",usage:\"static\",data:e.tree,type:\"uint32\"};e.elements?e.elements(h):e.elements=o.elements(h)}var p=v.float32(t);return i({data:p,usage:\"dynamic\"}),a({data:v.fract32(t,p),usage:\"dynamic\"}),s({data:new Uint8Array(c),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=[],s=0,l=Math.min(e.length,r.count);s=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;o4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===i.length?i[0]:i},b.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;i2?(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;nk))&&(s.lower||!(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)||W(t.data))}function c(t,e,r,n,i,a){for(var o=0;o(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)||W(t)||l(t)?e=t:(\"data\"in t&&(e=t.data),\"usage\"in t&&(r=Q[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>>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,r.height>>=i,p(r,n[i]),t.mipmask|=1<e;++e)t.images[e]=null;return t}function C(t){for(var e=t.images,r=0;re){for(var r=0;r=--this.refCount&&F(this)}}),o.profile&&(a.getTotalTextureSize=function(){var t=0;return Object.keys(yt).forEach((function(e){t+=yt[e].stats.size})),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;P.call(r);var a=L();return\"number\"==typeof t?M(a,0|t,\"number\"==typeof e?0|e:0|t):t?(I(r,t),S(a,t)):M(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),E(a,3553),O(r,3553),R(),C(a),o.profile&&(i.stats.size=T(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 z(3553);return yt[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=v();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(),k(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=0;i.mipmask>>l;++l){var c=a>>l,u=s>>l;if(!c||!u)break;t.texImage2D(3553,l,i.format,c,u,0,i.format,i.type,null)}return R(),o.profile&&(i.stats.size=T(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(P.call(l),s=0;6>s;++s)g[s]=L();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(I(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)M(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)E(g[s],34069+s);for(O(l,34067),R(),o.profile&&(h.stats.size=T(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)C(g[s]);return f}var h=new z(34067);yt[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=v();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(),k(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=T(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;er;++r)if(0!=(e.mipmask&1<>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);O(e.texInfo,e.target)}))},refresh:function(){for(var e=0;ei;++i){for(c=0;ct;++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(k).forEach(m)},restore:function(){x.cur=null,x.next=null,x.dirty=!0,X(k).forEach((function(e){e.framebuffer=t.createFramebuffer(),v(e)}))}})}function M(){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,i,a,o){function s(){this.id=++f,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var t=e.oes_vertex_array_object;this.vao=t?t.createVertexArrayOES():null,h[this.id]=this,this.buffers=[]}var c=r.maxAttributes,u=Array(c);for(r=0;r=h.byteLength?c.subdata(h):(c.destroy(),r.buffers[s]=null)),r.buffers[s]||(c=r.buffers[s]=i.create(u,34962,!1,!0)),f.buffer=i.getBuffer(c),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1,t[s]=1;else i.getBuffer(u)?(f.buffer=i.getBuffer(u),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1):i.getBuffer(u.buffer)?(f.buffer=i.getBuffer(u.buffer),f.size=0|(+u.size||f.buffer.dimension),f.normalized=!!u.normalized||!1,f.type=\"type\"in u?K[u.type]:f.buffer.dtype,f.offset=0|(u.offset||0),f.stride=0|(u.stride||0),f.divisor=0|(u.divisor||0),f.state=1):\"x\"in u&&(f.x=+u.x||0,f.y=+u.y||0,f.z=+u.z||0,f.w=+u.w||0,f.state=2)}for(c=0;ct&&(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(e,n,i,a){var o=f[n];o||(o=f[n]={});var p=o[e];if(p&&(p.refCount++,!a))return p;var d=new s(n,e);return r.shaderCount++,l(d,i,a),p||(o[e]=d),h.push(d),j(d,{destroy:function(){if(d.refCount--,0>=d.refCount){t.deleteProgram(d.program);var e=h.indexOf(d);h.splice(e,1),r.shaderCount--}0>=o[d.vertId].refCount&&(t.deleteShader(u[d.vertId]),delete u[d.vertId],delete f[d.fragId][d.vertId]),Object.keys(f[d.fragId]).length||(t.deleteShader(c[d.fragId]),delete c[d.fragId],delete f[d.fragId])}})},restore:function(){c={},u={};for(var t=0;t\"+e+\"?\"+i+\".constant[\"+e+\"]:0;\"})).join(\"\"),\"}}else{\",\"if(\",s,\"(\",i,\".buffer)){\",u,\"=\",a,\".createStream(\",34962,\",\",i,\".buffer);\",\"}else{\",u,\"=\",a,\".getBuffer(\",i,\".buffer);\",\"}\",f,'=\"type\" in ',i,\"?\",o.glTypes,\"[\",i,\".type]:\",u,\".dtype;\",l.normalized,\"=!!\",i,\".normalized;\"),n(\"size\"),n(\"offset\"),n(\"stride\"),n(\"divisor\"),r(\"}}\"),r.exit(\"if(\",l.isStream,\"){\",a,\".destroyStream(\",u,\");\",\"}\"),l}))})),o}function A(t,e,n,i,o){function s(t){var e=c[t];e&&(h[t]=e)}var l=function(t,e){if(\"string\"==typeof(r=t.static).frag&&\"string\"==typeof r.vert){if(0>1)\",s],\");\")}function e(){r(l,\".drawArraysInstancedANGLE(\",[d,g,m,s],\");\")}p&&\"null\"!==p?y?t():(r(\"if(\",p,\"){\"),t(),r(\"}else{\"),e(),r(\"}\")):e()}function o(){function t(){r(u+\".drawElements(\"+[d,m,v,g+\"<<((\"+v+\"-5121)>>1)\"]+\");\")}function e(){r(u+\".drawArrays(\"+[d,g,m]+\");\")}p&&\"null\"!==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),h.elementsActive&&a(\"if(\"+i+\")\"+u+\".bindBuffer(34963,\"+i+\".buffer.buffer);\")):(i=a.def(),a(i,\"=\",f,\".\",\"elements\",\";\",\"if(\",i,\"){\",u,\".bindBuffer(\",34963,\",\",i,\".buffer.buffer);}\",\"else if(\",c.vao,\".currentVAO){\",i,\"=\",t.shared.elements+\".getElements(\"+c.vao,\".currentVAO.elements);\",nt?\"\":\"if(\"+i+\")\"+u+\".bindBuffer(34963,\"+i+\".buffer.buffer);\",\"}\")),i}(),d=i(\"primitive\"),g=i(\"offset\"),m=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 m){if(0===m)return}else r(\"if(\",m,\"){\"),r.exit(\"}\");tt&&(s=i(\"instances\"),l=t.instancing);var v=p+\".type\",y=h.elements&&D(h.elements)&&!h.vaoActive;tt&&(\"number\"!=typeof s||0<=s)?\"string\"==typeof s?(r(\"if(\",s,\">0){\"),a(),r(\"}else if(\",s,\"<0){\"),o(),r(\"}\")):a():o()}function G(t,e,r,n,i){return i=(e=b()).proc(\"body\",i),tt&&(e.instancing=i.def(e.shared.extensions,\".angle_instanced_arrays\")),t(e,i,r,n),e.compile().body}function Y(t,e,r,n){B(t,e),r.useVAO?r.drawVAO?e(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,e),\");\"):e(t.shared.vao,\".setVAO(\",t.shared.vao,\".targetVAO);\"):(e(t.shared.vao,\".setVAO(null);\"),U(t,e,r,n.attributes,(function(){return!0}))),H(t,e,r,n.uniforms,(function(){return!0}),!1),q(t,e,e,r)}function W(t,e,r,n){function i(){return!0}t.batchId=\"a1\",B(t,e),U(t,e,r,n.attributes,i),H(t,e,r,n.uniforms,i,!1),q(t,e,e,r)}function X(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}B(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&&M(t,u,r.context),r.needsFramebuffer&&S(t,u,r.framebuffer),L(t,u,r.state,i),r.profile&&i(r.profile)&&N(t,u,r,!1,!0),n?(r.useVAO?r.drawVAO?i(r.drawVAO)?u(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,u),\");\"):c(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,c),\");\"):c(t.shared.vao,\".setVAO(\",t.shared.vao,\".targetVAO);\"):(c(t.shared.vao,\".setVAO(null);\"),U(t,c,r,n.attributes,a),U(t,u,r,n.attributes,i)),H(t,c,r,n.uniforms,a,!1),H(t,u,r,n.uniforms,i,!0),q(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 G(W,t,r,e,2)})),\"(\",n,\");}\",c,\".call(this,a0[\",s,\"],\",s,\");\"))}function Z(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;M(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),O(Object.keys(r.state)).forEach((function(e){var n=r.state[e].append(t,i);m(n)?n.forEach((function(r,n){i.set(t.next[e],\"[\"+n+\"]\",r)})):i.set(a.next,\".\"+e,n)})),N(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){var o=r.uniforms[n].append(t,i);Array.isArray(o)&&(o=\"[\"+o.join()+\"]\"),i.set(a.uniforms,\"[\"+e.id(n)+\"]\",o)})),Object.keys(r.attributes).forEach((function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new Q).forEach((function(t){i.set(a,\".\"+t,n[t])}))})),r.scopeVAO&&i.set(a.vao,\".targetVAO\",r.scopeVAO.append(t,i)),n(\"vert\"),n(\"frag\"),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.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)}}},xt=[];xt[6408]=4,xt[6407]=3;var bt=[];bt[5121]=1,bt[5126]=4,bt[36193]=2;var _t=[\"x\",\"y\",\"z\",\"w\"],wt=\"blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset\".split(\" \"),Tt={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},At={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,\"increment wrap\":34055,\"decrement wrap\":34056,invert:5386},Mt={cw:2304,ccw:2305},St=new z(!1,!1,!1,(function(){}));return function(t){function e(){if(0===J.length)w&&w.update(),tt=null;else{tt=H.next(e),f();for(var t=J.length-1;0<=t;--t){var r=J[t];r&&r(P,null,0)}m.flush(),w&&w.update()}}function r(){!tt&&0=J.length&&n()}}}}function u(){var t=X.viewport,e=X.scissor_box;t[0]=t[1]=e[0]=e[1]=0,P.viewportWidth=P.framebufferWidth=P.drawingBufferWidth=t[2]=e[2]=m.drawingBufferWidth,P.viewportHeight=P.framebufferHeight=P.drawingBufferHeight=t[3]=e[3]=m.drawingBufferHeight}function f(){P.tick+=1,P.time=g(),u(),W.procs.poll()}function h(){F.refresh(),u(),W.procs.refresh(),w&&w.update()}function g(){return(q()-T)/1e3}if(!(t=i(t)))return null;var m=t.gl,v=m.getContextAttributes();m.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;ie;++e)et(j({framebuffer:t.framebuffer.faces[e]},t),l);else et(t,l);else l(0,t)},prop:V.define.bind(null,1),context:V.define.bind(null,2),this:V.define.bind(null,3),draw:s({}),buffer:function(t){return O.create(t,34962,!1,!1)},elements:function(t){return z.create(t,!1)},texture:F.create2D,cube:F.createCube,renderbuffer:U.create,framebuffer:G.create,framebufferCube:G.createCube,vao:D.createVAO,attributes:v,frame:c,on:function(t,e){var r;switch(t){case\"frame\":return c(e);case\"lost\":r=K;break;case\"restore\":r=Q;break;case\"destroy\":r=$}return r.push(e),{cancel:function(){for(var t=0;t2?\"one of \".concat(e,\" \").concat(t.slice(0,r-1).join(\", \"),\", or \")+t[r-1]:2===r?\"one of \".concat(e,\" \").concat(t[0],\" or \").concat(t[1]):\"of \".concat(e,\" \").concat(t[0])}return\"of \".concat(e,\" \").concat(String(t))}i(\"ERR_INVALID_OPT_VALUE\",(function(t,e){return'The value \"'+e+'\" is invalid for option \"'+t+'\"'}),TypeError),i(\"ERR_INVALID_ARG_TYPE\",(function(t,e,r){var n,i,o,s;if(\"string\"==typeof e&&(i=\"not \",e.substr(!o||o<0?0:+o,i.length)===i)?(n=\"must not be\",e=e.replace(/^not /,\"\")):n=\"must be\",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t,\" argument\"))s=\"The \".concat(t,\" \").concat(n,\" \").concat(a(e,\"type\"));else{var l=function(t,e,r){return\"number\"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,\".\")?\"property\":\"argument\";s='The \"'.concat(t,'\" ').concat(l,\" \").concat(n,\" \").concat(a(e,\"type\"))}return s+=\". Received type \".concat(typeof r)}),TypeError),i(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\"),i(\"ERR_METHOD_NOT_IMPLEMENTED\",(function(t){return\"The \"+t+\" method is not implemented\"})),i(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\"),i(\"ERR_STREAM_DESTROYED\",(function(t){return\"Cannot call \"+t+\" after a stream was destroyed\"})),i(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\"),i(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\"),i(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\"),i(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError),i(\"ERR_UNKNOWN_ENCODING\",(function(t){return\"Unknown encoding: \"+t}),TypeError),i(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\"),e.exports.codes=n},{}],287:[function(t,e,r){(function(r){(function(){\"use strict\";var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=c;var i=t(\"./_stream_readable\"),a=t(\"./_stream_writable\");t(\"inherits\")(c,i);for(var o=n(a.prototype),s=0;s0)if(\"string\"==typeof e||o.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),n)o.endEmitted?w(t,new _):S(t,o,e,!0);else if(o.ended)w(t,new x);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?S(t,o,e,!1):P(t,o)):S(t,o,e,!1)}else n||(o.reading=!1,P(t,o));return!o.ended&&(o.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function L(t){var e=t._readableState;c(\"emitReadable\",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c(\"emitReadable\",e.flowing),e.emittedReadable=!0,r.nextTick(C,t))}function C(t){var e=t._readableState;c(\"emitReadable_\",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit(\"readable\"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,R(t)}function P(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(I,t,e))}function I(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount(\"data\")>0&&t.resume()}function z(t){c(\"readable nexttick read 0\"),t.read(0)}function D(t,e){c(\"resume\",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit(\"resume\"),R(t),e.flowing&&!e.reading&&t.read(0)}function R(t){var e=t._readableState;for(c(\"flow\",e.flowing);e.flowing&&null!==t.read(););}function F(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(\"\"):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function B(t){var e=t._readableState;c(\"endReadable\",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(N,e,t))}function N(t,e){if(c(\"endReadableNT\",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit(\"end\"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function j(t,e){for(var r=0,n=t.length;r=e.highWaterMark:e.length>0)||e.ended))return c(\"read: emitReadable\",e.length,e.ended),0===e.length&&e.ended?B(this):L(this),null;if(0===(t=E(t,e))&&e.ended)return 0===e.length&&B(this),null;var n,i=e.needReadable;return c(\"need readable\",i),(0===e.length||e.length-t0?F(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&B(this)),null!==n&&this.emit(\"data\",n),n},A.prototype._read=function(t){w(this,new b(\"_read()\"))},A.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c(\"pipe count=%d opts=%j\",i.pipesCount,e);var o=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?l:m;function s(e,r){c(\"onunpipe\"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c(\"cleanup\"),t.removeListener(\"close\",d),t.removeListener(\"finish\",g),t.removeListener(\"drain\",u),t.removeListener(\"error\",p),t.removeListener(\"unpipe\",s),n.removeListener(\"end\",l),n.removeListener(\"end\",m),n.removeListener(\"data\",h),f=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function l(){c(\"onend\"),t.end()}i.endEmitted?r.nextTick(o):n.once(\"end\",o),t.on(\"unpipe\",s);var u=function(t){return function(){var e=t._readableState;c(\"pipeOnDrain\",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,\"data\")&&(e.flowing=!0,R(t))}}(n);t.on(\"drain\",u);var f=!1;function h(e){c(\"ondata\");var r=t.write(e);c(\"dest.write\",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==j(i.pipes,t))&&!f&&(c(\"false write response, pause\",i.awaitDrain),i.awaitDrain++),n.pause())}function p(e){c(\"onerror\",e),m(),t.removeListener(\"error\",p),0===a(t,\"error\")&&w(t,e)}function d(){t.removeListener(\"finish\",g),m()}function g(){c(\"onfinish\"),t.removeListener(\"close\",d),m()}function m(){c(\"unpipe\"),n.unpipe(t)}return n.on(\"data\",h),function(t,e,r){if(\"function\"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,\"error\",p),t.once(\"close\",d),t.once(\"finish\",g),t.emit(\"pipe\",n),i.flowing||(c(\"pipe resume\"),n.resume()),t},A.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit(\"unpipe\",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a0,!1!==i.flowing&&this.resume()):\"readable\"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c(\"on readable\",i.length,i.reading),i.length?L(this):i.reading||r.nextTick(z,this))),n},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(t,e){var n=o.prototype.removeListener.call(this,t,e);return\"readable\"===t&&r.nextTick(O,this),n},A.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return\"readable\"!==t&&void 0!==t||r.nextTick(O,this),e},A.prototype.resume=function(){var t=this._readableState;return t.flowing||(c(\"resume\"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(D,t,e))}(this,t)),t.paused=!1,this},A.prototype.pause=function(){return c(\"call pause flowing=%j\",this._readableState.flowing),!1!==this._readableState.flowing&&(c(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this},A.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on(\"end\",(function(){if(c(\"wrapped end\"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on(\"data\",(function(i){(c(\"wrapped data\"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&\"function\"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var a=0;a-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(A.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(t,e,r){r(new g(\"_write()\"))},A.prototype._writev=null,A.prototype.end=function(t,e,n){var i=this._writableState;return\"function\"==typeof t?(n=t,t=null,e=null):\"function\"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,P(t,e),n&&(e.finished?r.nextTick(n):t.once(\"finish\",n));e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(A.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,\"destroyed\",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),A.prototype.destroy=f.destroy,A.prototype._undestroy=f.undestroy,A.prototype._destroy=function(t,e){e(t)}}).call(this)}).call(this,t(\"_process\"),\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"../errors\":286,\"./_stream_duplex\":287,\"./internal/streams/destroy\":294,\"./internal/streams/state\":298,\"./internal/streams/stream\":299,_process:277,buffer:85,inherits:231,\"util-deprecate\":330}],292:[function(t,e,r){(function(r){(function(){\"use strict\";var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var a=t(\"./end-of-stream\"),o=Symbol(\"lastResolve\"),s=Symbol(\"lastReject\"),l=Symbol(\"error\"),c=Symbol(\"ended\"),u=Symbol(\"lastPromise\"),f=Symbol(\"handlePromise\"),h=Symbol(\"stream\");function p(t,e){return{value:t,done:e}}function d(t){var e=t[o];if(null!==e){var r=t[h].read();null!==r&&(t[u]=null,t[o]=null,t[s]=null,e(p(r,!1)))}}function g(t){r.nextTick(d,t)}var m=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var t=this,e=this[l];if(null!==e)return Promise.reject(e);if(this[c])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise((function(e,n){r.nextTick((function(){t[l]?n(t[l]):e(p(void 0,!0))}))}));var n,i=this[u];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(p(void 0,!0)):e[f](r,n)}),n)}}(i,this));else{var a=this[h].read();if(null!==a)return Promise.resolve(p(a,!1));n=new Promise(this[f])}return this[u]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,\"return\",(function(){var t=this;return new Promise((function(e,r){t[h].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),n),m);e.exports=function(t){var e,r=Object.create(v,(i(e={},h,{value:t,writable:!0}),i(e,o,{value:null,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,l,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,f,{value:function(t,e){var n=r[h].read();n?(r[u]=null,r[o]=null,r[s]=null,t(p(n,!1))):(r[o]=t,r[s]=e)},writable:!0}),e));return r[u]=null,a(t,(function(t){if(t&&\"ERR_STREAM_PREMATURE_CLOSE\"!==t.code){var e=r[s];return null!==e&&(r[u]=null,r[o]=null,r[s]=null,e(t)),void(r[l]=t)}var n=r[o];null!==n&&(r[u]=null,r[o]=null,r[s]=null,n(p(void 0,!0))),r[c]=!0})),t.on(\"readable\",g.bind(null,r)),r}}).call(this)}).call(this,t(\"_process\"))},{\"./end-of-stream\":295,_process:277}],293:[function(t,e,r){\"use strict\";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){for(var r=0;r0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:\"unshift\",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:\"shift\",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:\"clear\",value:function(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function(t){if(0===this.length)return\"\";for(var e=this.head,r=\"\"+e.data;e=e.next;)r+=t+e.data;return r}},{key:\"concat\",value:function(t){if(0===this.length)return o.alloc(0);for(var e,r,n,i=o.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,r=i,n=s,o.prototype.copy.call(e,r,n),s+=a.data.length,a=a.next;return i}},{key:\"consume\",value:function(t,e){var r;return ti.length?i.length:t;if(a===i.length?n+=i:n+=i.slice(0,t),0==(t-=a)){a===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(a));break}++r}return this.length-=r,n}},{key:\"_getBuffer\",value:function(t){var e=o.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,a=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,a),0==(t-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,e}},{key:l,value:function(t,e){return s(this,function(t){for(var e=1;e0,(function(t){n||(n=t),t&&o.forEach(c),a||(o.forEach(c),i(n))}))}));return e.reduce(u)}},{\"../../../errors\":286,\"./end-of-stream\":295}],298:[function(t,e,r){\"use strict\";var n=t(\"../../../errors\").codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(t,e,r,i){var a=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new n(i?r:\"highWaterMark\",a);return Math.floor(a)}return t.objectMode?16:16384}}},{\"../../../errors\":286}],299:[function(t,e,r){e.exports=t(\"events\").EventEmitter},{events:84}],300:[function(t,e,r){\"use strict\";var n=t(\"safe-buffer\").Buffer,i=n.isEncoding||function(t){switch((t=\"\"+t)&&t.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return\"utf8\";for(var e;;)switch(t){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return t;default:if(e)return;t=(\"\"+t).toLowerCase(),e=!0}}(t);if(\"string\"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error(\"Unknown encoding: \"+t);return e||t}(t),this.encoding){case\"utf16le\":this.text=l,this.end=c,e=4;break;case\"utf8\":this.fillLast=s,e=4;break;case\"base64\":this.text=u,this.end=f,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,\"\\ufffd\";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,\"\\ufffd\";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,\"\\ufffd\"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){if((t.length-e)%2==0){var r=t.toString(\"utf16le\",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,r)}return e}function u(t,e){var r=(t.length-e)%3;return 0===r?t.toString(\"base64\",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):\"\"}r.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return\"\";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString(\"utf8\",e,n)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{\"safe-buffer\":284}],301:[function(t,e,r){(function(r,n){(function(){var r=t(\"assert\"),i=t(\"debug\")(\"stream-parser\");e.exports=function(t){var e=t&&\"function\"==typeof t._transform,r=t&&\"function\"==typeof t._write;if(!e&&!r)throw new Error(\"must pass a Writable or Transform stream in\");i(\"extending Parser into stream\"),t._bytes=o,t._skipBytes=s,e&&(t._passthrough=l);e?t._transform=u:t._write=c};function a(t){i(\"initializing parser stream\"),t._parserBytesLeft=0,t._parserBuffers=[],t._parserBuffered=0,t._parserState=-1,t._parserCallback=null,\"function\"==typeof t.push&&(t._parserOutput=t.push.bind(t)),t._parserInit=!0}function o(t,e){r(!this._parserCallback,'there is already a \"callback\" set!'),r(isFinite(t)&&t>0,'can only buffer a finite number of bytes > 0, got \"'+t+'\"'),this._parserInit||a(this),i(\"buffering %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=0}function s(t,e){r(!this._parserCallback,'there is already a \"callback\" set!'),r(t>0,'can only skip > 0 bytes, got \"'+t+'\"'),this._parserInit||a(this),i(\"skipping %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=1}function l(t,e){r(!this._parserCallback,'There is already a \"callback\" set!'),r(t>0,'can only pass through > 0 bytes, got \"'+t+'\"'),this._parserInit||a(this),i(\"passing through %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=2}function c(t,e,r){this._parserInit||a(this),i(\"write(%o bytes)\",t.length),\"function\"==typeof e&&(r=e),h(this,t,null,r)}function u(t,e,r){this._parserInit||a(this),i(\"transform(%o bytes)\",t.length),\"function\"!=typeof e&&(e=this._parserOutput),h(this,t,e,r)}function f(t,e,r,a){if(t._parserBytesLeft-=e.length,i(\"%o bytes left for stream piece\",t._parserBytesLeft),0===t._parserState?(t._parserBuffers.push(e),t._parserBuffered+=e.length):2===t._parserState&&r(e),0!==t._parserBytesLeft)return a;var o=t._parserCallback;if(o&&0===t._parserState&&t._parserBuffers.length>1&&(e=n.concat(t._parserBuffers,t._parserBuffered)),0!==t._parserState&&(e=null),t._parserCallback=null,t._parserBuffered=0,t._parserState=-1,t._parserBuffers.splice(0),o){var s=[];e&&s.push(e),r&&s.push(r);var l=o.length>s.length;l&&s.push(p(a));var c=o.apply(t,s);if(!l||a===c)return a}}var h=p((function t(e,r,n,i){return e._parserBytesLeft<=0?i(new Error(\"got data but not currently parsing anything\")):r.length<=e._parserBytesLeft?function(){return f(e,r,n,i)}:function(){var a=r.slice(0,e._parserBytesLeft);return f(e,a,n,(function(o){return o?i(o):r.length>a.length?function(){return t(e,r.slice(a.length),n,i)}:void 0}))}}));function p(t){return function(){for(var e=t.apply(this,arguments);\"function\"==typeof e;)e=e();return e}}}).call(this)}).call(this,t(\"_process\"),t(\"buffer\").Buffer)},{_process:277,assert:75,buffer:85,debug:302}],302:[function(t,e,r){(function(n){(function(){function i(){var t;try{t=r.storage.debug}catch(t){}return!t&&void 0!==n&&\"env\"in n&&(t=n.env.DEBUG),t}(r=e.exports=t(\"./debug\")).log=function(){return\"object\"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},r.formatArgs=function(t){var e=this.useColors;if(t[0]=(e?\"%c\":\"\")+this.namespace+(e?\" %c\":\" \")+t[0]+(e?\"%c \":\" \")+\"+\"+r.humanize(this.diff),!e)return;var n=\"color: \"+this.color;t.splice(1,0,n,\"color: inherit\");var i=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){\"%%\"!==t&&(i++,\"%c\"===t&&(a=i))})),t.splice(a,0,n)},r.save=function(t){try{null==t?r.storage.removeItem(\"debug\"):r.storage.debug=t}catch(t){}},r.load=i,r.useColors=function(){if(\"undefined\"!=typeof window&&window.process&&\"renderer\"===window.process.type)return!0;return\"undefined\"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||\"undefined\"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},r.storage=\"undefined\"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),r.colors=[\"lightseagreen\",\"forestgreen\",\"goldenrod\",\"dodgerblue\",\"darkorchid\",\"crimson\"],r.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return\"[UnexpectedJSONParseError]: \"+t.message}},r.enable(i())}).call(this)}).call(this,t(\"_process\"))},{\"./debug\":303,_process:277}],303:[function(t,e,r){var n;function i(t){function e(){if(e.enabled){var t=e,i=+new Date,a=i-(n||i);t.diff=a,t.prev=n,t.curr=i,n=i;for(var o=new Array(arguments.length),s=0;s0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var r=parseFloat(e[1]);switch((e[2]||\"ms\").toLowerCase()){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return 315576e5*r;case\"days\":case\"day\":case\"d\":return r*o;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return r*a;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return r*i;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return r*n;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return r;default:return}}(t);if(\"number\"===l&&!1===isNaN(t))return e.long?s(r=t,o,\"day\")||s(r,a,\"hour\")||s(r,i,\"minute\")||s(r,n,\"second\")||r+\" ms\":function(t){if(t>=o)return Math.round(t/o)+\"d\";if(t>=a)return Math.round(t/a)+\"h\";if(t>=i)return Math.round(t/i)+\"m\";if(t>=n)return Math.round(t/n)+\"s\";return t+\"ms\"}(t);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(t))}},{}],305:[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;s0;){e=c[c.length-1];var p=t[e];if(a[e]=0&&s[e].push(o[g])}a[e]=d}else{if(n[e]===r[e]){var m=[],v=[],y=0;for(d=l.length-1;d>=0;--d){var x=l[d];if(i[x]=!1,m.push(x),v.push(s[x]),y+=s[x].length,o[x]=f.length,x===e){l.length=d;break}}f.push(m);var b=new Array(y);for(d=0;d1&&(i=1),i<-1&&(i=-1),(t*n-e*r<0?-1:1)*Math.acos(i)};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,m=t.sweepFlag,v=void 0===m?0:m,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 T=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(f,2);T>1&&(u*=Math.sqrt(T),f*=Math.sqrt(T));var k=function(t,e,r,n,a,o,l,c,u,f,h,p){var d=Math.pow(a,2),g=Math.pow(o,2),m=Math.pow(h,2),v=Math.pow(p,2),y=d*g-d*v-g*m;y<0&&(y=0),y/=d*v+g*m;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,T=(h-x)/a,k=(p-b)/o,A=(-h-x)/a,M=(-p-b)/o,S=s(1,0,T,k),E=s(T,k,A,M);return 0===c&&E>0&&(E-=i),1===c&&E<0&&(E+=i),[_,w,S,E]}(e,r,l,c,u,f,g,v,x,b,_,w),A=n(k,4),M=A[0],S=A[1],E=A[2],L=A[3],C=Math.abs(L)/(i/4);Math.abs(1-C)<1e-7&&(C=1);var P=Math.max(Math.ceil(C),1);L/=P;for(var I=0;Ie[2]&&(e[2]=c[u+0]),c[u+1]>e[3]&&(e[3]=c[u+1]);return e}},{\"abs-svg-path\":70,assert:75,\"is-svg-path\":238,\"normalize-svg-path\":309,\"parse-svg-path\":250}],309:[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;d4?(o=m[m.length-4],s=m[m.length-3]):(o=h,s=p),r.push(m)}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\":307}],310:[function(t,e,r){\"use strict\";var n,i=t(\"svg-path-bounds\"),a=t(\"parse-svg-path\"),o=t(\"draw-svg-path\"),s=t(\"is-svg-path\"),l=t(\"bitmap-sdf\"),c=document.createElement(\"canvas\"),u=c.getContext(\"2d\");e.exports=function(t,e){if(!s(t))throw Error(\"Argument should be valid svg path string\");e||(e={});var r,f;e.shape?(r=e.shape[0],f=e.shape[1]):(r=c.width=e.w||e.width||200,f=c.height=e.h||e.height||200);var h=Math.min(r,f),p=e.stroke||0,d=e.viewbox||e.viewBox||i(t),g=[r/(d[2]-d[0]),f/(d[3]-d[1])],m=Math.min(g[0]||0,g[1]||0)/2;u.fillStyle=\"black\",u.fillRect(0,0,r,f),u.fillStyle=\"white\",p&&(\"number\"!=typeof p&&(p=1),u.strokeStyle=p>0?\"white\":\"black\",u.lineWidth=Math.abs(p));if(u.translate(.5*r,.5*f),u.scale(m,m),function(){if(null!=n)return n;var t=document.createElement(\"canvas\").getContext(\"2d\");if(t.canvas.width=t.canvas.height=1,!window.Path2D)return n=!1;var e=new Path2D(\"M0,0h1v1h-1v-1Z\");t.fillStyle=\"black\",t.fill(e);var r=t.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var v=new Path2D(t);u.fill(v),p&&u.stroke(v)}else{var y=a(t);o(u,y),u.fill(),p&&u.stroke()}return u.setTransform(1,0,0,1,0,0),l(u,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*h})}},{\"bitmap-sdf\":82,\"draw-svg-path\":126,\"is-svg-path\":238,\"parse-svg-path\":250,\"svg-path-bounds\":308}],311:[function(t,e,r){(function(e,n){(function(){var i=t(\"process/browser.js\").nextTick,a=Function.prototype.apply,o=Array.prototype.slice,s={},l=0;function c(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new c(a.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(a.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate=\"function\"==typeof e?e:function(t){var e=l++,n=!(arguments.length<2)&&o.call(arguments,1);return s[e]=!0,i((function(){s[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate=\"function\"==typeof n?n:function(t){delete s[t]}}).call(this)}).call(this,t(\"timers\").setImmediate,t(\"timers\").clearImmediate)},{\"process/browser.js\":277,timers:311}],312:[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:I(e[1]),g:I(e[2]),b:I(e[3]),a:R(e[4]),format:i?\"name\":\"hex8\"};if(e=j.hex6.exec(t))return{r:I(e[1]),g:I(e[2]),b:I(e[3]),format:i?\"name\":\"hex\"};if(e=j.hex4.exec(t))return{r:I(e[1]+\"\"+e[1]),g:I(e[2]+\"\"+e[2]),b:I(e[3]+\"\"+e[3]),a:R(e[4]+\"\"+e[4]),format:i?\"name\":\"hex8\"};if(e=j.hex3.exec(t))return{r:I(e[1]+\"\"+e[1]),g:I(e[2]+\"\"+e[2]),b:I(e[3]+\"\"+e[3]),format:i?\"name\":\"hex\"};return!1}(e));\"object\"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(p=e.r,d=e.g,g=e.b,i={r:255*C(p,255),g:255*C(d,255),b:255*C(g,255)},f=!0,h=\"%\"===String(e.r).substr(-1)?\"prgb\":\"rgb\"):U(e.h)&&U(e.s)&&U(e.v)?(l=z(e.s),c=z(e.v),i=function(e,r,n){e=6*C(e,360),r=C(r,100),n=C(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\"):U(e.h)&&U(e.s)&&U(e.l)&&(l=z(e.s),u=z(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=C(t,360),e=C(e,100),r=C(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=L(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=C(t,255),e=C(e,255),r=C(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>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(c(n));return a}function M(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=L(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=[O(a(t).toString(16)),O(a(e).toString(16)),O(a(r).toString(16)),O(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*C(this._r,255))+\"%\",g:a(100*C(this._g,255))+\"%\",b:a(100*C(this._b,255))+\"%\",a:this._a}},toPercentageRgbString:function(){return 1==this._a?\"rgb(\"+a(100*C(this._r,255))+\"%, \"+a(100*C(this._g,255))+\"%, \"+a(100*C(this._b,255))+\"%)\":\"rgba(\"+a(100*C(this._r,255))+\"%, \"+a(100*C(this._g,255))+\"%, \"+a(100*C(this._b,255))+\"%, \"+this._roundA+\")\"},toName:function(){return 0===this._a?\"transparent\":!(this._a<1)&&(E[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(v,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(m,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(M,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(T,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]:z(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;ul&&(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\"},E=c.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(S);function L(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function C(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 P(t){return o(1,s(0,t))}function I(t){return parseInt(t,16)}function O(t){return 1==t.length?\"0\"+t:\"\"+t}function z(t){return t<=1&&(t=100*t+\"%\"),t}function D(e){return t.round(255*parseFloat(e)).toString(16)}function R(t){return I(t)/255}var F,B,N,j=(B=\"[\\\\s|\\\\(]+(\"+(F=\"(?:[-\\\\+]?\\\\d*\\\\.\\\\d+%?)|(?:[-\\\\+]?\\\\d+%?)\")+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")\\\\s*\\\\)?\",N=\"[\\\\s|\\\\(]+(\"+F+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")\\\\s*\\\\)?\",{CSS_UNIT:new RegExp(F),rgb:new RegExp(\"rgb\"+B),rgba:new RegExp(\"rgba\"+N),hsl:new RegExp(\"hsl\"+B),hsla:new RegExp(\"hsla\"+N),hsv:new RegExp(\"hsv\"+B),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 U(t){return!!j.CSS_UNIT.exec(t)}void 0!==e&&e.exports?e.exports=c:window.tinycolor=c}(Math)},{}],313:[function(t,e,r){\"use strict\";e.exports=i,e.exports.float32=e.exports.float=i,e.exports.fract32=e.exports.fract=function(t,e){if(t.length){if(t instanceof Float32Array)return new Float32Array(t.length);e instanceof Float32Array||(e=i(t));for(var r=0,n=e.length;ro&&(o=t[0]),t[1]s&&(s=t[1])}function c(t){switch(t.type){case\"GeometryCollection\":t.geometries.forEach(c);break;case\"Point\":l(t.coordinates);break;case\"MultiPoint\":t.coordinates.forEach(l)}}for(e in t.arcs.forEach((function(t){for(var e,r=-1,l=t.length;++ro&&(o=e[0]),e[1]s&&(s=e[1])})),t.objects)c(t.objects[e]);return[i,a,o,s]}function i(t,e){var r=e.id,n=e.bbox,i=null==e.properties?{}:e.properties,o=a(t,e);return null==r&&null==n?{type:\"Feature\",properties:i,geometry:o}:null==n?{type:\"Feature\",id:r,properties:i,geometry:o}:{type:\"Feature\",id:r,bbox:n,properties:i,geometry:o}}function a(t,e){var n=r(t.transform),i=t.arcs;function a(t,e){e.length&&e.pop();for(var r=i[t<0?~t:t],a=0,o=r.length;a1)n=l(t,e,r);else for(i=0,n=new Array(a=t.arcs.length);i1)for(var a,s,c=1,u=l(i[0]);cu&&(s=i[0],i[0]=i[c],i[c]=s,u=a);return i})).filter((function(t){return t.length>0}))}}function u(t,e){for(var r=0,n=t.length;r>>1;t[i]=2))throw new Error(\"n must be \\u22652\");var r,i=(l=t.bbox||n(t))[0],a=l[1],o=l[2],s=l[3];e={scale:[o-i?(o-i)/(r-1):1,s-a?(s-a)/(r-1):1],translate:[i,a]}}var l,c,u=f(e),h=t.objects,p={};function d(t){return u(t)}function g(t){var e;switch(t.type){case\"GeometryCollection\":e={type:\"GeometryCollection\",geometries:t.geometries.map(g)};break;case\"Point\":e={type:\"Point\",coordinates:d(t.coordinates)};break;case\"MultiPoint\":e={type:\"MultiPoint\",coordinates:t.coordinates.map(d)};break;default:return t}return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),null!=t.properties&&(e.properties=t.properties),e}for(c in h)p[c]=g(h[c]);return{type:\"Topology\",bbox:l,transform:e,objects:p,arcs:t.arcs.map((function(t){var e,r=0,n=1,i=t.length,a=new Array(i);for(a[0]=u(t[0],0);++r\":(e.length>100&&(e=e.slice(0,99)+\"\\u2026\"),e=e.replace(i,(function(t){switch(t){case\"\\n\":return\"\\\\n\";case\"\\r\":return\"\\\\r\";case\"\\u2028\":return\"\\\\u2028\";case\"\\u2029\":return\"\\\\u2029\";default:throw new Error(\"Unexpected character\")}})))}},{\"./safe-to-string\":318}],320:[function(t,e,r){\"use strict\";var n=t(\"../value/is\"),i={object:!0,function:!0,undefined:!0};e.exports=function(t){return!!n(t)&&hasOwnProperty.call(i,typeof t)}},{\"../value/is\":326}],321:[function(t,e,r){\"use strict\";var n=t(\"../lib/resolve-exception\"),i=t(\"./is\");e.exports=function(t){return i(t)?t:n(t,\"%v is not a plain function\",arguments[1])}},{\"../lib/resolve-exception\":317,\"./is\":322}],322:[function(t,e,r){\"use strict\";var n=t(\"../function/is\"),i=/^\\s*class[\\s{/}]/,a=Function.prototype.toString;e.exports=function(t){return!!n(t)&&!i.test(a.call(t))}},{\"../function/is\":316}],323:[function(t,e,r){\"use strict\";var n=t(\"../object/is\");e.exports=function(t){if(!n(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(t){return!1}}},{\"../object/is\":320}],324:[function(t,e,r){\"use strict\";var n=t(\"../value/is\"),i=t(\"../object/is\"),a=Object.prototype.toString;e.exports=function(t){if(!n(t))return null;if(i(t)){var e=t.toString;if(\"function\"!=typeof e)return null;if(e===a)return null}try{return\"\"+t}catch(t){return null}}},{\"../object/is\":320,\"../value/is\":326}],325:[function(t,e,r){\"use strict\";var n=t(\"../lib/resolve-exception\"),i=t(\"./is\");e.exports=function(t){return i(t)?t:n(t,\"Cannot use %v\",arguments[1])}},{\"../lib/resolve-exception\":317,\"./is\":326}],326:[function(t,e,r){\"use strict\";e.exports=function(t){return null!=t}},{}],327:[function(t,e,r){(function(e){(function(){\"use strict\";var n=t(\"bit-twiddle\"),i=t(\"dup\"),a=t(\"buffer\").Buffer;e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var o=\"undefined\"!=typeof Uint8ClampedArray,s=\"undefined\"!=typeof BigUint64Array,l=\"undefined\"!=typeof BigInt64Array,c=e.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=i([32,0])),c.BIGUINT64||(c.BIGUINT64=i([32,0])),c.BIGINT64||(c.BIGINT64=i([32,0])),c.BUFFER||(c.BUFFER=i([32,0]));var u=c.DATA,f=c.BUFFER;function h(t){if(t){var e=t.length||t.byteLength,r=n.log2(e);u[r].push(t)}}function p(t){t=n.nextPow2(t);var e=n.log2(t),r=u[e];return r.length>0?r.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function g(t){return new Uint16Array(p(2*t),0,t)}function m(t){return new Uint32Array(p(4*t),0,t)}function v(t){return new Int8Array(p(t),0,t)}function y(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function T(t){return s?new BigUint64Array(p(8*t),0,t):null}function k(t){return l?new BigInt64Array(p(8*t),0,t):null}function A(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=f[e];return r.length>0?r.pop():new a(t)}r.free=function(t){if(a.isBuffer(t))f[n.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|n.log2(e);u[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeBigUint64=r.freeInt8=r.freeInt16=r.freeInt32=r.freeBigInt64=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){h(t.buffer)},r.freeArrayBuffer=h,r.freeBuffer=function(t){f[n.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||\"arraybuffer\"===e)return p(t);switch(e){case\"uint8\":return d(t);case\"uint16\":return g(t);case\"uint32\":return m(t);case\"int8\":return v(t);case\"int16\":return y(t);case\"int32\":return x(t);case\"float\":case\"float32\":return b(t);case\"double\":case\"float64\":return _(t);case\"uint8_clamped\":return w(t);case\"bigint64\":return k(t);case\"biguint64\":return T(t);case\"buffer\":return M(t);case\"data\":case\"dataview\":return A(t);default:return null}return null},r.mallocArrayBuffer=p,r.mallocUint8=d,r.mallocUint16=g,r.mallocUint32=m,r.mallocInt8=v,r.mallocInt16=y,r.mallocInt32=x,r.mallocFloat32=r.mallocFloat=b,r.mallocFloat64=r.mallocDouble=_,r.mallocUint8Clamped=w,r.mallocBigUint64=T,r.mallocBigInt64=k,r.mallocDataView=A,r.mallocBuffer=M,r.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,u[t].length=0,f[t].length=0}}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"bit-twiddle\":81,buffer:85,dup:128}],328:[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):\"\"}},{}],329:[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;n2111)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>13},isIntercalaryMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);return!!r&&r===e},leap year: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.leap year(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;if(!(\"number\"==typeof t&&t>=1888&&t<=2111))throw new Error(\"Lunar year outside range 1888-2111\");if(!(\"number\"==typeof e&&e>=1&&e<=12))throw new Error(\"Lunar month outside range 1 - 12\");if(!(\"number\"==typeof r&&r>=1&&r<=30))throw new Error(\"Lunar day outside range 1 - 30\");\"object\"==typeof n?(l=!1,a=n):(l=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:l}}s=o.day-1;var c,u=f[o.year-f[0]],p=u>>13;c=p&&(o.month>p||o.isIntercalary)?o.month:o.month-1;for(var d=0;d>9&4095,(g>>5&15)-1,(31&g)+s);return a.year=m.getFullYear(),a.month=1+m.getMonth(),a.day=m.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{if(!(\"number\"==typeof t&&t>=1888&&t<=2111))throw new Error(\"Solar year outside range 1888-2111\");if(!(\"number\"==typeof e&&e>=1&&e<=12))throw new Error(\"Solar month outside range 1 - 12\");if(!(\"number\"==typeof r&&r>=1&&r<=31))throw new Error(\"Solar day outside range 1 - 31\");i={year:t,month:e,day:r},a=n||{}}var o=h[i.year-h[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=h[a.year-h[0]];var l,c=new Date(o>>9&4095,(o>>5&15)-1,31&o),u=new Date(i.year,i.month-1,i.day);l=Math.round((u-c)/864e5);var p,d=f[a.year-f[0]];for(p=0;p<13;p++){var g=d&1<<12-p?30:29;if(l>13;!m||p=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\":346,\"object-assign\":247}],335:[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}},leap year: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.leap year(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\":346,\"object-assign\":247}],336:[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}},leap year: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.leap year(t)||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.leap year(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=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=tthis.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\":346,\"object-assign\":247}],337:[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}},leap year: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.leap year(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.leap year(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\":346,\"object-assign\":247}],338:[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}},leap year: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.leap year(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\":346,\"object-assign\":247}],339:[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\"]}},leap year: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;r19||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\":346,\"object-assign\":247}],340:[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:[\"Some\",\"Mangal\",\"Budh\",\"Veer\",\"Shukar\",\"Sanichar\",\"Et\"],dayNamesMin:[\"So\",\"Ma\",\"Bu\",\"Ve\",\"Sh\",\"Sa\",\"Et\"],digits:null,dateFormat:\"dd-mm-yyyy\",firstDay:0,isRTL:!1}},leap year:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[\"\"].invalidYear);return o.leap year(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.leap year(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=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\":346,\"object-assign\":247}],341:[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\",\"Some\",\"Mangl\",\"Budha\",\"Bihi\",\"Shukra\",\"Shani\"],dayNamesMin:[\"Aai\",\"So\",\"Man\",\"Bu\",\"Bi\",\"Shu\",\"Sha\"],digits:null,dateFormat:\"dd/mm/yyyy\",firstDay:1,isRTL:!1}},leap year: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(),void 0===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),void 0===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;r0?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.leap year(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\":346,\"object-assign\":247}],343:[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}},leap year:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(e.year());return a.leap year(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.leap year(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\":346,\"object-assign\":247}],344:[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}},leap year:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(e.year());return a.leap year(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.leap year(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\":346,\"object-assign\":247}],345:[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}},leap year: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;ar)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;ne);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\":346,\"object-assign\":247}],346:[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},leap year:function(){return this._calendar.leap year(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.leap year(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(;oe-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.minDay&&r-this.minDay13.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\":247}],347:[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+n1}),d=function(t,e,r,n){var i=\"\"+e;if(p(t,n))for(;i.length1},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-1){p=1,d=g;for(var E=this.daysInMonth(h,p);d>E;E=this.daysInMonth(h,p))p++,d-=E}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\":346,\"object-assign\":247}],348:[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}]},{}],349:[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;t(\"../../constants/axis_placeable_objects\");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\"}}})},{\"../../constants/axis_placeable_objects\":472,\"../../plot_api/plot_template\":543,\"../../plots/cartesian/constants\":561,\"../../plots/font_attributes\":585,\"./arrow_paths\":348}],350:[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),a=i.getRefType(e.xref),o=i.getRefType(e.yref);e._extremes={},\"range\"===a&&s(e,r),\"range\"===o&&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,m=3*t.startarrowsize*t.arrowwidth||0,v=m+h,y=m-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,v),ppadminus:Math.max(f,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else v=s?v+s:v,y=s?y-s:y,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(u,d,v),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\":503,\"../../plots/cartesian/axes\":554,\"./draw\":355}],351:[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;r0||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;r2/3?\"right\":\"center\"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var W=!1,X=[\"x\",\"y\"],Z=0;Z1)&&(nt===rt?((pt=it.r2fraction(e[\"a\"+et]))<0||pt>1)&&(W=!0):W=!0),J=it._offset+it.r2p(e[et]),$=.5}else{var dt=\"domain\"===ht;\"x\"===et?(Q=e[et],J=dt?it._offset+it._length*Q:J=T.l+T.w*Q):(Q=1-e[et],J=dt?it._offset+it._length*Q:J=T.t+T.h*Q),$=e.showarrow?.5:Q}if(e.showarrow){ft.head=J;var gt=e[\"a\"+et];if(tt=ot*q(.5,e.xanchor)-st*q(.5,e.yanchor),nt===rt){var mt=l.getRefType(nt);\"domain\"===mt?(\"y\"===et&&(gt=1-gt),ft.tail=it._offset+it._length*gt):\"paper\"===mt?\"y\"===et?(gt=1-gt,ft.tail=T.t+T.h*gt):ft.tail=T.l+T.w*gt:ft.tail=it._offset+it.r2p(gt),K=tt}else ft.tail=J+gt,K=tt+gt;ft.text=ft.tail+tt;var vt=w[\"x\"===et?\"width\":\"height\"];if(\"paper\"===rt&&(ft.head=o.constrain(ft.head,1,vt-1)),\"pixel\"===nt){var yt=-Math.max(ft.tail-3,ft.text),xt=Math.min(ft.tail+3,ft.text)-vt;yt>0?(ft.tail+=yt,ft.text+=yt):xt>0&&(ft.tail-=xt,ft.text-=xt)}ft.tail+=ut,ft.head+=ut}else K=tt=lt*q($,ct),ft.text=J+tt;ft.text+=ut,tt+=ut,K+=ut,e[\"_\"+et+\"padplus\"]=lt/2+K,e[\"_\"+et+\"padminus\"]=lt/2-K,e[\"_\"+et+\"size\"]=lt,e[\"_\"+et+\"shift\"]=tt}if(W)R.remove();else{var bt=0,_t=0;if(\"left\"!==e.align&&(bt=(A-b)*(\"center\"===e.align?.5:1)),\"top\"!==e.valign&&(_t=(D-_)*(\"middle\"===e.valign?.5:1)),f)n.select(\"svg\").attr({x:N+bt-1,y:N+_t}).call(u.setClipUrl,U?L:null,t);else{var wt=N+_t-g.top,Tt=N+bt-g.left;G.call(h.positionText,Tt,wt).call(u.setClipUrl,U?L:null,t)}V.select(\"rect\").call(u.setRect,N,N,A,D),j.call(u.setRect,F/2,F/2,B-F,H-F),R.call(u.setTranslate,Math.round(C.x.text-B/2),Math.round(C.y.text-H/2)),O.attr({transform:\"rotate(\"+P+\",\"+C.x.text+\",\"+C.y.text+\")\"});var kt,At=function(r,n){I.selectAll(\".annotation-arrow-g\").remove();var l=C.x.head,f=C.y.head,h=C.x.tail+r,p=C.y.tail+n,g=C.x.text+r,b=C.y.text+n,_=o.rotationXYMatrix(P,g,b),w=o.apply2DTransform(_),A=o.apply2DTransform2(_),L=+j.attr(\"width\"),z=+j.attr(\"height\"),D=g-.5*L,F=D+L,B=b-.5*z,N=B+z,U=[[D,B,D,N],[D,N,F,N],[F,N,F,B],[F,B,D,B]].map(A);if(!U.reduce((function(t,e){return t^!!o.segmentsIntersect(l,f,l+1e6,f+1e6,e[0],e[1],e[2],e[3])}),!1)){U.forEach((function(t){var e=o.segmentsIntersect(h,p,l,f,t[0],t[1],t[2],t[3]);e&&(h=e.x,p=e.y)}));var V=e.arrowwidth,H=e.arrowcolor,q=e.arrowside,G=I.append(\"g\").style({opacity:c.opacity(H)}).classed(\"annotation-arrow-g\",!0),Y=G.append(\"path\").attr(\"d\",\"M\"+h+\",\"+p+\"L\"+l+\",\"+f).style(\"stroke-width\",V+\"px\").call(c.stroke,c.rgb(H));if(m(Y,q,e),k.annotationPosition&&Y.node().parentNode&&!a){var W=l,X=f;if(e.standoff){var Z=Math.sqrt(Math.pow(l-h,2)+Math.pow(f-p,2));W+=e.standoff*(h-l)/Z,X+=e.standoff*(p-f)/Z}var J,K,Q=G.append(\"path\").classed(\"annotation-arrow\",!0).classed(\"anndrag\",!0).classed(\"cursor-move\",!0).attr({d:\"M3,3H-3V-3H3ZM0,0L\"+(h-W)+\",\"+(p-X),transform:s(W,X)}).style(\"stroke-width\",V+6+\"px\").call(c.stroke,\"rgba(0,0,0,0)\").call(c.fill,\"rgba(0,0,0,0)\");d.init({element:Q.node(),gd:t,prepFn:function(){var t=u.getTranslate(R);J=t.x,K=t.y,v&&v.autorange&&M(v._name+\".autorange\",!0),x&&x.autorange&&M(x._name+\".autorange\",!0)},moveFn:function(t,r){var n=w(J,K),i=n[0]+t,a=n[1]+r;R.call(u.setTranslate,i,a),S(\"x\",y(v,t,\"x\",T,e)),S(\"y\",y(x,r,\"y\",T,e)),e.axref===e.xref&&S(\"ax\",y(v,t,\"ax\",T,e)),e.ayref===e.yref&&S(\"ay\",y(x,r,\"ay\",T,e)),G.attr(\"transform\",s(t,r)),O.attr({transform:\"rotate(\"+P+\",\"+i+\",\"+a+\")\"})},doneFn:function(){i.call(\"_guiRelayout\",t,E());var e=document.querySelector(\".js-notes-box-panel\");e&&e.redraw(e.selectedObj)}})}}};if(e.showarrow&&At(0,0),z)d.init({element:R.node(),gd:t,prepFn:function(){kt=O.attr(\"transform\")},moveFn:function(t,r){var n=\"pointer\";if(e.showarrow)e.axref===e.xref?S(\"ax\",y(v,t,\"ax\",T,e)):S(\"ax\",e.ax+t),e.ayref===e.yref?S(\"ay\",y(x,r,\"ay\",T.w,e)):S(\"ay\",e.ay+r),At(t,r);else{if(a)return;var i,o;if(v)i=y(v,t,\"x\",T,e);else{var l=e._xsize/T.w,c=e.x+(e._xshift-e.xshift)/T.w-l/2;i=d.align(c+t/T.w,l,0,1,e.xanchor)}if(x)o=y(x,r,\"y\",T,e);else{var u=e._ysize/T.h,f=e.y-(e._yshift+e.yshift)/T.h-u/2;o=d.align(f-r/T.h,u,0,1,e.yanchor)}S(\"x\",i),S(\"y\",o),v&&x||(n=d.getCursor(v?.5:i,x?.5:o,e.xanchor,e.yanchor))}O.attr({transform:s(t,r)+kt}),p(R,n)},clickFn:function(r,n){e.captureevents&&t.emit(\"plotly_clickannotation\",Y(n))},doneFn:function(){p(R),i.call(\"_guiRelayout\",t,E());var e=document.querySelector(\".js-notes-box-panel\");e&&e.redraw(e.selectedObj)}})}}}e.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(\".annotation\").remove();for(var r=0;r=0,x=e.indexOf(\"end\")>=0,b=d.backoff*m+r.standoff,_=g.backoff*v+r.startstandoff;if(\"line\"===p.nodeName){o={x:+t.attr(\"x1\"),y:+t.attr(\"y1\")},u={x:+t.attr(\"x2\"),y:+t.attr(\"y2\")};var w=o.x-u.x,T=o.y-u.y;if(h=(f=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T))return void z();if(b){if(b*b>w*w+T*T)return void z();var k=b*Math.cos(f),A=b*Math.sin(f);u.x+=k,u.y+=A,t.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+T*T)return void z();var M=_*Math.cos(f),S=_*Math.sin(f);o.x-=M,o.y-=S,t.attr({x1:o.x,y1:o.y})}}else if(\"path\"===p.nodeName){var E=p.getTotalLength(),L=\"\";if(E1){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\":607,\"../annotations/draw\":355}],362:[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=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+\")\"}o.tinyRGB=function(t){var e=t.toRgb();return\"rgb(\"+Math.round(e.r)+\", \"+Math.round(e.g)+\", \"+Math.round(e.b)+\")\"},o.rgb=function(t){return o.tinyRGB(n(t))},o.opacity=function(t){return t?n(t).getAlpha():0},o.addOpacity=function(t,e){var r=n(t).toRgb();return\"rgba(\"+Math.round(r.r)+\", \"+Math.round(r.g)+\", \"+Math.round(r.b)+\", \"+e+\")\"},o.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||c).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()},o.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(o.combine(t,c))),(i.isDark()?e?i.lighten(e):c:r?i.darken(r):l).toString()},o.stroke=function(t,e){var r=n(e);t.style({stroke:o.tinyRGB(r),\"stroke-opacity\":r.getAlpha()})},o.fill=function(t,e){var r=n(e);t.style({fill:o.tinyRGB(r),\"fill-opacity\":r.getAlpha()})},o.clean=function(t){if(t&&\"object\"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e0?n>=l:n<=l));i++)n>u&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var ct=Math.pow(10,Math.floor(Math.log(lt)/Math.LN10));ot*=ct*c.roundUp(lt/ct,[2,5,10]),(Math.abs(q.start)/q.size+1e-6)%1<2e-6&&(it.tick0=0)}it.dtick=ot}it.domain=o?[rt+I/R.h,rt+K-I/R.h]:[rt+P/R.w,rt+K-P/R.w],it.setScale(),t.attr(\"transform\",u(Math.round(R.l),Math.round(R.t)));var ut,ft=t.select(\".\"+A.cbtitleunshift).attr(\"transform\",u(-Math.round(R.l),-Math.round(R.t))),ht=it.ticklabelposition,pt=it.title.font.size,dt=t.select(\".\"+A.cbaxis),gt=0,mt=0;function vt(n,i){var a={propContainer:it,propName:e._propPrefix+\"title\",traceIndex:e._traceIndex,_meta:e._meta,placeholder:D._dfltTitle.colorbar,containerGroup:t.select(\".\"+A.cbtitle)},o=\"h\"===n.charAt(0)?n.substr(1):\"h\"+n;t.selectAll(\".\"+o+\",.\"+o+\"-math-group\").remove(),g.draw(r,n,f(a,i||{}))}return c.syncOrAsync([a.previousPromises,function(){var t,e;(o&&at||!o&&!at)&&(\"top\"===j&&(t=P+R.l+R.w*O,e=I+R.t+R.h*(1-rt-K)+3+.75*pt),\"bottom\"===j&&(t=P+R.l+R.w*O,e=I+R.t+R.h*(1-rt)-3-.25*pt),\"right\"===j&&(e=I+R.t+R.h*z+3+.75*pt,t=P+R.l+R.w*rt),vt(it._id+\"title\",{attributes:{x:t,y:e,\"text-anchor\":o?\"start\":\"middle\"}}))},function(){if(!o&&!at||o&&at){var a,l=t.select(\".\"+A.cbtitle),f=l.select(\"text\"),h=[-M/2,M/2],d=l.select(\".h\"+it._id+\"title-math-group\").node(),g=15.6;if(f.node()&&(g=parseInt(f.node().style.fontSize,10)*w),d?(a=p.bBox(d),mt=a.width,(gt=a.height)>g&&(h[1]-=(gt-g)/2)):f.node()&&!f.classed(A.jsPlaceholder)&&(a=p.bBox(f.node()),mt=a.width,gt=a.height),o){if(gt){if(gt+=5,\"top\"===j)it.domain[1]-=gt/R.h,h[1]*=-1;else{it.domain[0]+=gt/R.h;var v=m.lineCount(f);h[1]+=(1-v)*g}l.attr(\"transform\",u(h[0],h[1])),it.setScale()}}else mt&&(\"right\"===j&&(it.domain[0]+=(mt+pt/2)/R.w),l.attr(\"transform\",u(h[0],h[1])),it.setScale())}t.selectAll(\".\"+A.cbfills+\",.\"+A.cblines).attr(\"transform\",o?u(0,Math.round(R.h*(1-it.domain[1]))):u(Math.round(R.w*it.domain[0]),0)),dt.attr(\"transform\",o?u(0,Math.round(-R.t)):u(Math.round(-R.l),0));var y=t.select(\".\"+A.cbfills).selectAll(\"rect.\"+A.cbfill).attr(\"style\",\"\").data(Y);y.enter().append(\"rect\").classed(A.cbfill,!0).style(\"stroke\",\"none\"),y.exit().remove();var x=U.map(it.c2p).map(Math.round).sort((function(t,e){return t-e}));y.each((function(t,a){var s=[0===a?U[0]:(Y[a]+Y[a-1])/2,a===Y.length-1?U[1]:(Y[a]+Y[a+1])/2].map(it.c2p).map(Math.round);o&&(s[1]=c.constrain(s[1]+(s[1]>s[0])?1:-1,x[0],x[1]));var l=n.select(this).attr(o?\"x\":\"y\",Q).attr(o?\"y\":\"x\",n.min(s)).attr(o?\"width\":\"height\",Math.max(X,2)).attr(o?\"height\":\"width\",Math.max(n.max(s)-n.min(s),2));if(e._fillgradient)p.gradient(l,r,e._id,o?\"vertical\":\"horizontalreversed\",e._fillgradient,\"fill\");else{var u=H(t).replace(\"e-\",\"\");l.attr(\"fill\",i(u).toHexString())}}));var b=t.select(\".\"+A.cblines).selectAll(\"path.\"+A.cbline).data(B.color&&B.width?W:[]);b.enter().append(\"path\").classed(A.cbline,!0),b.exit().remove(),b.each((function(t){var e=Q,r=Math.round(it.c2p(t))+B.width/2%1;n.select(this).attr(\"d\",\"M\"+(o?e+\",\"+r:r+\",\"+e)+(o?\"h\":\"v\")+X).call(p.lineGroupStyle,B.width,V(t),B.dash)})),dt.selectAll(\"g.\"+it._id+\"tick,path\").remove();var _=Q+X+(M||0)/2-(\"outside\"===e.ticks?1:0),T=s.calcTicks(it),k=s.getTickSigns(it)[2];return s.drawTicks(r,it,{vals:\"inside\"===it.ticks?s.clipEnds(it,T):T,layer:dt,path:s.makeTickPath(it,_,k),transFn:s.makeTransTickFn(it)}),s.drawLabels(r,it,{vals:T,layer:dt,transFn:s.makeTransTickLabelFn(it),labelFns:s.makeLabelFns(it,_)})},function(){if(o&&!at||!o&&at){var t,i,a=it.position||0,s=it._offset+it._length/2;if(\"right\"===j)i=s,t=R.l+R.w*a+10+pt*(it.showticklabels?1:.5);else if(t=s,\"bottom\"===j&&(i=R.t+R.h*a+10+(-1===ht.indexOf(\"inside\")?it.tickfont.size:0)+(\"intside\"!==it.ticks&&e.ticklen||0)),\"top\"===j){var l=N.text.split(\"
\").length;i=R.t+R.h*a+10-X-w*pt*l}vt((o?\"h\":\"v\")+it._id+\"title\",{avoid:{selection:n.select(r).selectAll(\"g.\"+it._id+\"tick\"),side:j,offsetTop:o?0:R.t,offsetLeft:o?R.l:0,maxShift:o?D.width:D.height},attributes:{x:t,y:i,\"text-anchor\":\"middle\"},transform:{rotate:o?-90:0,offset:0}})}},a.previousPromises,function(){var n,s=X+M/2;-1===ht.indexOf(\"inside\")&&(n=p.bBox(dt.node()),s+=o?n.width:n.height),ut=ft.select(\"text\");var c=0,f=o&&\"top\"===j,g=!o&&\"right\"===j,m=0;if(ut.node()&&!ut.classed(A.jsPlaceholder)){var y,x=ft.select(\".h\"+it._id+\"title-math-group\").node();x&&(o&&at||!o&&!at)?(c=(n=p.bBox(x)).width,y=n.height):(c=(n=p.bBox(ft.node())).right-R.l-(o?Q:nt),y=n.bottom-R.t-(o?nt:Q),o||\"top\"!==j||(s+=n.height,m=n.height)),g&&(ut.attr(\"transform\",u(c/2+pt/2,0)),c*=2),s=Math.max(s,o?c:y)}var b=2*(o?P:I)+s+S+M/2,w=0;!o&&N.text&&\"bottom\"===C&&z<=0&&(b+=w=b/2,m+=w),D._hColorbarMoveTitle=w,D._hColorbarMoveCBTitle=m;var F=S+M;t.select(\".\"+A.cbbg).attr(\"x\",(o?Q:nt)-F/2-(o?P:0)).attr(\"y\",(o?nt:Q)-(o?J:I+m-w)).attr(o?\"width\":\"height\",Math.max(b-w,2)).attr(o?\"height\":\"width\",Math.max(J+F,2)).call(d.fill,E).call(d.stroke,e.bordercolor).style(\"stroke-width\",S);var B=g?Math.max(c-10,0):0;if(t.selectAll(\".\"+A.cboutline).attr(\"x\",(o?Q:nt+P)+B).attr(\"y\",(o?nt+I-J:Q)+(f?gt:0)).attr(o?\"width\":\"height\",Math.max(X,2)).attr(o?\"height\":\"width\",Math.max(J-(o?2*I+gt:2*P+B),2)).call(d.stroke,e.outlinecolor).style({fill:\"none\",\"stroke-width\":M}),t.attr(\"transform\",u(R.l-(o?$*b:0),R.t-(o?0:(1-tt)*b-m))),!o&&(S||i(E).getAlpha()&&!i.equals(D.paper_bgcolor,E))){var U=dt.selectAll(\"text\"),V=U[0].length,H=t.select(\".\"+A.cbbg).node(),q=p.bBox(H),G=p.getTranslate(t);U.each((function(t,e){var r=V-1;if(0===e||e===r){var n,i=p.bBox(this),a=p.getTranslate(this);if(e===r){var o=i.right+a.x;(n=q.right+G.x+nt-S-2+O-o)>0&&(n=0)}else if(0===e){var s=i.left+a.x;(n=q.left+G.x+nt+S+2-s)<0&&(n=0)}n&&(V<3?this.setAttribute(\"transform\",\"translate(\"+n+\",0) \"+this.getAttribute(\"transform\")):this.setAttribute(\"visibility\",\"hidden\"))}}))}var Y={},W=T[L],Z=k[L],K=T[C],et=k[C],rt=b-X;o?(\"pixels\"===h?(Y.y=z,Y.t=J*K,Y.b=J*et):(Y.t=Y.b=0,Y.yt=z+l*K,Y.yb=z-l*et),\"pixels\"===_?(Y.x=O,Y.l=b*W,Y.r=b*Z):(Y.l=rt*W,Y.r=rt*Z,Y.xl=O-v*W,Y.xr=O+v*Z)):(\"pixels\"===h?(Y.x=O,Y.l=J*W,Y.r=J*Z):(Y.l=Y.r=0,Y.xl=O+l*W,Y.xr=O-l*Z),\"pixels\"===_?(Y.y=1-z,Y.t=b*K,Y.b=b*et):(Y.t=rt*K,Y.b=rt*et,Y.yt=z-v*K,Y.yb=z+v*et)),a.autoMargin(r,e._id,Y)}],r)}(r,e,t);v&&v.then&&(t._promises||[]).push(v),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,a,s=\"v\"===e.orientation,c=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr(\"transform\"),h(t)},moveFn:function(r,o){t.attr(\"transform\",n+u(r,o)),i=l.align((s?e._uFrac:e._vFrac)+r/c.w,s?e._thickFrac:e._lenFrac,0,1,e.xanchor),a=l.align((s?e._vFrac:1-e._uFrac)-o/c.h,s?e._lenFrac:e._thickFrac,0,1,e.yanchor);var f=l.getCursor(i,a,e.xanchor,e.yanchor);h(t,f)},doneFn:function(){if(h(t),void 0!==i&&void 0!==a){var n={};n[e._propPrefix+\"x\"]=i,n[e._propPrefix+\"y\"]=a,void 0!==e._traceIndex?o.call(\"_guiRestyle\",r,n,e._traceIndex):o.call(\"_guiRelayout\",r,n)}}})}(r,e,t)})),e.exit().each((function(e){a.autoMargin(t,e._id)})).remove(),e.order()}}},{\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/extend\":493,\"../../lib/setcursor\":524,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../plots/cartesian/axis_defaults\":556,\"../../plots/cartesian/layout_attributes\":569,\"../../plots/cartesian/position_defaults\":572,\"../../plots/plots\":619,\"../../registry\":638,\"../color\":366,\"../colorscale/helpers\":377,\"../dragelement\":385,\"../drawing\":388,\"../titles\":464,\"./constants\":368,\"@plotly/d3\":58,tinycolor2:312}],371:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t){return n.isPlainObject(t.colorbar)}},{\"../../lib\":503}],372:[function(t,e,r){\"use strict\";e.exports={moduleType:\"component\",name:\"colorbar\",attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),draw:t(\"./draw\").draw,hasColorbar:t(\"./has_colorbar\")}},{\"./attributes\":367,\"./defaults\":369,\"./draw\":370,\"./has_colorbar\":371}],373:[function(t,e,r){\"use strict\";var n=t(\"../colorbar/attributes\"),i=t(\"../../lib/regex\").counter,a=t(\"../../lib/sort_object_keys\"),o=t(\"./scales.js\").scales;a(o);function s(t){return\"`\"+t+\"`\"}e.exports=function(t,e){t=t||\"\";var r,a=(e=e||{}).cLetter||\"c\",l=(\"onlyIfNumerical\"in e?e.onlyIfNumerical:Boolean(t),\"noScale\"in e?e.noScale:\"marker.line\"===t),c=\"showScaleDflt\"in e?e.showScaleDflt:\"z\"===a,u=\"string\"==typeof e.colorscaleDflt?o[e.colorscaleDflt]:null,f=e.editTypeOverride||\"\",h=t?t+\".\":\"\";\"colorAttr\"in e?(r=e.colorAttr,e.colorAttr):s(h+(r={z:\"z\",c:\"color\"}[a]));var p=a+\"auto\",d=a+\"min\",g=a+\"max\",m=a+\"mid\",v=(s(h+p),s(h+d),s(h+g),{});v[d]=v[g]=void 0;var y={};y[p]=!1;var x={};return\"color\"===r&&(x.color={valType:\"color\",arrayOk:!0,editType:f||\"style\"},e.anim&&(x.color.anim=!0)),x[p]={valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:v},x[d]={valType:\"number\",dflt:null,editType:f||\"plot\",impliedEdits:y},x[g]={valType:\"number\",dflt:null,editType:f||\"plot\",impliedEdits:y},x[m]={valType:\"number\",dflt:null,editType:\"calc\",impliedEdits:v},x.colorscale={valType:\"colorscale\",editType:\"calc\",dflt:u,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:\"boolean\",dflt:!1!==e.autoColorDflt,editType:\"calc\",impliedEdits:{colorscale:void 0}},x.reversescale={valType:\"boolean\",dflt:!1,editType:\"plot\"},l||(x.showscale={valType:\"boolean\",dflt:c,editType:\"calc\"},x.colorbar=n),e.noColorAxis||(x.coloraxis={valType:\"subplotid\",regex:i(\"coloraxis\"),dflt:null,editType:\"calc\"}),x}},{\"../../lib/regex\":520,\"../../lib/sort_object_keys\":526,\"../colorbar/attributes\":367,\"./scales.js\":381}],374:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"./helpers\").extractOpts;e.exports=function(t,e,r){var o,s=t._fullLayout,l=r.vals,c=r.containerStr,u=c?i.nestedProperty(e,c).get():e,f=a(u),h=!1!==f.auto,p=f.min,d=f.max,g=f.mid,m=function(){return i.aggNums(Math.min,null,l)},v=function(){return i.aggNums(Math.max,null,l)};(void 0===p?p=m():h&&(p=u._colorAx&&n(p)?Math.min(p,m()):m()),void 0===d?d=v():h&&(d=u._colorAx&&n(d)?Math.max(d,v()):v()),h&&void 0!==g&&(d-g>g-p?p=g-(d-g):d-g=0?s.colorscale.sequential:s.colorscale.sequentialminus,f._sync(\"colorscale\",o))}},{\"../../lib\":503,\"./helpers\":377,\"fast-isnumeric\":190}],375:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./helpers\").hasColorscale,a=t(\"./helpers\").extractOpts;e.exports=function(t,e){function r(t,e){var r=t[\"_\"+e];void 0!==r&&(t[e]=r)}function o(t,i){var o=i.container?n.nestedProperty(t,i.container).get():t;if(o)if(o.coloraxis)o._colorAx=e[o.coloraxis];else{var s=a(o),l=s.auto;(l||void 0===s.min)&&r(o,i.min),(l||void 0===s.max)&&r(o,i.max),s.autocolorscale&&r(o,\"colorscale\")}}for(var s=0;s=0;n--,i++){var a=t[n];r[i]=[1-a[0],a[1]]}return r}function d(t,e){e=e||{};for(var r=t.domain,o=t.range,l=o.length,c=new Array(l),u=0;u4/3-s?o:s}},{}],383:[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\":503}],384:[function(t,e,r){\"use strict\";r.selectMode=function(t){return\"lasso\"===t||\"select\"===t},r.drawMode=function(t){return\"drawclosedpath\"===t||\"drawopenpath\"===t||\"drawline\"===t||\"drawrect\"===t||\"drawcircle\"===t},r.openMode=function(t){return\"drawline\"===t||\"drawopenpath\"===t},r.rectMode=function(t){return\"select\"===t||\"drawline\"===t||\"drawrect\"===t||\"drawcircle\"===t},r.freeMode=function(t){return\"lasso\"===t||\"drawclosedpath\"===t||\"drawopenpath\"===t},r.selectingOrDrawing=function(t){return r.freeMode(t)||r.rectMode(t)}},{}],385:[function(t,e,r){\"use strict\";var n=t(\"mouse-event-offset\"),i=t(\"has-hover\"),a=t(\"has-passive-events\"),o=t(\"../../lib\").removeElement,s=t(\"../../plots/cartesian/constants\"),l=e.exports={};l.align=t(\"./align\"),l.getCursor=t(\"./cursor\");var c=t(\"./unhover\");function u(){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 f(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(t){var e,r,n,c,h,p,d,g,m=t.gd,v=1,y=m._context.doubleClickDelay,x=t.element;m._mouseDownTime||(m._mouseDownTime=0),x.style.pointerEvents=\"all\",x.onmousedown=_,a?(x._ontouchstart&&x.removeEventListener(\"touchstart\",x._ontouchstart),x._ontouchstart=_,x.addEventListener(\"touchstart\",_,{passive:!1})):x.ontouchstart=_;var b=t.clampFn||function(t,e,r){return Math.abs(t)y&&(v=Math.max(v-1,1)),m._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(v,p),!g){var r;try{r=new MouseEvent(\"click\",e)}catch(t){var n=f(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)}d.dispatchEvent(r)}m._dragging=!1,m._dragged=!1}else m._dragged=!1}},l.coverSlip=u},{\"../../lib\":503,\"../../plots/cartesian/constants\":561,\"./align\":382,\"./cursor\":383,\"./unhover\":386,\"has-hover\":228,\"has-passive-events\":229,\"mouse-event-offset\":242}],386:[function(t,e,r){\"use strict\";var n=t(\"../../lib/events\"),i=t(\"../../lib/throttle\"),a=t(\"../../lib/dom\").getGraphDiv,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&&!t._dragged&&!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/dom\":491,\"../../lib/events\":492,\"../../lib/throttle\":530,\"../fx/constants\":400}],387:[function(t,e,r){\"use strict\";r.dash={valType:\"string\",values:[\"solid\",\"dot\",\"dash\",\"longdash\",\"dashdot\",\"longdashdot\"],dflt:\"solid\",editType:\"style\"},r.pattern={shape:{valType:\"enumerated\",values:[\"\",\"/\",\"\\\\\",\"x\",\"-\",\"|\",\"+\",\".\"],dflt:\"\",arrayOk:!0,editType:\"style\"},fillmode:{valType:\"enumerated\",values:[\"replace\",\"overlay\"],dflt:\"replace\",editType:\"style\"},bgcolor:{valType:\"color\",arrayOk:!0,editType:\"style\"},fgcolor:{valType:\"color\",arrayOk:!0,editType:\"style\"},fgopacity:{valType:\"number\",editType:\"style\",min:0,max:1},size:{valType:\"number\",min:0,dflt:8,arrayOk:!0,editType:\"style\"},solidity:{valType:\"number\",min:0,max:1,dflt:.3,arrayOk:!0,editType:\"style\"},editType:\"style\"}},{}],388:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.numberFormat,o=t(\"fast-isnumeric\"),s=t(\"tinycolor2\"),l=t(\"../../registry\"),c=t(\"../color\"),u=t(\"../colorscale\"),f=i.strTranslate,h=t(\"../../lib/svg_text_utils\"),p=t(\"../../constants/xmlns_namespaces\"),d=t(\"../../constants/alignment\").LINE_SPACING,g=t(\"../../constants/interactions\").DESELECTDIM,m=t(\"../../traces/scatter/subtypes\"),v=t(\"../../traces/scatter/make_bubble_size_func\"),y=t(\"../../components/fx/helpers\").appendArrayPointValue,x=e.exports={};x.font=function(t,e,r,n){i.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(c.fill,n)},x.setPosition=function(t,e,r){t.attr(\"x\",e).attr(\"y\",r)},x.setSize=function(t,e,r){t.attr(\"width\",e).attr(\"height\",r)},x.setRect=function(t,e,r,n,i){t.call(x.setPosition,e,r).call(x.setSize,n,i)},x.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),a=n.c2p(t.y);return!!(o(i)&&o(a)&&e.node())&&(\"text\"===e.node().nodeName?e.attr(\"x\",i).attr(\"y\",a):e.attr(\"transform\",f(i,a)),!0)},x.translatePoints=function(t,e,r){t.each((function(t){var i=n.select(this);x.translatePoint(t,i,e,r)}))},x.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr(\"display\",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:\"none\")},x.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,c=l.traceIs(a,\"bar-like\")?\".bartext\":\".point,.textpoint\";t.selectAll(c).each((function(t){x.hideOutsideRangePoint(t,n.select(this),r,i,o,s)}))}))}},x.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},x.singleLineStyle=function(t,e,r,n,i){e.style(\"fill\",\"none\");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||\"\";c.stroke(e,n||a.color),x.dashLine(e,s,o)},x.lineGroupStyle=function(t,e,r,i){t.style(\"fill\",\"none\").each((function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,s=i||a.dash||\"\";n.select(this).call(c.stroke,r||a.color).call(x.dashLine,s,o)}))},x.dashLine=function(t,e,r){r=+r||0,e=x.dashStyle(e,r),t.style({\"stroke-dasharray\":e,\"stroke-width\":r+\"px\"})},x.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},x.singleFillStyle=function(t){var e=(((n.select(t.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;e&&t.call(c.fill,e)},x.fillGroupStyle=function(t){t.style(\"stroke-width\",0).each((function(t){var e=n.select(this);t[0].trace&&e.call(c.fill,t[0].trace.fillcolor)}))};var b=t(\"./symbol_defs\");x.symbolNames=[],x.symbolFuncs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(b).forEach((function(t){var e=b[t],r=e.n;x.symbolList.push(r,String(r),t,r+100,String(r+100),t+\"-open\"),x.symbolNames[r]=t,x.symbolFuncs[r]=e.f,e.needLine&&(x.symbolNeedLines[r]=!0),e.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),t+\"-dot\",r+300,String(r+300),t+\"-open-dot\"),e.noFill&&(x.symbolNoFill[r]=!0)}));var _=x.symbolNames.length;function w(t,e){var r=t%100;return x.symbolFuncs[r](e)+(t>=200?\"M0,0.5L0.5,0L0,-0.5L-0.5,0Z\":\"\")}x.symbolNumber=function(t){if(o(t))t=+t;else 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=x.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=_||t>=400?0:Math.floor(Math.max(t,0))};var T={x1:1,x2:0,y1:0,y2:0},k={x1:0,x2:0,y1:1,y2:0},A=a(\"~f\"),M={radial:{node:\"radialGradient\"},radialreversed:{node:\"radialGradient\",reversed:!0},horizontal:{node:\"linearGradient\",attrs:T},horizontalreversed:{node:\"linearGradient\",attrs:T,reversed:!0},vertical:{node:\"linearGradient\",attrs:k},verticalreversed:{node:\"linearGradient\",attrs:k,reversed:!0}};x.gradient=function(t,e,r,a,o,l){for(var u=o.length,f=M[a],h=new Array(u),p=0;p\"+v(t);d._gradientUrlQueryParts[y]=1},x.pattern=function(t,e,r,a,o,s,l,u,f,h,p,d){var g=\"legend\"===e;u&&(\"overlay\"===f?(h=u,p=c.contrast(h)):(h=void 0,p=u));var m,v,y,x,b,_,w,T,k,A,M,S=r._fullLayout,E=\"p\"+S._uid+\"-\"+a,L={};switch(o){case\"/\":m=s*Math.sqrt(2),v=s*Math.sqrt(2),_=\"path\",L={d:y=\"M-\"+m/4+\",\"+v/4+\"l\"+m/2+\",-\"+v/2+\"M0,\"+v+\"L\"+m+\",0M\"+m/4*3+\",\"+v/4*5+\"l\"+m/2+\",-\"+v/2,opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"\\\\\":m=s*Math.sqrt(2),v=s*Math.sqrt(2),_=\"path\",L={d:y=\"M\"+m/4*3+\",-\"+v/4+\"l\"+m/2+\",\"+v/2+\"M0,0L\"+m+\",\"+v+\"M-\"+m/4+\",\"+v/4*3+\"l\"+m/2+\",\"+v/2,opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"x\":m=s*Math.sqrt(2),v=s*Math.sqrt(2),y=\"M-\"+m/4+\",\"+v/4+\"l\"+m/2+\",-\"+v/2+\"M0,\"+v+\"L\"+m+\",0M\"+m/4*3+\",\"+v/4*5+\"l\"+m/2+\",-\"+v/2+\"M\"+m/4*3+\",-\"+v/4+\"l\"+m/2+\",\"+v/2+\"M0,0L\"+m+\",\"+v+\"M-\"+m/4+\",\"+v/4*3+\"l\"+m/2+\",\"+v/2,x=s-s*Math.sqrt(1-l),_=\"path\",L={d:y,opacity:d,stroke:p,\"stroke-width\":x+\"px\"};break;case\"|\":_=\"path\",_=\"path\",L={d:y=\"M\"+(m=s)/2+\",0L\"+m/2+\",\"+(v=s),opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"-\":_=\"path\",_=\"path\",L={d:y=\"M0,\"+(v=s)/2+\"L\"+(m=s)+\",\"+v/2,opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"+\":_=\"path\",y=\"M\"+(m=s)/2+\",0L\"+m/2+\",\"+(v=s)+\"M0,\"+v/2+\"L\"+m+\",\"+v/2,x=s-s*Math.sqrt(1-l),_=\"path\",L={d:y,opacity:d,stroke:p,\"stroke-width\":x+\"px\"};break;case\".\":m=s,v=s,l.pattern_filled\";S._patternUrlQueryParts[I]=1},x.initGradients=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,\"g\",\"gradients\").selectAll(\"linearGradient,radialGradient\").remove(),e._gradientUrlQueryParts={}},x.initPatterns=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,\"g\",\"patterns\").selectAll(\"pattern\").remove(),e._patternUrlQueryParts={}},x.getPatternAttr=function(t,e,r){return t&&i.isArrayOrTypedArray(t)?e=100,e.attr(\"d\",w(u,l))}var f,h,p,d=!1;if(t.so)p=s.outlierwidth,h=s.outliercolor,f=o.outliercolor;else{var g=(s||{}).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):i.isArrayOrTypedArray(s.color)?c.defaultLine:s.color,i.isArrayOrTypedArray(o.color)&&(f=c.defaultLine,d=!0),f=\"mc\"in t?t.mcc=n.markerScale(t.mc):o.color||\"rgba(0,0,0,0)\",n.selectedColorFn&&(f=n.selectedColorFn(t))}if(t.om)e.call(c.stroke,f).style({\"stroke-width\":(p||1)+\"px\",fill:\"none\"});else{e.style(\"stroke-width\",(t.isBlank?0:p)+\"px\");var m=o.gradient,v=t.mgt;v?d=!0:v=m&&m.type,i.isArrayOrTypedArray(v)&&(v=v[0],M[v]||(v=0));var y=o.pattern,b=y&&x.getPatternAttr(y.shape,t.i,\"\");if(v&&\"none\"!==v){var _=t.mgc;_?d=!0:_=m.color;var T=r.uid;d&&(T+=\"-\"+t.i),x.gradient(e,a,T,v,[[0,_],[1,f]],\"fill\")}else if(b){var k=x.getPatternAttr(y.bgcolor,t.i,null),A=x.getPatternAttr(y.fgcolor,t.i,null),S=y.fgopacity,E=x.getPatternAttr(y.size,t.i,8),L=x.getPatternAttr(y.solidity,t.i,.3),C=t.mcc||i.isArrayOrTypedArray(y.shape)||i.isArrayOrTypedArray(y.bgcolor)||i.isArrayOrTypedArray(y.size)||i.isArrayOrTypedArray(y.solidity),P=r.uid;C&&(P+=\"-\"+t.i),x.pattern(e,\"point\",a,P,b,E,L,t.mcc,y.fillmode,k,A,S)}else c.fill(e,f);p&&c.stroke(e,h)}},x.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=x.tryColorscale(r,\"\"),e.lineScale=x.tryColorscale(r,\"line\"),l.traceIs(t,\"symbols\")&&(e.ms2mrc=m.isBubble(t)?v(t):function(){return(r.size||6)/2}),t.selectedpoints&&i.extendFlat(e,x.makeSelectedPointStyleFns(t)),e},x.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.marker||{},o=r.marker||{},s=n.marker||{},c=a.opacity,u=o.opacity,f=s.opacity,h=void 0!==u,p=void 0!==f;(i.isArrayOrTypedArray(c)||h||p)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?a.opacity:t.mo;return t.selected?h?u:e:p?f:g*e});var d=a.color,m=o.color,v=s.color;(m||v)&&(e.selectedColorFn=function(t){var e=t.mcc||d;return t.selected?m||e:v||e});var y=a.size,x=o.size,b=s.size,_=void 0!==x,w=void 0!==b;return l.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},x.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:u||(l?e:c.addOpacity(e,g))},e},x.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.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){c.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\",w(x.symbolNumber(n),a)),e.mrc2=a})),a.length&&t.each((function(t){for(var e=n.select(this),r=0;r0?r:0}x.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var o=x.makeSelectedTextStyleFns(e);a=o.selectedTextColorFn}var s=e.texttemplate,l=r._fullLayout;t.each((function(t){var o=n.select(this),c=s?i.extractOption(t,e,\"txt\",\"texttemplate\"):i.extractOption(t,e,\"tx\",\"text\");if(c||0===c){if(s){var u=e._module.formatLabels,f=u?u(t,e,l):{},p={};y(p,e,t.i);var d=e._meta||{};c=i.texttemplateString(c,f,l._d3locale,p,t,d)}var g=t.tp||e.textposition,m=L(t,e),v=a?a(t):t.tc||e.textfont.color;o.call(x.font,t.tf||e.textfont.family,m,v).text(c).call(h.convertToTspans,r).call(E,g,m,t.mrc)}else o.remove()}))}},x.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.makeSelectedTextStyleFns(e);t.each((function(t){var i=n.select(this),a=r.selectedTextColorFn(t),o=t.tp||e.textposition,s=L(t,e);c.fill(i,a);var u=l.traceIs(e,\"bar-like\");E(i,o,s,t.mrc2||t.mrc,u)}))}};function C(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,.25),u=Math.pow(s*s+l*l,.25),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)]]}x.smoothopen=function(t,e){if(t.length<3)return\"M\"+t.join(\"L\");var r,n=\"M\"+t[0],i=[];for(r=1;r=1e4&&(x.savedBBoxes={},O=0),r&&(x.savedBBoxes[r]=m),O++,i.extendFlat({},m)},x.setClipUrl=function(t,e,r){t.attr(\"clip-path\",D(e,r))},x.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}},x.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+=f(e,r)).trim(),t[i](\"transform\",a),a},x.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}},x.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 R=/\\s*sc.*/;x.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(R,\"\");t=(t+=n).trim(),this.setAttribute(\"transform\",t)}))}};var F=/translate\\([^)]*\\)\\s*$/;x.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(F);t=1===e&&1===r?[]:[f(o,s),\"scale(\"+e+\",\"+r+\")\",f(-o,-s)],l&&t.push(l),i.attr(\"transform\",t.join(\"\"))}}))}},{\"../../components/fx/helpers\":402,\"../../constants/alignment\":471,\"../../constants/interactions\":478,\"../../constants/xmlns_namespaces\":480,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../registry\":638,\"../../traces/scatter/make_bubble_size_func\":943,\"../../traces/scatter/subtypes\":951,\"../color\":366,\"../colorscale\":378,\"./symbol_defs\":389,\"@plotly/d3\":58,\"fast-isnumeric\":190,tinycolor2:312}],389:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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},\"arrow-up\":{n:45,f:function(t){var e=n.round(t,2);return\"M0,0L-\"+e+\",\"+n.round(2*t,2)+\"H\"+e+\"Z\"},noDot:!0},\"arrow-down\":{n:46,f:function(t){var e=n.round(t,2);return\"M0,0L-\"+e+\",-\"+n.round(2*t,2)+\"H\"+e+\"Z\"},noDot:!0},\"arrow-left\":{n:47,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,0L\"+e+\",-\"+r+\"V\"+r+\"Z\"},noDot:!0},\"arrow-right\":{n:48,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,0L-\"+e+\",-\"+r+\"V\"+r+\"Z\"},noDot:!0},\"arrow-bar-up\":{n:49,f:function(t){var e=n.round(t,2);return\"M-\"+e+\",0H\"+e+\"M0,0L-\"+e+\",\"+n.round(2*t,2)+\"H\"+e+\"Z\"},needLine:!0,noDot:!0},\"arrow-bar-down\":{n:50,f:function(t){var e=n.round(t,2);return\"M-\"+e+\",0H\"+e+\"M0,0L-\"+e+\",-\"+n.round(2*t,2)+\"H\"+e+\"Z\"},needLine:!0,noDot:!0},\"arrow-bar-left\":{n:51,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,-\"+r+\"V\"+r+\"M0,0L\"+e+\",-\"+r+\"V\"+r+\"Z\"},needLine:!0,noDot:!0},\"arrow-bar-right\":{n:52,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,-\"+r+\"V\"+r+\"M0,0L-\"+e+\",-\"+r+\"V\"+r+\"Z\"},needLine:!0,noDot:!0}}},{\"@plotly/d3\":58}],390:[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\"}}}},{}],391:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../registry\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../lib\"),s=t(\"./compute_error\");function l(t,e,r,i){var l=e[\"error_\"+i]||{},c=[];if(l.visible&&-1!==[\"linear\",\"log\"].indexOf(r.type)){for(var u=s(l),f=0;f0;e.each((function(e){var f,h=e[0].trace,p=h.error_x||{},d=h.error_y||{};h.ids&&(f=function(t){return t.id});var g=o.hasMarkers(h)&&h.marker.maxdisplayed>0;d.visible||p.visible||(e=[]);var m=n.select(this).selectAll(\"g.errorbar\").data(e,f);if(m.exit().remove(),e.length){p.visible||m.selectAll(\"path.xerror\").remove(),d.visible||m.selectAll(\"path.yerror\").remove(),m.style(\"opacity\",1);var v=m.enter().append(\"g\").classed(\"errorbar\",!0);u&&v.style(\"opacity\",0).transition().duration(s.duration).style(\"opacity\",1),a.setClipUrl(m,r.layerClipId,t),m.each((function(t){var e=n.select(this),r=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,l,c);if(!g||t.vis){var a,o=e.select(\"path.yerror\");if(d.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var f=d.width;a=\"M\"+(r.x-f)+\",\"+r.yh+\"h\"+2*f+\"m-\"+f+\",0V\"+r.ys,r.noYS||(a+=\"m-\"+f+\",0h\"+2*f),!o.size()?o=e.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").classed(\"yerror\",!0):u&&(o=o.transition().duration(s.duration).ease(s.easing)),o.attr(\"d\",a)}else o.remove();var h=e.select(\"path.xerror\");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var m=(p.copy_ystyle?d:p).width;a=\"M\"+r.xh+\",\"+(r.y-m)+\"v\"+2*m+\"m0,-\"+m+\"H\"+r.xs,r.noXS||(a+=\"m0,-\"+m+\"v\"+2*m),!h.size()?h=e.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").classed(\"xerror\",!0):u&&(h=h.transition().duration(s.duration).ease(s.easing)),h.attr(\"d\",a)}else h.remove()}}))}}))}},{\"../../traces/scatter/subtypes\":951,\"../drawing\":388,\"@plotly/d3\":58,\"fast-isnumeric\":190}],396:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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\":366,\"@plotly/d3\":58}],397:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"./layout_attributes\").hoverlabel,a=t(\"../../lib/extend\").extendFlat;e.exports={hoverlabel:{bgcolor:a({},i.bgcolor,{arrayOk:!0}),bordercolor:a({},i.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:\"none\"}),align:a({},i.align,{arrayOk:!0}),namelength:a({},i.namelength,{arrayOk:!0}),editType:\"none\"}}},{\"../../lib/extend\":493,\"../../plots/font_attributes\":585,\"./layout_attributes\":407}],398:[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=0&&r.index_[0]._length||ot<0||ot>w[0]._length)return d.unhoverRaw(t,e)}if(e.pointerX=at+_[0]._offset,e.pointerY=ot+w[0]._offset,V=\"xval\"in e?v.flat(l,e.xval):v.p2c(_,at),H=\"yval\"in e?v.flat(l,e.yval):v.p2c(w,ot),!i(V[0])||!i(H[0]))return o.warn(\"Fx.hover failed\",e,t),d.unhoverRaw(t,e)}var ct=1/0;function ut(t,r){for(G=0;Gtt&&(et.splice(0,tt),ct=et[0].distance),y&&0!==B&&0===et.length){$.distance=B,$.index=!1;var f=W._module.hoverPoints($,K,Q,\"closest\",{hoverLayer:u._hoverlayer});if(f&&(f=f.filter((function(t){return t.spikeDistance<=B}))),f&&f.length){var h,d=f.filter((function(t){return t.xa.showspikes&&\"hovered data\"!==t.xa.spikesnap}));if(d.length){var g=d[0];i(g.x0)&&i(g.y0)&&(h=ht(g),(!nt.vLinePoint||nt.vLinePoint.spikeDistance>h.spikeDistance)&&(nt.vLinePoint=h))}var m=f.filter((function(t){return t.ya.showspikes&&\"hovered data\"!==t.ya.spikesnap}));if(m.length){var x=m[0];i(x.x0)&&i(x.y0)&&(h=ht(x),(!nt.hLinePoint||nt.hLinePoint.spikeDistance>h.spikeDistance)&&(nt.hLinePoint=h))}}}}}function ft(t,e,r){for(var n,i=null,a=1/0,o=0;o0&&Math.abs(t.distance)Tt-1;Mt--)Ct(et[Mt]);et=St,mt()}var Pt=t._hoverdata,It=[],Ot=j(t),zt=U(t);for(q=0;q1||et.length>1)||\"closest\"===P&&it&&et.length>1,Wt=p.combine(u.plot_bgcolor||p.background,u.paper_bgcolor),Xt=I(et,{gd:t,hovermode:P,rotateLabels:Yt,bgColor:Wt,container:u._hoverlayer,outerContainer:u._paper.node(),commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance});v.isUnifiedHover(P)||(!function(t,e,r){var n,i,a,o,s,l,c,u=0,f=1,h=t.size(),p=new Array(h),d=0;function g(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;oe.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=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--)}}}t.each((function(t){var n=t[e],i=\"x\"===n._id.charAt(0),a=n.range;0===d&&a&&a[0]>a[1]!==i&&(f=-1),p[d++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(i?T:1)/2,pmin:0,pmax:i?r.width:r.height}]})),p.sort((function(t,e){return t[0].posref-e[0].posref||f*(e[0].traceIndex-t[0].traceIndex)}));for(;!n&&u<=h;){for(u++,n=!0,o=0;o.01&&y.pmin===x.pmin&&y.pmax===x.pmax){for(s=v.length-1;s>=0;s--)v[s].dp+=i;for(m.push.apply(m,v),p.splice(o+1,1),c=0,s=m.length-1;s>=0;s--)c+=m[s].dp;for(a=c/m.length,s=m.length-1;s>=0;s--)m[s].dp-=a;n=!1}else o++}p.forEach(g)}for(o=p.length-1;o>=0;o--){var b=p[o];for(s=b.length-1;s>=0;s--){var _=b[s],w=_.datum;w.offset=_.dp,w.del=_.del}}}(Xt,Yt?\"xa\":\"ya\",u),z(Xt,Yt,u._invScaleX,u._invScaleY));if(s&&s.tagName){var Zt=m.getComponentMethod(\"annotations\",\"hasClickToShow\")(t,It);f(n.select(s),Zt?\"pointer\":\"\")}if(!s||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)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(t,0,Pt))return;Pt&&t.emit(\"plotly_unhover\",{event:e,points:Pt});t.emit(\"plotly_hover\",{event:e,points:t._hoverdata,xaxes:_,yaxes:w,xvals:V,yvals:H})}(t,e,r,a,s)}))},r.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=e.gd,a=j(i),o=U(i),s=I(t.map((function(t){var r=t._x0||t.x0||t.x||0,n=t._x1||t.x1||t.x||0,s=t._y0||t.y0||t.y||0,l=t._y1||t.y1||t.y||0,c=t.eventData;if(c){var u=Math.min(r,n),f=Math.max(r,n),h=Math.min(s,l),d=Math.max(s,l),g=t.trace;if(m.traceIs(g,\"gl3d\")){var v=i._fullLayout[g.scene]._scene.container,y=v.offsetLeft,x=v.offsetTop;u+=y,f+=y,h+=x,d+=x}c.bbox={x0:u+o,x1:f+o,y0:h+a,y1:d+a},e.inOut_bbox&&e.inOut_bbox.push(c.bbox)}else c=!1;return{color:t.color||p.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,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:\"\"},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData:c}})),{gd:i,hovermode:\"closest\",rotateLabels:!1,bgColor:e.bgColor||p.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}),l=0,c=0;return s.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5([\\s\\S]*)<\\/extra>/;function I(t,e){var r=e.gd,i=r._fullLayout,a=e.hovermode,c=e.rotateLabels,f=e.bgColor,d=e.container,g=e.outerContainer,w=e.commonLabelOpts||{};if(0===t.length)return[[]];var T=e.fontFamily||y.HOVERFONT,k=e.fontSize||y.HOVERFONTSIZE,A=t[0],E=A.xa,L=A.ya,P=a.charAt(0),I=A[P+\"Label\"],z=V(r,g),D=z.top,R=z.width,F=z.height,B=void 0!==I&&A.distance<=e.hoverdistance&&(\"x\"===a||\"y\"===a);if(B){var N,j,U=!0;for(N=0;Ni.width-b?(m=i.width-b,e.attr(\"d\",\"M\"+(b-M)+\",0L\"+b+\",\"+x+M+\"v\"+x+(2*S+y.height)+\"H-\"+b+\"V\"+x+M+\"H\"+(b-2*M)+\"Z\")):e.attr(\"d\",\"M0,0L\"+M+\",\"+x+M+\"H\"+(S+y.width/2)+\"v\"+x+(2*S+y.height)+\"H-\"+(S+y.width/2)+\"V\"+x+M+\"H-\"+M+\"Z\")}else{var _,C,P;\"right\"===L.side?(_=\"start\",C=1,P=\"\",m=E._offset+E._length):(_=\"end\",C=-1,P=\"-\",m=E._offset),v=L._offset+(A.y0+A.y1)/2,l.attr(\"text-anchor\",_),e.attr(\"d\",\"M0,0L\"+P+M+\",\"+M+\"V\"+(S+y.height/2)+\"h\"+P+(2*S+y.width)+\"V-\"+(S+y.height/2)+\"H\"+P+M+\"V-\"+M+\"Z\");var O,z=y.height/2,R=D-y.top-z,F=\"clip\"+i._uid+\"commonlabel\"+L._id;if(m=0?at:ot+ct=0?ot:vt+ct=0?nt:it+ut=0?it:yt+ut=0,\"top\"!==t.idealAlign&&G||!Y?G?(z+=j/2,t.anchor=\"start\"):t.anchor=\"middle\":(z-=j/2,t.anchor=\"end\");else if(t.pos=z,G=P+N/2+W<=R,Y=P-N/2-W>=0,\"left\"!==t.idealAlign&&G||!Y)if(G)P+=N/2,t.anchor=\"start\";else{t.anchor=\"middle\";var X=W/2,Z=P+X-R,J=P-X;Z>0&&(P-=Z),J<0&&(P+=-J)}else P-=N/2,t.anchor=\"end\";w.attr(\"text-anchor\",t.anchor),E&&A.attr(\"text-anchor\",t.anchor),e.attr(\"transform\",s(P,z)+(c?l(_):\"\"))})),xt}function O(t,e,r,n,i,a){var s=\"\",l=\"\";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=o.templateString(t.name,t.trace._meta)),s=B(t.name,t.nameLength));var c=r.charAt(0),u=\"x\"===c?\"y\":\"x\";void 0!==t.zLabel?(void 0!==t.xLabel&&(l+=\"x: \"+t.xLabel+\"
\"),void 0!==t.yLabel&&(l+=\"y: \"+t.yLabel+\"
\"),\"choropleth\"!==t.trace.type&&\"choroplethmapbox\"!==t.trace.type&&(l+=(l?\"z: \":\"\")+t.zLabel)):e&&t[c+\"Label\"]===i?l=t[u+\"Label\"]||\"\":void 0===t.xLabel?void 0!==t.yLabel&&\"scattercarpet\"!==t.trace.type&&(l=t.yLabel):l=void 0===t.yLabel?t.xLabel:\"(\"+t.xLabel+\", \"+t.yLabel+\")\",!t.text&&0!==t.text||Array.isArray(t.text)||(l+=(l?\"
\":\"\")+t.text),void 0!==t.extraText&&(l+=(l?\"
\":\"\")+t.extraText),a&&\"\"===l&&!t.hovertemplate&&(\"\"===s&&a.remove(),l=s);var f=t.hovertemplate||!1;if(f){var h=t.hovertemplateLabels||t;t[c+\"Label\"]!==i&&(h[c+\"other\"]=h[c+\"Val\"],h[c+\"otherLabel\"]=h[c+\"Label\"]),l=(l=o.hovertemplateString(f,h,n._d3locale,t.eventData[0]||{},t.trace._meta)).replace(P,(function(e,r){return s=B(r,t.nameLength),\"\"}))}return[l,s]}function z(t,e,r,i){var a=function(t){return t*r},o=function(t){return t*i};t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var i=r.select(\"text.nums\"),s=t.anchor,l=\"end\"===s?-1:1,c={start:1,end:-1,middle:0}[s],f=c*(M+S),p=f+c*(t.txwidth+S),d=0,g=t.offset,m=\"middle\"===s;m&&(f-=t.tx2width/2,p+=t.txwidth/2+S),e&&(g*=-A,d=t.offset*k),r.select(\"path\").attr(\"d\",m?\"M-\"+a(t.bx/2+t.tx2width/2)+\",\"+o(g-t.by/2)+\"h\"+a(t.bx)+\"v\"+o(t.by)+\"h-\"+a(t.bx)+\"Z\":\"M0,0L\"+a(l*M+d)+\",\"+o(M+g)+\"v\"+o(t.by/2-M)+\"h\"+a(l*t.bx)+\"v-\"+o(t.by)+\"H\"+a(l*M+d)+\"V\"+o(g-M)+\"Z\");var v=d+f,y=g+t.ty0-t.by/2+S,x=t.textAlign||\"auto\";\"auto\"!==x&&(\"left\"===x&&\"start\"!==s?(i.attr(\"text-anchor\",\"start\"),v=m?-t.bx/2-t.tx2width/2+S:-t.bx-S):\"right\"===x&&\"end\"!==s&&(i.attr(\"text-anchor\",\"end\"),v=m?t.bx/2-t.tx2width/2-S:t.bx+S)),i.call(u.positionText,a(v),o(y)),t.tx2width&&(r.select(\"text.name\").call(u.positionText,a(p+c*S+d),o(g+t.ty0-t.by/2+S)),r.select(\"rect\").call(h.setRect,a(p+(c-1)*t.tx2width/2+d),o(g-t.by/2-1),a(t.tx2width),o(t.by+2)))}))}function D(t,e){var r=t.index,n=t.trace||{},a=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var c=Array.isArray(r)?function(t,e){var i=o.castOption(a,r,t);return l(i)?i:o.extractOption({},n,\"\",e)}:function(t,e){return o.extractOption(s,n,t,e)};function u(e,r,n){var i=c(r,n);l(i)&&(t[e]=i)}if(u(\"hoverinfo\",\"hi\",\"hoverinfo\"),u(\"bgcolor\",\"hbg\",\"hoverlabel.bgcolor\"),u(\"borderColor\",\"hbc\",\"hoverlabel.bordercolor\"),u(\"fontFamily\",\"htf\",\"hoverlabel.font.family\"),u(\"fontSize\",\"hts\",\"hoverlabel.font.size\"),u(\"fontColor\",\"htc\",\"hoverlabel.font.color\"),u(\"nameLength\",\"hnl\",\"hoverlabel.namelength\"),u(\"textAlign\",\"hta\",\"hoverlabel.align\"),t.posref=\"y\"===e||\"closest\"===e&&\"h\"===n.orientation?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:g.hoverLabelText(t.xa,t.xLabelVal,n.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel=\"yLabel\"in t?t.yLabel:g.hoverLabelText(t.ya,t.yLabelVal,n.yhoverformat),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 f=g.tickText(t.xa,t.xa.c2l(t.xerr),\"hover\").text;void 0!==t.xerrneg?t.xLabel+=\" +\"+f+\" / -\"+g.tickText(t.xa,t.xa.c2l(t.xerrneg),\"hover\").text:t.xLabel+=\" \\xb1 \"+f,\"x\"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||\"log\"===t.ya.type&&t.yerr<=0)){var h=g.tickText(t.ya,t.ya.c2l(t.yerr),\"hover\").text;void 0!==t.yerrneg?t.yLabel+=\" +\"+h+\" / -\"+g.tickText(t.ya,t.ya.c2l(t.yerrneg),\"hover\").text:t.yLabel+=\" \\xb1 \"+h,\"y\"===e&&(t.distance+=1)}var p=t.hoverinfo||t.trace.hoverinfo;return p&&\"all\"!==p&&(-1===(p=Array.isArray(p)?p:p.split(\"+\")).indexOf(\"x\")&&(t.xLabel=void 0),-1===p.indexOf(\"y\")&&(t.yLabel=void 0),-1===p.indexOf(\"z\")&&(t.zLabel=void 0),-1===p.indexOf(\"text\")&&(t.text=void 0),-1===p.indexOf(\"name\")&&(t.name=void 0)),t}function R(t,e,r){var n,i,o=r.container,s=r.fullLayout,l=s._size,c=r.event,u=!!e.hLinePoint,f=!!e.vLinePoint;if(o.selectAll(\".spikeline\").remove(),f||u){var d=p.combine(s.plot_bgcolor,s.paper_bgcolor);if(u){var m,v,y=e.hLinePoint;n=y&&y.xa,\"cursor\"===(i=y&&y.ya).spikesnap?(m=c.pointerX,v=c.pointerY):(m=n._offset+y.x,v=i._offset+y.y);var x,b,_=a.readability(y.color,d)<1.5?p.contrast(d):y.color,w=i.spikemode,T=i.spikethickness,k=i.spikecolor||_,A=g.getPxPosition(t,i);if(-1!==w.indexOf(\"toaxis\")||-1!==w.indexOf(\"across\")){if(-1!==w.indexOf(\"toaxis\")&&(x=A,b=m),-1!==w.indexOf(\"across\")){var M=i._counterDomainMin,S=i._counterDomainMax;\"free\"===i.anchor&&(M=Math.min(M,i.position),S=Math.max(S,i.position)),x=l.l+M*l.w,b=l.l+S*l.w}o.insert(\"line\",\":first-child\").attr({x1:x,x2:b,y1:v,y2:v,\"stroke-width\":T,stroke:k,\"stroke-dasharray\":h.dashStyle(i.spikedash,T)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),o.insert(\"line\",\":first-child\").attr({x1:x,x2:b,y1:v,y2:v,\"stroke-width\":T+2,stroke:d}).classed(\"spikeline\",!0).classed(\"crisp\",!0)}-1!==w.indexOf(\"marker\")&&o.insert(\"circle\",\":first-child\").attr({cx:A+(\"right\"!==i.side?T:-T),cy:v,r:T,fill:k}).classed(\"spikeline\",!0)}if(f){var E,L,C=e.vLinePoint;n=C&&C.xa,i=C&&C.ya,\"cursor\"===n.spikesnap?(E=c.pointerX,L=c.pointerY):(E=n._offset+C.x,L=i._offset+C.y);var P,I,O=a.readability(C.color,d)<1.5?p.contrast(d):C.color,z=n.spikemode,D=n.spikethickness,R=n.spikecolor||O,F=g.getPxPosition(t,n);if(-1!==z.indexOf(\"toaxis\")||-1!==z.indexOf(\"across\")){if(-1!==z.indexOf(\"toaxis\")&&(P=F,I=L),-1!==z.indexOf(\"across\")){var B=n._counterDomainMin,N=n._counterDomainMax;\"free\"===n.anchor&&(B=Math.min(B,n.position),N=Math.max(N,n.position)),P=l.t+(1-N)*l.h,I=l.t+(1-B)*l.h}o.insert(\"line\",\":first-child\").attr({x1:E,x2:E,y1:P,y2:I,\"stroke-width\":D,stroke:R,\"stroke-dasharray\":h.dashStyle(n.spikedash,D)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),o.insert(\"line\",\":first-child\").attr({x1:E,x2:E,y1:P,y2:I,\"stroke-width\":D+2,stroke:d}).classed(\"spikeline\",!0).classed(\"crisp\",!0)}-1!==z.indexOf(\"marker\")&&o.insert(\"circle\",\":first-child\").attr({cx:E,cy:F-(\"top\"!==n.side?D:-D),r:D,fill:R}).classed(\"spikeline\",!0)}}}function F(t,e){return!e||(e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint)}function B(t,e){return u.plainText(t||\"\",{len:e,allowedTags:[\"br\",\"sub\",\"sup\",\"b\",\"i\",\"em\"]})}function N(t,e,r){var n=e[t+\"a\"],i=e[t+\"Val\"],a=e.cd[0];if(\"category\"===n.type)i=n._categoriesMap[i];else if(\"date\"===n.type){var o=e.trace[t+\"periodalignment\"];if(o){var s=e.cd[e.index],l=s[t+\"Start\"];void 0===l&&(l=s[t]);var c=s[t+\"End\"];void 0===c&&(c=s[t]);var u=c-l;\"end\"===o?i+=u:\"middle\"===o&&(i+=u/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&(\"group\"!==r.boxmode&&\"group\"!==r.violinmode||(i+=a.t.dPos)),i}function j(t){return t.offsetTop+t.clientTop}function U(t){return t.offsetLeft+t.clientLeft}function V(t,e){var r=t._fullLayout,n=e.getBoundingClientRect(),i=n.x,a=n.y,s=i+n.width,l=a+n.height,c=o.apply3DTransform(r._invTransform)(i,a),u=o.apply3DTransform(r._invTransform)(s,l),f=c[0],h=c[1],p=u[0],d=u[1];return{x:f,y:h,width:p-f,height:d-h,top:Math.min(h,d),left:Math.min(f,p),right:Math.max(f,p),bottom:Math.max(h,d)}}},{\"../../lib\":503,\"../../lib/events\":492,\"../../lib/override_cursor\":514,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"../color\":366,\"../dragelement\":385,\"../drawing\":388,\"../legend/defaults\":418,\"../legend/draw\":419,\"./constants\":400,\"./helpers\":402,\"@plotly/d3\":58,\"fast-isnumeric\":190,tinycolor2:312}],404:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../color\"),a=t(\"./helpers\").isUnifiedHover;e.exports=function(t,e,r,o){o=o||{};var s=e.legend;function l(t){o.font[t]||(o.font[t]=s?e.legend.font[t]:e.font[t])}e&&a(e.hovermode)&&(o.font||(o.font={}),l(\"size\"),l(\"family\"),l(\"color\"),s?(o.bgcolor||(o.bgcolor=i.combine(e.legend.bgcolor,e.paper_bgcolor)),o.bordercolor||(o.bordercolor=e.legend.bordercolor)):o.bgcolor||(o.bgcolor=e.paper_bgcolor)),r(\"hoverlabel.bgcolor\",o.bgcolor),r(\"hoverlabel.bordercolor\",o.bordercolor),r(\"hoverlabel.namelength\",o.namelength),n.coerceFont(r,\"hoverlabel.font\",o.font),r(\"hoverlabel.align\",o.align)}},{\"../../lib\":503,\"../color\":366,\"./helpers\":402}],405:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e){function r(r,a){return void 0!==e[r]?e[r]:n.coerce(t,e,i,r,a)}return r(\"clickmode\"),r(\"hovermode\")}},{\"../../lib\":503,\"./layout_attributes\":407}],406:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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,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\":503,\"../dragelement\":385,\"./attributes\":397,\"./calc\":398,\"./click\":399,\"./constants\":400,\"./defaults\":401,\"./helpers\":402,\"./hover\":403,\"./layout_attributes\":407,\"./layout_defaults\":408,\"./layout_global_defaults\":409,\"@plotly/d3\":58}],407:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"../../plots/font_attributes\"),a=i({editType:\"none\"});a.family.dflt=n.HOVERFONT,a.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\",\"drawclosedpath\",\"drawopenpath\",\"drawline\",\"drawrect\",\"drawcircle\",\"orbit\",\"turntable\",!1],dflt:\"zoom\",editType:\"modebar\"},hovermode:{valType:\"enumerated\",values:[\"x\",\"y\",\"closest\",!1,\"x unified\",\"y unified\"],dflt:\"closest\",editType:\"modebar\"},hoverdistance:{valType:\"integer\",min:-1,dflt:20,editType:\"none\"},spikedistance:{valType:\"integer\",min:-1,dflt:-1,editType:\"none\"},hoverlabel:{bgcolor:{valType:\"color\",editType:\"none\"},bordercolor:{valType:\"color\",editType:\"none\"},font:a,grouptitlefont:i({editType:\"none\"}),align:{valType:\"enumerated\",values:[\"left\",\"right\",\"auto\"],dflt:\"auto\",editType:\"none\"},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\":585,\"./constants\":400}],408:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\"),a=t(\"./hovermode_defaults\"),o=t(\"./hoverlabel_defaults\");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}a(t,e)&&(r(\"hoverdistance\"),r(\"spikedistance\")),\"select\"===r(\"dragmode\")&&r(\"selectdirection\");var s=e._has(\"mapbox\"),l=e._has(\"geo\"),c=e._basePlotModules.length;\"zoom\"===e.dragmode&&((s||l)&&1===c||s&&l&&2===c)&&(e.dragmode=\"pan\"),o(t,e,r),n.coerceFont(r,\"hoverlabel.grouptitlefont\",e.hoverlabel.font)}},{\"../../lib\":503,\"./hoverlabel_defaults\":404,\"./hovermode_defaults\":405,\"./layout_attributes\":407}],409:[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\":503,\"./hoverlabel_defaults\":404,\"./layout_attributes\":407}],410:[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;h1){if(!h&&!p&&!d)\"independent\"===k(\"pattern\")&&(h=!0);m._hasSubplotGrid=h;var x,b,_=\"top to bottom\"===k(\"roworder\"),w=h?.2:.1,T=h?.3:.1;g&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),m._domains={x:u(\"x\",k,w,x,y),y:u(\"y\",k,T,b,v,_)}}else delete e.grid}function k(t,e){return n.coerce(r,m,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,m=r.columns,v=\"independent\"===r.pattern,y=r._axisMap={};if(d){var x=h.subplots||[];l=r.subplots=new Array(g);var b=1;for(n=0;n1);if(!1===_&&(e.legend=void 0),(!1!==_||f.uirevision)&&(p(\"uirevision\",e.uirevision),!1!==_)){p(\"bgcolor\",e.paper_bgcolor),p(\"bordercolor\"),p(\"borderwidth\");var w,T,k,A=i.coerceFont(p,\"font\",e.font),M=\"h\"===p(\"orientation\");if(M?(w=0,n.getComponentMethod(\"rangeslider\",\"isVisible\")(t.xaxis)?(T=1.1,k=\"bottom\"):(T=-.1,k=\"top\")):(w=1.02,T=1,k=\"auto\"),p(\"traceorder\",x),c.isGrouped(e.legend)&&p(\"tracegroupgap\"),p(\"itemsizing\"),p(\"itemwidth\"),p(\"itemclick\"),p(\"itemdoubleclick\"),p(\"groupclick\"),p(\"x\",w),p(\"xanchor\"),p(\"y\",T),p(\"yanchor\",k),p(\"valign\"),i.noneOrAll(f,h,[\"x\",\"y\"]),p(\"title.text\")){p(\"title.side\",M?\"left\":\"top\");var S=i.extendFlat({},A,{size:i.bigFont(A.size)});i.coerceFont(p,\"title.font\",S)}}}},{\"../../lib\":503,\"../../plot_api/plot_template\":543,\"../../plots/attributes\":550,\"../../plots/layout_attributes\":610,\"../../registry\":638,\"./attributes\":416,\"./helpers\":422}],419:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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/alignment\"),g=d.LINE_SPACING,m=d.FROM_TL,v=d.FROM_BR,y=t(\"./get_legend_data\"),x=t(\"./style\"),b=t(\"./helpers\");function _(t,e,r,n,i){var a=r.data()[0][0].trace,l={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&&(l.group=a._group),o.traceIs(a,\"pie-like\")&&(l.label=r.datum()[0].label),!1!==s.triggerHandler(t,\"plotly_legendclick\",l))if(1===n)e._clickTimeout=setTimeout((function(){t._fullLayout&&h(r,t,n)}),t._context.doubleClickDelay);else if(2===n){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,\"plotly_legenddoubleclick\",l)&&h(r,t,n)}}function w(t,e,r){var n,a,s=t.data()[0][0],l=s.trace,u=o.traceIs(l,\"pie-like\"),h=!r._inHover&&e._context.edits.legendText&&!u,d=r._maxNameLength;s.groupTitle?(n=s.groupTitle.text,a=s.groupTitle.font):(a=r.font,r.entries?n=s.text:(n=u?s.label:l.name,l._meta&&(n=i.templateString(n,l._meta))));var g=i.ensureSingle(t,\"text\",\"legendtext\");g.attr(\"text-anchor\",\"start\").call(c.font,a).text(h?T(n,d):n);var m=r.itemwidth+2*p.itemGap;f.positionText(g,m,0),h?g.call(f.makeEditable,{gd:e,text:n}).call(A,t,e,r).on(\"edit\",(function(n){this.text(T(n,d)).call(A,t,e,r);var a=s.trace._fullInput||{},c={};if(o.hasTransform(a,\"groupby\")){var u=o.getTransformIndices(a,\"groupby\"),f=u[u.length-1],h=i.keyedContainer(a,\"transforms[\"+f+\"].styles\",\"target\",\"value.name\");h.set(s.trace._group,n),c=h.constructUpdate()}else c.name=n;return o.call(\"_guiRestyle\",e,c,l.index)})):A(g,t,e,r)}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 k(t,e){var r,a=e._context.doubleClickDelay,o=1,s=i.ensureSingle(t,\"rect\",\"legendtoggle\",(function(t){e._context.staticPlot||t.style(\"cursor\",\"pointer\").attr(\"pointer-events\",\"all\"),t.call(u.fill,\"rgba(0,0,0,0)\")}));e._context.staticPlot||(s.on(\"mousedown\",(function(){(r=(new Date).getTime())-e._legendMouseDownTimea&&(o=Math.max(o-1,1)),_(e,r,t,o,n.event)}})))}function A(t,e,r,n,i){n._inHover&&t.attr(\"data-notex\",!0),f.convertToTspans(t,r,(function(){!function(t,e,r,n){var i=t.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend)return void t.remove();var a=t.select(\"g[class*=math-group]\"),o=a.node();r||(r=e._fullLayout.legend);var s,l=r.borderwidth;s=1===n?r.title.font:i.groupTitle?i.groupTitle.font:r.font;var u,h,d=s.size*g;if(o){var m=c.bBox(o);u=m.height,h=m.width,1===n?c.setTranslate(a,l,l+.75*u):c.setTranslate(a,0,.25*u)}else{var v=t.select(1===n?\".legendtitletext\":\".legendtext\"),y=f.lineCount(v),x=v.node();if(u=d*y,h=x?c.bBox(x).width:0,1===n)\"left\"===r.title.side&&(h+=2*p.itemGap),f.positionText(v,l+p.titlePad,l+d);else{var b=2*p.itemGap+r.itemwidth;i.groupTitle&&(b=p.itemGap,h-=r.itemwidth),f.positionText(v,b,-d*((y-1)/2-.3))}}1===n?(r._titleWidth=h,r._titleHeight=u):(i.lineHeight=d,i.height=Math.max(u,16)+3,i.width=h)}(e,r,n,i)}))}function M(t){return i.isRightAnchor(t)?\"right\":i.isCenterAnchor(t)?\"center\":\"left\"}function S(t){return i.isBottomAnchor(t)?\"bottom\":i.isMiddleAnchor(t)?\"middle\":\"top\"}e.exports=function(t,e){return e||(e=t._fullLayout.legend||{}),function(t,e){var r,s,f=t._fullLayout,h=\"legend\"+f._uid,d=e._inHover;d?(r=e.layer,h+=\"-hover\"):r=f._infolayer;if(!r)return;t._legendMouseDownTime||(t._legendMouseDownTime=0);if(d){if(!e.entries)return;s=y(e.entries,e)}else{if(!t.calcdata)return;s=f.showlegend&&y(t.calcdata,e)}var g=f.hiddenlabels||[];if(!(d||f.showlegend&&s.length))return r.selectAll(\".legend\").remove(),f._topdefs.select(\"#\"+h).remove(),a.autoMargin(t,\"legend\");var T=i.ensureSingle(r,\"g\",\"legend\",(function(t){d||t.attr(\"pointer-events\",\"all\")})),E=i.ensureSingleById(f._topdefs,\"clipPath\",h,(function(t){t.append(\"rect\")})),L=i.ensureSingle(T,\"rect\",\"bg\",(function(t){t.attr(\"shape-rendering\",\"crispEdges\")}));L.call(u.stroke,e.bordercolor).call(u.fill,e.bgcolor).style(\"stroke-width\",e.borderwidth+\"px\");var C=i.ensureSingle(T,\"g\",\"scrollbox\"),P=e.title;if(e._titleWidth=0,e._titleHeight=0,P.text){var I=i.ensureSingle(C,\"text\",\"legendtitletext\");I.attr(\"text-anchor\",\"start\").call(c.font,P.font).text(P.text),A(I,C,t,e,1)}else C.selectAll(\".legendtitletext\").remove();var O=i.ensureSingle(T,\"rect\",\"scrollbar\",(function(t){t.attr(p.scrollBarEnterAttrs).call(u.fill,p.scrollBarColor)})),z=C.selectAll(\"g.groups\").data(s);z.enter().append(\"g\").attr(\"class\",\"groups\"),z.exit().remove();var D=z.selectAll(\"g.traces\").data(i.identity);D.enter().append(\"g\").attr(\"class\",\"traces\"),D.exit().remove(),D.style(\"opacity\",(function(t){var e=t[0].trace;return o.traceIs(e,\"pie-like\")?-1!==g.indexOf(t[0].label)?.5:1:\"legendonly\"===e.visible?.5:1})).each((function(){n.select(this).call(w,t,e)})).call(x,t,e).each((function(){d||n.select(this).call(k,t)})),i.syncOrAsync([a.previousPromises,function(){return function(t,e,r,i){var a=t._fullLayout;i||(i=a.legend);var o=a._size,s=b.isVertical(i),l=b.isGrouped(i),u=i.borderwidth,f=2*u,h=p.itemGap,d=i.itemwidth+2*h,g=2*(u+h),m=S(i),v=i.y<0||0===i.y&&\"top\"===m,y=i.y>1||1===i.y&&\"bottom\"===m,x=i.tracegroupgap;i._maxHeight=Math.max(v||y?a.height/2:o.h,30);var _=0;i._width=0,i._height=0;var w=function(t){var e=0,r=0,n=t.title.side;n&&(-1!==n.indexOf(\"left\")&&(e=t._titleWidth),-1!==n.indexOf(\"top\")&&(r=t._titleHeight));return[e,r]}(i);if(s)r.each((function(t){var e=t[0].height;c.setTranslate(this,u+w[0],u+w[1]+i._height+e/2+h),i._height+=e,i._width=Math.max(i._width,t[0].width)})),_=d+i._width,i._width+=h+d+f,i._height+=g,l&&(e.each((function(t,e){c.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var T=M(i),k=i.x<0||0===i.x&&\"right\"===T,A=i.x>1||1===i.x&&\"left\"===T,E=y||v,L=a.width/2;i._maxWidth=Math.max(k?E&&\"left\"===T?o.l+o.w:L:A?E&&\"right\"===T?o.r+o.w:L:o.w,2*d);var C=0,P=0;r.each((function(t){var e=t[0].width+d;C=Math.max(C,e),P+=e})),_=null;var I=0;if(l){var O=0,z=0,D=0;e.each((function(){var t=0,e=0;n.select(this).selectAll(\"g.traces\").each((function(r){var n=r[0].width,i=r[0].height;c.setTranslate(this,w[0],w[1]+u+h+i/2+e),e+=i,t=Math.max(t,d+n)}));var r=t+h;z>0&&r+u+z>i._maxWidth?(I=Math.max(I,z),z=0,D+=O+x,O=e):O=Math.max(O,e),c.setTranslate(this,z,D),z+=r})),i._width=Math.max(I,z)+u,i._height=D+O+g}else{var R=r.size(),F=P+f+(R-1)*h=i._maxWidth&&(I=Math.max(I,U),N=0,j+=B,i._height+=B,B=0),c.setTranslate(this,w[0]+u+N,w[1]+u+j+e/2+h),U=N+r+h,N+=n,B=Math.max(B,e)})),F?(i._width=N+f,i._height=B+g):(i._width=Math.max(I,U)+f,i._height+=B+g)}}i._width=Math.ceil(Math.max(i._width+w[0],i._titleWidth+2*(u+p.titlePad))),i._height=Math.ceil(Math.max(i._height+w[1],i._titleHeight+2*(u+p.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var V=t._context.edits,H=V.legendText||V.legendPosition;r.each((function(t){var e=n.select(this).select(\".legendtoggle\"),r=t[0].height,i=H?d:_||d+t[0].width;s||(i+=h/2),c.setRect(e,0,-r/2,i,r)}))}(t,z,D,e)},function(){var s,u,g,y,x=f._size,b=e.borderwidth;if(!d){if(function(t){var e=t._fullLayout.legend,r=M(e),n=S(e);return a.autoMargin(t,\"legend\",{x:e.x,y:e.y,l:e._width*m[r],r:e._width*v[r],b:e._effHeight*v[n],t:e._effHeight*m[n]})}(t))return;var w=x.l+x.w*e.x-m[M(e)]*e._width,k=x.t+x.h*(1-e.y)-m[S(e)]*e._effHeight;if(f.margin.autoexpand){var A=w,P=k;w=i.constrain(w,0,f.width-e._width),k=i.constrain(k,0,f.height-e._effHeight),w!==A&&i.log(\"Constrain legend.x to make legend fit inside graph\"),k!==P&&i.log(\"Constrain legend.y to make legend fit inside graph\")}c.setTranslate(T,w,k)}if(O.on(\".drag\",null),T.on(\"wheel\",null),d||e._height<=e._maxHeight||t._context.staticPlot){var I=e._effHeight;d&&(I=e._height),L.attr({width:e._width-b,height:I-b,x:b/2,y:b/2}),c.setTranslate(C,0,0),E.select(\"rect\").attr({width:e._width-2*b,height:I-2*b,x:b,y:b}),c.setClipUrl(C,h,t),c.setRect(O,0,0,0,0),delete e._scrollY}else{var z,D,R,F=Math.max(p.scrollBarMinHeight,e._effHeight*e._effHeight/e._height),B=e._effHeight-F-2*p.scrollBarMargin,N=e._height-e._effHeight,j=B/N,U=Math.min(e._scrollY||0,N);L.attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-b,x:b/2,y:b/2}),E.select(\"rect\").attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-2*b,x:b,y:b+U}),c.setClipUrl(C,h,t),q(U,F,j),T.on(\"wheel\",(function(){q(U=i.constrain(e._scrollY+n.event.deltaY/B*N,0,N),F,j),0!==U&&U!==N&&n.event.preventDefault()}));var V=n.behavior.drag().on(\"dragstart\",(function(){var t=n.event.sourceEvent;z=\"touchstart\"===t.type?t.changedTouches[0].clientY:t.clientY,R=U})).on(\"drag\",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(D=\"touchmove\"===t.type?t.changedTouches[0].clientY:t.clientY,q(U=function(t,e,r){var n=(r-e)/j+t;return i.constrain(n,0,N)}(R,z,D),F,j))}));O.call(V);var H=n.behavior.drag().on(\"dragstart\",(function(){var t=n.event.sourceEvent;\"touchstart\"===t.type&&(z=t.changedTouches[0].clientY,R=U)})).on(\"drag\",(function(){var t=n.event.sourceEvent;\"touchmove\"===t.type&&(D=t.changedTouches[0].clientY,q(U=function(t,e,r){var n=(e-r)/j+t;return i.constrain(n,0,N)}(R,z,D),F,j))}));C.call(H)}function q(r,n,i){e._scrollY=t._fullLayout.legend._scrollY=r,c.setTranslate(C,0,-r),c.setRect(O,e._width,p.scrollBarMargin+r*i,p.scrollBarWidth,n),E.select(\"rect\").attr(\"y\",b+r)}t._context.edits.legendPosition&&(T.classed(\"cursor-move\",!0),l.init({element:T.node(),gd:t,prepFn:function(){var t=c.getTranslate(T);g=t.x,y=t.y},moveFn:function(t,r){var n=g+t,i=y+r;c.setTranslate(T,n,i),s=l.align(n,0,x.l,x.l+x.w,e.xanchor),u=l.align(i,0,x.t+x.h,x.t,e.yanchor)},doneFn:function(){void 0!==s&&void 0!==u&&o.call(\"_guiRelayout\",t,{\"legend.x\":s,\"legend.y\":u})},clickFn:function(e,n){var i=r.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&&_(t,T,i,e,n)}}))}],t)}(t,e)}},{\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/events\":492,\"../../lib/svg_text_utils\":529,\"../../plots/plots\":619,\"../../registry\":638,\"../color\":366,\"../dragelement\":385,\"../drawing\":388,\"./constants\":417,\"./get_legend_data\":420,\"./handle_click\":421,\"./helpers\":422,\"./style\":424,\"@plotly/d3\":58}],420:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"./helpers\");e.exports=function(t,e){var r,a,o=e._inHover,s=i.isGrouped(e),l=i.isReversed(e),c={},u=[],f=!1,h={},p=0,d=0;function g(t,r){if(\"\"!==t&&i.isGrouped(e))-1===u.indexOf(t)?(u.push(t),f=!0,c[t]=[r]):c[t].push(r);else{var n=\"~~i\"+p;u.push(n),c[n]=[r],p++}}for(r=0;rA&&(k=A)}w[r][0]._groupMinRank=k,w[r][0]._preGroupSort=r}var M=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(w.forEach((function(t,e){t[0]._preGroupSort=e})),w.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),r=0;rr?r:t}e.exports=function(t,e,r){var v=e._fullLayout;r||(r=v.legend);var y=\"constant\"===r.itemsizing,x=r.itemwidth,b=(x+2*p.itemGap)/2,_=o(b,0),w=function(t,e,r,n){var i;if(t+1)i=t;else{if(!(e&&e.width>0))return 0;i=e.width}return y?n:Math.min(i,r)};function T(t,a,o){var u=t[0].trace,f=u.marker||{},h=f.line||{},p=o?u.visible&&u.type===o:i.traceIs(u,\"bar\"),d=n.select(a).select(\"g.legendpoints\").selectAll(\"path.legend\"+o).data(p?[t]:[]);d.enter().append(\"path\").classed(\"legend\"+o,!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),d.exit().remove(),d.each((function(t){var i=n.select(this),a=t[0],o=w(a.mlw,f.line,5,2);i.style(\"stroke-width\",o+\"px\");var p=a.mcc;if(!r._inHover&&\"mc\"in a){var d=c(f),g=d.mid;void 0===g&&(g=(d.max+d.min)/2),p=s.tryColorscale(f,\"\")(g)}var v=p||a.mc||f.color,y=f.pattern,x=y&&s.getPatternAttr(y.shape,0,\"\");if(x){var b=s.getPatternAttr(y.bgcolor,0,null),_=s.getPatternAttr(y.fgcolor,0,null),T=y.fgopacity,k=m(y.size,8,10),A=m(y.solidity,.5,1),M=\"legend-\"+u.uid;i.call(s.pattern,\"legend\",e,M,x,k,A,p,y.fillmode,b,_,T)}else i.call(l.fill,v);o&&l.stroke(i,a.mlc||h.color)}))}function k(t,e,r){var o=t[0],s=o.trace,l=r?s.visible&&s.type===r:i.traceIs(s,r),c=n.select(e).select(\"g.legendpoints\").selectAll(\"path.legend\"+r).data(l?[t]:[]);if(c.enter().append(\"path\").classed(\"legend\"+r,!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),c.exit().remove(),c.size()){var u=(s.marker||{}).line,p=w(h(u.width,o.pts),u,5,2),d=a.minExtend(s,{marker:{line:{width:p}}});d.marker.line.color=u.color;var g=a.minExtend(o,{trace:d});f(c,g,d)}}t.each((function(t){var e=n.select(this),i=a.ensureSingle(e,\"g\",\"layers\");i.style(\"opacity\",t[0].trace.opacity);var s=r.valign,l=t[0].lineHeight,c=t[0].height;if(\"middle\"!==s&&l&&c){var u={top:1,bottom:-1}[s]*(.5*(l-c+3));i.attr(\"transform\",o(0,u))}else i.attr(\"transform\",null);i.selectAll(\"g.legendfill\").data([t]).enter().append(\"g\").classed(\"legendfill\",!0),i.selectAll(\"g.legendlines\").data([t]).enter().append(\"g\").classed(\"legendlines\",!0);var f=i.selectAll(\"g.legendsymbols\").data([t]);f.enter().append(\"g\").classed(\"legendsymbols\",!0),f.selectAll(\"g.legendpoints\").data([t]).enter().append(\"g\").classed(\"legendpoints\",!0)})).each((function(t){var r,i=t[0].trace,o=[];if(i.visible)switch(i.type){case\"histogram2d\":case\"heatmap\":o=[[\"M-15,-2V4H15V-2Z\"]],r=!0;break;case\"choropleth\":case\"choroplethmapbox\":o=[[\"M-6,-6V6H6V-6Z\"]],r=!0;break;case\"densitymapbox\":o=[[\"M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0\"]],r=\"radial\";break;case\"cone\":o=[[\"M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z\"],[\"M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z\"],[\"M-6,-2 A2,2 0 0,0 -6,2 L6,0Z\"]],r=!1;break;case\"streamtube\":o=[[\"M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z\"],[\"M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z\"],[\"M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z\"]],r=!1;break;case\"surface\":o=[[\"M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z\"],[\"M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z\"]],r=!0;break;case\"mesh3d\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6H6L0,6Z\"]],r=!1;break;case\"volume\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6H6L0,6Z\"]],r=!0;break;case\"isosurface\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6 A12,24 0 0,0 6,-6 L0,6Z\"]],r=!1}var u=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legend3dandfriends\").data(o);u.enter().append(\"path\").classed(\"legend3dandfriends\",!0).attr(\"transform\",_).style(\"stroke-miterlimit\",1),u.exit().remove(),u.each((function(t,o){var u,f=n.select(this),h=c(i),p=h.colorscale,g=h.reversescale;if(p){if(!r){var m=p.length;u=0===o?p[g?m-1:0][1]:1===o?p[g?0:m-1][1]:p[Math.floor((m-1)/2)][1]}}else{var v=i.vertexcolor||i.facecolor||i.color;u=a.isArrayOrTypedArray(v)?v[o]||v[0]:v}f.attr(\"d\",t[0]),u?f.call(l.fill,u):f.call((function(t){if(t.size()){var n=\"legendfill-\"+i.uid;s.gradient(t,e,n,d(g,\"radial\"===r),p,\"fill\")}}))}))})).each((function(t){var e=t[0].trace,r=\"waterfall\"===e.type;if(t[0]._distinct&&r){var i=t[0].trace[t[0].dir].marker;return t[0].mc=i.color,t[0].mlw=i.line.width,t[0].mlc=i.line.color,T(t,this,\"waterfall\")}var a=[];e.visible&&r&&(a=t[0].hasTotals?[[\"increasing\",\"M-6,-6V6H0Z\"],[\"totals\",\"M6,6H0L-6,-6H-0Z\"],[\"decreasing\",\"M6,6V-6H0Z\"]]:[[\"increasing\",\"M-6,-6V6H6Z\"],[\"decreasing\",\"M6,6V-6H-6Z\"]]);var o=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendwaterfall\").data(a);o.enter().append(\"path\").classed(\"legendwaterfall\",!0).attr(\"transform\",_).style(\"stroke-miterlimit\",1),o.exit().remove(),o.each((function(t){var r=n.select(this),i=e[t[0]].marker,a=w(void 0,i.line,5,2);r.attr(\"d\",t[1]).style(\"stroke-width\",a+\"px\").call(l.fill,i.color),a&&r.call(l.stroke,i.line.color)}))})).each((function(t){T(t,this,\"funnel\")})).each((function(t){T(t,this)})).each((function(t){var r=t[0].trace,o=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendbox\").data(r.visible&&i.traceIs(r,\"box-violin\")?[t]:[]);o.enter().append(\"path\").classed(\"legendbox\",!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),o.exit().remove(),o.each((function(){var t=n.select(this);if(\"all\"!==r.boxpoints&&\"all\"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=w(void 0,r.line,5,2);t.style(\"stroke-width\",i+\"px\").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var c=a.minExtend(r,{marker:{size:y?12:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:\"diameter\"}});o.call(s.pointStyle,c,e)}}))})).each((function(t){k(t,this,\"funnelarea\")})).each((function(t){k(t,this,\"pie\")})).each((function(t){var r,i,o=g(t),l=o.showFill,f=o.showLine,h=o.showGradientLine,p=o.showGradientFill,m=o.anyFill,v=o.anyLine,y=t[0],b=y.trace,_=c(b),T=_.colorscale,k=_.reversescale,A=u.hasMarkers(b)||!m?\"M5,0\":v?\"M5,-2\":\"M5,-3\",M=n.select(this),S=M.select(\".legendfill\").selectAll(\"path\").data(l||p?[t]:[]);if(S.enter().append(\"path\").classed(\"js-fill\",!0),S.exit().remove(),S.attr(\"d\",A+\"h\"+x+\"v6h-\"+x+\"z\").call(l?s.fillGroupStyle:function(t){if(t.size()){var r=\"legendfill-\"+b.uid;s.gradient(t,e,r,d(k),T,\"fill\")}}),f||h){var E=w(void 0,b.line,10,5);i=a.minExtend(b,{line:{width:E}}),r=[a.minExtend(y,{trace:i})]}var L=M.select(\".legendlines\").selectAll(\"path\").data(f||h?[r]:[]);L.enter().append(\"path\").classed(\"js-line\",!0),L.exit().remove(),L.attr(\"d\",A+(h?\"l\"+x+\",0.0001\":\"h\"+x)).call(f?s.lineGroupStyle:function(t){if(t.size()){var r=\"legendline-\"+b.uid;s.lineGroupStyle(t),s.gradient(t,e,r,d(k),T,\"stroke\")}})})).each((function(t){var r,i,o=g(t),l=o.anyFill,c=o.anyLine,f=o.showLine,h=o.showMarker,p=t[0],d=p.trace,m=!h&&!c&&!l&&u.hasText(d);function v(t,e,r,n){var i=a.nestedProperty(d,t).get(),o=a.isArrayOrTypedArray(i)&&e?e(i):i;if(y&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function x(t){return p._distinct&&p.index&&t[p.index]?t[p.index]:t[0]}if(h||m||f){var b={},w={};if(h){b.mc=v(\"marker.color\",x),b.mx=v(\"marker.symbol\",x),b.mo=v(\"marker.opacity\",a.mean,[.2,1]),b.mlc=v(\"marker.line.color\",x),b.mlw=v(\"marker.line.width\",a.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:\"diameter\"};var T=v(\"marker.size\",a.mean,[2,16],12);b.ms=T,w.marker.size=T}f&&(w.line={width:v(\"line.width\",x,[0,10],5)}),m&&(b.tx=\"Aa\",b.tp=v(\"textposition\",x),b.ts=10,b.tc=v(\"textfont.color\",x),b.tf=v(\"textfont.family\",x)),r=[a.minExtend(p,b)],(i=a.minExtend(d,w)).selectedpoints=null,i.texttemplate=null}var k=n.select(this).select(\"g.legendpoints\"),A=k.selectAll(\"path.scatterpts\").data(h?r:[]);A.enter().insert(\"path\",\":first-child\").classed(\"scatterpts\",!0).attr(\"transform\",_),A.exit().remove(),A.call(s.pointStyle,i,e),h&&(r[0].mrc=3);var M=k.selectAll(\"g.pointtext\").data(m?r:[]);M.enter().append(\"g\").classed(\"pointtext\",!0).append(\"text\").attr(\"transform\",_),M.exit().remove(),M.selectAll(\"text\").call(s.textPointStyle,i,e)})).each((function(t){var e=t[0].trace,r=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendcandle\").data(e.visible&&\"candlestick\"===e.type?[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\",_).style(\"stroke-miterlimit\",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?\"increasing\":\"decreasing\"],o=w(void 0,a.line,5,2);i.style(\"stroke-width\",o+\"px\").call(l.fill,a.fillcolor),o&&l.stroke(i,a.line.color)}))})).each((function(t){var e=t[0].trace,r=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendohlc\").data(e.visible&&\"ohlc\"===e.type?[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\",_).style(\"stroke-miterlimit\",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?\"increasing\":\"decreasing\"],o=w(void 0,a.line,5,2);i.style(\"fill\",\"none\").call(s.dashLine,a.line.dash,o),o&&l.stroke(i,a.line.color)}))}))}},{\"../../lib\":503,\"../../registry\":638,\"../../traces/pie/helpers\":905,\"../../traces/pie/style_one\":911,\"../../traces/scatter/subtypes\":951,\"../color\":366,\"../colorscale/helpers\":377,\"../drawing\":388,\"./constants\":417,\"@plotly/d3\":58}],425:[function(t,e,r){\"use strict\";t(\"./constants\");e.exports={editType:\"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\"},uirevision:{valType:\"any\",editType:\"none\"},add:{valType:\"string\",arrayOk:!0,dflt:\"\",editType:\"modebar\"},remove:{valType:\"string\",arrayOk:!0,dflt:\"\",editType:\"modebar\"}}},{\"./constants\":427}],426:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../plots/plots\"),a=t(\"../../plots/cartesian/axis_ids\"),o=t(\"../../fonts/ploticon\"),s=t(\"../shapes/draw\").eraseActiveShape,l=t(\"../../lib\"),c=l._,u=e.exports={};function f(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=c._cartesianSpikesEnabled;if(\"zoom\"===s){var p,d=\"in\"===l?.5:2,g=(1+d)/2,m=(1-d)/2;for(i=0;i1?(I=[\"toggleHover\"],O=[\"resetViews\"]):v?(P=[\"zoomInGeo\",\"zoomOutGeo\"],I=[\"hoverClosestGeo\"],O=[\"resetGeo\"]):m?(I=[\"hoverClosest3d\"],O=[\"resetCameraDefault3d\",\"resetCameraLastSave3d\"]):w?(P=[\"zoomInMapbox\",\"zoomOutMapbox\"],I=[\"toggleHover\"],O=[\"resetViewMapbox\"]):b?I=[\"hoverClosestGl2d\"]:y?I=[\"hoverClosestPie\"]:A?(I=[\"hoverClosestCartesian\",\"hoverCompareCartesian\"],O=[\"resetViewSankey\"]):I=[\"toggleHover\"];g&&(I=[\"toggleSpikelines\",\"hoverClosestCartesian\",\"hoverCompareCartesian\"]);(function(t){for(var e=0;e0)){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.max)e=F[r+1];else if(t=n.pmax)e=F[r+1];else if(t0?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||\"multicategory\"===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;lp&&(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;oy?(k=f,E=\"y0\",A=y,L=\"y1\"):(k=y,E=\"y1\",A=f,L=\"y0\");Z(n),Q(s,r),function(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),s=a.getFromId(r,i),l=\"\";\"paper\"===n||o.autorange||(l+=n);\"paper\"===i||s.autorange||(l+=i);u.setClipUrl(t,l?\"clip\"+r._fullLayout._uid+l:null,r)}(e,r,t),X.moveFn=\"move\"===O?J:K,X.altKey=n.altKey},doneFn:function(){if(v(t))return;p(e),$(s),b(e,t,r),n.call(\"_guiRelayout\",t,l.getUpdateObj())},clickFn:function(){if(v(t))return;$(s)}};function Z(r){if(v(t))O=null;else if(R)O=\"path\"===r.target.tagName?\"move\":\"start-point\"===r.target.attributes[\"data-line-point\"].value?\"resize-over-start-point\":\"resize-over-end-point\";else{var n=X.element.getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top,o=r.clientX-n.left,s=r.clientY-n.top,l=!F&&i>10&&a>10&&!r.shiftKey?h.getCursor(o/i,1-s/a):\"move\";p(e,l),O=l.split(\"-\")[0]}}function J(n,i){if(\"path\"===r.type){var a=function(t){return t},o=a,l=a;z?B(\"xanchor\",r.xanchor=G(x+n)):(o=function(t){return G(H(t)+n)},N&&\"date\"===N.type&&(o=g.encodeDate(o))),D?B(\"yanchor\",r.yanchor=Y(T+i)):(l=function(t){return Y(q(t)+i)},U&&\"date\"===U.type&&(l=g.encodeDate(l))),B(\"path\",r.path=w(I,o,l))}else z?B(\"xanchor\",r.xanchor=G(x+n)):(B(\"x0\",r.x0=G(c+n)),B(\"x1\",r.x1=G(m+n))),D?B(\"yanchor\",r.yanchor=Y(T+i)):(B(\"y0\",r.y0=Y(f+i)),B(\"y1\",r.y1=Y(y+i)));e.attr(\"d\",_(t,r)),Q(s,r)}function K(n,i){if(F){var a=function(t){return t},o=a,l=a;z?B(\"xanchor\",r.xanchor=G(x+n)):(o=function(t){return G(H(t)+n)},N&&\"date\"===N.type&&(o=g.encodeDate(o))),D?B(\"yanchor\",r.yanchor=Y(T+i)):(l=function(t){return Y(q(t)+i)},U&&\"date\"===U.type&&(l=g.encodeDate(l))),B(\"path\",r.path=w(I,o,l))}else if(R){if(\"resize-over-start-point\"===O){var u=c+n,h=D?f-i:f+i;B(\"x0\",r.x0=z?u:G(u)),B(\"y0\",r.y0=D?h:Y(h))}else if(\"resize-over-end-point\"===O){var p=m+n,d=D?y-i:y+i;B(\"x1\",r.x1=z?p:G(p)),B(\"y1\",r.y1=D?d:Y(d))}}else{var v=function(t){return-1!==O.indexOf(t)},b=v(\"n\"),j=v(\"s\"),V=v(\"w\"),W=v(\"e\"),X=b?k+i:k,Z=j?A+i:A,J=V?M+n:M,K=W?S+n:S;D&&(b&&(X=k-i),j&&(Z=A-i)),(!D&&Z-X>10||D&&X-Z>10)&&(B(E,r[E]=D?X:Y(X)),B(L,r[L]=D?Z:Y(Z))),K-J>10&&(B(C,r[C]=z?J:G(J)),B(P,r[P]=z?K:G(K)))}e.attr(\"d\",_(t,r)),Q(s,r)}function Q(t,e){(z||D)&&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=H(z?e.xanchor:i.midRange(r?[e.x0,e.x1]:g.extractPathCoords(e.path,d.paramIsX))),o=q(D?e.yanchor:i.midRange(r?[e.y0,e.y1]:g.extractPathCoords(e.path,d.paramIsY)));if(a=g.roundPositionForSharpStrokeRendering(a,1),o=g.roundPositionForSharpStrokeRendering(o,1),z&&D){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(z){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 $(t){t.selectAll(\".visual-cue\").remove()}h.init(X),W.node().onmousemove=Z}(t,z,l,e,r,O):!0===l.editable&&z.style(\"pointer-events\",P||c.opacity(S)*M<=.5?\"stroke\":\"all\");z.node().addEventListener(\"click\",(function(){return function(t,e){if(!y(t))return;var r=+e.node().getAttribute(\"data-index\");if(r>=0){if(r===t._fullLayout._activeShapeIndex)return void T(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=T,m(t)}}(t,z)}))}}function b(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,\"\").replace(/[xyz][1-9]* *domain/g,\"\");u.setClipUrl(t,n?\"clip\"+e._fullLayout._uid+n:null,e)}function _(t,e){var r,n,o,s,l,c,u,f,h=e.type,p=a.getRefType(e.xref),m=a.getRefType(e.yref),v=a.getFromId(t,e.xref),y=a.getFromId(t,e.yref),x=t._fullLayout._size;if(v?\"domain\"===p?n=function(t){return v._offset+v._length*t}:(r=g.shapePositionToRange(v),n=function(t){return v._offset+v.r2p(r(t,!0))}):n=function(t){return x.l+x.w*t},y?\"domain\"===m?s=function(t){return y._offset+y._length*(1-t)}:(o=g.shapePositionToRange(y),s=function(t){return y._offset+y.r2p(o(t,!0))}):s=function(t){return x.t+x.h*(1-t)},\"path\"===h)return v&&\"date\"===v.type&&(n=g.decodeDate(n)),y&&\"date\"===y.type&&(s=g.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(d.segmentRE,(function(t){var n=0,c=t.charAt(0),u=d.paramIsX[c],f=d.paramIsY[c],h=d.numParams[c],p=t.substr(1).replace(d.paramRE,(function(t){return u[n]?t=\"pixel\"===a?e(s)+Number(t):e(t):f[n]&&(t=\"pixel\"===o?r(l)-Number(t):r(t)),++n>h&&(t=\"X\"),t}));return n>h&&(p=p.replace(/[\\s,]*X.*/,\"\"),i.log(\"Ignoring extra params in segment \"+t)),c+p}))}(e,n,s);if(\"pixel\"===e.xsizemode){var b=n(e.xanchor);l=b+e.x0,c=b+e.x1}else l=n(e.x0),c=n(e.x1);if(\"pixel\"===e.ysizemode){var _=s(e.yanchor);u=_-e.y0,f=_-e.y1}else u=s(e.y0),f=s(e.y1);if(\"line\"===h)return\"M\"+l+\",\"+u+\"L\"+c+\",\"+f;if(\"rect\"===h)return\"M\"+l+\",\"+u+\"H\"+c+\"V\"+f+\"H\"+l+\"Z\";var w=(l+c)/2,T=(u+f)/2,k=Math.abs(w-l),A=Math.abs(T-u),M=\"A\"+k+\",\"+A,S=w+k+\",\"+T;return\"M\"+S+M+\" 0 1,1 \"+(w+\",\"+(T-A))+M+\" 0 0,1 \"+S+\"Z\"}function w(t,e,r){return t.replace(d.segmentRE,(function(t){var n=0,i=t.charAt(0),a=d.paramIsX[i],o=d.paramIsY[i],s=d.numParams[i];return i+t.substr(1).replace(d.paramRE,(function(t){return n>=s||(a[n]?t=e(t):o[n]&&(t=r(t)),n++),t}))}))}function T(t){y(t)&&(t._fullLayout._activeShapeIndex>=0&&(l(t),delete t._fullLayout._activeShapeIndex,m(t)))}e.exports={draw:m,drawOne:x,eraseActiveShape:function(t){if(!y(t))return;l(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e=0&&f(v),r.attr(\"d\",g(e)),A&&!h)&&(k=function(t,e){for(var r=0;r1&&(2!==t.length||\"Z\"!==t[1][0])&&(0===T&&(t[0][0]=\"M\"),e[w]=t,y(),x())}}()}}function I(t,r){!function(t,r){if(e.length)for(var n=0;n0&&l0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr(\"transform\",l(o-.5*f.gripWidth,e._dims.currentValueTotalHeight))}}function E(t,e){var r=t._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,e))}function L(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 C(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 P(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;i0?[0]:[]);function s(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,m(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,v);l.enter().append(\"g\").classed(f.groupClassName,!0),l.exit().each(s).remove();for(var c=0;c0||h<0){var v={left:[-d,0],right:[d,0],top:[0,-d],bottom:[0,d]}[b.side];e.attr(\"transform\",l(v[0],v[1]))}}}return R.call(F),O&&(E?R.on(\".opacity\",null):(A=0,M=!0,R.text(y).on(\"mouseover.opacity\",(function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style(\"opacity\",1)})).on(\"mouseout.opacity\",(function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style(\"opacity\",0)}))),R.call(f.makeEditable,{gd:t}).on(\"edit\",(function(e){void 0!==x?o.call(\"_guiRestyle\",t,v,e,x):o.call(\"_guiRelayout\",t,v,e)})).on(\"cancel\",(function(){this.text(this.attr(\"data-unformatted\")).call(F)})).on(\"input\",(function(t){this.text(t||\" \").call(f.positionText,_.x,_.y)}))),R.classed(\"js-placeholder\",M),T}}},{\"../../constants/alignment\":471,\"../../constants/interactions\":478,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/plots\":619,\"../../registry\":638,\"../color\":366,\"../drawing\":388,\"@plotly/d3\":58,\"fast-isnumeric\":190}],465:[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\"}]},args2:{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({editType:\"arraydraw\"}),{}),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\":493,\"../../plot_api/edit_types\":536,\"../../plot_api/plot_template\":543,\"../../plots/font_attributes\":585,\"../../plots/pad_attributes\":618,\"../color/attributes\":365}],466:[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\"}}},{}],467:[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(\"args2\"),r(\"label\"),r(\"execute\"))}e.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},{\"../../lib\":503,\"../../plots/array_container_defaults\":549,\"./attributes\":465,\"./constants\":466}],468:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../plots/plots\"),a=t(\"../color\"),o=t(\"../drawing\"),s=t(\"../../lib\"),l=t(\"../../lib/svg_text_utils\"),c=t(\"../../plot_api/plot_template\").arrayEditor,u=t(\"../../constants/alignment\").LINE_SPACING,f=t(\"./constants\"),h=t(\"./scrollbox\");function p(t){return t._index}function d(t,e){return+t.attr(f.menuIndexAttrName)===e._index}function g(t,e,r,n,i,a,o,s){e.active=o,c(t.layout,f.name,e).applyUpdate(\"active\",o),\"buttons\"===e.type?v(t,n,null,null,e):\"dropdown\"===e.type&&(i.attr(f.menuIndexAttrName,\"-1\"),m(t,n,i,a,e),s||v(t,n,i,a,e))}function m(t,e,r,n,i){var a=s.ensureSingle(e,\"g\",f.headerClassName,(function(t){t.style(\"pointer-events\",\"all\")})),l=i._dims,c=i.active,u=i.buttons[c]||f.blankHeaderOpts,h={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};a.call(y,i,u,t).call(M,i,h,p),s.ensureSingle(e,\"text\",f.headerArrowClassName,(function(t){t.attr(\"text-anchor\",\"end\").call(o.font,i.font).text(f.arrowSymbol[i.direction])})).attr({x:l.headerWidth-f.arrowOffsetX+i.pad.l,y:l.headerHeight/2+f.textOffsetY+i.pad.t}),a.on(\"click\",(function(){r.call(S,String(d(r,i)?-1:i._index)),v(t,e,r,n,i)})),a.on(\"mouseover\",(function(){a.call(w)})),a.on(\"mouseout\",(function(){a.call(T,i)})),o.setTranslate(e,l.lx,l.ly)}function v(t,e,r,a,o){r||(r=e).attr(\"pointer-events\",\"all\");var l=function(t){return-1==+t.attr(f.menuIndexAttrName)}(r)&&\"buttons\"!==o.type?[]:o.buttons,c=\"dropdown\"===o.type?f.dropdownButtonClassName:f.buttonClassName,u=r.selectAll(\"g.\"+c).data(s.filterVisible(l)),h=u.enter().append(\"g\").classed(c,!0),p=u.exit();\"dropdown\"===o.type?(h.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\"),p.transition().attr(\"opacity\",\"0\").remove()):p.remove();var d=0,m=0,v=o._dims,x=-1!==[\"up\",\"down\"].indexOf(o.direction);\"dropdown\"===o.type&&(x?m=v.headerHeight+f.gapButtonHeader:d=v.headerWidth+f.gapButtonHeader),\"dropdown\"===o.type&&\"up\"===o.direction&&(m=-f.gapButtonHeader+f.gapButton-v.openHeight),\"dropdown\"===o.type&&\"left\"===o.direction&&(d=-f.gapButtonHeader+f.gapButton-v.openWidth);var b={x:v.lx+d+o.pad.l,y:v.ly+m+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},k={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each((function(s,l){var c=n.select(this);c.call(y,o,s,t).call(M,o,b),c.on(\"click\",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(g(t,o,0,e,r,a,-1),i.executeAPICommand(t,s.method,s.args2)):(g(t,o,0,e,r,a,l),i.executeAPICommand(t,s.method,s.args))),t.emit(\"plotly_buttonclicked\",{menu:o,button:s,active:o.active}))})),c.on(\"mouseover\",(function(){c.call(w)})),c.on(\"mouseout\",(function(){c.call(T,o),u.call(_,o)}))})),u.call(_,o),x?(k.w=Math.max(v.openWidth,v.headerWidth),k.h=b.y-k.t):(k.w=b.x-k.l,k.h=Math.max(v.openHeight,v.headerHeight)),k.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,h=i._dims,p=i.active;if(u)for(s=0,l=0;l0?[0]:[]);if(o.enter().append(\"g\").classed(f.containerClassName,!0).style(\"cursor\",\"pointer\"),o.exit().each((function(){n.select(this).selectAll(\"g.\"+f.headerGroupClassName).each(a)})).remove(),0!==r.length){var l=o.selectAll(\"g.\"+f.headerGroupClassName).data(r,p);l.enter().append(\"g\").classed(f.headerGroupClassName,!0);for(var c=s.ensureSingle(o,\"g\",f.dropdownButtonGroupClassName,(function(t){t.style(\"pointer-events\",\"all\")})),u=0;uw,A=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,S=d,E=m+v;E+M>c&&(E=c-M);var L=this.container.selectAll(\"rect.scrollbar-horizontal\").data(k?[0]:[]);L.exit().on(\".drag\",null).remove(),L.enter().append(\"rect\").classed(\"scrollbar-horizontal\",!0).call(i.fill,s.barColor),k?(this.hbar=L.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:E,width:A,height:M}),this._hbarXMin=S+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=v>T,P=s.barWidth+2*s.barPad,I=s.barLength+2*s.barPad,O=d+g,z=m;O+P>l&&(O=l-P);var D=this.container.selectAll(\"rect.scrollbar-vertical\").data(C?[0]:[]);D.exit().on(\".drag\",null).remove(),D.enter().append(\"rect\").classed(\"scrollbar-vertical\",!0).call(i.fill,s.barColor),C?(this.vbar=D.attr({rx:s.barRadius,ry:s.barRadius,x:O,y:z,width:P,height:I}),this._vbarYMin=z+I/2,this._vbarTranslateMax=T-I):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,B=C?f+P+.5:f+.5,N=h-.5,j=k?p+M+.5:p+.5,U=o._topdefs.selectAll(\"#\"+R).data(k||C?[0]:[]);if(U.exit().remove(),U.enter().append(\"clipPath\").attr(\"id\",R).append(\"rect\"),k||C?(this._clipRect=U.select(\"rect\").attr({x:Math.floor(F),y:Math.floor(N),width:Math.ceil(B)-Math.floor(F),height:Math.ceil(j)-Math.floor(N)}),this.container.call(a.setClipUrl,R,this.gd),this.bg.attr({x:d,y:m,width:g,height:v})):(this.bg.attr({width:0,height:0}),this.container.on(\"wheel\",null).on(\".drag\",null).call(a.setClipUrl,null),delete this._clipRect),k||C){var V=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(V);var H=n.behavior.drag().on(\"dragstart\",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on(\"drag\",this._onBarDrag.bind(this));k&&this.hbar.on(\".drag\",null).call(H),C&&this.vbar.on(\".drag\",null).call(H)}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\":503,\"../color\":366,\"../drawing\":388,\"@plotly/d3\":58}],471:[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,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:\"right\",right:\"left\",top:\"bottom\",bottom:\"top\"}}},{}],472:[function(t,e,r){\"use strict\";e.exports={axisRefDescription:function(t,e,r){return[\"If set to a\",t,\"axis id (e.g. *\"+t+\"* or\",\"*\"+t+\"2*), the `\"+t+\"` position refers to a\",t,\"coordinate. If set to *paper*, the `\"+t+\"`\",\"position refers to the distance from the\",e,\"of the plotting\",\"area in normalized coordinates where *0* (*1*) corresponds to the\",e,\"(\"+r+\"). If set to a\",t,\"axis ID followed by\",\"*domain* (separated by a space), the position behaves like for\",\"*paper*, but refers to the distance in fractions of the domain\",\"length from the\",e,\"of the domain of that axis: e.g.,\",\"*\"+t+\"2 domain* refers to the domain of the second\",t,\" axis and a\",t,\"position of 0.5 refers to the\",\"point between the\",e,\"and the\",r,\"of the domain of the\",\"second\",t,\"axis.\"].join(\" \")}}},{}],473:[function(t,e,r){\"use strict\";e.exports={INCREASING:{COLOR:\"#3D9970\",SYMBOL:\"\\u25b2\"},DECREASING:{COLOR:\"#FF4136\",SYMBOL:\"\\u25bc\"}}},{}],474:[function(t,e,r){\"use strict\";e.exports={FORMAT_LINK:\"https://github.com/d3/d3-format/tree/v1.4.5#d3-format\",DATE_FORMAT_LINK:\"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format\"}},{}],475:[function(t,e,r){\"use strict\";e.exports={COMPARISON_OPS:[\"=\",\"!=\",\"<\",\">=\",\">\",\"<=\"],COMPARISON_OPS2:[\"=\",\"<\",\">=\",\">\",\"<=\"],INTERVAL_OPS:[\"[]\",\"()\",\"[)\",\"(]\",\"][\",\")(\",\"](\",\")[\"],SET_OPS:[\"{}\",\"}{\"],CONSTRAINT_REDUCTION:{\"=\":\"=\",\"<\":\"<\",\"<=\":\"<\",\">\":\">\",\">=\":\">\",\"[]\":\"[]\",\"()\":\"[]\",\"[)\":\"[]\",\"(]\":\"[]\",\"][\":\"][\",\")(\":\"][\",\"](\":\"][\",\")[\":\"][\"}}},{}],476:[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]}},{}],477:[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\"}},{}],478:[function(t,e,r){\"use strict\";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],479:[function(t,e,r){\"use strict\";e.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:\"\\u2212\"}},{}],480:[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}},{}],481:[function(t,e,r){\"use strict\";r.version=t(\"./version\").version,t(\"native-promise-only\"),t(\"../build/plotcss\");for(var n=t(\"./registry\"),i=r.register=n.register,a=t(\"./plot_api\"),o=Object.keys(a),s=0;splotly-logomark\"}}},{}],483:[function(t,e,r){\"use strict\";r.isLeftAnchor=function(t){return\"left\"===t.xanchor||\"auto\"===t.xanchor&&t.x<=1/3},r.isCenterAnchor=function(t){return\"center\"===t.xanchor||\"auto\"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isRightAnchor=function(t){return\"right\"===t.xanchor||\"auto\"===t.xanchor&&t.x>=2/3},r.isTopAnchor=function(t){return\"top\"===t.yanchor||\"auto\"===t.yanchor&&t.y>=2/3},r.isMiddleAnchor=function(t){return\"middle\"===t.yanchor||\"auto\"===t.yanchor&&t.y>1/3&&t.y<2/3},r.isBottomAnchor=function(t){return\"bottom\"===t.yanchor||\"auto\"===t.yanchor&&t.y<=1/3}},{}],484:[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-14}function c(t,e){return a(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0](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 m(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}g?(u=0,f=o,h=s):r=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\":510}],485:[function(t,e,r){\"use strict\";var n=Array.isArray,i=ArrayBuffer,a=DataView;function o(t){return i.isView(t)&&!(t instanceof a)}function s(t){return n(t)||o(t)}function l(t,e,r){if(s(t)){if(s(t[0])){for(var n=r,i=0;ii.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&ti.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.get(t,r))}},angle:{coerceFunction:function(t,e,r){\"auto\"===t?e.set(\"auto\"):n(t)?e.set(f(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||u(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&&!!u(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=n&&t<=i?t:u}if(\"string\"!=typeof t&&\"number\"!=typeof t)return u;t=String(t);var c=_(e),v=t.charAt(0);!c||\"G\"!==v&&\"g\"!==v||(t=t.substr(1),e=\"\");var w=c&&\"chinese\"===e.substr(0,7),T=t.match(w?x:y);if(!T)return u;var k=T[1],A=T[3]||\"1\",M=Number(T[5]||1),S=Number(T[7]||0),E=Number(T[9]||0),L=Number(T[11]||0);if(c){if(2===k.length)return u;var C;k=Number(k);try{var P=m.getComponentMethod(\"calendars\",\"getCal\")(e);if(w){var I=\"i\"===A.charAt(A.length-1);A=parseInt(A,10),C=P.newDate(k,P.toMonthIndex(k,A,I),M)}else C=P.newDate(k,Number(A),M)}catch(t){return u}return C?(C.toJD()-g)*f+S*h+E*p+L*d:u}k=2===k.length?(Number(k)+2e3-b)%100+b:Number(k),A-=1;var O=new Date(Date.UTC(2e3,A,M,S,E));return O.setUTCFullYear(k),O.getUTCMonth()!==A||O.getUTCDate()!==M?u:O.getTime()+L*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 T=90*f,k=3*h,A=5*p;function M(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,E=Math.floor(l(t,f));try{a=m.getComponentMethod(\"calendars\",\"getCal\")(r).fromJD(S).formatDate(\"yyyy-mm-dd\")}catch(t){a=v(\"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=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 M(a(\"%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,E=/%h/g,L={1:\"1\",2:\"1\",3:\"2\",4:\"2\"};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(t=t.replace(E,(function(){return L[r(\"%q\")(i)]})),_(n))try{t=m.getComponentMethod(\"calendars\",\"worldCalFmt\")(t,e,n)}catch(t){return\"Invalid\"}return r(t)(i)}var P=[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),P[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 I=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=m.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+I);return c.setUTCMonth(c.getUTCMonth()+e)+n-I},r.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,c=_(e)&&m.getComponentMethod(\"calendars\",\"getCal\")(e),u=0;u0&&t[e+1][0]<0)return e;return null}switch(e=\"RUS\"===s||\"FJI\"===s?function(t){var e;if(null===c(t))e=t;else for(e=new Array(t.length),i=0;ie?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 a=h.tester(r);a.pts.pop(),l.push(a)}:function(t){l.push(h.tester(t))},a.type){case\"MultiPolygon\":for(r=0;ri&&(i=c,e=l)}else e=r;return o.default(e).geometry.coordinates}(u),n.fIn=t,n.fOut=u,s.push(u)}else c.log([\"Location\",n.loc,\"does not have a valid GeoJSON geometry.\",\"Traces with locationmode *geojson-id* only support\",\"*Polygon* and *MultiPolygon* geometries.\"].join(\" \"))}delete i[r]}switch(r.type){case\"FeatureCollection\":var h=r.features;for(n=0;n100?(clearInterval(a),n(\"Unexpected error while fetching from \"+t)):void i++}),50)}))}for(var o=0;o0&&(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;r1||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,m=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(m)},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.xo?r.x-o:0,f=r.yl?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;f0?p=i:h=i,f++}return a}},{\"./mod\":510}],499:[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(\"./array\").isArrayOrTypedArray,c=a(s);function u(t,e){var r=t;return r[3]*=e,r}function f(t){if(n(t))return c;var e=a(t);return e.length?e:c}function h(t){return n(t)?t:1}e.exports={formatColor:function(t,e,r){var n,i,s,p,d,g=t.color,m=l(g),v=l(e),y=o.extractOpts(t),x=[];if(n=void 0!==y.colorscale?o.makeColorScaleFuncFromTrace(t):f,i=m?function(t,e){return void 0===t[e]?c:a(n(t[e]))}:f,s=v?function(t,e){return void 0===t[e]?1:h(t[e])}:h,m||v)for(var b=0;b1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var a=String(e).length;if(i>=String(t).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf(\"e+\")&&(n=+o)}}return n}},{}],503:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-time-format\").utcFormat,a=t(\"d3-format\").format,o=t(\"fast-isnumeric\"),s=t(\"../constants/numerical\"),l=s.FP_SAFE,c=-l,u=s.BADNUM,f=e.exports={};f.adjustFormat=function(t){return!t||/^\\d[.]\\df/.test(t)||/[.]\\d%/.test(t)?t:\"0.f\"===t?\"~f\":/^\\d%/.test(t)?\"~%\":/^\\ds/.test(t)?\"~s\":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?\"~\"+t:t};var h={};f.warnBadFormat=function(t){var e=String(t);h[e]||(h[e]=1,f.warn('encountered bad format: \"'+e+'\"'))},f.noFormat=function(t){return String(t)},f.numberFormat=function(t){var e;try{e=a(f.adjustFormat(t))}catch(e){return f.warnBadFormat(t),f.noFormat}return e},f.nestedProperty=t(\"./nested_property\"),f.keyedContainer=t(\"./keyed_container\"),f.relativeAttr=t(\"./relative_attr\"),f.isPlainObject=t(\"./is_plain_object\"),f.toLogRange=t(\"./to_log_range\"),f.relinkPrivateKeys=t(\"./relink_private\");var p=t(\"./array\");f.isTypedArray=p.isTypedArray,f.isArrayOrTypedArray=p.isArrayOrTypedArray,f.isArray1D=p.isArray1D,f.ensureArray=p.ensureArray,f.concat=p.concat,f.maxRowLength=p.maxRowLength,f.minRowLength=p.minRowLength;var d=t(\"./mod\");f.mod=d.mod,f.modHalf=d.modHalf;var g=t(\"./coerce\");f.valObjectMeta=g.valObjectMeta,f.coerce=g.coerce,f.coerce2=g.coerce2,f.coerceFont=g.coerceFont,f.coercePattern=g.coercePattern,f.coerceHoverinfo=g.coerceHoverinfo,f.coerceSelectionMarkerOpacity=g.coerceSelectionMarkerOpacity,f.validate=g.validate;var m=t(\"./dates\");f.dateTime2ms=m.dateTime2ms,f.isDateTime=m.isDateTime,f.ms2DateTime=m.ms2DateTime,f.ms2DateTimeLocal=m.ms2DateTimeLocal,f.cleanDate=m.cleanDate,f.isJSDate=m.isJSDate,f.formatDate=m.formatDate,f.incrementMonth=m.incrementMonth,f.dateTick0=m.dateTick0,f.dfltRange=m.dfltRange,f.findExactDates=m.findExactDates,f.MIN_MS=m.MIN_MS,f.MAX_MS=m.MAX_MS;var v=t(\"./search\");f.findBin=v.findBin,f.sorterAsc=v.sorterAsc,f.sorterDes=v.sorterDes,f.distinctVals=v.distinctVals,f.roundUp=v.roundUp,f.sort=v.sort,f.findIndexOfMin=v.findIndexOfMin,f.sortObjectKeys=t(\"./sort_object_keys\");var y=t(\"./stats\");f.aggNums=y.aggNums,f.len=y.len,f.mean=y.mean,f.median=y.median,f.midRange=y.midRange,f.variance=y.variance,f.stdev=y.stdev,f.interp=y.interp;var x=t(\"./matrix\");f.init2dArray=x.init2dArray,f.transposeRagged=x.transposeRagged,f.dot=x.dot,f.translationMatrix=x.translationMatrix,f.rotationMatrix=x.rotationMatrix,f.rotationXYMatrix=x.rotationXYMatrix,f.apply3DTransform=x.apply3DTransform,f.apply2DTransform=x.apply2DTransform,f.apply2DTransform2=x.apply2DTransform2,f.convertCssMatrix=x.convertCssMatrix,f.inverseTransformMatrix=x.inverseTransformMatrix;var b=t(\"./angles\");f.deg2rad=b.deg2rad,f.rad2deg=b.rad2deg,f.angleDelta=b.angleDelta,f.angleDist=b.angleDist,f.isFullCircle=b.isFullCircle,f.isAngleInsideSector=b.isAngleInsideSector,f.isPtInsideSector=b.isPtInsideSector,f.pathArc=b.pathArc,f.pathSector=b.pathSector,f.pathAnnulus=b.pathAnnulus;var _=t(\"./anchor_utils\");f.isLeftAnchor=_.isLeftAnchor,f.isCenterAnchor=_.isCenterAnchor,f.isRightAnchor=_.isRightAnchor,f.isTopAnchor=_.isTopAnchor,f.isMiddleAnchor=_.isMiddleAnchor,f.isBottomAnchor=_.isBottomAnchor;var w=t(\"./geometry2d\");f.segmentsIntersect=w.segmentsIntersect,f.segmentDistance=w.segmentDistance,f.getTextLocation=w.getTextLocation,f.clearLocationCache=w.clearLocationCache,f.getVisibleSegment=w.getVisibleSegment,f.findPointOnPath=w.findPointOnPath;var T=t(\"./extend\");f.extendFlat=T.extendFlat,f.extendDeep=T.extendDeep,f.extendDeepAll=T.extendDeepAll,f.extendDeepNoArrays=T.extendDeepNoArrays;var k=t(\"./loggers\");f.log=k.log,f.warn=k.warn,f.error=k.error;var A=t(\"./regex\");f.counterRegex=A.counter;var M=t(\"./throttle\");f.throttle=M.throttle,f.throttleDone=M.done,f.clearThrottle=M.clear;var S=t(\"./dom\");function E(t){var e={};for(var r in t)for(var n=t[r],i=0;il||t=e)&&(o(t)&&t>=0&&t%1==0)},f.noop=t(\"./noop\"),f.identity=t(\"./identity\"),f.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},f.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},f.simpleMap=function(t,e,r,n,i){for(var a=t.length,o=new Array(a),s=0;s=Math.pow(2,r)?i>10?(f.warn(\"randstr failed uniqueness\"),l):t(e,r,n,(i||0)+1):l},f.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},f.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=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},f.syncOrAsync=function(t,e,r){var n;function i(){return f.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},f.stripTrailingSlash=function(t){return\"/\"===t.substr(-1)?t.substr(0,t.length-1):t},f.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n0?e:0}))},f.fillArray=function(t,e,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(t))for(var i=0;i1?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},f.TEMPLATE_STRING_REGEX=/%{([^\\s%{}:]*)([:|\\|][^}]*)?}/g;var z=/^\\w*$/;f.templateString=function(t,e){var r={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,n){var i;return z.test(n)?i=e[n]:(r[n]=r[n]||f.nestedProperty(e,n).get,i=r[n]()),f.isValidTextValue(i)?i:\"\"}))};var D={max:10,count:0,name:\"hovertemplate\"};f.hovertemplateString=function(){return B.apply(D,arguments)};var R={max:10,count:0,name:\"texttemplate\"};f.texttemplateString=function(){return B.apply(R,arguments)};var F=/^[:|\\|]/;function B(t,e,r){var n=this,a=arguments;e||(e={});var o={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,s,l){var c,u,h,p=\"_xother\"===s||\"_yother\"===s,d=\"_xother_\"===s||\"_yother_\"===s,g=\"xother_\"===s||\"yother_\"===s,m=\"xother\"===s||\"yother\"===s||p||g||d,v=s;if((p||d)&&(v=v.substring(1)),(g||d)&&(v=v.substring(0,v.length-1)),m){if(void 0===(c=e[v]))return\"\"}else for(h=3;h=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 N=2e9;f.seedPseudoRandom=function(){N=2e9},f.pseudoRandom=function(){var t=N;return N=(69069*N+1)%4294967296,Math.abs(N-t)<429496729?f.pseudoRandom():N/4294967296},f.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=f.extractOption(t,e,\"htx\",\"hovertext\");if(f.isValidTextValue(i))return n(i);var a=f.extractOption(t,e,\"tx\",\"text\");return f.isValidTextValue(a)?n(a):void 0},f.isValidTextValue=function(t){return t||0===t},f.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+\"%\",n=0;n1&&(c=1):c=0,f.strTranslate(i-c*(r+o),a-c*(n+s))+f.strScale(c)+(l?\"rotate(\"+l+(e?\"\":\" \"+r+\" \"+n)+\")\":\"\")},f.ensureUniformFontSize=function(t,e){var r=f.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},f.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)},f.bigFont=function(t){return Math.round(1.2*t)};var j=f.getFirefoxVersion(),U=null!==j&&j<86;f.getPositionFromD3Event=function(){return U?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},{\"../constants/numerical\":479,\"./anchor_utils\":483,\"./angles\":484,\"./array\":485,\"./clean_number\":486,\"./clear_responsive\":488,\"./coerce\":489,\"./dates\":490,\"./dom\":491,\"./extend\":493,\"./filter_unique\":494,\"./filter_visible\":495,\"./geometry2d\":498,\"./identity\":501,\"./increment\":502,\"./is_plain_object\":504,\"./keyed_container\":505,\"./localize\":506,\"./loggers\":507,\"./make_trace_groups\":508,\"./matrix\":509,\"./mod\":510,\"./nested_property\":511,\"./noop\":512,\"./notifier\":513,\"./preserve_drawing_buffer\":517,\"./push_unique\":518,\"./regex\":520,\"./relative_attr\":521,\"./relink_private\":522,\"./search\":523,\"./sort_object_keys\":526,\"./stats\":527,\"./throttle\":530,\"./to_log_range\":531,\"@plotly/d3\":58,\"d3-format\":112,\"d3-time-format\":120,\"fast-isnumeric\":190}],504:[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).hasOwnProperty(\"hasOwnProperty\")}},{}],505:[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;o2)return c[e]=2|c[e],h.set(t,null);if(f){for(o=e;o1){var e=[\"LOG:\"];for(t=0;t1){var r=[];for(t=0;t\"),\"long\")}},a.warn=function(){var t;if(n.logging>0){var e=[\"WARN:\"];for(t=0;t0){var r=[];for(t=0;t\"),\"stick\")}},a.error=function(){var t;if(n.logging>0){var e=[\"ERROR:\"];for(t=0;t0){var r=[];for(t=0;t\"),\"stick\")}}},{\"../plot_api/plot_config\":541,\"./notifier\":513}],508:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\");e.exports=function(t,e,r){var i=t.selectAll(\"g.\"+r.replace(/\\s/g,\".\")).data(e,(function(t){return t[0].trace.uid}));i.exit().remove(),i.enter().append(\"g\").attr(\"class\",r),i.order();var a=t.classed(\"rangeplot\")?\"nodeRangePlot3\":\"node3\";return i.each((function(t){t[0][a]=n.select(this)})),i}},{\"@plotly/d3\":58}],509:[function(t,e,r){\"use strict\";var n=t(\"gl-mat4\");r.init2dArray=function(t,e){for(var r=new Array(t),n=0;ne/2?t-Math.round(t/e)*e:t}}},{}],511:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./array\").isArrayOrTypedArray;function a(t,e){return function(){var r,n,o,s,l,c=t;for(s=0;s/g),l=0;la||c===i||cs)&&(!e||!l(t))}:function(t,e){var l=t[0],c=t[1];if(l===i||la||c===i||cs)return!1;var u,f,h,p,d,g=r.length,m=r[0][0],v=r[0][1],y=0;for(u=1;uMath.max(f,m)||c>Math.max(h,v)))if(cu||Math.abs(n(o,h))>i)return!0;return!1},a.filter=function(t,e){var r=[t[0]],n=0,i=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c1&&o(t.pop());return{addPt:o,raw:t,filtered:r}}},{\"../constants/numerical\":479,\"./matrix\":509}],516:[function(t,e,r){(function(r){(function(){\"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}n.regl||(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)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./show_no_webgl_msg\":525,regl:283}],517:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"is-mobile\");e.exports=function(t){var e;if(\"string\"!=typeof(e=t&&t.hasOwnProperty(\"userAgent\")?t.userAgent:function(){var t;\"undefined\"!=typeof navigator&&(t=navigator.userAgent);t&&t.headers&&\"string\"==typeof t.headers[\"user-agent\"]&&(t=t.headers[\"user-agent\"]);return t}()))return!0;var r=i({ua:{headers:{\"user-agent\":e}},tablet:!0,featureDetect:!1});if(!r)for(var a=e.split(\" \"),o=1;o-1;s--){var l=a[s];if(\"Version/\"===l.substr(0,8)){var c=l.substr(8).split(\".\")[0];if(n(c)&&(c=+c),c>=13)return!0}}}return r}},{\"fast-isnumeric\":190,\"is-mobile\":234}],518:[function(t,e,r){\"use strict\";e.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;ni.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(!(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=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function u(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,o,f=0,h=e.length,p=0,d=h>1?(e[h-1]-e[0])/(h-1):1;for(o=d>=0?r?s:l:r?u:c,t+=1e-9*d*(r?-1:1)*(d>=0?1:-1);f90&&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,n=t.slice();for(n.sort(r.sorterAsc),e=n.length-1;e>-1&&n[e]===o;e--);for(var i,a=n[e]-n[0]||1,s=a/(e||1)/1e4,l=[],c=0;c<=e;c++){var u=n[c],f=u-i;void 0===i?(l.push(u),i=u):f>s&&(a=Math.min(a,f),l.push(u),i=u)}return{vals:l,minDiff:a}},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;i0&&(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;ia.length)&&(o=a.length),n(e)||(e=!1),i(a[0])){for(l=new Array(o),s=0;st.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{\"./array\":485,\"fast-isnumeric\":190}],528:[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\":89}],529:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../lib\"),a=i.strTranslate,o=t(\"../constants/xmlns_namespaces\"),s=t(\"../constants/alignment\").LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,d){var A=t.text(),M=!t.attr(\"data-notex\")&&\"undefined\"!=typeof MathJax&&A.match(l),L=n.select(t.node().parentNode);if(!L.empty()){var C=t.attr(\"class\")?t.attr(\"class\").split(\" \")[0]:\"text\";return C+=\"-math\",L.selectAll(\"svg.\"+C).remove(),L.selectAll(\"g.\"+C+\"-group\").remove(),t.style(\"display\",null).attr({\"data-unformatted\":A,\"data-math\":\"N\"}),M?(e&&e._promises||[]).push(new Promise((function(e){t.style(\"display\",\"none\");var r=parseInt(t.node().style.fontSize,10),o={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)}))}(M[2],o,(function(n,i,o){L.selectAll(\"svg.\"+C).remove(),L.selectAll(\"g.\"+C+\"-group\").remove();var s=n&&n.select(\"svg\");if(!s||!s.node())return P(),void e();var l=L.append(\"g\").classed(C+\"-group\",!0).attr({\"pointer-events\":\"none\",\"data-unformatted\":A,\"data-math\":\"Y\"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var c=o.width,u=o.height;s.attr({class:C,height:u,preserveAspectRatio:\"xMinYMin meet\"}).style({overflow:\"visible\",\"pointer-events\":\"none\"});var f=t.node().style.fill||\"black\",h=s.select(\"g\");h.attr({fill:f,stroke:f});var p=h.node().getBoundingClientRect(),g=p.width,m=p.height;(g>c||m>u)&&(s.style(\"overflow\",\"hidden\"),g=(p=s.node().getBoundingClientRect()).width,m=p.height);var v=+t.attr(\"x\"),y=+t.attr(\"y\"),x=-(r||t.node().getBoundingClientRect().height)/4;if(\"y\"===C[0])l.attr({transform:\"rotate(\"+[-90,v,y]+\")\"+a(-g/2,x-m/2)});else if(\"l\"===C[0])y=x-m/2;else if(\"a\"===C[0]&&0!==C.indexOf(\"atitle\"))v=0,y=x;else{var b=t.attr(\"text-anchor\");v-=g*(\"middle\"===b?.5:\"end\"===b?1:0),y=y+x-m/2}s.attr({x:v,y:y}),d&&d.call(t,l),e(l)}))}))):P(),t}function P(){L.empty()||(C=t.attr(\"class\")+\"-math\",L.select(\"svg.\"+C).remove()),t.text(\"\").style(\"white-space\",\"pre\"),function(t,e){e=e.replace(g,\" \");var r,a=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(o.svg,\"tspan\");n.select(e).attr({class:\"line\",dy:c*s+\"em\"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var a=1;a doesnt match end tag <\"+t+\">. Pretending it did match.\",e),r=l[l.length-1].node}else i.log(\"Ignoring unexpected end tag .\",e)}y.test(e)?u():(r=t,l=[{node:t}]);for(var L=e.split(m),C=0;C|>|>)/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=[\"http:\",\"https:\",\"mailto:\",\"\",void 0,\":\"],g=r.NEWLINES=/(\\r\\n?|\\n)/g,m=/(<[^<>]*>)/,v=/<(\\/?)([^ >]*)(\\s+(.*))?>/i,y=//i;r.BR_TAG_ALL=//gi;var x=/(^|[\\s\"'])style\\s*=\\s*(\"([^\"]*);?\"|'([^']*);?')/i,b=/(^|[\\s\"'])href\\s*=\\s*(\"([^\"]*)\"|'([^']*)')/i,_=/(^|[\\s\"'])target\\s*=\\s*(\"([^\"\\s]*)\"|'([^'\\s]*)')/i,w=/(^|[\\s\"'])popup\\s*=\\s*(\"([\\w=,]*)\"|'([\\w=,]*)')/i;function T(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&S(n)}var k=/(^|;)\\s*color:/;r.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:[\"br\"],i=\"...\".length,a=t.split(m),o=[],s=\"\",l=0,c=0;ci?o.push(u.substr(0,d-i)+\"...\"):o.push(u.substr(0,d));break}s=\"\"}}return o.join(\"\")};var A={mu:\"\\u03bc\",amp:\"&\",lt:\"<\",gt:\">\",nbsp:\"\\xa0\",times:\"\\xd7\",plusmn:\"\\xb1\",deg:\"\\xb0\"},M=/&(#\\d+|#x[\\da-fA-F]+|[a-z]+);/g;function S(t){return t.replace(M,(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)):A[e])||t}))}function E(t){var e=encodeURI(decodeURI(t)),r=document.createElement(\"a\"),n=document.createElement(\"a\");r.href=t,n.href=e;var i=r.protocol,a=n.protocol;return-1!==d.indexOf(i)&&-1!==d.indexOf(a)?e:\"\"}function L(t,e,r){var n,a,o,s=r.horizontalAlign,l=r.verticalAlign||\"top\",c=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return a=\"bottom\"===l?function(){return c.bottom-n.height}:\"middle\"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},o=\"right\"===s?function(){return c.right-n.width}:\"center\"===s?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var t=o()-u.left,e=a()-u.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+\"px\",left:t+\"px\",\"z-index\":1e3}),this}}r.convertEntities=S,r.sanitizeHTML=function(t){t=t.replace(g,\" \");for(var e=document.createElement(\"p\"),r=e,i=[],a=t.split(m),o=0;oa.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)}},{}],531:[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\":190}],532:[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\":587,\"topojson-client\":315}],533:[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\"}}},{}],534:[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\"}}},{}],535:[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;s0&&o.log(\"Clearing previous rejected promises from queue.\"),t._promises=[]},r.cleanLayout=function(t){var e,n;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 a=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,f=(s.subplotsRegistry.ternary||{}).attrRegex,h=(s.subplotsRegistry.gl3d||{}).attrRegex,g=Object.keys(t);for(e=0;e3?(O.x=1.02,O.xanchor=\"left\"):O.x<-2&&(O.x=-.02,O.xanchor=\"right\"),O.y>3?(O.y=1.02,O.yanchor=\"bottom\"):O.y<-2&&(O.y=-.02,O.yanchor=\"top\")),d(t),\"rotate\"===t.dragmode&&(t.dragmode=\"orbit\"),c.clean(t),t.template&&t.template.layout&&r.cleanLayout(t.template.layout),t},r.cleanData=function(t){for(var e=0;e0)return t.substr(0,e)}r.hasParent=function(t,e){for(var r=b(e);r;){if(r in t)return!0;r=b(r)}return!1};var _=[\"x\",\"y\",\"z\"];r.clearAxisTypes=function(t,e,r){for(var n=0;n1&&a.warn(\"Full array edits are incompatible with other edits\",f);var y=r[\"\"][\"\"];if(c(y))e.set(null);else{if(!Array.isArray(y))return a.warn(\"Unrecognized full array edit value\",f,y),!0;e.set(y)}return!g&&(h(m,v),p(t),!0)}var x,b,_,w,T,k,A,M,S=Object.keys(r).map(Number).sort(o),E=e.get(),L=E||[],C=u(v,f).get(),P=[],I=-1,O=L.length;for(x=0;xL.length-(A?0:1))a.warn(\"index out of range\",f,_);else if(void 0!==k)T.length>1&&a.warn(\"Insertion & removal are incompatible with edits to the same index.\",f,_),c(k)?P.push(_):A?(\"add\"===k&&(k={}),L.splice(_,0,k),C&&C.splice(_,0,{})):a.warn(\"Unrecognized full object edit value\",f,_,k),-1===I&&(I=_);else for(b=0;b=0;x--)L.splice(P[x],1),C&&C.splice(P[x],1);if(L.length?E||e.set(L):e.set(null),g)return!1;if(h(m,v),d!==i){var z;if(-1===I)z=S;else{for(O=Math.max(L.length,O),z=[],x=0;x=I);x++)z.push(_);for(x=I;x=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(void 0===e)throw new Error(\"currentIndices is a required argument.\");if(Array.isArray(e)||(e=[e]),P(t,e,\"currentIndices\"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&P(t,r,\"newIndices\"),void 0!==r&&e.length!==r.length)throw new Error(\"current and new indices must be of equal length.\")}function O(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(void 0===r)throw new Error(\"indices must be an integer or array of integers\");for(var a in P(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 correspondence with the keys and number of traces in the update object\")}}(t,e,r,n);for(var l=function(t,e,r,n){var a,l,c,u,f,h=o.isPlainObject(n),p=[];for(var d in Array.isArray(r)||(r=[r]),r=C(r,t.data.length-1),e)for(var g=0;g-1&&-1===r.indexOf(\"grouptitlefont\")?l(r,r.replace(\"titlefont\",\"title.font\")):r.indexOf(\"titleposition\")>-1?l(r,r.replace(\"titleposition\",\"title.position\")):r.indexOf(\"titleside\")>-1?l(r,r.replace(\"titleside\",\"title.side\")):r.indexOf(\"titleoffset\")>-1&&l(r,r.replace(\"titleoffset\",\"title.offset\")):l(r,r.replace(\"title\",\"title.text\"));function l(e,r){t[r]=t[e],delete t[e]}}function U(t,e,r){t=o.getGraphDiv(t),_.clearPromiseQueue(t);var n={};if(\"string\"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn(\"Relayout fail.\",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=W(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[h.previousPromises];a.layoutReplot?s.push(w.layoutReplot):Object.keys(n).length&&(V(t,a,i)||h.supplyDefaults(t),a.legend&&s.push(w.doLegend),a.layoutstyle&&s.push(w.layoutStyles),a.axrange&&H(s,i.rangesAltered),a.ticks&&s.push(w.doTicksRelayout),a.modebar&&s.push(w.doModeBar),a.camera&&s.push(w.doCamera),a.colorbars&&s.push(w.doColorBars),s.push(M)),s.push(h.rehover,h.redrag),c.add(t,U,[t,i.undoit],U,[t,i.redoit]);var l=o.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit(\"plotly_relayout\",i.eventData),t}))}function V(t,e,r){var n=t._fullLayout;if(!e.axrange)return!1;for(var i in e)if(\"axrange\"!==i&&e[i])return!1;for(var a in r.rangesAltered){var o=p.id2name(a),s=t.layout[o],l=n[o];if(l.autorange=s.autorange,s.range&&(l.range=s.range.slice()),l.cleanRange(),l._matchGroup)for(var c in l._matchGroup)if(c!==a){var u=n[p.id2name(c)];u.autorange=l.autorange,u.range=l.range.slice(),u._input.range=l.range.slice()}}return!0}function H(t,e){var r=e?function(t){var r=[],n=!0;for(var i in e){var a=p.getFromId(t,i);if(r.push(i),-1!==(a.ticklabelposition||\"\").indexOf(\"inside\")&&a._anchorAxis&&r.push(a._anchorAxis._id),a._matchGroup)for(var o in a._matchGroup)e[o]||r.push(o);a.automargin&&(n=!1)}return p.draw(t,r,{skipTitle:n})}:function(t){return p.draw(t,\"redraw\")};t.push(y,w.doAutoRangeAndConstraints,r,w.drawData,w.finalDraw)}var q=/^[xyz]axis[0-9]*\\.range(\\[[0|1]\\])?$/,G=/^[xyz]axis[0-9]*\\.autorange$/,Y=/^[xyz]axis[0-9]*\\.domain(\\[[0|1]\\])?$/;function W(t,e){var r,n,i,a=t.layout,l=t._fullLayout,c=l._guiEditing,h=F(l._preGUI,c),d=Object.keys(e),g=p.list(t),m=o.extendDeepAll({},e),v={};for(j(e),d=Object.keys(e),n=0;n0&&\"string\"!=typeof O.parts[D];)D--;var B=O.parts[D],N=O.parts[D-1]+\".\"+B,U=O.parts.slice(0,D).join(\".\"),V=s(t.layout,U).get(),H=s(l,U).get(),W=O.get();if(void 0!==z){M[I]=z,S[I]=\"reverse\"===B?z:R(W);var Z=f.getLayoutValObject(l,O.parts);if(Z&&Z.impliedEdits&&null!==z)for(var J in Z.impliedEdits)E(o.relativeAttr(I,J),Z.impliedEdits[J]);if(-1!==[\"width\",\"height\"].indexOf(I))if(z){E(\"autosize\",null);var K=\"height\"===I?\"width\":\"height\";E(K,l[K])}else l[I]=t._initialAutoSize[I];else if(\"autosize\"===I)E(\"width\",z?null:l.width),E(\"height\",z?null:l.height);else if(N.match(q))P(N),s(l,U+\"._inputRange\").set(null);else if(N.match(G)){P(N),s(l,U+\"._inputRange\").set(null);var Q=s(l,U).get();Q._inputDomain&&(Q._input.domain=Q._inputDomain.slice())}else N.match(Y)&&s(l,U+\"._inputDomain\").set(null);if(\"type\"===B){L=V;var $=\"linear\"===H.type&&\"log\"===z,tt=\"log\"===H.type&&\"linear\"===z;if($||tt){if(L&&L.range)if(H.autorange)$&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var et=L.range[0],rt=L.range[1];$?(et<=0&&rt<=0&&E(U+\".autorange\",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),E(U+\".range[0]\",Math.log(et)/Math.LN10),E(U+\".range[1]\",Math.log(rt)/Math.LN10)):(E(U+\".range[0]\",Math.pow(10,et)),E(U+\".range[1]\",Math.pow(10,rt)))}else E(U+\".autorange\",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[O.parts[0]]&&\"radialaxis\"===O.parts[1]&&delete l[O.parts[0]]._subplot.viewInitial[\"radialaxis.range\"],u.getComponentMethod(\"annotations\",\"convertCoords\")(t,H,z,E),u.getComponentMethod(\"images\",\"convertCoords\")(t,H,z,E)}else E(U+\".autorange\",!0),E(U+\".range\",null);s(l,U+\"._inputRange\").set(null)}else if(B.match(k)){var nt=s(l,I).get(),it=(z||{}).type;it&&\"-\"!==it||(it=\"linear\"),u.getComponentMethod(\"annotations\",\"convertCoords\")(t,nt,it,E),u.getComponentMethod(\"images\",\"convertCoords\")(t,nt,it,E)}var at=b.containerArrayMatch(I);if(at){r=at.array,n=at.index;var ot=at.property,st=Z||{editType:\"calc\"};\"\"!==n&&\"\"===ot&&(b.isAddVal(z)?S[I]=null:b.isRemoveVal(z)?S[I]=(s(a,r).get()||[])[n]:o.warn(\"unrecognized full object value\",e)),T.update(A,st),v[r]||(v[r]={});var lt=v[r][n];lt||(lt=v[r][n]={}),lt[ot]=z,delete e[I]}else\"reverse\"===B?(V.range?V.range.reverse():(E(U+\".autorange\",!0),V.range=[1,0]),H.autorange?A.calc=!0:A.plot=!0):(l._has(\"scatter-like\")&&l._has(\"regl\")&&\"dragmode\"===I&&(\"lasso\"===z||\"select\"===z)&&\"lasso\"!==W&&\"select\"!==W||l._has(\"gl2d\")?A.plot=!0:Z?T.update(A,Z):A.calc=!0,O.set(z))}}for(r in v){b.applyContainerArrayChanges(t,h(a,r),v[r],A,h)||(A.plot=!0)}for(var ct in C){var ut=(L=p.getFromId(t,ct))&&L._constraintGroup;if(ut)for(var ft in A.calc=!0,ut)C[ft]||(p.getFromId(t,ft)._constraintShrinkable=!0)}return(X(t)||e.height||e.width)&&(A.plot=!0),(A.plot||A.calc)&&(A.layoutReplot=!0),{flags:A,rangesAltered:C,undoit:S,redoit:M,eventData:m}}function X(t){var e=t._fullLayout,r=e.width,n=e.height;return t.layout.autosize&&h.plotAutoSize(t,t.layout,e),e.width!==r||e.height!==n}function Z(t,e,n,i){t=o.getGraphDiv(t),_.clearPromiseQueue(t),o.isPlainObject(e)||(e={}),o.isPlainObject(n)||(n={}),Object.keys(e).length&&(t.changed=!0),Object.keys(n).length&&(t.changed=!0);var a=_.coerceTraceIndices(t,i),s=N(t,o.extendFlat({},e),a),l=s.flags,u=W(t,o.extendFlat({},n)),f=u.flags;(l.calc||f.calc)&&(t.calcdata=void 0),l.clearAxisTypes&&_.clearAxisTypes(t,a,n);var p=[];f.layoutReplot?p.push(w.layoutReplot):l.fullReplot?p.push(r._doPlot):(p.push(h.previousPromises),V(t,f,u)||h.supplyDefaults(t),l.style&&p.push(w.doTraceStyle),(l.colorbars||f.colorbars)&&p.push(w.doColorBars),f.legend&&p.push(w.doLegend),f.layoutstyle&&p.push(w.layoutStyles),f.axrange&&H(p,u.rangesAltered),f.ticks&&p.push(w.doTicksRelayout),f.modebar&&p.push(w.doModeBar),f.camera&&p.push(w.doCamera),p.push(M)),p.push(h.rehover,h.redrag),c.add(t,Z,[t,s.undoit,u.undoit,s.traces],Z,[t,s.redoit,u.redoit,s.traces]);var d=o.syncOrAsync(p,t);return d&&d.then||(d=Promise.resolve(t)),d.then((function(){return t.emit(\"plotly_update\",{data:s.eventData,layout:u.eventData}),t}))}function J(t){return function(e){e._fullLayout._guiEditing=!0;var r=t.apply(null,arguments);return e._fullLayout._guiEditing=!1,r}}var K=[{pattern:/^hiddenlabels/,attr:\"legend.uirevision\"},{pattern:/^((x|y)axis\\d*)\\.((auto)?range|title\\.text)/},{pattern:/axis\\d*\\.showspikes$/,attr:\"modebar.uirevision\"},{pattern:/(hover|drag)mode$/,attr:\"modebar.uirevision\"},{pattern:/^(scene\\d*)\\.camera/},{pattern:/^(geo\\d*)\\.(projection|center|fitbounds)/},{pattern:/^(ternary\\d*\\.[abc]axis)\\.(min|title\\.text)$/},{pattern:/^(polar\\d*\\.radialaxis)\\.((auto)?range|angle|title\\.text)/},{pattern:/^(polar\\d*\\.angularaxis)\\.rotation/},{pattern:/^(mapbox\\d*)\\.(center|zoom|bearing|pitch)/},{pattern:/^legend\\.(x|y)$/,attr:\"editrevision\"},{pattern:/^(shapes|annotations)/,attr:\"editrevision\"},{pattern:/^title\\.text$/,attr:\"editrevision\"}],Q=[{pattern:/^selectedpoints$/,attr:\"selectionrevision\"},{pattern:/(^|value\\.)visible$/,attr:\"legend.uirevision\"},{pattern:/^dimensions\\[\\d+\\]\\.constraintrange/},{pattern:/^node\\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\\.)name$/},{pattern:/colorbar\\.title\\.text$/},{pattern:/colorbar\\.(x|y)$/,attr:\"editrevision\"}];function $(t,e){for(var r=0;r1;)if(n.pop(),void 0!==(r=s(e,n.join(\".\")+\".uirevision\").get()))return r;return e.uirevision}function et(t,e){for(var r=0;r=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 f(){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,h.transition(t,e.frame.data,e.frame.layout,_.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&&f()};e()}var d,g,m=0;function v(t){return Array.isArray(i)?m>=i.length?t.transitionOpts=i[m]:t.transitionOpts=i[0]:t.transitionOpts=i,m++,t}var y=[],x=null==e,b=Array.isArray(e);if(!x&&!b&&o.isPlainObject(e))y.push({type:\"object\",data:v(o.extendFlat({},e))});else if(x||-1!==[\"string\",\"number\"].indexOf(typeof e))for(d=0;d0&&kk)&&A.push(g);y=A}}y.length>0?function(e){if(0!==e.length){for(var i=0;i=0;n--)if(o.isPlainObject(e[n])){var g=e[n].name,m=(u[g]||d[g]||{}).name,v=e[n].name,y=u[m]||d[m];m&&v&&\"number\"==typeof v&&y&&A<5&&(A++,o.warn('addFrames: overwriting frame \"'+(u[m]||d[m]).name+'\" with a frame whose name of type \"number\" also equates to \"'+m+'\". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===A&&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:h.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}p.sort((function(t,e){return t.index>e.index?-1:t.index=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=0;r--)n=e[r],a.push({type:\"delete\",index:n}),s.unshift({type:\"insert\",index:n,value:i[n]});var l=h.modifyFrames,u=h.modifyFrames,f=[t,s],p=[t,a];return c&&c.add(t,l,f,u,p),h.modifyFrames(t,a)},r.addTraces=function t(e,n,i){e=o.getGraphDiv(e);var a,s,l=[],u=r.deleteTraces,f=t,h=[e,l],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(void 0===e)throw new Error(\"traces must be defined.\");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!y(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function y(t){return t===Math.round(t)&&t>=0}function x(){var t,e,r={};for(t in f(r,o),n.subplotsRegistry){if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i=l.length)return!1;i=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else{var u=t._module;if(u||(u=(n.modules[t.type||a.type.dflt]||{})._module),!u)return!1;if(!(i=(r=u.attributes)&&r[o])){var f=u.basePlotModule;f&&f.attributes&&(i=f.attributes[o])}i||(i=a[o])}return v(i,e,s)},r.getLayoutValObject=function(t,e){return v(function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var c;for(r=0;r=i&&(r._input||{})._templateitemname;o&&(a=i);var s,l=e+\"[\"+a+\"]\";function c(){s={},o&&(s[l]={},s[l].templateitemname=o)}function u(t,e){o?n.nestedProperty(s[l],t).set(e):s[l+\".\"+t]=e}function f(){var t=s;return c(),t}return c(),{modifyBase:function(t,e){s[t]=e},modifyItem:u,getUpdateObj:f,applyUpdate:function(e,r){e&&u(e,r);var i=f();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},{\"../lib\":503,\"../plots/attributes\":550}],544:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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,m=d.clean,v=t(\"../plots/cartesian/autorange\").doAutoRange;function y(t,e,r){for(var n=0;n=t[1]||i[1]<=t[0])&&(a[0]e[0]))return!0}return!1}function x(t){var e,i,s,u,d,g,m=t._fullLayout,v=m._size,x=v.p,_=h.list(t,\"\",!0);if(m._paperdiv.style({width:t._context.responsive&&m.autosize&&!t._context._hasZeroWidth&&!t.layout.width?\"100%\":m.width+\"px\",height:t._context.responsive&&m.autosize&&!t._context._hasZeroHeight&&!t.layout.height?\"100%\":m.height+\"px\"}).selectAll(\".main-svg\").call(c.setSize,m.width,m.height),t._context.setBackground(t,m.paper_bgcolor),r.drawMainTitle(t),f.manage(t),!m._has(\"cartesian\"))return a.previousPromises(t);function T(t,e,r){var n=t._lw/2;return\"x\"===t._id.charAt(0)?e?\"top\"===r?e._offset-x-n:e._offset+e._length+x+n:v.t+v.h*(1-(t.position||0))+n%1:e?\"right\"===r?e._offset+e._length+x+n:e._offset-x-n:v.l+v.w*(t.position||0)+n%1}for(e=0;e<_.length;e++){var k=(u=_[e])._anchorAxis;u._linepositions={},u._lw=c.crispRound(t,u.linewidth,1),u._mainLinePosition=T(u,k,u.side),u._mainMirrorPosition=u.mirror&&k?T(u,k,p.OPPOSITE_SIDE[u.side]):null}var A=[],M=[],S=[],E=1===l.opacity(m.paper_bgcolor)&&1===l.opacity(m.plot_bgcolor)&&m.paper_bgcolor===m.plot_bgcolor;for(i in m._plots)if((s=m._plots[i]).mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var L=s.xaxis.domain,C=s.yaxis.domain,P=s.plotgroup;if(y(L,C,S)){var I=P.node(),O=s.bg=o.ensureSingle(P,\"rect\",\"bg\");I.insertBefore(O.node(),I.childNodes[0]),M.push(i)}else P.select(\"rect.bg\").remove(),S.push([L,C]),E||(A.push(i),M.push(i))}var z,D,R,F,B,N,j,U,V,H,q,G,Y,W=m._bgLayer.selectAll(\".bg\").data(A);for(W.enter().append(\"rect\").classed(\"bg\",!0),W.exit().remove(),W.each((function(t){m._plots[t].bg=n.select(this)})),e=0;eT?u.push({code:\"unused\",traceType:y,templateCount:w,dataCount:T}):T>w&&u.push({code:\"reused\",traceType:y,templateCount:w,dataCount:T})}}else u.push({code:\"data\"});if(function t(e,r){for(var n in e)if(\"_\"!==n.charAt(0)){var a=e[n],o=g(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)&&m(a)&&t(a,o)}}({data:p,layout:h},\"\"),u.length)return u.map(v)}},{\"../lib\":503,\"../plots/attributes\":550,\"../plots/plots\":619,\"./plot_config\":541,\"./plot_schema\":542,\"./plot_template\":543}],546:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./plot_api\"),a=t(\"../plots/plots\"),o=t(\"../lib\"),s=t(\"../snapshot/helpers\"),l=t(\"../snapshot/tosvg\"),c=t(\"../snapshot/svgtoimg\"),u=t(\"../version\").version,f={format:{valType:\"enumerated\",values:[\"png\",\"jpeg\",\"webp\",\"svg\",\"full-json\"],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}};e.exports=function(t,e){var r,h,p,d;function g(t){return!(t in e)||o.validate(e[t],f[t])}if(e=e||{},o.isPlainObject(t)?(r=t.data||[],h=t.layout||{},p=t.config||{},d={}):(t=o.getGraphDiv(t),r=o.extendDeep([],t.data),h=o.extendDeep({},t.layout),p=t._context,d=t._fullLayout||{}),!g(\"width\")&&null!==e.width||!g(\"height\")&&null!==e.height)throw new Error(\"Height and width should be pixel values.\");if(!g(\"format\"))throw new Error(\"Export format is not \"+o.join2(f.format.values,\", \",\" or \")+\".\");var m={};function v(t,r){return o.coerce(e,m,f,t,r)}var y=v(\"format\"),x=v(\"width\"),b=v(\"height\"),_=v(\"scale\"),w=v(\"setBackground\"),T=v(\"imageDataOnly\"),k=document.createElement(\"div\");k.style.position=\"absolute\",k.style.left=\"-5000px\",document.body.appendChild(k);var A=o.extendFlat({},h);x?A.width=x:null===e.width&&n(d.width)&&(A.width=d.width),b?A.height=b:null===e.height&&n(d.height)&&(A.height=d.height);var M=o.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=s.getRedrawFunc(k);function E(){return new Promise((function(t){setTimeout(t,s.getDelay(k._fullLayout))}))}function L(){return new Promise((function(t,e){var r=l(k,y,_),n=k._fullLayout.width,f=k._fullLayout.height;function h(){i.purge(k),document.body.removeChild(k)}if(\"full-json\"===y){var p=a.graphJson(k,!1,\"keepdata\",\"object\",!0,!0);return p.version=u,p=JSON.stringify(p),h(),t(T?p:s.encodeJSON(p))}if(h(),\"svg\"===y)return t(T?r:s.encodeSVG(r));var d=document.createElement(\"canvas\");d.id=o.randstr(),c({format:y,width:n,height:f,scale:_,canvas:d,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.newPlot(k,r,A,M).then(S).then(E).then(L).then((function(e){t(function(t){return T?t.replace(s.IMAGE_URL_PREFIX,\"\"):t}(e))})).catch((function(t){e(t)}))}))}},{\"../lib\":503,\"../plots/plots\":619,\"../snapshot/helpers\":642,\"../snapshot/svgtoimg\":644,\"../snapshot/tosvg\":646,\"../version\":1119,\"./plot_api\":540,\"fast-isnumeric\":190}],547:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plots/plots\"),a=t(\"./plot_schema\"),o=t(\"./plot_config\").dfltConfig,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;hx.length&&i.push(d(\"unused\",a,v.concat(x.length)));var A,M,S,E,L,C=x.length,P=Array.isArray(k);if(P&&(C=Math.min(C,k.length)),2===b.dimensions)for(M=0;Mx[M].length&&i.push(d(\"unused\",a,v.concat(M,x[M].length)));var I=x[M].length;for(A=0;A<(P?Math.min(I,k[M].length):I);A++)S=P?k[M][A]:k,E=y[M][A],L=x[M][A],n.validate(E,S)?L!==E&&L!==+E&&i.push(d(\"dynamic\",a,v.concat(M,A),E,L)):i.push(d(\"value\",a,v.concat(M,A),E))}else i.push(d(\"array\",a,v.concat(M),y[M]));else for(M=0;M1&&p.push(d(\"object\",\"layout\"))),i.supplyDefaults(g);for(var m=g._fullData,v=r.length,y=0;y0&&Math.round(f)===f))return{vals:i};c=f}for(var h=e.calendar,p=\"start\"===l,d=\"end\"===l,g=t[r+\"period0\"],m=a(g,h)||0,v=[],y=[],x=[],b=i.length,_=0;_A;)k=o(k,-c,h);for(;k<=A;)k=o(k,c,h);T=o(k,-c,h)}else{for(k=m+(w=Math.round((A-m)/u))*u;k>A;)k-=u;for(;k<=A;)k+=u;T=k-u}v[_]=p?T:d?k:(T+k)/2,y[_]=T,x[_]=k}return{vals:v,starts:y,ends:x}}},{\"../../constants/numerical\":479,\"../../lib\":503,\"fast-isnumeric\":190}],552:[function(t,e,r){\"use strict\";e.exports={xaxis:{valType:\"subplotid\",dflt:\"x\",editType:\"calc+clearAxisTypes\"},yaxis:{valType:\"subplotid\",dflt:\"y\",editType:\"calc+clearAxisTypes\"}}},{}],553:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../lib\"),o=t(\"../../constants/numerical\").FP_SAFE,s=t(\"../../registry\"),l=t(\"../../components/drawing\"),c=t(\"./axis_ids\"),u=c.getFromId,f=c.isLinked;function h(t,e){var r,n,i=[],o=t._fullLayout,s=d(o,e,0),l=d(o,e,1),c=g(t,e),u=c.min,f=c.max;if(0===u.length||0===f.length)return a.simpleMap(e.range,e.r2l);var h=u[0].val,m=f[0].val;for(r=1;r0&&((T=E-s(x)-l(b))>L?k/T>C&&(_=x,w=b,C=k/T):k/E>C&&(_={val:x.val,nopad:1},w={val:b.val,nopad:1},C=k/E));if(h===m){var P=h-1,I=h+1;if(M)if(0===h)i=[0,1];else{var O=(h>0?f:u).reduce((function(t,e){return Math.max(t,l(e))}),0),z=h/(1-Math.min(.5,O/E));i=h>0?[0,z]:[z,0]}else i=S?[Math.max(0,P),Math.max(1,I)]:[P,I]}else M?(_.val>=0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:0,nopad:1})):S&&(_.val-C*s(_)<0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:1,nopad:1})),C=(w.val-_.val-p(e,x.val,b.val))/(E-s(_)-l(w)),i=[_.val-C*s(_),w.val+C*l(w)];return v&&i.reverse(),a.simpleMap(i,e.l2r||Number)}function p(t,e,r){var n=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),S=A((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=A(r.vpadplus||r.vpad),L=A(r.vpadminus||r.vpad);if(!T){if(h=1/0,p=-1/0,w)for(n=0;n0&&(h=a),a>p&&a-o&&(h=a),a>p&&a=I;n--)P(n);return{min:d,max:g,opts:r}},concatExtremes:g};function g(t,e,r){var n,i,a,o=e._id,s=t._fullData,l=t._fullLayout,c=[],f=[];function h(t,e){for(n=0;n=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 x(t){return i(t)&&Math.abs(t)=e}},{\"../../components/drawing\":388,\"../../constants/numerical\":479,\"../../lib\":503,\"../../registry\":638,\"./axis_ids\":558,\"@plotly/d3\":58,\"fast-isnumeric\":190}],554:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../plots/plots\"),o=t(\"../../registry\"),s=t(\"../../lib\"),l=s.strTranslate,c=t(\"../../lib/svg_text_utils\"),u=t(\"../../components/titles\"),f=t(\"../../components/color\"),h=t(\"../../components/drawing\"),p=t(\"./layout_attributes\"),d=t(\"./clean_ticks\"),g=t(\"../../constants/numerical\"),m=g.ONEMAXYEAR,v=g.ONEAVGYEAR,y=g.ONEMINYEAR,x=g.ONEMAXQUARTER,b=g.ONEAVGQUARTER,_=g.ONEMINQUARTER,w=g.ONEMAXMONTH,T=g.ONEAVGMONTH,k=g.ONEMINMONTH,A=g.ONEWEEK,M=g.ONEDAY,S=M/2,E=g.ONEHOUR,L=g.ONEMIN,C=g.ONESEC,P=g.MINUS_SIGN,I=g.BADNUM,O={K:\"zeroline\"},z={K:\"gridline\",L:\"path\"},D={K:\"tick\",L:\"path\"},R={K:\"tick\",L:\"text\"},F=t(\"../../constants/alignment\"),B=F.MID_SHIFT,N=F.CAP_SHIFT,j=F.LINE_SPACING,U=F.OPPOSITE_SIDE,V=e.exports={};V.setConvert=t(\"./set_convert\");var H=t(\"./axis_autotype\"),q=t(\"./axis_ids\"),G=q.idSort,Y=q.isLinked;V.id2name=q.id2name,V.name2id=q.name2id,V.cleanId=q.cleanId,V.list=q.list,V.listIds=q.listIds,V.getFromId=q.getFromId,V.getFromTrace=q.getFromTrace;var W=t(\"./autorange\");V.getAutoRange=W.getAutoRange,V.findExtremes=W.findExtremes;function X(t){var e=1e-4*(t[1]-t[0]);return[t[0]-e,t[1]+e]}V.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]||(\"string\"==typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(t){return t+\" domain\"}))),u[c]={valType:\"enumerated\",values:l.concat(a?\"string\"==typeof a?[a]:a:[]),dflt:i},s.coerce(t,e,u,c)},V.getRefType=function(t){return void 0===t?t:\"paper\"===t?\"paper\":\"pixel\"===t?\"pixel\":/( domain)$/.test(t)?\"domain\":\"range\"},V.coercePosition=function(t,e,r,n,i,a){var o,l;if(\"range\"!==V.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var c=V.getFromId(e,n);l=r(i,a=c.fraction2r(a)),o=c.cleanPos}t[i]=o(l)},V.cleanPosition=function(t,e,r){return(\"paper\"===r||\"pixel\"===r?s.ensureNumber:V.getFromId(e,r).cleanPos)(t)},V.redrawComponents=function(t,e){e=e||V.listIds(t);var r=t._fullLayout;function n(n,i,a,s){for(var l=o.getComponentMethod(n,i),c={},u=0;u2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},V.saveRangeInitial=function(t,e){for(var r=V.list(t,\"\",!0),n=!1,i=0;i.3*h||u(n)||u(a))){var p=r.dtick/2;t+=t+p.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=V.tickIncrement(t,\"M6\",\"reverse\")+1.5*M:a.exactMonths>.8?t=V.tickIncrement(t,\"M1\",\"reverse\")+15.5*M:t-=S;var l=V.tickIncrement(t,r);if(l<=n)return l}return t}(y,t,v,c,a)),m=y,0;m<=u;)m=V.tickIncrement(m,v,!1,a);return{start:e.c2r(y,0,a),end:e.c2r(m,0,a),size:v,_dataSpan:u-c}},V.prepTicks=function(t,e){var r=s.simpleMap(t.range,t.r2l,void 0,void 0,e);if(t._dtickInit=t.dtick,t._tick0Init=t.tick0,\"auto\"===t.tickmode||!t.dtick){var n,a=t.nticks;a||(\"category\"===t.type||\"multicategory\"===t.type?(n=t.tickfont?s.bigFont(t.tickfont.size||12):15,a=t._length/n):(n=\"y\"===t._id.charAt(0)?40:80,a=s.constrain(t._length/n,4,9)+1),\"radialaxis\"===t._name&&(a*=2)),\"array\"===t.tickmode&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,V.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}\"period\"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||\"M\"!==t.dtick.charAt(0))}var n=r(),a=V.getTickFormat(t);if(a){var o=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(e=E,o&&!n&&t.dticka&&f=o:d<=o;d=V.tickIncrement(d,t.dtick,l,t.calendar)){if(R++,t.rangebreaks&&!l){if(d=u)break}if(P.length>C||d===O)break;O=d;var F=!1;h&&d!==(0|d)&&(F=!0);var B={minor:F,value:d};L>1&&R%L&&(B.skipLabel=!0),P.push(B)}if(p&&function(t,e,r){for(var n=0;n0?(a=n-1,o=n):(a=n,o=n);var s,l=t[a].value,c=t[o].value,u=Math.abs(c-l),f=r||u,h=0;f>=y?h=u>=y&&u<=m?u:v:r===b&&f>=_?h=u>=_&&u<=x?u:b:f>=k?h=u>=k&&u<=w?u:T:r===A&&f>=A?h=A:f>=M?h=M:r===S&&f>=S?h=S:r===E&&f>=E&&(h=E),h>=u&&(h=u,s=!0);var p=i+h;if(e.rangebreaks&&h>0){for(var d=0,g=0;g<84;g++){var L=(g+.5)/84;e.maskBreaks(i*(1-L)+L*p)!==I&&d++}(h*=d/84)||(t[n].drop=!0),s&&u>A&&(h=u)}(h>0||0===n)&&(t[n].periodX=i+h/2)}}(P,t,t._definedDelta),t.rangebreaks){var N=\"y\"===t._id.charAt(0),j=1;\"auto\"===t.tickmode&&(j=t.tickfont?t.tickfont.size:12);var U=NaN;for(z=P.length-1;z>-1;z--)if(P[z].drop)P.splice(z,1);else{P[z].value=Mt(P[z].value,t);var H=t.c2p(P[z].value);(N?U>H-j:Uu||Gu&&(q.periodX=u),G10||\"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>=L&&a<=16||e>=E)t._tickround=\"M\";else if(e>=C&&a<=19||e>=L)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),u=void 0===t.minexponent?3:t.minexponent;Math.abs(c)>u&&(ut(t.exponentformat)&&!ft(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function lt(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}}V.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,0);var a=2*e;if(a>v)e/=v,r=n(10),t.dtick=\"M\"+12*ot(e,r,$);else if(a>T)e/=T,t.dtick=\"M\"+ot(e,1,tt);else if(a>M){t.dtick=ot(e,M,t._hasDayOfWeekBreaks?[1,2,7,14]:rt);var o=V.getTickFormat(t),l=\"period\"===t.ticklabelmode;l&&(t._rawTick0=t.tick0),/%[uVW]/.test(o)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),l&&(t._dowTick0=t.tick0)}else a>E?t.dtick=ot(e,E,tt):a>L?t.dtick=ot(e,L,et):a>C?t.dtick=ot(e,C,et):(r=n(10),t.dtick=ot(e,r,$))}else if(\"log\"===t.type){t.tick0=0;var c=s.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(c[1]-c[0])<1){var u=1.5*Math.abs((c[1]-c[0])/e);e=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/u,r=n(10),t.dtick=\"L\"+ot(e,r,$)}else t.dtick=e>.3?\"D2\":\"D1\"}else\"category\"===t.type||\"multicategory\"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):At(t)?(t.tick0=0,r=1,t.dtick=ot(e,r,at)):(t.tick0=0,r=n(10),t.dtick=ot(e,r,$));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&\"string\"!=typeof t.dtick){var f=t.dtick;throw t.dtick=1,\"ax.dtick error: \"+String(f)}},V.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return s.increment(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?it:nt,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)},V.tickFirst=function(t,e){var r=t.r2l||Number,a=s.simpleMap(t.range,r,void 0,void 0,e),o=a[1] \")}else t._prevDateHead=l,c+=\"
\"+l;e.text=c}(t,o,r,c):\"log\"===u?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=ht(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||ut(p)&&ft(f)?(e.text=0===f?1:1===f?\"10\":\"10\"+(f>1?\"\":P)+h+\"\",e.fontSize*=1.25):(\"e\"===p||\"E\"===p)&&h>2?e.text=\"1\"+p+(f>0?\"+\":P)+h:(e.text=ht(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,g):\"category\"===u?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=\"\");e.text=String(r)}(t,o):\"multicategory\"===u?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],a=void 0===i[1]?\"\":String(i[1]),o=void 0===i[0]?\"\":String(i[0]);r?e.text=o+\" - \"+a:(e.text=a,e.text2=o)}(t,o,r):At(t)?function(t,e,r,n,i){if(\"radians\"!==t.thetaunit||r)e.text=ht(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){for(var r=1;!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=ht(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=[\"\",o[0],\"\",\"\\u2044\",\"\",o[1],\"\",\"\\u03c0\"].join(\"\"),l&&(e.text=P+e.text)}}}}(t,o,r,c,g):function(t,e,r,n,i){\"never\"===i?i=\"\":\"all\"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i=\"hide\");e.text=ht(e.x,t,i,n)}(t,o,0,c,g),n||(t.tickprefix&&!d(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!d(t.showticksuffix)&&(o.text+=t.ticksuffix)),\"boundaries\"===t.tickson||t.showdividers){var m=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};o.xbnd=[m(o.x-.5),m(o.x+t.dtick-.5)]}return o},V.hoverLabelText=function(t,e,r){r&&(t=s.extendFlat({},t,{hoverformat:r}));var n=Array.isArray(e)?e[0]:e,i=Array.isArray(e)?e[1]:void 0;if(void 0!==i&&i!==n)return V.hoverLabelText(t,n,r)+\" - \"+V.hoverLabelText(t,i,r);var a=\"log\"===t.type&&n<=0,o=V.tickText(t,t.c2l(a?-n:n),\"hover\").text;return a?0===n?\"0\":P+o:o};var ct=[\"f\",\"p\",\"n\",\"\\u03bc\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\"];function ut(t){return\"SI\"===t||\"B\"===t}function ft(t){return t>14||t<-15}function ht(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||\"B\",c=e._tickexponent,u=V.getTickFormat(e),f=e.separatethousands;if(n){var h={exponentformat:l,minexponent:e.minexponent,dtick:\"none\"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:\"none\"===e.showexponent?e.range.map(e.r2d):[0,t||1]};st(h),o=(Number(h._tickround)||0)+4,c=h._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,P);var p,d=Math.pow(10,-o)/2;if(\"none\"===l&&(c=0),(t=Math.abs(t))\"+p+\"\":\"B\"===l&&9===c?t+=\"B\":ut(l)&&(t+=ct[c/3+5]));return a?P+t:t}function pt(t,e){for(var r=[],n={},i=0;i1&&r=i.min&&t=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=o(i)))){r=n;break}break;case\"log\":for(e=0;e0?r.bottom-f:0,h)))),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1];if(\"x\"===d){if(\"b\"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?f-r.top:0,h),p.reverse()),r.width>0){var m=r.right-(e._offset+e._length);m>0&&(n.xr=1,n.r=m);var v=e._offset-r.left;v>0&&(n.xl=0,n.l=v)}}else if(\"l\"===l?n[l]=e._depth=Math.max(r.height>0?f-r.left:0,h):(n[l]=e._depth=Math.max(r.height>0?r.right-f:0,h),p.reverse()),r.height>0){var y=r.bottom-(e._offset+e._length);y>0&&(n.yb=0,n.b=y);var x=e._offset-r.top;x>0&&(n.yt=1,n.t=x)}n[g]=\"free\"===e.anchor?e.position:e._anchorAxis.domain[p[0]],e.title.text!==c._dfltTitle[d]&&(n[l]+=mt(e)+(e.title.standoff||0)),e.mirror&&\"free\"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[u]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[u]+=h),!0===e.mirror||\"ticks\"===e.mirror?i[g]=e._anchorAxis.domain[p[1]]:\"all\"!==e.mirror&&\"allticks\"!==e.mirror||(i[g]=[e._counterDomainMin,e._counterDomainMax][p[1]]))}K&&(s=o.getComponentMethod(\"rangeslider\",\"autoMarginOpts\")(t,e)),a.autoMargin(t,xt(e),n),a.autoMargin(t,bt(e),i),a.autoMargin(t,_t(e),s)})),r.skipTitle||K&&\"bottom\"===e.side||Z.push((function(){return function(t,e){var r,n=t._fullLayout,i=e._id,a=i.charAt(0),o=e.title.font.size;if(e.title.hasOwnProperty(\"standoff\"))r=e._depth+e.title.standoff+mt(e);else{var s=St(e);if(\"multicategory\"===e.type)r=e._depth;else{var l=1.5*o;s&&(l=.5*o,\"outside\"===e.ticks&&(l+=e.ticklen)),r=10+l+(e.linewidth?e.linewidth-1:0)}s||(r+=\"x\"===a?\"top\"===e.side?o*(e.showticklabels?1:0):o*(e.showticklabels?1.5:.5):\"right\"===e.side?o*(e.showticklabels?1:.5):o*(e.showticklabels?.5:0))}var c,f,p,d,g=V.getPxPosition(t,e);\"x\"===a?(f=e._offset+e._length/2,p=\"top\"===e.side?g-r:g+r):(p=e._offset+e._length/2,f=\"right\"===e.side?g+r:g-r,c={rotate:\"-90\",offset:0});if(\"multicategory\"!==e.type){var m=e._selections[e._id+\"tick\"];if(d={selection:m,side:e.side},m&&m.node()&&m.node().parentNode){var v=h.getTranslate(m.node().parentNode);d.offsetLeft=v.x,d.offsetTop=v.y}e.title.hasOwnProperty(\"standoff\")&&(d.pad=0)}return u.draw(t,i+\"title\",{propContainer:e,propName:e._name+\".title.text\",placeholder:n._dfltTitle[a],avoid:d,transform:c,attributes:{x:f,y:p,\"text-anchor\":\"middle\"}})}(t,e)})),s.syncOrAsync(Z)}}function Q(t){var r=p+(t||\"tick\");return w[r]||(w[r]=function(t,e){var r,n,i,a;t._selections[e].size()?(r=1/0,n=-1/0,i=1/0,a=-1/0,t._selections[e].each((function(){var t=yt(this),e=h.bBox(t.node().parentNode);r=Math.min(r,e.top),n=Math.max(n,e.bottom),i=Math.min(i,e.left),a=Math.max(a,e.right)}))):(r=0,n=0,i=0,a=0);return{top:r,bottom:n,left:i,right:a,height:n-r,width:a-i}}(e,r)),w[r]}},V.getTickSigns=function(t){var e=t._id.charAt(0),r={x:\"top\",y:\"right\"}[e],n=t.side===r?1:-1,i=[-1,1,n,-n];return\"inside\"!==t.ticks==(\"x\"===e)&&(i=i.map((function(t){return-t}))),t.side&&i.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),i},V.makeTransTickFn=function(t){return\"x\"===t._id.charAt(0)?function(e){return l(t._offset+t.l2p(e.x),0)}:function(e){return l(0,t._offset+t.l2p(e.x))}},V.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||\"\",r=function(t){return-1!==e.indexOf(t)},n=r(\"top\"),i=r(\"left\"),a=r(\"right\"),o=r(\"bottom\"),s=r(\"inside\"),l=o||i||n||a;if(!l&&!s)return[0,0];var c=t.side,u=l?(t.tickwidth||0)/2:0,f=3,h=t.tickfont?t.tickfont.size:12;(o||n)&&(u+=h*N,f+=(t.linewidth||0)/2);(i||a)&&(u+=(t.linewidth||0)/2,f+=3);s&&\"top\"===c&&(f-=h*(1-N));(i||n)&&(u=-u);\"bottom\"!==c&&\"right\"!==c||(f=-f);return[l?u:0,s?f:0]}(t),r=e[0],n=e[1];return\"x\"===t._id.charAt(0)?function(e){return l(r+t._offset+t.l2p(dt(e)),n)}:function(e){return l(n,r+t._offset+t.l2p(dt(e)))}},V.makeTickPath=function(t,e,r,n){n=void 0!==n?n:t.ticklen;var i=t._id.charAt(0),a=(t.linewidth||1)/2;return\"x\"===i?\"M0,\"+(e+a*r)+\"v\"+n*r:\"M\"+(e+a*r)+\",0h\"+n*r},V.makeLabelFns=function(t,e,r){var n=t.ticklabelposition||\"\",a=function(t){return-1!==n.indexOf(t)},o=a(\"top\"),l=a(\"left\"),c=a(\"right\"),u=a(\"bottom\")||l||o||c,f=a(\"inside\"),h=\"inside\"===n&&\"inside\"===t.ticks||!f&&\"outside\"===t.ticks&&\"boundaries\"!==t.tickson,p=0,d=0,g=h?t.ticklen:0;if(f?g*=-1:u&&(g=0),h&&(p+=g,r)){var m=s.deg2rad(r);p=g*Math.cos(m)+1,d=g*Math.sin(m)}t.showticklabels&&(h||t.showline)&&(p+=.2*t.tickfont.size);var v,y,x,b,_,w={labelStandoff:p+=(t.linewidth||1)/2*(f?-1:1),labelShift:d},T=0,k=t.side,A=t._id.charAt(0),M=t.tickangle;if(\"x\"===A)b=(_=!f&&\"bottom\"===k||f&&\"top\"===k)?1:-1,f&&(b*=-1),v=d*b,y=e+p*b,x=_?1:-.2,90===Math.abs(M)&&(f?x+=B:x=-90===M&&\"bottom\"===k?N:90===M&&\"top\"===k?B:.5,T=B/2*(M/90)),w.xFn=function(t){return t.dx+v+T*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*x},w.anchorFn=function(t,e){if(u){if(l)return\"end\";if(c)return\"start\"}return i(e)&&0!==e&&180!==e?e*b<0!==f?\"end\":\"start\":\"middle\"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:\"top\"===t.side!==f?-n:0};else if(\"y\"===A){if(b=(_=!f&&\"left\"===k||f&&\"right\"===k)?1:-1,f&&(b*=-1),v=p,y=d*b,x=0,f||90!==Math.abs(M)||(x=-90===M&&\"left\"===k||90===M&&\"right\"===k?N:.5),f){var S=i(M)?+M:0;if(0!==S){var E=s.deg2rad(S);T=Math.abs(Math.sin(E))*N*b,x=0}}w.xFn=function(t){return t.dx+e-(v+t.fontSize*x)*b+T*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*B},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?\"middle\":_?\"end\":\"start\"},w.heightFn=function(e,r,n){return\"right\"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},V.drawTicks=function(t,e,r){r=r||{};var n=e._id+\"tick\",i=r.vals;\"period\"===e.ticklabelmode&&(i=i.slice()).shift();var a=r.layer.selectAll(\"path.\"+n).data(e.ticks?i:[],gt);a.exit().remove(),a.enter().append(\"path\").classed(n,1).classed(\"ticks\",1).classed(\"crisp\",!1!==r.crisp).call(f.stroke,e.tickcolor).style(\"stroke-width\",h.crispRound(t,e.tickwidth,1)+\"px\").attr(\"d\",r.path).style(\"display\",null),Et(e,[D]),a.attr(\"transform\",r.transFn)},V.drawGrid=function(t,e,r){r=r||{};var n=e._id+\"grid\",i=r.vals,a=r.counterAxis;if(!1===e.showgrid)i=[];else if(a&&V.shouldShowZeroLine(t,e,a))for(var o=\"array\"===e.tickmode,s=0;sp||a.leftp||a.top+(e.tickangle?0:t.fontSize/4)e[\"_visibleLabelMin_\"+r._id]?l.style(\"display\",\"none\"):\"tick\"!==t.K||i||l.style(\"display\",null)}))}))}))}))},x(v,m+1?m:g);var b=null;e._selections&&(e._selections[f]=v);var _=[function(){return y.length&&Promise.all(y)}];e.automargin&&a._redrawFromAutoMarginCount&&90===m?(b=90,_.push((function(){x(v,m)}))):_.push((function(){if(x(v,g),p.length&&\"x\"===u&&!i(g)&&(\"log\"!==e.type||\"D\"!==String(e.dtick).charAt(0))){b=0;var t,n=0,a=[];if(v.each((function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),i=yt(this),o=h.bBox(i.node());a.push({top:0,bottom:10,height:10,left:r-o.width/2,right:r+o.width/2+2,width:o.width+2})})),\"boundaries\"!==e.tickson&&!e.showdividers||r.secondary){var o=p.length,l=Math.abs((p[o-1].x-p[0].x)*e._m)/(o-1),c=e.ticklabelposition||\"\",f=function(t){return-1!==c.indexOf(t)},d=f(\"top\"),m=f(\"left\"),y=f(\"right\"),_=f(\"bottom\")||m||d||y?(e.tickwidth||0)+6:0,w=l<2.5*n||\"multicategory\"===e.type||\"realaxis\"===e._name;for(t=0;t1)for(n=1;n2*o}(i,e))return\"date\";var m=\"strict\"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=f(r),i=0,o=0,s={},u=0;u2*i}(i,m)?\"category\":function(t,e){for(var r=t.length,n=0;n=2){var l,c,u=\"\";if(2===o.length)for(l=0;l<2;l++)if(c=x(o[l])){u=g;break}var f=i(\"pattern\",u);if(f===g)for(l=0;l<2;l++)(c=x(o[l]))&&(e.bounds[l]=o[l]=c-1);if(f)for(l=0;l<2;l++)switch(c=o[l],f){case g:if(!n(c))return void(e.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(e.enabled=!1);e.bounds[l]=o[l]=c;break;case m:if(!n(c))return void(e.enabled=!1);if((c=+c)<0||c>24)return void(e.enabled=!1);e.bounds[l]=o[l]=c}if(!1===r.autorange){var h=r.range;if(h[0]h[1])return void(e.enabled=!1)}else if(o[0]>h[0]&&o[1]n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},r.ref2id=function(t){return!!/^[xyz]/.test(t)&&t.split(\" \")[0]},r.isLinked=function(t,e){return a(e,t._axisMatchGroups)||a(e,t._axisConstraintGroups)}},{\"../../registry\":638,\"./constants\":561}],559:[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;nn?i.substr(n):a.substr(r))+o:i+a+t*e:o}function m(t,e){for(var r=e._size,n=r.h/r.w,i={},a=Object.keys(t),o=0;oc*x)||T)for(r=0;rO&&FP&&(P=F);h/=(P-C)/(2*I),C=l.l2r(C),P=l.l2r(P),l.range=l._input.range=S=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function N(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\",c(r,n)).attr(\"d\",i+\"Z\")}function j(t,e,r){return t.append(\"path\").attr(\"class\",\"zoombox-corners\").style({fill:f.background,stroke:f.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"transform\",c(e,r)).attr(\"d\",\"M0,0Z\")}function U(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\"),V(t,e,i,a)}function V(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 H(t){n.select(t).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}function q(t){I&&t.data&&t._context.showTips&&(i.notifier(i._(t,\"Double-click to zoom back out\"),\"long\"),I=!1)}function G(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,P)/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 Y(t,e,r,n,a){for(var o,s,l,c,u=!1,f={},h={},p=(a||{}).xaHash,d=(a||{}).yaHash,g=0;g=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(H(i),2!==t||vt||qt(),mt)o.indexOf(\"select\")>-1&&S(r,i,J,K,e.id,Pt),o.indexOf(\"event\")>-1&&p.click(i,r,e.id);else if(1===t&&vt){var s=g?O:I,c=\"s\"===g||\"w\"===v?0:1,f=s._name+\".range[\"+c+\"]\",h=function(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return\"date\"===t.type?n:\"log\"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a(\".\"+r+\"g\")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a(\".\"+String(r)+\"g\")(n))}(s,c),d=\"left\",m=\"middle\";if(s.fixedrange)return;g?(m=\"n\"===g?\"top\":\"bottom\",\"right\"===s.side&&(d=\"right\")):\"e\"===v&&(d=\"right\"),i._context.showAxisRangeEntryBoxes&&n.select(bt).call(u.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(h),fill:s.tickfont?s.tickfont.color:\"#444\",horizontalAlign:d,verticalAlign:m}).on(\"edit\",(function(t){var e=s.d2r(t);void 0!==e&&l.call(\"_guiRelayout\",i,f,e)}))}}}function zt(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(tt,pt*e+_t)),i=Math.max(0,Math.min(et,dt*r+wt)),a=Math.abs(n-_t),o=Math.abs(i-wt);function s(){St=\"\",Tt.r=Tt.l,Tt.t=Tt.b,Lt.attr(\"d\",\"M0,0Z\")}if(Tt.l=Math.min(_t,n),Tt.r=Math.max(_t,n),Tt.t=Math.min(wt,i),Tt.b=Math.max(wt,i),rt.isSubplotConstrained)a>P||o>P?(St=\"xy\",a/tt>o/et?(o=a*et/tt,wt>i?Tt.t=wt-o:Tt.b=wt+o):(a=o*tt/et,_t>n?Tt.l=_t-a:Tt.r=_t+a),Lt.attr(\"d\",G(Tt))):s();else if(nt.isSubplotConstrained)if(a>P||o>P){St=\"xy\";var l=Math.min(Tt.l/tt,(et-Tt.b)/et),c=Math.max(Tt.r/tt,(et-Tt.t)/et);Tt.l=l*tt,Tt.r=c*tt,Tt.b=(1-l)*et,Tt.t=(1-c)*et,Lt.attr(\"d\",G(Tt))}else s();else!at||o0){var u;if(nt.isSubplotConstrained||!it&&1===at.length){for(u=0;ug[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s)}return r(\"layer\"),e}},{\"../../lib\":503,\"fast-isnumeric\":190}],573:[function(t,e,r){\"use strict\";var n=t(\"./show_dflt\");e.exports=function(t,e,r,i,a){a||(a={});var o=a.tickSuffixDflt,s=n(t);r(\"tickprefix\")&&r(\"showtickprefix\",s),r(\"ticksuffix\",o)&&r(\"showticksuffix\",s)}},{\"./show_dflt\":577}],574:[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)],t.setScale()}},{\"../../constants/alignment\":471}],575:[function(t,e,r){\"use strict\";var n=t(\"polybooljs\"),i=t(\"../../registry\"),a=t(\"../../components/drawing\").dashStyle,o=t(\"../../components/color\"),s=t(\"../../components/fx\"),l=t(\"../../components/fx/helpers\").makeEventData,c=t(\"../../components/dragelement/helpers\"),u=c.freeMode,f=c.rectMode,h=c.drawMode,p=c.openMode,d=c.selectMode,g=t(\"../../components/shapes/draw_newshape/display_outlines\"),m=t(\"../../components/shapes/draw_newshape/helpers\").handleEllipse,v=t(\"../../components/shapes/draw_newshape/newshapes\"),y=t(\"../../lib\"),x=t(\"../../lib/polygon\"),b=t(\"../../lib/throttle\"),_=t(\"./axis_ids\").getFromId,w=t(\"../../lib/clear_gl_canvases\"),T=t(\"../../plot_api/subroutines\").redrawReglTraces,k=t(\"./constants\"),A=k.MINSELECT,M=x.filter,S=x.tester,E=t(\"./handle_outline\").clearSelect,L=t(\"./helpers\"),C=L.p2r,P=L.axValue,I=L.getTransform;function O(t,e,r,n,i,a,o){var s,l,c,u,f,h,d,m,v,y=e._hoverdata,x=e._fullLayout.clickmode.indexOf(\"event\")>-1,b=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(y)){F(t,e,a);var _=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n0?function(t,e){var r,n,i,a=[];for(i=0;i0&&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;i1)return!1;if((i+=r.selectedpoints.length)>1)return!1}return 1===i}(s)&&(h=j(_))){for(o&&o.remove(),v=0;v=0&&n._fullLayout._deactivateShape(n),h(e)){var a=n._fullLayout._zoomlayer.selectAll(\".select-outline-\"+r.id);if(a&&n._fullLayout._drawing){var o=v(a,t);o&&i.call(\"_guiRelayout\",n,{shapes:o}),n._fullLayout._drawing=!1}}r.selection={},r.selection.selectionDefs=t.selectionDefs=[],r.selection.mergedPolygons=t.mergedPolygons=[]}function N(t,e,r,n){var i,a,o,s=[],l=e.map((function(t){return t._id})),c=r.map((function(t){return t._id}));for(o=0;o0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function U(t,e,r){var n,a,o,s;for(n=0;n=0)L._fullLayout._deactivateShape(L);else if(!_){var r=z.clickmode;b.done(gt).then((function(){if(b.clear(gt),2===t){for(ft.remove(),$=0;$-1&&O(e,L,i.xaxes,i.yaxes,i.subplot,i,ft),\"event\"===r&&L.emit(\"plotly_selected\",void 0);s.click(L,e)})).catch(y.error)}},i.doneFn=function(){dt.remove(),b.done(gt).then((function(){b.clear(gt),i.gd.emit(\"plotly_selected\",et),Q&&i.selectionDefs&&(Q.subtract=ut,i.selectionDefs.push(Q),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,K)),i.doneFnCompleted&&i.doneFnCompleted(mt)})).catch(y.error),_&&B(i)}},clearSelect:E,clearSelectionsCache:B,selectOnClick:O}},{\"../../components/color\":366,\"../../components/dragelement/helpers\":384,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../components/fx/helpers\":402,\"../../components/shapes/draw_newshape/display_outlines\":454,\"../../components/shapes/draw_newshape/helpers\":455,\"../../components/shapes/draw_newshape/newshapes\":456,\"../../lib\":503,\"../../lib/clear_gl_canvases\":487,\"../../lib/polygon\":515,\"../../lib/throttle\":530,\"../../plot_api/subroutines\":544,\"../../registry\":638,\"./axis_ids\":558,\"./constants\":561,\"./handle_outline\":565,\"./helpers\":566,polybooljs:254}],576:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-time-format\").utcFormat,a=t(\"../../lib\"),o=a.numberFormat,s=t(\"fast-isnumeric\"),l=a.cleanNumber,c=a.ms2DateTime,u=a.dateTime2ms,f=a.ensureNumber,h=a.isArrayOrTypedArray,p=t(\"../../constants/numerical\"),d=p.FP_SAFE,g=p.BADNUM,m=p.LOG_CLIP,v=p.ONEWEEK,y=p.ONEDAY,x=p.ONEHOUR,b=p.ONEMIN,_=p.ONESEC,w=t(\"./axis_ids\"),T=t(\"./constants\"),k=T.HOUR_PATTERN,A=T.WEEKDAY_PATTERN;function M(t){return Math.pow(10,t)}function S(t){return null!=t}e.exports=function(t,e){e=e||{};var r=t._id||\"x\",p=r.charAt(0);function E(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*m*Math.abs(n-i))}return g}function L(e,r,n,i){if((i||{}).msUTC&&s(e))return+e;var o=u(e,n||t.calendar);if(o===g){if(!s(e))return g;e=+e;var l=Math.floor(10*a.mod(e+.05,1)),c=Math.round(e-l/10);o=u(new Date(c))+l/10}return o}function C(e,r,n){return c(e,r,n||t.calendar)}function P(e){return t._categories[Math.round(e)]}function I(e){if(S(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push(\"number\"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return g}function O(e){if(t._categoriesMap)return t._categoriesMap[e]}function z(t){var e=O(t);return void 0!==e?e:s(t)?+t:void 0}function D(t){return s(t)?+t:O(t)}function R(t,e,r){return n.round(r+e*t,2)}function F(t,e,r){return(t-r)/e}var B=function(e){return s(e)?R(e,t._m,t._b):g},N=function(e){return F(e,t._m,t._b)};if(t.rangebreaks){var j=\"y\"===p;B=function(e){if(!s(e))return g;var r=t._rangebreaks.length;if(!r)return R(e,t._m,t._b);var n=j;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,a=i*e,o=0,l=0;lu)){o=a<(c+u)/2?l:l+1;break}o=l+1}var f=t._B[o]||0;return isFinite(f)?R(e,t._m2,f):0},N=function(e){var r=t._rangebreaks.length;if(!r)return F(e,t._m,t._b);for(var n=0,i=0;it._rangebreaks[i].pmax&&(n=i+1);return F(e,t._m2,t._B[n])}}t.c2l=\"log\"===t.type?E:f,t.l2c=\"log\"===t.type?M:f,t.l2p=B,t.p2l=N,t.c2p=\"log\"===t.type?function(t,e){return B(E(t,e))}:B,t.p2c=\"log\"===t.type?function(t){return M(N(t))}:N,-1!==[\"linear\",\"-\"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=f,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=N,t.cleanPos=f):\"log\"===t.type?(t.d2r=t.d2l=function(t,e){return E(l(t),e)},t.r2d=t.r2c=function(t){return M(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=f,t.c2r=E,t.l2d=M,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return M(N(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=N,t.cleanPos=f):\"date\"===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=L,t.c2d=t.c2r=t.l2d=t.l2r=C,t.d2p=t.r2p=function(e,r,n){return t.l2p(L(e,0,n))},t.p2d=t.p2r=function(t,e,r){return C(N(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,g,t.calendar)}):\"category\"===t.type?(t.d2c=t.d2l=I,t.r2d=t.c2d=t.l2d=P,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=D(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=f,t.r2l=D,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return\"string\"==typeof t&&\"\"!==t?t:f(t)}):\"multicategory\"===t.type&&(t.r2d=t.c2d=t.l2d=P,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=z(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=O,t.l2r=t.c2r=f,t.r2l=z,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return Array.isArray(t)||\"string\"==typeof t&&\"\"!==t?t:f(t)},t.setupMultiCategory=function(n){var i,o,s=t._traceIndices,l=t._matchGroup;if(l&&0===t._categories.length)for(var c in l)if(c!==r){var u=e[w.id2name(c)];s=s.concat(u._traceIndices)}var f=[[0,{}],[0,{}]],d=[];for(i=0;id&&(o[n]=d),o[0]===o[1]){var c=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=c,o[1]+=c}}else a.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=w.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?\"_r\":\"range\",o=t.calendar;t.cleanRange(a);var s,l,c=t.r2l(t[a][0],o),u=t.r2l(t[a][1],o),f=\"y\"===p;if((f?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks)&&(t._rangebreaks=t.locateBreaks(Math.min(c,u),Math.max(c,u)),t._rangebreaks.length)){for(s=0;su&&(h=!h),h&&t._rangebreaks.reverse();var d=h?-1:1;for(t._m2=d*t._length/(Math.abs(u-c)-t._lBreaks),t._B.push(-t._m2*(f?u:c)),s=0;si&&(i+=7,oi&&(i+=24,o=n&&o=n&&e=s.min&&(ts.max&&(s.max=n),i=!1)}i&&c.push({min:t,max:n})}};for(n=0;nr.duration?(!function(){for(var r={},n=0;n rect\").call(o.setTranslate,0,0).call(o.setScale,1,1),t.plot.call(o.setTranslate,e._offset,r._offset).call(o.setScale,1,1);var n=t.plot.selectAll(\".scatterlayer .trace\");n.selectAll(\".point\").call(o.setPointGroupScale,1,1),n.selectAll(\".textpoint\").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,t)}function m(e,r){var n=e.plotinfo,i=n.xaxis,l=n.yaxis,c=i._length,u=l._length,f=!!e.xr1,h=!!e.yr1,p=[];if(f){var d=a.simpleMap(e.xr0,i.r2l),g=a.simpleMap(e.xr1,i.r2l),m=d[1]-d[0],v=g[1]-g[0];p[0]=(d[0]*(1-r)+r*g[0]-d[0])/(d[1]-d[0])*c,p[2]=c*(1-r+r*v/m),i.range[0]=i.l2r(d[0]*(1-r)+r*g[0]),i.range[1]=i.l2r(d[1]*(1-r)+r*g[1])}else p[0]=0,p[2]=c;if(h){var y=a.simpleMap(e.yr0,l.r2l),x=a.simpleMap(e.yr1,l.r2l),b=y[1]-y[0],_=x[1]-x[0];p[1]=(y[1]*(1-r)+r*x[1]-y[1])/(y[0]-y[1])*u,p[3]=u*(1-r+r*_/b),l.range[0]=i.l2r(y[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(y[1]*(1-r)+r*x[1])}else p[1]=0,p[3]=u;s.drawOne(t,i,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[i._id,l._id]);var w=f?c/p[2]:1,T=h?u/p[3]:1,k=f?p[0]:0,A=h?p[1]:0,M=f?p[0]/p[2]*c:0,S=h?p[1]/p[3]*u:0,E=i._offset-M,L=l._offset-S;n.clipRect.call(o.setTranslate,k,A).call(o.setScale,1/w,1/T),n.plot.call(o.setTranslate,E,L).call(o.setScale,w,T),o.setPointGroupScale(n.zoomScalePts,1/w,1/T),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}s.redrawComponents(t)}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../registry\":638,\"./axes\":554,\"@plotly/d3\":58}],582:[function(t,e,r){\"use strict\";var n=t(\"../../registry\").traceIs,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(t,\"box-violin\"),o=n(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(\"autotypenumbers\",s.autotypenumbersDflt),\"-\"===r(\"type\",(s.splomStash||{}).type)&&(!function(t,e){if(\"-\"!==t.type)return;var r,s=t._id,l=s.charAt(0);-1!==s.indexOf(\"scene\")&&(s=l);var c=function(t,e,r){for(var n=0;n0&&(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,s,l);if(!c)return;if(\"histogram\"===c.type&&l==={v:\"y\",h:\"x\"}[c.orientation||\"v\"])return void(t.type=\"linear\");var u=l+\"calendar\",f=c[u],h={noMultiCategory:!n(c,\"cartesian\")||n(c,\"noMultiCategory\")};\"box\"===c.type&&c._hasPreCompStats&&l==={h:\"x\",v:\"y\"}[c.orientation||\"v\"]&&(h.noMultiCategory=!0);if(h.autotypenumbers=t.autotypenumbers,o(c,l)){var p=a(c),d=[];for(r=0;r0?\".\":\"\")+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;f0&&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]]]}}e.exports=function(t){return new M(t)},S.plot=function(t,e,r){var n=this,i=e[this.id],a=[],o=!1;for(var s in w.layerNameToAdjective)if(\"frame\"!==s&&i[\"show\"+s]){o=!0;break}for(var l=0;l0&&a._module.calcGeoJSON(i,e)}if(!this.updateProjection(t,e)){this.viewInitial&&this.scope===r.scope||this.saveViewInitial(r),this.scope=r.scope,this.updateBaseLayers(e,r),this.updateDims(e,r),this.updateFx(e,r),d.generalUpdatePerTraceModule(this.graphDiv,this,t,r);var o=this.layers.frontplot.select(\".scatterlayer\");this.dataPoints.point=o.selectAll(\".point\"),this.dataPoints.text=o.selectAll(\"text\"),this.dataPaths.line=o.selectAll(\".js-line\");var s=this.layers.backplot.select(\".choroplethlayer\");this.dataPaths.choropleth=s.selectAll(\"path\"),this.render()}},S.updateProjection=function(t,e){var r=this.graphDiv,n=e[this.id],l=e._size,u=n.domain,f=n.projection,h=n.lonaxis,p=n.lataxis,d=h._ax,g=p._ax,v=this.projection=function(t){var e=t.projection,r=e.type,n=w.projNames[r];n=\"geo\"+c.titleCase(n);for(var l=(i[n]||s[n])(),u=t._isSatellite?180*Math.acos(1/e.distance)/Math.PI:t._isClipped?w.lonaxisSpan[r]/2:null,f=[\"center\",\"rotate\",\"parallels\",\"clipExtent\"],h=function(t){return t?l:[]},p=0;pu*Math.PI/180}return!1},l.getPath=function(){return a().projection(l)},l.getBounds=function(t){return l.getPath().bounds(t)},l.precision(w.precision),t._isSatellite&&l.tilt(e.tilt).distance(e.distance);u&&l.clipAngle(u-w.clipPad);return l}(n),y=[[l.l+l.w*u.x[0],l.t+l.h*(1-u.y[1])],[l.l+l.w*u.x[1],l.t+l.h*(1-u.y[0])]],x=n.center||{},b=f.rotation||{},_=h.range||[],T=p.range||[];if(n.fitbounds){d._length=y[1][0]-y[0][0],g._length=y[1][1]-y[0][1],d.range=m(r,d),g.range=m(r,g);var k=(d.range[0]+d.range[1])/2,A=(g.range[0]+g.range[1])/2;if(n._isScoped)x={lon:k,lat:A};else if(n._isClipped){x={lon:k,lat:A},b={lon:k,lat:A,roll:b.roll};var M=f.type,S=w.lonaxisSpan[M]/2||180,L=w.lataxisSpan[M]/2||90;_=[k-S,k+S],T=[A-L,A+L]}else x={lon:k,lat:A},b={lon:k,lat:b.lat,roll:b.roll}}v.center([x.lon-b.lon,x.lat-b.lat]).rotate([-b.lon,-b.lat,b.roll]).parallels(f.parallels);var C=E(_,T);v.fitExtent(y,C);var P=this.bounds=v.getBounds(C),I=this.fitScale=v.scale(),O=v.translate();if(n.fitbounds){var z=v.getBounds(E(d.range,g.range)),D=Math.min((P[1][0]-P[0][0])/(z[1][0]-z[0][0]),(P[1][1]-P[0][1])/(z[1][1]-z[0][1]));isFinite(D)?v.scale(D*I):c.warn(\"Something went wrong during\"+this.id+\"fitbounds computations.\")}else v.scale(f.scale*I);var R=this.midPt=[(P[0][0]+P[1][0])/2,(P[0][1]+P[1][1])/2];if(v.translate([O[0]+(R[0]-O[0]),O[1]+(R[1]-O[1])]).clipExtent(P),n._isAlbersUsa){var F=v([x.lon,x.lat]),B=v.translate();v.translate([B[0]-(F[0]-B[0]),B[1]-(F[1]-B[1])])}},S.updateBaseLayers=function(t,e){var r=this,i=r.topojson,a=r.layers,o=r.basePaths;function s(t){return\"lonaxis\"===t||\"lataxis\"===t}function l(t){return Boolean(w.lineLayers[t])}function c(t){return Boolean(w.fillLayers[t])}var u=(this.hasChoropleth?w.layersForChoropleth:w.layers).filter((function(t){return l(t)||c(t)?e[\"show\"+t]:!s(t)||e[t].showgrid})),p=r.framework.selectAll(\".layer\").data(u,String);p.exit().each((function(t){delete a[t],delete o[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\"):s(t)?o[t]=e.append(\"path\").style(\"fill\",\"none\"):\"backplot\"===t?e.append(\"g\").classed(\"choroplethlayer\",!0):\"frontplot\"===t?e.append(\"g\").classed(\"scatterlayer\",!0):l(t)?o[t]=e.append(\"path\").style(\"fill\",\"none\").style(\"stroke-miterlimit\",2):c(t)&&(o[t]=e.append(\"path\").style(\"stroke\",\"none\"))})),p.order(),p.each((function(r){var n=o[r],a=w.layerNameToAdjective[r];\"frame\"===r?n.datum(w.sphereSVG):l(r)||c(r)?n.datum(A(i,i.objects[r])):s(r)&&n.datum(function(t,e,r){var n,i,a,o=e[t],s=w.scopeDefaults[e.scope];\"lonaxis\"===t?(n=s.lonaxisRange,i=s.lataxisRange,a=function(t,e){return[t,e]}):\"lataxis\"===t&&(n=s.lataxisRange,i=s.lonaxisRange,a=function(t,e){return[e,t]});var l={type:\"linear\",range:[n[0],n[1]-1e-6],tick0:o.tick0,dtick:o.dtick};g.setConvert(l,r);var c=g.calcTicks(l);e.isScoped||\"lonaxis\"!==t||c.pop();for(var u=c.length,f=new Array(u),h=0;h-1&&b(n.event,i,[r.xaxis],[r.yaxis],r.id,f),s.indexOf(\"event\")>-1&&p.click(i,n.event))}))}function h(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},S.makeFramework=function(){var t=this,e=t.graphDiv,r=e._fullLayout,i=\"clip\"+r._uid+t.id;t.clipDef=r._clips.append(\"clipPath\").attr(\"id\",i),t.clipRect=t.clipDef.append(\"rect\"),t.framework=n.select(t.container).append(\"g\").attr(\"class\",\"geo \"+t.id).call(h.setClipUrl,i,e),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\"},g.setConvert(t.mockAxis,r)},S.saveViewInitial=function(t){var e,r=t.center||{},n=t.projection,i=n.rotation||{};this.viewInitial={fitbounds:t.fitbounds,\"projection.scale\":n.scale},e=t._isScoped?{\"center.lon\":r.lon,\"center.lat\":r.lat}:t._isClipped?{\"projection.rotation.lon\":i.lon,\"projection.rotation.lat\":i.lat}:{\"center.lon\":r.lon,\"center.lat\":r.lat,\"projection.rotation.lon\":i.lon},c.extendFlat(this.viewInitial,e)},S.render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?u(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\":366,\"../../components/dragelement\":385,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/geo_location_utils\":496,\"../../lib/topojson_utils\":532,\"../../registry\":638,\"../cartesian/autorange\":553,\"../cartesian/axes\":554,\"../cartesian/select\":575,\"../plots\":619,\"./constants\":587,\"./zoom\":592,\"@plotly/d3\":58,\"d3-geo\":114,\"d3-geo-projection\":113,\"topojson-client\":315}],589:[function(t,e,r){\"use strict\";var n=t(\"../../plots/get_data\").getSubplotCalcData,i=t(\"../../lib\").counterRegex,a=t(\"./geo\"),o=\"geo\",s=i(o),l={};l.geo={valType:\"subplotid\",dflt:o,editType:\"calc\"},e.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:t(\"./layout_attributes\"),supplyLayoutDefaults:t(\"./layout_defaults\"),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots.geo,s=0;s0&&P<0&&(P+=360);var I,O,z,D=(C+P)/2;if(!p){var R=d?f.projRotate:[D,0,0];I=r(\"projection.rotation.lon\",R[0]),r(\"projection.rotation.lat\",R[1]),r(\"projection.rotation.roll\",R[2]),r(\"showcoastlines\",!d&&x)&&(r(\"coastlinecolor\"),r(\"coastlinewidth\")),r(\"showocean\",!!x&&void 0)&&r(\"oceancolor\")}(p?(O=-96.6,z=38.7):(O=d?D:I,z=(L[0]+L[1])/2),r(\"center.lon\",O),r(\"center.lat\",z),g&&(r(\"projection.tilt\"),r(\"projection.distance\")),m)&&r(\"projection.parallels\",f.projParallels||[0,60]);r(\"projection.scale\"),r(\"showland\",!!x&&void 0)&&r(\"landcolor\"),r(\"showlakes\",!!x&&void 0)&&r(\"lakecolor\"),r(\"showrivers\",!!x&&void 0)&&(r(\"rivercolor\"),r(\"riverwidth\")),r(\"showcountries\",d&&\"usa\"!==u&&x)&&(r(\"countrycolor\"),r(\"countrywidth\")),(\"usa\"===u||\"north america\"===u&&50===c)&&(r(\"showsubunits\",x),r(\"subunitcolor\"),r(\"subunitwidth\")),d||r(\"showframe\",x)&&(r(\"framecolor\"),r(\"framewidth\")),r(\"bgcolor\"),r(\"fitbounds\")&&(delete e.projection.scale,d?(delete e.center.lon,delete e.center.lat):v?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}e.exports=function(t,e,r){i(t,e,r,{type:\"geo\",attributes:s,handleDefaults:c,fullData:r,partition:\"y\"})}},{\"../../lib\":503,\"../get_data\":593,\"../subplot_defaults\":632,\"./constants\":587,\"./layout_attributes\":590}],592:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../registry\"),o=Math.PI/180,s=180/Math.PI,l={cursor:\"pointer\"},c={cursor:\"auto\"};function u(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function f(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],c=o._fullLayout,u=c[n],f={},h={};function p(t,e){f[n+\".\"+t]=i.nestedProperty(l,t).get(),a.call(\"_storeDirectGUIEdit\",s,c._preGUI,f);var r=i.nestedProperty(u,t);r.get()!==e&&(r.set(e),i.nestedProperty(l,t).set(e),h[n+\".\"+t]=e)}r(p),p(\"projection.scale\",e.scale()/t.fitScale),p(\"fitbounds\",!1),o.emit(\"plotly_relayout\",h)}function h(t,e){var r=u(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(l)})).on(\"zoom\",(function(){e.scale(n.event.scale).translate(n.event.translate),t.render();var r=e.invert(t.midPt);t.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":e.scale()/t.fitScale,\"geo.center.lon\":r[0],\"geo.center.lat\":r[1]})})).on(\"zoomend\",(function(){n.select(this).style(c),f(t,e,i)})),r}function p(t,e){var r,i,a,o,s,h,p,d,g,m=u(0,e);function v(t){return e.invert(t)}function y(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 m.on(\"zoomstart\",(function(){n.select(this).style(l),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,s=v(r)})).on(\"zoom\",(function(){if(h=n.mouse(this),function(t){var r=v(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>2||Math.abs(n[1]-t[1])>2}(r))return m.scale(e.scale()),void m.translate(e.translate());e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),s?v(h)&&(d=v(h),p=[o[0]+(d[0]-s[0]),i[1],i[2]],e.rotate(p),o=p):s=v(r=h),g=!0,t.render();var l=e.rotate(),c=e.invert(t.midPt);t.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":e.scale()/t.fitScale,\"geo.center.lon\":c[0],\"geo.center.lat\":c[1],\"geo.projection.rotation.lon\":-l[0]})})).on(\"zoomend\",(function(){n.select(this).style(c),g&&f(t,e,y)})),m}function d(t,e){var r,i={r:e.rotate(),k:e.scale()},a=u(0,e),o=function(t){var e=0,r=arguments.length,i=[];for(;++ed?(a=(f>0?90:-90)-p,i=0):(a=Math.asin(f/d)*s-p,i=Math.sqrt(d*d-f*f));var g=180-a-2*p,m=(Math.atan2(h,u)-Math.atan2(c,i))*s,v=(Math.atan2(h,u)-Math.atan2(c,-i))*s;return b(r[0],r[1],a,m)<=b(r[0],r[1],g,v)?[a,m,r[2]]:[g,v,r[2]]}function b(t,e,r,n){var i=_(r-t),a=_(n-e);return Math.sqrt(i*i+a*a)}function _(t){return(t%360+540)%360-180}function w(t,e,r){var n=r*o,i=t.slice(),a=0===e?1:0,s=2===e?1:2,l=Math.cos(n),c=Math.sin(n);return i[a]=t[a]*l-t[s]*c,i[s]=t[s]*l+t[a]*c,i}function T(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*s,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*s]}function k(t,e){for(var r=0,n=0,i=t.length;nMath.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(a)*_*(s>=0?1:-1),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[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&&(m(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&&(m(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).999&&(g=\"turntable\"):g=\"turntable\")}else g=\"turntable\";r(\"dragmode\",g),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:u,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{\"../../../components/color\":366,\"../../../lib\":503,\"../../../registry\":638,\"../../get_data\":593,\"../../subplot_defaults\":632,\"./axis_defaults\":601,\"./layout_attributes\":604}],604:[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),{}),projection:{type:{valType:\"enumerated\",values:[\"perspective\",\"orthographic\"],dflt:\"perspective\",editType:\"calc\"},editType:\"calc\"},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],editType:\"plot\"},hovermode:{valType:\"enumerated\",values:[\"closest\",!1],dflt:\"closest\",editType:\"modebar\"},uirevision:{valType:\"any\",editType:\"none\"},editType:\"plot\",_deprecated:{cameraposition:{valType:\"info_array\",editType:\"camera\"}}}},{\"../../../lib\":503,\"../../../lib/extend\":493,\"../../domain\":584,\"./axis_attributes\":600}],605:[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\":528}],606:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[a[c]];if(u._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/t.dataScale[c],Math.abs(u._length)===1/0||isNaN(u._length))l[c]=[];else{u._input_range=u.range.slice(),u.range[0]=r[c].lo/t.dataScale[c],u.range[1]=r[c].hi/t.dataScale[c],u._m=1/(t.dataScale[c]*r[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var f=u.tickmode;if(\"auto\"===u.tickmode){u.tickmode=\"linear\";var h=u.nticks||i.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/h)}for(var p=n.calcTicks(u,{msUTC:!0}),d=0;d/g,\" \"));l[c]=p,u.tickmode=f}}e.ticks=l;for(c=0;c<3;++c){o[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]);for(d=0;d<2;++d)e.bounds[d][c]=t.glplot.bounds[d][c]}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;ar.deltaY?1.1:1/1.1,a=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(t)}}),!!c&&{passive:!1}),t.glplot.canvas.addEventListener(\"mousemove\",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit(\"plotly_relayouting\",e)}})),t.staticMode||t.glplot.canvas.addEventListener(\"webglcontextlost\",(function(r){e&&e.emit&&e.emit(\"plotly_webglcontextlost\",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},w.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,\"viewBox\",\"0 0 \"+s+\" \"+l),n.setAttributeNS(null,\"width\",s),n.setAttributeNS(null,\"height\",l),b(e),e.glplot.axes.update(e.axesOptions);for(var c=Object.keys(e.traces),u=null,h=e.glplot.selection,g=0;g\")):\"isosurface\"===t.type||\"volume\"===t.type?(T.valueLabel=p.hoverLabelText(e._mockAxis,e._mockAxis.d2l(h.traceCoordinate[3]),t.valuehoverformat),S.push(\"value: \"+T.valueLabel),h.textLabel&&S.push(h.textLabel),x=S.join(\"
\")):x=h.textLabel;var E={x:h.traceCoordinate[0],y:h.traceCoordinate[1],z:h.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:w};d.appendArrayPointValue(E,_,w),t._module.eventData&&(E=_._module.eventData(E,h,_,{},w));var L={points:[E]};if(e.fullSceneLayout.hovermode){var C=[];d.loneHover({trace:_,x:(.5+.5*y[0]/y[3])*s,y:(.5-.5*y[1]/y[3])*l,xLabel:T.xLabel,yLabel:T.yLabel,zLabel:T.zLabel,text:x,name:u.name,color:d.castHoverOption(_,w,\"bgcolor\")||u.color,borderColor:d.castHoverOption(_,w,\"bordercolor\"),fontFamily:d.castHoverOption(_,w,\"font.family\"),fontSize:d.castHoverOption(_,w,\"font.size\"),fontColor:d.castHoverOption(_,w,\"font.color\"),nameLength:d.castHoverOption(_,w,\"namelength\"),textAlign:d.castHoverOption(_,w,\"align\"),hovertemplate:f.castOption(_,w,\"hovertemplate\"),hovertemplateLabels:f.extendFlat({},E,T),eventData:[E]},{container:n,gd:r,inOut_bbox:C}),E.bbox=C[0]}h.buttons&&h.distance<5?r.emit(\"plotly_click\",L):r.emit(\"plotly_hover\",L),this.oldEventData=L}else d.loneUnhover(n),this.oldEventData&&r.emit(\"plotly_unhover\",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)},w.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):f.error(\"Catastrophic and unrecoverable WebGL error. Context lost.\")};requestAnimationFrame(e)};var k=[\"xaxis\",\"yaxis\",\"zaxis\"];function A(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var a=k[i],o=a.charAt(0),s=n[a],l=e[o],c=e[o+\"calendar\"],u=e[\"_\"+o+\"length\"];if(f.isArrayOrTypedArray(l))for(var h,p=0;p<(u||l.length);p++)if(f.isArrayOrTypedArray(l[p]))for(var d=0;dm[1][a])m[0][a]=-1,m[1][a]=1;else{var L=m[1][a]-m[0][a];m[0][a]-=L/32,m[1][a]+=L/32}if(\"reversed\"===s.autorange){var C=m[0][a];m[0][a]=m[1][a],m[1][a]=C}}else{var P=s.range;m[0][a]=s.r2l(P[0]),m[1][a]=s.r2l(P[1])}m[0][a]===m[1][a]&&(m[0][a]-=1,m[1][a]+=1),v[a]=m[1][a]-m[0][a],this.glplot.setBounds(a,{min:m[0][a]*h[a],max:m[1][a]*h[a]})}var I=c.aspectmode;if(\"cube\"===I)d=[1,1,1];else if(\"manual\"===I){var O=c.aspectratio;d=[O.x,O.y,O.z]}else{if(\"auto\"!==I&&\"data\"!==I)throw new Error(\"scene.js aspectRatio was not one of the enumerated types\");var z=[1,1,1];for(a=0;a<3;++a){var D=y[l=(s=c[k[a]]).type];z[a]=Math.pow(D.acc,1/D.count)/h[a]}d=\"data\"===I||Math.max.apply(null,z)/Math.min.apply(null,z)<=4?z:[1,1,1]}c.aspectratio.x=u.aspectratio.x=d[0],c.aspectratio.y=u.aspectratio.y=d[1],c.aspectratio.z=u.aspectratio.z=d[2],this.glplot.setAspectratio(c.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),this.viewInitial.aspectmode||(this.viewInitial.aspectmode=c.aspectmode);var R=c.domain||null,F=e._size||null;if(R&&F){var B=this.container.style;B.position=\"absolute\",B.left=F.l+R.x[0]*F.w+\"px\",B.top=F.t+(1-R.y[1])*F.h+\"px\",B.width=F.w*(R.x[1]-R.x[0])+\"px\",B.height=F.h*(R.y[1]-R.y[0])+\"px\"}this.glplot.redraw()}},w.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener(\"wheel\",this.camera.wheelListener),this.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},w.getCamera=function(){var t;return this.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(t=this.camera).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]},projection:{type:!0===t._ortho?\"orthographic\":\"perspective\"}}},w.setViewport=function(t){var e,r=t.camera;this.camera.lookAt.apply(this,[[(e=r).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]]),this.glplot.setAspectratio(t.aspectratio),\"orthographic\"===r.projection.type!==this.camera._ortho&&(this.glplot.redraw(),this.glplot.clearRGBA(),this.glplot.dispose(),this.initializeGLPlot())},w.isCameraChanged=function(t){var e=this.getCamera(),r=f.nestedProperty(t,this.id+\".camera\").get();function n(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]]}var i=!1;if(void 0===r)i=!0;else{for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!n(e,r,a,o)){i=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(i=!0)}return i},w.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=f.nestedProperty(t,this.id+\".aspectratio\").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},w.saveLayout=function(t){var e,r,n,i,a,o,s=this.fullLayout,l=this.isCameraChanged(t),c=this.isAspectChanged(t),h=l||c;if(h){var p={};if(l&&(e=this.getCamera(),n=(r=f.nestedProperty(t,this.id+\".camera\")).get(),p[this.id+\".camera\"]=n),c&&(i=this.glplot.getAspectratio(),o=(a=f.nestedProperty(t,this.id+\".aspectratio\")).get(),p[this.id+\".aspectratio\"]=o),u.call(\"_storeDirectGUIEdit\",t,s._preGUI,p),l)r.set(e),f.nestedProperty(s,this.id+\".camera\").set(e);if(c)a.set(i),f.nestedProperty(s,this.id+\".aspectratio\").set(i),this.glplot.redraw()}return h},w.updateFx=function(t,e){var r=this.camera;if(r)if(\"orbit\"===t)r.mode=\"orbit\",r.keyBindingMode=\"rotate\";else if(\"turntable\"===t){r.up=[0,0,1],r.mode=\"turntable\",r.keyBindingMode=\"rotate\";var n=this.graphDiv,i=n._fullLayout,a=this.fullSceneLayout.camera,o=a.up.x,s=a.up.y,l=a.up.z;if(l/Math.sqrt(o*o+s*s+l*l)<.999){var c=this.id+\".camera.up\",h={x:0,y:0,z:1},p={};p[c]=h;var d=n.layout;u.call(\"_storeDirectGUIEdit\",d,i._preGUI,p),a.up=h,f.nestedProperty(d,c).set(h)}}else r.keyBindingMode=t;this.fullSceneLayout.hovermode=e},w.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),function(t,e,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)t[a+l]=Math.min(s*t[a+l],255)}}(a,r,i);var o=document.createElement(\"canvas\");o.width=r,o.height=i;var s,l=o.getContext(\"2d\"),c=l.createImageData(r,i);switch(c.data.set(a),l.putImageData(c,0,0),t){case\"jpeg\":s=o.toDataURL(\"image/jpeg\");break;case\"webp\":s=o.toDataURL(\"image/webp\");break;default:s=o.toDataURL(\"image/png\")}return this.staticMode&&this.container.removeChild(n),s},w.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[k[t]];p.setConvert(e,this.fullLayout),e.setScale=f.noop}},w.make4thDimension=function(){var t=this.graphDiv._fullLayout;this._mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},p.setConvert(this._mockAxis,t)},e.exports=_},{\"../../../stackgl_modules\":1120,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/show_no_webgl_msg\":525,\"../../lib/str2rgbarray\":528,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"./layout/convert\":602,\"./layout/spikes\":605,\"./layout/tick_marks\":606,\"./project\":607,\"has-passive-events\":229,\"webgl-context\":331}],609:[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;aOpenStreetMap
contributors',a=['\\xa9 Carto',i].join(\" \"),o=['Map tiles by Stamen Design','under CC BY 3.0',\"|\",'Data by OpenStreetMap contributors','under ODbL'].join(\" \"),s={\"open-street-map\":{id:\"osm\",version:8,sources:{\"plotly-osm-tiles\":{type:\"raster\",attribution:i,tiles:[\"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png\",\"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-osm-tiles\",type:\"raster\",source:\"plotly-osm-tiles\",minzoom:0,maxzoom:22}]},\"white-bg\":{id:\"white-bg\",version:8,sources:{},layers:[{id:\"white-bg\",type:\"background\",paint:{\"background-color\":\"#FFFFFF\"},minzoom:0,maxzoom:22}]},\"carto-positron\":{id:\"carto-positron\",version:8,sources:{\"plotly-carto-positron\":{type:\"raster\",attribution:a,tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-positron\",type:\"raster\",source:\"plotly-carto-positron\",minzoom:0,maxzoom:22}]},\"carto-darkmatter\":{id:\"carto-darkmatter\",version:8,sources:{\"plotly-carto-darkmatter\":{type:\"raster\",attribution:a,tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-darkmatter\",type:\"raster\",source:\"plotly-carto-darkmatter\",minzoom:0,maxzoom:22}]},\"stamen-terrain\":{id:\"stamen-terrain\",version:8,sources:{\"plotly-stamen-terrain\":{type:\"raster\",attribution:o,tiles:[\"https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-terrain\",type:\"raster\",source:\"plotly-stamen-terrain\",minzoom:0,maxzoom:22}]},\"stamen-toner\":{id:\"stamen-toner\",version:8,sources:{\"plotly-stamen-toner\":{type:\"raster\",attribution:o,tiles:[\"https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-toner\",type:\"raster\",source:\"plotly-stamen-toner\",minzoom:0,maxzoom:22}]},\"stamen-watercolor\":{id:\"stamen-watercolor\",version:8,sources:{\"plotly-stamen-watercolor\":{type:\"raster\",attribution:['Map tiles by Stamen Design','under CC BY 3.0',\"|\",'Data by OpenStreetMap contributors','under CC BY SA'].join(\" \"),tiles:[\"https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-watercolor\",type:\"raster\",source:\"plotly-stamen-watercolor\",minzoom:0,maxzoom:22}]}},l=n(s);e.exports={requiredVersion:\"1.10.1\",styleUrlPrefix:\"mapbox://styles/mapbox/\",styleUrlSuffix:\"v9\",styleValuesMapbox:[\"basic\",\"streets\",\"outdoors\",\"light\",\"dark\",\"satellite\",\"satellite-streets\"],styleValueDflt:\"basic\",stylesNonMapbox:s,styleValuesNonMapbox:l,traceLayerPrefix:\"plotly-trace-layer-\",layoutLayerPrefix:\"plotly-layout-layer-\",wrongVersionErrorMsg:[\"Your custom plotly.js bundle is not using the correct mapbox-gl version\",\"Please install mapbox-gl@1.10.1.\"].join(\"\\n\"),noAccessTokenErrorMsg:[\"Missing Mapbox access token.\",\"Mapbox trace type require a Mapbox access token to be registered.\",\"For example:\",\" Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });\",\"More info here: https://www.mapbox.com/help/define-access-token/\"].join(\"\\n\"),missingStyleErrorMsg:[\"No valid mapbox style found, please set `mapbox.style` to one of:\",l.join(\", \"),\"or register a Mapbox access token to use a Mapbox-served style.\"].join(\"\\n\"),multipleTokensErrorMsg:[\"Set multiple mapbox access token across different mapbox subplot,\",\"using first token found as mapbox-gl does not allow multipleaccess tokens on the same page.\"].join(\"\\n\"),mapOnErrorMsg:\"Mapbox error.\",mapboxLogo:{path0:\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\",path1:\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\",path2:\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\",polygon:\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34\"},styleRules:{map:\"overflow:hidden;position:relative;\",\"missing-css\":\"display:none;\",canary:\"background-color:salmon;\",\"ctrl-bottom-left\":\"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;\",\"ctrl-bottom-right\":\"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;\",ctrl:\"clear: both; pointer-events: auto; transform: translate(0, 0);\",\"ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner\":\"display: none;\",\"ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner\":\"display: block; margin-top:2px\",\"ctrl-attrib.mapboxgl-compact:hover\":\"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;\",\"ctrl-attrib.mapboxgl-compact::after\":'content: \"\"; cursor: pointer; position: absolute; background-image: url(\\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"%3E %3Cpath fill=\"%23333333\" fill-rule=\"evenodd\" d=\"M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0\"/%3E %3C/svg%3E\\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',\"ctrl-attrib.mapboxgl-compact\":\"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;\",\"ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; right: 0\",\"ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; left: 0\",\"ctrl-bottom-left .mapboxgl-ctrl\":\"margin: 0 0 10px 10px; float: left;\",\"ctrl-bottom-right .mapboxgl-ctrl\":\"margin: 0 10px 10px 0; float: right;\",\"ctrl-attrib\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a:hover\":\"color: inherit; text-decoration: underline;\",\"ctrl-attrib .mapbox-improve-map\":\"font-weight: bold; margin-left: 2px;\",\"attrib-empty\":\"display: none;\",\"ctrl-logo\":'display:block; width: 21px; height: 21px; background-image: url(\\'data:image/svg+xml;charset=utf-8,%3C?xml version=\"1.0\" encoding=\"utf-8\"?%3E %3Csvg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 21 21\" style=\"enable-background:new 0 0 21 21;\" xml:space=\"preserve\"%3E%3Cg transform=\"translate(0,0.01)\"%3E%3Cpath d=\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3Cpath d=\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpath d=\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpolygon points=\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 \" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3C/g%3E%3C/svg%3E\\')'}}},{\"../../lib/sort_object_keys\":526}],612:[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\":503}],613:[function(t,e,r){\"use strict\";var n=t(\"mapbox-gl/dist/mapbox-gl-unminified\"),i=t(\"../../lib\"),a=i.strTranslate,o=i.strScale,s=t(\"../../plots/get_data\").getSubplotCalcData,l=t(\"../../constants/xmlns_namespaces\"),c=t(\"@plotly/d3\"),u=t(\"../../components/drawing\"),f=t(\"../../lib/svg_text_utils\"),h=t(\"./mapbox\"),p=r.constants=t(\"./constants\");function d(t){return\"string\"==typeof t&&(-1!==p.styleValuesMapbox.indexOf(t)||0===t.indexOf(\"mapbox://\"))}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,a=e._subplots.mapbox;if(n.version!==p.requiredVersion)throw new Error(p.wrongVersionErrorMsg);var o=function(t,e){var r=t._fullLayout;if(\"\"===t._context.mapboxAccessToken)return\"\";for(var n=[],a=[],o=!1,s=!1,l=0;l1&&i.warn(p.multipleTokensErrorMsg),n[0]):(a.length&&i.log([\"Listed mapbox access token(s)\",a.join(\",\"),\"but did not use a Mapbox map style, ignoring token(s).\"].join(\" \")),\"\")}(t,a);n.accessToken=o;for(var l=0;l_/2){var w=v.split(\"|\").join(\"
\");x.text(w).attr(\"data-unformatted\",w).call(f.convertToTspans,t),b=u.bBox(x.node())}x.attr(\"transform\",a(-3,8-b.height)),y.insert(\"rect\",\".static-attribution\").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:\"rgba(255, 255, 255, 0.75)\"});var T=1;b.width+6>_&&(T=_/(b.width+6));var k=[n.l+n.w*h.x[1],n.t+n.h*(1-h.y[0])];y.attr(\"transform\",a(k[0],k[1])+o(T))}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n0){for(var r=0;r0}function u(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,\"line-dasharray\":t.line.dash});break;case\"fill\":n.extendFlat(r,{\"fill-color\":t.color,\"fill-outline-color\":t.fill.outlinecolor,\"fill-opacity\":t.opacity});break;case\"symbol\":var i=t.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(e,{\"icon-image\":i.icon+\"-15\",\"icon-size\":i.iconsize/10,\"text-field\":i.text,\"text-size\":i.textfont.size,\"text-anchor\":o.anchor,\"text-offset\":o.offset,\"symbol-placement\":i.placement}),n.extendFlat(r,{\"icon-color\":t.color,\"text-color\":i.textfont.color,\"text-opacity\":t.opacity});break;case\"raster\":n.extendFlat(r,{\"raster-fade-duration\":0,\"raster-opacity\":t.opacity})}return{layout:e,paint:r}}l.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):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=c(t)},l.needsNewImage=function(t){return this.subplot.map.getSource(this.idSource)&&\"image\"===this.sourceType&&\"image\"===t.sourcetype&&(this.source!==t.source||JSON.stringify(this.coordinates)!==JSON.stringify(t.coordinates))},l.needsNewSource=function(t){return this.sourceType!==t.sourcetype||JSON.stringify(this.source)!==JSON.stringify(t.source)||this.layerType!==t.type},l.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup[\"layout-\"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup[\"layout-\"+this.index]},l.updateImage=function(t){this.subplot.map.getSource(this.idSource).updateImage({url:t.source,coordinates:t.coordinates});var e=this.findFollowingMapboxLayerId(this.lookupBelow());null!==e&&this.subplot.map.moveLayer(this.idLayer,e)},l.updateSource=function(t){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,c(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,a={type:r};\"geojson\"===r?e=\"data\":\"vector\"===r?e=\"string\"==typeof n?\"url\":\"tiles\":\"raster\"===r?(e=\"tiles\",a.tileSize=256):\"image\"===r&&(e=\"url\",a.coordinates=t.coordinates);a[e]=n,t.sourceattribution&&(a.attribution=i(t.sourceattribution));return a}(t);e.addSource(this.idSource,r)}},l.findFollowingMapboxLayerId=function(t){if(\"traces\"===t)for(var e=this.subplot.getMapLayers(),r=0;r1)for(r=0;r-1&&v(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf(\"event\")>-1&&c.click(n,e.originalEvent)}}},_.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,o=t.dragmode;a=f(o)?function(t,r){(t.range={})[e.id]=[c([r.xmin,r.ymin]),c([r.xmax,r.ymax])]}:function(t,r,n){(t.lassoPoints={})[e.id]=n.filtered.map(c)};var s=e.dragOptions;e.dragOptions=i.extendDeep(s||{},{dragmode:t.dragmode,element:e.div,gd:n,plotinfo:{id:e.id,domain:t[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off(\"click\",e.onClickInPanHandler),p(o)||h(o)?(r.dragPan.disable(),r.on(\"zoomstart\",e.clearSelect),e.dragOptions.prepFn=function(t,r,n){d(t,r,n,e.dragOptions,o)},l.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 c(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},_.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])},_.updateLayers=function(t){var e,r=t[this.id].layers,n=this.layerList;if(r.length!==n.length){for(e=0;e=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\"),l=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(){b.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()&&l.text()?\" - \":\"\")}},b.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit(\"plotly_beforeexport\");var 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=b.graphJson(t,!1,\"keepdata\"),i.node().submit(),r.remove(),t.emit(\"plotly_afterexport\"),!1}};var T=[\"days\",\"shortDays\",\"months\",\"shortMonths\",\"periods\",\"dateTime\",\"date\",\"time\",\"decimal\",\"thousands\",\"grouping\",\"currency\"],k=[\"year\",\"month\",\"dayMonth\",\"dayMonthYear\"];function A(t,e){var r=t._context.locale;r||(r=\"en-US\");var n=!1,i={};function a(t){for(var r=!0,a=0;a1&&z.length>1){for(s.getComponentMethod(\"grid\",\"sizeDefaults\")(c,l),o=0;o15&&z.length>15&&0===l.shapes.length&&0===l.images.length,b.linkSubplots(h,l,f,n),b.cleanPlot(h,l,f,n);var N=!(!n._has||!n._has(\"gl2d\")),j=!(!l._has||!l._has(\"gl2d\")),U=!(!n._has||!n._has(\"cartesian\"))||N,V=!(!l._has||!l._has(\"cartesian\"))||j;U&&!V?n._bgLayer.remove():V&&!U&&(l._shouldCreateBgLayer=!0),n._zoomlayer&&!t._dragging&&d({_fullLayout:n}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i0){var f=1-2*s;n=Math.round(f*n),i=Math.round(f*i)}}var h=b.layoutAttributes.width.min,p=b.layoutAttributes.height.min;n1,g=!e.height&&Math.abs(r.height-i)>1;(g||d)&&(d&&(r.width=n),g&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),b.sanitizeMargins(r)},b.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a,o,l=s.componentsRegistry,c=e._basePlotModules,f=s.subplotsRegistry.cartesian;for(i in l)(o=l[i]).includeBasePlot&&o.includeBasePlot(t,e);for(var h in c.length||c.push(f),e._has(\"cartesian\")&&(s.getComponentMethod(\"grid\",\"contentDefaults\")(t,e),f.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(u.subplotSort);for(a=0;a1&&(r.l/=g,r.r/=g)}if(f){var m=(r.t+r.b)/f;m>1&&(r.t/=m,r.b/=m)}var v=void 0!==r.xl?r.xl:r.x,y=void 0!==r.xr?r.xr:r.x,x=void 0!==r.yt?r.yt:r.y,_=void 0!==r.yb?r.yb:r.y;h[e]={l:{val:v,size:r.l+d},r:{val:y,size:r.r+d},b:{val:_,size:r.b+d},t:{val:x,size:r.t+d}},p[e]=1}else delete h[e],delete p[e];if(!n._replotting)return b.doAutoMargin(t)}},b.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,n=e.height;e._size||(e._size={}),C(e);var i=e._size,a=e.margin,l=u.extendFlat({},i),c=a.l,f=a.r,h=a.t,d=a.b,g=e._pushmargin,m=e._pushmarginIds;if(!1!==e.margin.autoexpand){for(var v in g)m[v]||delete g[v];for(var y in g.base={l:{val:0,size:c},r:{val:1,size:f},t:{val:1,size:h},b:{val:0,size:d}},g){var x=g[y].l||{},_=g[y].b||{},w=x.val,T=x.size,k=_.val,A=_.size;for(var M in g){if(o(T)&&g[M].r){var S=g[M].r.val,E=g[M].r.size;if(S>w){var L=(T*S+(E-r)*w)/(S-w),P=(E*(1-w)+(T-r)*(1-S))/(S-w);L+P>c+f&&(c=L,f=P)}}if(o(A)&&g[M].t){var I=g[M].t.val,O=g[M].t.size;if(I>k){var z=(A*I+(O-n)*k)/(I-k),D=(O*(1-k)+(A-n)*(1-I))/(I-k);z+D>d+h&&(d=z,h=D)}}}}}var R=u.constrain(r-a.l-a.r,2,64),F=u.constrain(n-a.t-a.b,2,64),B=Math.max(0,r-R),N=Math.max(0,n-F);if(B){var j=(c+f)/B;j>1&&(c/=j,f/=j)}if(N){var U=(d+h)/N;U>1&&(d/=U,h/=U)}if(i.l=Math.round(c),i.r=Math.round(f),i.t=Math.round(h),i.b=Math.round(d),i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e._replotting&&b.didMarginChange(l,i)){\"_redrawFromAutoMarginCount\"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var V=3*(1+Object.keys(m).length);if(e._redrawFromAutoMarginCount0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return s.call(\"redraw\",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit(\"plotly_transitioninterrupted\",[])}));var a=0,o=0;function l(){return a++,function(){o++,n||o!==a||function(e){if(!t._transitionData)return;(function(t){if(t)for(;t.length;)t.shift()})(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return s.call(\"redraw\",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit(\"plotly_transitioned\",[])})).then(e)}(i)}}r.runFn(l),setTimeout(l())}))}],a=u.syncOrAsync(i,t);return a&&a.then||(a=Promise.resolve()),a.then((function(){return t}))}b.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},b.graphJson=function(t,e,r,n,i,a){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&b.supplyDefaults(t);var o=i?t._fullData:t.data,s=i?t._fullLayout:t.layout,l=(t._transitionData||{})._frames;function c(t,e){if(\"function\"==typeof t)return e?\"_function_\":null;if(u.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(a){if(-1===[\"_\",\"[\"].indexOf(a.charAt(0)))if(\"function\"!=typeof t[a]){if(\"keepdata\"===r){if(\"src\"===a.substr(a.length-3))return}else if(\"keepstream\"===r){if(\"string\"==typeof(n=t[a+\"src\"])&&n.indexOf(\":\")>0&&!u.isPlainObject(t.stream))return}else if(\"keepall\"!==r&&\"string\"==typeof(n=t[a+\"src\"])&&n.indexOf(\":\")>0)return;i[a]=c(t[a],e)}else e&&(i[a]=\"_function\")})),i}return Array.isArray(t)?t.map((function(t){return c(t,e)})):u.isTypedArray(t)?u.simpleMap(t,u.identity):u.isJSDate(t)?u.ms2DateTimeLocal(+t):t}var f={data:(o||[]).map((function(t){var r=c(t);return e&&delete r.fit,r}))};if(!e&&(f.layout=c(s),i)){var h=s._size;f.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return l&&(f.frames=c(l)),a&&(f.config=c(t._context,!0)),\"object\"===n?f:JSON.stringify(f)},b.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r=0;a--)if(s[a].enabled){r._indexToPoints=s[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(t,r))}Array.isArray(o)&&o[0]||(o=[{x:h,y:h}]),o[0].t||(o[0].t={}),o[0].trace=r,d[e]=o}}for(z(o,c,f),i=0;i1e-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;a0?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=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]}(p),b=x[2]-x[0],_=x[3]-x[1],w=h/f,T=Math.abs(_/b);w>T?(d=f,y=(h-(g=f*T))/n.h/2,m=[o[0],o[1]],v=[s[0]+y,s[1]-y]):(g=h,y=(f-(d=h/T))/n.w/2,m=[o[0]+y,o[1]-y],v=[s[0],s[1]]),this.xLength2=d,this.yLength2=g,this.xDomain2=m,this.yDomain2=v;var k,A=this.xOffset2=n.l+n.w*m[0],M=this.yOffset2=n.t+n.h*(1-v[1]),S=this.radius=d/b,E=this.innerRadius=this.getHole(e)*S,L=this.cx=A-S*x[0],C=this.cy=M+S*x[3],P=this.cxx=L-A,I=this.cyy=C-M,O=i.side;\"counterclockwise\"===O?(k=O,O=\"top\"):\"clockwise\"===O&&(k=O,O=\"bottom\"),this.radialAxis=this.mockAxis(t,e,i,{_id:\"x\",side:O,_trueSide:k,domain:[E/n.w,S/n.w]}),this.angularAxis=this.mockAxis(t,e,a,{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:m}),this.yaxis=this.mockCartesianAxis(t,e,{_id:\"y\",domain:v});var z=this.pathSubplot();this.clipPaths.forTraces.select(\"path\").attr(\"d\",z).attr(\"transform\",l(P,I)),r.frontplot.attr(\"transform\",l(A,M)).call(u.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr(\"d\",z).attr(\"transform\",l(L,C)).call(c.fill,e.bgcolor)},N.mockAxis=function(t,e,r,n){var i=o.extendFlat({},r,n);return d(i,e,t),i},N.mockCartesianAxis=function(t,e,r){var n=this,i=n.isSmith,a=r._id,s=o.extendFlat({type:\"linear\"},r);p(s,t);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var t=n.sectorBBox,r=l[a],i=n.radialAxis._rl,o=(i[1]-i[0])/(1-n.getHole(e));s.range=[t[r[0]]*o,t[r[1]]*o]},s.isPtWithinRange=\"x\"!==a||i?function(){return!0}:function(t){return n.isPtInside(t)},s.setRange(),s.setScale(),s},N.doAutoRange=function(t,e){var r=this.gd,n=this.radialAxis,i=this.getRadial(e);g(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\")]},N.updateRadialAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=r.getRadial(e),g=D(r.getSector(e)[0],360),m=r.radialAxis,v=u90&&g<=270&&(m.tickangle=180);var x=y?function(t){var e=O(r,C([t.x,0]));return l(e[0]-f,e[1]-p)}:function(t){return l(m.l2p(t.x)+u,0)},b=y?function(t){return I(r,t.x,-1/0,1/0)}:function(t){return r.pathArc(m.r2p(t.x)+u)},_=j(d);if(r.radialTickLayout!==_&&(i[\"radial-axis\"].selectAll(\".xtick\").remove(),r.radialTickLayout=_),v){m.setScale();var w=0,T=y?(m.tickvals||[]).filter((function(t){return t>=0})).map((function(t){return h.tickText(m,t,!0,!1)})):h.calcTicks(m),k=y?T:h.clipEnds(m,T),A=h.getTickSigns(m)[2];y&&((\"top\"===m.ticks&&\"bottom\"===m.side||\"bottom\"===m.ticks&&\"top\"===m.side)&&(A=-A),\"top\"===m.ticks&&\"top\"===m.side&&(w=-m.ticklen),\"bottom\"===m.ticks&&\"bottom\"===m.side&&(w=m.ticklen)),h.drawTicks(n,m,{vals:T,layer:i[\"radial-axis\"],path:h.makeTickPath(m,0,A),transFn:x,crisp:!1}),h.drawGrid(n,m,{vals:k,layer:i[\"radial-grid\"],path:b,transFn:o.noop,crisp:!1}),h.drawLabels(n,m,{vals:T,layer:i[\"radial-axis\"],transFn:x,labelFns:h.makeLabelFns(m,w)})}var M=r.radialAxisAngle=r.vangles?F(U(R(d.angle),r.vangles)):d.angle,S=l(f,p),E=S+s(-M);V(i[\"radial-axis\"],v&&(d.showticklabels||d.ticks),{transform:E}),V(i[\"radial-grid\"],v&&d.showgrid,{transform:y?\"\":S}),V(i[\"radial-line\"].select(\"line\"),v&&d.showline,{x1:y?-a:u,y1:0,x2:a,y2:0,transform:E}).attr(\"stroke-width\",d.linewidth).call(c.stroke,d.linecolor)},N.updateRadialAxisTitle=function(t,e,r){if(!this.isSmith){var n=this.gd,i=this.radius,a=this.cx,o=this.cy,s=this.getRadial(e),l=this.id+\"title\",c=0;if(s.title){var f=u.bBox(this.layers[\"radial-axis\"].node()).height,h=s.title.font.size,p=s.side;c=\"top\"===p?h:\"counterclockwise\"===p?-(f+.4*h):f+.8*h}var d=void 0!==r?r:this.radialAxisAngle,g=R(d),m=Math.cos(g),v=Math.sin(g),y=a+i/2*m+c*v,b=o-i/2*v+c*m;this.layers[\"radial-axis-title\"]=x.draw(n,l,{propContainer:s,propName:this.id+\".radialaxis.title\",placeholder:z(n,\"Click to enter radial axis title\"),attributes:{x:y,y:b,\"text-anchor\":\"middle\"},transform:{rotate:-d}})}},N.updateAngularAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=r.getAngular(e),g=r.angularAxis,m=r.isSmith;m||(r.fillViewInitialKey(\"angularaxis.rotation\",d.rotation),g.setGeometry(),g.setScale());var v=m?function(t){var e=O(r,C([0,t.x]));return Math.atan2(e[0]-f,e[1]-p)-Math.PI/2}:function(t){return g.t2g(t.x)};\"linear\"===g.type&&\"radians\"===g.thetaunit&&(g.tick0=F(g.tick0),g.dtick=F(g.dtick));var y=function(t){return l(f+a*Math.cos(t),p-a*Math.sin(t))},x=m?function(t){var e=O(r,C([0,t.x]));return l(e[0],e[1])}:function(t){return y(v(t))},b=m?function(t){var e=O(r,C([0,t.x])),n=Math.atan2(e[0]-f,e[1]-p)-Math.PI/2;return l(e[0],e[1])+s(-F(n))}:function(t){var e=v(t);return y(e)+s(-F(e))},_=m?function(t){return P(r,t.x,0,1/0)}:function(t){var e=v(t),r=Math.cos(e),n=Math.sin(e);return\"M\"+[f+u*r,p-u*n]+\"L\"+[f+a*r,p-a*n]},w=h.makeLabelFns(g,0).labelStandoff,T={xFn:function(t){var e=v(t);return Math.cos(e)*w},yFn:function(t){var e=v(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(w+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*M)},anchorFn:function(t){var e=v(t),r=Math.cos(e);return Math.abs(r)<.1?\"middle\":r>0?\"start\":\"end\"},heightFn:function(t,e,r){var n=v(t);return-.5*(1+Math.sin(n))*r}},k=j(d);r.angularTickLayout!==k&&(i[\"angular-axis\"].selectAll(\".\"+g._id+\"tick\").remove(),r.angularTickLayout=k);var A,S=m?[1/0].concat(g.tickvals||[]).map((function(t){return h.tickText(g,t,!0,!1)})):h.calcTicks(g);if(m&&(S[0].text=\"\\u221e\",S[0].fontSize*=1.75),\"linear\"===e.gridshape?(A=S.map(v),o.angleDelta(A[0],A[1])<0&&(A=A.slice().reverse())):A=null,r.vangles=A,\"category\"===g.type&&(S=S.filter((function(t){return o.isAngleInsideSector(v(t),r.sectorInRad)}))),g.visible){var E=\"inside\"===g.ticks?-1:1,L=(g.linewidth||1)/2;h.drawTicks(n,g,{vals:S,layer:i[\"angular-axis\"],path:\"M\"+E*L+\",0h\"+E*g.ticklen,transFn:b,crisp:!1}),h.drawGrid(n,g,{vals:S,layer:i[\"angular-grid\"],path:_,transFn:o.noop,crisp:!1}),h.drawLabels(n,g,{vals:S,layer:i[\"angular-axis\"],repositionOnUpdate:!0,transFn:x,labelFns:T})}V(i[\"angular-line\"].select(\"path\"),d.showline,{d:r.pathSubplot(),transform:l(f,p)}).attr(\"stroke-width\",d.linewidth).call(c.stroke,d.linecolor)},N.updateFx=function(t,e){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1)),this.updateHoverAndMainDrag(t))},N.updateHoverAndMainDrag=function(t){var e,r,s=this,c=s.isSmith,u=s.gd,f=s.layers,h=t._zoomlayer,p=S.MINZOOM,d=S.OFFEDGE,g=s.radius,x=s.innerRadius,T=s.cx,k=s.cy,A=s.cxx,M=s.cyy,L=s.sectorInRad,C=s.vangles,P=s.radialAxis,I=E.clampTiny,O=E.findXYatLength,z=E.findEnclosingVertexAngles,D=S.cornerHalfWidth,R=S.cornerLen/2,F=m.makeDragger(f,\"path\",\"maindrag\",\"crosshair\");n.select(F).attr(\"d\",s.pathSubplot()).attr(\"transform\",l(T,k)),F.onmousemove=function(t){y.hover(u,t,s.id),u._fullLayout._lasthover=F,u._fullLayout._hoversubplot=s.id},F.onmouseout=function(t){u._dragging||v.unhover(u,t)};var B,N,j,U,V,H,q,G,Y,W={element:F,gd:u,subplot:s.id,plotinfo:{id:s.id,xaxis:s.xaxis,yaxis:s.yaxis},xaxes:[s.xaxis],yaxes:[s.yaxis]};function X(t,e){return Math.sqrt(t*t+e*e)}function Z(t,e){return X(t-A,e-M)}function J(t,e){return Math.atan2(M-e,t-A)}function K(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function Q(t,e){if(0===t)return s.pathSector(2*D);var r=R/t,n=e-r,i=e+r,a=Math.max(0,Math.min(t,g)),o=a-D,l=a+D;return\"M\"+K(o,n)+\"A\"+[o,o]+\" 0,0,0 \"+K(o,i)+\"L\"+K(l,i)+\"A\"+[l,l]+\" 0,0,1 \"+K(l,n)+\"Z\"}function $(t,e,r){if(0===t)return s.pathSector(2*D);var n,i,a=K(t,e),o=K(t,r),l=I((a[0]+o[0])/2),c=I((a[1]+o[1])/2);if(l&&c){var u=c/l,f=-1/u,h=O(D,u,l,c);n=O(R,f,h[0][0],h[0][1]),i=O(R,f,h[1][0],h[1][1])}else{var p,d;c?(p=R,d=D):(p=D,d=R),n=[[l-p,c-d],[l+p,c-d]],i=[[l-p,c+d],[l+p,c+d]]}return\"M\"+n.join(\"L\")+\"L\"+i.reverse().join(\"L\")+\"Z\"}function tt(t,e){return e=Math.max(Math.min(e,g),x),tp?(t-1&&1===t&&_(e,u,[s.xaxis],[s.yaxis],s.id,W),r.indexOf(\"event\")>-1&&y.click(u,e,s.id)}W.prepFn=function(t,n,a){var l=u._fullLayout.dragmode,f=F.getBoundingClientRect();u._fullLayout._calcInverseTransform(u);var p=u._fullLayout._invTransform;e=u._fullLayout._invScaleX,r=u._fullLayout._invScaleY;var d=o.apply3DTransform(p)(n-f.left,a-f.top);if(B=d[0],N=d[1],C){var v=E.findPolygonOffset(g,L[0],L[1],C);B+=A+v[0],N+=M+v[1]}switch(l){case\"zoom\":W.clickFn=st,c||(W.moveFn=C?it:rt,W.doneFn=at,function(){j=null,U=null,V=s.pathSubplot(),H=!1;var t=u._fullLayout[s.id];q=i(t.bgcolor).getLuminance(),(G=m.makeZoombox(h,q,T,k,V)).attr(\"fill-rule\",\"evenodd\"),Y=m.makeCorners(h,T,k),w(u)}());break;case\"select\":case\"lasso\":b(t,n,a,W,l)}},v.init(W)},N.updateRadialDrag=function(t,e,r){var i=this,c=i.gd,u=i.layers,f=i.radius,h=i.innerRadius,p=i.cx,d=i.cy,g=i.radialAxis,y=S.radialDragBoxSize,x=y/2;if(g.visible){var b,_,T,M=R(i.radialAxisAngle),E=g._rl,L=E[0],C=E[1],P=E[r],I=.75*(E[1]-E[0])/(1-i.getHole(e))/f;r?(b=p+(f+x)*Math.cos(M),_=d-(f+x)*Math.sin(M),T=\"radialdrag\"):(b=p+(h-x)*Math.cos(M),_=d-(h-x)*Math.sin(M),T=\"radialdrag-inner\");var O,z,D,B=m.makeRectDragger(u,T,\"crosshair\",-x,-x,y,y),N={element:B,gd:c};V(n.select(B),g.visible&&h0==(r?D>L:Dn?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;o0?1:0}function i(t){var e=t[0],r=t[1];if(!isFinite(e)||!isFinite(r))return[1,0];var n=(e+1)*(e+1)+r*r;return[(e*e+r*r-1)/n,2*r/n]}function a(t,e){var r=e[0],n=e[1];return[r*t.radius+t.cx,-n*t.radius+t.cy]}function o(t,e){return e*t.radius}e.exports={smith:i,reactanceArc:function(t,e,r,n){var s=a(t,i([r,e])),l=s[0],c=s[1],u=a(t,i([n,e])),f=u[0],h=u[1];if(0===e)return[\"M\"+l+\",\"+c,\"L\"+f+\",\"+h].join(\" \");var p=o(t,1/Math.abs(e));return[\"M\"+l+\",\"+c,\"A\"+p+\",\"+p+\" 0 0,\"+(e<0?1:0)+\" \"+f+\",\"+h].join(\" \")},resistanceArc:function(t,e,r,s){var l=o(t,1/(e+1)),c=a(t,i([e,r])),u=c[0],f=c[1],h=a(t,i([e,s])),p=h[0],d=h[1];if(n(r)!==n(s)){var g=a(t,i([e,0]));return[\"M\"+u+\",\"+f,\"A\"+l+\",\"+l+\" 0 0,\"+(00){for(var n=[],i=0;i=u&&(h.min=0,d.min=0,m.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function g(t,e,r,n){var i=h[e._name];function o(r,n){return a.coerce(t,e,i,r,n)}o(\"uirevision\",n.uirevision),e.type=\"linear\";var p=o(\"color\"),d=p!==i.color.dflt?p:r.font.color,g=e._name.charAt(0).toUpperCase(),m=\"Component \"+g,v=o(\"title.text\",m);e._hovertitle=v===m?v:g,a.coerceFont(o,\"title.font\",{family:r.font.family,size:a.bigFont(r.font.size),color:d}),o(\"min\"),u(t,e,o,\"linear\"),l(t,e,o,\"linear\"),s(t,e,o,\"linear\"),c(t,e,o,{outerTicks:!0}),o(\"showticklabels\")&&(a.coerceFont(o,\"tickfont\",{family:r.font.family,size:r.font.size,color:d}),o(\"tickangle\"),o(\"tickformat\")),f(t,e,o,{dfltColor:p,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),o(\"hoverformat\"),o(\"layer\")}e.exports=function(t,e,r){o(t,e,r,{type:\"ternary\",attributes:h,handleDefaults:d,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{\"../../components/color\":366,\"../../lib\":503,\"../../plot_api/plot_template\":543,\"../cartesian/line_grid_defaults\":571,\"../cartesian/prefix_suffix_defaults\":573,\"../cartesian/tick_label_defaults\":578,\"../cartesian/tick_mark_defaults\":579,\"../cartesian/tick_value_defaults\":580,\"../subplot_defaults\":632,\"./layout_attributes\":635}],637:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"tinycolor2\"),a=t(\"../../registry\"),o=t(\"../../lib\"),s=o.strTranslate,l=o._,c=t(\"../../components/color\"),u=t(\"../../components/drawing\"),f=t(\"../cartesian/set_convert\"),h=t(\"../../lib/extend\").extendFlat,p=t(\"../plots\"),d=t(\"../cartesian/axes\"),g=t(\"../../components/dragelement\"),m=t(\"../../components/fx\"),v=t(\"../../components/dragelement/helpers\"),y=v.freeMode,x=v.rectMode,b=t(\"../../components/titles\"),_=t(\"../cartesian/select\").prepSelect,w=t(\"../cartesian/select\").selectOnClick,T=t(\"../cartesian/select\").clearSelect,k=t(\"../cartesian/select\").clearSelectionsCache,A=t(\"../cartesian/constants\");function M(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=M;var S=M.prototype;S.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},S.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var i=0;iE*b?i=(a=b)*E:a=(i=x)/E,o=v*i/x,l=y*a/b,r=e.l+e.w*g-i/2,n=e.t+e.h*(1-m)-a/2,p.x0=r,p.y0=n,p.w=i,p.h=a,p.sum=_,p.xaxis={type:\"linear\",range:[w+2*k-_,_-w-2*T],domain:[g-o/2,g+o/2],_id:\"x\"},f(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(t){return t.a>=p.aaxis.range[0]&&t.a<=p.aaxis.range[1]&&t.b>=p.baxis.range[1]&&t.b<=p.baxis.range[0]&&t.c>=p.caxis.range[1]&&t.c<=p.caxis.range[0]},p.yaxis={type:\"linear\",range:[w,_-T-k],domain:[m-l/2,m+l/2],_id:\"y\"},f(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var A=p.yaxis.domain[0],M=p.aaxis=h({},t.aaxis,{range:[w,_-T-k],side:\"left\",tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+l*E],anchor:\"free\",position:0,_id:\"y\",_length:i});f(M,p.graphDiv._fullLayout),M.setScale();var S=p.baxis=h({},t.baxis,{range:[_-w-k,T],side:\"bottom\",domain:p.xaxis.domain,anchor:\"free\",position:0,_id:\"x\",_length:i});f(S,p.graphDiv._fullLayout),S.setScale();var L=p.caxis=h({},t.caxis,{range:[_-w-T,k],side:\"right\",tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+l*E],anchor:\"free\",position:0,_id:\"y\",_length:i});f(L,p.graphDiv._fullLayout),L.setScale();var C=\"M\"+r+\",\"+(n+a)+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";p.clipDef.select(\"path\").attr(\"d\",C),p.layers.plotbg.select(\"path\").attr(\"d\",C);var P=\"M0,\"+a+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";p.clipDefRelative.select(\"path\").attr(\"d\",P);var I=s(r,n);p.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",I),p.clipDefRelative.select(\"path\").attr(\"transform\",null);var O=s(r-S._offset,n+a);p.layers.baxis.attr(\"transform\",O),p.layers.bgrid.attr(\"transform\",O);var z=s(r+i/2,n)+\"rotate(30)\"+s(0,-M._offset);p.layers.aaxis.attr(\"transform\",z),p.layers.agrid.attr(\"transform\",z);var D=s(r+i/2,n)+\"rotate(-30)\"+s(0,-L._offset);p.layers.caxis.attr(\"transform\",D),p.layers.cgrid.attr(\"transform\",D),p.drawAxes(!0),p.layers.aline.select(\"path\").attr(\"d\",M.showline?\"M\"+r+\",\"+(n+a)+\"l\"+i/2+\",-\"+a:\"M0,0\").call(c.stroke,M.linecolor||\"#000\").style(\"stroke-width\",(M.linewidth||0)+\"px\"),p.layers.bline.select(\"path\").attr(\"d\",S.showline?\"M\"+r+\",\"+(n+a)+\"h\"+i:\"M0,0\").call(c.stroke,S.linecolor||\"#000\").style(\"stroke-width\",(S.linewidth||0)+\"px\"),p.layers.cline.select(\"path\").attr(\"d\",L.showline?\"M\"+(r+i/2)+\",\"+n+\"l\"+i/2+\",\"+a:\"M0,0\").call(c.stroke,L.linecolor||\"#000\").style(\"stroke-width\",(L.linewidth||0)+\"px\"),p.graphDiv._context.staticPlot||p.initInteractions(),u.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},S.drawAxes=function(t){var e=this.graphDiv,r=this.id.substr(7)+\"title\",n=this.layers,i=this.aaxis,a=this.baxis,o=this.caxis;if(this.drawAx(i),this.drawAx(a),this.drawAx(o),t){var s=Math.max(i.showticklabels?i.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+(\"outside\"===o.ticks?.87*o.ticklen:0)),c=(a.showticklabels?a.tickfont.size:0)+(\"outside\"===a.ticks?a.ticklen:0)+3;n[\"a-title\"]=b.draw(e,\"a\"+r,{propContainer:i,propName:this.id+\".aaxis.title\",placeholder:l(e,\"Click to enter Component A title\"),attributes:{x:this.x0+this.w/2,y:this.y0-i.title.font.size/3-s,\"text-anchor\":\"middle\"}}),n[\"b-title\"]=b.draw(e,\"b\"+r,{propContainer:a,propName:this.id+\".baxis.title\",placeholder:l(e,\"Click to enter Component B title\"),attributes:{x:this.x0-c,y:this.y0+this.h+.83*a.title.font.size+c,\"text-anchor\":\"middle\"}}),n[\"c-title\"]=b.draw(e,\"c\"+r,{propContainer:o,propName:this.id+\".caxis.title\",placeholder:l(e,\"Click to enter Component C title\"),attributes:{x:this.x0+this.w+c,y:this.y0+this.h+.83*o.title.font.size+c,\"text-anchor\":\"middle\"}})}},S.drawAx=function(t){var e,r=this.graphDiv,n=t._name,i=n.charAt(0),a=t._id,s=this.layers[n],l=i+\"tickLayout\",c=(e=t).ticks+String(e.ticklen)+String(e.showticklabels);this[l]!==c&&(s.selectAll(\".\"+a+\"tick\").remove(),this[l]=c),t.setScale();var u=d.calcTicks(t),f=d.clipEnds(t,u),h=d.makeTransTickFn(t),p=d.getTickSigns(t)[2],g=o.deg2rad(30),m=p*(t.linewidth||1)/2,v=p*t.ticklen,y=this.w,x=this.h,b=\"b\"===i?\"M0,\"+m+\"l\"+Math.sin(g)*v+\",\"+Math.cos(g)*v:\"M\"+m+\",0l\"+Math.cos(g)*v+\",\"+-Math.sin(g)*v,_={a:\"M0,0l\"+x+\",-\"+y/2,b:\"M0,0l-\"+y/2+\",-\"+x,c:\"M0,0l-\"+x+\",\"+y/2}[i];d.drawTicks(r,t,{vals:\"inside\"===t.ticks?f:u,layer:s,path:b,transFn:h,crisp:!1}),d.drawGrid(r,t,{vals:f,layer:this.layers[i+\"grid\"],path:_,transFn:h,crisp:!1}),d.drawLabels(r,t,{vals:u,layer:s,transFn:h,labelFns:d.makeLabelFns(t,0,30)})};var L=A.MINZOOM/2+.87,C=\"m-0.87,.5h\"+L+\"v3h-\"+(L+5.2)+\"l\"+(L/2+2.6)+\",-\"+(.87*L+4.5)+\"l2.6,1.5l-\"+L/2+\",\"+.87*L+\"Z\",P=\"m0.87,.5h-\"+L+\"v3h\"+(L+5.2)+\"l-\"+(L/2+2.6)+\",-\"+(.87*L+4.5)+\"l-2.6,1.5l\"+L/2+\",\"+.87*L+\"Z\",I=\"m0,1l\"+L/2+\",\"+.87*L+\"l2.6,-1.5l-\"+(L/2+2.6)+\",-\"+(.87*L+4.5)+\"l-\"+(L/2+2.6)+\",\"+(.87*L+4.5)+\"l2.6,1.5l\"+L/2+\",-\"+.87*L+\"Z\",O=!0;function z(t){n.select(t).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}S.clearSelect=function(){k(this.dragOptions),T(this.dragOptions.gd)},S.initInteractions=function(){var t,e,r,n,f,h,p,d,v,b,T,k,M=this,S=M.layers.plotbg.select(\"path\").node(),L=M.graphDiv,D=L._fullLayout._zoomlayer;function R(t){var e={};return e[M.id+\".aaxis.min\"]=t.a,e[M.id+\".baxis.min\"]=t.b,e[M.id+\".caxis.min\"]=t.c,e}function F(t,e){var r=L._fullLayout.clickmode;z(L),2===t&&(L.emit(\"plotly_doubleclick\",null),a.call(\"_guiRelayout\",L,R({a:0,b:0,c:0}))),r.indexOf(\"select\")>-1&&1===t&&w(e,L,[M.xaxis],[M.yaxis],M.id,M.dragOptions),r.indexOf(\"event\")>-1&&m.click(L,e,M.id)}function B(t,e){return 1-e/M.h}function N(t,e){return 1-(t+(M.h-e)/Math.sqrt(3))/M.w}function j(t,e){return(t-(M.h-e)/Math.sqrt(3))/M.w}function U(i,a){var o=r+i*t,s=n+a*e,l=Math.max(0,Math.min(1,B(0,n),B(0,s))),c=Math.max(0,Math.min(1,N(r,n),N(o,s))),u=Math.max(0,Math.min(1,j(r,n),j(o,s))),g=(l/2+u)*M.w,m=(1-l/2-c)*M.w,y=(g+m)/2,x=m-g,_=(1-l)*M.h,w=_-x/E;x.2?\"rgba(0,0,0,0.4)\":\"rgba(255,255,255,0.3)\").duration(200),k.transition().style(\"opacity\",1).duration(200),b=!0),L.emit(\"plotly_relayouting\",R(p))}function V(){z(L),p!==f&&(a.call(\"_guiRelayout\",L,R(p)),O&&L.data&&L._context.showTips&&(o.notifier(l(L,\"Double-click to zoom back out\"),\"long\"),O=!1))}function H(t,e){var r=t/M.xaxis._m,n=e/M.yaxis._m,i=[(p={a:f.a-n,b:f.b+(r+n)/2,c:f.c-(r-n)/2}).a,p.b,p.c].sort(o.sorterAsc),a=i.indexOf(p.a),l=i.indexOf(p.b),c=i.indexOf(p.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),p={a:i[a],b:i[l],c:i[c]},e=(f.a-p.a)*M.yaxis._m,t=(f.c-p.c-f.b+p.b)*M.xaxis._m);var h=s(M.x0+t,M.y0+e);M.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",h);var d=s(-t,-e);M.clipDefRelative.select(\"path\").attr(\"transform\",d),M.aaxis.range=[p.a,M.sum-p.b-p.c],M.baxis.range=[M.sum-p.a-p.c,p.b],M.caxis.range=[M.sum-p.a-p.b,p.c],M.drawAxes(!1),M._hasClipOnAxisFalse&&M.plotContainer.select(\".scatterlayer\").selectAll(\".trace\").call(u.hideOutsideRangePoints,M),L.emit(\"plotly_relayouting\",R(p))}function q(){a.call(\"_guiRelayout\",L,R(p))}this.dragOptions={element:S,gd:L,plotinfo:{id:M.id,domain:L._fullLayout[M.id].domain,xaxis:M.xaxis,yaxis:M.yaxis},subplot:M.id,prepFn:function(a,l,u){M.dragOptions.xaxes=[M.xaxis],M.dragOptions.yaxes=[M.yaxis],t=L._fullLayout._invScaleX,e=L._fullLayout._invScaleY;var g=M.dragOptions.dragmode=L._fullLayout.dragmode;y(g)?M.dragOptions.minDrag=1:M.dragOptions.minDrag=void 0,\"zoom\"===g?(M.dragOptions.moveFn=U,M.dragOptions.clickFn=F,M.dragOptions.doneFn=V,function(t,e,a){var l=S.getBoundingClientRect();r=e-l.left,n=a-l.top,L._fullLayout._calcInverseTransform(L);var u=L._fullLayout._invTransform,g=o.apply3DTransform(u)(r,n);r=g[0],n=g[1],f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=f,h=M.aaxis.range[1]-f.a,d=i(M.graphDiv._fullLayout[M.id].bgcolor).getLuminance(),v=\"M0,\"+M.h+\"L\"+M.w/2+\", 0L\"+M.w+\",\"+M.h+\"Z\",b=!1,T=D.append(\"path\").attr(\"class\",\"zoombox\").attr(\"transform\",s(M.x0,M.y0)).style({fill:d>.2?\"rgba(0,0,0,0)\":\"rgba(255,255,255,0)\",\"stroke-width\":0}).attr(\"d\",v),k=D.append(\"path\").attr(\"class\",\"zoombox-corners\").attr(\"transform\",s(M.x0,M.y0)).style({fill:c.background,stroke:c.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"d\",\"M0,0Z\"),M.clearSelect(L)}(0,l,u)):\"pan\"===g?(M.dragOptions.moveFn=H,M.dragOptions.clickFn=F,M.dragOptions.doneFn=q,f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=f,M.clearSelect(L)):(x(g)||y(g))&&_(a,l,u,M.dragOptions,g)}},S.onmousemove=function(t){m.hover(L,t,M.id),L._fullLayout._lasthover=S,L._fullLayout._hoversubplot=M.id},S.onmouseout=function(t){L._dragging||g.unhover(L,t)},g.init(this.dragOptions)}},{\"../../components/color\":366,\"../../components/dragelement\":385,\"../../components/dragelement/helpers\":384,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../components/titles\":464,\"../../lib\":503,\"../../lib/extend\":493,\"../../registry\":638,\"../cartesian/axes\":554,\"../cartesian/constants\":561,\"../cartesian/select\":575,\"../cartesian/set_convert\":576,\"../plots\":619,\"@plotly/d3\":58,tinycolor2:312}],638:[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/dom\").addStyleRule,l=t(\"./lib/extend\"),c=t(\"./plots/attributes\"),u=t(\"./plots/layout_attributes\"),f=l.extendFlat,h=l.extendDeepAll;function p(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)b(i,t.name)}(t.basePlotModule);for(var o={},l=0;l-1&&(f[p[r]].title={text:\"\"});for(r=0;r\")?\"\":e.html(t).text()}));return e.remove(),r}(T),T=(T=T.replace(/&(?!\\w+;|\\#[0-9]+;| \\#x[0-9A-F]+;)/g,\"&\")).replace(c,\"'\"),i.isIE()&&(T=(T=(T=T.replace(/\"/gi,\"'\")).replace(/(\\('#)([^']*)('\\))/gi,'(\"#$2\")')).replace(/(\\\\')/gi,'\"')),T}},{\"../components/color\":366,\"../components/drawing\":388,\"../constants/xmlns_namespaces\":480,\"../lib\":503,\"@plotly/d3\":58}],647:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){for(var r=0;rf+c||!n(u))}for(var p=0;pa))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)?e0?e+=r:u<0&&(e-=r)}return e}function z(t){var e=u,r=t.b,i=O(t);return n.inbox(r-e,i-e,_+(i-e)/(i-r)-1)}var D=t[f+\"a\"],R=t[h+\"a\"];g=Math.abs(D.r2c(D.range[1])-D.r2c(D.range[0]));var F=n.getDistanceFunction(i,p,d,(function(t){return(p(t)+d(t))/2}));if(n.getClosest(m,F,t),!1!==t.index&&m[t.index].p!==c){k||(L=function(t){return Math.min(A(t),t.p-y.bargroupwidth/2)},C=function(t){return Math.max(M(t),t.p+y.bargroupwidth/2)});var B=m[t.index],N=v.base?B.b+B.s:B.s;t[h+\"0\"]=t[h+\"1\"]=R.c2p(B[h],!0),t[h+\"LabelVal\"]=N;var j=y.extents[y.extents.round(B.p)];t[f+\"0\"]=D.c2p(x?L(B):j[0],!0),t[f+\"1\"]=D.c2p(x?C(B):j[1],!0);var U=void 0!==B.orig_p;return t[f+\"LabelVal\"]=U?B.orig_p:B.p,t.labelLabel=l(D,t[f+\"LabelVal\"],v[f+\"hoverformat\"]),t.valueLabel=l(R,t[h+\"LabelVal\"],v[h+\"hoverformat\"]),t.baseLabel=l(R,B.b,v[h+\"hoverformat\"]),t.spikeDistance=(function(t){var e=u,r=t.b,i=O(t);return n.inbox(r-e,i-e,w+(i-e)/(i-r)-1)}(B)+function(t){return P(A(t),M(t),w)}(B))/2,t[f+\"Spike\"]=D.c2p(B.p,!0),o(B,v,t),t.hovertemplate=v.hovertemplate,t}}function f(t,e){var r=e.mcc||t.marker.color,n=e.mlcc||t.marker.line.color,i=s(t,e);return a.opacity(r)?r:a.opacity(n)&&i?n:void 0}e.exports={hoverPoints:function(t,e,r,n,a){var o=u(t,e,r,n,a);if(o){var s=o.cd,l=s[0].trace,c=s[o.index];return o.color=f(l,c),i.getComponentMethod(\"errorbars\",\"hoverInfo\")(c,l,o),[o]}},hoverOnBars:u,getTraceColor:f}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"./helpers\":654}],656:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\").crossTraceCalc,colorbar:t(\"../scatter/marker_colorbar\"),arraysToCalcdata:t(\"./arrays_to_calcdata\"),plot:t(\"./plot\").plot,style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"bar\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"bar\",\"oriented\",\"errorBarsOK\",\"showLegend\",\"zoomScale\"],animatable:!0,meta:{}}},{\"../../plots/cartesian\":568,\"../scatter/marker_colorbar\":944,\"./arrays_to_calcdata\":647,\"./attributes\":648,\"./calc\":649,\"./cross_trace_calc\":651,\"./defaults\":652,\"./event_data\":653,\"./hover\":655,\"./layout_attributes\":657,\"./layout_defaults\":658,\"./plot\":659,\"./select\":660,\"./style\":662}],657:[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\"}}},{}],658:[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=s(\"barmode\"),p=0;p0}function S(t){return\"auto\"===t?0:t}function E(t,e){var r=Math.PI/180*e,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:t.width*i+t.height*n,y:t.width*n+t.height*i}}function L(t,e,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,c=a.anchor||\"end\",u=\"end\"===c,f=\"start\"===c,h=((a.leftToRight||0)+1)/2,p=1-h,d=i.width,g=i.height,m=Math.abs(e-t),v=Math.abs(n-r),y=m>2*_&&v>2*_?_:0;m-=2*y,v-=2*y;var x=S(l);\"auto\"!==l||d<=m&&g<=v||!(d>m||g>v)||(d>v||g>m)&&d.01?q:function(t,e,r){return r&&t===e?t:Math.abs(t-e)>=2?q(t):t>e?Math.ceil(t):Math.floor(t)};B=G(B,N,D),N=G(N,B,D),j=G(j,U,!D),U=G(U,j,!D)}var Y=A(a.ensureSingle(I,\"path\"),P,m,v);if(Y.style(\"vector-effect\",\"non-scaling-stroke\").attr(\"d\",isNaN((N-B)*(U-j))||V&&t._context.staticPlot?\"M0,0Z\":\"M\"+B+\",\"+j+\"V\"+U+\"H\"+N+\"V\"+j+\"Z\").call(l.setClipUrl,e.layerClipId,t),!P.uniformtext.mode&&R){var W=l.makePointStyleFns(f);l.singlePointStyle(c,Y,f,W,t)}!function(t,e,r,n,i,s,c,f,p,m,v){var w,T=e.xaxis,M=e.yaxis,C=t._fullLayout;function P(e,r,n){return a.ensureSingle(e,\"text\").text(r).attr({class:\"bartext bartext-\"+w,\"text-anchor\":\"middle\",\"data-notex\":1}).call(l.font,n).call(o.convertToTspans,t)}var I=n[0].trace,O=\"h\"===I.orientation,z=function(t,e,r,n,i){var o,s=e[0].trace;o=s.texttemplate?function(t,e,r,n,i){var o=e[0].trace,s=a.castOption(o,r,\"texttemplate\");if(!s)return\"\";var l,c,f,h,p=\"histogram\"===o.type,d=\"waterfall\"===o.type,g=\"funnel\"===o.type,m=\"h\"===o.orientation;m?(l=\"y\",c=i,f=\"x\",h=n):(l=\"x\",c=n,f=\"y\",h=i);function v(t){return u(h,h.c2l(t),!0).text}var y=e[r],x={};x.label=y.p,x.labelLabel=x[l+\"Label\"]=(_=y.p,u(c,c.c2l(_),!0).text);var _;var w=a.castOption(o,y.i,\"text\");(0===w||w)&&(x.text=w);x.value=y.s,x.valueLabel=x[f+\"Label\"]=v(y.s);var T={};b(T,o,y.i),(p||void 0===T.x)&&(T.x=m?x.value:x.label);(p||void 0===T.y)&&(T.y=m?x.label:x.value);(p||void 0===T.xLabel)&&(T.xLabel=m?x.valueLabel:x.labelLabel);(p||void 0===T.yLabel)&&(T.yLabel=m?x.labelLabel:x.valueLabel);d&&(x.delta=+y.rawS||y.s,x.deltaLabel=v(x.delta),x.final=y.v,x.finalLabel=v(x.final),x.initial=x.final-x.delta,x.initialLabel=v(x.initial));g&&(x.value=y.s,x.valueLabel=v(x.value),x.percentInitial=y.begR,x.percentInitialLabel=a.formatPercent(y.begR),x.percentPrevious=y.difR,x.percentPreviousLabel=a.formatPercent(y.difR),x.percentTotal=y.sumR,x.percenTotalLabel=a.formatPercent(y.sumR));var k=a.castOption(o,y.i,\"customdata\");k&&(x.customdata=k);return a.texttemplateString(s,x,t._d3locale,T,x,o._meta||{})}(t,e,r,n,i):s.textinfo?function(t,e,r,n){var i=t[0].trace,o=\"h\"===i.orientation,s=\"waterfall\"===i.type,l=\"funnel\"===i.type;function c(t){return u(o?r:n,+t,!0).text}var f,h=i.textinfo,p=t[e],d=h.split(\"+\"),g=[],m=function(t){return-1!==d.indexOf(t)};m(\"label\")&&g.push((v=t[e].p,u(o?n:r,v,!0).text));var v;m(\"text\")&&(0===(f=a.castOption(i,p.i,\"text\"))||f)&&g.push(f);if(s){var y=+p.rawS||p.s,x=p.v,b=x-y;m(\"initial\")&&g.push(c(b)),m(\"delta\")&&g.push(c(y)),m(\"final\")&&g.push(c(x))}if(l){m(\"value\")&&g.push(c(p.s));var _=0;m(\"percent initial\")&&_++,m(\"percent previous\")&&_++,m(\"percent total\")&&_++;var w=_>1;m(\"percent initial\")&&(f=a.formatPercent(p.begR),w&&(f+=\" of initial\"),g.push(f)),m(\"percent previous\")&&(f=a.formatPercent(p.difR),w&&(f+=\" of previous\"),g.push(f)),m(\"percent total\")&&(f=a.formatPercent(p.sumR),w&&(f+=\" of total\"),g.push(f))}return g.join(\"
\")}(e,r,n,i):g.getValue(s.text,r);return g.coerceString(y,o)}(C,n,i,T,M);w=function(t,e){var r=g.getValue(t.textposition,e);return g.coerceEnumerated(x,r)}(I,i);var D=\"stack\"===m.mode||\"relative\"===m.mode,R=n[i],F=!D||R._outmost;if(!z||\"none\"===w||(R.isBlank||s===c||f===p)&&(\"auto\"===w||\"inside\"===w))return void r.select(\"text\").remove();var B=C.font,N=d.getBarColor(n[i],I),j=d.getInsideTextFont(I,i,B,N),U=d.getOutsideTextFont(I,i,B),V=r.datum();O?\"log\"===T.type&&V.s0<=0&&(s=T.range[0]=G*(Z/Y):Z>=Y*(X/G);G>0&&Y>0&&(J||K||Q)?w=\"inside\":(w=\"outside\",H.remove(),H=null)}else w=\"inside\";if(!H){W=a.ensureUniformFontSize(t,\"outside\"===w?U:j);var $=(H=P(r,z,W)).attr(\"transform\");if(H.attr(\"transform\",\"\"),q=l.bBox(H.node()),G=q.width,Y=q.height,H.attr(\"transform\",$),G<=0||Y<=0)return void H.remove()}var tt,et,rt=I.textangle;\"outside\"===w?(et=\"both\"===I.constraintext||\"outside\"===I.constraintext,tt=function(t,e,r,n,i,a){var o,s=!!a.isHorizontal,l=!!a.constrained,c=a.angle||0,u=i.width,f=i.height,h=Math.abs(e-t),p=Math.abs(n-r);o=s?p>2*_?_:0:h>2*_?_:0;var d=1;l&&(d=s?Math.min(1,p/f):Math.min(1,h/u));var g=S(c),m=E(i,g),v=(s?m.x:m.y)/2,y=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=(t+e)/2,w=(r+n)/2,T=0,A=0,M=s?k(e,t):k(r,n);s?(b=e-M*o,T=M*v):(w=n+M*o,A=-M*v);return{textX:y,textY:x,targetX:b,targetY:w,anchorX:T,anchorY:A,scale:d,rotate:g}}(s,c,f,p,q,{isHorizontal:O,constrained:et,angle:rt})):(et=\"both\"===I.constraintext||\"inside\"===I.constraintext,tt=L(s,c,f,p,q,{isHorizontal:O,constrained:et,angle:rt,anchor:I.insidetextanchor}));tt.fontSize=W.size,h(\"histogram\"===I.type?\"bar\":I.type,tt,C),R.transform=tt,A(H,C,m,v).attr(\"transform\",a.getTextTransform(tt))}(t,e,I,r,p,B,N,j,U,m,v),e.layerClipId&&l.hideOutsideRangePoint(c,I.select(\"text\"),w,C,f.xcalendar,f.ycalendar)}));var j=!1===f.cliponaxis;l.setClipUrl(c,j?null:e.layerClipId,t)}));c.getComponentMethod(\"errorbars\",\"plot\")(t,I,e,m)},toMoveInsideBar:L}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../components/fx/helpers\":402,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"./attributes\":648,\"./constants\":650,\"./helpers\":654,\"./style\":662,\"./uniform_text\":664,\"@plotly/d3\":58,\"fast-isnumeric\":190}],660:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){var a=e.c2p(n?t.s0:t.p0,!0),o=e.c2p(n?t.s1:t.p1,!0),s=r.c2p(n?t.p0:t.s0,!0),l=r.c2p(n?t.p1:t.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}e.exports=function(t,e){var r,i=t.cd,a=t.xaxis,o=t.yaxis,s=i[0].trace,l=\"funnel\"===s.type,c=\"h\"===s.orientation,u=[];if(!1===e)for(r=0;r1||0===i.bargap&&0===i.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr(\"shape-rendering\",\"crispEdges\")})),e.selectAll(\"g.points\").each((function(e){d(n.select(this),e[0].trace,t)})),s.getComponentMethod(\"errorbars\",\"style\")(e)},styleTextPoints:g,styleOnSelect:function(t,e,r){var 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.ensureUniformFontSize(r,m(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):(d(r,i,t),s.getComponentMethod(\"errorbars\",\"style\")(r))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:_,resizeText:l}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../lib\":503,\"../../registry\":638,\"./attributes\":648,\"./helpers\":654,\"./uniform_text\":664,\"@plotly/d3\":58}],663:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/helpers\").hasColorscale,a=t(\"../../components/colorscale/defaults\"),o=t(\"../../lib\").coercePattern;e.exports=function(t,e,r,s,l){var c=r(\"marker.color\",s),u=i(t,\"marker\");u&&a(t,e,l,r,{prefix:\"marker.\",cLetter:\"c\"}),r(\"marker.line.color\",n.defaultLine),i(t,\"marker.line\")&&a(t,e,l,r,{prefix:\"marker.line.\",cLetter:\"c\"}),r(\"marker.line.width\"),r(\"marker.opacity\"),o(r,\"marker.pattern\",c,u),r(\"selected.marker.color\"),r(\"unselected.marker.color\")}},{\"../../components/color\":366,\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503}],664:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\");function a(t){return\"_\"+t+\"Text_minsize\"}e.exports={recordMinTextSize:function(t,e,r){if(r.uniformtext.mode){var n=a(t),i=r.uniformtext.minsize,o=e.scale*e.fontSize;e.hide=o g.point\"}e.selectAll(s).each((function(t){var e=t.transform;e&&(e.scale=l&&e.hide?0:o/e.fontSize,n.select(this).select(\"text\").attr(\"transform\",i.getTextTransform(e)))}))}}}},{\"../../lib\":503,\"@plotly/d3\":58}],665:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../lib/extend\").extendFlat,a=t(\"../scatterpolar/attributes\"),o=t(\"../bar/attributes\");e.exports={r:a.r,theta:a.theta,r0:a.r0,dr:a.dr,theta0:a.theta0,dtheta:a.dtheta,thetaunit:a.thetaunit,base:i({},o.base,{}),offset:i({},o.offset,{}),width:i({},o.width,{}),text:i({},o.text,{}),hovertext:i({},o.hovertext,{}),marker:o.marker,hoverinfo:a.hoverinfo,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{\"../../lib/extend\":493,\"../../plots/template_attributes\":633,\"../bar/attributes\":648,\"../scatterpolar/attributes\":1e3}],666:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/helpers\").hasColorscale,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,m=0;mh.range[1]&&(x+=Math.PI);if(n.getClosest(c,(function(t){return g(y,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?m+Math.min(1,Math.abs(t.thetag1-t.thetag0)/v)-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.hovertemplate=u.hovertemplate,t.color=a(u,b),t.xLabelVal=t.yLabelVal=void 0,b.s<0&&(t.idealAlign=\"left\"),[t]}}},{\"../../components/fx\":406,\"../../lib\":503,\"../../plots/polar/helpers\":621,\"../bar/hover\":655,\"../scatterpolar/hover\":1004}],669:[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\"),formatLabels:t(\"../scatterpolar/format_labels\"),style:t(\"../bar/style\").style,styleOnSelect:t(\"../bar/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../bar/select\"),meta:{}}},{\"../../plots/polar\":622,\"../bar/select\":660,\"../bar/style\":662,\"../scatter/marker_colorbar\":944,\"../scatterpolar/format_labels\":1003,\"./attributes\":665,\"./calc\":666,\"./defaults\":667,\"./hover\":668,\"./layout_attributes\":670,\"./layout_defaults\":671,\"./plot\":672}],670:[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\"}}},{}],671:[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;l0?(c=o,u=l):(c=l,u=o);var f=[s.findEnclosingVertexAngles(c,t.vangles)[0],(c+u)/2,s.findEnclosingVertexAngles(u,t.vangles)[1]];return s.pathPolygonAnnulus(n,i,c,u,f,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(){var r=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),m=(p+d)/2;t.ct=[l.c2p(g*Math.cos(m)),c.c2p(g*Math.sin(m))],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,t)}))}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../plots/polar/helpers\":621,\"@plotly/d3\":58,\"fast-isnumeric\":190}],673:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../bar/attributes\"),a=t(\"../../components/color/attributes\"),o=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../lib/extend\").extendFlat,c=n.marker,u=c.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\"},dx:{valType:\"number\",editType:\"calc\"},dy:{valType:\"number\",editType:\"calc\"},xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,xhoverformat:o(\"x\"),yhoverformat:o(\"y\"),name:{valType:\"string\",editType:\"calc+clearAxisTypes\"},q1:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},median:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},q3:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},lowerfence:{valType:\"data_array\",editType:\"calc\"},upperfence:{valType:\"data_array\",editType:\"calc\"},notched:{valType:\"boolean\",editType:\"calc\"},notchwidth:{valType:\"number\",min:0,max:.5,dflt:.25,editType:\"calc\"},notchspan:{valType:\"data_array\",editType:\"calc\"},boxpoints:{valType:\"enumerated\",values:[\"all\",\"outliers\",\"suspectedoutliers\",!1],editType:\"calc\"},jitter:{valType:\"number\",min:0,max:1,editType:\"calc\"},pointpos:{valType:\"number\",min:-2,max:2,editType:\"calc\"},boxmean:{valType:\"enumerated\",values:[!0,\"sd\",!1],editType:\"calc\"},mean:{valType:\"data_array\",editType:\"calc\"},sd:{valType:\"data_array\",editType:\"calc\"},orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc+clearAxisTypes\"},quartilemethod:{valType:\"enumerated\",values:[\"linear\",\"exclusive\",\"inclusive\"],dflt:\"linear\",editType:\"calc\"},width:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},marker:{outliercolor:{valType:\"color\",dflt:\"rgba(0, 0, 0, 0)\",editType:\"style\"},symbol:l({},c.symbol,{arrayOk:!1,editType:\"plot\"}),opacity:l({},c.opacity,{arrayOk:!1,dflt:1,editType:\"style\"}),size:l({},c.size,{arrayOk:!1,editType:\"calc\"}),color:l({},c.color,{arrayOk:!1,editType:\"style\"}),line:{color:l({},u.color,{arrayOk:!1,dflt:a.defaultLine,editType:\"style\"}),width:l({},u.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,whiskerwidth:{valType:\"number\",min:0,max:1,dflt:.5,editType:\"calc\"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:n.selected.marker,editType:\"style\"},unselected:{marker:n.unselected.marker,editType:\"style\"},text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),hovertemplate:s({}),hoveron:{valType:\"flaglist\",flags:[\"boxes\",\"points\"],dflt:\"boxes+points\",editType:\"style\"}}},{\"../../components/color/attributes\":365,\"../../lib/extend\":493,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../bar/attributes\":648,\"../scatter/attributes\":926}],674:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../plots/cartesian/align_period\"),o=t(\"../../lib\"),s=t(\"../../constants/numerical\").BADNUM,l=o._;e.exports=function(t,e){var r,c,y,x,b,_,w,T=t._fullLayout,k=i.getFromId(t,e.xaxis||\"x\"),A=i.getFromId(t,e.yaxis||\"y\"),M=[],S=\"violin\"===e.type?\"_numViolins\":\"_numBoxes\";\"h\"===e.orientation?(y=k,x=\"x\",b=A,_=\"y\",w=!!e.yperiodalignment):(y=A,x=\"y\",b=k,_=\"x\",w=!!e.xperiodalignment);var E,L,C,P,I,O,z=function(t,e,r,i){var s,l=e+\"0\"in t,c=\"d\"+e in t;if(e in t||l&&c){var u=r.makeCalcdata(t,e);return[a(t,r,e,u).vals,u]}s=l?t[e+\"0\"]:\"name\"in t&&(\"category\"===r.type||n(t.name)&&-1!==[\"linear\",\"log\"].indexOf(r.type)||o.isDateTime(t.name)&&\"date\"===r.type)?t.name:i;for(var f=\"multicategory\"===r.type?r.r2c_just_indices(s):r.d2c(s,0,t[e+\"calendar\"]),h=t._length,p=new Array(h),d=0;dE.uf};if(e._hasPreCompStats){var U=e[x],V=function(t){return y.d2c((e[t]||[])[r])},H=1/0,q=-1/0;for(r=0;r=E.q1&&E.q3>=E.med){var Y=V(\"lowerfence\");E.lf=Y!==s&&Y<=E.q1?Y:p(E,C,P);var W=V(\"upperfence\");E.uf=W!==s&&W>=E.q3?W:d(E,C,P);var X=V(\"mean\");E.mean=X!==s?X:P?o.mean(C,P):(E.q1+E.q3)/2;var Z=V(\"sd\");E.sd=X!==s&&Z>=0?Z:P?o.stdev(C,P,E.mean):E.q3-E.q1,E.lo=g(E),E.uo=m(E);var J=V(\"notchspan\");J=J!==s&&J>0?J:v(E,P),E.ln=E.med-J,E.un=E.med+J;var K=E.lf,Q=E.uf;e.boxpoints&&C.length&&(K=Math.min(K,C[0]),Q=Math.max(Q,C[P-1])),e.notched&&(K=Math.min(K,E.ln),Q=Math.max(Q,E.un)),E.min=K,E.max=Q}else{var $;o.warn([\"Invalid input - make sure that q1 <= median <= q3\",\"q1 = \"+E.q1,\"median = \"+E.med,\"q3 = \"+E.q3].join(\"\\n\")),$=E.med!==s?E.med:E.q1!==s?E.q3!==s?(E.q1+E.q3)/2:E.q1:E.q3!==s?E.q3:0,E.med=$,E.q1=E.q3=$,E.lf=E.uf=$,E.mean=E.sd=$,E.ln=E.un=$,E.min=E.max=$}H=Math.min(H,E.min),q=Math.max(q,E.max),E.pts2=L.filter(j),M.push(E)}}e._extremes[y._id]=i.findExtremes(y,[H,q],{padded:!0})}else{var tt=y.makeCalcdata(e,x),et=function(t,e){for(var r=t.length,n=new Array(r+1),i=0;i=0&&it0){var ut,ft;if((E={}).pos=E[_]=B[r],L=E.pts=nt[r].sort(f),P=(C=E[x]=L.map(h)).length,E.min=C[0],E.max=C[P-1],E.mean=o.mean(C,P),E.sd=o.stdev(C,P,E.mean),E.med=o.interp(C,.5),P%2&&(lt||ct))lt?(ut=C.slice(0,P/2),ft=C.slice(P/2+1)):ct&&(ut=C.slice(0,P/2+1),ft=C.slice(P/2)),E.q1=o.interp(ut,.5),E.q3=o.interp(ft,.5);else E.q1=o.interp(C,.25),E.q3=o.interp(C,.75);E.lf=p(E,C,P),E.uf=d(E,C,P),E.lo=g(E),E.uo=m(E);var ht=v(E,P);E.ln=E.med-ht,E.un=E.med+ht,at=Math.min(at,E.ln),ot=Math.max(ot,E.un),E.pts2=L.filter(j),M.push(E)}e._extremes[y._id]=i.findExtremes(y,e.notched?tt.concat([at,ot]):tt,{padded:!0})}return function(t,e){if(o.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r0?(M[0].t={num:T[S],dPos:N,posLetter:_,valLetter:x,labels:{med:l(t,\"median:\"),min:l(t,\"min:\"),q1:l(t,\"q1:\"),q3:l(t,\"q3:\"),max:l(t,\"max:\"),mean:\"sd\"===e.boxmean?l(t,\"mean \\xb1 \\u03c3:\"):l(t,\"mean:\"),lf:l(t,\"lower fence:\"),uf:l(t,\"upper fence:\")}},T[S]++,M):[{t:{empty:!0}}]};var c={text:\"tx\",hovertext:\"htx\"};function u(t,e,r){for(var n in c)o.isArrayOrTypedArray(e[n])&&(Array.isArray(r)?o.isArrayOrTypedArray(e[n][r[0]])&&(t[c[n]]=e[n][r[0]][r[1]]):t[c[n]]=e[n][r])}function f(t,e){return t.v-e.v}function h(t){return t.v}function p(t,e,r){return 0===r?t.q1:Math.min(t.q1,e[Math.min(o.findBin(2.5*t.q1-1.5*t.q3,e,!0)+1,r-1)])}function d(t,e,r){return 0===r?t.q3:Math.max(t.q3,e[Math.max(o.findBin(2.5*t.q3-1.5*t.q1,e),0)])}function g(t){return 4*t.q1-3*t.q3}function m(t){return 4*t.q3-3*t.q1}function v(t,e){return 0===e?0:1.57*(t.q3-t.q1)/Math.sqrt(e)}},{\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/align_period\":551,\"../../plots/cartesian/axes\":554,\"fast-isnumeric\":190}],675:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/constraints\").getAxisGroup,o=[\"v\",\"h\"];function s(t,e,r,o){var s,l,c,u=e.calcdata,f=e._fullLayout,h=o._id,p=h.charAt(0),d=[],g=0;for(s=0;s1,b=1-f[t+\"gap\"],_=1-f[t+\"groupgap\"];for(s=0;s0){var q=E.pointpos,G=E.jitter,Y=E.marker.size/2,W=0;q+G>=0&&((W=V*(q+G))>M?(H=!0,j=Y,B=W):W>R&&(j=Y,B=M)),W<=M&&(B=M);var X=0;q-G<=0&&((X=-V*(q-G))>S?(H=!0,U=Y,N=X):X>F&&(U=Y,N=S)),X<=S&&(N=S)}else B=M,N=S;var Z=new Array(c.length);for(l=0;l0?(m=\"v\",v=x>0?Math.min(_,b):Math.min(b)):x>0?(m=\"h\",v=Math.min(_)):v=0;if(v){e._length=v;var S=r(\"orientation\",m);e._hasPreCompStats?\"v\"===S&&0===x?(r(\"x0\",0),r(\"dx\",1)):\"h\"===S&&0===y&&(r(\"y0\",0),r(\"dy\",1)):\"v\"===S&&0===x?r(\"x0\"):\"h\"===S&&0===y&&r(\"y0\"),i.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\"],a)}else e.visible=!1}function f(t,e,r,i){var a=i.prefix,o=n.coerce2(t,e,c,\"marker.outliercolor\"),s=r(\"marker.line.outliercolor\"),l=\"outliers\";e._hasPreCompStats?l=\"all\":(o||s)&&(l=\"suspectedoutliers\");var u=r(a+\"points\",l);u?(r(\"jitter\",\"all\"===u?.3:0),r(\"pointpos\",\"all\"===u?-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\"===u&&(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\"),r(\"hovertext\")):delete e.marker;var f=r(\"hoveron\");\"all\"!==f&&-1===f.indexOf(\"points\")||r(\"hovertemplate\"),n.coerceSelectionMarkerOpacity(e,r)}e.exports={supplyDefaults:function(t,e,r,i){function s(r,i){return n.coerce(t,e,c,r,i)}if(u(t,e,s,i),!1!==e.visible){o(t,e,i,s),s(\"xhoverformat\"),s(\"yhoverformat\");var l=e._hasPreCompStats;l&&(s(\"lowerfence\"),s(\"upperfence\")),s(\"line.color\",(t.marker||{}).color||r),s(\"line.width\"),s(\"fillcolor\",a.addOpacity(e.line.color,.5));var h=!1;if(l){var p=s(\"mean\"),d=s(\"sd\");p&&p.length&&(h=!0,d&&d.length&&(h=\"sd\"))}s(\"boxmean\",h),s(\"whiskerwidth\"),s(\"width\"),s(\"quartilemethod\");var g=!1;if(l){var m=s(\"notchspan\");m&&m.length&&(g=!0)}else n.validate(t.notchwidth,c.notchwidth)&&(g=!0);s(\"notched\",g)&&s(\"notchwidth\"),f(t,e,s,{prefix:\"box\"})}},crossTraceDefaults:function(t,e){var r,i;function a(t){return n.coerce(i._input,i,c,t)}for(var o=0;ot.lo&&(x.so=!0)}return a}));h.enter().append(\"path\").classed(\"point\",!0),h.exit().remove(),h.call(a.translatePoints,o,s)}function l(t,e,r,a){var o,s,l=e.val,c=e.pos,u=!!c.rangebreaks,f=a.bPos,h=a.bPosPxOffset||0,p=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var d=t.selectAll(\"path.mean\").data(\"box\"===r.type&&r.boxmean||\"violin\"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);d.enter().append(\"path\").attr(\"class\",\"mean\").style({fill:\"none\",\"vector-effect\":\"non-scaling-stroke\"}),d.exit().remove(),d.each((function(t){var e=c.c2l(t.pos+f,!0),i=c.l2p(e-o)+h,a=c.l2p(e+s)+h,d=u?(i+a)/2:c.l2p(e)+h,g=l.c2p(t.mean,!0),m=l.c2p(t.mean-t.sd,!0),v=l.c2p(t.mean+t.sd,!0);\"h\"===r.orientation?n.select(this).attr(\"d\",\"M\"+g+\",\"+i+\"V\"+a+(\"sd\"===p?\"m0,0L\"+m+\",\"+d+\"L\"+g+\",\"+i+\"L\"+v+\",\"+d+\"Z\":\"\")):n.select(this).attr(\"d\",\"M\"+i+\",\"+g+\"H\"+a+(\"sd\"===p?\"m0,0L\"+d+\",\"+m+\"L\"+i+\",\"+g+\"L\"+d+\",\"+v+\"Z\":\"\"))}))}e.exports={plot:function(t,e,r,a){var c=e.xaxis,u=e.yaxis;i.makeTraceGroups(a,r,\"trace boxes\").each((function(t){var e,r,i=n.select(this),a=t[0],f=a.t,h=a.trace;(f.wdPos=f.bdPos*h.whiskerwidth,!0!==h.visible||f.empty)?i.remove():(\"h\"===h.orientation?(e=u,r=c):(e=c,r=u),o(i,{pos:e,val:r},h,f),s(i,{x:c,y:u},h,f),l(i,{pos:e,val:r},h,f))}))},plotBoxAndWhiskers:o,plotPoints:s,plotBoxMean:l}},{\"../../components/drawing\":388,\"../../lib\":503,\"@plotly/d3\":58}],683:[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=10)return null;for(var i=1/0,a=-1/0,o=e.length,s=0;s0?Math.floor:Math.ceil,I=L>0?Math.ceil:Math.floor,O=L>0?Math.min:Math.max,z=L>0?Math.max:Math.min,D=P(S+C),R=I(E-C),F=[[f=M(S)]];for(a=D;a*L=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}},{}],697:[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,m,v,y,x=t[\"_\"+e],b=t[e+\"axis\"],_=b._gridlines=[],w=b._minorgridlines=[],T=b._boundarylines=[],k=t[\"_\"+r],A=t[r+\"axis\"];\"array\"===b.tickmode&&(b.tickvals=x.slice());var M=t._xctrl,S=t._yctrl,E=M[0].length,L=M.length,C=t._a.length,P=t._b.length;n.prepTicks(b),\"array\"===b.tickmode&&delete b.tickvals;var I=b.smoothing?3:1;function O(n){var i,a,o,s,l,c,u,f,p,d,g,m,v=[],y=[],x={};if(\"b\"===e)for(a=t.b2j(n),o=Math.floor(Math.max(0,Math.min(P-2,a))),s=a-o,x.length=P,x.crossLength=C,x.xy=function(e){return t.evalxy([],e,a)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},i=0;i0&&(p=t.dxydi([],i-1,o,0,s),v.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),d=t.dxydi([],i-1,o,1,s),v.push(f[0]-d[0]/3),y.push(f[1]-d[1]/3)),v.push(f[0]),y.push(f[1]),l=f;else for(i=t.a2i(n),c=Math.floor(Math.max(0,Math.min(C-2,i))),u=i-c,x.length=C,x.crossLength=P,x.xy=function(e){return t.evalxy([],i,e)},x.dxy=function(e,r){return t.dxydj([],c,e,u,r)},a=0;a0&&(g=t.dxydj([],c,a-1,u,0),v.push(l[0]+g[0]/3),y.push(l[1]+g[1]/3),m=t.dxydj([],c,a-1,u,1),v.push(f[0]-m[0]/3),y.push(f[1]-m[1]/3)),v.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=v,x.y=y,x.smoothing=A.smoothing,x}function z(n){var i,a,o,s,l,c=[],u=[],f={};if(f.length=x.length,f.crossLength=k.length,\"b\"===e)for(o=Math.max(0,Math.min(P-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;ix.length-1||_.push(i(z(o),{color:b.gridcolor,width:b.gridwidth}));for(h=u;hx.length-1||g<0||g>x.length-1))for(m=x[s],v=x[g],a=0;ax[x.length-1]||w.push(i(O(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&T.push(i(z(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(z(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(O(p),{color:b.gridcolor,width:b.gridwidth}));for(h=u-1;hx[x.length-1]||w.push(i(O(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&T.push(i(O(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(O(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{\"../../lib/extend\":493,\"../../plots/cartesian/axes\":554}],698:[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;re.length&&(t=t.slice(0,e.length)):t=[],i=0;i90&&(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(n,e,r),offsetMultplier:c}}},{}],712:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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=c.strRotate,f=c.strTranslate,h=t(\"../../constants/alignment\");function p(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 d(t,e,r,a,o,c,h,p){var d=c.selectAll(\"text.\"+p).data(h);d.enter().append(\"text\").classed(p,!0);var g=0,m={};return d.each((function(o,c){var h;if(\"auto\"===o.axis.tickangle)h=s(a,e,r,o.xy,o.dxy);else{var p=(o.axis.tickangle+180)*Math.PI/180;h=s(a,e,r,o.xy,[Math.cos(p),Math.sin(p)])}c||(m={angle:h.angle,flip:h.flip});var d=(o.endAnchor?-1:1)*h.flip,v=n.select(this).attr({\"text-anchor\":d>0?\"start\":\"end\",\"data-notex\":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,t),y=i.bBox(this);v.attr(\"transform\",f(h.p[0],h.p[1])+u(h.angle)+f(o.axis.labelpadding*d,.3*y.height)),g=Math.max(g,y.width+o.axis.labelpadding)})),d.exit().remove(),m.maxExtent=g,m}e.exports=function(t,e,r,i){var l=e.xaxis,u=e.yaxis,f=t._fullLayout._clips;c.makeTraceGroups(i,r,\"trace\").each((function(e){var r=n.select(this),i=e[0],h=i.trace,g=h.aaxis,m=h.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\",h.opacity),p(l,u,x,g,\"a\",g._gridlines),p(l,u,x,m,\"b\",m._gridlines),p(l,u,y,g,\"a\",g._minorgridlines),p(l,u,y,m,\"b\",m._minorgridlines),p(l,u,b,g,\"a-boundary\",g._boundarylines),p(l,u,b,m,\"b-boundary\",m._boundarylines);var w=d(t,l,u,h,i,_,g._labels,\"a-label\"),T=d(t,l,u,h,i,_,m._labels,\"b-label\");!function(t,e,r,n,i,a,o,l){var u,f,h,p,d=c.aggNums(Math.min,null,r.a),g=c.aggNums(Math.max,null,r.a),m=c.aggNums(Math.min,null,r.b),y=c.aggNums(Math.max,null,r.b);u=.5*(d+g),f=m,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)));v(t,e,r,n,h,p,r.aaxis,i,a,o,\"a-title\"),u=d,f=.5*(m+y),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)));v(t,e,r,n,h,p,r.baxis,i,a,l,\"b-title\")}(t,_,h,i,l,u,w,T),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;f90&&y<270,b=n.select(this);b.text(h.title.text).call(l.convertToTspans,t),x&&(_=(-l.lineCount(b)+m)*g*a-_),b.attr(\"transform\",f(e.p[0],e.p[1])+u(e.angle)+f(0,_)).attr(\"text-anchor\",\"middle\").call(i.font,h.title.font)})),b.exit().remove()}},{\"../../components/drawing\":388,\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"./makepath\":709,\"./map_1d_array\":710,\"./orient_text\":711,\"@plotly/d3\":58}],713:[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],m=r[u-1],v=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=v*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;p-=x,d+=x,g-=b,m+=b,t.isVisible=function(t,e){return t>p&&tg&&ed||em},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&&(ne[c-1]|ir[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,m=0,v=[];ne[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)))),ir[u-1]?(p=u-2,d=1,m=(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(v,f,p,h,d),l[0]+=v[0]*g,l[1]+=v[1]*g),m&&(t.dxydj(v,f,p,h,d),l[0]+=v[0]*m,l[1]+=v[1]*m)}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=v*(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\":523,\"./compute_control_points\":701,\"./constants\":702,\"./create_i_derivative_evaluator\":703,\"./create_j_derivative_evaluator\":704,\"./create_spline_evaluator\":705}],714:[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),e0&&void 0!==(n=t[r-1][e])&&(a++,i+=n),r0&&a0&&i1e-5);return n.log(\"Smoother converged to\",k,\"after\",A,\"iterations\"),t}},{\"../../lib\":503}],715:[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\":503}],716:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../scattergeo/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../plots/attributes\"),s=t(\"../../components/color/attributes\").defaultLine,l=t(\"../../lib/extend\").extendFlat,c=i.marker.line;e.exports=l({locations:{valType:\"data_array\",editType:\"calc\"},locationmode:i.locationmode,z:{valType:\"data_array\",editType:\"calc\"},geojson:l({},i.geojson,{}),featureidkey:i.featureidkey,text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),marker:{line:{color:l({},c.color,{dflt:s}),width:l({},c.width,{dflt:1}),editType:\"calc\"},opacity:{valType:\"number\",arrayOk:!0,min:0,max:1,dflt:1,editType:\"style\"},editType:\"calc\"},selected:{marker:{opacity:i.selected.marker.opacity,editType:\"plot\"},editType:\"plot\"},unselected:{marker:{opacity:i.unselected.marker.opacity,editType:\"plot\"},editType:\"plot\"},hoverinfo:l({},o.hoverinfo,{editType:\"calc\",flags:[\"location\",\"z\",\"text\",\"name\"]}),hovertemplate:n(),showlegend:l({},o.showlegend,{dflt:!1})},a(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))},{\"../../components/color/attributes\":365,\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/template_attributes\":633,\"../scattergeo/attributes\":968}],717:[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\");function l(t){return t&&\"string\"==typeof t}e.exports=function(t,e){var r,c=e._length,u=new Array(c);r=e.geojson?function(t){return l(t)||n(t)}:l;for(var f=0;f\")}(t,f,o),[t]}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"./attributes\":716}],721:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../heatmap/colorbar\"),calc:t(\"./calc\"),calcGeoJSON:t(\"./plot\").calcGeoJSON,plot:t(\"./plot\").plot,style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"choropleth\",basePlotModule:t(\"../../plots/geo\"),categories:[\"geo\",\"noOpacity\",\"showLegend\"],meta:{}}},{\"../../plots/geo\":589,\"../heatmap/colorbar\":795,\"./attributes\":716,\"./calc\":717,\"./defaults\":718,\"./event_data\":719,\"./hover\":720,\"./plot\":722,\"./select\":723,\"./style\":724}],722:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../lib/geo_location_utils\"),o=t(\"../../lib/topojson_utils\").getTopojsonFeatures,s=t(\"../../plots/cartesian/autorange\").findExtremes,l=t(\"./style\").style;e.exports={calcGeoJSON:function(t,e){for(var r=t[0].trace,n=e[r.geo],i=n._subplot,l=r.locationmode,c=r._length,u=\"geojson-id\"===l?a.extractTraceFeature(t):o(r,i.topojson),f=[],h=[],p=0;p=0;n--){var i=r[n].id;if(\"string\"==typeof i&&0===i.indexOf(\"water\"))for(var a=n+1;a=0;r--)t.removeLayer(e[r][1])},s.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new o(t,r.uid),a=i.sourceId,s=n(e),l=i.below=t.belowLookup[\"trace-\"+r.uid];return t.map.addSource(a,{type:\"geojson\",data:s.geojson}),i._addLayers(s,l),e[0].trace._glTrace=i,i}},{\"../../plots/mapbox/constants\":611,\"./convert\":726}],730:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../mesh3d/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,c={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\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:a({editType:\"calc\"},{keys:[\"norm\"]}),uhoverformat:i(\"u\",1),vhoverformat:i(\"v\",1),whoverformat:i(\"w\",1),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),showlegend:l({},s.showlegend,{dflt:!1})};l(c,n(\"\",{colorAttr:\"u/v/w norm\",showScaleDflt:!0,editTypeOverride:\"calc\"}));[\"opacity\",\"lightposition\",\"lighting\"].forEach((function(t){c[t]=o[t]})),c.hoverinfo=l({},s.hoverinfo,{editType:\"calc\",flags:[\"x\",\"y\",\"z\",\"u\",\"v\",\"w\",\"norm\",\"text\",\"name\"],dflt:\"x+y+z+norm+text+name\"}),c.transforms=void 0,e.exports=c},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../mesh3d/attributes\":867}],731:[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;co.level||o.starts.length&&a===o.level)}break;case\"constraint\":if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,l=n.y.length,c=-1/0,u=1/0;for(r=0;r\":p>c&&(n.prefixBoundary=!0);break;case\"<\":(pc||n.starts.length&&h===u)&&(n.prefixBoundary=!0);break;case\"][\":f=Math.min(p[0],p[1]),h=Math.max(p[0],p[1]),fc&&(n.prefixBoundary=!0)}}}},{}],738:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale\"),i=t(\"./make_color_map\"),a=t(\"./end_plus\");e.exports={min:\"zmin\",max:\"zmax\",calc:function(t,e,r){var o=e.contours,s=e.line,l=o.size||1,c=o.coloring,u=i(e,{isColorbar:!0});if(\"heatmap\"===c){var f=n.extractOpts(e);r._fillgradient=f.reversescale?n.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else\"fill\"===c&&(r._fillcolor=u);r._line={color:\"lines\"===c?u:s.color,width:!1!==o.showlines?s.width:0,dash:s.dash},r._levels={start:o.start,end:a(o),size:l}}}},{\"../../components/colorscale\":378,\"./end_plus\":746,\"./make_color_map\":751}],739:[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}}},{}],740:[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,m=r(\"contours.operation\");(g._operation=c[m],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),\"=\"===m?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\":366,\"../../constants/filter_ops\":475,\"./label_defaults\":750,\"fast-isnumeric\":190}],741:[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\":475,\"fast-isnumeric\":190}],742:[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\")}},{}],743:[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),starts:n.extendDeep([],t.starts)})}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;r1e3){n.warn(\"Too many contours, clipping at 1000\",t);break}return l}},{\"../../lib\":503,\"./constraint_mapping\":741,\"./end_plus\":746}],746:[function(t,e,r){\"use strict\";e.exports=function(t){return t.end+t.size/1e6}},{}],747:[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])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]}(f,r,e),p=[s(t,e,[-h[0],-h[1]])],d=t.z.length,g=t.z[0].length,m=e.slice(),v=h.slice();for(c=0;c<1e4;c++){if(f>20?(f=i.CHOOSESADDLE[f][(h[0]||h[1])<0?0:1],t.crossings[u]=i.SADDLEREMAINDER[f]):delete t.crossings[u],!(h=i.NEWDELTA[f])){n.log(\"Found bad marching index:\",f,e,t.level);break}p.push(s(t,e,h)),e[0]+=h[0],e[1]+=h[1],u=e.join(\",\"),a(p[p.length-1],p[p.length-2],o,l)&&p.pop();var y=h[0]&&(e[0]<0||e[0]>g-2)||h[1]&&(e[1]<0||e[1]>d-2);if(e[0]===m[0]&&e[1]===m[1]&&h[0]===v[0]&&h[1]===v[1]||r&&y)break;f=t.crossings[u]}1e4===c&&n.log(\"Infinite loop in contour?\");var x,b,_,w,T,k,A,M,S,E,L,C,P,I,O,z=a(p[0],p[p.length-1],o,l),D=0,R=.2*t.smoothing,F=[],B=0;for(c=1;c=B;c--)if((x=F[c])=B&&x+F[b]M&&S--,t.edgepaths[S]=L.concat(p,E));break}V||(t.edgepaths[M]=p.concat(E))}for(M=0;Mt?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=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;hn.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;b2*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.fontSize,a=e.width+i/3,o=Math.max(0,e.height-i/3),s=t.x,l=t.y,c=t.theta,u=Math.sin(c),f=Math.cos(c),h=function(t,e){return[s+t*f-e*u,l+t*u+e*f]},p=[h(-a/2,-o/2),h(-a/2,o/2),h(a/2,o/2),h(a/2,-o/2)];r.push({text:e.text,x:s,y:l,dy:e.dy,theta:c,level:e.level,width:a,height:o}),n.push(p)},r.drawLabels=function(t,e,r,a,o){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(s.convertToTspans,r)})),o){for(var c=\"\",u=0;ur.end&&(r.start=r.end=(r.start+r.end)/2),t._input.contours||(t._input.contours={}),i.extendFlat(t._input.contours,{start:r.start,end:r.end,size:r.size}),t._input.autocontour=!0}else if(\"constraint\"!==r.type){var c,u=r.start,f=r.end,h=t._input.contours;if(u>f&&(r.start=h.start=f,f=r.end=h.end=u,u=r.start),!(r.size>0))c=u===f?1:a(u,f,t.ncontours).dtick,h.size=r.size=c}}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554}],755:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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\":388,\"../heatmap/style\":805,\"./make_color_map\":751,\"@plotly/d3\":58}],756:[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\":376,\"./label_defaults\":750}],757:[function(t,e,r){\"use strict\";var n=t(\"../heatmap/attributes\"),i=t(\"../contour/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../lib/extend\").extendFlat,s=i.contours;e.exports=o({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,hovertext:n.hovertext,transpose:n.transpose,atype:n.xtype,btype:n.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:s.type,start:s.start,end:s.end,size:s.size,coloring:{valType:\"enumerated\",values:[\"fill\",\"lines\",\"none\"],dflt:\"fill\",editType:\"calc\"},showlines:s.showlines,showlabels:s.showlabels,labelfont:s.labelfont,labelformat:s.labelformat,operation:s.operation,value:s.value,editType:\"calc\",impliedEdits:{autocontour:!1}},line:{color:i.line.color,width:i.line.width,dash:i.line.dash,smoothing:i.line.smoothing,editType:\"plot\"},transforms:void 0},a(\"\",{cLetter:\"z\",autoColorDflt:!1}))},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../contour/attributes\":735,\"../heatmap/attributes\":792}],758:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\"),i=t(\"../../lib\"),a=t(\"../heatmap/convert_column_xyz\"),o=t(\"../heatmap/clean_2d_array\"),s=t(\"../heatmap/interp2d\"),l=t(\"../heatmap/find_empties\"),c=t(\"../heatmap/make_bound_array\"),u=t(\"./defaults\"),f=t(\"../carpet/lookup_carpetid\"),h=t(\"../contour/set_contours\");e.exports=function(t,e){var r=e._carpetTrace=f(t,e);if(r&&r.visible&&\"legendonly\"!==r.visible){if(!e.a||!e.b){var p=t.data[r.index],d=t.data[e.index];d.a||(d.a=p.a),d.b||(d.b=p.b),u(d,e,e._defaultColor,t._fullLayout)}var g=function(t,e){var r,u,f,h,p,d,g,m=e._carpetTrace,v=m.aaxis,y=m.baxis;v._minDtick=0,y._minDtick=0,i.isArray1D(e.z)&&a(e,v,y,\"a\",\"b\",[\"z\"]);r=e._a=e._a||e.a,h=e._b=e._b||e.b,r=r?v.makeCalcdata(e,\"_a\"):[],h=h?y.makeCalcdata(e,\"_b\"):[],u=e.a0||0,f=e.da||1,p=e.b0||0,d=e.db||1,g=e._z=o(e._z||e.z,e.transpose),e._emptypoints=l(g),s(g,e._emptypoints);var x=i.maxRowLength(g),b=\"scaled\"===e.xtype?\"\":r,_=c(e,b,u,f,x,v),w=\"scaled\"===e.ytype?\"\":h,T=c(e,w,p,d,g.length,y),k={a:_,b:T,z:g};\"levels\"===e.contours.type&&\"none\"!==e.contours.coloring&&n(t,e,{vals:g,containerStr:\"\",cLetter:\"z\"});return[k]}(t,e);return h(e,e._z),g}}},{\"../../components/colorscale/calc\":374,\"../../lib\":503,\"../carpet/lookup_carpetid\":708,\"../contour/set_contours\":754,\"../heatmap/clean_2d_array\":794,\"../heatmap/convert_column_xyz\":796,\"../heatmap/find_empties\":798,\"../heatmap/interp2d\":801,\"../heatmap/make_bound_array\":803,\"./defaults\":759}],759:[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\":503,\"../contour/constraint_defaults\":740,\"../contour/contours_defaults\":742,\"../contour/style_defaults\":756,\"../heatmap/xyz_defaults\":807,\"./attributes\":757}],760:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../contour/colorbar\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../contour/style\"),moduleType:\"trace\",name:\"contourcarpet\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"carpet\",\"contour\",\"symbols\",\"showLegend\",\"hasLines\",\"carpetDependent\",\"noHover\",\"noSortingByValue\"],meta:{}}},{\"../../plots/cartesian\":568,\"../contour/colorbar\":738,\"../contour/style\":755,\"./attributes\":757,\"./calc\":758,\"./defaults\":759,\"./plot\":761}],761:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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(\"../contour/empty_pathinfo\"),d=t(\"../contour/close_boundaries\"),g=t(\"../carpet/lookup_carpetid\"),m=t(\"../carpet/axis_aligned_line\");function v(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 y(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function x(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,b){var _=e.xaxis,w=e.yaxis;s.makeTraceGroups(b,r,\"contour\").each((function(r){var b=n.select(this),T=r[0],k=T.trace,A=k._carpetTrace=g(t,k),M=t.calcdata[A.index][0];if(A.visible&&\"legendonly\"!==A.visible){var S=T.a,E=T.b,L=k.contours,C=p(L,e,T),P=\"constraint\"===L.type,I=L._operation,O=P?\"=\"===I?\"lines\":\"fill\":L.coloring,z=[[S[0],E[E.length-1]],[S[S.length-1],E[E.length-1]],[S[S.length-1],E[0]],[S[0],E[0]]];l(C);var D=1e-8*(S[S.length-1]-S[0]),R=1e-8*(E[E.length-1]-E[0]);c(C,D,R);var F,B,N,j,U=C;\"constraint\"===L.type&&(U=h(C,I)),function(t,e){var r,n,i,a,o,s,l,c,u;for(r=0;r=0;j--)F=M.clipsegments[j],B=i([],F.x,_.c2p),N=i([],F.y,w.c2p),B.reverse(),N.reverse(),V.push(a(B,N,F.bicubic));var H=\"M\"+V.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=0&&(h=L,d=g):Math.abs(f[1]-h[1])=0&&(h=L,d=g):s.log(\"endpt to newendpt is not vert. or horz.\",f,h,L)}if(d>=0)break;y+=S(f,h),f=h}if(d===e.edgepaths.length){s.log(\"unclosed perimeter path\");break}u=d,(b=-1===x.indexOf(u))&&(u=x[0],y+=S(f,h)+\"Z\",f=null)}for(u=0;um&&(n.max=m);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/I),f.LABELMAX),a=0;a0?+p[u]:0),f.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:v},properties:y})}}var b=o.extractOpts(e),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],T=[\"interpolate\",[\"linear\"],[\"heatmap-density\"],0,a.opacity(w)<1?w:a.addOpacity(w,0)];for(u=1;u<_.length;u++)T.push(_[u][0],_[u][1]);var k=[\"interpolate\",[\"linear\"],[\"get\",\"z\"],b.min,0,b.max,1];return i.extendFlat(c.heatmap.paint,{\"heatmap-weight\":d?k:1/(b.max-b.min),\"heatmap-color\":T,\"heatmap-radius\":g?{type:\"identity\",property:\"r\"}:e.radius,\"heatmap-opacity\":e.opacity}),c.geojson={type:\"FeatureCollection\",features:f},c.heatmap.layout.visibility=\"visible\",c}},{\"../../components/color\":366,\"../../components/colorscale\":378,\"../../constants/numerical\":479,\"../../lib\":503,\"../../lib/geojson_utils\":497,\"fast-isnumeric\":190}],765:[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(\"lon\")||[],c=s(\"lat\")||[],u=Math.min(l.length,c.length);u?(e._length=u,s(\"z\"),s(\"radius\"),s(\"below\"),s(\"text\"),s(\"hovertext\"),s(\"hovertemplate\"),i(t,e,o,s,{prefix:\"\",cLetter:\"z\"})):e.visible=!1}},{\"../../components/colorscale/defaults\":376,\"../../lib\":503,\"./attributes\":762}],766:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.z=e.z,t}},{}],767:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../scattermapbox/hover\").hoverPoints,a=t(\"../scattermapbox/hover\").getExtraText;e.exports=function(t,e,r){var o=i(t,e,r);if(o){var s=o[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,\"z\"in u){var f=s.subplot.mockAxis;s.z=u.z,s.zLabel=n.tickText(f,f.c2l(u.z),\"hover\").text}return s.extraText=a(c,u,l[0].t.labels),[s]}}},{\"../../plots/cartesian/axes\":554,\"../scattermapbox/hover\":996}],768:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../heatmap/colorbar\"),formatLabels:t(\"../scattermapbox/format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),getBelow:function(t,e){for(var r=e.getMapLayers(),n=0;n=0;r--)t.removeLayer(e[r][1])},o.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new a(t,r.uid),o=i.sourceId,s=n(e),l=i.below=t.belowLookup[\"trace-\"+r.uid];return t.map.addSource(o,{type:\"geojson\",data:s.geojson}),i._addLayers(s,l),i}},{\"../../plots/mapbox/constants\":611,\"./convert\":764}],770:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){for(var r=0;r\"),l.color=function(t,e){var r=t.marker,i=e.mc||r.color,a=e.mlc||r.line.color,o=e.mlw||r.line.width;if(n(i))return i;if(n(a)&&o)return a}(u,h),[l]}}},{\"../../components/color\":366,\"../../lib\":503,\"../bar/hover\":655}],778:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\"),plot:t(\"./plot\"),style:t(\"./style\").style,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"../bar/select\"),moduleType:\"trace\",name:\"funnel\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"../bar/select\":660,\"./attributes\":771,\"./calc\":772,\"./cross_trace_calc\":774,\"./defaults\":775,\"./event_data\":776,\"./hover\":777,\"./layout_attributes\":779,\"./layout_defaults\":780,\"./plot\":781,\"./style\":782}],779:[function(t,e,r){\"use strict\";e.exports={funnelmode:{valType:\"enumerated\",values:[\"stack\",\"group\",\"overlay\"],dflt:\"stack\",editType:\"calc\"},funnelgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},funnelgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],780:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s path\").each((function(t){if(!t.isBlank){var e=s.marker;n.select(this).call(a.fill,t.mc||e.color).call(a.stroke,t.mlc||e.line.color).call(i.dashLine,e.line.dash,t.mlw||e.line.width).style(\"opacity\",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(\".regions\").each((function(){n.select(this).selectAll(\"path\").style(\"stroke-width\",0).call(a.fill,s.connector.fillcolor)})),r.selectAll(\".lines\").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll(\"path\"),t.width,t.color,t.dash)}))}))}}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../constants/interactions\":478,\"../bar/style\":662,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],783:[function(t,e,r){\"use strict\";var n=t(\"../pie/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/domain\").attributes,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../../plots/template_attributes\").texttemplateAttrs,l=t(\"../../lib/extend\").extendFlat;e.exports={labels:n.labels,label0:n.label0,dlabel:n.dlabel,values:n.values,marker:{colors:n.marker.colors,line:{color:l({},n.marker.line.color,{dflt:null}),width:l({},n.marker.line.width,{dflt:1}),editType:\"calc\"},editType:\"calc\"},text:n.text,hovertext:n.hovertext,scalegroup:l({},n.scalegroup,{}),textinfo:l({},n.textinfo,{flags:[\"label\",\"text\",\"value\",\"percent\"]}),texttemplate:s({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),hoverinfo:l({},i.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:o({},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),textposition:l({},n.textposition,{values:[\"inside\",\"none\"],dflt:\"inside\"}),textfont:n.textfont,insidetextfont:n.insidetextfont,title:{text:n.title.text,font:n.title.font,position:l({},n.title.position,{values:[\"top left\",\"top center\",\"top right\"],dflt:\"top center\"}),editType:\"plot\"},domain:a({name:\"funnelarea\",trace:!0,editType:\"calc\"}),aspectratio:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},baseratio:{valType:\"number\",min:0,max:1,dflt:.333,editType:\"plot\"}}},{\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/domain\":584,\"../../plots/template_attributes\":633,\"../pie/attributes\":900}],784:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"funnelarea\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":619}],785:[function(t,e,r){\"use strict\";var n=t(\"../pie/calc\");e.exports={calc:function(t,e){return n.calc(t,e)},crossTraceCalc:function(t){n.crossTraceCalc(t,{type:\"funnelarea\"})}}},{\"../pie/calc\":902}],786:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../plots/domain\").defaults,o=t(\"../bar/defaults\").handleText,s=t(\"../pie/defaults\").handleLabelsAndValues;e.exports=function(t,e,r,l){function c(r,a){return n.coerce(t,e,i,r,a)}var u=c(\"labels\"),f=c(\"values\"),h=s(u,f),p=h.len;if(e._hasLabels=h.hasLabels,e._hasValues=h.hasValues,!e._hasLabels&&e._hasValues&&(c(\"label0\"),c(\"dlabel\")),p){e._length=p,c(\"marker.line.width\")&&c(\"marker.line.color\",l.paper_bgcolor),c(\"marker.colors\"),c(\"scalegroup\");var d,g=c(\"text\"),m=c(\"texttemplate\");if(m||(d=c(\"textinfo\",Array.isArray(g)?\"text+percent\":\"percent\")),c(\"hovertext\"),c(\"hovertemplate\"),m||d&&\"none\"!==d){var v=c(\"textposition\");o(t,e,l,c,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}a(e,l,c),c(\"title.text\")&&(c(\"title.position\"),n.coerceFont(c,\"title.font\",l.font)),c(\"aspectratio\"),c(\"baseratio\")}else e.visible=!1}},{\"../../lib\":503,\"../../plots/domain\":584,\"../bar/defaults\":652,\"../pie/defaults\":903,\"./attributes\":783}],787:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"funnelarea\",basePlotModule:t(\"./base_plot\"),categories:[\"pie-like\",\"funnelarea\",\"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\"),style:t(\"./style\"),styleOne:t(\"../pie/style_one\"),meta:{}}},{\"../pie/style_one\":911,\"./attributes\":783,\"./base_plot\":784,\"./calc\":785,\"./defaults\":786,\"./layout_attributes\":788,\"./layout_defaults\":789,\"./plot\":790,\"./style\":791}],788:[function(t,e,r){\"use strict\";var n=t(\"../pie/layout_attributes\").hiddenlabels;e.exports={hiddenlabels:n,funnelareacolorway:{valType:\"colorlist\",editType:\"calc\"},extendfunnelareacolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{\"../pie/layout_attributes\":907}],789:[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(\"funnelareacolorway\",e.colorway),r(\"extendfunnelareacolors\")}},{\"../../lib\":503,\"./layout_attributes\":788}],790:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/drawing\"),a=t(\"../../lib\"),o=a.strScale,s=a.strTranslate,l=t(\"../../lib/svg_text_utils\"),c=t(\"../bar/plot\").toMoveInsideBar,u=t(\"../bar/uniform_text\"),f=u.recordMinTextSize,h=u.clearMinTextSize,p=t(\"../pie/helpers\"),d=t(\"../pie/plot\"),g=d.attachFxHandlers,m=d.determineInsideTextFont,v=d.layoutAreas,y=d.prerenderTitles,x=d.positionTitleOutside,b=d.formatSliceLabel;function _(t,e){return\"l\"+(e[0]-t[0])+\",\"+(e[1]-t[1])}e.exports=function(t,e){var r=t._fullLayout;h(\"funnelarea\",r),y(e,t),v(e,r._size),a.makeTraceGroups(r._funnelarealayer,e,\"trace\").each((function(e){var u=n.select(this),h=e[0],d=h.trace;!function(t){if(!t.length)return;var e=t[0],r=e.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a,o=Math.pow(i,2),s=e.vTotal,l=s,c=s*o/(1-o)/s;function u(){var t,e={x:t=Math.sqrt(c),y:-t};return[e.x,e.y]}var f,h,p=[];for(p.push(u()),f=t.length-1;f>-1;f--)if(!(h=t[f]).hidden){var d=h.v/l;c+=d,p.push(u())}var g=1/0,m=-1/0;for(f=0;f-1;f--)if(!(h=t[f]).hidden){var A=p[k+=1][0],M=p[k][1];h.TL=[-A,M],h.TR=[A,M],h.BL=w,h.BR=T,h.pxmid=(S=h.TR,E=h.BR,[.5*(S[0]+E[0]),.5*(S[1]+E[1])]),w=h.TL,T=h.TR}var S,E}(e),u.each((function(){var u=n.select(this).selectAll(\"g.slice\").data(e);u.enter().append(\"g\").classed(\"slice\",!0),u.exit().remove(),u.each((function(o,s){if(o.hidden)n.select(this).selectAll(\"path,g\").remove();else{o.pointNumber=o.i,o.curveNumber=d.index;var u=h.cx,v=h.cy,y=n.select(this),x=y.selectAll(\"path.surface\").data([o]);x.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":\"all\"}),y.call(g,t,e);var w=\"M\"+(u+o.TR[0])+\",\"+(v+o.TR[1])+_(o.TR,o.BR)+_(o.BR,o.BL)+_(o.BL,o.TL)+\"Z\";x.attr(\"d\",w),b(t,o,h);var T=p.castOption(d.textposition,o.pts),k=y.selectAll(\"g.slicetext\").data(o.text&&\"none\"!==T?[0]:[]);k.enter().append(\"g\").classed(\"slicetext\",!0),k.exit().remove(),k.each((function(){var h=a.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),p=a.ensureUniformFontSize(t,m(d,o,r.font));h.text(o.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(i.font,p).call(l.convertToTspans,t);var g,y,x,b=i.bBox(h.node()),_=Math.min(o.BL[1],o.BR[1])+v,w=Math.max(o.TL[1],o.TR[1])+v;y=Math.max(o.TL[0],o.BL[0])+u,x=Math.min(o.TR[0],o.BR[0])+u,(g=c(y,x,_,w,b,{isHorizontal:!0,constrained:!0,angle:0,anchor:\"middle\"})).fontSize=p.size,f(d.type,g,r),e[s].transform=g,h.attr(\"transform\",a.getTextTransform(g))}))}}));var v=n.select(this).selectAll(\"g.titletext\").data(d.title.text?[0]:[]);v.enter().append(\"g\").classed(\"titletext\",!0),v.exit().remove(),v.each((function(){var e=a.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),c=d.title.text;d._meta&&(c=a.templateString(c,d._meta)),e.text(c).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(i.font,d.title.font).call(l.convertToTspans,t);var u=x(h,r._size);e.attr(\"transform\",s(u.x,u.y)+o(Math.min(1,u.scale))+s(u.tx,u.ty))}))}))}))}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../bar/plot\":659,\"../bar/uniform_text\":664,\"../pie/helpers\":905,\"../pie/plot\":909,\"@plotly/d3\":58}],791:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../pie/style_one\"),a=t(\"../bar/uniform_text\").resizeText;e.exports=function(t){var e=t._fullLayout._funnelarealayer.selectAll(\".trace\");a(t,e,\"funnelarea\"),e.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)}))}))}},{\"../bar/uniform_text\":664,\"../pie/style_one\":911,\"@plotly/d3\":58}],792:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/font_attributes\"),o=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../plots/template_attributes\").texttemplateAttrs,c=t(\"../../components/colorscale/attributes\"),u=t(\"../../lib/extend\").extendFlat;e.exports=u({z:{valType:\"data_array\",editType:\"calc\"},x:u({},n.x,{impliedEdits:{xtype:\"array\"}}),x0:u({},n.x0,{impliedEdits:{xtype:\"scaled\"}}),dx:u({},n.dx,{impliedEdits:{xtype:\"scaled\"}}),y:u({},n.y,{impliedEdits:{ytype:\"array\"}}),y0:u({},n.y0,{impliedEdits:{ytype:\"scaled\"}}),dy:u({},n.dy,{impliedEdits:{ytype:\"scaled\"}}),xperiod:u({},n.xperiod,{impliedEdits:{xtype:\"scaled\"}}),yperiod:u({},n.yperiod,{impliedEdits:{ytype:\"scaled\"}}),xperiod0:u({},n.xperiod0,{impliedEdits:{xtype:\"scaled\"}}),yperiod0:u({},n.yperiod0,{impliedEdits:{ytype:\"scaled\"}}),xperiodalignment:u({},n.xperiodalignment,{impliedEdits:{xtype:\"scaled\"}}),yperiodalignment:u({},n.yperiodalignment,{impliedEdits:{ytype:\"scaled\"}}),text:{valType:\"data_array\",editType:\"calc\"},hovertext:{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\"},hoverongaps:{valType:\"boolean\",dflt:!0,editType:\"none\"},connectgaps:{valType:\"boolean\",editType:\"calc\"},xgap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},ygap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},xhoverformat:o(\"x\"),yhoverformat:o(\"y\"),zhoverformat:o(\"z\",1),hovertemplate:s(),texttemplate:l({arrayOk:!1,editType:\"plot\"},{keys:[\"x\",\"y\",\"z\",\"text\"]}),textfont:a({editType:\"plot\",autoSize:!0,autoColor:!0,colorEditType:\"style\"}),showlegend:u({},i.showlegend,{dflt:!1})},{transforms:void 0},c(\"\",{cLetter:\"z\",autoColorDflt:!1}))},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/font_attributes\":585,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926}],793:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../plots/cartesian/align_period\"),s=t(\"../histogram2d/calc\"),l=t(\"../../components/colorscale/calc\"),c=t(\"./convert_column_xyz\"),u=t(\"./clean_2d_array\"),f=t(\"./interp2d\"),h=t(\"./find_empties\"),p=t(\"./make_bound_array\"),d=t(\"../../constants/numerical\").BADNUM;function g(t){for(var e=[],r=t.length,n=0;nD){O(\"x scale is not linear\");break}}if(x.length&&\"fast\"===P){var R=(x[x.length-1]-x[0])/(x.length-1),F=Math.abs(R/100);for(k=0;kF){O(\"y scale is not linear\");break}}}var B=i.maxRowLength(T),N=\"scaled\"===e.xtype?\"\":r,j=p(e,N,m,v,B,M),U=\"scaled\"===e.ytype?\"\":x,V=p(e,U,b,_,T.length,S);C||(e._extremes[M._id]=a.findExtremes(M,j),e._extremes[S._id]=a.findExtremes(S,V));var H={x:j,y:V,z:T,text:e._text||e.text,hovertext:e._hovertext||e.hovertext};if(e.xperiodalignment&&y&&(H.orig_x=y),e.yperiodalignment&&w&&(H.orig_y=w),N&&N.length===j.length-1&&(H.xCenter=N),U&&U.length===V.length-1&&(H.yCenter=U),L&&(H.xRanges=A.xRanges,H.yRanges=A.yRanges,H.pts=A.pts),E||l(t,e,{vals:T,cLetter:\"z\"}),E&&e.contours&&\"heatmap\"===e.contours.coloring){var q={type:\"contour\"===e.type?\"heatmap\":\"histogram2d\",xcalendar:e.xcalendar,ycalendar:e.ycalendar};H.xfill=p(q,N,m,v,B,M),H.yfill=p(q,U,b,_,T.length,S)}return[H]}},{\"../../components/colorscale/calc\":374,\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/align_period\":551,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"../histogram2d/calc\":826,\"./clean_2d_array\":794,\"./convert_column_xyz\":796,\"./find_empties\":798,\"./interp2d\":801,\"./make_bound_array\":803}],794:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e,r,o){var s,l,c,u,f,h;function p(t){if(n(t))return+t}if(e&&e.transpose){for(s=0,f=0;f=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]}))}},{\"../../lib\":503}],799:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../components/colorscale\").extractOpts;e.exports=function(t,e,r,s,l){l||(l={});var c,u,f,h,p=l.isContour,d=t.cd[0],g=d.trace,m=t.xa,v=t.ya,y=d.x,x=d.y,b=d.z,_=d.xCenter,w=d.yCenter,T=d.zmask,k=g.zhoverformat,A=y,M=x;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>=b[0].length||h<0||h>b.length)return}else{if(n.inbox(e-y[0],e-y[y.length-1],0)>0||n.inbox(r-x[0],r-x[x.length-1],0)>0)return;if(p){var S;for(A=[2*y[0]-y[1]],S=1;Sg&&(v=Math.max(v,Math.abs(t[a][o]-d)/(m-g))))}return v}e.exports=function(t,e){var r,i=1;for(o(t,e),r=0;r.01;r++)i=o(t,e,a(i));return i>.01&&n.log(\"interp2d didn't converge quickly\",i),t}},{\"../../lib\":503}],802:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){t(\"texttemplate\");var r=n.extendFlat({},e.font,{color:\"auto\",size:\"auto\"});n.coerceFont(t,\"textfont\",r)}},{\"../../lib\":503}],803:[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;u0;)_=w.c2p(R[S]),S--;for(_0;)M=T.c2p(F[S]),S--;if(MGt||Gt>T._length))for(E=Ut;EWt||Wt>w._length)){var Xt=u({x:Yt,y:qt},I,t._fullLayout);Xt.x=Yt,Xt.y=qt;var Zt=P.z[S][E];void 0===Zt?(Xt.z=\"\",Xt.zLabel=\"\"):(Xt.z=Zt,Xt.zLabel=s.tickText(Ft,Zt,\"hover\").text);var Jt=P.text&&P.text[S]&&P.text[S][E];void 0!==Jt&&!1!==Jt||(Jt=\"\"),Xt.text=Jt;var Kt=l.texttemplateString(Dt,Xt,t._fullLayout._d3locale,Xt,I._meta||{});if(Kt){var Qt=Kt.split(\"
\"),$t=Qt.length,te=0;for(L=0;L<$t;L++)te=Math.max(te,Qt[L].length);Ht.push({l:$t,c:te,t:Kt,x:Wt,y:Gt,z:Zt})}}}}var ee=I.textfont,re=ee.family,ne=ee.size,ie=t._fullLayout.font.size;if(!ne||\"auto\"===ne){var ae=1/0,oe=1/0,se=0,le=0;for(L=0;L0&&(a=!0);for(var l=0;la){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]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],m=Math.min(f(d+h,d+p,n,a),f(g+h,g+p,n,a)),v=Math.min(f(d+c,d+h,n,a),f(g+c,g+h,n,a));if(m>v&&vo){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(cr.r2l(B)&&(j=o.tickIncrement(j,b.size,!0,p)),z.start=r.l2r(j),F||i.nestedProperty(e,v+\".start\").set(z.start)}var U=b.end,V=r.r2l(O.end),H=void 0!==V;if((b.endFound||H)&&V!==r.r2l(U)){var q=H?V:i.aggNums(Math.max,null,d);z.end=r.l2r(q),H||i.nestedProperty(e,v+\".start\").set(z.end)}var G=\"autobin\"+s;return!1===e._input[G]&&(e._input[v]=i.extendFlat({},e[v]||{}),delete e._input[G],delete e[G]),[z,d]}e.exports={calc:function(t,e){var r,a,p,d,g=[],m=[],v=\"h\"===e.orientation,y=o.getFromId(t,v?e.yaxis:e.xaxis),x=v?\"y\":\"x\",b={x:\"y\",y:\"x\"}[x],_=e[x+\"calendar\"],w=e.cumulative,T=h(t,e,y,x),k=T[0],A=T[1],M=\"string\"==typeof k.size,S=[],E=M?S:k,L=[],C=[],P=[],I=0,O=e.histnorm,z=e.histfunc,D=-1!==O.indexOf(\"density\");w.enabled&&D&&(O=O.replace(/ ?density$/,\"\"),D=!1);var R,F=\"max\"===z||\"min\"===z?null:0,B=l.count,N=c[O],j=!1,U=function(t){return y.r2c(t,0,_)};for(i.isArrayOrTypedArray(e[b])&&\"count\"!==z&&(R=e[b],j=\"avg\"===z,B=l[z]),r=U(k.start),p=U(k.end)+(r-o.tickIncrement(r,k.size,!1,_))/1e6;r=0&&d=0;n--)s(n);else if(\"increasing\"===e){for(n=1;n=0;n--)t[n]+=t[n+1];\"exclude\"===r&&(t.push(0),t.shift())}}(m,w.direction,w.currentbin);var K=Math.min(g.length,m.length),Q=[],$=0,tt=K-1;for(r=0;r=$;r--)if(m[r]){tt=r;break}for(r=$;r<=tt;r++)if(n(g[r])&&n(m[r])){var et={p:g[r],s:m[r],b:0};w.enabled||(et.pts=P[r],Y?et.ph0=et.ph1=P[r].length?A[P[r][0]]:g[r]:(e._computePh=!0,et.ph0=q(S[r]),et.ph1=q(S[r+1],!0))),Q.push(et)}return 1===Q.length&&(Q[0].width1=o.tickIncrement(Q[0].p,k.size,!1,_)-Q[0].p),s(Q,e),i.isArrayOrTypedArray(e.selectedpoints)&&i.tagSelected(Q,e,Z),Q},calcAllAutoBins:h}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"../bar/arrays_to_calcdata\":647,\"./average\":813,\"./bin_functions\":815,\"./bin_label_vals\":816,\"./norm_functions\":824,\"fast-isnumeric\":190}],818:[function(t,e,r){\"use strict\";e.exports={eventDataKeys:[\"binNumber\"]}},{}],819:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axis_ids\"),a=t(\"../../registry\").traceIs,o=t(\"../bar/defaults\").handleGroupingDefaults,s=n.nestedProperty,l=t(\"../../plots/cartesian/constraints\").getAxisGroup,c=[{aStr:{x:\"xbins.start\",y:\"ybins.start\"},name:\"start\"},{aStr:{x:\"xbins.end\",y:\"ybins.end\"},name:\"end\"},{aStr:{x:\"xbins.size\",y:\"ybins.size\"},name:\"size\"},{aStr:{x:\"nbinsx\",y:\"nbinsy\"},name:\"nbins\"}],u=[\"x\",\"y\"];e.exports=function(t,e){var r,f,h,p,d,g,m,v=e._histogramBinOpts={},y=[],x={},b=[];function _(t,e){return n.coerce(r._input,r,r._module.attributes,t,e)}function w(t){return\"v\"===t.orientation?\"x\":\"y\"}function T(t,r,a){var o=t.uid+\"__\"+a;r||(r=o);var s=function(t,r){return i.getFromTrace({_fullLayout:e},t,r).type}(t,a),l=t[a+\"calendar\"]||\"\",c=v[r],u=!0;c&&(s===c.axType&&l===c.calendar?(u=!1,c.traces.push(t),c.dirs.push(a)):(r=o,s!==c.axType&&n.warn([\"Attempted to group the bins of trace\",t.index,\"set on a\",\"type:\"+s,\"axis\",\"with bins on\",\"type:\"+c.axType,\"axis.\"].join(\" \")),l!==c.calendar&&n.warn([\"Attempted to group the bins of trace\",t.index,\"set with a\",l,\"calendar\",\"with bins\",c.calendar?\"on a \"+c.calendar+\" calendar\":\"w/o a set calendar\"].join(\" \")))),u&&(v[r]={traces:[t],dirs:[a],axType:s,calendar:t[a+\"calendar\"]||\"\"}),t[\"_\"+a+\"bingroup\"]=r}for(d=0;dS&&T.splice(S,T.length-S),M.length>S&&M.splice(S,M.length-S);var E=[],L=[],C=[],P=\"string\"==typeof w.size,I=\"string\"==typeof A.size,O=[],z=[],D=P?O:w,R=I?z:A,F=0,B=[],N=[],j=e.histnorm,U=e.histfunc,V=-1!==j.indexOf(\"density\"),H=\"max\"===U||\"min\"===U?null:0,q=a.count,G=o[j],Y=!1,W=[],X=[],Z=\"z\"in e?e.z:\"marker\"in e&&Array.isArray(e.marker.color)?e.marker.color:\"\";Z&&\"count\"!==U&&(Y=\"avg\"===U,q=a[U]);var J=w.size,K=x(w.start),Q=x(w.end)+(K-i.tickIncrement(K,J,!1,v))/1e6;for(r=K;r=0&&p=0&&d-1,flipY:E.tiling.flip.indexOf(\"y\")>-1,orientation:E.tiling.orientation,pad:{inner:E.tiling.pad},maxDepth:E._maxDepth}).descendants(),O=1/0,z=-1/0;I.forEach((function(t){var e=t.depth;e>=E._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(O=Math.min(O,e),z=Math.max(z,e))})),p=p.data(I,u.getPtId),E._maxVisibleLayers=isFinite(z)?z-O+1:0,p.enter().append(\"g\").classed(\"slice\",!0),T(p,!1,{},[g,m],x),p.order();var D=null;if(w&&M){var R=u.getPtId(M);p.each((function(t){null===D&&u.getPtId(t)===R&&(D={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var F=function(){return D||{x0:0,x1:g,y0:0,y1:m}},B=p;return w&&(B=B.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),B.each((function(s){s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-E.tiling.pad),s._hoverY=y(P?s.y1-E.tiling.pad/2:s.y0+E.tiling.pad/2);var p=n.select(this),d=i.ensureSingle(p,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?d.transition().attrTween(\"d\",(function(t){var e=k(t,!1,F(),[g,m],{orientation:E.tiling.orientation,flipX:E.tiling.flip.indexOf(\"x\")>-1,flipY:E.tiling.flip.indexOf(\"y\")>-1});return function(t){return x(e(t))}})):d.attr(\"d\",x),p.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{isTransitioning:t._transitioning}),d.call(l,s,E,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text=\"\":s._text=h(s,r,E,e,S)||\"\";var T=i.ensureSingle(p,\"g\",\"slicetext\"),M=i.ensureSingle(T,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),I=i.ensureUniformFontSize(t,u.determineTextFont(E,s,S.font));M.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",C?\"end\":L?\"start\":\"middle\").call(a.font,I).call(o.convertToTspans,t),s.textBB=a.bBox(M.node()),s.transform=b(s,{fontSize:I.size}),s.transform.fontSize=I.size,w?M.transition().attrTween(\"transform\",(function(t){var e=A(t,!1,F(),[g,m]);return function(t){return _(e(t))}})):M.attr(\"transform\",_(s))})),D}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../sunburst/fx\":1050,\"../sunburst/helpers\":1051,\"../sunburst/plot\":1055,\"../treemap/constants\":1074,\"./partition\":842,\"./style\":844,\"@plotly/d3\":58}],839:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"icicle\",basePlotModule:t(\"./base_plot\"),categories:[],animatable:!0,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\"),style:t(\"./style\").style,colorbar:t(\"../scatter/marker_colorbar\"),meta:{}}},{\"../scatter/marker_colorbar\":944,\"./attributes\":834,\"./base_plot\":835,\"./calc\":836,\"./defaults\":837,\"./layout_attributes\":840,\"./layout_defaults\":841,\"./plot\":843,\"./style\":844}],840:[function(t,e,r){\"use strict\";e.exports={iciclecolorway:{valType:\"colorlist\",editType:\"calc\"},extendiciclecolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],841:[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(\"iciclecolorway\",e.colorway),r(\"extendiciclecolors\")}},{\"../../lib\":503,\"./layout_attributes\":840}],842:[function(t,e,r){\"use strict\";var n=t(\"d3-hierarchy\"),i=t(\"../treemap/flip_tree\");e.exports=function(t,e,r){var a=r.flipX,o=r.flipY,s=\"h\"===r.orientation,l=r.maxDepth,c=e[0],u=e[1];l&&(c=(t.height+1)*e[0]/Math.min(t.height+1,l),u=(t.height+1)*e[1]/Math.min(t.height+1,l));var f=n.partition().padding(r.pad.inner).size(s?[e[1],c]:[e[0],u])(t);return(s||a||o)&&i(f,e,{swapXY:s,flipX:a,flipY:o}),f}},{\"../treemap/flip_tree\":1079,\"d3-hierarchy\":115}],843:[function(t,e,r){\"use strict\";var n=t(\"../treemap/draw\"),i=t(\"./draw_descendants\");e.exports=function(t,e,r,a){return n(t,e,r,a,{type:\"icicle\",drawDescendants:i})}},{\"../treemap/draw\":1076,\"./draw_descendants\":838}],844:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../bar/uniform_text\").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,\"marker.line.color\")||i.defaultLine,c=a.castOption(r,s,\"marker.line.width\")||0;t.style(\"stroke-width\",c).call(i.fill,n.color).call(i.stroke,l).style(\"opacity\",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._iciclelayer.selectAll(\".trace\");o(t,e,\"icicle\"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style(\"opacity\",r.opacity),e.selectAll(\"path.surface\").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{\"../../components/color\":366,\"../../lib\":503,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],845:[function(t,e,r){\"use strict\";for(var n=t(\"../../plots/attributes\"),i=t(\"../../plots/template_attributes\").hovertemplateAttrs,a=t(\"../../lib/extend\").extendFlat,o=t(\"./constants\").colormodel,s=[\"rgb\",\"rgba\",\"rgba256\",\"hsl\",\"hsla\"],l=[],c=[],u=0;u0||n.inbox(r-o.y0,r-(o.y0+o.h*s.dy),0)>0)){var u,f=Math.floor((e-o.x0)/s.dx),h=Math.floor(Math.abs(r-o.y0)/s.dy);if(s._hasZ?u=o.z[h][f]:s._hasSource&&(u=s._canvas.el.getContext(\"2d\").getImageData(f,h,1,1).data),u){var p,d=o.hi||s.hoverinfo;if(d){var g=d.split(\"+\");-1!==g.indexOf(\"all\")&&(g=[\"color\"]),-1!==g.indexOf(\"color\")&&(p=!0)}var m,v=a.colormodel[s.colormodel],y=v.colormodel||s.colormodel,x=y.length,b=s._scaler(u),_=v.suffix,w=[];(s.hovertemplate||p)&&(w.push(\"[\"+[b[0]+_[0],b[1]+_[1],b[2]+_[2]].join(\", \")),4===x&&w.push(\", \"+b[3]+_[3]),w.push(\"]\"),w=w.join(\"\"),t.extraText=y.toUpperCase()+\": \"+w),Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[h])?m=s.hovertext[h][f]:Array.isArray(s.text)&&Array.isArray(s.text[h])&&(m=s.text[h][f]);var T=c.c2p(o.y0+(h+.5)*s.dy),k=o.x0+(f+.5)*s.dx,A=o.y0+(h+.5)*s.dy,M=\"[\"+u.slice(0,s.colormodel.length).join(\", \")+\"]\";return[i.extendFlat(t,{index:[h,f],x0:l.c2p(o.x0+f*s.dx),x1:l.c2p(o.x0+(f+1)*s.dx),y0:T,y1:T,color:b,xVal:k,xLabelVal:k,yVal:A,yLabelVal:A,zLabelVal:M,text:m,hovertemplateLabels:{zLabel:M,colorLabel:w,\"color[0]Label\":b[0]+_[0],\"color[1]Label\":b[1]+_[1],\"color[2]Label\":b[2]+_[2],\"color[3]Label\":b[3]+_[3]}})]}}}},{\"../../components/fx\":406,\"../../lib\":503,\"./constants\":847}],852:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"./style\"),hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"image\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"2dMap\",\"noSortingByValue\"],animatable:!1,meta:{}}},{\"../../plots/cartesian\":568,\"./attributes\":845,\"./calc\":846,\"./defaults\":848,\"./event_data\":849,\"./hover\":851,\"./plot\":853,\"./style\":854}],853:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.strTranslate,o=t(\"../../constants/xmlns_namespaces\"),s=t(\"./constants\"),l=i.isIOS()||i.isSafari()||i.isIE();e.exports=function(t,e,r,c){var u=e.xaxis,f=e.yaxis,h=!(l||t._context._exportedPlot);i.makeTraceGroups(c,r,\"im\").each((function(e){var r=n.select(this),l=e[0],c=l.trace,p=(\"fast\"===c.zsmooth||!1===c.zsmooth&&h)&&!c._hasZ&&c._hasSource&&\"linear\"===u.type&&\"linear\"===f.type;c._realImage=p;var d,g,m,v,y,x,b=l.z,_=l.x0,w=l.y0,T=l.w,k=l.h,A=c.dx,M=c.dy;for(x=0;void 0===d&&x0;)g=u.c2p(_+x*A),x--;for(x=0;void 0===v&&x0;)y=f.c2p(w+x*M),x--;if(gI[0];if(O||z){var D=d+S/2,R=v+E/2;C+=\"transform:\"+a(D+\"px\",R+\"px\")+\"scale(\"+(O?-1:1)+\",\"+(z?-1:1)+\")\"+a(-D+\"px\",-R+\"px\")+\";\"}}L.attr(\"style\",C);var F=new Promise((function(t){if(c._hasZ)t();else if(c._hasSource)if(c._canvas&&c._canvas.el.width===T&&c._canvas.el.height===k&&c._canvas.source===c.source)t();else{var e=document.createElement(\"canvas\");e.width=T,e.height=k;var r=e.getContext(\"2d\");c._image=c._image||new Image;var n=c._image;n.onload=function(){r.drawImage(n,0,0),c._canvas={el:e,source:c.source},t()},n.setAttribute(\"src\",c.source)}})).then((function(){var t;if(c._hasZ)t=B((function(t,e){return b[e][t]})).toDataURL(\"image/png\");else if(c._hasSource)if(p)t=c.source;else{var e=c._canvas.el.getContext(\"2d\").getImageData(0,0,T,k).data;t=B((function(t,r){var n=4*(r*T+t);return[e[n],e[n+1],e[n+2],e[n+3]]})).toDataURL(\"image/png\")}L.attr({\"xlink:href\":t,height:E,width:S,x:d,y:v})}));t._promises.push(F)}function B(t){var e=document.createElement(\"canvas\");e.width=S,e.height=E;var r,n=e.getContext(\"2d\"),a=function(t){return i.constrain(Math.round(u.c2p(_+t*A)-d),0,S)},o=function(t){return i.constrain(Math.round(f.c2p(w+t*M)-v),0,E)},h=s.colormodel[c.colormodel],p=h.colormodel||c.colormodel,g=h.fmt;for(x=0;x0}function T(t){t.each((function(t){y.stroke(n.select(this),t.line.color)})).each((function(t){y.fill(n.select(this),t.color)})).style(\"stroke-width\",(function(t){return t.line.width}))}function k(t,e,r){var n=t._fullLayout,i=o.extendFlat({type:\"linear\",ticks:\"outside\",range:r,showline:!0},e),a={type:\"linear\",_id:\"x\"+e._id},s={letter:\"x\",font:n.font,noHover:!0,noTickson:!0};function l(t,e){return o.coerce(i,a,v,t,e)}return g(i,a,l,s,n),m(i,a,l,s),a}function A(t,e,r){return[Math.min(e/t.width,r/t.height),t,e+\"x\"+r]}function M(t,e,r,i){var a=document.createElementNS(\"http://www.w3.org/2000/svg\",\"text\"),o=n.select(a);return o.text(t).attr(\"x\",0).attr(\"y\",0).attr(\"text-anchor\",r).attr(\"data-unformatted\",t).call(p.convertToTspans,i).call(f.font,e),f.bBox(o.node())}function S(t,e,r,n,i,a){var s=\"_cache\"+e;t[s]&&t[s].key===i||(t[s]={key:i,value:r});var l=o.aggNums(a,null,[t[s].value,n],2);return t[s].value=l,l}e.exports=function(t,e,r,g){var m,v=t._fullLayout;w(r)&&g&&(m=g()),o.makeTraceGroups(v._indicatorlayer,e,\"trace\").each((function(e){var g,E,L,C,P,I=e[0].trace,O=n.select(this),z=I._hasGauge,D=I._isAngular,R=I._isBullet,F=I.domain,B={w:v._size.w*(F.x[1]-F.x[0]),h:v._size.h*(F.y[1]-F.y[0]),l:v._size.l+v._size.w*F.x[0],r:v._size.r+v._size.w*(1-F.x[1]),t:v._size.t+v._size.h*(1-F.y[1]),b:v._size.b+v._size.h*F.y[0]},N=B.l+B.w/2,j=B.t+B.h/2,U=Math.min(B.w/2,B.h),V=h.innerRadius*U,H=I.align||\"center\";if(E=j,z){if(D&&(g=N,E=j+U/2,L=function(t){return function(t,e){var r=Math.sqrt(t.width/2*(t.width/2)+t.height*t.height);return[e/r,t,e]}(t,.9*V)}),R){var q=h.bulletPadding,G=1-h.bulletNumberDomainSize+q;g=B.l+(G+(1-G)*b[H])*B.w,L=function(t){return A(t,(h.bulletNumberDomainSize-q)*B.w,B.h)}}}else g=B.l+b[H]*B.w,L=function(t){return A(t,B.w,B.h)};!function(t,e,r,i){var c,u,h,g=r[0].trace,m=i.numbersX,v=i.numbersY,T=g.align||\"center\",A=x[T],E=i.transitionOpts,L=i.onComplete,C=o.ensureSingle(e,\"g\",\"numbers\"),P=[];g._hasNumber&&P.push(\"number\");g._hasDelta&&(P.push(\"delta\"),\"left\"===g.delta.position&&P.reverse());var I=C.selectAll(\"text\").data(P);function O(e,r,n,i){if(!e.match(\"s\")||n>=0==i>=0||r(n).slice(-1).match(_)||r(i).slice(-1).match(_))return r;var a=e.slice().replace(\"s\",\"f\").replace(/\\d+/,(function(t){return parseInt(t)-1})),o=k(t,{tickformat:a});return function(t){return Math.abs(t)<1?d.tickText(o,t).text:r(t)}}I.enter().append(\"text\"),I.attr(\"text-anchor\",(function(){return A})).attr(\"class\",(function(t){return t})).attr(\"x\",null).attr(\"y\",null).attr(\"dx\",null).attr(\"dy\",null),I.exit().remove();var z,D=g.mode+g.align;g._hasDelta&&(z=function(){var e=k(t,{tickformat:g.delta.valueformat},g._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=function(t){return g.delta.relative?t.relativeDelta:t.delta},s=function(t,e){return 0===t||\"number\"!=typeof t||isNaN(t)?\"-\":(t>0?g.delta.increasing.symbol:g.delta.decreasing.symbol)+e(t)},l=function(t){return t.delta>=0?g.delta.increasing.color:g.delta.decreasing.color};void 0===g._deltaLastValue&&(g._deltaLastValue=o(r[0]));var c=C.select(\"text.delta\");function h(){c.text(s(o(r[0]),i)).call(y.fill,l(r[0])).call(p.convertToTspans,t)}return c.call(f.font,g.delta.font).call(y.fill,l({delta:g._deltaLastValue})),w(E)?c.transition().duration(E.duration).ease(E.easing).tween(\"text\",(function(){var t=n.select(this),e=o(r[0]),c=g._deltaLastValue,u=O(g.delta.valueformat,i,c,e),f=a(c,e);return g._deltaLastValue=e,function(e){t.text(s(f(e),u)),t.call(y.fill,l({delta:f(e)}))}})).each(\"end\",(function(){h(),L&&L()})).each(\"interrupt\",(function(){h(),L&&L()})):h(),u=M(s(o(r[0]),i),g.delta.font,A,t),c}(),D+=g.delta.position+g.delta.font.size+g.delta.font.family+g.delta.valueformat,D+=g.delta.increasing.symbol+g.delta.decreasing.symbol,h=u);g._hasNumber&&(!function(){var e=k(t,{tickformat:g.number.valueformat},g._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=g.number.suffix,s=g.number.prefix,l=C.select(\"text.number\");function u(){var e=\"number\"==typeof r[0].y?s+i(r[0].y)+o:\"-\";l.text(e).call(f.font,g.number.font).call(p.convertToTspans,t)}w(E)?l.transition().duration(E.duration).ease(E.easing).each(\"end\",(function(){u(),L&&L()})).each(\"interrupt\",(function(){u(),L&&L()})).attrTween(\"text\",(function(){var t=n.select(this),e=a(r[0].lastY,r[0].y);g._lastValue=r[0].y;var l=O(g.number.valueformat,i,r[0].lastY,r[0].y);return function(r){t.text(s+l(e(r))+o)}})):u(),c=M(s+i(r[0].y)+o,g.number.font,A,t)}(),D+=g.number.font.size+g.number.font.family+g.number.valueformat+g.number.suffix+g.number.prefix,h=c);if(g._hasDelta&&g._hasNumber){var R,F,B=[(c.left+c.right)/2,(c.top+c.bottom)/2],N=[(u.left+u.right)/2,(u.top+u.bottom)/2],j=.75*g.delta.font.size;\"left\"===g.delta.position&&(R=S(g,\"deltaPos\",0,-1*(c.width*b[g.align]+u.width*(1-b[g.align])+j),D,Math.min),F=B[1]-N[1],h={width:c.width+u.width+j,height:Math.max(c.height,u.height),left:u.left+R,right:c.right,top:Math.min(c.top,u.top+F),bottom:Math.max(c.bottom,u.bottom+F)}),\"right\"===g.delta.position&&(R=S(g,\"deltaPos\",0,c.width*(1-b[g.align])+u.width*b[g.align]+j,D,Math.max),F=B[1]-N[1],h={width:c.width+u.width+j,height:Math.max(c.height,u.height),left:c.left,right:u.right+R,top:Math.min(c.top,u.top+F),bottom:Math.max(c.bottom,u.bottom+F)}),\"bottom\"===g.delta.position&&(R=null,F=u.height,h={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height,bottom:c.bottom+u.height}),\"top\"===g.delta.position&&(R=null,F=c.top,h={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height-u.height,bottom:c.bottom}),z.attr({dx:R,dy:F})}(g._hasNumber||g._hasDelta)&&C.attr(\"transform\",(function(){var t=i.numbersScaler(h);D+=t[2];var e,r=S(g,\"numbersScale\",1,t[0],D,Math.min);g._scaleNumbers||(r=1),e=g._isAngular?v-r*h.bottom:v-r*(h.top+h.bottom)/2,g._numbersTop=r*h.top+e;var n=h[T];\"center\"===T&&(n=(h.left+h.right)/2);var a=m-r*n;return a=S(g,\"numbersTranslate\",0,a,D,Math.max),l(a,e)+s(r)}))}(t,O,e,{numbersX:g,numbersY:E,numbersScaler:L,transitionOpts:r,onComplete:m}),z&&(C={range:I.gauge.axis.range,color:I.gauge.bgcolor,line:{color:I.gauge.bordercolor,width:0},thickness:1},P={range:I.gauge.axis.range,color:\"rgba(0, 0, 0, 0)\",line:{color:I.gauge.bordercolor,width:I.gauge.borderwidth},thickness:1});var Y=O.selectAll(\"g.angular\").data(D?e:[]);Y.exit().remove();var W=O.selectAll(\"g.angularaxis\").data(D?e:[]);W.exit().remove(),D&&function(t,e,r,a){var o,s,f,h,p=r[0].trace,g=a.size,m=a.radius,v=a.innerRadius,y=a.gaugeBg,x=a.gaugeOutline,b=[g.l+g.w/2,g.t+g.h/2+m/2],_=a.gauge,A=a.layer,M=a.transitionOpts,S=a.onComplete,E=Math.PI/2;function L(t){var e=p.gauge.axis.range[0],r=(t-e)/(p.gauge.axis.range[1]-e)*Math.PI-E;return r<-E?-E:r>E?E:r}function C(t){return n.svg.arc().innerRadius((v+m)/2-t/2*(m-v)).outerRadius((v+m)/2+t/2*(m-v)).startAngle(-E)}function P(t){t.attr(\"d\",(function(t){return C(t.thickness).startAngle(L(t.range[0])).endAngle(L(t.range[1]))()}))}_.enter().append(\"g\").classed(\"angular\",!0),_.attr(\"transform\",l(b[0],b[1])),A.enter().append(\"g\").classed(\"angularaxis\",!0).classed(\"crisp\",!0),A.selectAll(\"g.xangularaxistick,path,text\").remove(),(o=k(t,p.gauge.axis)).type=\"linear\",o.range=p.gauge.axis.range,o._id=\"xangularaxis\",o.ticklabeloverflow=\"allow\",o.setScale();var I=function(t){return(o.range[0]-t.x)/(o.range[1]-o.range[0])*Math.PI+Math.PI},O={},z=d.makeLabelFns(o,0).labelStandoff;O.xFn=function(t){var e=I(t);return Math.cos(e)*z},O.yFn=function(t){var e=I(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(z+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*u)},O.anchorFn=function(t){var e=I(t),r=Math.cos(e);return Math.abs(r)<.1?\"middle\":r>0?\"start\":\"end\"},O.heightFn=function(t,e,r){var n=I(t);return-.5*(1+Math.sin(n))*r};var D=function(t){return l(b[0]+m*Math.cos(t),b[1]-m*Math.sin(t))};f=function(t){return D(I(t))};if(s=d.calcTicks(o),h=d.getTickSigns(o)[2],o.visible){h=\"inside\"===o.ticks?-1:1;var R=(o.linewidth||1)/2;d.drawTicks(t,o,{vals:s,layer:A,path:\"M\"+h*R+\",0h\"+h*o.ticklen,transFn:function(t){var e=I(t);return D(e)+\"rotate(\"+-c(e)+\")\"}}),d.drawLabels(t,o,{vals:s,layer:A,transFn:f,labelFns:O})}var F=[y].concat(p.gauge.steps),B=_.selectAll(\"g.bg-arc\").data(F);B.enter().append(\"g\").classed(\"bg-arc\",!0).append(\"path\"),B.select(\"path\").call(P).call(T),B.exit().remove();var N=C(p.gauge.bar.thickness),j=_.selectAll(\"g.value-arc\").data([p.gauge.bar]);j.enter().append(\"g\").classed(\"value-arc\",!0).append(\"path\");var U=j.select(\"path\");w(M)?(U.transition().duration(M.duration).ease(M.easing).each(\"end\",(function(){S&&S()})).each(\"interrupt\",(function(){S&&S()})).attrTween(\"d\",(V=N,H=L(r[0].lastY),q=L(r[0].y),function(){var t=i(H,q);return function(e){return V.endAngle(t(e))()}})),p._lastValue=r[0].y):U.attr(\"d\",\"number\"==typeof r[0].y?N.endAngle(L(r[0].y)):\"M0,0Z\");var V,H,q;U.call(T),j.exit().remove(),F=[];var G=p.gauge.threshold.value;(G||0===G)&&F.push({range:[G,G],color:p.gauge.threshold.color,line:{color:p.gauge.threshold.line.color,width:p.gauge.threshold.line.width},thickness:p.gauge.threshold.thickness});var Y=_.selectAll(\"g.threshold-arc\").data(F);Y.enter().append(\"g\").classed(\"threshold-arc\",!0).append(\"path\"),Y.select(\"path\").call(P).call(T),Y.exit().remove();var W=_.selectAll(\"g.gauge-outline\").data([x]);W.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"path\"),W.select(\"path\").call(P).call(T),W.exit().remove()}(t,0,e,{radius:U,innerRadius:V,gauge:Y,layer:W,size:B,gaugeBg:C,gaugeOutline:P,transitionOpts:r,onComplete:m});var X=O.selectAll(\"g.bullet\").data(R?e:[]);X.exit().remove();var Z=O.selectAll(\"g.bulletaxis\").data(R?e:[]);Z.exit().remove(),R&&function(t,e,r,n){var i,a,o,s,c,u=r[0].trace,f=n.gauge,p=n.layer,g=n.gaugeBg,m=n.gaugeOutline,v=n.size,x=u.domain,b=n.transitionOpts,_=n.onComplete;f.enter().append(\"g\").classed(\"bullet\",!0),f.attr(\"transform\",l(v.l,v.t)),p.enter().append(\"g\").classed(\"bulletaxis\",!0).classed(\"crisp\",!0),p.selectAll(\"g.xbulletaxistick,path,text\").remove();var A=v.h,M=u.gauge.bar.thickness*A,S=x.x[0],E=x.x[0]+(x.x[1]-x.x[0])*(u._hasNumber||u._hasDelta?1-h.bulletNumberDomainSize:1);(i=k(t,u.gauge.axis))._id=\"xbulletaxis\",i.domain=[S,E],i.setScale(),a=d.calcTicks(i),o=d.makeTransTickFn(i),s=d.getTickSigns(i)[2],c=v.t+v.h,i.visible&&(d.drawTicks(t,i,{vals:\"inside\"===i.ticks?d.clipEnds(i,a):a,layer:p,path:d.makeTickPath(i,c,s),transFn:o}),d.drawLabels(t,i,{vals:a,layer:p,transFn:o,labelFns:d.makeLabelFns(i,c)}));function L(t){t.attr(\"width\",(function(t){return Math.max(0,i.c2p(t.range[1])-i.c2p(t.range[0]))})).attr(\"x\",(function(t){return i.c2p(t.range[0])})).attr(\"y\",(function(t){return.5*(1-t.thickness)*A})).attr(\"height\",(function(t){return t.thickness*A}))}var C=[g].concat(u.gauge.steps),P=f.selectAll(\"g.bg-bullet\").data(C);P.enter().append(\"g\").classed(\"bg-bullet\",!0).append(\"rect\"),P.select(\"rect\").call(L).call(T),P.exit().remove();var I=f.selectAll(\"g.value-bullet\").data([u.gauge.bar]);I.enter().append(\"g\").classed(\"value-bullet\",!0).append(\"rect\"),I.select(\"rect\").attr(\"height\",M).attr(\"y\",(A-M)/2).call(T),w(b)?I.select(\"rect\").transition().duration(b.duration).ease(b.easing).each(\"end\",(function(){_&&_()})).each(\"interrupt\",(function(){_&&_()})).attr(\"width\",Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y)))):I.select(\"rect\").attr(\"width\",\"number\"==typeof r[0].y?Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y))):0);I.exit().remove();var O=r.filter((function(){return u.gauge.threshold.value||0===u.gauge.threshold.value})),z=f.selectAll(\"g.threshold-bullet\").data(O);z.enter().append(\"g\").classed(\"threshold-bullet\",!0).append(\"line\"),z.select(\"line\").attr(\"x1\",i.c2p(u.gauge.threshold.value)).attr(\"x2\",i.c2p(u.gauge.threshold.value)).attr(\"y1\",(1-u.gauge.threshold.thickness)/2*A).attr(\"y2\",(1-(1-u.gauge.threshold.thickness)/2)*A).call(y.stroke,u.gauge.threshold.line.color).style(\"stroke-width\",u.gauge.threshold.line.width),z.exit().remove();var D=f.selectAll(\"g.gauge-outline\").data([m]);D.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"rect\"),D.select(\"rect\").call(L).call(T),D.exit().remove()}(t,0,e,{gauge:X,layer:Z,size:B,gaugeBg:C,gaugeOutline:P,transitionOpts:r,onComplete:m});var J=O.selectAll(\"text.title\").data(e);J.exit().remove(),J.enter().append(\"text\").classed(\"title\",!0),J.attr(\"text-anchor\",(function(){return R?x.right:x[I.title.align]})).text(I.title.text).call(f.font,I.title.font).call(p.convertToTspans,t),J.attr(\"transform\",(function(){var t,e=B.l+B.w*b[I.title.align],r=h.titlePadding,n=f.bBox(J.node());if(z){if(D)if(I.gauge.axis.visible)t=f.bBox(W.node()).top-r-n.bottom;else t=B.t+B.h/2-U/2-n.bottom-r;R&&(t=E-(n.top+n.bottom)/2,e=B.l-h.bulletPadding*B.w)}else t=I._numbersTop-r-n.bottom;return l(e,t)}))}))}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../plots/cartesian/axis_defaults\":556,\"../../plots/cartesian/layout_attributes\":569,\"../../plots/cartesian/position_defaults\":572,\"./constants\":858,\"@plotly/d3\":58,\"d3-interpolate\":116}],862:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../mesh3d/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=t(\"../../plot_api/edit_types\").overrideAll;var u=e.exports=c(l({x:{valType:\"data_array\"},y:{valType:\"data_array\"},z:{valType:\"data_array\"},value:{valType:\"data_array\"},isomin:{valType:\"number\"},isomax:{valType:\"number\"},surface:{show:{valType:\"boolean\",dflt:!0},count:{valType:\"integer\",dflt:2,min:1},fill:{valType:\"number\",min:0,max:1,dflt:1},pattern:{valType:\"flaglist\",flags:[\"A\",\"B\",\"C\",\"D\",\"E\"],extras:[\"all\",\"odd\",\"even\"],dflt:\"all\"}},spaceframe:{show:{valType:\"boolean\",dflt:!1},fill:{valType:\"number\",min:0,max:1,dflt:.15}},slices:{x:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}},y:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}},z:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}},y:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}},z:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}}},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:a(),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),valuehoverformat:i(\"value\",1),showlegend:l({},s.showlegend,{dflt:!1})},n(\"\",{colorAttr:\"`value`\",showScaleDflt:!0,editTypeOverride:\"calc\"}),{opacity:o.opacity,lightposition:o.lightposition,lighting:o.lighting,flatshading:o.flatshading,contour:o.contour,hoverinfo:l({},s.hoverinfo)}),\"calc\",\"nested\");u.flatshading.dflt=!0,u.lighting.facenormalsepsilon.dflt=0,u.x.editType=u.y.editType=u.z.editType=u.value.editType=\"calc+clearAxisTypes\",u.transforms=void 0},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/edit_types\":536,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../mesh3d/attributes\":867}],863:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\"),i=t(\"../streamtube/calc\").processGrid,a=t(\"../streamtube/calc\").filter;e.exports=function(t,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length),e._x=a(e.x,e._len),e._y=a(e.y,e._len),e._z=a(e.z,e._len),e._value=a(e.value,e._len);var r=i(e);e._gridFill=r.fill,e._Xs=r.Xs,e._Ys=r.Ys,e._Zs=r.Zs,e._len=r.len;for(var o=1/0,s=-1/0,l=0;l0;r--){var n=Math.min(e[r],e[r-1]),i=Math.max(e[r],e[r-1]);if(i>n&&n-1}function R(t,e){return null===t?e:t}function F(e,r,n){C();var i,a,o,l=[r],c=[n];if(s>=1)l=[r],c=[n];else if(s>0){var u=function(t,e){var r=t[0],n=t[1],i=t[2],a=function(t,e,r){for(var n=[],i=0;i-1?n[p]:L(d,g,v);h[p]=x>-1?x:I(d,g,v,R(e,y))}i=h[0],a=h[1],o=h[2],t._meshI.push(i),t._meshJ.push(a),t._meshK.push(o),++m}}function B(t,e,r,n){var i=t[3];in&&(i=n);for(var a=(t[3]-i)/(t[3]-e[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*t[s]+a*e[s];return o}function N(t,e,r){return t>=e&&t<=r}function j(t){var e=.001*(E-S);return t>=S-e&&t<=E+e}function U(e){for(var r=[],n=0;n<4;n++){var i=e[n];r.push([t._x[i],t._y[i],t._z[i],t._value[i]])}return r}function V(t,e,r,n,i,a){a||(a=1),r=[-1,-1,-1];var o=!1,s=[N(e[0][3],n,i),N(e[1][3],n,i),N(e[2][3],n,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(t,e,r){return j(e[0][3])&&j(e[1][3])&&j(e[2][3])?(F(t,e,r),!0):a<3&&V(t,e,r,S,E,++a)};if(s[0]&&s[1]&&s[2])return l(t,e,r)||o;var c=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach((function(a){if(s[a[0]]&&s[a[1]]&&!s[a[2]]){var u=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(h,u,n,i),d=B(h,f,n,i);o=l(t,[d,p,u],[-1,-1,r[a[0]]])||o,o=l(t,[u,f,d],[r[a[0]],r[a[1]],-1])||o,c=!0}})),c||[[0,1,2],[1,2,0],[2,0,1]].forEach((function(a){if(s[a[0]]&&!s[a[1]]&&!s[a[2]]){var u=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(f,u,n,i),d=B(h,u,n,i);o=l(t,[d,p,u],[-1,-1,r[a[0]]])||o,c=!0}})),o}function H(t,e,r,n){var i=!1,a=U(e),o=[N(a[0][3],r,n),N(a[1][3],r,n),N(a[2][3],r,n),N(a[3][3],r,n)];if(!(o[0]||o[1]||o[2]||o[3]))return i;if(o[0]&&o[1]&&o[2]&&o[3])return g&&(i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(3,0,1),n(2,3,0),n(1,2,3)}(t,a,e)||i),i;var s=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]];if(g)i=F(t,[c,u,f],[e[l[0]],e[l[1]],e[l[2]]])||i;else{var p=B(h,c,r,n),d=B(h,u,r,n),m=B(h,f,r,n);i=F(null,[p,d,m],[-1,-1,-1])||i}s=!0}})),s?i:([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(f,c,r,n),d=B(f,u,r,n),m=B(h,u,r,n),v=B(h,c,r,n);g?(i=F(t,[c,v,p],[e[l[0]],-1,-1])||i,i=F(t,[u,d,m],[e[l[1]],-1,-1])||i):i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(2,3,0)}(null,[p,d,m,v],[-1,-1,-1,-1])||i,s=!0}})),s||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach((function(l){if(o[l[0]]&&!o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(u,c,r,n),d=B(f,c,r,n),m=B(h,c,r,n);g?(i=F(t,[c,p,d],[e[l[0]],-1,-1])||i,i=F(t,[c,d,m],[e[l[0]],-1,-1])||i,i=F(t,[c,m,p],[e[l[0]],-1,-1])||i):i=F(null,[p,d,m],[-1,-1,-1])||i,s=!0}})),i)}function q(t,e,r,n,i,a,o,s,l,c,u){var f=!1;return d&&(D(t,\"A\")&&(f=H(null,[e,r,n,a],c,u)||f),D(t,\"B\")&&(f=H(null,[r,n,i,l],c,u)||f),D(t,\"C\")&&(f=H(null,[r,a,o,l],c,u)||f),D(t,\"D\")&&(f=H(null,[n,a,s,l],c,u)||f),D(t,\"E\")&&(f=H(null,[r,n,a,l],c,u)||f)),g&&(f=H(t,[r,n,a,l],c,u)||f),f}function G(t,e,r,n,i,a,o,s){return[!0===s[0]||V(t,U([e,r,n]),[e,r,n],a,o),!0===s[1]||V(t,U([n,i,e]),[n,i,e],a,o)]}function Y(t,e,r,n,i,a,o,s,l){return s?G(t,e,r,i,n,a,o,l):G(t,r,i,n,e,a,o,l)}function W(t,e,r,n,i,a,o){var s,l,c,u,f=!1,h=function(){f=V(t,[s,l,c],[-1,-1,-1],i,a)||f,f=V(t,[c,u,s],[-1,-1,-1],i,a)||f},p=o[0],d=o[1],g=o[2];return p&&(s=O(U([k(e,r-0,n-0)])[0],U([k(e-1,r-0,n-0)])[0],p),l=O(U([k(e,r-0,n-1)])[0],U([k(e-1,r-0,n-1)])[0],p),c=O(U([k(e,r-1,n-1)])[0],U([k(e-1,r-1,n-1)])[0],p),u=O(U([k(e,r-1,n-0)])[0],U([k(e-1,r-1,n-0)])[0],p),h()),d&&(s=O(U([k(e-0,r,n-0)])[0],U([k(e-0,r-1,n-0)])[0],d),l=O(U([k(e-0,r,n-1)])[0],U([k(e-0,r-1,n-1)])[0],d),c=O(U([k(e-1,r,n-1)])[0],U([k(e-1,r-1,n-1)])[0],d),u=O(U([k(e-1,r,n-0)])[0],U([k(e-1,r-1,n-0)])[0],d),h()),g&&(s=O(U([k(e-0,r-0,n)])[0],U([k(e-0,r-0,n-1)])[0],g),l=O(U([k(e-0,r-1,n)])[0],U([k(e-0,r-1,n-1)])[0],g),c=O(U([k(e-1,r-1,n)])[0],U([k(e-1,r-1,n-1)])[0],g),u=O(U([k(e-1,r-0,n)])[0],U([k(e-1,r-0,n-1)])[0],g),h()),f}function X(t,e,r,n,i,a,o,s,l,c,u,f){var h=t;return f?(d&&\"even\"===t&&(h=null),q(h,e,r,n,i,a,o,s,l,c,u)):(d&&\"odd\"===t&&(h=null),q(h,l,s,o,a,i,n,r,e,c,u))}function Z(t,e,r,n,i){for(var a=[],o=0,s=0;sMath.abs(d-M)?[A,d]:[d,M];$(e,T[0],T[1])}}var L=[[Math.min(S,M),Math.max(S,M)],[Math.min(A,E),Math.max(A,E)]];[\"x\",\"y\",\"z\"].forEach((function(e){for(var r=[],n=0;n0&&(u.push(p.id),\"x\"===e?f.push([p.distRatio,0,0]):\"y\"===e?f.push([0,p.distRatio,0]):f.push([0,0,p.distRatio]))}else c=nt(1,\"x\"===e?b-1:\"y\"===e?_-1:w-1);u.length>0&&(r[i]=\"x\"===e?tt(null,u,a,o,f,r[i]):\"y\"===e?et(null,u,a,o,f,r[i]):rt(null,u,a,o,f,r[i]),i++),c.length>0&&(r[i]=\"x\"===e?Z(null,c,a,o,r[i]):\"y\"===e?J(null,c,a,o,r[i]):K(null,c,a,o,r[i]),i++)}var d=t.caps[e];d.show&&d.fill&&(z(d.fill),r[i]=\"x\"===e?Z(null,[0,b-1],a,o,r[i]):\"y\"===e?J(null,[0,_-1],a,o,r[i]):K(null,[0,w-1],a,o,r[i]),i++)}})),0===m&&P(),t._meshX=n,t._meshY=i,t._meshZ=a,t._meshIntensity=o,t._Xs=v,t._Ys=y,t._Zs=x}(),t}e.exports={findNearestOnAxis:l,generateIsoMeshes:h,createIsosurfaceTrace:function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new c(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}}},{\"../../../stackgl_modules\":1120,\"../../components/colorscale\":378,\"../../lib/gl_format_color\":499,\"../../lib/str2rgbarray\":528,\"../../plots/gl3d/zip3\":609}],865:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"./attributes\"),o=t(\"../../components/colorscale/defaults\");function s(t,e,r,n,a){var s=a(\"isomin\"),l=a(\"isomax\");null!=l&&null!=s&&s>l&&(e.isomin=null,e.isomax=null);var c=a(\"x\"),u=a(\"y\"),f=a(\"z\"),h=a(\"value\");c&&c.length&&u&&u.length&&f&&f.length&&h&&h.length?(i.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\",\"z\"],n),a(\"valuehoverformat\"),[\"x\",\"y\",\"z\"].forEach((function(t){a(t+\"hoverformat\");var e=\"caps.\"+t;a(e+\".show\")&&a(e+\".fill\");var r=\"slices.\"+t;a(r+\".show\")&&(a(r+\".fill\"),a(r+\".locations\"))})),a(\"spaceframe.show\")&&a(\"spaceframe.fill\"),a(\"surface.show\")&&(a(\"surface.count\"),a(\"surface.fill\"),a(\"surface.pattern\")),a(\"contour.show\")&&(a(\"contour.color\"),a(\"contour.width\")),[\"text\",\"hovertext\",\"hovertemplate\",\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lighting.vertexnormalsepsilon\",\"lighting.facenormalsepsilon\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"flatshading\",\"opacity\"].forEach((function(t){a(t)})),o(t,e,n,a,{prefix:\"\",cLetter:\"c\"}),e._length=null):e.visible=!1}e.exports={supplyDefaults:function(t,e,r,i){s(t,e,r,i,(function(r,i){return n.coerce(t,e,a,r,i)}))},supplyIsoDefaults:s}},{\"../../components/colorscale/defaults\":376,\"../../lib\":503,\"../../registry\":638,\"./attributes\":862}],866:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,calc:t(\"./calc\"),colorbar:{min:\"cmin\",max:\"cmax\"},plot:t(\"./convert\").createIsosurfaceTrace,moduleType:\"trace\",name:\"isosurface\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"showLegend\"],meta:{}}},{\"../../plots/gl3d\":598,\"./attributes\":862,\"./calc\":863,\"./convert\":864,\"./defaults\":865}],867:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../surface/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat;e.exports=l({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\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:a({editType:\"calc\"}),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),delaunayaxis:{valType:\"enumerated\",values:[\"x\",\"y\",\"z\"],dflt:\"z\",editType:\"calc\"},alphahull:{valType:\"number\",dflt:-1,editType:\"calc\"},intensity:{valType:\"data_array\",editType:\"calc\"},intensitymode:{valType:\"enumerated\",values:[\"vertex\",\"cell\"],dflt:\"vertex\",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\"}),{opacity:o.opacity,flatshading:{valType:\"boolean\",dflt:!1,editType:\"calc\"},contour:{show:l({},o.contours.x.show,{}),color:o.contours.x.color,width:o.contours.x.width,editType:\"calc\"},lightposition:{x:l({},o.lightposition.x,{dflt:1e5}),y:l({},o.lightposition.y,{dflt:1e5}),z:l({},o.lightposition.z,{dflt:0}),editType:\"calc\"},lighting:l({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\"},o.lighting),hoverinfo:l({},s.hoverinfo,{editType:\"calc\"}),showlegend:l({},s.showlegend,{dflt:!1})})},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../surface/attributes\":1057}],868:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.intensity&&n(t,e,{vals:e.intensity,containerStr:\"\",cLetter:\"c\"})}},{\"../../components/colorscale/calc\":374}],869:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_mesh3d,i=t(\"../../../stackgl_modules\").delaunay_triangulate,a=t(\"../../../stackgl_modules\").alpha_shape,o=t(\"../../../stackgl_modules\").convex_hull,s=t(\"../../lib/gl_format_color\").parseColorScale,l=t(\"../../lib/str2rgbarray\"),c=t(\"../../components/colorscale\").extractOpts,u=t(\"../../plots/gl3d/zip3\");function f(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name=\"\",this.color=\"#fff\",this.data=null,this.showContour=!1}var h=f.prototype;function p(t){for(var e=[],r=t.length,n=0;n=e-.5)return!1;return!0}h.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.data._cellCenter?t.traceCoordinate=t.data.dataCoordinate:t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},h.update=function(t){var e=this.scene,r=e.fullSceneLayout;this.data=t;var n,f=t.x.length,h=u(d(r.xaxis,t.x,e.dataScale[0],t.xcalendar),d(r.yaxis,t.y,e.dataScale[1],t.ycalendar),d(r.zaxis,t.z,e.dataScale[2],t.zcalendar));if(t.i&&t.j&&t.k){if(t.i.length!==t.j.length||t.j.length!==t.k.length||!m(t.i,f)||!m(t.j,f)||!m(t.k,f))return;n=u(g(t.i),g(t.j),g(t.k))}else n=0===t.alphahull?o(h):t.alphahull>0?a(t.alphahull,h):function(t,e){for(var r=[\"x\",\"y\",\"z\"].indexOf(t),n=[],a=e.length,o=0;ov):m=A>w,v=A;var M=c(w,T,k,A);M.pos=_,M.yc=(w+A)/2,M.i=b,M.dir=m?\"increasing\":\"decreasing\",M.x=M.pos,M.y=[k,T],y&&(M.orig_p=r[b]),d&&(M.tx=e.text[b]),g&&(M.htx=e.hovertext[b]),x.push(M)}else x.push({pos:_,empty:!0})}return e._extremes[l._id]=a.findExtremes(l,n.concat(h,f),{padded:!0}),x.length&&(x[0].t={labels:{open:i(t,\"open:\")+\" \",high:i(t,\"high:\")+\" \",low:i(t,\"low:\")+\" \",close:i(t,\"close:\")+\" \"}}),x}e.exports={calc:function(t,e){var r=a.getFromId(t,e.xaxis),i=a.getFromId(t,e.yaxis),s=function(t,e,r){var i=r._minDiff;if(!i){var a,s=t._fullData,l=[];for(i=1/0,a=0;a\"+c.labels[x]+n.hoverLabelText(s,b,l.yhoverformat):((y=i.extendFlat({},h)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=c.labels[x]+n.hoverLabelText(s,b,l.yhoverformat),y.name=\"\",f.push(y),m[b]=y)}return f}function h(t,e,r,i){var a=t.cd,o=t.ya,l=a[0].trace,f=a[0].t,h=u(t,e,r,i);if(!h)return[];var p=a[h.index],d=h.index=p.i,g=p.dir;function m(t){return f.labels[t]+n.hoverLabelText(o,l[t][d],l.yhoverformat)}var v=p.hi||l.hoverinfo,y=v.split(\"+\"),x=\"all\"===v,b=x||-1!==y.indexOf(\"y\"),_=x||-1!==y.indexOf(\"text\"),w=b?[m(\"open\"),m(\"high\"),m(\"low\"),m(\"close\")+\" \"+c[g]]:[];return _&&s(p,l,w),h.extraText=w.join(\"
\"),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?f(t,e,r,n):h(t,e,r,n)},hoverSplit:f,hoverOnPoints:h}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../constants/delta.js\":473,\"../../lib\":503,\"../../plots/cartesian/axes\":554}],876:[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\":568,\"./attributes\":872,\"./calc\":873,\"./defaults\":874,\"./hover\":875,\"./plot\":878,\"./select\":879,\"./style\":880}],877:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o=r(\"x\"),s=r(\"open\"),l=r(\"high\"),c=r(\"low\"),u=r(\"close\");if(r(\"hoverlabel.split\"),n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\"],a),s&&l&&c&&u){var f=Math.min(s.length,l.length,c.length,u.length);return o&&(f=Math.min(f,i.minRowLength(o))),e._length=f,f}}},{\"../../lib\":503,\"../../registry\":638}],878:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o=e.yaxis,s=e.xaxis,l=!!s.rangebreaks;i.makeTraceGroups(a,r,\"trace ohlc\").each((function(t){var e=n.select(this),r=t[0],a=r.t;if(!0!==r.trace.visible||a.empty)e.remove();else{var c=a.tickLen,u=e.selectAll(\"path\").data(i.identity);u.enter().append(\"path\"),u.exit().remove(),u.attr(\"d\",(function(t){if(t.empty)return\"M0,0Z\";var e=s.c2p(t.pos-c,!0),r=s.c2p(t.pos+c,!0),n=l?(e+r)/2:s.c2p(t.pos,!0);return\"M\"+e+\",\"+o.c2p(t.o,!0)+\"H\"+n+\"M\"+n+\",\"+o.c2p(t.h,!0)+\"V\"+o.c2p(t.l,!0)+\"M\"+r+\",\"+o.c2p(t.c,!0)+\"H\"+n}))}}))}},{\"../../lib\":503,\"@plotly/d3\":58}],879:[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=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;e0;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\"),s(\"line.hovertemplate\");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(\"hovertemplate\"),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 m={family:f.font.family,size:Math.round(f.font.size/1.2),color:f.font.color};n.coerceFont(h,\"tickfont\",m)}},{\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503,\"../../plots/array_container_defaults\":549,\"../../plots/domain\":584,\"../parcoords/merge_length\":897,\"./attributes\":881}],885:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcats\",basePlotModule:t(\"./base_plot\"),categories:[\"noOpacity\"],meta:{}}},{\"./attributes\":881,\"./base_plot\":882,\"./calc\":883,\"./defaults\":884,\"./plot\":887}],886:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-interpolate\").interpolateNumber,a=t(\"../../plot_api/plot_api\"),o=t(\"../../components/fx\"),s=t(\"../../lib\"),l=s.strTranslate,c=t(\"../../components/drawing\"),u=t(\"tinycolor2\"),f=t(\"../../lib/svg_text_utils\");function h(t,e,r,i){var a=t.map(F.bind(0,e,r)),o=i.selectAll(\"g.parcatslayer\").data([null]);o.enter().append(\"g\").attr(\"class\",\"parcatslayer\").style(\"pointer-events\",\"all\");var u=o.selectAll(\"g.trace.parcats\").data(a,p),h=u.enter().append(\"g\").attr(\"class\",\"trace parcats\");u.attr(\"transform\",(function(t){return l(t.x,t.y)})),h.append(\"g\").attr(\"class\",\"paths\");var y=u.select(\"g.paths\").selectAll(\"path.path\").data((function(t){return t.paths}),p);y.attr(\"fill\",(function(t){return t.model.color}));var x=y.enter().append(\"path\").attr(\"class\",\"path\").attr(\"stroke-opacity\",0).attr(\"fill\",(function(t){return t.model.color})).attr(\"fill-opacity\",0);_(x),y.attr(\"d\",(function(t){return t.svgD})),x.empty()||y.sort(g),y.exit().remove(),y.on(\"mouseover\",m).on(\"mouseout\",v).on(\"click\",b),h.append(\"g\").attr(\"class\",\"dimensions\");var w=u.select(\"g.dimensions\").selectAll(\"g.dimension\").data((function(t){return t.dimensions}),p);w.enter().append(\"g\").attr(\"class\",\"dimension\"),w.attr(\"transform\",(function(t){return l(t.x,0)})),w.exit().remove();var A=w.selectAll(\"g.category\").data((function(t){return t.categories}),p),M=A.enter().append(\"g\").attr(\"class\",\"category\");A.attr(\"transform\",(function(t){return l(0,t.y)})),M.append(\"rect\").attr(\"class\",\"catrect\").attr(\"pointer-events\",\"none\"),A.select(\"rect.catrect\").attr(\"fill\",\"none\").attr(\"width\",(function(t){return t.width})).attr(\"height\",(function(t){return t.height})),T(M);var S=A.selectAll(\"rect.bandrect\").data((function(t){return t.bands}),p);S.each((function(){s.raiseToTop(this)})),S.attr(\"fill\",(function(t){return t.color}));var E=S.enter().append(\"rect\").attr(\"class\",\"bandrect\").attr(\"stroke-opacity\",0).attr(\"fill\",(function(t){return t.color})).attr(\"fill-opacity\",0);S.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\"})),k(E),S.exit().remove(),M.append(\"text\").attr(\"class\",\"catlabel\").attr(\"pointer-events\",\"none\");var z=e._fullLayout.paper_bgcolor;A.select(\"text.catlabel\").attr(\"text-anchor\",(function(t){return d(t)?\"start\":\"end\"})).attr(\"alignment-baseline\",\"middle\").style(\"text-shadow\",f.makeTextShadow(z)).style(\"fill\",\"rgb(0, 0, 0)\").attr(\"x\",(function(t){return d(t)?t.width+5:-5})).attr(\"y\",(function(t){return t.height/2})).text((function(t){return t.model.categoryLabel})).each((function(t){c.font(n.select(this),t.parcatsViewModel.categorylabelfont),f.convertToTspans(n.select(this),e)})),M.append(\"text\").attr(\"class\",\"dimlabel\"),A.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){c.font(n.select(this),t.parcatsViewModel.labelfont)})),A.selectAll(\"rect.bandrect\").on(\"mouseover\",L).on(\"mouseout\",C),A.exit().remove(),w.call(n.behavior.drag().origin((function(t){return{x:t.x,y:0}})).on(\"dragstart\",P).on(\"drag\",I).on(\"dragend\",O)),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 p(t){return t.key}function d(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function g(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor\"),L=n.mouse(f)[0];o.loneHover({trace:h,x:b-d.left+g.left,y:_-d.top+g.top,text:E,color:t.model.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:10,fontColor:T,idealAlign:L1&&h.displayInd===f.dimensions.length-1?(i=c.left,a=\"left\"):(i=c.left+c.width,a=\"right\");var g=u.model.count,m=u.model.categoryLabel,v=g/u.parcatsViewModel.model.count,y={countLabel:g,categoryLabel:m,probabilityLabel:v.toFixed(3)},x=[];-1!==u.parcatsViewModel.hoverinfoItems.indexOf(\"count\")&&x.push([\"Count:\",y.countLabel].join(\" \")),-1!==u.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")&&x.push([\"P(\"+y.categoryLabel+\"):\",y.probabilityLabel].join(\" \"));var b=x.join(\"
\");return{trace:p,x:o*(i-e.left),y:s*(d-e.top),text:b,color:\"lightgray\",borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:12,fontColor:\"black\",idealAlign:a,hovertemplate:p.hovertemplate,hovertemplateLabels:y,eventData:[{data:p._input,fullData:p,count:g,category:m,probability:v}]}}function L(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,a=i._paperdiv.node().getBoundingClientRect(),l=t.parcatsViewModel.hoveron;if(\"color\"===l?(!function(t){var e=n.select(t).datum(),r=A(e);w(r),r.each((function(){s.raiseToTop(this)})),n.select(t.parentNode).selectAll(\"rect.bandrect\").filter((function(t){return t.color===e.color})).each((function(){s.raiseToTop(this),n.select(this).attr(\"stroke\",\"black\").attr(\"stroke-width\",1.5)}))}(this),S(this,\"plotly_hover\",n.event)):(!function(t){n.select(t.parentNode).selectAll(\"rect.bandrect\").each((function(t){var e=A(t);w(e),e.each((function(){s.raiseToTop(this)}))})),n.select(t.parentNode).select(\"rect.catrect\").attr(\"stroke\",\"black\").attr(\"stroke-width\",2.5)}(this),M(this,\"plotly_hover\",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf(\"none\"))\"category\"===l?e=E(r,a,this):\"color\"===l?e=function(t,e,r){t._fullLayout._calcInverseTransform(t);var i,a,o=t._fullLayout._invScaleX,s=t._fullLayout._invScaleY,l=r.getBoundingClientRect(),c=n.select(r).datum(),f=c.categoryViewModel,h=f.parcatsViewModel,p=h.model.dimensions[f.model.dimensionInd],d=h.trace,g=l.y+l.height/2;h.dimensions.length>1&&p.displayInd===h.dimensions.length-1?(i=l.left,a=\"left\"):(i=l.left+l.width,a=\"right\");var m=f.model.categoryLabel,v=c.parcatsViewModel.model.count,y=0;c.categoryViewModel.bands.forEach((function(t){t.color===c.color&&(y+=t.count)}));var x=f.model.count,b=0;h.pathSelection.each((function(t){t.model.color===c.color&&(b+=t.model.count)}));var _=y/v,w=y/b,T=y/x,k={countLabel:v,categoryLabel:m,probabilityLabel:_.toFixed(3)},A=[];-1!==f.parcatsViewModel.hoverinfoItems.indexOf(\"count\")&&A.push([\"Count:\",k.countLabel].join(\" \")),-1!==f.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")&&(A.push(\"P(color \\u2229 \"+m+\"): \"+k.probabilityLabel),A.push(\"P(\"+m+\" | color): \"+w.toFixed(3)),A.push(\"P(color | \"+m+\"): \"+T.toFixed(3)));var M=A.join(\"
\"),S=u.mostReadable(c.color,[\"black\",\"white\"]);return{trace:d,x:o*(i-e.left),y:s*(g-e.top),text:M,color:c.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontColor:S,fontSize:10,idealAlign:a,hovertemplate:d.hovertemplate,hovertemplateLabels:k,eventData:[{data:d._input,fullData:d,category:m,count:v,probability:_,categorycount:x,colorcount:b,bandcolorcount:y}]}}(r,a,this):\"dimension\"===l&&(e=function(t,e,r){var i=[];return n.select(r.parentNode.parentNode).selectAll(\"g.category\").select(\"rect.catrect\").each((function(){i.push(E(t,e,this))})),i}(r,a,this)),e&&o.loneHover(e,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r})}}function C(t){var e=t.parcatsViewModel;if(!e.dragDimension&&(_(e.pathSelection),T(e.dimensionSelection.selectAll(\"g.category\")),k(e.dimensionSelection.selectAll(\"g.category\").selectAll(\"rect.bandrect\")),o.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(g),-1===e.hoverinfoItems.indexOf(\"skip\"))){\"color\"===t.parcatsViewModel.hoveron?S(this,\"plotly_unhover\",n.event):M(this,\"plotly_unhover\",n.event)}}function P(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,s.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll(\"rect.bandrect\").each((function(e){e.yf.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.dragXp.x&&(a.model.displayInd=p.model.displayInd,p.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=a.model.displayInd}j(t.parcatsViewModel),N(t.parcatsViewModel),R(t.parcatsViewModel),D(t.parcatsViewModel)}}function O(t){if(\"fixed\"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll(\"text\").attr(\"font-weight\",\"normal\");var e={},r=z(t.parcatsViewModel),i=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),o=t.initialDragDimensionDisplayInds.some((function(t,e){return t!==i[e]}));o&&i.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?S(t.potentialClickBand,\"plotly_click\",n.event.sourceEvent):M(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,j(t.parcatsViewModel),N(t.parcatsViewModel),n.transition().duration(300).ease(\"cubic-in-out\").each((function(){R(t.parcatsViewModel,!0),D(t.parcatsViewModel,!0)})).each(\"end\",(function(){(o||s)&&a.restyle(t.parcatsViewModel.graphDiv,e,[r])}))}}function z(t){for(var e,r=t.graphDiv._fullData,n=0;n=0;s--)u+=\"C\"+c[s]+\",\"+(e[s+1]+n)+\" \"+l[s]+\",\"+(e[s]+n)+\" \"+(t[s]+r[s])+\",\"+(e[s]+n),u+=\"l-\"+r[s]+\",0 \";return u+=\"Z\"}function N(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)),ni?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;g0?d*(v.count/p):0;for(var y,x=new Array(n.length),b=0;b1?(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,m=e.categories.map((function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}}));for(m.sort((function(t,e){return t.displayInd-e.displayInd})),c=0;c0?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){h(r,t,n,e)}},{\"../../components/drawing\":388,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plot_api/plot_api\":540,\"@plotly/d3\":58,\"d3-interpolate\":116,tinycolor2:312}],887:[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\":886}],888:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/layout_attributes\"),a=t(\"../../plots/font_attributes\"),o=t(\"../../plots/domain\").attributes,s=t(\"../../lib/extend\").extendFlat,l=t(\"../../plot_api/plot_template\").templatedArray;e.exports={domain:o({name:\"parcoords\",trace:!0,editType:\"plot\"}),labelangle:{valType:\"angle\",dflt:0,editType:\"plot\"},labelside:{valType:\"enumerated\",values:[\"top\",\"bottom\"],dflt:\"top\",editType:\"plot\"},labelfont:a({editType:\"plot\"}),tickfont:a({editType:\"plot\"}),rangefont:a({editType:\"plot\"}),dimensions:l(\"dimension\",{label:{valType:\"string\",editType:\"plot\"},tickvals:s({},i.tickvals,{editType:\"plot\"}),ticktext:s({},i.ticktext,{editType:\"plot\"}),tickformat:s({},i.tickformat,{editType:\"plot\"}),visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},range:{valType:\"info_array\",items:[{valType:\"number\",editType:\"plot\"},{valType:\"number\",editType:\"plot\"}],editType:\"plot\"},constraintrange:{valType:\"info_array\",freeLength:!0,dimensions:\"1-2\",items:[{valType:\"any\",editType:\"plot\"},{valType:\"any\",editType:\"plot\"}],editType:\"plot\"},multiselect:{valType:\"boolean\",dflt:!0,editType:\"plot\"},values:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\"}),line:s({editType:\"calc\"},n(\"line\",{colorscaleDflt:\"Viridis\",autoColorDflt:!1,editTypeOverride:\"calc\"}))}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/plot_template\":543,\"../../plots/cartesian/layout_attributes\":569,\"../../plots/domain\":584,\"../../plots/font_attributes\":585}],889:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"@plotly/d3\"),a=t(\"../../lib/gup\").keyFun,o=t(\"../../lib/gup\").repeat,s=t(\"../../lib\").sorterAsc,l=t(\"../../lib\").strTranslate,c=n.bar.snapRatio;function u(t,e){return t*(1-c)+e*c}var f=n.bar.snapClose;function h(t,e){return t*(1-f)+e*f}function p(t,e,r,n){if(function(t,e){for(var r=0;r=e[r][0]&&t<=e[r][1])return!0;return!1}(r,n))return r;var i=t?-1:1,a=0,o=e.length-1;if(i<0){var s=a;a=o,o=s}for(var l=e[a],c=l,f=a;i*fe){h=r;break}}if(a=u,isNaN(a)&&(a=isNaN(f)||isNaN(h)?isNaN(f)?h:f:e-c[f][1]t[1]+r||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 m=t.unitTickvals,y=t.unitToPaddedPx.invert(e);for(r=0;r=x[0]&&y<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function w(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[r-a.grabPoint,r+a.barLength-a.grabPoint].map(e.unitToPaddedPx.invert):a.newExtent=[a.startExtent,e.unitToPaddedPx.invert(r)].sort(s),e.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(e),b(t.parentNode)}function T(t,e){var r=_(e,e.height-i.mouse(t)[1]-2*n.verticalPadding),a=\"crosshair\";r.clickableOrdinalRange?a=\"pointer\":r.region&&(a=r.region+\"-resize\"),i.select(document.body).style(\"cursor\",a)}function k(t){t.on(\"mousemove\",(function(t){i.event.preventDefault(),t.parent.inBrushDrag||T(this,t)})).on(\"mouseleave\",(function(t){t.parent.inBrushDrag||y()})).call(i.behavior.drag().on(\"dragstart\",(function(t){!function(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.unitToPaddedPx.invert(r),o=e.brush,s=_(e,r),l=s.interval,c=o.svgBrush;if(c.wasDragged=!1,c.grabbingBar=\"ns\"===s.region,c.grabbingBar){var u=l.map(e.unitToPaddedPx);c.grabPoint=r-u[0]-n.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=e.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter((function(t){return t[0]!==l[0]&&t[1]!==l[1]}))),c.startExtent=s.region?l[\"s\"===s.region?1:0]:a,e.parent.inBrushDrag=!0,c.brushStartCallback()}(this,t)})).on(\"drag\",(function(t){w(this,t)})).on(\"dragend\",(function(t){!function(t,e){var r=e.brush,n=r.filter,a=r.svgBrush;a._dragging||(T(t,e),w(t,e),e.brush.svgBrush.wasDragged=!1),a._dragging=!1,i.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,e.parent.inBrushDrag=!1,y(),!a.wasDragged)return a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&e.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&M(r)):M(r),a.brushCallback(e),b(t.parentNode),void a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(e.ordinal){var l=e.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(c?[a.newExtent]:[]),a.extent.length||M(r),a.brushCallback(e),c?b(t.parentNode,s):(s(),b(t.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,t)})))}function A(t,e){return t[0]-e[0]}function M(t){t.filterSpecified=!1,t.svgBrush.extent=[[-1/0,1/0]]}function S(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 1===n.length&&n[0][0]>n[0][1]&&(n=[]),n}e.exports={makeBrush:function(t,e,r,n,i,a){var o,l=function(){var t,e,r=[];return{set:function(n){1===(r=n.map((function(t){return t.slice().sort(s)})).sort(A)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),t=S(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,e){var r=t.selectAll(\".\"+n.cn.axisBrush).data(o,a);r.enter().append(\"g\").classed(n.cn.axisBrush,!0),function(t,e){var r=t.selectAll(\".background\").data(o);r.enter().append(\"rect\").classed(\"background\",!0).call(d).call(g).style(\"pointer-events\",\"auto\").attr(\"transform\",l(0,n.verticalPadding)),r.call(k).attr(\"height\",(function(t){return t.height-n.verticalPadding}));var i=t.selectAll(\".highlight-shadow\").data(o);i.enter().append(\"line\").classed(\"highlight-shadow\",!0).attr(\"x\",-n.bar.width/2).attr(\"stroke-width\",n.bar.width+n.bar.strokeWidth).attr(\"stroke\",e).attr(\"opacity\",n.bar.strokeOpacity).attr(\"stroke-linecap\",\"butt\"),i.attr(\"y1\",(function(t){return t.height})).call(x);var a=t.selectAll(\".highlight\").data(o);a.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\"),a.attr(\"y1\",(function(t){return t.height})).call(x)}(r,e)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map((function(t){return t.sort(s)})),t=e.multiselect?S(t.sort(A)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map((function(t){var e=[p(0,r,t[0],[]),p(1,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\":503,\"../../lib/gup\":500,\"./constants\":892,\"@plotly/d3\":58}],890:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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.style.width,height:this.style.height})})),window.setTimeout((function(){n.selectAll(\"#filterBarPattern\").attr(\"id\",\"filterBarPattern\")}),60)}},{\"../../constants/xmlns_namespaces\":480,\"../../plots/get_data\":593,\"./plot\":899,\"@plotly/d3\":58}],891:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray,i=t(\"../../components/colorscale\"),a=t(\"../../lib/gup\").wrap;e.exports=function(t,e){var r,o;return i.hasColorscale(e,\"line\")&&n(e.line.color)?(r=e.line.color,o=i.extractOpts(e.line).colorscale,i.calc(t,e,{vals:r,containerStr:\"line\",cLetter:\"c\"})):(r=function(t){for(var e=new Array(t),r=0;rf&&(n.log(\"parcoords traces support up to \"+f+\" dimensions at the moment\"),d.splice(f));var g=s(t,e,{name:\"dimensions\",layout:l,handleItemDefaults:p}),m=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,l,u);o(e,l,u),Array.isArray(g)&&g.length||(e.visible=!1),h(e,g,\"values\",m);var v={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(u,\"labelfont\",v),n.coerceFont(u,\"tickfont\",v),n.coerceFont(u,\"rangefont\",v),u(\"labelangle\"),u(\"labelside\")}},{\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503,\"../../plots/array_container_defaults\":549,\"../../plots/cartesian/axes\":554,\"../../plots/domain\":584,\"./attributes\":888,\"./axisbrush\":889,\"./constants\":892,\"./merge_length\":897}],894:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isTypedArray;r.convertTypedArray=function(t){return n(t)?Array.prototype.slice.call(t):t},r.isOrdinal=function(t){return!!t.tickvals},r.isVisible=function(t){return t.visible||!(\"visible\"in t)}},{\"../../lib\":503}],895:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcoords\",basePlotModule:t(\"./base_plot\"),categories:[\"gl\",\"regl\",\"noOpacity\",\"noHover\"],meta:{}}},{\"./attributes\":888,\"./base_plot\":890,\"./calc\":891,\"./defaults\":893,\"./plot\":899}],896:[function(t,e,r){\"use strict\";var n=t(\"glslify\"),i=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nattribute vec4 p01_04, p05_08, p09_12, p13_16,\\n p17_20, p21_24, p25_28, p29_32,\\n p33_36, p37_40, p41_44, p45_48,\\n p49_52, p53_56, p57_60, colors;\\n\\nuniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,\\n loA, hiA, loB, hiB, loC, hiC, loD, hiD;\\n\\nuniform vec2 resolution, viewBoxPos, viewBoxSize;\\nuniform float maskHeight;\\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\\nuniform vec4 contextColor;\\nuniform sampler2D maskTexture, palette;\\n\\nbool isPick = (drwLayer > 1.5);\\nbool isContext = (drwLayer < 0.5);\\n\\nconst vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);\\nconst vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);\\n\\nfloat val(mat4 p, mat4 v) {\\n return dot(matrixCompMult(p, v) * UNITS, UNITS);\\n}\\n\\nfloat axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {\\n float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);\\n float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);\\n return y1 * (1.0 - ratio) + y2 * ratio;\\n}\\n\\nint iMod(int a, int b) {\\n return a - b * (a / b);\\n}\\n\\nbool fOutside(float p, float lo, float hi) {\\n return (lo < hi) && (lo > p || p > hi);\\n}\\n\\nbool vOutside(vec4 p, vec4 lo, vec4 hi) {\\n return (\\n fOutside(p[0], lo[0], hi[0]) ||\\n fOutside(p[1], lo[1], hi[1]) ||\\n fOutside(p[2], lo[2], hi[2]) ||\\n fOutside(p[3], lo[3], hi[3])\\n );\\n}\\n\\nbool mOutside(mat4 p, mat4 lo, mat4 hi) {\\n return (\\n vOutside(p[0], lo[0], hi[0]) ||\\n vOutside(p[1], lo[1], hi[1]) ||\\n vOutside(p[2], lo[2], hi[2]) ||\\n vOutside(p[3], lo[3], hi[3])\\n );\\n}\\n\\nbool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {\\n return mOutside(A, loA, hiA) ||\\n mOutside(B, loB, hiB) ||\\n mOutside(C, loC, hiC) ||\\n mOutside(D, loD, hiD);\\n}\\n\\nbool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {\\n mat4 pnts[4];\\n pnts[0] = A;\\n pnts[1] = B;\\n pnts[2] = C;\\n pnts[3] = D;\\n\\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 if(0 == iMod(\\n int(255.0 * texture2D(maskTexture,\\n vec2(\\n (float(i * 2 + j / 2) + 0.5) / 8.0,\\n (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight\\n ))[3]\\n ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),\\n 2\\n )) return true;\\n }\\n }\\n }\\n return false;\\n}\\n\\nvec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {\\n float x = 0.5 * sign(v) + 0.5;\\n float y = axisY(x, A, B, C, D);\\n float z = 1.0 - abs(v);\\n\\n z += isContext ? 0.0 : 2.0 * float(\\n outsideBoundingBox(A, B, C, D) ||\\n outsideRasterMask(A, B, C, D)\\n );\\n\\n return vec4(\\n 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,\\n z,\\n 1.0\\n );\\n}\\n\\nvoid main() {\\n mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);\\n mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);\\n mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);\\n mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);\\n\\n float v = colors[3];\\n\\n gl_Position = position(isContext, v, A, B, C, D);\\n\\n fragColor =\\n isContext ? vec4(contextColor) :\\n isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));\\n}\\n\"]),a=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n gl_FragColor = fragColor;\\n}\\n\"]),o=t(\"./constants\").maxDimensionCount,s=t(\"../../lib\"),l=new Uint8Array(4),c=new Uint8Array(4),u={shape:[256,1],format:\"rgba\",type:\"uint8\",mag:\"nearest\",min:\"nearest\"};function f(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 h(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:l})}(t),r.drawCompleted=!0),function s(l){var c=Math.min(n,i-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],f(t,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),r.clearOnly||(a.count=2*c,a.offset=2*l*n,e(a),l*n+c>>8*e)%256/255}function g(t,e,r){for(var n=new Array(8*e),i=0,a=0;au&&(u=t[i].dim1.canvasX,o=i);0===s&&f(T,0,0,r.canvasWidth,r.canvasHeight);var p=function(t){var e,r,n,i=[[],[]];for(n=0;n<64;n++){var a=!t&&no._length&&(S=S.slice(0,o._length));var L,C=o.tickvals;function P(t,e){return{val:t,text:L[e]}}function I(t,e){return t.val-e.val}if(Array.isArray(C)&&C.length){L=o.ticktext,Array.isArray(L)&&L.length?L.length>C.length?L=L.slice(0,C.length):C.length>L.length&&(C=C.slice(0,L.length)):L=C.map(a(o.tickformat));for(var O=1;O=r||l>=i)return;var c=t.lineLayer.readPixel(s,i-1-l),u=0!==c[3],f=u?c[2]+256*(c[1]+256*c[0]):null,h={x:s,y:l,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:f};f!==B&&(u?a.hover(h):a.unhover&&a.unhover(h),B=f)}})),F.style(\"opacity\",(function(t){return t.pick?0:1})),h.style(\"background\",\"rgba(255, 255, 255, 0)\");var N=h.selectAll(\".\"+y.cn.parcoords).data(R,d);N.exit().remove(),N.enter().append(\"g\").classed(y.cn.parcoords,!0).style(\"shape-rendering\",\"crispEdges\").style(\"pointer-events\",\"none\"),N.attr(\"transform\",(function(t){return c(t.model.translateX,t.model.translateY)}));var j=N.selectAll(\".\"+y.cn.parcoordsControlView).data(g,d);j.enter().append(\"g\").classed(y.cn.parcoordsControlView,!0),j.attr(\"transform\",(function(t){return c(t.model.pad.l,t.model.pad.t)}));var U=j.selectAll(\".\"+y.cn.yAxis).data((function(t){return t.dimensions}),d);U.enter().append(\"g\").classed(y.cn.yAxis,!0),j.each((function(t){O(U,t,_)})),F.each((function(t){if(t.viewModel){!t.lineLayer||a?t.lineLayer=b(this,t):t.lineLayer.update(t),(t.key||0===t.key)&&(t.viewModel[t.key]=t.lineLayer);var e=!t.context||a;t.lineLayer.render(t.viewModel.panels,e)}})),U.attr(\"transform\",(function(t){return c(t.xScale(t.xIndex),0)})),U.call(n.behavior.drag().origin((function(t){return t})).on(\"drag\",(function(t){var e=t.parent;S.linePickActive(!1),t.x=Math.max(-y.overdrag,Math.min(t.model.width+y.overdrag,n.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,U.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})),O(U,e,_),U.filter((function(e){return 0!==Math.abs(t.xIndex-e.xIndex)})).attr(\"transform\",(function(t){return c(t.xScale(t.xIndex),0)})),n.select(this).attr(\"transform\",c(t.x,0)),U.each((function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!E(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,O(U,e,_),n.select(this).attr(\"transform\",(function(t){return c(t.x,0)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!E(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),S.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(e.key,e.dimensions.map((function(t){return t.crossfilterDimensionIndex})))}))),U.exit().remove();var V=U.selectAll(\".\"+y.cn.axisOverlays).data(g,d);V.enter().append(\"g\").classed(y.cn.axisOverlays,!0),V.selectAll(\".\"+y.cn.axis).remove();var H=V.selectAll(\".\"+y.cn.axis).data(g,d);H.enter().append(\"g\").classed(y.cn.axis,!0),H.each((function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,i=r.domain();n.select(this).call(n.svg.axis().orient(\"left\").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?i:null).tickFormat((function(e){return v.isOrdinal(t)?e:z(t.model.dimensions[t.visibleIndex],e)})).scale(r)),f.font(H.selectAll(\"text\"),t.model.tickFont)})),H.selectAll(\".domain, .tick>line\").attr(\"fill\",\"none\").attr(\"stroke\",\"black\").attr(\"stroke-opacity\",.25).attr(\"stroke-width\",\"1px\"),H.selectAll(\"text\").style(\"text-shadow\",u.makeTextShadow(T)).style(\"cursor\",\"default\");var q=V.selectAll(\".\"+y.cn.axisHeading).data(g,d);q.enter().append(\"g\").classed(y.cn.axisHeading,!0);var G=q.selectAll(\".\"+y.cn.axisTitle).data(g,d);G.enter().append(\"text\").classed(y.cn.axisTitle,!0).attr(\"text-anchor\",\"middle\").style(\"cursor\",\"ew-resize\").style(\"pointer-events\",\"auto\"),G.text((function(t){return t.label})).each((function(e){var r=n.select(this);f.font(r,e.model.labelFont),u.convertToTspans(r,t)})).attr(\"transform\",(function(t){var e=I(t.model.labelAngle,t.model.labelSide),r=y.axisTitleOffset;return(e.dir>0?\"\":c(0,2*r+t.model.height))+l(e.degrees)+c(-r*e.dx,-r*e.dy)})).attr(\"text-anchor\",(function(t){var e=I(t.model.labelAngle,t.model.labelSide);return 2*Math.abs(e.dx)>Math.abs(e.dy)?e.dir*e.dx<0?\"start\":\"end\":\"middle\"}));var Y=V.selectAll(\".\"+y.cn.axisExtent).data(g,d);Y.enter().append(\"g\").classed(y.cn.axisExtent,!0);var W=Y.selectAll(\".\"+y.cn.axisExtentTop).data(g,d);W.enter().append(\"g\").classed(y.cn.axisExtentTop,!0),W.attr(\"transform\",c(0,-y.axisExtentOffset));var X=W.selectAll(\".\"+y.cn.axisExtentTopText).data(g,d);X.enter().append(\"text\").classed(y.cn.axisExtentTopText,!0).call(P),X.text((function(t){return D(t,!0)})).each((function(t){f.font(n.select(this),t.model.rangeFont)}));var Z=Y.selectAll(\".\"+y.cn.axisExtentBottom).data(g,d);Z.enter().append(\"g\").classed(y.cn.axisExtentBottom,!0),Z.attr(\"transform\",(function(t){return c(0,t.model.height+y.axisExtentOffset)}));var J=Z.selectAll(\".\"+y.cn.axisExtentBottomText).data(g,d);J.enter().append(\"text\").classed(y.cn.axisExtentBottomText,!0).attr(\"dy\",\"0.75em\").call(P),J.text((function(t){return D(t,!1)})).each((function(t){f.font(n.select(this),t.model.rangeFont)})),x.ensureAxisBrush(V,T)}},{\"../../components/colorscale\":378,\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/gup\":500,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"./axisbrush\":889,\"./constants\":892,\"./helpers\":894,\"./lines\":896,\"@plotly/d3\":58,\"color-rgba\":91}],899:[function(t,e,r){\"use strict\";var n=t(\"./parcoords\"),i=t(\"../../lib/prepare_regl\"),a=t(\"./helpers\").isVisible;function o(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return-1===i&&(i+=e.length),i}e.exports=function(t,e){var r=t._fullLayout;if(i(t)){var s={},l={},c={},u={},f=r._size;e.forEach((function(e,r){var n=e[0].trace;c[r]=n.index;var i=u[r]=n._fullInput.index;s[r]=t.data[i].dimensions,l[r]=t.data[i].dimensions.slice()}));n(t,e,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{filterChanged:function(e,n,i){var a=l[e][n],o=i.map((function(t){return t.slice()})),s=\"dimensions[\"+n+\"].constraintrange\",f=r._tracePreGUI[t._fullData[c[e]]._fullInput.uid];if(void 0===f[s]){var h=a.constraintrange;f[s]=h||null}var p=t._fullData[c[e]].dimensions[n];o.length?(1===o.length&&(o=o[0]),a.constraintrange=o,p.constraintrange=o.slice(),o=[o]):(delete a.constraintrange,delete p.constraintrange,o=null);var d={};d[s]=o,t.emit(\"plotly_restyle\",[d,[u[e]]])},hover:function(e){t.emit(\"plotly_hover\",e)},unhover:function(e){t.emit(\"plotly_unhover\",e)},axesMoved:function(e,r){var n=function(t,e){return function(r,n){return o(t,e,r)-o(t,e,n)}}(r,l[e].filter(a));s[e].sort(n),l[e].filter((function(t){return!a(t)})).sort((function(t){return l[e].indexOf(t)})).forEach((function(t){s[e].splice(s[e].indexOf(t),1),s[e].splice(l[e].indexOf(t),0,t)})),t.emit(\"plotly_restyle\",[{dimensions:[s[e]]},[u[e]]])}})}}},{\"../../lib/prepare_regl\":516,\"./helpers\":894,\"./parcoords\":898}],900:[function(t,e,r){\"use strict\";var n=t(\"../../plots/attributes\"),i=t(\"../../plots/domain\").attributes,a=t(\"../../plots/font_attributes\"),o=t(\"../../components/color/attributes\"),s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../plots/template_attributes\").texttemplateAttrs,c=t(\"../../lib/extend\").extendFlat,u=a({editType:\"plot\",arrayOk:!0,colorEditType:\"plot\"});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:o.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:\"plot\"},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:c({},n.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:s({},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),texttemplate:l({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),textposition:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"auto\",\"none\"],dflt:\"auto\",arrayOk:!0,editType:\"plot\"},textfont:c({},u,{}),insidetextorientation:{valType:\"enumerated\",values:[\"horizontal\",\"radial\",\"tangential\",\"auto\"],dflt:\"auto\",editType:\"plot\"},insidetextfont:c({},u,{}),outsidetextfont:c({},u,{}),automargin:{valType:\"boolean\",dflt:!1,editType:\"plot\"},title:{text:{valType:\"string\",dflt:\"\",editType:\"plot\"},font:c({},u,{}),position:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle center\",\"bottom left\",\"bottom center\",\"bottom right\"],editType:\"plot\"},editType:\"plot\"},domain:i({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\"},_deprecated:{title:{valType:\"string\",dflt:\"\",editType:\"calc\"},titlefont:c({},u,{}),titleposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle center\",\"bottom left\",\"bottom center\",\"bottom right\"],editType:\"calc\"}}}},{\"../../components/color/attributes\":365,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/domain\":584,\"../../plots/font_attributes\":585,\"../../plots/template_attributes\":633}],901:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"pie\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":619}],902:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"tinycolor2\"),a=t(\"../../components/color\"),o={};function s(t){return function(e,r){return!!e&&(!!(e=i(e)).isValid()&&(e=a.addOpacity(e,e.getAlpha()),t[r]||(t[r]=e),e))}}function l(t,e){var r,n=JSON.stringify(t),a=e[n];if(!a){for(a=t.slice(),r=0;r=0})),(\"funnelarea\"===e.type?v:e.sort)&&a.sort((function(t,e){return e.v-t.v})),a[0]&&(a[0].vTotal=m),a},crossTraceCalc:function(t,e){var r=(e||{}).type;r||(r=\"pie\");var n=t._fullLayout,i=t.calcdata,a=n[r+\"colorway\"],s=n[\"_\"+r+\"colormap\"];n[\"extend\"+r+\"colors\"]&&(a=l(a,o));for(var c=0,u=0;u0){s=!0;break}}s||(o=0)}return{hasLabels:r,hasValues:a,len:o}}e.exports={handleLabelsAndValues:l,supplyDefaults:function(t,e,r,n){function c(r,n){return i.coerce(t,e,a,r,n)}var u=l(c(\"labels\"),c(\"values\")),f=u.len;if(e._hasLabels=u.hasLabels,e._hasValues=u.hasValues,!e._hasLabels&&e._hasValues&&(c(\"label0\"),c(\"dlabel\")),f){e._length=f,c(\"marker.line.width\")&&c(\"marker.line.color\"),c(\"marker.colors\"),c(\"scalegroup\");var h,p=c(\"text\"),d=c(\"texttemplate\");if(d||(h=c(\"textinfo\",Array.isArray(p)?\"text+percent\":\"percent\")),c(\"hovertext\"),c(\"hovertemplate\"),d||h&&\"none\"!==h){var g=c(\"textposition\");s(t,e,n,c,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||\"auto\"===g||\"outside\"===g)&&c(\"automargin\"),(\"inside\"===g||\"auto\"===g||Array.isArray(g))&&c(\"insidetextorientation\")}o(e,n,c);var m=c(\"hole\");if(c(\"title.text\")){var v=c(\"title.position\",m?\"middle center\":\"top center\");m||\"middle center\"!==v||(e.title.position=\"top center\"),i.coerceFont(c,\"title.font\",n.font)}c(\"sort\"),c(\"direction\"),c(\"rotation\"),c(\"pull\")}else e.visible=!1}}},{\"../../lib\":503,\"../../plots/domain\":584,\"../bar/defaults\":652,\"./attributes\":900,\"fast-isnumeric\":190}],904:[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,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return 1===t.pts.length&&(r.pointNumber=r.i=t.pts[0]),n(r,e,t.pts),\"funnelarea\"===e.type&&(delete r.v,delete r.i),r}},{\"../../components/fx/helpers\":402}],905:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");function i(t){return-1!==t.indexOf(\"e\")?t.replace(/[.]?0+e/,\"e\"):-1!==t.indexOf(\".\")?t.replace(/[.]?0+$/,\"\"):t}r.formatPiePercent=function(t,e){var r=i((100*t).toPrecision(3));return n.numSeparate(r,e)+\"%\"},r.formatPieValue=function(t,e){var r=i(t.toPrecision(10));return n.numSeparate(r,e)},r.getFirstFilled=function(t,e){if(Array.isArray(t))for(var r=0;r\"),name:f.hovertemplate||-1!==h.indexOf(\"name\")?f.name:void 0,idealAlign:t.pxmid[0]<0?\"left\":\"right\",color:m.castOption(_.bgcolor,t.pts)||t.color,borderColor:m.castOption(_.bordercolor,t.pts),fontFamily:m.castOption(w.family,t.pts),fontSize:m.castOption(w.size,t.pts),fontColor:m.castOption(w.color,t.pts),nameLength:m.castOption(_.namelength,t.pts),textAlign:m.castOption(_.align,t.pts),hovertemplate:m.castOption(f.hovertemplate,t.pts),hovertemplateLabels:t,eventData:[v(t,f)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e,inOut_bbox:T}),t.bbox=T[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,e.emit(\"plotly_hover\",{points:[v(t,f)],event:n.event})}})),t.on(\"mouseout\",(function(t){var r=e._fullLayout,i=e._fullData[c.index],o=n.select(this).datum();c._hasHoverEvent&&(t.originalEvent=n.event,e.emit(\"plotly_unhover\",{points:[v(o,i)],event:n.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(a.loneUnhover(r._hoverlayer.node()),c._hasHoverLabel=!1)})),t.on(\"click\",(function(t){var r=e._fullLayout,i=e._fullData[c.index];e._dragging||!1===r.hovermode||(e._hoverdata=[v(t,i)],a.click(e,n.event))}))}function b(t,e,r){var n=m.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=m.castOption(t._input.textfont.color,e.pts));var i=m.castOption(t.insidetextfont.family,e.pts)||m.castOption(t.textfont.family,e.pts)||r.family,a=m.castOption(t.insidetextfont.size,e.pts)||m.castOption(t.textfont.size,e.pts)||r.size;return{color:n||o.contrast(e.color),family:i,size:a}}function _(t,e){for(var r,n,i=0;ie&&e>n||r=-4;m-=2)v(Math.PI*m,\"tan\");for(m=4;m>=-4;m-=2)v(Math.PI*(m+1),\"tan\")}if(f||p){for(m=4;m>=-4;m-=2)v(Math.PI*(m+1.5),\"rad\");for(m=4;m>=-4;m-=2)v(Math.PI*(m+.5),\"rad\")}}if(s||d||f){var y=Math.sqrt(t.width*t.width+t.height*t.height);if((a={scale:i*n*2/y,rCenter:1-i,rotate:0}).textPosAngle=(e.startangle+e.stopangle)/2,a.scale>=1)return a;g.push(a)}(d||p)&&((a=T(t,n,o,l,c)).textPosAngle=(e.startangle+e.stopangle)/2,g.push(a)),(d||h)&&((a=k(t,n,o,l,c)).textPosAngle=(e.startangle+e.stopangle)/2,g.push(a));for(var x=0,b=0,_=0;_=1)break}return g[x]}function T(t,e,r,n,i){e=Math.max(0,e-2*g);var a=t.width/t.height,o=S(a,n,e,r);return{scale:2*o/t.height,rCenter:A(a,o/e),rotate:M(i)}}function k(t,e,r,n,i){e=Math.max(0,e-2*g);var a=t.height/t.width,o=S(a,n,e,r);return{scale:2*o/t.width,rCenter:A(a,o/e),rotate:M(i+Math.PI/2)}}function A(t,e){return Math.cos(e)-t*e}function M(t){return(180/Math.PI*t+720)%180-90}function S(t,e,r,n){var i=t+1/(2*Math.tan(e));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(t*t+n/2)+t))}function E(t,e){return t.v!==e.vTotal||e.trace.hole?Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2):1}function L(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 C(t,e){var r,n,i,a=t.trace,o={x:t.cx,y:t.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=I(a),-1!==a.title.position.indexOf(\"top\")?(o.y-=(1+i)*t.r,s.ty-=t.titleBox.height):-1!==a.title.position.indexOf(\"bottom\")&&(o.y+=(1+i)*t.r);var l,c,u=(l=t.r,c=t.trace.aspectratio,l/(void 0===c?1:c)),f=e.w*(a.domain.x[1]-a.domain.x[0])/2;return-1!==a.title.position.indexOf(\"left\")?(f+=u,o.x-=(1+i)*u,s.tx+=t.titleBox.width/2):-1!==a.title.position.indexOf(\"center\")?f*=2:-1!==a.title.position.indexOf(\"right\")&&(f+=u,o.x+=(1+i)*u,s.tx-=t.titleBox.width/2),r=f/t.titleBox.width,n=P(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}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 I(t){var e,r=t.pull;if(!r)return 0;if(Array.isArray(r))for(r=0,e=0;er&&(r=t.pull[e]);return r}function O(t,e){for(var r=[],n=0;n1?(c=r.r,u=c/i.aspectratio):(u=r.r,c=u*i.aspectratio),c*=(1+i.baseratio)/2,l=c*u}o=Math.min(o,l/r.vTotal)}for(n=0;n\")}if(a){var x=l.castOption(i,e.i,\"texttemplate\");if(x){var b=function(t){return{label:t.label,value:t.v,valueLabel:m.formatPieValue(t.v,n.separators),percent:t.v/r.vTotal,percentLabel:m.formatPiePercent(t.v/r.vTotal,n.separators),color:t.color,text:t.text,customdata:l.castOption(i,t.i,\"customdata\")}}(e),_=m.getFirstFilled(i.text,e.pts);(y(_)||\"\"===_)&&(b.text=_),e.text=l.texttemplateString(x,b,t._fullLayout._d3locale,b,i._meta||{})}else e.text=\"\"}}function R(t,e){var r=t.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(e.left+e.right)/2,o=(e.top+e.bottom)/2;t.textX=a*n-o*i,t.textY=a*i+o*n,t.noCenter=!0}e.exports={plot:function(t,e){var r=t._fullLayout,a=r._size;d(\"pie\",r),_(e,t),O(e,a);var h=l.makeTraceGroups(r._pielayer,e,\"trace\").each((function(e){var h=n.select(this),d=e[0],g=d.trace;!function(t){var e,r,n,i=t[0],a=i.r,o=i.trace,s=m.getRotationAngle(o.rotation),l=2*Math.PI/i.vTotal,c=\"px0\",u=\"px1\";if(\"counterclockwise\"===o.direction){for(e=0;ei.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-o.hole,r.rInscribed=E(r,i))}(e),h.attr(\"stroke-linejoin\",\"round\"),h.each((function(){var v=n.select(this).selectAll(\"g.slice\").data(e);v.enter().append(\"g\").classed(\"slice\",!0),v.exit().remove();var y=[[[],[]],[[],[]]],_=!1;v.each((function(i,a){if(i.hidden)n.select(this).selectAll(\"path,g\").remove();else{i.pointNumber=i.i,i.curveNumber=g.index,y[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var o=d.cx,c=d.cy,u=n.select(this),h=u.selectAll(\"path.surface\").data([i]);if(h.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":\"all\"}),u.call(x,t,e),g.pull){var v=+m.castOption(g.pull,i.pts)||0;v>0&&(o+=v*i.pxmid[0],c+=v*i.pxmid[1])}i.cxFinal=o,i.cyFinal=c;var T=g.hole;if(i.v===d.vTotal){var k=\"M\"+(o+i.px0[0])+\",\"+(c+i.px0[1])+C(i.px0,i.pxmid,!0,1)+C(i.pxmid,i.px0,!0,1)+\"Z\";T?h.attr(\"d\",\"M\"+(o+T*i.px0[0])+\",\"+(c+T*i.px0[1])+C(i.px0,i.pxmid,!1,T)+C(i.pxmid,i.px0,!1,T)+\"Z\"+k):h.attr(\"d\",k)}else{var A=C(i.px0,i.px1,!0,1);if(T){var M=1-T;h.attr(\"d\",\"M\"+(o+T*i.px1[0])+\",\"+(c+T*i.px1[1])+C(i.px1,i.px0,!1,T)+\"l\"+M*i.px0[0]+\",\"+M*i.px0[1]+A+\"Z\")}else h.attr(\"d\",\"M\"+o+\",\"+c+\"l\"+i.px0[0]+\",\"+i.px0[1]+A+\"Z\")}D(t,i,d);var S=m.castOption(g.textposition,i.pts),E=u.selectAll(\"g.slicetext\").data(i.text&&\"none\"!==S?[0]:[]);E.enter().append(\"g\").classed(\"slicetext\",!0),E.exit().remove(),E.each((function(){var u=l.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),h=l.ensureUniformFontSize(t,\"outside\"===S?function(t,e,r){var n=m.castOption(t.outsidetextfont.color,e.pts)||m.castOption(t.textfont.color,e.pts)||r.color,i=m.castOption(t.outsidetextfont.family,e.pts)||m.castOption(t.textfont.family,e.pts)||r.family,a=m.castOption(t.outsidetextfont.size,e.pts)||m.castOption(t.textfont.size,e.pts)||r.size;return{color:n,family:i,size:a}}(g,i,r.font):b(g,i,r.font));u.text(i.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(s.font,h).call(f.convertToTspans,t);var v,y=s.bBox(u.node());if(\"outside\"===S)v=L(y,i);else if(v=w(y,i,d),\"auto\"===S&&v.scale<1){var x=l.ensureUniformFontSize(t,g.outsidetextfont);u.call(s.font,x),v=L(y=s.bBox(u.node()),i)}var T=v.textPosAngle,k=void 0===T?i.pxmid:z(d.r,T);if(v.targetX=o+k[0]*v.rCenter+(v.x||0),v.targetY=c+k[1]*v.rCenter+(v.y||0),R(v,y),v.outside){var A=v.targetY;i.yLabelMin=A-y.height/2,i.yLabelMid=A,i.yLabelMax=A+y.height/2,i.labelExtraX=0,i.labelExtraY=0,_=!0}v.fontSize=h.size,p(g.type,v,r),e[a].transform=v,u.attr(\"transform\",l.getTextTransform(v))}))}function C(t,e,r,n){var a=n*(e[0]-t[0]),o=n*(e[1]-t[1]);return\"a\"+n*d.r+\",\"+n*d.r+\" 0 \"+i.largeArc+(r?\" 1 \":\" 0 \")+a+\",\"+o}}));var T=n.select(this).selectAll(\"g.titletext\").data(g.title.text?[0]:[]);if(T.enter().append(\"g\").classed(\"titletext\",!0),T.exit().remove(),T.each((function(){var e,r=l.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),i=g.title.text;g._meta&&(i=l.templateString(i,g._meta)),r.text(i).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(s.font,g.title.font).call(f.convertToTspans,t),e=\"middle center\"===g.title.position?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.title.font.size}}(d):C(d,a),r.attr(\"transform\",u(e.x,e.y)+c(Math.min(1,e.scale))+u(e.tx,e.ty))})),_&&function(t,e){var r,n,i,a,o,s,l,c,u,f,h,p,d;function g(t,e){return t.pxmid[1]-e.pxmid[1]}function v(t,e){return e.pxmid[1]-t.pxmid[1]}function y(t,r){r||(r={});var i,c,u,h,p=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),d=n?t.yLabelMin:t.yLabelMax,g=n?t.yLabelMax:t.yLabelMin,v=t.cyFinal+o(t.px0[1],t.px1[1]),y=p-d;if(y*l>0&&(t.labelExtraY=y),Array.isArray(e.pull))for(c=0;c=(m.castOption(e.pull,u.pts)||0)||((t.pxmid[1]-u.pxmid[1])*l>0?(y=u.cyFinal+o(u.px0[1],u.px1[1])-d-t.labelExtraY)*l>0&&(t.labelExtraY+=y):(g+t.labelExtraY-v)*l>0&&(i=3*s*Math.abs(c-f.indexOf(t)),(h=u.cxFinal+a(u.px0[0],u.px1[0])+i-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=h)))}for(n=0;n<2;n++)for(i=n?g:v,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,(c=t[n][r]).sort(i),u=t[1-n][r],f=u.concat(c),p=[],h=0;hMath.abs(f)?s+=\"l\"+f*t.pxmid[0]/t.pxmid[1]+\",\"+f+\"H\"+(a+t.labelExtraX+c):s+=\"l\"+t.labelExtraX+\",\"+u+\"v\"+(f-u)+\"h\"+c}else s+=\"V\"+(t.yLabelMid+t.labelExtraY)+\"h\"+c;l.ensureSingle(r,\"path\",\"textline\").call(o.stroke,e.outsidetextfont.color).attr({\"stroke-width\":Math.min(2,e.outsidetextfont.size/8),d:s,fill:\"none\"})}else r.select(\"path.textline\").remove()}))}(v,g),_&&g.automargin){var k=s.bBox(h.node()),A=g.domain,M=a.w*(A.x[1]-A.x[0]),S=a.h*(A.y[1]-A.y[0]),E=(.5*M-d.r)/a.w,P=(.5*S-d.r)/a.h;i.autoMargin(t,\"pie.\"+g.uid+\".automargin\",{xl:A.x[0]-E,xr:A.x[1]+E,yb:A.y[0]-P,yt:A.y[1]+P,l:Math.max(d.cx-d.r-k.left,0),r:Math.max(k.right-(d.cx+d.r),0),b:Math.max(k.bottom-(d.cy+d.r),0),t:Math.max(d.cy-d.r-k.top,0),pad:5})}}))}));setTimeout((function(){h.selectAll(\"tspan\").each((function(){var t=n.select(this);t.attr(\"dy\")&&t.attr(\"dy\",t.attr(\"dy\"))}))}),0)},formatSliceLabel:D,transformInsideText:w,determineInsideTextFont:b,positionTitleOutside:C,prerenderTitles:_,layoutAreas:O,attachFxHandlers:x,computeTransform:R}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/plots\":619,\"../bar/constants\":650,\"../bar/uniform_text\":664,\"./event_data\":904,\"./helpers\":905,\"@plotly/d3\":58}],910:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"./style_one\"),a=t(\"../bar/uniform_text\").resizeText;e.exports=function(t){var e=t._fullLayout._pielayer.selectAll(\".trace\");a(t,e,\"pie\"),e.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)}))}))}},{\"../bar/uniform_text\":664,\"./style_one\":911,\"@plotly/d3\":58}],911:[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\":366,\"./helpers\":905}],912:[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\":926}],913:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").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;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);if(p)r=p;else for(r=new Int32Array(e),l=0;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var g=i(t.marker.color),m=i(t.marker.border.color),v=t.opacity*t.marker.opacity;g[3]*=v,this.pointcloudOptions.color=g;var y=t.marker.blend;if(null===y){y=c.length<100||u.length<100}this.pointcloudOptions.blend=y,m[3]*=v,this.pointcloudOptions.borderColor=m;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,T=b/2||.5;t._extremes[_._id]=a(_,[d[0],d[2]],{ppad:T}),t._extremes[w._id]=a(w,[d[1],d[3]],{ppad:T})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},{\"../../../stackgl_modules\":1120,\"../../lib/str2rgbarray\":528,\"../../plots/cartesian/autorange\":553,\"../scatter/get_trace_color\":936}],914:[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\":503,\"./attributes\":912}],915:[function(t,e,r){\"use strict\";[\"*pointcloud* trace is deprecated!\",\"Please consider switching to the *scattergl* trace type.\"].join(\" \");e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"../scatter3d/calc\"),plot:t(\"./convert\"),moduleType:\"trace\",name:\"pointcloud\",basePlotModule:t(\"../../plots/gl2d\"),categories:[\"gl\",\"gl2d\",\"showLegend\"],meta:{}}},{\"../../plots/gl2d\":596,\"../scatter3d/calc\":955,\"./attributes\":912,\"./convert\":913,\"./defaults\":914}],916:[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(\"../../plots/template_attributes\").hovertemplateAttrs,c=t(\"../../components/colorscale/attributes\"),u=t(\"../../plot_api/plot_template\").templatedArray,f=t(\"../../plots/cartesian/axis_format_attributes\").descriptionOnlyNumbers,h=t(\"../../lib/extend\").extendFlat,p=t(\"../../plot_api/edit_types\").overrideAll;(e.exports=p({hoverinfo:h({},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\",description:f(\"value\")},valuesuffix:{valType:\"string\",dflt:\"\"},arrangement:{valType:\"enumerated\",values:[\"snap\",\"perpendicular\",\"freeform\",\"fixed\"],dflt:\"snap\"},textfont:n({}),customdata:void 0,node:{label:{valType:\"data_array\",dflt:[]},groups:{valType:\"info_array\",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:\"number\",editType:\"calc\"}},x:{valType:\"data_array\",dflt:[]},y:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},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,hovertemplate:l({},{keys:[\"value\",\"label\"]})},link:{label:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},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,hovertemplate:l({},{keys:[\"value\",\"label\"]}),colorscales:u(\"concentrationscales\",{editType:\"calc\",label:{valType:\"string\",editType:\"calc\",dflt:\"\"},cmax:{valType:\"number\",editType:\"calc\",dflt:1},cmin:{valType:\"number\",editType:\"calc\",dflt:0},colorscale:h(c().colorscale,{dflt:[[0,\"white\"],[1,\"black\"]]})})}},\"calc\",\"nested\")).transforms=void 0},{\"../../components/color/attributes\":365,\"../../components/colorscale/attributes\":373,\"../../components/fx/attributes\":397,\"../../lib/extend\":493,\"../../plot_api/edit_types\":536,\"../../plot_api/plot_template\":543,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/domain\":584,\"../../plots/font_attributes\":585,\"../../plots/template_attributes\":633}],917:[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\"),s=t(\"../../lib/setcursor\"),l=t(\"../../components/dragelement\"),c=t(\"../../plots/cartesian/select\").prepSelect,u=t(\"../../lib\"),f=t(\"../../registry\");function h(t,e){var r=t._fullData[e],n=t._fullLayout,i=n.dragmode,a=\"pan\"===n.dragmode?\"move\":\"crosshair\",o=r._bgRect;if(\"pan\"!==i&&\"zoom\"!==i){s(o,a);var h={_id:\"x\",c2p:u.identity,_offset:r._sankey.translateX,_length:r._sankey.width},p={_id:\"y\",c2p:u.identity,_offset:r._sankey.translateY,_length:r._sankey.height},d={gd:t,element:o.node(),plotinfo:{id:e,xaxis:h,yaxis:p,fillRangeItems:u.noop},subplot:e,xaxes:[h],yaxes:[p],doneFnCompleted:function(r){var n,i=t._fullData[e],a=i.node.groups.slice(),o=[];function s(t){for(var e=i._sankey.graph.nodes,r=0;ry&&(y=a.source[e]),a.target[e]>y&&(y=a.target[e]);var x,b=y+1;t.node._count=b;var _=t.node.groups,w={};for(e=0;e<_.length;e++){var T=_[e];for(x=0;x0&&s(E,b)&&s(L,b)&&(!w.hasOwnProperty(E)||!w.hasOwnProperty(L)||w[E]!==w[L])){w.hasOwnProperty(L)&&(L=w[L]),w.hasOwnProperty(E)&&(E=w[E]),L=+L,h[E=+E]=h[L]=!0;var C=\"\";a.label&&a.label[e]&&(C=a.label[e]);var P=null;C&&p.hasOwnProperty(C)&&(P=p[C]),c.push({pointNumber:e,label:C,color:u?a.color[e]:a.color,customdata:f?a.customdata[e]:a.customdata,concentrationscale:P,source:E,target:L,value:+S}),M.source.push(E),M.target.push(L)}}var I=b+_.length,O=o(r.color),z=o(r.customdata),D=[];for(e=0;eb-1,childrenNodes:[],pointNumber:e,label:R,color:O?r.color[e]:r.color,customdata:z?r.customdata[e]:r.customdata})}var F=!1;return function(t,e,r){for(var a=i.init2dArray(t,0),o=0;o1}))}(I,M.source,M.target)&&(F=!0),{circular:F,links:c,nodes:D,groups:_,groupLookup:w}}e.exports=function(t,e){var r=c(e);return a({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},{\"../../components/colorscale\":378,\"../../lib\":503,\"../../lib/gup\":500,\"strongly-connected-components\":306}],919:[function(t,e,r){\"use strict\";e.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:\"linear\",cn:{sankey:\"sankey\",sankeyLinks:\"sankey-links\",sankeyLink:\"sankey-link\",sankeyNodeSet:\"sankey-node-set\",sankeyNode:\"sankey-node\",nodeRect:\"node-rect\",nodeLabel:\"node-label\"}}},{}],920:[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\"),u=t(\"../../plots/array_container_defaults\");function f(t,e){function r(r,a){return n.coerce(t,e,i.link.colorscales,r,a)}r(\"label\"),r(\"cmin\"),r(\"cmax\"),r(\"colorscale\")}e.exports=function(t,e,r,h){function p(r,a){return n.coerce(t,e,i,r,a)}var d=n.extendDeep(h.hoverlabel,t.hoverlabel),g=t.node,m=c.newContainer(e,\"node\");function v(t,e){return n.coerce(g,m,i.node,t,e)}v(\"label\"),v(\"groups\"),v(\"x\"),v(\"y\"),v(\"pad\"),v(\"thickness\"),v(\"line.color\"),v(\"line.width\"),v(\"hoverinfo\",t.hoverinfo),l(g,m,v,d),v(\"hovertemplate\");var y=h.colorway;v(\"color\",m.label.map((function(t,e){return a.addOpacity(function(t){return y[t%y.length]}(e),.8)}))),v(\"customdata\");var x=t.link||{},b=c.newContainer(e,\"link\");function _(t,e){return n.coerce(x,b,i.link,t,e)}_(\"label\"),_(\"source\"),_(\"target\"),_(\"value\"),_(\"line.color\"),_(\"line.width\"),_(\"hoverinfo\",t.hoverinfo),l(x,b,_,d),_(\"hovertemplate\");var w,T=o(h.paper_bgcolor).getLuminance()<.333?\"rgba(255, 255, 255, 0.6)\":\"rgba(0, 0, 0, 0.2)\";_(\"color\",n.repeat(T,b.value.length)),_(\"customdata\"),u(x,b,{name:\"colorscales\",handleItemDefaults:f}),s(e,h,p),p(\"orientation\"),p(\"valueformat\"),p(\"valuesuffix\"),m.x.length&&m.y.length&&(w=\"freeform\"),p(\"arrangement\",w),n.coerceFont(p,\"textfont\",n.extendFlat({},h.font)),e._length=null}},{\"../../components/color\":366,\"../../components/fx/hoverlabel_defaults\":404,\"../../lib\":503,\"../../plot_api/plot_template\":543,\"../../plots/array_container_defaults\":549,\"../../plots/domain\":584,\"./attributes\":916,tinycolor2:312}],921:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),moduleType:\"trace\",name:\"sankey\",basePlotModule:t(\"./base_plot\"),selectPoints:t(\"./select.js\"),categories:[\"noOpacity\"],meta:{}}},{\"./attributes\":916,\"./base_plot\":917,\"./calc\":918,\"./defaults\":920,\"./plot\":922,\"./select.js\":924}],922:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.numberFormat,o=t(\"./render\"),s=t(\"../../components/fx\"),l=t(\"../../components/color\"),c=t(\"./constants\").cn,u=i._;function f(t){return\"\"!==t}function h(t,e){return t.filter((function(t){return t.key===e.traceId}))}function p(t,e){n.select(t).select(\"path\").style(\"fill-opacity\",e),n.select(t).select(\"rect\").style(\"fill-opacity\",e)}function d(t){n.select(t).select(\"text.name\").style(\"fill\",\"black\")}function g(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function m(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&&h(r,e).selectAll(\".\"+c.sankeyLink).filter(g(e)).call(x.bind(0,e,r,!1))}function y(t,e,r){e&&r&&h(r,e).selectAll(\".\"+c.sankeyLink).filter(g(e)).call(b.bind(0,e,r,!1))}function x(t,e,r,n){var i=n.datum().link.label;n.style(\"fill-opacity\",(function(t){if(!t.link.concentrationscale)return.4})),i&&h(e,t).selectAll(\".\"+c.sankeyLink).filter((function(t){return t.link.label===i})).style(\"fill-opacity\",(function(t){if(!t.link.concentrationscale)return.4})),r&&h(e,t).selectAll(\".\"+c.sankeyNode).filter(m(t)).call(v)}function b(t,e,r,n){var i=n.datum().link.label;n.style(\"fill-opacity\",(function(t){return t.tinyColorAlpha})),i&&h(e,t).selectAll(\".\"+c.sankeyLink).filter((function(t){return t.link.label===i})).style(\"fill-opacity\",(function(t){return t.tinyColorAlpha})),r&&h(e,t).selectAll(c.sankeyNode).filter(m(t)).call(y)}function _(t,e){var r=t.hoverlabel||{},n=i.nestedProperty(r,e).get();return!Array.isArray(n)&&n}e.exports=function(t,e){for(var r=t._fullLayout,i=r._paper,h=r._size,g=0;g\"),color:_(o,\"bgcolor\")||l.addOpacity(g.color,1),borderColor:_(o,\"bordercolor\"),fontFamily:_(o,\"font.family\"),fontSize:_(o,\"font.size\"),fontColor:_(o,\"font.color\"),nameLength:_(o,\"namelength\"),textAlign:_(o,\"align\"),idealAlign:n.event.x\"),color:_(o,\"bgcolor\")||i.tinyColorHue,borderColor:_(o,\"bordercolor\"),fontFamily:_(o,\"font.family\"),fontSize:_(o,\"font.size\"),fontColor:_(o,\"font.color\"),nameLength:_(o,\"namelength\"),textAlign:_(o,\"align\"),idealAlign:\"left\",hovertemplate:o.hovertemplate,hovertemplateLabels:y,eventData:[i.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});p(w,.85),d(w)}}},unhover:function(e,i,a){!1!==t._fullLayout.hovermode&&(n.select(e).call(y,i,a),\"skip\"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,t.emit(\"plotly_unhover\",{event:n.event,points:[i.node]})),s.loneUnhover(r._hoverlayer.node()))},select:function(e,r,i){var a=r.node;a.originalEvent=n.event,t._hoverdata=[a],n.select(e).call(y,r,i),s.click(t,{target:!0})}}})}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../lib\":503,\"./constants\":919,\"./render\":923,\"@plotly/d3\":58}],923:[function(t,e,r){\"use strict\";var n=t(\"d3-force\"),i=t(\"d3-interpolate\").interpolateNumber,a=t(\"@plotly/d3\"),o=t(\"@plotly/d3-sankey\"),s=t(\"@plotly/d3-sankey-circular\"),l=t(\"./constants\"),c=t(\"tinycolor2\"),u=t(\"../../components/color\"),f=t(\"../../components/drawing\"),h=t(\"../../lib\"),p=h.strTranslate,d=h.strRotate,g=t(\"../../lib/gup\"),m=g.keyFun,v=g.repeat,y=g.unwrap,x=t(\"../../lib/svg_text_utils\"),b=t(\"../../registry\"),_=t(\"../../constants/alignment\"),w=_.CAP_SHIFT,T=_.LINE_SPACING;function k(t,e,r){var n,i=y(e),a=i.trace,u=a.domain,f=\"h\"===a.orientation,p=a.node.pad,d=a.node.thickness,g=t.width*(u.x[1]-u.x[0]),m=t.height*(u.y[1]-u.y[0]),v=i._nodes,x=i._links,b=i.circular;(n=b?s.sankeyCircular().circularLinkGap(0):o.sankey()).iterations(l.sankeyIterations).size(f?[g,m]:[m,g]).nodeWidth(d).nodePadding(p).nodeId((function(t){return t.pointNumber})).nodes(v).links(x);var _,w,T,k=n();for(var A in n.nodePadding()=i||(r=i-e.y0)>1e-6&&(e.y0+=r,e.y1+=r),i=e.y1+p}))}(function(t){var e,r,n=t.map((function(t,e){return{x0:t.x0,index:e}})).sort((function(t,e){return t.x0-e.x0})),i=[],a=-1,o=-1/0;for(_=0;_o+d&&(a+=1,e=s.x0),o=s.x0,i[a]||(i[a]=[]),i[a].push(s),r=e-s.x0,s.x0+=r,s.x1+=r}return i}(v=k.nodes));n.update(k)}return{circular:b,key:r,trace:a,guid:h.randstr(),horizontal:f,width:g,height:m,nodePad:a.node.pad,nodeLineColor:a.node.line.color,nodeLineWidth:a.node.line.width,linkLineColor:a.link.line.color,linkLineWidth:a.link.line.width,valueFormat:a.valueformat,valueSuffix:a.valuesuffix,textFont:a.textfont,translateX:u.x[0]*t.width+t.margin.l,translateY:t.height-u.y[1]*t.height+t.margin.t,dragParallel:f?m:g,dragPerpendicular:f?g:m,arrangement:a.arrangement,sankey:n,graph:k,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function A(t,e,r){var n=c(e.color),i=e.source.label+\"|\"+e.target.label+\"__\"+r;return e.trace=t.trace,e.curveNumber=t.trace.index,{circular:t.circular,key:i,traceId:t.key,pointNumber:e.pointNumber,link:e,tinyColorHue:u.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:M,linkLineColor:t.linkLineColor,linkLineWidth:t.linkLineWidth,valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,parent:t,interactionState:t.interactionState,flow:e.flow}}function M(){return function(t){if(t.link.circular)return e=t.link,r=e.width/2,n=e.circularPathData,\"top\"===e.circularLinkType?\"M \"+n.targetX+\" \"+(n.targetY+r)+\" L\"+n.rightInnerExtent+\" \"+(n.targetY+r)+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightSmallArcRadius+r)+\" 0 0 1 \"+(n.rightFullExtent-r)+\" \"+(n.targetY-n.rightSmallArcRadius)+\"L\"+(n.rightFullExtent-r)+\" \"+n.verticalRightInnerExtent+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightLargeArcRadius+r)+\" 0 0 1 \"+n.rightInnerExtent+\" \"+(n.verticalFullExtent-r)+\"L\"+n.leftInnerExtent+\" \"+(n.verticalFullExtent-r)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftLargeArcRadius+r)+\" 0 0 1 \"+(n.leftFullExtent+r)+\" \"+n.verticalLeftInnerExtent+\"L\"+(n.leftFullExtent+r)+\" \"+(n.sourceY-n.leftSmallArcRadius)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftSmallArcRadius+r)+\" 0 0 1 \"+n.leftInnerExtent+\" \"+(n.sourceY+r)+\"L\"+n.sourceX+\" \"+(n.sourceY+r)+\"L\"+n.sourceX+\" \"+(n.sourceY-r)+\"L\"+n.leftInnerExtent+\" \"+(n.sourceY-r)+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftSmallArcRadius-r)+\" 0 0 0 \"+(n.leftFullExtent-r)+\" \"+(n.sourceY-n.leftSmallArcRadius)+\"L\"+(n.leftFullExtent-r)+\" \"+n.verticalLeftInnerExtent+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftLargeArcRadius-r)+\" 0 0 0 \"+n.leftInnerExtent+\" \"+(n.verticalFullExtent+r)+\"L\"+n.rightInnerExtent+\" \"+(n.verticalFullExtent+r)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightLargeArcRadius-r)+\" 0 0 0 \"+(n.rightFullExtent+r)+\" \"+n.verticalRightInnerExtent+\"L\"+(n.rightFullExtent+r)+\" \"+(n.targetY-n.rightSmallArcRadius)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightSmallArcRadius-r)+\" 0 0 0 \"+n.rightInnerExtent+\" \"+(n.targetY-r)+\"L\"+n.targetX+\" \"+(n.targetY-r)+\"Z\":\"M \"+n.targetX+\" \"+(n.targetY-r)+\" L\"+n.rightInnerExtent+\" \"+(n.targetY-r)+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightSmallArcRadius+r)+\" 0 0 0 \"+(n.rightFullExtent-r)+\" \"+(n.targetY+n.rightSmallArcRadius)+\"L\"+(n.rightFullExtent-r)+\" \"+n.verticalRightInnerExtent+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightLargeArcRadius+r)+\" 0 0 0 \"+n.rightInnerExtent+\" \"+(n.verticalFullExtent+r)+\"L\"+n.leftInnerExtent+\" \"+(n.verticalFullExtent+r)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftLargeArcRadius+r)+\" 0 0 0 \"+(n.leftFullExtent+r)+\" \"+n.verticalLeftInnerExtent+\"L\"+(n.leftFullExtent+r)+\" \"+(n.sourceY+n.leftSmallArcRadius)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftSmallArcRadius+r)+\" 0 0 0 \"+n.leftInnerExtent+\" \"+(n.sourceY-r)+\"L\"+n.sourceX+\" \"+(n.sourceY-r)+\"L\"+n.sourceX+\" \"+(n.sourceY+r)+\"L\"+n.leftInnerExtent+\" \"+(n.sourceY+r)+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftSmallArcRadius-r)+\" 0 0 1 \"+(n.leftFullExtent-r)+\" \"+(n.sourceY+n.leftSmallArcRadius)+\"L\"+(n.leftFullExtent-r)+\" \"+n.verticalLeftInnerExtent+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftLargeArcRadius-r)+\" 0 0 1 \"+n.leftInnerExtent+\" \"+(n.verticalFullExtent-r)+\"L\"+n.rightInnerExtent+\" \"+(n.verticalFullExtent-r)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightLargeArcRadius-r)+\" 0 0 1 \"+(n.rightFullExtent+r)+\" \"+n.verticalRightInnerExtent+\"L\"+(n.rightFullExtent+r)+\" \"+(n.targetY+n.rightSmallArcRadius)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightSmallArcRadius-r)+\" 0 0 1 \"+n.rightInnerExtent+\" \"+(n.targetY+r)+\"L\"+n.targetX+\" \"+(n.targetY+r)+\"Z\";var e,r,n,a=t.link.source.x1,o=t.link.target.x0,s=i(a,o),l=s(.5),c=s(.5),u=t.link.y0-t.link.width/2,f=t.link.y0+t.link.width/2,h=t.link.y1-t.link.width/2,p=t.link.y1+t.link.width/2;return\"M\"+a+\",\"+u+\"C\"+l+\",\"+u+\" \"+c+\",\"+h+\" \"+o+\",\"+h+\"L\"+o+\",\"+p+\"C\"+c+\",\"+p+\" \"+l+\",\"+f+\" \"+a+\",\"+f+\"Z\"}}function S(t,e){var r=c(e.color),n=l.nodePadAcross,i=t.nodePad/2;e.dx=e.x1-e.x0,e.dy=e.y1-e.y0;var a=e.dx,o=Math.max(.5,e.dy),s=\"node_\"+e.pointNumber;return e.group&&(s=h.randstr()),e.trace=t.trace,e.curveNumber=t.trace.index,{index:e.pointNumber,key:s,partOfGroup:e.partOfGroup||!1,group:e.group,traceId:t.key,trace:t.trace,node:e,nodePad:t.nodePad,nodeLineColor:t.nodeLineColor,nodeLineWidth:t.nodeLineWidth,textFont:t.textFont,size:t.horizontal?t.height:t.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:t.horizontal?e.dy/2+1:e.dx/2+1,left:1===e.originalLayer,sizeAcross:t.width,forceLayouts:t.forceLayouts,horizontal:t.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:u.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,graph:t.graph,arrangement:t.arrangement,uniqueNodeLabelPathId:[t.guid,t.key,s].join(\"_\"),interactionState:t.interactionState,figure:t}}function E(t){t.attr(\"transform\",(function(t){return p(t.node.x0.toFixed(3),t.node.y0.toFixed(3))}))}function L(t){t.call(E)}function C(t,e){t.call(L),e.attr(\"d\",M())}function P(t){t.attr(\"width\",(function(t){return t.node.x1-t.node.x0})).attr(\"height\",(function(t){return t.visibleHeight}))}function I(t){return t.link.width>1||t.linkLineWidth>0}function O(t){return p(t.translateX,t.translateY)+(t.horizontal?\"matrix(1 0 0 1 0 0)\":\"matrix(0 1 1 0 0 0)\")}function z(t,e,r){t.on(\".basic\",null).on(\"mouseover.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.hover(this,t,e),t.interactionState.hovered=[this,t])})).on(\"mousemove.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.follow(this,t),t.interactionState.hovered=[this,t])})).on(\"mouseout.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(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||t.partOfGroup||r.select(this,t,e)}))}function D(t,e,r,i){var o=a.behavior.drag().origin((function(t){return{x:t.node.x0+t.visibleWidth/2,y:t.node.y0+t.visibleHeight/2}})).on(\"dragstart\",(function(a){if(\"fixed\"!==a.arrangement&&(h.ensureSingle(i._fullLayout._infolayer,\"g\",\"dragcover\",(function(t){i._fullLayout._dragCover=t})),h.raiseToTop(this),a.interactionState.dragInProgress=a.node,F(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),\"snap\"===a.arrangement)){var o=a.traceId+\"|\"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):function(t,e,r,i){!function(t){for(var e=0;e0&&n.forceLayouts[e].alpha(0)}}(0,e,a,r)).stop()}(0,o,a),function(t,e,r,n,i){window.requestAnimationFrame((function a(){var o;for(o=0;o0)window.requestAnimationFrame(a);else{var s=r.node.originalX;r.node.x0=s-r.visibleWidth/2,r.node.x1=s+r.visibleWidth/2,R(r,i)}}))}(t,e,a,o,i)}})).on(\"drag\",(function(r){if(\"fixed\"!==r.arrangement){var n=a.event.x,i=a.event.y;\"snap\"===r.arrangement?(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2,r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2):(\"freeform\"===r.arrangement&&(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2),i=Math.max(0,Math.min(r.size-r.visibleHeight/2,i)),r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2),F(r.node),\"snap\"!==r.arrangement&&(r.sankey.update(r.graph),C(t.filter(B(r)),e))}})).on(\"dragend\",(function(t){if(\"fixed\"!==t.arrangement){t.interactionState.dragInProgress=!1;for(var e=0;el&&C[v].gap;)v--;for(x=C[v].s,g=C.length-1;g>v;g--)C[g].s=x;for(;lM[u]&&u=0;i--){var a=t[i];if(\"scatter\"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],933:[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(\"./period_defaults\"),u=t(\"./stack_defaults\"),f=t(\"./marker_defaults\"),h=t(\"./line_defaults\"),p=t(\"./line_shape_defaults\"),d=t(\"./text_defaults\"),g=t(\"./fillcolor_defaults\");e.exports=function(t,e,r,m){function v(r,i){return n.coerce(t,e,a,r,i)}var y=l(t,e,m,v);if(y||(e.visible=!1),e.visible){c(t,e,m,v),v(\"xhoverformat\"),v(\"yhoverformat\");var x=u(t,e,m,v),b=!x&&y=Math.min(e,r)&&d<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(h.c2p(t.x)-d);return a=Math.min(e,r)&&g<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(p.c2p(t.y)-g);return aW!=(N=z[I][1])>=W&&(R=z[I-1][0],F=z[I][0],N-B&&(D=R+(F-R)*(W-B)/(N-B),H=Math.min(H,D),q=Math.max(q,D)));H=Math.max(H,0),q=Math.min(q,h._length);var X=s.defaultLine;return s.opacity(f.fillcolor)?X=f.fillcolor:s.opacity((f.line||{}).color)&&(X=f.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:H,x1:q,y0:W,y1:W,color:X,hovertemplate:!1}),delete t.index,f.text&&!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../lib\":503,\"../../registry\":638,\"./get_trace_color\":936}],938:[function(t,e,r){\"use strict\";var n=t(\"./subtypes\");e.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"./cross_trace_defaults\"),calc:t(\"./calc\").calc,crossTraceCalc:t(\"./cross_trace_calc\"),arraysToCalcdata:t(\"./arrays_to_calcdata\"),plot:t(\"./plot\"),colorbar:t(\"./marker_colorbar\"),formatLabels:t(\"./format_labels\"),style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"./select\"),animatable:!0,moduleType:\"trace\",name:\"scatter\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"symbols\",\"errorBarsOK\",\"showLegend\",\"scatter-like\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"./arrays_to_calcdata\":925,\"./attributes\":926,\"./calc\":927,\"./cross_trace_calc\":931,\"./cross_trace_defaults\":932,\"./defaults\":933,\"./format_labels\":935,\"./hover\":937,\"./marker_colorbar\":944,\"./plot\":947,\"./select\":948,\"./style\":950,\"./subtypes\":951}],939:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray,i=t(\"../../components/colorscale/helpers\").hasColorscale,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\"}):s(\"line.color\",!n(c)&&c||r);s(\"line.width\"),(l||{}).noDash||s(\"line.dash\")}},{\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503}],940:[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,m,v,y,x,b,_,w,T,k,A,M,S=e.xaxis,E=e.yaxis,L=\"log\"===S.type,C=\"log\"===E.type,P=S._length,I=E._length,O=e.connectGaps,z=e.baseTolerance,D=e.shape,R=\"linear\"===D,F=e.fill&&\"none\"!==e.fill,B=[],N=f.minTolerance,j=t.length,U=new Array(j),V=0;function H(r){var n=t[r];if(!n)return!1;var a=e.linearized?S.l2p(n.x):S.c2p(n.x),l=e.linearized?E.l2p(n.y):E.c2p(n.y);if(a===i){if(L&&(a=S.c2p(n.x,!0)),a===i)return!1;C&&l===i&&(a*=Math.abs(S._m*I*(S._m>0?o:s)/(E._m*P*(E._m>0?o:s)))),a*=1e3}if(l===i){if(C&&(l=E.c2p(n.y,!0)),l===i)return!1;l*=1e3}return[a,l]}function q(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&&crt||t[1]it)return[u(t[0],et,rt),u(t[1],nt,it)]}function st(t,e){return t[0]===e[0]&&(t[0]===et||t[0]===rt)||(t[1]===e[1]&&(t[1]===nt||t[1]===it)||void 0)}function lt(t,e,r){return function(n,i){var a=ot(n),o=ot(i),s=[];if(a&&o&&st(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 ct(t){var e=t[0],r=t[1],n=e===U[V-1][0],i=r===U[V-1][1];if(!n||!i)if(V>1){var a=e===U[V-2][0],o=r===U[V-2][1];n&&(e===et||e===rt)&&a?o?V--:U[V-1]=t:i&&(r===nt||r===it)&&o?a?V--:U[V-1]=t:U[V++]=t}else U[V++]=t}function ut(t){U[V-1][0]!==t[0]&&U[V-1][1]!==t[1]&&ct([Z,J]),ct(t),K=null,Z=J=0}function ft(t){if(A=t[0]/P,M=t[1]/I,W=t[0]rt?rt:0,X=t[1]it?it:0,W||X){if(V)if(K){var e=$(K,t);e.length>1&&(ut(e[0]),U[V++]=e[1])}else Q=$(U[V-1],t)[0],U[V++]=Q;else U[V++]=[W||t[0],X||t[1]];var r=U[V-1];W&&X&&(r[0]!==W||r[1]!==X)?(K&&(Z!==W&&J!==X?ct(Z&&J?(n=K,a=(i=t)[0]-n[0],o=(i[1]-n[1])/a,(n[1]*i[0]-i[1]*n[0])/a>0?[o>0?et:rt,it]:[o>0?rt:et,nt]):[Z||W,J||X]):Z&&J&&ct([Z,J])),ct([W,X])):Z-W&&J-X&&ct([W||Z,X||J]),K=t,Z=W,J=X}else K&&ut($(K,t)[0]),U[V++]=t;var n,i,a,o}for(\"linear\"===D||\"spline\"===D?$=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var a=at[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&&Y(o,t)G(d,ht))break;a=d,(_=v[0]*m[0]+v[1]*m[1])>x?(x=_,h=d,g=!1):_=t.length||!d)break;ft(d),n=d}}else ft(h)}K&&ct([Z||K[0],J||K[1]]),B.push(U.slice(0,V))}return B}},{\"../../constants/numerical\":479,\"../../lib\":503,\"./constants\":930}],941:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){\"spline\"===r(\"line.shape\")&&r(\"line.smoothing\")}},{}],942:[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=0?l=p:(l=p=h,h++),l0?Math.max(r,a):0}}},{\"fast-isnumeric\":190}],944:[function(t,e,r){\"use strict\";e.exports={container:\"marker\",min:\"cmin\",max:\"cmax\"}},{}],945:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/helpers\").hasColorscale,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\":366,\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"./subtypes\":951}],946:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").dateTick0,i=t(\"../../constants/numerical\").ONEWEEK;function a(t,e){return n(e,t%i==0?1:0)}e.exports=function(t,e,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n(\"xperiod\");o&&(n(\"xperiod0\",a(o,e.xcalendar)),n(\"xperiodalignment\"))}if(i.y){var s=n(\"yperiod\");s&&(n(\"yperiod0\",a(s,e.ycalendar)),n(\"yperiodalignment\"))}}},{\"../../constants/numerical\":479,\"../../lib\":503}],947:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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 m;!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),m=0;o.forEach((function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(t){return v?t.transition():t}var x=r.xaxis,b=r.yaxis,_=f[0].trace,w=_.line,T=n.select(d),k=o(T,\"g\",\"errorbars\"),A=o(T,\"g\",\"lines\"),M=o(T,\"g\",\"points\"),S=o(T,\"g\",\"text\");if(i.getComponentMethod(\"errorbars\",\"plot\")(t,k,r,g),!0===_.visible){var E,L;y(T).style(\"opacity\",_.opacity);var C=_.fill.charAt(_.fill.length-1);\"x\"!==C&&\"y\"!==C&&(C=\"\"),f[0][r.isRangePlot?\"nodeRangePlot3\":\"node3\"]=T;var P,I,O=\"\",z=[],D=_._prevtrace;D&&(O=D._prevRevpath||\"\",L=D._nextFill,z=D._polygons);var R,F,B,N,j,U,V,H=\"\",q=\"\",G=[],Y=a.noop;if(E=_._ownFill,c.hasLines(_)||\"none\"!==_.fill){for(L&&L.datum(f),-1!==[\"hv\",\"vh\",\"hvh\",\"vhv\"].indexOf(w.shape)?(R=l.steps(w.shape),F=l.steps(w.shape.split(\"\").reverse().join(\"\"))):R=F=\"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\")},B=function(t){return F(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,fill:_.fill}),V=_._polygons=new Array(G.length),m=0;m1){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 W=A.selectAll(\".js-line\").data(G);y(W.exit()).style(\"opacity\",0).remove(),W.each(Y(!1)),W.enter().append(\"path\").classed(\"js-line\",!0).style(\"vector-effect\",\"non-scaling-stroke\").call(l.lineGroupStyle).each(Y(!0)),l.setClipUrl(W,r.layerClipId,t),G.length?(E?(E.datum(f),N&&U&&(C?(\"y\"===C?N[1]=U[1]=b.c2p(0,!0):\"x\"===C&&(N[0]=U[0]=x.c2p(0,!0)),y(E).attr(\"d\",\"M\"+U+\"L\"+N+\"L\"+H.substr(1)).call(l.singleFillStyle)):y(E).attr(\"d\",H+\"Z\").call(l.singleFillStyle))):L&&(\"tonext\"===_.fill.substr(0,6)&&H&&O?(\"tonext\"===_.fill?y(L).attr(\"d\",H+\"Z\"+O+\"Z\").call(l.singleFillStyle):y(L).attr(\"d\",H+\"L\"+O.substr(1)+\"Z\").call(l.singleFillStyle),_._polygons=_._polygons.concat(z)):(Z(L),_._polygons=null)),_._prevRevpath=q,_._prevPolygons=V):(E?Z(E):L&&Z(L),_._polygons=_._prevRevpath=_._prevPolygons=null),M.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 m=s,_=u.stackgroup,w=_&&\"infer zero\"===t._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?m=w?K:J:_&&!w&&(m=Q),f&&(d=m),h&&(g=m)}var T,k=(o=e.selectAll(\"path.point\").data(d,p)).enter().append(\"path\").classed(\"point\",!0);v&&k.call(l.pointStyle,u,t).call(l.translatePoints,x,b).style(\"opacity\",0).transition().style(\"opacity\",1),o.order(),f&&(T=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,T,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()})),v?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()}(M,S,f);var X=!1===_.cliponaxis?null:r.layerClipId;l.setClipUrl(M,X,t),l.setClipUrl(S,X,t)}function Z(t){y(t).attr(\"d\",\"M0,0Z\")}function J(t){return t.filter((function(t){return!t.gap&&t.vis}))}function K(t){return t.filter((function(t){return t.vis}))}function Q(t){return t.filter((function(t){return!t.gap}))}function $(t){return t.id}function tt(t){if(t.ids)return $}function et(){return!1}}e.exports=function(t,e,r,i,a,c){var u,h,d=!a,g=!!a&&a.duration>0,m=f(t,e,r);((u=i.selectAll(\"g.trace\").data(m,(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(e){var i=o(n.select(this),\"g\",\"fills\");l.setClipUrl(i,r.layerClipId,t);var a=e[0].trace,c=[];a._ownfill&&c.push(\"_ownFill\"),a._nexttrace&&c.push(\"_nextFill\");var u=i.selectAll(\"g\").data(c,s);u.enter().append(\"g\"),u.exit().each((function(t){a[t]=null})).remove(),u.order().each((function(t){a[t]=o(n.select(this),\"path\",\"js-fill\")}))}))}(t,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,m,this,a)}))}))):u.each((function(r,n){p(t,n,e,r,m,this,a)}));d&&u.exit().remove(),i.selectAll(\"path:not([d])\").remove()}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/polygon\":515,\"../../registry\":638,\"./line_points\":940,\"./link_traces\":942,\"./subtypes\":951,\"@plotly/d3\":58}],948:[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;r0){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-1?-1:t.indexOf(\"right\")>-1?1:0}function b(t){return null==t?0:t.indexOf(\"top\")>-1?-1:t.indexOf(\"bottom\")>-1?1:0}function _(t,e){return e(4*t)}function w(t){return p[t]}function T(t,e,r,n,i){var a=null;if(l.isArrayOrTypedArray(t)){a=[];for(var o=0;o=0){var g=function(t,e,r){var n,i=(r+1)%3,a=(r+2)%3,o=[],l=[];for(n=0;n=0&&f(\"surfacecolor\",h||p);for(var d=[\"x\",\"y\",\"z\"],g=0;g<3;++g){var m=\"projection.\"+d[g];f(m+\".show\")&&(f(m+\".opacity\"),f(m+\".scale\"))}var v=n.getComponentMethod(\"errorbars\",\"supplyDefaults\");v(t,e,h||p||r,{axis:\"z\"}),v(t,e,h||p||r,{axis:\"y\",inherit:\"z\"}),v(t,e,h||p||r,{axis:\"x\",inherit:\"z\"})}else e.visible=!1}},{\"../../lib\":503,\"../../registry\":638,\"../scatter/line_defaults\":939,\"../scatter/marker_defaults\":945,\"../scatter/subtypes\":951,\"../scatter/text_defaults\":952,\"./attributes\":954}],959:[function(t,e,r){\"use strict\";e.exports={plot:t(\"./convert\"),attributes:t(\"./attributes\"),markerSymbols:t(\"../../constants/gl3d_markers\"),supplyDefaults:t(\"./defaults\"),colorbar:[{container:\"marker\",min:\"cmin\",max:\"cmax\"},{container:\"line\",min:\"cmin\",max:\"cmax\"}],calc:t(\"./calc\"),moduleType:\"trace\",name:\"scatter3d\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../constants/gl3d_markers\":477,\"../../plots/gl3d\":598,\"./attributes\":954,\"./calc\":955,\"./convert\":957,\"./defaults\":958}],960:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../../plots/template_attributes\").texttemplateAttrs,s=t(\"../../components/colorscale/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=n.marker,u=n.line,f=c.line;e.exports={carpet:{valType:\"string\",editType:\"calc\"},a:{valType:\"data_array\",editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},mode:l({},n.mode,{dflt:\"markers\"}),text:l({},n.text,{}),texttemplate:o({editType:\"plot\"},{keys:[\"a\",\"b\",\"text\"]}),hovertext:l({},n.hovertext,{}),line:{color:u.color,width:u.width,dash:u.dash,shape:l({},u.shape,{values:[\"linear\",\"spline\"]}),smoothing:u.smoothing,editType:\"calc\"},connectgaps:n.connectgaps,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\"},s(\"marker.line\")),gradient:c.gradient,editType:\"calc\"},s(\"marker\")),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:l({},i.hoverinfo,{flags:[\"a\",\"b\",\"text\",\"name\"]}),hoveron:n.hoveron,hovertemplate:a()}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926}],961:[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\")}return o}function y(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,\"\"):t._hovertitle,m.push(r+\": \"+e.toFixed(3)+t.labelsuffix)}}},{\"../../lib\":503,\"../scatter/hover\":937}],966:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../scatter/select\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"scattercarpet\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"svg\",\"carpet\",\"symbols\",\"showLegend\",\"carpetDependent\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":960,\"./calc\":961,\"./defaults\":962,\"./event_data\":963,\"./format_labels\":964,\"./hover\":965,\"./plot\":967}],967:[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\")}(c,g,t,l[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}},{\"../../components/fx\":406,\"../../constants/numerical\":479,\"../../lib\":503,\"../scatter/get_trace_color\":936,\"./attributes\":968}],974:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),calcGeoJSON:t(\"./plot\").calcGeoJSON,plot:t(\"./plot\").plot,style:t(\"./style\"),styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"scattergeo\",basePlotModule:t(\"../../plots/geo\"),categories:[\"geo\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/geo\":589,\"../scatter/marker_colorbar\":944,\"../scatter/style\":950,\"./attributes\":968,\"./calc\":969,\"./defaults\":970,\"./event_data\":971,\"./format_labels\":972,\"./hover\":973,\"./plot\":975,\"./select\":976,\"./style\":977}],975:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../lib/topojson_utils\").getTopojsonFeatures,o=t(\"../../lib/geojson_utils\"),s=t(\"../../lib/geo_location_utils\"),l=t(\"../../plots/cartesian/autorange\").findExtremes,c=t(\"../../constants/numerical\").BADNUM,u=t(\"../scatter/calc\").calcMarkerSize,f=t(\"../scatter/subtypes\"),h=t(\"./style\");e.exports={calcGeoJSON:function(t,e){var r,n,i=t[0].trace,o=e[i.geo],f=o._subplot,h=i._length;if(Array.isArray(i.locations)){var p=i.locationmode,d=\"geojson-id\"===p?s.extractTraceFeature(t):a(i,f.topojson);for(r=0;r=m,w=2*b,T={},k=l.makeCalcdata(e,\"x\"),A=y.makeCalcdata(e,\"y\"),M=s(e,l,\"x\",k),S=s(e,y,\"y\",A),E=M.vals,L=S.vals;e._x=E,e._y=L,e.xperiodalignment&&(e._origX=k,e._xStarts=M.starts,e._xEnds=M.ends),e.yperiodalignment&&(e._origY=A,e._yStarts=S.starts,e._yEnds=S.ends);var C=new Array(w),P=new Array(b);for(r=0;r1&&i.extendFlat(s.line,p.linePositions(t,r,n));if(s.errorX||s.errorY){var l=p.errorBarPositions(t,r,n,a,o);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}s.text&&(i.extendFlat(s.text,{positions:n},p.textPosition(t,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},p.textPosition(t,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},p.textPosition(t,r,s.text,s.markerUnsel)));return s}(t,0,e,C,E,L),z=d(t,x);return f(o,e),_?O.marker&&(I=O.marker.sizeAvg||Math.max(O.marker.size,3)):I=c(e,b),u(t,e,l,y,E,L,I),O.errorX&&v(e,l,O.errorX),O.errorY&&v(e,y,O.errorY),O.fill&&!z.fill2d&&(z.fill2d=!0),O.marker&&!z.scatter2d&&(z.scatter2d=!0),O.line&&!z.line2d&&(z.line2d=!0),!O.errorX&&!O.errorY||z.error2d||(z.error2d=!0),O.text&&!z.glText&&(z.glText=!0),O.marker&&(O.marker.snap=b),z.lineOptions.push(O.line),z.errorXOptions.push(O.errorX),z.errorYOptions.push(O.errorY),z.fillOptions.push(O.fill),z.markerOptions.push(O.marker),z.markerSelectedOptions.push(O.markerSel),z.markerUnselectedOptions.push(O.markerUnsel),z.textOptions.push(O.text),z.textSelectedOptions.push(O.textSel),z.textUnselectedOptions.push(O.textUnsel),z.selectBatch.push([]),z.unselectBatch.push([]),T._scene=z,T.index=z.count,T.x=E,T.y=L,T.positions=C,z.count++,[{x:!1,y:!1,t:T,trace:e}]}},{\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/align_period\":551,\"../../plots/cartesian/autorange\":553,\"../../plots/cartesian/axis_ids\":558,\"../scatter/calc\":927,\"../scatter/colorscale_calc\":929,\"./constants\":980,\"./convert\":981,\"./scene_update\":989,\"@plotly/point-cluster\":59}],980:[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]}}},{}],981:[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(\"./helpers\"),d=t(\"./constants\"),g=t(\"../../constants/interactions\").DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=t(\"../../components/fx/helpers\").appendArrayPointValue;function y(t,e){var r,i=t._fullLayout,a=e._length,o=e.textfont,l=e.textposition,c=Array.isArray(l)?l:[l],u=o.color,f=o.size,h=o.family,p={},d=t._context.plotGlPixelRatio,g=e.texttemplate;if(g){p.text=[];var m=i._d3locale,y=Array.isArray(g),x=y?Math.min(g.length,a):a,b=y?function(t){return g[t]}:function(){return g};for(r=0;rd.TOO_MANY_POINTS||f.hasMarkers(e)?\"rect\":\"round\";if(c&&e.connectgaps){var h=n[0],p=n[1];for(i=0;i1?l[i]:l[0]:l,d=Array.isArray(c)?c.length>1?c[i]:c[0]:c,g=m[p],v=m[d],y=u?u/.8+1:0,x=-v*y-.5*v;o.offset[i]=[g*y/h,x/h]}}return o}}},{\"../../components/drawing\":388,\"../../components/fx/helpers\":402,\"../../constants/interactions\":478,\"../../lib\":503,\"../../lib/gl_format_color\":499,\"../../plots/cartesian/axis_ids\":558,\"../../registry\":638,\"../scatter/make_bubble_size_func\":943,\"../scatter/subtypes\":951,\"./constants\":980,\"./helpers\":985,\"color-normalize\":89,\"fast-isnumeric\":190,\"svg-path-sdf\":310}],982:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"./helpers\"),o=t(\"./attributes\"),s=t(\"../scatter/constants\"),l=t(\"../scatter/subtypes\"),c=t(\"../scatter/xy_defaults\"),u=t(\"../scatter/period_defaults\"),f=t(\"../scatter/marker_defaults\"),h=t(\"../scatter/line_defaults\"),p=t(\"../scatter/fillcolor_defaults\"),d=t(\"../scatter/text_defaults\");e.exports=function(t,e,r,g){function m(r,i){return n.coerce(t,e,o,r,i)}var v=!!t.marker&&a.isOpenSymbol(t.marker.symbol),y=l.isBubble(t),x=c(t,e,g,m);if(x){u(t,e,g,m),m(\"xhoverformat\"),m(\"yhoverformat\");var b=x100},r.isDotSymbol=function(t){return\"string\"==typeof t?n.DOT_RE.test(t):t>200}},{\"./constants\":980}],986:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../scatter/get_trace_color\");function o(t,e,r,o){var s=t.xa,l=t.ya,c=t.distance,u=t.dxy,f=t.index,h={pointNumber:f,x:e[f],y:r[f]};h.tx=Array.isArray(o.text)?o.text[f]:o.text,h.htx=Array.isArray(o.hovertext)?o.hovertext[f]:o.hovertext,h.data=Array.isArray(o.customdata)?o.customdata[f]:o.customdata,h.tp=Array.isArray(o.textposition)?o.textposition[f]:o.textposition;var p=o.textfont;p&&(h.ts=i.isArrayOrTypedArray(p.size)?p.size[f]:p.size,h.tc=Array.isArray(p.color)?p.color[f]:p.color,h.tf=Array.isArray(p.family)?p.family[f]:p.family);var d=o.marker;d&&(h.ms=i.isArrayOrTypedArray(d.size)?d.size[f]:d.size,h.mo=i.isArrayOrTypedArray(d.opacity)?d.opacity[f]:d.opacity,h.mx=i.isArrayOrTypedArray(d.symbol)?d.symbol[f]:d.symbol,h.mc=i.isArrayOrTypedArray(d.color)?d.color[f]:d.color);var g=d&&d.line;g&&(h.mlc=Array.isArray(g.color)?g.color[f]:g.color,h.mlw=i.isArrayOrTypedArray(g.width)?g.width[f]:g.width);var m=d&&d.gradient;m&&\"none\"!==m.type&&(h.mgt=Array.isArray(m.type)?m.type[f]:m.type,h.mgc=Array.isArray(m.color)?m.color[f]:m.color);var v=s.c2p(h.x,!0),y=l.c2p(h.y,!0),x=h.mrc||1,b=o.hoverlabel;b&&(h.hbg=Array.isArray(b.bgcolor)?b.bgcolor[f]:b.bgcolor,h.hbc=Array.isArray(b.bordercolor)?b.bordercolor[f]:b.bordercolor,h.hts=i.isArrayOrTypedArray(b.font.size)?b.font.size[f]:b.font.size,h.htc=Array.isArray(b.font.color)?b.font.color[f]:b.font.color,h.htf=Array.isArray(b.font.family)?b.font.family[f]:b.font.family,h.hnl=i.isArrayOrTypedArray(b.namelength)?b.namelength[f]:b.namelength);var _=o.hoverinfo;_&&(h.hi=Array.isArray(_)?_[f]:_);var w=o.hovertemplate;w&&(h.ht=Array.isArray(w)?w[f]:w);var T={};T[t.index]=h;var k=o._origX,A=o._origY,M=i.extendFlat({},t,{color:a(o,h),x0:v-x,x1:v+x,xLabelVal:k?k[f]:h.x,y0:y-x,y1:y+x,yLabelVal:A?A[f]:h.y,cd:T,distance:c,spikeDistance:u,hovertemplate:h.ht});return h.htx?M.text=h.htx:h.tx?M.text=h.tx:o.text&&(M.text=o.text),i.fillText(h,o,M),n.getComponentMethod(\"errorbars\",\"hoverInfo\")(h,o,M),M}e.exports={hoverPoints:function(t,e,r,n){var i,a,s,l,c,u,f,h,p,d,g=t.cd,m=g[0].t,v=g[0].trace,y=t.xa,x=t.ya,b=m.x,_=m.y,w=y.c2p(e),T=x.c2p(r),k=t.distance;if(m.tree){var A=y.p2c(w-k),M=y.p2c(w+k),S=x.p2c(T-k),E=x.p2c(T+k);i=\"x\"===n?m.tree.range(Math.min(A,M),Math.min(x._rl[0],x._rl[1]),Math.max(A,M),Math.max(x._rl[0],x._rl[1])):m.tree.range(Math.min(A,M),Math.min(S,E),Math.max(A,M),Math.max(S,E))}else i=m.ids;var L=k;if(\"x\"===n){var C=!!v.xperiodalignment,P=!!v.yperiodalignment;for(u=0;u=Math.min(I,O)&&w<=Math.max(I,O)?0:1/0}if(f=Math.min(z,D)&&T<=Math.max(z,D)?0:1/0}d=Math.sqrt(f*f+h*h),s=i[u]}}}else for(u=i.length-1;u>-1;u--)l=b[a=i[u]],c=_[a],f=y.c2p(l)-w,h=x.c2p(c)-T,(p=Math.sqrt(f*f+h*h))v.glText.length){var w=b-v.glText.length;for(d=0;dr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t})),v.line2d.update(v.lineOptions)),v.error2d){var k=(v.errorXOptions||[]).concat(v.errorYOptions||[]);v.error2d.update(k)}v.scatter2d&&v.scatter2d.update(v.markerOptions),v.fillOrder=s.repeat(null,b),v.fill2d&&(v.fillOptions=v.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=v.lineOptions[e],u=[];s._ownfill&&u.push(e),s._nexttrace&&u.push(e+1),u.length&&(v.fillOrder[e]=u);var f,h,p=[],d=c&&c.positions||l.positions;if(\"tozeroy\"===s.fill){for(f=0;ff&&isNaN(d[h+1]);)h-=2;0!==d[f+1]&&(p=[d[f],0]),p=p.concat(d.slice(f,h+2)),0!==d[h+1]&&(p=p.concat([d[h],0]))}else if(\"tozerox\"===s.fill){for(f=0;ff&&isNaN(d[h]);)h-=2;0!==d[f]&&(p=[0,d[f+1]]),p=p.concat(d.slice(f,h+2)),0!==d[h]&&(p=p.concat([0,d[h+1]]))}else if(\"toself\"===s.fill||\"tonext\"===s.fill){for(p=[],i=0,t.splitNull=!0,a=0;a-1;for(d=0;d\")}function u(t){return t+\"\\xb0\"}}e.exports={hoverPoints:function(t,e,r){var o=t.cd,c=o[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(o,(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=o[t.index],m=g.lonlat,v=[i.modHalf(m[0],360)+p,m[1]],y=u.c2p(v),x=f.c2p(v),b=g.mrc||1;t.x0=y-b,t.x1=y+b,t.y0=x-b,t.y1=x+b;var _={};_[c.subplot]={_subplot:h};var w=c._module.formatLabels(g,c,_);return t.lonLabel=w.lonLabel,t.latLabel=w.latLabel,t.color=a(c,g),t.extraText=l(c,g,o[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}},getExtraText:l}},{\"../../components/fx\":406,\"../../constants/numerical\":479,\"../../lib\":503,\"../scatter/get_trace_color\":936}],997:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"../scattergeo/calc\"),plot:t(\"./plot\"),hoverPoints:t(\"./hover\").hoverPoints,eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),styleOnSelect:function(t,e){e&&e[0].trace._glTrace.update(e)},moduleType:\"trace\",name:\"scattermapbox\",basePlotModule:t(\"../../plots/mapbox\"),categories:[\"mapbox\",\"gl\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/mapbox\":613,\"../scatter/marker_colorbar\":944,\"../scattergeo/calc\":969,\"./attributes\":991,\"./defaults\":993,\"./event_data\":994,\"./format_labels\":995,\"./hover\":996,\"./plot\":998,\"./select\":999}],998:[function(t,e,r){\"use strict\";var n=t(\"./convert\"),i=t(\"../../plots/mapbox/constants\").traceLayerPrefix,a=[\"fill\",\"line\",\"circle\",\"symbol\"];function o(t,e){this.type=\"scattermapbox\",this.subplot=t,this.uid=e,this.sourceIds={fill:\"source-\"+e+\"-fill\",line:\"source-\"+e+\"-line\",circle:\"source-\"+e+\"-circle\",symbol:\"source-\"+e+\"-symbol\"},this.layerIds={fill:i+e+\"-fill\",line:i+e+\"-line\",circle:i+e+\"-circle\",symbol:i+e+\"-symbol\"},this.below=null}var s=o.prototype;s.addSource=function(t,e){this.subplot.map.addSource(this.sourceIds[t],{type:\"geojson\",data:e.geojson})},s.setSourceData=function(t,e){this.subplot.map.getSource(this.sourceIds[t]).setData(e.geojson)},s.addLayer=function(t,e,r){this.subplot.addLayer({type:t,id:this.layerIds[t],source:this.sourceIds[t],layout:e.layout,paint:e.paint},r)},s.update=function(t){var e,r,i,o=this.subplot,s=o.map,l=n(o.gd,t),c=o.belowLookup[\"trace-\"+this.uid];if(c!==this.below){for(e=a.length-1;e>=0;e--)r=a[e],s.removeLayer(this.layerIds[r]);for(e=0;e=0;e--){var r=a[e];t.removeLayer(this.layerIds[r]),t.removeSource(this.sourceIds[r])}},e.exports=function(t,e){for(var r=e[0].trace,i=new o(t,r.uid),s=n(t.gd,e),l=i.below=t.belowLookup[\"trace-\"+r.uid],c=0;c\")}}e.exports={hoverPoints: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)return o;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,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}},{\"../scatter/hover\":937}],1005:[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\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"../scatter/select\"),meta:{}}},{\"../../plots/polar\":622,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":1e3,\"./calc\":1001,\"./defaults\":1002,\"./format_labels\":1003,\"./hover\":1004,\"./plot\":1006}],1006:[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=c&&(y.marker.cluster=d.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=_),y.line&&_.length>1&&l.extendFlat(y.line,s.linePositions(t,p,_)),y.text&&(l.extendFlat(y.text,{positions:_},s.textPosition(t,p,y.text,y.marker)),l.extendFlat(y.textSel,{positions:_},s.textPosition(t,p,y.text,y.markerSel)),l.extendFlat(y.textUnsel,{positions:_},s.textPosition(t,p,y.text,y.markerUnsel))),y.fill&&!h.fill2d&&(h.fill2d=!0),y.marker&&!h.scatter2d&&(h.scatter2d=!0),y.line&&!h.line2d&&(h.line2d=!0),y.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(y.line),h.fillOptions.push(y.fill),h.markerOptions.push(y.marker),h.markerSelectedOptions.push(y.markerSel),h.markerUnselectedOptions.push(y.markerUnsel),h.textOptions.push(y.text),h.textSelectedOptions.push(y.textSel),h.textUnselectedOptions.push(y.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),d.x=w,d.y=T,d.rawx=w,d.rawy=T,d.r=m,d.theta=v,d.positions=_,d._scene=h,d.index=h.count,h.count++}})),a(t,e,r)}}},{\"../../lib\":503,\"../scattergl/constants\":980,\"../scattergl/convert\":981,\"../scattergl/plot\":988,\"../scattergl/scene_update\":989,\"@plotly/point-cluster\":59,\"fast-isnumeric\":190}],1014:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../plots/template_attributes\").texttemplateAttrs,a=t(\"../../lib/extend\").extendFlat,o=t(\"../scatter/attributes\"),s=t(\"../../plots/attributes\"),l=o.line;e.exports={mode:o.mode,real:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},imag:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},text:o.text,texttemplate:i({editType:\"plot\"},{keys:[\"real\",\"imag\",\"text\"]}),hovertext:o.hovertext,line:{color:l.color,width:l.width,dash:l.dash,shape:a({},l.shape,{values:[\"linear\",\"spline\"]}),smoothing:l.smoothing,editType:\"calc\"},connectgaps:o.connectgaps,marker:o.marker,cliponaxis:a({},o.cliponaxis,{dflt:!1}),textposition:o.textposition,textfont:o.textfont,fill:a({},o.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:o.fillcolor,hoverinfo:a({},s.hoverinfo,{flags:[\"real\",\"imag\",\"text\",\"name\"]}),hoveron:o.hoveron,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926}],1015:[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(\"../scatter/calc\").calcMarkerSize;e.exports=function(t,e){for(var r=t._fullLayout,c=e.subplot,u=r[c].realaxis,f=r[c].imaginaryaxis,h=u.makeCalcdata(e,\"real\"),p=f.makeCalcdata(e,\"imag\"),d=e._length,g=new Array(d),m=0;m\")}}e.exports={hoverPoints: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)return o;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,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}},{\"../scatter/hover\":937}],1019:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"scattersmith\",basePlotModule:t(\"../../plots/smith\"),categories:[\"smith\",\"symbols\",\"showLegend\",\"scatter-like\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"../scatter/select\"),meta:{}}},{\"../../plots/smith\":629,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":1014,\"./calc\":1015,\"./defaults\":1016,\"./format_labels\":1017,\"./hover\":1018,\"./plot\":1020}],1020:[function(t,e,r){\"use strict\";var n=t(\"../scatter/plot\"),i=t(\"../../constants/numerical\").BADNUM,a=t(\"../../plots/smith/helpers\").smith;e.exports=function(t,e,r){for(var o=e.layers.frontplot.select(\"g.scatterlayer\"),s={xaxis:e.xaxis,yaxis:e.yaxis,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},l=0;l\"),o.hovertemplate=h.hovertemplate,a}function x(t,e){v.push(t._hovertitle+\": \"+e)}}},{\"../scatter/hover\":937}],1027:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../scatter/select\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"scatterternary\",basePlotModule:t(\"../../plots/ternary\"),categories:[\"ternary\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/ternary\":634,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":1021,\"./calc\":1022,\"./defaults\":1023,\"./event_data\":1024,\"./format_labels\":1025,\"./hover\":1026,\"./plot\":1028}],1028:[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\":947}],1029:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../scattergl/attributes\"),l=t(\"../../plots/cartesian/constants\").idRegex,c=t(\"../../plot_api/plot_template\").templatedArray,u=t(\"../../lib/extend\").extendFlat,f=n.marker,h=f.line,p=u(i(\"marker.line\",{editTypeOverride:\"calc\"}),{width:u({},h.width,{editType:\"calc\"}),editType:\"calc\"}),d=u(i(\"marker\"),{symbol:f.symbol,size:u({},f.size,{editType:\"markerSize\"}),sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:f.opacity,colorbar:f.colorbar,line:p,editType:\"calc\"});function g(t){return{valType:\"info_array\",freeLength:!0,editType:\"calc\",items:{valType:\"subplotid\",regex:l[t],editType:\"plot\"}}}d.color.editType=d.cmin.editType=d.cmax.editType=\"style\",e.exports={dimensions:c(\"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\"},matches:{valType:\"boolean\",dflt:!1,editType:\"calc\"},editType:\"calc+clearAxisTypes\"},editType:\"calc+clearAxisTypes\"}),text:u({},s.text,{}),hovertext:u({},s.hovertext,{}),hovertemplate:o(),xhoverformat:a(\"x\"),yhoverformat:a(\"y\"),marker:d,xaxes:g(\"x\"),yaxes:g(\"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:s.selected.marker,editType:\"calc\"},unselected:{marker:s.unselected.marker,editType:\"calc\"},opacity:s.opacity}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/plot_template\":543,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/cartesian/constants\":561,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926,\"../scattergl/attributes\":978}],1030:[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;function u(t,e,r){for(var n=r.matrixOptions.data.length,i=e._visibleDims,a=r.viewOpts.ranges=new Array(n),o=0;oh?b.sizeAvg||Math.max(b.size,3):a(e,x),p=0;pa&&l||i-1,P=!0;if(o(x)||!!p.selectedpoints||C){var I=p._length;if(p.selectedpoints){g.selectBatch=p.selectedpoints;var O=p.selectedpoints,z={};for(l=0;l1&&(u=g[y-1],h=m[y-1],d=v[y-1]),e=0;eu?\"-\":\"+\")+\"x\")).replace(\"y\",(f>h?\"-\":\"+\")+\"y\")).replace(\"z\",(p>d?\"-\":\"+\")+\"z\");var L=function(){y=0,M=[],S=[],E=[]};(!y||y2?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,u=e._len,f={};function d(t,e){var n=r[e],o=i[c[e]];return a.simpleMap(t,(function(t){return n.d2l(t)*o}))}if(f.vectors=l(d(e._u,\"xaxis\"),d(e._v,\"yaxis\"),d(e._w,\"zaxis\"),u),!u)return{positions:[],cells:[]};var g=d(e._Xs,\"xaxis\"),m=d(e._Ys,\"yaxis\"),v=d(e._Zs,\"zaxis\");if(f.meshgrid=[g,m,v],f.gridFill=e._gridFill,e._slen)f.startingPositions=l(d(e._startsX,\"xaxis\"),d(e._startsY,\"yaxis\"),d(e._startsZ,\"zaxis\"));else{for(var y=m[0],x=h(g),b=h(v),_=new Array(x.length*b.length),w=0,T=0;T=0};v?(r=Math.min(m.length,x.length),l=function(t){return A(m[t])&&M(t)},f=function(t){return String(m[t])}):(r=Math.min(y.length,x.length),l=function(t){return A(y[t])&&M(t)},f=function(t){return String(y[t])}),_&&(r=Math.min(r,b.length));for(var S=0;S1){for(var P=a.randstr(),I=0;I\"),name:A||z(\"name\")?y.name:void 0,color:k(\"hoverlabel.bgcolor\")||x.color,borderColor:k(\"hoverlabel.bordercolor\"),fontFamily:k(\"hoverlabel.font.family\"),fontSize:k(\"hoverlabel.font.size\"),fontColor:k(\"hoverlabel.font.color\"),nameLength:k(\"hoverlabel.namelength\"),textAlign:k(\"hoverlabel.align\"),hovertemplate:A,hovertemplateLabels:P,eventData:l};m&&(F.x0=E-i.rInscribed*i.rpx1,F.x1=E+i.rInscribed*i.rpx1,F.idealAlign=i.pxmid[0]<0?\"left\":\"right\"),v&&(F.x=E,F.idealAlign=E<0?\"left\":\"right\");var B=[];o.loneHover(F,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:r,inOut_bbox:B}),l[0].bbox=B[0],d._hasHoverLabel=!0}if(v){var N=t.select(\"path.surface\");h.styleOne(N,i,y,{hovered:!0})}d._hasHoverEvent=!0,r.emit(\"plotly_hover\",{points:l||[f(i,y,h.eventDataKeys)],event:n.event})}})),t.on(\"mouseout\",(function(e){var i=r._fullLayout,a=r._fullData[d.index],s=n.select(this).datum();if(d._hasHoverEvent&&(e.originalEvent=n.event,r.emit(\"plotly_unhover\",{points:[f(s,a,h.eventDataKeys)],event:n.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(o.loneUnhover(i._hoverlayer.node()),d._hasHoverLabel=!1),v){var l=t.select(\"path.surface\");h.styleOne(l,s,a,{hovered:!1})}})),t.on(\"click\",(function(t){var e=r._fullLayout,a=r._fullData[d.index],s=m&&(c.isHierarchyRoot(t)||c.isLeaf(t)),u=c.getPtId(t),p=c.isEntry(t)?c.findEntryWithChild(g,u):c.findEntryWithLevel(g,u),v=c.getPtId(p),y={points:[f(t,a,h.eventDataKeys)],event:n.event};s||(y.nextLevel=v);var x=l.triggerHandler(r,\"plotly_\"+d.type+\"click\",y);if(!1!==x&&e.hovermode&&(r._hoverdata=[f(t,a,h.eventDataKeys)],o.click(r,n.event)),!s&&!1!==x&&!r._dragging&&!r._transitioning){i.call(\"_storeDirectGUIEdit\",a,e._tracePreGUI[a.uid],{level:a.level});var b={data:[{level:v}],traces:[d.index]},_={frame:{redraw:!1,duration:h.transitionTime},transition:{duration:h.transitionTime,easing:h.transitionEasing},mode:\"immediate\",fromcurrent:!0};o.loneUnhover(e._hoverlayer.node()),i.call(\"animate\",r,b,_)}}))}},{\"../../components/fx\":406,\"../../components/fx/helpers\":402,\"../../lib\":503,\"../../lib/events\":492,\"../../registry\":638,\"../pie/helpers\":905,\"./helpers\":1051,\"@plotly/d3\":58}],1051:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\"),a=t(\"../../lib/setcursor\"),o=t(\"../pie/helpers\");function s(t){return t.data.data.pid}r.findEntryWithLevel=function(t,e){var n;return e&&t.eachAfter((function(t){if(r.getPtId(t)===e)return n=t.copy()})),n||t},r.findEntryWithChild=function(t,e){var n;return t.eachAfter((function(t){for(var i=t.children||[],a=0;a0)},r.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},r.isHeader=function(t,e){return!(r.isLeaf(t)||t.depth===e._maxDepth-1)},r.getParent=function(t,e){return r.findEntryWithLevel(t,s(e))},r.listPath=function(t,e){var n=t.parent;if(!n)return[];var i=e?[n.data[e]]:[n];return r.listPath(n,e).concat(i)},r.getPath=function(t){return r.listPath(t,\"label\").join(\"/\")+\"/\"},r.formatValue=o.formatPieValue,r.formatPercent=function(t,e){var r=n.formatPercent(t,0);return\"0%\"===r&&(r=o.formatPiePercent(t,e)),r}},{\"../../components/color\":366,\"../../lib\":503,\"../../lib/setcursor\":524,\"../pie/helpers\":905}],1052:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"sunburst\",basePlotModule:t(\"./base_plot\"),categories:[],animatable:!0,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\").plot,style:t(\"./style\").style,colorbar:t(\"../scatter/marker_colorbar\"),meta:{}}},{\"../scatter/marker_colorbar\":944,\"./attributes\":1045,\"./base_plot\":1046,\"./calc\":1047,\"./defaults\":1049,\"./layout_attributes\":1053,\"./layout_defaults\":1054,\"./plot\":1055,\"./style\":1056}],1053:[function(t,e,r){\"use strict\";e.exports={sunburstcolorway:{valType:\"colorlist\",editType:\"calc\"},extendsunburstcolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],1054:[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(\"sunburstcolorway\",e.colorway),r(\"extendsunburstcolors\")}},{\"../../lib\":503,\"./layout_attributes\":1053}],1055:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-hierarchy\"),a=t(\"d3-interpolate\").interpolate,o=t(\"../../components/drawing\"),s=t(\"../../lib\"),l=t(\"../../lib/svg_text_utils\"),c=t(\"../bar/uniform_text\"),u=c.recordMinTextSize,f=c.clearMinTextSize,h=t(\"../pie/plot\"),p=t(\"../pie/helpers\").getRotationAngle,d=h.computeTransform,g=h.transformInsideText,m=t(\"./style\").styleOne,v=t(\"../bar/style\").resizeText,y=t(\"./fx\"),x=t(\"./constants\"),b=t(\"./helpers\");function _(t,e,c,f){var h=t._fullLayout,v=!h.uniformtext.mode&&b.hasTransition(f),_=n.select(c).selectAll(\"g.slice\"),T=e[0],k=T.trace,A=T.hierarchy,M=b.findEntryWithLevel(A,k.level),S=b.getMaxDepth(k),E=h._size,L=k.domain,C=E.w*(L.x[1]-L.x[0]),P=E.h*(L.y[1]-L.y[0]),I=.5*Math.min(C,P),O=T.cx=E.l+E.w*(L.x[1]+L.x[0])/2,z=T.cy=E.t+E.h*(1-L.y[0])-P/2;if(!M)return _.remove();var D=null,R={};v&&_.each((function(t){R[b.getPtId(t)]={rpx0:t.rpx0,rpx1:t.rpx1,x0:t.x0,x1:t.x1,transform:t.transform},!D&&b.isEntry(t)&&(D=t)}));var F=function(t){return i.partition().size([2*Math.PI,t.height+1])(t)}(M).descendants(),B=M.height+1,N=0,j=S;T.hasMultipleRoots&&b.isHierarchyRoot(M)&&(F=F.slice(1),B-=1,N=1,j+=1),F=F.filter((function(t){return t.y1<=j}));var U=p(k.rotation);U&&F.forEach((function(t){t.x0+=U,t.x1+=U}));var V=Math.min(B,S),H=function(t){return(t-N)/V*I},q=function(t,e){return[t*Math.cos(e),-t*Math.sin(e)]},G=function(t){return s.pathAnnulus(t.rpx0,t.rpx1,t.x0,t.x1,O,z)},Y=function(t){return O+w(t)[0]*(t.transform.rCenter||0)+(t.transform.x||0)},W=function(t){return z+w(t)[1]*(t.transform.rCenter||0)+(t.transform.y||0)};(_=_.data(F,b.getPtId)).enter().append(\"g\").classed(\"slice\",!0),v?_.exit().transition().each((function(){var t=n.select(this);t.select(\"path.surface\").transition().attrTween(\"d\",(function(t){var e=function(t){var e,r=b.getPtId(t),n=R[r],i=R[b.getPtId(M)];if(i){var o=(t.x1>i.x1?2*Math.PI:0)+U;e=t.rpx1X?2*Math.PI:0)+U;e={x0:i,x1:i}}else e={rpx0:I,rpx1:I},s.extendFlat(e,K(t));else e={rpx0:0,rpx1:0};else e={x0:U,x1:U};return a(e,n)}(t);return function(t){return G(e(t))}})):f.attr(\"d\",G),c.call(y,M,t,e,{eventDataKeys:x.eventDataKeys,transitionTime:x.CLICK_TRANSITION_TIME,transitionEasing:x.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,t,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:t._transitioning}),f.call(m,i,k);var p=s.ensureSingle(c,\"g\",\"slicetext\"),_=s.ensureSingle(p,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),w=s.ensureUniformFontSize(t,b.determineTextFont(k,i,h.font));_.text(r.formatSliceLabel(i,M,k,e,h)).classed(\"slicetext\",!0).attr(\"text-anchor\",\"middle\").call(o.font,w).call(l.convertToTspans,t);var A=o.bBox(_.node());i.transform=g(A,i,T),i.transform.targetX=Y(i),i.transform.targetY=W(i);var S=function(t,e){var r=t.transform;return d(r,e),r.fontSize=w.size,u(k.type,r,h),s.getTextTransform(r)};v?_.transition().attrTween(\"transform\",(function(t){var e=function(t){var e,r=R[b.getPtId(t)],n=t.transform;if(r)e=r;else if(e={rpx1:t.rpx1,transform:{textPosAngle:n.textPosAngle,scale:0,rotate:n.rotate,rCenter:n.rCenter,x:n.x,y:n.y}},D)if(t.parent)if(X){var i=t.x1>X?2*Math.PI:0;e.x0=e.x1=i}else s.extendFlat(e,K(t));else e.x0=e.x1=U;else e.x0=e.x1=U;var o=a(e.transform.textPosAngle,t.transform.textPosAngle),l=a(e.rpx1,t.rpx1),c=a(e.x0,t.x0),f=a(e.x1,t.x1),p=a(e.transform.scale,n.scale),d=a(e.transform.rotate,n.rotate),g=0===n.rCenter?3:0===e.transform.rCenter?1/3:1,m=a(e.transform.rCenter,n.rCenter);return function(t){var e=l(t),r=c(t),i=f(t),a=function(t){return m(Math.pow(t,g))}(t),s={pxmid:q(e,(r+i)/2),rpx1:e,transform:{textPosAngle:o(t),rCenter:a,x:n.x,y:n.y}};return u(k.type,n,h),{transform:{targetX:Y(s),targetY:W(s),scale:p(t),rotate:d(t),rCenter:a}}}}(t);return function(t){return S(e(t),A)}})):_.attr(\"transform\",S(i,A))}))}function w(t){return e=t.rpx1,r=t.transform.textPosAngle,[e*Math.sin(r),-e*Math.cos(r)];var e,r}r.plot=function(t,e,r,i){var a,o,s=t._fullLayout,l=s._sunburstlayer,c=!r,u=!s.uniformtext.mode&&b.hasTransition(r);(f(\"sunburst\",s),(a=l.selectAll(\"g.trace.sunburst\").data(e,(function(t){return t[0].trace.uid}))).enter().append(\"g\").classed(\"trace\",!0).classed(\"sunburst\",!0).attr(\"stroke-linejoin\",\"round\"),a.order(),u)?(i&&(o=i()),n.transition().duration(r.duration).ease(r.easing).each(\"end\",(function(){o&&o()})).each(\"interrupt\",(function(){o&&o()})).each((function(){l.selectAll(\"g.trace\").each((function(e){_(t,e,this,r)}))}))):(a.each((function(e){_(t,e,this,r)})),s.uniformtext.mode&&v(t,s._sunburstlayer.selectAll(\".trace\"),\"sunburst\"));c&&a.exit().remove()},r.formatSliceLabel=function(t,e,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!(a||o&&\"none\"!==o))return\"\";var l=i.separators,c=n[0],u=t.data.data,f=c.hierarchy,h=b.isHierarchyRoot(t),p=b.getParent(f,t),d=b.getValue(t);if(!a){var g,m=o.split(\"+\"),v=function(t){return-1!==m.indexOf(t)},y=[];if(v(\"label\")&&u.label&&y.push(u.label),u.hasOwnProperty(\"v\")&&v(\"value\")&&y.push(b.formatValue(u.v,l)),!h){v(\"current path\")&&y.push(b.getPath(t.data));var x=0;v(\"percent parent\")&&x++,v(\"percent entry\")&&x++,v(\"percent root\")&&x++;var _=x>1;if(x){var w,T=function(t){g=b.formatPercent(w,l),_&&(g+=\" of \"+t),y.push(g)};v(\"percent parent\")&&!h&&(w=d/b.getValue(p),T(\"parent\")),v(\"percent entry\")&&(w=d/b.getValue(e),T(\"entry\")),v(\"percent root\")&&(w=d/b.getValue(f),T(\"root\"))}}return v(\"text\")&&(g=s.castOption(r,u.i,\"text\"),s.isValidTextValue(g)&&y.push(g)),y.join(\"
\")}var k=s.castOption(r,u.i,\"texttemplate\");if(!k)return\"\";var A={};u.label&&(A.label=u.label),u.hasOwnProperty(\"v\")&&(A.value=u.v,A.valueLabel=b.formatValue(u.v,l)),A.currentPath=b.getPath(t.data),h||(A.percentParent=d/b.getValue(p),A.percentParentLabel=b.formatPercent(A.percentParent,l),A.parent=b.getPtLabel(p)),A.percentEntry=d/b.getValue(e),A.percentEntryLabel=b.formatPercent(A.percentEntry,l),A.entry=b.getPtLabel(e),A.percentRoot=d/b.getValue(f),A.percentRootLabel=b.formatPercent(A.percentRoot,l),A.root=b.getPtLabel(f),u.hasOwnProperty(\"color\")&&(A.color=u.color);var M=s.castOption(r,u.i,\"text\");return(s.isValidTextValue(M)||\"\"===M)&&(A.text=M),A.customdata=s.castOption(r,u.i,\"customdata\"),s.texttemplateString(k,A,i._d3locale,A,r._meta||{})}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../bar/style\":662,\"../bar/uniform_text\":664,\"../pie/helpers\":905,\"../pie/plot\":909,\"./constants\":1048,\"./fx\":1050,\"./helpers\":1051,\"./style\":1056,\"@plotly/d3\":58,\"d3-hierarchy\":115,\"d3-interpolate\":116}],1056:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../bar/uniform_text\").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,\"marker.line.color\")||i.defaultLine,c=a.castOption(r,s,\"marker.line.width\")||0;t.style(\"stroke-width\",c).call(i.fill,n.color).call(i.stroke,l).style(\"opacity\",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._sunburstlayer.selectAll(\".trace\");o(t,e,\"sunburst\"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style(\"opacity\",r.opacity),e.selectAll(\"path.surface\").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{\"../../components/color\":366,\"../../lib\":503,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],1057:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=t(\"../../plot_api/edit_types\").overrideAll;function u(t){return{show:{valType:\"boolean\",dflt:!1},start:{valType:\"number\",dflt:null,editType:\"plot\"},end:{valType:\"number\",dflt:null,editType:\"plot\"},size:{valType:\"number\",dflt:null,min:0,editType:\"plot\"},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 f=e.exports=c(l({z:{valType:\"data_array\"},x:{valType:\"data_array\"},y:{valType:\"data_array\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:o(),xhoverformat:a(\"x\"),yhoverformat:a(\"y\"),zhoverformat:a(\"z\"),connectgaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},surfacecolor:{valType:\"data_array\"}},i(\"\",{colorAttr:\"z or surfacecolor\",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:\"calc\"}),{contours:{x:u(),y:u(),z:u()},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},opacityscale:{valType:\"any\",editType:\"calc\"},_deprecated:{zauto:l({},i.zauto,{}),zmin:l({},i.zmin,{}),zmax:l({},i.zmax,{})},hoverinfo:l({},s.hoverinfo),showlegend:l({},s.showlegend,{dflt:!1})}),\"calc\",\"nested\");f.x.editType=f.y.editType=f.z.editType=\"calc+clearAxisTypes\",f.transforms=void 0},{\"../../components/color\":366,\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/edit_types\":536,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633}],1058:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.surfacecolor?n(t,e,{vals:e.surfacecolor,containerStr:\"\",cLetter:\"c\"}):n(t,e,{vals:e.z,containerStr:\"\",cLetter:\"c\"})}},{\"../../components/colorscale/calc\":374}],1059:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_surface3d,i=t(\"../../../stackgl_modules\").ndarray,a=t(\"../../../stackgl_modules\").ndarray_linear_interpolate.d2,o=t(\"../heatmap/interp2d\"),s=t(\"../heatmap/find_empties\"),l=t(\"../../lib\").isArrayOrTypedArray,c=t(\"../../lib/gl_format_color\").parseColorScale,u=t(\"../../lib/str2rgbarray\"),f=t(\"../../components/colorscale\").extractOpts;function h(t,e,r){this.scene=t,this.uid=r,this.surface=e,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var p=h.prototype;p.getXat=function(t,e,r,n){var i=l(this.data.x)?l(this.data.x[0])?this.data.x[e][t]:this.data.x[t]:t;return void 0===r?i:n.d2l(i,0,r)},p.getYat=function(t,e,r,n){var i=l(this.data.y)?l(this.data.y[0])?this.data.y[e][t]:this.data.y[e]:e;return void 0===r?i:n.d2l(i,0,r)},p.getZat=function(t,e,r,n){var i=this.data.z[e][t];return null===i&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[e][t]),void 0===r?i:n.d2l(i,0,r)},p.handlePick=function(t){if(t.object===this.surface){var e=(t.data.index[0]-1)/this.dataScaleX-1,r=(t.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(e),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);t.index=[n,i],t.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],t.dataCoordinate=[this.getXat(n,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=t.dataCoordinate[a];null!=o&&(t.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return Array.isArray(s)&&s[i]&&void 0!==s[i][n]?t.textLabel=s[i][n]:t.textLabel=s||\"\",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}};var d=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function g(t,e){if(t0){r=d[n];break}return r}function y(t,e){if(!(t<1||e<1)){for(var r=m(t),n=m(e),i=1,a=0;a_;)r--,r/=v(r),++r1?n:1},p.refineCoords=function(t){for(var e=this.dataScaleX,r=this.dataScaleY,n=t[0].shape[0],a=t[0].shape[1],o=0|Math.floor(t[0].shape[0]*e+1),s=0|Math.floor(t[0].shape[1]*r+1),l=1+n+1,c=1+a+1,u=i(new Float32Array(l*c),[l,c]),f=[1/e,0,0,0,1/r,0,0,0,1],h=0;h0&&null!==this.contourStart[t]&&null!==this.contourEnd[t]&&this.contourEnd[t]>this.contourStart[t]))for(i[t]=!0,e=this.contourStart[t];ea&&(this.minValues[e]=a),this.maxValues[e]\",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\"}}},{}],1066:[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=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)}))),m=e.domain,v=Math.floor(t._fullLayout._size.w*(m.x[1]-m.x[0])),y=Math.floor(t._fullLayout._size.h*(m.y[1]-m.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),T=f(h(x,_),[]),k=f(w,T),A={},M=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})),E=S.reduce(s,0);S=S.map((function(t){return t/E*v}));var L=Math.max(o(e.header.line.width),o(e.cells.line.width)),C={key:e.uid+t._context.staticPlot,translateX:m.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-m.y[1]),size:t._fullLayout._size,width:v,maxLineWidth:L,height:y,columnOrder:M,groupHeight:y,rowBlocks:k,headerRowBlocks:T,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:M[e],xScale:u,x:void 0,calcdata:void 0,columnWidth:S[e]}}))};return C.columns.forEach((function(t){t.calcdata=C,t.x=u(t)})),C}},{\"../../lib/extend\":493,\"./constants\":1065,\"fast-isnumeric\":190}],1067:[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\":493}],1068:[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/i),l=!o||s;t.mayHaveMarkup=o&&i.match(/[<&>]/);var c,u=\"string\"==typeof(c=i)&&c.match(n.latexCheck);t.latex=u;var f,h,p=u?\"\":T(t.calcdata.cells.prefix,e,r)||\"\",d=u?\"\":T(t.calcdata.cells.suffix,e,r)||\"\",g=u?null:T(t.calcdata.cells.format,e,r)||null,m=p+(g?a(g)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&&!l&&!u&&(f=w(m)),t.cellHeightMayIncrease=s||u||t.mayHaveMarkup||(void 0===f?w(m):f),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var v=(\" \"===n.wrapSplitCharacter?m.replace(/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){var e=D(t.rowBlocks,t.page)-t.scrollY;return u(0,e)})),t&&(C(t,r,e,c,n.prevPages,n,0),C(t,r,e,c,n.prevPages,n,1),x(r,t))}}function L(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,u=s.scrollY;s.scrollY=void 0===a?s.scrollY+c*i.event.dy:a;var f=l.selectAll(\".\"+n.cn.yColumn).selectAll(\".\"+n.cn.columnBlock).filter(A);return E(t,f,l),s.scrollY===u}}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]}));b(t,e,a,r),i[o]=n[o]})))}function P(t,e,r,a){return function(){var o=i.select(e.parentNode);o.each((function(t){var e=t.fragments;o.selectAll(\"tspan.line\").each((function(t,r){e[r].width=this.getComputedTextLength()}));var r,i,a=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+a)>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})),o.selectAll(\"tspan.line\").remove(),_(o.select(\".\"+n.cn.cellText),r,t,a),i.select(e.parentNode.parentNode).call(z)}}function I(t,e,r,a,o){return function(){if(!o.settledY){var s=i.select(e.parentNode),l=B(o),c=o.key-l.firstRowIndex,f=l.rows[c].rowHeight,h=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:f,p=Math.max(h,f);p-l.rows[c].rowHeight&&(l.rows[c].rowHeight=p,t.selectAll(\".\"+n.cn.columnCell).call(z),E(null,t.filter(A),0),x(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 u(O(o,i.select(this.parentNode).select(\".\"+n.cn.cellTextHolder).node().getBoundingClientRect().width),a)})),o.settledY=!0}}}function O(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 z(t){t.attr(\"transform\",(function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce((function(t,e){return t+R(e,1/0)}),0),r=R(B(t),t.key);return u(0,r+e)})).selectAll(\".\"+n.cn.cellRect).attr(\"height\",(function(t){return(e=B(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r}))}function D(t,e){for(var r=0,n=e-1;n>=0;n--)r+=F(t[n]);return r}function R(t,e){for(var r=0,n=0;n\",\"<\",\"|\",\"/\",\"\\\\\"],dflt:\">\",editType:\"plot\"},thickness:{valType:\"number\",min:12,editType:\"plot\"},textfont:u({},s.textfont,{}),editType:\"calc\"},text:s.text,textinfo:l.textinfo,texttemplate:i({editType:\"plot\"},{keys:c.eventDataKeys.concat([\"label\",\"value\"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:n({},{keys:c.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u({},s.outsidetextfont,{}),textposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle left\",\"middle center\",\"middle right\",\"bottom left\",\"bottom center\",\"bottom right\"],dflt:\"top left\",editType:\"plot\"},sort:s.sort,root:l.root,domain:o({name:\"treemap\",trace:!0,editType:\"calc\"})}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/domain\":584,\"../../plots/template_attributes\":633,\"../pie/attributes\":900,\"../sunburst/attributes\":1045,\"./constants\":1074}],1072:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"treemap\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":619}],1073:[function(t,e,r){\"use strict\";var n=t(\"../sunburst/calc\");r.calc=function(t,e){return n.calc(t,e)},r.crossTraceCalc=function(t){return n._runCrossTraceCalc(\"treemap\",t)}},{\"../sunburst/calc\":1047}],1074:[function(t,e,r){\"use strict\";e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:\"poly\",eventDataKeys:[\"currentPath\",\"root\",\"entry\",\"percentRoot\",\"percentEntry\",\"percentParent\"],gapWithPathbar:1}},{}],1075:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../components/color\"),o=t(\"../../plots/domain\").defaults,s=t(\"../bar/defaults\").handleText,l=t(\"../bar/constants\").TEXTPAD,c=t(\"../../components/colorscale\"),u=c.hasColorscale,f=c.handleDefaults;e.exports=function(t,e,r,c){function h(r,a){return n.coerce(t,e,i,r,a)}var p=h(\"labels\"),d=h(\"parents\");if(p&&p.length&&d&&d.length){var g=h(\"values\");g&&g.length?h(\"branchvalues\"):h(\"count\"),h(\"level\"),h(\"maxdepth\"),\"squarify\"===h(\"tiling.packing\")&&h(\"tiling.squarifyratio\"),h(\"tiling.flip\"),h(\"tiling.pad\");var m=h(\"text\");h(\"texttemplate\"),e.texttemplate||h(\"textinfo\",Array.isArray(m)?\"text+label\":\"label\"),h(\"hovertext\"),h(\"hovertemplate\");var v=h(\"pathbar.visible\");s(t,e,c,h,\"auto\",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h(\"textposition\");var y=-1!==e.textposition.indexOf(\"bottom\");h(\"marker.line.width\")&&h(\"marker.line.color\",c.paper_bgcolor);var x=h(\"marker.colors\");(e._hasColorscale=u(t,\"marker\",\"colors\")||(t.marker||{}).coloraxis)?f(t,e,c,h,{prefix:\"marker.\",cLetter:\"c\"}):h(\"marker.depthfade\",!(x||[]).length);var b=2*e.textfont.size;h(\"marker.pad.t\",y?b/4:b),h(\"marker.pad.l\",b/4),h(\"marker.pad.r\",b/4),h(\"marker.pad.b\",y?b:b/4),e._hovered={marker:{line:{width:2,color:a.contrast(c.paper_bgcolor)}}},v&&(h(\"pathbar.thickness\",e.pathbar.textfont.size+2*l),h(\"pathbar.side\"),h(\"pathbar.edgeshape\")),h(\"sort\"),h(\"root.color\"),o(e,c,h),e._length=null}else e.visible=!1}},{\"../../components/color\":366,\"../../components/colorscale\":378,\"../../lib\":503,\"../../plots/domain\":584,\"../bar/constants\":650,\"../bar/defaults\":652,\"./attributes\":1071}],1076:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../sunburst/helpers\"),a=t(\"../bar/uniform_text\").clearMinTextSize,o=t(\"../bar/style\").resizeText,s=t(\"./plot_one\");e.exports=function(t,e,r,l,c){var u,f,h=c.type,p=c.drawDescendants,d=t._fullLayout,g=d[\"_\"+h+\"layer\"],m=!r;(a(h,d),(u=g.selectAll(\"g.trace.\"+h).data(e,(function(t){return t[0].trace.uid}))).enter().append(\"g\").classed(\"trace\",!0).classed(h,!0),u.order(),!d.uniformtext.mode&&i.hasTransition(r))?(l&&(f=l()),n.transition().duration(r.duration).ease(r.easing).each(\"end\",(function(){f&&f()})).each(\"interrupt\",(function(){f&&f()})).each((function(){g.selectAll(\"g.trace\").each((function(e){s(t,e,this,r,p)}))}))):(u.each((function(e){s(t,e,this,r,p)})),d.uniformtext.mode&&o(t,g.selectAll(\".trace\"),h));m&&u.exit().remove()}},{\"../bar/style\":662,\"../bar/uniform_text\":664,\"../sunburst/helpers\":1051,\"./plot_one\":1085,\"@plotly/d3\":58}],1077:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../lib/svg_text_utils\"),s=t(\"./partition\"),l=t(\"./style\").styleOne,c=t(\"./constants\"),u=t(\"../sunburst/helpers\"),f=t(\"../sunburst/fx\");e.exports=function(t,e,r,h,p){var d=p.barDifY,g=p.width,m=p.height,v=p.viewX,y=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,T=p.handleSlicesExit,k=p.makeUpdateSliceInterpolator,A=p.makeUpdateTextInterpolator,M={},S=t._fullLayout,E=e[0],L=E.trace,C=E.hierarchy,P=g/L._entryDepth,I=u.listPath(r.data,\"id\"),O=s(C.copy(),[g,m],{packing:\"dice\",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(O=O.filter((function(t){var e=I.indexOf(t.data.id);return-1!==e&&(t.x0=P*e,t.x1=P*(e+1),t.y0=d,t.y1=d+m,t.onPathbar=!0,!0)}))).reverse(),(h=h.data(O,u.getPtId)).enter().append(\"g\").classed(\"pathbar\",!0),T(h,!0,M,[g,m],x),h.order();var z=h;w&&(z=z.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),z.each((function(s){s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-Math.min(g,m)/2),s._hoverY=y(s.y1-m/2);var h=n.select(this),p=i.ensureSingle(h,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?p.transition().attrTween(\"d\",(function(t){var e=k(t,!0,M,[g,m]);return function(t){return x(e(t))}})):p.attr(\"d\",x),h.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),p.call(l,s,L,{hovered:!1}),s._text=(u.getPtLabel(s)||\"\").split(\"
\").join(\" \")||\"\";var d=i.ensureSingle(h,\"g\",\"slicetext\"),T=i.ensureSingle(d,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),E=i.ensureUniformFontSize(t,u.determineTextFont(L,s,S.font,{onPathbar:!0}));T.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",\"start\").call(a.font,E).call(o.convertToTspans,t),s.textBB=a.bBox(T.node()),s.transform=b(s,{fontSize:E.size,onPathbar:!0}),s.transform.fontSize=E.size,w?T.transition().attrTween(\"transform\",(function(t){var e=A(t,!0,M,[g,m]);return function(t){return _(e(t))}})):T.attr(\"transform\",_(s))}))}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../sunburst/fx\":1050,\"../sunburst/helpers\":1051,\"./constants\":1074,\"./partition\":1083,\"./style\":1086,\"@plotly/d3\":58}],1078:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../lib/svg_text_utils\"),s=t(\"./partition\"),l=t(\"./style\").styleOne,c=t(\"./constants\"),u=t(\"../sunburst/helpers\"),f=t(\"../sunburst/fx\"),h=t(\"../sunburst/plot\").formatSliceLabel;e.exports=function(t,e,r,p,d){var g=d.width,m=d.height,v=d.viewX,y=d.viewY,x=d.pathSlice,b=d.toMoveInsideSlice,_=d.strTransform,w=d.hasTransition,T=d.handleSlicesExit,k=d.makeUpdateSliceInterpolator,A=d.makeUpdateTextInterpolator,M=d.prevEntry,S=t._fullLayout,E=e[0].trace,L=-1!==E.textposition.indexOf(\"left\"),C=-1!==E.textposition.indexOf(\"right\"),P=-1!==E.textposition.indexOf(\"bottom\"),I=!P&&!E.marker.pad.t||P&&!E.marker.pad.b,O=s(r,[g,m],{packing:E.tiling.packing,squarifyratio:E.tiling.squarifyratio,flipX:E.tiling.flip.indexOf(\"x\")>-1,flipY:E.tiling.flip.indexOf(\"y\")>-1,pad:{inner:E.tiling.pad,top:E.marker.pad.t,left:E.marker.pad.l,right:E.marker.pad.r,bottom:E.marker.pad.b}}).descendants(),z=1/0,D=-1/0;O.forEach((function(t){var e=t.depth;e>=E._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(z=Math.min(z,e),D=Math.max(D,e))})),p=p.data(O,u.getPtId),E._maxVisibleLayers=isFinite(D)?D-z+1:0,p.enter().append(\"g\").classed(\"slice\",!0),T(p,!1,{},[g,m],x),p.order();var R=null;if(w&&M){var F=u.getPtId(M);p.each((function(t){null===R&&u.getPtId(t)===F&&(R={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var B=function(){return R||{x0:0,x1:g,y0:0,y1:m}},N=p;return w&&(N=N.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),N.each((function(s){var p=u.isHeader(s,E);s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-E.marker.pad.r),s._hoverY=y(P?s.y1-E.marker.pad.b/2:s.y0+E.marker.pad.t/2);var d=n.select(this),T=i.ensureSingle(d,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?T.transition().attrTween(\"d\",(function(t){var e=k(t,!1,B(),[g,m]);return function(t){return x(e(t))}})):T.attr(\"d\",x),d.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{isTransitioning:t._transitioning}),T.call(l,s,E,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text=\"\":s._text=p?I?\"\":u.getPtLabel(s)||\"\":h(s,r,E,e,S)||\"\";var M=i.ensureSingle(d,\"g\",\"slicetext\"),O=i.ensureSingle(M,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),z=i.ensureUniformFontSize(t,u.determineTextFont(E,s,S.font));O.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",C?\"end\":L||p?\"start\":\"middle\").call(a.font,z).call(o.convertToTspans,t),s.textBB=a.bBox(O.node()),s.transform=b(s,{fontSize:z.size,isHeader:p}),s.transform.fontSize=z.size,w?O.transition().attrTween(\"transform\",(function(t){var e=A(t,!1,B(),[g,m]);return function(t){return _(e(t))}})):O.attr(\"transform\",_(s))})),R}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../sunburst/fx\":1050,\"../sunburst/helpers\":1051,\"../sunburst/plot\":1055,\"./constants\":1074,\"./partition\":1083,\"./style\":1086,\"@plotly/d3\":58}],1079:[function(t,e,r){\"use strict\";e.exports=function t(e,r,n){var i;n.swapXY&&(i=e.x0,e.x0=e.y0,e.y0=i,i=e.x1,e.x1=e.y1,e.y1=i),n.flipX&&(i=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-i),n.flipY&&(i=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-i);var a=e.children;if(a)for(var o=0;o-1?C+O:-(I+O):0,D={x0:P,x1:P,y0:z,y1:z+I},R=function(t,e,r){var n=v.tiling.pad,i=function(t){return t-n<=e.x0},a=function(t){return t+n>=e.x1},o=function(t){return t-n<=e.y0},s=function(t){return t+n>=e.y1};return t.x0===e.x0&&t.x1===e.x1&&t.y0===e.y0&&t.y1===e.y1?{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}:{x0:i(t.x0-n)?0:a(t.x0-n)?r[0]:t.x0,x1:i(t.x1+n)?0:a(t.x1+n)?r[0]:t.x1,y0:o(t.y0-n)?0:s(t.y0-n)?r[1]:t.y0,y1:o(t.y1+n)?0:s(t.y1+n)?r[1]:t.y1}},F=null,B={},N={},j=null,U=function(t,e){return e?B[h(t)]:N[h(t)]},V=function(t,e,r,n){if(e)return B[h(x)]||D;var i=N[v.level]||r;return function(t){return t.data.depth-b.data.depth=(n-=(y?m:m.r)-s)){var x=(r+n)/2;r=x,n=x}var b;f?i<(b=a-(y?m:m.b))&&b\"===tt?(l.x-=a,c.x-=a,u.x-=a,f.x-=a):\"/\"===tt?(u.x-=a,f.x-=a,o.x-=a/2,s.x-=a/2):\"\\\\\"===tt?(l.x-=a,c.x-=a,o.x-=a/2,s.x-=a/2):\"<\"===tt&&(o.x-=a,s.x-=a),$(l),$(f),$(o),$(c),$(u),$(s),\"M\"+K(l.x,l.y)+\"L\"+K(c.x,c.y)+\"L\"+K(s.x,s.y)+\"L\"+K(u.x,u.y)+\"L\"+K(f.x,f.y)+\"L\"+K(o.x,o.y)+\"Z\"},toMoveInsideSlice:et,makeUpdateSliceInterpolator:nt,makeUpdateTextInterpolator:it,handleSlicesExit:at,hasTransition:A,strTransform:ot}):w.remove()}},{\"../../lib\":503,\"../bar/constants\":650,\"../bar/plot\":659,\"../bar/uniform_text\":664,\"../sunburst/helpers\":1051,\"./constants\":1074,\"./draw_ancestors\":1077,\"@plotly/d3\":58,\"d3-interpolate\":116}],1086:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../sunburst/helpers\"),s=t(\"../bar/uniform_text\").resizeText;function l(t,e,r,n){var s,l,c=(n||{}).hovered,u=e.data.data,f=u.i,h=u.color,p=o.isHierarchyRoot(e),d=1;if(c)s=r._hovered.marker.line.color,l=r._hovered.marker.line.width;else if(p&&h===r.root.color)d=100,s=\"rgba(0,0,0,0)\",l=0;else if(s=a.castOption(r,f,\"marker.line.color\")||i.defaultLine,l=a.castOption(r,f,\"marker.line.width\")||0,!r._hasColorscale&&!e.onPathbar){var g=r.marker.depthfade;if(g){var m,v=i.combine(i.addOpacity(r._backgroundColor,.75),h);if(!0===g){var y=o.getMaxDepth(r);m=isFinite(y)?o.isLeaf(e)?0:r._maxVisibleLayers-(e.data.depth-r._entryDepth):e.data.height+1}else m=e.data.depth-r._entryDepth,r._atRootLevel||m++;if(m>0)for(var x=0;x0){var x,b,_,w,T,k=t.xa,A=t.ya;\"h\"===p.orientation?(T=e,x=\"y\",_=A,b=\"x\",w=k):(T=r,x=\"x\",_=k,b=\"y\",w=A);var M=h[t.index];if(T>=M.span[0]&&T<=M.span[1]){var S=n.extendFlat({},t),E=w.c2p(T,!0),L=o.getKdeValue(M,p,T),C=o.getPositionOnKdePath(M,p,E),P=_._offset,I=_._length;S[x+\"0\"]=C[0],S[x+\"1\"]=C[1],S[b+\"0\"]=S[b+\"1\"]=E,S[b+\"Label\"]=b+\": \"+i.hoverLabelText(w,T,p[b+\"hoverformat\"])+\", \"+h[0].t.labels.kde+\" \"+L.toFixed(3),S.spikeDistance=y[0].spikeDistance;var O=x+\"Spike\";S[O]=y[0][O],y[0].spikeDistance=void 0,y[0][O]=void 0,S.hovertemplate=!1,v.push(S),(u={stroke:t.color})[x+\"1\"]=n.constrain(P+C[0],P,P+I),u[x+\"2\"]=n.constrain(P+C[1],P,P+I),u[b+\"1\"]=u[b+\"2\"]=w._offset+E}}g&&(v=v.concat(y))}-1!==d.indexOf(\"points\")&&(c=a.hoverOnPoints(t,e,r));var z=f.selectAll(\".violinline-\"+p.uid).data(u?[0]:[]);return z.enter().append(\"line\").classed(\"violinline-\"+p.uid,!0).attr(\"stroke-width\",1.5),z.exit().remove(),z.attr(u),\"closest\"===s?c?[c]:v:c?(v.push(c),v):v}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"../box/hover\":678,\"./helpers\":1091}],1093:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"../box/defaults\").crossTraceDefaults,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\":568,\"../box/defaults\":676,\"../box/select\":683,\"../scatter/style\":950,\"./attributes\":1087,\"./calc\":1088,\"./cross_trace_calc\":1089,\"./defaults\":1090,\"./hover\":1092,\"./layout_attributes\":1094,\"./layout_defaults\":1095,\"./plot\":1096,\"./style\":1097}],1094:[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\":503,\"../box/layout_attributes\":680}],1095:[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\":503,\"../box/layout_defaults\":681,\"./layout_attributes\":1094}],1096:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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,linearized:!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;if(!0!==c.visible||s.empty)r.remove();else{var d=s.bPos,g=s.bdPos,m=e[s.valLetter+\"axis\"],v=e[s.posLetter+\"axis\"],y=\"both\"===c.side,x=y||\"positive\"===c.side,b=y||\"negative\"===c.side,_=r.selectAll(\"path.violin\").data(i.identity);_.enter().append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").attr(\"class\",\"violin\"),_.exit().remove(),_.each((function(t){var e,r,i,a,o,l,f,h,_=n.select(this),w=t.density,T=w.length,k=v.c2l(t.pos+d,!0),A=v.l2p(k);if(c.width)e=s.maxKDE/g;else{var M=u._violinScaleGroupStats[c.scalegroup];e=\"count\"===c.scalemode?M.maxKDE/g*(M.maxCount/t.pts.length):M.maxKDE/g}if(x){for(f=new Array(T),o=0;o\")),u.color=function(t,e){var r=t[e.dir].marker,n=r.color,a=r.line.color,o=r.line.width;if(i(n))return n;if(i(a)&&o)return a}(h,m),[u]}function k(t){return n(g,t,h[d+\"hoverformat\"])}}},{\"../../components/color\":366,\"../../constants/delta.js\":473,\"../../plots/cartesian/axes\":554,\"../bar/hover\":655}],1109:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\"),plot:t(\"./plot\"),style:t(\"./style\").style,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"../bar/select\"),moduleType:\"trace\",name:\"waterfall\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"../bar/select\":660,\"./attributes\":1102,\"./calc\":1103,\"./cross_trace_calc\":1105,\"./defaults\":1106,\"./event_data\":1107,\"./hover\":1108,\"./layout_attributes\":1110,\"./layout_defaults\":1111,\"./plot\":1112,\"./style\":1113}],1110:[function(t,e,r){\"use strict\";e.exports={waterfallmode:{valType:\"enumerated\",values:[\"group\",\"overlay\"],dflt:\"group\",editType:\"calc\"},waterfallgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},waterfallgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],1111:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s0&&(m+=h?\"M\"+f[0]+\",\"+d[1]+\"V\"+d[0]:\"M\"+f[1]+\",\"+d[0]+\"H\"+f[0]),\"between\"!==p&&(r.isSum||s path\").each((function(t){if(!t.isBlank){var e=s[t.dir].marker;n.select(this).call(a.fill,e.color).call(a.stroke,e.line.color).call(i.dashLine,e.line.dash,e.line.width).style(\"opacity\",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(\".lines\").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll(\"path\"),t.width,t.color,t.dash)}))}))}}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../constants/interactions\":478,\"../bar/style\":662,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],1114:[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,a=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,i=0;ii&&(i=u,o=c)}}return i?a(o):s};case\"rms\":return function(t,e){for(var r=0,i=0,o=0;o\":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[0]&&es[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 es[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[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?(m=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(f))},v=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(m=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},v=function(t,e){var r=x[t.astr][e];t.get().push(r)}),k(m);for(var w=o(e.transforms,r),T=0;T1?\"%{group} (%{trace})\":\"%{group}\");var l=t.styles,c=o.styles=[];if(l)for(a=0;a0?o-4:o;for(r=0;r>16&255,l[u++]=e>>8&255,l[u++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,l[u++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e);return l},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=0,s=r-i;os?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;s0)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>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join(\"\")}i[\"-\".charCodeAt(0)]=62,i[\"_\".charCodeAt(0)]=63},{}],2:[function(t,e,r){},{}],3:[function(t,e,r){(function(e){(function(){\n", "/*!\n", " * The buffer module from node.js, for the browser.\n", " *\n", @@ -185,7 +185,7 @@ " * Copyright (c) 2014-2015, Jon Schlinkert.\n", " * Licensed under the MIT License.\n", " */\n", - "\"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||void 0===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)}},{}],278:[function(t,e,r){(function(t){(function(){e.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this)}).call(this,void 0!==n?n:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}],279:[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];(l=o-((r=a+o)-a))&&(t[--n]=r,r=l)}var s=0;for(i=n;i0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=33306690738754716e-32*n;return o>=s||o<=-s?o:f(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],p=r[2]-n[2],d=a*c,g=o*l,m=o*s,v=i*c,y=i*l,x=a*s,b=u*(d-g)+f*(m-v)+p*(y-x),_=7771561172376103e-31*((Math.abs(d)+Math.abs(g))*Math.abs(u)+(Math.abs(m)+Math.abs(v))*Math.abs(f)+(Math.abs(y)+Math.abs(x))*Math.abs(p));return b>_||-b>_?b:h(t,e,r,n)}];function d(t){var e=p[t.length];return e||(e=p[t.length]=u(t.length)),e.apply(void 0,t)}function g(t,e,r,n,i,a,o){return function(e,r,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return n(e,r);case 3:return i(e,r,s);case 4:return a(e,r,s,l);case 5:return o(e,r,s,l,c)}for(var u=new Array(arguments.length),f=0;f0&&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);if(Math.max(c,u)=n?(i=f,(l+=1)=n?(i=f,(l+=1)>1,c=e[2*l+1];if(c===a)return l;a>1,c=e[2*l+1];if(c===a)return l;a>1,c=e[2*l+1];if(c===a)return l;a>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=t.length||0!==a(t[m],s)););}return r}function f(t,e){if(e<0)return[];for(var r=[],i=(1<>>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>1:(t>>1)-1}function x(t){for(var e=v(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n0;){var r=y(t);if(r>=0)if(e0){var t=k[0];return m(0,M-1),M-=1,x(0),t}return-1}function w(t,e){var r=k[t];return c[r]===e?t:(c[r]=-1/0,b(t),_(),c[r]=e,b((M+=1)-1))}function T(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))}}var k=[],A=new Array(a);for(f=0;f>1;f>=0;--f)x(f);for(;;){var S=_();if(S<0||c[S]>r)break;T(S)}var E=[];for(f=0;f=0&&r>=0&&e!==r){var n=A[e],i=A[r];n!==i&&C.push([n,i])}})),i.unique(i.normalize(C)),{positions:E,edges:C}};var n=t(\"robust-orientation\"),i=t(\"simplicial-complex\")},{\"robust-orientation\":284,\"simplicial-complex\":295}],298:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,a,o,s;if(e[0][0]e[1][0]))return i(e,t);r=e[1],a=e[0]}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])){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 lu?s-u:l-u}r=e[1],i=e[0]}t[0][1]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)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\":298,\"binary-search-bounds\":31,\"functional-red-black-tree\":69,\"robust-orientation\":284}],300:[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;l0||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;l0||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;l0||n>0&&c<0)&&r.push(o(i,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},{\"robust-dot-product\":281,\"robust-sum\":289}],301:[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(t){return i(o(t),arguments)}function n(t,r){return e.apply(null,[t].concat(r||[]))}function i(r,n){var i,a,o,s,l,c,u,f,h,p=1,d=r.length,g=\"\";for(a=0;a=0),s.type){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.width?parseInt(s.width):0);break;case\"e\":i=s.precision?parseFloat(i).toExponential(s.precision):parseFloat(i).toExponential();break;case\"f\":i=s.precision?parseFloat(i).toFixed(s.precision):parseFloat(i);break;case\"g\":i=s.precision?String(Number(i.toPrecision(s.precision))):parseFloat(i);break;case\"o\":i=(parseInt(i,10)>>>0).toString(8);break;case\"s\":i=String(i),i=s.precision?i.substring(0,s.precision):i;break;case\"t\":i=String(!!i),i=s.precision?i.substring(0,s.precision):i;break;case\"T\":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=s.precision?i.substring(0,s.precision):i;break;case\"u\":i=parseInt(i,10)>>>0;break;case\"v\":i=i.valueOf(),i=s.precision?i.substring(0,s.precision):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.type)?g+=i:(!t.number.test(s.type)||f&&!s.sign?h=\"\":(h=f?\"+\":\"-\",i=i.toString().replace(t.sign,\"\")),c=s.pad_char?\"0\"===s.pad_char?\"0\":s.pad_char.charAt(1):\" \",u=s.width-(h+i).length,l=s.width&&u>0?c.repeat(u):\"\",g+=s.align?h+i+l:\"0\"===c?h+l+i:l+h+i)}return g}var a=Object.create(null);function o(e){if(a[e])return a[e];for(var r,n=e,i=[],o=0;n;){if(null!==(r=t.text.exec(n)))i.push(r[0]);else if(null!==(r=t.modulo.exec(n)))i.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\");i.push({placeholder:r[0],param_no:r[1],keys:r[2],sign:r[3],pad_char:r[4],align:r[5],width:r[6],precision:r[7],type:r[8]})}n=n.substring(r[0].length)}return a[e]=i}void 0!==r&&(r.sprintf=e,r.vsprintf=n),\"undefined\"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}()},{}],302:[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=i(t,e),n=r.length,a=new Array(n),o=new Array(n),s=0;sn|0},vertex:function(t,e,r,n,i,a,o,s,l,c,u,f,h){var p=(o<<0)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==p&&15!==p)switch(p){case 0:u.push([t-.5,e-.5]);break;case 1:u.push([t-.25-.25*(n+r-2*h)/(r-n),e-.25-.25*(i+r-2*h)/(r-i)]);break;case 2:u.push([t-.75-.25*(-n-r+2*h)/(n-r),e-.25-.25*(a+n-2*h)/(n-a)]);break;case 3:u.push([t-.5,e-.5-.5*(i+r+a+n-4*h)/(r-i+n-a)]);break;case 4:u.push([t-.25-.25*(a+i-2*h)/(i-a),e-.75-.25*(-i-r+2*h)/(i-r)]);break;case 5:u.push([t-.5-.5*(n+r+a+i-4*h)/(r-n+i-a),e-.5]);break;case 6:u.push([t-.5-.25*(-n-r+a+i)/(n-r+i-a),e-.5-.25*(-i-r+a+n)/(i-r+n-a)]);break;case 7:u.push([t-.75-.25*(a+i-2*h)/(i-a),e-.75-.25*(a+n-2*h)/(n-a)]);break;case 8:u.push([t-.75-.25*(-a-i+2*h)/(a-i),e-.75-.25*(-a-n+2*h)/(a-n)]);break;case 9:u.push([t-.5-.25*(n+r+-a-i)/(r-n+a-i),e-.5-.25*(i+r+-a-n)/(r-i+a-n)]);break;case 10:u.push([t-.5-.5*(-n-r-a-i+4*h)/(n-r+a-i),e-.5]);break;case 11:u.push([t-.25-.25*(-a-i+2*h)/(a-i),e-.75-.25*(i+r-2*h)/(r-i)]);break;case 12:u.push([t-.5,e-.5-.5*(-i-r-a-n+4*h)/(i-r+a-n)]);break;case 13:u.push([t-.75-.25*(n+r-2*h)/(r-n),e-.25-.25*(-a-n+2*h)/(a-n)]);break;case 14:u.push([t-.25-.25*(-n-r+2*h)/(n-r),e-.25-.25*(-i-r+2*h)/(i-r)]);break;case 15:u.push([t-.5,e-.5])}},cell:function(t,e,r,n,i,a,o,s,l){i?s.push([t,e]):s.push([e,t])}});return function(t,e){var r=[],i=[];return n(t,r,i,e),{positions:r,cells:i}}}};var o={}},{\"ndarray-extract-contour\":251,\"zero-crossings\":318}],303:[function(t,e,r){(function(r){(function(){\"use strict\";e.exports=function t(e,r,i){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;o0&&(f+=.02);var p=new Float32Array(u),d=0,g=-.5*f;for(h=0;hMath.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],m=Math.cos(d),v=Math.sin(d),y=Math.cos(g),x=Math.sin(g),b=this.computedCenter,_=m*y,w=v*y,T=x,k=-m*x,A=-v*x,M=y,S=this.computedEye,E=this.computedMatrix;for(a=0;a<3;++a){var L=_*r[a]+w*h[a]+T*e[a];E[4*a+1]=k*r[a]+A*h[a]+M*e[a],E[4*a+2]=L,E[4*a+3]=0}var C=E[1],P=E[5],I=E[9],O=E[2],z=E[6],D=E[10],R=P*D-I*z,F=I*O-C*D,B=C*z-P*O,N=c(R,F,B);R/=N,F/=N,B/=N,E[0]=R,E[4]=F,E[8]=B;for(a=0;a<3;++a)S[a]=b[a]+E[2+4*a]*p;for(a=0;a<3;++a){u=0;for(var j=0;j<3;++j)u+=E[a+4*j]*S[j];E[12+a]=-u}E[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,m=(f/=d)*e+o*r,v=(h/=d)*e+s*r;this.center.move(t,g,m,v);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 m=c(s,l,f);s/=m,l/=m,f/=m}var v,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*f,T=c(x-=s*w,b-=l*w,_-=f*w),k=l*(_/=T)-f*(b/=T),A=f*(x/=T)-s*_,M=s*b-l*x,S=c(k,A,M);if(k/=S,A/=S,M/=S,this.center.jump(t,q,G,Y),this.radius.idle(t),this.up.jump(t,s,l,f),this.right.jump(t,x,b,_),2===a){var E=e[1],L=e[5],C=e[9],P=E*x+L*b+C*_,I=E*k+L*A+C*M;v=R<0?-Math.PI/2:Math.PI/2,y=Math.atan2(I,P)}else{var O=e[2],z=e[6],D=e[10],R=O*s+z*l+D*f,F=O*x+z*b+D*_,B=O*k+z*A+D*M;v=Math.asin(u(R)),y=Math.atan2(B,F)}this.angle.jump(t,y,v),this.recalcMatrix(t);var N=e[2],j=e[6],U=e[10],V=this.computedMatrix;i(V,e);var H=V[15],q=V[12]/H,G=V[13]/H,Y=V[14]/H,W=Math.exp(this.computedRadius[0]);this.center.jump(t,q-N*W,G-j*W,Y-U*W)},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],m=d[1],v=d[2],y=i*g+a*m+o*v,x=c(g-=y*i,m-=y*a,v-=y*o);if(!(x<.01&&(x=c(g=a*h-o*f,m=o*l-i*h,v=i*f-a*l))<1e-6)){g/=x,m/=x,v/=x,this.up.set(t,i,a,o),this.right.set(t,g,m,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var b=a*v-o*m,_=o*g-i*v,w=i*m-a*g,T=c(b,_,w),k=i*l+a*f+o*h,A=g*l+m*f+v*h,M=(b/=T)*l+(_/=T)*f+(w/=T)*h,S=Math.asin(u(k)),E=Math.atan2(M,A),L=this.angle._state,C=L[L.length-1],P=L[L.length-2];C%=2*Math.PI;var I=Math.abs(C+2*Math.PI-E),O=Math.abs(C-E),z=Math.abs(C-2*Math.PI-E);I0?r.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function g(t){return new Uint16Array(p(2*t),0,t)}function m(t){return new Uint32Array(p(4*t),0,t)}function v(t){return new Int8Array(p(t),0,t)}function y(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function T(t){return s?new BigUint64Array(p(8*t),0,t):null}function k(t){return l?new BigInt64Array(p(8*t),0,t):null}function A(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=f[e];return r.length>0?r.pop():new a(t)}r.free=function(t){if(a.isBuffer(t))f[n.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|n.log2(e);u[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeBigUint64=r.freeInt8=r.freeInt16=r.freeInt32=r.freeBigInt64=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){h(t.buffer)},r.freeArrayBuffer=h,r.freeBuffer=function(t){f[n.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||\"arraybuffer\"===e)return p(t);switch(e){case\"uint8\":return d(t);case\"uint16\":return g(t);case\"uint32\":return m(t);case\"int8\":return v(t);case\"int16\":return y(t);case\"int32\":return x(t);case\"float\":case\"float32\":return b(t);case\"double\":case\"float64\":return _(t);case\"uint8_clamped\":return w(t);case\"bigint64\":return k(t);case\"biguint64\":return T(t);case\"buffer\":return M(t);case\"data\":case\"dataview\":return A(t);default:return null}return null},r.mallocArrayBuffer=p,r.mallocUint8=d,r.mallocUint16=g,r.mallocUint32=m,r.mallocInt8=v,r.mallocInt16=y,r.mallocInt32=x,r.mallocFloat32=r.mallocFloat=b,r.mallocFloat64=r.mallocDouble=_,r.mallocUint8Clamped=w,r.mallocBigUint64=T,r.mallocBigInt64=k,r.mallocDataView=A,r.mallocBuffer=M,r.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,u[t].length=0,f[t].length=0}}).call(this)}).call(this,void 0!==n?n:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"bit-twiddle\":32,buffer:3,dup:65}],309:[function(t,e,r){\"use strict\";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e0&&(a=n.size),n.lineSpacing&&n.lineSpacing>0&&(o=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts));return r.font=[n.fontStyle,n.fontVariant,n.fontWeight,a+\"px\",n.font].filter((function(t){return t})).join(\" \"),r.textAlign=\"start\",r.textBaseline=\"alphabetic\",r.direction=\"ltr\",h(function(t,e,r,n,a,o){r=r.replace(/\\n/g,\"\"),r=!0===o.breaklines?r.replace(/\\/g,\"\\n\"):r.replace(/\\/g,\" \");var s=\"\",l=[];for(p=0;p-1?parseInt(t[1+i]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(n=n.replace(S(),\"?px \"),m*=Math.pow(.75,l-s),n=n.replace(\"?px \",S())),g+=.25*x*(l-s)}if(!0===o.superscripts){var c=t.indexOf(\"+\"),u=r.indexOf(\"+\"),f=c>-1?parseInt(t[1+c]):0,h=u>-1?parseInt(r[1+u]):0;f!==h&&(n=n.replace(S(),\"?px \"),m*=Math.pow(.75,h-f),n=n.replace(\"?px \",S())),g-=.25*x*(h-f)}if(!0===o.bolds){var p=t.indexOf(\"b|\")>-1,d=r.indexOf(\"b|\")>-1;!p&&d&&(n=v?n.replace(\"italic \",\"italic bold \"):\"bold \"+n),p&&!d&&(n=n.replace(\"bold \",\"\"))}if(!0===o.italics){var v=t.indexOf(\"i|\")>-1,y=r.indexOf(\"i|\")>-1;!v&&y&&(n=\"italic \"+n),v&&!y&&(n=n.replace(\"italic \",\"\"))}e.font=n}for(h=0;h\",a=\"\",o=i.length,s=a.length,l=\"+\"===e[0]||\"-\"===e[0],c=0,u=-s;c>-1&&-1!==(c=r.indexOf(i,c))&&-1!==(u=r.indexOf(a,c+o))&&!(u<=c);){for(var f=c;f=u)n[f]=null,r=r.substr(0,f)+\" \"+r.substr(f+1);else if(null!==n[f]){var h=n[f].indexOf(e[0]);-1===h?n[f]+=e:l&&(n[f]=n[f].substr(0,h+1)+(1+parseInt(n[f][h+1]))+n[f].substr(h+2))}var p=c+o,d=r.substr(p,u-p).indexOf(i);c=-1!==d?d:u+s}return n}function u(t,e){var r=n(t,128);return e?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function f(t,e,r,n){var i=u(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=0?e[a]:i}))},has___:{value:y((function(e){var n=v(e);return n?r in n:t.indexOf(e)>=0}))},set___:{value:y((function(n,i){var a,o=v(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:y((function(n){var i,a,o=v(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)}))}})};d.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 d||x();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 d),i.set(t,e)),this}:function(t,e){if(a)try{n.set(t,e)}catch(r){i||(i=new d),i.set___(t,e)}else n.set(t,e);return this},Object.create(d.prototype,{get___:{value:y((function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)}))},has___:{value:y((function(t){return n.has(t)||!!i&&i.has___(t)}))},set___:{value:y(e)},delete___:{value:y((function(t){var e=!!n.delete(t);return i&&i.delete___(t)||e}))},permitHostObjects___:{value:y((function(t){if(t!==g)throw new Error(\"bogus call to permitHostObjects___\");a=!0}))}})}t&&\"undefined\"!=typeof Proxy&&(Proxy=void 0),n.prototype=d.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=d)}function g(t){t.permitHostObjects___&&t.permitHostObjects___(g)}function m(t){return!(\"weakmap:\"==t.substr(0,\"weakmap:\".length)&&\"___\"===t.substr(t.length-3))}function v(t){if(t!==Object(t))throw new TypeError(\"Not an object: \"+t);var e=t[l];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return o(t,l,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function y(t){return t.prototype=null,Object.freeze(t)}function x(){h||\"undefined\"==typeof console||(h=!0,console.warn(\"WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future.\"))}}()},{}],314:[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\":315}],315:[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}},{}],316:[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\":314}],317:[function(t,e,r){\"use strict\";var n,i=function(){return function(t,e,r,n,i,a){var o=t[0],s=r[0],l=[0],c=s;n|=0;var u=0,f=s;for(u=0;u=0!=p>=0&&i.push(l[0]+.5+.5*(h+p)/(h-p)),n+=f,++l[0]}}};e.exports=(n={funcName:{funcName:\"zeroCrossings\"}.funcName},function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=[a,o.join()].join(),l=e[s];return l||(e[s]=l=t([a,o])),l(r.shape.slice(0),r.data,r.stride,0|r.offset,n,i)}}(i.bind(void 0,n)))},{}],318:[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\":317}]},{},[6])(6)}))}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}]},{},[27])(27)}));\n", + "\"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||void 0===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)}},{}],278:[function(t,e,r){(function(t){(function(){e.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this)}).call(this,void 0!==n?n:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}],279:[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];(l=o-((r=a+o)-a))&&(t[--n]=r,r=l)}var s=0;for(i=n;i0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=33306690738754716e-32*n;return o>=s||o<=-s?o:f(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],p=r[2]-n[2],d=a*c,g=o*l,m=o*s,v=i*c,y=i*l,x=a*s,b=u*(d-g)+f*(m-v)+p*(y-x),_=7771561172376103e-31*((Math.abs(d)+Math.abs(g))*Math.abs(u)+(Math.abs(m)+Math.abs(v))*Math.abs(f)+(Math.abs(y)+Math.abs(x))*Math.abs(p));return b>_||-b>_?b:h(t,e,r,n)}];function d(t){var e=p[t.length];return e||(e=p[t.length]=u(t.length)),e.apply(void 0,t)}function g(t,e,r,n,i,a,o){return function(e,r,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return n(e,r);case 3:return i(e,r,s);case 4:return a(e,r,s,l);case 5:return o(e,r,s,l,c)}for(var u=new Array(arguments.length),f=0;f0&&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);if(Math.max(c,u)=n?(i=f,(l+=1)=n?(i=f,(l+=1)>1,c=e[2*l+1];if(c===a)return l;a>1,c=e[2*l+1];if(c===a)return l;a>1,c=e[2*l+1];if(c===a)return l;a>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=t.length||0!==a(t[m],s)););}return r}function f(t,e){if(e<0)return[];for(var r=[],i=(1<>>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>1:(t>>1)-1}function x(t){for(var e=v(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n0;){var r=y(t);if(r>=0)if(e0){var t=k[0];return m(0,M-1),M-=1,x(0),t}return-1}function w(t,e){var r=k[t];return c[r]===e?t:(c[r]=-1/0,b(t),_(),c[r]=e,b((M+=1)-1))}function T(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))}}var k=[],A=new Array(a);for(f=0;f>1;f>=0;--f)x(f);for(;;){var S=_();if(S<0||c[S]>r)break;T(S)}var E=[];for(f=0;f=0&&r>=0&&e!==r){var n=A[e],i=A[r];n!==i&&C.push([n,i])}})),i.unique(i.normalize(C)),{positions:E,edges:C}};var n=t(\"robust-orientation\"),i=t(\"simplicial-complex\")},{\"robust-orientation\":284,\"simplicial-complex\":295}],298:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,a,o,s;if(e[0][0]e[1][0]))return i(e,t);r=e[1],a=e[0]}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])){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 lu?s-u:l-u}r=e[1],i=e[0]}t[0][1]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)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\":298,\"binary-search-bounds\":31,\"functional-red-black-tree\":69,\"robust-orientation\":284}],300:[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;l0||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;l0||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;l0||n>0&&c<0)&&r.push(o(i,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},{\"robust-dot-product\":281,\"robust-sum\":289}],301:[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(t){return i(o(t),arguments)}function n(t,r){return e.apply(null,[t].concat(r||[]))}function i(r,n){var i,a,o,s,l,c,u,f,h,p=1,d=r.length,g=\"\";for(a=0;a=0),s.type){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.width?parseInt(s.width):0);break;case\"e\":i=s.precision?parseFloat(i).toExponential(s.precision):parseFloat(i).toExponential();break;case\"f\":i=s.precision?parseFloat(i).toFixed(s.precision):parseFloat(i);break;case\"g\":i=s.precision?String(Number(i.toPrecision(s.precision))):parseFloat(i);break;case\"o\":i=(parseInt(i,10)>>>0).toString(8);break;case\"s\":i=String(i),i=s.precision?i.substring(0,s.precision):i;break;case\"t\":i=String(!!i),i=s.precision?i.substring(0,s.precision):i;break;case\"T\":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=s.precision?i.substring(0,s.precision):i;break;case\"u\":i=parseInt(i,10)>>>0;break;case\"v\":i=i.valueOf(),i=s.precision?i.substring(0,s.precision):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.type)?g+=i:(!t.number.test(s.type)||f&&!s.sign?h=\"\":(h=f?\"+\":\"-\",i=i.toString().replace(t.sign,\"\")),c=s.pad_char?\"0\"===s.pad_char?\"0\":s.pad_char.charAt(1):\" \",u=s.width-(h+i).length,l=s.width&&u>0?c.repeat(u):\"\",g+=s.align?h+i+l:\"0\"===c?h+l+i:l+h+i)}return g}var a=Object.create(null);function o(e){if(a[e])return a[e];for(var r,n=e,i=[],o=0;n;){if(null!==(r=t.text.exec(n)))i.push(r[0]);else if(null!==(r=t.modulo.exec(n)))i.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\");i.push({placeholder:r[0],param_no:r[1],keys:r[2],sign:r[3],pad_char:r[4],align:r[5],width:r[6],precision:r[7],type:r[8]})}n=n.substring(r[0].length)}return a[e]=i}void 0!==r&&(r.sprintf=e,r.vsprintf=n),\"undefined\"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}()},{}],302:[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=i(t,e),n=r.length,a=new Array(n),o=new Array(n),s=0;sn|0},vertex:function(t,e,r,n,i,a,o,s,l,c,u,f,h){var p=(o<<0)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==p&&15!==p)switch(p){case 0:u.push([t-.5,e-.5]);break;case 1:u.push([t-.25-.25*(n+r-2*h)/(r-n),e-.25-.25*(i+r-2*h)/(r-i)]);break;case 2:u.push([t-.75-.25*(-n-r+2*h)/(n-r),e-.25-.25*(a+n-2*h)/(n-a)]);break;case 3:u.push([t-.5,e-.5-.5*(i+r+a+n-4*h)/(r-i+n-a)]);break;case 4:u.push([t-.25-.25*(a+i-2*h)/(i-a),e-.75-.25*(-i-r+2*h)/(i-r)]);break;case 5:u.push([t-.5-.5*(n+r+a+i-4*h)/(r-n+i-a),e-.5]);break;case 6:u.push([t-.5-.25*(-n-r+a+i)/(n-r+i-a),e-.5-.25*(-i-r+a+n)/(i-r+n-a)]);break;case 7:u.push([t-.75-.25*(a+i-2*h)/(i-a),e-.75-.25*(a+n-2*h)/(n-a)]);break;case 8:u.push([t-.75-.25*(-a-i+2*h)/(a-i),e-.75-.25*(-a-n+2*h)/(a-n)]);break;case 9:u.push([t-.5-.25*(n+r+-a-i)/(r-n+a-i),e-.5-.25*(i+r+-a-n)/(r-i+a-n)]);break;case 10:u.push([t-.5-.5*(-n-r-a-i+4*h)/(n-r+a-i),e-.5]);break;case 11:u.push([t-.25-.25*(-a-i+2*h)/(a-i),e-.75-.25*(i+r-2*h)/(r-i)]);break;case 12:u.push([t-.5,e-.5-.5*(-i-r-a-n+4*h)/(i-r+a-n)]);break;case 13:u.push([t-.75-.25*(n+r-2*h)/(r-n),e-.25-.25*(-a-n+2*h)/(a-n)]);break;case 14:u.push([t-.25-.25*(-n-r+2*h)/(n-r),e-.25-.25*(-i-r+2*h)/(i-r)]);break;case 15:u.push([t-.5,e-.5])}},cell:function(t,e,r,n,i,a,o,s,l){i?s.push([t,e]):s.push([e,t])}});return function(t,e){var r=[],i=[];return n(t,r,i,e),{positions:r,cells:i}}}};var o={}},{\"ndarray-extract-contour\":251,\"zero-crossings\":318}],303:[function(t,e,r){(function(r){(function(){\"use strict\";e.exports=function t(e,r,i){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;o0&&(f+=.02);var p=new Float32Array(u),d=0,g=-.5*f;for(h=0;hMath.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],m=Math.cos(d),v=Math.sin(d),y=Math.cos(g),x=Math.sin(g),b=this.computedCenter,_=m*y,w=v*y,T=x,k=-m*x,A=-v*x,M=y,S=this.computedEye,E=this.computedMatrix;for(a=0;a<3;++a){var L=_*r[a]+w*h[a]+T*e[a];E[4*a+1]=k*r[a]+A*h[a]+M*e[a],E[4*a+2]=L,E[4*a+3]=0}var C=E[1],P=E[5],I=E[9],O=E[2],z=E[6],D=E[10],R=P*D-I*z,F=I*O-C*D,B=C*z-P*O,N=c(R,F,B);R/=N,F/=N,B/=N,E[0]=R,E[4]=F,E[8]=B;for(a=0;a<3;++a)S[a]=b[a]+E[2+4*a]*p;for(a=0;a<3;++a){u=0;for(var j=0;j<3;++j)u+=E[a+4*j]*S[j];E[12+a]=-u}E[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,m=(f/=d)*e+o*r,v=(h/=d)*e+s*r;this.center.move(t,g,m,v);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 m=c(s,l,f);s/=m,l/=m,f/=m}var v,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*f,T=c(x-=s*w,b-=l*w,_-=f*w),k=l*(_/=T)-f*(b/=T),A=f*(x/=T)-s*_,M=s*b-l*x,S=c(k,A,M);if(k/=S,A/=S,M/=S,this.center.jump(t,q,G,Y),this.radius.idle(t),this.up.jump(t,s,l,f),this.right.jump(t,x,b,_),2===a){var E=e[1],L=e[5],C=e[9],P=E*x+L*b+C*_,I=E*k+L*A+C*M;v=R<0?-Math.PI/2:Math.PI/2,y=Math.atan2(I,P)}else{var O=e[2],z=e[6],D=e[10],R=O*s+z*l+D*f,F=O*x+z*b+D*_,B=O*k+z*A+D*M;v=Math.asin(u(R)),y=Math.atan2(B,F)}this.angle.jump(t,y,v),this.recalcMatrix(t);var N=e[2],j=e[6],U=e[10],V=this.computedMatrix;i(V,e);var H=V[15],q=V[12]/H,G=V[13]/H,Y=V[14]/H,W=Math.exp(this.computedRadius[0]);this.center.jump(t,q-N*W,G-j*W,Y-U*W)},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],m=d[1],v=d[2],y=i*g+a*m+o*v,x=c(g-=y*i,m-=y*a,v-=y*o);if(!(x<.01&&(x=c(g=a*h-o*f,m=o*l-i*h,v=i*f-a*l))<1e-6)){g/=x,m/=x,v/=x,this.up.set(t,i,a,o),this.right.set(t,g,m,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var b=a*v-o*m,_=o*g-i*v,w=i*m-a*g,T=c(b,_,w),k=i*l+a*f+o*h,A=g*l+m*f+v*h,M=(b/=T)*l+(_/=T)*f+(w/=T)*h,S=Math.asin(u(k)),E=Math.atan2(M,A),L=this.angle._state,C=L[L.length-1],P=L[L.length-2];C%=2*Math.PI;var I=Math.abs(C+2*Math.PI-E),O=Math.abs(C-E),z=Math.abs(C-2*Math.PI-E);I0?r.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function g(t){return new Uint16Array(p(2*t),0,t)}function m(t){return new Uint32Array(p(4*t),0,t)}function v(t){return new Int8Array(p(t),0,t)}function y(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function T(t){return s?new BigUint64Array(p(8*t),0,t):null}function k(t){return l?new BigInt64Array(p(8*t),0,t):null}function A(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=f[e];return r.length>0?r.pop():new a(t)}r.free=function(t){if(a.isBuffer(t))f[n.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|n.log2(e);u[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeBigUint64=r.freeInt8=r.freeInt16=r.freeInt32=r.freeBigInt64=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){h(t.buffer)},r.freeArrayBuffer=h,r.freeBuffer=function(t){f[n.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||\"arraybuffer\"===e)return p(t);switch(e){case\"uint8\":return d(t);case\"uint16\":return g(t);case\"uint32\":return m(t);case\"int8\":return v(t);case\"int16\":return y(t);case\"int32\":return x(t);case\"float\":case\"float32\":return b(t);case\"double\":case\"float64\":return _(t);case\"uint8_clamped\":return w(t);case\"bigint64\":return k(t);case\"biguint64\":return T(t);case\"buffer\":return M(t);case\"data\":case\"dataview\":return A(t);default:return null}return null},r.mallocArrayBuffer=p,r.mallocUint8=d,r.mallocUint16=g,r.mallocUint32=m,r.mallocInt8=v,r.mallocInt16=y,r.mallocInt32=x,r.mallocFloat32=r.mallocFloat=b,r.mallocFloat64=r.mallocDouble=_,r.mallocUint8Clamped=w,r.mallocBigUint64=T,r.mallocBigInt64=k,r.mallocDataView=A,r.mallocBuffer=M,r.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,u[t].length=0,f[t].length=0}}).call(this)}).call(this,void 0!==n?n:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"bit-twiddle\":32,buffer:3,dup:65}],309:[function(t,e,r){\"use strict\";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e0&&(a=n.size),n.lineSpacing&&n.lineSpacing>0&&(o=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts));return r.font=[n.fontStyle,n.fontVariant,n.fontWeight,a+\"px\",n.font].filter((function(t){return t})).join(\" \"),r.textAlign=\"start\",r.textBaseline=\"alphabetic\",r.direction=\"ltr\",h(function(t,e,r,n,a,o){r=r.replace(/\\n/g,\"\"),r=!0===o.breaklines?r.replace(/\\/g,\"\\n\"):r.replace(/\\/g,\" \");var s=\"\",l=[];for(p=0;p-1?parseInt(t[1+i]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(n=n.replace(S(),\"?px \"),m*=Math.pow(.75,l-s),n=n.replace(\"?px \",S())),g+=.25*x*(l-s)}if(!0===o.superscripts){var c=t.indexOf(\"+\"),u=r.indexOf(\"+\"),f=c>-1?parseInt(t[1+c]):0,h=u>-1?parseInt(r[1+u]):0;f!==h&&(n=n.replace(S(),\"?px \"),m*=Math.pow(.75,h-f),n=n.replace(\"?px \",S())),g-=.25*x*(h-f)}if(!0===o.bolds){var p=t.indexOf(\"b|\")>-1,d=r.indexOf(\"b|\")>-1;!p&&d&&(n=v?n.replace(\"italic \",\"italic bold \"):\"bold \"+n),p&&!d&&(n=n.replace(\"bold \",\"\"))}if(!0===o.italics){var v=t.indexOf(\"i|\")>-1,y=r.indexOf(\"i|\")>-1;!v&&y&&(n=\"italic \"+n),v&&!y&&(n=n.replace(\"italic \",\"\"))}e.font=n}for(h=0;h\",a=\"\",o=i.length,s=a.length,l=\"+\"===e[0]||\"-\"===e[0],c=0,u=-s;c>-1&&-1!==(c=r.indexOf(i,c))&&-1!==(u=r.indexOf(a,c+o))&&!(u<=c);){for(var f=c;f=u)n[f]=null,r=r.substr(0,f)+\" \"+r.substr(f+1);else if(null!==n[f]){var h=n[f].indexOf(e[0]);-1===h?n[f]+=e:l&&(n[f]=n[f].substr(0,h+1)+(1+parseInt(n[f][h+1]))+n[f].substr(h+2))}var p=c+o,d=r.substr(p,u-p).indexOf(i);c=-1!==d?d:u+s}return n}function u(t,e){var r=n(t,128);return e?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function f(t,e,r,n){var i=u(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=0?e[a]:i}))},has___:{value:y((function(e){var n=v(e);return n?r in n:t.indexOf(e)>=0}))},set___:{value:y((function(n,i){var a,o=v(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:y((function(n){var i,a,o=v(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)}))}})};d.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 d||x();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 d),i.set(t,e)),this}:function(t,e){if(a)try{n.set(t,e)}catch(r){i||(i=new d),i.set___(t,e)}else n.set(t,e);return this},Object.create(d.prototype,{get___:{value:y((function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)}))},has___:{value:y((function(t){return n.has(t)||!!i&&i.has___(t)}))},set___:{value:y(e)},delete___:{value:y((function(t){var e=!!n.delete(t);return i&&i.delete___(t)||e}))},permitHostObjects___:{value:y((function(t){if(t!==g)throw new Error(\"bogus call to permitHostObjects___\");a=!0}))}})}t&&\"undefined\"!=typeof Proxy&&(Proxy=void 0),n.prototype=d.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=d)}function g(t){t.permitHostObjects___&&t.permitHostObjects___(g)}function m(t){return!(\"weakmap:\"==t.substr(0,\"weakmap:\".length)&&\"___\"===t.substr(t.length-3))}function v(t){if(t!==Object(t))throw new TypeError(\"Not an object: \"+t);var e=t[l];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return o(t,l,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function y(t){return t.prototype=null,Object.freeze(t)}function x(){h||\"undefined\"==typeof console||(h=!0,console.warn(\"WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future.\"))}}()},{}],314:[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\":315}],315:[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}},{}],316:[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\":314}],317:[function(t,e,r){\"use strict\";var n,i=function(){return function(t,e,r,n,i,a){var o=t[0],s=r[0],l=[0],c=s;n|=0;var u=0,f=s;for(u=0;u=0!=p>=0&&i.push(l[0]+.5+.5*(h+p)/(h-p)),n+=f,++l[0]}}};e.exports=(n={funcName:{funcName:\"zeroCrossings\"}.funcName},function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=[a,o.join()].join(),l=e[s];return l||(e[s]=l=t([a,o])),l(r.shape.slice(0),r.data,r.stride,0|r.offset,n,i)}}(i.bind(void 0,n)))},{}],318:[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\":317}]},{},[6])(6)}))}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}]},{},[27])(27)}));\n", " });\n", " require(['plotly'], function(Plotly) {\n", " window._Plotly = Plotly;\n", diff --git a/examples/ThinLayers/TL_BioCatNet.py b/examples/ThinLayers/TL_BioCatNet.py index b89c83b..f9d27ed 100644 --- a/examples/ThinLayers/TL_BioCatNet.py +++ b/examples/ThinLayers/TL_BioCatNet.py @@ -388,7 +388,7 @@ def __getReaction( self ): } - # get appropiate replicates + # get appropriate replicates df_meas = self.comps[ self.comps["MEASUREMENT NO."] == key ] # get numbers of replicates diff --git a/examples/Validation/EnzymeML_Validation_Template.yaml b/examples/Validation/EnzymeML_Validation_Template.yaml index a9a04df..9937caa 100644 --- a/examples/Validation/EnzymeML_Validation_Template.yaml +++ b/examples/Validation/EnzymeML_Validation_Template.yaml @@ -140,7 +140,7 @@ protein_dict: - null unit: mandatory: true - description: Unit of the proteins intial concentration. + description: Unit of the proteins initial concentration. range: min: null max: null @@ -230,7 +230,7 @@ complex_dict: - null unit: mandatory: true - description: Unit of the proteins intial concentration. + description: Unit of the proteins initial concentration. range: min: null max: null @@ -279,7 +279,7 @@ reactant_dict: - null unit: mandatory: true - description: Unit of the reactant intial concentration. + description: Unit of the reactant initial concentration. range: min: null max: null diff --git a/examples/Validation/EnzymeML_Validation_Template_Example.yaml b/examples/Validation/EnzymeML_Validation_Template_Example.yaml index 876f520..dcf1b26 100644 --- a/examples/Validation/EnzymeML_Validation_Template_Example.yaml +++ b/examples/Validation/EnzymeML_Validation_Template_Example.yaml @@ -140,7 +140,7 @@ protein_dict: - null unit: mandatory: true - description: Unit of the proteins intial concentration. + description: Unit of the proteins initial concentration. range: min: null max: null @@ -230,7 +230,7 @@ complex_dict: - null unit: mandatory: true - description: Unit of the proteins intial concentration. + description: Unit of the proteins initial concentration. range: min: null max: null @@ -279,7 +279,7 @@ reactant_dict: - null unit: mandatory: true - description: Unit of the reactant intial concentration. + description: Unit of the reactant initial concentration. range: min: null max: null diff --git a/examples/Validation/ValidateEnzymeML.ipynb b/examples/Validation/ValidateEnzymeML.ipynb index ed41d88..db6f662 100644 --- a/examples/Validation/ValidateEnzymeML.ipynb +++ b/examples/Validation/ValidateEnzymeML.ipynb @@ -70,7 +70,7 @@ "metadata": {}, "source": [ "### Using an example spreadsheet\n", - "Since the blank validation YAML wont demonstrate all types of checks, we are going to use an example that has been provided in this directory and convert it to YAML." + "Since the blank validation YAML won't demonstrate all types of checks, we are going to use an example that has been provided in this directory and convert it to YAML." ] }, { @@ -94,7 +94,7 @@ "source": [ "### Performing validation\n", "\n", - "Once the YAML file is ready, validation can be done for an example `EnzymeMLDocument` found in this directory. The validation for this example will fail by intention and thus return a report taht will be shown here. Such a report is returned as `Dict` and can be inspected either manually or programmatically. This was done to allow automation workflows to utilize validation." + "Once the YAML file is ready, validation can be done for an example `EnzymeMLDocument` found in this directory. The validation for this example will fail by intention and thus return a report that will be shown here. Such a report is returned as `Dict` and can be inspected either manually or programmatically. This was done to allow automation workflows to utilize validation." ] }, { diff --git a/examples/Visualisation/Visualisation.ipynb b/examples/Visualisation/Visualisation.ipynb index d55d268..1f3d4d4 100644 --- a/examples/Visualisation/Visualisation.ipynb +++ b/examples/Visualisation/Visualisation.ipynb @@ -52,7 +52,7 @@ "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAA1cAAAHsCAYAAAA+UFdvAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAADJoUlEQVR4nOzdd5wkdZ3/8den88SNM5uXzSy7RFlAQRQEBJVkBu8UI+hxJkwYfsbjznDq6SkemMAIqKiAgCJIkJxhFzYnNs5snNixvr8/qnqmZ6YnbvfMzuz7+Xj0o2JXfau7v9X1qW8oc84hIiIiIiIiByY00gkQEREREREZCxRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5ERERERERKQMGViIiIiIhICSi4GkXM7DQzO7lE26o2s2vMbJ2ZrTCz+83spCFu614zWzaI9eeY2fIh7ut8M7tyKO89EGZ2oZktKZge1DH3sd3bzWz8ANd9a/BdeaXY91imvHLI55VvmdlKM3vOzP440PcdapRPDvl88rUgjzxjZn8zs+kHuv+xSPnk0M4nBe/5pJk5M5vc37oKrobIzCIjsNvTgJJkcOAnwB5goXNuKfBuoN8fzEhzzt3inPv6COz6QmBJfysNlnPu9c65fQNcfTnwJuD+UqejnJRXRsYhnlfuAo50zh0NrAY+W+r0lJryycg4xPPJt5xzRzvnjgVuA75Y6vSUmvLJyDjE8wlmNgs4C9g80B0c9C9gDrAS/0e5HPg1cCbwILAGODFYrwr4GfA48DRwQcH7HwCeCl4nB/On4V+oPhNs99RgfkvBvt8CXBeMXwd8B/gH8G1gPnAn8GSw/cUF6/0oWG898OogXS/mtxWs91rg4SBNvwOqg/kbga8E858HFgfHsAPYGqT31AP4POcDG4BwL8v/FXgs2M81+fWAluC4nwLuBuqC+fcC3wjes7rgc+ztc58DLA/Gw8C3gu/sOeCyYP4VwM+C8aOC76cS/0T0g4LP+fvAQ8Hn/JYix1IF/AV4NtjG24EzgD8WrHMWcHPBMV4VrP8IMAX/pLon+MyeCT6/3o65t+Pp7be2Ef/E2iOdfXx/9wLLlFeUV5RX+s4rwfveCPxa+UT5BOWTvr7DzwI/Uj5RPkH5pNh383vgmPz7+v2uh/ojGc5X8IPIBl90CD9D/Qww4ALgT8F6/wn8azA+Pvjgq4IfRiKYvxB4Ihj/BPD5gi+mZgAZ/DY6f/B34999ADgJuKdgvRsK0tfULe3HBl/q/UBV8J7PAF8s+NI/HIz/G/CTYPzLwCd7+YxOD3483V8PFVn3fAp+4N2WHQHcCkSD6auBdwXjDviXYPyLdGa0e4FvB+OvB/4ejPf2uc+hM4NfCnwhGI8DTwBzg8/qfvwLoyeAU4J13k3XDP67YN0lwNoix/Nm4McF0+OC72UlnSeo3wDnFRxjfvybBWm7joITSB/H3Nvx9PZb24j/W+iRzj7yw730HVwpryivgPJKfvmtBL915RPlE5RPuh/PVcBL+BeWdconyiconxT73r5X+L5i32HhaySKV4dqg3PueQAzWwHc7ZxzZvY8/g8G/LsR55vZJ4PpBDAb2Ab8wMyOBXLAomD548DPzCyKf5J4ZgDp+J1zLmdm1fhR9e/MLL8sXrDerQXp29kt7XOAmfg/ygeD98fw76Tk3RwMn8SvCtYn59w/8E8cB+oM4Hjg8SBdFUBDsMwDbgzGf1WQRuia3jnBeJTin3uh1wJHm9lbgulx+CfNDWb2bvw7ENc45x7sJb1/cs55wAtmNqXI8ueB/zazbwC3OeceADCzXwL/amY/B14BvCtYP41/Es8fy1m97Le3Yy56PPT/WyuaziFSXumD8sqhk1fM7PP4F4e/LrJY+aQPyieHRj5xzn0e+LyZfRb4d+BL3VZRPumD8snYzidmVgl8Ptj+gI2m4CpVMO4VTHt0HocBb3bOrSp8o5l9GdiJX6QXApIAzrn7zexVwBuAX5rZt5xzv8CPoPMS3dLRGgxDwD7n11XuK72FaS1Mbw64yzl3cT/vzzGA78nMTge+W2RRm3Oue13hFcAxZhYKMkeXTQHXO+cG0kah8HMqlt6PU+RzL7K/Dzvn/lpk2UL8ouK+GtkWfrbWfaFzbrWZHY9/h+O/zOxvzrmvAj/Hv0uUxD9pZ4O3ZFxwe4L+P/tix9zr8fTyW+svnUOhvNIH5ZWObXVN4BjLK2Z2CXAucEZBOoulCZRPelA+6dhW1wSOsXxS4Df41aO6B1fKJ31QPunYVtcEjp18Mh+/BOzZIOidCTxlZic653b0lsCx1qHFX4EPW/AJmNlxwfxxwPbgx/xO/KJBzOwwoME592Pgp8DLgvV3mtkRZhbCLxrtwTnXBGwws7cG2zIzO2YQaX0EOMXMFgTvrzSzYncXCjUDNb2k5x/OuWOLvHo0wnTOrcMvMv1KwWe10MwuwC9uf4uZ1QfzJwafE/i/l/xdgXcA/+wnvUU/927+CnwouKuAmS0ysyozGwd8D3gVMKngbsSgmN/7UZtz7lfAfxN8x865bfh31b6AX+zcn14/+256O57efmt9prOMlFeUV7oYS3nFzM7Br+5zvnOubQBp6SuNyifKJx3GWD5ZWDB5Pn6VraFQPlE+6WKs5BPn3PPOuXrn3Bzn3BxgC/CyvgIrGF0lVwPxNeB/gOeCH+5G/DuXVwN/CDLjP+i8A3Ia8Ckzy+BH6fniySvxiyfz9ZCre9nfvwA/MrMv4BfD3oDfKK5fzrlG84tef2tm+SLtL+DXVe7NrcDvg4z4YXdgVcfej99Acq2ZtQG7gU85514IjudvwQkuA1wObML/3Jaa2ZPAfvwGin3p7XMv9BP8Yt2ngu+sEb93mO8CVwd3Fd4H/MPMhtJL3lHAt8zMC47lQwXLfo1f9/eFAWznBuDHZvYROk9yxfR2PKdR/Lc2kHQCYGZvBP4XqAP+YmbPOOfOHkDai1FeGTjllVGWV4Af4FcVuiu4hnnEOffBAaS9O+WTgVM+GX355Otmdjh+qc4mYCh5BJRPBkP5ZPTlk0EzV7S2hEhPZtbinOvtZDfqmNkPgKedcz8d6bTI2KK8ItI/5ROR/imfjD4KrmTAxlIGD+4AtQJnOedS/a0vMhjKKyL9Uz4R6Z/yyeij4EpERERERKQExlqHFiIiIiIiIiNCwZWIiIiIiEgJjOrg6pxzznH4/f3rpdeh8Boy5RW9DrHXkCif6HWIvYZE+USvQ+w1aKM6uNq1a9dIJ0FkVFBeEemf8olI/5RPRPo2qoMrERERERGRg4WCKxERERERkRJQcCUiIiIiIlICZQuuzOxnZtZgZsuLLPukmTkzm1ww77NmttbMVpnZ2eVKl4iIiIiISDmUs+TqOuCc7jPNbBZwFrC5YN4S4CJgafCeq80sXMa0iYiIiIiIlFTZgivn3P3AniKLvgt8mq7dG14A3OCcSznnNgBrgRPLlTYREREREZFSG9Y2V2Z2PrDVOfdst0UzgJcKprcE84pt41Ize8LMnmhsbCxTSkVGP+UVkf4pn4j0T/lEZOCGLbgys0rg88AXiy0uMq/og7ucc9c655Y555bV1dWVMokiY4ryikj/lE9E+qd8IjJwkWHc13xgLvCsmQHMBJ4ysxPxS6pmFaw7E9g2jGkTERERERE5IMNWcuWce945V++cm+Ocm4MfUL3MObcDuAW4yMziZjYXWAg8NlxpExEREREROVDl7Ir9t8DDwOFmtsXM3tfbus65FcBNwAvAncDlzrlcudImIiIiIiJSamWrFuicu7if5XO6TV8FXFWu9IiIiIiIiJTTsPYWKCIiIiIiMlYpuBIRERERESkBBVciIiIiIiIloOBKRERERESkBBRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5ERERERERKQMGViIiIiIhICSi4EhERERERKQEFVyIiIiIiIiWg4EpERERERKQEFFyJiIiIiIiUQNmCKzP7mZk1mNnygnnfMrOVZvacmf3RzMYXLPusma01s1Vmdna50iUiIiIiIlIO5Sy5ug44p9u8u4AjnXNHA6uBzwKY2RLgImBp8J6rzSxcxrSJiIiIiIiUVNmCK+fc/cCebvP+5pzLBpOPADOD8QuAG5xzKefcBmAtcGK50iYiIiIiIlJqI9nm6r3AHcH4DOClgmVbgnk9mNmlZvaEmT3R2NhY5iSKjF7KKyL9Uz4R6Z/yicjAjUhwZWafB7LAr/Oziqzmir3XOXetc26Zc25ZXV1duZIoMuopr4j0T/lEpH/KJyIDFxnuHZrZJcC5wBnOuXwAtQWYVbDaTGDbcKdNRERERERkqIa15MrMzgE+A5zvnGsrWHQLcJGZxc1sLrAQeGw40yYiIiIiInIgylZyZWa/BU4DJpvZFuBL+L0DxoG7zAzgEefcB51zK8zsJuAF/OqClzvncuVKm4iIiIiISKmVLbhyzl1cZPZP+1j/KuCqcqVHRERERESknEayt0AREREREZExQ8GViIiIiIhICSi4EhERERERKQEFVyIiIiIiIiWg4EpERERERKQEFFyJiIiIiIiUgIIrERERERGRElBwJSIiIiIiUgIKrkREREREREpAwZWIiIiIiEgJKLgSEREREREpAQVXIiIiIiIiJaDgSkREREREpATKFlyZ2c/MrMHMlhfMm2hmd5nZmmA4oWDZZ81srZmtMrOzy5UuERERERGRcihnydV1wDnd5l0J3O2cWwjcHUxjZkuAi4ClwXuuNrNwGdMmIiIiIiJSUmULrpxz9wN7us2+ALg+GL8euLBg/g3OuZRzbgOwFjixXGkTEREREREpteFuczXFObcdIBjWB/NnAC8VrLclmNeDmV1qZk+Y2RONjY1lTazIaKa8ItI/5ROR/imfiAzcwdKhhRWZ54qt6Jy71jm3zDm3rK6urszJEhm9lFdE+qd8ItI/5RORgRvu4GqnmU0DCIYNwfwtwKyC9WYC24Y5bSIiIiIiIkM23MHVLcAlwfglwJ8L5l9kZnEzmwssBB4b5rSJiIiIiIgMWaRcGzaz3wKnAZPNbAvwJeDrwE1m9j5gM/BWAOfcCjO7CXgByAKXO+dy5UqbiIiIiIhIqZUtuHLOXdzLojN6Wf8q4KpypUdERERERKScDpYOLUREREREREY1BVciIiIiIiIloOBKRERERESkBBRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5ERERERERKQMGViIiIiIhICSi4EhERERERKQEFVyIiIiIiIiWg4EpERERERKQEFFyJiIiIiIiUgIIrERERERGREhiR4MrMPm5mK8xsuZn91swSZjbRzO4yszXBcMJIpE1ERERERGQohj24MrMZwEeAZc65I4EwcBFwJXC3c24hcHcwLSIiIiIiMiqMVLXACFBhZhGgEtgGXABcHyy/HrhwZJImIiIiIiIyeP0GV2Y2xcx+amZ3BNNLzOx9Q92hc24r8N/AZmA7sN859zdginNue7DOdqC+l/RcamZPmNkTjY2NQ02GyJinvCLSP+UTkf4pn4gM3EBKrq4D/gpMD6ZXAx8b6g6DtlQXAHODbVaZ2b8O9P3OuWudc8ucc8vq6uqGmgyRMU95RaR/yici/VM+ERm4gQRXk51zNwEegHMuC+QOYJ9nAhucc43OuQxwM3AysNPMpgEEw4YD2IeIiIiIiMiwGkhw1WpmkwAHYGYvB/YfwD43Ay83s0ozM+AM4EXgFuCSYJ1LgD8fwD5ERERERESGVWQA61yBH/jMN7MHgTrgLUPdoXPuUTP7PfAUkAWeBq4FqoGbgvZcm4G3DnUfIiIiIiIiw63f4Mo595SZvRo4HDBgVVCdb8icc18CvtRtdgq/FEtERERERGTU6Te4MrN3dZv1MjPDOfeLMqVJRERERERk1BlItcATCsYT+KVLTwEKrkRERERERAIDqRb44cJpMxsH/LJsKRIRERERERmFBtJbYHdtwMJSJ0RERERERGQ0G0ibq1sJumHHD8aWADeVM1EiIiIiIiKjzUDaXP13wXgW2OSc21Km9IiIiIiIiIxKA2lzdd9wJERERERERGQ06zW4MrNmOqsDdlkEOOdcbdlSJSIiIiIiMsr0Glw552qGMyEiIiIiIiKj2UDaXAFgZvX4z7kCwDm3uSwpEhERERERGYX67YrdzM43szXABuA+YCNwR5nTJSIiIiIiMqoM5DlXXwNeDqx2zs0FzgAeLGuqRERERERERpmBBFcZ59xuIGRmIefcP4BjD2SnZjbezH5vZivN7EUze4WZTTSzu8xsTTCccCD7EBEREZFh4nmwaw1seMAfet5Ip0hkRAwkuNpnZtXAA8Cvzex7+M+7OhDfA+50zi0GjgFeBK4E7nbOLQTuDqZFRERE5GDmebDyVrjmVLj+XH+48lYFWHJIGkhwdT8wHvgocCewDjhvqDs0s1rgVcBPAZxzaefcPuAC4PpgteuBC4e6DxEREREZJnvWwR8vg0y7P51p96f3rBvZdImMgIEEVwb8FbgXqAZuDKoJDtU8oBH4uZk9bWY/MbMqYIpzbjtAMKwvmhizS83sCTN7orGx8QCSITK2Ka+I9E/5RKR//eaT5h2dgVVeph1adgxPAkUOIv0GV865rzjnlgKXA9OB+8zs7wewzwjwMuBHzrnjgFYGUQXQOXetc26Zc25ZXV3dASRDZGxTXhHpn/KJSP/6zSc1UyFa0XP+83+AVIvaYskhZcDPuQIagB3AbnopVRqgLcAW59yjwfTv8YOrnWY2zTm33cymBfsTERERkYPZxPnwxms6qwZGEjBzGTz5c7/tVbIJcmk/AHvjNbD4PAgNpPKUyOgzkOdcfcjM7sXvZGIy8AHn3NFD3aFzbgfwkpkdHsw6A3gBuAW4JJh3CfDnoe5DRERERIZJKOQHTJc9AO++DT74T3jXrX4g1brbD6xAbbHkkDCQkqvDgI85554p4X4/jN/zYAxYD7wHP9C7yczeB2wG3lrC/YmIiIhIuYRCMHmh/8qrnQG4rutl2qFpa9f1RMaQfoMr51zJu0QPArVlRRadUep9iYiIiMgIyLfF6t7Zxe2fgguuhorxfmcYNVP9qoWqKihjwGDaXImIiIiIDEyxtlgnfgCe/x389Cw/mPJyaoslw8vz/KqpZQrsFVyJiIiISOl1tMVa4nfLXh1cyB75ZvjJGX5gBX7g9Yf3+222Ji8q64WvHOLyD7y++VLIJv2A/03XljSwV3AlIiIiIuVRrC1WqqUzsMrLpeH6N8DsV8Cav0E2pRKtQ8VQS5Kcg3QLtO+F9n2Q3Fdk2G1ZayPsf6lzG9mkX7J62ZKStQNUcCUiIiIiw6dYW6xwDCbOgxdv7ZyXaYebPwAffFAdYIxVuRws/z3c+mE/oA7H4KQPwqSFkNrfe5CU3AfJ/eBle9+2hf12fYnx/rBiAsSquwZX0PnAawVXIiIiIjLqdG+LlS+hqpgI15/bdd1sCn75Rjj67XDEeTDtGDDzl5W57cxBYbiPcaj7yyT9ACgf/AxkPLkP2vd0LcXMpeGh73dOW6gzOMoPxx/mB0qF87oP84FU/reSt2sNXHNq18A+WuFXWS0RBVciIiIiMnx6a4u1Z13PEq1QFKqnwD+/Aw/8N4yb7QdZi98ALQ3w5w91DdDKWYVwJAKdlbf2DEJLdYzO+cFMNukHsek2WH0n/P2LnaVIy94LE+b6pUTFSpDywVI22ceODBK1fsCTD37GzfTHU81+yVV3b/4pLHwtxGt6BkgHorfAfuL8ku1CwZWIiIiIDK9ibbF6u/BdfJ5/Eb/qdr/a4OM/hkd+2HV7mXb4w/vgtVfBhDl+YBCOQSQO4SiEg2Ek3rksvzwU7j+9pQh0nPOrseXSwSsTvNKdQ69g3p4N8Jcruj6E+ffvg1M+4gcd2VRnYNTnsI9lfcml4dH/65yOVXcNkCYv6FpS1Nt4vLb3z3jXGlj1l54lSdOO8QOyUustsC9hkGzOuf7XOkgtW7bMPfHEEyOdDJHhMuRbN8orcogZUl5RPpFDzMGZT/KlQ31d+Cab/Kpj93+rNPu0UBB8xSAS6xZ8BUPnwfZn/WHh+6YdC6FIEBgNIHAqtXDM7/EuEj/w4d7N8ND3eu7jol/DwrP94LTUyl06d+AGnU9UciUiIiIiB4diJVrdJWr9NlgP/6BriUckDm/5uV9lL5uGXMoPbLKpgqAnHUxn+lieHy9Y3trYNbACfzqXhsQ4CI8PArKoPwxFO8fD3ce7Ly+yTigaVHu83E9HxzEm4N23w5QlfkBYygBk1xp4/NqepUiTDy9PYAXDUpI03BRciYiIiMjo0lsVwkWvK8+FeW8dIbz1uvL1ZOh5fslZ92Ocflx5jnEY2iMVNZCAehRRcCUiIiIio8twl3iMROAx3Mc4BkuRRoKCKxEREREZfYazxGOkAo/hLtUZY6VII0HBlYiIiIhIfxR4yACMWDmfmYXN7Gkzuy2Ynmhmd5nZmmA4YaTSJiIi0sHz/PYWGx7wh57X/3tEROSQNJKVKD8KvFgwfSVwt3NuIXB3MC0iIjJy8t0EX3MqXH+uP1x5qwIsEREpakSCKzObCbwB+EnB7AuA64Px64ELhzlZIiIiXe1Z19mAHfzhHy/z54uIiHQzUiVX/wN8Gii89TfFObcdIBjWF3ujmV1qZk+Y2RONjY1lT6jIaKW8ItK/fvNJ846uXS+DP92yY3gSKHIQ0P+JyMANe3BlZucCDc65J4fyfufctc65Zc65ZXV1dSVOncjYobwi0r9+80nNVL/L5e5eehxyObXFkkOC/k9EBm4kegs8BTjfzF4PJIBaM/sVsNPMpjnntpvZNKBhBNImIiLSqfuzbSJxGD8H7v4KrPgj7FoF2VTnM28Wn6dnwoiIHMKG/R/AOfdZ59xM59wc4CLgHufcvwK3AJcEq10C/Hm40yYiItJFx7NtHoB33wYffBA+9BCc+knY8ZwfWIHaYsnBQT1bioy4g+n22teBs8xsDXBWMC0iIjKy8s+2mXOqPwxHYN5pPdfLtEPTVl3gyshQz5YiB4URfYiwc+5e4N5gfDdwxkimR0REZEDybbG6d3Zxy4fh8NfDk9dBNqnqgoc6z/NLM5t3+L+ZifNL9ztwDtKtkGqCVDPsXOGXnubS/vJ8aeplS/TQW5FhNKLBlYiIyKjUoy1WAk66DFb+BR79v871Mu1w86V+VULnleciWwamnIFOb/tbeWvnb6Qw0PayQVDUBMkgOMoHSckmSO0vGO++rKlz2vVTKpXv2VLBlciwUXAlIiIyWB1tsZb4F6/VwcX6/DPgF+d3XTeXhps/4LfRymX8QOxN16o0azj1Fej09R04B5k2SLdBpjUYtkG6pWC8tfi8lp2w9u+dAVCmHW56F4TjkEv1n+ZwHOI1kKj1h/FamDi3c7z7slQz3PHpzpIr8I+zeuqBfXYiMigKrkRERIYi3xarsFSgdnrP6oL1S2BrwdNHskn43bvhuHfC/NNh2rEwYQ6Yda4zEqUsw7m/Uu+zIwhqDYKcVki1dE7vWQ//+E/wMv76mXb43XtgwZkQChcESK0F40GghBt4OkIRiFZBrBIsVLxk6Yhzof4IiI/rGSDFayARzI/EB/cZeB5UTuwZQE6cP7jtiMgBUXAlIiJSKt2rC0Yr4NRPwO/f03U958Ezv4anrvenE+Nh+rF+oDXtGGjbDX/7wvC02xpqqc5gOOdXhcul/R4WM0lYfTv89XP+dDgGJ38YphzZGeDkg6Si083dlrUyqCAIwOX80sTKyX4wFKuG6ikQq4JoZcEwWJYfj1b5yzrG8+tWQSTWuf1da/xOJQoD7WgFnPbZ8lTT6600VaWjIsNKwZWIiEipFLvAda5naVa0At5/tx9YbH8Gtj3jDx/+YWfpSl6mHW66BOoO9y/iQ5HgFQ6G0W7TBcvD0SLr598TTLfv7brfTDv8/r1wwvv9oCKX7gyKCof9zculIZv2q8BlU/QZ/OTS8MC3i3yeET8NseogoAletTMLpoNl8equ04XjrY3wm7f7wWrhd3DJreVrj1Qs0C53SVKx0lQRGVYKrkREREqp+wWu5xW/yK47wl93xss635tNwdO/hr98vNtGXWeVMS8LuawfuHht/rSXC4a9vQqW5zL0W8rjZf2OOSzkt/2JxPzSpY7xbvMStQNbLz9v32Z45Ic993vh1TDnVZ2BUWFJ0IHwPL+d23AHOipJEjnkKLgSEREpp8FcZEfiMPfU4iVdF/6odCUSntcZbO1aBT87p2upTiQBl97rtw0qh11r4Mmf9TzGmSfC+Fml399IBToqSRI55Oj2iYiISLl1fxBxXxf1+epk0Qp/uhylLKGQXyoUq4Spx/ilOoX7e9O1MPnw0u2vu+E4xu4G8x2IiAyRSq5EREQOJsNdyjISpTqqMiciY5SCKxERkYPNcFcnG4nqa6oyJyJjkIIrkQLO80hv2kS2oYFIfT2xww7DynwndST2KSIiIiKlp+BKJOA8j+a77mLbZ67EJZNYIsH0b3ydmrPOKmmw4zwPl07jkklyySQtd9/Nzm98E9Lpsu1TRERERMpPwZUc1MpdquM8D5dM4rW1kVy1mq2f+jSk0/6yZJKtn/wUdR/5COHaWlwqhUun8FIpXLJgPJXGpfLj/stLF85Pdoy7VAqXyfSenmSSbZ+5krmLFhGfO7dkxyky2qmEV0RERoNhD67MbBbwC2Aq4AHXOue+Z2YTgRuBOcBG4G3Oub1D3Y/nOTbubmVnU5IptQnmTKoiFLIDP4BD2HBf3HQvSSIeZ+oX/x+VJ5yAa0/itbXi2tvx2tqCV+F4G157G67XZf60a2vrOxGZDI3fLvJgy2iUUCyGxeNYIk4oFvfH43FCsRjh6hpscoJQPIZ1LIsRisexeKJjPL1tG3uvu77rcSeTZBsbhyW48nI5WrevJte0nXDtNKqmLSIUDpd9vyKDMVylyr3R/4lI/5RPRHwjUXKVBT7hnHvKzGqAJ83sLuDdwN3Oua+b2ZXAlcBnhrIDz3PcuWIHV9z0DMmMRyIa4jtvO5Zzlk5VRh+ioV7cuFwOr7UVr6WFXEsLXsHLn/aXea3dpltayO7dS2bz5s6NpVLs+PwXBpReSyQIVVYSqqjwh5WVWGUF0YkTO6Y7llVVYhUVeK1tNH7/+1BYshSLMetHPyK+YH4QGMWxWAwrUQCS2rCBfTfc6AePBWmP1NWVZPt98XI52p/7EzW3X97xUM3W1/+QiqMvVIAl/SrnzRbnnF9ttrkZr6WV5OrVbPvUpzry5nCW8Or/RKR/yicinYY9uHLObQe2B+PNZvYiMAO4ADgtWO164F6GGFxt3N3akcEBkhmPK256hsUfOZV5ddUHdgCHIJfJ0Pb0Mz2rzF3xCWrf8AYsFCoaHOVaW/svGQIwI1RVRai6mlB1FeGqakLV1URi0a7BVWDiBz5AxdKlhKoquwRKVllJqLKKUEViSMGP8zxis2f1CCCrXvHyst0djx12GNO/8fUe+4wddlhZ9leodftqam6/nOeTU8hZiGMz66m6/XKa65ZQM/1w2LMOmndAjbpIlq76utniMhn/HNDcTK7jfNBccH5o7ry50tzS48ZLfpxcru80DFMJr/5PZDQZqeqzyicinUa0zZWZzQGOAx4FpgSBF8657WZW38t7LgUuBZg9e3bR7e5sSnZk8LxkxqOhOTmmMvmBnkSd55Hbs4dsQwOZhgayOxvINnS+Mo0NZBsaye3eDc713EAuR/Pf/054/LiOgCg8fjyxWTMJBdOh6irC1cF4fp3qfCAVvCori6Y7tWEDG974ph6lOuPf9MayXFBZKETNWWcxd9Eiso2NROrqyv7HVM599pdXck3bIdNO1sIcF1oHQDadInb/VVC/EB65GrLJzod7Lj5PAdZBqpQXVC6dJtfU5L/278frGG8i17Qfb38T6W1babn7HvD886xLJtn60Y9BJALZbL/7sFiMUE1NcH6oIVRdTXTmzM5zRXU14ZrO84bX2sqO//zPjps7EJTwTp48pGPskpZ+8smh8n8io185q88qn4gM3IgFV2ZWDfwB+JhzrslsYMXGzrlrgWsBli1bVuSKH6bUJkhEQ10yuhkk096YqRPc10kUM3L79pFtaOwMlhobOoOo/Pxdu3peCJkRnjSJSH0d0bp6KpYeSaS+HkIhdv3f/3WtMhePM/cPvy/bneORKNWxUIj43LnD2plEufbZX14J106DaAVHpddzQ/bVbHDTeXX4WU5a+1dYfWvnipl2+ONl8MEjwXkqzTrIFDsXTPuPr1F5wgl+6VFhkLQ/CJSCICkfRHUEUE1NuPb2PvdnlZWEEomOwKpQ7TlnE1+4iFBNdddAKT9eU+OXUkfCkGqCVDMkg2HH9P5gfFvHMpfaTs2/hMhu30Vyb5gdz05j+mcuJVZb9C9gcJ9fP/mk2P9JLGLU1yQOeN8y9pW6JMllsx1thvOvfNvj1MZNNHzzmx3/66WsPjuUfGIUPU2IjHkjElyZWRQ/sPq1c+7mYPZOM5sWlFpNAxqGuv05k6r4ztuO7SiijoaNWDjEZb96kguOnc6fn9lKKutGdZ3g5MqVPavpfezjROrrye3diyu4w5sXHjeOSH09kfp64vPnB+N1ROrriQbzI5MnY9Foj/c6zyO+YP6wBzrDXZJ0KKmatojW1/+Qqtsv56LMfawKLeDj8S+zbm+WD4dv5v2RO0hYEEx7Odyj12BPXa/SrAE4kAsq53l+O8XmZnLNLXjNTUHboxY/EGpuIdfcFFSpayazs4H2p57qKF12ySTbPvmpPvcRqqoiNK6WcO04wrW1xOYcRqg2mB5X22U8XFNDqGDczCO1ejlbL7sE85KEox6hqCNcGabutHFEqvdAcqMfIO1qgq3dAqhkE2Ra+/8gLAzxGkjUYhYinN6GzZ5FaP5U5r7xlcTW/S/WciRMnj+gz3Wouv+fAEyuijNFwdWoM5xV5lw6Ta61laa//pWd//lf/n91NMqk97yb+OGH+73UtnZ2ruS1B4FSvvOlXuYX+2/vMx3DVH22ez6JhY1wOMRHb3yGn19yApXx8Ki/qS0yUOaKVfcq5w79IqrrgT3OuY8VzP8WsLugQ4uJzrlP97WtZcuWuSeeeKLosnwJVUNzkvqaBJXRMB+58Rke27Cny3qJaIjbD/I6wV4qRWrlStqfX05y+XKSK5aTWruuaFW9ypNPpmLJER1BVMerro5QPH5A6ej4Y1KgM1KG/G/UW17p3ltgrH4B//uXx7nm0UbG0cJ3oj/iVeHnITEekvu6vjlaAZc94JdgqX1WB+d57L/1Vrb/vy92XFBN+Jd3EJ8zB6+11Q+UmprJtTR3CZQ6A6aW4tVwC1gs5gdA1dVgRnrDhh7rTLjkXVQec0xnYFRb65cixRyWa/NLiJJNnSVFHdP7uk13W55L9f8hRKsgUQvx2o4AiXhNMF3bbbqmYN2CZdFKv8oBwK41cM2pfilqxz6C39/khUU/ov4T2VOv+aTg/2TT7jY+84fnueiEWXz9zUcPZTcSGNZgp1gJ79f/i+rTTsO1t3f2PNveHgQ9PUuGuvQ621swFIzTxyM3egiHu3SyZJVBZ0sV3TpfqgzaFufnd6znD7N79rDlYx/vUX127h9v7i24Kls+qa9JkM56vOe6x9nbmibnHJnc6L6pLYesQf9QRyK4eiXwAPA8flfsAJ/Db3d1EzAb2Ay81Tm3p+hGAn0FV8U8tLaRd/zksR7zb7j0JF4+78Dr7peCS6dJrllDcvkKksuX0758Oak1azqK+cMTJ5I46kiiM2ey76bfdTmB93MSldGv5MFVMU9u3MWe5X/n2w/tY6U3i/dH/8qHzz+FcX+5tOfKSy7wg6lDpH2Wc86vcrtjB5kdO8jubCCz0x9md+wgs3Mnme3b++7IJRQiVFPjlwjV1PhV5oJAKVRbG7Q1qiFcW0MoaI8UrkoQihvheIhQDEKk/ZKgdCuZTSvZfe3/EXJpQlFHKOoRrghRfdLRhCOua4CUaur/IKOVQZAzzg90EuN6Trc04p69gey0M8hmKwlXholuuR07/3uw8LUQKnFvk54HK2/1q6cGPVv28zsr6UVjd9+8cyVX37uO7110LBccO2MouzrkDbZ9kHPOf25gPoBpbfWDoLY2vLbWrvPbCh7D0erPy+7ZQ3L58n5vXPQpEunsRKlYMNQt8Mk0NrLv17/psZlp//WfVJ10ElZRQaiqCotGGWjTiL4Moc1VWfMJwKPrd3PRtY9Q+KmPhpvaMrYN8sbOoPPJSPQW+E96T+gZ5dz31HEVPeoER0LGpKoDK9EZKpfNklq/nuTzfmlU+/IVpFau7Cj2D40bR8XSpVS/970kjjqSiiOPJDJ1KmaG8zyqTjxxRHqZk7FtQlWCT75Yx2Wn1vP3dS38ZMvZ3PX3EL8Iz+awXEHvjRaCVXd2LcnItMPv3wdv+A4seA3UzugsfcjzvGEt6XLZLOm1K8ju3ElkylRiC5ZgkZ6nPpfNkt21KwiSGsju3EFmx06yO3d2BlA7d/aslhMKEZk8mcjUqcTnzSM2dw6t99yFRRyh/CvqqLv0EioXz8EshWXaINUC6VZI54eNndNtrbC3YLnrvee8KDD1mOAYPPCyIaxqPJZsgNppMHFu8QCpx3QwHu5ZLbiHXWuwp64juuH3dKwdrYBJC0ofWIH/+1h8Hly2BFp2QPXIlpBecdYiHtuwh8/d/DzjK6LEIqFRX92pXKVILpcLqrg2B9Va/WFq/QZ2/eAHXdoHbf34FVQuOx4cPYIlr61t4A14zDqDnaoqQpWVuFyuaGA17i1vIbFoYecjOyoq/F5ni5QMWSw2qGNPbdjA/j/c3KNTpopjjyU6ffqgtjUQB2NVes85un/q6uhCuhuuUmznHF5bG0133MGOr37NL+WNx5nxzW+U9LmJw15yVUqDLbnq/hyGkIHn4JT5k7jitYtIZ70h/0H298Nwnkd64yaSK/yqfe3PLyf54osdjcdDVVUkli4lceSRVBzpD6OzZvV5N0vV9A45w1Jy1T2fRMNGNBzCvCz/FbmW87mv85lYNeMI/erNvW8sVu1X26pbDJMX+a+mrXDXF4elpMtlszTf8We2fuFrkEpBLMaEN59PZOpMso27/AAqKHXK7trV4+LNolEik8YRnVhNZFwFkXExotVhIlUQrcgRSaSIRNqwdPPgSof8rfufT6yq8xWv6TodK5yuhnh11+lYNbQ24m79KOnZbyabTBCpzBHb/HvsHTf2VmXuwA2+JGm4lf2O/JY9bZz9P/fTls7hYFRXd+qzgyTn/PZ+zc1BxyfNfhXWLsNgWXOz31lKwTyvdQDt6wrE5szxq7Hnn0FYWFJUlQ96qgrmdV9WiSUSPf47e+t9tpy1PUb64dcDUPZ8sr6xhdd//4EeHV1c/S8v4+ylU8dEB2NjzXB351+0yu5//SdVp5yCa0/i2tsKqt52a4vYUY23SBvF9q5Vdl2+ym6RuKfU1WcPqeAKutYJrquO88j6PXzplhVkPf9zGMofZPcfBvE4Uz7zacLjxpN8YYVfxW/FCr8tBf6XmDjiiI7SqMSRRxKbM+dgOdnKwWtYgivoWXd+x/4k77nuMVJZx6une5w5v4qfveC45eLp1Fx/ete2MJEEnPc9v9Rl12poXAmNq6F5W+87rJ7ivy8chVAUwpFgWGw64g/Dsc7xYJkjRHpPitSOFlLb95PcuIP2VVvIpazHxxeKh4nUhIlWQaQiRzSRJhJrJ5JI+YFTpUc45vUoeMPCRUp/xnVMu2QzqW172fvXR8m15XChOBPffgGVxx2DzXlFZ0AVqShNIDJSgU6+BPIgKEkqYlguGs/+n/vJ5Dr/Q0dLdSeXTpNtbCSz0y+ZbX/hBfb87Oc9ni1mlZX9P6vQrLOaa22+A5QawjW1ftXWbsNwrd9hSm7fPjZfepl/0yO/qTIGOyMV6BzkN0HLnk+K3ayrikdoSWZ5w9HTuHP59lHVwZjnPDY1baKxrZH6ynpm184mZOX9PodznwPNJy6Xw8sHPu3tnePJJF5bOy7Z3jHfaw+CoI7xpL8s2Y5raye7fx/pXvoRGCirqOhsm9ilum6VP10wL7d7t9+sppvZv7ieqhNPLLr5waZnRJ9zVVa9VD0KhYx5ddUdf35m5l8PBDdVkhmPj9/4NIs/+qoB/0GmN21i66c/0/knkUqx86tf87cfjRJfvJja886l4sijSBx5JPH584pWS5KDwDBXWRuxffajez7Z2ZQklfVPfPdtC3HfNj+Yer59Iq+48P+wP32w48LeXfh/2BHn9zyG5H547ndw+yd67nDa0VAxCbwM5DLgZf1hLu2Pp9uCZVnwMrhsmmxThuSuHKndOVJ7HKl9Rnp/CJfrPA9Gq7JUTM4QH5clVp0lWpkjFPWITq4hMnlKH1XlugZMXdYp7GihCNu1hvhv3s7E976PbHuESEXWL0ma/QGYOO8Av5kiRqrKXCjkl4yVq3TsILezKdklsILSVnca6t1jr7W1s1rrzp1kd+zs2i6woYHcrl0DSkP1K19JfOHCokFSx7C6ekjBgvM8ZnzzG8NWtX2kqsyNxOM9DiahkHHO0qks/sipHTfrJlTG+NiNz/DnZzpvuI2Ghw57zuPvm/7O5//5eZK5JIlwgqteeRVnHnZm2YIdz3k8sPl+dq9dzrhmj621YTbNX8qps181qH166XTHg9q91tbOB7a3tgXz/Pnprdtouu22jhst+Z6oo9OnBwGV3/nLYHuthCAASiQIVVT4gU8iCHoqKosGVuMvvojE4YcXVNcN2jRWVXYNmCoqBpWPUxs2sP+WW3uUYkfq6gZ9TL0Zm1f4g7iTu7MpSTrb9UtNZR03P7WFj5+5iE172notsna5HK0PP8LuH/+4y923vKlf/QrjL7xw0PW0pcBwBh7DVQKQy/rtlLIpyCRh9e3w18/50wdf9Sqg+DNMAC7/7bO84ah5HHvCb5li+9lt46kNLeY0jB6pT4yDea/2j7F7r29n/1fRi3TnHNnGRtJr15Jas4bkmjWk1qwhvXYdXmv+xBgmMmUK8SULqVq4kPjChcQXzCN+2Gwym1ex6b2X0r4rCc7IZQyLVzD3huuILD6mpJ9Rh4nzsTO/RPyPlxEv/B1NLGOX4Yd4oDMSessTv3pkM0umjWNXS2rI1Z1669mu8oQTyDU0dARN2YadPdoFes3NPbYXHjeOyJQpRKZOIbF0CZEpU4lMqSc6dSqR+il4qSSb3vmuHqVIdR//WNmCgpF6aPuhHOiMlO436wAue9Vc7lvd2GW9/M2JOZOqBlxd8EBKdZxztGZaaUo3+a9UU5/jje2NrN+3nphFCBMik8vwyfs+SSKSIGIRzIywhXsMQxYiZKGiy4xgnVCIEKEe63rtSWLbGqlatZWKthxVmRCJ6TNZU3UNE3Jx4imPeNIjlswSS+WItGeItKcJt6cJtacItSahPYll+n+4O2ZYItGjBBvniM6YQXTmTD84qqwIAqUKf7wjSEp0liAFr/y0xeO95u3equxOfNe7ypJXh+MZqmOzWmCxbnsjCfjgP3t0G72JqZz9vX/2eOCwc3DE1BpeX+843LWyr7KWyYcv4LTFU8hu3sS+P/6J/X/+M9kdOwhVV/v1OAt+kOq5rwRKHex4nt/OJ5v0t9d9uHst3PFpv7QkLxSBEy/z28LkUpBNdwZGuXTvwx7zCt7r+mmU3XsX08NWLbC77lU7EtEQl5+2gL+9sJPnt+7vsm6fVaM8D7fmb6RXPUu21YhUQezwo7GFr/Ubua9ZQyoIpFKr/UAqt79z++EJE4gvWkR8wQI/iFq0kPiCBYRra4um229zdSvb/t9XO0+iX/siNa87r7ylxwd3lblDwbBXd4pHjFMX1nH3ygYmVMZoTma6dD199hH1ZF/a3GdJVK6lhfTGTbQ9/jgN3/52z4e8d1fQmUp0Sn2PoCk6dQqR+npCFRV9biaXy9J4x63s+0JnPhn/H1+k7nXnEQ6XL5+MRBUr6aLs+aQ3xdpiAbzl+BksO2wiX751Rcd/TW/VBfMlSZ974HOkvBSxUIz3HvleFk5YSHO6ud+gqTndTK6PzoLCFqYmVkNtrJbaWC0GVO1LUfPUWiraclgkTPYVx5GbUcfkyjpyLofnvC6vnMth6SyRliTR1jTR1iSxtjTRljSxNv8VbcsQb80Qb8sQb8uSaMuQaMuRaM8SyfZ/jZ6MQnsM2uP5ofnDYF5bHJIxo63LOtAeMzLxMLmqOF5FHEskCDsjtHk7sYwjmoWI5wi7MJXHv4yq2klEQhEioQjRULRjmB8vnD+Q8fx7zRnNDz9I+/evJdKeIhKJM/lTn2DqmW8gEasgGop2BJul0L00cH9NiEkLjuyrNFBtrgDY8ABcf27P+XNfBRPmwHM3dpQSuAv/j4eiL6dx80omu73ssolUT1vEim1NXHvvGlKZHG/Y8DBv2PIE0195ItGN6/GefxZCIapOfSXj3/hGqk47jdb77juYG62WRjlLkZyDfA9qqWZIN0PDSrj1Iz2DnePfHZR+JCHbHgx7CZgy7Z3rDOT5PH0JRSES99v6dB8WmxeJQzgOkVi3YcHyfZv9bsy7e/dtMOfU7nNHLLiCnu2w5kyq4pH1u4o+3uCqC5fyjpMO63EydJ5H0x13sO2zn/N76QmHiS+YT27PXrKNnXcxQ9XVfvC00A+e4ov88cikSYNL8+BPoiWhi8YRNywXjcXyxG3PbeOKm54l6zmOqYETp1fxbLvxozltNH7uc/7d2ViMie98J+Hx48ls3kR6w0ZSmzaSa+y7ut74f3kHVSee5AdSU6f6D33v5SaBc46MlyGdS5P20qRzaTK5TMd44byXml/i/579P06tOJKKpCOVCHN/+3Ncfty/M7t2NrFwjFgoRjwcJxqOEg/HiYVi/vxwjEho8AHYSFWxUr7sYsSCq+43J2IR4/jZE3l0w26cg+PmxDhmbpqa2DhueSLFz959EnMnV7GtdRur96xmzb41PN3wNA9ufZCe/RF2ClvYD47itR1BUo/pXsarolVd/sN2vfAMjRe/u2tNpUiEqre+kVg0gbe/idz+/eSamvyOXfY3kWtqwhWp2VQoVBO0RSx4sHv+Ye6pfXto/cOferxn4rf+k8mvPgOrqCAbcqRyqc5XNtV1Ongls0nSuTTJXLdhwfydrTvJNjaSXbeBdMgjGzGyM+vJVcYJhyNkvSxZL0vGy/QY7ytQPVCGEQvHiIaiHeecWChGNOwHaPnxWChGJBwsC0U75uXfFw1Fac20cvOam8m6zptXiXCCm867ibnj1KHF4EquLAyVE6C1259X7XTcGV/BbvtIlzYj273FbHrv+/jr1GOoa9/HyduXk8hlaKubxox/uYhJb7yQ6JT6js0c5I1WD1yxUqQL/w8WnNnZXXSqqSA4Kjbd3PnqmC4Ipvor0SkUSfivaEUwrIRowu8kINp9WcEwWlGwTrdh6y740wf9wLtwP++/G+qXlKfkYXAPRx3R4KqY9Y0tXPn7p7jymBhrNu/mzt1x7tuSwnOweGoNb102iwuPmkLlxjW0PvYYLffeS9uTT3UciAekY0bo5S/DW7KA7JzpZA6bSnbyOLIuRy7/8vw7gvkTeLFxz3lkXbZzXZdlb3Ivt667tctJP2IR3rX0XcyonkFFpIJEJEEinKAiUtExXTg/EUkMrm77CFw0Sg/DctFYrF3UU5v2kPvn/fz5zw9yz9SjqW/fy8uT2zlp1UNMbdnVI2HhSZOIHXaY36nRrOk0Ta1mfXYnL976K7aPy5GMQSYM2VgYO+FYqIj7QVE/gVPWG0A1oBIJW7gj0CoMuroHYYVBWiqX4u7Nd/fImx84+gPMqJ5BPBKnIlxBPBInEU4QD8e7jCci/nCggd1I5cuDPKAbseAKIJvL8eKu9exsa2BKZT1HTJ7H7c9v55qHnmLFljTh+E4iNSuYXZ+ioqKFxtRmWjItHe+fXDGZ5lQzJ1YdwYxsDV5FnLtanuSjx3+Uk6efTG28lspIZb8lHi6d9h/D0dhIpqHBDy4KXw3+MLd7d6+dLoSqq4MAaRzhcV0DpHDhg9zz48E6oZoaLNz74yuSGzawsUiVuTk3/4HEvNK34d24fyP//vfLuWTca5nYYuypdly//2/875k/6C3w6JD/L84HXMUCsGLjL+x+ge8//f0e27vo8IuYVj2t43yXyWU6tlt4Dsx4/rkvm8v2mJc/L2a9bJdzZLGA/Gdn/4wTpp5Q7NAUXAG9VydLTIBfnNdjdReKkJt4DJmKxYTGTyGy6U80pN/Kvut+6S8HNtRO44ZFZ/DAjGOoqYjyxuNmcNEJs1ky3a+O5OWybNr9Ao2tO6mvmsLsSUsIlbE6RcdxHmhJkpfzOxpo3wvt+yCZH+4rmLcP9m+BDfcPLgDqYH6nAPHqoKvpYBiv9ud3ma7xu5+O1/jpuu2jPYOdyx6AukVDSEc/RqLXtcHt86ALrjKZDI133krT//taR6mtfeFzPNUWZfP9dzN9/YssbdxBRca/gNo2Ocxzsz1emG1smGo0jANXhp6hIhYhZCHMjNSBllhCR5A1kGAsnUv3uCsWDUX5+qlfZ/HExVTHqqmJ1hAdyPOkBuggv4AbCWW/aCzWS2z9FR+nfe9+mq+9pke3/rsS49hUU0/IUsRDu2ivaqPxXa9n5/QoW5q3sKV5C7uTu7u8pyIFVUlH1DMiEycRqamhNj6uI0jJ35XNBy75u7PF5hUu6/6+XW27uPKBK0l7nbUEYqEY//HK/2BSYhJpL00qlyKTy5DKpTqDuJw/Pz/eY37BdPd5LZkW9qe6Vikeikgo0iPgyo8nwomOgCzjZbj3pXt7BHPvP+r9TK+e3vG+eCTeOV74Kph/MAd0gzwXjFzJVZHP5orjr2Bz0zZ+vfJ6POc6+g1yuQReairTK+fxillHct7i41ladzi7W3fR/Pe7CP/HDzv+f3JfuJzqM8/ksPFz8JLJrgFS0cCpgdy+fT0TGAoRmTSJSF0dkfp6v7ODaJR9N93UtbpuPM7cP/yexIIFB/R59Ga4e7kcid/sxv0beeutbyWZ6wwg+ylJOuD9veWWt5DyOq8NVHJVoM8MXqzNw551PUoJ3JI3kd30IuGmlXhpY8/aKvatqyaXNEIxj1DEI5cKeiBLVND4g19w85Ysty/fQTrrcczMcVy0bCZVNU/ztaf/s/PHeOLnOHP+eeULsDwPb83f2NT4HI0GU9MpZtYeRmjqUX4wlNznB0btezvHuwdM7fv6fyZPpAIqxvvdXe/b3HP5yy6BqUcFwVFh4FTw6qd3tb6OcUSCneFuKzPwfY5ocJXLZdm39kXSDTuI1U9l/IIj2LNmBU9d/i42jUsTcsbkJsesRqgMrtG2TIIVs40XZlby3JQ6khVTWbBlPydu2MLU1hbCHoQjUaqu/DhT5y7taPwbCUU6GvXmxyMWIRwa2PK8YifteCjOda+7jimVU0hmk7Rl20jmkiSzSdqz7R3D9mw7yVyRedlkr/Pz431VU+lIRzhOdbSamlgNNbEaqqPVfuBVMF4bq+2cH63pGNbE/PFIKKKSsuJKetFYrIQqtW4dG978Fr96ay8csLsG1r/9FfylZRVrpmfJxgu7Njcmxacwb/wsZtXOYlbNLGZWzyRkIb77xHd4z7hzmNQaGtTd46E4WC6o4qE417z2Guor60lmkx1VmVK5FMlcsqO6U348metcp/u87sub0k3sSe4pSdrDFu4/GAvHyXgZHtr2UJeALmxhLl58MVOrpnapttQl8C0IkIutEwv76+U7Ucgbwvc4YsHVhv0beNutb+vy/edFLMIrqo/iiFw9FTUTuX7HcxxbeSmPr3XsaEpSHY/w+oUTeEOkkclXfY5QprDpQIjojBnk9u/HaypyfRON+u0U6+qCwKmuc7yujmgQSIUnTuxRonSodOefD9B3te9icsVkDqs9rOylu8N5/hmOfDJ2g6tiijSmd7NPZcM7L/M7Gwg+isSkDHXH5aiatLcjJsh6sDcxnj21E9hTOYGd0QRr0rCmPcMOz6MlkqMt2kYmnCJsHhFgRmU9NZFKYhYiQZiYGXGMuMsPIQ7Enet4xbwcCc8j5nkkvBwxL0c8lyXuZf1hNk08myaWSUKmlUy2nQrPo/dCZfz2PYnxfpBUMaFzPBFMd4wXWR5N+NsYXPW10lHHAIVGLLjKN3jf+4WvsLE2xcq5Udrnz6B21VaOWpuhPrgBvasWdo6D7KuWUXfuhcw87Ehm1cwiYgnufnEnP3toFU9uaMHDmJBsYm5LA4ctncq8YxZy+uHzWVBfTSLa5695UEbionHDvg289da3drkrFgvF+NQJn6IqWkVTuomWdAstmRaa0820ZFpoSbfQnGn2p4Nl7dn2Pvbiy5ee7U3u7RLQhS3M+fPPZ0b1jC4BW5cgLtoZoA3FQV5aVrKLxvwFVcfjNiIR4vPmkd64sWh3xJO+eRV//+mXuf/wHMsPM/ZX+0mZaNUsXtnKjG1R9kTms2bhmazcP4WcF2FSVYzXLK7nrCVTOHVhHfGojViJx1i9oOotmPvx2T9mauXUou1QerRb6aUtS2/z96f2s7NtZ8mPJc+wzhLJcIyQhdjdvrvLuaDUd+RhCG0Tu50rZtXM4roV13H1M1eT9tIYxuzYFPa4Fr768q8y7alNhL72g44Hv3vnnk5s/EQqGprZu3Yj6S1bqGzZ13UfGJ4ZYecRP/54qhYv7ihx6gii6usJjxt3QIHJmG8CMkJG4vwziP0puOqL8zya//Y3tl35Wb8aRyRCePz4Ls/8aI3Bpimw56Nv5bd776DaRdjrtbOfHK7Ixxt1jkm5HJNyOSbnPGo8jyyQNCNtRsqMVCgYBq+0Gclg3DuQ3k+cIxKkIeocEYx5NbOoq5pGTWI8NYmJ1FbWU1MxkZp4TZfGnPk739HQAKsmFZaUhYx6D2bXHUVo4WsP5WBnuA1bcNW9lGp7cie3fe8KmuJZFm2Dozc4KtKQjYbYV+mIpxw1wTWLJRLU3fgLJh1+VI/tPr5xF49vf5RVL+6mcU+Uzak4O9riZIMbuyGDOZOrWDy1hsVTazl8ag2Lp9Ywa0LlkB8sOVovGjNehtZ0K82ZzoCrR2CWbmH9/vU8sPWBHu+PhWJdqnn1piJS0SPgKgzE8ueKwunKSCXPNT7Ht5/4NikvdTCWlpXsorFYN8GYUXP22TTffTdkMgBsmwj3Hhfl/lPGsSezj5o2OGa9x9LtEY5/82VcE3mYN1Qs69KO4b9O+R6bGiq564Wd3LOygeZklngkxCsXTGbmxAriiT1UVLRiXg1H1i/gNYdPOagfsDpYw5k3D6bSud+84TdMr57epb1cvo1IYRXLwjYi3duZdF8nk8uwtWUrD257sEc6StmWBAbZq2ZBp0JVTRn+GV7Po6lVbG/bzgSr4nUPtPOaJ9LUZqN4Z55CZQqS/7ivZ9umUIjotGlEZ84kOmsmoekzeHJ3ln88u5l7ph/LnopxYEbUyzJjfAULZkxkXl0VcyZVMXey/5pSGy9Zj3NySNFDhPOKVeNoX7mSrZ/6dMefIdksyRisWBDmviUeK2eF2F0bfIa7/whAI3T5WD+09L2cOPNUJlVMYlLFJGoi1ax+6TE+cc8HyXg59qWmk85MJp2ZSnXocLa1hEi7CCkXwSIxZk0ex9wpE5g/dSKHT6thXl0Fk2tCfp323u6KFdwZy99ZW797FTdvuJUskDUjf497XDhCY6qR5ub1NKWaurT7KKYyUtlRLakw8KqN+8OaqD9eHa1mdft6frrhRtJemngoztemH8nZRs/nGZXQQX53fEzKl1Jt+dpXeGJmiv3VIQ7b6XjDZkfEg2SEjhsNdVd/j7r9zX4XznR24Tx+wRFFtz2pKsFN/0xw3rJ5zFnYzPHZGm55PMlXzj+a1nSOVTuaWLmjmRXbmrhj+Y6O/9fKWJiFU2pYPKXGD7im+cHXxKr+nyEXshBzx80tS3Wq3vZ35mFnsnDCwgO6aIyGooxPjGd8Ynyf623cv5HHdzxetL76zJqZfjAWlIwVDvMBWr70LB+sNaeb2dayraNErVi1ne6SuSSfvO+TLJm0hOnV05kQn8D4xHgmJiZ2GR8f94ex8OCf/TdS54JsQ0PXwArAOSre8Vb2nbKEx2/6AX85JseqWf6z3Y6bMI9w02YunX4eddMi7Kl2XJN8hLcuuYgvP/Rl/8K+xb+wXzplHkdNDXHu0dPJ5Dwe27CHu17Yye3Pb+fulQ0FO9xPyJ7kohNmsXTGOKaPr2BG8KqKj96/8eHMm6XKl4Mxu3Y2V73yqh4B3YIJC4atdC4RTjC5YnLJ91VMseuul5o2M+mxNTx3y4+56eU5PIOX76zlM8njmXrb44Ry+baJGUJ33Eu6trZopxGzfvJjqk8+ucu8pY3NzL7rLi76zrdYH5/ItvHTeOk159EwrpbNe1q5f00j6Wxn28fKWJjDJlUxb3IVcyZXMndyNXMnVzJnUhUTq2IKvKRkxmTJVY+GxtEoiSVLSL74AqQzJCPw9Hz40ytCbJjmn+Dq98OiLR5zdkeYcda5zHr5mXzigU/1bPB27k3MHd/1j2Dz7iaWN9zFl578escJ9CvHX8mR9WdRV1PFusYWVu1oZvXOZlYGw+37O09+1fEIi6ZUc/jUGhZNqeHwKTUsmlrD5Op4r8e+cf8G3tqtvnL39DnnaM+2dzzvIX8hVfiMh+7zO8ZTTTRnej6MsrtoKEp1tJrKaCVV0SqqolX+eKSq63S0iqpIVZf1uq9bGa3s8oczChoDD7eSl1wV+zPcft9dPPL1TxDO5FiwzQ+eW8cnsFSGyvauz3Kru/EXjF9wRFDKtZNY/RTGLzii12fjFHteVm/PMGlLZ1m9s4WV2/2Aa9WOZlbtbGZPa2dpTF1NnMVT/Txz+NQajphW26NqYb677KE+0PVgV+58kvEyPQK0pxqe4ofP/LDHuosmLCLrZdmX2se+1D68XjrAqYpWdQRaExITuoxPiE/whwXjlZFK7t5894i0JentAZfu+u/wruc/RTKXoi40jqOrF/FcegPfPu07NLY39kjra2a/hpeaXxrQhf1DaxuLPuIgbEau23/2uIooM8ZXBAFXghkTKroEX5Or4wP6vY/1fDJSDvLSuZJXny1sjzTlC5+noXUn999yNbGMY9EWx/h8k8P8A0W7mf2rX/LS+z/QI78Ve26o5znuXbmTxlVrmdDWxN7KWuqC55GGQobnObbtb2fjrjY27GphQzDcuLuNl/a0kfU691+biHSUcM2ZXNVlvDYR7bJP5ZNDzuivFmhm5wDfA8LAT5xzX+9t3d4uGFMbNrD+wjd2eRaBZ7Dx5Dn8dsZmls+B2Y3G4VscR+yMUPnB9xH2XJfqGj8484es3rt6QCcpz3M8uHYnzttIKrebeHgSFprDKQt6r8Kxvz3Dmp3+xeLqHX7QtWpnM/vaMh3rTKqKdQZcwXDRlGpqElGyuRx/Wfc3/uOxL3ak7wsnfpU3zH8tkT669RyMnJejNdtKU6qJh7c9zFcf+WqPdV4353XUxmtpzbTSmmmlLdPmj2c7p9uybb1eZHVXEanoCLwiFmH9/vU92pK8fu7rqa+s97v5Dbr7zTcqjoVjxENdGxnHwjES4UTnusErHOr6OY1UxwAd3dG2NjClyu+OtpfvsKTBVY+2JOEw2foJRLb71WR3jIdYBia0QmTKFCZ/7CM0fOVrB/yQ0WLPBhron5NzjsaWlB9oBflm5Y4m1uxsIRXcoSysWriovoa2TI7rHtpAOuv6DOZKabj/gDu7NG5kSmVdX7+hkhhI7045L0dTuom9qb3sTQavfsZ769kxYpEepfDD1Zak2EXjpq9ewlVtN7M3tbdomg6rPeyALqiLPWA1EQ1x67+/kppElK372ti6L8nWve1s2+e/tgav5mTXzykWDjFtfILp4yoKAq8EM8ZXMn18gunjK4iFQwO+6VFKw51PRuLC+CA/F5S3+myBljhUpTp3OO2aq9nx0St6djH+pz+SXrVqwJ1GDPX/JJPz2LK3nY27Wlm/q5WNu1rZELy27W/vEvdNro4xd3IVh02qIp31uGP5djI5RyxifOX8I3nDUdOoikcIl+l7VT4Z8f2N7uDKzMLAauAsYAvwOHCxc+6FYuv3Fly1Pvoomy95N+A/H+T+pcYvzzDaE2FODi/ibT9Zy7QdKf/u4xc+wrZlM7nyn5/rcUENDPgP8kAuGPPyF46rd7R0BF2rdvolXW3pzhKDGeMrmDmhghe37+ekhTGqKpKYq+ThVRm+fP6RzJlcRSwcIhoOEYuE/PFIiGjYiIVDQyr63rB/I28rdjFVpCSv2HG1Z9tpy7Z1BGHdA7GO8YJlW1u28tyu53psryJS0fF8hAMRsUiX4CxEiO2t27sEcyFCHD/leGrjtR0903V/2njEIp3j3ZYXvqdjmXW+1wjx2Pan+eWLPyXtpUmEE3z+xK9ybvEguaTBVXL9eja+6c0df24OWDkTViypYsHGNMesznTs0BIJ6n/3a5yXG1AJ1XDLBfkvH3Dlqxdu3t1WtN++GeMrGF8ZpSoeoToeCYZhqmKRLvOqeswLdyyrjBV/YvxgSudKYbj3B/4F3G3r/sZVBTd3+vjdDkj+PJEPtPYk97AvtY+9yb2s2LWCOzbe0eM9P33tTzlx2onFNleyi8bCNiOJphS/yz3KE60vsmD8As6ffz5XP3N1yW/GHMh32pTMdAZce9v9IGxfZxC2symJ1y1TTKiMsq890+WCMhyC954yl2njKkhEwySioc5hJEy8y7wwiUjn+EAuMg+FfDIKjrFk+aTwussBm+vg/iONptkTef3dzczd0lnjoL8gChjRTiOSmRyb97SxvrGVjbtbOwKwdQ0t7G7tvR1rLBKiIhqmMhamIhqmotuwMpYfj1ARC1EZi5Aosn5lLNwxPx4J8fC63Xz+T8+TGoYbhMonpcknB1tw9Qrgy865s4PpzwI45/6r2Pq9BVe7Vz3PtovfyZ+PTXPbiSFaK4yXrzYue8s3aJ1Ywe61yxnX7LG/JsSkBUdyyqxXDri6xkjwPMfWfe0d1aJW72zm6c372Lynrf83FxENW0fgFQ37wVcsCL56m5/OeuxK7mRN09PkXJpwKMzSCcczq2YmNYnBt58YiN3t+7jnpbt6dGP7mllnMaliPM55eGTJkSbn0nhkyLkMHulgmCHn0uTI4HUMM8H6ncvz67dkm2ls3wbmAR4WDKtjVURCITxyOHJ4Locji9cxnsMji+PAnk6eS00iHN9NIpzgZ2f9hqOmlPchwrsevI/G932QF2bC44uMh5YYp7wA//bO/yW6e7/fjuoAS6lG2j9W7uQ91/U8R5w8fxIV0TAtqSyt6SytqZw/nsp2uZHRFzOCwCvcGXzFIpjBI+t3d7mADYfg3KOmU1tRumdb5TW1Z7jt+W3kCgqHy7m//D7vWbmTOfVhLJTGeTE2NuR4zeIpZdln4bkgFN1DbNIDfeUTKOFFY7Euo8MW5sZzb2ThhIVlq/JViht2xWRyHjv2dw24ntq8l3tWNpYg1b5o2IhH/OArP+wIwoLgLOs5HljTOObzyXDus9j+EtEQt3/kVObVVRd7S8nyye5Vz9P49nfREEvy/QvCrJppvHqFceV7f07tpl0HZRA1WA+v28XFP360x/x/ffls6qoTtGdytKeztGdytKVzJIOhPz/XOT+doy2TI9f9LscgJKL+dVo4ZERCFgz96XDHdOcw1G29ULfl+fe0p3Pc/eJOcsOUL2Fs5pOD7UppBvBSwfQW4KTCFczsUuBSgNmzZxfdyEvjMoSu/Dce3/i/HPGSx9seizDz0svxpk3l1CnHsGn8Yexq38W8gj/D4WzwPlihkDFrYiWzJlZy5pIpgF9t5HXfu59UtjMHRMPGl85bwqSqOOmcRzrrkck50tmcP+yY57/SWY90zhWZ54+3pbPsb3dkch772zM0NIVIxJZhzuGc8fRex+p4I9FweU6GmZyHeSeQzbXh3wszIuFK/rmqlUi4t26qw0BF8Brs/rK0Z5qhS1mHEYrWEO0lqLDgFYKgxMsDyxUMc0GwlvOng3EXLMu6NMlcM+ARrthMOP4QyVySnW2NHMWBdXHfX15JTajCEgnuPyrNS3XGZ2/KMbcpQfjfa6k78VVEFy44KEupBuOwSVUkoqEe1av+48IjezuJkvMcbd0CrtZUtiMQa0nlus5LdV23oTnVo2Qg58E9qxrKklcyOa/Ln0S595ffZ3Mqx/Mv5QNR/25uOY8xfy4IVWymtv5xPnDE50i1TzjgbfeXTxrbGnt06pFzfpXHcv53hELGvLrqXn+nQxUNhzr+T/LWN7bw0Lqu1RDjEeOP/3YK08dXkMx4JDM5ktlc53jGH09lO8c7hsG8VNafl+r2/n1tGfa2pQ+JfDKc+yy2v2TGo6E5ecC/o/7yyUvjMoQ//2/s+fkP2Topy0dvD3HSW/6d3eNDzFh0FnMXLSoaRMXnzu3RlupgNaU2UfT/5L2nzB305+ucf02WTHu0ZbK0p4sHZMu37ecnD2zo8f4zjqinviZBznNkPYcXDLtOex3TuYJl7ZlcMM//veQ8r2Od1lS2S2AFyidDcbBdLRWLDrt8zc65a4Frwb97Umwj4ysm8u/hP3PxsZcwtS3GntMdn93/J/634syDPpAaqDmTqvju248btmLUfBuA1lT+F+kXT//58lNK/udfuM/3Xvco5y0bTyjSjJet4dYnUvzs3SeVZZ8bdzVz16a7ufbFqzqq+Vx6xOc567BXMmdyTcn3B/D8zjW896539KhuOaWy7oC33V9eyU2vI/eFy3nv139ApCVFOHi6fWb6ZMLhiN+VepHu1EeTOZOq+M7bju2RT+ZMqur1PeGQUZOIUpMY2h2z3trLlCuvDPf+RmKfXc8FNXjZ7/Kbe1Kc+e7EAW+7v3xSX1lPIpwYsR7YhkNv+WTx1NqyVQVSPhm+Y6yvKX8+GV8xkX8P/YlLrngPX2jO0PaBaMd1l4VCoyqI6s1Q/k96Y+aX7sYjYcbR+3/N0TPH8atHNvX4Tj9x1uHKJyXeXynySd6YrBY4Uh0TDLdyVRvpbV+HQj3ce1btZHnDWlyoeVieLTPItislrRZY2JaksJrsqbNfpXxygPs7yOuPj7p9jmRbEv2flG9/B/lvaNTtU/mk/JRPSm8UHOOob3MVwe/Q4gxgK36HFu9wzq0otn5fD7Ib7geHHgqG+6QyEvsciWMcRO9OJe+KXfmkPA6F3+1BfowlfTiq8kl5HOS/oVG5T+WTsecg/w2Nyn2WO58cVMEVgJm9Hvgf/MYzP3POXdXbuoN5SrjIGFDy4EpkjCrpRaPIGKV8ItK/Ud+hBc6524HbRzodIiIiIiIig6HyWhERERERkRJQcCUiIiIiIlICB12bq8Ews0ZgUz+rTQZ2DUNyRpKOcWzo7xh3OefOGcqGB5BX9PmODTpG35DyivIJoGMcK5RPykvHODaUJZ+M6uBqIMzsCefcspFORznpGMeGkTxGfb5jg45x7O57uOgYxwblk/LSMY4N5TpGVQsUEREREREpAQVXIiIiIiIiJXAoBFfXjnQChoGOcWwYyWPU5zs26BjH7r6Hi45xbFA+KS8d49hQlmMc822uREREREREhsOhUHIlIiIiIiJSdgquRERERERESkDBlYiIiIiISAkouBIRERERESkBBVciIiIiIiIloOBKRERERESkBBRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5GETM7zcxOLtG2qs3sGjNbZ2YrzOx+MztpiNu618yWDWL9OWa2fIj7Ot/MrhzKew+EmV1oZksKpgd1zH1s93YzGz/Adb9sZlvN7Jng9foD3f9YpbxyaOeVYP0Pm9mq4Dv75oHufyxSPjm084mZ3Vjwf7LRzJ450P2PRconh3w+OdbMHgnyyRNmdmJ/74kcaAIPVWYWcc5lh3m3pwEtwEMl2NZPgA3AQuecZ2bzgCNKsN2ycs7dAtwyAru+ELgNeKGUG3XODTZA+q5z7r9LmYZyU14ZGYdyXjGz04ELgKOdcykzqy9lWspB+WRkHMr5xDn39vy4mX0b2F/KtJSD8snIOJTzCfBN4CvOuTuCm9rfxP9N9LmDg/4FzAFW4v8olwO/Bs4EHgTWACcG61UBPwMeB54GLih4/wPAU8Hr5GD+NOB+4Jlgu6cG81sK9v0W4Lpg/DrgO8A/gG8D84E7gSeD7S8uWO9HwXrrgVcH6Xoxv61gvdcCDwdp+h1QHczfCHwlmP88sDg4hh3A1iC9px7A5zkfP3OHe1n+r8BjwX6uya+Hf3L5dpCuu4G6YP69wDeC96wu+Bx7+9znAMuD8TDwreA7ew64LJh/BfCzYPyo4PupBN4N/KDgc/4+/glvPfCWIsdSBfwFeDbYxtuBM4A/FqxzFnBzwTFeFaz/CDAFOBnYE3xmzwSfX2/H3Nvx9PZb2whMLpbOIsfyZeCTyivKKyiv9JdXbgLOVD5RPkH5pNd8UpBeA17Cv+BXPlE+UT7peix/zc8HLgZ+0+93PdQfyXC+gh9ENviiQ/gZ6mf4J4QLgD8F6/0n8K/B+Pjgg68KfhiJYP5C4Ilg/BPA5wu+mJoBZPDb6PzB301wMgJOAu4pWO+GgvQ1dUv7scGXej9QFbznM8AXC770Dwfj/wb8JBj/Mr1cXAOnBz+e7q+Hiqx7PgU/8G7LjgBuBaLB9NXAu4JxB/xLMP5FOjPavcC3g/HXA38Pxnv73OfQmcEvBb4QjMeBJ4C5wWd1P/DGYN4pwTrvpmsG/12w7hJgbZHjeTPw44LpccH3spLOE9RvgPMKjjE//s2CtF1HwQmkj2Pu7Xh6+61txP8t9EhnkWP5crD+c/i//wnKK8orKK8UyyvP4F8kPQrcB5ygfKJ8gvJJb9dYr8p/lsonyiconxT7bjbj34DYChzWW17Kv0ZTtcANzrnnAcxsBXC3c86Z2fP4Pxjw70acb2afDKYTwGxgG/ADMzsWyAGLguWPAz8zsyj+SeKZAaTjd865nJlV40fVvzOz/LJ4wXq3FqRvZ7e0zwFm4v8oHwzeH8O/k5J3czB8EnhTf4lyzv0D/8RxoM4AjgceD9JVATQEyzzgxmD8VwVphK7pnROMRyn+uRd6LXC0mb0lmB6Hf9LcYGbvxg8krnHOPdhLev/knPOAF8xsSpHlzwP/bWbfAG5zzj0AYGa/BP7VzH4OvAJ4V7B+Gv8knj+Ws3rZb2/HXPR46P+3VjSd3fwI+Br+Sehr+Hey3ltkPeWVPiivHBJ5JQJMAF4OnADcZGbzXPBPGVA+6YPyySGRT/IuBn7byzLlkz4onxwS+eRDwMedc38ws7cBP8Uvwe3VaAquUgXjXsG0R+dxGPBm59yqwjea2ZeBncAx+JF2EsA5d7+ZvQp4A/BLM/uWc+4X+BeveYlu6WgNhiFgn3Pu2H7SW5jWwvTmgLuccxf38/4cA/iegjYG3y2yqM05170h5grgGDMLBZmjy6aA651zn+1vn3T9nIql9+MU+dyL7O/Dzrm/Flm2EL+oeHofaSj8bK37QufcajM7Hv8Ox3+Z2d+cc18Ffo5/lyiJf9LO1+HOFFyA9ffZFzvmXo+nl99af+ksPJadBdv6MZ0not7SBcorPSivdGyrawLHUF4BtuBXN3HAY2bm4d+lbOzl81A+6Ub5pGNbXRM4tvIJZhbBDyKO7ydNoHzSg/JJx7a6JnBs5ZNLgI8G47/Drybbp7HWW+BfgQ9bEPab2XHB/HHA9uDH/E78okHM7DCgwTn3Y/xI9GXB+jvN7AgzC+EXjfbgnGsCNpjZW4NtmZkdM4i0PgKcYmYLgvdXmlmxuwuFmoGaXtLzD+fcsUVePXq4cc6twy8y/UrBZ7XQzC7AL25/iwUNwM1sYvA5gf97yd8VeAfwz37SW/Rz7+avwIeCuwqY2SIzqzKzccD38KsrTCq4GzEoZjYd/yT3K+C/Cb5j59w2/LtqX8Avdu5Pr599N70dT2+/tT7T2W2daQWTb8SvHzxUyivKK12MpbwC/Al4TX67+Hendw0gTcXSqHyifNJhjOUT8O/Ar3TObRlAWvpKo/KJ8kmHMZZPtuG33wP/f2VNf4kZTSVXA/E14H+A54If7kbgXPy6q38IMuM/6LwDchrwKTPL4Efp+eLJK/FLBV7Cv4Ct7mV//wL8yMy+gF8MewN+o7h+OecazS96/a2Z5Yu0v4BfV7k3twK/DzLih13fxfz9eT9+tbK1ZtYG7AY+5Zx7ITievwUnuAxwObAJ/3NbamZP4vcq9Pbim+7Q2+de6Cf4xbpPBd9ZI37vMN8Frg7uKrwP+IeZ3T+E4zwK+Jb5d64z+MW7eb/Gr/s7kF5obgB+bGYfofMkV0xvx3MaxX9rA0ln3jfNL+Z3+L/tywaQ7t4orwyc8sroyys/w68Kshy/usklBXdFB0P5ZOCUT0ZfPgG4iN6rBA6U8snAKZ+MvnzyAeB75pfyJvHbd/XJhvZ/I4ciM2txzvV2sht1zOwHwNPOuZ+OdFpkbFFeEemf8olI/5RPRh8FVzJgYymDB3eAWoGznHOp/tYXGQzlFZH+KZ+I9E/5ZPRRcCUiIiIiIlICY61DCxERERERkRGh4EpERERERKQERnVwdc455zj8ntP00utQeA2Z8opeh9hrSJRP9DrEXkOifKLXIfYatFEdXO3aNZTHlogcepRXRPqnfCLSP+UTkb6N6uBKRERERETkYKHgSkREREREpAQUXImIiIiIiJRA2YIrM/uZmTWY2fIiyz5pZs7MJhfM+6yZrTWzVWZ2drnSJSIiIiKl5XmO9Y0tPLxuF+sbW/C8IfUFIDLqRcq47euAHwC/KJxpZrOAs4DNBfOWABcBS4HpwN/NbJFzLlfG9ImIiIjIAfI8x50rdvDxG58mlXUkoiG+87ZjOWfpVEIhG+nkiQyrspVcOefuB/YUWfRd4NN07d7wAuAG51zKObcBWAucWK60iYiIiEhpbNzdyhU3PUMq61/aJTMeH73haVbvbFaJlhxyylly1YOZnQ9sdc49a9blTsYM4JGC6S3BvGLbuBS4FGD27NllSqnI6Ke8ItI/5ROR/vWXT3Y2JUlmvC7zMjnHm3/0EMfMGs/jG/eQyalESw4Nw9ahhZlVAp8HvlhscZF5RW9tOOeudc4tc84tq6urK2USRcYU5RWR/imfiPSvv3wypTZBItr1kjIaNk6cO5GH1u0mk+ss0fr4jU+zcXerSrRkzBrOkqv5wFwgX2o1E3jKzE7EL6maVbDuTGDbMKZNRERERIZgzqQqvvO2Y7nipmdIZryOEqoJlVH+saqxy7qprOOLf17OSfMm8YN71qiNlow5wxZcOeeeB+rz02a2EVjmnNtlZrcAvzGz7+B3aLEQeGy40iYiIiIiQxMKGecsncrij5xKQ3OS+poEcyZVsXF3K4loqEuVwXAInt68j3+u3d0xL1+itfijr+p4386mJFNq/e0o4JLRpGzBlZn9FjgNmGxmW4AvOed+Wmxd59wKM7sJeAHIAperp0ARERGR0SEUMubVVTOvrrpjXm8lWhXREO+57oku709lHR+74RlmT6rkryt2qI2WjFplC66ccxf3s3xOt+mrgKvKlR4RERERGT6DLdFqSma47bntHfOSGY9//81TvP2EWbx83iQOn1rDvMnVxCJ++y7PcyrlkoPOsPYWKCIiIiKHjsGUaE2ojHLxjx/t8n7PwU2Pb+G3j70E+B1lzK+rZtGUGszg9ue3k8k54hHju28/TqVcMuIUXImIiIjIsBlMiVYiGuLPl5+CA1btaObF7c2s2tHEI+t309Cc6lgvlXX826+fYt7kKmZPqmTauARTayuYOi7O1HEV/vS4BDXxCN0eByRSUgquRERERGRYDaZEa2F9DaGQsXhqLRcc66/78LpdPUq5ACZURtnVkmL51v3sakn3WF4ZCzN1XKJn8FXrB19TxyWYWBkrWvqlaogyEAquRERERGTE9VaiVSyAyT9bq3sp17feekxHwJbK5mhoSrGjKcn2/Ul27G9n+/4kO4Pph9btoqE5Ra7bM7Zi4RBTxsWZWpvoKPWaUhNne1OSXzy0kXRQDfE7bzuW1x05rawBlgK60UfBlYiIiIgcFIqVaBXTWynXnElVHevEI2FmTaxk1sTKXreT8xy7WlIdwdeO/Um2NyX94f4kz23Zx19XJElnvS7vS2Udl//macZXLGdCVYzaiijjKqLUJiKMy48HQ39+wXhFhJpElHA/QZLnOe5csaPHMapd2cFNwZWIiIiIjCqDKeXqSzhkTKlNMKU2AbPGF13HOcffXtjBZb98qseyZXMmkIiG2d+eYX97hpf2tHWMdy8R664mEekIumorIj0CsUzO40f3rSOT87eTfx7Y3H87hcXTasvSdkwlZQdOwZWIiIiIjDoDLeU6UGbGwvqaotUQP/f6I4ru3zlHWzrH/vYMTckM+9sywXjWHwYBWFN+eXuGDbtaaWr3l7dnij/uNZV1vO77/yQWDlFbEaE2CMZqg1KzzulIR6BWbFk8Eu6x7ZEqKRtrAZ2CKxERERGRPgykGmIhM6MqHqEqHmE6FYPeXzrr8fzWfVz840dIZztLwCIh490nzyESDtGU7AzS9rdn2LKnrSNQy5d29SYRDfUIvEJm3Le6gVwQPyYzHh+54Wk+edYiZk6sJB4JE4uEiHe8wsSjIWLhEPFoMB0sG2ip2lis+qjgSkRERESkD6WqhjhQsUiI42ZN4H/eftygAw/nHMmM1xF8+cNsR+DVFJSgFS7b3ZKmoTnZEVjlZXOOr9+5avDpDwcBWEHQFSsSlGU8j3+u2UW+BmUy4/GR3z7Nv79mAXMmVVEVj1AdvKriYaoT/nhFNDzkapHlLilTcCUiIiIi0o/hqoZYuL+hBHRmRkUsTEUs7LclG6D1jS28/vsPdKn6GI8YP7nkBKbWJkhlPVLZHKmMRyrn+cNsjlTWI531uixPd1vurxOMZzxaU1n25jz2tmbo3jQt6zn+5+9r+v5sjG6BV/dxPxCrikeoCeZVxSNUxcI8t3U///P31aSz5Xn4tIIrEREREZGD0HAGdL1VfTxl/uSyldD1FtD9+v0vZ1J1nJZklpaU/2pNFRlPZmlNZ2lO+vMam1Md67Sksv12KpLKOq646RkWf+TUkn3GCq5ERERERA5xw131EXoP6F42e8IB79c5RyrrdQRhLaksj23YzVdve7HLesmMR0NzUsGViIiIiIiUzmip+jgQZkYiGiYRDTO5Og5AZSzMN/+6qkevj/U1A68+2Z9QybbUjZn9zMwazGx5wbxvmdlKM3vOzP5oZuMLln3WzNaa2SozO7tc6RIRERERkYNDPqB7+bzJzKurHpaSskTUD4H66/VxKMpZcnUd8APgFwXz7gI+65zLmtk3gM8CnzGzJcBFwFJgOvB3M1vknCveyb+IiIiIiMggDEfVx7KVXDnn7gf2dJv3N+dcNph8BJgZjF8A3OCcSznnNgBrgRPLlTYRERERETn0lLukrGzB1QC8F7gjGJ8BvFSwbEswrwczu9TMnjCzJxobG8ucRJHRS3lFpH/KJyL9Uz4RGbgRCa7M7PNAFvh1flaR1Yr2neicu9Y5t8w5t6yurq5cSRQZ9ZRXRPqnfCLSP+UTkYEb9t4CzewS4FzgDOdcPoDaAswqWG0msG240yYiIiIiIjJUw1pyZWbnAJ8BznfOtRUsugW4yMziZjYXWAg8NpxpExERERERORBlK7kys98CpwGTzWwL8CX83gHjwF1mBvCIc+6DzrkVZnYT8AJ+dcHL1VOgiIiIiIiMJmULrpxzFxeZ/dM+1r8KuKpc6RERERERESmnkewtUEREREREZMxQcCUiIiIiIlICCq5ERERERERKQMGViIiIiIhICSi4EhERERERKQEFVyIiIiIiIiWg4EpERERERKQEFFyJiIiIiIiUgIIrERERERGRElBwJSIiIiIiUgIKrkREREREREpAwZWIiIiIiEgJlC24MrOfmVmDmS0vmDfRzO4yszXBcELBss+a2VozW2VmZ5crXSIiIiIiIuVQzpKr64Bzus27ErjbObcQuDuYxsyWABcBS4P3XG1m4TKmTUREREREpKTKFlw55+4H9nSbfQFwfTB+PXBhwfwbnHMp59wGYC1wYrnSJiIiIiIiUmrD3eZqinNuO0AwrA/mzwBeKlhvSzBPRERERERkVDhYOrSwIvNc0RXNLjWzJ8zsicbGxjInS2T0Ul4R6Z/yiUj/lE9EBm64g6udZjYNIBg2BPO3ALMK1psJbCu2Aefctc65Zc65ZXV1dWVNrMhoprwi0j/lE5H+KZ+IDNxwB1e3AJcE45cAfy6Yf5GZxc1sLrAQeGyY0yYiIiIiIjJkkXJt2Mx+C5wGTDazLcCXgK8DN5nZ+4DNwFsBnHMrzOwm4AUgC1zunMuVK20iIiIiIiKlVrbgyjl3cS+Lzuhl/auAq8qVHhERERERkXI6WDq0EBERERERGdUUXImIiIiIiJSAgisREREREZESUHAlIiIiIiJSAgquRERERERESkDBlYiIiIiISAkouBIRERERESkBBVciIiIiIiIloOBKRERERESkBBRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5ERERERERKYESCKzP7uJmtMLPlZvZbM0uY2UQzu8vM1gTDCSORNhERERERkaEY9uDKzGYAHwGWOeeOBMLARcCVwN3OuYXA3cG0iIiIiIjIqDBS1QIjQIWZRYBKYBtwAXB9sPx64MKRSZqIiIiIiMjgDXtw5ZzbCvw3sBnYDux3zv0NmOKc2x6ssx2oL/Z+M7vUzJ4wsycaGxuHK9kio47yikj/lE9E+qd8IjJw/QZXZjbFzH5qZncE00vM7H1D3WHQluoCYC4wHagys38d6Pudc9c655Y555bV1dUNNRkiY57yikj/lE9E+qd8IjJwAym5ug74K34gBLAa+NgB7PNMYINzrtE5lwFuBk4GdprZNIBg2HAA+xARESkJz3Osb2zh4XW7WN/Ygue5kU6SiIgcpCIDWGeyc+4mM/ssgHMua2a5A9jnZuDlZlYJtANnAE8ArcAlwNeD4Z8PYB8iIiIHzPMcd67YwcdvfJpU1pGIhvjO247lnKVTCYVspJMnIiIHmYGUXLWa2STAAZjZy4H9Q92hc+5R4PfAU8DzQRquxQ+qzjKzNcBZwbSIiMiI2bi7lStueoZU1i+tSmY8Pn7j02zc3TrCKRMRkYPRQEqurgBuAeab2YNAHfCWA9mpc+5LwJe6zU7hl2KJiIgcFHY2JUlmvC7zUlnH7598iY+dsYgt+9rZ2ZRkSm2COZOqVJolInKI6ze4cs49ZWavBg4HDFgVtJUSEREZ06bUJkhEQ10CLAOuvnc9v39yK3vb0mRyqi4oIiK+gfQW+C7gHcDxwMuAi4N5IiIiY9qcSVV8523Hkoj6f5eJaIgfvOM4vnLeUhqbU2RyndUFr7jpGVUXFBE5xA2kWuAJBeMJ/Kp7TwG/KEuKREREDhKhkHHO0qks/sipNDQnqa/xq/89umE33fsMTGY8GpqTzKurHpG0iojIyBtItcAPF06b2Tjgl2VLkYiIyEEkFDLm1VV3CZqKVRcE+PsLDSybPZHNe9vUFktE5BA0kJKr7tqAhaVOiIiIyGiRry54xU3PkMx4xCPGUTPG85N/buCxjXtYtaNJXbeLiByC+g2uzOxW6Kj9EAKWADeVM1EiIiIHs2LVBQ+bWMl3/76aH/xjXcd6+bZYiz9yqqoLiogcAgZScvXfBeNZYJNzbkuZ0iMiIjIqFKsueMqCyV2CK1BbLBGRQ8lA2lzdNxwJERERGe2KtcUKGYTNWN/YonZYIiJjXK/BlZk1Q4/OkMB/xIdzztWWLVUiIiKjUPe2WJGwETLj3T9/nHTO0zOxRETGuF6DK+dczXAmREREZLQr1hZr85423nPd47jgdqXaYYmIjF0D7i3QzOrxn3MFgHNuc1lSJCIiMop1b4u1synZEVjlJTMe63e1KLgSERljQv2tYGbnm9kaYANwH7ARuKPM6RIRERkT8u2wuvvoDc/wv3evoSWVHYFUiYhIOfQbXAFfA14OrHbOzQXOAB4sa6pERETGiHw7rHyAlYiG+NzrF/OKeZP49l2redU3/8FPHlhPMpMb4ZSKiMiBGki1wIxzbreZhcws5Jz7h5l940B2ambjgZ8AR+J3mvFeYBVwIzAHv3Tsbc65vQeyHxERkZFWrB3WnElVXPqq+Ty9eS/fuWs1//GXF/nxA+v58GsW8rZls4iEjI27W9W7oIjIKDOQ4GqfmVUDDwC/NrMG/OddHYjvAXc6595iZjGgEvgccLdz7utmdiVwJfCZA9yPiIjIiCv2TCyA42ZP4JfvO4lH1u/mv/+6ii/8aTnX3LeO0xfXc+Pjm0ll1bugiMhoMpBqgfcD44GPAncC64DzhrpDM6sFXgX8FMA5l3bO7QMuAK4PVrseuHCo+xARERlNXj5vEr/74Cv4+XtOIBEN84uHN5HK+r1g5HsX3Li7dYRTKSIi/RlIcGXAX4F7gWrgRufc7gPY5zygEfi5mT1tZj8xsypginNuO0AwrC+aGLNLzewJM3uisbHxAJIhMrYpr4j072DKJ2bG6YfX85Xzl/RYlsx47GxqH4FUiRxc+UTkYNdvcOWc+4pzbilwOTAduM/M/n4A+4wALwN+5Jw7DmjFrwI4IM65a51zy5xzy+rq6g4gGSJjm/KKSP8OxnwydVxF0d4Fv/jnF7hn5U5c937dRcrsYMwnIgergZRc5TUAO4Dd9FKqNEBbgC3OuUeD6d/jB1s7zWwaQDBsOIB9iIiIjErdexeMR4x3veIwkpkc773uCd549UM8sKZRQZaIyEGo3w4tzOxDwNuBOvxA6APOuReGukPn3A4ze8nMDnfOrcLv2v2F4HUJ8PVg+Oeh7kNERGS06q13wf937hJ+/+QW/vfuNbzzp49x4pyJfPysRbxi/qSRTrKIiAQG0lvgYcDHnHPPlHC/H8bveTAGrAfeg1+KdpOZvQ/YDLy1hPsTEREZNYr1LhjCuPjE2bzpZTO48fGX+ME9a7n4x49w8vxJfOK1izj+sIkjmGIREYEBBFfOuQG3hxqoIFBbVmTRGaXel4iIyFgSj4R51yvm8LZls/j1o5v50b1refOPHubVi+q44qxFHDNr/EgnUUTkkDWYNlciIiJykEhEw7zvlXO5/9Onc+XrFvPcln1c8MMHef/1j7Ni2/6RTp6IyCFJwZWIiMgoVhmL8MFXz+eBz7yGT5y1iMc27OEN3/8nH/rVk6ze2TzSyRMROaQouBIRERkDquMRPnzGQh74zGv4yBkLeWDNLs7+n/v5yG+fZl1jy0gnT0TkkKDgSkREZAwZVxHlirMW8cCnT+eDr57PXS/s5Kzv3McVNz3Dpt2tI508EZExTcGViIjIGDShKsZnzlnMA585nfe9ci5/eW47r/n2fVz5h+fYsrdtpJMnIjImKbgSEREZwyZXx/n8G5bwwKdP550vP4ybn9rK6f99L1/40/Ps2J8c6eSJiIwpA3nOlYiIiIxy9bUJvnz+Ui591Tx+8I+13PDYS9z0xBb+5aTZfPBV82lNZ9nZlGRKrf/Q4lDIRjrJIiKjjoIrERGRQ8j08RX85xuP4kOvns//3rOGXzy8iV89sgnPOXIeJKIhvvO2Yzln6VQFWCIig6RqgSIiIoegWRMr+eZbjuHn715GzvMDK4BkxuOjNzzNizuaRjaBIiKjkIIrERGRQ1g0HMJzXedlco43Xf0Ql//mKe5cvp1kJjcyiRMRGWVULVBEROQQNqU2QSIaIpnxOubFwsbZS6fy4Npd/OW57VTHI5y1ZArnHj2NUxfWEYvo3qyISDFjN7jyPNizDpp3QM1UmDgfQvozEOlC+UTkkDdnUhXfeduxXHHTMyQzXpc2V55zPLx+N7c9u507V+zgj09vpTYR4eylUznvmOmcPH8SkbDOGSIieWMzuPI8WHkr/PEyyLRDtALeeA0sPk8XjiJ5+Xxy86WQTSqfiByiQiHjnKVTWfyRU2loTlJf09lbYAjj1IV1nLqwjq9deCQPrt3Frc9u447lO/jdk1uYWBXjnCOncu7R0zhp7iTC6gBjRDnPI71pE9mGBiL19cQOOwzT+VxkWI1YcGVmYeAJYKtz7lwzmwjcCMwBNgJvc87tHdLG96zrvGAEP8D642Vw2RKYvLAEqRcZA/as8/OF8olI3w6BEt5QyJhXV828uupe14lFQpy+uJ7TF9eTzOS4b3Ujtz23nT8+tZXfPLqZupo4bzhqGucePY2XzZ6gngaHmfM8mu+6i22fuRKXTGKJBNO/8XVqzjpreAKsQyCfiAzESJZcfRR4EagNpq8E7nbOfd3MrgymPzOkLTfv6LxgzMu0Q8sOXTSKBLzmHYQy7V1nZtr9+conIj7VhCgqEQ1z9tKpnL10Km3pLPesbOC2Z7fz28c2c91DG5k2LsEbjprGecdM5+iZ4zBToFUuzvPIbNlCy4MPsvOq/4Rs1p+fTLLtM1cyd9Ei4nPnljcRyiciHUYkuDKzmcAbgKuAK4LZFwCnBePXA/cy1OCqZqqfsbtfOG59CmadDHvX686KHPJao5OpiVZwb3IhUbKcEn4BgPY926gq8/+wyKiRL+HN/59k2v2aER/8p///oTv1VMYinHv0dM49ejotqSx/f2Entz23jesf3shP/rmB2RMrecPRfonWkmm1HYGW5zk27m7Vg4sHyHkema1bSa1ZS2rtWlJr15Bau5b0+g24ZLL4e5JJso2N5Q+ulE9EOoxUydX/AJ8GagrmTXHObQdwzm03s/pibzSzS4FLAWbPnl186xPn+3dM8hk9Eodxs+GuL8KLt8KO59XGRMa8/vLK6mwdE0/9Djf+bQ13ZJdxbfh7nF6xnsrb/g2y+2De6dCyU3+GMqb1+5/SvKPnjbpsEv76WZi8CB7/qf5PClTHI1x43AwuPG4G+9sy/PWFHdz23HauvX89P7p3HfPqqjj36Om84ciprNvVWrQTjUM9wHKeR2bbNlJrguBp7To/mFq/Htfe+VuMTJ1KfMECqk48ifjCBVhlJduu/CykUh3rWCJBpK7ugNM05HzyqzfBhLmw+SHIZSCSgDdd6+cTUNAlY5I55/pfq5Q7NDsXeL1z7t/M7DTgk0Gbq33OufEF6+11zk3oa1vLli1zTzzxRPGF+bq/LTugeiqMnwN3fxke/kHX9aIVcNkDqi4oo8GQrziK5ZX1jS2877pHuexI41fPt7JiT4g5VWn+MvOXVG66GywMLqeLRhmNhpRXiv6n7FoD15za9cLRwn6+SLd0XTeS0J36XuxuSXHnih3c9ux2HtmwG+f8L6nwCiQRDXH7R07ts93XaNNXBxN+ELWd1No1pNet6yyRWr8e19bWsY3IlCnEFywgvmA+sQULgvEFhGtqeuxrkG2uyptPQhGYcTy89Gi3vYbgZZdAvBoeuxayqa7/MzDw/KN2XlJ+g84nIxFc/RfwTiALJPDbXN0MnACcFpRaTQPudc4d3te2+gyuitnwAFx/bs/5F/3GvwOpzCkHt5IGV57nuHPFjo47x2b+Dq4+dyrn3P1a8LKdK+cvGnUTQkaH0l009taWJD4OfnlBz42c+kmoXwK3XK62J71oaE5y9T/Wct1Dm3os+8w5h/OeU+aSiIZHIGWllQ92tn76M35pUjRK7etfh1mI1Lp1pNat6xpE1dURX7igIIBaSHzBfMK1tX3spec+05s2kW1sJFJX119vgeXPJxUTi1935W/edZ93ykf94Ovh/+0ZdHU/DrXzkuFx8AdXXXbeteTqW8Dugg4tJjrnPt3X+wcdXBW7swL+3RXndJdeDnYlDa6gs81DQ3OS6niEL/xpBSu27uPH4a9zWvi5ritf8EOYdZJuQshoULqLRuhZEyJfMtXj/6R7WUxANSR6WN/Ywuu//0CXBxfnJaIhTp4/mdMX1/OaxfXMGF8xAikcPJfL+W2i1q4jvX4dbc88S8vdd/vXFwXCEyYQX3x4EDz5JVLxBQsIjxs33EkemXwSrYA3/Rhu/NeB73TifP9/JzEeKiZAxXhwHjz2Y/AynetF4vDOP8O0Y/z9lLojFZWUHYpGdXA1CbgJmA1sBt7qnNvT1/sHHVwVu8vx+m/DrR8Gr+AOSjgK77sLph6jTCTlN/CTdcmDq+72t2d4x4/uY21DMz+PfpOTg04usBDOOcxCugkho0FpLxqLKfZ/cuH/wd6N8Pcv9Vz/PXdC1WT9nwS6l5wnoiG+8eajGZeIcu/qRu5Z2cDmPX6pzuFTajh9cT1nHFHPcbPGj/hDi10mQ3rzZlLr1vnV+db6pVDpDRtwBe2dwuPHk9u3r8f7Z//ieqpOPHEYU9yrkcknb7wG6o6Aa1/VM+g673/h5vf33M7sV/g3wtv3dr4ybT3XKxSKQqIW4rUFw3H+q8e8wvXGdc6LxPs/lnL/DyqgG2mjK7g6UIMOrqDnnZXmHcWLrMNxmLkMtjwOubQuJg8Vw30SG9yDfMseXAE8u3kPH/3FP9nZkuWa6Hd4VWItLa//EdW3vq/rTYhIHD74oNqXyMGo/BeNMIgSLaB6CrTt9qvb6v8E6FpyXvjgYgDnHOsaW/nHygbuWdnA4xv3kPUc4yqivHpRHa9ZXM+rFtUxsSo24P0N9gG7XipFeuNGv1OJfBC1fh3pjZs6ujsHiE6fTmzBfOLzFxCfP4/Y/PnE588nu3s3G974pi49+Vkiwdw/3lz+3vsGZuTyCQwu6CpW8rtzBfz4NV0fvROOwqmf8K/hUk2QbOocJvd3nZdq6j/t4Xhn4BWJQ+NKv8QsLxSB498NtdP96vORhJ/eHsM4RCogmug6DEf7Ll0biYBuJIK5kbj2Gvj+FFwNWrGqguE4LDwLVt7Wdd1QFC7+LSw4s/RFzVLccGa4vk5iOEi3+nfK0q3+8o7xNn+6y/Lu89qCefnxYBup5p6N4nuvQjQswdXD63bxsRuewrwsO1odp8yM8KHFSV75z3f1XLl+Ccx5JTz1C/WYJgeT4bloLKb7eSSSgBMv9TtT6n5RdvEN+j8ZoKZkhn+u2cU9Kxu4d1UDu1rShAyOmz2B1yyu5/TD6zliWk2vz9Pqq7MH195Oav0GUuuCIGrdelLr1pJ5aYv/fQKEQsRmzfLbQ82fHwRRC4jPm0uosnLQ+xyWh/r2b+TyCQwu6CpHmysv5/8Hdw/CUkEg1j0Y27sRtj5ZZEO9VAceCAv1HpRFEv4546VHup07wnD0xVBdD+GYH6CFY0XGI73MLxgPdVsnFIE1f4M/fWj4/tOHO4Ac/P4UXA3aYBthgn8Hcs4rg9epMGmBX6dad+9La7AZwPMKApjWrsFO0fGWzqAn3QKtjbC520kM/JNOLj24tFsIolUQq/TT3TEevPLjyX3+4wG6e/dt/m+r21YHl4hOg8krxdpC1FUa1/AfvMxb0bliKOL/1vdv6boBdX4hI+/gumjsrYYE+N1ULzrbfx12Smc1JFUF6pXnOZ7bup97Vjbwj5UNPL91PwDTxiU47XC/ndYpCyZRGet82kxqwwbWX/jGLt2UEwoRmTyJbENj57xolPicw/zAqSCIis05jFC8oIrYAA2yg4nhNrL5pDfFgq7+egscyLoHqtjN+GgFXHo/TDjMn59NdhumINsOmWTxYTZVsH6RdVobYfeanmmJxP3gsLDjqXIKx/3rGjM6fjb58Y4bGlbwi7IBrBvM87LQtqvbDg3GzfSP00LBK9yZhlC4YP4gl6XbYN09XTtU6btdrIKrIRlo1Y5I3O8Jatdq2PhPaN7uz6+e4v9Bbn3Sb1gZScCFV8OSN46tP8NS/dk7VxDoBAFOx3hr5/i+TfDIj7qePCwEM5bRUZLUvbRoMMIxiFV1Bj7OFT+JHflmmHx4kUCpyp/OjxcGT5H4wO5G93ayHsGSq+5tIaJhozYRZW9big9Gb+djdgOxWIzW1/+QinGTCf3i/J4bOfptcMrHYcqSoSZZ5EAcXBeNxfJ5JO7nkW1Pw4b7grvEVTD/dFhwln8Ed16pXtAGoKEpyb2r/HZa/1y7i5ZUllgkxBn1Yc6xRpbuf4nQ44+QWrWqx3srT34FVSeeGFTlW0Bs1kwsGh2BoxgRB1c+OdiNRBW9/q4RnPOfH5ZLB68i416ml3W6z8vArlXw5HU903Hkm6B2RtfOWZyjo8QuP96xvNh4L+s2b/dLy7qb92qonOzf8PZy/jDf+ZzzOl+9LfMK1ytYlm7peVMYerupDQquSqi/TOQc7FkPGx+AVXfC6jt6biNWBZWTgp5tJgbDCVBZMN59fmK8X5Q70DSW885mLhvcPWmHVCusvh3+/hXIpfzA5IT3+0FHJqjmlm7tGhwVHQ9eQy1CB6g/AmqmBSVAVUGA1Nt4EPQUG+/+OQ8u0CmNwZ2shyW48pPVtS1ESzLLO37yCC2pHLOrHRctreB3a+GWi6dTc/3p3Z4BFKTbeVC/FI56sx+gTpjTecy6Iy/ldXBdNPaXz9Nt/n/J6jth9d+gqcgffyQOl97nn/+kB5dOk1y5kuYnn2bbw4+Tff55qvY2AJCxMFsnzaSFMDWpFmY0NxLBYYkEc27+A4l580Y49SPm4Mono8FwlpTl9zecAd1IXAcN9z4Hvz8FVyU10EzU2/Ozjjjfv9Bv39PZu03bHr8qWPeqZ4XitX43o30FZIlx0PAC3P9Nv1g5EodXfQqmvQxyyc42QUWHA5w32Kpw+ZKgWHVncNNjurpr8NN9WeF48w746ZldG6uWM8ONdE9A/Z+shy246u7hdbu4+MeP9ph/8wdP4mVtD/b8zGaeBC/eAst/3/kAyZkn+kFWrBLu+LTuyEs5HXwXjQPN587B07+CW/6957JwDKYe5XcznX/VL+nao9khIrN9O+3PPkv7M8/S/swzJF94AZf2/7Mi06ZRccwxVBxzDPvmHs79biJ/WbmLZzbvJeuMRDbFov1bOXzxbI49+RjOPmoak6sPvc+QgzGfSE/DGdCNVAcaanN18DhoMvhgo2DP8xtHdgm6CroX7R6M5cf7C8r6E81Xa8sPKwY+b98WePC7Pbf51p/DvNP9kqDIwHttGpCR7CVnuO5KDc6IBVe9PZPmLcfP4KoLlpJuWEuuaTvh2mlUTVtEKFzwANC9m2D5H/zXzuU9Nx6J+3XW6xcPOX0i3Yzui8aiHS1F4ai3wb7NsP05SPntjAhF/B7WCgOuqUf6N6nGCC+ZJLlihR9IPeu/sjt3AmDxOImlS6k49lg/oDr2GKJTpvTYxsPrdvHxG57izCkRtu5tZ3V7iK1tneez2RMredns8Rw3ewIvmz2BxdNqiI5wl+/DYHTnEymPkbgOGokSwYHvT8HViBiuIMDz/D/U9r2w9h64/RM913ndN2H2y3sGSJHEgfVINRJFxXCwBzvDbcSCq+7tsOIR4xXzJ3Pvqkbm11WxZW8bqawjEQ3xnbcdyzlLp3Z0qdzFU7+CWy7vOT8ShylH+nfhpxwJU5b6r8qJQ06zjC2D7EZ7dF80DqRa+t6NsP3Zrq+ORuHmn5c7gq2jYdrRfs2Hg0ix7xQzMlu2dJRItT/7LMmVKzu6Po/OmtVRKlVx7LEkDl+Exf5/e3ceJ1dZJnr895w6tfaepNcknT0QspGwCkYUUcDBjRnEfZm5Os5V0dEZdRS8oyiKuIxXuderIwOMC27ouODIokhARAiJJCEJ2bdOel+qu/Y67/3jVHVXdVdv6eo1z/fzqc855z2nzlLdb9V5zruN/mCv0AMivy188a830hyO8ezRLp491klL2O3wIuC12LCwkk39AVclNeWByfkgps/szidKnaHJ/j3R4KpYpjoImOpgZ7qqzKlc0xZcQeExab7z+GE+98CevO0CXosHbtrC8urSoTsZ7on8ur+BnpNwepdbcptV1jAQaGWDrgWr3Peos8YZdGk9+28ax/ubYozbMDwv4Houv/1W5ZL8Eq76jW53zrnHm6K2kNm/6cmPfsztwc+2CZx7LslTp0i3twMgoRDBdevcUqnzNxLcsAF7wYIzOl6hQYsHPwgyxtDUHWP7sU6ePdrF9uOd7D7ZQyLtBmQLK4Nsaqxkc2MVm5dUcV59OT57Vv/+zf58ouaE8Y5Bdyb7N/E4TiyGE43S+8jvaL7jDkgkwO9n4RdvL+rviQZXs5VWmTsbTWtwVchwbbHue88lXLq8wE3QWJ7I9za71Qebdw+8Wve5PR6BO95c9bk5QVcm8CqtKVw6qx1oTIpi/BgaYzDRKOlwL064h3Q4jNPbS7qnByfcSzrsTpMnT9Lzm98MjDnEqIOx6k1jVl9bfsB1+jm3M6assnq3ZMsbgH2/cdva2gG4/luT8nuSbGoisn07vY/+gZ5f/Sq/9zERSl/+ckpffDnB88/Hv3IlYo+xg6cxGGnQ4uHEkml2N/Ww/Vgn2491sf1YJ03dbjtgn22xfmEFmxZXsnlJFZsaK6mvCBY8ZnNPjNrysR1zCmk+UUNMdqCTPYaJxdxgpy9C+HeP0PLlr7jBjtfLvHe8ncC552LiCZx4DBOLY+IxnHgcE4vnp8Xi7r7i7tQk4gXSRu5DoNi/JxpczWYa7JxtZlxwNVxbrBsuWMQn/2oNlaEC1XXO5P82lXC7yW/enQm8nnfnw00D24QWDAq41sL81XDwYS1xLbIhpQ4+H9U3fYDA2rU4vb04/cFSgWlPD+negWm2utewbBsrGMQJh4esarznbkouuaTQu/SmcSSxbji9cyDgOvF0fsCVVbse5q9wx5upWJyZLnTnQ/NHrWpuUilie/cR3b6d6PZniTy7ndTp04DbVsrkjjmV0XjvPZRcfHFRLnOynM6WbmUCrudOdpNIud+B9RWB/tKtjYsqaeqO8rGfPjdsadk003wyC0xFsJN7rJ7f/pamj/9L/3d7zYc+RHDT+W7JTzTqBi3RGE4sislOc9MiUZxYDBOLZtJimGg0f1og74+JZSGBAJbfnzcVvw/LH0AC/sw0gBXwI/6Bqfj9WAE/yaZTdNx995Bdj/Ddo8GVUnPYjAuuCrXF2rxkHn861E55wMsHrlzJ2160BL/tGX1nZyLSkVPClSntatnjDiEAbrfwueNrgFvy9fL/BdWrwV/m9s4ZKHen/jJ3kMGJmuoqVqkUiQO7STU3Y9fW4Vt53hk/8XdiMVJt7aQ72km1tZNqbyPd3p6Xljx1iuTx42Pan1VSglVWhqesbOg06MMTtLF8gscPlu3g8aawrASWJ45HIkiqB9NxgvjuHVh2mni3zckn5rlPGu+7G/+5GwsdVm8ax2O4Hm/rN7pDZ3SfyO+1FdzSrYpF7tg3mcAr7Z1P9GSc6OF2Is8fIrprNybijj9o19UR2ryJ4PmbCG7ejAT8HPmbGzCxgf2O8vR4xkqkHPac6ukPtp491smJzmjBbX0e4RfvfzHn1pdPyrk4xuFoz1FaI63UhGpoLG/EkjnaNnEaTGWgkz3eWKpEG2PcAKe313141RdxH3RF+nLS+nB6+zLTzHJfL+mctHQ43J9nx0N8PiQYxAoEsAKB/nkJBrACQaxgAAnkpAVDmbSAG+x85ztD9ln/+c8TuujCvEAKrxeZSP8BuAOKH3799eP57tHgSqk5bMYFV1C4qs2+5jC3PbCHrfvbaJwX4uPXnsu16+om/KU4thNKQ8dhaNntVnP6yw/G935f6dCAKzvfnzbc+gr3/ft/O2WlZSaVIvyb/6Lpls8O/PjeejNl174WsW2MMTh9faTb2ki1t5Nqb+8PlvoDp/YOd76tHaevr+BxrNJS7Pnz8SxYACJEn3kGMIjHYNkGy3aY9/Y3EFregOVJ4LHiWBJBEj0Q7XJ7O412uaUmscx0pN5PxeN+nsFKjNikow6RF04R67DoOFRNw0ffTdnlm5EllxZ895l8lmftb8pYBiqNtLtBVuZluo6RPHqI6N5jRA53ED2VIt5tAwJi8FcmCdVZBJdWETqnEW/j8kypl1sKZkrqCD/+FE2fuq3g/+1s1xKOcd+fj/H/HjtIZUhoDadJZAppLYHVtWWcV1/OeQ3lrG2o4Lz6cipCE2tL6hiHh48+zCcf/ySxdIyAJ8DnXvw5rlpy1XABluaTcTiDtp9D95FKuVXhIpH+0p6BEp7okLTkqSY6v/8DSKcHdmJZ+M85B1LJvMAot9r0sCwLq7QUq6QET2kJVok7n01zesOEH3xoyNuqP/Jhghs3YvUHTZlpNnDynPlDyTMIdiZkKtrwanCl1OwxI4OrkfzhhVZu+/Ue9jWH2dxYySf/6jw2La6cujYIhW4a7QDc+F13vLh4N8TDEOtxh0eI9bjL8e6BtMHrU4WfSI9MoLLR7b3Tst3SMcvOeY1v2UlDOpIiHUkRP9VKz+//hBN3MCnBSQvG8SBllTjRNKmeGCZV+EfXE/Jgl3jwBC3skAdPCOxM56KegIMdSGP703j8KSxJgpMCJ4VJJSCdGL0DUo/PHRg9EyQRqByYFkoLZtIDlW7Qmj1A237M928k0fg3pKI2djCF79hPkDf/sGiDPsJZ/JviOJj9D5LY9xdSfYJdAr5zNiCrXtn/QMAkEsT27CHy7Haizz5LZMd20q1u74RWSQnBjRsInreS0IoaAvU+PMnWvGCM7pMD3cdnGABvOY6nFHxBrFgLsvZ17t80tABKFmSm892pr2RCvd466RRH25+nta+ZmpJaGuefhzV4MPkiOtIW5qGjj/CtPZ8jmorjS9fx0gXvI2SWcbIzxu6mnkzvhAZIs3Ceh9V1fpbXBFiywGbRfJvSgCGWjhFLxQamufM5ae2xdv7U9CccBvJ7wBPgR6/+Ecsq5mbbxMksSTKOgxMOk+7pId3dQ2zfXk7/66chmRzYyOOh/JprEK83r9rbQJW53LRY/nsnILB2Ld6GhrzAyCotwVOaEyyF3KkbRLnzEgiM+JBzqgMdKE7QeibHTBw9Sqq1Fbu6evb3Figii4F7gTrAAb5ljPmaiMwDfggsBY4AbzDGdI60r5Ey+AxvRKrUmZh1wRVA2jH8+JnjfPmhF2gNx9ncWMmupm4SY+m6faImo+OXdDITcHUPDb7iYTj1HGb3/ThlK3FSYHnSWD0HkMUXuV1hO+n+IAUnhUmncGJJ0r0JUn0JN2jqS5GKpElH06QjDqmoIR0zpKPuGOFOapjPSgy238kERg52SPAEwQ5Z2CELT4ntBlOlXuwSH+L1utUkPd6B4M2TTbOHXWd6W0g0tdHzxA7S0TSO8VP56msJbtyALL18IFjyBic2BETWFAz6CDPrpnEqGcch/OBDNH184Oam9pZb8FRWENvxFyLbnyW2c1d/OwnvwoUEN292q/lt3ux2PDGWJ9exbjfI6j4Bhx6FP905dBvLdvNGIXYgP9gaHHz1Ly9w24QFKvr//5x0iocP/pJP/vm2gVKdiz/BVStePWqAZYwh6SSJJCNEU9H+VyQVGZgmo3nroqkoLZEWHjz6IE5OCa0gLCpdhIOT2S5GPBXLC4jGyhKLoB3E7/ETtINub4d9TUO2u+vqu7io7qJCu5iR+WSsAdNYbsqzJfdOdzfp7u7+QCnd051J63HThiz34PT05He4MgyrrAyrrNSt/jZSlbhg7ny2XVCBtJzSoeTp01NafXY6Ap3scccR7Ey1WRFc1QP1xphnRaQM2Aa8Dngn0GGM+YKIfByoMsZ8bKR9DZfBx9LlqlKz0KwMrrL64ilu/++93Pvk0bz0EbtuL4Yp7vjFtB2k+1e/4tRX7urv+ajiFZfjrV9IOgbpzg5SnZ2kOzpJd3SQ6uoa9mmmBAJ45lVhV1bhmTfPna+qwlOVmZ83D6e7naZPfw6SA70hiT84UnukiRt/SdLETfKgjzAz8sl0iB8+zKHXvd5twD6YbRM47zxCm84nuGkzwU2b8NbWTPygw1VFfM9jbjvFSBv0tWembTnT9pzlzPpk4TYiKctLd8l8ukqqaPZ6eaLvBM0eocuyiFgWcY+H1fPXgb+EqHGImjQRJ0nUSRJ14kRTsf5AKW3SBY9RiCAE7SC2ZdOT6Bmy/sLaC2kobSDgCRCwA/3BUXZejI/2sOFUV5qTHSmOtiU51pYkkbLBeAl4ApxTO4+19VWsbahkbUM559SVcSpynDf88gZi6YEb8YAnwI+u+xHLKmdeyVXBcc5gxJt7Ywzpri5SLS1Ed/yF07femt8pjmXhX7USE4u7wVQ4nF+lbjDbxlNe7r4qKrAqyvGUV7jLlRVY5ZnlinLSkQinPnmz+72eoaU6Z4WZH1wNOQGR/wK+kXm91BhzKhOAPWqMOWek9w6XwQ+19nLt1x4jnhq4tkm/gVNq8s3q4AqG77r9A1eu4ANXrp4VY8YYY3C6u0k2NZE4eZJUU1P/fLKpieTxEwV7tgOwysvd4GjePDxVVZlgaV5muRJ73jw3cKqqwp5XhRUKjX4+o7S5mhQzf9w7Da5GYdJpos89R9/Wx+n57/8mcWhob4E1n/gXqm64ASsYLLCHCXIcnP0PcrT1OVotocaBxur1WDlVEXOlnTQ9iR464510xbrojHfSHe+mM9ZJV6SVzr5muqJtdMW76Ir30Jnqo8cZuUeyoOMQNIagYwgah5BjMstuegghKF6CHi8hy0/QDhC0gwTtEEFvCSFfGUFfKUF/BcFABUF/JcHgfALBKiRQzol4F+969CbaTZIkgMhowc6wEimHAy29PH+qh91N3exu6mFPUw/huBtYeCxhcVWQ8tJeDsYfwvEdo6Ssifet+yQvW3wlSxeUFdrtlOST8QRRvmXLOPw3N+QFMFgWgfPWkO7uIdXSMmpPc4F16/A1LsaqqBgIlCrKB5YrBoIpCYXG3BZYS3XOWrMruBKRpcBjwDrgmDGmMmddpzFmyHDyIvIe4D0AjY2NFxw9enTwJuMfe0ep2WFcGXwseWWqFeq6XXBbHFSX+XnrJUt48yWNVJf5i3bM8dbJN8aQbm8nmQ2Wmprc+ZMD886g3pQkFMLbUI+3oQGxvfT+7ndD9rv4ru9QetllRbuuvHPO6y2wFt/KtZPfKcDMHgpizHllJuaTyZJsaaHv8Sfo3foYfX98Eqe7u79xfHz//rwSgMl+Ip9MJ/nZgZ9x+59vJ+EksMXm6qVXUx2qdoOmTBDVFXcDqZ54D4bC9yt+j5+qQBVV/ioq/ZXuK1DpLmemsWgHt277MgkngWUMIccwX7x880WfZlFJvVulN9GbaXPZC4lwznw2PZyzXSYtWbgDmMFSQMyy8HpL8AUqkGy1WW/IbUs2ZL4EfCE3zRsqMF+CYwc42Wexuy3JrlNRnjzUztGWTtpigs9yeODaPdjeVXTUbWHz0oL3PpOeT4YLSHwrV3L49dfnB1Ei7ndIgZIm/zmr8a9chV1bi7e2Bru2FpNO0/SJT+aVuE5FSZIGOmed2RNciUgp8Afgc8aY+0WkayzBVa6RSq4G38B5LHjwQy9hRU3BpzdKzQazvuSqUJXdL92wkZDXw71/Osqj+1rxeoTrNjTwjsuWcv7iygkdr9APe/3nbyO4YQOp06cLBk7JU6eGPBm1ysvxNjTgXbjQnTY04F3YgLdhId6FDXgqK/uffk5Hg+Bxdr98NtCSK9xOKCI7dtC3dSu9Wx8nvncvAJ7qBZS+eAulW15M6EUvwlNRUdQn8sYYuuJdnO47zam+U5zuO83pyGl3mnk1R5rz2iJleS3vQKCUDZAywVKlv7JgetAevWRtIm2uRtmx2119XtDV486f2Iaz7S66GjYSM2lKUnHKTz/vtr/0lbnvS0bcVyKSP++Ms+MD8WDsAJLsI22EGD5KJA7eIOF3/J6yRWsKvutMLnk8+aTQ9yEi7jhnsdiQ7cuvu46e3/42r6r0cN+f01WSpM46syO4EhEv8Cvgt8aYr2TS9lGkaoGDb+A8FqQduH7TQj5//XpOdkW1ows1Y4yjZGXWB1dQuOv2bB481NrLvU8e5SfbTtAbT3H+4kreedlSXrW+/oyqDPZt28axd75r1B6aPPPmDQqcFg5MFzbgKR17deJ0OkXrb35J182f6f/Br/zsp6i+9tV4JqFnsjPofrlox53KgE7H7xmb5MmT9G59nN7HtxJ58k9u1/q2TWjTJkpesoXSLVvwn3POkKpQ6XSKrgN7SLQ046uppXLlmmH/X/uSfXmB0unIaU71nuJ05DTNfc2c7jud1+4H3KCpNlRLfWk9daE6HOPw68O/HrLv77zyO1xcPzmDCGd7C2zra2ZBSS1LJrm3wFG7uB9JOlk46Er2ufvLm3eDNNN2ANnzX0N25bzjV1jLthQ6yqTnk76nnuLYO945JL30qpfT++gfhpSWLv35z0js2zfmgElLktQUmPnBlbjf6Pfgdl7xoZz0O4D2nA4t5hljPjrSvsbSW2BLOEZ1qZ9fPXeKrz68n/PqyznYGiY+FT2VqVlnpg4QmDEngqux6I2n+Om2E9zz5BEOtfaxoNTPWy5p5C2XNFJTHij4HmMMyWPHiDyzjcgzzxDZto3ksWMFt6165zsouexFOHXVODXzSfqEeCpOPF34lUgniKVj7jTlTofbtivWxZ72Pcz3lGM7kLagLd3NssrlhGy3DZUlFiKChQUCFu6yiCCIu56xLfcl+9h6cmteKYBHPFy3/DrmB+djWza2ZeO1vHgtr7ssmTSPt38+u03B7Qets8TiiZNPcOuTtxJ34vgtP7dtuW3SAjodv2d4TjxO5Oln3NKpxx8ncfAgAHZDPaVbXuKWTl166YgPCAZ/vj7Lx/9Y/z9oKG2gJdIyEEBlSqHCifw2hYJQHaymrrSOulAddSV11JfUU1dS1/+aF5iX97c60n2EGwp1vjB8t+Gzz1S3TRx/MDep+cSkUpz+3Ofo+sF9+QcdJYgCNGBSM8msCK5eDGwFdkJ/36OfAJ4CfgQ0AseAG4wxHSPta7w/hF9/ZD9ffuiFvDTt6EJljbeKgUmn3cH+ohGcaNR9RSLu4ID9y1GcaGY5kknLWU51dhB7bmded68jVCE7a4KrLMcxbD3Qxj1/PMLv97VgW8Kr1te7VQYbykjs3+8GU9u2Edn2TP+4O1JZQXLtCo7X2+w4tY3tSw3t5ULChqQtJIM2STNMd89j5LW8+D1+fB4fAU/AndoBEukEh7qHdg6wZt4ayn3lODhupxiZYMgxDgaDMQaDGXnZmP73Z9OiqSit0dYhx/N7/P1dSA/XVqXYAp4AXs9AUJYboA2eLzQtuM7jJZwI88O9PySV8zc7W8fvMcaQPHrULZ3a+hiRPz/tfl/5fIQuuojSl2yhZMsWfMuWjdpQP5FOsK9jH4+eeJR/3/nvBavpAVT6K90gKVRHbUltXuBUX1JPdagarzW+AXCnq8R1yk1l28RpHrIg938Wj4fWr/1vok8/TeiSS4js2AHxuAZRajYadz6Z8mHQjTGPM/yJvnwyj33h0qFNuGJJh5ZwTIOrGaqYJUkmmcTp68uMaN6L0+u+0r29OL19JI4do+Puu/sb05pYjJP/+GECa9eCMQOBUSZIGq3HoiG83sw4F+5LQkFIpYeMo2FiMVKtrZPWPmc2sSzhitXVXLG6msNNnTzwk99z+qffY9f/PQidRwkm3Ce0yeoKWlbOZ+/LKvljTRe7Sjsx8hwAJasCNJ6Is+a4g8948GzegHfxIhaXNw4JjHKX/R7/wLqcNL/tx2f58FiFx/UZ7on87S+5fVKeyI+lBCDtpEmZFMl0kpSTImVSpBx3OWkyaU6KpDMwP3g5O590khzsOsj3935/yLm8ZNFLWBBcMOz7stOkkySSihRML/SeQmLpGG3RtrlTypFj8IMe/H7mvf3tOL1h+h5/guTx4wD4li6l8oYb3NKpiy4asVc/xzgc7j7MrrZd7Gzbya62Xezr3Dfs5wu4wU7jVYS8o/daOV6WWFy15CpWVa2iLdrGguAClpQvmVuBFbhBzYJVkzdEweBjnftq+PvzpryjmSH/s4D4fNR/4fNUvOY1wwZR/mXL9LdOzTlTHlxNp9ryAAGvNaSnsq5IkkOtvdoOaxTTVWXu5Ec/5vYG5PNRfdMHCKxbh4lE8gKjbKDk9PW6wVNvTvDU5y4Xajw7KsfBJBLYtTV4gwvdwCgUdAcJDIaGLocygdOgZSsYRHy+IbsfrvMDu7p6Ih/dnJDu7SO6fTuRbc8QeeYZYs89x5UJt+1US3WQJ9YIzy/2sLcR2ir68FkpVlQuZ1XVBl5ZuYpVVasIeAJ86vFbuOGSq5nXK3SUGu7pfpCvb7x10m7KG8sb+dyLPzfkifyS8iXTdjyP5cGDB7+nOL0wHuk+wv377x8S0L1/0/uL/rkaYzjYdZA3/uqNxHO61g54AiwIzs3eX+NHjnDynz860JNaPE7Ht7+NBAKUvOhFzHvXOyndsgXf4sUF32+MoTnS3B9E7Wrbxe723fRlerYL2SHWLVjH2857G+sXrKfSV8k/PPwPQz7f9QvWT0pglWWJxbKKZXMyQJ42UxnM5UgcPZoXWIHbC2xw40bEsjSIUmeVsyq4Wjq/hK+84fz+ji68HiHks/mH7z2LJW6nF9oOq7Az7ZXHOI5bVS4cJt0Txgn3kA6HB5Z7c9N7cXpy1nd1ke7qGthZIkHrl75c+EC2jae0FKv/VYK9YAHW0qX9y57SUqyS0vzl7KuklFR7G0fe9OYh3bou/LevTtqPgm/JEhpu/8LQbmqXTM6N+Eww0HD+NL6auv6G86n2dvqeeYb2P22l75mn8Rw8jjiGtAVHai2eP9+wd7HFC4s9VNUuZEXlCsqdhVSdKOXowSDR1AJq1y/k+g1L2NxYhYjgGIcPXvihgcCjd3IDHZj6J/LTUQIwlQGkiLC8cjm3bbltygLW6WASCSLPPEP40UcJ//dv87uozlh05zcovfzyIend8W52t+1mV/tAqVRb1K0ia1s251Sdw3XLr2PdgnWsX7CepeVL80peHePM+c9XTa5US8vQB5iJhNbCUGelaR9EeCLOpH784J7KwrEU1//fJ0jnVDX328JvPviSGV9VcKp66zKJBJGdOzn2rr/N/8G3bSrf8AbE43GDoWxQFA67QVJvrzuYqlO4Hn+W+P1Y5WV4ysqxykrxlJXjKS/DiUTpffTRIdvXfPzjhC68EE9pCVZZGVZpKeLzjXkgwGGvc+YPEDjr21xle9Lr/OSniZg4XRU2VuNCQic7KT/dA0DChhcahL2L4fSKKmTDGpbWnsuqqlWsrFrJiooVBOz8Ti2OtUe498kj/PCZ44RjKdYtLOedly3jug312BbsaTtEc6SV2lA1axYsx/YUrtKnxi77/TNVAd04jzfj2lwVKvlPd3TQ+9hWeh99lL4nnsDp60P8foIbNxB5dnvBcafM4nr2dux1S6Ta3VKpoz0DYw4tLV/K+gXr+wOp1fNWj6nEcqr/nmpGKFo+mY4hKJSaIjO/Q4tiKsYP4XADDn/gyhV88MrVHOuMjKm64HR0S7z12GO0H9hFRdihp9zDvBVr2dL4kmGPa4zBRCKku7pIdXb1lwz1vzo7Cy4PHjB1MKusrD8oyg2OrNIyN2jKTrPry8vxlJVl3leGVaC6HEzPl/UM79Z11gZXxhiO9Rzj6Z9/i8SPfs6SZod5ve663gAcWOyh45w6zMbzmL/xIlbWnMuqylVUBirHdZy+eIqfbT/JPX88wv6WXuaFfFy8bB6/39esPYSeXaY1uBocSHkXL6b3kUcGqjjbNt6FC93eLI3Brq2l9KUvpfSlV1By6aUYn5fW3/yS9ls+zYmSOAeX+Dj26s0cKuljf+f+/o49aoI1bhBV7QZT580/j3Jf+YTPX501ipZPdMwpNYdpcDVehQYcFty6wouqgjT3xEimR74pK2avR8m029A7mooSS8WIpqL9r1gq1r+uKdxE3/O7sH//FP5YmmDawr9sOaWhSipiFr7eON7eGN5wDDscxROOYPdEkNTQkc+zTGkIKsqgohypKMeqLMeqqMSqrHAHhfze9yCRwjJgp8Hr9bH0Jz8huGpy6nbrl/UQMzK4KvRgQRCOh4/z9Kk/c2DbIwR+/wznP9dLTTckPXC0GvoC4E1BTTes+PL/puElryjaORljePJgO3f+/gBPHGzPW2dbwh03bOAlq6qZX1qcNkhqxpm24KpQZxQ1H/wgLV/+cn9nOe4ZClVveyuVr389/nPP7S95b4u28fP9P+fbO79NOp0ibhKZCxI2VG/gorqLWLdgHevmr6O2pHZC56rOepPTW+DMfDip1JnS4Gq8Bg84HPBafOmGjTR1Rvnib/eRcgzV5XBufYAjLYZ7/vbSIdUFD3cf5oZf3JDXGNgWmzee+0aCdjAvQMoNlAotZ59I+hOGeWGYHzbM72FgPgzzMmnlUQpKC4SDEA65096gZKbQExR6g5n1mfmekHuj64zzSb4g+D1+gnYQv+32rJbtTS07H7Azadnthlkf8ATw2/4h8ztO76D36AEW9Fr0ltksWLV+xNK5iZrqEshxmnHBVbYEtW3/TpLdXezyNtPk7SN2+CDnPNvOZXscFrW7/1t956/Af8lF+O76KcQHqpdKIED1D+9l/jnri35+w5VMZ80r8bGyupQVNaWsrCllVWZaXxGYcDVTNa2mJLgqVNUvcfQoh173+ry2m8NpvPceAhdewK72XWw9sZWtJ7fyfPvzw25/19V3cVHdRWM+P6VGMeOqzyo1A838rthnGssSrllbx7k3belvh7V0fgnbjrXzkdfHufPJ/6a9YxNb9y1GxPCRH2/jry7wUjOvkyPhgxzoOsDutt15gRVAyqT47p7v4hEPQTtIwA4QtIMEPQEqU34aeoX5YR9VPTaV3UFKuxKUdsUIdkTwd/Rh9xXo2a6yHKmpxl5dg2MJicf+iCcnNnaAeV//EhUvfRmOcUibdH93yGmTJu2kSZokaSc9sOwk++ezXTRn1+cu7+/cz8/2389loXX44w49vhR/juzl8oWXUxWoIpaKEU/HiaVj/YOxhhPh/oFVc9eP1PXviHqAk+6YKyXeEvfzzHy2AU9g4DO2gwQ8AYLeYMH0vOXMe4PeIH7Lz6PHH+XmJ26e0nFXZnhA169QRxR7O/byzB9/wiNNfyBmGy7bY7hxDzQ2OxgRrE3rqfnA9ZRffTV2VZXb5mrFerpu/kx/aWTlZz9F5co1k3LOhXoI9dvCZ167jnAsxcHWXg609PKbXafoiiT7tynxeVhZkxt0lbGyppTFVUFsz8z726ipV6iEqvJ1ryX+wv4hgVXpVVfRu3Vrf3o4CM+t9nFX27386UcfoSvehSUWG6s3ctOmm1hRsYKPPvbRs6Z3RKXUzDEd9yTT0bRmMo931pdcQeEPeXfLQT629Sa2BNbS2dvGPqeLw7FWjNUL4t6oCRb1oUZWVC6irjXFkp88xcLTSUodL97rXklp/RKqwg6p5mZSzadJnm4mdfp0wTZMnuoFeGvrsOtqB6Z1ddi1mWlNDVZgoBF/7PBhjhRoj7T0/p8SWL58wp/JYGMZS2es0k46LxCLpWNDgrNYOsae9j18Z9d3hrz/ikVXUOYrc0v70lGiyWj/PrKlgLG0Oz9RgrCkfAllvjJ8Hh8+yx3ryOvx9pfI5Q4mmx0LKW/eGj7dtmyeOvUUt//5duJOfLSAbtpKrrIdUXTd/BmcWIyDS/08/ua1tBzazZpDCS7Yb2jozJ6lEHjXW1j0jnfjra0puC83SGvGV1Pb31vgZChUMl2oeq8xhva+BAdaeoe8TvcM/M/7PBbLFpSwsraUldWZwKu2lGULSvDbnrzjHmnv0+Edps+kDY6aLaGKHzrE4ev/ekivfp7qatIdHXlVAO3GRnjvm3ng519h6zlpXmgQjAXlvnKuWHQFWxZt4bKGy6jwVwBn0QC7arppydUsMJWBx3R890z1Mc/geFotcLwGf8g+y8e1y67lUNch9rY/TxL3B7K2CxbNX0Z941rqZB1NO6I0b2+luquNc2NtrDr1AvOj3VgM+jwty23QXFuLXVeHt64WuzYzratz06urC46BNJKpbo80HRluogGdMaY/6OqvhpmO5i+n3MAsmoxyoOsAPzvwsyH72VSziZAdIuEkiKfjJNIJEumceWdg2TEj94w4FiNc45QFV4NvJvsSvTS/4a3srE1wYoGwuB3OOWHwpt32iYNPrPqub7LgsivO9HSLanAPoeMNdHpiSQ4ODrpaeznWEekf/9kSaJwXcku7qkuJJtPc9+djJNIGvy189cZN2onG1Jq0hvp4vQTXrye+bx9OX9+QfSz+7n/Se/r4wIOIJX7+8K6NPBjfjsHQYM1jZckSdiWO8sUrvsgl9ZcUPBftvU9NAQ2uxmk6SljO5N7LGINjnP7aR9mB4/NqJmVqNeXWUjoePs6nnvgUCWfgoZHX8vKRCz/C/OB8HMetFZU26f4aUrm1ofrTcrdxBuZTTipvG8c4dMW6ePTEo3n3TxYWF9RegN/292+f3ZdjHByc/nPJXZ+3rUkX3CblpPLuK2HUe0sNrkYzOGMYY3jvQ+9lmVXNnr6DdBi3C7PFgXo2P3aKi55PsawFvGnAsvDU1ZJubsl7KtkTquBwaAEnSmtIeGx86SShZIzGt9zI+r+6kkXVZXgm4aZqqhuPTkfXy1MZ0BWjdC7lpAoGX0OCskxAtrd9L3ftvmvIfoZpW1H04KrQE3kgf/Bm2yZ6zmLYf5hg5vu2JwjBONR++MN0fP3OIWODTVYJ6kwSS6Y51NrHgdZeDjSH3WlLL4da+0g5Q79Xs9UKa8oC1Jb7qS4PUFPmp6bMT215gAWlfnz2mf1fa0nZEJPaxTRAyRVX0PfHP0JyoDpptv3g23Z+lPV2IzvCe2lyOvBa3v4f96wzLflXqohmfXA1FcGOMYaEkyCSjPDgkQf54tNfJOEk8Fk+3r3+3Wys2UjapEmmk/1BTNJJutNMWu60f52TP19o2pvoZXf7bkzOg3tBqA3VIiL5gVMmUMqmzRQe8WCJhW3ZWGLhEU9/msfykHJSdMQ6hryvsayRMl9Z/7bZ7S3cecuyBvYz3NQamt4SaeHBow8OOd4IbVq1zdVIcrsvL+1J8ZD3BDud45yKNNHTd5KrtztsPmyxqKKRkrY+nOZB/5yOg2/hQkKvfS3+ZcvwLVuOb9lSTh06QeLdf88+byN/rl3D8bIaevyl8ALwwlZ8tsXyBSWsqC5lebU7zc6X+M/8TzDVo55bYrGsYtmU3QxM9eCoxRgY1bZsbMsm5A2Nafs189bw/b3fHxLQTUXbikKln3X/61Okwz203H7HwAOEVIrwicO8sFKoChvWHHc7U5FAAO8Vl7NwceOQElT/0qWTfv7TLeD1cF5DOec15Hd9vXV/C2/7ztNDti8L2LSE4+xq6qG9N06B+It5JT434MoJvLLBV025n5qyANVlfgLe/CqIY6n6qM5MwcFRgfl//x4qr3993v9+7LMf5NaT/87xvhMc50T/tpX+Sv7xgn/kM09+RgfpVSpjuMBorAHT4AewfsvPxy7+GBfWXUg8HXdrpySj/bVWcpezTQf609KDOh5L5m9TqFZKwklw51/uHPd1e8TTf6/gtbwjTpNOMi+wAjAYllUsoyZUg23Z/fvzWB5ssfvn+48jg5Yz7/FYOeszy+3Rdm79060knYGHRj7Lxx1X3EFjWSOWZWFLTpCUE7xkj5EbPFlijdo51HAPtr/x8m9Myv3mke4jPHbisUm975qzJVeFnsgf6zlG60MP8OvffZM/LU9T3wkXnPCxeXecij4zEJqKELjwQmLbCw/iODiYOdIaJvzQQ3i/eGv/j2z7h2+hc8PFRJKGg629mVcfxzoipHPuquorAplgq4TlmaBrRU0JdeWj91amT6uLb4aXzhW15Gq4J/LgVvU7WA+PbLQ4VAdXHCvlza/4MN2f/kJeRxTV174aSyztfjdHoeEdAl6LB27a0t/TaCrt0N6XoKUnTks4Rks4TnOPO23pidMajtHcE6e1N573fZFVEfRmgjA/IZ/N7/Y25w2E7vMI33zbBaxtqKA84CXgHf0Hbrxm+PfPpA+OuvT+n/KU5xjN+//C0Y5D/CH9PEcTp/Fa3v7qJ1kBT4Afv/rHGIxW81MzyZSUXBUKloCCv31XNl7J7479jk9s/QRxJ47P8vGWNW+hsbyRrngXnbFOOmOddMQ7aO5r5kDXgTO5BGyx+zu2ynZ+1b+c2wlZzqsl0sJ9++4bsq+PXfQx1i1Yh9fjxRYbr8eLV7zucoGAaTz5vpjt3cdC21xpm6sRqzoNeSL/qVvY3vQMe//wc5adNixpzWxs23kBVFbj975Luq1tTG2aHMfw6N5mWvcdoCrSQ2eonOpzVvLSc2uH3GzEU2mOtUc42NqXF3QdauklHB84jxKfJxNs5QddS+eXEPB69Gn1HDKOgK6owVXfU09x7B3vHLLtqQ+/gX9N/JRwEF7zlOE1TzmUSIDKH96NF2tKOqKYzYqZNx3H0BFJ9AderZlgrDknKDveEaGtNzHifnwei/KgTXnAS1nQS3nApjzopTzg7U8vz6RXBL1D1uWWlBX7GsfzWYwjmJv0wVE7Ll7N9b/667wnvLbY3HPtPZzuO62dUajZYNKDq+FuZJdXLOfGX92Y17bHwmJx+WKO9hwddn9BO0iVv4qqQBWWWOxs2zlkm3evfzdr56/tD5z6exDOWfZa3nFf91QHOjB9wc5Ut/ecjgfb4zje7A+uROQa4GuAB/h3Y8wXhtt2uAweP3w4b5wRR0CM++kkPJC0oSTTRGTeu99N53/+55Cnkst+dn//mCVjeSI/0Ubzxhhaw3EOZIOtzPRgSy8nuwZ6vROBxVUh6isCPHO0Y8jT6jvfspnVtWUEfR5CPpug11O09l7T8aR6qo85w69xUkuuYl74z1d4eWijoVHmc9O9XTSeiCOBAOmb30fpVVexpHLpmZ7CWWWi3wfjcai1l2u/9hjx1MB3udcjfPyacwn4PHRHk/REU/TEkvREk/TEUplpJj2aJJEeuSMWn23lBVtej7DtaGde1UbbEv728qU0VAbxez0EvBZ+e2Dqty0C3vyp3/bg91r47ZFL1s4gmCvqTePgHi7bFni5+Y+3sLdj75Bt77r6Li6ovUA7o1CzQVHzSaESqqM9R4eMAypIf5W3wc6bdx7Pdwwd6+2LL/kiL138UoJ2sD/tbCjVyR5Xv0+m1ewOrkTEg9tS6RXACeBp4E3GmIKjKg6XwXOfyDsCLzTAX5YLizZcxsX/8TTeyMCTEruxkZqbPsCpm2+Zkl73zkQ0keZQ20CwdbC1l50nuznaPrRL90L8tkUoG2z5PIR8HgJeTybNQ9BrD8z3T21C3oG0gO1hx4kuvvLQPhIp0z9W0FVrarE9FrYleLIvkaLcSE710/Hpeho/jmMWNbjK7V79hXkxvvEam9NVwlvXvJXNCzbRc3gfFWGH7jKL+SvXTergzerMFeP/NpZM9wdc3SMFYpn0pq4oB1uH9pQ3EW6wlQm8BgVmxhh2HO/KC+YGV7UcpGg3jYNvqDzink/IGyKWiuU1HNdOKtQsM2n5xG/5uX719RzoOsDTp4e2Qb16ydU8cuyRIfnnP67+D97123eNKWA6W0p11LSb9cHVi4B/NcZcnVn+FwBjzOcLbT9ccNW+bycn3/w27rs4wX9faFHXAe972OZF3/g+9qHjQ6p3lL785SSPH59VbUaGe1r9iVetoSzgJZpIEUmkiSTSRJNpIpnlWDI9kJ5w06OJNJFMeiI18a7EwS1h80h+wOXxSH7aoIBscFoy5bD7VA+5/6KWwKbFlQR9xa+OFk2k2D7oBm4yjzfcMUe4aSxqcHW4+zAfePj9LJNqHgs/S5mnhIA3xLev+XeWlC/RH5BZZCpLyqBwuzK/Ldz/Py+nviJIPJUmlnQGpsk08ZRDbNA0b74/bdB7U2nawnH2NfcOOY/73nMJly4v2Ai5aDeNh7sP84ZfviHvZs8jHu699l6t/qdmu0nNJwAVvgp6k71Desr88at/zAudLwzb5mqs+UqDHTUFZn1vgQuB4znLJ4C8QUBE5D3AewAaGxsL7uR4RRLrY/+TU7u+wWufTHP9s174l/dxvCzOhle8gmWrVw8JpKay171iWDq/hK/euKnopSyptEM06QZe0ZxAbNvRDm57YGgVmHdctoTFVSHSjiFtDI5jSDkD07QxpNOZqeO+HGNIDUrLW5eZ70glGBz7Owa3bVqRG+eDu9/BfQdM5vGGO2Ys6dASjg33RH7MRssrrZFWjvYe4yjHAOhO99Kd7qUt2tbfK6Q+gZ8dLEtYXl064f+ZsVo6v4SvvOH8Id8/a+rKJyWoG66TkJqywAjvGpux5JPBN4xp4w6EPpW9mSo1nc4knwB87WVfoz3WPiRYaixvpLG8sWD+GU++mupejJUai5kWXBX6Vc679TTGfAv4FrhPTwrtpDI4j/d7/ou3b/lb5vdZ7H2j4Z7un/P14FWzMpAqxLKEa9bWce5NW4r6tNr2WJR5LMoC+Y09q0JevvLQC0Nubt7xoqWTdkM33A3VN996waQcc6qPN9Ixi3HTOFpeqQnVEPAEpqUbeDW7Tdb3z3CGC+aWzi+Z8L4nkk/0xk6dLc40n8wLzmNT7aZhg6VC+UfzlZrtZtojthPA4pzlRUDTeHfSWN7ITRd8kDuav8eHur/NF09/l5su+OCcG1Mk+7T60uULWF5dOqnVgLI3NwGv+y9TzJubmXLMs+Eac2XH9Qp43EBOx95R4zGV3z/ZYO6Bm7Zw33su4YGbtkxZz6iaT5Qa3Uj5JBssXVR3EcsqlmnprprzZlqbKxu3Q4uXAydxO7R4szFmd6HtR+oOVOvhFt9Ut+uYjmPO8Gssapsr0Hyi5qxJ6QVN84maYzSfKDW62d3myhiTEpH3A7/F7Yr9ruECq9FosXLxTXW7juk45tlwjXnH1nyi1Kg0nyg1Os0nSrlmVHAFYIx5AHhgus9DKaWUUkoppcZDy2uVUkoppZRSqgg0uFJKKaWUUkqpIphRHVqMl4i0AkdH2WwB0DYFpzOd9BrnhtGusc0Yc82Z7HgMeUU/37lBr9F1RnlF8wmg1zhXaD6ZXHqNc8Ok5JNZHVyNhYg8Y4y5cLrPYzLpNc4N03mN+vnODXqNc/fYU0WvcW7QfDK59Brnhsm6Rq0WqJRSSimllFJFoMGVUkoppZRSShXB2RBcfWu6T2AK6DXODdN5jfr5zg16jXP32FNFr3Fu0HwyufQa54ZJucY53+ZKKaWUUkoppabC2VBypZRSSimllFKTToMrpZRSSimllCqCORtcicg1IrJPRA6IyMen+3yKRUTuEpEWEdmVkzZPRB4Skf2ZadV0nuNEiMhiEfm9iOwRkd0i8sFM+ly6xoCI/FlE/pK5xk9n0qflGudiXtF8MieuUfPJJJvr+QQ0r0z1NWo+mZ00nxT3GudkcCUiHuBO4FrgPOBNInLe9J5V0dwNDB7M7OPAI8aYVcAjmeXZKgV8xBizBrgUeF/mbzeXrjEOXGmM2QicD1wjIpcyDdc4h/PK3Wg+me3XqPlk8t3N3M4noHllyq5R88mspvmkiNc4J4Mr4GLggDHmkDEmAdwHvHaaz6kojDGPAR2Dkl8L3JOZvwd43VSeUzEZY04ZY57NzIeBPcBC5tY1GmNMb2bRm3kZpuca52Re0XwCzP5r1HwyyeZ6PgHNK0ztNWo+maU0nxT3GudqcLUQOJ6zfCKTNlfVGmNOgZtBgJppPp+iEJGlwCbgKebYNYqIR0R2AC3AQ8aY6brGsymvzKn/oSzNJ5pPimxO/Q/l0rwy6deo+WQO0Hwy8Wucq8GVFEjTPudnEREpBX4KfMgY0zPd51Nsxpi0MeZ8YBFwsYism6ZT0bwyi2k+mTKaT2Y5zStTQvPJLKf5pDjmanB1Alics7wIaJqmc5kKzSJSD5CZtkzz+UyIiHhxM/f3jDH3Z5Ln1DVmGWO6gEdx63NPxzWeTXllTv0PaT7RfDJJ5tz/kOaVKbtGzSezmOaT4l3jXA2ungZWicgyEfEBbwR+Mc3nNJl+AbwjM/8O4L+m8VwmREQE+A6wxxjzlZxVc+kaq0WkMjMfBK4C9jI913g25ZW59D+k+cSl+aT45sz/EGheYWqvUfPJLKX5pMjXaIyZky/gVcALwEHgk9N9PkW8rh8Ap4Ak7lOivwPm4/Zwsj8znTfd5zmB63sxbjWC54Admder5tg1bgC2Z65xF/CpTPq0XONczCuaT+bENWo+mfxrmtP5JHONmlem8Bo1n8zOl+aT4l6jZHaslFJKKaWUUmoC5mq1QKWUUkoppZSaUhpcKaWUUkoppVQRaHCllFJKKaWUUkWgwZVSSimllFJKFYEGV0oppZRSSilVBBpcKQBEpFJE/mdmvkFEfjLd56TUTKR5RanRaT5RanSaT+Ym7YpdASAiS4FfGWPWTfe5KDWTaV5RanSaT5QaneaTucme7hNQM8YXgBUisgN3ILU1xph1IvJO4HWAB1gHfBnwAW8D4sCrjDEdIrICuBOoBiLAu40xe6f6IpSaAppXlBqd5hOlRqf5ZA7SaoEq6+PAQWPM+cA/D1q3DngzcDHwOSBijNkEPAm8PbPNt4APGGMuAP4J+D9TcdJKTQPNK0qNTvOJUqPTfDIHacmVGovfG2PCQFhEuoFfZtJ3AhtEpBS4DPixiGTf45/601Rq2mleUWp0mk+UGp3mk1lKgys1FvGceSdn2cH9H7KArsyTF6XOZppXlBqd5hOlRqf5ZJbSaoEqKwyUnckbjTE9wGERuQFAXBuLeXJKzSCaV5QaneYTpUan+WQO0uBKAWCMaQeeEJFdwB1nsIu3AH8nIn8BdgOvLeb5KTVTaF5RanSaT5QaneaTuUm7YldKKaWUUkqpItCSK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKzQgi8oCIVE73eSillFJnSowx030OSimllFJKKTXracmVUkqpMROREhH5tYj8RUR2iciNInJERG4XkT9nXisz21aLyE9F5OnM6/JMeqmI/IeI7BSR50TkrzPpR0RkQWb+rZl97RCR/ycinszr7sxxd4rIP07fJ6GUUkoNZU/3CSillJpVrgGajDF/BSAiFcDtQI8x5mIReTvwb8B1wNeArxpjHheRRuC3wBrgFqDbGLM+s4+q3AOIyBrgRuByY0xSRP4P8BZgN7DQGLMus13lZF+sUkopNR4aXCmllBqPncCXROR24FfGmK0iAvCDzPofAF/NzF8FnJdZD1AuImWZ9DdmE40xnYOO8XLgAuDpzHuDQAvwS2C5iHwd+DXwYHEvTSmllJoYDa6UUkqNmTHmBRG5AHgV8HkRyQY4uQ14s/MW8CJjTDR3H+JGTCM1+BXgHmPMvwxZIbIRuBp4H/AG4G/P6EKUUkqpSaBtrpRSSo2ZiDQAEWPMd4EvAZszq27MmT6ZmX8QeH/Oe88fJj2vWiDwCPA3IlKTWT9PRJZk2mNZxpif4lYt3IxSSik1g2jJlVJKqfFYD9whIg6QBP4B+AngF5GncB/avSmz7U3AnSLyHO7vzWPAe4HPZtJ3AWng08D92QMYY54XkZuBB0XEyhznfUAU+I9MGsCQki2llFJqOmlX7EoppSZERI4AFxpj2qb7XJRSSqnppNUClVJKKaWUUqoItORKKaWUUkoppYpAS66UUkoppZRSqgg0uFJKKaWUUkqpItDgSimllFJKKaWKQIMrpZRSSimllCoCDa6UUmoOE5G0iOwQkV0i8mMRCWXSa0Xk+yJySES2iciTIvL6zLqXiogRkb/L2c+mTNo/ZZbvFpHDmX3vEJE/Ts8VTh8RqROR+0TkoIg8LyIPiMhqEYnmfC47ROTtIlKW2W5V5r1eEdkpIpdM93UopZQqHh1EWCmlZohwLNm451T41uaeWENdeeDUufVlN5cFvMcmuNuoMeZ8ABH5HvBeEfkq8HPgHmPMmzPrlgCvyXnfTuBG4DuZ5TcCfxm07382xvxkguc36cKJcOMLnS/c2hppbagJ1ZxaVbXq5jJf2YQ+VxER4Ge4n+EbM2nnA7XAwexnPug9/wLcCbwS+Cfgj8aYpyZyHkoppWYWDa6UUmoGCMeSjb/ZefrhT/1i16pY0iHgtfjMa9Zdeu36uquKEGBlbQU2AFcCCWPMN7MrjDFHga/nbHsMKBeRWqAFuAZ4oEjnMWXCiXDjw0cffvi2p25bFUvHCHgCfOKST1x61ZKrrppggPUyIDnoM9whIkuHe4Mx5kci8rci8lHgvcCmCRxfKaXUDKTVApVSagbYcyp8azawAoglHT71i12r9pwK31qM/YuIDVyLWyK1Fnh2DG/7CXADcFlm+/ig9XfkVH37XjHOs9he6Hzh1mxgBRBLx7jtqdtWvdD5wkQ/13XAtmHWrRhULXBLzroPAbcDnzXGdEzwHJRSSs0wWnKllFIzQHNPrCEbWGXFkg4tPbGGCe46KCI7MvNbcav5vTd3AxG5E3gxbmnWRTmrfgT8EDgX+AFukJVrxlcLbI20NmQDq6xYOkZrpHWin+tIClYLzLgGOIUbnCmllJpjtORKKaVmgLrywKmAN/8rOeC1qCkPNE1w11FjzPmZ1weMMQlgN7A5u4Ex5n3Ay4Hq3DcaY04DSeAVwCMTPI9pUROqORXwBPLSAp4A1aHqiX6uu4ELxvMGEWkAbgIuBl4lIhsmeA5KKaVmGA2ulFJqBji3vuzmz7xm3f5sgJVpc7V/TX3ZLZNwuN8BARH5h5y00DDbfgr4mDEmPQnnMelWVa26+ROXfGJ/NsDKtLnav7pq9UQ/198BfhF5dzZBRC4Clozwnq8CtxljTgAfBu7MdIyhlFJqjhBjzHSfg1JKKQZ6C2zpiTXUlAea1tSX3TLRzixEpNcYU1ogvR73Zv8SoBXoA75pjPmhiLwU+CdjzHWD3vOvQK8x5ksicjdwBdCds8nFmZKxGSW3t8DqUHXT6qrVt0y0t0DoL4n6N9wSrBhwBLdN1XPAvpxN7wL2AJ8BLjOZH14R+QXwU2PMPRM9F6WUUjODBldKKaWUUkopVQRaLVAppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJqDhORc0RkR86rR0Q+NMy2XxORkyJi5aS9U0RaRWS7iOwXkd+KyGWD3vdPIrJXRHaJyF9E5O0566pFJCkifz9pFzkNRCSd+Tx3iciPRSSUSa8Vke+LyCER2SYiT4rI66f7fJVSSk0NDa6UUmqmiPU0cvSP97Dr/oc4+uS9xHoaJ7pLY8w+Y8z5xpjzcQe7jQA/G7xdJqB6PXAceMmg1T80xmwyxqwCvgDcLyJrMu97L/AK3AGE12XeKznvvQH4E/CmiV7LmUqHw42RZ565p+eBBx6KbNt2bzocnvDnCkQzn+s6IAG8V0QE+DnwmDFmuTHmAuCNwKIiHE8ppdQsYE/3CSillMINrPb818M88M+rSEbBG4RX3XEpa157FYHyY0U6ysuBg8aYowXWvQzYBfwQNxB6tNAOjDG/F5FvAe8B/hH4BPAyY0xPZn03cE/OW94EfAT4vogsNMacLNK1jEk6HG4MP/jgw6dv/ewqE4shgQB1t9x8adkrX3mVp6ysWJ/rVmADcCWQMMZ8M7si81l/vUjHUUopNcNpyZVSSs0Ezbtu7Q+sAJJReOCfV9G869YiHuWNwA+GWfemzLqfAdeJiHeE/TwLnCsiZUCZMeZgoY1EZDFQZ4z5M/Aj4MYzPvMzFN+379ZsYAVgYjFO3/rZVfF9+4ryuYqIDVwL7ATW4n42SimlzlIaXCml1EwQPt3QH1hlJaNuehGIiA94DfDjYda9Cvh5pgTqKeCVI+0uZ2pG2O6NuEEVwH1MQ9XAVEtLQzawyjKxGKmW1ol+rkER2QE8AxwDvjN4AxG5M9MG7ekJHksppdQsodUClVJqJiirP4U3SF6A5Q1CWV1TkY5wLfCsMaY5U6L0y0z6N4EmoALY6TYbIoTbNuvXw+xrE7DHGNMjIn0istwYc6jAdm8CakXkLZnlBhFZZYzZX6RrGpVdW3tKAgFyAywJBLBrqif6uUYz7dgG9iuyG/jr7LIx5n0isgA3AFNKKXUW0JIrpZSaCWrX3syr7tiPN+guu22u9lO77pYiHSFb7Q9jzPFsJxeZ9kFvAv6HMWapMWYpsAx4ZbYHvFwicgVue6tvZ5I+D9wpIuWZ9eUi8h4ROQcoMcYszNnv53FLs6aMf/Xqm+tuuXm/BALu+bttrvb7zzmnWJ9rrt8BARH5h5y0IZ+hUkqpuUuMGalGh1JKqSkT62mkedethE83UFbXRO26W4rRmUUmSDoOLM90ODF43QlgabZTikz6/bidWwSBO4CTuIHCYeAzxpgnMtsJ8M/A3wHJzOvLwEogYIz5eM4+NwD3GWPOm+g1jUc6HG6M79t3a6qltcGuqW7yn3POLRPtzEJEeo0xpQXS64GvApcArUAf8E1jzA8ncjyllFKzgwZXSimllFJKKVUEWi1QKaWUUkoppYpAgyullFJKKaWUKgINrpRSSimllFKqCDS4UkoppZRSSqki0OBKKaWUUkoppYpAgyullFJKKaWUKgINrpRSSimllFKqCDS4UkoppZRSSqki0OBKKaWUUkoppYpAgyullFJKKaWUKgINrpRSSimllFKqCP4/TwLWrAvIo1wAAAAASUVORK5CYII=\n", + "image/png": "iVBORw0KGgoAAAANSUhEUgAAA1cAAAHsCAYAAAA+UFdvAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAADJoUlEQVR4nOzdd5wkdZ3/8den88SNM5uXzSy7RFlAQRQEBJVkBu8UI+hxJkwYfsbjznDq6SkemMAIqKiAgCJIkJxhFzYnNs5snNixvr8/qnqmZ6YnbvfMzuz7+Xj0o2JXfau7v9X1qW8oc84hIiIiIiIiByY00gkQEREREREZCxRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5ERERERERKQMGViIiIiIhICSi4GkXM7DQzO7lE26o2s2vMbJ2ZrTCz+83spCFu614zWzaI9eeY2fIh7ut8M7tyKO89EGZ2oZktKZge1DH3sd3bzWz8ANd9a/BdeaXY91imvHLI55VvmdlKM3vOzP440PcdapRPDvl88rUgjzxjZn8zs+kHuv+xSPnk0M4nBe/5pJk5M5vc37oKrobIzCIjsNvTgJJkcOAnwB5goXNuKfBuoN8fzEhzzt3inPv6COz6QmBJfysNlnPu9c65fQNcfTnwJuD+UqejnJRXRsYhnlfuAo50zh0NrAY+W+r0lJryycg4xPPJt5xzRzvnjgVuA75Y6vSUmvLJyDjE8wlmNgs4C9g80B0c9C9gDrAS/0e5HPg1cCbwILAGODFYrwr4GfA48DRwQcH7HwCeCl4nB/On4V+oPhNs99RgfkvBvt8CXBeMXwd8B/gH8G1gPnAn8GSw/cUF6/0oWG898OogXS/mtxWs91rg4SBNvwOqg/kbga8E858HFgfHsAPYGqT31AP4POcDG4BwL8v/FXgs2M81+fWAluC4nwLuBuqC+fcC3wjes7rgc+ztc58DLA/Gw8C3gu/sOeCyYP4VwM+C8aOC76cS/0T0g4LP+fvAQ8Hn/JYix1IF/AV4NtjG24EzgD8WrHMWcHPBMV4VrP8IMAX/pLon+MyeCT6/3o65t+Pp7be2Ef/E2iOdfXx/9wLLlFeUV5RX+s4rwfveCPxa+UT5BOWTvr7DzwI/Uj5RPkH5pNh383vgmPz7+v2uh/ojGc5X8IPIBl90CD9D/Qww4ALgT8F6/wn8azA+Pvjgq4IfRiKYvxB4Ihj/BPD5gi+mZgAZ/DY6f/B34999ADgJuKdgvRsK0tfULe3HBl/q/UBV8J7PAF8s+NI/HIz/G/CTYPzLwCd7+YxOD3483V8PFVn3fAp+4N2WHQHcCkSD6auBdwXjDviXYPyLdGa0e4FvB+OvB/4ejPf2uc+hM4NfCnwhGI8DTwBzg8/qfvwLoyeAU4J13k3XDP67YN0lwNoix/Nm4McF0+OC72UlnSeo3wDnFRxjfvybBWm7joITSB/H3Nvx9PZb24j/W+iRzj7yw730HVwpryivgPJKfvmtBL915RPlE5RPuh/PVcBL+BeWdconyiconxT73r5X+L5i32HhaySKV4dqg3PueQAzWwHc7ZxzZvY8/g8G/LsR55vZJ4PpBDAb2Ab8wMyOBXLAomD548DPzCyKf5J4ZgDp+J1zLmdm1fhR9e/MLL8sXrDerQXp29kt7XOAmfg/ygeD98fw76Tk3RwMn8SvCtYn59w/8E8cB+oM4Hjg8SBdFUBDsMwDbgzGf1WQRuia3jnBeJTin3uh1wJHm9lbgulx+CfNDWb2bvw7ENc45x7sJb1/cs55wAtmNqXI8ueB/zazbwC3OeceADCzXwL/amY/B14BvCtYP41/Es8fy1m97Le3Yy56PPT/WyuaziFSXumD8sqhk1fM7PP4F4e/LrJY+aQPyieHRj5xzn0e+LyZfRb4d+BL3VZRPumD8snYzidmVgl8Ptj+gI2m4CpVMO4VTHt0HocBb3bOrSp8o5l9GdiJX6QXApIAzrn7zexVwBuAX5rZt5xzv8CPoPMS3dLRGgxDwD7n11XuK72FaS1Mbw64yzl3cT/vzzGA78nMTge+W2RRm3Oue13hFcAxZhYKMkeXTQHXO+cG0kah8HMqlt6PU+RzL7K/Dzvn/lpk2UL8ouK+GtkWfrbWfaFzbrWZHY9/h+O/zOxvzrmvAj/Hv0uUxD9pZ4O3ZFxwe4L+P/tix9zr8fTyW+svnUOhvNIH5ZWObXVN4BjLK2Z2CXAucEZBOoulCZRPelA+6dhW1wSOsXxS4Df41aO6B1fKJ31QPunYVtcEjp18Mh+/BOzZIOidCTxlZic653b0lsCx1qHFX4EPW/AJmNlxwfxxwPbgx/xO/KJBzOwwoME592Pgp8DLgvV3mtkRZhbCLxrtwTnXBGwws7cG2zIzO2YQaX0EOMXMFgTvrzSzYncXCjUDNb2k5x/OuWOLvHo0wnTOrcMvMv1KwWe10MwuwC9uf4uZ1QfzJwafE/i/l/xdgXcA/+wnvUU/927+CnwouKuAmS0ysyozGwd8D3gVMKngbsSgmN/7UZtz7lfAfxN8x865bfh31b6AX+zcn14/+256O57efmt9prOMlFeUV7oYS3nFzM7Br+5zvnOubQBp6SuNyifKJx3GWD5ZWDB5Pn6VraFQPlE+6WKs5BPn3PPOuXrn3Bzn3BxgC/CyvgIrGF0lVwPxNeB/gOeCH+5G/DuXVwN/CDLjP+i8A3Ia8Ckzy+BH6fniySvxiyfz9ZCre9nfvwA/MrMv4BfD3oDfKK5fzrlG84tef2tm+SLtL+DXVe7NrcDvg4z4YXdgVcfej99Acq2ZtQG7gU85514IjudvwQkuA1wObML/3Jaa2ZPAfvwGin3p7XMv9BP8Yt2ngu+sEb93mO8CVwd3Fd4H/MPMhtJL3lHAt8zMC47lQwXLfo1f9/eFAWznBuDHZvYROk9yxfR2PKdR/Lc2kHQCYGZvBP4XqAP+YmbPOOfOHkDai1FeGTjllVGWV4Af4FcVuiu4hnnEOffBAaS9O+WTgVM+GX355Otmdjh+qc4mYCh5BJRPBkP5ZPTlk0EzV7S2hEhPZtbinOvtZDfqmNkPgKedcz8d6bTI2KK8ItI/5ROR/imfjD4KrmTAxlIGD+4AtQJnOedS/a0vMhjKKyL9Uz4R6Z/yyeij4EpERERERKQExlqHFiIiIiIiIiNCwZWIiIiIiEgJjOrg6pxzznH4/f3rpdeh8Boy5RW9DrHXkCif6HWIvYZE+USvQ+w1aKM6uNq1a9dIJ0FkVFBeEemf8olI/5RPRPo2qoMrERERERGRg4WCKxERERERkRJQcCUiIiIiIlICZQuuzOxnZtZgZsuLLPukmTkzm1ww77NmttbMVpnZ2eVKl4iIiIiISDmUs+TqOuCc7jPNbBZwFrC5YN4S4CJgafCeq80sXMa0iYiIiIiIlFTZgivn3P3AniKLvgt8mq7dG14A3OCcSznnNgBrgRPLlTYREREREZFSG9Y2V2Z2PrDVOfdst0UzgJcKprcE84pt41Ize8LMnmhsbCxTSkVGP+UVkf4pn4j0T/lEZOCGLbgys0rg88AXiy0uMq/og7ucc9c655Y555bV1dWVMokiY4ryikj/lE9E+qd8IjJwkWHc13xgLvCsmQHMBJ4ysxPxS6pmFaw7E9g2jGkTERERERE5IMNWcuWce945V++cm+Ocm4MfUL3MObcDuAW4yMziZjYXWAg8NlxpExEREREROVDl7Ir9t8DDwOFmtsXM3tfbus65FcBNwAvAncDlzrlcudImIiIiIiJSamWrFuicu7if5XO6TV8FXFWu9IiIiIiIiJTTsPYWKCIiIiIiMlYpuBIRERERESkBBVciIiIiIiIloOBKRERERESkBBRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5ERERERERKQMGViIiIiIhICSi4EhERERERKQEFVyIiIiIiIiWg4EpERERERKQEFFyJiIiIiIiUQNmCKzP7mZk1mNnygnnfMrOVZvacmf3RzMYXLPusma01s1Vmdna50iUiIiIiIlIO5Sy5ug44p9u8u4AjnXNHA6uBzwKY2RLgImBp8J6rzSxcxrSJiIiIiIiUVNmCK+fc/cCebvP+5pzLBpOPADOD8QuAG5xzKefcBmAtcGK50iYiIiIiIlJqI9nm6r3AHcH4DOClgmVbgnk9mNmlZvaEmT3R2NhY5iSKjF7KKyL9Uz4R6Z/yicjAjUhwZWafB7LAr/Oziqzmir3XOXetc26Zc25ZXV1duZIoMuopr4j0T/lEpH/KJyIDFxnuHZrZJcC5wBnOuXwAtQWYVbDaTGDbcKdNRERERERkqIa15MrMzgE+A5zvnGsrWHQLcJGZxc1sLrAQeGw40yYiIiIiInIgylZyZWa/BU4DJpvZFuBL+L0DxoG7zAzgEefcB51zK8zsJuAF/OqClzvncuVKm4iIiIiISKmVLbhyzl1cZPZP+1j/KuCqcqVHRERERESknEayt0AREREREZExQ8GViIiIiIhICSi4EhERERERKQEFVyIiIiIiIiWg4EpERERERKQEFFyJiIiIiIiUgIIrERERERGRElBwJSIiIiIiUgIKrkREREREREpAwZWIiIiIiEgJKLgSEREREREpAQVXIiIiIiIiJaDgSkREREREpATKFlyZ2c/MrMHMlhfMm2hmd5nZmmA4oWDZZ81srZmtMrOzy5UuERERERGRcihnydV1wDnd5l0J3O2cWwjcHUxjZkuAi4ClwXuuNrNwGdMmIiIiIiJSUmULrpxz9wN7us2+ALg+GL8euLBg/g3OuZRzbgOwFjixXGkTEREREREpteFuczXFObcdIBjWB/NnAC8VrLclmNeDmV1qZk+Y2RONjY1lTazIaKa8ItI/5ROR/imfiAzcwdKhhRWZ54qt6Jy71jm3zDm3rK6urszJEhm9lFdE+qd8ItI/5RORgRvu4GqnmU0DCIYNwfwtwKyC9WYC24Y5bSIiIiIiIkM23MHVLcAlwfglwJ8L5l9kZnEzmwssBB4b5rSJiIiIiIgMWaRcGzaz3wKnAZPNbAvwJeDrwE1m9j5gM/BWAOfcCjO7CXgByAKXO+dy5UqbiIiIiIhIqZUtuHLOXdzLojN6Wf8q4KpypUdERERERKScDpYOLUREREREREY1BVciIiIiIiIloOBKRERERESkBBRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5ERERERERKQMGViIiIiIhICSi4EhERERERKQEFVyIiIiIiIiWg4EpERERERKQEFFyJiIiIiIiUgIIrERERERGREhiR4MrMPm5mK8xsuZn91swSZjbRzO4yszXBcMJIpE1ERERERGQohj24MrMZwEeAZc65I4EwcBFwJXC3c24hcHcwLSIiIiIiMiqMVLXACFBhZhGgEtgGXABcHyy/HrhwZJImIiIiIiIyeP0GV2Y2xcx+amZ3BNNLzOx9Q92hc24r8N/AZmA7sN859zdginNue7DOdqC+l/RcamZPmNkTjY2NQ02GyJinvCLSP+UTkf4pn4gM3EBKrq4D/gpMD6ZXAx8b6g6DtlQXAHODbVaZ2b8O9P3OuWudc8ucc8vq6uqGmgyRMU95RaR/yici/VM+ERm4gQRXk51zNwEegHMuC+QOYJ9nAhucc43OuQxwM3AysNPMpgEEw4YD2IeIiIiIiMiwGkhw1WpmkwAHYGYvB/YfwD43Ay83s0ozM+AM4EXgFuCSYJ1LgD8fwD5ERERERESGVWQA61yBH/jMN7MHgTrgLUPdoXPuUTP7PfAUkAWeBq4FqoGbgvZcm4G3DnUfIiIiIiIiw63f4Mo595SZvRo4HDBgVVCdb8icc18CvtRtdgq/FEtERERERGTU6Te4MrN3dZv1MjPDOfeLMqVJRERERERk1BlItcATCsYT+KVLTwEKrkRERERERAIDqRb44cJpMxsH/LJsKRIRERERERmFBtJbYHdtwMJSJ0RERERERGQ0G0ibq1sJumHHD8aWADeVM1EiIiIiIiKjzUDaXP13wXgW2OSc21Km9IiIiIiIiIxKA2lzdd9wJERERERERGQ06zW4MrNmOqsDdlkEOOdcbdlSJSIiIiIiMsr0Glw552qGMyEiIiIiIiKj2UDaXAFgZvX4z7kCwDm3uSwpEhERERERGYX67YrdzM43szXABuA+YCNwR5nTJSIiIiIiMqoM5DlXXwNeDqx2zs0FzgAeLGuqRERERERERpmBBFcZ59xuIGRmIefcP4BjD2SnZjbezH5vZivN7EUze4WZTTSzu8xsTTCccCD7EBEREZFh4nmwaw1seMAfet5Ip0hkRAwkuNpnZtXAA8Cvzex7+M+7OhDfA+50zi0GjgFeBK4E7nbOLQTuDqZFRERE5GDmebDyVrjmVLj+XH+48lYFWHJIGkhwdT8wHvgocCewDjhvqDs0s1rgVcBPAZxzaefcPuAC4PpgteuBC4e6DxEREREZJnvWwR8vg0y7P51p96f3rBvZdImMgIEEVwb8FbgXqAZuDKoJDtU8oBH4uZk9bWY/MbMqYIpzbjtAMKwvmhizS83sCTN7orGx8QCSITK2Ka+I9E/5RKR//eaT5h2dgVVeph1adgxPAkUOIv0GV865rzjnlgKXA9OB+8zs7wewzwjwMuBHzrnjgFYGUQXQOXetc26Zc25ZXV3dASRDZGxTXhHpn/KJSP/6zSc1UyFa0XP+83+AVIvaYskhZcDPuQIagB3AbnopVRqgLcAW59yjwfTv8YOrnWY2zTm33cymBfsTERERkYPZxPnwxms6qwZGEjBzGTz5c7/tVbIJcmk/AHvjNbD4PAgNpPKUyOgzkOdcfcjM7sXvZGIy8AHn3NFD3aFzbgfwkpkdHsw6A3gBuAW4JJh3CfDnoe5DRERERIZJKOQHTJc9AO++DT74T3jXrX4g1brbD6xAbbHkkDCQkqvDgI85554p4X4/jN/zYAxYD7wHP9C7yczeB2wG3lrC/YmIiIhIuYRCMHmh/8qrnQG4rutl2qFpa9f1RMaQfoMr51zJu0QPArVlRRadUep9iYiIiMgIyLfF6t7Zxe2fgguuhorxfmcYNVP9qoWqKihjwGDaXImIiIiIDEyxtlgnfgCe/x389Cw/mPJyaoslw8vz/KqpZQrsFVyJiIiISOl1tMVa4nfLXh1cyB75ZvjJGX5gBX7g9Yf3+222Ji8q64WvHOLyD7y++VLIJv2A/03XljSwV3AlIiIiIuVRrC1WqqUzsMrLpeH6N8DsV8Cav0E2pRKtQ8VQS5Kcg3QLtO+F9n2Q3Fdk2G1ZayPsf6lzG9mkX7J62ZKStQNUcCUiIiIiw6dYW6xwDCbOgxdv7ZyXaYebPwAffFAdYIxVuRws/z3c+mE/oA7H4KQPwqSFkNrfe5CU3AfJ/eBle9+2hf12fYnx/rBiAsSquwZX0PnAawVXIiIiIjLqdG+LlS+hqpgI15/bdd1sCn75Rjj67XDEeTDtGDDzl5W57cxBYbiPcaj7yyT9ACgf/AxkPLkP2vd0LcXMpeGh73dOW6gzOMoPxx/mB0qF87oP84FU/reSt2sNXHNq18A+WuFXWS0RBVciIiIiMnx6a4u1Z13PEq1QFKqnwD+/Aw/8N4yb7QdZi98ALQ3w5w91DdDKWYVwJAKdlbf2DEJLdYzO+cFMNukHsek2WH0n/P2LnaVIy94LE+b6pUTFSpDywVI22ceODBK1fsCTD37GzfTHU81+yVV3b/4pLHwtxGt6BkgHorfAfuL8ku1CwZWIiIiIDK9ibbF6u/BdfJ5/Eb/qdr/a4OM/hkd+2HV7mXb4w/vgtVfBhDl+YBCOQSQO4SiEg2Ek3rksvzwU7j+9pQh0nPOrseXSwSsTvNKdQ69g3p4N8Jcruj6E+ffvg1M+4gcd2VRnYNTnsI9lfcml4dH/65yOVXcNkCYv6FpS1Nt4vLb3z3jXGlj1l54lSdOO8QOyUustsC9hkGzOuf7XOkgtW7bMPfHEEyOdDJHhMuRbN8orcogZUl5RPpFDzMGZT/KlQ31d+Cab/Kpj93+rNPu0UBB8xSAS6xZ8BUPnwfZn/WHh+6YdC6FIEBgNIHAqtXDM7/EuEj/w4d7N8ND3eu7jol/DwrP94LTUyl06d+AGnU9UciUiIiIiB4diJVrdJWr9NlgP/6BriUckDm/5uV9lL5uGXMoPbLKpgqAnHUxn+lieHy9Y3trYNbACfzqXhsQ4CI8PArKoPwxFO8fD3ce7Ly+yTigaVHu83E9HxzEm4N23w5QlfkBYygBk1xp4/NqepUiTDy9PYAXDUpI03BRciYiIiMjo0lsVwkWvK8+FeW8dIbz1uvL1ZOh5fslZ92Ocflx5jnEY2iMVNZCAehRRcCUiIiIio8twl3iMROAx3Mc4BkuRRoKCKxEREREZfYazxGOkAo/hLtUZY6VII0HBlYiIiIhIfxR4yACMWDmfmYXN7Gkzuy2Ynmhmd5nZmmA4YaTSJiIi0sHz/PYWGx7wh57X/3tEROSQNJKVKD8KvFgwfSVwt3NuIXB3MC0iIjJy8t0EX3MqXH+uP1x5qwIsEREpakSCKzObCbwB+EnB7AuA64Px64ELhzlZIiIiXe1Z19mAHfzhHy/z54uIiHQzUiVX/wN8Gii89TfFObcdIBjWF3ujmV1qZk+Y2RONjY1lT6jIaKW8ItK/fvNJ846uXS+DP92yY3gSKHIQ0P+JyMANe3BlZucCDc65J4fyfufctc65Zc65ZXV1dSVOncjYobwi0r9+80nNVL/L5e5eehxyObXFkkOC/k9EBm4kegs8BTjfzF4PJIBaM/sVsNPMpjnntpvZNKBhBNImIiLSqfuzbSJxGD8H7v4KrPgj7FoF2VTnM28Wn6dnwoiIHMKG/R/AOfdZ59xM59wc4CLgHufcvwK3AJcEq10C/Hm40yYiItJFx7NtHoB33wYffBA+9BCc+knY8ZwfWIHaYsnBQT1bioy4g+n22teBs8xsDXBWMC0iIjKy8s+2mXOqPwxHYN5pPdfLtEPTVl3gyshQz5YiB4URfYiwc+5e4N5gfDdwxkimR0REZEDybbG6d3Zxy4fh8NfDk9dBNqnqgoc6z/NLM5t3+L+ZifNL9ztwDtKtkGqCVDPsXOGXnubS/vJ8aeplS/TQW5FhNKLBlYiIyKjUoy1WAk66DFb+BR79v871Mu1w86V+VULnleciWwamnIFOb/tbeWvnb6Qw0PayQVDUBMkgOMoHSckmSO0vGO++rKlz2vVTKpXv2VLBlciwUXAlIiIyWB1tsZb4F6/VwcX6/DPgF+d3XTeXhps/4LfRymX8QOxN16o0azj1Fej09R04B5k2SLdBpjUYtkG6pWC8tfi8lp2w9u+dAVCmHW56F4TjkEv1n+ZwHOI1kKj1h/FamDi3c7z7slQz3PHpzpIr8I+zeuqBfXYiMigKrkRERIYi3xarsFSgdnrP6oL1S2BrwdNHskn43bvhuHfC/NNh2rEwYQ6Yda4zEqUsw7m/Uu+zIwhqDYKcVki1dE7vWQ//+E/wMv76mXb43XtgwZkQChcESK0F40GghBt4OkIRiFZBrBIsVLxk6Yhzof4IiI/rGSDFayARzI/EB/cZeB5UTuwZQE6cP7jtiMgBUXAlIiJSKt2rC0Yr4NRPwO/f03U958Ezv4anrvenE+Nh+rF+oDXtGGjbDX/7wvC02xpqqc5gOOdXhcul/R4WM0lYfTv89XP+dDgGJ38YphzZGeDkg6Si083dlrUyqCAIwOX80sTKyX4wFKuG6ikQq4JoZcEwWJYfj1b5yzrG8+tWQSTWuf1da/xOJQoD7WgFnPbZ8lTT6600VaWjIsNKwZWIiEipFLvAda5naVa0At5/tx9YbH8Gtj3jDx/+YWfpSl6mHW66BOoO9y/iQ5HgFQ6G0W7TBcvD0SLr598TTLfv7brfTDv8/r1wwvv9oCKX7gyKCof9zculIZv2q8BlU/QZ/OTS8MC3i3yeET8NseogoAletTMLpoNl8equ04XjrY3wm7f7wWrhd3DJreVrj1Qs0C53SVKx0lQRGVYKrkREREqp+wWu5xW/yK47wl93xss635tNwdO/hr98vNtGXWeVMS8LuawfuHht/rSXC4a9vQqW5zL0W8rjZf2OOSzkt/2JxPzSpY7xbvMStQNbLz9v32Z45Ic993vh1TDnVZ2BUWFJ0IHwPL+d23AHOipJEjnkKLgSEREpp8FcZEfiMPfU4iVdF/6odCUSntcZbO1aBT87p2upTiQBl97rtw0qh11r4Mmf9TzGmSfC+Fml399IBToqSRI55Oj2iYiISLl1fxBxXxf1+epk0Qp/uhylLKGQXyoUq4Spx/ilOoX7e9O1MPnw0u2vu+E4xu4G8x2IiAyRSq5EREQOJsNdyjISpTqqMiciY5SCKxERkYPNcFcnG4nqa6oyJyJjkIIrkQLO80hv2kS2oYFIfT2xww7DynwndST2KSIiIiKlp+BKJOA8j+a77mLbZ67EJZNYIsH0b3ydmrPOKmmw4zwPl07jkklyySQtd9/Nzm98E9Lpsu1TRERERMpPwZUc1MpdquM8D5dM4rW1kVy1mq2f+jSk0/6yZJKtn/wUdR/5COHaWlwqhUun8FIpXLJgPJXGpfLj/stLF85Pdoy7VAqXyfSenmSSbZ+5krmLFhGfO7dkxyky2qmEV0RERoNhD67MbBbwC2Aq4AHXOue+Z2YTgRuBOcBG4G3Oub1D3Y/nOTbubmVnU5IptQnmTKoiFLIDP4BD2HBf3HQvSSIeZ+oX/x+VJ5yAa0/itbXi2tvx2tqCV+F4G157G67XZf60a2vrOxGZDI3fLvJgy2iUUCyGxeNYIk4oFvfH43FCsRjh6hpscoJQPIZ1LIsRisexeKJjPL1tG3uvu77rcSeTZBsbhyW48nI5WrevJte0nXDtNKqmLSIUDpd9vyKDMVylyr3R/4lI/5RPRHwjUXKVBT7hnHvKzGqAJ83sLuDdwN3Oua+b2ZXAlcBnhrIDz3PcuWIHV9z0DMmMRyIa4jtvO5Zzlk5VRh+ioV7cuFwOr7UVr6WFXEsLXsHLn/aXea3dpltayO7dS2bz5s6NpVLs+PwXBpReSyQIVVYSqqjwh5WVWGUF0YkTO6Y7llVVYhUVeK1tNH7/+1BYshSLMetHPyK+YH4QGMWxWAwrUQCS2rCBfTfc6AePBWmP1NWVZPt98XI52p/7EzW3X97xUM3W1/+QiqMvVIAl/SrnzRbnnF9ttrkZr6WV5OrVbPvUpzry5nCW8Or/RKR/yicinYY9uHLObQe2B+PNZvYiMAO4ADgtWO164F6GGFxt3N3akcEBkhmPK256hsUfOZV5ddUHdgCHIJfJ0Pb0Mz2rzF3xCWrf8AYsFCoaHOVaW/svGQIwI1RVRai6mlB1FeGqakLV1URi0a7BVWDiBz5AxdKlhKoquwRKVllJqLKKUEViSMGP8zxis2f1CCCrXvHyst0djx12GNO/8fUe+4wddlhZ9leodftqam6/nOeTU8hZiGMz66m6/XKa65ZQM/1w2LMOmndAjbpIlq76utniMhn/HNDcTK7jfNBccH5o7ry50tzS48ZLfpxcru80DFMJr/5PZDQZqeqzyicinUa0zZWZzQGOAx4FpgSBF8657WZW38t7LgUuBZg9e3bR7e5sSnZk8LxkxqOhOTmmMvmBnkSd55Hbs4dsQwOZhgayOxvINnS+Mo0NZBsaye3eDc713EAuR/Pf/054/LiOgCg8fjyxWTMJBdOh6irC1cF4fp3qfCAVvCori6Y7tWEDG974ph6lOuPf9MayXFBZKETNWWcxd9Eiso2NROrqyv7HVM599pdXck3bIdNO1sIcF1oHQDadInb/VVC/EB65GrLJzod7Lj5PAdZBqpQXVC6dJtfU5L/278frGG8i17Qfb38T6W1babn7HvD886xLJtn60Y9BJALZbL/7sFiMUE1NcH6oIVRdTXTmzM5zRXU14ZrO84bX2sqO//zPjps7EJTwTp48pGPskpZ+8smh8n8io185q88qn4gM3IgFV2ZWDfwB+JhzrslsYMXGzrlrgWsBli1bVuSKH6bUJkhEQ10yuhkk096YqRPc10kUM3L79pFtaOwMlhobOoOo/Pxdu3peCJkRnjSJSH0d0bp6KpYeSaS+HkIhdv3f/3WtMhePM/cPvy/bneORKNWxUIj43LnD2plEufbZX14J106DaAVHpddzQ/bVbHDTeXX4WU5a+1dYfWvnipl2+ONl8MEjwXkqzTrIFDsXTPuPr1F5wgl+6VFhkLQ/CJSCICkfRHUEUE1NuPb2PvdnlZWEEomOwKpQ7TlnE1+4iFBNdddAKT9eU+OXUkfCkGqCVDMkg2HH9P5gfFvHMpfaTs2/hMhu30Vyb5gdz05j+mcuJVZb9C9gcJ9fP/mk2P9JLGLU1yQOeN8y9pW6JMllsx1thvOvfNvj1MZNNHzzmx3/66WsPjuUfGIUPU2IjHkjElyZWRQ/sPq1c+7mYPZOM5sWlFpNAxqGuv05k6r4ztuO7SiijoaNWDjEZb96kguOnc6fn9lKKutGdZ3g5MqVPavpfezjROrrye3diyu4w5sXHjeOSH09kfp64vPnB+N1ROrriQbzI5MnY9Foj/c6zyO+YP6wBzrDXZJ0KKmatojW1/+Qqtsv56LMfawKLeDj8S+zbm+WD4dv5v2RO0hYEEx7Odyj12BPXa/SrAE4kAsq53l+O8XmZnLNLXjNTUHboxY/EGpuIdfcFFSpayazs4H2p57qKF12ySTbPvmpPvcRqqoiNK6WcO04wrW1xOYcRqg2mB5X22U8XFNDqGDczCO1ejlbL7sE85KEox6hqCNcGabutHFEqvdAcqMfIO1qgq3dAqhkE2Ra+/8gLAzxGkjUYhYinN6GzZ5FaP5U5r7xlcTW/S/WciRMnj+gz3Wouv+fAEyuijNFwdWoM5xV5lw6Ta61laa//pWd//lf/n91NMqk97yb+OGH+73UtnZ2ruS1B4FSvvOlXuYX+2/vMx3DVH22ez6JhY1wOMRHb3yGn19yApXx8Ki/qS0yUOaKVfcq5w79IqrrgT3OuY8VzP8WsLugQ4uJzrlP97WtZcuWuSeeeKLosnwJVUNzkvqaBJXRMB+58Rke27Cny3qJaIjbD/I6wV4qRWrlStqfX05y+XKSK5aTWruuaFW9ypNPpmLJER1BVMerro5QPH5A6ej4Y1KgM1KG/G/UW17p3ltgrH4B//uXx7nm0UbG0cJ3oj/iVeHnITEekvu6vjlaAZc94JdgqX1WB+d57L/1Vrb/vy92XFBN+Jd3EJ8zB6+11Q+UmprJtTR3CZQ6A6aW4tVwC1gs5gdA1dVgRnrDhh7rTLjkXVQec0xnYFRb65cixRyWa/NLiJJNnSVFHdP7uk13W55L9f8hRKsgUQvx2o4AiXhNMF3bbbqmYN2CZdFKv8oBwK41cM2pfilqxz6C39/khUU/ov4T2VOv+aTg/2TT7jY+84fnueiEWXz9zUcPZTcSGNZgp1gJ79f/i+rTTsO1t3f2PNveHgQ9PUuGuvQ621swFIzTxyM3egiHu3SyZJVBZ0sV3TpfqgzaFufnd6znD7N79rDlYx/vUX127h9v7i24Kls+qa9JkM56vOe6x9nbmibnHJnc6L6pLYesQf9QRyK4eiXwAPA8flfsAJ/Db3d1EzAb2Ay81Tm3p+hGAn0FV8U8tLaRd/zksR7zb7j0JF4+78Dr7peCS6dJrllDcvkKksuX0758Oak1azqK+cMTJ5I46kiiM2ey76bfdTmB93MSldGv5MFVMU9u3MWe5X/n2w/tY6U3i/dH/8qHzz+FcX+5tOfKSy7wg6lDpH2Wc86vcrtjB5kdO8jubCCz0x9md+wgs3Mnme3b++7IJRQiVFPjlwjV1PhV5oJAKVRbG7Q1qiFcW0MoaI8UrkoQihvheIhQDEKk/ZKgdCuZTSvZfe3/EXJpQlFHKOoRrghRfdLRhCOua4CUaur/IKOVQZAzzg90EuN6Trc04p69gey0M8hmKwlXholuuR07/3uw8LUQKnFvk54HK2/1q6cGPVv28zsr6UVjd9+8cyVX37uO7110LBccO2MouzrkDbZ9kHPOf25gPoBpbfWDoLY2vLbWrvPbCh7D0erPy+7ZQ3L58n5vXPQpEunsRKlYMNQt8Mk0NrLv17/psZlp//WfVJ10ElZRQaiqCotGGWjTiL4Moc1VWfMJwKPrd3PRtY9Q+KmPhpvaMrYN8sbOoPPJSPQW+E96T+gZ5dz31HEVPeoER0LGpKoDK9EZKpfNklq/nuTzfmlU+/IVpFau7Cj2D40bR8XSpVS/970kjjqSiiOPJDJ1KmaG8zyqTjxxRHqZk7FtQlWCT75Yx2Wn1vP3dS38ZMvZ3PX3EL8Iz+awXEHvjRaCVXd2LcnItMPv3wdv+A4seA3UzugsfcjzvGEt6XLZLOm1K8ju3ElkylRiC5ZgkZ6nPpfNkt21KwiSGsju3EFmx06yO3d2BlA7d/aslhMKEZk8mcjUqcTnzSM2dw6t99yFRRyh/CvqqLv0EioXz8EshWXaINUC6VZI54eNndNtrbC3YLnrvee8KDD1mOAYPPCyIaxqPJZsgNppMHFu8QCpx3QwHu5ZLbiHXWuwp64juuH3dKwdrYBJC0ofWIH/+1h8Hly2BFp2QPXIlpBecdYiHtuwh8/d/DzjK6LEIqFRX92pXKVILpcLqrg2B9Va/WFq/QZ2/eAHXdoHbf34FVQuOx4cPYIlr61t4A14zDqDnaoqQpWVuFyuaGA17i1vIbFoYecjOyoq/F5ni5QMWSw2qGNPbdjA/j/c3KNTpopjjyU6ffqgtjUQB2NVes85un/q6uhCuhuuUmznHF5bG0133MGOr37NL+WNx5nxzW+U9LmJw15yVUqDLbnq/hyGkIHn4JT5k7jitYtIZ70h/0H298Nwnkd64yaSK/yqfe3PLyf54osdjcdDVVUkli4lceSRVBzpD6OzZvV5N0vV9A45w1Jy1T2fRMNGNBzCvCz/FbmW87mv85lYNeMI/erNvW8sVu1X26pbDJMX+a+mrXDXF4elpMtlszTf8We2fuFrkEpBLMaEN59PZOpMso27/AAqKHXK7trV4+LNolEik8YRnVhNZFwFkXExotVhIlUQrcgRSaSIRNqwdPPgSof8rfufT6yq8xWv6TodK5yuhnh11+lYNbQ24m79KOnZbyabTBCpzBHb/HvsHTf2VmXuwA2+JGm4lf2O/JY9bZz9P/fTls7hYFRXd+qzgyTn/PZ+zc1BxyfNfhXWLsNgWXOz31lKwTyvdQDt6wrE5szxq7Hnn0FYWFJUlQ96qgrmdV9WiSUSPf47e+t9tpy1PUb64dcDUPZ8sr6xhdd//4EeHV1c/S8v4+ylU8dEB2NjzXB351+0yu5//SdVp5yCa0/i2tsKqt52a4vYUY23SBvF9q5Vdl2+ym6RuKfU1WcPqeAKutYJrquO88j6PXzplhVkPf9zGMofZPcfBvE4Uz7zacLjxpN8YYVfxW/FCr8tBf6XmDjiiI7SqMSRRxKbM+dgOdnKwWtYgivoWXd+x/4k77nuMVJZx6une5w5v4qfveC45eLp1Fx/ete2MJEEnPc9v9Rl12poXAmNq6F5W+87rJ7ivy8chVAUwpFgWGw64g/Dsc7xYJkjRHpPitSOFlLb95PcuIP2VVvIpazHxxeKh4nUhIlWQaQiRzSRJhJrJ5JI+YFTpUc45vUoeMPCRUp/xnVMu2QzqW172fvXR8m15XChOBPffgGVxx2DzXlFZ0AVqShNIDJSgU6+BPIgKEkqYlguGs/+n/vJ5Dr/Q0dLdSeXTpNtbCSz0y+ZbX/hBfb87Oc9ni1mlZX9P6vQrLOaa22+A5QawjW1ftXWbsNwrd9hSm7fPjZfepl/0yO/qTIGOyMV6BzkN0HLnk+K3ayrikdoSWZ5w9HTuHP59lHVwZjnPDY1baKxrZH6ynpm184mZOX9PodznwPNJy6Xw8sHPu3tnePJJF5bOy7Z3jHfaw+CoI7xpL8s2Y5raye7fx/pXvoRGCirqOhsm9ilum6VP10wL7d7t9+sppvZv7ieqhNPLLr5waZnRJ9zVVa9VD0KhYx5ddUdf35m5l8PBDdVkhmPj9/4NIs/+qoB/0GmN21i66c/0/knkUqx86tf87cfjRJfvJja886l4sijSBx5JPH584pWS5KDwDBXWRuxffajez7Z2ZQklfVPfPdtC3HfNj+Yer59Iq+48P+wP32w48LeXfh/2BHn9zyG5H547ndw+yd67nDa0VAxCbwM5DLgZf1hLu2Pp9uCZVnwMrhsmmxThuSuHKndOVJ7HKl9Rnp/CJfrPA9Gq7JUTM4QH5clVp0lWpkjFPWITq4hMnlKH1XlugZMXdYp7GihCNu1hvhv3s7E976PbHuESEXWL0ma/QGYOO8Av5kiRqrKXCjkl4yVq3TsILezKdklsILSVnca6t1jr7W1s1rrzp1kd+zs2i6woYHcrl0DSkP1K19JfOHCokFSx7C6ekjBgvM8ZnzzG8NWtX2kqsyNxOM9DiahkHHO0qks/sipHTfrJlTG+NiNz/DnZzpvuI2Ghw57zuPvm/7O5//5eZK5JIlwgqteeRVnHnZm2YIdz3k8sPl+dq9dzrhmj621YTbNX8qps181qH166XTHg9q91tbOB7a3tgXz/Pnprdtouu22jhst+Z6oo9OnBwGV3/nLYHuthCAASiQIVVT4gU8iCHoqKosGVuMvvojE4YcXVNcN2jRWVXYNmCoqBpWPUxs2sP+WW3uUYkfq6gZ9TL0Zm1f4g7iTu7MpSTrb9UtNZR03P7WFj5+5iE172notsna5HK0PP8LuH/+4y923vKlf/QrjL7xw0PW0pcBwBh7DVQKQy/rtlLIpyCRh9e3w18/50wdf9Sqg+DNMAC7/7bO84ah5HHvCb5li+9lt46kNLeY0jB6pT4yDea/2j7F7r29n/1fRi3TnHNnGRtJr15Jas4bkmjWk1qwhvXYdXmv+xBgmMmUK8SULqVq4kPjChcQXzCN+2Gwym1ex6b2X0r4rCc7IZQyLVzD3huuILD6mpJ9Rh4nzsTO/RPyPlxEv/B1NLGOX4Yd4oDMSessTv3pkM0umjWNXS2rI1Z1669mu8oQTyDU0dARN2YadPdoFes3NPbYXHjeOyJQpRKZOIbF0CZEpU4lMqSc6dSqR+il4qSSb3vmuHqVIdR//WNmCgpF6aPuhHOiMlO436wAue9Vc7lvd2GW9/M2JOZOqBlxd8EBKdZxztGZaaUo3+a9UU5/jje2NrN+3nphFCBMik8vwyfs+SSKSIGIRzIywhXsMQxYiZKGiy4xgnVCIEKEe63rtSWLbGqlatZWKthxVmRCJ6TNZU3UNE3Jx4imPeNIjlswSS+WItGeItKcJt6cJtacItSahPYll+n+4O2ZYItGjBBvniM6YQXTmTD84qqwIAqUKf7wjSEp0liAFr/y0xeO95u3equxOfNe7ypJXh+MZqmOzWmCxbnsjCfjgP3t0G72JqZz9vX/2eOCwc3DE1BpeX+843LWyr7KWyYcv4LTFU8hu3sS+P/6J/X/+M9kdOwhVV/v1OAt+kOq5rwRKHex4nt/OJ5v0t9d9uHst3PFpv7QkLxSBEy/z28LkUpBNdwZGuXTvwx7zCt7r+mmU3XsX08NWLbC77lU7EtEQl5+2gL+9sJPnt+7vsm6fVaM8D7fmb6RXPUu21YhUQezwo7GFr/Ubua9ZQyoIpFKr/UAqt79z++EJE4gvWkR8wQI/iFq0kPiCBYRra4um229zdSvb/t9XO0+iX/siNa87r7ylxwd3lblDwbBXd4pHjFMX1nH3ygYmVMZoTma6dD199hH1ZF/a3GdJVK6lhfTGTbQ9/jgN3/52z4e8d1fQmUp0Sn2PoCk6dQqR+npCFRV9biaXy9J4x63s+0JnPhn/H1+k7nXnEQ6XL5+MRBUr6aLs+aQ3xdpiAbzl+BksO2wiX751Rcd/TW/VBfMlSZ974HOkvBSxUIz3HvleFk5YSHO6ud+gqTndTK6PzoLCFqYmVkNtrJbaWC0GVO1LUfPUWiraclgkTPYVx5GbUcfkyjpyLofnvC6vnMth6SyRliTR1jTR1iSxtjTRljSxNv8VbcsQb80Qb8sQb8uSaMuQaMuRaM8SyfZ/jZ6MQnsM2uP5ofnDYF5bHJIxo63LOtAeMzLxMLmqOF5FHEskCDsjtHk7sYwjmoWI5wi7MJXHv4yq2klEQhEioQjRULRjmB8vnD+Q8fx7zRnNDz9I+/evJdKeIhKJM/lTn2DqmW8gEasgGop2BJul0L00cH9NiEkLjuyrNFBtrgDY8ABcf27P+XNfBRPmwHM3dpQSuAv/j4eiL6dx80omu73ssolUT1vEim1NXHvvGlKZHG/Y8DBv2PIE0195ItGN6/GefxZCIapOfSXj3/hGqk47jdb77juYG62WRjlLkZyDfA9qqWZIN0PDSrj1Iz2DnePfHZR+JCHbHgx7CZgy7Z3rDOT5PH0JRSES99v6dB8WmxeJQzgOkVi3YcHyfZv9bsy7e/dtMOfU7nNHLLiCnu2w5kyq4pH1u4o+3uCqC5fyjpMO63EydJ5H0x13sO2zn/N76QmHiS+YT27PXrKNnXcxQ9XVfvC00A+e4ov88cikSYNL8+BPoiWhi8YRNywXjcXyxG3PbeOKm54l6zmOqYETp1fxbLvxozltNH7uc/7d2ViMie98J+Hx48ls3kR6w0ZSmzaSa+y7ut74f3kHVSee5AdSU6f6D33v5SaBc46MlyGdS5P20qRzaTK5TMd44byXml/i/579P06tOJKKpCOVCHN/+3Ncfty/M7t2NrFwjFgoRjwcJxqOEg/HiYVi/vxwjEho8AHYSFWxUr7sYsSCq+43J2IR4/jZE3l0w26cg+PmxDhmbpqa2DhueSLFz959EnMnV7GtdRur96xmzb41PN3wNA9ufZCe/RF2ClvYD47itR1BUo/pXsarolVd/sN2vfAMjRe/u2tNpUiEqre+kVg0gbe/idz+/eSamvyOXfY3kWtqwhWp2VQoVBO0RSx4sHv+Ye6pfXto/cOferxn4rf+k8mvPgOrqCAbcqRyqc5XNtV1Ongls0nSuTTJXLdhwfydrTvJNjaSXbeBdMgjGzGyM+vJVcYJhyNkvSxZL0vGy/QY7ytQPVCGEQvHiIaiHeecWChGNOwHaPnxWChGJBwsC0U75uXfFw1Fac20cvOam8m6zptXiXCCm867ibnj1KHF4EquLAyVE6C1259X7XTcGV/BbvtIlzYj273FbHrv+/jr1GOoa9/HyduXk8hlaKubxox/uYhJb7yQ6JT6js0c5I1WD1yxUqQL/w8WnNnZXXSqqSA4Kjbd3PnqmC4Ipvor0SkUSfivaEUwrIRowu8kINp9WcEwWlGwTrdh6y740wf9wLtwP++/G+qXlKfkYXAPRx3R4KqY9Y0tXPn7p7jymBhrNu/mzt1x7tuSwnOweGoNb102iwuPmkLlxjW0PvYYLffeS9uTT3UciAekY0bo5S/DW7KA7JzpZA6bSnbyOLIuRy7/8vw7gvkTeLFxz3lkXbZzXZdlb3Ivt667tctJP2IR3rX0XcyonkFFpIJEJEEinKAiUtExXTg/EUkMrm77CFw0Sg/DctFYrF3UU5v2kPvn/fz5zw9yz9SjqW/fy8uT2zlp1UNMbdnVI2HhSZOIHXaY36nRrOk0Ta1mfXYnL976K7aPy5GMQSYM2VgYO+FYqIj7QVE/gVPWG0A1oBIJW7gj0CoMuroHYYVBWiqX4u7Nd/fImx84+gPMqJ5BPBKnIlxBPBInEU4QD8e7jCci/nCggd1I5cuDPKAbseAKIJvL8eKu9exsa2BKZT1HTJ7H7c9v55qHnmLFljTh+E4iNSuYXZ+ioqKFxtRmWjItHe+fXDGZ5lQzJ1YdwYxsDV5FnLtanuSjx3+Uk6efTG28lspIZb8lHi6d9h/D0dhIpqHBDy4KXw3+MLd7d6+dLoSqq4MAaRzhcV0DpHDhg9zz48E6oZoaLNz74yuSGzawsUiVuTk3/4HEvNK34d24fyP//vfLuWTca5nYYuypdly//2/875k/6C3w6JD/L84HXMUCsGLjL+x+ge8//f0e27vo8IuYVj2t43yXyWU6tlt4Dsx4/rkvm8v2mJc/L2a9bJdzZLGA/Gdn/4wTpp5Q7NAUXAG9VydLTIBfnNdjdReKkJt4DJmKxYTGTyGy6U80pN/Kvut+6S8HNtRO44ZFZ/DAjGOoqYjyxuNmcNEJs1ky3a+O5OWybNr9Ao2tO6mvmsLsSUsIlbE6RcdxHmhJkpfzOxpo3wvt+yCZH+4rmLcP9m+BDfcPLgDqYH6nAPHqoKvpYBiv9ud3ma7xu5+O1/jpuu2jPYOdyx6AukVDSEc/RqLXtcHt86ALrjKZDI133krT//taR6mtfeFzPNUWZfP9dzN9/YssbdxBRca/gNo2Ocxzsz1emG1smGo0jANXhp6hIhYhZCHMjNSBllhCR5A1kGAsnUv3uCsWDUX5+qlfZ/HExVTHqqmJ1hAdyPOkBuggv4AbCWW/aCzWS2z9FR+nfe9+mq+9pke3/rsS49hUU0/IUsRDu2ivaqPxXa9n5/QoW5q3sKV5C7uTu7u8pyIFVUlH1DMiEycRqamhNj6uI0jJ35XNBy75u7PF5hUu6/6+XW27uPKBK0l7nbUEYqEY//HK/2BSYhJpL00qlyKTy5DKpTqDuJw/Pz/eY37BdPd5LZkW9qe6Vikeikgo0iPgyo8nwomOgCzjZbj3pXt7BHPvP+r9TK+e3vG+eCTeOV74Kph/MAd0gzwXjFzJVZHP5orjr2Bz0zZ+vfJ6POc6+g1yuQReairTK+fxillHct7i41ladzi7W3fR/Pe7CP/HDzv+f3JfuJzqM8/ksPFz8JLJrgFS0cCpgdy+fT0TGAoRmTSJSF0dkfp6v7ODaJR9N93UtbpuPM7cP/yexIIFB/R59Ga4e7kcid/sxv0beeutbyWZ6wwg+ylJOuD9veWWt5DyOq8NVHJVoM8MXqzNw551PUoJ3JI3kd30IuGmlXhpY8/aKvatqyaXNEIxj1DEI5cKeiBLVND4g19w85Ysty/fQTrrcczMcVy0bCZVNU/ztaf/s/PHeOLnOHP+eeULsDwPb83f2NT4HI0GU9MpZtYeRmjqUX4wlNznB0btezvHuwdM7fv6fyZPpAIqxvvdXe/b3HP5yy6BqUcFwVFh4FTw6qd3tb6OcUSCneFuKzPwfY5ocJXLZdm39kXSDTuI1U9l/IIj2LNmBU9d/i42jUsTcsbkJsesRqgMrtG2TIIVs40XZlby3JQ6khVTWbBlPydu2MLU1hbCHoQjUaqu/DhT5y7taPwbCUU6GvXmxyMWIRwa2PK8YifteCjOda+7jimVU0hmk7Rl20jmkiSzSdqz7R3D9mw7yVyRedlkr/Pz431VU+lIRzhOdbSamlgNNbEaqqPVfuBVMF4bq+2cH63pGNbE/PFIKKKSsuJKetFYrIQqtW4dG978Fr96ay8csLsG1r/9FfylZRVrpmfJxgu7Njcmxacwb/wsZtXOYlbNLGZWzyRkIb77xHd4z7hzmNQaGtTd46E4WC6o4qE417z2Guor60lmkx1VmVK5FMlcsqO6U348metcp/u87sub0k3sSe4pSdrDFu4/GAvHyXgZHtr2UJeALmxhLl58MVOrpnapttQl8C0IkIutEwv76+U7Ucgbwvc4YsHVhv0beNutb+vy/edFLMIrqo/iiFw9FTUTuX7HcxxbeSmPr3XsaEpSHY/w+oUTeEOkkclXfY5QprDpQIjojBnk9u/HaypyfRON+u0U6+qCwKmuc7yujmgQSIUnTuxRonSodOefD9B3te9icsVkDqs9rOylu8N5/hmOfDJ2g6tiijSmd7NPZcM7L/M7Gwg+isSkDHXH5aiatLcjJsh6sDcxnj21E9hTOYGd0QRr0rCmPcMOz6MlkqMt2kYmnCJsHhFgRmU9NZFKYhYiQZiYGXGMuMsPIQ7Enet4xbwcCc8j5nkkvBwxL0c8lyXuZf1hNk08myaWSUKmlUy2nQrPo/dCZfz2PYnxfpBUMaFzPBFMd4wXWR5N+NsYXPW10lHHAIVGLLjKN3jf+4WvsLE2xcq5Udrnz6B21VaOWpuhPrgBvasWdo6D7KuWUXfuhcw87Ehm1cwiYgnufnEnP3toFU9uaMHDmJBsYm5LA4ctncq8YxZy+uHzWVBfTSLa5695UEbionHDvg289da3drkrFgvF+NQJn6IqWkVTuomWdAstmRaa0820ZFpoSbfQnGn2p4Nl7dn2Pvbiy5ee7U3u7RLQhS3M+fPPZ0b1jC4BW5cgLtoZoA3FQV5aVrKLxvwFVcfjNiIR4vPmkd64sWh3xJO+eRV//+mXuf/wHMsPM/ZX+0mZaNUsXtnKjG1R9kTms2bhmazcP4WcF2FSVYzXLK7nrCVTOHVhHfGojViJx1i9oOotmPvx2T9mauXUou1QerRb6aUtS2/z96f2s7NtZ8mPJc+wzhLJcIyQhdjdvrvLuaDUd+RhCG0Tu50rZtXM4roV13H1M1eT9tIYxuzYFPa4Fr768q8y7alNhL72g44Hv3vnnk5s/EQqGprZu3Yj6S1bqGzZ13UfGJ4ZYecRP/54qhYv7ihx6gii6usJjxt3QIHJmG8CMkJG4vwziP0puOqL8zya//Y3tl35Wb8aRyRCePz4Ls/8aI3Bpimw56Nv5bd776DaRdjrtbOfHK7Ixxt1jkm5HJNyOSbnPGo8jyyQNCNtRsqMVCgYBq+0Gclg3DuQ3k+cIxKkIeocEYx5NbOoq5pGTWI8NYmJ1FbWU1MxkZp4TZfGnPk739HQAKsmFZaUhYx6D2bXHUVo4WsP5WBnuA1bcNW9lGp7cie3fe8KmuJZFm2Dozc4KtKQjYbYV+mIpxw1wTWLJRLU3fgLJh1+VI/tPr5xF49vf5RVL+6mcU+Uzak4O9riZIMbuyGDOZOrWDy1hsVTazl8ag2Lp9Ywa0LlkB8sOVovGjNehtZ0K82ZzoCrR2CWbmH9/vU8sPWBHu+PhWJdqnn1piJS0SPgKgzE8ueKwunKSCXPNT7Ht5/4NikvdTCWlpXsorFYN8GYUXP22TTffTdkMgBsmwj3Hhfl/lPGsSezj5o2OGa9x9LtEY5/82VcE3mYN1Qs69KO4b9O+R6bGiq564Wd3LOygeZklngkxCsXTGbmxAriiT1UVLRiXg1H1i/gNYdPOagfsDpYw5k3D6bSud+84TdMr57epb1cvo1IYRXLwjYi3duZdF8nk8uwtWUrD257sEc6StmWBAbZq2ZBp0JVTRn+GV7Po6lVbG/bzgSr4nUPtPOaJ9LUZqN4Z55CZQqS/7ivZ9umUIjotGlEZ84kOmsmoekzeHJ3ln88u5l7ph/LnopxYEbUyzJjfAULZkxkXl0VcyZVMXey/5pSGy9Zj3NySNFDhPOKVeNoX7mSrZ/6dMefIdksyRisWBDmviUeK2eF2F0bfIa7/whAI3T5WD+09L2cOPNUJlVMYlLFJGoi1ax+6TE+cc8HyXg59qWmk85MJp2ZSnXocLa1hEi7CCkXwSIxZk0ex9wpE5g/dSKHT6thXl0Fk2tCfp323u6KFdwZy99ZW797FTdvuJUskDUjf497XDhCY6qR5ub1NKWaurT7KKYyUtlRLakw8KqN+8OaqD9eHa1mdft6frrhRtJemngoztemH8nZRs/nGZXQQX53fEzKl1Jt+dpXeGJmiv3VIQ7b6XjDZkfEg2SEjhsNdVd/j7r9zX4XznR24Tx+wRFFtz2pKsFN/0xw3rJ5zFnYzPHZGm55PMlXzj+a1nSOVTuaWLmjmRXbmrhj+Y6O/9fKWJiFU2pYPKXGD7im+cHXxKr+nyEXshBzx80tS3Wq3vZ35mFnsnDCwgO6aIyGooxPjGd8Ynyf623cv5HHdzxetL76zJqZfjAWlIwVDvMBWr70LB+sNaeb2dayraNErVi1ne6SuSSfvO+TLJm0hOnV05kQn8D4xHgmJiZ2GR8f94ex8OCf/TdS54JsQ0PXwArAOSre8Vb2nbKEx2/6AX85JseqWf6z3Y6bMI9w02YunX4eddMi7Kl2XJN8hLcuuYgvP/Rl/8K+xb+wXzplHkdNDXHu0dPJ5Dwe27CHu17Yye3Pb+fulQ0FO9xPyJ7kohNmsXTGOKaPr2BG8KqKj96/8eHMm6XKl4Mxu3Y2V73yqh4B3YIJC4atdC4RTjC5YnLJ91VMseuul5o2M+mxNTx3y4+56eU5PIOX76zlM8njmXrb44Ry+baJGUJ33Eu6trZopxGzfvJjqk8+ucu8pY3NzL7rLi76zrdYH5/ItvHTeOk159EwrpbNe1q5f00j6Wxn28fKWJjDJlUxb3IVcyZXMndyNXMnVzJnUhUTq2IKvKRkxmTJVY+GxtEoiSVLSL74AqQzJCPw9Hz40ytCbJjmn+Dq98OiLR5zdkeYcda5zHr5mXzigU/1bPB27k3MHd/1j2Dz7iaWN9zFl578escJ9CvHX8mR9WdRV1PFusYWVu1oZvXOZlYGw+37O09+1fEIi6ZUc/jUGhZNqeHwKTUsmlrD5Op4r8e+cf8G3tqtvnL39DnnaM+2dzzvIX8hVfiMh+7zO8ZTTTRnej6MsrtoKEp1tJrKaCVV0SqqolX+eKSq63S0iqpIVZf1uq9bGa3s8oczChoDD7eSl1wV+zPcft9dPPL1TxDO5FiwzQ+eW8cnsFSGyvauz3Kru/EXjF9wRFDKtZNY/RTGLzii12fjFHteVm/PMGlLZ1m9s4WV2/2Aa9WOZlbtbGZPa2dpTF1NnMVT/Txz+NQajphW26NqYb677KE+0PVgV+58kvEyPQK0pxqe4ofP/LDHuosmLCLrZdmX2se+1D68XjrAqYpWdQRaExITuoxPiE/whwXjlZFK7t5894i0JentAZfu+u/wruc/RTKXoi40jqOrF/FcegPfPu07NLY39kjra2a/hpeaXxrQhf1DaxuLPuIgbEau23/2uIooM8ZXBAFXghkTKroEX5Or4wP6vY/1fDJSDvLSuZJXny1sjzTlC5+noXUn999yNbGMY9EWx/h8k8P8A0W7mf2rX/LS+z/QI78Ve26o5znuXbmTxlVrmdDWxN7KWuqC55GGQobnObbtb2fjrjY27GphQzDcuLuNl/a0kfU691+biHSUcM2ZXNVlvDYR7bJP5ZNDzuivFmhm5wDfA8LAT5xzX+9t3d4uGFMbNrD+wjd2eRaBZ7Dx5Dn8dsZmls+B2Y3G4VscR+yMUPnB9xH2XJfqGj8484es3rt6QCcpz3M8uHYnzttIKrebeHgSFprDKQt6r8Kxvz3Dmp3+xeLqHX7QtWpnM/vaMh3rTKqKdQZcwXDRlGpqElGyuRx/Wfc3/uOxL3ak7wsnfpU3zH8tkT669RyMnJejNdtKU6qJh7c9zFcf+WqPdV4353XUxmtpzbTSmmmlLdPmj2c7p9uybb1eZHVXEanoCLwiFmH9/vU92pK8fu7rqa+s97v5Dbr7zTcqjoVjxENdGxnHwjES4UTnusErHOr6OY1UxwAd3dG2NjClyu+OtpfvsKTBVY+2JOEw2foJRLb71WR3jIdYBia0QmTKFCZ/7CM0fOVrB/yQ0WLPBhron5NzjsaWlB9oBflm5Y4m1uxsIRXcoSysWriovoa2TI7rHtpAOuv6DOZKabj/gDu7NG5kSmVdX7+hkhhI7045L0dTuom9qb3sTQavfsZ769kxYpEepfDD1Zak2EXjpq9ewlVtN7M3tbdomg6rPeyALqiLPWA1EQ1x67+/kppElK372ti6L8nWve1s2+e/tgav5mTXzykWDjFtfILp4yoKAq8EM8ZXMn18gunjK4iFQwO+6VFKw51PRuLC+CA/F5S3+myBljhUpTp3OO2aq9nx0St6djH+pz+SXrVqwJ1GDPX/JJPz2LK3nY27Wlm/q5WNu1rZELy27W/vEvdNro4xd3IVh02qIp31uGP5djI5RyxifOX8I3nDUdOoikcIl+l7VT4Z8f2N7uDKzMLAauAsYAvwOHCxc+6FYuv3Fly1Pvoomy95N+A/H+T+pcYvzzDaE2FODi/ibT9Zy7QdKf/u4xc+wrZlM7nyn5/rcUENDPgP8kAuGPPyF46rd7R0BF2rdvolXW3pzhKDGeMrmDmhghe37+ekhTGqKpKYq+ThVRm+fP6RzJlcRSwcIhoOEYuE/PFIiGjYiIVDQyr63rB/I28rdjFVpCSv2HG1Z9tpy7Z1BGHdA7GO8YJlW1u28tyu53psryJS0fF8hAMRsUiX4CxEiO2t27sEcyFCHD/leGrjtR0903V/2njEIp3j3ZYXvqdjmXW+1wjx2Pan+eWLPyXtpUmEE3z+xK9ybvEguaTBVXL9eja+6c0df24OWDkTViypYsHGNMesznTs0BIJ6n/3a5yXG1AJ1XDLBfkvH3Dlqxdu3t1WtN++GeMrGF8ZpSoeoToeCYZhqmKRLvOqeswLdyyrjBV/YvxgSudKYbj3B/4F3G3r/sZVBTd3+vjdDkj+PJEPtPYk97AvtY+9yb2s2LWCOzbe0eM9P33tTzlx2onFNleyi8bCNiOJphS/yz3KE60vsmD8As6ffz5XP3N1yW/GHMh32pTMdAZce9v9IGxfZxC2symJ1y1TTKiMsq890+WCMhyC954yl2njKkhEwySioc5hJEy8y7wwiUjn+EAuMg+FfDIKjrFk+aTwussBm+vg/iONptkTef3dzczd0lnjoL8gChjRTiOSmRyb97SxvrGVjbtbOwKwdQ0t7G7tvR1rLBKiIhqmMhamIhqmotuwMpYfj1ARC1EZi5Aosn5lLNwxPx4J8fC63Xz+T8+TGoYbhMonpcknB1tw9Qrgy865s4PpzwI45/6r2Pq9BVe7Vz3PtovfyZ+PTXPbiSFaK4yXrzYue8s3aJ1Ywe61yxnX7LG/JsSkBUdyyqxXDri6xkjwPMfWfe0d1aJW72zm6c372Lynrf83FxENW0fgFQ37wVcsCL56m5/OeuxK7mRN09PkXJpwKMzSCcczq2YmNYnBt58YiN3t+7jnpbt6dGP7mllnMaliPM55eGTJkSbn0nhkyLkMHulgmCHn0uTI4HUMM8H6ncvz67dkm2ls3wbmAR4WDKtjVURCITxyOHJ4Locji9cxnsMji+PAnk6eS00iHN9NIpzgZ2f9hqOmlPchwrsevI/G932QF2bC44uMh5YYp7wA//bO/yW6e7/fjuoAS6lG2j9W7uQ91/U8R5w8fxIV0TAtqSyt6SytqZw/nsp2uZHRFzOCwCvcGXzFIpjBI+t3d7mADYfg3KOmU1tRumdb5TW1Z7jt+W3kCgqHy7m//D7vWbmTOfVhLJTGeTE2NuR4zeIpZdln4bkgFN1DbNIDfeUTKOFFY7Euo8MW5sZzb2ThhIVlq/JViht2xWRyHjv2dw24ntq8l3tWNpYg1b5o2IhH/OArP+wIwoLgLOs5HljTOObzyXDus9j+EtEQt3/kVObVVRd7S8nyye5Vz9P49nfREEvy/QvCrJppvHqFceV7f07tpl0HZRA1WA+v28XFP360x/x/ffls6qoTtGdytKeztGdytKVzJIOhPz/XOT+doy2TI9f9LscgJKL+dVo4ZERCFgz96XDHdOcw1G29ULfl+fe0p3Pc/eJOcsOUL2Fs5pOD7UppBvBSwfQW4KTCFczsUuBSgNmzZxfdyEvjMoSu/Dce3/i/HPGSx9seizDz0svxpk3l1CnHsGn8Yexq38W8gj/D4WzwPlihkDFrYiWzJlZy5pIpgF9t5HXfu59UtjMHRMPGl85bwqSqOOmcRzrrkck50tmcP+yY57/SWY90zhWZ54+3pbPsb3dkch772zM0NIVIxJZhzuGc8fRex+p4I9FweU6GmZyHeSeQzbXh3wszIuFK/rmqlUi4t26qw0BF8Brs/rK0Z5qhS1mHEYrWEO0lqLDgFYKgxMsDyxUMc0GwlvOng3EXLMu6NMlcM+ARrthMOP4QyVySnW2NHMWBdXHfX15JTajCEgnuPyrNS3XGZ2/KMbcpQfjfa6k78VVEFy44KEupBuOwSVUkoqEe1av+48IjezuJkvMcbd0CrtZUtiMQa0nlus5LdV23oTnVo2Qg58E9qxrKklcyOa/Ln0S595ffZ3Mqx/Mv5QNR/25uOY8xfy4IVWymtv5xPnDE50i1TzjgbfeXTxrbGnt06pFzfpXHcv53hELGvLrqXn+nQxUNhzr+T/LWN7bw0Lqu1RDjEeOP/3YK08dXkMx4JDM5ktlc53jGH09lO8c7hsG8VNafl+r2/n1tGfa2pQ+JfDKc+yy2v2TGo6E5ecC/o/7yyUvjMoQ//2/s+fkP2Topy0dvD3HSW/6d3eNDzFh0FnMXLSoaRMXnzu3RlupgNaU2UfT/5L2nzB305+ucf02WTHu0ZbK0p4sHZMu37ecnD2zo8f4zjqinviZBznNkPYcXDLtOex3TuYJl7ZlcMM//veQ8r2Od1lS2S2AFyidDcbBdLRWLDrt8zc65a4Frwb97Umwj4ysm8u/hP3PxsZcwtS3GntMdn93/J/634syDPpAaqDmTqvju248btmLUfBuA1lT+F+kXT//58lNK/udfuM/3Xvco5y0bTyjSjJet4dYnUvzs3SeVZZ8bdzVz16a7ufbFqzqq+Vx6xOc567BXMmdyTcn3B/D8zjW896539KhuOaWy7oC33V9eyU2vI/eFy3nv139ApCVFOHi6fWb6ZMLhiN+VepHu1EeTOZOq+M7bju2RT+ZMqur1PeGQUZOIUpMY2h2z3trLlCuvDPf+RmKfXc8FNXjZ7/Kbe1Kc+e7EAW+7v3xSX1lPIpwYsR7YhkNv+WTx1NqyVQVSPhm+Y6yvKX8+GV8xkX8P/YlLrngPX2jO0PaBaMd1l4VCoyqI6s1Q/k96Y+aX7sYjYcbR+3/N0TPH8atHNvX4Tj9x1uHKJyXeXynySd6YrBY4Uh0TDLdyVRvpbV+HQj3ce1btZHnDWlyoeVieLTPItislrRZY2JaksJrsqbNfpXxygPs7yOuPj7p9jmRbEv2flG9/B/lvaNTtU/mk/JRPSm8UHOOob3MVwe/Q4gxgK36HFu9wzq0otn5fD7Ib7geHHgqG+6QyEvsciWMcRO9OJe+KXfmkPA6F3+1BfowlfTiq8kl5HOS/oVG5T+WTsecg/w2Nyn2WO58cVMEVgJm9Hvgf/MYzP3POXdXbuoN5SrjIGFDy4EpkjCrpRaPIGKV8ItK/Ud+hBc6524HbRzodIiIiIiIig6HyWhERERERkRJQcCUiIiIiIlICB12bq8Ews0ZgUz+rTQZ2DUNyRpKOcWzo7xh3OefOGcqGB5BX9PmODTpG35DyivIJoGMcK5RPykvHODaUJZ+M6uBqIMzsCefcspFORznpGMeGkTxGfb5jg45x7O57uOgYxwblk/LSMY4N5TpGVQsUEREREREpAQVXIiIiIiIiJXAoBFfXjnQChoGOcWwYyWPU5zs26BjH7r6Hi45xbFA+KS8d49hQlmMc822uREREREREhsOhUHIlIiIiIiJSdgquRERERERESkDBlYiIiIiISAkouBIRERERESkBBVciIiIiIiIloOBKRERERESkBBRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5GETM7zcxOLtG2qs3sGjNbZ2YrzOx+MztpiNu618yWDWL9OWa2fIj7Ot/MrhzKew+EmV1oZksKpgd1zH1s93YzGz/Adb9sZlvN7Jng9foD3f9YpbxyaOeVYP0Pm9mq4Dv75oHufyxSPjm084mZ3Vjwf7LRzJ450P2PRconh3w+OdbMHgnyyRNmdmJ/74kcaAIPVWYWcc5lh3m3pwEtwEMl2NZPgA3AQuecZ2bzgCNKsN2ycs7dAtwyAru+ELgNeKGUG3XODTZA+q5z7r9LmYZyU14ZGYdyXjGz04ELgKOdcykzqy9lWspB+WRkHMr5xDn39vy4mX0b2F/KtJSD8snIOJTzCfBN4CvOuTuCm9rfxP9N9LmDg/4FzAFW4v8olwO/Bs4EHgTWACcG61UBPwMeB54GLih4/wPAU8Hr5GD+NOB+4Jlgu6cG81sK9v0W4Lpg/DrgO8A/gG8D84E7gSeD7S8uWO9HwXrrgVcH6Xoxv61gvdcCDwdp+h1QHczfCHwlmP88sDg4hh3A1iC9px7A5zkfP3OHe1n+r8BjwX6uya+Hf3L5dpCuu4G6YP69wDeC96wu+Bx7+9znAMuD8TDwreA7ew64LJh/BfCzYPyo4PupBN4N/KDgc/4+/glvPfCWIsdSBfwFeDbYxtuBM4A/FqxzFnBzwTFeFaz/CDAFOBnYE3xmzwSfX2/H3Nvx9PZb2whMLpbOIsfyZeCTyivKKyiv9JdXbgLOVD5RPkH5pNd8UpBeA17Cv+BXPlE+UT7peix/zc8HLgZ+0+93PdQfyXC+gh9ENviiQ/gZ6mf4J4QLgD8F6/0n8K/B+Pjgg68KfhiJYP5C4Ilg/BPA5wu+mJoBZPDb6PzB301wMgJOAu4pWO+GgvQ1dUv7scGXej9QFbznM8AXC770Dwfj/wb8JBj/Mr1cXAOnBz+e7q+Hiqx7PgU/8G7LjgBuBaLB9NXAu4JxB/xLMP5FOjPavcC3g/HXA38Pxnv73OfQmcEvBb4QjMeBJ4C5wWd1P/DGYN4pwTrvpmsG/12w7hJgbZHjeTPw44LpccH3spLOE9RvgPMKjjE//s2CtF1HwQmkj2Pu7Xh6+61txP8t9EhnkWP5crD+c/i//wnKK8orKK8UyyvP4F8kPQrcB5ygfKJ8gvJJb9dYr8p/lsonyiconxT7bjbj34DYChzWW17Kv0ZTtcANzrnnAcxsBXC3c86Z2fP4Pxjw70acb2afDKYTwGxgG/ADMzsWyAGLguWPAz8zsyj+SeKZAaTjd865nJlV40fVvzOz/LJ4wXq3FqRvZ7e0zwFm4v8oHwzeH8O/k5J3czB8EnhTf4lyzv0D/8RxoM4AjgceD9JVATQEyzzgxmD8VwVphK7pnROMRyn+uRd6LXC0mb0lmB6Hf9LcYGbvxg8krnHOPdhLev/knPOAF8xsSpHlzwP/bWbfAG5zzj0AYGa/BP7VzH4OvAJ4V7B+Gv8knj+Ws3rZb2/HXPR46P+3VjSd3fwI+Br+Sehr+Hey3ltkPeWVPiivHBJ5JQJMAF4OnADcZGbzXPBPGVA+6YPyySGRT/IuBn7byzLlkz4onxwS+eRDwMedc38ws7cBP8Uvwe3VaAquUgXjXsG0R+dxGPBm59yqwjea2ZeBncAx+JF2EsA5d7+ZvQp4A/BLM/uWc+4X+BeveYlu6WgNhiFgn3Pu2H7SW5jWwvTmgLuccxf38/4cA/iegjYG3y2yqM05170h5grgGDMLBZmjy6aA651zn+1vn3T9nIql9+MU+dyL7O/Dzrm/Flm2EL+oeHofaSj8bK37QufcajM7Hv8Ox3+Z2d+cc18Ffo5/lyiJf9LO1+HOFFyA9ffZFzvmXo+nl99af+ksPJadBdv6MZ0not7SBcorPSivdGyrawLHUF4BtuBXN3HAY2bm4d+lbOzl81A+6Ub5pGNbXRM4tvIJZhbBDyKO7ydNoHzSg/JJx7a6JnBs5ZNLgI8G47/Drybbp7HWW+BfgQ9bEPab2XHB/HHA9uDH/E78okHM7DCgwTn3Y/xI9GXB+jvN7AgzC+EXjfbgnGsCNpjZW4NtmZkdM4i0PgKcYmYLgvdXmlmxuwuFmoGaXtLzD+fcsUVePXq4cc6twy8y/UrBZ7XQzC7AL25/iwUNwM1sYvA5gf97yd8VeAfwz37SW/Rz7+avwIeCuwqY2SIzqzKzccD38KsrTCq4GzEoZjYd/yT3K+C/Cb5j59w2/LtqX8Avdu5Pr599N70dT2+/tT7T2W2daQWTb8SvHzxUyivKK12MpbwC/Al4TX67+Hendw0gTcXSqHyifNJhjOUT8O/Ar3TObRlAWvpKo/KJ8kmHMZZPtuG33wP/f2VNf4kZTSVXA/E14H+A54If7kbgXPy6q38IMuM/6LwDchrwKTPL4Efp+eLJK/FLBV7Cv4Ct7mV//wL8yMy+gF8MewN+o7h+OecazS96/a2Z5Yu0v4BfV7k3twK/DzLih13fxfz9eT9+tbK1ZtYG7AY+5Zx7ITievwUnuAxwObAJ/3NbamZP4vcq9Pbim+7Q2+de6Cf4xbpPBd9ZI37vMN8Frg7uKrwP+IeZ3T+E4zwK+Jb5d64z+MW7eb/Gr/s7kF5obgB+bGYfofMkV0xvx3MaxX9rA0ln3jfNL+Z3+L/tywaQ7t4orwyc8sroyys/w68Kshy/usklBXdFB0P5ZOCUT0ZfPgG4iN6rBA6U8snAKZ+MvnzyAeB75pfyJvHbd/XJhvZ/I4ciM2txzvV2sht1zOwHwNPOuZ+OdFpkbFFeEemf8olI/5RPRh8FVzJgYymDB3eAWoGznHOp/tYXGQzlFZH+KZ+I9E/5ZPRRcCUiIiIiIlICY61DCxERERERkRGh4EpERERERKQERnVwdc455zj8ntP00utQeA2Z8opeh9hrSJRP9DrEXkOifKLXIfYatFEdXO3aNZTHlogcepRXRPqnfCLSP+UTkb6N6uBKRERERETkYKHgSkREREREpAQUXImIiIiIiJRA2YIrM/uZmTWY2fIiyz5pZs7MJhfM+6yZrTWzVWZ2drnSJSIiIiKl5XmO9Y0tPLxuF+sbW/C8IfUFIDLqRcq47euAHwC/KJxpZrOAs4DNBfOWABcBS4HpwN/NbJFzLlfG9ImIiIjIAfI8x50rdvDxG58mlXUkoiG+87ZjOWfpVEIhG+nkiQyrspVcOefuB/YUWfRd4NN07d7wAuAG51zKObcBWAucWK60iYiIiEhpbNzdyhU3PUMq61/aJTMeH73haVbvbFaJlhxyylly1YOZnQ9sdc49a9blTsYM4JGC6S3BvGLbuBS4FGD27NllSqnI6Ke8ItI/5ROR/vWXT3Y2JUlmvC7zMjnHm3/0EMfMGs/jG/eQyalESw4Nw9ahhZlVAp8HvlhscZF5RW9tOOeudc4tc84tq6urK2USRcYU5RWR/imfiPSvv3wypTZBItr1kjIaNk6cO5GH1u0mk+ss0fr4jU+zcXerSrRkzBrOkqv5wFwgX2o1E3jKzE7EL6maVbDuTGDbMKZNRERERIZgzqQqvvO2Y7nipmdIZryOEqoJlVH+saqxy7qprOOLf17OSfMm8YN71qiNlow5wxZcOeeeB+rz02a2EVjmnNtlZrcAvzGz7+B3aLEQeGy40iYiIiIiQxMKGecsncrij5xKQ3OS+poEcyZVsXF3K4loqEuVwXAInt68j3+u3d0xL1+itfijr+p4386mJFNq/e0o4JLRpGzBlZn9FjgNmGxmW4AvOed+Wmxd59wKM7sJeAHIAperp0ARERGR0SEUMubVVTOvrrpjXm8lWhXREO+57oku709lHR+74RlmT6rkryt2qI2WjFplC66ccxf3s3xOt+mrgKvKlR4RERERGT6DLdFqSma47bntHfOSGY9//81TvP2EWbx83iQOn1rDvMnVxCJ++y7PcyrlkoPOsPYWKCIiIiKHjsGUaE2ojHLxjx/t8n7PwU2Pb+G3j70E+B1lzK+rZtGUGszg9ue3k8k54hHju28/TqVcMuIUXImIiIjIsBlMiVYiGuLPl5+CA1btaObF7c2s2tHEI+t309Cc6lgvlXX826+fYt7kKmZPqmTauARTayuYOi7O1HEV/vS4BDXxCN0eByRSUgquRERERGRYDaZEa2F9DaGQsXhqLRcc66/78LpdPUq5ACZURtnVkmL51v3sakn3WF4ZCzN1XKJn8FXrB19TxyWYWBkrWvqlaogyEAquRERERGTE9VaiVSyAyT9bq3sp17feekxHwJbK5mhoSrGjKcn2/Ul27G9n+/4kO4Pph9btoqE5Ra7bM7Zi4RBTxsWZWpvoKPWaUhNne1OSXzy0kXRQDfE7bzuW1x05rawBlgK60UfBlYiIiIgcFIqVaBXTWynXnElVHevEI2FmTaxk1sTKXreT8xy7WlIdwdeO/Um2NyX94f4kz23Zx19XJElnvS7vS2Udl//macZXLGdCVYzaiijjKqLUJiKMy48HQ39+wXhFhJpElHA/QZLnOe5csaPHMapd2cFNwZWIiIiIjCqDKeXqSzhkTKlNMKU2AbPGF13HOcffXtjBZb98qseyZXMmkIiG2d+eYX97hpf2tHWMdy8R664mEekIumorIj0CsUzO40f3rSOT87eTfx7Y3H87hcXTasvSdkwlZQdOwZWIiIiIjDoDLeU6UGbGwvqaotUQP/f6I4ru3zlHWzrH/vYMTckM+9sywXjWHwYBWFN+eXuGDbtaaWr3l7dnij/uNZV1vO77/yQWDlFbEaE2CMZqg1KzzulIR6BWbFk8Eu6x7ZEqKRtrAZ2CKxERERGRPgykGmIhM6MqHqEqHmE6FYPeXzrr8fzWfVz840dIZztLwCIh490nzyESDtGU7AzS9rdn2LKnrSNQy5d29SYRDfUIvEJm3Le6gVwQPyYzHh+54Wk+edYiZk6sJB4JE4uEiHe8wsSjIWLhEPFoMB0sG2ip2lis+qjgSkRERESkD6WqhjhQsUiI42ZN4H/eftygAw/nHMmM1xF8+cNsR+DVFJSgFS7b3ZKmoTnZEVjlZXOOr9+5avDpDwcBWEHQFSsSlGU8j3+u2UW+BmUy4/GR3z7Nv79mAXMmVVEVj1AdvKriYaoT/nhFNDzkapHlLilTcCUiIiIi0o/hqoZYuL+hBHRmRkUsTEUs7LclG6D1jS28/vsPdKn6GI8YP7nkBKbWJkhlPVLZHKmMRyrn+cNsjlTWI531uixPd1vurxOMZzxaU1n25jz2tmbo3jQt6zn+5+9r+v5sjG6BV/dxPxCrikeoCeZVxSNUxcI8t3U///P31aSz5Xn4tIIrEREREZGD0HAGdL1VfTxl/uSyldD1FtD9+v0vZ1J1nJZklpaU/2pNFRlPZmlNZ2lO+vMam1Md67Sksv12KpLKOq646RkWf+TUkn3GCq5ERERERA5xw131EXoP6F42e8IB79c5RyrrdQRhLaksj23YzVdve7HLesmMR0NzUsGViIiIiIiUzmip+jgQZkYiGiYRDTO5Og5AZSzMN/+6qkevj/U1A68+2Z9QybbUjZn9zMwazGx5wbxvmdlKM3vOzP5oZuMLln3WzNaa2SozO7tc6RIRERERkYNDPqB7+bzJzKurHpaSskTUD4H66/VxKMpZcnUd8APgFwXz7gI+65zLmtk3gM8CnzGzJcBFwFJgOvB3M1vknCveyb+IiIiIiMggDEfVx7KVXDnn7gf2dJv3N+dcNph8BJgZjF8A3OCcSznnNgBrgRPLlTYRERERETn0lLukrGzB1QC8F7gjGJ8BvFSwbEswrwczu9TMnjCzJxobG8ucRJHRS3lFpH/KJyL9Uz4RGbgRCa7M7PNAFvh1flaR1Yr2neicu9Y5t8w5t6yurq5cSRQZ9ZRXRPqnfCLSP+UTkYEb9t4CzewS4FzgDOdcPoDaAswqWG0msG240yYiIiIiIjJUw1pyZWbnAJ8BznfOtRUsugW4yMziZjYXWAg8NpxpExERERERORBlK7kys98CpwGTzWwL8CX83gHjwF1mBvCIc+6DzrkVZnYT8AJ+dcHL1VOgiIiIiIiMJmULrpxzFxeZ/dM+1r8KuKpc6RERERERESmnkewtUEREREREZMxQcCUiIiIiIlICCq5ERERERERKQMGViIiIiIhICSi4EhERERERKQEFVyIiIiIiIiWg4EpERERERKQEFFyJiIiIiIiUgIIrERERERGRElBwJSIiIiIiUgIKrkREREREREpAwZWIiIiIiEgJlC24MrOfmVmDmS0vmDfRzO4yszXBcELBss+a2VozW2VmZ5crXSIiIiIiIuVQzpKr64Bzus27ErjbObcQuDuYxsyWABcBS4P3XG1m4TKmTUREREREpKTKFlw55+4H9nSbfQFwfTB+PXBhwfwbnHMp59wGYC1wYrnSJiIiIiIiUmrD3eZqinNuO0AwrA/mzwBeKlhvSzBPRERERERkVDhYOrSwIvNc0RXNLjWzJ8zsicbGxjInS2T0Ul4R6Z/yiUj/lE9EBm64g6udZjYNIBg2BPO3ALMK1psJbCu2Aefctc65Zc65ZXV1dWVNrMhoprwi0j/lE5H+KZ+IDNxwB1e3AJcE45cAfy6Yf5GZxc1sLrAQeGyY0yYiIiIiIjJkkXJt2Mx+C5wGTDazLcCXgK8DN5nZ+4DNwFsBnHMrzOwm4AUgC1zunMuVK20iIiIiIiKlVrbgyjl3cS+Lzuhl/auAq8qVHhERERERkXI6WDq0EBERERERGdUUXImIiIiIiJSAgisREREREZESUHAlIiIiIiJSAgquRERERERESkDBlYiIiIiISAkouBIRERERESkBBVciIiIiIiIloOBKRERERESkBBRciYiIiIiIlICCKxERERERkRJQcCUiIiIiIlICCq5ERERERERKYESCKzP7uJmtMLPlZvZbM0uY2UQzu8vM1gTDCSORNhERERERkaEY9uDKzGYAHwGWOeeOBMLARcCVwN3OuYXA3cG0iIiIiIjIqDBS1QIjQIWZRYBKYBtwAXB9sPx64MKRSZqIiIiIiMjgDXtw5ZzbCvw3sBnYDux3zv0NmOKc2x6ssx2oL/Z+M7vUzJ4wsycaGxuHK9kio47yikj/lE9E+qd8IjJw/QZXZjbFzH5qZncE00vM7H1D3WHQluoCYC4wHagys38d6Pudc9c655Y555bV1dUNNRkiY57yikj/lE9E+qd8IjJwAym5ug74K34gBLAa+NgB7PNMYINzrtE5lwFuBk4GdprZNIBg2HAA+xARESkJz3Osb2zh4XW7WN/Ygue5kU6SiIgcpCIDWGeyc+4mM/ssgHMua2a5A9jnZuDlZlYJtANnAE8ArcAlwNeD4Z8PYB8iIiIHzPMcd67YwcdvfJpU1pGIhvjO247lnKVTCYVspJMnIiIHmYGUXLWa2STAAZjZy4H9Q92hc+5R4PfAU8DzQRquxQ+qzjKzNcBZwbSIiMiI2bi7lStueoZU1i+tSmY8Pn7j02zc3TrCKRMRkYPRQEqurgBuAeab2YNAHfCWA9mpc+5LwJe6zU7hl2KJiIgcFHY2JUlmvC7zUlnH7598iY+dsYgt+9rZ2ZRkSm2COZOqVJolInKI6ze4cs49ZWavBg4HDFgVtJUSEREZ06bUJkhEQ10CLAOuvnc9v39yK3vb0mRyqi4oIiK+gfQW+C7gHcDxwMuAi4N5IiIiY9qcSVV8523Hkoj6f5eJaIgfvOM4vnLeUhqbU2RyndUFr7jpGVUXFBE5xA2kWuAJBeMJ/Kp7TwG/KEuKREREDhKhkHHO0qks/sipNDQnqa/xq/89umE33fsMTGY8GpqTzKurHpG0iojIyBtItcAPF06b2Tjgl2VLkYiIyEEkFDLm1VV3CZqKVRcE+PsLDSybPZHNe9vUFktE5BA0kJKr7tqAhaVOiIiIyGiRry54xU3PkMx4xCPGUTPG85N/buCxjXtYtaNJXbeLiByC+g2uzOxW6Kj9EAKWADeVM1EiIiIHs2LVBQ+bWMl3/76aH/xjXcd6+bZYiz9yqqoLiogcAgZScvXfBeNZYJNzbkuZ0iMiIjIqFKsueMqCyV2CK1BbLBGRQ8lA2lzdNxwJERERGe2KtcUKGYTNWN/YonZYIiJjXK/BlZk1Q4/OkMB/xIdzztWWLVUiIiKjUPe2WJGwETLj3T9/nHTO0zOxRETGuF6DK+dczXAmREREZLQr1hZr85423nPd47jgdqXaYYmIjF0D7i3QzOrxn3MFgHNuc1lSJCIiMop1b4u1synZEVjlJTMe63e1KLgSERljQv2tYGbnm9kaYANwH7ARuKPM6RIRERkT8u2wuvvoDc/wv3evoSWVHYFUiYhIOfQbXAFfA14OrHbOzQXOAB4sa6pERETGiHw7rHyAlYiG+NzrF/OKeZP49l2redU3/8FPHlhPMpMb4ZSKiMiBGki1wIxzbreZhcws5Jz7h5l940B2ambjgZ8AR+J3mvFeYBVwIzAHv3Tsbc65vQeyHxERkZFWrB3WnElVXPqq+Ty9eS/fuWs1//GXF/nxA+v58GsW8rZls4iEjI27W9W7oIjIKDOQ4GqfmVUDDwC/NrMG/OddHYjvAXc6595iZjGgEvgccLdz7utmdiVwJfCZA9yPiIjIiCv2TCyA42ZP4JfvO4lH1u/mv/+6ii/8aTnX3LeO0xfXc+Pjm0ll1bugiMhoMpBqgfcD44GPAncC64DzhrpDM6sFXgX8FMA5l3bO7QMuAK4PVrseuHCo+xARERlNXj5vEr/74Cv4+XtOIBEN84uHN5HK+r1g5HsX3Li7dYRTKSIi/RlIcGXAX4F7gWrgRufc7gPY5zygEfi5mT1tZj8xsypginNuO0AwrC+aGLNLzewJM3uisbHxAJIhMrYpr4j072DKJ2bG6YfX85Xzl/RYlsx47GxqH4FUiRxc+UTkYNdvcOWc+4pzbilwOTAduM/M/n4A+4wALwN+5Jw7DmjFrwI4IM65a51zy5xzy+rq6g4gGSJjm/KKSP8OxnwydVxF0d4Fv/jnF7hn5U5c937dRcrsYMwnIgergZRc5TUAO4Dd9FKqNEBbgC3OuUeD6d/jB1s7zWwaQDBsOIB9iIiIjErdexeMR4x3veIwkpkc773uCd549UM8sKZRQZaIyEGo3w4tzOxDwNuBOvxA6APOuReGukPn3A4ze8nMDnfOrcLv2v2F4HUJ8PVg+Oeh7kNERGS06q13wf937hJ+/+QW/vfuNbzzp49x4pyJfPysRbxi/qSRTrKIiAQG0lvgYcDHnHPPlHC/H8bveTAGrAfeg1+KdpOZvQ/YDLy1hPsTEREZNYr1LhjCuPjE2bzpZTO48fGX+ME9a7n4x49w8vxJfOK1izj+sIkjmGIREYEBBFfOuQG3hxqoIFBbVmTRGaXel4iIyFgSj4R51yvm8LZls/j1o5v50b1refOPHubVi+q44qxFHDNr/EgnUUTkkDWYNlciIiJykEhEw7zvlXO5/9Onc+XrFvPcln1c8MMHef/1j7Ni2/6RTp6IyCFJwZWIiMgoVhmL8MFXz+eBz7yGT5y1iMc27OEN3/8nH/rVk6ze2TzSyRMROaQouBIRERkDquMRPnzGQh74zGv4yBkLeWDNLs7+n/v5yG+fZl1jy0gnT0TkkKDgSkREZAwZVxHlirMW8cCnT+eDr57PXS/s5Kzv3McVNz3Dpt2tI508EZExTcGViIjIGDShKsZnzlnMA585nfe9ci5/eW47r/n2fVz5h+fYsrdtpJMnIjImKbgSEREZwyZXx/n8G5bwwKdP550vP4ybn9rK6f99L1/40/Ps2J8c6eSJiIwpA3nOlYiIiIxy9bUJvnz+Ui591Tx+8I+13PDYS9z0xBb+5aTZfPBV82lNZ9nZlGRKrf/Q4lDIRjrJIiKjjoIrERGRQ8j08RX85xuP4kOvns//3rOGXzy8iV89sgnPOXIeJKIhvvO2Yzln6VQFWCIig6RqgSIiIoegWRMr+eZbjuHn715GzvMDK4BkxuOjNzzNizuaRjaBIiKjkIIrERGRQ1g0HMJzXedlco43Xf0Ql//mKe5cvp1kJjcyiRMRGWVULVBEROQQNqU2QSIaIpnxOubFwsbZS6fy4Npd/OW57VTHI5y1ZArnHj2NUxfWEYvo3qyISDFjN7jyPNizDpp3QM1UmDgfQvozEOlC+UTkkDdnUhXfeduxXHHTMyQzXpc2V55zPLx+N7c9u507V+zgj09vpTYR4eylUznvmOmcPH8SkbDOGSIieWMzuPI8WHkr/PEyyLRDtALeeA0sPk8XjiJ5+Xxy86WQTSqfiByiQiHjnKVTWfyRU2loTlJf09lbYAjj1IV1nLqwjq9deCQPrt3Frc9u447lO/jdk1uYWBXjnCOncu7R0zhp7iTC6gBjRDnPI71pE9mGBiL19cQOOwzT+VxkWI1YcGVmYeAJYKtz7lwzmwjcCMwBNgJvc87tHdLG96zrvGAEP8D642Vw2RKYvLAEqRcZA/as8/OF8olI3w6BEt5QyJhXV828uupe14lFQpy+uJ7TF9eTzOS4b3Ujtz23nT8+tZXfPLqZupo4bzhqGucePY2XzZ6gngaHmfM8mu+6i22fuRKXTGKJBNO/8XVqzjpreAKsQyCfiAzESJZcfRR4EagNpq8E7nbOfd3MrgymPzOkLTfv6LxgzMu0Q8sOXTSKBLzmHYQy7V1nZtr9+conIj7VhCgqEQ1z9tKpnL10Km3pLPesbOC2Z7fz28c2c91DG5k2LsEbjprGecdM5+iZ4zBToFUuzvPIbNlCy4MPsvOq/4Rs1p+fTLLtM1cyd9Ei4nPnljcRyiciHUYkuDKzmcAbgKuAK4LZFwCnBePXA/cy1OCqZqqfsbtfOG59CmadDHvX686KHPJao5OpiVZwb3IhUbKcEn4BgPY926gq8/+wyKiRL+HN/59k2v2aER/8p///oTv1VMYinHv0dM49ejotqSx/f2Entz23jesf3shP/rmB2RMrecPRfonWkmm1HYGW5zk27m7Vg4sHyHkema1bSa1ZS2rtWlJr15Bau5b0+g24ZLL4e5JJso2N5Q+ulE9EOoxUydX/AJ8GagrmTXHObQdwzm03s/pibzSzS4FLAWbPnl186xPn+3dM8hk9Eodxs+GuL8KLt8KO59XGRMa8/vLK6mwdE0/9Djf+bQ13ZJdxbfh7nF6xnsrb/g2y+2De6dCyU3+GMqb1+5/SvKPnjbpsEv76WZi8CB7/qf5PClTHI1x43AwuPG4G+9sy/PWFHdz23HauvX89P7p3HfPqqjj36Om84ciprNvVWrQTjUM9wHKeR2bbNlJrguBp7To/mFq/Htfe+VuMTJ1KfMECqk48ifjCBVhlJduu/CykUh3rWCJBpK7ugNM05HzyqzfBhLmw+SHIZSCSgDdd6+cTUNAlY5I55/pfq5Q7NDsXeL1z7t/M7DTgk0Gbq33OufEF6+11zk3oa1vLli1zTzzxRPGF+bq/LTugeiqMnwN3fxke/kHX9aIVcNkDqi4oo8GQrziK5ZX1jS2877pHuexI41fPt7JiT4g5VWn+MvOXVG66GywMLqeLRhmNhpRXiv6n7FoD15za9cLRwn6+SLd0XTeS0J36XuxuSXHnih3c9ux2HtmwG+f8L6nwCiQRDXH7R07ts93XaNNXBxN+ELWd1No1pNet6yyRWr8e19bWsY3IlCnEFywgvmA+sQULgvEFhGtqeuxrkG2uyptPQhGYcTy89Gi3vYbgZZdAvBoeuxayqa7/MzDw/KN2XlJ+g84nIxFc/RfwTiALJPDbXN0MnACcFpRaTQPudc4d3te2+gyuitnwAFx/bs/5F/3GvwOpzCkHt5IGV57nuHPFjo47x2b+Dq4+dyrn3P1a8LKdK+cvGnUTQkaH0l009taWJD4OfnlBz42c+kmoXwK3XK62J71oaE5y9T/Wct1Dm3os+8w5h/OeU+aSiIZHIGWllQ92tn76M35pUjRK7etfh1mI1Lp1pNat6xpE1dURX7igIIBaSHzBfMK1tX3spec+05s2kW1sJFJX119vgeXPJxUTi1935W/edZ93ykf94Ovh/+0ZdHU/DrXzkuFx8AdXXXbeteTqW8Dugg4tJjrnPt3X+wcdXBW7swL+3RXndJdeDnYlDa6gs81DQ3OS6niEL/xpBSu27uPH4a9zWvi5ritf8EOYdZJuQshoULqLRuhZEyJfMtXj/6R7WUxANSR6WN/Ywuu//0CXBxfnJaIhTp4/mdMX1/OaxfXMGF8xAikcPJfL+W2i1q4jvX4dbc88S8vdd/vXFwXCEyYQX3x4EDz5JVLxBQsIjxs33EkemXwSrYA3/Rhu/NeB73TifP9/JzEeKiZAxXhwHjz2Y/AynetF4vDOP8O0Y/z9lLojFZWUHYpGdXA1CbgJmA1sBt7qnNvT1/sHHVwVu8vx+m/DrR8Gr+AOSjgK77sLph6jTCTlN/CTdcmDq+72t2d4x4/uY21DMz+PfpOTg04usBDOOcxCugkho0FpLxqLKfZ/cuH/wd6N8Pcv9Vz/PXdC1WT9nwS6l5wnoiG+8eajGZeIcu/qRu5Z2cDmPX6pzuFTajh9cT1nHFHPcbPGj/hDi10mQ3rzZlLr1vnV+db6pVDpDRtwBe2dwuPHk9u3r8f7Z//ieqpOPHEYU9yrkcknb7wG6o6Aa1/VM+g673/h5vf33M7sV/g3wtv3dr4ybT3XKxSKQqIW4rUFw3H+q8e8wvXGdc6LxPs/lnL/DyqgG2mjK7g6UIMOrqDnnZXmHcWLrMNxmLkMtjwOubQuJg8Vw30SG9yDfMseXAE8u3kPH/3FP9nZkuWa6Hd4VWItLa//EdW3vq/rTYhIHD74oNqXyMGo/BeNMIgSLaB6CrTt9qvb6v8E6FpyXvjgYgDnHOsaW/nHygbuWdnA4xv3kPUc4yqivHpRHa9ZXM+rFtUxsSo24P0N9gG7XipFeuNGv1OJfBC1fh3pjZs6ujsHiE6fTmzBfOLzFxCfP4/Y/PnE588nu3s3G974pi49+Vkiwdw/3lz+3vsGZuTyCQwu6CpW8rtzBfz4NV0fvROOwqmf8K/hUk2QbOocJvd3nZdq6j/t4Xhn4BWJQ+NKv8QsLxSB498NtdP96vORhJ/eHsM4RCogmug6DEf7Ll0biYBuJIK5kbj2Gvj+FFwNWrGqguE4LDwLVt7Wdd1QFC7+LSw4s/RFzVLccGa4vk5iOEi3+nfK0q3+8o7xNn+6y/Lu89qCefnxYBup5p6N4nuvQjQswdXD63bxsRuewrwsO1odp8yM8KHFSV75z3f1XLl+Ccx5JTz1C/WYJgeT4bloLKb7eSSSgBMv9TtT6n5RdvEN+j8ZoKZkhn+u2cU9Kxu4d1UDu1rShAyOmz2B1yyu5/TD6zliWk2vz9Pqq7MH195Oav0GUuuCIGrdelLr1pJ5aYv/fQKEQsRmzfLbQ82fHwRRC4jPm0uosnLQ+xyWh/r2b+TyCQwu6CpHmysv5/8Hdw/CUkEg1j0Y27sRtj5ZZEO9VAceCAv1HpRFEv4546VHup07wnD0xVBdD+GYH6CFY0XGI73MLxgPdVsnFIE1f4M/fWj4/tOHO4Ac/P4UXA3aYBthgn8Hcs4rg9epMGmBX6dad+9La7AZwPMKApjWrsFO0fGWzqAn3QKtjbC520kM/JNOLj24tFsIolUQq/TT3TEevPLjyX3+4wG6e/dt/m+r21YHl4hOg8krxdpC1FUa1/AfvMxb0bliKOL/1vdv6boBdX4hI+/gumjsrYYE+N1ULzrbfx12Smc1JFUF6pXnOZ7bup97Vjbwj5UNPL91PwDTxiU47XC/ndYpCyZRGet82kxqwwbWX/jGLt2UEwoRmTyJbENj57xolPicw/zAqSCIis05jFC8oIrYAA2yg4nhNrL5pDfFgq7+egscyLoHqtjN+GgFXHo/TDjMn59NdhumINsOmWTxYTZVsH6RdVobYfeanmmJxP3gsLDjqXIKx/3rGjM6fjb58Y4bGlbwi7IBrBvM87LQtqvbDg3GzfSP00LBK9yZhlC4YP4gl6XbYN09XTtU6btdrIKrIRlo1Y5I3O8Jatdq2PhPaN7uz6+e4v9Bbn3Sb1gZScCFV8OSN46tP8NS/dk7VxDoBAFOx3hr5/i+TfDIj7qePCwEM5bRUZLUvbRoMMIxiFV1Bj7OFT+JHflmmHx4kUCpyp/OjxcGT5H4wO5G93ayHsGSq+5tIaJhozYRZW9big9Gb+djdgOxWIzW1/+QinGTCf3i/J4bOfptcMrHYcqSoSZZ5EAcXBeNxfJ5JO7nkW1Pw4b7grvEVTD/dFhwln8Ed16pXtAGoKEpyb2r/HZa/1y7i5ZUllgkxBn1Yc6xRpbuf4nQ44+QWrWqx3srT34FVSeeGFTlW0Bs1kwsGh2BoxgRB1c+OdiNRBW9/q4RnPOfH5ZLB68i416ml3W6z8vArlXw5HU903Hkm6B2RtfOWZyjo8QuP96xvNh4L+s2b/dLy7qb92qonOzf8PZy/jDf+ZzzOl+9LfMK1ytYlm7peVMYerupDQquSqi/TOQc7FkPGx+AVXfC6jt6biNWBZWTgp5tJgbDCVBZMN59fmK8X5Q70DSW885mLhvcPWmHVCusvh3+/hXIpfzA5IT3+0FHJqjmlm7tGhwVHQ9eQy1CB6g/AmqmBSVAVUGA1Nt4EPQUG+/+OQ8u0CmNwZ2shyW48pPVtS1ESzLLO37yCC2pHLOrHRctreB3a+GWi6dTc/3p3Z4BFKTbeVC/FI56sx+gTpjTecy6Iy/ldXBdNPaXz9Nt/n/J6jth9d+gqcgffyQOl97nn/+kB5dOk1y5kuYnn2bbw4+Tff55qvY2AJCxMFsnzaSFMDWpFmY0NxLBYYkEc27+A4l580Y49SPm4Mono8FwlpTl9zecAd1IXAcN9z4Hvz8FVyU10EzU2/Ozjjjfv9Bv39PZu03bHr8qWPeqZ4XitX43o30FZIlx0PAC3P9Nv1g5EodXfQqmvQxyyc42QUWHA5w32Kpw+ZKgWHVncNNjurpr8NN9WeF48w746ZldG6uWM8ONdE9A/Z+shy246u7hdbu4+MeP9ph/8wdP4mVtD/b8zGaeBC/eAst/3/kAyZkn+kFWrBLu+LTuyEs5HXwXjQPN587B07+CW/6957JwDKYe5XcznX/VL+nao9khIrN9O+3PPkv7M8/S/swzJF94AZf2/7Mi06ZRccwxVBxzDPvmHs79biJ/WbmLZzbvJeuMRDbFov1bOXzxbI49+RjOPmoak6sPvc+QgzGfSE/DGdCNVAcaanN18DhoMvhgo2DP8xtHdgm6CroX7R6M5cf7C8r6E81Xa8sPKwY+b98WePC7Pbf51p/DvNP9kqDIwHttGpCR7CVnuO5KDc6IBVe9PZPmLcfP4KoLlpJuWEuuaTvh2mlUTVtEKFzwANC9m2D5H/zXzuU9Nx6J+3XW6xcPOX0i3Yzui8aiHS1F4ai3wb7NsP05SPntjAhF/B7WCgOuqUf6N6nGCC+ZJLlihR9IPeu/sjt3AmDxOImlS6k49lg/oDr2GKJTpvTYxsPrdvHxG57izCkRtu5tZ3V7iK1tneez2RMredns8Rw3ewIvmz2BxdNqiI5wl+/DYHTnEymPkbgOGokSwYHvT8HViBiuIMDz/D/U9r2w9h64/RM913ndN2H2y3sGSJHEgfVINRJFxXCwBzvDbcSCq+7tsOIR4xXzJ3Pvqkbm11WxZW8bqawjEQ3xnbcdyzlLp3Z0qdzFU7+CWy7vOT8ShylH+nfhpxwJU5b6r8qJQ06zjC2D7EZ7dF80DqRa+t6NsP3Zrq+ORuHmn5c7gq2jYdrRfs2Hg0ix7xQzMlu2dJRItT/7LMmVKzu6Po/OmtVRKlVx7LEkDl+Exf5/e3ceJ1dZJnr895w6tfaepNcknT0QspGwCkYUUcDBjRnEfZm5Os5V0dEZdRS8oyiKuIxXuderIwOMC27ouODIokhARAiJJCEJ2bdOel+qu/Y67/3jVHVXdVdv6eo1z/fzqc855z2nzlLdb9V5zruN/mCv0AMivy188a830hyO8ezRLp491klL2O3wIuC12LCwkk39AVclNeWByfkgps/szidKnaHJ/j3R4KpYpjoImOpgZ7qqzKlc0xZcQeExab7z+GE+98CevO0CXosHbtrC8urSoTsZ7on8ur+BnpNwepdbcptV1jAQaGWDrgWr3Peos8YZdGk9+28ax/ubYozbMDwv4Houv/1W5ZL8Eq76jW53zrnHm6K2kNm/6cmPfsztwc+2CZx7LslTp0i3twMgoRDBdevcUqnzNxLcsAF7wYIzOl6hQYsHPwgyxtDUHWP7sU6ePdrF9uOd7D7ZQyLtBmQLK4Nsaqxkc2MVm5dUcV59OT57Vv/+zf58ouaE8Y5Bdyb7N/E4TiyGE43S+8jvaL7jDkgkwO9n4RdvL+rviQZXs5VWmTsbTWtwVchwbbHue88lXLq8wE3QWJ7I9za71Qebdw+8Wve5PR6BO95c9bk5QVcm8CqtKVw6qx1oTIpi/BgaYzDRKOlwL064h3Q4jNPbS7qnByfcSzrsTpMnT9Lzm98MjDnEqIOx6k1jVl9bfsB1+jm3M6assnq3ZMsbgH2/cdva2gG4/luT8nuSbGoisn07vY/+gZ5f/Sq/9zERSl/+ckpffDnB88/Hv3IlYo+xg6cxGGnQ4uHEkml2N/Ww/Vgn2491sf1YJ03dbjtgn22xfmEFmxZXsnlJFZsaK6mvCBY8ZnNPjNrysR1zCmk+UUNMdqCTPYaJxdxgpy9C+HeP0PLlr7jBjtfLvHe8ncC552LiCZx4DBOLY+IxnHgcE4vnp8Xi7r7i7tQk4gXSRu5DoNi/JxpczWYa7JxtZlxwNVxbrBsuWMQn/2oNlaEC1XXO5P82lXC7yW/enQm8nnfnw00D24QWDAq41sL81XDwYS1xLbIhpQ4+H9U3fYDA2rU4vb04/cFSgWlPD+negWm2utewbBsrGMQJh4esarznbkouuaTQu/SmcSSxbji9cyDgOvF0fsCVVbse5q9wx5upWJyZLnTnQ/NHrWpuUilie/cR3b6d6PZniTy7ndTp04DbVsrkjjmV0XjvPZRcfHFRLnOynM6WbmUCrudOdpNIud+B9RWB/tKtjYsqaeqO8rGfPjdsadk003wyC0xFsJN7rJ7f/pamj/9L/3d7zYc+RHDT+W7JTzTqBi3RGE4sislOc9MiUZxYDBOLZtJimGg0f1og74+JZSGBAJbfnzcVvw/LH0AC/sw0gBXwI/6Bqfj9WAE/yaZTdNx995Bdj/Ddo8GVUnPYjAuuCrXF2rxkHn861E55wMsHrlzJ2160BL/tGX1nZyLSkVPClSntatnjDiEAbrfwueNrgFvy9fL/BdWrwV/m9s4ZKHen/jJ3kMGJmuoqVqkUiQO7STU3Y9fW4Vt53hk/8XdiMVJt7aQ72km1tZNqbyPd3p6Xljx1iuTx42Pan1VSglVWhqesbOg06MMTtLF8gscPlu3g8aawrASWJ45HIkiqB9NxgvjuHVh2mni3zckn5rlPGu+7G/+5GwsdVm8ax2O4Hm/rN7pDZ3SfyO+1FdzSrYpF7tg3mcAr7Z1P9GSc6OF2Is8fIrprNybijj9o19UR2ryJ4PmbCG7ejAT8HPmbGzCxgf2O8vR4xkqkHPac6ukPtp491smJzmjBbX0e4RfvfzHn1pdPyrk4xuFoz1FaI63UhGpoLG/EkjnaNnEaTGWgkz3eWKpEG2PcAKe313141RdxH3RF+nLS+nB6+zLTzHJfL+mctHQ43J9nx0N8PiQYxAoEsAKB/nkJBrACQaxgAAnkpAVDmbSAG+x85ztD9ln/+c8TuujCvEAKrxeZSP8BuAOKH3799eP57tHgSqk5bMYFV1C4qs2+5jC3PbCHrfvbaJwX4uPXnsu16+om/KU4thNKQ8dhaNntVnP6yw/G935f6dCAKzvfnzbc+gr3/ft/O2WlZSaVIvyb/6Lpls8O/PjeejNl174WsW2MMTh9faTb2ki1t5Nqb+8PlvoDp/YOd76tHaevr+BxrNJS7Pnz8SxYACJEn3kGMIjHYNkGy3aY9/Y3EFregOVJ4LHiWBJBEj0Q7XJ7O412uaUmscx0pN5PxeN+nsFKjNikow6RF04R67DoOFRNw0ffTdnlm5EllxZ895l8lmftb8pYBiqNtLtBVuZluo6RPHqI6N5jRA53ED2VIt5tAwJi8FcmCdVZBJdWETqnEW/j8kypl1sKZkrqCD/+FE2fuq3g/+1s1xKOcd+fj/H/HjtIZUhoDadJZAppLYHVtWWcV1/OeQ3lrG2o4Lz6cipCE2tL6hiHh48+zCcf/ySxdIyAJ8DnXvw5rlpy1XABluaTcTiDtp9D95FKuVXhIpH+0p6BEp7okLTkqSY6v/8DSKcHdmJZ+M85B1LJvMAot9r0sCwLq7QUq6QET2kJVok7n01zesOEH3xoyNuqP/Jhghs3YvUHTZlpNnDynPlDyTMIdiZkKtrwanCl1OwxI4OrkfzhhVZu+/Ue9jWH2dxYySf/6jw2La6cujYIhW4a7QDc+F13vLh4N8TDEOtxh0eI9bjL8e6BtMHrU4WfSI9MoLLR7b3Tst3SMcvOeY1v2UlDOpIiHUkRP9VKz+//hBN3MCnBSQvG8SBllTjRNKmeGCZV+EfXE/Jgl3jwBC3skAdPCOxM56KegIMdSGP703j8KSxJgpMCJ4VJJSCdGL0DUo/PHRg9EyQRqByYFkoLZtIDlW7Qmj1A237M928k0fg3pKI2djCF79hPkDf/sGiDPsJZ/JviOJj9D5LY9xdSfYJdAr5zNiCrXtn/QMAkEsT27CHy7Haizz5LZMd20q1u74RWSQnBjRsInreS0IoaAvU+PMnWvGCM7pMD3cdnGABvOY6nFHxBrFgLsvZ17t80tABKFmSm892pr2RCvd466RRH25+nta+ZmpJaGuefhzV4MPkiOtIW5qGjj/CtPZ8jmorjS9fx0gXvI2SWcbIzxu6mnkzvhAZIs3Ceh9V1fpbXBFiywGbRfJvSgCGWjhFLxQamufM5ae2xdv7U9CccBvJ7wBPgR6/+Ecsq5mbbxMksSTKOgxMOk+7pId3dQ2zfXk7/66chmRzYyOOh/JprEK83r9rbQJW53LRY/nsnILB2Ld6GhrzAyCotwVOaEyyF3KkbRLnzEgiM+JBzqgMdKE7QeibHTBw9Sqq1Fbu6evb3Figii4F7gTrAAb5ljPmaiMwDfggsBY4AbzDGdI60r5Ey+AxvRKrUmZh1wRVA2jH8+JnjfPmhF2gNx9ncWMmupm4SY+m6faImo+OXdDITcHUPDb7iYTj1HGb3/ThlK3FSYHnSWD0HkMUXuV1hO+n+IAUnhUmncGJJ0r0JUn0JN2jqS5GKpElH06QjDqmoIR0zpKPuGOFOapjPSgy238kERg52SPAEwQ5Z2CELT4ntBlOlXuwSH+L1utUkPd6B4M2TTbOHXWd6W0g0tdHzxA7S0TSO8VP56msJbtyALL18IFjyBic2BETWFAz6CDPrpnEqGcch/OBDNH184Oam9pZb8FRWENvxFyLbnyW2c1d/OwnvwoUEN292q/lt3ux2PDGWJ9exbjfI6j4Bhx6FP905dBvLdvNGIXYgP9gaHHz1Ly9w24QFKvr//5x0iocP/pJP/vm2gVKdiz/BVStePWqAZYwh6SSJJCNEU9H+VyQVGZgmo3nroqkoLZEWHjz6IE5OCa0gLCpdhIOT2S5GPBXLC4jGyhKLoB3E7/ETtINub4d9TUO2u+vqu7io7qJCu5iR+WSsAdNYbsqzJfdOdzfp7u7+QCnd051J63HThiz34PT05He4MgyrrAyrrNSt/jZSlbhg7ny2XVCBtJzSoeTp01NafXY6Ap3scccR7Ey1WRFc1QP1xphnRaQM2Aa8Dngn0GGM+YKIfByoMsZ8bKR9DZfBx9LlqlKz0KwMrrL64ilu/++93Pvk0bz0EbtuL4Yp7vjFtB2k+1e/4tRX7urv+ajiFZfjrV9IOgbpzg5SnZ2kOzpJd3SQ6uoa9mmmBAJ45lVhV1bhmTfPna+qwlOVmZ83D6e7naZPfw6SA70hiT84UnukiRt/SdLETfKgjzAz8sl0iB8+zKHXvd5twD6YbRM47zxCm84nuGkzwU2b8NbWTPygw1VFfM9jbjvFSBv0tWembTnT9pzlzPpk4TYiKctLd8l8ukqqaPZ6eaLvBM0eocuyiFgWcY+H1fPXgb+EqHGImjQRJ0nUSRJ14kRTsf5AKW3SBY9RiCAE7SC2ZdOT6Bmy/sLaC2kobSDgCRCwA/3BUXZejI/2sOFUV5qTHSmOtiU51pYkkbLBeAl4ApxTO4+19VWsbahkbUM559SVcSpynDf88gZi6YEb8YAnwI+u+xHLKmdeyVXBcc5gxJt7Ywzpri5SLS1Ed/yF07femt8pjmXhX7USE4u7wVQ4nF+lbjDbxlNe7r4qKrAqyvGUV7jLlRVY5ZnlinLSkQinPnmz+72eoaU6Z4WZH1wNOQGR/wK+kXm91BhzKhOAPWqMOWek9w6XwQ+19nLt1x4jnhq4tkm/gVNq8s3q4AqG77r9A1eu4ANXrp4VY8YYY3C6u0k2NZE4eZJUU1P/fLKpieTxEwV7tgOwysvd4GjePDxVVZlgaV5muRJ73jw3cKqqwp5XhRUKjX4+o7S5mhQzf9w7Da5GYdJpos89R9/Wx+n57/8mcWhob4E1n/gXqm64ASsYLLCHCXIcnP0PcrT1OVotocaBxur1WDlVEXOlnTQ9iR464510xbrojHfSHe+mM9ZJV6SVzr5muqJtdMW76Ir30Jnqo8cZuUeyoOMQNIagYwgah5BjMstuegghKF6CHi8hy0/QDhC0gwTtEEFvCSFfGUFfKUF/BcFABUF/JcHgfALBKiRQzol4F+969CbaTZIkgMhowc6wEimHAy29PH+qh91N3exu6mFPUw/huBtYeCxhcVWQ8tJeDsYfwvEdo6Ssifet+yQvW3wlSxeUFdrtlOST8QRRvmXLOPw3N+QFMFgWgfPWkO7uIdXSMmpPc4F16/A1LsaqqBgIlCrKB5YrBoIpCYXG3BZYS3XOWrMruBKRpcBjwDrgmDGmMmddpzFmyHDyIvIe4D0AjY2NFxw9enTwJuMfe0ep2WFcGXwseWWqFeq6XXBbHFSX+XnrJUt48yWNVJf5i3bM8dbJN8aQbm8nmQ2Wmprc+ZMD886g3pQkFMLbUI+3oQGxvfT+7ndD9rv4ru9QetllRbuuvHPO6y2wFt/KtZPfKcDMHgpizHllJuaTyZJsaaHv8Sfo3foYfX98Eqe7u79xfHz//rwSgMl+Ip9MJ/nZgZ9x+59vJ+EksMXm6qVXUx2qdoOmTBDVFXcDqZ54D4bC9yt+j5+qQBVV/ioq/ZXuK1DpLmemsWgHt277MgkngWUMIccwX7x880WfZlFJvVulN9GbaXPZC4lwznw2PZyzXSYtWbgDmMFSQMyy8HpL8AUqkGy1WW/IbUs2ZL4EfCE3zRsqMF+CYwc42Wexuy3JrlNRnjzUztGWTtpigs9yeODaPdjeVXTUbWHz0oL3PpOeT4YLSHwrV3L49dfnB1Ei7ndIgZIm/zmr8a9chV1bi7e2Bru2FpNO0/SJT+aVuE5FSZIGOmed2RNciUgp8Afgc8aY+0WkayzBVa6RSq4G38B5LHjwQy9hRU3BpzdKzQazvuSqUJXdL92wkZDXw71/Osqj+1rxeoTrNjTwjsuWcv7iygkdr9APe/3nbyO4YQOp06cLBk7JU6eGPBm1ysvxNjTgXbjQnTY04F3YgLdhId6FDXgqK/uffk5Hg+Bxdr98NtCSK9xOKCI7dtC3dSu9Wx8nvncvAJ7qBZS+eAulW15M6EUvwlNRUdQn8sYYuuJdnO47zam+U5zuO83pyGl3mnk1R5rz2iJleS3vQKCUDZAywVKlv7JgetAevWRtIm2uRtmx2119XtDV486f2Iaz7S66GjYSM2lKUnHKTz/vtr/0lbnvS0bcVyKSP++Ms+MD8WDsAJLsI22EGD5KJA7eIOF3/J6yRWsKvutMLnk8+aTQ9yEi7jhnsdiQ7cuvu46e3/42r6r0cN+f01WSpM46syO4EhEv8Cvgt8aYr2TS9lGkaoGDb+A8FqQduH7TQj5//XpOdkW1ows1Y4yjZGXWB1dQuOv2bB481NrLvU8e5SfbTtAbT3H+4kreedlSXrW+/oyqDPZt28axd75r1B6aPPPmDQqcFg5MFzbgKR17deJ0OkXrb35J182f6f/Br/zsp6i+9tV4JqFnsjPofrlox53KgE7H7xmb5MmT9G59nN7HtxJ58k9u1/q2TWjTJkpesoXSLVvwn3POkKpQ6XSKrgN7SLQ046uppXLlmmH/X/uSfXmB0unIaU71nuJ05DTNfc2c7jud1+4H3KCpNlRLfWk9daE6HOPw68O/HrLv77zyO1xcPzmDCGd7C2zra2ZBSS1LJrm3wFG7uB9JOlk46Er2ufvLm3eDNNN2ANnzX0N25bzjV1jLthQ6yqTnk76nnuLYO945JL30qpfT++gfhpSWLv35z0js2zfmgElLktQUmPnBlbjf6Pfgdl7xoZz0O4D2nA4t5hljPjrSvsbSW2BLOEZ1qZ9fPXeKrz68n/PqyznYGiY+FT2VqVlnpg4QmDEngqux6I2n+Om2E9zz5BEOtfaxoNTPWy5p5C2XNFJTHij4HmMMyWPHiDyzjcgzzxDZto3ksWMFt6165zsouexFOHXVODXzSfqEeCpOPF34lUgniKVj7jTlTofbtivWxZ72Pcz3lGM7kLagLd3NssrlhGy3DZUlFiKChQUCFu6yiCCIu56xLfcl+9h6cmteKYBHPFy3/DrmB+djWza2ZeO1vHgtr7ssmTSPt38+u03B7Qets8TiiZNPcOuTtxJ34vgtP7dtuW3SAjodv2d4TjxO5Oln3NKpxx8ncfAgAHZDPaVbXuKWTl166YgPCAZ/vj7Lx/9Y/z9oKG2gJdIyEEBlSqHCifw2hYJQHaymrrSOulAddSV11JfUU1dS1/+aF5iX97c60n2EGwp1vjB8t+Gzz1S3TRx/MDep+cSkUpz+3Ofo+sF9+QcdJYgCNGBSM8msCK5eDGwFdkJ/36OfAJ4CfgQ0AseAG4wxHSPta7w/hF9/ZD9ffuiFvDTt6EJljbeKgUmn3cH+ohGcaNR9RSLu4ID9y1GcaGY5kknLWU51dhB7bmded68jVCE7a4KrLMcxbD3Qxj1/PMLv97VgW8Kr1te7VQYbykjs3+8GU9u2Edn2TP+4O1JZQXLtCo7X2+w4tY3tSw3t5ULChqQtJIM2STNMd89j5LW8+D1+fB4fAU/AndoBEukEh7qHdg6wZt4ayn3lODhupxiZYMgxDgaDMQaDGXnZmP73Z9OiqSit0dYhx/N7/P1dSA/XVqXYAp4AXs9AUJYboA2eLzQtuM7jJZwI88O9PySV8zc7W8fvMcaQPHrULZ3a+hiRPz/tfl/5fIQuuojSl2yhZMsWfMuWjdpQP5FOsK9jH4+eeJR/3/nvBavpAVT6K90gKVRHbUltXuBUX1JPdagarzW+AXCnq8R1yk1l28RpHrIg938Wj4fWr/1vok8/TeiSS4js2AHxuAZRajYadz6Z8mHQjTGPM/yJvnwyj33h0qFNuGJJh5ZwTIOrGaqYJUkmmcTp68uMaN6L0+u+0r29OL19JI4do+Puu/sb05pYjJP/+GECa9eCMQOBUSZIGq3HoiG83sw4F+5LQkFIpYeMo2FiMVKtrZPWPmc2sSzhitXVXLG6msNNnTzwk99z+qffY9f/PQidRwkm3Ce0yeoKWlbOZ+/LKvljTRe7Sjsx8hwAJasCNJ6Is+a4g8948GzegHfxIhaXNw4JjHKX/R7/wLqcNL/tx2f58FiFx/UZ7on87S+5fVKeyI+lBCDtpEmZFMl0kpSTImVSpBx3OWkyaU6KpDMwP3g5O590khzsOsj3935/yLm8ZNFLWBBcMOz7stOkkySSihRML/SeQmLpGG3RtrlTypFj8IMe/H7mvf3tOL1h+h5/guTx4wD4li6l8oYb3NKpiy4asVc/xzgc7j7MrrZd7Gzbya62Xezr3Dfs5wu4wU7jVYS8o/daOV6WWFy15CpWVa2iLdrGguAClpQvmVuBFbhBzYJVkzdEweBjnftq+PvzpryjmSH/s4D4fNR/4fNUvOY1wwZR/mXL9LdOzTlTHlxNp9ryAAGvNaSnsq5IkkOtvdoOaxTTVWXu5Ec/5vYG5PNRfdMHCKxbh4lE8gKjbKDk9PW6wVNvTvDU5y4Xajw7KsfBJBLYtTV4gwvdwCgUdAcJDIaGLocygdOgZSsYRHy+IbsfrvMDu7p6Ih/dnJDu7SO6fTuRbc8QeeYZYs89x5UJt+1US3WQJ9YIzy/2sLcR2ir68FkpVlQuZ1XVBl5ZuYpVVasIeAJ86vFbuOGSq5nXK3SUGu7pfpCvb7x10m7KG8sb+dyLPzfkifyS8iXTdjyP5cGDB7+nOL0wHuk+wv377x8S0L1/0/uL/rkaYzjYdZA3/uqNxHO61g54AiwIzs3eX+NHjnDynz860JNaPE7Ht7+NBAKUvOhFzHvXOyndsgXf4sUF32+MoTnS3B9E7Wrbxe723fRlerYL2SHWLVjH2857G+sXrKfSV8k/PPwPQz7f9QvWT0pglWWJxbKKZXMyQJ42UxnM5UgcPZoXWIHbC2xw40bEsjSIUmeVsyq4Wjq/hK+84fz+ji68HiHks/mH7z2LJW6nF9oOq7Az7ZXHOI5bVS4cJt0Txgn3kA6HB5Z7c9N7cXpy1nd1ke7qGthZIkHrl75c+EC2jae0FKv/VYK9YAHW0qX9y57SUqyS0vzl7KuklFR7G0fe9OYh3bou/LevTtqPgm/JEhpu/8LQbmqXTM6N+Eww0HD+NL6auv6G86n2dvqeeYb2P22l75mn8Rw8jjiGtAVHai2eP9+wd7HFC4s9VNUuZEXlCsqdhVSdKOXowSDR1AJq1y/k+g1L2NxYhYjgGIcPXvihgcCjd3IDHZj6J/LTUQIwlQGkiLC8cjm3bbltygLW6WASCSLPPEP40UcJ//dv87uozlh05zcovfzyIend8W52t+1mV/tAqVRb1K0ia1s251Sdw3XLr2PdgnWsX7CepeVL80peHePM+c9XTa5US8vQB5iJhNbCUGelaR9EeCLOpH784J7KwrEU1//fJ0jnVDX328JvPviSGV9VcKp66zKJBJGdOzn2rr/N/8G3bSrf8AbE43GDoWxQFA67QVJvrzuYqlO4Hn+W+P1Y5WV4ysqxykrxlJXjKS/DiUTpffTRIdvXfPzjhC68EE9pCVZZGVZpKeLzjXkgwGGvc+YPEDjr21xle9Lr/OSniZg4XRU2VuNCQic7KT/dA0DChhcahL2L4fSKKmTDGpbWnsuqqlWsrFrJiooVBOz8Ti2OtUe498kj/PCZ44RjKdYtLOedly3jug312BbsaTtEc6SV2lA1axYsx/YUrtKnxi77/TNVAd04jzfj2lwVKvlPd3TQ+9hWeh99lL4nnsDp60P8foIbNxB5dnvBcafM4nr2dux1S6Ta3VKpoz0DYw4tLV/K+gXr+wOp1fNWj6nEcqr/nmpGKFo+mY4hKJSaIjO/Q4tiKsYP4XADDn/gyhV88MrVHOuMjKm64HR0S7z12GO0H9hFRdihp9zDvBVr2dL4kmGPa4zBRCKku7pIdXb1lwz1vzo7Cy4PHjB1MKusrD8oyg2OrNIyN2jKTrPry8vxlJVl3leGVaC6HEzPl/UM79Z11gZXxhiO9Rzj6Z9/i8SPfs6SZod5ve663gAcWOyh45w6zMbzmL/xIlbWnMuqylVUBirHdZy+eIqfbT/JPX88wv6WXuaFfFy8bB6/39esPYSeXaY1uBocSHkXL6b3kUcGqjjbNt6FC93eLI3Brq2l9KUvpfSlV1By6aUYn5fW3/yS9ls+zYmSOAeX+Dj26s0cKuljf+f+/o49aoI1bhBV7QZT580/j3Jf+YTPX501ipZPdMwpNYdpcDVehQYcFty6wouqgjT3xEimR74pK2avR8m029A7mooSS8WIpqL9r1gq1r+uKdxE3/O7sH//FP5YmmDawr9sOaWhSipiFr7eON7eGN5wDDscxROOYPdEkNTQkc+zTGkIKsqgohypKMeqLMeqqMSqrHAHhfze9yCRwjJgp8Hr9bH0Jz8huGpy6nbrl/UQMzK4KvRgQRCOh4/z9Kk/c2DbIwR+/wznP9dLTTckPXC0GvoC4E1BTTes+PL/puElryjaORljePJgO3f+/gBPHGzPW2dbwh03bOAlq6qZX1qcNkhqxpm24KpQZxQ1H/wgLV/+cn9nOe4ZClVveyuVr389/nPP7S95b4u28fP9P+fbO79NOp0ibhKZCxI2VG/gorqLWLdgHevmr6O2pHZC56rOepPTW+DMfDip1JnS4Gq8Bg84HPBafOmGjTR1Rvnib/eRcgzV5XBufYAjLYZ7/vbSIdUFD3cf5oZf3JDXGNgWmzee+0aCdjAvQMoNlAotZ59I+hOGeWGYHzbM72FgPgzzMmnlUQpKC4SDEA65096gZKbQExR6g5n1mfmekHuj64zzSb4g+D1+gnYQv+32rJbtTS07H7Azadnthlkf8ATw2/4h8ztO76D36AEW9Fr0ltksWLV+xNK5iZrqEshxmnHBVbYEtW3/TpLdXezyNtPk7SN2+CDnPNvOZXscFrW7/1t956/Af8lF+O76KcQHqpdKIED1D+9l/jnri35+w5VMZ80r8bGyupQVNaWsrCllVWZaXxGYcDVTNa2mJLgqVNUvcfQoh173+ry2m8NpvPceAhdewK72XWw9sZWtJ7fyfPvzw25/19V3cVHdRWM+P6VGMeOqzyo1A838rthnGssSrllbx7k3belvh7V0fgnbjrXzkdfHufPJ/6a9YxNb9y1GxPCRH2/jry7wUjOvkyPhgxzoOsDutt15gRVAyqT47p7v4hEPQTtIwA4QtIMEPQEqU34aeoX5YR9VPTaV3UFKuxKUdsUIdkTwd/Rh9xXo2a6yHKmpxl5dg2MJicf+iCcnNnaAeV//EhUvfRmOcUibdH93yGmTJu2kSZokaSc9sOwk++ezXTRn1+cu7+/cz8/2389loXX44w49vhR/juzl8oWXUxWoIpaKEU/HiaVj/YOxhhPh/oFVc9eP1PXviHqAk+6YKyXeEvfzzHy2AU9g4DO2gwQ8AYLeYMH0vOXMe4PeIH7Lz6PHH+XmJ26e0nFXZnhA169QRxR7O/byzB9/wiNNfyBmGy7bY7hxDzQ2OxgRrE3rqfnA9ZRffTV2VZXb5mrFerpu/kx/aWTlZz9F5co1k3LOhXoI9dvCZ167jnAsxcHWXg609PKbXafoiiT7tynxeVhZkxt0lbGyppTFVUFsz8z726ipV6iEqvJ1ryX+wv4hgVXpVVfRu3Vrf3o4CM+t9nFX27386UcfoSvehSUWG6s3ctOmm1hRsYKPPvbRs6Z3RKXUzDEd9yTT0bRmMo931pdcQeEPeXfLQT629Sa2BNbS2dvGPqeLw7FWjNUL4t6oCRb1oUZWVC6irjXFkp88xcLTSUodL97rXklp/RKqwg6p5mZSzadJnm4mdfp0wTZMnuoFeGvrsOtqB6Z1ddi1mWlNDVZgoBF/7PBhjhRoj7T0/p8SWL58wp/JYGMZS2es0k46LxCLpWNDgrNYOsae9j18Z9d3hrz/ikVXUOYrc0v70lGiyWj/PrKlgLG0Oz9RgrCkfAllvjJ8Hh8+yx3ryOvx9pfI5Q4mmx0LKW/eGj7dtmyeOvUUt//5duJOfLSAbtpKrrIdUXTd/BmcWIyDS/08/ua1tBzazZpDCS7Yb2jozJ6lEHjXW1j0jnfjra0puC83SGvGV1Pb31vgZChUMl2oeq8xhva+BAdaeoe8TvcM/M/7PBbLFpSwsraUldWZwKu2lGULSvDbnrzjHmnv0+Edps+kDY6aLaGKHzrE4ev/ekivfp7qatIdHXlVAO3GRnjvm3ng519h6zlpXmgQjAXlvnKuWHQFWxZt4bKGy6jwVwBn0QC7arppydUsMJWBx3R890z1Mc/geFotcLwGf8g+y8e1y67lUNch9rY/TxL3B7K2CxbNX0Z941rqZB1NO6I0b2+luquNc2NtrDr1AvOj3VgM+jwty23QXFuLXVeHt64WuzYzratz06urC46BNJKpbo80HRluogGdMaY/6OqvhpmO5i+n3MAsmoxyoOsAPzvwsyH72VSziZAdIuEkiKfjJNIJEumceWdg2TEj94w4FiNc45QFV4NvJvsSvTS/4a3srE1wYoGwuB3OOWHwpt32iYNPrPqub7LgsivO9HSLanAPoeMNdHpiSQ4ODrpaeznWEekf/9kSaJwXcku7qkuJJtPc9+djJNIGvy189cZN2onG1Jq0hvp4vQTXrye+bx9OX9+QfSz+7n/Se/r4wIOIJX7+8K6NPBjfjsHQYM1jZckSdiWO8sUrvsgl9ZcUPBftvU9NAQ2uxmk6SljO5N7LGINjnP7aR9mB4/NqJmVqNeXWUjoePs6nnvgUCWfgoZHX8vKRCz/C/OB8HMetFZU26f4aUrm1ofrTcrdxBuZTTipvG8c4dMW6ePTEo3n3TxYWF9RegN/292+f3ZdjHByc/nPJXZ+3rUkX3CblpPLuK2HUe0sNrkYzOGMYY3jvQ+9lmVXNnr6DdBi3C7PFgXo2P3aKi55PsawFvGnAsvDU1ZJubsl7KtkTquBwaAEnSmtIeGx86SShZIzGt9zI+r+6kkXVZXgm4aZqqhuPTkfXy1MZ0BWjdC7lpAoGX0OCskxAtrd9L3ftvmvIfoZpW1H04KrQE3kgf/Bm2yZ6zmLYf5hg5vu2JwjBONR++MN0fP3OIWODTVYJ6kwSS6Y51NrHgdZeDjSH3WlLL4da+0g5Q79Xs9UKa8oC1Jb7qS4PUFPmp6bMT215gAWlfnz2mf1fa0nZEJPaxTRAyRVX0PfHP0JyoDpptv3g23Z+lPV2IzvCe2lyOvBa3v4f96wzLflXqohmfXA1FcGOMYaEkyCSjPDgkQf54tNfJOEk8Fk+3r3+3Wys2UjapEmmk/1BTNJJutNMWu60f52TP19o2pvoZXf7bkzOg3tBqA3VIiL5gVMmUMqmzRQe8WCJhW3ZWGLhEU9/msfykHJSdMQ6hryvsayRMl9Z/7bZ7S3cecuyBvYz3NQamt4SaeHBow8OOd4IbVq1zdVIcrsvL+1J8ZD3BDud45yKNNHTd5KrtztsPmyxqKKRkrY+nOZB/5yOg2/hQkKvfS3+ZcvwLVuOb9lSTh06QeLdf88+byN/rl3D8bIaevyl8ALwwlZ8tsXyBSWsqC5lebU7zc6X+M/8TzDVo55bYrGsYtmU3QxM9eCoxRgY1bZsbMsm5A2Nafs189bw/b3fHxLQTUXbikKln3X/61Okwz203H7HwAOEVIrwicO8sFKoChvWHHc7U5FAAO8Vl7NwceOQElT/0qWTfv7TLeD1cF5DOec15Hd9vXV/C2/7ztNDti8L2LSE4+xq6qG9N06B+It5JT434MoJvLLBV025n5qyANVlfgLe/CqIY6n6qM5MwcFRgfl//x4qr3993v9+7LMf5NaT/87xvhMc50T/tpX+Sv7xgn/kM09+RgfpVSpjuMBorAHT4AewfsvPxy7+GBfWXUg8HXdrpySj/bVWcpezTQf609KDOh5L5m9TqFZKwklw51/uHPd1e8TTf6/gtbwjTpNOMi+wAjAYllUsoyZUg23Z/fvzWB5ssfvn+48jg5Yz7/FYOeszy+3Rdm79060knYGHRj7Lxx1X3EFjWSOWZWFLTpCUE7xkj5EbPFlijdo51HAPtr/x8m9Myv3mke4jPHbisUm975qzJVeFnsgf6zlG60MP8OvffZM/LU9T3wkXnPCxeXecij4zEJqKELjwQmLbCw/iODiYOdIaJvzQQ3i/eGv/j2z7h2+hc8PFRJKGg629mVcfxzoipHPuquorAplgq4TlmaBrRU0JdeWj91amT6uLb4aXzhW15Gq4J/LgVvU7WA+PbLQ4VAdXHCvlza/4MN2f/kJeRxTV174aSyztfjdHoeEdAl6LB27a0t/TaCrt0N6XoKUnTks4Rks4TnOPO23pidMajtHcE6e1N573fZFVEfRmgjA/IZ/N7/Y25w2E7vMI33zbBaxtqKA84CXgHf0Hbrxm+PfPpA+OuvT+n/KU5xjN+//C0Y5D/CH9PEcTp/Fa3v7qJ1kBT4Afv/rHGIxW81MzyZSUXBUKloCCv31XNl7J7479jk9s/QRxJ47P8vGWNW+hsbyRrngXnbFOOmOddMQ7aO5r5kDXgTO5BGyx+zu2ynZ+1b+c2wlZzqsl0sJ9++4bsq+PXfQx1i1Yh9fjxRYbr8eLV7zucoGAaTz5vpjt3cdC21xpm6sRqzoNeSL/qVvY3vQMe//wc5adNixpzWxs23kBVFbj975Luq1tTG2aHMfw6N5mWvcdoCrSQ2eonOpzVvLSc2uH3GzEU2mOtUc42NqXF3QdauklHB84jxKfJxNs5QddS+eXEPB69Gn1HDKOgK6owVXfU09x7B3vHLLtqQ+/gX9N/JRwEF7zlOE1TzmUSIDKH96NF2tKOqKYzYqZNx3H0BFJ9AderZlgrDknKDveEaGtNzHifnwei/KgTXnAS1nQS3nApjzopTzg7U8vz6RXBL1D1uWWlBX7GsfzWYwjmJv0wVE7Ll7N9b/667wnvLbY3HPtPZzuO62dUajZYNKDq+FuZJdXLOfGX92Y17bHwmJx+WKO9hwddn9BO0iVv4qqQBWWWOxs2zlkm3evfzdr56/tD5z6exDOWfZa3nFf91QHOjB9wc5Ut/ecjgfb4zje7A+uROQa4GuAB/h3Y8wXhtt2uAweP3w4b5wRR0CM++kkPJC0oSTTRGTeu99N53/+55Cnkst+dn//mCVjeSI/0Ubzxhhaw3EOZIOtzPRgSy8nuwZ6vROBxVUh6isCPHO0Y8jT6jvfspnVtWUEfR5CPpug11O09l7T8aR6qo85w69xUkuuYl74z1d4eWijoVHmc9O9XTSeiCOBAOmb30fpVVexpHLpmZ7CWWWi3wfjcai1l2u/9hjx1MB3udcjfPyacwn4PHRHk/REU/TEkvREk/TEUplpJj2aJJEeuSMWn23lBVtej7DtaGde1UbbEv728qU0VAbxez0EvBZ+e2Dqty0C3vyp3/bg91r47ZFL1s4gmCvqTePgHi7bFni5+Y+3sLdj75Bt77r6Li6ovUA7o1CzQVHzSaESqqM9R4eMAypIf5W3wc6bdx7Pdwwd6+2LL/kiL138UoJ2sD/tbCjVyR5Xv0+m1ewOrkTEg9tS6RXACeBp4E3GmIKjKg6XwXOfyDsCLzTAX5YLizZcxsX/8TTeyMCTEruxkZqbPsCpm2+Zkl73zkQ0keZQ20CwdbC1l50nuznaPrRL90L8tkUoG2z5PIR8HgJeTybNQ9BrD8z3T21C3oG0gO1hx4kuvvLQPhIp0z9W0FVrarE9FrYleLIvkaLcSE710/Hpeho/jmMWNbjK7V79hXkxvvEam9NVwlvXvJXNCzbRc3gfFWGH7jKL+SvXTergzerMFeP/NpZM9wdc3SMFYpn0pq4oB1uH9pQ3EW6wlQm8BgVmxhh2HO/KC+YGV7UcpGg3jYNvqDzink/IGyKWiuU1HNdOKtQsM2n5xG/5uX719RzoOsDTp4e2Qb16ydU8cuyRIfnnP67+D97123eNKWA6W0p11LSb9cHVi4B/NcZcnVn+FwBjzOcLbT9ccNW+bycn3/w27rs4wX9faFHXAe972OZF3/g+9qHjQ6p3lL785SSPH59VbUaGe1r9iVetoSzgJZpIEUmkiSTSRJNpIpnlWDI9kJ5w06OJNJFMeiI18a7EwS1h80h+wOXxSH7aoIBscFoy5bD7VA+5/6KWwKbFlQR9xa+OFk2k2D7oBm4yjzfcMUe4aSxqcHW4+zAfePj9LJNqHgs/S5mnhIA3xLev+XeWlC/RH5BZZCpLyqBwuzK/Ldz/Py+nviJIPJUmlnQGpsk08ZRDbNA0b74/bdB7U2nawnH2NfcOOY/73nMJly4v2Ai5aDeNh7sP84ZfviHvZs8jHu699l6t/qdmu0nNJwAVvgp6k71Desr88at/zAudLwzb5mqs+UqDHTUFZn1vgQuB4znLJ4C8QUBE5D3AewAaGxsL7uR4RRLrY/+TU7u+wWufTHP9s174l/dxvCzOhle8gmWrVw8JpKay171iWDq/hK/euKnopSyptEM06QZe0ZxAbNvRDm57YGgVmHdctoTFVSHSjiFtDI5jSDkD07QxpNOZqeO+HGNIDUrLW5eZ70glGBz7Owa3bVqRG+eDu9/BfQdM5vGGO2Ys6dASjg33RH7MRssrrZFWjvYe4yjHAOhO99Kd7qUt2tbfK6Q+gZ8dLEtYXl064f+ZsVo6v4SvvOH8Id8/a+rKJyWoG66TkJqywAjvGpux5JPBN4xp4w6EPpW9mSo1nc4knwB87WVfoz3WPiRYaixvpLG8sWD+GU++mupejJUai5kWXBX6Vc679TTGfAv4FrhPTwrtpDI4j/d7/ou3b/lb5vdZ7H2j4Z7un/P14FWzMpAqxLKEa9bWce5NW4r6tNr2WJR5LMoC+Y09q0JevvLQC0Nubt7xoqWTdkM33A3VN996waQcc6qPN9Ixi3HTOFpeqQnVEPAEpqUbeDW7Tdb3z3CGC+aWzi+Z8L4nkk/0xk6dLc40n8wLzmNT7aZhg6VC+UfzlZrtZtojthPA4pzlRUDTeHfSWN7ITRd8kDuav8eHur/NF09/l5su+OCcG1Mk+7T60uULWF5dOqnVgLI3NwGv+y9TzJubmXLMs+Eac2XH9Qp43EBOx95R4zGV3z/ZYO6Bm7Zw33su4YGbtkxZz6iaT5Qa3Uj5JBssXVR3EcsqlmnprprzZlqbKxu3Q4uXAydxO7R4szFmd6HtR+oOVOvhFt9Ut+uYjmPO8Gssapsr0Hyi5qxJ6QVN84maYzSfKDW62d3myhiTEpH3A7/F7Yr9ruECq9FosXLxTXW7juk45tlwjXnH1nyi1Kg0nyg1Os0nSrlmVHAFYIx5AHhgus9DKaWUUkoppcZDy2uVUkoppZRSqgg0uFJKKaWUUkqpIphRHVqMl4i0AkdH2WwB0DYFpzOd9BrnhtGusc0Yc82Z7HgMeUU/37lBr9F1RnlF8wmg1zhXaD6ZXHqNc8Ok5JNZHVyNhYg8Y4y5cLrPYzLpNc4N03mN+vnODXqNc/fYU0WvcW7QfDK59Brnhsm6Rq0WqJRSSimllFJFoMGVUkoppZRSShXB2RBcfWu6T2AK6DXODdN5jfr5zg16jXP32FNFr3Fu0HwyufQa54ZJucY53+ZKKaWUUkoppabC2VBypZRSSimllFKTToMrpZRSSimllCqCORtcicg1IrJPRA6IyMen+3yKRUTuEpEWEdmVkzZPRB4Skf2ZadV0nuNEiMhiEfm9iOwRkd0i8sFM+ly6xoCI/file/pK5xk9n0qflGudiXtF8MieuUfPJJJvr+QQ0r0z1NWo+mZ00nxT3GudkcCUiHuBO4FrgPOBNInLe9J5V0dwNDB7M7OPAI8aYVcAjmeXZKgV8xBizBrgUeF/mbzeXrjEOXGmM2QicD1wjIpcyDdc4h/PK3Wg+me3XqPlk8t3N3M4noHllyq5R88mspvmkiNc4J4Mr4GLggDHmkDEmAdwHvHaaz6kojDGPAR2Dkl8L3JOZvwd43VSeUzEZY04ZY57NzIeBPcBC5tY1GmNMb2bRm3kZpuca52Re0XwCzP5r1HwyyeZ6PgHNK0ztNWo+maU0nxT3GudqcLUQOJ6zfCKTNlfVGmNOgZtBgJppPp+iEJGlwCbgKebYNYqIR0R2AC3AQ8aY6brGsymvzKn/oSzNJ5pPimxO/Q/l0rwy6deo+WQO0Hwy8Wucq8GVFEjTPudnEREpBX4KfMgY0zPd51Nsxpi0MeZ8YBFwsYism6ZT0bwyi2k+mTKaT2Y5zStTQvPJLKf5pDjmanB1Alics7wIaJqmc5kKzSJSD5CZtkzz+UyIiHhxM/f3jDH3Z5Ln1DVmGWO6gEdx63NPxzWeTXllTv0PaT7RfDJJ5tz/kOaVKbtGzSezmOaT4l3jXA2ungZWicgyEfEBbwR+Mc3nNJl+AbwjM/8O4L+m8VwmREQE+A6wxxjzlZxVc+kaq0WkMjMfBK4C9jI913g25ZW59D+k+cSl+aT45sz/EGheYWqvUfPJLKX5pMjXaIyZky/gVcALwEHgk9N9PkW8rh8Ap4Ak7lOivwPm4/Zwsj8znTfd5zmB63sxbjWC54Admder5tg1bgC2Z65xF/CpTPq0XONczCuaT+bENWo+mfxrmtP5JHONmlem8Bo1n8zOl+aT4l6jZHaslFJKKaWUUmoC5mq1QKWUUkoppZSaUhpcKaWUUkoppVQRaHCllFJKKaWUUkWgwZVSSimllFJKFYEGV0oppZRSSilVBBpcKQBEpFJE/mdmvkFEfjLd56TUTKR5RanRaT5RanSaT+Ym7YpdASAiS4FfGWPWTfe5KDWTaV5RanSaT5QaneaTucme7hNQM8YXgBUisgN3ILU1xph1IvJO4HWAB1gHfBnwAW8D4sCrjDEdIrICuBOoBiLAu40xe6f6IpSaAppXlBqd5hOlRqf5ZA7SaoEq6+PAQWPM+cA/D1q3DngzcDHwOSBijNkEPAm8PbPNt4APGGMuAP4J+D9TcdJKTQPNK0qNTvOJUqPTfDIHacmVGovfG2PCQFhEuoFfZtJ3AhtEpBS4DPixiGTf45/601Rq2mleUWp0mk+UGp3mk1lKgys1FvGceSdn2cH9H7KArsyTF6XOZppXlBqd5hOlRqf5ZJbSaoEqKwyUnckbjTE9wGERuQFAXBuLeXJKzSCaV5QaneYTpUan+WQO0uBKAWCMaQeeEJFdwB1nsIu3AH8nIn8BdgOvLeb5KTVTaF5RanSaT5QaneaTuUm7YldKKaWUUkqpItCSK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJKzQgi8oCIVE73eSillFJnSowx030OSimllFJKKTXracmVUkqpMROREhH5tYj8RUR2iciNInJERG4XkT9nXisz21aLyE9F5OnM6/JMeqmI/IeI7BSR50TkrzPpR0RkQWb+rZl97RCR/ycinszr7sxxd4rIP07fJ6GUUkoNZU/3CSillJpVrgGajDF/BSAiFcDtQI8x5mIReTvwb8B1wNeArxpjHheRRuC3wBrgFqDbGLM+s4+q3AOIyBrgRuByY0xSRP4P8BZgN7DQGLMus13lZF+sUkopNR4aXCmllBqPncCXROR24FfGmK0iAvCDzPofAF/NzF8FnJdZD1AuImWZ9DdmE40xnYOO8XLgAuDpzHuDQAvwS2C5iHwd+DXwYHEvTSmllJoYDa6UUkqNmTHmBRG5AHgV8HkRyQY4uQ14s/MW8CJjTDR3H+JGTCM1+BXgHmPMvwxZIbIRuBp4H/AG4G/P6EKUUkqpSaBtrpRSSo2ZiDQAEWPMd4EvAZszq27MmT6ZmX8QeH/Oe88fJj2vWiDwCPA3IlKTWT9PRJZk2mNZxpif4lYt3IxSSik1g2jJlVJKqfFYD9whIg6QBP4B+AngF5GncB/avSmz7U3AnSLyHO7vzWPAe4HPZtJ3AWng08D92QMYY54XkZuBB0XEyhznfUAU+I9MGsCQki2llFJqOmlX7EoppSZERI4AFxpj2qb7XJRSSqnppNUClVJKKaWUUqoItORKKaWUUkoppYpAS66UUkoppZRSqgg0uFJKKaWUUkqpItDgSimllFJKKaWKQIMrpZRSSimllCoCDa6UUmoOE5G0iOwQkV0i8mMRCWXSa0Xk+yJySES2iciTIvL6zLqXiogRkb/L2c+mTNo/ZZbvFpHDmX3vEJE/Ts8VTh8RqROR+0TkoIg8LyIPiMhqEYnmfC47ROTtIlKW2W5V5r1eEdkpIpdM93UopZQqHh1EWCmlZohwLNm451T41uaeWENdeeDUufVlN5cFvMcmuNuoMeZ8ABH5HvBeEfkq8HPgHmPMmzPrlgCvyXnfTuBG4DuZ5TcCfxm07382xvxkguc36cKJcOMLnS/c2hppbagJ1ZxaVbXq5jJf2YQ+VxER4Ge4n+EbM2nnA7XAwexnPug9/wLcCbwS+Cfgj8aYpyZyHkoppWYWDa6UUmoGCMeSjb/ZefrhT/1i16pY0iHgtfjMa9Zdeu36uquKEGBlbQU2AFcCCWPMN7MrjDFHga/nbHsMKBeRWqAFuAZ4oEjnMWXCiXDjw0cffvi2p25bFUvHCHgCfOKST1x61ZKrrppggPUyIDnoM9whIkuHe4Mx5kci8rci8lHgvcCmCRxfKaXUDKTVApVSagbYcyp8azawAoglHT71i12r9pwK31qM/YuIDVyLWyK1Fnh2DG/7CXADcFlm+/ig9XfkVH37XjHOs9he6Hzh1mxgBRBLx7jtqdtWvdD5wkQ/13XAtmHWrRhULXBLzroPAbcDnzXGdEzwHJRSSs0wWnKllFIzQHNPrCEbWGXFkg4tPbGGCe46KCI7MvNbcav5vTd3AxG5E3gxbmnWRTmrfgT8EDgX+AFukJVrxlcLbI20NmQDq6xYOkZrpHWin+tIClYLzLgGOIUbnCmllJpjtORKKaVmgLrywKmAN/8rOeC1qCkPNE1w11FjzPmZ1weMMQlgN7A5u4Ex5n3Ay4Hq3DcaY04DSeAVwCMTPI9pUROqORXwBPLSAp4A1aHqiX6uu4ELxvMGEWkAbgIuBl4lIhsmeA5KKaVmGA2ulFJqBji3vuzmz7xm3f5sgJVpc7V/TX3ZLZNwuN8BARH5h5y00DDbfgr4mDEmPQnnMelWVa26+ROXfGJ/NsDKtLnav7pq9UQ/198BfhF5dzZBRC4Clozwnq8CtxljTgAfBu7MdIyhlFJqjhBjzHSfg1JKKQZ6C2zpiTXUlAea1tSX3TLRzixEpNcYU1ogvR73Zv8SoBXoA75pjPmhiLwU+CdjzHWD3vOvQK8x5ksicjdwBdCds8nFmZKxGSW3t8DqUHXT6qrVt0y0t0DoL4n6N9wSrBhwBLdN1XPAvpxN7wL2AJ8BLjOZH14R+QXwU2PMPRM9F6WUUjODBldKKaWUUkopVQRaLVAppZRSSimlikCDK6WUUkoppZQqAg2ulFJKKaWUUqoINLhSSimllFJKqSLQ4EoppZRSSimlikCDK6WUUkoppZQqAg2ulFJqDhORc0RkR86rR0Q+NMy2XxORkyJi5aS9U0RaRWS7iOwXkd+KyGWD3vdPIrJXRHaJyF9E5O0566pFJCkifz9pFzkNRCSd+Tx3iciPRSSUSa8Vke+LyCER2SYiT4rI66f7fJVSSk0NDa6UUmqmiPU0cvSP97Dr/oc4+uS9xHoaJ7pLY8w+Y8z5xpjzcQe7jQA/G7xdJqB6PXAceMmg1T80xmwyxqwCvgDcLyJrMu97L/AK3AGE12XeKznvvQH4E/CmiV7LmUqHw42RZ565p+eBBx6KbNt2bzocnvDnCkQzn+s6IAG8V0QE+DnwmDFmuTHmAuCNwKIiHE8ppdQsYE/3CSillMINrPb818M88M+rSEbBG4RX3XEpa157FYHyY0U6ysuBg8aYowXWvQzYBfwQNxB6tNAOjDG/F5FvAe8B/hH4BPAyY0xPZn03cE/OW94EfAT4vogsNMacLNK1jEk6HG4MP/jgw6dv/ewqE4shgQB1t9x8adkrX3mVp6ysWJ/rVmADcCWQMMZ8M7si81l/vUjHUUopNcNpyZVSSs0Ezbtu7Q+sAJJReOCfV9G869YiHuWNwA+GWfemzLqfAdeJiHeE/TwLnCsiZUCZMeZgoY1EZDFQZ4z5M/Aj4MYzPvMzFN+379ZsYAVgYjFO3/rZVfF9+4ryuYqIDVwL7ATW4n42SimlzlIaXCml1EwQPt3QH1hlJaNuehGIiA94DfDjYda9Cvh5pgTqKeCVI+0uZ2pG2O6NuEEVwH1MQ9XAVEtLQzawyjKxGKmW1ol+rkER2QE8AxwDvjN4AxG5M9MG7ekJHksppdQsodUClVJqJiirP4U3SF6A5Q1CWV1TkY5wLfCsMaY5U6L0y0z6N4EmoALY6TYbIoTbNuvXw+xrE7DHGNMjIn0istwYc6jAdm8CakXkLZnlBhFZZYzZX6RrGpVdW3tKAgFyAywJBLBrqif6uUYz7dgG9iuyG/jr7LIx5n0isgA3AFNKKXUW0JIrpZSaCWrX3syr7tiPN+guu22u9lO77pYiHSFb7Q9jzPFsJxeZ9kFvAv6HMWapMWYpsAx4ZbYHvFwicgVue6tvZ5I+D9wpIuWZ9eUi8h4ROQcoMcYszNnv53FLs6aMf/Xqm+tuuXm/BALu+bttrvb7zzmnWJ9rrt8BARH5h5y0IZ+hUkqpuUuMGalGh1JKqSkT62mkedethE83UFbXRO26W4rRmUUmSDoOLM90ODF43QlgabZTikz6/bidWwSBO4CTuIHCYeAzxpgnMtsJ8M/A3wHJzOvLwEogYIz5eM4+NwD3GWPOm+g1jUc6HG6M79t3a6qltcGuqW7yn3POLRPtzEJEeo0xpQXS64GvApcArUAf8E1jzA8ncjyllFKzgwZXSimllFJKKVUEWi1QKaWUUkoppYpAgyullFJKKaWUKgINrpRSSimllFKqCDS4UkoppZRSSqki0OBKKaWUUkoppYpAgyullFJKKaWUKgINrpRSSimllFKqCDS4UkoppZRSSqki0OBKKaWUUkoppYpAgyullFJKKaWUKgINrpRSSimllFKqCP4/TwLWrAvIo1wAAAAASUVORK5CYII=\n", "text/plain": [ "
" ] @@ -111,7 +111,7 @@ " * @author Feross Aboukhadijeh \n", " * @license MIT\n", " */\n", - "\"use strict\";var e=t(\"base64-js\"),n=t(\"ieee754\");r.Buffer=a,r.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},r.INSPECT_MAX_BYTES=50;function i(t){if(t>2147483647)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"');var e=new Uint8Array(t);return e.__proto__=a.prototype,e}function a(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 l(t)}return o(t,e,r)}function o(t,e,r){if(\"string\"==typeof t)return function(t,e){\"string\"==typeof e&&\"\"!==e||(e=\"utf8\");if(!a.isEncoding(e))throw new TypeError(\"Unknown encoding: \"+e);var r=0|f(t,e),n=i(r),o=n.write(t,e);o!==r&&(n=n.slice(0,o));return n}(t,e);if(ArrayBuffer.isView(t))return c(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(B(t,ArrayBuffer)||t&&B(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength=2147483647)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+2147483647..toString(16)+\" bytes\");return 0|t}function f(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||B(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 D(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return R(t).length;default:if(i)return n?-1:D(t).length;e=(\"\"+e).toLowerCase(),i=!0}}function h(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 M(this,e,r);case\"utf8\":case\"utf-8\":return T(this,e,r);case\"ascii\":return k(this,e,r);case\"latin1\":case\"binary\":return A(this,e,r);case\"base64\":return w(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return S(this,e,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),n=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(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),N(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=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:g(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):g(t,[e],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function g(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;as&&(r=s-l),a=r;a>=0;a--){for(var f=!0,h=0;hi&&(n=i):n=i;var a=e.length;n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function w(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?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<=4096)return String.fromCharCode.apply(String,t);var r=\"\",n=0;for(;ne&&(t+=\" ... \"),\"\"},a.prototype.compare=function(t,e,r,n,i){if(B(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.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 o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),l=Math.min(o,s),c=this.slice(n,i),u=t.slice(e,r),f=0;f>>=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 v(this,t,e,r);case\"ascii\":return y(this,t,e,r);case\"latin1\":case\"binary\":return x(this,t,e,r);case\"base64\":return b(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return _(this,t,e,r);default:if(a)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};function k(t,e,r){var n=\"\";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i=\"\",a=e;ar)throw new RangeError(\"Trying to access beyond buffer length\")}function L(t,e,r,n,i,o){if(!a.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError(\"Index out of range\")}function C(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 P(t,e,r,i,a){return e=+e,r>>>=0,a||C(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function I(t,e,r,i,a){return e=+e,r>>>=0,a||C(t,0,r,8),n.write(t,e,r,i,52,8),r+8}a.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>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||E(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},a.prototype.readInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,n)||L(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},a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(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},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return I(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return I(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.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=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=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},a.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&&!a.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>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),\"number\"==typeof t)for(o=e;o55295&&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 R(t){return e.toByteArray(function(t){if((t=(t=t.split(\"=\")[0]).trim().replace(O,\"\")).length<2)return\"\";for(;t.length%4!=0;)t+=\"=\";return t}(t))}function F(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function B(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function N(t){return t!=t}}).call(this)}).call(this,t(\"buffer\").Buffer)},{\"base64-js\":79,buffer:85,ieee754:230}],86:[function(t,e,r){e.exports=function(t,e,r){return er?r:t:te?e:t}},{}],87:[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:86}],88:[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]}},{}],89:[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:86,\"color-rgba\":91,dtype:127}],90:[function(t,e,r){(function(r){(function(){\"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=(p=t.slice(1)).length;c=1,u<=4?(l=[parseInt(p[0]+p[0],16),parseInt(p[1]+p[1],16),parseInt(p[2]+p[2],16)],4===u&&(c=parseInt(p[3]+p[3],16)/255)):(l=[parseInt(p[0]+p[1],16),parseInt(p[2]+p[3],16),parseInt(p[4]+p[5],16)],8===u&&(c=parseInt(p[6]+p[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 f=e[1],h=\"rgb\"===f,p=f.replace(/a$/,\"\");s=p;u=\"cmyk\"===p?4:\"gray\"===p?1:3;l=e[2].trim().split(/\\s*,\\s*/).map((function(t,e){if(/%$/.test(t))return e===u?parseFloat(t)/100:\"rgb\"===p?255*parseFloat(t)/100:parseFloat(t);if(\"h\"===p[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)})),f===p&&l.push(1),c=h||void 0===l[u]?1:l[u],l=l.slice(0,u)}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)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"color-name\":88,defined:124,\"is-plain-obj\":236}],91:[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:86,\"color-parse\":90,\"color-space/hsl\":92}],92:[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\":93}],93:[function(t,e,r){\"use strict\";e.exports={name:\"rgb\",min:[0,0,0],max:[255,255,255],channel:[\"red\",\"green\",\"blue\"],alias:[\"RGB\"]}},{}],94:[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\"}},{}],95:[function(t,e,r){e.exports=[\"xx-small\",\"x-small\",\"small\",\"medium\",\"large\",\"x-large\",\"xx-large\",\"larger\",\"smaller\"]},{}],96:[function(t,e,r){e.exports=[\"normal\",\"condensed\",\"semi-condensed\",\"extra-condensed\",\"ultra-condensed\",\"expanded\",\"semi-expanded\",\"extra-expanded\",\"ultra-expanded\"]},{}],97:[function(t,e,r){e.exports=[\"normal\",\"italic\",\"oblique\"]},{}],98:[function(t,e,r){e.exports=[\"normal\",\"bold\",\"bolder\",\"lighter\",\"100\",\"200\",\"300\",\"400\",\"500\",\"600\",\"700\",\"800\",\"900\"]},{}],99:[function(t,e,r){\"use strict\";e.exports={parse:t(\"./parse\"),stringify:t(\"./stringify\")}},{\"./parse\":101,\"./stringify\":102}],100:[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\":95}],101:[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\":100,\"css-font-stretch-keywords\":96,\"css-font-style-keywords\":97,\"css-font-weight-keywords\":98,\"css-global-keywords\":103,\"css-system-font-keywords\":104,\"string-split-by\":305,unquote:328}],102:[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;re?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>>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>>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(;++o1)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=r)for(n=i=r;++or&&(n=r),i=r)for(n=i=r;++or&&(n=r),i=0?(a>=v?10:a>=y?5:a>=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=v?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>=v?i*=10:a>=y?i*=5:a>=x&&(i*=2),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 k(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a=r)for(n=r;++ar&&(n=r)}else for(;++a=r)for(n=r;++ar&&(n=r);return n}function A(t){if(!(i=t.length))return[];for(var e=-1,r=k(t,M),n=new Array(r);++et?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;af;)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=r)for(n=r;++an&&(n=r)}else for(;++a=r)for(n=r;++an&&(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=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r},t.min=k,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);r0)return[t];if((n=e0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s=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(),m=a();++hl.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})}))},{}],109:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(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,8})$/,l=new RegExp(\"^rgb\\\\(\"+[i,i,i]+\"\\\\)$\"),c=new RegExp(\"^rgb\\\\(\"+[o,o,o]+\"\\\\)$\"),u=new RegExp(\"^rgba\\\\(\"+[i,i,i,a]+\"\\\\)$\"),f=new RegExp(\"^rgba\\\\(\"+[o,o,o,a]+\"\\\\)$\"),h=new RegExp(\"^hsl\\\\(\"+[a,o,o]+\"\\\\)$\"),p=new RegExp(\"^hsla\\\\(\"+[a,o,o,a]+\"\\\\)$\"),d={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 g(){return this.rgb().formatHex()}function m(){return this.rgb().formatRgb()}function v(t){var e,r;return t=(t+\"\").trim().toLowerCase(),(e=s.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?y(e):3===r?new w(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?x(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?x(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=l.exec(t))?new w(e[1],e[2],e[3],1):(e=c.exec(t))?new w(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=u.exec(t))?x(e[1],e[2],e[3],e[4]):(e=f.exec(t))?x(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=h.exec(t))?M(e[1],e[2]/100,e[3]/100,1):(e=p.exec(t))?M(e[1],e[2]/100,e[3]/100,e[4]):d.hasOwnProperty(t)?y(d[t]):\"transparent\"===t?new w(NaN,NaN,NaN,0):null}function y(t){return new w(t>>16&255,t>>8&255,255&t,1)}function x(t,e,r,n){return n<=0&&(t=e=r=NaN),new w(t,e,r,n)}function b(t){return t instanceof n||(t=v(t)),t?new w((t=t.rgb()).r,t.g,t.b,t.opacity):new w}function _(t,e,r,n){return 1===arguments.length?b(t):new w(t,e,r,null==n?1:n)}function w(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function T(){return\"#\"+A(this.r)+A(this.g)+A(this.b)}function k(){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+\")\")}function A(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?\"0\":\"\")+t.toString(16)}function M(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new L(t,e,r,n)}function S(t){if(t instanceof L)return new L(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=v(t)),!t)return new L;if(t instanceof L)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*(r0&&c<1?0:s,new L(s,l,c,t.opacity)}function E(t,e,r,n){return 1===arguments.length?S(t):new L(t,e,r,null==n?1:n)}function L(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function C(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,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:g,formatHex:g,formatHsl:function(){return S(this).formatHsl()},formatRgb:m,toString:m}),e(w,_,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new w(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new w(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:T,formatHex:T,formatRgb:k,toString:k})),e(L,E,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new L(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new L(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 w(C(t>=240?t-240:t+120,i,n),C(t,i,n),C(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},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?\"hsl(\":\"hsla(\")+(this.h||0)+\", \"+100*(this.s||0)+\"%, \"+100*(this.l||0)+\"%\"+(1===t?\")\":\", \"+t+\")\")}}));var P=Math.PI/180,I=180/Math.PI,O=6/29,z=3*O*O;function D(t){if(t instanceof F)return new F(t.l,t.a,t.b,t.opacity);if(t instanceof q)return G(t);t instanceof w||(t=b(t));var e,r,n=U(t.r),i=U(t.g),a=U(t.b),o=B((.2225045*n+.7168786*i+.0606169*a)/1);return n===i&&i===a?e=r=o:(e=B((.4360747*n+.3850649*i+.1430804*a)/.96422),r=B((.0139322*n+.0971045*i+.7141733*a)/.82521)),new F(116*o-16,500*(e-o),200*(o-r),t.opacity)}function R(t,e,r,n){return 1===arguments.length?D(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 B(t){return t>.008856451679035631?Math.pow(t,1/3):t/z+4/29}function N(t){return t>O?t*t*t:z*(t-4/29)}function j(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 V(t){if(t instanceof q)return new q(t.h,t.c,t.l,t.opacity);if(t instanceof F||(t=D(t)),0===t.a&&0===t.b)return new q(NaN,0=0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);return{type:t,name:r}}))}function a(t,e){for(var r,n=0,i=t.length;n0)for(var r,n,i=new Array(r),a=0;ah+c||np+c||au.index){var f=h-s.x-s.vx,m=p-s.y-s.vy,v=f*f+m*m;vt.r&&(t.r=t[e].r)}function h(){if(r){var e,i,a=r.length;for(n=new Array(a),e=0;e=c)){(t.data!==r||t.next)&&(0===f&&(d+=(f=o())*f),0===h&&(d+=(h=o())*h),d1?(null==r?u.remove(t):u.set(t,v(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;c1?(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;a1?n[0]+n.slice(2):n,+t.slice(r+1)]}function r(t){return(t=e(Math.abs(t)))?t[1]:NaN}var n,i=/^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;function a(t){if(!(e=i.exec(t)))throw new Error(\"invalid format: \"+t);var e;return new o({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function o(t){this.fill=void 0===t.fill?\" \":t.fill+\"\",this.align=void 0===t.align?\">\":t.align+\"\",this.sign=void 0===t.sign?\"-\":t.sign+\"\",this.symbol=void 0===t.symbol?\"\":t.symbol+\"\",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?\"\":t.type+\"\"}function s(t,r){var n=e(t,r);if(!n)return t+\"\";var i=n[0],a=n[1];return a<0?\"0.\"+new Array(-a).join(\"0\")+i:i.length>a+1?i.slice(0,a+1)+\".\"+i.slice(a+1):i+new Array(a-i.length+2).join(\"0\")}a.prototype=o.prototype,o.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\"0\":\"\")+(void 0===this.width?\"\":Math.max(1,0|this.width))+(this.comma?\",\":\"\")+(void 0===this.precision?\"\":\".\"+Math.max(0,0|this.precision))+(this.trim?\"~\":\"\")+this.type};var l={\"%\":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+\"\"},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString(\"en\").replace(/,/g,\"\"):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return s(100*t,e)},r:s,s:function(t,r){var i=e(t,r);if(!i)return t+\"\";var a=i[0],o=i[1],s=o-(n=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+new Array(s-l+1).join(\"0\"):s>0?a.slice(0,s)+\".\"+a.slice(s):\"0.\"+new Array(1-s).join(\"0\")+e(t,Math.max(0,r+s-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function c(t){return t}var u,f=Array.prototype.map,h=[\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\\xb5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];function p(t){var e,i,o=void 0===t.grouping||void 0===t.thousands?c:(e=f.call(t.grouping,Number),i=t.thousands+\"\",function(t,r){for(var n=t.length,a=[],o=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(t.substring(n-=s,n+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(i)}),s=void 0===t.currency?\"\":t.currency[0]+\"\",u=void 0===t.currency?\"\":t.currency[1]+\"\",p=void 0===t.decimal?\".\":t.decimal+\"\",d=void 0===t.numerals?c:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(f.call(t.numerals,String)),g=void 0===t.percent?\"%\":t.percent+\"\",m=void 0===t.minus?\"-\":t.minus+\"\",v=void 0===t.nan?\"NaN\":t.nan+\"\";function y(t){var e=(t=a(t)).fill,r=t.align,i=t.sign,c=t.symbol,f=t.zero,y=t.width,x=t.comma,b=t.precision,_=t.trim,w=t.type;\"n\"===w?(x=!0,w=\"g\"):l[w]||(void 0===b&&(b=12),_=!0,w=\"g\"),(f||\"0\"===e&&\"=\"===r)&&(f=!0,e=\"0\",r=\"=\");var T=\"$\"===c?s:\"#\"===c&&/[boxX]/.test(w)?\"0\"+w.toLowerCase():\"\",k=\"$\"===c?u:/[%p]/.test(w)?g:\"\",A=l[w],M=/[defgprs%]/.test(w);function S(t){var a,s,l,c=T,u=k;if(\"c\"===w)u=A(t)+u,t=\"\";else{var g=(t=+t)<0||1/t<0;if(t=isNaN(t)?v:A(Math.abs(t),b),_&&(t=function(t){t:for(var e,r=t.length,n=1,i=-1;n0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),g&&0==+t&&\"+\"!==i&&(g=!1),c=(g?\"(\"===i?i:m:\"-\"===i||\"(\"===i?\"\":i)+c,u=(\"s\"===w?h[8+n/3]:\"\")+u+(g&&\"(\"===i?\")\":\"\"),M)for(a=-1,s=t.length;++a(l=t.charCodeAt(a))||l>57){u=(46===l?p+t.slice(a+1):t.slice(a))+u,t=t.slice(0,a);break}}x&&!f&&(t=o(t,1/0));var S=c.length+t.length+u.length,E=S>1)+c+t+u+E.slice(S);break;default:t=E+c+t+u}return d(t)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return t+\"\"},S}return{format:y,formatPrefix:function(t,e){var n=y(((t=a(t)).type=\"f\",t)),i=3*Math.max(-8,Math.min(8,Math.floor(r(e)/3))),o=Math.pow(10,-i),s=h[8+i/3];return function(t){return n(o*t)+s}}}}function d(e){return u=p(e),t.format=u.format,t.formatPrefix=u.formatPrefix,u}d({decimal:\".\",thousands:\",\",grouping:[3],currency:[\"$\",\"\"],minus:\"-\"}),t.FormatSpecifier=o,t.formatDefaultLocale=d,t.formatLocale=p,t.formatSpecifier=a,t.precisionFixed=function(t){return Math.max(0,-r(Math.abs(t)))},t.precisionPrefix=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(r(e)/3)))-r(Math.abs(t)))},t.precisionRound=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,r(e)-r(t))+1},Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],113:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-geo\"),t(\"d3-array\")):i(n.d3=n.d3||{},n.d3,n.d3)}(this,(function(t,e,r){\"use strict\";var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,c=Math.log,u=Math.max,f=Math.min,h=Math.pow,p=Math.round,d=Math.sign||function(t){return t>0?1:t<0?-1:0},g=Math.sin,m=Math.tan,v=1e-6,y=Math.PI,x=y/2,b=y/4,_=Math.SQRT1_2,w=L(2),T=L(y),k=2*y,A=180/y,M=y/180;function S(t){return t>1?x:t<-1?-x:Math.asin(t)}function E(t){return t>1?0:t<-1?y:Math.acos(t)}function L(t){return t>0?Math.sqrt(t):0}function C(t){return(s(t)-s(-t))/2}function P(t){return(s(t)+s(-t))/2}function I(t){var e=m(t/2),r=2*c(o(t/2))/(e*e);function i(t,e){var n=o(t),i=o(e),a=g(e),s=i*n,l=-((1-s?c((1+s)/2)/(1-s):-.5)+r/(1+s));return[l*i*g(t),l*a]}return i.invert=function(e,i){var s,l=L(e*e+i*i),u=-t/2,f=50;if(!l)return[0,0];do{var h=u/2,p=o(h),d=g(h),m=d/p,y=-c(n(p));u-=s=(2/m*y-r*m-l)/(-y/(d*d)+1-r/(2*p*p))*(p<0?.7:1)}while(n(s)>v&&--f>0);var x=g(u);return[a(e*x,l*o(u)),S(i*x/l)]},i}function O(t,e){var r=o(e),n=function(t){return t?t/Math.sin(t):1}(E(r*o(t/=2)));return[2*r*g(t)*n,g(e)*n]}function z(t){var e=g(t),r=o(t),i=t>=0?1:-1,s=m(i*t),l=(1+e-r)/2;function c(t,n){var c=o(n),u=o(t/=2);return[(1+c)*g(t),(i*n>-a(u,s)-.001?0:10*-i)+l+g(n)*r-(1+c)*e*u]}return c.invert=function(t,c){var u=0,f=0,h=50;do{var p=o(u),d=g(u),m=o(f),y=g(f),x=1+m,b=x*d-t,_=l+y*r-x*e*p-c,w=x*p/2,T=-d*y,k=e*x*d/2,A=r*m+e*p*y,M=T*k-A*w,S=(_*T-b*A)/M/2,E=(b*k-_*w)/M;n(E)>2&&(E/=2),u-=S,f-=E}while((n(S)>v||n(E)>v)&&--h>0);return i*f>-a(o(u),s)-.001?[2*u,f]:null},c}function D(t,e){var r=m(e/2),n=L(1-r*r),i=1+n*o(t/=2),a=g(t)*n/i,s=r/i,l=a*a,c=s*s;return[4/3*a*(3+l-3*c),4/3*s*(3+3*l-c)]}O.invert=function(t,e){if(!(t*t+4*e*e>y*y+v)){var r=t,i=e,a=25;do{var s,l=g(r),c=g(r/2),u=o(r/2),f=g(i),h=o(i),p=g(2*i),d=f*f,m=h*h,x=c*c,b=1-m*u*u,_=b?E(h*u)*L(s=1/b):s=0,w=2*_*h*c-t,T=_*f-e,k=s*(m*x+_*h*u*d),A=s*(.5*l*p-2*_*f*c),M=.25*s*(p*c-_*f*m*l),S=s*(d*u+_*x*h),C=A*M-S*k;if(!C)break;var P=(T*A-w*S)/C,I=(w*M-T*k)/C;r-=P,i-=I}while((n(P)>v||n(I)>v)&&--a>0);return[r,i]}},D.invert=function(t,e){if(e*=3/8,!(t*=3/8)&&n(e)>1)return null;var r=1+t*t+e*e,i=L((r-L(r*r-4*e*e))/2),s=S(i)/3,l=i?function(t){return c(t+L(t*t-1))}(n(e/i))/3:function(t){return c(t+L(t*t+1))}(n(t))/3,u=o(s),f=P(l),h=f*f-u*u;return[2*d(t)*a(C(l)*u,.25-h),2*d(e)*a(f*g(s),.25+h)]};var R=L(8),F=c(1+w);function B(t,e){var r=n(e);return rx){var l=a(s[1],s[0]),c=L(s[0]*s[0]+s[1]*s[1]),u=r*p((l-x)/r)+x,f=a(g(l-=u),2-o(l));l=u+S(y/c*g(f))-f,s[0]=c*o(l),s[1]=c*g(l)}return s}return s.invert=function(t,n){var s=L(t*t+n*n);if(s>x){var l=a(n,t),c=r*p((l-x)/r)+x,u=l>c?-1:1,f=s*o(c-l),h=1/m(u*E((f-y)/L(y*(y-2*f)+s*s)));l=c+2*i((h+u*L(h*h-3))/3),t=s*o(l),n=s*g(l)}return e.geoAzimuthalEquidistantRaw.invert(t,n)},s}function j(t,r){if(arguments.length<2&&(r=t),1===r)return e.geoAzimuthalEqualAreaRaw;if(r===1/0)return U;function n(n,i){var a=e.geoAzimuthalEqualAreaRaw(n/r,i);return a[0]*=t,a}return n.invert=function(n,i){var a=e.geoAzimuthalEqualAreaRaw.invert(n/t,i);return a[0]*=r,a},n}function U(t,e){return[t*o(e)/o(e/=2),2*g(e)]}function V(t,e,r){var i,a,o,s=100;r=void 0===r?0:+r,e=+e;do{(a=t(r))===(o=t(r+v))&&(o=a+v),r-=i=-1*v*(a-e)/(a-o)}while(s-- >0&&n(i)>v);return s<0?NaN:r}function H(t,e,r){return void 0===e&&(e=40),void 0===r&&(r=1e-12),function(i,a,o,s){var l,c,u;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var f=0;fl)o-=c/=2,s-=u/=2;else{l=g;var m=(o>0?-1:1)*r,v=(s>0?-1:1)*r,y=t(o+m,s),x=t(o,s+v),b=(y[0]-h[0])/m,_=(y[1]-h[1])/m,w=(x[0]-h[0])/v,T=(x[1]-h[1])/v,k=T*b-_*w,A=(n(k)<.5?.5:1)/k;if(o+=c=(d*w-p*T)*A,s+=u=(p*_-d*b)*A,n(c)0&&(i[1]*=1+a/1.5*i[0]*i[0]),i}return e.invert=H(e),e}function G(t,e){var r,i=t*g(e),a=30;do{e-=r=(e+g(e)-i)/(1+o(e))}while(n(r)>v&&--a>0);return e/2}function Y(t,e,r){function n(n,i){return[t*n*o(i=G(r,i)),e*g(i)]}return n.invert=function(n,i){return i=S(i/e),[n/(t*o(i)),S((2*i+g(2*i))/r)]},n}B.invert=function(t,e){if((a=n(e))1e-12&&--u>0);return[t/(o(l)*(R-1/g(l))),d(e)*l]},U.invert=function(t,e){var r=2*S(e/2);return[t*o(r/2)/o(r),r]};var W=Y(w/x,w,y);var X=2.00276,Z=1.11072;function J(t,e){var r=G(y,e);return[X*t/(1/o(e)+Z/o(r)),(e+w*g(r))/X]}function K(t){var r=0,n=e.geoProjectionMutator(t),i=n(r);return i.parallel=function(t){return arguments.length?n(r=t*M):r*A},i}function Q(t,e){return[t*o(e),e]}function $(t){if(!t)return Q;var e=1/m(t);function r(r,n){var i=e+t-n,a=i?r*o(n)/i:i;return[i*g(a),e-i*o(a)]}return r.invert=function(r,n){var i=L(r*r+(n=e-n)*n),s=e+t-i;return[i/o(s)*a(r,n),s]},r}function tt(t){function e(e,r){var n=x-r,i=n?e*t*g(n)/n:n;return[n*g(i)/t,x-n*o(i)]}return e.invert=function(e,r){var n=e*t,i=x-r,o=L(n*n+i*i),s=a(n,i);return[(o?o/g(o):1)*s/t,x-o]},e}J.invert=function(t,e){var r,i,a=X*e,s=e<0?-b:b,l=25;do{i=a-w*g(s),s-=r=(g(2*s)+2*s-y*g(i))/(2*o(2*s)+2+y*o(i)*w*o(s))}while(n(r)>v&&--l>0);return i=a-w*g(s),[t*(1/o(i)+Z/o(s))/X,i]},Q.invert=function(t,e){return[t/o(e),e]};var et=Y(1,4/y,y);function rt(t,e,r,i,s,l){var c,u=o(l);if(n(t)>1||n(l)>1)c=E(r*s+e*i*u);else{var f=g(t/2),h=g(l/2);c=2*S(L(f*f+e*i*h*h))}return n(c)>v?[c,a(i*g(l),e*s-r*i*u)]:[0,0]}function nt(t,e,r){return E((t*t+e*e-r*r)/(2*t*e))}function it(t){return t-2*y*l((t+y)/(2*y))}function at(t,e,r){for(var n,i=[[t[0],t[1],g(t[1]),o(t[1])],[e[0],e[1],g(e[1]),o(e[1])],[r[0],r[1],g(r[1]),o(r[1])]],a=i[2],s=0;s<3;++s,a=n)n=i[s],a.v=rt(n[1]-a[1],a[3],a[2],n[3],n[2],n[0]-a[0]),a.point=[0,0];var l=nt(i[0].v[0],i[2].v[0],i[1].v[0]),c=nt(i[0].v[0],i[1].v[0],i[2].v[0]),u=y-l;i[2].point[1]=0,i[0].point[0]=-(i[1].point[0]=i[0].v[0]/2);var f=[i[2].point[0]=i[0].point[0]+i[2].v[0]*o(l),2*(i[0].point[1]=i[1].point[1]=i[2].v[0]*g(l))];return function(t,e){var r,n=g(e),a=o(e),s=new Array(3);for(r=0;r<3;++r){var l=i[r];if(s[r]=rt(e-l[1],l[3],l[2],a,n,t-l[0]),!s[r][0])return l.point;s[r][1]=it(s[r][1]-l.v[1])}var h=f.slice();for(r=0;r<3;++r){var p=2==r?0:r+1,d=nt(i[r].v[0],s[r][0],s[p][0]);s[r][1]<0&&(d=-d),r?1==r?(d=c-d,h[0]-=s[r][0]*o(d),h[1]-=s[r][0]*g(d)):(d=u-d,h[0]+=s[r][0]*o(d),h[1]+=s[r][0]*g(d)):(h[0]+=s[r][0]*o(d),h[1]-=s[r][0]*g(d))}return h[0]/=3,h[1]/=3,h}}function ot(t){return t[0]*=M,t[1]*=M,t}function st(t,r,n){var i=e.geoCentroid({type:\"MultiPoint\",coordinates:[t,r,n]}),a=[-i[0],-i[1]],o=e.geoRotation(a),s=at(ot(o(t)),ot(o(r)),ot(o(n)));s.invert=H(s);var l=e.geoProjection(s).rotate(a),c=l.center;return delete l.rotate,l.center=function(t){return arguments.length?c(o(t)):o.invert(c())},l.clipAngle(90)}function lt(t,e){var r=L(1-g(e));return[2/T*t*r,T*(1-r)]}function ct(t){var e=m(t);function r(t,r){return[t,(t?t/g(t):1)*(g(r)*o(t)-e*o(r))]}return r.invert=e?function(t,r){t&&(r*=g(t)/t);var n=o(t);return[t,2*a(L(n*n+e*e-r*r)-n,e-r)]}:function(t,e){return[t,S(t?e*m(t)/t:e)]},r}lt.invert=function(t,e){var r=(r=e/T-1)*r;return[r>0?t*L(y/r)/2:0,S(1-r)]};var ut=L(3);function ft(t,e){return[ut*t*(2*o(2*e/3)-1)/T,ut*T*g(e/3)]}function ht(t){var e=o(t);function r(t,r){return[t*e,g(r)/e]}return r.invert=function(t,r){return[t/e,S(r*e)]},r}function pt(t){var e=o(t);function r(t,r){return[t*e,(1+e)*m(r/2)]}return r.invert=function(t,r){return[t/e,2*i(r/(1+e))]},r}function dt(t,e){var r=L(8/(3*y));return[r*t*(1-n(e)/y),r*e]}function gt(t,e){var r=L(4-3*g(n(e)));return[2/L(6*y)*t*r,d(e)*L(2*y/3)*(2-r)]}function mt(t,e){var r=L(y*(4+y));return[2/r*t*(1+L(1-4*e*e/(y*y))),4/r*e]}function vt(t,e){var r=(2+x)*g(e);e/=2;for(var i=0,a=1/0;i<10&&n(a)>v;i++){var s=o(e);e-=a=(e+g(e)*(s+2)-r)/(2*s*(1+s))}return[2/L(y*(4+y))*t*(1+o(e)),2*L(y/(4+y))*g(e)]}function yt(t,e){return[t*(1+o(e))/L(2+y),2*e/L(2+y)]}function xt(t,e){for(var r=(1+x)*g(e),i=0,a=1/0;i<10&&n(a)>v;i++)e-=a=(e+g(e)-r)/(1+o(e));return r=L(2+y),[t*(1+o(e))/r,2*e/r]}ft.invert=function(t,e){var r=3*S(e/(ut*T));return[T*t/(ut*(2*o(2*r/3)-1)),r]},dt.invert=function(t,e){var r=L(8/(3*y)),i=e/r;return[t/(r*(1-n(i)/y)),i]},gt.invert=function(t,e){var r=2-n(e)/L(2*y/3);return[t*L(6*y)/(2*r),d(e)*S((4-r*r)/3)]},mt.invert=function(t,e){var r=L(y*(4+y))/2;return[t*r/(1+L(1-e*e*(4+y)/(4*y))),e*r/2]},vt.invert=function(t,e){var r=e*L((4+y)/y)/2,n=S(r),i=o(n);return[t/(2/L(y*(4+y))*(1+i)),S((n+r*(i+2))/(2+x))]},yt.invert=function(t,e){var r=L(2+y),n=e*r/2;return[r*t/(1+o(n)),n]},xt.invert=function(t,e){var r=1+x,n=L(r/2);return[2*t*n/(1+o(e*=n)),S((e+g(e))/r)]};var bt=3+2*w;function _t(t,e){var r=g(t/=2),n=o(t),a=L(o(e)),s=o(e/=2),l=g(e)/(s+w*n*a),u=L(2/(1+l*l)),f=L((w*s+(n+r)*a)/(w*s+(n-r)*a));return[bt*(u*(f-1/f)-2*c(f)),bt*(u*l*(f+1/f)-2*i(l))]}_t.invert=function(t,e){if(!(r=D.invert(t/1.2,1.065*e)))return null;var r,a=r[0],s=r[1],l=20;t/=bt,e/=bt;do{var h=a/2,p=s/2,d=g(h),m=o(h),y=g(p),b=o(p),T=o(s),k=L(T),A=y/(b+w*m*k),M=A*A,S=L(2/(1+M)),E=(w*b+(m+d)*k)/(w*b+(m-d)*k),C=L(E),P=C-1/C,I=C+1/C,O=S*P-2*c(C)-t,z=S*A*I-2*i(A)-e,R=y&&_*k*d*M/y,F=(w*m*b+k)/(2*(b+w*m*k)*(b+w*m*k)*k),B=-.5*A*S*S*S,N=B*R,j=B*F,U=(U=2*b+w*k*(m-d))*U*C,V=(w*m*b*k+T)/U,H=-w*d*y/(k*U),q=P*N-2*V/C+S*(V+V/E),G=P*j-2*H/C+S*(H+H/E),Y=A*I*N-2*R/(1+M)+S*I*R+S*A*(V-V/E),W=A*I*j-2*F/(1+M)+S*I*F+S*A*(H-H/E),X=G*Y-W*q;if(!X)break;var Z=(z*G-O*W)/X,J=(O*Y-z*q)/X;a-=Z,s=u(-x,f(x,s-J))}while((n(Z)>v||n(J)>v)&&--l>0);return n(n(s)-x)s){var d=L(h),m=a(f,u),b=i*p(m/i),_=m-b,w=t*o(_),T=(t*g(_)-_*g(w))/(x-w),k=Lt(_,T),A=(y-t)/Ct(k,w,y);u=d;var M,S=50;do{u-=M=(t+Ct(k,w,u)*A-d)/(k(u)*A)}while(n(M)>v&&--S>0);f=_*g(u),us){var u=L(c),f=a(l,r),h=i*p(f/i),d=f-h;r=u*o(d),l=u*g(d);for(var m=r-x,v=g(r),b=l/v,_=rv||n(p)>v)&&--x>0);return[d,m]},u}Tt.invert=function(t,e){var r=e/(1+wt);return[t&&t/(wt*L(1-r*r)),2*i(r)]},kt.invert=function(t,e){var r=i(e/T),n=o(r),a=2*r;return[t*T/2/(o(a)*n*n),a]};var It=Pt(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);var Ot=Pt(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);var zt=Pt(5/6*y,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Dt(t,e){var r=t*t,n=e*e;return[t*(1-.162388*n)*(.87-952426e-9*r*r),e*(1+n/12)]}Dt.invert=function(t,e){var r,i=t,a=e,o=50;do{var s=a*a;a-=r=(a*(1+s/12)-e)/(1+s/4)}while(n(r)>v&&--o>0);o=50,t/=1-.162388*s;do{var l=(l=i*i)*l;i-=r=(i*(.87-952426e-9*l)-t)/(.87-.00476213*l)}while(n(r)>v&&--o>0);return[i,a]};var Rt=Pt(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Ft(t){var e=t(x,0)[0]-t(-x,0)[0];function r(r,n){var i=r>0?-.5:.5,a=t(r+i*y,n);return a[0]-=i*e,a}return t.invert&&(r.invert=function(r,n){var i=r>0?-.5:.5,a=t.invert(r+i*e,n),o=a[0]-i*y;return o<-y?o+=2*y:o>y&&(o-=2*y),a[0]=o,a}),r}function Bt(t,e){var r=d(t),i=d(e),s=o(e),l=o(t)*s,c=g(t)*s,u=g(i*e);t=n(a(c,u)),e=S(l),n(t-x)>v&&(t%=x);var f=function(t,e){if(e===x)return[0,0];var r,i,a=g(e),s=a*a,l=s*s,c=1+l,u=1+3*l,f=1-l,h=S(1/L(c)),p=f+s*c*h,d=(1-a)/p,m=L(d),b=d*c,_=L(b),w=m*f;if(0===t)return[0,-(w+s*_)];var T,k=o(e),A=1/k,M=2*a*k,E=(-p*k-(-3*s+h*u)*M*(1-a))/(p*p),C=-A*M,P=-A*(s*c*E+d*u*M),I=-2*A*(f*(.5*E/m)-2*s*m*M),O=4*t/y;if(t>.222*y||e.175*y){if(r=(w+s*L(b*(1+l)-w*w))/(1+l),t>y/4)return[r,r];var z=r,D=.5*r;r=.5*(D+z),i=50;do{var R=L(b-r*r),F=r*(I+C*R)+P*S(r/_)-O;if(!F)break;F<0?D=r:z=r,r=.5*(D+z)}while(n(z-D)>v&&--i>0)}else{r=v,i=25;do{var B=r*r,N=L(b-B),j=I+C*N,U=r*j+P*S(r/_)-O,V=j+(P-C*B)/N;r-=T=N?U/V:0}while(n(T)>v&&--i>0)}return[r,-w-s*L(b-r*r)]}(t>y/4?x-t:t,e);return t>y/4&&(u=f[0],f[0]=-f[1],f[1]=-u),f[0]*=r,f[1]*=-i,f}function Nt(t,e){var r,a,l,c,u,f;if(e=1-v)return r=(1-e)/4,l=1/(a=P(t)),[(c=((f=s(2*(f=t)))-1)/(f+1))+r*((u=a*C(t))-t)/(a*a),l-r*c*l*(u-t),l+r*c*l*(u+t),2*i(s(t))-x+r*(u-t)/a];var h=[1,0,0,0,0,0,0,0,0],p=[L(e),0,0,0,0,0,0,0,0],d=0;for(a=L(1-e),u=1;n(p[d]/h[d])>v&&d<8;)r=h[d++],p[d]=(r-a)/2,h[d]=(r+a)/2,a=L(r*a),u*=2;l=u*h[d]*t;do{l=(S(c=p[d]*g(a=l)/h[d])+l)/2}while(--d);return[g(l),c=o(l),c/o(l-a),l]}function jt(t,e){if(!e)return t;if(1===e)return c(m(t/2+b));for(var r=1,a=L(1-e),o=L(e),s=0;n(o)>v;s++){if(t%y){var l=i(a*m(t)/r);l<0&&(l+=y),t+=l+~~(t/y)*y}else t+=t;o=(r+a)/2,a=L(r*a),o=((r=o)-a)/2}return t/(h(2,s)*r)}function Ut(t,e){var r=(w-1)/(w+1),l=L(1-r*r),u=jt(x,l*l),f=c(m(y/4+n(e)/2)),h=s(-1*f)/L(r),p=function(t,e){var r=t*t,n=e+1,i=1-r-e*e;return[.5*((t>=0?x:-x)-a(i,2*t)),-.25*c(i*i+4*r)+.5*c(n*n+r)]}(h*o(-1*t),h*g(-1*t)),v=function(t,e,r){var a=n(t),o=C(n(e));if(a){var s=1/g(a),l=1/(m(a)*m(a)),c=-(l+r*(o*o*s*s)-1+r),u=(-c+L(c*c-4*((r-1)*l)))/2;return[jt(i(1/L(u)),r)*d(t),jt(i(L((u/l-1)/r)),1-r)*d(e)]}return[0,jt(i(o),1-r)*d(e)]}(p[0],p[1],l*l);return[-v[1],(e>=0?1:-1)*(.5*u-v[0])]}function Vt(t){var e=g(t),r=o(t),i=Ht(t);function s(t,a){var s=i(t,a);t=s[0],a=s[1];var l=g(a),c=o(a),u=o(t),f=E(e*l+r*c*u),h=g(f),p=n(h)>v?f/h:1;return[p*r*g(t),(n(t)>x?p:-p)*(e*c-r*l*u)]}return i.invert=Ht(-t),s.invert=function(t,r){var n=L(t*t+r*r),s=-g(n),l=o(n),c=n*l,u=-r*s,f=n*e,h=L(c*c+u*u-f*f),p=a(c*f+u*h,u*f-c*h),d=(n>x?-1:1)*a(t*s,n*o(p)*l+r*g(p)*s);return i.invert(d,p)},s}function Ht(t){var e=g(t),r=o(t);return function(t,n){var i=o(n),s=o(t)*i,l=g(t)*i,c=g(n);return[a(l,s*r-c*e),S(c*r+s*e)]}}Bt.invert=function(t,e){n(t)>1&&(t=2*d(t)-t),n(e)>1&&(e=2*d(e)-e);var r=d(t),i=d(e),s=-r*t,l=-i*e,c=l/s<1,u=function(t,e){var r=0,i=1,a=.5,s=50;for(;;){var l=a*a,c=L(a),u=S(1/L(1+l)),f=1-l+a*(1+l)*u,h=(1-c)/f,p=L(h),d=h*(1+l),g=p*(1-l),m=L(d-t*t),v=e+g+a*m;if(n(i-r)<1e-12||0==--s||0===v)break;v>0?r=a:i=a,a=.5*(r+i)}if(!s)return null;var x=S(c),b=o(x),_=1/b,w=2*c*b,T=(-f*b-(-3*a+u*(1+3*l))*w*(1-c))/(f*f);return[y/4*(t*(-2*_*(.5*T/p*(1-l)-2*a*p*w)+-_*w*m)+-_*(a*(1+l)*T+h*(1+3*l)*w)*S(t/L(d))),x]}(c?l:s,c?s:l),f=u[0],h=u[1],p=o(h);return c&&(f=-x-f),[r*(a(g(f)*p,-g(h))+y),i*S(o(f)*p)]},Ut.invert=function(t,e){var r,n,o,l,u,f,h=(w-1)/(w+1),p=L(1-h*h),d=jt(x,p*p),g=(n=-t,o=p*p,(r=.5*d-e)?(l=Nt(r,o),n?(f=(u=Nt(n,1-o))[1]*u[1]+o*l[0]*l[0]*u[0]*u[0],[[l[0]*u[2]/f,l[1]*l[2]*u[0]*u[1]/f],[l[1]*u[1]/f,-l[0]*l[2]*u[0]*u[2]/f],[l[2]*u[1]*u[2]/f,-o*l[0]*l[1]*u[0]/f]]):[[l[0],0],[l[1],0],[l[2],0]]):[[0,(u=Nt(n,1-o))[0]/u[1]],[1/u[1],0],[u[2]/u[1],0]]),m=function(t,e){var r=e[0]*e[0]+e[1]*e[1];return[(t[0]*e[0]+t[1]*e[1])/r,(t[1]*e[0]-t[0]*e[1])/r]}(g[0],g[1]);return[a(m[1],m[0])/-1,2*i(s(-.5*c(h*m[0]*m[0]+h*m[1]*m[1])))-x]};var qt=S(1-1/3)*A,Gt=ht(0);function Yt(t){var e=qt*M,r=lt(y,e)[0]-lt(-y,e)[0],i=Gt(0,e)[1],a=lt(0,e)[1],o=T-a,s=k/t,c=4/k,h=i+o*o*4/k;function p(p,d){var g,m=n(d);if(m>e){var v=f(t-1,u(0,l((p+y)/s)));(g=lt(p+=y*(t-1)/t-v*s,m))[0]=g[0]*k/r-k*(t-1)/(2*t)+v*k/t,g[1]=i+4*(g[1]-a)*o/k,d<0&&(g[1]=-g[1])}else g=Gt(p,d);return g[0]*=c,g[1]/=h,g}return p.invert=function(e,p){e/=c;var d=n(p*=h);if(d>i){var g=f(t-1,u(0,l((e+y)/s)));e=(e+y*(t-1)/t-g*s)*r/k;var m=lt.invert(e,.25*(d-i)*k/o+a);return m[0]-=y*(t-1)/t-g*s,p<0&&(m[1]=-m[1]),m}return Gt.invert(e,p)},p}function Wt(t,e){return[t,1&e?90-v:qt]}function Xt(t,e){return[t,1&e?-90+v:-qt]}function Zt(t){return[t[0]*(1-v),t[1]]}function Jt(t){var e,r=1+t,i=S(g(1/r)),s=2*L(y/(e=y+4*i*r)),l=.5*s*(r+L(t*(2+t))),c=t*t,u=r*r;function f(f,h){var p,d,m=1-g(h);if(m&&m<2){var v,b=x-h,_=25;do{var w=g(b),T=o(b),k=i+a(w,r-T),A=1+u-2*r*T;b-=v=(b-c*i-r*w+A*k-.5*m*e)/(2*r*w*k)}while(n(v)>1e-12&&--_>0);p=s*L(A),d=f*k/y}else p=s*(t+m),d=f*i/y;return[p*g(d),l-p*o(d)]}return f.invert=function(t,n){var o=t*t+(n-=l)*n,f=(1+u-o/(s*s))/(2*r),h=E(f),p=g(h),d=i+a(p,r-f);return[S(t/L(o))*y/d,S(1-2*(h-c*i-r*p+(1+u-2*r*f)*d)/e)]},f}function Kt(t,e){return e>-.7109889596207567?((t=W(t,e))[1]+=.0528035274542,t):Q(t,e)}function Qt(t,e){return n(e)>.7109889596207567?((t=W(t,e))[1]-=e>0?.0528035274542:-.0528035274542,t):Q(t,e)}function $t(t,e,r,n){var i=L(4*y/(2*r+(1+t-e/2)*g(2*r)+(t+e)/2*g(4*r)+e/2*g(6*r))),a=L(n*g(r)*L((1+t*o(2*r)+e*o(4*r))/(1+t+e))),s=r*c(1);function l(r){return L(1+t*o(2*r)+e*o(4*r))}function c(n){var i=n*r;return(2*i+(1+t-e/2)*g(2*i)+(t+e)/2*g(4*i)+e/2*g(6*i))/r}function u(t){return l(t)*g(t)}var f=function(t,e){var n=r*V(c,s*g(e)/r,e/y);isNaN(n)&&(n=r*d(e));var u=i*l(n);return[u*a*t/y*o(n),u/a*g(n)]};return f.invert=function(t,e){var n=V(u,e*a/i);return[t*y/(o(n)*i*a*l(n)),S(r*c(n/r)/s)]},0===r&&(i=L(n/y),(f=function(t,e){return[t*i,g(e)/i]}).invert=function(t,e){return[t/i,S(e*i)]}),f}function te(t,e,r,n,i){void 0===n&&(n=1e-8),void 0===i&&(i=20);var a=t(e),o=t(.5*(e+r)),s=t(r);return function t(e,r,n,i,a,o,s,l,c,u,f){if(f.nanEncountered)return NaN;var h,p,d,g,m,v,y,x,b,_;if(p=e(r+.25*(h=n-r)),d=e(n-.25*h),isNaN(p))f.nanEncountered=!0;else{if(!isNaN(d))return _=((v=(g=h*(i+4*p+a)/12)+(m=h*(a+4*d+o)/12))-s)/15,u>c?(f.maxDepthCount++,v+_):Math.abs(_)t?r=n:e=n,n=e+r>>1}while(n>e);var i=c[n+1]-c[n];return i&&(i=(t-c[n+1])/i),(n+1+i)/s}var p=2*f(1)/y*o/r,m=function(t,e){var r=f(n(g(e))),a=i(r)*t;return r/=p,[a,e>=0?r:-r]};return m.invert=function(t,e){var r;return n(e*=p)<1&&(r=d(e)*S(a(n(e))*o)),[t/i(n(e)),r]},m}function re(t,e){return n(t[0]-e[0])=0;--l)n=(e=t[1][l])[0][0],i=e[0][1],a=e[1][1],o=e[2][0],s=e[2][1],c.push(ne([[o-v,s-v],[o-v,a+v],[n+v,a+v],[n+v,i-v]],30));return{type:\"Polygon\",coordinates:[r.merge(c)]}}function ae(t,r,n){var i,a;function o(e,n){for(var i=n<0?-1:1,a=r[+(n<0)],o=0,s=a.length-1;oa[o][2][0];++o);var l=t(e-a[o][1][0],n);return l[0]+=t(a[o][1][0],i*n>i*a[o][0][1]?a[o][0][1]:n)[0],l}n?o.invert=n(o):t.invert&&(o.invert=function(e,n){for(var i=a[+(n<0)],s=r[+(n<0)],l=0,c=i.length;lo&&(r=a,a=o,o=r),[[n,a],[i,o]]}))})),s):r.map((function(t){return t.map((function(t){return[[t[0][0]*A,t[0][1]*A],[t[1][0]*A,t[1][1]*A],[t[2][0]*A,t[2][1]*A]]}))}))},null!=r&&s.lobes(r),s}Kt.invert=function(t,e){return e>-.7109889596207567?W.invert(t,e-.0528035274542):Q.invert(t,e)},Qt.invert=function(t,e){return n(e)>.7109889596207567?W.invert(t,e+(e>0?.0528035274542:-.0528035274542)):Q.invert(t,e)};var oe=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var se=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var le=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var ce=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];var ue=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];var fe=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function he(t,e){return[3/k*t*L(y*y/3-e*e),e]}function pe(t){function e(e,r){if(n(n(r)-x)2)return null;var o=(e/=2)*e,s=(r/=2)*r,l=2*r/(1+o+s);return l=h((1+l)/(1-l),1/t),[a(2*e,1-o-s)/t,S((l-1)/(l+1))]},e}he.invert=function(t,e){return[k/3*t/L(y*y/3-e*e),e]};var de=y/w;function ge(t,e){return[t*(1+L(o(e)))/2,e/(o(e/2)*o(t/6))]}function me(t,e){var r=t*t,n=e*e;return[t*(.975534+n*(-.0143059*r-.119161+-.0547009*n)),e*(1.00384+r*(.0802894+-.02855*n+199025e-9*r)+n*(.0998909+-.0491032*n))]}function ve(t,e){return[g(t)/o(e),m(e)*o(t)]}function ye(t){var e=o(t),r=m(b+t/2);function i(i,a){var o=a-t,s=n(o)=0;)h=(f=t[u])[0]+l*(i=h)-c*p,p=f[1]+l*p+c*i;return[h=l*(i=h)-c*p,p=l*p+c*i]}return r.invert=function(r,s){var l=20,c=r,u=s;do{for(var f,h=e,p=t[h],d=p[0],m=p[1],v=0,y=0;--h>=0;)v=d+c*(f=v)-u*y,y=m+c*y+u*f,d=(p=t[h])[0]+c*(f=d)-u*m,m=p[1]+c*m+u*f;var x,b,_=(v=d+c*(f=v)-u*y)*v+(y=m+c*y+u*f)*y;c-=x=((d=c*(f=d)-u*m-r)*v+(m=c*m+u*f-s)*y)/_,u-=b=(m*v-d*y)/_}while(n(x)+n(b)>1e-12&&--l>0);if(l){var w=L(c*c+u*u),T=2*i(.5*w),k=g(T);return[a(c*k,w*o(T)),w?S(u*k/w):0]}},r}ge.invert=function(t,e){var r=n(t),i=n(e),a=v,s=x;iv||n(b)>v)&&--a>0);return a&&[r,i]},ve.invert=function(t,e){var r=t*t,n=e*e+1,i=r+n,a=t?_*L((i-L(i*i-4*r))/r):1/L(n);return[S(t*a),d(e)*E(a)]},xe.invert=function(t,e){return[t,2.5*i(s(.8*e))-.625*y]};var _e=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],we=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Te=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ke=[[.9245,0],[0,0],[.01943,0]],Ae=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Me(t,r){var n=e.geoProjection(be(t)).rotate(r).clipAngle(90),i=e.geoRotation(r),a=n.center;return delete n.rotate,n.center=function(t){return arguments.length?a(i(t)):i.invert(a())},n}var Se=L(6),Ee=L(7);function Le(t,e){var r=S(7*g(e)/(3*Se));return[Se*t*(2*o(2*r/3)-1)/Ee,9*g(r/3)/Ee]}function Ce(t,e){for(var r,i=(1+_)*g(e),a=e,s=0;s<25&&(a-=r=(g(a/2)+g(a)-i)/(.5*o(a/2)+o(a)),!(n(r)1e-12&&--l>0);return[t/(.84719-.13063*(i=s*s)+(o=i*(a=i*i))*o*(.05494*i-.04515-.02326*a+.00331*o)),s]},Oe.invert=function(t,e){for(var r=e/2,i=0,a=1/0;i<10&&n(a)>v;++i){var s=o(e/2);e-=a=(e-m(e/2)-r)/(1-.5/(s*s))}return[2*t/(1+o(e)),e]};var ze=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function De(t,e){var r=g(e),i=o(e),a=d(t);if(0===t||n(e)===x)return[0,e];if(0===e)return[t,0];if(n(t)===x)return[t*i,x*r];var s=y/(2*t)-2*t/y,l=2*e/y,c=(1-l*l)/(r-l),u=s*s,f=c*c,h=1+u/f,p=1+f/u,m=(s*r/c-s/2)/h,v=(f*r/u+c/2)/p,b=v*v-(f*r*r/u+c*r-1)/p;return[x*(m+L(m*m+i*i/h)*a),x*(v+L(b<0?0:b)*d(-e*s)*a)]}De.invert=function(t,e){var r=(t/=x)*t,n=r+(e/=x)*e,i=y*y;return[t?(n-1+L((1-n)*(1-n)+4*r))/(2*t)*x:0,V((function(t){return n*(y*g(t)-2*t)*y+4*t*t*(e-g(t))+2*y*t-i*e}),0)]};function Re(t,e){var r=e*e;return[t,e*(1.0148+r*r*(.23185+r*(.02406*r-.14499)))]}function Fe(t,e){if(n(e)=0;)if(n=e[s],r[0]===n[0]&&r[1]===n[1]){if(a)return[a,r];a=r}}}(e.face,r.face),i=Be(n.map(r.project),n.map(e.project));e.transform=r.transform?Ne(r.transform,i):i;for(var a=r.edges,o=0,s=a.length;o1.790857183?e=1.790857183:e<-1.790857183&&(e=-1.790857183);var r,i=e;do{var a=i*i;i-=r=(i*(1.0148+a*a*(.23185+a*(.02406*a-.14499)))-e)/(1.0148+a*a*(5*.23185+a*(.21654*a-1.01493)))}while(n(r)>v);return[t,i]},Fe.invert=function(t,e){if(n(e)v&&--s>0);return l=m(a),[(n(e)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])})),nr=[],t.length?t.length>1?{type:\"MultiPolygon\",coordinates:t}:{type:\"Polygon\",coordinates:t[0]}:null}};function sr(t){var r=t(x,0)[0]-t(-x,0)[0];function i(e,i){var a=n(e)0?e-y:e+y,i),s=(o[0]-o[1])*_,l=(o[0]+o[1])*_;if(a)return[s,l];var c=r*_,u=s>0^l>0?-1:1;return[u*s-d(l)*c,u*l-d(s)*c]}return t.invert&&(i.invert=function(e,i){var a=(e+i)*_,o=(i-e)*_,s=n(a)<.5*r&&n(o)<.5*r;if(!s){var l=r*_,c=a>0^o>0?-1:1,u=-c*e+(o>0?1:-1)*l,f=-c*i+(a>0?1:-1)*l;a=(-u-f)*_,o=(u-f)*_}var h=t.invert(a,o);return s||(h[0]+=a>0?y:-y),h}),e.geoProjection(i).rotate([-90,-90,45]).clipAngle(179.999)}function lr(){return sr(Ut).scale(111.48)}function cr(t){var e=g(t);function r(r,n){var a=e?m(r*e/2)/e:r/2;if(!n)return[2*a,-t];var s=2*i(a*g(n)),l=1/m(n);return[g(s)*l,n+(1-o(s))*l-t]}return r.invert=function(r,a){if(n(a+=t)v&&--u>0);var d=r*(f=m(c)),x=m(n(a)0?x:-x)*(h+o*(d-c)/2+o*o*(d-2*h+c)/2)]}function hr(t,e){var r=function(t){function e(e,r){var n=o(r),i=(t-1)/(t-n*o(e));return[i*n*g(e),i*g(r)]}return e.invert=function(e,r){var n=e*e+r*r,i=L(n),o=(t-L(1-n*(t+1)/(t-1)))/((t-1)/i+i/(t-1));return[a(e*o,i*L(1-o*o)),i?S(r*o/i):0]},e}(t);if(!e)return r;var n=o(e),i=g(e);function s(e,a){var o=r(e,a),s=o[1],l=s*i/(t-1)+n;return[o[0]*n/l,s/l]}return s.invert=function(e,a){var o=(t-1)/(t-1-a*i);return r.invert(o*e,o*a*n)},s}ur.forEach((function(t){t[1]*=1.0144})),fr.invert=function(t,e){var r=e/x,i=90*r,a=f(18,n(i/5)),o=u(0,l(a));do{var s=ur[o][1],c=ur[o+1][1],h=ur[f(19,o+2)][1],p=h-s,d=h-2*c+s,g=2*(n(r)-c)/p,m=d/p,v=g*(1-m*g*(1-2*m*g));if(v>=0||1===o){i=(e>=0?5:-5)*(v+a);var y,b=50;do{v=(a=f(18,n(i)/5))-(o=l(a)),s=ur[o][1],c=ur[o+1][1],h=ur[f(19,o+2)][1],i-=(y=(e>=0?x:-x)*(c+v*(h-s)/2+v*v*(h-2*c+s)/2)-e)*A}while(n(y)>1e-12&&--b>0);break}}while(--o>=0);var _=ur[o][0],w=ur[o+1][0],T=ur[f(19,o+2)][0];return[t/(w+v*(T-_)/2+v*v*(T-2*w+_)/2),i*M]};var pr=-179.9999,dr=179.9999,gr=-89.9999;function mr(t){return t.length>0}function vr(t){return-90===t||90===t?[0,t]:[-180,(e=t,Math.floor(1e4*e)/1e4)];var e}function yr(t){var e=t[0],r=t[1],n=!1;return e<=pr?(e=-180,n=!0):e>=dr&&(e=180,n=!0),r<=gr?(r=-90,n=!0):r>=89.9999&&(r=90,n=!0),n?[e,r]:t}function xr(t){return t.map(yr)}function br(t,e,r){for(var n=0,i=t.length;n=dr||u<=gr||u>=89.9999){a[o]=yr(l);for(var f=o+1;fpr&&pgr&&d<89.9999)break}if(f===o+1)continue;if(o){var g={index:-1,polygon:e,ring:a.slice(0,o+1)};g.ring[g.ring.length-1]=vr(u),r[r.length-1]=g}else r.pop();if(f>=s)break;r.push({index:-1,polygon:e,ring:a=a.slice(f-1)}),a[0]=vr(a[0][1]),o=-1,s=a.length}}}}function _r(t){var e,r,n,i,a,o,s=t.length,l={},c={};for(e=0;e0?y-l:l)*A],u=e.geoProjection(t(s)).rotate(c),f=e.geoRotation(c),h=u.center;return delete u.rotate,u.center=function(t){return arguments.length?h(f(t)):f.invert(h())},u.clipAngle(90)}function Mr(t){var r=o(t);function n(t,n){var i=e.geoGnomonicRaw(t,n);return i[0]*=r,i}return n.invert=function(t,n){return e.geoGnomonicRaw.invert(t/r,n)},n}function Sr(t,e){return Ar(Mr,t,e)}function Er(t){if(!(t*=2))return e.geoAzimuthalEquidistantRaw;var r=-t/2,n=-r,i=t*t,s=m(n),l=.5/g(n);function c(e,a){var s=E(o(a)*o(e-r)),l=E(o(a)*o(e-n));return[((s*=s)-(l*=l))/(2*t),(a<0?-1:1)*L(4*i*l-(i-s+l)*(i-s+l))/(2*t)]}return c.invert=function(t,e){var i,c,u=e*e,f=o(L(u+(i=t+r)*i)),h=o(L(u+(i=t+n)*i));return[a(c=f-h,i=(f+h)*s),(e<0?-1:1)*E(L(i*i+c*c)*l)]},c}function Lr(t,e){return Ar(Er,t,e)}function Cr(t,e){if(n(e)v&&--l>0);return[d(t)*(L(a*a+4)+a)*y/4,x*s]};var Rr=4*y+3*L(3),Fr=2*L(2*y*L(3)/Rr),Br=Y(Fr*L(3)/y,Fr,Rr/6);function Nr(t,e){return[t*L(1-3*e*e/(y*y)),e]}function jr(t,e){var r=o(e),n=o(t)*r,i=1-n,s=o(t=a(g(t)*r,-g(e))),l=g(t);return[l*(r=L(1-n*n))-s*i,-s*r-l*i]}function Ur(t,e){var r=O(t,e);return[(r[0]+t/x)/2,(r[1]+e)/2]}Nr.invert=function(t,e){return[t/L(1-3*e*e/(y*y)),e]},jr.invert=function(t,e){var r=(t*t+e*e)/-2,n=L(-r*(2+r)),i=e*r+t*n,o=t*r-e*n,s=L(o*o+i*i);return[a(n*i,s*(1+r)),s?-S(n*o/s):0]},Ur.invert=function(t,e){var r=t,i=e,a=25;do{var s,l=o(i),c=g(i),u=g(2*i),f=c*c,h=l*l,p=g(r),d=o(r/2),m=g(r/2),y=m*m,b=1-h*d*d,_=b?E(l*d)*L(s=1/b):s=0,w=.5*(2*_*l*m+r/x)-t,T=.5*(_*c+i)-e,k=.5*s*(h*y+_*l*d*f)+.5/x,A=s*(p*u/4-_*c*m),M=.125*s*(u*m-_*c*h*p),S=.5*s*(f*d+_*y*l)+.5,C=A*M-S*k,P=(T*A-w*S)/C,I=(w*M-T*k)/C;r-=P,i-=I}while((n(P)>v||n(I)>v)&&--a>0);return[r,i]},t.geoNaturalEarth=e.geoNaturalEarth1,t.geoNaturalEarthRaw=e.geoNaturalEarth1Raw,t.geoAiry=function(){var t=x,r=e.geoProjectionMutator(I),n=r(t);return n.radius=function(e){return arguments.length?r(t=e*M):t*A},n.scale(179.976).clipAngle(147)},t.geoAiryRaw=I,t.geoAitoff=function(){return e.geoProjection(O).scale(152.63)},t.geoAitoffRaw=O,t.geoArmadillo=function(){var t=20*M,r=t>=0?1:-1,n=m(r*t),i=e.geoProjectionMutator(z),s=i(t),l=s.stream;return s.parallel=function(e){return arguments.length?(n=m((r=(t=e*M)>=0?1:-1)*t),i(t)):t*A},s.stream=function(e){var i=s.rotate(),c=l(e),u=(s.rotate([0,0]),l(e)),f=s.precision();return s.rotate(i),c.sphere=function(){u.polygonStart(),u.lineStart();for(var e=-180*r;r*e<180;e+=90*r)u.point(e,90*r);if(t)for(;r*(e-=3*r*f)>=-180;)u.point(e,r*-a(o(e*M/2),n)*A);u.lineEnd(),u.polygonEnd()},c},s.scale(218.695).center([0,28.0974])},t.geoArmadilloRaw=z,t.geoAugust=function(){return e.geoProjection(D).scale(66.1603)},t.geoAugustRaw=D,t.geoBaker=function(){return e.geoProjection(B).scale(112.314)},t.geoBakerRaw=B,t.geoBerghaus=function(){var t=5,r=e.geoProjectionMutator(N),n=r(t),i=n.stream,s=-o(.01*M),l=g(.01*M);return n.lobes=function(e){return arguments.length?r(t=+e):t},n.stream=function(e){var r=n.rotate(),c=i(e),u=(n.rotate([0,0]),i(e));return n.rotate(r),c.sphere=function(){u.polygonStart(),u.lineStart();for(var e=0,r=360/t,n=2*y/t,i=90-180/t,c=x;e=0;)t.point((e=r[i])[0],e[1]);t.lineEnd(),t.polygonEnd()},t},n.scale(79.4187).parallel(45).clipAngle(179.999)},t.geoHammerRetroazimuthalRaw=Vt,t.geoHealpix=function(){var t=4,n=e.geoProjectionMutator(Yt),i=n(t),a=i.stream;return i.lobes=function(e){return arguments.length?n(t=+e):t},i.stream=function(n){var o=i.rotate(),s=a(n),l=(i.rotate([0,0]),a(n));return i.rotate(o),s.sphere=function(){var n,i;e.geoStream((n=180/t,i=[].concat(r.range(-180,180+n/2,n).map(Wt),r.range(180,-180-n/2,-n).map(Xt)),{type:\"Polygon\",coordinates:[180===n?i.map(Zt):i]}),l)},s},i.scale(239.75)},t.geoHealpixRaw=Yt,t.geoHill=function(){var t=1,r=e.geoProjectionMutator(Jt),n=r(t);return n.ratio=function(e){return arguments.length?r(t=+e):t},n.scale(167.774).center([0,18.67])},t.geoHillRaw=Jt,t.geoHomolosine=function(){return e.geoProjection(Qt).scale(152.63)},t.geoHomolosineRaw=Qt,t.geoHufnagel=function(){var t=1,r=0,n=45*M,i=2,a=e.geoProjectionMutator($t),o=a(t,r,n,i);return o.a=function(e){return arguments.length?a(t=+e,r,n,i):t},o.b=function(e){return arguments.length?a(t,r=+e,n,i):r},o.psiMax=function(e){return arguments.length?a(t,r,n=+e*M,i):n*A},o.ratio=function(e){return arguments.length?a(t,r,n,i=+e):i},o.scale(180.739)},t.geoHufnagelRaw=$t,t.geoHyperelliptical=function(){var t=0,r=2.5,n=1.183136,i=e.geoProjectionMutator(ee),a=i(t,r,n);return a.alpha=function(e){return arguments.length?i(t=+e,r,n):t},a.k=function(e){return arguments.length?i(t,r=+e,n):r},a.gamma=function(e){return arguments.length?i(t,r,n=+e):n},a.scale(152.63)},t.geoHyperellipticalRaw=ee,t.geoInterrupt=ae,t.geoInterruptedBoggs=function(){return ae(J,oe).scale(160.857)},t.geoInterruptedHomolosine=function(){return ae(Qt,se).scale(152.63)},t.geoInterruptedMollweide=function(){return ae(W,le).scale(169.529)},t.geoInterruptedMollweideHemispheres=function(){return ae(W,ce).scale(169.529).rotate([20,0])},t.geoInterruptedSinuMollweide=function(){return ae(Kt,ue,H).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},t.geoInterruptedSinusoidal=function(){return ae(Q,fe).scale(152.63).rotate([-20,0])},t.geoKavrayskiy7=function(){return e.geoProjection(he).scale(158.837)},t.geoKavrayskiy7Raw=he,t.geoLagrange=function(){var t=.5,r=e.geoProjectionMutator(pe),n=r(t);return n.spacing=function(e){return arguments.length?r(t=+e):t},n.scale(124.75)},t.geoLagrangeRaw=pe,t.geoLarrivee=function(){return e.geoProjection(ge).scale(97.2672)},t.geoLarriveeRaw=ge,t.geoLaskowski=function(){return e.geoProjection(me).scale(139.98)},t.geoLaskowskiRaw=me,t.geoLittrow=function(){return e.geoProjection(ve).scale(144.049).clipAngle(89.999)},t.geoLittrowRaw=ve,t.geoLoximuthal=function(){return K(ye).parallel(40).scale(158.837)},t.geoLoximuthalRaw=ye,t.geoMiller=function(){return e.geoProjection(xe).scale(108.318)},t.geoMillerRaw=xe,t.geoModifiedStereographic=Me,t.geoModifiedStereographicRaw=be,t.geoModifiedStereographicAlaska=function(){return Me(_e,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},t.geoModifiedStereographicGs48=function(){return Me(we,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},t.geoModifiedStereographicGs50=function(){return Me(Te,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},t.geoModifiedStereographicMiller=function(){return Me(ke,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},t.geoModifiedStereographicLee=function(){return Me(Ae,[165,10]).scale(250).clipAngle(130).center([-165,-10])},t.geoMollweide=function(){return e.geoProjection(W).scale(169.529)},t.geoMollweideRaw=W,t.geoMtFlatPolarParabolic=function(){return e.geoProjection(Le).scale(164.859)},t.geoMtFlatPolarParabolicRaw=Le,t.geoMtFlatPolarQuartic=function(){return e.geoProjection(Ce).scale(188.209)},t.geoMtFlatPolarQuarticRaw=Ce,t.geoMtFlatPolarSinusoidal=function(){return e.geoProjection(Pe).scale(166.518)},t.geoMtFlatPolarSinusoidalRaw=Pe,t.geoNaturalEarth2=function(){return e.geoProjection(Ie).scale(175.295)},t.geoNaturalEarth2Raw=Ie,t.geoNellHammer=function(){return e.geoProjection(Oe).scale(152.63)},t.geoNellHammerRaw=Oe,t.geoInterruptedQuarticAuthalic=function(){return ae(j(1/0),ze).rotate([20,0]).scale(152.63)},t.geoNicolosi=function(){return e.geoProjection(De).scale(127.267)},t.geoNicolosiRaw=De,t.geoPatterson=function(){return e.geoProjection(Re).scale(139.319)},t.geoPattersonRaw=Re,t.geoPolyconic=function(){return e.geoProjection(Fe).scale(103.74)},t.geoPolyconicRaw=Fe,t.geoPolyhedral=Ve,t.geoPolyhedralButterfly=function(t){t=t||function(t){var r=e.geoCentroid({type:\"MultiPoint\",coordinates:t});return e.geoGnomonic().scale(1).translate([0,0]).rotate([-r[0],-r[1]])};var r=Ye.map((function(e){return{face:e,project:t(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var n=r[t];n&&(n.children||(n.children=[])).push(r[e])})),Ve(r[0],(function(t,e){return r[t<-y/2?e<0?6:4:t<0?e<0?2:0:t0?[-r[0],0]:[180-r[0],180])};var r=Ye.map((function(e){return{face:e,project:t(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var n=r[t];n&&(n.children||(n.children=[])).push(r[e])})),Ve(r[0],(function(t,e){return r[t<-y/2?e<0?6:4:t<0?e<0?2:0:t2||a[0]!=e[0]||a[1]!=e[1])&&(n.push(a),e=a)}return 1===n.length&&t.length>1&&n.push(r(t[t.length-1])),n}function a(t){return t.map(i)}function o(t){if(null==t)return t;var e;switch(t.type){case\"GeometryCollection\":e={type:\"GeometryCollection\",geometries:t.geometries.map(o)};break;case\"Point\":e={type:\"Point\",coordinates:r(t.coordinates)};break;case\"MultiPoint\":e={type:t.type,coordinates:n(t.coordinates)};break;case\"LineString\":e={type:t.type,coordinates:i(t.coordinates)};break;case\"MultiLineString\":case\"Polygon\":e={type:t.type,coordinates:a(t.coordinates)};break;case\"MultiPolygon\":e={type:\"MultiPolygon\",coordinates:t.coordinates.map(a)};break;default:return t}return null!=t.bbox&&(e.bbox=t.bbox),e}function s(t){var e={type:\"Feature\",properties:t.properties,geometry:o(t.geometry)};return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),e}if(null!=t)switch(t.type){case\"Feature\":return s(t);case\"FeatureCollection\":var l={type:\"FeatureCollection\",features:t.features.map(s)};return null!=t.bbox&&(l.bbox=t.bbox),l;default:return o(t)}return t},t.geoQuincuncial=sr,t.geoRectangularPolyconic=function(){return K(cr).scale(131.215)},t.geoRectangularPolyconicRaw=cr,t.geoRobinson=function(){return e.geoProjection(fr).scale(152.63)},t.geoRobinsonRaw=fr,t.geoSatellite=function(){var t=2,r=0,n=e.geoProjectionMutator(hr),i=n(t,r);return i.distance=function(e){return arguments.length?n(t=+e,r):t},i.tilt=function(e){return arguments.length?n(t,r=e*M):r*A},i.scale(432.147).clipAngle(E(1/t)*A-1e-6)},t.geoSatelliteRaw=hr,t.geoSinuMollweide=function(){return e.geoProjection(Kt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},t.geoSinuMollweideRaw=Kt,t.geoSinusoidal=function(){return e.geoProjection(Q).scale(152.63)},t.geoSinusoidalRaw=Q,t.geoStitch=function(t){if(null==t)return t;switch(t.type){case\"Feature\":return wr(t);case\"FeatureCollection\":var e={type:\"FeatureCollection\",features:t.features.map(wr)};return null!=t.bbox&&(e.bbox=t.bbox),e;default:return Tr(t)}},t.geoTimes=function(){return e.geoProjection(kr).scale(146.153)},t.geoTimesRaw=kr,t.geoTwoPointAzimuthal=Sr,t.geoTwoPointAzimuthalRaw=Mr,t.geoTwoPointAzimuthalUsa=function(){return Sr([-158,21.5],[-77,39]).clipAngle(60).scale(400)},t.geoTwoPointEquidistant=Lr,t.geoTwoPointEquidistantRaw=Er,t.geoTwoPointEquidistantUsa=function(){return Lr([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},t.geoVanDerGrinten=function(){return e.geoProjection(Cr).scale(79.4183)},t.geoVanDerGrintenRaw=Cr,t.geoVanDerGrinten2=function(){return e.geoProjection(Pr).scale(79.4183)},t.geoVanDerGrinten2Raw=Pr,t.geoVanDerGrinten3=function(){return e.geoProjection(Ir).scale(79.4183)},t.geoVanDerGrinten3Raw=Ir,t.geoVanDerGrinten4=function(){return e.geoProjection(Or).scale(127.16)},t.geoVanDerGrinten4Raw=Or,t.geoWagner=Dr,t.geoWagner7=function(){return Dr().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},t.geoWagnerRaw=zr,t.geoWagner4=function(){return e.geoProjection(Br).scale(176.84)},t.geoWagner4Raw=Br,t.geoWagner6=function(){return e.geoProjection(Nr).scale(152.63)},t.geoWagner6Raw=Nr,t.geoWiechel=function(){return e.geoProjection(jr).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},t.geoWiechelRaw=jr,t.geoWinkel3=function(){return e.geoProjection(Ur).scale(158.837)},t.geoWinkel3Raw=Ur,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{\"d3-array\":107,\"d3-geo\":114}],114:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-array\")):i((n=n||self).d3=n.d3||{},n.d3)}(this,(function(t,e){\"use strict\";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(t){a(i,t,this.t),a(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new n;function a(t,e,r){var n=t.s=e+r,i=n-e,a=n-i;t.t=e-a+(r-i)}var o=1e-6,s=Math.PI,l=s/2,c=s/4,u=2*s,f=180/s,h=s/180,p=Math.abs,d=Math.atan,g=Math.atan2,m=Math.cos,v=Math.ceil,y=Math.exp,x=Math.log,b=Math.pow,_=Math.sin,w=Math.sign||function(t){return t>0?1:t<0?-1:0},T=Math.sqrt,k=Math.tan;function A(t){return t>1?0:t<-1?s:Math.acos(t)}function M(t){return t>1?l:t<-1?-l:Math.asin(t)}function S(t){return(t=_(t/2))*t}function E(){}function L(t,e){t&&P.hasOwnProperty(t.type)&&P[t.type](t,e)}var C={Feature:function(t,e){L(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n=0?1:-1,i=n*r,a=m(e=(e*=h)/2+c),o=_(e),s=N*o,l=B*a+s*m(i),u=s*n*_(i);j.add(g(u,l)),F=t,B=a,N=o}function W(t){return[g(t[1],t[0]),M(t[2])]}function X(t){var e=t[0],r=t[1],n=m(r);return[n*m(e),n*_(e),_(r)]}function Z(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function J(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 K(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Q(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function $(t){var e=T(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var tt,et,rt,nt,it,at,ot,st,lt,ct,ut,ft,ht,pt,dt,gt,mt,vt,yt,xt,bt,_t,wt,Tt,kt,At,Mt=r(),St={point:Et,lineStart:Ct,lineEnd:Pt,polygonStart:function(){St.point=It,St.lineStart=Ot,St.lineEnd=zt,Mt.reset(),V.polygonStart()},polygonEnd:function(){V.polygonEnd(),St.point=Et,St.lineStart=Ct,St.lineEnd=Pt,j<0?(tt=-(rt=180),et=-(nt=90)):Mt>o?nt=90:Mt<-o&&(et=-90),ct[0]=tt,ct[1]=rt},sphere:function(){tt=-(rt=180),et=-(nt=90)}};function Et(t,e){lt.push(ct=[tt=t,rt=t]),ent&&(nt=e)}function Lt(t,e){var r=X([t*h,e*h]);if(st){var n=J(st,r),i=J([n[1],-n[0],0],n);$(i),i=W(i);var a,o=t-it,s=o>0?1:-1,l=i[0]*f*s,c=p(o)>180;c^(s*itnt&&(nt=a):c^(s*it<(l=(l+360)%360-180)&&lnt&&(nt=e)),c?tDt(tt,rt)&&(rt=t):Dt(t,rt)>Dt(tt,rt)&&(tt=t):rt>=tt?(trt&&(rt=t)):t>it?Dt(tt,t)>Dt(tt,rt)&&(rt=t):Dt(t,rt)>Dt(tt,rt)&&(tt=t)}else lt.push(ct=[tt=t,rt=t]);ent&&(nt=e),st=r,it=t}function Ct(){St.point=Lt}function Pt(){ct[0]=tt,ct[1]=rt,St.point=Et,st=null}function It(t,e){if(st){var r=t-it;Mt.add(p(r)>180?r+(r>0?360:-360):r)}else at=t,ot=e;V.point(t,e),Lt(t,e)}function Ot(){V.lineStart()}function zt(){It(at,ot),V.lineEnd(),p(Mt)>o&&(tt=-(rt=180)),ct[0]=tt,ct[1]=rt,st=null}function Dt(t,e){return(e-=t)<0?e+360:e}function Rt(t,e){return t[0]-e[0]}function Ft(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:es?t+Math.round(-t/u)*u:t,e]}function Qt(t,e,r){return(t%=u)?e||r?Jt(te(t),ee(e,r)):te(t):e||r?ee(e,r):Kt}function $t(t){return function(e,r){return[(e+=t)>s?e-u:e<-s?e+u:e,r]}}function te(t){var e=$t(t);return e.invert=$t(-t),e}function ee(t,e){var r=m(t),n=_(t),i=m(e),a=_(e);function o(t,e){var o=m(e),s=m(t)*o,l=_(t)*o,c=_(e),u=c*r+s*n;return[g(l*i-u*a,s*r-c*n),M(u*i+l*a)]}return o.invert=function(t,e){var o=m(e),s=m(t)*o,l=_(t)*o,c=_(e),u=c*i-l*a;return[g(l*i+c*a,s*r+u*n),M(u*r-s*n)]},o}function re(t){function e(e){return(e=t(e[0]*h,e[1]*h))[0]*=f,e[1]*=f,e}return t=Qt(t[0]*h,t[1]*h,t.length>2?t[2]*h:0),e.invert=function(e){return(e=t.invert(e[0]*h,e[1]*h))[0]*=f,e[1]*=f,e},e}function ne(t,e,r,n,i,a){if(r){var o=m(e),s=_(e),l=n*r;null==i?(i=e+n*u,a=e-l/2):(i=ie(o,i),a=ie(o,a),(n>0?ia)&&(i+=n*u));for(var c,f=i;n>0?f>a:f1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}function oe(t,e){return p(t[0]-e[0])=0;--a)i.point((f=u[a])[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 ce(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n=0?1:-1,z=O*I,D=z>s,R=T*C;if(ue.add(g(R*O*_(z),k*P+R*m(z))),f+=D?I+O*u:I,D^b>=r^E>=r){var F=J(X(x),X(S));$(F);var B=J(a,F);$(B);var N=(D^I>=0?-1:1)*M(B[2]);(n>N||n===N&&(F[0]||F[1]))&&(h+=D^I>=0?1:-1)}}return(f<-o||f0){for(h||(a.polygonStart(),h=!0),a.lineStart(),t=0;t1&&2&i&&c.push(c.pop().concat(c.shift())),s.push(c.filter(de))}return p}}function de(t){return t.length>1}function ge(t,e){return((t=t.x)[0]<0?t[1]-l-o:l-t[1])-((e=e.x)[0]<0?e[1]-l-o:l-e[1])}var me=pe((function(){return!0}),(function(t){var e,r=NaN,n=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,c){var u=a>0?s:-s,f=p(a-r);p(f-s)0?l:-l),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(u,n),t.point(a,n),e=0):i!==u&&f>=s&&(p(r-i)o?d((_(e)*(a=m(n))*_(r)-_(n)*(i=m(e))*_(t))/(i*a*s)):(e+n)/2}(r,n,a,c),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(u,n),e=0),t.point(r=a,n=c),i=u},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}}),(function(t,e,r,n){var i;if(null==t)i=r*l,n.point(-s,i),n.point(0,i),n.point(s,i),n.point(s,0),n.point(s,-i),n.point(0,-i),n.point(-s,-i),n.point(-s,0),n.point(-s,i);else if(p(t[0]-e[0])>o){var a=t[0]0,i=p(e)>o;function a(t,r){return m(t)*m(r)>e}function l(t,r,n){var i=[1,0,0],a=J(X(t),X(r)),l=Z(a,a),c=a[0],u=l-c*c;if(!u)return!n&&t;var f=e*l/u,h=-e*c/u,d=J(i,a),g=Q(i,f);K(g,Q(a,h));var m=d,v=Z(g,m),y=Z(m,m),x=v*v-y*(Z(g,g)-1);if(!(x<0)){var b=T(x),_=Q(m,(-v-b)/y);if(K(_,g),_=W(_),!n)return _;var w,k=t[0],A=r[0],M=t[1],S=r[1];A0^_[1]<(p(_[0]-k)s^(k<=_[0]&&_[0]<=A)){var C=Q(m,(-v+b)/y);return K(C,g),[_,W(C)]}}}function c(e,r){var i=n?t:s-t,a=0;return e<-i?a|=1:e>i&&(a|=2),r<-i?a|=4:r>i&&(a|=8),a}return pe(a,(function(t){var e,r,o,u,f;return{lineStart:function(){u=o=!1,f=1},point:function(h,p){var d,g=[h,p],m=a(h,p),v=n?m?0:c(h,p):m?c(h+(h<0?s:-s),p):0;if(!e&&(u=o=m)&&t.lineStart(),m!==o&&(!(d=l(e,g))||oe(e,d)||oe(g,d))&&(g[2]=1),m!==o)f=0,m?(t.lineStart(),d=l(g,e),t.point(d[0],d[1])):(d=l(e,g),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&n^m){var y;v&r||!(y=l(g,e,!0))||(f=0,n?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!m||e&&oe(e,g)||t.point(g[0],g[1]),e=g,o=m,r=v},lineEnd:function(){o&&t.lineEnd(),e=null},clean:function(){return f|(u&&o)<<1}}}),(function(e,n,i,a){ne(a,t,r,i,e,n)}),n?[0,-t]:[-s,t-s])}function ye(t,r,n,i){function a(e,a){return t<=e&&e<=n&&r<=a&&a<=i}function s(e,a,o,s){var c=0,f=0;if(null==e||(c=l(e,o))!==(f=l(a,o))||u(e,a)<0^o>0)do{s.point(0===c||3===c?t:n,c>1?i:r)}while((c=(c+o+4)%4)!==f);else s.point(a[0],a[1])}function l(e,i){return p(e[0]-t)0?0:3:p(e[0]-n)0?2:1:p(e[1]-r)0?1:0:i>0?3:2}function c(t,e){return u(t.x,e.x)}function u(t,e){var r=l(t,1),n=l(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]}return function(o){var l,u,f,h,p,d,g,m,v,y,x,b=o,_=ae(),w={point:T,lineStart:function(){w.point=k,u&&u.push(f=[]);y=!0,v=!1,g=m=NaN},lineEnd:function(){l&&(k(h,p),d&&v&&_.rejoin(),l.push(_.result()));w.point=T,v&&b.lineEnd()},polygonStart:function(){b=_,l=[],u=[],x=!0},polygonEnd:function(){var r=function(){for(var e=0,r=0,n=u.length;ri&&(h-a)*(i-o)>(p-o)*(t-a)&&++e:p<=i&&(h-a)*(i-o)<(p-o)*(t-a)&&--e;return e}(),n=x&&r,a=(l=e.merge(l)).length;(n||a)&&(o.polygonStart(),n&&(o.lineStart(),s(null,null,1,o),o.lineEnd()),a&&le(l,c,r,s,o),o.polygonEnd());b=o,l=u=f=null}};function T(t,e){a(t,e)&&b.point(t,e)}function k(e,o){var s=a(e,o);if(u&&f.push([e,o]),y)h=e,p=o,d=s,y=!1,s&&(b.lineStart(),b.point(e,o));else if(s&&v)b.point(e,o);else{var l=[g=Math.max(-1e9,Math.min(1e9,g)),m=Math.max(-1e9,Math.min(1e9,m))],c=[e=Math.max(-1e9,Math.min(1e9,e)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,r,n,i,a){var o,s=t[0],l=t[1],c=0,u=1,f=e[0]-s,h=e[1]-l;if(o=r-s,f||!(o>0)){if(o/=f,f<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=i-s,f||!(o<0)){if(o/=f,f<0){if(o>u)return;o>c&&(c=o)}else if(f>0){if(o0)){if(o/=h,h<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=a-l,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>c&&(c=o)}else if(h>0){if(o0&&(t[0]=s+c*f,t[1]=l+c*h),u<1&&(e[0]=s+u*f,e[1]=l+u*h),!0}}}}}(l,c,t,r,n,i)?s&&(b.lineStart(),b.point(e,o),x=!1):(v||(b.lineStart(),b.point(l[0],l[1])),b.point(c[0],c[1]),s||b.lineEnd(),x=!1)}g=e,m=o,v=s}return w}}var xe,be,_e,we=r(),Te={sphere:E,point:E,lineStart:function(){Te.point=Ae,Te.lineEnd=ke},lineEnd:E,polygonStart:E,polygonEnd:E};function ke(){Te.point=Te.lineEnd=E}function Ae(t,e){xe=t*=h,be=_(e*=h),_e=m(e),Te.point=Me}function Me(t,e){t*=h;var r=_(e*=h),n=m(e),i=p(t-xe),a=m(i),o=n*_(i),s=_e*r-be*n*a,l=be*r+_e*n*a;we.add(g(T(o*o+s*s),l)),xe=t,be=r,_e=n}function Se(t){return we.reset(),z(t,Te),+we}var Ee=[null,null],Le={type:\"LineString\",coordinates:Ee};function Ce(t,e){return Ee[0]=t,Ee[1]=e,Se(Le)}var Pe={Feature:function(t,e){return Oe(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n0&&(i=Ce(t[a],t[a-1]))>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))<1e-12*i)return!0;r=n}return!1}function Re(t,e){return!!he(t.map(Fe),Be(e))}function Fe(t){return(t=t.map(Be)).pop(),t}function Be(t){return[t[0]*h,t[1]*h]}function Ne(t,r,n){var i=e.range(t,r-o,n).concat(r);return function(t){return i.map((function(e){return[t,e]}))}}function je(t,r,n){var i=e.range(t,r-o,n).concat(r);return function(t){return i.map((function(e){return[e,t]}))}}function Ue(){var t,r,n,i,a,s,l,c,u,f,h,d,g=10,m=g,y=90,x=360,b=2.5;function _(){return{type:\"MultiLineString\",coordinates:w()}}function w(){return e.range(v(i/y)*y,n,y).map(h).concat(e.range(v(c/x)*x,l,x).map(d)).concat(e.range(v(r/g)*g,t,g).filter((function(t){return p(t%y)>o})).map(u)).concat(e.range(v(s/m)*m,a,m).filter((function(t){return p(t%x)>o})).map(f))}return _.lines=function(){return w().map((function(t){return{type:\"LineString\",coordinates:t}}))},_.outline=function(){return{type:\"Polygon\",coordinates:[h(i).concat(d(l).slice(1),h(n).reverse().slice(1),d(c).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],c=+t[0][1],l=+t[1][1],i>n&&(t=i,i=n,n=t),c>l&&(t=c,c=l,l=t),_.precision(b)):[[i,c],[n,l]]},_.extentMinor=function(e){return arguments.length?(r=+e[0][0],t=+e[1][0],s=+e[0][1],a=+e[1][1],r>t&&(e=r,r=t,t=e),s>a&&(e=s,s=a,a=e),_.precision(b)):[[r,s],[t,a]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(y=+t[0],x=+t[1],_):[y,x]},_.stepMinor=function(t){return arguments.length?(g=+t[0],m=+t[1],_):[g,m]},_.precision=function(e){return arguments.length?(b=+e,u=Ne(s,a,90),f=je(r,t,b),h=Ne(c,l,90),d=je(i,n,b),_):b},_.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function Ve(t){return t}var He,qe,Ge,Ye,We=r(),Xe=r(),Ze={point:E,lineStart:E,lineEnd:E,polygonStart:function(){Ze.lineStart=Je,Ze.lineEnd=$e},polygonEnd:function(){Ze.lineStart=Ze.lineEnd=Ze.point=E,We.add(p(Xe)),Xe.reset()},result:function(){var t=We/2;return We.reset(),t}};function Je(){Ze.point=Ke}function Ke(t,e){Ze.point=Qe,He=Ge=t,qe=Ye=e}function Qe(t,e){Xe.add(Ye*t-Ge*e),Ge=t,Ye=e}function $e(){Qe(He,qe)}var tr=1/0,er=tr,rr=-tr,nr=rr,ir={point:function(t,e){trr&&(rr=t);enr&&(nr=e)},lineStart:E,lineEnd:E,polygonStart:E,polygonEnd:E,result:function(){var t=[[tr,er],[rr,nr]];return rr=nr=-(er=tr=1/0),t}};var ar,or,sr,lr,cr=0,ur=0,fr=0,hr=0,pr=0,dr=0,gr=0,mr=0,vr=0,yr={point:xr,lineStart:br,lineEnd:Tr,polygonStart:function(){yr.lineStart=kr,yr.lineEnd=Ar},polygonEnd:function(){yr.point=xr,yr.lineStart=br,yr.lineEnd=Tr},result:function(){var t=vr?[gr/vr,mr/vr]:dr?[hr/dr,pr/dr]:fr?[cr/fr,ur/fr]:[NaN,NaN];return cr=ur=fr=hr=pr=dr=gr=mr=vr=0,t}};function xr(t,e){cr+=t,ur+=e,++fr}function br(){yr.point=_r}function _r(t,e){yr.point=wr,xr(sr=t,lr=e)}function wr(t,e){var r=t-sr,n=e-lr,i=T(r*r+n*n);hr+=i*(sr+t)/2,pr+=i*(lr+e)/2,dr+=i,xr(sr=t,lr=e)}function Tr(){yr.point=xr}function kr(){yr.point=Mr}function Ar(){Sr(ar,or)}function Mr(t,e){yr.point=Sr,xr(ar=sr=t,or=lr=e)}function Sr(t,e){var r=t-sr,n=e-lr,i=T(r*r+n*n);hr+=i*(sr+t)/2,pr+=i*(lr+e)/2,dr+=i,gr+=(i=lr*t-sr*e)*(sr+t),mr+=i*(lr+e),vr+=3*i,xr(sr=t,lr=e)}function Er(t){this._context=t}Er.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,u)}},result:E};var Lr,Cr,Pr,Ir,Or,zr=r(),Dr={point:E,lineStart:function(){Dr.point=Rr},lineEnd:function(){Lr&&Fr(Cr,Pr),Dr.point=E},polygonStart:function(){Lr=!0},polygonEnd:function(){Lr=null},result:function(){var t=+zr;return zr.reset(),t}};function Rr(t,e){Dr.point=Fr,Cr=Ir=t,Pr=Or=e}function Fr(t,e){Ir-=t,Or-=e,zr.add(T(Ir*Ir+Or*Or)),Ir=t,Or=e}function Br(){this._string=[]}function Nr(t){return\"m0,\"+t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+-2*t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+2*t+\"z\"}function jr(t){return function(e){var r=new Ur;for(var n in t)r[n]=t[n];return r.stream=e,r}}function Ur(){}function Vr(t,e,r){var n=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=n&&t.clipExtent(null),z(r,t.stream(ir)),e(ir.result()),null!=n&&t.clipExtent(n),t}function Hr(t,e,r){return Vr(t,(function(r){var n=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(n/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),o=+e[0][0]+(n-a*(r[1][0]+r[0][0]))/2,s=+e[0][1]+(i-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([o,s])}),r)}function qr(t,e,r){return Hr(t,[[0,0],e],r)}function Gr(t,e,r){return Vr(t,(function(r){var n=+e,i=n/(r[1][0]-r[0][0]),a=(n-i*(r[1][0]+r[0][0]))/2,o=-i*r[0][1];t.scale(150*i).translate([a,o])}),r)}function Yr(t,e,r){return Vr(t,(function(r){var n=+e,i=n/(r[1][1]-r[0][1]),a=-i*r[0][0],o=(n-i*(r[1][1]+r[0][1]))/2;t.scale(150*i).translate([a,o])}),r)}Br.prototype={_radius:4.5,_circle:Nr(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push(\"Z\"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push(\"M\",t,\",\",e),this._point=1;break;case 1:this._string.push(\"L\",t,\",\",e);break;default:null==this._circle&&(this._circle=Nr(this._radius)),this._string.push(\"M\",t,\",\",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join(\"\");return this._string=[],t}return null}},Ur.prototype={constructor:Ur,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()}};var Wr=m(30*h);function Xr(t,e){return+e?function(t,e){function r(n,i,a,s,l,c,u,f,h,d,m,v,y,x){var b=u-n,_=f-i,w=b*b+_*_;if(w>4*e&&y--){var k=s+d,A=l+m,S=c+v,E=T(k*k+A*A+S*S),L=M(S/=E),C=p(p(S)-1)e||p((b*z+_*D)/w-.5)>.3||s*d+l*m+c*v2?t[2]%360*h:0,I()):[y*f,x*f,b*f]},C.angle=function(t){return arguments.length?(_=t%360*h,I()):_*f},C.reflectX=function(t){return arguments.length?(w=t?-1:1,I()):w<0},C.reflectY=function(t){return arguments.length?(k=t?-1:1,I()):k<0},C.precision=function(t){return arguments.length?(o=Xr(s,L=t*t),O()):T(L)},C.fitExtent=function(t,e){return Hr(C,t,e)},C.fitSize=function(t,e){return qr(C,t,e)},C.fitWidth=function(t,e){return Gr(C,t,e)},C.fitHeight=function(t,e){return Yr(C,t,e)},function(){return e=t.apply(this,arguments),C.invert=e.invert&&P,I()}}function tn(t){var e=0,r=s/3,n=$r(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*h,r=t[1]*h):[e*f,r*f]},i}function en(t,e){var r=_(t),n=(r+_(e))/2;if(p(n)0?e<-l+o&&(e=-l+o):e>l-o&&(e=l-o);var r=i/b(fn(e),n);return[r*_(n*t),i-r*m(n*t)]}return a.invert=function(t,e){var r=i-e,a=w(n)*T(t*t+r*r),o=g(t,p(r))*w(r);return r*n<0&&(o-=s*w(t)*w(r)),[o/n,2*d(b(i/a,1/n))-l]},a}function pn(t,e){return[t,e]}function dn(t,e){var r=m(t),n=t===e?_(t):(r-m(e))/(e-t),i=r/n+t;if(p(n)o&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},Tn.invert=on(M),kn.invert=on((function(t){return 2*d(t)})),An.invert=function(t,e){return[-e,2*d(y(t))-l]},t.geoAlbers=nn,t.geoAlbersUsa=function(){var t,e,r,n,i,a,s=nn(),l=rn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=rn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){a=[t,e]}};function f(t){var e=t[0],o=t[1];return a=null,r.point(e,o),a||(n.point(e,o),a)||(i.point(e,o),a)}function h(){return t=e=null,f}return f.invert=function(t){var e=s.scale(),r=s.translate(),n=(t[0]-r[0])/e,i=(t[1]-r[1])/e;return(i>=.12&&i<.234&&n>=-.425&&n<-.214?l:i>=.166&&i<.234&&n>=-.214&&n<-.115?c:s).invert(t)},f.stream=function(r){return t&&e===r?t:(n=[s.stream(e=r),l.stream(r),c.stream(r)],i=n.length,t={point:function(t,e){for(var r=-1;++rDt(n[0],n[1])&&(n[1]=i[1]),Dt(i[0],n[1])>Dt(n[0],n[1])&&(n[0]=i[0])):a.push(n=i);for(o=-1/0,e=0,n=a[r=a.length-1];e<=r;n=i,++e)i=a[e],(s=Dt(n[1],i[0]))>o&&(o=s,tt=i[0],rt=n[1])}return lt=ct=null,tt===1/0||et===1/0?[[NaN,NaN],[NaN,NaN]]:[[tt,et],[rt,nt]]},t.geoCentroid=function(t){ut=ft=ht=pt=dt=gt=mt=vt=yt=xt=bt=0,z(t,Bt);var e=yt,r=xt,n=bt,i=e*e+r*r+n*n;return i<1e-12&&(e=gt,r=mt,n=vt,ft2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90]).scale(159.155)},t.geoTransverseMercatorRaw=An,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{\"d3-array\":107}],115:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){\"use strict\";function e(t,e){return t.parent===e.parent?1:2}function r(t,e){return t+e.x}function n(t,e){return Math.max(t,e.y)}function i(t){var e=0,r=t.children,n=r&&r.length;if(n)for(;--n>=0;)e+=r[n].value;else e=1;t.value=e}function a(t,e){var r,n,i,a,s,u=new c(t),f=+t.value&&(u.value=t.value),h=[u];for(null==e&&(e=o);r=h.pop();)if(f&&(r.value=+r.data.value),(i=e(r.data))&&(s=i.length))for(r.children=new Array(s),a=s-1;a>=0;--a)h.push(n=r.children[a]=new c(i[a])),n.parent=r,n.depth=r.depth+1;return u.eachBefore(l)}function o(t){return t.children}function s(t){t.data=t.data.data}function l(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function c(t){this.data=t,this.depth=this.height=0,this.parent=null}c.prototype=a.prototype={constructor:c,count:function(){return this.eachAfter(i)},each:function(t){var e,r,n,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),r=a.children)for(n=0,i=r.length;n=0;--r)i.push(e[r]);return this},sum:function(t){return this.eachAfter((function(e){for(var r=+t(e.data)||0,n=e.children,i=n&&n.length;--i>=0;)r+=n[i].value;e.value=r}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),i=null;t=r.pop(),e=n.pop();for(;t===e;)i=t,t=r.pop(),e=n.pop();return i}(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var i=n.length;t!==r;)n.splice(i,0,t),t=t.parent;return n},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(r){r!==t&&e.push({source:r.parent,target:r})})),e},copy:function(){return a(this).eachBefore(s)}};var u=Array.prototype.slice;function f(t){for(var e,r,n=0,i=(t=function(t){for(var e,r,n=t.length;n;)r=Math.random()*n--|0,e=t[n],t[n]=t[r],t[r]=e;return t}(u.call(t))).length,a=[];n0&&r*r>n*n+i*i}function g(t,e){for(var r=0;r(o*=o)?(n=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-n*n)),r.x=t.x-n*s-a*l,r.y=t.y-n*l+a*s):(n=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-n*n)),r.x=e.x+n*s-a*l,r.y=e.y+n*l+a*s)):(r.x=e.x+r.r,r.y=e.y)}function b(t,e){var r=t.r+e.r-1e-6,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function _(t){var e=t._,r=t.next._,n=e.r+r.r,i=(e.x*r.r+r.x*e.r)/n,a=(e.y*r.r+r.y*e.r)/n;return i*i+a*a}function w(t){this._=t,this.next=null,this.previous=null}function T(t){if(!(i=t.length))return 0;var e,r,n,i,a,o,s,l,c,u,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(r=t[1],e.x=-r.r,r.x=e.r,r.y=0,!(i>2))return e.r+r.r;x(r,e,n=t[2]),e=new w(e),r=new w(r),n=new w(n),e.next=n.previous=r,r.next=e.previous=n,n.next=r.previous=e;t:for(s=3;sh&&(h=s),m=u*u*g,(p=Math.max(h/m,m/f))>d){u-=s;break}d=p}v.push(o={value:u,dice:l1?e:1)},r}(G);var X=function t(e){function r(t,r,n,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,l,c,u,f=-1,h=o.length,p=t.value;++f1?e:1)},r}(G);t.cluster=function(){var t=e,i=1,a=1,o=!1;function s(e){var s,l=0;e.eachAfter((function(e){var i=e.children;i?(e.x=function(t){return t.reduce(r,0)/t.length}(i),e.y=function(t){return 1+t.reduce(n,0)}(i)):(e.x=s?l+=t(e,s):0,e.y=0,s=e)}));var c=function(t){for(var e;e=t.children;)t=e[0];return t}(e),u=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),f=c.x-t(c,u)/2,h=u.x+t(u,c)/2;return e.eachAfter(o?function(t){t.x=(t.x-e.x)*i,t.y=(e.y-t.y)*a}:function(t){t.x=(t.x-f)/(h-f)*i,t.y=(1-(e.y?t.y/e.y:1))*a})}return s.separation=function(e){return arguments.length?(t=e,s):t},s.size=function(t){return arguments.length?(o=!1,i=+t[0],a=+t[1],s):o?null:[i,a]},s.nodeSize=function(t){return arguments.length?(o=!0,i=+t[0],a=+t[1],s):o?[i,a]:null},s},t.hierarchy=a,t.pack=function(){var t=null,e=1,r=1,n=M;function i(i){return i.x=e/2,i.y=r/2,t?i.eachBefore(L(t)).eachAfter(C(n,.5)).eachBefore(P(1)):i.eachBefore(L(E)).eachAfter(C(M,1)).eachAfter(C(n,i.r/Math.min(e,r))).eachBefore(P(Math.min(e,r)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=k(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],r=+t[1],i):[e,r]},i.padding=function(t){return arguments.length?(n=\"function\"==typeof t?t:S(+t),i):n},i},t.packEnclose=f,t.packSiblings=function(t){return T(t),t},t.partition=function(){var t=1,e=1,r=0,n=!1;function i(i){var a=i.height+1;return i.x0=i.y0=r,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(n){n.children&&O(n,n.x0,t*(n.depth+1)/e,n.x1,t*(n.depth+2)/e);var i=n.x0,a=n.y0,o=n.x1-r,s=n.y1-r;o0)throw new Error(\"cycle\");return a}return r.id=function(e){return arguments.length?(t=A(e),r):t},r.parentId=function(t){return arguments.length?(e=A(t),r):e},r},t.tree=function(){var t=B,e=1,r=1,n=null;function i(i){var l=function(t){for(var e,r,n,i,a,o=new H(t,0),s=[o];e=s.pop();)if(n=e._.children)for(e.children=new Array(a=n.length),i=a-1;i>=0;--i)s.push(r=e.children[i]=new H(n[i],i)),r.parent=e;return(o.parent=new H(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),n)i.eachBefore(s);else{var c=i,u=i,f=i;i.eachBefore((function(t){t.xu.x&&(u=t),t.depth>f.depth&&(f=t)}));var h=c===u?1:t(c,u)/2,p=h-c.x,d=e/(u.x+h+p),g=r/(f.depth||1);i.eachBefore((function(t){t.x=(t.x+p)*d,t.y=t.depth*g}))}return i}function a(e){var r=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(r){!function(t){for(var e,r=0,n=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(e);var a=(r[0].z+r[r.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,r,n){if(r){for(var i,a=e,o=e,s=r,l=a.parent.children[0],c=a.m,u=o.m,f=s.m,h=l.m;s=j(s),a=N(a),s&&a;)l=N(l),(o=j(o)).a=e,(i=s.z+f-a.z-c+t(s._,a._))>0&&(U(V(s,e,n),e,i),c+=i,u+=i),f+=s.m,c+=a.m,h+=l.m,u+=o.m;s&&!j(o)&&(o.t=s,o.m+=f-u),a&&!N(l)&&(l.t=a,l.m+=c-h,n=e)}return n}(e,i,e.parent.A||n[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*r}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(n=!1,e=+t[0],r=+t[1],i):n?null:[e,r]},i.nodeSize=function(t){return arguments.length?(n=!0,e=+t[0],r=+t[1],i):n?[e,r]:null},i},t.treemap=function(){var t=W,e=!1,r=1,n=1,i=[0],a=M,o=M,s=M,l=M,c=M;function u(t){return t.x0=t.y0=0,t.x1=r,t.y1=n,t.eachBefore(f),i=[0],e&&t.eachBefore(I),t}function f(e){var r=i[e.depth],n=e.x0+r,u=e.y0+r,f=e.x1-r,h=e.y1-r;f=r-1){var u=s[e];return u.x0=i,u.y0=a,u.x1=o,void(u.y1=l)}var f=c[e],h=n/2+f,p=e+1,d=r-1;for(;p>>1;c[g]l-a){var y=(i*v+o*m)/n;t(e,p,m,i,a,y,l),t(p,r,v,y,a,o,l)}else{var x=(a*v+l*m)/n;t(e,p,m,i,a,o,x),t(p,r,v,i,x,o,l)}}(0,l,t.value,e,r,n,i)},t.treemapDice=O,t.treemapResquarify=X,t.treemapSlice=q,t.treemapSliceDice=function(t,e,r,n,i){(1&t.depth?q:O)(t,e,r,n,i)},t.treemapSquarify=W,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],116:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-color\")):i((n=n||self).d3=n.d3||{},n.d3)}(this,(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=i180||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;na&&(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:y(r,n)})),a=_.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+\"rotate(\",null,n)-2,x:y(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:y(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:y(t,r)},{i:s-2,x:y(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;++r1e-6)if(Math.abs(f*l-c*u)>1e-6&&a){var p=n-o,d=i-s,g=l*l+c*c,m=p*p+d*d,v=Math.sqrt(g),y=Math.sqrt(h),x=a*Math.tan((e-Math.acos((g+h-m)/(2*v*y)))/2),b=x/y,_=x/v;Math.abs(b-1)>1e-6&&(this._+=\"L\"+(t+b*u)+\",\"+(r+b*f)),this._+=\"A\"+a+\",\"+a+\",0,0,\"+ +(f*p>u*d)+\",\"+(this._x1=t+_*l)+\",\"+(this._y1=r+_*c)}else this._+=\"L\"+(this._x1=t)+\",\"+(this._y1=r);else;},arc:function(t,i,a,o,s,l){t=+t,i=+i,l=!!l;var c=(a=+a)*Math.cos(o),u=a*Math.sin(o),f=t+c,h=i+u,p=1^l,d=l?o-s:s-o;if(a<0)throw new Error(\"negative radius: \"+a);null===this._x1?this._+=\"M\"+f+\",\"+h:(Math.abs(this._x1-f)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+=\"L\"+f+\",\"+h),a&&(d<0&&(d=d%r+r),d>n?this._+=\"A\"+a+\",\"+a+\",0,1,\"+p+\",\"+(t-c)+\",\"+(i-u)+\"A\"+a+\",\"+a+\",0,1,\"+p+\",\"+(this._x1=f)+\",\"+(this._y1=h):d>1e-6&&(this._+=\"A\"+a+\",\"+a+\",0,\"+ +(d>=e)+\",\"+p+\",\"+(this._x1=t+a*Math.cos(s))+\",\"+(this._y1=i+a*Math.sin(s))))},rect:function(t,e,r,n){this._+=\"M\"+(this._x0=this._x1=+t)+\",\"+(this._y0=this._y1=+e)+\"h\"+ +r+\"v\"+ +n+\"h\"+-r+\"Z\"},toString:function(){return this._}},t.path=a,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],118:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(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,m=t._y0,v=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(a=(g+v)/2))?g=a:v=a,(u=r>=(o=(m+y)/2))?m=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+v)/2))?g=a:v=a,(u=r>=(o=(m+y)/2))?m=o:y=o}while((f=u<<1|c)==(h=(l>=o)<<1|s>=a));return i[h]=p,i[f]=d,t}function r(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;nf&&(f=i),ah&&(h=a));if(c>f||u>h)return this;for(this.cover(c,u).cover(f,h),n=0;nt||t>=i||n>e||e>=a;)switch(s=(ep||(o=c.y0)>d||(s=c.x1)=y)<<1|t>=v)&&(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,m.data),b=e-+this._y.call(null,m.data),_=x*x+b*b;if(_=(s=(d+m)/2))?d=s:m=s,(u=o>=(l=(g+v)/2))?g=l:v=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;e1?0:t<-1?u:Math.acos(t)}function d(t){return t>=1?f:t<=-1?-f:Math.asin(t)}function g(t){return t.innerRadius}function m(t){return t.outerRadius}function v(t){return t.startAngle}function y(t){return t.endAngle}function x(t){return t&&t.padAngle}function b(t,e,r,n,i,a,o,s){var l=r-t,c=n-e,u=o-i,f=s-a,h=f*l-u*c;if(!(h*h<1e-12))return[t+(h=(u*(e-a)-f*(t-i))/h)*l,e+h*c]}function _(t,e,r,n,i,a,s){var l=t-r,u=e-n,f=(s?a:-a)/c(l*l+u*u),h=f*u,p=-f*l,d=t+h,g=e+p,m=r+h,v=n+p,y=(d+m)/2,x=(g+v)/2,b=m-d,_=v-g,w=b*b+_*_,T=i-a,k=d*v-m*g,A=(_<0?-1:1)*c(o(0,T*T*w-k*k)),M=(k*_-b*A)/w,S=(-k*b-_*A)/w,E=(k*_+b*A)/w,L=(-k*b+_*A)/w,C=M-y,P=S-x,I=E-y,O=L-x;return C*C+P*P>I*I+O*O&&(M=E,S=L),{cx:M,cy:S,x01:-h,y01:-p,x11:M*(i/T-1),y11:S*(i/T-1)}}function w(t){this._context=t}function T(t){return new w(t)}function k(t){return t[0]}function A(t){return t[1]}function M(){var t=k,n=A,i=r(!0),a=null,o=T,s=null;function l(r){var l,c,u,f=r.length,h=!1;for(null==a&&(s=o(u=e.path())),l=0;l<=f;++l)!(l=f;--h)c.point(v[h],y[h]);c.lineEnd(),c.areaEnd()}m&&(v[u]=+t(p,u,r),y[u]=+i(p,u,r),c.point(n?+n(p,u,r):v[u],a?+a(p,u,r):y[u]))}if(d)return c=null,d+\"\"||null}function f(){return M().defined(o).curve(l).context(s)}return u.x=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),n=null,u):t},u.x0=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),u):t},u.x1=function(t){return arguments.length?(n=null==t?null:\"function\"==typeof t?t:r(+t),u):n},u.y=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),a=null,u):i},u.y0=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),u):i},u.y1=function(t){return arguments.length?(a=null==t?null:\"function\"==typeof t?t:r(+t),u):a},u.lineX0=u.lineY0=function(){return f().x(t).y(i)},u.lineY1=function(){return f().x(t).y(a)},u.lineX1=function(){return f().x(n).y(i)},u.defined=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(!!t),u):o},u.curve=function(t){return arguments.length?(l=t,null!=s&&(c=l(s)),u):l},u.context=function(t){return arguments.length?(null==t?s=c=null:c=l(s=t),u):s},u}function E(t,e){return et?1:e>=t?0:NaN}function L(t){return t}w.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var C=I(T);function P(t){this._curve=t}function I(t){function e(e){return new P(t(e))}return e._curve=t,e}function O(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(I(t)):e()._curve},t}function z(){return O(M().curve(C))}function D(){var t=S().curve(C),e=t.curve,r=t.lineX0,n=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return O(r())},delete t.lineX0,t.lineEndAngle=function(){return O(n())},delete t.lineX1,t.lineInnerRadius=function(){return O(i())},delete t.lineY0,t.lineOuterRadius=function(){return O(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(I(t)):e()._curve},t}function R(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var F=Array.prototype.slice;function B(t){return t.source}function N(t){return t.target}function j(t){var n=B,i=N,a=k,o=A,s=null;function l(){var r,l=F.call(arguments),c=n.apply(this,l),u=i.apply(this,l);if(s||(s=r=e.path()),t(s,+a.apply(this,(l[0]=c,l)),+o.apply(this,l),+a.apply(this,(l[0]=u,l)),+o.apply(this,l)),r)return s=null,r+\"\"||null}return l.source=function(t){return arguments.length?(n=t,l):n},l.target=function(t){return arguments.length?(i=t,l):i},l.x=function(t){return arguments.length?(a=\"function\"==typeof t?t:r(+t),l):a},l.y=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(+t),l):o},l.context=function(t){return arguments.length?(s=null==t?null:t,l):s},l}function U(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function V(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e,r=(r+i)/2,n,r,n,i)}function H(t,e,r,n,i){var a=R(e,r),o=R(e,r=(r+i)/2),s=R(n,r),l=R(n,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],l[0],l[1])}var q={draw:function(t,e){var r=Math.sqrt(e/u);t.moveTo(r,0),t.arc(0,0,r,0,h)}},G={draw:function(t,e){var r=Math.sqrt(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Y=Math.sqrt(1/3),W=2*Y,X={draw:function(t,e){var r=Math.sqrt(e/W),n=r*Y;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},Z=Math.sin(u/10)/Math.sin(7*u/10),J=Math.sin(h/10)*Z,K=-Math.cos(h/10)*Z,Q={draw:function(t,e){var r=Math.sqrt(.8908130915292852*e),n=J*r,i=K*r;t.moveTo(0,-r),t.lineTo(n,i);for(var a=1;a<5;++a){var o=h*a/5,s=Math.cos(o),l=Math.sin(o);t.lineTo(l*r,-s*r),t.lineTo(s*n-l*i,l*n+s*i)}t.closePath()}},$={draw:function(t,e){var r=Math.sqrt(e),n=-r/2;t.rect(n,n,r,r)}},tt=Math.sqrt(3),et={draw:function(t,e){var r=-Math.sqrt(e/(3*tt));t.moveTo(0,2*r),t.lineTo(-tt*r,-r),t.lineTo(tt*r,-r),t.closePath()}},rt=-.5,nt=Math.sqrt(3)/2,it=1/Math.sqrt(12),at=3*(it/2+1),ot={draw:function(t,e){var r=Math.sqrt(e/at),n=r/2,i=r*it,a=n,o=r*it+r,s=-a,l=o;t.moveTo(n,i),t.lineTo(a,o),t.lineTo(s,l),t.lineTo(rt*n-nt*i,nt*n+rt*i),t.lineTo(rt*a-nt*o,nt*a+rt*o),t.lineTo(rt*s-nt*l,nt*s+rt*l),t.lineTo(rt*n+nt*i,rt*i-nt*n),t.lineTo(rt*a+nt*o,rt*o-nt*a),t.lineTo(rt*s+nt*l,rt*l-nt*s),t.closePath()}},st=[q,G,X,$,Q,et,ot];function lt(){}function ct(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function ut(t){this._context=t}function ft(t){this._context=t}function ht(t){this._context=t}function pt(t,e){this._basis=new ut(t),this._beta=e}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ct(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ft.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ht.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},pt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n,i=t[0],a=e[0],o=t[r]-i,s=e[r]-a,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+n*o),this._beta*e[l]+(1-this._beta)*(a+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var dt=function t(e){function r(t){return 1===e?new ut(t):new pt(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function gt(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function mt(t,e){this._context=t,this._k=(1-e)/6}mt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:gt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var vt=function t(e){function r(t){return new mt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function yt(t,e){this._context=t,this._k=(1-e)/6}yt.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var xt=function t(e){function r(t){return new yt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function bt(t,e){this._context=t,this._k=(1-e)/6}bt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var _t=function t(e){function r(t){return new bt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function wt(t,e,r){var n=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>1e-12){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*c+t._y1*t._l23_2a-r*t._l12_2a)/u}t._context.bezierCurveTo(n,i,a,o,t._x2,t._y2)}function Tt(t,e){this._context=t,this._alpha=e}Tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var kt=function t(e){function r(t){return e?new Tt(t,e):new mt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function At(t,e){this._context=t,this._alpha=e}At.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Mt=function t(e){function r(t){return e?new At(t,e):new yt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function St(t,e){this._context=t,this._alpha=e}St.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Et=function t(e){function r(t){return e?new St(t,e):new bt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Lt(t){this._context=t}function Ct(t){return t<0?-1:1}function Pt(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),o=(r-t._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Ct(a)+Ct(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function It(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Ot(t,e,r){var n=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-n)/3;t._context.bezierCurveTo(n+s,i+s*e,a-s,o-s*r,a,o)}function zt(t){this._context=t}function Dt(t){this._context=new Rt(t)}function Rt(t){this._context=t}function Ft(t){this._context=t}function Bt(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[n-1]=(t[n]+i[n-1])/2,e=0;e1)for(var r,n,i,a=1,o=t[e[0]],s=o.length;a=0;)r[e]=e;return r}function Vt(t,e){return t[e]}function Ht(t){var e=t.map(qt);return Ut(t).sort((function(t,r){return e[t]-e[r]}))}function qt(t){for(var e,r=-1,n=0,i=t.length,a=-1/0;++ra&&(a=e,n=r);return n}function Gt(t){var e=t.map(Yt);return Ut(t).sort((function(t,r){return e[t]-e[r]}))}function Yt(t){for(var e,r=0,n=-1,i=t.length;++n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},t.arc=function(){var t=g,o=m,w=r(0),T=null,k=v,A=y,M=x,S=null;function E(){var r,g,m=+t.apply(this,arguments),v=+o.apply(this,arguments),y=k.apply(this,arguments)-f,x=A.apply(this,arguments)-f,E=n(x-y),L=x>y;if(S||(S=r=e.path()),v1e-12)if(E>h-1e-12)S.moveTo(v*a(y),v*l(y)),S.arc(0,0,v,y,x,!L),m>1e-12&&(S.moveTo(m*a(x),m*l(x)),S.arc(0,0,m,x,y,L));else{var C,P,I=y,O=x,z=y,D=x,R=E,F=E,B=M.apply(this,arguments)/2,N=B>1e-12&&(T?+T.apply(this,arguments):c(m*m+v*v)),j=s(n(v-m)/2,+w.apply(this,arguments)),U=j,V=j;if(N>1e-12){var H=d(N/m*l(B)),q=d(N/v*l(B));(R-=2*H)>1e-12?(z+=H*=L?1:-1,D-=H):(R=0,z=D=(y+x)/2),(F-=2*q)>1e-12?(I+=q*=L?1:-1,O-=q):(F=0,I=O=(y+x)/2)}var G=v*a(I),Y=v*l(I),W=m*a(D),X=m*l(D);if(j>1e-12){var Z,J=v*a(O),K=v*l(O),Q=m*a(z),$=m*l(z);if(E1e-12?V>1e-12?(C=_(Q,$,G,Y,v,V,L),P=_(J,K,W,X,v,V,L),S.moveTo(C.cx+C.x01,C.cy+C.y01),V1e-12&&R>1e-12?U>1e-12?(C=_(W,X,J,K,m,-U,L),P=_(G,Y,Q,$,m,-U,L),S.lineTo(C.cx+C.x01,C.cy+C.y01),U0&&(d+=f);for(null!=e?g.sort((function(t,r){return e(m[t],m[r])})):null!=n&&g.sort((function(t,e){return n(r[t],r[e])})),s=0,c=d?(y-p*b)/d:0;s0?f*c:0)+b,m[l]={data:r[l],index:s,value:f,startAngle:v,endAngle:u,padAngle:x};return m}return s.value=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),s):i},s.endAngle=function(t){return arguments.length?(a=\"function\"==typeof t?t:r(+t),s):a},s.padAngle=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(+t),s):o},s},t.pointRadial=R,t.radialArea=D,t.radialLine=z,t.stack=function(){var t=r([]),e=Ut,n=jt,i=Vt;function a(r){var a,o,s=t.apply(this,arguments),l=r.length,c=s.length,u=new Array(c);for(a=0;a0)for(var r,n,i,a,o,s,l=0,c=t[e[0]].length;l0?(n[0]=a,n[1]=a+=i):i<0?(n[1]=o,n[0]=o+=i):(n[0]=0,n[1]=i)},t.stackOffsetExpand=function(t,e){if((n=t.length)>0){for(var r,n,i,a=0,o=t[0].length;a0){for(var r,n=0,i=t[e[0]],a=i.length;n0&&(n=(r=t[e[0]]).length)>0){for(var r,n,i,a=0,o=1;o=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:mt,s:vt,S:H,u:q,U:G,V:Y,w:W,W:X,x:null,X:null,y:Z,Y:J,Z:K,\"%\":gt},Ct={a:function(t){return f[t.getUTCDay()]},A:function(t){return u[t.getUTCDay()]},b:function(t){return yt[t.getUTCMonth()]},B:function(t){return h[t.getUTCMonth()]},c:null,d:Q,e:Q,f:nt,H:$,I:tt,j:et,L:rt,m:it,M:at,p:function(t){return c[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:mt,s:vt,S:ot,u:st,U:lt,V:ct,w:ut,W:ft,x:null,X:null,y:ht,Y:pt,Z:dt,\"%\":gt},Pt={a:function(t,e,r){var n=Tt.exec(e.slice(r));return n?(t.w=kt[n[0].toLowerCase()],r+n[0].length):-1},A:function(t,e,r){var n=_t.exec(e.slice(r));return n?(t.w=wt[n[0].toLowerCase()],r+n[0].length):-1},b:function(t,e,r){var n=St.exec(e.slice(r));return n?(t.m=Et[n[0].toLowerCase()],r+n[0].length):-1},B:function(t,e,r){var n=At.exec(e.slice(r));return n?(t.m=Mt[n[0].toLowerCase()],r+n[0].length):-1},c:function(t,e,r){return zt(t,a,e,r)},d:A,e:A,f:P,H:S,I:S,j:M,L:C,m:k,M:E,p:function(t,e,r){var n=xt.exec(e.slice(r));return n?(t.p=bt[n[0].toLowerCase()],r+n[0].length):-1},q:T,Q:O,s:z,S:L,u:m,U:v,V:y,w:g,W:x,x:function(t,e,r){return zt(t,o,e,r)},X:function(t,e,r){return zt(t,l,e,r)},y:_,Y:b,Z:w,\"%\":I};function It(t,e){return function(r){var n,i,a,o=[],l=-1,c=0,u=t.length;for(r instanceof Date||(r=new Date(+r));++l53)return null;\"w\"in c||(c.w=1),\"Z\"in c?(l=(s=n(i(c.y,0,1))).getUTCDay(),s=l>4||0===l?e.utcMonday.ceil(s):e.utcMonday(s),s=e.utcDay.offset(s,7*(c.V-1)),c.y=s.getUTCFullYear(),c.m=s.getUTCMonth(),c.d=s.getUTCDate()+(c.w+6)%7):(l=(s=r(i(c.y,0,1))).getDay(),s=l>4||0===l?e.timeMonday.ceil(s):e.timeMonday(s),s=e.timeDay.offset(s,7*(c.V-1)),c.y=s.getFullYear(),c.m=s.getMonth(),c.d=s.getDate()+(c.w+6)%7)}else(\"W\"in c||\"U\"in c)&&(\"w\"in c||(c.w=\"u\"in c?c.u%7:\"W\"in c?1:0),l=\"Z\"in c?n(i(c.y,0,1)).getUTCDay():r(i(c.y,0,1)).getDay(),c.m=0,c.d=\"W\"in c?(c.w+6)%7+7*c.W-(l+5)%7:c.w+7*c.U-(l+6)%7);return\"Z\"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,n(c)):r(c)}}function zt(t,e,r,n){for(var i,a,o=0,l=e.length,c=r.length;o=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=Pt[i in s?e.charAt(o++):i])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return Lt.x=It(o,Lt),Lt.X=It(l,Lt),Lt.c=It(a,Lt),Ct.x=It(o,Ct),Ct.X=It(l,Ct),Ct.c=It(a,Ct),{format:function(t){var e=It(t+=\"\",Lt);return e.toString=function(){return t},e},parse:function(t){var e=Ot(t+=\"\",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=It(t+=\"\",Ct);return e.toString=function(){return t},e},utcParse:function(t){var e=Ot(t+=\"\",!0);return e.toString=function(){return t},e}}}var o,s={\"-\":\"\",_:\" \",0:\"0\"},l=/^\\s*\\d+/,c=/^%/,u=/[\\\\^$*+?|[\\]().{}]/g;function f(t,e,r){var n=t<0?\"-\":\"\",i=(n?-t:t)+\"\",a=i.length;return n+(a68?1900:2e3),r+n[0].length):-1}function w(t,e,r){var n=/^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||\"00\")),r+n[0].length):-1}function T(t,e,r){var n=l.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function k(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function A(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function M(t,e,r){var n=l.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function S(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function E(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function L(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function C(t,e,r){var n=l.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function P(t,e,r){var n=l.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function I(t,e,r){var n=c.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function O(t,e,r){var n=l.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function z(t,e,r){var n=l.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function D(t,e){return f(t.getDate(),e,2)}function R(t,e){return f(t.getHours(),e,2)}function F(t,e){return f(t.getHours()%12||12,e,2)}function B(t,r){return f(1+e.timeDay.count(e.timeYear(t),t),r,3)}function N(t,e){return f(t.getMilliseconds(),e,3)}function j(t,e){return N(t,e)+\"000\"}function U(t,e){return f(t.getMonth()+1,e,2)}function V(t,e){return f(t.getMinutes(),e,2)}function H(t,e){return f(t.getSeconds(),e,2)}function q(t){var e=t.getDay();return 0===e?7:e}function G(t,r){return f(e.timeSunday.count(e.timeYear(t)-1,t),r,2)}function Y(t,r){var n=t.getDay();return t=n>=4||0===n?e.timeThursday(t):e.timeThursday.ceil(t),f(e.timeThursday.count(e.timeYear(t),t)+(4===e.timeYear(t).getDay()),r,2)}function W(t){return t.getDay()}function X(t,r){return f(e.timeMonday.count(e.timeYear(t)-1,t),r,2)}function Z(t,e){return f(t.getFullYear()%100,e,2)}function J(t,e){return f(t.getFullYear()%1e4,e,4)}function K(t){var e=t.getTimezoneOffset();return(e>0?\"-\":(e*=-1,\"+\"))+f(e/60|0,\"0\",2)+f(e%60,\"0\",2)}function Q(t,e){return f(t.getUTCDate(),e,2)}function $(t,e){return f(t.getUTCHours(),e,2)}function tt(t,e){return f(t.getUTCHours()%12||12,e,2)}function et(t,r){return f(1+e.utcDay.count(e.utcYear(t),t),r,3)}function rt(t,e){return f(t.getUTCMilliseconds(),e,3)}function nt(t,e){return rt(t,e)+\"000\"}function it(t,e){return f(t.getUTCMonth()+1,e,2)}function at(t,e){return f(t.getUTCMinutes(),e,2)}function ot(t,e){return f(t.getUTCSeconds(),e,2)}function st(t){var e=t.getUTCDay();return 0===e?7:e}function lt(t,r){return f(e.utcSunday.count(e.utcYear(t)-1,t),r,2)}function ct(t,r){var n=t.getUTCDay();return t=n>=4||0===n?e.utcThursday(t):e.utcThursday.ceil(t),f(e.utcThursday.count(e.utcYear(t),t)+(4===e.utcYear(t).getUTCDay()),r,2)}function ut(t){return t.getUTCDay()}function ft(t,r){return f(e.utcMonday.count(e.utcYear(t)-1,t),r,2)}function ht(t,e){return f(t.getUTCFullYear()%100,e,2)}function pt(t,e){return f(t.getUTCFullYear()%1e4,e,4)}function dt(){return\"+0000\"}function gt(){return\"%\"}function mt(t){return+t}function vt(t){return Math.floor(+t/1e3)}function yt(e){return o=a(e),t.timeFormat=o.format,t.timeParse=o.parse,t.utcFormat=o.utcFormat,t.utcParse=o.utcParse,o}yt({dateTime:\"%x, %X\",date:\"%-m/%-d/%Y\",time:\"%-I:%M:%S %p\",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\"]});var xt=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat(\"%Y-%m-%dT%H:%M:%S.%LZ\");var bt=+new Date(\"2000-01-01T00:00:00.000Z\")?function(t){var e=new Date(t);return isNaN(e)?null:e}:t.utcParse(\"%Y-%m-%dT%H:%M:%S.%LZ\");t.isoFormat=xt,t.isoParse=bt,t.timeFormatDefaultLocale=yt,t.timeFormatLocale=a,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{\"d3-time\":121}],121:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){\"use strict\";var e=new Date,r=new Date;function n(t,i,a,o){function s(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return s.floor=function(e){return t(e=new Date(+e)),e},s.ceil=function(e){return t(e=new Date(e-1)),i(e,1),t(e),e},s.round=function(t){var e=s(t),r=s.ceil(t);return t-e0))return o;do{o.push(a=new Date(+e)),i(e,n),t(e)}while(a=r)for(;t(r),!e(r);)r.setTime(r-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;i(t,-1),!e(t););else for(;--r>=0;)for(;i(t,1),!e(t););}))},a&&(s.count=function(n,i){return e.setTime(+n),r.setTime(+i),t(e),t(r),Math.floor(a(e,r))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(o?function(e){return o(e)%t==0}:function(e){return s.count(0,e)%t==0}):s:null}),s}var i=n((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?n((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,r){e.setTime(+e+r*t)}),(function(e,r){return(r-e)/t})):i:null};var a=i.range,o=n((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),s=o.range,l=n((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),c=l.range,u=n((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),f=u.range,h=n((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),p=h.range;function d(t){return n((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var g=d(0),m=d(1),v=d(2),y=d(3),x=d(4),b=d(5),_=d(6),w=g.range,T=m.range,k=v.range,A=y.range,M=x.range,S=b.range,E=_.range,L=n((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),C=L.range,P=n((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));P.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,r){e.setFullYear(e.getFullYear()+r*t)})):null};var I=P.range,O=n((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()})),z=O.range,D=n((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()})),R=D.range,F=n((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1})),B=F.range;function N(t){return n((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var j=N(0),U=N(1),V=N(2),H=N(3),q=N(4),G=N(5),Y=N(6),W=j.range,X=U.range,Z=V.range,J=H.range,K=q.range,Q=G.range,$=Y.range,tt=n((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),et=tt.range,rt=n((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));rt.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null};var nt=rt.range;t.timeDay=h,t.timeDays=p,t.timeFriday=b,t.timeFridays=S,t.timeHour=u,t.timeHours=f,t.timeInterval=n,t.timeMillisecond=i,t.timeMilliseconds=a,t.timeMinute=l,t.timeMinutes=c,t.timeMonday=m,t.timeMondays=T,t.timeMonth=L,t.timeMonths=C,t.timeSaturday=_,t.timeSaturdays=E,t.timeSecond=o,t.timeSeconds=s,t.timeSunday=g,t.timeSundays=w,t.timeThursday=x,t.timeThursdays=M,t.timeTuesday=v,t.timeTuesdays=k,t.timeWednesday=y,t.timeWednesdays=A,t.timeWeek=g,t.timeWeeks=w,t.timeYear=P,t.timeYears=I,t.utcDay=F,t.utcDays=B,t.utcFriday=G,t.utcFridays=Q,t.utcHour=D,t.utcHours=R,t.utcMillisecond=i,t.utcMilliseconds=a,t.utcMinute=O,t.utcMinutes=z,t.utcMonday=U,t.utcMondays=X,t.utcMonth=tt,t.utcMonths=et,t.utcSaturday=Y,t.utcSaturdays=$,t.utcSecond=o,t.utcSeconds=s,t.utcSunday=j,t.utcSundays=W,t.utcThursday=q,t.utcThursdays=K,t.utcTuesday=V,t.utcTuesdays=Z,t.utcWednesday=H,t.utcWednesdays=J,t.utcWeek=j,t.utcWeeks=W,t.utcYear=rt,t.utcYears=nt,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],122:[function(t,e,r){arguments[4][121][0].apply(r,arguments)},{dup:121}],123:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){\"use strict\";var e,r,n=0,i=0,a=0,o=0,s=0,l=0,c=\"object\"==typeof performance&&performance.now?performance:Date,u=\"object\"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function f(){return s||(u(h),s=c.now()+l)}function h(){s=0}function p(){this._call=this._time=this._next=null}function d(t,e,r){var n=new p;return n.restart(t,e,r),n}function g(){f(),++n;for(var t,r=e;r;)(t=s-r._time)>=0&&r._call.call(null,t),r=r._next;--n}function m(){s=(o=c.now())+l,n=i=0;try{g()}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,y(a)}(),s=0}}function v(){var t=c.now(),e=t-o;e>1e3&&(l-=e,o=t)}function y(t){n||(i&&(i=clearTimeout(i)),t-s>24?(t<1/0&&(i=setTimeout(m,t-c.now()-l)),a&&(a=clearInterval(a))):(a||(o=c.now(),a=setInterval(v,1e3)),n=1,u(m)))}p.prototype=d.prototype={constructor:p,restart:function(t,n,i){if(\"function\"!=typeof t)throw new TypeError(\"callback is not a function\");i=(null==i?f():+i)+(null==n?0:+n),this._next||r===this||(r?r._next=this:e=this,r=this),this._call=t,this._time=i,y()},stop:function(){this._call&&(this._call=null,this._time=1/0,y())}},t.interval=function(t,e,r){var n=new p,i=e;return null==e?(n.restart(t,e,r),n):(e=+e,r=null==r?f():+r,n.restart((function a(o){o+=i,n.restart(a,i+=e,r),t(o)}),e,r),n)},t.now=f,t.timeout=function(t,e,r){var n=new p;return e=null==e?0:+e,n.restart((function(r){n.stop(),t(r+e)}),e,r),n},t.timer=d,t.timerFlush=g,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],124:[function(t,e,r){e.exports=function(){for(var t=0;ts*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];i0)return function(t,e){var r,n;for(r=new Array(t),n=0;n80*r){n=l=t[0],s=c=t[1];for(var b=r;bl&&(l=u),p>c&&(c=p);d=0!==(d=Math.max(l-n,c-s))?1/d:0}return o(y,x,r,n,s,d),x}function i(t,e,r,n,i){var a,o;if(i===E(t,e,r,n)>0)for(a=e;a=e;a-=n)o=A(a,t[a],t[a+1],o);return o&&x(o,o.next)&&(M(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||!x(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(M(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=d(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;e0||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 p,g,m=t;t.prev!==t.next;)if(p=t.prev,g=t.next,f?l(t,n,i,f):s(t))e.push(p.i/r),e.push(t.i/r),e.push(g.i/r),M(t),t=g.next,m=g.next;else if((t=g)===m){h?1===h?o(t=c(a(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(y(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(m(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&y(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(y(i,a,o)>=0)return!1;for(var s=i.xa.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=d(s,l,e,r,n),h=d(c,u,e,r,n),p=t.prevZ,g=t.nextZ;p&&p.z>=f&&g&&g.z<=h;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,g!==t.prev&&g!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;g&&g.z<=h;){if(g!==t.prev&&g!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function c(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!x(i,o)&&b(i,n,n.next,o)&&T(i,o)&&T(o,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(o.i/r),M(n),M(n.next),n=t=o),n=n.next}while(n!==t);return a(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=k(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.x&&n.x>=u&&i!==n.x&&m(ar.x||n.x===r.x&&p(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(t,e)){var r=k(e,t);a(e,e.next),a(r,r.next)}}function p(t,e){return y(t.prev,t,e.prev)<0&&y(e.next,t,t.next)<0}function d(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 g(t){var e=t,r=t;do{(e.x=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&&b(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(T(t,e)&&T(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)&&(y(t.prev,t,e.prev)||y(t,e.prev,e))||x(t,e)&&y(t.prev,t,t.next)>0&&y(e.prev,e,e.next)>0)}function y(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,r,n){var i=w(y(t,e,r)),a=w(y(t,e,n)),o=w(y(r,n,t)),s=w(y(r,n,e));return i!==a&&o!==s||(!(0!==i||!_(t,r,e))||(!(0!==a||!_(t,n,e))||(!(0!==o||!_(r,t,n))||!(0!==s||!_(r,e,n)))))}function _(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function w(t){return t>0?1:t<0?-1:0}function T(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function k(t,e){var r=new S(t.i,t.x,t.y),n=new S(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 A(t,e,r,n){var i=new S(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 M(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 S(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 E(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],130:[function(t,e,r){var n=t(\"strongly-connected-components\");e.exports=function(t,e){var r,i=[],a=[],o=[],s={},l=[];function c(t){var e,n,i=!1;for(a.push(t),o[t]=!0,e=0;e=e}))}(e);for(var r,i=n(t).components.filter((function(t){return t.length>1})),a=1/0,o=0;o=55296&&y<=56319&&(w+=t[++r]),w=T?h.call(T,k,w,g):w,e?(p.value=w,d(m,g,p)):m[g]=w,++g;v=g}if(void 0===v)for(v=o(t.length),e&&(m=new e(v)),r=0;r0?1:-1}},{}],141:[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\":138}],142:[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\":141}],143:[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\":160,\"./valid-value\":162}],144:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?Object.assign:t(\"./shim\")},{\"./is-implemented\":145,\"./shim\":146}],145:[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\")}},{}],146:[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-1}},{}],166:[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}},{}],167:[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}},{}],168:[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\"))},{\"./\":171,d:106,\"es5-ext/object/set-prototype-of\":157,\"es5-ext/string/#/contains\":163,\"es6-symbol\":175}],169:[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,m,v=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,v,u.value,f),h)return;u=t.next()}else for(d=t.length,p=0;p=55296&&m<=56319&&(g+=t[++p]),l.call(e,v,g,f),!h);++p);else c.call(t,(function(t){return l.call(e,v,t,f),h}))}},{\"./get\":170,\"es5-ext/function/is-arguments\":135,\"es5-ext/object/valid-callable\":160,\"es5-ext/string/is-string\":166}],170:[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\":168,\"./string\":173,\"./valid-iterable\":174,\"es5-ext/function/is-arguments\":135,\"es5-ext/string/is-string\":166,\"es6-symbol\":175}],171:[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.__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:106,\"d/auto-bind\":105,\"es5-ext/array/#/clear\":131,\"es5-ext/object/assign\":144,\"es5-ext/object/valid-callable\":160,\"es5-ext/object/valid-value\":162,\"es6-symbol\":175}],172:[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\":135,\"es5-ext/object/is-value\":151,\"es5-ext/string/is-string\":166,\"es6-symbol\":175}],173:[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__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,o.toStringTag,a(\"c\",\"String Iterator\"))},{\"./\":171,d:106,\"es5-ext/object/set-prototype-of\":157,\"es6-symbol\":175}],174:[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\":172}],175:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?t(\"ext/global-this\").Symbol:t(\"./polyfill\")},{\"./is-implemented\":176,\"./polyfill\":181,\"ext/global-this\":188}],176:[function(t,e,r){\"use strict\";var n=t(\"ext/global-this\"),i={object:!0,symbol:!0};e.exports=function(){var t,e=n.Symbol;if(\"function\"!=typeof e)return!1;t=e(\"test symbol\");try{String(t)}catch(t){return!1}return!!i[typeof e.iterator]&&(!!i[typeof e.toPrimitive]&&!!i[typeof e.toStringTag])}},{\"ext/global-this\":188}],177:[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]))}},{}],178:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=Object.create,a=Object.defineProperty,o=Object.prototype,s=i(null);e.exports=function(t){for(var e,r,i=0;s[t+(i||\"\")];)++i;return s[t+=i||\"\"]=!0,a(o,e=\"@@\"+t,n.gs(null,(function(t){r||(r=!0,a(this,e,n(t)),r=!1)}))),e}},{d:106}],179:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=t(\"ext/global-this\").Symbol;e.exports=function(t){return Object.defineProperties(t,{hasInstance:n(\"\",i&&i.hasInstance||t(\"hasInstance\")),isConcatSpreadable:n(\"\",i&&i.isConcatSpreadable||t(\"isConcatSpreadable\")),iterator:n(\"\",i&&i.iterator||t(\"iterator\")),match:n(\"\",i&&i.match||t(\"match\")),replace:n(\"\",i&&i.replace||t(\"replace\")),search:n(\"\",i&&i.search||t(\"search\")),species:n(\"\",i&&i.species||t(\"species\")),split:n(\"\",i&&i.split||t(\"split\")),toPrimitive:n(\"\",i&&i.toPrimitive||t(\"toPrimitive\")),toStringTag:n(\"\",i&&i.toStringTag||t(\"toStringTag\")),unscopables:n(\"\",i&&i.unscopables||t(\"unscopables\"))})}},{d:106,\"ext/global-this\":188}],180:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=t(\"../../../validate-symbol\"),a=Object.create(null);e.exports=function(t){return Object.defineProperties(t,{for:n((function(e){return a[e]?a[e]:a[e]=t(String(e))})),keyFor:n((function(t){var e;for(e in i(t),a)if(a[e]===t)return e}))})}},{\"../../../validate-symbol\":182,d:106}],181:[function(t,e,r){\"use strict\";var n,i,a,o=t(\"d\"),s=t(\"./validate-symbol\"),l=t(\"ext/global-this\").Symbol,c=t(\"./lib/private/generate-name\"),u=t(\"./lib/private/setup/standard-symbols\"),f=t(\"./lib/private/setup/symbol-registry\"),h=Object.create,p=Object.defineProperties,d=Object.defineProperty;if(\"function\"==typeof l)try{String(l()),a=!0}catch(t){}else l=null;i=function(t){if(this instanceof i)throw new TypeError(\"Symbol is not a constructor\");return n(t)},e.exports=n=function t(e){var r;if(this instanceof t)throw new TypeError(\"Symbol is not a constructor\");return a?l(e):(r=h(i.prototype),e=void 0===e?\"\":String(e),p(r,{__description__:o(\"\",e),__name__:o(\"\",c(e))}))},u(n),f(n),p(i.prototype,{constructor:o(n),toString:o(\"\",(function(){return this.__name__}))}),p(n.prototype,{toString:o((function(){return\"Symbol (\"+s(this).__description__+\")\"})),valueOf:o((function(){return s(this)}))}),d(n.prototype,n.toPrimitive,o(\"\",(function(){var t=s(this);return\"symbol\"==typeof t?t:t.toString()}))),d(n.prototype,n.toStringTag,o(\"c\",\"Symbol\")),d(i.prototype,n.toStringTag,o(\"c\",n.prototype[n.toStringTag])),d(i.prototype,n.toPrimitive,o(\"c\",n.prototype[n.toPrimitive]))},{\"./lib/private/generate-name\":178,\"./lib/private/setup/standard-symbols\":179,\"./lib/private/setup/symbol-registry\":180,\"./validate-symbol\":182,d:106,\"ext/global-this\":188}],182:[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\":177}],183:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?WeakMap:t(\"./polyfill\")},{\"./is-implemented\":184,\"./polyfill\":186}],184:[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)))))}},{}],185:[function(t,e,r){\"use strict\";e.exports=\"function\"==typeof WeakMap&&\"[object WeakMap]\"===Object.prototype.toString.call(new WeakMap)},{}],186:[function(t,e,r){\"use strict\";var n,i=t(\"es5-ext/object/is-value\"),a=t(\"es5-ext/object/set-prototype-of\"),o=t(\"es5-ext/object/valid-object\"),s=t(\"es5-ext/object/valid-value\"),l=t(\"es5-ext/string/random-uniq\"),c=t(\"d\"),u=t(\"es6-iterator/get\"),f=t(\"es6-iterator/for-of\"),h=t(\"es6-symbol\").toStringTag,p=t(\"./is-native-implemented\"),d=Array.isArray,g=Object.defineProperty,m=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=p&&a&&WeakMap!==n?a(new WeakMap,v(this)):this,i(e)&&(d(e)||(e=u(e))),g(t,\"__weakMapData__\",c(\"c\",\"$weakMap$\"+l())),e?(f(e,(function(e){s(e),t.set(e[0],e[1])})),t):t},p&&(a&&a(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:c(n)})),Object.defineProperties(n.prototype,{delete:c((function(t){return!!m.call(o(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)})),get:c((function(t){if(m.call(o(t),this.__weakMapData__))return t[this.__weakMapData__]})),has:c((function(t){return m.call(o(t),this.__weakMapData__)})),set:c((function(t,e){return g(o(t),this.__weakMapData__,c(\"c\",e)),this})),toString:c((function(){return\"[object WeakMap]\"}))}),g(n.prototype,h,c(\"c\",\"WeakMap\"))},{\"./is-native-implemented\":185,d:106,\"es5-ext/object/is-value\":151,\"es5-ext/object/set-prototype-of\":157,\"es5-ext/object/valid-object\":161,\"es5-ext/object/valid-value\":162,\"es5-ext/string/random-uniq\":167,\"es6-iterator/for-of\":169,\"es6-iterator/get\":170,\"es6-symbol\":175}],187:[function(t,e,r){var n=function(){if(\"object\"==typeof self&&self)return self;if(\"object\"==typeof window&&window)return window;throw new Error(\"Unable to resolve global `this`\")};e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,\"__global__\",{get:function(){return this},configurable:!0})}catch(t){return n()}try{return __global__||n()}finally{delete Object.prototype.__global__}}()},{}],188:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?globalThis:t(\"./implementation\")},{\"./implementation\":187,\"./is-implemented\":189}],189:[function(t,e,r){\"use strict\";e.exports=function(){return\"object\"==typeof globalThis&&(!!globalThis&&globalThis.Array===Array)}},{}],190:[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\":237}],191:[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;ie[0]-o[0]/2&&(h=o[0]/2,p+=o[1]);return r}},{\"css-font/stringify\":102}],193:[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 m=a(f.getImageData(0,0,p,p));d.lineHeight=d.bottom=p-m+g,f.clearRect(0,0,p,p),f.textBaseline=\"alphabetic\",f.fillText(\"H\",0,p);var v=p-a(f.getImageData(0,0,p,p))-1+g;d.baseline=d.alphabetic=v,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=_-v}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;n0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}e.exports=n,n.canvas=document.createElement(\"canvas\"),n.cache={}},{}],194:[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 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:{}}},T.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),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=T.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(T.baseFontSize+\"px \"+t)}else t=n.parse(n.stringify(t));var i=n.stringify({size:T.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]=T.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:v(c,{origin:\"top\",fontSize:T.baseFontSize,fontStyle:u.join(\" \")})},T.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;h2){for(var w=!t.position[0].length,k=u.mallocFloat(2*this.count),A=0,M=0;A1?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],i*=-1}))),null!=t.color)if(t.color||(t.color=\"transparent\"),\"string\"!=typeof t.color&&isNaN(t.color)){var q;if(\"number\"==typeof t.color[0]&&t.color.length>this.counts.length){var G=t.color.length;q=u.mallocUint8(G);for(var Y=(t.color.subarray||t.color.slice).bind(t.color),W=0;W4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var J=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(J);for(var K=0;K1?this.counts[K]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[K]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*K,4*K+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[K]:this.opacity,baseline:null!=this.baselineOffset[K]?this.baselineOffset[K]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[K]?this.alignOffset[K]:this.alignOffset[0]:0,atlas:this.fontAtlas[K]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*K,2*K+2):this.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=[]},T.prototype.destroy=function(){},T.prototype.kerning=!0,T.prototype.position={constant:new Float32Array(2)},T.prototype.translate=null,T.prototype.scale=null,T.prototype.font=null,T.prototype.text=\"\",T.prototype.positionOffset=[0,0],T.prototype.opacity=1,T.prototype.color=new Uint8Array([0,0,0,255]),T.prototype.alignOffset=[0,0],T.maxAtlasSize=1024,T.atlasCanvas=document.createElement(\"canvas\"),T.atlasContext=T.atlasCanvas.getContext(\"2d\",{alpha:!1}),T.baseFontSize=64,T.fonts={},e.exports=T},{\"bit-twiddle\":81,\"color-normalize\":89,\"css-font\":99,\"detect-kerning\":125,\"es6-weak-map\":183,\"flatten-vertex-data\":191,\"font-atlas\":192,\"font-measure\":193,\"gl-util/context\":226,\"is-plain-obj\":236,\"object-assign\":247,\"parse-rect\":249,\"parse-unit\":251,\"pick-by-alias\":253,regl:283,\"to-px\":314,\"typedarray-pool\":327}],226:[function(t,e,r){(function(r){(function(){\"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*r.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*r.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}function o(){var t=document.createElement(\"canvas\");return t.style.position=\"absolute\",t.style.top=0,t.style.left=0,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\",width:\"w width\",height:\"h height\"},!0),t.pixelRatio||(t.pixelRatio=r.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(\"string\"==typeof t.container){var s=document.querySelector(t.container);if(!s)throw Error(\"Element \"+t.container+\" is not found\");t.container=s}a(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=o(),t.container.appendChild(t.canvas),i(t))}else if(!t.canvas){if(\"undefined\"==typeof document)throw Error(\"Not DOM environment. Use headless-gl.\");t.container=document.body||document.documentElement,t.canvas=o(),t.container.appendChild(t.canvas),i(t)}return t.gl||[\"webgl\",\"experimental-webgl\",\"webgl-experimental\"].some((function(e){try{t.gl=t.canvas.getContext(e,t.attrs)}catch(t){}return t.gl})),t.gl}}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"pick-by-alias\":253}],227:[function(t,e,r){e.exports=function(t){\"string\"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n>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<>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<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g}},{}],231:[function(t,e,r){\"function\"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},{}],232:[function(t,e,r){e.exports=!0},{}],233:[function(t,e,r){\"use strict\";e.exports=\"undefined\"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\\//.test(navigator.appVersion))},{}],234:[function(t,e,r){\"use strict\";e.exports=a,e.exports.isMobile=a,e.exports.default=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[46]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[46]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;if(e||\"undefined\"==typeof navigator||(e=navigator.userAgent),e&&e.headers&&\"string\"==typeof e.headers[\"user-agent\"]&&(e=e.headers[\"user-agent\"]),\"string\"!=typeof e)return!1;var r=t.tablet?i.test(e):n.test(e);return!r&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==e.indexOf(\"Macintosh\")&&-1!==e.indexOf(\"Safari\")&&(r=!0),r}},{}],235:[function(t,e,r){\"use strict\";e.exports=function(t){var e=typeof t;return null!==t&&(\"object\"===e||\"function\"===e)}},{}],236:[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({}))}},{}],237:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e,r=t.length,n=0;n13)&&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}},{}],238:[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))}},{}],239:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?e.exports=n():(t=t||self).mapboxgl=n()}(this,(function(){\"use strict\";var t,e,r;function n(n,i){if(t)if(e){var a=\"var sharedChunk = {}; (\"+t+\")(sharedChunk); (\"+e+\")(sharedChunk);\",o={};t(o),(r=i(o)).workerUrl=window.URL.createObjectURL(new Blob([a],{type:\"text/javascript\"}))}else e=i;else t=i}return n(0,(function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r=n;function n(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}n.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},n.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},n.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},n.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)(n=1))return n;for(;ra?r=i:n=i,i=.5*(n-r)+r}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var i=a;function a(t,e){this.x=t,this.y=e}function o(t,e,n,i){var a=new r(t,e,n,i);return function(t){return a.solve(t)}}a.prototype={clone:function(){return new a(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}},a.convert=function(t){return t instanceof a?t:Array.isArray(t)?new a(t[0],t[1]):t};var s=o(.25,.1,.25,1);function l(t,e,r){return Math.min(r,Math.max(e,t))}function c(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i}function u(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function d(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function g(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e))}))}function m(t,e){return-1!==t.indexOf(e,t.length-e.length)}function v(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?v(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 T(t){for(var e=0,r=0,n=t.length,i=n-1,a=void 0,o=void 0;r@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\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}var M=null;function S(t){if(null==M){var e=t.navigator?t.navigator.userAgent:null;M=!!t.safari||!(!e||!(/\\b(iPad|iPhone|iPod)\\b/.test(e)||e.match(\"Safari\")&&!e.match(\"Chrome\")))}return M}function E(t){try{var e=self[t];return e.setItem(\"_mapbox_test_\",1),e.removeItem(\"_mapbox_test_\"),!0}catch(t){return!1}}var L,C,P,I,O=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),z=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,D=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,R={now:O,frame:function(t){var e=z(t);return{cancel:function(){return D(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var r=self.document.createElement(\"canvas\"),n=r.getContext(\"2d\");if(!n)throw new Error(\"failed to create canvas 2d context\");return r.width=t.width,r.height=t.height,n.drawImage(t,0,0,t.width,t.height),n.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:function(t){return L||(L=self.document.createElement(\"a\")),L.href=t,L.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==C&&(C=self.matchMedia(\"(prefers-reduced-motion: reduce)\")),C.matches)}},F={API_URL:\"https://api.mapbox.com\",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf(\"https://api.mapbox.cn\")?\"https://events.mapbox.cn/events/v2\":0===this.API_URL.indexOf(\"https://api.mapbox.com\")?\"https://events.mapbox.com/events/v2\":null:null},FEEDBACK_URL:\"https://apps.mapbox.com/feedback\",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},B={supported:!1,testSupport:function(t){if(N||!I)return;j?U(t):P=t}},N=!1,j=!1;function U(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,I),t.isContextLost())return;B.supported=!0}catch(t){}t.deleteTexture(e),N=!0}self.document&&((I=self.document.createElement(\"img\")).onload=function(){P&&U(P),P=null,j=!0},I.onerror=function(){N=!0,P=null},I.src=\"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\");var V=\"01\";var H=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function q(t){return 0===t.indexOf(\"mapbox:\")}H.prototype._createSkuToken=function(){var t=function(){for(var t=\"\",e=0;e<10;e++)t+=\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"[Math.floor(62*Math.random())];return{token:[\"1\",V,t].join(\"\"),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},H.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},H.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},H.prototype.normalizeStyleURL=function(t,e){if(!q(t))return t;var r=X(t);return r.path=\"/styles/v1\"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeGlyphsURL=function(t,e){if(!q(t))return t;var r=X(t);return r.path=\"/fonts/v1\"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeSourceURL=function(t,e){if(!q(t))return t;var r=X(t);return r.path=\"/v4/\"+r.authority+\".json\",r.params.push(\"secure\"),this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeSpriteURL=function(t,e,r,n){var i=X(t);return q(t)?(i.path=\"/styles/v1\"+i.path+\"/sprite\"+e+r,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=\"\"+e+r,Z(i))},H.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!q(t))return t;var r=X(t),n=R.devicePixelRatio>=2||512===e?\"@2x\":\"\",i=B.supported?\".webp\":\"$1\";r.path=r.path.replace(/(\\.(png|jpg)\\d*)(?=$)/,\"\"+n+i),r.path=r.path.replace(/^.+\\/v4\\//,\"/\"),r.path=\"/v4\"+r.path;var a=this._customAccessToken||function(t){for(var e=0,r=t;e=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){_(\"Unable to write to LocalStorage\")}},K.prototype.processRequests=function(t){},K.prototype.postEvent=function(t,e,r,n){var i=this;if(F.EVENTS_URL){var a=X(F.EVENTS_URL);a.params.push(\"access_token=\"+(n||F.ACCESS_TOKEN||\"\"));var o={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:\"mapbox-gl-js\",sdkVersion:\"1.10.1\",skuId:V,userId:this.anonId},s=e?u(o,e):o,l={url:Z(a),headers:{\"Content-Type\":\"text/plain\"},body:JSON.stringify([s])};this.pendingRequest=bt(l,(function(t){i.pendingRequest=null,r(t),i.saveEventData(),i.processRequests(n)}))}},K.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var Q,$,tt=function(t){function e(){t.call(this,\"map.load\"),this.success={},this.skuToken=\"\"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postMapLoadEvent=function(t,e,r,n){this.skuToken=r,(F.EVENTS_URL&&n||F.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return q(t)||Y(t)})))&&this.queueRequest({id:e,timestamp:Date.now()},n)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var r=this.queue.shift(),n=r.id,i=r.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),d(this.anonId)||(this.anonId=p()),this.postEvent(i,{skuToken:this.skuToken},(function(t){t||n&&(e.success[n]=!0)}),t))}},e}(K),et=new(function(t){function e(e){t.call(this,\"appUserTurnstile\"),this._customAccessToken=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postTurnstileEvent=function(t,e){F.EVENTS_URL&&F.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return q(t)||Y(t)}))&&this.queueRequest(Date.now(),e)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var r=J(F.ACCESS_TOKEN),n=r?r.u:F.ACCESS_TOKEN,i=n!==this.eventData.tokenU;d(this.anonId)||(this.anonId=p(),i=!0);var a=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(a),l=(a-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||o.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(a,{\"enabled.telemetry\":!1},(function(t){t||(e.eventData.lastSuccess=a,e.eventData.tokenU=n)}),t)}},e}(K)),rt=et.postTurnstileEvent.bind(et),nt=new tt,it=nt.postMapLoadEvent.bind(nt),at=500,ot=50;function st(){self.caches&&!Q&&(Q=self.caches.open(\"mapbox-tiles\"))}function lt(t,e,r){if(st(),Q){var n={status:e.status,statusText:e.statusText,headers:new self.Headers};e.headers.forEach((function(t,e){return n.headers.set(e,t)}));var i=A(e.headers.get(\"Cache-Control\")||\"\");if(!i[\"no-store\"])i[\"max-age\"]&&n.headers.set(\"Expires\",new Date(r+1e3*i[\"max-age\"]).toUTCString()),new Date(n.headers.get(\"Expires\")).getTime()-r<42e4||function(t,e){if(void 0===$)try{new Response(new ReadableStream),$=!0}catch(t){$=!1}$?e(t.body):t.blob().then(e)}(e,(function(e){var r=new self.Response(e,n);st(),Q&&Q.then((function(e){return e.put(ct(t.url),r)})).catch((function(t){return _(t.message)}))}))}}function ct(t){var e=t.indexOf(\"?\");return e<0?t:t.slice(0,e)}function ut(t,e){if(st(),!Q)return e(null);var r=ct(t.url);Q.then((function(t){t.match(r).then((function(n){var i=function(t){if(!t)return!1;var e=new Date(t.headers.get(\"Expires\")||0),r=A(t.headers.get(\"Cache-Control\")||\"\");return e>Date.now()&&!r[\"no-cache\"]}(n);t.delete(r),i&&t.put(r,n.clone()),e(null,n,i)})).catch(e)})).catch(e)}var ft,ht=1/0;function pt(){return null==ft&&(ft=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext(\"2d\")&&\"function\"==typeof self.createImageBitmap),ft}var dt={Unknown:\"Unknown\",Style:\"Style\",Source:\"Source\",Tile:\"Tile\",Glyphs:\"Glyphs\",SpriteImage:\"SpriteImage\",SpriteJSON:\"SpriteJSON\",Image:\"Image\"};\"function\"==typeof Object.freeze&&Object.freeze(dt);var gt=function(t){function e(e,r,n){401===r&&Y(n)&&(e+=\": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes\"),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),mt=k()?function(){return self.worker&&self.worker.referrer}:function(){return(\"blob:\"===self.location.protocol?self.parent:self).location.href};function vt(t,e){var r,n=new self.AbortController,i=new self.Request(t.url,{method:t.method||\"GET\",body:t.body,credentials:t.credentials,headers:t.headers,referrer:mt(),signal:n.signal}),a=!1,o=!1,s=(r=i.url).indexOf(\"sku=\")>0&&Y(r);\"json\"===t.type&&i.headers.set(\"Accept\",\"application/json\");var l=function(r,n,a){if(!o){if(r&&\"SecurityError\"!==r.message&&_(r),n&&a)return c(n);var l=Date.now();self.fetch(i).then((function(r){if(r.ok){var n=s?r.clone():null;return c(r,n,l)}return e(new gt(r.statusText,r.status,t.url))})).catch((function(t){20!==t.code&&e(new Error(t.message))}))}},c=function(r,n,s){(\"arrayBuffer\"===t.type?r.arrayBuffer():\"json\"===t.type?r.json():r.text()).then((function(t){o||(n&&s&<(i,n,s),a=!0,e(null,t,r.headers.get(\"Cache-Control\"),r.headers.get(\"Expires\")))})).catch((function(t){o||e(new Error(t.message))}))};return s?ut(i,l):l(null,null),{cancel:function(){o=!0,a||n.abort()}}}var yt=function(t,e){if(r=t.url,!(/^file:/.test(r)||/^file:/.test(mt())&&!/^\\w+:/.test(r))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty(\"signal\"))return vt(t,e);if(k()&&self.worker&&self.worker.actor){return self.worker.actor.send(\"getResource\",t,e,void 0,!0)}}var r;return function(t,e){var r=new self.XMLHttpRequest;for(var n in r.open(t.method||\"GET\",t.url,!0),\"arrayBuffer\"===t.type&&(r.responseType=\"arraybuffer\"),t.headers)r.setRequestHeader(n,t.headers[n]);return\"json\"===t.type&&(r.responseType=\"text\",r.setRequestHeader(\"Accept\",\"application/json\")),r.withCredentials=\"include\"===t.credentials,r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if(\"json\"===t.type)try{n=JSON.parse(r.response)}catch(t){return e(t)}e(null,n,r.getResponseHeader(\"Cache-Control\"),r.getResponseHeader(\"Expires\"))}else e(new gt(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},xt=function(t,e){return yt(u(t,{type:\"arrayBuffer\"}),e)},bt=function(t,e){return yt(u(t,{method:\"POST\"}),e)};var _t,wt;_t=[],wt=0;var Tt=function(t,e){if(B.supported&&(t.headers||(t.headers={}),t.headers.accept=\"image/webp,*/*\"),wt>=F.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return _t.push(r),r}wt++;var n=!1,i=function(){if(!n)for(n=!0,wt--;_t.length&&wt0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},Et.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var Lt={$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.051129,180,85.051129]},scheme:{type:\"enum\",values:{xyz:{},tms:{}},default:\"xyz\"},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},attribution:{type:\"string\"},promoteId:{type:\"promoteId\"},\"*\":{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.051129,180,85.051129]},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.051129,180,85.051129]},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},attribution:{type:\"string\"},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\"},clusterProperties:{type:\"*\"},lineMetrics:{type:\"boolean\",default:!1},generateId:{type:\"boolean\",default:!1},promoteId:{type:\"promoteId\"}},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\",\"property-type\":\"constant\"}},layout_fill:{\"fill-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_circle:{\"circle-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_heatmap:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},\"layout_fill-extrusion\":{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_line:{\"line-cap\":{type:\"enum\",values:{butt:{},round:{},square:{}},default:\"butt\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-join\":{type:\"enum\",values:{bevel:{},round:{},miter:{}},default:\"miter\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"line-miter-limit\":{type:\"number\",default:2,requires:[{\"line-join\":\"miter\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-round-limit\":{type:\"number\",default:1.05,requires:[{\"line-join\":\"round\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_symbol:{\"symbol-placement\":{type:\"enum\",values:{point:{},line:{},\"line-center\":{}},default:\"point\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-spacing\":{type:\"number\",default:250,minimum:1,units:\"pixels\",requires:[{\"symbol-placement\":\"line\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-avoid-edges\":{type:\"boolean\",default:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"symbol-z-order\":{type:\"enum\",values:{auto:{},\"viewport-y\":{},source:{}},default:\"auto\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-optional\":{type:\"boolean\",default:!1,requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-size\":{type:\"number\",default:1,minimum:0,units:\"factor of the original icon size\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-text-fit\":{type:\"enum\",values:{none:{},width:{},height:{},both:{}},default:\"none\",requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-text-fit-padding\":{type:\"array\",value:\"number\",length:4,default:[0,0,0,0],units:\"pixels\",requires:[\"icon-image\",\"text-field\",{\"icon-text-fit\":[\"both\",\"width\",\"height\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-image\":{type:\"resolvedImage\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-keep-upright\":{type:\"boolean\",default:!1,requires:[\"icon-image\",{\"icon-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-offset\":{type:\"array\",value:\"number\",length:2,default:[0,0],requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-field\":{type:\"formatted\",default:\"\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-font\":{type:\"array\",value:\"string\",default:[\"Open Sans Regular\",\"Arial Unicode MS Regular\"],requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-size\":{type:\"number\",default:16,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-width\":{type:\"number\",default:10,minimum:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-line-height\":{type:\"number\",default:1.2,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-letter-spacing\":{type:\"number\",default:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-justify\":{type:\"enum\",values:{auto:{},left:{},center:{},right:{}},default:\"center\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-radial-offset\":{type:\"number\",units:\"ems\",default:0,requires:[\"text-field\"],\"property-type\":\"data-driven\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]}},\"text-variable-anchor\":{type:\"array\",value:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"text-field\",{\"!\":\"text-variable-anchor\"}],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-angle\":{type:\"number\",default:45,units:\"degrees\",requires:[\"text-field\",{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-writing-mode\":{type:\"array\",value:\"enum\",values:{horizontal:{},vertical:{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-keep-upright\":{type:\"boolean\",default:!0,requires:[\"text-field\",{\"text-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-transform\":{type:\"enum\",values:{none:{},uppercase:{},lowercase:{}},default:\"none\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-offset\":{type:\"array\",value:\"number\",units:\"ems\",length:2,default:[0,0],requires:[\"text-field\",{\"!\":\"text-radial-offset\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-optional\":{type:\"boolean\",default:!1,requires:[\"text-field\",\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_raster:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_hillshade:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},filter:{type:\"array\",value:\"*\"},filter_operator:{type:\"enum\",values:{\"==\":{},\"!=\":{},\">\":{},\">=\":{},\"<\":{},\"<=\":{},in:{},\"!in\":{},all:{},any:{},none:{},has:{},\"!has\":{},within:{}}},geometry_type:{type:\"enum\",values:{Point:{},LineString:{},Polygon:{}}},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}},function_stop:{type:\"array\",minimum:0,maximum:24,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\"},in:{group:\"Lookup\"},\"index-of\":{group:\"Lookup\"},slice:{group:\"Lookup\"},case:{group:\"Decision\"},match:{group:\"Decision\"},coalesce:{group:\"Decision\"},step:{group:\"Ramps, scales, curves\"},interpolate:{group:\"Ramps, scales, curves\"},\"interpolate-hcl\":{group:\"Ramps, scales, curves\"},\"interpolate-lab\":{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\"},format:{group:\"Types\"},image:{group:\"Types\"},\"number-format\":{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\"},\"feature-state\":{group:\"Feature data\"},\"geometry-type\":{group:\"Feature data\"},id:{group:\"Feature data\"},zoom:{group:\"Zoom\"},\"heatmap-density\":{group:\"Heatmap\"},\"line-progress\":{group:\"Feature data\"},accumulated:{group:\"Feature data\"},\"+\":{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\"},distance:{group:\"Math\"},\"==\":{group:\"Decision\"},\"!=\":{group:\"Decision\"},\">\":{group:\"Decision\"},\"<\":{group:\"Decision\"},\">=\":{group:\"Decision\"},\"<=\":{group:\"Decision\"},all:{group:\"Decision\"},any:{group:\"Decision\"},\"!\":{group:\"Decision\"},within:{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:{}},\"property-type\":\"data-constant\",transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]}},position:{type:\"array\",default:[1.15,210,30],length:3,value:\"number\",\"property-type\":\"data-constant\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]}},color:{type:\"color\",\"property-type\":\"data-constant\",default:\"#ffffff\",expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},intensity:{type:\"number\",\"property-type\":\"data-constant\",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:[\"zoom\"]},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\",default:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-outline-color\":{type:\"color\",transition:!0,requires:[{\"!\":\"fill-pattern\"},{\"fill-antialias\":!0}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"}},\"paint_fill-extrusion\":{\"fill-extrusion-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-extrusion-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-extrusion-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"fill-extrusion-height\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-base\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,requires:[\"fill-extrusion-height\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-vertical-gradient\":{type:\"boolean\",default:!0,transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_line:{\"line-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"line-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-width\":{type:\"number\",default:1,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-gap-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-offset\":{type:\"number\",default:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-dasharray\":{type:\"array\",value:\"number\",minimum:0,transition:!0,units:\"line widths\",requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"line-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"line-gradient\":{type:\"color\",transition:!1,requires:[{\"!\":\"line-dasharray\"},{\"!\":\"line-pattern\"},{source:\"geojson\",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:[\"line-progress\"]},\"property-type\":\"color-ramp\"}},paint_circle:{\"circle-radius\":{type:\"number\",default:5,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-blur\":{type:\"number\",default:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"circle-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-scale\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-stroke-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"}},paint_heatmap:{\"heatmap-radius\":{type:\"number\",default:30,minimum:1,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-weight\":{type:\"number\",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-intensity\":{type:\"number\",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"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\"],transition:!1,expression:{interpolated:!0,parameters:[\"heatmap-density\"]},\"property-type\":\"color-ramp\"},\"heatmap-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_symbol:{\"icon-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"icon-image\",\"icon-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-color\":{type:\"color\",default:\"#000000\",transition:!0,overridable:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"text-field\",\"text-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_raster:{\"raster-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-hue-rotate\":{type:\"number\",default:0,period:360,transition:!0,units:\"degrees\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-min\":{type:\"number\",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-max\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-saturation\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-contrast\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-resampling\":{type:\"enum\",values:{linear:{},nearest:{}},default:\"linear\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-fade-duration\":{type:\"number\",default:300,minimum:0,transition:!1,units:\"milliseconds\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_hillshade:{\"hillshade-illumination-direction\":{type:\"number\",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-illumination-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-exaggeration\":{type:\"number\",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-shadow-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-highlight-color\":{type:\"color\",default:\"#FFFFFF\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-accent-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_background:{\"background-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"background-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"background-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"background-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},transition:{duration:{type:\"number\",default:300,minimum:0,units:\"milliseconds\"},delay:{type:\"number\",default:0,minimum:0,units:\"milliseconds\"}},\"property-type\":{\"data-driven\":{type:\"property-type\"},\"cross-faded\":{type:\"property-type\"},\"cross-faded-data-driven\":{type:\"property-type\"},\"color-ramp\":{type:\"property-type\"},\"data-constant\":{type:\"property-type\"},constant:{type:\"property-type\"}},promoteId:{\"*\":{type:\"string\"}}},Ct=function(t,e,r,n){this.message=(t?t+\": \":\"\")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function Pt(t){var e=t.key,r=t.value;return r?[new Ct(e,r,\"constants have been deprecated as of v8\")]:[]}function It(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n\":\"value\"===t.itemType.kind?\"array\":\"array<\"+e+\">\"}return t.kind}var Zt=[Ft,Bt,Nt,jt,Ut,Gt,Vt,Wt(Ht),Yt];function Jt(t,e){if(\"error\"===e.kind)return null;if(\"array\"===t.kind){if(\"array\"===e.kind&&(0===e.N&&\"value\"===e.itemType.kind||!Jt(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=Zt;r255?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]),m=g<=.5?g*(d+1):g+d-g*d,v=2*g-m;return[n(255*s(v,m,p+1/3)),n(255*s(v,m,p)),n(255*s(v,m,p-1/3)),h];default:return null}}return null}}catch(t){}})).parseCSSColor,te=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};te.parse=function(t){if(t){if(t instanceof te)return t;if(\"string\"==typeof t){var e=$t(t);if(e)return new te(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},te.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+\")\"},te.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]},te.black=new te(0,0,0,1),te.white=new te(1,1,1,1),te.transparent=new te(0,0,0,0),te.red=new te(1,0,0,1);var ee=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\"})};ee.prototype.compare=function(t,e){return this.collator.compare(t,e)},ee.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var re=function(t,e,r,n,i){this.text=t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i},ne=function(t){this.sections=t};ne.fromString=function(t){return new ne([new re(t,null,null,null,null)])},ne.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},ne.factory=function(t){return t instanceof ne?t:ne.fromString(t)},ne.prototype.toString=function(){return 0===this.sections.length?\"\":this.sections.map((function(t){return t.text})).join(\"\")},ne.prototype.serialize=function(){for(var t=[\"format\"],e=0,r=this.sections;e=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 oe(t){if(null===t)return!0;if(\"string\"==typeof t)return!0;if(\"boolean\"==typeof t)return!0;if(\"number\"==typeof t)return!0;if(t instanceof te)return!0;if(t instanceof ee)return!0;if(t instanceof ne)return!0;if(t instanceof ie)return!0;if(Array.isArray(t)){for(var e=0,r=t;e2){var s=t[1];if(\"string\"!=typeof s||!(s in fe)||\"object\"===s)return e.error('The item type argument of \"array\" must be one of string, number, boolean',1);a=fe[s],n++}else a=Ht;if(t.length>3){if(null!==t[2]&&(\"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);o=t[2],n++}r=Wt(a,o)}else r=fe[i];for(var l=[];n1)&&e.push(n)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var pe=function(t){this.type=Gt,this.sections=t};pe.parse=function(t,e){if(t.length<2)return e.error(\"Expected at least one argument.\");var r=t[1];if(!Array.isArray(r)&&\"object\"==typeof r)return e.error(\"First argument must be an image or text section.\");for(var n=[],i=!1,a=1;a<=t.length-1;++a){var o=t[a];if(i&&\"object\"==typeof o&&!Array.isArray(o)){i=!1;var s=null;if(o[\"font-scale\"]&&!(s=e.parse(o[\"font-scale\"],1,Bt)))return null;var l=null;if(o[\"text-font\"]&&!(l=e.parse(o[\"text-font\"],1,Wt(Nt))))return null;var c=null;if(o[\"text-color\"]&&!(c=e.parse(o[\"text-color\"],1,Ut)))return null;var u=n[n.length-1];u.scale=s,u.font=l,u.textColor=c}else{var f=e.parse(t[a],1,Ht);if(!f)return null;var h=f.type.kind;if(\"string\"!==h&&\"value\"!==h&&\"null\"!==h&&\"resolvedImage\"!==h)return e.error(\"Formatted text type must be 'string', 'value', 'image' or 'null'.\");i=!0,n.push({content:f,scale:null,font:null,textColor:null})}}return new pe(n)},pe.prototype.evaluate=function(t){return new ne(this.sections.map((function(e){var r=e.content.evaluate(t);return se(r)===Yt?new re(\"\",r,null,null,null):new re(le(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(\",\"):null,e.textColor?e.textColor.evaluate(t):null)})))},pe.prototype.eachChild=function(t){for(var e=0,r=this.sections;e-1),r},de.prototype.eachChild=function(t){t(this.input)},de.prototype.outputDefined=function(){return!1},de.prototype.serialize=function(){return[\"image\",this.input.serialize()]};var ge={\"to-boolean\":jt,\"to-color\":Ut,\"to-number\":Bt,\"to-string\":Nt},me=function(t,e){this.type=t,this.args=e};me.parse=function(t,e){if(t.length<2)return e.error(\"Expected at least one argument.\");var r=t[0];if((\"to-boolean\"===r||\"to-string\"===r)&&2!==t.length)return e.error(\"Expected one argument.\");for(var n=ge[r],i=[],a=1;a4?\"Invalid rbga value \"+JSON.stringify(e)+\": expected an array containing either three or four numeric values.\":ae(e[0],e[1],e[2],e[3])))return new te(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ue(r||\"Could not parse color from value '\"+(\"string\"==typeof e?e:String(JSON.stringify(e)))+\"'\")}if(\"number\"===this.type.kind){for(var o=null,s=0,l=this.args;s=e[2])&&(!(t[1]<=e[1])&&!(t[3]>=e[3])))}function Te(t,e){var r,n=(180+t[0])/360,i=(r=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360),a=Math.pow(2,e.z);return[Math.round(n*a*8192),Math.round(i*a*8192)]}function ke(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function Ae(t,e){for(var r,n,i,a,o,s,l,c=!1,u=0,f=e.length;u0&&f<0||u<0&&f>0}function Ee(t,e,r){for(var n=0,i=r;nr[2]){var i=.5*n,a=t[0]-r[0]>i?-n:r[0]-t[0]>i?n:0;0===a&&(a=t[0]-r[2]>i?-n:r[2]-t[0]>i?n:0),t[0]+=a}_e(e,t)}function ze(t,e,r,n){for(var i=8192*Math.pow(2,n.z),a=[8192*n.x,8192*n.y],o=[],s=0,l=t;s=0)return!1;var r=!0;return t.eachChild((function(t){r&&!Ne(t,e)&&(r=!1)})),r}Re.parse=function(t,e){if(2!==t.length)return e.error(\"'within' expression requires exactly one argument, but found \"+(t.length-1)+\" instead.\");if(oe(t[1])){var r=t[1];if(\"FeatureCollection\"===r.type)for(var n=0;ne))throw new ue(\"Input is not a number.\");o=s-1}return 0}Ue.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)},Ue.prototype._parse=function(t,e){function r(t,e,r){return\"assert\"===r?new he(e,[t]):\"coerce\"===r?new me(e,[t]):t}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 n=t[0];if(\"string\"!=typeof n)return this.error(\"Expression name must be a string, but found \"+typeof n+' instead. If you wanted a literal array, use [\"literal\", [...]].',0),null;var i=this.registry[n];if(i){var a=i.parse(t,this);if(!a)return null;if(this.expectedType){var o=this.expectedType,s=a.type;if(\"string\"!==o.kind&&\"number\"!==o.kind&&\"boolean\"!==o.kind&&\"object\"!==o.kind&&\"array\"!==o.kind||\"value\"!==s.kind)if(\"color\"!==o.kind&&\"formatted\"!==o.kind&&\"resolvedImage\"!==o.kind||\"value\"!==s.kind&&\"string\"!==s.kind){if(this.checkSubtype(o,s))return null}else a=r(a,o,e.typeAnnotation||\"coerce\");else a=r(a,o,e.typeAnnotation||\"assert\")}if(!(a instanceof ce)&&\"resolvedImage\"!==a.type.kind&&function t(e){if(e instanceof je)return t(e.boundExpression);if(e instanceof xe&&\"error\"===e.name)return!1;if(e instanceof be)return!1;if(e instanceof Re)return!1;var r=e instanceof me||e instanceof he,n=!0;if(e.eachChild((function(e){n=r?n&&t(e):n&&e instanceof ce})),!n)return!1;return Fe(e)&&Ne(e,[\"zoom\",\"heatmap-density\",\"line-progress\",\"accumulated\",\"is-supported-script\"])}(a)){var l=new ye;try{a=new ce(a.type,a.evaluate(l))}catch(t){return this.error(t.message),null}}return a}return this.error('Unknown expression \"'+n+'\". 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.\")},Ue.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 Ue(this.registry,n,e||null,i,this.errors)},Ue.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 Dt(n,t))},Ue.prototype.checkSubtype=function(t,e){var r=Jt(t,e);return r&&this.error(r),r};var He=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n=o)return e.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.',l);var u=e.parse(s,c,i);if(!u)return null;i=i||u.type,n.push([o,u])}return new He(i,r,n)},He.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[Ve(e,n)].evaluate(t)},He.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Ge=Object.freeze({__proto__:null,number:qe,color:function(t,e,r){return new te(qe(t.r,e.r,r),qe(t.g,e.g,r),qe(t.b,e.b,r),qe(t.a,e.a,r))},array:function(t,e,r){return t.map((function(t,n){return qe(t,e[n],r)}))}}),Ye=6/29,We=3*Ye*Ye,Xe=Math.PI/180,Ze=180/Math.PI;function Je(t){return t>.008856451679035631?Math.pow(t,1/3):t/We+4/29}function Ke(t){return t>Ye?t*t*t:We*(t-4/29)}function Qe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function $e(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function tr(t){var e=$e(t.r),r=$e(t.g),n=$e(t.b),i=Je((.4124564*e+.3575761*r+.1804375*n)/.95047),a=Je((.2126729*e+.7151522*r+.072175*n)/1);return{l:116*a-16,a:500*(i-a),b:200*(a-Je((.0193339*e+.119192*r+.9503041*n)/1.08883)),alpha:t.a}}function er(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=1*Ke(e),r=.95047*Ke(r),n=1.08883*Ke(n),new te(Qe(3.2404542*r-1.5371385*e-.4985314*n),Qe(-.969266*r+1.8760108*e+.041556*n),Qe(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function rr(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var nr={forward:tr,reverse:er,interpolate:function(t,e,r){return{l:qe(t.l,e.l,r),a:qe(t.a,e.a,r),b:qe(t.b,e.b,r),alpha:qe(t.alpha,e.alpha,r)}}},ir={forward:function(t){var e=tr(t),r=e.l,n=e.a,i=e.b,a=Math.atan2(i,n)*Ze;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*Xe,r=t.c;return er({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:rr(t.h,e.h,r),c:qe(t.c,e.c,r),l:qe(t.l,e.l,r),alpha:qe(t.alpha,e.alpha,r)}}},ar=Object.freeze({__proto__:null,lab:nr,hcl:ir}),or=function(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var a=0,o=i;a1})))return e.error(\"Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.\",1);n={name:\"cubic-bezier\",controlPoints:s}}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(!(i=e.parse(i,2,Bt)))return null;var l=[],c=null;\"interpolate-hcl\"===r||\"interpolate-lab\"===r?c=Ut:e.expectedType&&\"value\"!==e.expectedType.kind&&(c=e.expectedType);for(var u=0;u=f)return e.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.',p);var g=e.parse(h,d,c);if(!g)return null;c=c||g.type,l.push([f,g])}return\"number\"===c.kind||\"color\"===c.kind||\"array\"===c.kind&&\"number\"===c.itemType.kind&&\"number\"==typeof c.N?new or(c,r,n,i,l):e.error(\"Type \"+Xt(c)+\" is not interpolatable.\")},or.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=Ve(e,n),o=e[a],s=e[a+1],l=or.interpolationFactor(this.interpolation,n,o,s),c=r[a].evaluate(t),u=r[a+1].evaluate(t);return\"interpolate\"===this.operator?Ge[this.type.kind.toLowerCase()](c,u,l):\"interpolate-hcl\"===this.operator?ir.reverse(ir.interpolate(ir.forward(c),ir.forward(u),l)):nr.reverse(nr.interpolate(nr.forward(c),nr.forward(u),l))},or.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e=r.length)throw new ue(\"Array index out of bounds: \"+e+\" > \"+(r.length-1)+\".\");if(e!==Math.floor(e))throw new ue(\"Array index must be an integer, but found \"+e+\" instead.\");return r[e]},ur.prototype.eachChild=function(t){t(this.index),t(this.input)},ur.prototype.outputDefined=function(){return!1},ur.prototype.serialize=function(){return[\"at\",this.index.serialize(),this.input.serialize()]};var fr=function(t,e){this.type=jt,this.needle=t,this.haystack=e};fr.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,Ht),n=e.parse(t[2],2,Ht);return r&&n?Kt(r.type,[jt,Nt,Bt,Ft,Ht])?new fr(r,n):e.error(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(r.type)+\" instead\"):null},fr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!r)return!1;if(!Qt(e,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ue(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(se(e))+\" instead.\");if(!Qt(r,[\"string\",\"array\"]))throw new ue(\"Expected second argument to be of type array or string, but found \"+Xt(se(r))+\" instead.\");return r.indexOf(e)>=0},fr.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},fr.prototype.outputDefined=function(){return!0},fr.prototype.serialize=function(){return[\"in\",this.needle.serialize(),this.haystack.serialize()]};var hr=function(t,e,r){this.type=Bt,this.needle=t,this.haystack=e,this.fromIndex=r};hr.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error(\"Expected 3 or 4 arguments, but found \"+(t.length-1)+\" instead.\");var r=e.parse(t[1],1,Ht),n=e.parse(t[2],2,Ht);if(!r||!n)return null;if(!Kt(r.type,[jt,Nt,Bt,Ft,Ht]))return e.error(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(r.type)+\" instead\");if(4===t.length){var i=e.parse(t[3],3,Bt);return i?new hr(r,n,i):null}return new hr(r,n)},hr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!Qt(e,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ue(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(se(e))+\" instead.\");if(!Qt(r,[\"string\",\"array\"]))throw new ue(\"Expected second argument to be of type array or string, but found \"+Xt(se(r))+\" instead.\");if(this.fromIndex){var n=this.fromIndex.evaluate(t);return r.indexOf(e,n)}return r.indexOf(e)},hr.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},hr.prototype.outputDefined=function(){return!1},hr.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return[\"index-of\",this.needle.serialize(),this.haystack.serialize(),t]}return[\"index-of\",this.needle.serialize(),this.haystack.serialize()]};var pr=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};pr.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;oNumber.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,se(h)))return null}else r=se(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,Ht);if(!d)return null;var g=e.parse(t[t.length-1],t.length-1,n);return g?\"value\"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new pr(r,n,d,i,a,g):null},pr.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(se(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},pr.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},pr.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},pr.prototype.serialize=function(){for(var t=this,e=[\"match\",this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();i=5)return e.error(\"Expected 3 or 4 arguments, but found \"+(t.length-1)+\" instead.\");var r=e.parse(t[1],1,Ht),n=e.parse(t[2],2,Bt);if(!r||!n)return null;if(!Kt(r.type,[Wt(Ht),Nt,Ht]))return e.error(\"Expected first argument to be of type array or string, but found \"+Xt(r.type)+\" instead\");if(4===t.length){var i=e.parse(t[3],3,Bt);return i?new gr(r.type,r,n,i):null}return new gr(r.type,r,n)},gr.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!Qt(e,[\"string\",\"array\"]))throw new ue(\"Expected first argument to be of type array or string, but found \"+Xt(se(e))+\" instead.\");if(this.endIndex){var n=this.endIndex.evaluate(t);return e.slice(r,n)}return e.slice(r)},gr.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},gr.prototype.outputDefined=function(){return!1},gr.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return[\"slice\",this.input.serialize(),this.beginIndex.serialize(),t]}return[\"slice\",this.input.serialize(),this.beginIndex.serialize()]};var xr=yr(\"==\",(function(t,e,r){return e===r}),vr),br=yr(\"!=\",(function(t,e,r){return e!==r}),(function(t,e,r,n){return!vr(0,e,r,n)})),_r=yr(\"<\",(function(t,e,r){return e\",(function(t,e,r){return e>r}),(function(t,e,r,n){return n.compare(e,r)>0})),Tr=yr(\"<=\",(function(t,e,r){return e<=r}),(function(t,e,r,n){return n.compare(e,r)<=0})),kr=yr(\">=\",(function(t,e,r){return e>=r}),(function(t,e,r,n){return n.compare(e,r)>=0})),Ar=function(t,e,r,n,i){this.type=Nt,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};Ar.parse=function(t,e){if(3!==t.length)return e.error(\"Expected two arguments.\");var r=e.parse(t[1],1,Bt);if(!r)return null;var n=t[2];if(\"object\"!=typeof n||Array.isArray(n))return e.error(\"NumberFormat options argument must be an object.\");var i=null;if(n.locale&&!(i=e.parse(n.locale,1,Nt)))return null;var a=null;if(n.currency&&!(a=e.parse(n.currency,1,Nt)))return null;var o=null;if(n[\"min-fraction-digits\"]&&!(o=e.parse(n[\"min-fraction-digits\"],1,Bt)))return null;var s=null;return n[\"max-fraction-digits\"]&&!(s=e.parse(n[\"max-fraction-digits\"],1,Bt))?null:new Ar(r,i,a,o,s)},Ar.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?\"currency\":\"decimal\",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},Ar.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},Ar.prototype.outputDefined=function(){return!1},Ar.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t[\"min-fraction-digits\"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t[\"max-fraction-digits\"]=this.maxFractionDigits.serialize()),[\"number-format\",this.number.serialize(),t]};var Mr=function(t){this.type=Bt,this.input=t};Mr.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 \"+Xt(r.type)+\" instead.\"):new Mr(r):null},Mr.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 ue(\"Expected value to be of type string or array, but found \"+Xt(se(e))+\" instead.\")},Mr.prototype.eachChild=function(t){t(this.input)},Mr.prototype.outputDefined=function(){return!1},Mr.prototype.serialize=function(){var t=[\"length\"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Sr={\"==\":xr,\"!=\":br,\">\":wr,\"<\":_r,\">=\":kr,\"<=\":Tr,array:he,at:ur,boolean:he,case:dr,coalesce:lr,collator:be,format:pe,image:de,in:fr,\"index-of\":hr,interpolate:or,\"interpolate-hcl\":or,\"interpolate-lab\":or,length:Mr,let:cr,literal:ce,match:pr,number:he,\"number-format\":Ar,object:he,slice:gr,step:He,string:he,\"to-boolean\":me,\"to-color\":me,\"to-number\":me,\"to-string\":me,var:je,within:Re};function Er(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=ae(r,n,i,o);if(s)throw new ue(s);return new te(r/255*o,n/255*o,i/255*o,o)}function Lr(t,e){return t in e}function Cr(t,e){var r=e[t];return void 0===r?null:r}function Pr(t){return{type:t}}function Ir(t){return{result:\"success\",value:t}}function Or(t){return{result:\"error\",value:t}}function zr(t){return\"data-driven\"===t[\"property-type\"]||\"cross-faded-data-driven\"===t[\"property-type\"]}function Dr(t){return!!t.expression&&t.expression.parameters.indexOf(\"zoom\")>-1}function Rr(t){return!!t.expression&&t.expression.interpolated}function Fr(t){return t instanceof Number?\"number\":t instanceof String?\"string\":t instanceof Boolean?\"boolean\":Array.isArray(t)?\"array\":null===t?\"null\":typeof t}function Br(t){return\"object\"==typeof t&&null!==t&&!Array.isArray(t)}function Nr(t){return t}function jr(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function Ur(t,e,r,n,i){return jr(typeof r===i?n[r]:void 0,t.default,e.default)}function Vr(t,e,r){if(\"number\"!==Fr(r))return jr(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=Ve(t.stops.map((function(t){return t[0]})),r);return t.stops[i][1]}function Hr(t,e,r){var n=void 0!==t.base?t.base:1;if(\"number\"!==Fr(r))return jr(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=Ve(t.stops.map((function(t){return t[0]})),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=Ge[e.type]||Nr;if(t.colorSpace&&\"rgb\"!==t.colorSpace){var u=ar[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 qr(t,e,r){return\"color\"===e.type?r=te.parse(r):\"formatted\"===e.type?r=ne.fromString(r.toString()):\"resolvedImage\"===e.type?r=ie.fromString(r.toString()):Fr(r)===e.type||\"enum\"===e.type&&e.values[r]||(r=void 0),jr(r,t.default,e.default)}xe.register(Sr,{error:[{kind:\"error\"},[Nt],function(t,e){var r=e[0];throw new ue(r.evaluate(t))}],typeof:[Nt,[Ht],function(t,e){return Xt(se(e[0].evaluate(t)))}],\"to-rgba\":[Wt(Bt,4),[Ut],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Ut,[Bt,Bt,Bt],Er],rgba:[Ut,[Bt,Bt,Bt,Bt],Er],has:{type:jt,overloads:[[[Nt],function(t,e){return Lr(e[0].evaluate(t),t.properties())}],[[Nt,Vt],function(t,e){var r=e[0],n=e[1];return Lr(r.evaluate(t),n.evaluate(t))}]]},get:{type:Ht,overloads:[[[Nt],function(t,e){return Cr(e[0].evaluate(t),t.properties())}],[[Nt,Vt],function(t,e){var r=e[0],n=e[1];return Cr(r.evaluate(t),n.evaluate(t))}]]},\"feature-state\":[Ht,[Nt],function(t,e){return Cr(e[0].evaluate(t),t.featureState||{})}],properties:[Vt,[],function(t){return t.properties()}],\"geometry-type\":[Nt,[],function(t){return t.geometryType()}],id:[Ht,[],function(t){return t.id()}],zoom:[Bt,[],function(t){return t.globals.zoom}],\"heatmap-density\":[Bt,[],function(t){return t.globals.heatmapDensity||0}],\"line-progress\":[Bt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Ht,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],\"+\":[Bt,Pr(Bt),function(t,e){for(var r=0,n=0,i=e;n\":[jt,[Nt,Ht],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->\":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],\"filter-<=\":[jt,[Nt,Ht],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-<=\":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],\"filter->=\":[jt,[Nt,Ht],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->=\":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],\"filter-has\":[jt,[Ht],function(t,e){return e[0].value in t.properties()}],\"filter-has-id\":[jt,[],function(t){return null!==t.id()&&void 0!==t.id()}],\"filter-type-in\":[jt,[Wt(Nt)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],\"filter-id-in\":[jt,[Wt(Ht)],function(t,e){return e[0].value.indexOf(t.id())>=0}],\"filter-in-small\":[jt,[Nt,Wt(Ht)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],\"filter-in-large\":[jt,[Nt,Wt(Ht)],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)}],all:{type:jt,overloads:[[[jt,jt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[Pr(jt),function(t,e){for(var r=0,n=e;r0&&\"string\"==typeof t[0]&&t[0]in Sr}function Wr(t,e){var r=new Ue(Sr,[],e?function(t){var e={color:Ut,string:Nt,number:Bt,enum:Nt,boolean:jt,formatted:Gt,resolvedImage:Yt};if(\"array\"===t.type)return Wt(e[t.value]||Ht,t.length);return e[t.type]}(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&\"string\"===e.type?{typeAnnotation:\"coerce\"}:void 0);return n?Ir(new Gr(n,e)):Or(r.errors)}Gr.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)},Gr.prototype.evaluate=function(t,e,r,n,i,a){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||\"number\"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new ue(\"Expected value to be one of \"+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(\", \")+\", but found \"+JSON.stringify(o)+\" instead.\");return o}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,\"undefined\"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Xr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent=\"constant\"!==t&&!Be(e.expression)};Xr.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,a)},Xr.prototype.evaluate=function(t,e,r,n,i,a){return this._styleExpression.evaluate(t,e,r,n,i,a)};var Zr=function(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent=\"camera\"!==t&&!Be(e.expression),this.interpolationType=n};function Jr(t,e){if(\"error\"===(t=Wr(t,e)).result)return t;var r=t.value.expression,n=Fe(r);if(!n&&!zr(e))return Or([new Dt(\"\",\"data expressions not supported\")]);var i=Ne(r,[\"zoom\"]);if(!i&&!Dr(e))return Or([new Dt(\"\",\"zoom expressions not supported\")]);var a=function t(e){var r=null;if(e instanceof cr)r=t(e.result);else if(e instanceof lr)for(var n=0,i=e.args;nn.maximum?[new Ct(e,r,r+\" is greater than the maximum value \"+n.maximum)]:[]}function en(t){var e,r,n,i=t.valueSpec,a=Ot(t.value.type),o={},s=\"categorical\"!==a&&void 0===t.value.property,l=!s,c=\"array\"===Fr(t.value.stops)&&\"array\"===Fr(t.value.stops[0])&&\"object\"===Fr(t.value.stops[0][0]),u=Qr({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 Ct(t.key,t.value,'identity function may not have a \"stops\" property')];var e=[],r=t.value;e=e.concat($r({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:f})),\"array\"===Fr(r)&&0===r.length&&e.push(new Ct(t.key,r,\"array must have at least one stop\"));return e},default:function(t){return kn({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return\"identity\"===a&&s&&u.push(new Ct(t.key,t.value,'missing required property \"property\"')),\"identity\"===a||t.value.stops||u.push(new Ct(t.key,t.value,'missing required property \"stops\"')),\"exponential\"===a&&t.valueSpec.expression&&!Rr(t.valueSpec)&&u.push(new Ct(t.key,t.value,\"exponential functions not supported\")),t.styleSpec.$version>=8&&(l&&!zr(t.valueSpec)?u.push(new Ct(t.key,t.value,\"property functions not supported\")):s&&!Dr(t.valueSpec)&&u.push(new Ct(t.key,t.value,\"zoom functions not supported\"))),\"categorical\"!==a&&!c||void 0!==t.value.property||u.push(new Ct(t.key,t.value,'\"property\" property is required')),u;function f(t){var e=[],a=t.value,s=t.key;if(\"array\"!==Fr(a))return[new Ct(s,a,\"array expected, \"+Fr(a)+\" found\")];if(2!==a.length)return[new Ct(s,a,\"array length 2 expected, length \"+a.length+\" found\")];if(c){if(\"object\"!==Fr(a[0]))return[new Ct(s,a,\"object expected, \"+Fr(a[0])+\" found\")];if(void 0===a[0].zoom)return[new Ct(s,a,\"object stop key must have zoom\")];if(void 0===a[0].value)return[new Ct(s,a,\"object stop key must have value\")];if(n&&n>Ot(a[0].zoom))return[new Ct(s,a[0].zoom,\"stop zoom values must appear in ascending order\")];Ot(a[0].zoom)!==n&&(n=Ot(a[0].zoom),r=void 0,o={}),e=e.concat(Qr({key:s+\"[0]\",value:a[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:tn,value:h}}))}else e=e.concat(h({key:s+\"[0]\",value:a[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},a));return Yr(zt(a[1]))?e.concat([new Ct(s+\"[1]\",a[1],\"expressions are not allowed in function stops.\")]):e.concat(kn({key:s+\"[1]\",value:a[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,n){var s=Fr(t.value),l=Ot(t.value),c=null!==t.value?t.value:n;if(e){if(s!==e)return[new Ct(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 Ct(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 zr(i)&&void 0===a&&(u+='\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.'),[new Ct(t.key,c,u)]}return\"categorical\"!==a||\"number\"!==s||isFinite(l)&&Math.floor(l)===l?\"categorical\"!==a&&\"number\"===s&&void 0!==r&&l=2&&\"$id\"!==t[1]&&\"$type\"!==t[1];case\"in\":return t.length>=3&&(\"string\"!=typeof t[1]||Array.isArray(t[2]));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);ee?1:0}function cn(t){if(!t)return!0;var e,r=t[0];return t.length<=1?\"any\"!==r:\"==\"===r?un(t[1],t[2],\"==\"):\"!=\"===r?pn(un(t[1],t[2],\"==\")):\"<\"===r||\">\"===r||\"<=\"===r||\">=\"===r?un(t[1],t[2],r):\"any\"===r?(e=t.slice(1),[\"any\"].concat(e.map(cn))):\"all\"===r?[\"all\"].concat(t.slice(1).map(cn)):\"none\"===r?[\"all\"].concat(t.slice(1).map(cn).map(pn)):\"in\"===r?fn(t[1],t.slice(2)):\"!in\"===r?pn(fn(t[1],t.slice(2))):\"has\"===r?hn(t[1]):\"!has\"===r?pn(hn(t[1])):\"within\"!==r||t}function un(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 fn(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(ln)]]:[\"filter-in-small\",t,[\"literal\",e]]}}function hn(t){switch(t){case\"$type\":return!0;case\"$id\":return[\"filter-has-id\"];default:return[\"filter-has\",t]}}function pn(t){return[\"!\",t]}function dn(t){return an(zt(t.value))?rn(It({},t,{expressionContext:\"filter\",valueSpec:{value:\"boolean\"}})):function t(e){var r=e.value,n=e.key;if(\"array\"!==Fr(r))return[new Ct(n,r,\"array expected, \"+Fr(r)+\" found\")];var i,a=e.styleSpec,o=[];if(r.length<1)return[new Ct(n,r,\"filter array must have at least 1 element\")];switch(o=o.concat(nn({key:n+\"[0]\",value:r[0],valueSpec:a.filter_operator,style:e.style,styleSpec:e.styleSpec})),Ot(r[0])){case\"<\":case\"<=\":case\">\":case\">=\":r.length>=2&&\"$type\"===Ot(r[1])&&o.push(new Ct(n,r,'\"$type\" cannot be use with operator \"'+r[0]+'\"'));case\"==\":case\"!=\":3!==r.length&&o.push(new Ct(n,r,'filter array for operator \"'+r[0]+'\" must have 3 elements'));case\"in\":case\"!in\":r.length>=2&&\"string\"!==(i=Fr(r[1]))&&o.push(new Ct(n+\"[1]\",r[1],\"string expected, \"+i+\" found\"));for(var s=2;s=u[p+0]&&n>=u[p+1])?(o[h]=!0,a.push(c[h])):o[h]=!1}}},Dn.prototype._forEachCell=function(t,e,r,n,i,a,o,s){for(var l=this._convertToCellCoord(t),c=this._convertToCellCoord(e),u=this._convertToCellCoord(r),f=this._convertToCellCoord(n),h=l;h<=u;h++)for(var p=c;p<=f;p++){var d=this.d*p+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(p),this._convertFromCellCoord(h+1),this._convertFromCellCoord(p+1)))&&i.call(this,t,e,r,n,d,a,o,s))return}},Dn.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},Dn.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Dn.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+this.cells.length+1+1,r=0,n=0;n=0)){var f=t[u];c[u]=Bn[l].shallow.indexOf(u)>=0?f:Hn(f,e)}t instanceof Error&&(c.message=t.message)}if(c.$name)throw new Error(\"$name property is reserved for worker serialization logic.\");return\"Object\"!==l&&(c.$name=l),c}throw new Error(\"can't serialize object of type \"+typeof t)}function qn(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||Un(t)||Vn(t)||ArrayBuffer.isView(t)||t instanceof Rn)return t;if(Array.isArray(t))return t.map(qn);if(\"object\"==typeof t){var e=t.$name||\"Object\",r=Bn[e].klass;if(!r)throw new Error(\"can't deserialize unregistered class \"+e);if(r.deserialize)return r.deserialize(t);for(var n=Object.create(r.prototype),i=0,a=Object.keys(t);i=0?s:qn(s)}}return n}throw new Error(\"can't deserialize object of type \"+typeof t)}var Gn=function(){this.first=!0};Gn.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=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 Wn(t){for(var e=0,r=t;e=65097&&t<=65103)||(!!Yn[\"CJK Compatibility Ideographs\"](t)||(!!Yn[\"CJK Compatibility\"](t)||(!!Yn[\"CJK Radicals Supplement\"](t)||(!!Yn[\"CJK Strokes\"](t)||(!(!Yn[\"CJK Symbols and Punctuation\"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||(!!Yn[\"CJK Unified Ideographs Extension A\"](t)||(!!Yn[\"CJK Unified Ideographs\"](t)||(!!Yn[\"Enclosed CJK Letters and Months\"](t)||(!!Yn[\"Hangul Compatibility Jamo\"](t)||(!!Yn[\"Hangul Jamo Extended-A\"](t)||(!!Yn[\"Hangul Jamo Extended-B\"](t)||(!!Yn[\"Hangul Jamo\"](t)||(!!Yn[\"Hangul Syllables\"](t)||(!!Yn.Hiragana(t)||(!!Yn[\"Ideographic Description Characters\"](t)||(!!Yn.Kanbun(t)||(!!Yn[\"Kangxi Radicals\"](t)||(!!Yn[\"Katakana Phonetic Extensions\"](t)||(!(!Yn.Katakana(t)||12540===t)||(!(!Yn[\"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)||(!(!Yn[\"Small Form Variants\"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||(!!Yn[\"Unified Canadian Aboriginal Syllabics\"](t)||(!!Yn[\"Unified Canadian Aboriginal Syllabics Extended\"](t)||(!!Yn[\"Vertical Forms\"](t)||(!!Yn[\"Yijing Hexagram Symbols\"](t)||(!!Yn[\"Yi Syllables\"](t)||!!Yn[\"Yi Radicals\"](t))))))))))))))))))))))))))))))}function Jn(t){return!(Zn(t)||function(t){return!(!Yn[\"Latin-1 Supplement\"](t)||167!==t&&169!==t&&174!==t&&177!==t&&188!==t&&189!==t&&190!==t&&215!==t&&247!==t)||(!(!Yn[\"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)||(!!Yn[\"Letterlike Symbols\"](t)||(!!Yn[\"Number Forms\"](t)||(!(!Yn[\"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))||(!(!Yn[\"Control Pictures\"](t)||9251===t)||(!!Yn[\"Optical Character Recognition\"](t)||(!!Yn[\"Enclosed Alphanumerics\"](t)||(!!Yn[\"Geometric Shapes\"](t)||(!(!Yn[\"Miscellaneous Symbols\"](t)||t>=9754&&t<=9759)||(!(!Yn[\"Miscellaneous Symbols and Arrows\"](t)||!(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243))||(!!Yn[\"CJK Symbols and Punctuation\"](t)||(!!Yn.Katakana(t)||(!!Yn[\"Private Use Area\"](t)||(!!Yn[\"CJK Compatibility Forms\"](t)||(!!Yn[\"Small Form Variants\"](t)||(!!Yn[\"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 Kn(t){return t>=1424&&t<=2303||Yn[\"Arabic Presentation Forms-A\"](t)||Yn[\"Arabic Presentation Forms-B\"](t)}function Qn(t,e){return!(!e&&Kn(t))&&!(t>=2304&&t<=3583||t>=3840&&t<=4255||Yn.Khmer(t))}function $n(t){for(var e=0,r=t;e-1&&(ai=ni),ii&&ii(t)};function li(){ci.fire(new Mt(\"pluginStateChange\",{pluginStatus:ai,pluginURL:oi}))}var ci=new Et,ui=function(){return ai},fi=function(){if(ai!==ti||!oi)throw new Error(\"rtl-text-plugin cannot be downloaded unless a pluginURL is specified\");ai=ei,li(),oi&&xt({url:oi},(function(t){t?si(t):(ai=ri,li())}))},hi={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return ai===ri||null!=hi.applyArabicShaping},isLoading:function(){return ai===ei},setState:function(t){ai=t.pluginStatus,oi=t.pluginURL},isParsed:function(){return null!=hi.applyArabicShaping&&null!=hi.processBidirectionalText&&null!=hi.processStyledBidirectionalText},getPluginURL:function(){return oi}},pi=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 Gn,this.transition={})};pi.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,n=t;rthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}};var di=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(Br(t))return new Kr(t,e);if(Yr(t)){var r=Jr(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=te.parse(t)),{kind:\"constant\",evaluate:function(){return n}}}(void 0===e?t.specification.default:e,t.specification)};di.prototype.isDataDriven=function(){return\"source\"===this.expression.kind||\"composite\"===this.expression.kind},di.prototype.possiblyEvaluate=function(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)};var gi=function(t){this.property=t,this.value=new di(t,void 0)};gi.prototype.transitioned=function(t,e){return new vi(this.property,this.value,e,u({},t.transition,this.transition),t.now)},gi.prototype.untransitioned=function(){return new vi(this.property,this.value,null,{},0)};var mi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};mi.prototype.getValue=function(t){return x(this._values[t].value.value)},mi.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new gi(this._values[t].property)),this._values[t].value=new di(this._values[t].property,null===e?void 0:x(e))},mi.prototype.getTransition=function(t){return x(this._values[t].transition)},mi.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new gi(this._values[t].property)),this._values[t].transition=x(e)||void 0},mi.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);ethis.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(n=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}(o))}return i};var yi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};yi.prototype.possiblyEvaluate=function(t,e,r){for(var n=new _i(this._properties),i=0,a=Object.keys(this._values);in.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(Ti),Ai=function(t){this.specification=t};Ai.prototype.possiblyEvaluate=function(t,e,r,n){if(void 0!==t.value){if(\"constant\"===t.expression.kind){var i=t.expression.evaluate(e,null,{},r,n);return this._calculate(i,i,i,e)}return this._calculate(t.expression.evaluate(new pi(Math.floor(e.zoom-1),e)),t.expression.evaluate(new pi(Math.floor(e.zoom),e)),t.expression.evaluate(new pi(Math.floor(e.zoom+1),e)),e)}},Ai.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},Ai.prototype.interpolate=function(t){return t};var Mi=function(t){this.specification=t};Mi.prototype.possiblyEvaluate=function(t,e,r,n){return!!t.expression.evaluate(e,null,{},r,n)},Mi.prototype.interpolate=function(){return!1};var Si=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var r=t[e];r.specification.overridable&&this.overridableProperties.push(e);var n=this.defaultPropertyValues[e]=new di(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new gi(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};Nn(\"DataDrivenProperty\",Ti),Nn(\"DataConstantProperty\",wi),Nn(\"CrossFadedDataDrivenProperty\",ki),Nn(\"CrossFadedProperty\",Ai),Nn(\"ColorRampProperty\",Mi);var Ei=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},\"custom\"!==e.type&&(e=e,this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,\"background\"!==e.type&&(this.source=e.source,this.sourceLayer=e[\"source-layer\"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new xi(r.layout)),r.paint)){for(var n in this._transitionablePaint=new mi(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(),this.paint=new _i(r.paint)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return\"visibility\"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n=\"layers.\"+this.id+\".layout.\"+t;if(this._validate(In,n,t,e,r))return}\"visibility\"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e},e.prototype.getPaintProperty=function(t){return m(t,\"-transition\")?this._transitionablePaint.getTransition(t.slice(0,-\"-transition\".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n=\"layers.\"+this.id+\".paint.\"+t;if(this._validate(Pn,n,t,e,r))return!1}if(m(t,\"-transition\"))return this._transitionablePaint.setTransition(t.slice(0,-\"-transition\".length),e||void 0),!1;var i=this._transitionablePaint._values[t],a=\"cross-faded-data-driven\"===i.property.specification[\"property-type\"],o=i.value.isDataDriven(),s=i.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var l=this._transitionablePaint._values[t].value;return l.isDataDriven()||o||a||this._handleOverridablePaintPropertyUpdate(t,s,l)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype._handleOverridablePaintPropertyUpdate=function(t,e,r){return!1},e.prototype.isHidden=function(t){return!!(this.minzoom&&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,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)},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 this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),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 void 0===i&&(i={}),(!i||!1!==i.validate)&&On(this,t.call(Ln,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:Lt,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof bi&&zr(e.property.specification)&&((\"source\"===e.value.kind||\"composite\"===e.value.kind)&&e.value.isStateDependent))return!0}return!1},e}(Et),Li={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Ci=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},Pi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Ii(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map((function(t){var i,a=(i=t.type,Li[i].BYTES_PER_ELEMENT),o=r=Oi(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:Oi(r,Math.max(n,e)),alignment:e}}function Oi(t,e){return Math.ceil(t/e)*e}Pi.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Pi.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},Pi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Pi.prototype.clear=function(){this.length=0},Pi.prototype.resize=function(t){this.reserve(t),this.length=t},Pi.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)}},Pi.prototype._refreshViews=function(){throw new Error(\"_refreshViews() must be implemented by each concrete StructArray layout\")};var zi=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;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.int16[n+0]=e,this.int16[n+1]=r,t},e}(Pi);zi.prototype.bytesPerElement=4,Nn(\"StructArrayLayout2i4\",zi);var Di=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;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,t},e}(Pi);Di.prototype.bytesPerElement=8,Nn(\"StructArrayLayout4i8\",Di);var Ri=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;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(Pi);Ri.prototype.bytesPerElement=12,Nn(\"StructArrayLayout2i4i12\",Ri);var Fi=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;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=4*t,l=8*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=a,this.uint8[l+7]=o,t},e}(Pi);Fi.prototype.bytesPerElement=8,Nn(\"StructArrayLayout2i4ub8\",Fi);var Bi=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,n,i,a,o,s,l,c){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,n,i,a,o,s,l,c)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u){var f=9*t,h=18*t;return this.uint16[f+0]=e,this.uint16[f+1]=r,this.uint16[f+2]=n,this.uint16[f+3]=i,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.uint8[h+16]=c,this.uint8[h+17]=u,t},e}(Pi);Bi.prototype.bytesPerElement=18,Nn(\"StructArrayLayout8ui2ub18\",Bi);var Ni=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,l,c,u,f){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,n,i,a,o,s,l,c,u,f)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h){var p=12*t;return this.int16[p+0]=e,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=i,this.uint16[p+4]=a,this.uint16[p+5]=o,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=c,this.int16[p+9]=u,this.int16[p+10]=f,this.int16[p+11]=h,t},e}(Pi);Ni.prototype.bytesPerElement=24,Nn(\"StructArrayLayout4i4ui4i24\",Ni);var ji=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.float32[i+0]=e,this.float32[i+1]=r,this.float32[i+2]=n,t},e}(Pi);ji.prototype.bytesPerElement=12,Nn(\"StructArrayLayout3f12\",ji);var Ui=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;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint32[r+0]=e,t},e}(Pi);Ui.prototype.bytesPerElement=4,Nn(\"StructArrayLayout1ul4\",Ui);var Vi=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){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,r,n,i,a,o,s,l)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c){var u=10*t,f=5*t;return this.int16[u+0]=e,this.int16[u+1]=r,this.int16[u+2]=n,this.int16[u+3]=i,this.int16[u+4]=a,this.int16[u+5]=o,this.uint32[f+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,t},e}(Pi);Vi.prototype.bytesPerElement=20,Nn(\"StructArrayLayout6i1ul2ui20\",Vi);var Hi=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;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(Pi);Hi.prototype.bytesPerElement=12,Nn(\"StructArrayLayout2i2i2i12\",Hi);var qi=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),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i)},e.prototype.emplace=function(t,e,r,n,i,a){var o=4*t,s=8*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=n,this.int16[s+6]=i,this.int16[s+7]=a,t},e}(Pi);qi.prototype.bytesPerElement=16,Nn(\"StructArrayLayout2f1f2i16\",qi);var Gi=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;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=12*t,o=3*t;return this.uint8[a+0]=e,this.uint8[a+1]=r,this.float32[o+1]=n,this.float32[o+2]=i,t},e}(Pi);Gi.prototype.bytesPerElement=12,Nn(\"StructArrayLayout2ub2f12\",Gi);var Yi=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,this.uint16[i+2]=n,t},e}(Pi);Yi.prototype.bytesPerElement=6,Nn(\"StructArrayLayout3ui6\",Yi);var Wi=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,d,g,m){var v=this.length;return this.resize(v+1),this.emplace(v,t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v){var y=24*t,x=12*t,b=48*t;return this.int16[y+0]=e,this.int16[y+1]=r,this.uint16[y+2]=n,this.uint16[y+3]=i,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[y+10]=l,this.uint16[y+11]=c,this.uint16[y+12]=u,this.float32[x+7]=f,this.float32[x+8]=h,this.uint8[b+36]=p,this.uint8[b+37]=d,this.uint8[b+38]=g,this.uint32[x+10]=m,this.int16[y+22]=v,t},e}(Pi);Wi.prototype.bytesPerElement=48,Nn(\"StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48\",Wi);var Xi=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,d,g,m,v,y,x,b,_,w,T,k,A,M,S){var E=this.length;return this.resize(E+1),this.emplace(E,t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,w,T,k,A,M,S)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,w,T,k,A,M,S,E){var L=34*t,C=17*t;return this.int16[L+0]=e,this.int16[L+1]=r,this.int16[L+2]=n,this.int16[L+3]=i,this.int16[L+4]=a,this.int16[L+5]=o,this.int16[L+6]=s,this.int16[L+7]=l,this.uint16[L+8]=c,this.uint16[L+9]=u,this.uint16[L+10]=f,this.uint16[L+11]=h,this.uint16[L+12]=p,this.uint16[L+13]=d,this.uint16[L+14]=g,this.uint16[L+15]=m,this.uint16[L+16]=v,this.uint16[L+17]=y,this.uint16[L+18]=x,this.uint16[L+19]=b,this.uint16[L+20]=_,this.uint16[L+21]=w,this.uint16[L+22]=T,this.uint32[C+12]=k,this.float32[C+13]=A,this.float32[C+14]=M,this.float32[C+15]=S,this.float32[C+16]=E,t},e}(Pi);Xi.prototype.bytesPerElement=68,Nn(\"StructArrayLayout8i15ui1ul4f68\",Xi);var Zi=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;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.float32[r+0]=e,t},e}(Pi);Zi.prototype.bytesPerElement=4,Nn(\"StructArrayLayout1f4\",Zi);var Ji=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.int16[i+0]=e,this.int16[i+1]=r,this.int16[i+2]=n,t},e}(Pi);Ji.prototype.bytesPerElement=6,Nn(\"StructArrayLayout3i6\",Ji);var Ki=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=2*t,a=4*t;return this.uint32[i+0]=e,this.uint16[a+2]=r,this.uint16[a+3]=n,t},e}(Pi);Ki.prototype.bytesPerElement=8,Nn(\"StructArrayLayout1ul2ui8\",Ki);var Qi=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;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,t},e}(Pi);Qi.prototype.bytesPerElement=4,Nn(\"StructArrayLayout2ui4\",Qi);var $i=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){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint16[r+0]=e,t},e}(Pi);$i.prototype.bytesPerElement=2,Nn(\"StructArrayLayout1ui2\",$i);var ta=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;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.float32[n+0]=e,this.float32[n+1]=r,t},e}(Pi);ta.prototype.bytesPerElement=8,Nn(\"StructArrayLayout2f8\",ta);var ea=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;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,t},e}(Pi);ea.prototype.bytesPerElement=16,Nn(\"StructArrayLayout4f16\",ea);var ra=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},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Ci);ra.prototype.size=20;var na=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 ra(this,t)},e}(Vi);Nn(\"CollisionBoxArray\",na);var ia=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},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,r),e}(Ci);ia.prototype.size=48;var aa=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 ia(this,t)},e}(Wi);Nn(\"PlacedSymbolArray\",aa);var oa=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},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+12]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},r.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,r),e}(Ci);oa.prototype.size=68;var sa=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 oa(this,t)},e}(Xi);Nn(\"SymbolInstanceArray\",sa);var la=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}(Zi);Nn(\"GlyphOffsetArray\",la);var ca=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}(Ji);Nn(\"SymbolLineVertexArray\",ca);var ua=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.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,r),e}(Ci);ua.prototype.size=8;var fa=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 ua(this,t)},e}(Ki);Nn(\"FeatureIndexArray\",fa);var ha=Ii([{name:\"a_pos\",components:2,type:\"Int16\"}],4).members,pa=function(t){void 0===t&&(t=[]),this.segments=t};function da(t,e){return 256*(t=l(Math.floor(t),0,255))+(e=l(Math.floor(e),0,255))}pa.prototype.prepareSegment=function(t,e,r,n){var i=this.segments[this.segments.length-1];return t>pa.MAX_VERTEX_ARRAY_LENGTH&&_(\"Max vertices per segment is \"+pa.MAX_VERTEX_ARRAY_LENGTH+\": bucket requested \"+t),(!i||i.vertexLength+t>pa.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},pa.prototype.get=function(){return this.segments},pa.prototype.destroy=function(){for(var t=0,e=this.segments;t>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(a>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&t.charCodeAt(c+2))<<16;case 2:l^=(255&t.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(c)))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}})),va=e((function(t){t.exports=function(t,e){for(var r,n=t.length,i=e^n,a=0;n>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(a)|(255&t.charCodeAt(++a))<<8|(255&t.charCodeAt(++a))<<16|(255&t.charCodeAt(++a))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++a;switch(n){case 3:i^=(255&t.charCodeAt(a+2))<<16;case 2:i^=(255&t.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(a)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}})),ya=ma,xa=ma,ba=va;ya.murmur3=xa,ya.murmur2=ba;var _a=function(){this.ids=[],this.positions=[],this.indexed=!1};_a.prototype.add=function(t,e,r,n){this.ids.push(Ta(t)),this.positions.push(e,r,n)},_a.prototype.getPositions=function(t){for(var e=Ta(t),r=0,n=this.ids.length-1;r>1;this.ids[i]>=e?n=i:r=i+1}for(var a=[];this.ids[r]===e;){var o=this.positions[3*r],s=this.positions[3*r+1],l=this.positions[3*r+2];a.push({index:o,start:s,end:l}),r++}return a},_a.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return function t(e,r,n,i){for(;n>1],o=n-1,s=i+1;;){do{o++}while(e[o]a);if(o>=s)break;ka(e,o,s),ka(r,3*o,3*s),ka(r,3*o+1,3*s+1),ka(r,3*o+2,3*s+2)}s-nGa.max||o.yGa.max)&&(_(\"Geometry exceeds allowed extent, reduce your vector tile buffer size\"),o.x=l(o.x,Ga.min,Ga.max),o.y=l(o.y,Ga.min,Ga.max))}return r}function Wa(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var Xa=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.hasPattern=!1,this.layoutVertexArray=new zi,this.indexArray=new Yi,this.segments=new pa,this.programConfigurations=new Ua(ha,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function Za(t,e){for(var r=0;r1){if($a(t,e))return!0;for(var n=0;n1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function no(t,e){for(var r,n,i,a=!1,o=0;oe.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 io(t,e){for(var r=!1,n=0,i=t.length-1;ne.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 ao(t,e,r){var n=r[0],i=r[2];if(t.xi.x&&e.x>i.x||t.yi.y&&e.y>i.y)return!1;var a=w(t,e,r[0]);return a!==w(t,e,r[1])||a!==w(t,e,r[2])||a!==w(t,e,r[3])}function oo(t,e,r){var n=e.paint.get(t).value;return\"constant\"===n.kind?n.value:r.programConfigurations.get(e.id).getMaxValue(t)}function so(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function lo(t,e,r,n,a){if(!e[0]&&!e[1])return t;var o=i.convert(e)._mult(a);\"viewport\"===r&&o._rotate(-n);for(var s=[],l=0;l=8192||u<0||u>=8192)){var f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),h=f.vertexLength;Wa(this.layoutVertexArray,c,u,-1,-1),Wa(this.layoutVertexArray,c,u,1,-1),Wa(this.layoutVertexArray,c,u,1,1),Wa(this.layoutVertexArray,c,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),f.vertexLength+=4,f.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{},n)},Nn(\"CircleBucket\",Xa,{omit:[\"layers\"]});var co=new Si({\"circle-sort-key\":new Ti(Lt.layout_circle[\"circle-sort-key\"])}),uo={paint:new Si({\"circle-radius\":new Ti(Lt.paint_circle[\"circle-radius\"]),\"circle-color\":new Ti(Lt.paint_circle[\"circle-color\"]),\"circle-blur\":new Ti(Lt.paint_circle[\"circle-blur\"]),\"circle-opacity\":new Ti(Lt.paint_circle[\"circle-opacity\"]),\"circle-translate\":new wi(Lt.paint_circle[\"circle-translate\"]),\"circle-translate-anchor\":new wi(Lt.paint_circle[\"circle-translate-anchor\"]),\"circle-pitch-scale\":new wi(Lt.paint_circle[\"circle-pitch-scale\"]),\"circle-pitch-alignment\":new wi(Lt.paint_circle[\"circle-pitch-alignment\"]),\"circle-stroke-width\":new Ti(Lt.paint_circle[\"circle-stroke-width\"]),\"circle-stroke-color\":new Ti(Lt.paint_circle[\"circle-stroke-color\"]),\"circle-stroke-opacity\":new Ti(Lt.paint_circle[\"circle-stroke-opacity\"])}),layout:co},fo=\"undefined\"!=typeof Float32Array?Float32Array:Array;function ho(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}function po(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],m=e[13],v=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*m,t[2]=x*a+b*c+_*p+w*v,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*m,t[6]=x*a+b*c+_*p+w*v,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*m,t[10]=x*a+b*c+_*p+w*v,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*m,t[14]=x*a+b*c+_*p+w*v,t[15]=x*o+b*u+_*d+w*y,t}Math.hypot||(Math.hypot=function(){for(var t=arguments,e=0,r=arguments.length;r--;)e+=t[r]*t[r];return Math.sqrt(e)});var go=po;var mo,vo,yo=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t};mo=new fo(3),fo!=Float32Array&&(mo[0]=0,mo[1]=0,mo[2]=0),vo=mo;function xo(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}!function(){var t=function(){var t=new fo(4);return fo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}()}();var bo=function(t){var e=t[0],r=t[1];return e*e+r*r},_o=(function(){var t=function(){var t=new fo(2);return fo!=Float32Array&&(t[0]=0,t[1]=0),t}()}(),function(t){function e(e){t.call(this,e,uo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Xa(t)},e.prototype.queryRadius=function(t){var e=t;return oo(\"circle-radius\",this,e)+oo(\"circle-stroke-width\",this,e)+so(this.paint.get(\"circle-translate\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o,s){for(var l=lo(t,this.paint.get(\"circle-translate\"),this.paint.get(\"circle-translate-anchor\"),a.angle,o),c=this.paint.get(\"circle-radius\").evaluate(e,r)+this.paint.get(\"circle-stroke-width\").evaluate(e,r),u=\"map\"===this.paint.get(\"circle-pitch-alignment\"),f=u?l:function(t,e){return t.map((function(t){return wo(t,e)}))}(l,s),h=u?c*o:c,p=0,d=n;pt.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;l80*r){n=a=t[0],i=o=t[1];for(var d=r;da&&(a=s),l>o&&(o=l);c=0!==(c=Math.max(a-n,o-i))?1/c:0}return jo(h,p,r,n,i,c),p}function Bo(t,e,r,n,i){var a,o;if(i===ls(t,e,r,n)>0)for(a=e;a=e;a-=n)o=as(a,t[a],t[a+1],o);return o&&$o(o,o.next)&&(os(o),o=o.next),o}function No(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!$o(n,n.next)&&0!==Qo(n.prev,n,n.next))n=n.next;else{if(os(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function jo(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=Xo(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;e0||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?Vo(t,n,i,a):Uo(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),os(t),t=l.next,c=l.next;else if((t=l)===c){o?1===o?jo(t=Ho(No(t),e,r),e,r,n,i,a,2):2===o&&qo(t,e,r,n,i,a):jo(No(t),e,r,n,i,a,1);break}}}function Uo(t){var e=t.prev,r=t,n=t.next;if(Qo(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Jo(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&Qo(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Vo(t,e,r,n){var i=t.prev,a=t,o=t.next;if(Qo(i,a,o)>=0)return!1;for(var s=i.xa.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=Xo(s,l,e,r,n),h=Xo(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&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=h;){if(d!==t.prev&&d!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Ho(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!$o(i,a)&&ts(i,n,n.next,a)&&ns(i,a)&&ns(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),os(n),os(n.next),n=t=a),n=n.next}while(n!==t);return No(n)}function qo(t,e,r,n,i,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&Ko(o,s)){var l=is(o,s);return o=No(o,o.next),l=No(l,l.next),jo(o,e,r,n,i,a),void jo(l,e,r,n,i,a)}s=s.next}o=o.next}while(o!==t)}function Go(t,e){return t.x-e.x}function Yo(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.x&&n.x>=u&&i!==n.x&&Jo(ar.x||n.x===r.x&&Wo(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(t,e)){var r=is(e,t);No(e,e.next),No(r,r.next)}}function Wo(t,e){return Qo(t.prev,t,e.prev)<0&&Qo(e.next,t,t.next)<0}function Xo(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 Zo(t){var e=t,r=t;do{(e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function Ko(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&&ts(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(ns(t,e)&&ns(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)&&(Qo(t.prev,t,e.prev)||Qo(t,e.prev,e))||$o(t,e)&&Qo(t.prev,t,t.next)>0&&Qo(e.prev,e,e.next)>0)}function Qo(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function $o(t,e){return t.x===e.x&&t.y===e.y}function ts(t,e,r,n){var i=rs(Qo(t,e,r)),a=rs(Qo(t,e,n)),o=rs(Qo(r,n,t)),s=rs(Qo(r,n,e));return i!==a&&o!==s||(!(0!==i||!es(t,r,e))||(!(0!==a||!es(t,n,e))||(!(0!==o||!es(r,t,n))||!(0!==s||!es(r,e,n)))))}function es(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function rs(t){return t>0?1:t<0?-1:0}function ns(t,e){return Qo(t.prev,t,t.next)<0?Qo(t,e,t.next)>=0&&Qo(t,t.prev,e)>=0:Qo(t,e,t.prev)<0||Qo(t,t.next,e)<0}function is(t,e){var r=new ss(t.i,t.x,t.y),n=new ss(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 as(t,e,r,n){var i=new ss(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 os(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 ss(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 ls(t,e,r,n){for(var i=0,a=e,o=r-n;an;){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),f=Math.max(n,Math.floor(r-s*c/o+u)),h=Math.min(i,Math.floor(r+(o-s)*c/o+u));t(e,r,f,h,a)}var p=e[r],d=n,g=i;for(us(e,n,r),a(e[i],p)>0&&us(e,n,i);d0;)g--}0===a(e[n],p)?us(e,n,g):(g++,us(e,g,i)),g<=r&&(n=g+1),r<=g&&(i=g-1)}}(t,e,r||0,n||t.length-1,i||fs)}function us(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function fs(t,e){return te?1:0}function hs(t,e){var r=t.length;if(r<=1)return[t];for(var n,i,a=[],o=0;o1)for(var l=0;l0&&(n+=t[i-1].length,r.holes.push(n))}return r},Do.default=Ro;var ms=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.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new zi,this.indexArray=new Yi,this.indexArray2=new Qi,this.programConfigurations=new Ua(zo,t.layers,t.zoom),this.segments=new pa,this.segments2=new pa,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};ms.prototype.populate=function(t,e,r){this.hasPattern=ds(\"fill\",this.layers,e);for(var n=this.layers[0].layout.get(\"fill-sort-key\"),i=[],a=0,o=t;a>3}if(a--,1===n||2===n)o+=t.readSVarint(),s+=t.readSVarint(),1===n&&(e&&l.push(e),e=[]),e.push(new i(o,s));else{if(7!==n)throw new Error(\"unknown command \"+n);e&&e.push(e[0].clone())}}return e&&l.push(e),l},ws.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>3}if(n--,1===r||2===r)(i+=t.readSVarint())s&&(s=i),(a+=t.readSVarint())c&&(c=a);else if(7!==r)throw new Error(\"unknown command \"+r)}return[o,l,s,c]},ws.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=ws.types[this.type];function u(t){for(var e=0;e>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 Es(t,e,r){if(3===t){var n=new As(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}Ms.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 _s(this._pbf,e,this.extent,this._keys,this._values)};var Ls={VectorTile:function(t,e){this.layers=t.readFields(Es,{},e)},VectorTileFeature:_s,VectorTileLayer:As},Cs=Ls.VectorTileFeature.types,Ps=Math.pow(2,13);function Is(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,2*Math.floor(n*Ps)+o,i*Ps*2,a*Ps*2,Math.round(s))}var Os=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.hasPattern=!1,this.layoutVertexArray=new Ri,this.indexArray=new Yi,this.programConfigurations=new Ua(bs,t.layers,t.zoom),this.segments=new pa,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function zs(t,e){return t.x===e.x&&(t.x<0||t.x>8192)||t.y===e.y&&(t.y<0||t.y>8192)}function Ds(t){return t.every((function(t){return t.x<0}))||t.every((function(t){return t.x>8192}))||t.every((function(t){return t.y<0}))||t.every((function(t){return t.y>8192}))}Os.prototype.populate=function(t,e,r){this.features=[],this.hasPattern=ds(\"fill-extrusion\",this.layers,e);for(var n=0,i=t;n=1){var y=d[m-1];if(!zs(v,y)){f.vertexLength+4>pa.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var x=v.sub(y)._perp()._unit(),b=y.dist(v);g+b>32768&&(g=0),Is(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,0,g),Is(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,1,g),g+=b,Is(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,0,g),Is(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,1,g);var _=f.vertexLength;this.indexArray.emplaceBack(_,_+2,_+1),this.indexArray.emplaceBack(_+1,_+2,_+3),f.vertexLength+=4,f.primitiveLength+=2}}}}if(f.vertexLength+l>pa.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),\"Polygon\"===Cs[t.type]){for(var w=[],T=[],k=f.vertexLength,A=0,M=s;A=2&&t[l-1].equals(t[l-2]);)l--;for(var c=0;c0;if(T&&v>c){var A=u.dist(p);if(A>2*f){var M=u.sub(u.sub(p)._mult(f/A)._round());this.updateDistance(p,M),this.addCurrentVertex(M,g,0,0,h),p=M}}var S=p&&d,E=S?r:s?\"butt\":n;if(S&&\"round\"===E&&(_i&&(E=\"bevel\"),\"bevel\"===E&&(_>2&&(E=\"flipbevel\"),_100)y=m.mult(-1);else{var L=_*g.add(m).mag()/g.sub(m).mag();y._perp()._mult(L*(k?-1:1))}this.addCurrentVertex(u,y,0,0,h),this.addCurrentVertex(u,y.mult(-1),0,0,h)}else if(\"bevel\"===E||\"fakeround\"===E){var C=-Math.sqrt(_*_-1),P=k?C:0,I=k?0:C;if(p&&this.addCurrentVertex(u,g,P,I,h),\"fakeround\"===E)for(var O=Math.round(180*w/Math.PI/20),z=1;z2*f){var j=u.add(d.sub(u)._mult(f/N)._round());this.updateDistance(u,j),this.addCurrentVertex(j,m,0,0,h),u=j}}}}},qs.prototype.addCurrentVertex=function(t,e,r,n,i,a){void 0===a&&(a=!1);var o=e.x+e.y*r,s=e.y-e.x*r,l=-e.x+e.y*n,c=-e.y-e.x*n;this.addHalfVertex(t,o,s,a,!1,r,i),this.addHalfVertex(t,l,c,a,!0,-n,i),this.distance>Hs/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,n,i,a))},qs.prototype.addHalfVertex=function(t,e,r,n,i,a,o){var s=t.x,l=t.y,c=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(i?1:0),Math.round(63*e)+128,Math.round(63*r)+128,1+(0===a?0:a<0?-1:1)|(63&c)<<2,c>>6);var u=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,u),o.primitiveLength++),i?this.e2=u:this.e1=u},qs.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(Hs-1):this.distance},qs.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},Nn(\"LineBucket\",qs,{omit:[\"layers\",\"patternFeatures\"]});var Gs=new Si({\"line-cap\":new wi(Lt.layout_line[\"line-cap\"]),\"line-join\":new Ti(Lt.layout_line[\"line-join\"]),\"line-miter-limit\":new wi(Lt.layout_line[\"line-miter-limit\"]),\"line-round-limit\":new wi(Lt.layout_line[\"line-round-limit\"]),\"line-sort-key\":new Ti(Lt.layout_line[\"line-sort-key\"])}),Ys={paint:new Si({\"line-opacity\":new Ti(Lt.paint_line[\"line-opacity\"]),\"line-color\":new Ti(Lt.paint_line[\"line-color\"]),\"line-translate\":new wi(Lt.paint_line[\"line-translate\"]),\"line-translate-anchor\":new wi(Lt.paint_line[\"line-translate-anchor\"]),\"line-width\":new Ti(Lt.paint_line[\"line-width\"]),\"line-gap-width\":new Ti(Lt.paint_line[\"line-gap-width\"]),\"line-offset\":new Ti(Lt.paint_line[\"line-offset\"]),\"line-blur\":new Ti(Lt.paint_line[\"line-blur\"]),\"line-dasharray\":new Ai(Lt.paint_line[\"line-dasharray\"]),\"line-pattern\":new ki(Lt.paint_line[\"line-pattern\"]),\"line-gradient\":new Mi(Lt.paint_line[\"line-gradient\"])}),layout:Gs},Ws=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 pi(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,i){return r=u({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,i)},e}(Ti))(Ys.paint.properties[\"line-width\"].specification);Ws.useIntegerZoom=!0;var Xs=function(t){function e(e){t.call(this,e,Ys)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){\"line-gradient\"===t&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values[\"line-gradient\"].value.expression;this.gradient=Co(t,\"lineProgress\"),this.gradientTexture=null},e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r),this.paint._values[\"line-floorwidth\"]=Ws.possiblyEvaluate(this._transitioningPaint._values[\"line-width\"].value,e)},e.prototype.createBucket=function(t){return new qs(t)},e.prototype.queryRadius=function(t){var e=t,r=Zs(oo(\"line-width\",this,e),oo(\"line-gap-width\",this,e)),n=oo(\"line-offset\",this,e);return r/2+Math.abs(n)+so(this.paint.get(\"line-translate\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,a,o,s){var l=lo(t,this.paint.get(\"line-translate\"),this.paint.get(\"line-translate-anchor\"),o.angle,s),c=s/2*Zs(this.paint.get(\"line-width\").evaluate(e,r),this.paint.get(\"line-gap-width\").evaluate(e,r)),u=this.paint.get(\"line-offset\").evaluate(e,r);return u&&(n=function(t,e){for(var r=[],n=new i(0,0),a=0;a=3)for(var a=0;a0?e+2*t:t}var Js=Ii([{name:\"a_pos_offset\",components:4,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint16\"},{name:\"a_pixeloffset\",components:4,type:\"Int16\"}],4),Ks=Ii([{name:\"a_projected_pos\",components:3,type:\"Float32\"}],4),Qs=(Ii([{name:\"a_fade_opacity\",components:1,type:\"Uint32\"}],4),Ii([{name:\"a_placed\",components:2,type:\"Uint8\"},{name:\"a_shift\",components:2,type:\"Float32\"}])),$s=(Ii([{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\"}]),Ii([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_anchor_pos\",components:2,type:\"Int16\"},{name:\"a_extrude\",components:2,type:\"Int16\"}],4)),tl=Ii([{name:\"a_pos\",components:2,type:\"Float32\"},{name:\"a_radius\",components:1,type:\"Float32\"},{name:\"a_flags\",components:2,type:\"Int16\"}],4);Ii([{name:\"triangle\",components:3,type:\"Uint16\"}]),Ii([{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:\"placedOrientation\"},{type:\"Uint8\",name:\"hidden\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Int16\",name:\"associatedIconIndex\"}]),Ii([{type:\"Int16\",name:\"anchorX\"},{type:\"Int16\",name:\"anchorY\"},{type:\"Int16\",name:\"rightJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"centerJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"leftJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedTextSymbolIndex\"},{type:\"Int16\",name:\"placedIconSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedIconSymbolIndex\"},{type:\"Uint16\",name:\"key\"},{type:\"Uint16\",name:\"textBoxStartIndex\"},{type:\"Uint16\",name:\"textBoxEndIndex\"},{type:\"Uint16\",name:\"verticalTextBoxStartIndex\"},{type:\"Uint16\",name:\"verticalTextBoxEndIndex\"},{type:\"Uint16\",name:\"iconBoxStartIndex\"},{type:\"Uint16\",name:\"iconBoxEndIndex\"},{type:\"Uint16\",name:\"verticalIconBoxStartIndex\"},{type:\"Uint16\",name:\"verticalIconBoxEndIndex\"},{type:\"Uint16\",name:\"featureIndex\"},{type:\"Uint16\",name:\"numHorizontalGlyphVertices\"},{type:\"Uint16\",name:\"numVerticalGlyphVertices\"},{type:\"Uint16\",name:\"numIconVertices\"},{type:\"Uint16\",name:\"numVerticalIconVertices\"},{type:\"Uint16\",name:\"useRuntimeCollisionCircles\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Float32\",name:\"textBoxScale\"},{type:\"Float32\",components:2,name:\"textOffset\"},{type:\"Float32\",name:\"collisionCircleDiameter\"}]),Ii([{type:\"Float32\",name:\"offsetX\"}]),Ii([{type:\"Int16\",name:\"x\"},{type:\"Int16\",name:\"y\"},{type:\"Int16\",name:\"tileUnitDistanceFromAnchor\"}]);function el(t,e,r){return t.sections.forEach((function(t){t.text=function(t,e,r){var n=e.layout.get(\"text-transform\").evaluate(r,{});return\"uppercase\"===n?t=t.toLocaleUpperCase():\"lowercase\"===n&&(t=t.toLocaleLowerCase()),hi.applyArabicShaping&&(t=hi.applyArabicShaping(t)),t}(t.text,e,r)})),t}var rl={\"!\":\"\\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\"};var nl=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<>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)},il=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>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<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g},al=ol;function ol(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}ol.Varint=0,ol.Fixed64=1,ol.Bytes=2,ol.Fixed32=5;var sl=\"undefined\"==typeof TextDecoder?null:new TextDecoder(\"utf8\");function ll(t){return t.type===ol.Bytes?t.readVarint()+t.pos:t.pos+1}function cl(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function ul(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(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 fl(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function wl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}ol.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos>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=bl(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=wl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=bl(this.buf,this.pos)+4294967296*bl(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=bl(this.buf,this.pos)+4294967296*wl(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=nl(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=nl(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(i=a[r.pos++],n=(112&i)>>4,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<3,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<10,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<17,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<24,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(1&i)<<31,i<128)return cl(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=this.pos;return this.pos=t,t-e>=12&&sl?function(t,e,r){return sl.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){var n=\"\",i=e;for(;i239?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,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==ol.Bytes)return t.push(this.readVarint(e));var r=ll(this);for(t=t||[];this.pos127;);else if(e===ol.Bytes)this.pos=this.readVarint()+this.pos;else if(e===ol.Fixed32)this.pos+=4;else{if(e!==ol.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;e268435455||t<0?function(t,e){var r,n;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));if(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;if(e.buf[e.pos++]|=r|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;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;a55295&&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&&ul(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),il(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),il(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=128&&ul(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,ol.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,fl,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,hl,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,gl,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,pl,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,dl,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,ml,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,vl,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,yl,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,xl,e)},writeBytesField:function(t,e){this.writeTag(t,ol.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,ol.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,ol.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,ol.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,ol.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,ol.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,ol.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,ol.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,ol.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,ol.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};function Tl(t,e,r){1===t&&r.readMessage(kl,e)}function kl(t,e,r){if(3===t){var n=r.readMessage(Al,{}),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 So({width:o+6,height:s+6},a),metrics:{width:o,height:s,left:l,top:c,advance:u}})}}function Al(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())}function Ml(t){for(var e=0,r=0,n=0,i=t;n=0;h--){var p=o[h];if(!(f.w>p.w||f.h>p.h)){if(f.x=p.x,f.y=p.y,l=Math.max(l,f.y+f.h),s=Math.max(s,f.x+f.w),f.w===p.w&&f.h===p.h){var d=o.pop();h0&&N>A&&(A=N)}else{var j=r[S.fontStack],U=j&&j[L];if(U&&U.rect)I=U.rect,P=U.metrics;else{var V=e[S.fontStack],H=V&&V[L];if(!H)continue;P=H.metrics}C=24*(_-S.scale)}D?(t.verticalizable=!0,k.push({glyph:L,imageName:O,x:h,y:p+C,vertical:D,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:I}),h+=z*S.scale+c):(k.push({glyph:L,imageName:O,x:h,y:p+C,vertical:D,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:I}),h+=P.advance*S.scale+c)}if(0!==k.length){var q=h-c;d=Math.max(q,d),Vl(k,0,k.length-1,m,A)}h=0;var G=a*_+A;T.lineOffset=Math.max(A,w),p+=G,g=Math.max(G,g),++v}else p+=a,++v}var Y;var W=p- -17,X=Ul(o),Z=X.horizontalAlign,J=X.verticalAlign;(function(t,e,r,n,i,a,o,s,l){var c=(e-r)*i,u=0;u=a!==o?-s*n- -17:(-n*l+.5)*o;for(var f=0,h=t;f=0&&n>=t&&zl[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},Il.prototype.substring=function(t,e){var r=new Il;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},Il.prototype.toString=function(){return this.text},Il.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce((function(e,r){return Math.max(e,t.sections[r].scale)}),0)},Il.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(Pl.forText(t.scale,t.fontStack||e));for(var r=this.sections.length-1,n=0;n=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var zl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Dl={};function Rl(t,e,r,n,i,a){if(e.imageName){var o=n[e.imageName];return o?o.displaySize[0]*e.scale*24/a+i:0}var s=r[e.fontStack],l=s&&s[t];return l?l.metrics.advance*e.scale+i:0}function Fl(t,e,r,n){var i=Math.pow(t-e,2);return n?t=0,f=0,h=0;h-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;sn;)c-=l.shift().angleDelta;if(c>i)return!1;o++,s+=f.dist(h)}return!0}function Jl(t){for(var e=0,r=0;rc){var d=(c-l)/p,g=qe(f.x,h.x,d),m=qe(f.y,h.y,d),v=new ql(g,m,h.angleTo(f),u);return v._round(),!o||Zl(t,v,s,o,e)?v:void 0}l+=p}}function tc(t,e,r,n,i,a,o,s,l){var c=Kl(n,a,o),u=Ql(n,i),f=u*o,h=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-f=0&&_=0&&w=0&&p+u<=f){var T=new ql(_,w,x,g);T._round(),i&&!Zl(e,T,o,i,a)||d.push(T)}}h+=y}l||d.length||s||(d=t(e,h/2,n,i,a,o,s,!0,c));return d}(t,h?e/2*s%e:(u/2+2*a)*o*s%e,e,c,r,f,h,!1,l)}function ec(t,e,r,n,a){for(var o=[],s=0;s=n&&h.x>=n||(f.x>=n?f=new i(n,f.y+(h.y-f.y)*((n-f.x)/(h.x-f.x)))._round():h.x>=n&&(h=new i(n,f.y+(h.y-f.y)*((n-f.x)/(h.x-f.x)))._round()),f.y>=a&&h.y>=a||(f.y>=a?f=new i(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round():h.y>=a&&(h=new i(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}function rc(t,e,r,n){var a=[],o=t.image,s=o.pixelRatio,l=o.paddedRect.w-2,c=o.paddedRect.h-2,u=t.right-t.left,f=t.bottom-t.top,h=o.stretchX||[[0,l]],p=o.stretchY||[[0,c]],d=function(t,e){return t+e[1]-e[0]},g=h.reduce(d,0),m=p.reduce(d,0),v=l-g,y=c-m,x=0,b=g,_=0,w=m,T=0,k=v,A=0,M=y;if(o.content&&n){var S=o.content;x=nc(h,0,S[0]),_=nc(p,0,S[1]),b=nc(h,S[0],S[2]),w=nc(p,S[1],S[3]),T=S[0]-x,A=S[1]-_,k=S[2]-S[0]-b,M=S[3]-S[1]-w}var E=function(n,a,l,c){var h=ac(n.stretch-x,b,u,t.left),p=oc(n.fixed-T,k,n.stretch,g),d=ac(a.stretch-_,w,f,t.top),v=oc(a.fixed-A,M,a.stretch,m),y=ac(l.stretch-x,b,u,t.left),S=oc(l.fixed-T,k,l.stretch,g),E=ac(c.stretch-_,w,f,t.top),L=oc(c.fixed-A,M,c.stretch,m),C=new i(h,d),P=new i(y,d),I=new i(y,E),O=new i(h,E),z=new i(p/s,v/s),D=new i(S/s,L/s),R=e*Math.PI/180;if(R){var F=Math.sin(R),B=Math.cos(R),N=[B,-F,F,B];C._matMult(N),P._matMult(N),O._matMult(N),I._matMult(N)}var j=n.stretch+n.fixed,U=l.stretch+l.fixed,V=a.stretch+a.fixed,H=c.stretch+c.fixed;return{tl:C,tr:P,bl:O,br:I,tex:{x:o.paddedRect.x+1+j,y:o.paddedRect.y+1+V,w:U-j,h:H-V},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:z,pixelOffsetBR:D,minFontScaleX:k/s/u,minFontScaleY:M/s/f,isSDF:r}};if(n&&(o.stretchX||o.stretchY))for(var L=ic(h,v,g),C=ic(p,y,m),P=0;P0&&(d=Math.max(10,d),this.circleDiameter=d)}else{var g=o.top*s-l,m=o.bottom*s+l,v=o.left*s-l,y=o.right*s+l,x=o.collisionPadding;if(x&&(v-=x[0]*s,g-=x[1]*s,y+=x[2]*s,m+=x[3]*s),u){var b=new i(v,g),_=new i(y,g),w=new i(v,m),T=new i(y,m),k=u*Math.PI/180;b._rotate(k),_._rotate(k),w._rotate(k),T._rotate(k),v=Math.min(b.x,_.x,w.x,T.x),y=Math.max(b.x,_.x,w.x,T.x),g=Math.min(b.y,_.y,w.y,T.y),m=Math.max(b.y,_.y,w.y,T.y)}t.emplaceBack(e.x,e.y,v,g,y,m,r,n,a)}this.boxEndIndex=t.length},lc=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=cc),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function cc(t,e){return te?1:0}function uc(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var n=1/0,a=1/0,o=-1/0,s=-1/0,l=t[0],c=0;co)&&(o=u.x),(!c||u.y>s)&&(s=u.y)}var f=o-n,h=s-a,p=Math.min(f,h),d=p/2,g=new lc([],fc);if(0===p)return new i(n,a);for(var m=n;my.d||!y.d)&&(y=b,r&&console.log(\"found best %d after %d probes\",Math.round(1e4*b.d)/1e4,x)),b.max-y.d<=e||(d=b.h/2,g.push(new hc(b.p.x-d,b.p.y-d,d,t)),g.push(new hc(b.p.x+d,b.p.y-d,d,t)),g.push(new hc(b.p.x-d,b.p.y+d,d,t)),g.push(new hc(b.p.x+d,b.p.y+d,d,t)),x+=4)}return r&&(console.log(\"num probes: \"+x),console.log(\"best distance: \"+y.d)),y.p}function fc(t,e){return e.max-t.max}function hc(t,e,r,n){this.p=new i(t,e),this.h=r,this.d=function(t,e){for(var r=!1,n=1/0,i=0;it.y!=u.y>t.y&&t.x<(u.x-c.x)*(t.y-c.y)/(u.y-c.y)+c.x&&(r=!r),n=Math.min(n,ro(t,c,u))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}lc.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},lc.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}},lc.prototype.peek=function(){return this.data[0]},lc.prototype._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},lc.prototype._down=function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];t=0)break;e[t]=o,t=a}e[t]=i};var pc=Number.POSITIVE_INFINITY;function dc(t,e){return e[1]!==pc?function(t,e,r){var n=0,i=0;switch(e=Math.abs(e),r=Math.abs(r),t){case\"top-right\":case\"top-left\":case\"top\":i=r-7;break;case\"bottom-right\":case\"bottom-left\":case\"bottom\":i=7-r}switch(t){case\"top-right\":case\"bottom-right\":case\"right\":n=-e;break;case\"top-left\":case\"bottom-left\":case\"left\":n=e}return[n,i]}(t,e[0],e[1]):function(t,e){var r=0,n=0;e<0&&(e=0);var i=e/Math.sqrt(2);switch(t){case\"top-right\":case\"top-left\":n=i-7;break;case\"bottom-right\":case\"bottom-left\":n=7-i;break;case\"bottom\":n=7-e;break;case\"top\":n=e-7}switch(t){case\"top-right\":case\"bottom-right\":r=-i;break;case\"top-left\":case\"bottom-left\":r=i;break;case\"left\":r=e;break;case\"right\":r=-e}return[r,n]}(t,e[0])}function gc(t){switch(t){case\"right\":case\"top-right\":case\"bottom-right\":return\"right\";case\"left\":case\"top-left\":case\"bottom-left\":return\"left\"}return\"center\"}function mc(t,e,r,n,a,o,s,l,c,u,f,h,p,d,g){var m=function(t,e,r,n,a,o,s,l){for(var c=n.layout.get(\"text-rotate\").evaluate(o,{})*Math.PI/180,u=[],f=0,h=e.positionedLines;f32640&&_(t.layerIds[0]+': Value for \"text-size\" is >= 255. Reduce your \"text-size\".'):\"composite\"===v.kind&&((y=[128*d.compositeTextSizes[0].evaluate(s,{},g),128*d.compositeTextSizes[1].evaluate(s,{},g)])[0]>32640||y[1]>32640)&&_(t.layerIds[0]+': Value for \"text-size\" is >= 255. Reduce your \"text-size\".'),t.addSymbols(t.text,m,y,l,o,s,u,e,c.lineStartIndex,c.lineLength,p,g);for(var x=0,b=f;x=0;o--)if(n.dist(a[o])0)&&(\"constant\"!==a.value.kind||a.value.value.length>0),c=\"constant\"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,u=i.get(\"symbol-sort-key\");if(this.features=[],l||c){for(var f=e.iconDependencies,h=e.glyphDependencies,p=e.availableImages,d=new pi(this.zoom),g=0,m=t;g=0;for(var O=0,z=k.sections;O=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;l0},Mc.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Mc.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Mc.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Mc.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Mc.prototype.addIndicesForPlacedSymbol=function(t,e){for(var r=t.placedSymbolArray.get(e),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r=0&&n.indexOf(t)===r&&e.addIndicesForPlacedSymbol(e.text,t)})),a.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,a.verticalPlacedTextSymbolIndex),a.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.placedIconSymbolIndex),a.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Nn(\"SymbolBucket\",Mc,{omit:[\"layers\",\"collisionBoxArray\",\"features\",\"compareText\"]}),Mc.MAX_GLYPHS=65535,Mc.addDynamicAttributes=wc;var Sc=new Si({\"symbol-placement\":new wi(Lt.layout_symbol[\"symbol-placement\"]),\"symbol-spacing\":new wi(Lt.layout_symbol[\"symbol-spacing\"]),\"symbol-avoid-edges\":new wi(Lt.layout_symbol[\"symbol-avoid-edges\"]),\"symbol-sort-key\":new Ti(Lt.layout_symbol[\"symbol-sort-key\"]),\"symbol-z-order\":new wi(Lt.layout_symbol[\"symbol-z-order\"]),\"icon-allow-overlap\":new wi(Lt.layout_symbol[\"icon-allow-overlap\"]),\"icon-ignore-placement\":new wi(Lt.layout_symbol[\"icon-ignore-placement\"]),\"icon-optional\":new wi(Lt.layout_symbol[\"icon-optional\"]),\"icon-rotation-alignment\":new wi(Lt.layout_symbol[\"icon-rotation-alignment\"]),\"icon-size\":new Ti(Lt.layout_symbol[\"icon-size\"]),\"icon-text-fit\":new wi(Lt.layout_symbol[\"icon-text-fit\"]),\"icon-text-fit-padding\":new wi(Lt.layout_symbol[\"icon-text-fit-padding\"]),\"icon-image\":new Ti(Lt.layout_symbol[\"icon-image\"]),\"icon-rotate\":new Ti(Lt.layout_symbol[\"icon-rotate\"]),\"icon-padding\":new wi(Lt.layout_symbol[\"icon-padding\"]),\"icon-keep-upright\":new wi(Lt.layout_symbol[\"icon-keep-upright\"]),\"icon-offset\":new Ti(Lt.layout_symbol[\"icon-offset\"]),\"icon-anchor\":new Ti(Lt.layout_symbol[\"icon-anchor\"]),\"icon-pitch-alignment\":new wi(Lt.layout_symbol[\"icon-pitch-alignment\"]),\"text-pitch-alignment\":new wi(Lt.layout_symbol[\"text-pitch-alignment\"]),\"text-rotation-alignment\":new wi(Lt.layout_symbol[\"text-rotation-alignment\"]),\"text-field\":new Ti(Lt.layout_symbol[\"text-field\"]),\"text-font\":new Ti(Lt.layout_symbol[\"text-font\"]),\"text-size\":new Ti(Lt.layout_symbol[\"text-size\"]),\"text-max-width\":new Ti(Lt.layout_symbol[\"text-max-width\"]),\"text-line-height\":new wi(Lt.layout_symbol[\"text-line-height\"]),\"text-letter-spacing\":new Ti(Lt.layout_symbol[\"text-letter-spacing\"]),\"text-justify\":new Ti(Lt.layout_symbol[\"text-justify\"]),\"text-radial-offset\":new Ti(Lt.layout_symbol[\"text-radial-offset\"]),\"text-variable-anchor\":new wi(Lt.layout_symbol[\"text-variable-anchor\"]),\"text-anchor\":new Ti(Lt.layout_symbol[\"text-anchor\"]),\"text-max-angle\":new wi(Lt.layout_symbol[\"text-max-angle\"]),\"text-writing-mode\":new wi(Lt.layout_symbol[\"text-writing-mode\"]),\"text-rotate\":new Ti(Lt.layout_symbol[\"text-rotate\"]),\"text-padding\":new wi(Lt.layout_symbol[\"text-padding\"]),\"text-keep-upright\":new wi(Lt.layout_symbol[\"text-keep-upright\"]),\"text-transform\":new Ti(Lt.layout_symbol[\"text-transform\"]),\"text-offset\":new Ti(Lt.layout_symbol[\"text-offset\"]),\"text-allow-overlap\":new wi(Lt.layout_symbol[\"text-allow-overlap\"]),\"text-ignore-placement\":new wi(Lt.layout_symbol[\"text-ignore-placement\"]),\"text-optional\":new wi(Lt.layout_symbol[\"text-optional\"])}),Ec={paint:new Si({\"icon-opacity\":new Ti(Lt.paint_symbol[\"icon-opacity\"]),\"icon-color\":new Ti(Lt.paint_symbol[\"icon-color\"]),\"icon-halo-color\":new Ti(Lt.paint_symbol[\"icon-halo-color\"]),\"icon-halo-width\":new Ti(Lt.paint_symbol[\"icon-halo-width\"]),\"icon-halo-blur\":new Ti(Lt.paint_symbol[\"icon-halo-blur\"]),\"icon-translate\":new wi(Lt.paint_symbol[\"icon-translate\"]),\"icon-translate-anchor\":new wi(Lt.paint_symbol[\"icon-translate-anchor\"]),\"text-opacity\":new Ti(Lt.paint_symbol[\"text-opacity\"]),\"text-color\":new Ti(Lt.paint_symbol[\"text-color\"],{runtimeType:Ut,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),\"text-halo-color\":new Ti(Lt.paint_symbol[\"text-halo-color\"]),\"text-halo-width\":new Ti(Lt.paint_symbol[\"text-halo-width\"]),\"text-halo-blur\":new Ti(Lt.paint_symbol[\"text-halo-blur\"]),\"text-translate\":new wi(Lt.paint_symbol[\"text-translate\"]),\"text-translate-anchor\":new wi(Lt.paint_symbol[\"text-translate-anchor\"])}),layout:Sc},Lc=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Ft,this.defaultValue=t};Lc.prototype.evaluate=function(t){if(t.formattedSection){var e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default},Lc.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},Lc.prototype.outputDefined=function(){return!1},Lc.prototype.serialize=function(){return null},Nn(\"FormatSectionOverride\",Lc,{omit:[\"defaultValue\"]});var Cc=function(t){function e(e){t.call(this,e,Ec)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e,r){if(t.prototype.recalculate.call(this,e,r),\"auto\"===this.layout.get(\"icon-rotation-alignment\")&&(\"point\"!==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\")&&(\"point\"!==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\")),\"point\"===this.layout.get(\"symbol-placement\")){var n=this.layout.get(\"text-writing-mode\");if(n){for(var i=[],a=0,o=n;a\",targetMapId:n,sourceMapId:a.mapId})}}},qc.prototype.receive=function(t){var e=t.data,r=e.id;if(r&&(!e.targetMapId||this.mapId===e.targetMapId))if(\"\"===e.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else k()||e.mustQueue?(this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,e)},qc.prototype.process=function(){if(this.taskQueue.length){var t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}},qc.prototype.processTask=function(t,e){var r=this;if(\"\"===e.type){var n=this.callbacks[t];delete this.callbacks[t],n&&(e.error?n(qn(e.error)):n(null,qn(e.data)))}else{var i=!1,a=S(this.globalScope)?void 0:[],o=e.hasCallback?function(e,n){i=!0,delete r.cancelCallbacks[t],r.target.postMessage({id:t,type:\"\",sourceMapId:r.mapId,error:e?Hn(e):null,data:Hn(n,a)},a)}:function(t){i=!0},s=null,l=qn(e.data);if(this.parent[e.type])s=this.parent[e.type](e.sourceMapId,l,o);else if(this.parent.getWorkerSource){var c=e.type.split(\".\");s=this.parent.getWorkerSource(e.sourceMapId,c[0],l.source)[c[1]](l,o)}else o(new Error(\"Could not find function \"+e.type));!i&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},qc.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener(\"message\",this.receive,!1)};var Yc=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]))};Yc.prototype.setNorthEast=function(t){return this._ne=t instanceof Wc?new Wc(t.lng,t.lat):Wc.convert(t),this},Yc.prototype.setSouthWest=function(t){return this._sw=t instanceof Wc?new Wc(t.lng,t.lat):Wc.convert(t),this},Yc.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof Wc)e=t,r=t;else{if(!(t instanceof Yc)){if(Array.isArray(t)){if(4===t.length||t.every(Array.isArray)){var a=t;return this.extend(Yc.convert(a))}var o=t;return this.extend(Wc.convert(o))}return 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 Wc(e.lng,e.lat),this._ne=new Wc(r.lng,r.lat)),this},Yc.prototype.getCenter=function(){return new Wc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Yc.prototype.getSouthWest=function(){return this._sw},Yc.prototype.getNorthEast=function(){return this._ne},Yc.prototype.getNorthWest=function(){return new Wc(this.getWest(),this.getNorth())},Yc.prototype.getSouthEast=function(){return new Wc(this.getEast(),this.getSouth())},Yc.prototype.getWest=function(){return this._sw.lng},Yc.prototype.getSouth=function(){return this._sw.lat},Yc.prototype.getEast=function(){return this._ne.lng},Yc.prototype.getNorth=function(){return this._ne.lat},Yc.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Yc.prototype.toString=function(){return\"LngLatBounds(\"+this._sw.toString()+\", \"+this._ne.toString()+\")\"},Yc.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Yc.prototype.contains=function(t){var e=Wc.convert(t),r=e.lng,n=e.lat,i=this._sw.lat<=n&&n<=this._ne.lat,a=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=r&&r>=this._ne.lng),i&&a},Yc.convert=function(t){return!t||t instanceof Yc?t:new Yc(t)};var Wc=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\")};Wc.prototype.wrap=function(){return new Wc(c(this.lng,-180,180),this.lat)},Wc.prototype.toArray=function(){return[this.lng,this.lat]},Wc.prototype.toString=function(){return\"LngLat(\"+this.lng+\", \"+this.lat+\")\"},Wc.prototype.distanceTo=function(t){var e=Math.PI/180,r=this.lat*e,n=t.lat*e,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((t.lng-this.lng)*e);return 6371008.8*Math.acos(Math.min(i,1))},Wc.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new Yc(new Wc(this.lng-r,this.lat-e),new Wc(this.lng+r,this.lat+e))},Wc.convert=function(t){if(t instanceof Wc)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Wc(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&\"object\"==typeof t&&null!==t)return new Wc(Number(\"lng\"in t?t.lng:t.lon),Number(t.lat));throw new Error(\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]\")};var Xc=2*Math.PI*6371008.8;function Zc(t){return Xc*Math.cos(t*Math.PI/180)}function Jc(t){return(180+t)/360}function Kc(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Qc(t,e){return t/Zc(e)}function $c(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}var tu=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};tu.fromLngLat=function(t,e){void 0===e&&(e=0);var r=Wc.convert(t);return new tu(Jc(r.lng),Kc(r.lat),Qc(e,r.lat))},tu.prototype.toLngLat=function(){return new Wc(360*this.x-180,$c(this.y))},tu.prototype.toAltitude=function(){return t=this.z,e=this.y,t*Zc($c(e));var t,e},tu.prototype.meterInMercatorCoordinateUnits=function(){return 1/Xc*(t=$c(this.y),1/Math.cos(t*Math.PI/180));var t};var eu=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=iu(0,t,t,e,r)};eu.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},eu.prototype.url=function(t,e){var r,n,i,a,o,s=(r=this.x,n=this.y,i=this.z,a=Gc(256*r,256*(n=Math.pow(2,i)-n-1),i),o=Gc(256*(r+1),256*(n+1),i),a[0]+\",\"+a[1]+\",\"+o[0]+\",\"+o[1]),l=function(t,e,r){for(var n,i=\"\",a=t;a>0;a--)i+=(e&(n=1<this.canonical.z?new nu(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new nu(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},nu.prototype.calculateScaledKey=function(t,e){var r=this.canonical.z-t;return t>this.canonical.z?iu(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):iu(this.wrap*+e,t,t,this.canonical.x>>r,this.canonical.y>>r)},nu.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ>e&&t.canonical.y===this.canonical.y>>e},nu.prototype.children=function(t){if(this.overscaledZ>=t)return[new nu(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 nu(e,this.wrap,e,r,n),new nu(e,this.wrap,e,r+1,n),new nu(e,this.wrap,e,r,n+1),new nu(e,this.wrap,e,r+1,n+1)]},nu.prototype.isLessThan=function(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.y=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError(\"out of range source coordinates for DEM data\");return(e+1)*this.stride+(t+1)},au.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},au.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},au.prototype.getPixels=function(){return new Eo({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},au.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw new Error(\"dem dimension mismatch\");var n=e*this.dim,i=e*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(e){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:a=o-1;break;case 1:o=a+1}for(var s=-e*this.dim,l=-r*this.dim,c=a;c=0&&u[3]>=0&&s.insert(o,u[0],u[1],u[2],u[3])}},uu.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ls.VectorTile(new al(this.rawTileData)).layers,this.sourceLayerCoder=new ou(this.vtLayers?Object.keys(this.vtLayers).sort():[\"_geojsonTileLayer\"])),this.vtLayers},uu.prototype.query=function(t,e,r,n){var a=this;this.loadVTLayers();for(var o=t.params||{},s=8192/t.tileSize/t.scale,l=sn(o.filter),c=t.queryGeometry,u=t.queryPadding*s,f=hu(c),h=this.grid.query(f.minX-u,f.minY-u,f.maxX+u,f.maxY+u),p=hu(t.cameraQueryGeometry),d=this.grid3D.query(p.minX-u,p.minY-u,p.maxX+u,p.maxY+u,(function(e,r,n,a){return function(t,e,r,n,a){for(var o=0,s=t;o=l.x&&a>=l.y)return!0}var c=[new i(e,r),new i(e,a),new i(n,a),new i(n,r)];if(t.length>2)for(var u=0,f=c;u=0)return!0;return!1}(a,f)){var h=this.sourceLayerCoder.decode(r),p=this.vtLayers[h].feature(n);if(i.filter(new pi(this.tileID.overscaledZ),p))for(var d=this.getId(p,h),g=0;gn)i=!1;else if(e)if(this.expirationTimeot&&(t.getActor().send(\"enforceCacheSizeLimit\",at),ht=0)},t.clamp=l,t.clearTileCache=function(t){var e=self.caches.delete(\"mapbox-tiles\");t&&e.catch(t).then((function(){return t()}))},t.clipLine=ec,t.clone=function(t){var e=new fo(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},t.clone$1=x,t.clone$2=function(t){var e=new fo(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=tl,t.config=F,t.create=function(){var t=new fo(16);return fo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=function(){var t=new fo(9);return fo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},t.create$2=function(){var t=new fo(4);return fo!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=Wr,t.createLayout=Ii,t.createStyleLayer=function(t){return\"custom\"===t.type?new Dc(t):new Rc[t.type](t)},t.cross=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},t.deepEqual=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var n=0;n0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t},t.number=qe,t.offscreenCanvasSupported=pt,t.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},t.parseGlyphPBF=function(t){return new al(t).readFields(Tl,[])},t.pbf=al,t.performSymbolLayout=function(t,e,r,n,i,a,o){t.createArrays();var s=512*t.overscaling;t.tilePixelRatio=8192/s,t.compareText={},t.iconsNeedLinear=!1;var l=t.layers[0].layout,c=t.layers[0]._unevaluatedLayout._values,u={};if(\"composite\"===t.textSizeData.kind){var f=t.textSizeData,h=f.minZoom,p=f.maxZoom;u.compositeTextSizes=[c[\"text-size\"].possiblyEvaluate(new pi(h),o),c[\"text-size\"].possiblyEvaluate(new pi(p),o)]}if(\"composite\"===t.iconSizeData.kind){var d=t.iconSizeData,g=d.minZoom,m=d.maxZoom;u.compositeIconSizes=[c[\"icon-size\"].possiblyEvaluate(new pi(g),o),c[\"icon-size\"].possiblyEvaluate(new pi(m),o)]}u.layoutTextSize=c[\"text-size\"].possiblyEvaluate(new pi(t.zoom+1),o),u.layoutIconSize=c[\"icon-size\"].possiblyEvaluate(new pi(t.zoom+1),o),u.textMaxSize=c[\"text-size\"].possiblyEvaluate(new pi(18));for(var v=24*l.get(\"text-line-height\"),y=\"map\"===l.get(\"text-rotation-alignment\")&&\"point\"!==l.get(\"symbol-placement\"),x=l.get(\"text-keep-upright\"),b=l.get(\"text-size\"),w=function(){var a=k[T],s=l.get(\"text-font\").evaluate(a,{},o).join(\",\"),c=b.evaluate(a,{},o),f=u.layoutTextSize.evaluate(a,{},o),h=u.layoutIconSize.evaluate(a,{},o),p={horizontal:{},vertical:void 0},d=a.text,g=[0,0];if(d){var m=d.toString(),w=24*l.get(\"text-letter-spacing\").evaluate(a,{},o),A=function(t){for(var e=0,r=t;e=8192||f.y<0||f.y>=8192||function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,w,T,k,A){var M,S,E,L,C,P=t.addToLineVertexArray(e,r),I=0,O=0,z=0,D=0,R=-1,F=-1,B={},N=ya(\"\"),j=0,U=0;void 0===s._unevaluatedLayout.getValue(\"text-radial-offset\")?(M=s.layout.get(\"text-offset\").evaluate(b,{},k).map((function(t){return 24*t})),j=M[0],U=M[1]):(j=24*s.layout.get(\"text-radial-offset\").evaluate(b,{},k),U=pc);if(t.allowVerticalPlacement&&n.vertical){var V=s.layout.get(\"text-rotate\").evaluate(b,{},k)+90,H=n.vertical;L=new sc(l,e,c,u,f,H,h,p,d,V),o&&(C=new sc(l,e,c,u,f,o,m,v,d,V))}if(i){var q=s.layout.get(\"icon-rotate\").evaluate(b,{}),G=\"none\"!==s.layout.get(\"icon-text-fit\"),Y=rc(i,q,T,G),W=o?rc(o,q,T,G):void 0;E=new sc(l,e,c,u,f,i,m,v,!1,q),I=4*Y.length;var X=t.iconSizeData,Z=null;\"source\"===X.kind?(Z=[128*s.layout.get(\"icon-size\").evaluate(b,{})])[0]>32640&&_(t.layerIds[0]+': Value for \"icon-size\" is >= 255. Reduce your \"icon-size\".'):\"composite\"===X.kind&&((Z=[128*w.compositeIconSizes[0].evaluate(b,{},k),128*w.compositeIconSizes[1].evaluate(b,{},k)])[0]>32640||Z[1]>32640)&&_(t.layerIds[0]+': Value for \"icon-size\" is >= 255. Reduce your \"icon-size\".'),t.addSymbols(t.icon,Y,Z,x,y,b,!1,e,P.lineStartIndex,P.lineLength,-1,k),R=t.icon.placedSymbolArray.length-1,W&&(O=4*W.length,t.addSymbols(t.icon,W,Z,x,y,b,Cl.vertical,e,P.lineStartIndex,P.lineLength,-1,k),F=t.icon.placedSymbolArray.length-1)}for(var J in n.horizontal){var K=n.horizontal[J];if(!S){N=ya(K.text);var Q=s.layout.get(\"text-rotate\").evaluate(b,{},k);S=new sc(l,e,c,u,f,K,h,p,d,Q)}var $=1===K.positionedLines.length;if(z+=mc(t,e,K,a,s,d,b,g,P,n.vertical?Cl.horizontal:Cl.horizontalOnly,$?Object.keys(n.horizontal):[J],B,R,w,k),$)break}n.vertical&&(D+=mc(t,e,n.vertical,a,s,d,b,g,P,Cl.vertical,[\"vertical\"],B,F,w,k));var tt=S?S.boxStartIndex:t.collisionBoxArray.length,et=S?S.boxEndIndex:t.collisionBoxArray.length,rt=L?L.boxStartIndex:t.collisionBoxArray.length,nt=L?L.boxEndIndex:t.collisionBoxArray.length,it=E?E.boxStartIndex:t.collisionBoxArray.length,at=E?E.boxEndIndex:t.collisionBoxArray.length,ot=C?C.boxStartIndex:t.collisionBoxArray.length,st=C?C.boxEndIndex:t.collisionBoxArray.length,lt=-1,ct=function(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e};lt=ct(S,lt),lt=ct(L,lt),lt=ct(E,lt);var ut=(lt=ct(C,lt))>-1?1:0;ut&&(lt*=A/24);t.glyphOffsetArray.length>=Mc.MAX_GLYPHS&&_(\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\");void 0!==b.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey);t.symbolInstances.emplaceBack(e.x,e.y,B.right>=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,R,F,N,tt,et,rt,nt,it,at,ot,st,c,z,D,I,O,ut,0,h,j,U,lt)}(t,f,s,r,n,i,h,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,v,w,A,l,x,T,M,d,e,a,c,u,o)};if(\"line\"===S)for(var P=0,I=ec(e.geometry,0,0,8192,8192);P1){var V=$l(U,k,r.vertical||g,n,24,y);V&&C(U,V)}}else if(\"Polygon\"===e.type)for(var H=0,q=hs(e.geometry,0);H=E.maxzoom))if(\"none\"!==E.visibility)o(S,this.zoom,n),(g[E.id]=E.createBucket({index:u.bucketLayerIDs.length,layers:S,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:b,sourceID:this.source})).populate(_,m,this.tileID.canonical),u.bucketLayerIDs.push(S.map((function(t){return t.id})))}}}var L=t.mapObject(m.glyphDependencies,(function(t){return Object.keys(t).map(Number)}));Object.keys(L).length?a.send(\"getGlyphs\",{uid:this.uid,stacks:L},(function(t,e){f||(f=t,h=e,I.call(l))})):h={};var C=Object.keys(m.iconDependencies);C.length?a.send(\"getImages\",{icons:C,source:this.source,tileID:this.tileID,type:\"icons\"},(function(t,e){f||(f=t,p=e,I.call(l))})):p={};var P=Object.keys(m.patternDependencies);function I(){if(f)return s(f);if(h&&p&&d){var e=new i(h),r=new t.ImageAtlas(p,d);for(var a in g){var l=g[a];l instanceof t.SymbolBucket?(o(l.layers,this.zoom,n),t.performSymbolLayout(l,h,e.positions,p,r.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof t.LineBucket||l instanceof t.FillBucket||l instanceof t.FillExtrusionBucket)&&(o(l.layers,this.zoom,n),l.addFeatures(m,this.tileID.canonical,r.patternPositions))}this.status=\"done\",s(null,{buckets:t.values(g).filter((function(t){return!t.isEmpty()})),featureIndex:u,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?e.positions:null})}}P.length?a.send(\"getImages\",{icons:P,source:this.source,tileID:this.tileID,type:\"patterns\"},(function(t,e){f||(f=t,d=e,I.call(l))})):d={},I.call(this)};var l=function(t,e,r,n){this.actor=t,this.layerIndex=e,this.availableImages=r,this.loadVectorData=n||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(e,r){var n=this,i=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request),s=this.loading[i]=new a(e);s.abort=this.loadVectorData(e,(function(e,a){if(delete n.loading[i],e||!a)return s.status=\"done\",n.loaded[i]=s,r(e);var l=a.rawData,c={};a.expires&&(c.expires=a.expires),a.cacheControl&&(c.cacheControl=a.cacheControl);var u={};if(o){var f=o.finish();f&&(u.resourceTiming=JSON.parse(JSON.stringify(f)))}s.vectorTile=a.vectorTile,s.parse(a.vectorTile,n.layerIndex,n.availableImages,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]=s}))},l.prototype.reloadTile=function(t,e){var r=this,n=this.loaded,i=t.uid,a=this;if(n&&n[i]){var o=n[i];o.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,n){var i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,a.layerIndex,r.availableImages,a.actor,i)),e(t,n)};\"parsing\"===o.status?o.reloadCallback=s:\"done\"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.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()},l.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var c=t.window.ImageBitmap,u=function(){this.loaded={}};u.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,a=e.rawImageData,o=c&&a instanceof c?this.getImageData(a):a,s=new t.DEMData(n,o,i);this.loaded=this.loaded||{},this.loaded[n]=s,r(null,s)},u.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext(\"2d\")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var r=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:r.width,height:r.height},r.data)},u.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var f=function t(e,r){var n,i=e&&e.type;if(\"FeatureCollection\"===i)for(n=0;n=0!=!!e&&t.reverse()}var d=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,g=function(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,\"id\"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};g.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r>31}function P(t,e){for(var r=t.loadGeometry(),n=t.type,i=0,a=0,o=r.length,s=0;s>1;!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),h=Math.max(i,Math.floor(n-l*u/s+f)),p=Math.min(a,Math.floor(n+(s-l)*u/s+f));t(e,r,n,h,p,o)}var d=r[2*n+o],g=i,m=a;for(z(e,r,i,n),r[2*a+o]>d&&z(e,r,i,a);gd;)m--}r[2*i+o]===d?z(e,r,i,m):(m++,z(e,r,m,a)),m<=n&&(i=m+1),n<=m&&(a=m-1)}}(t,e,o,n,i,a%2),O(t,e,r,n,o-1,a+1),O(t,e,r,o+1,i,a+1)}}function z(t,e,r,n){D(t,r,n),D(e,2*r,2*n),D(e,2*r+1,2*n+1)}function D(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function R(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}_.fromVectorTileJs=w,_.fromGeojsonVt=T,_.GeoJSONWrapper=k;var F=function(t){return t[0]},B=function(t){return t[1]},N=function(t,e,r,n,i){void 0===e&&(e=F),void 0===r&&(r=B),void 0===n&&(n=64),void 0===i&&(i=Float64Array),this.nodeSize=n,this.points=t;for(var a=t.length<65536?Uint16Array:Uint32Array,o=this.ids=new a(t.length),s=this.coords=new i(2*t.length),l=0;l=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 m=(f+1)%2;(0===f?r<=s:n<=l)&&(c.push(p),c.push(g-1),c.push(m)),(0===f?i>=s:a>=l)&&(c.push(g+1),c.push(h),c.push(m))}}return u}(this.ids,this.coords,t,e,r,n,this.nodeSize)},N.prototype.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++)R(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];R(d,g,r,n)<=l&&s.push(t[p]);var m=(c+1)%2;(0===c?r-i<=d:n-i<=g)&&(o.push(f),o.push(p-1),o.push(m)),(0===c?r+i>=d:n+i>=g)&&(o.push(p+1),o.push(u),o.push(m))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var j={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},U=function(t){this.options=X(Object.create(j),t),this.trees=new Array(this.options.maxZoom+1)};function V(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function H(t,e){var r=t.geometry.coordinates,n=r[0],i=r[1];return{x:Y(n),y:W(i),zoom:1/0,index:e,parentId:-1}}function q(t){return{type:\"Feature\",id:t.id,properties:G(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 G(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+\"k\":e>=1e3?Math.round(e/100)/10+\"k\":e;return X(X({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function Y(t){return t/360+.5}function W(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 X(t,e){for(var r in e)t[r]=e[r];return t}function Z(t){return t.x}function J(t){return t.y}function K(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 Q(t,e,r,n){var i={id:void 0===t?null:t,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)$(t,e);else if(\"Polygon\"===r||\"MultiLineString\"===r)for(var n=0;n0&&(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=n-r>>1,l=n-r,c=e[r],u=e[r+1],f=e[n],h=e[n+1],p=r+3;po)a=p,o=d;else if(d===o){var g=Math.abs(p-s);gi&&(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 nt(t,e,r,n){for(var i=0;i1?1:r}function ot(t,e,r,n,i,a,o,s){if(n/=e,a>=(r/=e)&&o=n)return null;for(var l=[],c=0;c=r&&d=n)){var g=[];if(\"Point\"===h||\"MultiPoint\"===h)st(f,g,r,n,i);else if(\"LineString\"===h)lt(f,g,r,n,i,!1,s.lineMetrics);else if(\"MultiLineString\"===h)ut(f,g,r,n,i,!1);else if(\"Polygon\"===h)ut(f,g,r,n,i,!0);else if(\"MultiPolygon\"===h)for(var m=0;m=r&&o<=n&&(e.push(t[a]),e.push(t[a+1]),e.push(t[a+2]))}}function lt(t,e,r,n,i,a,o){for(var s,l,c=ct(t),u=0===i?ht:pt,f=t.start,h=0;hr&&(l=u(c,p,d,m,v,r),o&&(c.start=f+s*l)):y>n?x=r&&(l=u(c,p,d,m,v,r),b=!0),x>n&&y<=n&&(l=u(c,p,d,m,v,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&&ft(c,p,d,g),_=c.length-3,a&&_>=3&&(c[_]!==c[0]||c[_+1]!==c[1])&&ft(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 ut(t,e,r,n,i,a){for(var o=0;oo.maxX&&(o.maxX=u),f>o.maxY&&(o.maxY=f)}return o}function xt(t,e,r,n){var i=e.geometry,a=e.type,o=[];if(\"Point\"===a||\"MultiPoint\"===a)for(var s=0;s0&&e.size<(i?o:n))r.numPoints+=e.length/3;else{for(var s=[],l=0;lo)&&(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;n0===e)for(n=0,i=t.length;n24)throw new Error(\"maxZoom should be in the 0-24 range\");if(e.promoteId&&e.generateId)throw new Error(\"promoteId and generateId cannot be used together.\");var n=function(t,e){var r=[];if(\"FeatureCollection\"===t.type)for(var n=0;n=n;c--){var u=+Date.now();s=this._cluster(s,c),this.trees[c]=new N(s,Z,J,a,Float32Array),r&&console.log(\"z%d: %d clusters in %dms\",c,s.length,+Date.now()-u)}return r&&console.timeEnd(\"total time\"),this},U.prototype.getClusters=function(t,e){var r=((t[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,i=180;else if(r>i){var o=this.getClusters([r,n,180,a],e),s=this.getClusters([-180,n,i,a],e);return o.concat(s)}for(var l=this.trees[this._limitZoom(e)],c=[],u=0,f=l.range(Y(r),W(a),Y(i),W(n));u1?this._map(c,!0):null,m=(l<<5)+(e+1)+this.points.length,v=0,y=f;v>5},U.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},U.prototype._map=function(t,e){if(t.numPoints)return e?X({},t.properties):t.properties;var r=this.points[t.index].properties,n=this.options.map(r);return e&&n===r?X({},n):n},_t.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},_t.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<1&&console.time(\"creation\"),h=this.tiles[f]=yt(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<1&&console.time(\"clipping\");var g,m,v,y,x,b,_=.5*l.buffer/l.extent,w=.5-_,T=.5+_,k=1+_;g=m=v=y=null,x=ot(t,u,r-_,r+T,0,h.minX,h.maxX,l),b=ot(t,u,r+w,r+k,0,h.minX,h.maxX,l),t=null,x&&(g=ot(x,u,n-_,n+T,1,h.minY,h.maxY,l),m=ot(x,u,n+w,n+k,1,h.minY,h.maxY,l),x=null),b&&(v=ot(b,u,n-_,n+T,1,h.minY,h.maxY,l),y=ot(b,u,n+w,n+k,1,h.minY,h.maxY,l),b=null),c>1&&console.timeEnd(\"clipping\"),s.push(g||[],e+1,2*r,2*n),s.push(m||[],e+1,2*r,2*n+1),s.push(v||[],e+1,2*r+1,2*n),s.push(y||[],e+1,2*r+1,2*n+1)}}},_t.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<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[wt(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]?mt(this.tiles[s],i):null):null};var kt=function(e){function r(t,r,n,i){e.call(this,t,r,n,Tt),i&&(this.loadGeoJSON=i)}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 e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(n&&n.request&&n.request.collectResourceTiming)&&new t.RequestPerformance(n.request);this.loadGeoJSON(n,(function(a,o){if(a||!o)return r(a);if(\"object\"!=typeof o)return r(new Error(\"Input data given to '\"+n.source+\"' is not a valid GeoJSON object.\"));f(o,!0);try{e._geoJSONIndex=n.cluster?new U(function(e){var r=e.superclusterOptions,n=e.clusterProperties;if(!n||!r)return r;for(var i={},a={},o={accumulated:null,zoom:0},s={properties:null},l=Object.keys(n),c=0,u=l;c=0?0:e.button},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var h=function(e){function r(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requestors;e=0?1.2:1))}function v(t,e,r,n,i,a,o){for(var s=0;s65535)e(new Error(\"glyphs > 65535 not supported\"));else if(a.ranges[s])e(null,{stack:r,id:i,glyph:o});else{var l=a.requests[s];l||(l=a.requests[s]=[],x.loadGlyphRange(r,s,n.url,n.requestManager,(function(t,e){if(e){for(var r in e)n._doesCharSupportLocalGlyph(+r)||(a.glyphs[+r]=e[+r]);a.ranges[s]=!0}for(var i=0,o=l;i1&&(l=t[++s]);var u=Math.abs(c-l.left),f=Math.abs(c-l.right),h=Math.min(u,f),p=void 0,d=i/r*(n+1);if(l.isDash){var g=n-Math.abs(d);p=Math.sqrt(h*h+g*g)}else p=n-Math.sqrt(h*h+d*d);this.data[o+c]=Math.max(0,Math.min(255,p+128))}},T.prototype.addRegularDash=function(t){for(var e=t.length-1;e>=0;--e){var r=t[e],n=t[e+1];r.zeroLength?t.splice(e,1):n&&n.isDash===r.isDash&&(n.left=r.left,t.splice(e,1))}var i=t[0],a=t[t.length-1];i.isDash===a.isDash&&(i.left=a.left-this.width,a.right=i.right+this.width);for(var o=this.width*this.nextRow,s=0,l=t[s],c=0;c1&&(l=t[++s]);var u=Math.abs(c-l.left),f=Math.abs(c-l.right),h=Math.min(u,f),p=l.isDash?h:-h;this.data[o+c]=Math.max(0,Math.min(255,p+128))}},T.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=n&&e.x=i&&e.y0&&(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+10&&(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)r.fire(new t.ErrorEvent(e));else{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.getClusterExpansionZoom=function(t,e){return this.actor.send(\"geojson.getClusterExpansionZoom\",{clusterId:t,source:this.id},e),this},r.prototype.getClusterChildren=function(t,e){return this.actor.send(\"geojson.getClusterChildren\",{clusterId:t,source:this.id},e),this},r.prototype.getClusterLeaves=function(t,e,r,n){return this.actor.send(\"geojson.getClusterLeaves\",{source:this.id,clusterId:t,limit:e,offset:r},n),this},r.prototype._updateWorkerData=function(e){var r=this;this._loaded=!1;var n=t.extend({},this.workerOptions),i=this._data;\"string\"==typeof i?(n.request=this.map._requestManager.transformRequest(t.browser.resolveURL(i),t.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(i),this.actor.send(this.type+\".loadData\",n,(function(t,i){r._removed||i&&i.abandoned||(r._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[r.id]&&(r._resourceTiming=i.resourceTiming[r.id].slice(0)),r.actor.send(r.type+\".coalesce\",{source:n.source},null),e(t))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(e,r){var n=this,i=e.actor?\"reloadTile\":\"loadTile\";e.actor=this.actor;var a={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};e.request=this.actor.send(i,a,(function(t,a){return delete e.request,e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(a,n.map.painter,\"reloadTile\"===i),r(null))}))},r.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.actor.send(\"removeTile\",{uid:t.uid,type:this.type,source:this.id})},r.prototype.onRemove=function(){this._removed=!0,this.actor.send(\"removeSource\",{type:this.type,source:this.id})},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),P=t.createLayout([{name:\"a_pos\",type:\"Int16\",components:2},{name:\"a_texture_pos\",type:\"Int16\",components:2}]),I=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._loaded=!1,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(e,r){var n=this;this._loaded=!1,this.fire(new t.Event(\"dataloading\",{dataType:\"source\"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),(function(i,a){n._loaded=!0,i?n.fire(new t.ErrorEvent(i)):a&&(n.image=a,e&&(n.coordinates=e),r&&r(),n._finishLoading())}))},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,(function(){e.texture=null})),this):this},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){var r=this;this.coordinates=e;var n=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var r=1/0,n=1/0,i=-1/0,a=-1/0,o=0,s=e;or.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+this.id,null,\"Playback for this video can be set only between the \"+r.start(0)+\" and \"+r.end(0)+\"-second mark.\"))):this.video.currentTime=e}},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 e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,P.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,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:\"video\",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(I),z=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.ValidationError(\"sources.\"+r,null,'\"coordinates\" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+r,null,'missing required property \"coordinates\"'))),n.animate&&\"boolean\"!=typeof n.animate&&this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+r,null,'optional \"animate\" property must be a boolean value'))),n.canvas?\"string\"==typeof n.canvas||n.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError(\"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.ValidationError(\"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._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.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.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),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 e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,P.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var a=this.tiles[i];\"loaded\"!==a.state&&(a.state=\"loaded\",a.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];tthis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},N.prototype.has=function(t){return t.wrapped().key in this.data},N.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},N.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},N.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},N.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},N.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},N.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},N.prototype.filter=function(t){var e=[];for(var r in this.data)for(var n=0,i=this.data[r];n1||(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._retainLoadedChildren=function(t,e,r,n){for(var i in this._tiles){var a=this._tiles[i];if(!(n[i]||!a.hasData()||a.tileID.overscaledZ<=e||a.tileID.overscaledZ>r)){for(var o=a.tileID;a&&a.tileID.overscaledZ>e+1;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);(a=this._tiles[s.key])&&a.hasData()&&(o=s)}for(var l=o;l.overscaledZ>e;)if(t[(l=l.scaledTo(l.overscaledZ-1)).key]){n[o.key]=o;break}}}},r.prototype.findLoadedParent=function(t,e){if(t.key in this._loadedParentTiles){var r=this._loadedParentTiles[t.key];return r&&r.tileID.overscaledZ>=e?r:null}for(var n=t.overscaledZ-1;n>=e;n--){var i=t.scaledTo(n),a=this._getLoadedTile(i);if(a)return a}},r.prototype._getLoadedTile=function(t){var e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},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 a=e.coveringZoomLevel(this._source),o=Math.max(a-r.maxOverzooming,this._source.minzoom),s=Math.max(a+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,a);if(It(this._source.type)){for(var c={},u={},f=0,h=Object.keys(l);fthis._source.maxzoom){var m=d.children(this._source.maxzoom)[0],v=this.getTile(m);if(v&&v.hasData()){n[m.key]=m;continue}}else{var y=d.children(this._source.maxzoom);if(n[y[0].key]&&n[y[1].key]&&n[y[2].key]&&n[y[3].key])continue}for(var x=g.wasRequested(),b=d.overscaledZ-1;b>=a;--b){var _=d.scaledTo(b);if(i[_.key])break;if(i[_.key]=!0,!(g=this.getTile(_))&&x&&(g=this._addTile(_)),g&&(n[_.key]=_,x=g.wasRequested(),g.hasData()))break}}}return n},r.prototype._updateLoadedParentTileCache=function(){for(var t in this._loadedParentTiles={},this._tiles){for(var e=[],r=void 0,n=this._tiles[t].tileID;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}e.push(n.key);var i=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(i))break;n=i}for(var a=0,o=e;a0||(e.hasData()&&\"reloading\"!==e.state?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,n){var i=this,a=[],o=this.transform;if(!o)return a;for(var s=n?o.getCameraQueryGeometry(e):e,l=e.map((function(t){return o.pointCoordinate(t)})),c=s.map((function(t){return o.pointCoordinate(t)})),u=this.getIds(),f=1/0,h=1/0,p=-1/0,d=-1/0,g=0,m=c;g=0&&v[1].y+m>=0){var y=l.map((function(t){return s.getTilePoint(t)})),x=c.map((function(t){return s.getTilePoint(t)}));a.push({tile:n,tileID:s,queryGeometry:y,cameraQueryGeometry:x,scale:g})}}},x=0;x=t.browser.now())return!0}return!1},r.prototype.setFeatureState=function(t,e,r){t=t||\"_geojsonTileLayer\",this._state.updateState(t,e,r)},r.prototype.removeFeatureState=function(t,e,r){t=t||\"_geojsonTileLayer\",this._state.removeFeatureState(t,e,r)},r.prototype.getFeatureState=function(t,e){return t=t||\"_geojsonTileLayer\",this._state.getState(t,e)},r.prototype.setDependencies=function(t,e,r){var n=this._tiles[t];n&&n.setDependencies(e,r)},r.prototype.reloadTilesForDependencies=function(t,e){for(var r in this._tiles){this._tiles[r].hasDependency(t,e)&&this._reloadTile(r,\"reloading\")}this._cache.filter((function(r){return!r.hasDependency(t,e)}))},r}(t.Evented);function Pt(t,e){var r=Math.abs(2*t.wrap)-+(t.wrap<0),n=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||n-r||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function It(t){return\"raster\"===t||\"image\"===t||\"video\"===t}function Ot(){return new t.window.Worker(Zi.workerUrl)}Ct.maxOverzooming=10,Ct.maxUnderzooming=3;var zt=\"mapboxgl_preloaded_worker_pool\",Dt=function(){this.active={}};Dt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length0?(i-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))};var Kt=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=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function ne(e,r,n,i,a,o,s,l){var c=i?e.textSizeData:e.iconSizeData,u=t.evaluateSizeForZoom(c,n.transform.zoom),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,m=!1,v=0;vMath.abs(n.x-r.x)*i)return{useVertical:!0};return(e===t.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function oe(e,r,n,i,a,o,s,l,c,u,f,h,p,d){var g,m=r/24,v=e.lineOffsetX*m,y=e.lineOffsetY*m;if(e.numGlyphs>1){var x=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,_=e.lineStartIndex+e.lineLength,w=ie(m,l,v,y,n,f,h,e,c,o,p);if(!w)return{notEnoughRoom:!0};var T=te(w.first.point,s).point,k=te(w.last.point,s).point;if(i&&!n){var A=ae(e.writingMode,T,k,d);if(A)return A}g=[w.first];for(var M=e.glyphStartIndex+1;M0?C.point:se(h,L,S,1,a),I=ae(e.writingMode,S,P,d);if(I)return I}var O=le(m*l.getoffsetX(e.glyphStartIndex),v,y,n,f,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,c,o,p);if(!O)return{notEnoughRoom:!0};g=[O]}for(var z=0,D=g;z0?1:-1,g=0;i&&(d*=-1,g=Math.PI),d<0&&(g+=Math.PI);for(var m=d>0?l+s:l+s+1,v=a,y=a,x=0,b=0,_=Math.abs(p),w=[];x+b<=_;){if((m+=d)=c)return null;if(y=v,w.push(v),void 0===(v=h[m])){var T=new t.Point(u.getx(m),u.gety(m)),k=te(T,f);if(k.signedDistanceFromCamera>0)v=h[m]=k.point;else{var A=m-d;v=se(0===x?o:new t.Point(u.getx(A),u.gety(A)),T,y,_-x+1,f)}}x+=b,b=y.dist(v)}var M=(_-x)/b,S=v.sub(y),E=S.mult(M)._add(y);E._add(S._unit()._perp()._mult(n*d));var L=g+Math.atan2(v.y-y.y,v.x-y.x);return w.push(E),{point:E,angle:L,path:w}}Kt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Kt.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)},Kt.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)},Kt.prototype._insertBoxCell=function(t,e,r,n,i,a){this.boxCells[i].push(a)},Kt.prototype._insertCircleCell=function(t,e,r,n,i,a){this.circleCells[i].push(a)},Kt.prototype._query=function(t,e,r,n,i,a){if(r<0||t>this.width||n<0||e>this.height)return!i&&[];var o=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var s=0;s0:o},Kt.prototype._queryCircle=function(t,e,r,n,i){var a=t-r,o=t+r,s=e-r,l=e+r;if(o<0||a>this.width||l<0||s>this.height)return!n&&[];var c=[],u={hitTest:n,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(a,s,o,l,this._queryCellCircle,c,u,i),n?c.length>0:c},Kt.prototype.query=function(t,e,r,n,i){return this._query(t,e,r,n,!1,i)},Kt.prototype.hitTest=function(t,e,r,n,i){return this._query(t,e,r,n,!0,i)},Kt.prototype.hitTestCircle=function(t,e,r,n){return this._queryCircle(t,e,r,!0,n)},Kt.prototype._queryCell=function(t,e,r,n,i,a,o,s){var l=o.seenUids,c=this.boxCells[i];if(null!==c)for(var u=this.bboxes,f=0,h=c;f=u[d+0]&&n>=u[d+1]&&(!s||s(this.boxKeys[p]))){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[p],x1:u[d],y1:u[d+1],x2:u[d+2],y2:u[d+3]})}}}var g=this.circleCells[i];if(null!==g)for(var m=this.circles,v=0,y=g;vo*o+s*s},Kt.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 ce=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ue(t,e){for(var r=0;r=1;P--)C.push(E.path[P]);for(var I=1;I0){for(var R=C[0].clone(),F=C[0].clone(),B=1;B=A.x&&F.x<=M.x&&R.y>=A.y&&F.y<=M.y?[C]:F.xM.x||F.yM.y?[]:t.clipLine([C],A.x,A.y,M.x,M.y)}for(var N=0,j=D;N=this.screenRightBoundary||n<100||e>this.screenBottomBoundary},he.prototype.isInsideGrid=function(t,e,r,n){return r>=0&&t=0&&e0)return this.prevPlacement&&this.prevPlacement.variableOffsets[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID].text&&(g=this.prevPlacement.variableOffsets[f.crossTileID].anchor),this.variableOffsets[f.crossTileID]={textOffset:m,width:r,height:n,anchor:t,textBoxScale:i,prevAnchor:g},this.markUsedJustification(h,t,f,p),h.allowVerticalPlacement&&(this.markUsedOrientation(h,p,f),this.placedOrientations[f.crossTileID]=p),{shift:v,placedGlyphBoxes:y}},we.prototype.placeLayerBucketPart=function(e,r,n){var i=this,a=e.parameters,o=a.bucket,s=a.layout,l=a.posMatrix,c=a.textLabelPlaneMatrix,u=a.labelToScreenMatrix,f=a.textPixelRatio,h=a.holdingForFade,p=a.collisionBoxArray,d=a.partiallyEvaluatedTextSize,g=a.collisionGroup,m=s.get(\"text-optional\"),v=s.get(\"icon-optional\"),y=s.get(\"text-allow-overlap\"),x=s.get(\"icon-allow-overlap\"),b=\"map\"===s.get(\"text-rotation-alignment\"),_=\"map\"===s.get(\"text-pitch-alignment\"),w=\"none\"!==s.get(\"icon-text-fit\"),T=\"viewport-y\"===s.get(\"symbol-z-order\"),k=y&&(x||!o.hasIconData()||v),A=x&&(y||!o.hasTextData()||m);!o.collisionArrays&&p&&o.deserializeCollisionBoxes(p);var M=function(e,a){if(!r[e.crossTileID])if(h)i.placements[e.crossTileID]=new me(!1,!1,!1);else{var p,T=!1,M=!1,S=!0,E=null,L={box:null,offscreen:null},C={box:null,offscreen:null},P=null,I=null,O=0,z=0,D=0;a.textFeatureIndex?O=a.textFeatureIndex:e.useRuntimeCollisionCircles&&(O=e.featureIndex),a.verticalTextFeatureIndex&&(z=a.verticalTextFeatureIndex);var R=a.textBox;if(R){var F=function(r){var n=t.WritingMode.horizontal;if(o.allowVerticalPlacement&&!r&&i.prevPlacement){var a=i.prevPlacement.placedOrientations[e.crossTileID];a&&(i.placedOrientations[e.crossTileID]=a,n=a,i.markUsedOrientation(o,n,e))}return n},B=function(r,n){if(o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&a.verticalTextBox)for(var i=0,s=o.writingModes;i0&&(N=N.filter((function(t){return t!==j.anchor}))).unshift(j.anchor)}var U=function(t,r,n){for(var a=t.x2-t.x1,s=t.y2-t.y1,c=e.textBoxScale,u=w&&!x?r:null,h={box:[],offscreen:!1},p=y?2*N.length:N.length,d=0;d=N.length,k=i.attemptAnchorPlacement(m,t,a,s,c,b,_,f,l,g,v,e,o,n,u);if(k&&(h=k.placedGlyphBoxes)&&h.box&&h.box.length){T=!0,E=k.shift;break}}return h};B((function(){return U(R,a.iconBox,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox,n=L&&L.box&&L.box.length;return o.allowVerticalPlacement&&!n&&e.numVerticalGlyphVertices>0&&r?U(r,a.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}})),L&&(T=L.box,S=L.offscreen);var V=F(L&&L.box);if(!T&&i.prevPlacement){var H=i.prevPlacement.variableOffsets[e.crossTileID];H&&(i.variableOffsets[e.crossTileID]=H,i.markUsedJustification(o,H.anchor,e,V))}}else{var q=function(t,r){var n=i.collisionIndex.placeCollisionBox(t,y,f,l,g.predicate);return n&&n.box&&n.box.length&&(i.markUsedOrientation(o,r,e),i.placedOrientations[e.crossTileID]=r),n};B((function(){return q(R,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox;return o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?q(r,t.WritingMode.vertical):{box:null,offscreen:null}})),F(L&&L.box&&L.box.length)}}if(T=(p=L)&&p.box&&p.box.length>0,S=p&&p.offscreen,e.useRuntimeCollisionCircles){var G=o.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),Y=t.evaluateSizeForFeature(o.textSizeData,d,G),W=s.get(\"text-padding\"),X=e.collisionCircleDiameter;P=i.collisionIndex.placeCollisionCircles(y,G,o.lineVertexArray,o.glyphOffsetArray,Y,l,c,u,n,_,g.predicate,X,W),T=y||P.circles.length>0&&!P.collisionDetected,S=S&&P.offscreen}if(a.iconFeatureIndex&&(D=a.iconFeatureIndex),a.iconBox){var Z=function(t){var e=w&&E?_e(t,E.x,E.y,b,_,i.transform.angle):t;return i.collisionIndex.placeCollisionBox(e,x,f,l,g.predicate)};M=C&&C.box&&C.box.length&&a.verticalIconBox?(I=Z(a.verticalIconBox)).box.length>0:(I=Z(a.iconBox)).box.length>0,S=S&&I.offscreen}var J=m||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,K=v||0===e.numIconVertices;if(J||K?K?J||(M=M&&T):T=M&&T:M=T=M&&T,T&&p&&p.box&&(C&&C.box&&z?i.collisionIndex.insertCollisionBox(p.box,s.get(\"text-ignore-placement\"),o.bucketInstanceId,z,g.ID):i.collisionIndex.insertCollisionBox(p.box,s.get(\"text-ignore-placement\"),o.bucketInstanceId,O,g.ID)),M&&I&&i.collisionIndex.insertCollisionBox(I.box,s.get(\"icon-ignore-placement\"),o.bucketInstanceId,D,g.ID),P&&(T&&i.collisionIndex.insertCollisionCircles(P.circles,s.get(\"text-ignore-placement\"),o.bucketInstanceId,O,g.ID),n)){var Q=o.bucketInstanceId,$=i.collisionCircleArrays[Q];void 0===$&&($=i.collisionCircleArrays[Q]=new ve);for(var tt=0;tt=0;--E){var L=S[E];M(o.symbolInstances.get(L),o.collisionArrays[L])}else for(var C=e.symbolInstanceStart;C=0&&(e.text.placedSymbolArray.get(c).crossTileID=a>=0&&c!==a?0:n.crossTileID)}},we.prototype.markUsedOrientation=function(e,r,n){for(var i=r===t.WritingMode.horizontal||r===t.WritingMode.horizontalOnly?r:0,a=r===t.WritingMode.vertical?r:0,o=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];o0||l>0,x=a.numIconVertices>0,b=i.placedOrientations[a.crossTileID],_=b===t.WritingMode.vertical,w=b===t.WritingMode.horizontal||b===t.WritingMode.horizontalOnly;if(y){var T=Pe(v.text),k=_?Ie:T;d(e.text,s,k);var A=w?Ie:T;d(e.text,l,A);var M=v.text.isHidden();[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach((function(t){t>=0&&(e.text.placedSymbolArray.get(t).hidden=M||_?1:0)})),a.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).hidden=M||w?1:0);var S=i.variableOffsets[a.crossTileID];S&&i.markUsedJustification(e,S.anchor,a,b);var E=i.placedOrientations[a.crossTileID];E&&(i.markUsedJustification(e,\"left\",a,E),i.markUsedOrientation(e,E,a))}if(x){var L=Pe(v.icon),C=!(h&&a.verticalPlacedIconSymbolIndex&&_);if(a.placedIconSymbolIndex>=0){var P=C?L:Ie;d(e.icon,a.numIconVertices,P),e.icon.placedSymbolArray.get(a.placedIconSymbolIndex).hidden=v.icon.isHidden()}if(a.verticalPlacedIconSymbolIndex>=0){var I=C?Ie:L;d(e.icon,a.numVerticalIconVertices,I),e.icon.placedSymbolArray.get(a.verticalPlacedIconSymbolIndex).hidden=v.icon.isHidden()}}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var O=e.collisionArrays[n];if(O){var z=new t.Point(0,0);if(O.textBox||O.verticalTextBox){var D=!0;if(c){var R=i.variableOffsets[g];R?(z=be(R.anchor,R.width,R.height,R.textOffset,R.textBoxScale),u&&z._rotate(f?i.transform.angle:-i.transform.angle)):D=!1}O.textBox&&Te(e.textCollisionBox.collisionVertexArray,v.text.placed,!D||_,z.x,z.y),O.verticalTextBox&&Te(e.textCollisionBox.collisionVertexArray,v.text.placed,!D||w,z.x,z.y)}var F=Boolean(!w&&O.verticalIconBox);O.iconBox&&Te(e.iconCollisionBox.collisionVertexArray,v.icon.placed,F,h?z.x:0,h?z.y:0),O.verticalIconBox&&Te(e.iconCollisionBox.collisionVertexArray,v.icon.placed,!F,h?z.x:0,h?z.y:0)}}},m=0;mt},we.prototype.setStale=function(){this.stale=!0};var ke=Math.pow(2,25),Ae=Math.pow(2,24),Me=Math.pow(2,17),Se=Math.pow(2,16),Ee=Math.pow(2,9),Le=Math.pow(2,8),Ce=Math.pow(2,1);function Pe(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*ke+e*Ae+r*Me+e*Se+r*Ee+e*Le+r*Ce+e}var Ie=0,Oe=function(t){this._sortAcrossTiles=\"viewport-y\"!==t.layout.get(\"symbol-z-order\")&&void 0!==t.layout.get(\"symbol-sort-key\").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Oe.prototype.continuePlacement=function(t,e,r,n,i){for(var a=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=r[e[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if(\"symbol\"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new Oe(s)),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},ze.prototype.commit=function(t){return this.placement.commit(t),this.placement};var De=512/t.EXTENT/2,Re=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;nt.overscaledZ)for(var s in o){var l=o[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,i)}else{var c=o[t.scaledTo(Number(a)).key];c&&c.findMatches(e.symbolInstances,t,i)}}for(var u=0;u1?\"@2x\":\"\",l=t.getJSON(r.transformRequest(r.normalizeSpriteURL(e,s,\".json\"),t.ResourceType.SpriteJSON),(function(t,e){l=null,o||(o=t,i=e,u())})),c=t.getImage(r.transformRequest(r.normalizeSpriteURL(e,s,\".png\"),t.ResourceType.SpriteImage),(function(t,e){c=null,o||(o=t,a=e,u())}));function u(){if(o)n(o);else if(i&&a){var e=t.browser.getImageData(a),r={};for(var s in i){var l=i[s],c=l.width,u=l.height,f=l.x,h=l.y,p=l.sdf,d=l.pixelRatio,g=l.stretchX,m=l.stretchY,v=l.content,y=new t.RGBAImage({width:c,height:u});t.RGBAImage.copy(e,y,{x:f,y:h},{x:0,y:0},{width:c,height:u}),r[s]={data:y,pixelRatio:d,sdf:p,stretchX:g,stretchY:m,content:v}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(e,this.map._requestManager,(function(e,n){if(r._spriteRequest=null,e)r.fire(new t.ErrorEvent(e));else if(n)for(var i in n)r.imageManager.addImage(i,n[i]);r.imageManager.setLoaded(!0),r._availableImages=r.imageManager.listImages(),r.dispatcher.broadcast(\"setImages\",r._availableImages),r.fire(new t.Event(\"data\",{dataType:\"style\"}))}))},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){for(var e=[],r=0,n=t;r0)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._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event(\"data\",{dataType:\"style\"}))},r.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},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._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event(\"data\",{dataType:\"style\"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(e,r,n){var i=this;if(void 0===n&&(n={}),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 Ct(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){void 0===n&&(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{var a;if(\"custom\"===e.type){if(je(this,t.validateCustomStyleLayer(e)))return;a=t.createStyleLayer(e)}else{if(\"object\"==typeof e.source&&(this.addSource(i,e.source),e=t.clone$1(e),e=t.extend(e,{source:i})),this._validate(t.validateStyle.layer,\"layers.\"+i,e,{arrayIndex:-1},n))return;a=t.createStyleLayer(e),this._validateLayer(a),a.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[a.id]=a.serialize()}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&&\"custom\"!==a.type){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),a.onAdd&&a.onAdd(this.map)}}},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._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}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.hasLayer=function(t){return t in this._layers},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,n){void 0===n&&(n={}),this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.deepEqual(i.filter,r))return null==r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(t.validateStyle.filter,\"layers.\"+i.id+\".filter\",r,null,n)||(i.filter=t.clone$1(r),this._updateLayer(i)))}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$1(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getLayoutProperty(r),n)||(a.setLayoutProperty(r,n,i),this._updateLayer(a)):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(e,r){var n=this.getLayer(e);if(n)return n.getLayoutProperty(r);this.fire(new t.ErrorEvent(new Error(\"The layer '\"+e+\"' does not exist in the map's style.\")))},r.prototype.setPaintProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getPaintProperty(r),n)||(a.setPaintProperty(r,n,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[e]=!0):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.setFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=e.sourceLayer,a=this.sourceCaches[n];if(void 0!==a){var o=a.getSource().type;\"geojson\"===o&&i?this.fire(new t.ErrorEvent(new Error(\"GeoJSON sources cannot have a sourceLayer parameter.\"))):\"vector\"!==o||i?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error(\"The feature id parameter must be provided.\"))),a.setFeatureState(i,e.id,r)):this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+n+\"' does not exist in the map's style.\")))},r.prototype.removeFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=this.sourceCaches[n];if(void 0!==i){var a=i.getSource().type,o=\"vector\"===a?e.sourceLayer:void 0;\"vector\"!==a||o?r&&\"string\"!=typeof e.id&&\"number\"!=typeof e.id?this.fire(new t.ErrorEvent(new Error(\"A feature id is requred to remove its specific state property.\"))):i.removeFeatureState(o,e.id,r):this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+n+\"' does not exist in the map's style.\")))},r.prototype.getFeatureState=function(e){this._checkLoaded();var r=e.source,n=e.sourceLayer,i=this.sourceCaches[r];if(void 0!==i){if(\"vector\"!==i.getSource().type||n)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error(\"The feature id parameter must be provided.\"))),i.getFeatureState(n,e.id);this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+r+\"' does not exist in the map's style.\")))},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){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._serializeLayers(this._order)},(function(t){return void 0!==t}))},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&\"raster\"!==this.sourceCaches[t.source].getSource().type&&(this._updatedSources[t.source]=\"reload\",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,r=function(t){return\"fill-extrusion\"===e._layers[t].type},n={},i=[],a=this._order.length-1;a>=0;a--){var o=this._order[a];if(r(o)){n[o]=a;for(var s=0,l=t;s=0;d--){var g=this._order[d];if(r(g))for(var m=i.length-1;m>=0;m--){var v=i[m].feature;if(n[v.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}\",\"attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}\"),tr=yr(\"varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}\",\"attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}\"),er=yr(\"uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}\",\"attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}\"),rr=yr(\"#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float opacity\\ngl_FragColor=color*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"attribute vec2 a_pos;uniform mat4 u_matrix;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float opacity\\ngl_Position=u_matrix*vec4(a_pos,0,1);}\"),nr=yr(\"varying vec2 v_pos;\\n#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 outline_color\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\\n#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 outline_color\\n#pragma mapbox: initialize lowp float opacity\\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}\"),ir=yr(\"uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}\"),ar=yr(\"uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}\"),or=yr(\"varying vec4 v_color;void main() {gl_FragColor=v_color;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\\n#pragma mapbox: define highp float base\\n#pragma mapbox: define highp float height\\n#pragma mapbox: define highp vec4 color\\nvoid main() {\\n#pragma mapbox: initialize highp float base\\n#pragma mapbox: initialize highp float height\\n#pragma mapbox: initialize highp vec4 color\\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}\"),sr=yr(\"uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float base\\n#pragma mapbox: initialize lowp float height\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float base\\n#pragma mapbox: initialize lowp float height\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\\n? a_pos\\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}\"),lr=yr(\"#ifdef GL_ES\\nprecision highp float;\\n#endif\\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}\"),cr=yr(\"uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\\n#define PI 3.141592653589793\\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}\"),ur=yr(\"uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\\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\\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\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}\"),fr=yr(\"uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define MAX_LINE_DISTANCE 32767.0\\n#define scale 0.015873016\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\\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\\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\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}\"),hr=yr(\"uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\\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#pragma mapbox: define lowp float floorwidth\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\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#pragma mapbox: initialize lowp float floorwidth\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}\"),pr=yr(\"uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\\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\\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\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\\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\\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\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}\"),dr=yr(\"uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}\"),gr=yr(\"uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}\"),mr=yr(\"#define SDF_PX 8.0\\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\\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\\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\\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\\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\\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\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}\"),vr=yr(\"#define SDF_PX 8.0\\n#define SDF 1.0\\n#define ICON 0.0\\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\\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\\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\\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\\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\\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\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}\");function yr(t,e){var r=/#pragma mapbox: ([\\w]+) ([\\w]+) ([\\w]+) ([\\w]+)/g,n={};return{fragmentSource:t=t.replace(r,(function(t,e,r,i,a){return n[a]=!0,\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nvarying \"+r+\" \"+i+\" \"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"\\n#ifdef HAS_UNIFORM_u_\"+a+\"\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\"})),vertexSource:e=e.replace(r,(function(t,e,r,i,a){var o=\"float\"===i?\"vec2\":\"vec4\",s=a.match(/color/)?\"color\":o;return n[a]?\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nuniform lowp float u_\"+a+\"_t;\\nattribute \"+r+\" \"+o+\" a_\"+a+\";\\nvarying \"+r+\" \"+i+\" \"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"vec4\"===s?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+a+\" = a_\"+a+\";\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+a+\" = unpack_mix_\"+s+\"(a_\"+a+\", u_\"+a+\"_t);\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nuniform lowp float u_\"+a+\"_t;\\nattribute \"+r+\" \"+o+\" a_\"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"vec4\"===s?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+r+\" \"+i+\" \"+a+\" = a_\"+a+\";\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+r+\" \"+i+\" \"+a+\" = unpack_mix_\"+s+\"(a_\"+a+\", u_\"+a+\"_t);\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\"}))}}var xr=Object.freeze({__proto__:null,prelude:Ye,background:We,backgroundPattern:Xe,circle:Ze,clippingMask:Je,heatmap:Ke,heatmapTexture:Qe,collisionBox:$e,collisionCircle:tr,debug:er,fill:rr,fillOutline:nr,fillOutlinePattern:ir,fillPattern:ar,fillExtrusion:or,fillExtrusionPattern:sr,hillshadePrepare:lr,hillshade:cr,line:ur,lineGradient:fr,linePattern:hr,lineSDF:pr,raster:dr,symbolIcon:gr,symbolSDF:mr,symbolTextAndIcon:vr}),br=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};br.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>16,s>>16],u_pixel_coord_lower:[65535&o,65535&s]}}_r.prototype.draw=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g){var m,v=t.gl;if(!this.failedToCreate){for(var y in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(n),t.setColorMode(i),t.setCullFace(a),this.fixedUniforms)this.fixedUniforms[y].set(o[y]);p&&p.setUniforms(t,this.binderUniforms,f,{zoom:h});for(var x=(m={},m[v.LINES]=2,m[v.TRIANGLES]=3,m[v.LINE_STRIP]=1,m)[e],b=0,_=u.get();b<_.length;b+=1){var w=_[b],T=w.vaos||(w.vaos={});(T[s]||(T[s]=new br)).bind(t,this,l,p?p.getPaintVertexBuffers():[],c,w.vertexOffset,d,g),v.drawElements(e,w.primitiveLength*x,v.UNSIGNED_SHORT,w.primitiveOffset*x*2)}}};var Tr=function(e,r,n,i){var a=r.style.light,o=a.properties.get(\"position\"),s=[o.x,o.y,o.z],l=t.create$1();\"viewport\"===a.properties.get(\"anchor\")&&t.fromRotation(l,-r.transform.angle),t.transformMat3(s,s,l);var c=a.properties.get(\"color\");return{u_matrix:e,u_lightpos:s,u_lightintensity:a.properties.get(\"intensity\"),u_lightcolor:[c.r,c.g,c.b],u_vertical_gradient:+n,u_opacity:i}},kr=function(e,r,n,i,a,o,s){return t.extend(Tr(e,r,n,i),wr(o,r,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8})},Ar=function(t){return{u_matrix:t}},Mr=function(e,r,n,i){return t.extend(Ar(e),wr(n,r,i))},Sr=function(t,e){return{u_matrix:t,u_world:e}},Er=function(e,r,n,i,a){return t.extend(Mr(e,r,n,i),{u_world:a})},Lr=function(e,r,n,i){var a,o,s=e.transform;if(\"map\"===i.paint.get(\"circle-pitch-alignment\")){var l=pe(n,1,s.zoom);a=!0,o=[l,l]}else a=!1,o=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+(\"map\"===i.paint.get(\"circle-pitch-scale\")),u_matrix:e.translatePosMatrix(r.posMatrix,n,i.paint.get(\"circle-translate\"),i.paint.get(\"circle-translate-anchor\")),u_pitch_with_map:+a,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:o}},Cr=function(t,e,r){var n=pe(r,1,e.zoom),i=Math.pow(2,e.zoom-r.tileID.overscaledZ),a=r.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:n,u_extrude_scale:[e.pixelsToGLUnits[0]/(n*i),e.pixelsToGLUnits[1]/(n*i)],u_overscale_factor:a}},Pr=function(t,e,r){return{u_matrix:t,u_inv_matrix:e,u_camera_to_center_distance:r.cameraToCenterDistance,u_viewport_size:[r.width,r.height]}},Ir=function(t,e,r){return void 0===r&&(r=1),{u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:r}},Or=function(t){return{u_matrix:t}},zr=function(t,e,r,n){return{u_matrix:t,u_extrude_scale:pe(e,1,r),u_intensity:n}};function Dr(e,r){var n=Math.pow(2,r.canonical.z),i=r.canonical.y;return[new t.MercatorCoordinate(0,i/n).toLngLat().lat,new t.MercatorCoordinate(0,(i+1)/n).toLngLat().lat]}var Rr=function(e,r,n){var i=e.transform;return{u_matrix:Ur(e,r,n),u_ratio:1/pe(r,1,i.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Fr=function(e,r,n){return t.extend(Rr(e,r,n),{u_image:0})},Br=function(e,r,n,i){var a=e.transform,o=jr(r,a);return{u_matrix:Ur(e,r,n),u_texsize:r.imageAtlasTexture.size,u_ratio:1/pe(r,1,a.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[o,i.fromScale,i.toScale],u_fade:i.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},Nr=function(e,r,n,i,a){var o=e.transform,s=e.lineAtlas,l=jr(r,o),c=\"round\"===n.layout.get(\"line-cap\"),u=s.getDash(i.from,c),f=s.getDash(i.to,c),h=u.width*a.fromScale,p=f.width*a.toScale;return t.extend(Rr(e,r,n),{u_patternscale_a:[l/h,-u.height/2],u_patternscale_b:[l/p,-f.height/2],u_sdfgamma:s.width/(256*Math.min(h,p)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:f.y,u_mix:a.t})};function jr(t,e){return 1/pe(t,1,e.tileZoom)}function Ur(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get(\"line-translate\"),r.paint.get(\"line-translate-anchor\"))}var Vr=function(t,e,r,n,i){return{u_matrix:t,u_tl_parent:e,u_scale_parent:r,u_buffer_scale:1,u_fade_t:n.mix,u_opacity:n.opacity*i.paint.get(\"raster-opacity\"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get(\"raster-brightness-min\"),u_brightness_high:i.paint.get(\"raster-brightness-max\"),u_saturation_factor:(o=i.paint.get(\"raster-saturation\"),o>0?1-1/(1.001-o):-o),u_contrast_factor:(a=i.paint.get(\"raster-contrast\"),a>0?1/(1-a):1+a),u_spin_weights:Hr(i.paint.get(\"raster-hue-rotate\"))};var a,o};function Hr(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]}var qr,Gr=function(t,e,r,n,i,a,o,s,l,c){var u=i.transform;return{u_is_size_zoom_constant:+(\"constant\"===t||\"source\"===t),u_is_size_feature_constant:+(\"constant\"===t||\"camera\"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:u.cameraToCenterDistance,u_pitch:u.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:u.width/u.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:a,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:c,u_texture:0}},Yr=function(e,r,n,i,a,o,s,l,c,u,f){var h=a.transform;return t.extend(Gr(e,r,n,i,a,o,s,l,c,u),{u_gamma_scale:i?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+f})},Wr=function(e,r,n,i,a,o,s,l,c,u){return t.extend(Yr(e,r,n,i,a,o,s,l,!0,c,!0),{u_texsize_icon:u,u_texture_icon:1})},Xr=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Zr=function(e,r,n,i,a,o){return t.extend(function(t,e,r,n){var i=r.imageManager.getPattern(t.from.toString()),a=r.imageManager.getPattern(t.to.toString()),o=r.imageManager.getPixelSize(),s=o.width,l=o.height,c=Math.pow(2,n.tileID.overscaledZ),u=n.tileSize*Math.pow(2,r.transform.tileZoom)/c,f=u*(n.tileID.canonical.x+n.tileID.wrap*c),h=u*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[s,l],u_mix:e.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/pe(n,1,r.transform.tileZoom),u_pixel_coord_upper:[f>>16,h>>16],u_pixel_coord_lower:[65535&f,65535&h]}}(i,o,n,a),{u_matrix:e,u_opacity:r})},Jr={fillExtrusion:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fillExtrusionPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,r.u_height_factor),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fill:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},fillPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},fillOutline:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world)}},fillOutlinePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},circle:function(e,r){return{u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,r.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},collisionBox:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,r.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,r.u_overscale_factor)}},collisionCircle:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,r.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,r.u_viewport_size)}},debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_overlay:new t.Uniform1i(e,r.u_overlay),u_overlay_scale:new t.Uniform1f(e,r.u_overlay_scale)}},clippingMask:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmap:function(e,r){return{u_extrude_scale:new t.Uniform1f(e,r.u_extrude_scale),u_intensity:new t.Uniform1f(e,r.u_intensity),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmapTexture:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_color_ramp:new t.Uniform1i(e,r.u_color_ramp),u_opacity:new t.Uniform1f(e,r.u_opacity)}},hillshade:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_latrange:new t.Uniform2f(e,r.u_latrange),u_light:new t.Uniform2f(e,r.u_light),u_shadow:new t.UniformColor(e,r.u_shadow),u_highlight:new t.UniformColor(e,r.u_highlight),u_accent:new t.UniformColor(e,r.u_accent)}},hillshadePrepare:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_dimension:new t.Uniform2f(e,r.u_dimension),u_zoom:new t.Uniform1f(e,r.u_zoom),u_maxzoom:new t.Uniform1f(e,r.u_maxzoom),u_unpack:new t.Uniform4f(e,r.u_unpack)}},line:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels)}},lineGradient:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_image:new t.Uniform1i(e,r.u_image)}},linePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_texsize:new t.Uniform2f(e,r.u_texsize),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_image:new t.Uniform1i(e,r.u_image),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},lineSDF:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,r.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,r.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,r.u_sdfgamma),u_image:new t.Uniform1i(e,r.u_image),u_tex_y_a:new t.Uniform1f(e,r.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,r.u_tex_y_b),u_mix:new t.Uniform1f(e,r.u_mix)}},raster:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_tl_parent:new t.Uniform2f(e,r.u_tl_parent),u_scale_parent:new t.Uniform1f(e,r.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,r.u_buffer_scale),u_fade_t:new t.Uniform1f(e,r.u_fade_t),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image0:new t.Uniform1i(e,r.u_image0),u_image1:new t.Uniform1i(e,r.u_image1),u_brightness_low:new t.Uniform1f(e,r.u_brightness_low),u_brightness_high:new t.Uniform1f(e,r.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,r.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,r.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,r.u_spin_weights)}},symbolIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture)}},symbolSDF:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},symbolTextAndIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texsize_icon:new t.Uniform2f(e,r.u_texsize_icon),u_texture:new t.Uniform1i(e,r.u_texture),u_texture_icon:new t.Uniform1i(e,r.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},background:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_color:new t.UniformColor(e,r.u_color)}},backgroundPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image:new t.Uniform1i(e,r.u_image),u_pattern_tl_a:new t.Uniform2f(e,r.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,r.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,r.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,r.u_pattern_br_b),u_texsize:new t.Uniform2f(e,r.u_texsize),u_mix:new t.Uniform1f(e,r.u_mix),u_pattern_size_a:new t.Uniform2f(e,r.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,r.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,r.u_scale_a),u_scale_b:new t.Uniform1f(e,r.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,r.u_tile_units_to_pixels)}}};function Kr(e,r,n,i,a,o,s){for(var l=e.context,c=l.gl,u=e.useProgram(\"collisionBox\"),f=[],h=0,p=0,d=0;d0){var _=t.create(),w=y;t.mul(_,v.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(_,_,v.placementViewportMatrix),f.push({circleArray:b,circleOffset:p,transform:w,invTransform:_}),p=h+=b.length/4}x&&u.draw(l,c.LINES,At.disabled,Mt.disabled,e.colorModeForRenderPass(),Et.disabled,Cr(y,e.transform,m),n.id,x.layoutVertexBuffer,x.indexBuffer,x.segments,null,e.transform.zoom,null,null,x.collisionVertexBuffer)}}if(s&&f.length){var T=e.useProgram(\"collisionCircle\"),k=new t.StructArrayLayout2f1f2i16;k.resize(4*h),k._trim();for(var A=0,M=0,S=f;M=0&&(g[v.associatedIconIndex]={shiftedAnchor:S,angle:E})}else ue(v.numGlyphs,p)}if(f){d.clear();for(var C=e.icon.placedSymbolArray,P=0;P0){var s=t.browser.now(),l=(s-e.timeAdded)/o,c=r?(s-r.timeAdded)/o:-1,u=n.getSource(),f=a.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),h=!r||Math.abs(r.tileID.overscaledZ-f)>Math.abs(e.tileID.overscaledZ-f),p=h&&e.refreshedUponExpiration?1:t.clamp(h?l:1-c,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-p}:{opacity:p,mix:0}}return{opacity:1,mix:0}}var un=new t.Color(1,0,0,1),fn=new t.Color(0,1,0,1),hn=new t.Color(0,0,1,1),pn=new t.Color(1,0,1,1),dn=new t.Color(0,1,1,1);function gn(t){var e=t.transform.padding;mn(t,t.transform.height-(e.top||0),3,un),mn(t,e.bottom||0,3,fn),vn(t,e.left||0,3,hn),vn(t,t.transform.width-(e.right||0),3,pn);var r=t.transform.centerPoint;!function(t,e,r,n){yn(t,e-1,r-10,2,20,n),yn(t,e-10,r-1,20,2,n)}(t,r.x,t.transform.height-r.y,dn)}function mn(t,e,r,n){yn(t,0,e+r/2,t.transform.width,r,n)}function vn(t,e,r,n){yn(t,e-r/2,0,r,t.transform.height,n)}function yn(e,r,n,i,a,o){var s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*t.browser.devicePixelRatio,n*t.browser.devicePixelRatio,i*t.browser.devicePixelRatio,a*t.browser.devicePixelRatio),s.clear({color:o}),l.disable(l.SCISSOR_TEST)}function xn(e,r,n){var i=e.context,a=i.gl,o=n.posMatrix,s=e.useProgram(\"debug\"),l=At.disabled,c=Mt.disabled,u=e.colorModeForRenderPass();i.activeTexture.set(a.TEXTURE0),e.emptyTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE),s.draw(i,a.LINE_STRIP,l,c,u,Et.disabled,Ir(o,t.Color.red),\"$debug\",e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);var f=r.getTileByID(n.key).latestRawTileData,h=f&&f.byteLength||0,p=Math.floor(h/1024),d=r.getTile(n).tileSize,g=512/Math.min(d,512)*(n.overscaledZ/e.transform.zoom)*.5,m=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(m+=\" => \"+n.overscaledZ),function(t,e){t.initDebugOverlayCanvas();var r=t.debugOverlayCanvas,n=t.context.gl,i=t.debugOverlayCanvas.getContext(\"2d\");i.clearRect(0,0,r.width,r.height),i.shadowColor=\"white\",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle=\"white\",i.textBaseline=\"top\",i.font=\"bold 36px Open Sans, sans-serif\",i.fillText(e,5,5),i.strokeText(e,5,5),t.debugOverlayTexture.update(r),t.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}(e,m+\" \"+p+\"kb\"),s.draw(i,a.TRIANGLES,l,c,St.alphaBlended,Et.disabled,Ir(o,t.Color.transparent,g),\"$debug\",e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}var bn={symbol:function(e,r,n,i,a){if(\"translucent\"===e.renderPass){var o=Mt.disabled,s=e.colorModeForRenderPass();n.layout.get(\"text-variable-anchor\")&&function(e,r,n,i,a,o,s){for(var l=r.transform,c=\"map\"===a,u=\"map\"===o,f=0,h=e;f256&&this.clearStencil(),r.setColorMode(St.disabled),r.setDepthMode(At.disabled);var i=this.useProgram(\"clippingMask\");this._tileClippingMaskIDs={};for(var a=0,o=e;a256&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new Mt({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},_n.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Mt({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},_n.prototype.stencilConfigForOverlap=function(t){var e,r=this.context.gl,n=t.sort((function(t,e){return e.overscaledZ-t.overscaledZ})),i=n[n.length-1].overscaledZ,a=n[0].overscaledZ-i+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();for(var o={},s=0;s=0;this.currentLayer--){var w=this.style._layers[i[this.currentLayer]],T=a[w.source],k=u[w.source];this._renderTileClippingMasks(w,k),this.renderLayer(this,T,w,k)}for(this.renderPass=\"translucent\",this.currentLayer=0;this.currentLayer0?e.pop():null},_n.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),r=this.imageManager.getPattern(t.to.toString());return!e||!r},_n.prototype.useProgram=function(t,e){this.cache=this.cache||{};var r=\"\"+t+(e?e.cacheKey:\"\")+(this._showOverdrawInspector?\"/overdraw\":\"\");return this.cache[r]||(this.cache[r]=new _r(this.context,xr[t],e,Jr[t],this._showOverdrawInspector)),this.cache[r]},_n.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},_n.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)},_n.prototype.initDebugOverlayCanvas=function(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=t.window.document.createElement(\"canvas\"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var e=this.context.gl;this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,e.RGBA)}},_n.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var wn=function(t,e){this.points=t,this.planes=e};wn.fromInvProjectionMatrix=function(e,r,n){var i=Math.pow(2,n),a=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((function(r){return t.transformMat4([],r,e)})).map((function(e){return t.scale$1([],e,1/e[3]/r*i)})),o=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(e){var r=t.sub([],a[e[0]],a[e[1]]),n=t.sub([],a[e[2]],a[e[1]]),i=t.normalize([],t.cross([],r,n)),o=-t.dot(i,a[e[1]]);return i.concat(o)}));return new wn(a,o)};var Tn=function(e,r){this.min=e,this.max=r,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};Tn.prototype.quadrant=function(e){for(var r=[e%2==0,e<2],n=t.clone$2(this.min),i=t.clone$2(this.max),a=0;a=0;if(0===o)return 0;o!==r.length&&(n=!1)}if(n)return 2;for(var l=0;l<3;l++){for(var c=Number.MAX_VALUE,u=-Number.MAX_VALUE,f=0;fthis.max[l]-this.min[l])return 0}return 1};var kn=function(t,e,r,n){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),isNaN(t)||t<0||isNaN(e)||e<0||isNaN(r)||r<0||isNaN(n)||n<0)throw new Error(\"Invalid value for edge-insets, top, bottom, left and right must all be numbers\");this.top=t,this.bottom=e,this.left=r,this.right=n};kn.prototype.interpolate=function(e,r,n){return null!=r.top&&null!=e.top&&(this.top=t.number(e.top,r.top,n)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,r.bottom,n)),null!=r.left&&null!=e.left&&(this.left=t.number(e.left,r.left,n)),null!=r.right&&null!=e.right&&(this.right=t.number(e.right,r.right,n)),this},kn.prototype.getCenter=function(e,r){var n=t.clamp((this.left+e-this.right)/2,0,e),i=t.clamp((this.top+r-this.bottom)/2,0,r);return new t.Point(n,i)},kn.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},kn.prototype.clone=function(){return new kn(this.top,this.bottom,this.left,this.right)},kn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var An=function(e,r,n,i,a){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===a||a,this._minZoom=e||0,this._maxZoom=r||22,this._minPitch=null==n?0:n,this._maxPitch=null==i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new kn,this._posMatrixCache={},this._alignedPosMatrixCache={}},Mn={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};An.prototype.clone=function(){var t=new An(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,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._edgeInsets=this._edgeInsets.clone(),t._calcMatrices(),t},Mn.minZoom.get=function(){return this._minZoom},Mn.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Mn.maxZoom.get=function(){return this._maxZoom},Mn.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Mn.minPitch.get=function(){return this._minPitch},Mn.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},Mn.maxPitch.get=function(){return this._maxPitch},Mn.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},Mn.renderWorldCopies.get=function(){return this._renderWorldCopies},Mn.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},Mn.worldSize.get=function(){return this.tileSize*this.scale},Mn.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Mn.size.get=function(){return new t.Point(this.width,this.height)},Mn.bearing.get=function(){return-this.angle/Math.PI*180},Mn.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=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Mn.pitch.get=function(){return this._pitch/Math.PI*180},Mn.pitch.set=function(e){var r=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},Mn.fov.get=function(){return this._fov/Math.PI*180},Mn.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())},Mn.zoom.get=function(){return this._zoom},Mn.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())},Mn.center.get=function(){return this._center},Mn.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Mn.padding.get=function(){return this._edgeInsets.toJSON()},Mn.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},Mn.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},An.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},An.prototype.interpolatePadding=function(t,e,r){this._unmodified=!1,this._edgeInsets.interpolate(t,e,r),this._constrain(),this._calcMatrices()},An.prototype.coveringZoomLevel=function(t){var e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)},An.prototype.getVisibleUnwrappedCoordinates=function(e){var r=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new t.Point(0,0)),i=this.pointCoordinate(new t.Point(this.width,0)),a=this.pointCoordinate(new t.Point(this.width,this.height)),o=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(n.x,i.x,a.x,o.x)),l=Math.floor(Math.max(n.x,i.x,a.x,o.x)),c=s-1;c<=l+1;c++)0!==c&&r.push(new t.UnwrappedTileID(c,e));return r},An.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&&re.maxzoom&&(r=e.maxzoom);var i=t.MercatorCoordinate.fromLngLat(this.center),a=Math.pow(2,r),o=[a*i.x,a*i.y,0],s=wn.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),l=e.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=r);var c=function(t){return{aabb:new Tn([t*a,0,0],[(t+1)*a,a,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}},u=[],f=[],h=r,p=e.reparseOverscaled?n:r;if(this._renderWorldCopies)for(var d=1;d<=3;d++)u.push(c(-d)),u.push(c(d));for(u.push(c(0));u.length>0;){var g=u.pop(),m=g.x,v=g.y,y=g.fullyVisible;if(!y){var x=g.aabb.intersects(s);if(0===x)continue;y=2===x}var b=g.aabb.distanceX(o),_=g.aabb.distanceY(o),w=Math.max(Math.abs(b),Math.abs(_)),T=3+(1<T&&g.zoom>=l)f.push({tileID:new t.OverscaledTileID(g.zoom===h?p:g.zoom,g.wrap,g.zoom,m,v),distanceSq:t.sqrLen([o[0]-.5-m,o[1]-.5-v])});else for(var k=0;k<4;k++){var A=(m<<1)+k%2,M=(v<<1)+(k>>1);u.push({aabb:g.aabb.quadrant(k),zoom:g.zoom+1,x:A,y:M,wrap:g.wrap,fullyVisible:y})}}return f.sort((function(t,e){return t.distanceSq-e.distanceSq})).map((function(t){return t.tileID}))},An.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Mn.unmodified.get=function(){return this._unmodified},An.prototype.zoomScale=function(t){return Math.pow(2,t)},An.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},An.prototype.project=function(e){var r=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(r)*this.worldSize)},An.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},Mn.point.get=function(){return this.project(this.center)},An.prototype.setLocationAtPoint=function(e,r){var n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),a=this.locationCoordinate(e),o=new t.MercatorCoordinate(a.x-(n.x-i.x),a.y-(n.y-i.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())},An.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},An.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},An.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},An.prototype.coordinateLocation=function(t){return t.toLngLat()},An.prototype.pointCoordinate=function(e){var r=[e.x,e.y,0,1],n=[e.x,e.y,1,1];t.transformMat4(r,r,this.pixelMatrixInverse),t.transformMat4(n,n,this.pixelMatrixInverse);var i=r[3],a=n[3],o=r[0]/i,s=n[0]/a,l=r[1]/i,c=n[1]/a,u=r[2]/i,f=n[2]/a,h=u===f?0:(0-u)/(f-u);return new t.MercatorCoordinate(t.number(o,s,h)/this.worldSize,t.number(l,c,h)/this.worldSize)},An.prototype.coordinatePoint=function(e){var r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix),new t.Point(r[0]/r[3],r[1]/r[3])},An.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},An.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},An.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},An.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=t.identity(new Float64Array(16));return t.translate(l,l,[s*o,a.y*o,0]),t.scale(l,l,[o/t.EXTENT,o/t.EXTENT,1]),t.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},An.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},An.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=t.mercatorYfromLat(f[1])*this.worldSize,e=(o=t.mercatorYfromLat(f[0])*this.worldSize)-ao&&(i=o-m)}if(this.lngRange){var v=p.x,y=c.x/2;v-yl&&(n=l-y)}void 0===n&&void 0===i||(this.center=this.unproject(new t.Point(void 0!==n?n:p.x,void 0!==i?i:p.y))),this._unmodified=u,this._constraining=!1}},An.prototype._calcMatrices=function(){if(this.height){var e=this._fov/2,r=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(e)*this.height;var n=Math.PI/2+this._pitch,i=this._fov*(.5+r.y/this.height),a=Math.sin(i)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-n-i,.01,Math.PI-.01)),o=this.point,s=o.x,l=o.y,c=1.01*(Math.cos(Math.PI/2-this._pitch)*a+this.cameraToCenterDistance),u=this.height/50,f=new Float64Array(16);t.perspective(f,this._fov,this.width/this.height,u,c),f[8]=2*-r.x/this.width,f[9]=2*r.y/this.height,t.scale(f,f,[1,-1,1]),t.translate(f,f,[0,0,-this.cameraToCenterDistance]),t.rotateX(f,f,this._pitch),t.rotateZ(f,f,this.angle),t.translate(f,f,[-s,-l,0]),this.mercatorMatrix=t.scale([],f,[this.worldSize,this.worldSize,this.worldSize]),t.scale(f,f,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=f,this.invProjMatrix=t.invert([],this.projMatrix);var h=this.width%2/2,p=this.height%2/2,d=Math.cos(this.angle),g=Math.sin(this.angle),m=s-Math.round(s)+d*h+g*p,v=l-Math.round(l)+d*p+g*h,y=new Float64Array(f);if(t.translate(y,y,[m>.5?m-1:m,v>.5?v-1:v,0]),this.alignedProjMatrix=y,f=t.create(),t.scale(f,f,[this.width/2,-this.height/2,1]),t.translate(f,f,[1,-1,0]),this.labelPlaneMatrix=f,f=t.create(),t.scale(f,f,[1,-1,1]),t.translate(f,f,[-1,-1,0]),t.scale(f,f,[2/this.width,2/this.height,1]),this.glCoordMatrix=f,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(f=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error(\"failed to invert matrix\");this.pixelMatrixInverse=f,this._posMatrixCache={},this._alignedPosMatrixCache={}}},An.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},An.prototype.getCameraPoint=function(){var e=this._pitch,r=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,r))},An.prototype.getCameraQueryGeometry=function(e){var r=this.getCameraPoint();if(1===e.length)return[e[0],r];for(var n=r.x,i=r.y,a=r.x,o=r.y,s=0,l=e;s=3&&!t.some((function(t){return isNaN(t)}))){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0}return!1},Sn.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,\"\",e)}catch(t){}};var En={linearity:.3,easing:t.bezier(0,0,.3,1)},Ln=t.extend({deceleration:2500,maxSpeed:1400},En),Cn=t.extend({deceleration:20,maxSpeed:1400},En),Pn=t.extend({deceleration:1e3,maxSpeed:360},En),In=t.extend({deceleration:1e3,maxSpeed:90},En),On=function(t){this._map=t,this.clear()};function zn(t,e){(!t.duration||t.duration0&&r-e[0].time>160;)e.shift()},On.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var r={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},n=0,i=this._inertiaBuffer;n=this._clickTolerance||this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.dblclick=function(t){return this._firePreventable(new Rn(t.type,this._map,t))},Nn.prototype.mouseover=function(t){this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.mouseout=function(t){this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.touchstart=function(t){return this._firePreventable(new Fn(t.type,this._map,t))},Nn.prototype.touchmove=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype.touchend=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype.touchcancel=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Nn.prototype.isEnabled=function(){return!0},Nn.prototype.isActive=function(){return!1},Nn.prototype.enable=function(){},Nn.prototype.disable=function(){};var jn=function(t){this._map=t};jn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},jn.prototype.mousemove=function(t){this._map.fire(new Rn(t.type,this._map,t))},jn.prototype.mousedown=function(){this._delayContextMenu=!0},jn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Rn(\"contextmenu\",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},jn.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new Rn(t.type,this._map,t)),this._map.listens(\"contextmenu\")&&t.preventDefault()},jn.prototype.isEnabled=function(){return!0},jn.prototype.isActive=function(){return!1},jn.prototype.enable=function(){},jn.prototype.disable=function(){};var Un=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1};function Vn(t,e){for(var r={},n=0;nthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),n.length===this.numTouches&&(this.centroid=function(e){for(var r=new t.Point(0,0),n=0,i=e;n30)&&(this.aborted=!0)}}},Hn.prototype.touchend=function(t,e,r){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){var n=!this.aborted&&this.centroid;if(this.reset(),n)return n}};var qn=function(t){this.singleTap=new Hn(t),this.numTaps=t.numTaps,this.reset()};qn.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},qn.prototype.touchstart=function(t,e,r){this.singleTap.touchstart(t,e,r)},qn.prototype.touchmove=function(t,e,r){this.singleTap.touchmove(t,e,r)},qn.prototype.touchend=function(t,e,r){var n=this.singleTap.touchend(t,e,r);if(n){var i=t.timeStamp-this.lastTime<500,a=!this.lastTap||this.lastTap.dist(n)<30;if(i&&a||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}};var Gn=function(){this._zoomIn=new qn({numTouches:1,numTaps:2}),this._zoomOut=new qn({numTouches:2,numTaps:1}),this.reset()};Gn.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Gn.prototype.touchstart=function(t,e,r){this._zoomIn.touchstart(t,e,r),this._zoomOut.touchstart(t,e,r)},Gn.prototype.touchmove=function(t,e,r){this._zoomIn.touchmove(t,e,r),this._zoomOut.touchmove(t,e,r)},Gn.prototype.touchend=function(t,e,r){var n=this,i=this._zoomIn.touchend(t,e,r),a=this._zoomOut.touchend(t,e,r);return i?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(i)},{originalEvent:t})}}):a?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(a)},{originalEvent:t})}}):void 0},Gn.prototype.touchcancel=function(){this.reset()},Gn.prototype.enable=function(){this._enabled=!0},Gn.prototype.disable=function(){this._enabled=!1,this.reset()},Gn.prototype.isEnabled=function(){return this._enabled},Gn.prototype.isActive=function(){return this._active};var Yn=function(t){this.reset(),this._clickTolerance=t.clickTolerance||1};Yn.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Yn.prototype._correctButton=function(t,e){return!1},Yn.prototype._move=function(t,e){return{}},Yn.prototype.mousedown=function(t,e){if(!this._lastPoint){var n=r.mouseButton(t);this._correctButton(t,n)&&(this._lastPoint=e,this._eventButton=n)}},Yn.prototype.mousemoveWindow=function(t,e){var r=this._lastPoint;if(r&&(t.preventDefault(),this._moved||!(e.dist(r)0&&(this._active=!0);var i=Vn(n,r),a=new t.Point(0,0),o=new t.Point(0,0),s=0;for(var l in i){var c=i[l],u=this._touches[l];u&&(a._add(c),o._add(c.sub(u)),s++,i[l]=c)}if(this._touches=i,!(sMath.abs(t.x)}var ii=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.reset=function(){t.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},e.prototype._start=function(t){this._lastPoints=t,ni(t[0].sub(t[1]))&&(this._valid=!1)},e.prototype._move=function(t,e,r){var n=t[0].sub(this._lastPoints[0]),i=t[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid){this._lastPoints=t,this._active=!0;return{pitchDelta:-.5*((n.y+i.y)/2)}}},e.prototype.gestureBeginsVertically=function(t,e,r){if(void 0!==this._valid)return this._valid;var n=t.mag()>=2,i=e.mag()>=2;if(n||i){if(!n||!i)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;var a=t.y>0==e.y>0;return ni(t)&&ni(e)&&a}},e}(Kn),ai={panStep:100,bearingStep:15,pitchStep:10},oi=function(){var t=ai;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep};function si(t){return t*(2-t)}oi.prototype.reset=function(){this._active=!1},oi.prototype.keydown=function(t){var e=this;if(!(t.altKey||t.ctrlKey||t.metaKey)){var r=0,n=0,i=0,a=0,o=0;switch(t.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:t.shiftKey?n=-1:(t.preventDefault(),a=-1);break;case 39:t.shiftKey?n=1:(t.preventDefault(),a=1);break;case 38:t.shiftKey?i=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?i=-1:(t.preventDefault(),o=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:\"keyboardHandler\",easing:si,zoom:r?Math.round(l)+r*(t.shiftKey?2:1):l,bearing:s.getBearing()+n*e._bearingStep,pitch:s.getPitch()+i*e._pitchStep,offset:[-a*e._panStep,-o*e._panStep],center:s.getCenter()},{originalEvent:t})}}}},oi.prototype.enable=function(){this._enabled=!0},oi.prototype.disable=function(){this._enabled=!1,this.reset()},oi.prototype.isEnabled=function(){return this._enabled},oi.prototype.isActive=function(){return this._active};var li=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll([\"_onWheel\",\"_onTimeout\",\"_onScrollFrame\",\"_onScrollFinished\"],this)};li.prototype.setZoomRate=function(t){this._defaultZoomRate=t},li.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},li.prototype.isEnabled=function(){return!!this._enabled},li.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},li.prototype.isZooming=function(){return!!this._zooming},li.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&\"center\"===t.around)},li.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},li.prototype.wheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=t.browser.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._active||this._start(e)),e.preventDefault()}},li.prototype._onTimeout=function(t){this._type=\"wheel\",this._delta-=this._lastValue,this._active||this._start(t)},li.prototype._start=function(e){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var n=r.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},li.prototype.renderFrame=function(){return this._onScrollFrame()},li.prototype._onScrollFrame=function(){var e=this;if(this._frameId&&(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?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var a=\"number\"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(a*i))),\"wheel\"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o,s=\"number\"==typeof this._targetZoom?this._targetZoom:r.zoom,l=this._startZoom,c=this._easing,u=!1;if(\"wheel\"===this._type&&l&&c){var f=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=c(f);o=t.number(l,s,h),f<1?this._frameId||(this._frameId=!0):u=!0}else o=s,u=!0;return this._active=!0,u&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!u,zoomDelta:o-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},li.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var n=this._prevEase,i=(t.browser.now()-n.start)/n.duration,a=n.easing(i+.01)-n.easing(i),o=.27/Math.sqrt(a*a+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=t.bezier(o,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:r},r},li.prototype.reset=function(){this._active=!1};var ci=function(t,e){this._clickZoom=t,this._tapZoom=e};ci.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ci.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ci.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ci.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ui=function(){this.reset()};ui.prototype.reset=function(){this._active=!1},ui.prototype.dblclick=function(t,e){return t.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(t.shiftKey?-1:1),around:r.unproject(e)},{originalEvent:t})}}},ui.prototype.enable=function(){this._enabled=!0},ui.prototype.disable=function(){this._enabled=!1,this.reset()},ui.prototype.isEnabled=function(){return this._enabled},ui.prototype.isActive=function(){return this._active};var fi=function(){this._tap=new qn({numTouches:1,numTaps:1}),this.reset()};fi.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},fi.prototype.touchstart=function(t,e,r){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=e[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(t,e,r))},fi.prototype.touchmove=function(t,e,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;var n=e[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,t.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(t,e,r)},fi.prototype.touchend=function(t,e,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(t,e,r)&&(this._tapTime=t.timeStamp)},fi.prototype.touchcancel=function(){this.reset()},fi.prototype.enable=function(){this._enabled=!0},fi.prototype.disable=function(){this._enabled=!1,this.reset()},fi.prototype.isEnabled=function(){return this._enabled},fi.prototype.isActive=function(){return this._active};var hi=function(t,e,r){this._el=t,this._mousePan=e,this._touchPan=r};hi.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add(\"mapboxgl-touch-drag-pan\")},hi.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove(\"mapboxgl-touch-drag-pan\")},hi.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},hi.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var pi=function(t,e,r){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=r};pi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},pi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},pi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},pi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var di=function(t,e,r,n){this._el=t,this._touchZoom=e,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0};di.prototype.enable=function(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add(\"mapboxgl-touch-zoom-rotate\")},di.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove(\"mapboxgl-touch-zoom-rotate\")},di.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},di.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},di.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},di.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var gi=function(t){return t.zoom||t.drag||t.pitch||t.rotate},mi=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}(t.Event);function vi(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}var yi=function(e,n){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new On(e),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),t.bindAll([\"handleEvent\",\"handleWindowEvent\"],this);var i=this._el;this._listeners=[[i,\"touchstart\",{passive:!1}],[i,\"touchmove\",{passive:!1}],[i,\"touchend\",void 0],[i,\"touchcancel\",void 0],[i,\"mousedown\",void 0],[i,\"mousemove\",void 0],[i,\"mouseup\",void 0],[t.window.document,\"mousemove\",{capture:!0}],[t.window.document,\"mouseup\",void 0],[i,\"mouseover\",void 0],[i,\"mouseout\",void 0],[i,\"dblclick\",void 0],[i,\"click\",void 0],[i,\"keydown\",{capture:!1}],[i,\"keyup\",void 0],[i,\"wheel\",{passive:!1}],[i,\"contextmenu\",void 0],[t.window,\"blur\",void 0]];for(var a=0,o=this._listeners;aa?Math.min(2,_):Math.max(.5,_),w=Math.pow(m,1-e),T=i.unproject(x.add(b.mult(e*w)).mult(g));i.setLocationAtPoint(i.renderWorldCopies?T.wrap():T,d)}n._fireMoveEvents(r)}),(function(t){n._afterEase(r,t)}),e),this},r.prototype._prepareEase=function(e,r,n){void 0===n&&(n={}),this._moving=!0,r||n.moving||this.fire(new t.Event(\"movestart\",e)),this._zooming&&!n.zooming&&this.fire(new t.Event(\"zoomstart\",e)),this._rotating&&!n.rotating&&this.fire(new t.Event(\"rotatestart\",e)),this._pitching&&!n.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,r){if(!this._easeId||!r||this._easeId!==r){delete this._easeId;var n=this._zooming,i=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new t.Event(\"zoomend\",e)),i&&this.fire(new t.Event(\"rotateend\",e)),a&&this.fire(new t.Event(\"pitchend\",e)),this.fire(new t.Event(\"moveend\",e))}},r.prototype.flyTo=function(e,r){var n=this;if(!e.essential&&t.browser.prefersReducedMotion){var i=t.pick(e,[\"center\",\"zoom\",\"bearing\",\"pitch\",\"around\"]);return this.jumpTo(i,r)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var a=this.transform,o=this.getZoom(),s=this.getBearing(),l=this.getPitch(),c=this.getPadding(),u=\"zoom\"in e?t.clamp(+e.zoom,a.minZoom,a.maxZoom):o,f=\"bearing\"in e?this._normalizeBearing(e.bearing,s):s,h=\"pitch\"in e?+e.pitch:l,p=\"padding\"in e?e.padding:a.padding,d=a.zoomScale(u-o),g=t.Point.convert(e.offset),m=a.centerPoint.add(g),v=a.pointLocation(m),y=t.LngLat.convert(e.center||v);this._normalizeCenter(y);var x=a.project(v),b=a.project(y).sub(x),_=e.curve,w=Math.max(a.width,a.height),T=w/d,k=b.mag();if(\"minZoom\"in e){var A=t.clamp(Math.min(e.minZoom,o,u),a.minZoom,a.maxZoom),M=w/a.zoomScale(A-o);_=Math.sqrt(M/k*2)}var S=_*_;function E(t){var e=(T*T-w*w+(t?-1:1)*S*S*k*k)/(2*(t?T:w)*S*k);return Math.log(Math.sqrt(e*e+1)-e)}function L(t){return(Math.exp(t)-Math.exp(-t))/2}function C(t){return(Math.exp(t)+Math.exp(-t))/2}var P=E(0),I=function(t){return C(P)/C(P+_*t)},O=function(t){return w*((C(P)*(L(e=P+_*t)/C(e))-L(P))/S)/k;var e},z=(E(1)-P)/_;if(Math.abs(k)<1e-6||!isFinite(z)){if(Math.abs(w-T)<1e-6)return this.easeTo(e,r);var D=Te.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==f,this._pitching=h!==l,this._padding=!a.isPaddingEqual(p),this._prepareEase(r,!1),this._ease((function(e){var i=e*z,d=1/I(i);a.zoom=1===e?u:o+a.scaleZoom(d),n._rotating&&(a.bearing=t.number(s,f,e)),n._pitching&&(a.pitch=t.number(l,h,e)),n._padding&&(a.interpolatePadding(c,p,e),m=a.centerPoint.add(g));var v=1===e?y:a.unproject(x.add(b.mult(O(i))).mult(d));a.setLocationAtPoint(a.renderWorldCopies?v.wrap():v,m),n._fireMoveEvents(r)}),(function(){return n._afterEase(r)}),e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){return this._stop()},r.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,e)}if(!t){var n=this.handlers;n&&n.stop()}return this},r.prototype._ease=function(e,r,n){!1===n.animate||0===n.duration?(e(1),r()):(this._easeStart=t.browser.now(),this._easeOptions=n,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<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)180?-360:r<-180?360:0}},r}(t.Evented),bi=function(e){void 0===e&&(e={}),this.options=e,t.bindAll([\"_updateEditLink\",\"_updateData\",\"_updateCompact\"],this)};bi.prototype.getDefaultPosition=function(){return\"bottom-right\"},bi.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-attrib\"),this._innerContainer=r.create(\"div\",\"mapboxgl-ctrl-attrib-inner\",this._container),e&&this._container.classList.add(\"mapboxgl-compact\"),this._updateAttributions(),this._updateEditLink(),this._map.on(\"styledata\",this._updateData),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},bi.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"styledata\",this._updateData),this._map.off(\"sourcedata\",this._updateData),this._map.off(\"moveend\",this._updateEditLink),this._map.off(\"resize\",this._updateCompact),this._map=void 0,this._attribHTML=void 0},bi.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(\".mapbox-improve-map\"));var r=[{key:\"owner\",value:this.styleOwner},{key:\"id\",value:this.styleId},{key:\"access_token\",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){var n=r.reduce((function(t,e,n){return e.value&&(t+=e.key+\"=\"+e.value+(n=0)return!1;return!0}))).join(\" | \");o!==this._attribHTML&&(this._attribHTML=o,t.length?(this._innerContainer.innerHTML=o,this._container.classList.remove(\"mapboxgl-attrib-empty\")):this._container.classList.add(\"mapboxgl-attrib-empty\"),this._editLink=null)}},bi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add(\"mapboxgl-compact\"):this._container.classList.remove(\"mapboxgl-compact\")};var _i=function(){t.bindAll([\"_updateLogo\"],this),t.bindAll([\"_updateCompact\"],this)};_i.prototype.onAdd=function(t){this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl\");var e=r.create(\"a\",\"mapboxgl-ctrl-logo\");return e.target=\"_blank\",e.rel=\"noopener nofollow\",e.href=\"https://www.mapbox.com/\",e.setAttribute(\"aria-label\",this._map._getUIString(\"LogoControl.Title\")),e.setAttribute(\"rel\",\"noopener nofollow\"),this._container.appendChild(e),this._container.style.display=\"none\",this._map.on(\"sourcedata\",this._updateLogo),this._updateLogo(),this._map.on(\"resize\",this._updateCompact),this._updateCompact(),this._container},_i.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"sourcedata\",this._updateLogo),this._map.off(\"resize\",this._updateCompact)},_i.prototype.getDefaultPosition=function(){return\"bottom-left\"},_i.prototype._updateLogo=function(t){t&&\"metadata\"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?\"block\":\"none\")},_i.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}},_i.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add(\"mapboxgl-compact\"):e.classList.remove(\"mapboxgl-compact\")}};var wi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};wi.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},wi.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,n=e?this._queue.concat(e):this._queue;re.maxZoom)throw new Error(\"maxZoom must be greater than or equal to minZoom\");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error(\"maxPitch must be greater than or equal to minPitch\");if(null!=e.minPitch&&e.minPitch<0)throw new Error(\"minPitch must be greater than or equal to 0\");if(null!=e.maxPitch&&e.maxPitch>60)throw new Error(\"maxPitch must be less than or equal to 60\");var i=new An(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(n.call(this,i,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new wi,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},Ti,e.locale),this._requestManager=new t.RequestManager(e.transformRequest,e.accessToken),\"string\"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error(\"Container '\"+e.container+\"' not found.\")}else{if(!(e.container instanceof Ai))throw new Error(\"Invalid type: 'container' must be a String or HTMLElement.\");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll([\"_onWindowOnline\",\"_onWindowResize\",\"_contextLost\",\"_contextRestored\"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error(\"Failed to initialize WebGL.\");this.on(\"move\",(function(){return r._update(!1)})),this.on(\"moveend\",(function(){return r._update(!1)})),this.on(\"zoom\",(function(){return r._update(!0)})),void 0!==t.window&&(t.window.addEventListener(\"online\",this._onWindowOnline,!1),t.window.addEventListener(\"resize\",this._onWindowResize,!1)),this.handlers=new yi(this,e);var a=\"string\"==typeof e.hash&&e.hash||void 0;this._hash=e.hash&&new Sn(a).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new bi({customAttribution:e.customAttribution})),this.addControl(new _i,e.logoPosition),this.on(\"style.load\",(function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)})),this.on(\"data\",(function(e){r._update(\"style\"===e.dataType),r.fire(new t.Event(e.dataType+\"data\",e))})),this.on(\"dataloading\",(function(e){r.fire(new t.Event(e.dataType+\"dataloading\",e))}))}n&&(i.__proto__=n),i.prototype=Object.create(n&&n.prototype),i.prototype.constructor=i;var a={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(e,r){if(void 0===r&&e.getDefaultPosition&&(r=e.getDefaultPosition()),void 0===r&&(r=\"top-right\"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error(\"Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.\")));var n=e.onAdd(this);this._controls.push(e);var i=this._controlPositions[r];return-1!==r.indexOf(\"bottom\")?i.insertBefore(n,i.firstChild):i.appendChild(n),this},i.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error(\"Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.\")));var r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this},i.prototype.resize=function(e){var r=this._containerDimensions(),n=r[0],i=r[1];this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i);var a=!this._moving;return a&&(this.stop(),this.fire(new t.Event(\"movestart\",e)).fire(new t.Event(\"move\",e))),this.fire(new t.Event(\"resize\",e)),a&&this.fire(new t.Event(\"moveend\",e)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},i.prototype.setMinZoom=function(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=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\")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(t){if((t=null==t?0:t)<0)throw new Error(\"minPitch must be greater than or equal to 0\");if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()60)throw new Error(\"maxPitch must be less than or equal to 60\");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error(\"maxPitch must be greater than the current minPitch\")},i.prototype.getMaxPitch=function(){return this.transform.maxPitch},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},i.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},i.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},i.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},i.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},i.prototype._createDelegatedListener=function(t,e,r){var n,i=this;if(\"mouseenter\"===t||\"mouseover\"===t){var a=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){var o=i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[];o.length?a||(a=!0,r.call(i,new Rn(t,i,n.originalEvent,{features:o}))):a=!1},mouseout:function(){a=!1}}}}if(\"mouseleave\"===t||\"mouseout\"===t){var o=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){(i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[]).length?o=!0:o&&(o=!1,r.call(i,new Rn(t,i,n.originalEvent)))},mouseout:function(e){o&&(o=!1,r.call(i,new Rn(t,i,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(n={},n[t]=function(t){var n=i.getLayer(e)?i.queryRenderedFeatures(t.point,{layers:[e]}):[];n.length&&(t.features=n,r.call(i,t),delete t.features)},n)}},i.prototype.on=function(t,e,r){if(void 0===r)return n.prototype.on.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(i),i.delegates)this.on(a,i.delegates[a]);return this},i.prototype.once=function(t,e,r){if(void 0===r)return n.prototype.once.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in i.delegates)this.once(a,i.delegates[a]);return this},i.prototype.off=function(t,e,r){var i=this;if(void 0===r)return n.prototype.off.call(this,t,e);return this._delegatedListeners&&this._delegatedListeners[t]&&function(n){for(var a=n[t],o=0;o180;){var s=n.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;e.lng>n.center.lng?e.lng-=360:e.lng+=360}return e}Ii.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),r.disableDrag()},Ii.prototype.move=function(t,e){var r=this.map,n=this.mouseRotate.mousemoveWindow(t,e);if(n&&n.bearingDelta&&r.setBearing(r.getBearing()+n.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(t,e);i&&i.pitchDelta&&r.setPitch(r.getPitch()+i.pitchDelta)}},Ii.prototype.off=function(){var t=this.element;r.removeEventListener(t,\"mousedown\",this.mousedown),r.removeEventListener(t,\"touchstart\",this.touchstart,{passive:!1}),r.removeEventListener(t,\"touchmove\",this.touchmove),r.removeEventListener(t,\"touchend\",this.touchend),r.removeEventListener(t,\"touchcancel\",this.reset),this.offTemp()},Ii.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(t.window,\"mousemove\",this.mousemove),r.removeEventListener(t.window,\"mouseup\",this.mouseup)},Ii.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),r.mousePos(this.element,e)),r.addEventListener(t.window,\"mousemove\",this.mousemove),r.addEventListener(t.window,\"mouseup\",this.mouseup)},Ii.prototype.mousemove=function(t){this.move(t,r.mousePos(this.element,t))},Ii.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},Ii.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.down({type:\"mousedown\",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},Ii.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},Ii.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)e.getEast()||r.latitudee.getNorth())},n.prototype._setErrorState=function(){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\")}},n.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event(\"outofmaxbounds\",e)),this._updateMarker(),void this._finish();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()}},n.prototype._updateCamera=function(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude),n=e.coords.accuracy,i=this._map.getBearing(),a=t.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),a,{geolocateSource:!0})},n.prototype._updateMarker=function(e){if(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},n.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),r=this._map.unproject([1,t]),n=e.distanceTo(r),i=Math.ceil(2*this._accuracy/n);this._circleElement.style.width=i+\"px\",this._circleElement.style.height=i+\"px\"},n.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},n.prototype._onError=function(e){if(this._map){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\"),this._geolocateButton.disabled=!0;var r=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.title=r,this._geolocateButton.setAttribute(\"aria-label\",r),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&ji)return;this._setErrorState()}\"OFF\"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add(\"mapboxgl-user-location-dot-stale\"),this.fire(new t.Event(\"error\",e)),this._finish()}},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(e){var n=this;if(this._container.addEventListener(\"contextmenu\",(function(t){return t.preventDefault()})),this._geolocateButton=r.create(\"button\",\"mapboxgl-ctrl-geolocate\",this._container),r.create(\"span\",\"mapboxgl-ctrl-icon\",this._geolocateButton).setAttribute(\"aria-hidden\",!0),this._geolocateButton.type=\"button\",!1===e){t.warnOnce(\"Geolocation support is not available so the GeolocateControl will be disabled.\");var i=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute(\"aria-label\",i)}else{var a=this._map._getUIString(\"GeolocateControl.FindMyLocation\");this._geolocateButton.title=a,this._geolocateButton.setAttribute(\"aria-label\",a)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute(\"aria-pressed\",\"false\"),this._watchState=\"OFF\"),this.options.showUserLocation&&(this._dotElement=r.create(\"div\",\"mapboxgl-user-location-dot\"),this._userLocationDotMarker=new Fi(this._dotElement),this._circleElement=r.create(\"div\",\"mapboxgl-user-location-accuracy-circle\"),this._accuracyCircleMarker=new Fi({element:this._circleElement,pitchAlignment:\"map\"}),this.options.trackUserLocation&&(this._watchState=\"OFF\"),this._map.on(\"zoom\",this._onZoom)),this._geolocateButton.addEventListener(\"click\",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on(\"movestart\",(function(e){var r=e.originalEvent&&\"resize\"===e.originalEvent.type;e.geolocateSource||\"ACTIVE_LOCK\"!==n._watchState||r||(n._watchState=\"BACKGROUND\",n._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background\"),n._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),n.fire(new t.Event(\"trackuserlocationend\")))}))},n.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\":Ni--,ji=!1,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\")}if(\"OFF\"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.setAttribute(\"aria-pressed\",\"true\"),++Ni>1?(e={maximumAge:6e5,timeout:0},ji=!0):(e=this.options.positionOptions,ji=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},n.prototype._clearWatch=function(){t.window.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)},n}(t.Evented),Vi={maxWidth:100,unit:\"metric\"},Hi=function(e){this.options=t.extend({},Vi,e),t.bindAll([\"_onMove\",\"setUnit\"],this)};function qi(t,e,r){var n=r&&r.maxWidth||100,i=t._container.clientHeight/2,a=t.unproject([0,i]),o=t.unproject([n,i]),s=a.distanceTo(o);if(r&&\"imperial\"===r.unit){var l=3.2808*s;if(l>5280)Gi(e,n,l/5280,t._getUIString(\"ScaleControl.Miles\"));else Gi(e,n,l,t._getUIString(\"ScaleControl.Feet\"))}else if(r&&\"nautical\"===r.unit){Gi(e,n,s/1852,t._getUIString(\"ScaleControl.NauticalMiles\"))}else s>=1e3?Gi(e,n,s/1e3,t._getUIString(\"ScaleControl.Kilometers\")):Gi(e,n,s,t._getUIString(\"ScaleControl.Meters\"))}function Gi(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:o>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(o),a*o),l=s/r;t.style.width=e*l+\"px\",t.innerHTML=s+\" \"+n}Hi.prototype.getDefaultPosition=function(){return\"bottom-left\"},Hi.prototype._onMove=function(){qi(this._map,this._container,this.options)},Hi.prototype.onAdd=function(t){return this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-scale\",t.getContainer()),this._map.on(\"move\",this._onMove),this._onMove(),this._container},Hi.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"move\",this._onMove),this._map=void 0},Hi.prototype.setUnit=function(t){this.options.unit=t,qi(this._map,this._container,this.options)};var Yi=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce(\"Full screen control 'container' must be a DOM element.\")),t.bindAll([\"_onClickFullscreen\",\"_changeIcon\"],this),\"onfullscreenchange\"in t.window.document?this._fullscreenchange=\"fullscreenchange\":\"onmozfullscreenchange\"in t.window.document?this._fullscreenchange=\"mozfullscreenchange\":\"onwebkitfullscreenchange\"in t.window.document?this._fullscreenchange=\"webkitfullscreenchange\":\"onmsfullscreenchange\"in t.window.document&&(this._fullscreenchange=\"MSFullscreenChange\")};Yi.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-group\"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display=\"none\",t.warnOnce(\"This device does not support fullscreen mode.\")),this._controlContainer},Yi.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Yi.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Yi.prototype._setupUI=function(){var e=this._fullscreenButton=r.create(\"button\",\"mapboxgl-ctrl-fullscreen\",this._controlContainer);r.create(\"span\",\"mapboxgl-ctrl-icon\",e).setAttribute(\"aria-hidden\",!0),e.type=\"button\",this._updateTitle(),this._fullscreenButton.addEventListener(\"click\",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Yi.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute(\"aria-label\",t),this._fullscreenButton.title=t},Yi.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?\"FullscreenControl.Exit\":\"FullscreenControl.Enter\")},Yi.prototype._isFullscreen=function(){return this._fullscreen},Yi.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(\"mapboxgl-ctrl-shrink\"),this._fullscreenButton.classList.toggle(\"mapboxgl-ctrl-fullscreen\"),this._updateTitle())},Yi.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Wi={closeButton:!0,closeOnClick:!0,className:\"\",maxWidth:\"240px\"},Xi=function(e){function n(r){e.call(this),this.options=t.extend(Object.create(Wi),r),t.bindAll([\"_update\",\"_onClose\",\"remove\",\"_onMouseMove\",\"_onMouseUp\",\"_onDrag\"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on(\"click\",this._onClose),this.options.closeOnMove&&this._map.on(\"move\",this._onClose),this._map.on(\"remove\",this.remove),this._update(),this._trackPointer?(this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"mouseup\",this._onMouseUp),this._container&&this._container.classList.add(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"mapboxgl-track-pointer\")):this._map.on(\"move\",this._update),this.fire(new t.Event(\"open\")),this},n.prototype.isOpen=function(){return!!this._map},n.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off(\"move\",this._update),this._map.off(\"move\",this._onClose),this._map.off(\"click\",this._onClose),this._map.off(\"remove\",this.remove),this._map.off(\"mousemove\",this._onMouseMove),this._map.off(\"mouseup\",this._onMouseUp),this._map.off(\"drag\",this._onDrag),delete this._map),this.fire(new t.Event(\"close\")),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on(\"move\",this._update),this._map.off(\"mousemove\",this._onMouseMove),this._container&&this._container.classList.remove(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.remove(\"mapboxgl-track-pointer\")),this},n.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off(\"move\",this._update),this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"drag\",this._onDrag),this._container&&this._container.classList.add(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"mapboxgl-track-pointer\")),this},n.prototype.getElement=function(){return this._container},n.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},n.prototype.setHTML=function(e){var r,n=t.window.document.createDocumentFragment(),i=t.window.document.createElement(\"body\");for(i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},n.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},n.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},n.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},n.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},n.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},n.prototype._createContent=function(){this._content&&r.remove(this._content),this._content=r.create(\"div\",\"mapboxgl-popup-content\",this._container),this.options.closeButton&&(this._closeButton=r.create(\"button\",\"mapboxgl-popup-close-button\",this._content),this._closeButton.type=\"button\",this._closeButton.setAttribute(\"aria-label\",\"Close popup\"),this._closeButton.innerHTML=\"×\",this._closeButton.addEventListener(\"click\",this._onClose))},n.prototype._onMouseUp=function(t){this._update(t.point)},n.prototype._onMouseMove=function(t){this._update(t.point)},n.prototype._onDrag=function(t){this._update(t.point)},n.prototype._update=function(e){var n=this,i=this._lngLat||this._trackPointer;if(this._map&&i&&this._content&&(this._container||(this._container=r.create(\"div\",\"mapboxgl-popup\",this._map.getContainer()),this._tip=r.create(\"div\",\"mapboxgl-popup-tip\",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(\" \").forEach((function(t){return n._container.classList.add(t)})),this._trackPointer&&this._container.classList.add(\"mapboxgl-popup-track-pointer\")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Oi(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var a=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),o=this.options.anchor,s=function e(r){if(r){if(\"number\"==typeof r){var n=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new t.Point(0,0),top:new t.Point(0,r),\"top-left\":new t.Point(n,n),\"top-right\":new t.Point(-n,n),bottom:new t.Point(0,-r),\"bottom-left\":new t.Point(n,-n),\"bottom-right\":new t.Point(-n,-n),left:new t.Point(r,0),right:new t.Point(-r,0)}}if(r instanceof t.Point||Array.isArray(r)){var i=t.Point.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.Point.convert(r.center||[0,0]),top:t.Point.convert(r.top||[0,0]),\"top-left\":t.Point.convert(r[\"top-left\"]||[0,0]),\"top-right\":t.Point.convert(r[\"top-right\"]||[0,0]),bottom:t.Point.convert(r.bottom||[0,0]),\"bottom-left\":t.Point.convert(r[\"bottom-left\"]||[0,0]),\"bottom-right\":t.Point.convert(r[\"bottom-right\"]||[0,0]),left:t.Point.convert(r.left||[0,0]),right:t.Point.convert(r.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!o){var l,c=this._container.offsetWidth,u=this._container.offsetHeight;l=a.y+s.bottom.ythis._map.transform.height-u?[\"bottom\"]:[],a.xthis._map.transform.width-c/2&&l.push(\"right\"),o=0===l.length?\"bottom\":l.join(\"-\")}var f=a.add(s[o]).round();r.setTransform(this._container,zi[o]+\" translate(\"+f.x+\"px,\"+f.y+\"px)\"),Di(this._container,o,\"popup\")}},n.prototype._onClose=function(){this.remove()},n}(t.Evented);var Zi={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Ei,NavigationControl:Pi,GeolocateControl:Ui,AttributionControl:bi,ScaleControl:Hi,FullscreenControl:Yi,Popup:Xi,Marker:Fi,Style:qe,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:function(){Bt().acquire(zt)},clearPrewarmedResources:function(){var t=Rt;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(zt),Rt=null):console.warn(\"Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()\"))},get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return Dt.workerCount},set workerCount(t){Dt.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){t.clearTileCache(e)},workerUrl:\"\"};return Zi})),r}))},{}],240:[function(t,e,r){\"use strict\";e.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},{}],241:[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 m(){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)))}m();var v={element:t};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(e){e?m():function(){if(!s)return;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}}),v};var n=t(\"mouse-event\")},{\"mouse-event\":243}],242:[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}},{}],243:[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<=0)return 1<2147483647)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"');var e=new Uint8Array(t);return e.__proto__=a.prototype,e}function a(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 l(t)}return o(t,e,r)}function o(t,e,r){if(\"string\"==typeof t)return function(t,e){\"string\"==typeof e&&\"\"!==e||(e=\"utf8\");if(!a.isEncoding(e))throw new TypeError(\"Unknown encoding: \"+e);var r=0|f(t,e),n=i(r),o=n.write(t,e);o!==r&&(n=n.slice(0,o));return n}(t,e);if(ArrayBuffer.isView(t))return c(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(B(t,ArrayBuffer)||t&&B(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength=2147483647)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+2147483647..toString(16)+\" bytes\");return 0|t}function f(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||B(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 D(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return R(t).length;default:if(i)return n?-1:D(t).length;e=(\"\"+e).toLowerCase(),i=!0}}function h(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 M(this,e,r);case\"utf8\":case\"utf-8\":return T(this,e,r);case\"ascii\":return k(this,e,r);case\"latin1\":case\"binary\":return A(this,e,r);case\"base64\":return w(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return S(this,e,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),n=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(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),N(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=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:g(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):g(t,[e],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function g(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;as&&(r=s-l),a=r;a>=0;a--){for(var f=!0,h=0;hi&&(n=i):n=i;var a=e.length;n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function w(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?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<=4096)return String.fromCharCode.apply(String,t);var r=\"\",n=0;for(;ne&&(t+=\" ... \"),\"\"},a.prototype.compare=function(t,e,r,n,i){if(B(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.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 o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),l=Math.min(o,s),c=this.slice(n,i),u=t.slice(e,r),f=0;f>>=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 v(this,t,e,r);case\"ascii\":return y(this,t,e,r);case\"latin1\":case\"binary\":return x(this,t,e,r);case\"base64\":return b(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return _(this,t,e,r);default:if(a)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};function k(t,e,r){var n=\"\";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i=\"\",a=e;ar)throw new RangeError(\"Trying to access beyond buffer length\")}function L(t,e,r,n,i,o){if(!a.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError(\"Index out of range\")}function C(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 P(t,e,r,i,a){return e=+e,r>>>=0,a||C(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function I(t,e,r,i,a){return e=+e,r>>>=0,a||C(t,0,r,8),n.write(t,e,r,i,52,8),r+8}a.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>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||E(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},a.prototype.readInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,n)||L(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},a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(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},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(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},a.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return I(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return I(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.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=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=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},a.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&&!a.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>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),\"number\"==typeof t)for(o=e;o55295&&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 R(t){return e.toByteArray(function(t){if((t=(t=t.split(\"=\")[0]).trim().replace(O,\"\")).length<2)return\"\";for(;t.length%4!=0;)t+=\"=\";return t}(t))}function F(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function B(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function N(t){return t!=t}}).call(this)}).call(this,t(\"buffer\").Buffer)},{\"base64-js\":79,buffer:85,ieee754:230}],86:[function(t,e,r){e.exports=function(t,e,r){return er?r:t:te?e:t}},{}],87:[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:86}],88:[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]}},{}],89:[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:86,\"color-rgba\":91,dtype:127}],90:[function(t,e,r){(function(r){(function(){\"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=(p=t.slice(1)).length;c=1,u<=4?(l=[parseInt(p[0]+p[0],16),parseInt(p[1]+p[1],16),parseInt(p[2]+p[2],16)],4===u&&(c=parseInt(p[3]+p[3],16)/255)):(l=[parseInt(p[0]+p[1],16),parseInt(p[2]+p[3],16),parseInt(p[4]+p[5],16)],8===u&&(c=parseInt(p[6]+p[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 f=e[1],h=\"rgb\"===f,p=f.replace(/a$/,\"\");s=p;u=\"cmyk\"===p?4:\"gray\"===p?1:3;l=e[2].trim().split(/\\s*,\\s*/).map((function(t,e){if(/%$/.test(t))return e===u?parseFloat(t)/100:\"rgb\"===p?255*parseFloat(t)/100:parseFloat(t);if(\"h\"===p[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)})),f===p&&l.push(1),c=h||void 0===l[u]?1:l[u],l=l.slice(0,u)}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)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"color-name\":88,defined:124,\"is-plain-obj\":236}],91:[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:86,\"color-parse\":90,\"color-space/hsl\":92}],92:[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\":93}],93:[function(t,e,r){\"use strict\";e.exports={name:\"rgb\",min:[0,0,0],max:[255,255,255],channel:[\"red\",\"green\",\"blue\"],alias:[\"RGB\"]}},{}],94:[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\",CALF:\"\\\\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\",NAME:\"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\",SOME:\"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.?name|^(?=.*socialist).*viet.?name\",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\"}},{}],95:[function(t,e,r){e.exports=[\"xx-small\",\"x-small\",\"small\",\"medium\",\"large\",\"x-large\",\"xx-large\",\"larger\",\"smaller\"]},{}],96:[function(t,e,r){e.exports=[\"normal\",\"condensed\",\"semi-condensed\",\"extra-condensed\",\"ultra-condensed\",\"expanded\",\"semi-expanded\",\"extra-expanded\",\"ultra-expanded\"]},{}],97:[function(t,e,r){e.exports=[\"normal\",\"italic\",\"oblique\"]},{}],98:[function(t,e,r){e.exports=[\"normal\",\"bold\",\"bolder\",\"lighter\",\"100\",\"200\",\"300\",\"400\",\"500\",\"600\",\"700\",\"800\",\"900\"]},{}],99:[function(t,e,r){\"use strict\";e.exports={parse:t(\"./parse\"),stringify:t(\"./stringify\")}},{\"./parse\":101,\"./stringify\":102}],100:[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\":95}],101:[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\":100,\"css-font-stretch-keywords\":96,\"css-font-style-keywords\":97,\"css-font-weight-keywords\":98,\"css-global-keywords\":103,\"css-system-font-keywords\":104,\"string-split-by\":305,unquote:328}],102:[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;re?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>>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>>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(;++o1)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=r)for(n=i=r;++or&&(n=r),i=r)for(n=i=r;++or&&(n=r),i=0?(a>=v?10:a>=y?5:a>=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=v?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>=v?i*=10:a>=y?i*=5:a>=x&&(i*=2),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 k(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a=r)for(n=r;++ar&&(n=r)}else for(;++a=r)for(n=r;++ar&&(n=r);return n}function A(t){if(!(i=t.length))return[];for(var e=-1,r=k(t,M),n=new Array(r);++et?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;af;)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=r)for(n=r;++an&&(n=r)}else for(;++a=r)for(n=r;++an&&(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=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r},t.min=k,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);r0)return[t];if((n=e0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s=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(),m=a();++hl.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})}))},{}],109:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(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,8})$/,l=new RegExp(\"^rgb\\\\(\"+[i,i,i]+\"\\\\)$\"),c=new RegExp(\"^rgb\\\\(\"+[o,o,o]+\"\\\\)$\"),u=new RegExp(\"^rgba\\\\(\"+[i,i,i,a]+\"\\\\)$\"),f=new RegExp(\"^rgba\\\\(\"+[o,o,o,a]+\"\\\\)$\"),h=new RegExp(\"^hsl\\\\(\"+[a,o,o]+\"\\\\)$\"),p=new RegExp(\"^hsla\\\\(\"+[a,o,o,a]+\"\\\\)$\"),d={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 g(){return this.rgb().formatHex()}function m(){return this.rgb().formatRgb()}function v(t){var e,r;return t=(t+\"\").trim().toLowerCase(),(e=s.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?y(e):3===r?new w(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?x(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?x(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=l.exec(t))?new w(e[1],e[2],e[3],1):(e=c.exec(t))?new w(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=u.exec(t))?x(e[1],e[2],e[3],e[4]):(e=f.exec(t))?x(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=h.exec(t))?M(e[1],e[2]/100,e[3]/100,1):(e=p.exec(t))?M(e[1],e[2]/100,e[3]/100,e[4]):d.hasOwnProperty(t)?y(d[t]):\"transparent\"===t?new w(NaN,NaN,NaN,0):null}function y(t){return new w(t>>16&255,t>>8&255,255&t,1)}function x(t,e,r,n){return n<=0&&(t=e=r=NaN),new w(t,e,r,n)}function b(t){return t instanceof n||(t=v(t)),t?new w((t=t.rgb()).r,t.g,t.b,t.opacity):new w}function _(t,e,r,n){return 1===arguments.length?b(t):new w(t,e,r,null==n?1:n)}function w(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function T(){return\"#\"+A(this.r)+A(this.g)+A(this.b)}function k(){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+\")\")}function A(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?\"0\":\"\")+t.toString(16)}function M(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new L(t,e,r,n)}function S(t){if(t instanceof L)return new L(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=v(t)),!t)return new L;if(t instanceof L)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*(r0&&c<1?0:s,new L(s,l,c,t.opacity)}function E(t,e,r,n){return 1===arguments.length?S(t):new L(t,e,r,null==n?1:n)}function L(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function C(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,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:g,formatHex:g,formatHsl:function(){return S(this).formatHsl()},formatRgb:m,toString:m}),e(w,_,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new w(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new w(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:T,formatHex:T,formatRgb:k,toString:k})),e(L,E,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new L(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new L(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 w(C(t>=240?t-240:t+120,i,n),C(t,i,n),C(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},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?\"hsl(\":\"hsla(\")+(this.h||0)+\", \"+100*(this.s||0)+\"%, \"+100*(this.l||0)+\"%\"+(1===t?\")\":\", \"+t+\")\")}}));var P=Math.PI/180,I=180/Math.PI,O=6/29,z=3*O*O;function D(t){if(t instanceof F)return new F(t.l,t.a,t.b,t.opacity);if(t instanceof q)return G(t);t instanceof w||(t=b(t));var e,r,n=U(t.r),i=U(t.g),a=U(t.b),o=B((.2225045*n+.7168786*i+.0606169*a)/1);return n===i&&i===a?e=r=o:(e=B((.4360747*n+.3850649*i+.1430804*a)/.96422),r=B((.0139322*n+.0971045*i+.7141733*a)/.82521)),new F(116*o-16,500*(e-o),200*(o-r),t.opacity)}function R(t,e,r,n){return 1===arguments.length?D(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 B(t){return t>.008856451679035631?Math.pow(t,1/3):t/z+4/29}function N(t){return t>O?t*t*t:z*(t-4/29)}function j(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 V(t){if(t instanceof q)return new q(t.h,t.c,t.l,t.opacity);if(t instanceof F||(t=D(t)),0===t.a&&0===t.b)return new q(NaN,0=0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);return{type:t,name:r}}))}function a(t,e){for(var r,n=0,i=t.length;n0)for(var r,n,i=new Array(r),a=0;ah+c||np+c||au.index){var f=h-s.x-s.vx,m=p-s.y-s.vy,v=f*f+m*m;vt.r&&(t.r=t[e].r)}function h(){if(r){var e,i,a=r.length;for(n=new Array(a),e=0;e=c)){(t.data!==r||t.next)&&(0===f&&(d+=(f=o())*f),0===h&&(d+=(h=o())*h),d1?(null==r?u.remove(t):u.set(t,v(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;c1?(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;a1?n[0]+n.slice(2):n,+t.slice(r+1)]}function r(t){return(t=e(Math.abs(t)))?t[1]:NaN}var n,i=/^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;function a(t){if(!(e=i.exec(t)))throw new Error(\"invalid format: \"+t);var e;return new o({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function o(t){this.fill=void 0===t.fill?\" \":t.fill+\"\",this.align=void 0===t.align?\">\":t.align+\"\",this.sign=void 0===t.sign?\"-\":t.sign+\"\",this.symbol=void 0===t.symbol?\"\":t.symbol+\"\",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?\"\":t.type+\"\"}function s(t,r){var n=e(t,r);if(!n)return t+\"\";var i=n[0],a=n[1];return a<0?\"0.\"+new Array(-a).join(\"0\")+i:i.length>a+1?i.slice(0,a+1)+\".\"+i.slice(a+1):i+new Array(a-i.length+2).join(\"0\")}a.prototype=o.prototype,o.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\"0\":\"\")+(void 0===this.width?\"\":Math.max(1,0|this.width))+(this.comma?\",\":\"\")+(void 0===this.precision?\"\":\".\"+Math.max(0,0|this.precision))+(this.trim?\"~\":\"\")+this.type};var l={\"%\":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+\"\"},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString(\"en\").replace(/,/g,\"\"):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return s(100*t,e)},r:s,s:function(t,r){var i=e(t,r);if(!i)return t+\"\";var a=i[0],o=i[1],s=o-(n=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+new Array(s-l+1).join(\"0\"):s>0?a.slice(0,s)+\".\"+a.slice(s):\"0.\"+new Array(1-s).join(\"0\")+e(t,Math.max(0,r+s-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function c(t){return t}var u,f=Array.prototype.map,h=[\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\\xb5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];function p(t){var e,i,o=void 0===t.grouping||void 0===t.thousands?c:(e=f.call(t.grouping,Number),i=t.thousands+\"\",function(t,r){for(var n=t.length,a=[],o=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(t.substring(n-=s,n+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(i)}),s=void 0===t.currency?\"\":t.currency[0]+\"\",u=void 0===t.currency?\"\":t.currency[1]+\"\",p=void 0===t.decimal?\".\":t.decimal+\"\",d=void 0===t.numerals?c:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(f.call(t.numerals,String)),g=void 0===t.percent?\"%\":t.percent+\"\",m=void 0===t.minus?\"-\":t.minus+\"\",v=void 0===t.nan?\"NaN\":t.nan+\"\";function y(t){var e=(t=a(t)).fill,r=t.align,i=t.sign,c=t.symbol,f=t.zero,y=t.width,x=t.comma,b=t.precision,_=t.trim,w=t.type;\"n\"===w?(x=!0,w=\"g\"):l[w]||(void 0===b&&(b=12),_=!0,w=\"g\"),(f||\"0\"===e&&\"=\"===r)&&(f=!0,e=\"0\",r=\"=\");var T=\"$\"===c?s:\"#\"===c&&/[boxX]/.test(w)?\"0\"+w.toLowerCase():\"\",k=\"$\"===c?u:/[%p]/.test(w)?g:\"\",A=l[w],M=/[defgprs%]/.test(w);function S(t){var a,s,l,c=T,u=k;if(\"c\"===w)u=A(t)+u,t=\"\";else{var g=(t=+t)<0||1/t<0;if(t=isNaN(t)?v:A(Math.abs(t),b),_&&(t=function(t){t:for(var e,r=t.length,n=1,i=-1;n0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),g&&0==+t&&\"+\"!==i&&(g=!1),c=(g?\"(\"===i?i:m:\"-\"===i||\"(\"===i?\"\":i)+c,u=(\"s\"===w?h[8+n/3]:\"\")+u+(g&&\"(\"===i?\")\":\"\"),M)for(a=-1,s=t.length;++a(l=t.charCodeAt(a))||l>57){u=(46===l?p+t.slice(a+1):t.slice(a))+u,t=t.slice(0,a);break}}x&&!f&&(t=o(t,1/0));var S=c.length+t.length+u.length,E=S>1)+c+t+u+E.slice(S);break;default:t=E+c+t+u}return d(t)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return t+\"\"},S}return{format:y,formatPrefix:function(t,e){var n=y(((t=a(t)).type=\"f\",t)),i=3*Math.max(-8,Math.min(8,Math.floor(r(e)/3))),o=Math.pow(10,-i),s=h[8+i/3];return function(t){return n(o*t)+s}}}}function d(e){return u=p(e),t.format=u.format,t.formatPrefix=u.formatPrefix,u}d({decimal:\".\",thousands:\",\",grouping:[3],currency:[\"$\",\"\"],minus:\"-\"}),t.FormatSpecifier=o,t.formatDefaultLocale=d,t.formatLocale=p,t.formatSpecifier=a,t.precisionFixed=function(t){return Math.max(0,-r(Math.abs(t)))},t.precisionPrefix=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(r(e)/3)))-r(Math.abs(t)))},t.precisionRound=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,r(e)-r(t))+1},Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],113:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-geo\"),t(\"d3-array\")):i(n.d3=n.d3||{},n.d3,n.d3)}(this,(function(t,e,r){\"use strict\";var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,c=Math.log,u=Math.max,f=Math.min,h=Math.pow,p=Math.round,d=Math.sign||function(t){return t>0?1:t<0?-1:0},g=Math.sin,m=Math.tan,v=1e-6,y=Math.PI,x=y/2,b=y/4,_=Math.SQRT1_2,w=L(2),T=L(y),k=2*y,A=180/y,M=y/180;function S(t){return t>1?x:t<-1?-x:Math.asin(t)}function E(t){return t>1?0:t<-1?y:Math.acos(t)}function L(t){return t>0?Math.sqrt(t):0}function C(t){return(s(t)-s(-t))/2}function P(t){return(s(t)+s(-t))/2}function I(t){var e=m(t/2),r=2*c(o(t/2))/(e*e);function i(t,e){var n=o(t),i=o(e),a=g(e),s=i*n,l=-((1-s?c((1+s)/2)/(1-s):-.5)+r/(1+s));return[l*i*g(t),l*a]}return i.invert=function(e,i){var s,l=L(e*e+i*i),u=-t/2,f=50;if(!l)return[0,0];do{var h=u/2,p=o(h),d=g(h),m=d/p,y=-c(n(p));u-=s=(2/m*y-r*m-l)/(-y/(d*d)+1-r/(2*p*p))*(p<0?.7:1)}while(n(s)>v&&--f>0);var x=g(u);return[a(e*x,l*o(u)),S(i*x/l)]},i}function O(t,e){var r=o(e),n=function(t){return t?t/Math.sin(t):1}(E(r*o(t/=2)));return[2*r*g(t)*n,g(e)*n]}function z(t){var e=g(t),r=o(t),i=t>=0?1:-1,s=m(i*t),l=(1+e-r)/2;function c(t,n){var c=o(n),u=o(t/=2);return[(1+c)*g(t),(i*n>-a(u,s)-.001?0:10*-i)+l+g(n)*r-(1+c)*e*u]}return c.invert=function(t,c){var u=0,f=0,h=50;do{var p=o(u),d=g(u),m=o(f),y=g(f),x=1+m,b=x*d-t,_=l+y*r-x*e*p-c,w=x*p/2,T=-d*y,k=e*x*d/2,A=r*m+e*p*y,M=T*k-A*w,S=(_*T-b*A)/M/2,E=(b*k-_*w)/M;n(E)>2&&(E/=2),u-=S,f-=E}while((n(S)>v||n(E)>v)&&--h>0);return i*f>-a(o(u),s)-.001?[2*u,f]:null},c}function D(t,e){var r=m(e/2),n=L(1-r*r),i=1+n*o(t/=2),a=g(t)*n/i,s=r/i,l=a*a,c=s*s;return[4/3*a*(3+l-3*c),4/3*s*(3+3*l-c)]}O.invert=function(t,e){if(!(t*t+4*e*e>y*y+v)){var r=t,i=e,a=25;do{var s,l=g(r),c=g(r/2),u=o(r/2),f=g(i),h=o(i),p=g(2*i),d=f*f,m=h*h,x=c*c,b=1-m*u*u,_=b?E(h*u)*L(s=1/b):s=0,w=2*_*h*c-t,T=_*f-e,k=s*(m*x+_*h*u*d),A=s*(.5*l*p-2*_*f*c),M=.25*s*(p*c-_*f*m*l),S=s*(d*u+_*x*h),C=A*M-S*k;if(!C)break;var P=(T*A-w*S)/C,I=(w*M-T*k)/C;r-=P,i-=I}while((n(P)>v||n(I)>v)&&--a>0);return[r,i]}},D.invert=function(t,e){if(e*=3/8,!(t*=3/8)&&n(e)>1)return null;var r=1+t*t+e*e,i=L((r-L(r*r-4*e*e))/2),s=S(i)/3,l=i?function(t){return c(t+L(t*t-1))}(n(e/i))/3:function(t){return c(t+L(t*t+1))}(n(t))/3,u=o(s),f=P(l),h=f*f-u*u;return[2*d(t)*a(C(l)*u,.25-h),2*d(e)*a(f*g(s),.25+h)]};var R=L(8),F=c(1+w);function B(t,e){var r=n(e);return rx){var l=a(s[1],s[0]),c=L(s[0]*s[0]+s[1]*s[1]),u=r*p((l-x)/r)+x,f=a(g(l-=u),2-o(l));l=u+S(y/c*g(f))-f,s[0]=c*o(l),s[1]=c*g(l)}return s}return s.invert=function(t,n){var s=L(t*t+n*n);if(s>x){var l=a(n,t),c=r*p((l-x)/r)+x,u=l>c?-1:1,f=s*o(c-l),h=1/m(u*E((f-y)/L(y*(y-2*f)+s*s)));l=c+2*i((h+u*L(h*h-3))/3),t=s*o(l),n=s*g(l)}return e.geoAzimuthalEquidistantRaw.invert(t,n)},s}function j(t,r){if(arguments.length<2&&(r=t),1===r)return e.geoAzimuthalEqualAreaRaw;if(r===1/0)return U;function n(n,i){var a=e.geoAzimuthalEqualAreaRaw(n/r,i);return a[0]*=t,a}return n.invert=function(n,i){var a=e.geoAzimuthalEqualAreaRaw.invert(n/t,i);return a[0]*=r,a},n}function U(t,e){return[t*o(e)/o(e/=2),2*g(e)]}function V(t,e,r){var i,a,o,s=100;r=void 0===r?0:+r,e=+e;do{(a=t(r))===(o=t(r+v))&&(o=a+v),r-=i=-1*v*(a-e)/(a-o)}while(s-- >0&&n(i)>v);return s<0?NaN:r}function H(t,e,r){return void 0===e&&(e=40),void 0===r&&(r=1e-12),function(i,a,o,s){var l,c,u;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var f=0;fl)o-=c/=2,s-=u/=2;else{l=g;var m=(o>0?-1:1)*r,v=(s>0?-1:1)*r,y=t(o+m,s),x=t(o,s+v),b=(y[0]-h[0])/m,_=(y[1]-h[1])/m,w=(x[0]-h[0])/v,T=(x[1]-h[1])/v,k=T*b-_*w,A=(n(k)<.5?.5:1)/k;if(o+=c=(d*w-p*T)*A,s+=u=(p*_-d*b)*A,n(c)0&&(i[1]*=1+a/1.5*i[0]*i[0]),i}return e.invert=H(e),e}function G(t,e){var r,i=t*g(e),a=30;do{e-=r=(e+g(e)-i)/(1+o(e))}while(n(r)>v&&--a>0);return e/2}function Y(t,e,r){function n(n,i){return[t*n*o(i=G(r,i)),e*g(i)]}return n.invert=function(n,i){return i=S(i/e),[n/(t*o(i)),S((2*i+g(2*i))/r)]},n}B.invert=function(t,e){if((a=n(e))1e-12&&--u>0);return[t/(o(l)*(R-1/g(l))),d(e)*l]},U.invert=function(t,e){var r=2*S(e/2);return[t*o(r/2)/o(r),r]};var W=Y(w/x,w,y);var X=2.00276,Z=1.11072;function J(t,e){var r=G(y,e);return[X*t/(1/o(e)+Z/o(r)),(e+w*g(r))/X]}function K(t){var r=0,n=e.geoProjectionMutator(t),i=n(r);return i.parallel=function(t){return arguments.length?n(r=t*M):r*A},i}function Q(t,e){return[t*o(e),e]}function $(t){if(!t)return Q;var e=1/m(t);function r(r,n){var i=e+t-n,a=i?r*o(n)/i:i;return[i*g(a),e-i*o(a)]}return r.invert=function(r,n){var i=L(r*r+(n=e-n)*n),s=e+t-i;return[i/o(s)*a(r,n),s]},r}function tt(t){function e(e,r){var n=x-r,i=n?e*t*g(n)/n:n;return[n*g(i)/t,x-n*o(i)]}return e.invert=function(e,r){var n=e*t,i=x-r,o=L(n*n+i*i),s=a(n,i);return[(o?o/g(o):1)*s/t,x-o]},e}J.invert=function(t,e){var r,i,a=X*e,s=e<0?-b:b,l=25;do{i=a-w*g(s),s-=r=(g(2*s)+2*s-y*g(i))/(2*o(2*s)+2+y*o(i)*w*o(s))}while(n(r)>v&&--l>0);return i=a-w*g(s),[t*(1/o(i)+Z/o(s))/X,i]},Q.invert=function(t,e){return[t/o(e),e]};var et=Y(1,4/y,y);function rt(t,e,r,i,s,l){var c,u=o(l);if(n(t)>1||n(l)>1)c=E(r*s+e*i*u);else{var f=g(t/2),h=g(l/2);c=2*S(L(f*f+e*i*h*h))}return n(c)>v?[c,a(i*g(l),e*s-r*i*u)]:[0,0]}function nt(t,e,r){return E((t*t+e*e-r*r)/(2*t*e))}function it(t){return t-2*y*l((t+y)/(2*y))}function at(t,e,r){for(var n,i=[[t[0],t[1],g(t[1]),o(t[1])],[e[0],e[1],g(e[1]),o(e[1])],[r[0],r[1],g(r[1]),o(r[1])]],a=i[2],s=0;s<3;++s,a=n)n=i[s],a.v=rt(n[1]-a[1],a[3],a[2],n[3],n[2],n[0]-a[0]),a.point=[0,0];var l=nt(i[0].v[0],i[2].v[0],i[1].v[0]),c=nt(i[0].v[0],i[1].v[0],i[2].v[0]),u=y-l;i[2].point[1]=0,i[0].point[0]=-(i[1].point[0]=i[0].v[0]/2);var f=[i[2].point[0]=i[0].point[0]+i[2].v[0]*o(l),2*(i[0].point[1]=i[1].point[1]=i[2].v[0]*g(l))];return function(t,e){var r,n=g(e),a=o(e),s=new Array(3);for(r=0;r<3;++r){var l=i[r];if(s[r]=rt(e-l[1],l[3],l[2],a,n,t-l[0]),!s[r][0])return l.point;s[r][1]=it(s[r][1]-l.v[1])}var h=f.slice();for(r=0;r<3;++r){var p=2==r?0:r+1,d=nt(i[r].v[0],s[r][0],s[p][0]);s[r][1]<0&&(d=-d),r?1==r?(d=c-d,h[0]-=s[r][0]*o(d),h[1]-=s[r][0]*g(d)):(d=u-d,h[0]+=s[r][0]*o(d),h[1]+=s[r][0]*g(d)):(h[0]+=s[r][0]*o(d),h[1]-=s[r][0]*g(d))}return h[0]/=3,h[1]/=3,h}}function ot(t){return t[0]*=M,t[1]*=M,t}function st(t,r,n){var i=e.geoCentroid({type:\"MultiPoint\",coordinates:[t,r,n]}),a=[-i[0],-i[1]],o=e.geoRotation(a),s=at(ot(o(t)),ot(o(r)),ot(o(n)));s.invert=H(s);var l=e.geoProjection(s).rotate(a),c=l.center;return delete l.rotate,l.center=function(t){return arguments.length?c(o(t)):o.invert(c())},l.clipAngle(90)}function lt(t,e){var r=L(1-g(e));return[2/T*t*r,T*(1-r)]}function ct(t){var e=m(t);function r(t,r){return[t,(t?t/g(t):1)*(g(r)*o(t)-e*o(r))]}return r.invert=e?function(t,r){t&&(r*=g(t)/t);var n=o(t);return[t,2*a(L(n*n+e*e-r*r)-n,e-r)]}:function(t,e){return[t,S(t?e*m(t)/t:e)]},r}lt.invert=function(t,e){var r=(r=e/T-1)*r;return[r>0?t*L(y/r)/2:0,S(1-r)]};var ut=L(3);function ft(t,e){return[ut*t*(2*o(2*e/3)-1)/T,ut*T*g(e/3)]}function ht(t){var e=o(t);function r(t,r){return[t*e,g(r)/e]}return r.invert=function(t,r){return[t/e,S(r*e)]},r}function pt(t){var e=o(t);function r(t,r){return[t*e,(1+e)*m(r/2)]}return r.invert=function(t,r){return[t/e,2*i(r/(1+e))]},r}function dt(t,e){var r=L(8/(3*y));return[r*t*(1-n(e)/y),r*e]}function gt(t,e){var r=L(4-3*g(n(e)));return[2/L(6*y)*t*r,d(e)*L(2*y/3)*(2-r)]}function mt(t,e){var r=L(y*(4+y));return[2/r*t*(1+L(1-4*e*e/(y*y))),4/r*e]}function vt(t,e){var r=(2+x)*g(e);e/=2;for(var i=0,a=1/0;i<10&&n(a)>v;i++){var s=o(e);e-=a=(e+g(e)*(s+2)-r)/(2*s*(1+s))}return[2/L(y*(4+y))*t*(1+o(e)),2*L(y/(4+y))*g(e)]}function yt(t,e){return[t*(1+o(e))/L(2+y),2*e/L(2+y)]}function xt(t,e){for(var r=(1+x)*g(e),i=0,a=1/0;i<10&&n(a)>v;i++)e-=a=(e+g(e)-r)/(1+o(e));return r=L(2+y),[t*(1+o(e))/r,2*e/r]}ft.invert=function(t,e){var r=3*S(e/(ut*T));return[T*t/(ut*(2*o(2*r/3)-1)),r]},dt.invert=function(t,e){var r=L(8/(3*y)),i=e/r;return[t/(r*(1-n(i)/y)),i]},gt.invert=function(t,e){var r=2-n(e)/L(2*y/3);return[t*L(6*y)/(2*r),d(e)*S((4-r*r)/3)]},mt.invert=function(t,e){var r=L(y*(4+y))/2;return[t*r/(1+L(1-e*e*(4+y)/(4*y))),e*r/2]},vt.invert=function(t,e){var r=e*L((4+y)/y)/2,n=S(r),i=o(n);return[t/(2/L(y*(4+y))*(1+i)),S((n+r*(i+2))/(2+x))]},yt.invert=function(t,e){var r=L(2+y),n=e*r/2;return[r*t/(1+o(n)),n]},xt.invert=function(t,e){var r=1+x,n=L(r/2);return[2*t*n/(1+o(e*=n)),S((e+g(e))/r)]};var bt=3+2*w;function _t(t,e){var r=g(t/=2),n=o(t),a=L(o(e)),s=o(e/=2),l=g(e)/(s+w*n*a),u=L(2/(1+l*l)),f=L((w*s+(n+r)*a)/(w*s+(n-r)*a));return[bt*(u*(f-1/f)-2*c(f)),bt*(u*l*(f+1/f)-2*i(l))]}_t.invert=function(t,e){if(!(r=D.invert(t/1.2,1.065*e)))return null;var r,a=r[0],s=r[1],l=20;t/=bt,e/=bt;do{var h=a/2,p=s/2,d=g(h),m=o(h),y=g(p),b=o(p),T=o(s),k=L(T),A=y/(b+w*m*k),M=A*A,S=L(2/(1+M)),E=(w*b+(m+d)*k)/(w*b+(m-d)*k),C=L(E),P=C-1/C,I=C+1/C,O=S*P-2*c(C)-t,z=S*A*I-2*i(A)-e,R=y&&_*k*d*M/y,F=(w*m*b+k)/(2*(b+w*m*k)*(b+w*m*k)*k),B=-.5*A*S*S*S,N=B*R,j=B*F,U=(U=2*b+w*k*(m-d))*U*C,V=(w*m*b*k+T)/U,H=-w*d*y/(k*U),q=P*N-2*V/C+S*(V+V/E),G=P*j-2*H/C+S*(H+H/E),Y=A*I*N-2*R/(1+M)+S*I*R+S*A*(V-V/E),W=A*I*j-2*F/(1+M)+S*I*F+S*A*(H-H/E),X=G*Y-W*q;if(!X)break;var Z=(z*G-O*W)/X,J=(O*Y-z*q)/X;a-=Z,s=u(-x,f(x,s-J))}while((n(Z)>v||n(J)>v)&&--l>0);return n(n(s)-x)s){var d=L(h),m=a(f,u),b=i*p(m/i),_=m-b,w=t*o(_),T=(t*g(_)-_*g(w))/(x-w),k=Lt(_,T),A=(y-t)/Ct(k,w,y);u=d;var M,S=50;do{u-=M=(t+Ct(k,w,u)*A-d)/(k(u)*A)}while(n(M)>v&&--S>0);f=_*g(u),us){var u=L(c),f=a(l,r),h=i*p(f/i),d=f-h;r=u*o(d),l=u*g(d);for(var m=r-x,v=g(r),b=l/v,_=rv||n(p)>v)&&--x>0);return[d,m]},u}Tt.invert=function(t,e){var r=e/(1+wt);return[t&&t/(wt*L(1-r*r)),2*i(r)]},kt.invert=function(t,e){var r=i(e/T),n=o(r),a=2*r;return[t*T/2/(o(a)*n*n),a]};var It=Pt(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);var Ot=Pt(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);var zt=Pt(5/6*y,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Dt(t,e){var r=t*t,n=e*e;return[t*(1-.162388*n)*(.87-952426e-9*r*r),e*(1+n/12)]}Dt.invert=function(t,e){var r,i=t,a=e,o=50;do{var s=a*a;a-=r=(a*(1+s/12)-e)/(1+s/4)}while(n(r)>v&&--o>0);o=50,t/=1-.162388*s;do{var l=(l=i*i)*l;i-=r=(i*(.87-952426e-9*l)-t)/(.87-.00476213*l)}while(n(r)>v&&--o>0);return[i,a]};var Rt=Pt(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Ft(t){var e=t(x,0)[0]-t(-x,0)[0];function r(r,n){var i=r>0?-.5:.5,a=t(r+i*y,n);return a[0]-=i*e,a}return t.invert&&(r.invert=function(r,n){var i=r>0?-.5:.5,a=t.invert(r+i*e,n),o=a[0]-i*y;return o<-y?o+=2*y:o>y&&(o-=2*y),a[0]=o,a}),r}function Bt(t,e){var r=d(t),i=d(e),s=o(e),l=o(t)*s,c=g(t)*s,u=g(i*e);t=n(a(c,u)),e=S(l),n(t-x)>v&&(t%=x);var f=function(t,e){if(e===x)return[0,0];var r,i,a=g(e),s=a*a,l=s*s,c=1+l,u=1+3*l,f=1-l,h=S(1/L(c)),p=f+s*c*h,d=(1-a)/p,m=L(d),b=d*c,_=L(b),w=m*f;if(0===t)return[0,-(w+s*_)];var T,k=o(e),A=1/k,M=2*a*k,E=(-p*k-(-3*s+h*u)*M*(1-a))/(p*p),C=-A*M,P=-A*(s*c*E+d*u*M),I=-2*A*(f*(.5*E/m)-2*s*m*M),O=4*t/y;if(t>.222*y||e.175*y){if(r=(w+s*L(b*(1+l)-w*w))/(1+l),t>y/4)return[r,r];var z=r,D=.5*r;r=.5*(D+z),i=50;do{var R=L(b-r*r),F=r*(I+C*R)+P*S(r/_)-O;if(!F)break;F<0?D=r:z=r,r=.5*(D+z)}while(n(z-D)>v&&--i>0)}else{r=v,i=25;do{var B=r*r,N=L(b-B),j=I+C*N,U=r*j+P*S(r/_)-O,V=j+(P-C*B)/N;r-=T=N?U/V:0}while(n(T)>v&&--i>0)}return[r,-w-s*L(b-r*r)]}(t>y/4?x-t:t,e);return t>y/4&&(u=f[0],f[0]=-f[1],f[1]=-u),f[0]*=r,f[1]*=-i,f}function Nt(t,e){var r,a,l,c,u,f;if(e=1-v)return r=(1-e)/4,l=1/(a=P(t)),[(c=((f=s(2*(f=t)))-1)/(f+1))+r*((u=a*C(t))-t)/(a*a),l-r*c*l*(u-t),l+r*c*l*(u+t),2*i(s(t))-x+r*(u-t)/a];var h=[1,0,0,0,0,0,0,0,0],p=[L(e),0,0,0,0,0,0,0,0],d=0;for(a=L(1-e),u=1;n(p[d]/h[d])>v&&d<8;)r=h[d++],p[d]=(r-a)/2,h[d]=(r+a)/2,a=L(r*a),u*=2;l=u*h[d]*t;do{l=(S(c=p[d]*g(a=l)/h[d])+l)/2}while(--d);return[g(l),c=o(l),c/o(l-a),l]}function jt(t,e){if(!e)return t;if(1===e)return c(m(t/2+b));for(var r=1,a=L(1-e),o=L(e),s=0;n(o)>v;s++){if(t%y){var l=i(a*m(t)/r);l<0&&(l+=y),t+=l+~~(t/y)*y}else t+=t;o=(r+a)/2,a=L(r*a),o=((r=o)-a)/2}return t/(h(2,s)*r)}function Ut(t,e){var r=(w-1)/(w+1),l=L(1-r*r),u=jt(x,l*l),f=c(m(y/4+n(e)/2)),h=s(-1*f)/L(r),p=function(t,e){var r=t*t,n=e+1,i=1-r-e*e;return[.5*((t>=0?x:-x)-a(i,2*t)),-.25*c(i*i+4*r)+.5*c(n*n+r)]}(h*o(-1*t),h*g(-1*t)),v=function(t,e,r){var a=n(t),o=C(n(e));if(a){var s=1/g(a),l=1/(m(a)*m(a)),c=-(l+r*(o*o*s*s)-1+r),u=(-c+L(c*c-4*((r-1)*l)))/2;return[jt(i(1/L(u)),r)*d(t),jt(i(L((u/l-1)/r)),1-r)*d(e)]}return[0,jt(i(o),1-r)*d(e)]}(p[0],p[1],l*l);return[-v[1],(e>=0?1:-1)*(.5*u-v[0])]}function Vt(t){var e=g(t),r=o(t),i=Ht(t);function s(t,a){var s=i(t,a);t=s[0],a=s[1];var l=g(a),c=o(a),u=o(t),f=E(e*l+r*c*u),h=g(f),p=n(h)>v?f/h:1;return[p*r*g(t),(n(t)>x?p:-p)*(e*c-r*l*u)]}return i.invert=Ht(-t),s.invert=function(t,r){var n=L(t*t+r*r),s=-g(n),l=o(n),c=n*l,u=-r*s,f=n*e,h=L(c*c+u*u-f*f),p=a(c*f+u*h,u*f-c*h),d=(n>x?-1:1)*a(t*s,n*o(p)*l+r*g(p)*s);return i.invert(d,p)},s}function Ht(t){var e=g(t),r=o(t);return function(t,n){var i=o(n),s=o(t)*i,l=g(t)*i,c=g(n);return[a(l,s*r-c*e),S(c*r+s*e)]}}Bt.invert=function(t,e){n(t)>1&&(t=2*d(t)-t),n(e)>1&&(e=2*d(e)-e);var r=d(t),i=d(e),s=-r*t,l=-i*e,c=l/s<1,u=function(t,e){var r=0,i=1,a=.5,s=50;for(;;){var l=a*a,c=L(a),u=S(1/L(1+l)),f=1-l+a*(1+l)*u,h=(1-c)/f,p=L(h),d=h*(1+l),g=p*(1-l),m=L(d-t*t),v=e+g+a*m;if(n(i-r)<1e-12||0==--s||0===v)break;v>0?r=a:i=a,a=.5*(r+i)}if(!s)return null;var x=S(c),b=o(x),_=1/b,w=2*c*b,T=(-f*b-(-3*a+u*(1+3*l))*w*(1-c))/(f*f);return[y/4*(t*(-2*_*(.5*T/p*(1-l)-2*a*p*w)+-_*w*m)+-_*(a*(1+l)*T+h*(1+3*l)*w)*S(t/L(d))),x]}(c?l:s,c?s:l),f=u[0],h=u[1],p=o(h);return c&&(f=-x-f),[r*(a(g(f)*p,-g(h))+y),i*S(o(f)*p)]},Ut.invert=function(t,e){var r,n,o,l,u,f,h=(w-1)/(w+1),p=L(1-h*h),d=jt(x,p*p),g=(n=-t,o=p*p,(r=.5*d-e)?(l=Nt(r,o),n?(f=(u=Nt(n,1-o))[1]*u[1]+o*l[0]*l[0]*u[0]*u[0],[[l[0]*u[2]/f,l[1]*l[2]*u[0]*u[1]/f],[l[1]*u[1]/f,-l[0]*l[2]*u[0]*u[2]/f],[l[2]*u[1]*u[2]/f,-o*l[0]*l[1]*u[0]/f]]):[[l[0],0],[l[1],0],[l[2],0]]):[[0,(u=Nt(n,1-o))[0]/u[1]],[1/u[1],0],[u[2]/u[1],0]]),m=function(t,e){var r=e[0]*e[0]+e[1]*e[1];return[(t[0]*e[0]+t[1]*e[1])/r,(t[1]*e[0]-t[0]*e[1])/r]}(g[0],g[1]);return[a(m[1],m[0])/-1,2*i(s(-.5*c(h*m[0]*m[0]+h*m[1]*m[1])))-x]};var qt=S(1-1/3)*A,Gt=ht(0);function Yt(t){var e=qt*M,r=lt(y,e)[0]-lt(-y,e)[0],i=Gt(0,e)[1],a=lt(0,e)[1],o=T-a,s=k/t,c=4/k,h=i+o*o*4/k;function p(p,d){var g,m=n(d);if(m>e){var v=f(t-1,u(0,l((p+y)/s)));(g=lt(p+=y*(t-1)/t-v*s,m))[0]=g[0]*k/r-k*(t-1)/(2*t)+v*k/t,g[1]=i+4*(g[1]-a)*o/k,d<0&&(g[1]=-g[1])}else g=Gt(p,d);return g[0]*=c,g[1]/=h,g}return p.invert=function(e,p){e/=c;var d=n(p*=h);if(d>i){var g=f(t-1,u(0,l((e+y)/s)));e=(e+y*(t-1)/t-g*s)*r/k;var m=lt.invert(e,.25*(d-i)*k/o+a);return m[0]-=y*(t-1)/t-g*s,p<0&&(m[1]=-m[1]),m}return Gt.invert(e,p)},p}function Wt(t,e){return[t,1&e?90-v:qt]}function Xt(t,e){return[t,1&e?-90+v:-qt]}function Zt(t){return[t[0]*(1-v),t[1]]}function Jt(t){var e,r=1+t,i=S(g(1/r)),s=2*L(y/(e=y+4*i*r)),l=.5*s*(r+L(t*(2+t))),c=t*t,u=r*r;function f(f,h){var p,d,m=1-g(h);if(m&&m<2){var v,b=x-h,_=25;do{var w=g(b),T=o(b),k=i+a(w,r-T),A=1+u-2*r*T;b-=v=(b-c*i-r*w+A*k-.5*m*e)/(2*r*w*k)}while(n(v)>1e-12&&--_>0);p=s*L(A),d=f*k/y}else p=s*(t+m),d=f*i/y;return[p*g(d),l-p*o(d)]}return f.invert=function(t,n){var o=t*t+(n-=l)*n,f=(1+u-o/(s*s))/(2*r),h=E(f),p=g(h),d=i+a(p,r-f);return[S(t/L(o))*y/d,S(1-2*(h-c*i-r*p+(1+u-2*r*f)*d)/e)]},f}function Kt(t,e){return e>-.7109889596207567?((t=W(t,e))[1]+=.0528035274542,t):Q(t,e)}function Qt(t,e){return n(e)>.7109889596207567?((t=W(t,e))[1]-=e>0?.0528035274542:-.0528035274542,t):Q(t,e)}function $t(t,e,r,n){var i=L(4*y/(2*r+(1+t-e/2)*g(2*r)+(t+e)/2*g(4*r)+e/2*g(6*r))),a=L(n*g(r)*L((1+t*o(2*r)+e*o(4*r))/(1+t+e))),s=r*c(1);function l(r){return L(1+t*o(2*r)+e*o(4*r))}function c(n){var i=n*r;return(2*i+(1+t-e/2)*g(2*i)+(t+e)/2*g(4*i)+e/2*g(6*i))/r}function u(t){return l(t)*g(t)}var f=function(t,e){var n=r*V(c,s*g(e)/r,e/y);isNaN(n)&&(n=r*d(e));var u=i*l(n);return[u*a*t/y*o(n),u/a*g(n)]};return f.invert=function(t,e){var n=V(u,e*a/i);return[t*y/(o(n)*i*a*l(n)),S(r*c(n/r)/s)]},0===r&&(i=L(n/y),(f=function(t,e){return[t*i,g(e)/i]}).invert=function(t,e){return[t/i,S(e*i)]}),f}function te(t,e,r,n,i){void 0===n&&(n=1e-8),void 0===i&&(i=20);var a=t(e),o=t(.5*(e+r)),s=t(r);return function t(e,r,n,i,a,o,s,l,c,u,f){if(f.nanEncountered)return NaN;var h,p,d,g,m,v,y,x,b,_;if(p=e(r+.25*(h=n-r)),d=e(n-.25*h),isNaN(p))f.nanEncountered=!0;else{if(!isNaN(d))return _=((v=(g=h*(i+4*p+a)/12)+(m=h*(a+4*d+o)/12))-s)/15,u>c?(f.maxDepthCount++,v+_):Math.abs(_)t?r=n:e=n,n=e+r>>1}while(n>e);var i=c[n+1]-c[n];return i&&(i=(t-c[n+1])/i),(n+1+i)/s}var p=2*f(1)/y*o/r,m=function(t,e){var r=f(n(g(e))),a=i(r)*t;return r/=p,[a,e>=0?r:-r]};return m.invert=function(t,e){var r;return n(e*=p)<1&&(r=d(e)*S(a(n(e))*o)),[t/i(n(e)),r]},m}function re(t,e){return n(t[0]-e[0])=0;--l)n=(e=t[1][l])[0][0],i=e[0][1],a=e[1][1],o=e[2][0],s=e[2][1],c.push(ne([[o-v,s-v],[o-v,a+v],[n+v,a+v],[n+v,i-v]],30));return{type:\"Polygon\",coordinates:[r.merge(c)]}}function ae(t,r,n){var i,a;function o(e,n){for(var i=n<0?-1:1,a=r[+(n<0)],o=0,s=a.length-1;oa[o][2][0];++o);var l=t(e-a[o][1][0],n);return l[0]+=t(a[o][1][0],i*n>i*a[o][0][1]?a[o][0][1]:n)[0],l}n?o.invert=n(o):t.invert&&(o.invert=function(e,n){for(var i=a[+(n<0)],s=r[+(n<0)],l=0,c=i.length;lo&&(r=a,a=o,o=r),[[n,a],[i,o]]}))})),s):r.map((function(t){return t.map((function(t){return[[t[0][0]*A,t[0][1]*A],[t[1][0]*A,t[1][1]*A],[t[2][0]*A,t[2][1]*A]]}))}))},null!=r&&s.lobes(r),s}Kt.invert=function(t,e){return e>-.7109889596207567?W.invert(t,e-.0528035274542):Q.invert(t,e)},Qt.invert=function(t,e){return n(e)>.7109889596207567?W.invert(t,e+(e>0?.0528035274542:-.0528035274542)):Q.invert(t,e)};var oe=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var se=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var le=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var ce=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];var ue=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];var fe=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function he(t,e){return[3/k*t*L(y*y/3-e*e),e]}function pe(t){function e(e,r){if(n(n(r)-x)2)return null;var o=(e/=2)*e,s=(r/=2)*r,l=2*r/(1+o+s);return l=h((1+l)/(1-l),1/t),[a(2*e,1-o-s)/t,S((l-1)/(l+1))]},e}he.invert=function(t,e){return[k/3*t/L(y*y/3-e*e),e]};var de=y/w;function ge(t,e){return[t*(1+L(o(e)))/2,e/(o(e/2)*o(t/6))]}function me(t,e){var r=t*t,n=e*e;return[t*(.975534+n*(-.0143059*r-.119161+-.0547009*n)),e*(1.00384+r*(.0802894+-.02855*n+199025e-9*r)+n*(.0998909+-.0491032*n))]}function ve(t,e){return[g(t)/o(e),m(e)*o(t)]}function ye(t){var e=o(t),r=m(b+t/2);function i(i,a){var o=a-t,s=n(o)=0;)h=(f=t[u])[0]+l*(i=h)-c*p,p=f[1]+l*p+c*i;return[h=l*(i=h)-c*p,p=l*p+c*i]}return r.invert=function(r,s){var l=20,c=r,u=s;do{for(var f,h=e,p=t[h],d=p[0],m=p[1],v=0,y=0;--h>=0;)v=d+c*(f=v)-u*y,y=m+c*y+u*f,d=(p=t[h])[0]+c*(f=d)-u*m,m=p[1]+c*m+u*f;var x,b,_=(v=d+c*(f=v)-u*y)*v+(y=m+c*y+u*f)*y;c-=x=((d=c*(f=d)-u*m-r)*v+(m=c*m+u*f-s)*y)/_,u-=b=(m*v-d*y)/_}while(n(x)+n(b)>1e-12&&--l>0);if(l){var w=L(c*c+u*u),T=2*i(.5*w),k=g(T);return[a(c*k,w*o(T)),w?S(u*k/w):0]}},r}ge.invert=function(t,e){var r=n(t),i=n(e),a=v,s=x;iv||n(b)>v)&&--a>0);return a&&[r,i]},ve.invert=function(t,e){var r=t*t,n=e*e+1,i=r+n,a=t?_*L((i-L(i*i-4*r))/r):1/L(n);return[S(t*a),d(e)*E(a)]},xe.invert=function(t,e){return[t,2.5*i(s(.8*e))-.625*y]};var _e=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],we=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Te=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ke=[[.9245,0],[0,0],[.01943,0]],Ae=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Me(t,r){var n=e.geoProjection(be(t)).rotate(r).clipAngle(90),i=e.geoRotation(r),a=n.center;return delete n.rotate,n.center=function(t){return arguments.length?a(i(t)):i.invert(a())},n}var Se=L(6),Ee=L(7);function Le(t,e){var r=S(7*g(e)/(3*Se));return[Se*t*(2*o(2*r/3)-1)/Ee,9*g(r/3)/Ee]}function Ce(t,e){for(var r,i=(1+_)*g(e),a=e,s=0;s<25&&(a-=r=(g(a/2)+g(a)-i)/(.5*o(a/2)+o(a)),!(n(r)1e-12&&--l>0);return[t/(.84719-.13063*(i=s*s)+(o=i*(a=i*i))*o*(.05494*i-.04515-.02326*a+.00331*o)),s]},Oe.invert=function(t,e){for(var r=e/2,i=0,a=1/0;i<10&&n(a)>v;++i){var s=o(e/2);e-=a=(e-m(e/2)-r)/(1-.5/(s*s))}return[2*t/(1+o(e)),e]};var ze=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function De(t,e){var r=g(e),i=o(e),a=d(t);if(0===t||n(e)===x)return[0,e];if(0===e)return[t,0];if(n(t)===x)return[t*i,x*r];var s=y/(2*t)-2*t/y,l=2*e/y,c=(1-l*l)/(r-l),u=s*s,f=c*c,h=1+u/f,p=1+f/u,m=(s*r/c-s/2)/h,v=(f*r/u+c/2)/p,b=v*v-(f*r*r/u+c*r-1)/p;return[x*(m+L(m*m+i*i/h)*a),x*(v+L(b<0?0:b)*d(-e*s)*a)]}De.invert=function(t,e){var r=(t/=x)*t,n=r+(e/=x)*e,i=y*y;return[t?(n-1+L((1-n)*(1-n)+4*r))/(2*t)*x:0,V((function(t){return n*(y*g(t)-2*t)*y+4*t*t*(e-g(t))+2*y*t-i*e}),0)]};function Re(t,e){var r=e*e;return[t,e*(1.0148+r*r*(.23185+r*(.02406*r-.14499)))]}function Fe(t,e){if(n(e)=0;)if(n=e[s],r[0]===n[0]&&r[1]===n[1]){if(a)return[a,r];a=r}}}(e.face,r.face),i=Be(n.map(r.project),n.map(e.project));e.transform=r.transform?Ne(r.transform,i):i;for(var a=r.edges,o=0,s=a.length;o1.790857183?e=1.790857183:e<-1.790857183&&(e=-1.790857183);var r,i=e;do{var a=i*i;i-=r=(i*(1.0148+a*a*(.23185+a*(.02406*a-.14499)))-e)/(1.0148+a*a*(5*.23185+a*(.21654*a-1.01493)))}while(n(r)>v);return[t,i]},Fe.invert=function(t,e){if(n(e)v&&--s>0);return l=m(a),[(n(e)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])})),nr=[],t.length?t.length>1?{type:\"MultiPolygon\",coordinates:t}:{type:\"Polygon\",coordinates:t[0]}:null}};function sr(t){var r=t(x,0)[0]-t(-x,0)[0];function i(e,i){var a=n(e)0?e-y:e+y,i),s=(o[0]-o[1])*_,l=(o[0]+o[1])*_;if(a)return[s,l];var c=r*_,u=s>0^l>0?-1:1;return[u*s-d(l)*c,u*l-d(s)*c]}return t.invert&&(i.invert=function(e,i){var a=(e+i)*_,o=(i-e)*_,s=n(a)<.5*r&&n(o)<.5*r;if(!s){var l=r*_,c=a>0^o>0?-1:1,u=-c*e+(o>0?1:-1)*l,f=-c*i+(a>0?1:-1)*l;a=(-u-f)*_,o=(u-f)*_}var h=t.invert(a,o);return s||(h[0]+=a>0?y:-y),h}),e.geoProjection(i).rotate([-90,-90,45]).clipAngle(179.999)}function lr(){return sr(Ut).scale(111.48)}function cr(t){var e=g(t);function r(r,n){var a=e?m(r*e/2)/e:r/2;if(!n)return[2*a,-t];var s=2*i(a*g(n)),l=1/m(n);return[g(s)*l,n+(1-o(s))*l-t]}return r.invert=function(r,a){if(n(a+=t)v&&--u>0);var d=r*(f=m(c)),x=m(n(a)0?x:-x)*(h+o*(d-c)/2+o*o*(d-2*h+c)/2)]}function hr(t,e){var r=function(t){function e(e,r){var n=o(r),i=(t-1)/(t-n*o(e));return[i*n*g(e),i*g(r)]}return e.invert=function(e,r){var n=e*e+r*r,i=L(n),o=(t-L(1-n*(t+1)/(t-1)))/((t-1)/i+i/(t-1));return[a(e*o,i*L(1-o*o)),i?S(r*o/i):0]},e}(t);if(!e)return r;var n=o(e),i=g(e);function s(e,a){var o=r(e,a),s=o[1],l=s*i/(t-1)+n;return[o[0]*n/l,s/l]}return s.invert=function(e,a){var o=(t-1)/(t-1-a*i);return r.invert(o*e,o*a*n)},s}ur.forEach((function(t){t[1]*=1.0144})),fr.invert=function(t,e){var r=e/x,i=90*r,a=f(18,n(i/5)),o=u(0,l(a));do{var s=ur[o][1],c=ur[o+1][1],h=ur[f(19,o+2)][1],p=h-s,d=h-2*c+s,g=2*(n(r)-c)/p,m=d/p,v=g*(1-m*g*(1-2*m*g));if(v>=0||1===o){i=(e>=0?5:-5)*(v+a);var y,b=50;do{v=(a=f(18,n(i)/5))-(o=l(a)),s=ur[o][1],c=ur[o+1][1],h=ur[f(19,o+2)][1],i-=(y=(e>=0?x:-x)*(c+v*(h-s)/2+v*v*(h-2*c+s)/2)-e)*A}while(n(y)>1e-12&&--b>0);break}}while(--o>=0);var _=ur[o][0],w=ur[o+1][0],T=ur[f(19,o+2)][0];return[t/(w+v*(T-_)/2+v*v*(T-2*w+_)/2),i*M]};var pr=-179.9999,dr=179.9999,gr=-89.9999;function mr(t){return t.length>0}function vr(t){return-90===t||90===t?[0,t]:[-180,(e=t,Math.floor(1e4*e)/1e4)];var e}function yr(t){var e=t[0],r=t[1],n=!1;return e<=pr?(e=-180,n=!0):e>=dr&&(e=180,n=!0),r<=gr?(r=-90,n=!0):r>=89.9999&&(r=90,n=!0),n?[e,r]:t}function xr(t){return t.map(yr)}function br(t,e,r){for(var n=0,i=t.length;n=dr||u<=gr||u>=89.9999){a[o]=yr(l);for(var f=o+1;fpr&&pgr&&d<89.9999)break}if(f===o+1)continue;if(o){var g={index:-1,polygon:e,ring:a.slice(0,o+1)};g.ring[g.ring.length-1]=vr(u),r[r.length-1]=g}else r.pop();if(f>=s)break;r.push({index:-1,polygon:e,ring:a=a.slice(f-1)}),a[0]=vr(a[0][1]),o=-1,s=a.length}}}}function _r(t){var e,r,n,i,a,o,s=t.length,l={},c={};for(e=0;e0?y-l:l)*A],u=e.geoProjection(t(s)).rotate(c),f=e.geoRotation(c),h=u.center;return delete u.rotate,u.center=function(t){return arguments.length?h(f(t)):f.invert(h())},u.clipAngle(90)}function Mr(t){var r=o(t);function n(t,n){var i=e.geoGnomonicRaw(t,n);return i[0]*=r,i}return n.invert=function(t,n){return e.geoGnomonicRaw.invert(t/r,n)},n}function Sr(t,e){return Ar(Mr,t,e)}function Er(t){if(!(t*=2))return e.geoAzimuthalEquidistantRaw;var r=-t/2,n=-r,i=t*t,s=m(n),l=.5/g(n);function c(e,a){var s=E(o(a)*o(e-r)),l=E(o(a)*o(e-n));return[((s*=s)-(l*=l))/(2*t),(a<0?-1:1)*L(4*i*l-(i-s+l)*(i-s+l))/(2*t)]}return c.invert=function(t,e){var i,c,u=e*e,f=o(L(u+(i=t+r)*i)),h=o(L(u+(i=t+n)*i));return[a(c=f-h,i=(f+h)*s),(e<0?-1:1)*E(L(i*i+c*c)*l)]},c}function Lr(t,e){return Ar(Er,t,e)}function Cr(t,e){if(n(e)v&&--l>0);return[d(t)*(L(a*a+4)+a)*y/4,x*s]};var Rr=4*y+3*L(3),Fr=2*L(2*y*L(3)/Rr),Br=Y(Fr*L(3)/y,Fr,Rr/6);function Nr(t,e){return[t*L(1-3*e*e/(y*y)),e]}function jr(t,e){var r=o(e),n=o(t)*r,i=1-n,s=o(t=a(g(t)*r,-g(e))),l=g(t);return[l*(r=L(1-n*n))-s*i,-s*r-l*i]}function Ur(t,e){var r=O(t,e);return[(r[0]+t/x)/2,(r[1]+e)/2]}Nr.invert=function(t,e){return[t/L(1-3*e*e/(y*y)),e]},jr.invert=function(t,e){var r=(t*t+e*e)/-2,n=L(-r*(2+r)),i=e*r+t*n,o=t*r-e*n,s=L(o*o+i*i);return[a(n*i,s*(1+r)),s?-S(n*o/s):0]},Ur.invert=function(t,e){var r=t,i=e,a=25;do{var s,l=o(i),c=g(i),u=g(2*i),f=c*c,h=l*l,p=g(r),d=o(r/2),m=g(r/2),y=m*m,b=1-h*d*d,_=b?E(l*d)*L(s=1/b):s=0,w=.5*(2*_*l*m+r/x)-t,T=.5*(_*c+i)-e,k=.5*s*(h*y+_*l*d*f)+.5/x,A=s*(p*u/4-_*c*m),M=.125*s*(u*m-_*c*h*p),S=.5*s*(f*d+_*y*l)+.5,C=A*M-S*k,P=(T*A-w*S)/C,I=(w*M-T*k)/C;r-=P,i-=I}while((n(P)>v||n(I)>v)&&--a>0);return[r,i]},t.geoNaturalEarth=e.geoNaturalEarth1,t.geoNaturalEarthRaw=e.geoNaturalEarth1Raw,t.geoAiry=function(){var t=x,r=e.geoProjectionMutator(I),n=r(t);return n.radius=function(e){return arguments.length?r(t=e*M):t*A},n.scale(179.976).clipAngle(147)},t.geoAiryRaw=I,t.geoAitoff=function(){return e.geoProjection(O).scale(152.63)},t.geoAitoffRaw=O,t.geoArmadillo=function(){var t=20*M,r=t>=0?1:-1,n=m(r*t),i=e.geoProjectionMutator(z),s=i(t),l=s.stream;return s.parallel=function(e){return arguments.length?(n=m((r=(t=e*M)>=0?1:-1)*t),i(t)):t*A},s.stream=function(e){var i=s.rotate(),c=l(e),u=(s.rotate([0,0]),l(e)),f=s.precision();return s.rotate(i),c.sphere=function(){u.polygonStart(),u.lineStart();for(var e=-180*r;r*e<180;e+=90*r)u.point(e,90*r);if(t)for(;r*(e-=3*r*f)>=-180;)u.point(e,r*-a(o(e*M/2),n)*A);u.lineEnd(),u.polygonEnd()},c},s.scale(218.695).center([0,28.0974])},t.geoArmadilloRaw=z,t.geoAugust=function(){return e.geoProjection(D).scale(66.1603)},t.geoAugustRaw=D,t.geoBaker=function(){return e.geoProjection(B).scale(112.314)},t.geoBakerRaw=B,t.geoBerghaus=function(){var t=5,r=e.geoProjectionMutator(N),n=r(t),i=n.stream,s=-o(.01*M),l=g(.01*M);return n.lobes=function(e){return arguments.length?r(t=+e):t},n.stream=function(e){var r=n.rotate(),c=i(e),u=(n.rotate([0,0]),i(e));return n.rotate(r),c.sphere=function(){u.polygonStart(),u.lineStart();for(var e=0,r=360/t,n=2*y/t,i=90-180/t,c=x;e=0;)t.point((e=r[i])[0],e[1]);t.lineEnd(),t.polygonEnd()},t},n.scale(79.4187).parallel(45).clipAngle(179.999)},t.geoHammerRetroazimuthalRaw=Vt,t.geoHealpix=function(){var t=4,n=e.geoProjectionMutator(Yt),i=n(t),a=i.stream;return i.lobes=function(e){return arguments.length?n(t=+e):t},i.stream=function(n){var o=i.rotate(),s=a(n),l=(i.rotate([0,0]),a(n));return i.rotate(o),s.sphere=function(){var n,i;e.geoStream((n=180/t,i=[].concat(r.range(-180,180+n/2,n).map(Wt),r.range(180,-180-n/2,-n).map(Xt)),{type:\"Polygon\",coordinates:[180===n?i.map(Zt):i]}),l)},s},i.scale(239.75)},t.geoHealpixRaw=Yt,t.geoHill=function(){var t=1,r=e.geoProjectionMutator(Jt),n=r(t);return n.ratio=function(e){return arguments.length?r(t=+e):t},n.scale(167.774).center([0,18.67])},t.geoHillRaw=Jt,t.geoHomolosine=function(){return e.geoProjection(Qt).scale(152.63)},t.geoHomolosineRaw=Qt,t.geoHufnagel=function(){var t=1,r=0,n=45*M,i=2,a=e.geoProjectionMutator($t),o=a(t,r,n,i);return o.a=function(e){return arguments.length?a(t=+e,r,n,i):t},o.b=function(e){return arguments.length?a(t,r=+e,n,i):r},o.psiMax=function(e){return arguments.length?a(t,r,n=+e*M,i):n*A},o.ratio=function(e){return arguments.length?a(t,r,n,i=+e):i},o.scale(180.739)},t.geoHufnagelRaw=$t,t.geoHyperelliptical=function(){var t=0,r=2.5,n=1.183136,i=e.geoProjectionMutator(ee),a=i(t,r,n);return a.alpha=function(e){return arguments.length?i(t=+e,r,n):t},a.k=function(e){return arguments.length?i(t,r=+e,n):r},a.gamma=function(e){return arguments.length?i(t,r,n=+e):n},a.scale(152.63)},t.geoHyperellipticalRaw=ee,t.geoInterrupt=ae,t.geoInterruptedBoggs=function(){return ae(J,oe).scale(160.857)},t.geoInterruptedHomolosine=function(){return ae(Qt,se).scale(152.63)},t.geoInterruptedMollweide=function(){return ae(W,le).scale(169.529)},t.geoInterruptedMollweideHemispheres=function(){return ae(W,ce).scale(169.529).rotate([20,0])},t.geoInterruptedSinuMollweide=function(){return ae(Kt,ue,H).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},t.geoInterruptedSinusoidal=function(){return ae(Q,fe).scale(152.63).rotate([-20,0])},t.geoKavrayskiy7=function(){return e.geoProjection(he).scale(158.837)},t.geoKavrayskiy7Raw=he,t.geoLagrange=function(){var t=.5,r=e.geoProjectionMutator(pe),n=r(t);return n.spacing=function(e){return arguments.length?r(t=+e):t},n.scale(124.75)},t.geoLagrangeRaw=pe,t.geoLarrivee=function(){return e.geoProjection(ge).scale(97.2672)},t.geoLarriveeRaw=ge,t.geoLaskowski=function(){return e.geoProjection(me).scale(139.98)},t.geoLaskowskiRaw=me,t.geoLittrow=function(){return e.geoProjection(ve).scale(144.049).clipAngle(89.999)},t.geoLittrowRaw=ve,t.geoLoximuthal=function(){return K(ye).parallel(40).scale(158.837)},t.geoLoximuthalRaw=ye,t.geoMiller=function(){return e.geoProjection(xe).scale(108.318)},t.geoMillerRaw=xe,t.geoModifiedStereographic=Me,t.geoModifiedStereographicRaw=be,t.geoModifiedStereographicAlaska=function(){return Me(_e,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},t.geoModifiedStereographicGs48=function(){return Me(we,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},t.geoModifiedStereographicGs50=function(){return Me(Te,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},t.geoModifiedStereographicMiller=function(){return Me(ke,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},t.geoModifiedStereographicLee=function(){return Me(Ae,[165,10]).scale(250).clipAngle(130).center([-165,-10])},t.geoMollweide=function(){return e.geoProjection(W).scale(169.529)},t.geoMollweideRaw=W,t.geoMtFlatPolarParabolic=function(){return e.geoProjection(Le).scale(164.859)},t.geoMtFlatPolarParabolicRaw=Le,t.geoMtFlatPolarQuartic=function(){return e.geoProjection(Ce).scale(188.209)},t.geoMtFlatPolarQuarticRaw=Ce,t.geoMtFlatPolarSinusoidal=function(){return e.geoProjection(Pe).scale(166.518)},t.geoMtFlatPolarSinusoidalRaw=Pe,t.geoNaturalEarth2=function(){return e.geoProjection(Ie).scale(175.295)},t.geoNaturalEarth2Raw=Ie,t.geoNellHammer=function(){return e.geoProjection(Oe).scale(152.63)},t.geoNellHammerRaw=Oe,t.geoInterruptedQuarticAuthalic=function(){return ae(j(1/0),ze).rotate([20,0]).scale(152.63)},t.geoNicolosi=function(){return e.geoProjection(De).scale(127.267)},t.geoNicolosiRaw=De,t.geoPatterson=function(){return e.geoProjection(Re).scale(139.319)},t.geoPattersonRaw=Re,t.geoPolyconic=function(){return e.geoProjection(Fe).scale(103.74)},t.geoPolyconicRaw=Fe,t.geoPolyhedral=Ve,t.geoPolyhedralButterfly=function(t){t=t||function(t){var r=e.geoCentroid({type:\"MultiPoint\",coordinates:t});return e.geoGnomonic().scale(1).translate([0,0]).rotate([-r[0],-r[1]])};var r=Ye.map((function(e){return{face:e,project:t(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var n=r[t];n&&(n.children||(n.children=[])).push(r[e])})),Ve(r[0],(function(t,e){return r[t<-y/2?e<0?6:4:t<0?e<0?2:0:t0?[-r[0],0]:[180-r[0],180])};var r=Ye.map((function(e){return{face:e,project:t(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var n=r[t];n&&(n.children||(n.children=[])).push(r[e])})),Ve(r[0],(function(t,e){return r[t<-y/2?e<0?6:4:t<0?e<0?2:0:t2||a[0]!=e[0]||a[1]!=e[1])&&(n.push(a),e=a)}return 1===n.length&&t.length>1&&n.push(r(t[t.length-1])),n}function a(t){return t.map(i)}function o(t){if(null==t)return t;var e;switch(t.type){case\"GeometryCollection\":e={type:\"GeometryCollection\",geometries:t.geometries.map(o)};break;case\"Point\":e={type:\"Point\",coordinates:r(t.coordinates)};break;case\"MultiPoint\":e={type:t.type,coordinates:n(t.coordinates)};break;case\"LineString\":e={type:t.type,coordinates:i(t.coordinates)};break;case\"MultiLineString\":case\"Polygon\":e={type:t.type,coordinates:a(t.coordinates)};break;case\"MultiPolygon\":e={type:\"MultiPolygon\",coordinates:t.coordinates.map(a)};break;default:return t}return null!=t.bbox&&(e.bbox=t.bbox),e}function s(t){var e={type:\"Feature\",properties:t.properties,geometry:o(t.geometry)};return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),e}if(null!=t)switch(t.type){case\"Feature\":return s(t);case\"FeatureCollection\":var l={type:\"FeatureCollection\",features:t.features.map(s)};return null!=t.bbox&&(l.bbox=t.bbox),l;default:return o(t)}return t},t.geoQuincuncial=sr,t.geoRectangularPolyconic=function(){return K(cr).scale(131.215)},t.geoRectangularPolyconicRaw=cr,t.geoRobinson=function(){return e.geoProjection(fr).scale(152.63)},t.geoRobinsonRaw=fr,t.geoSatellite=function(){var t=2,r=0,n=e.geoProjectionMutator(hr),i=n(t,r);return i.distance=function(e){return arguments.length?n(t=+e,r):t},i.tilt=function(e){return arguments.length?n(t,r=e*M):r*A},i.scale(432.147).clipAngle(E(1/t)*A-1e-6)},t.geoSatelliteRaw=hr,t.geoSinuMollweide=function(){return e.geoProjection(Kt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},t.geoSinuMollweideRaw=Kt,t.geoSinusoidal=function(){return e.geoProjection(Q).scale(152.63)},t.geoSinusoidalRaw=Q,t.geoStitch=function(t){if(null==t)return t;switch(t.type){case\"Feature\":return wr(t);case\"FeatureCollection\":var e={type:\"FeatureCollection\",features:t.features.map(wr)};return null!=t.bbox&&(e.bbox=t.bbox),e;default:return Tr(t)}},t.geoTimes=function(){return e.geoProjection(kr).scale(146.153)},t.geoTimesRaw=kr,t.geoTwoPointAzimuthal=Sr,t.geoTwoPointAzimuthalRaw=Mr,t.geoTwoPointAzimuthalUsa=function(){return Sr([-158,21.5],[-77,39]).clipAngle(60).scale(400)},t.geoTwoPointEquidistant=Lr,t.geoTwoPointEquidistantRaw=Er,t.geoTwoPointEquidistantUsa=function(){return Lr([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},t.geoVanDerGrinten=function(){return e.geoProjection(Cr).scale(79.4183)},t.geoVanDerGrintenRaw=Cr,t.geoVanDerGrinten2=function(){return e.geoProjection(Pr).scale(79.4183)},t.geoVanDerGrinten2Raw=Pr,t.geoVanDerGrinten3=function(){return e.geoProjection(Ir).scale(79.4183)},t.geoVanDerGrinten3Raw=Ir,t.geoVanDerGrinten4=function(){return e.geoProjection(Or).scale(127.16)},t.geoVanDerGrinten4Raw=Or,t.geoWagner=Dr,t.geoWagner7=function(){return Dr().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},t.geoWagnerRaw=zr,t.geoWagner4=function(){return e.geoProjection(Br).scale(176.84)},t.geoWagner4Raw=Br,t.geoWagner6=function(){return e.geoProjection(Nr).scale(152.63)},t.geoWagner6Raw=Nr,t.geoWiechel=function(){return e.geoProjection(jr).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},t.geoWiechelRaw=jr,t.geoWinkel3=function(){return e.geoProjection(Ur).scale(158.837)},t.geoWinkel3Raw=Ur,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{\"d3-array\":107,\"d3-geo\":114}],114:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-array\")):i((n=n||self).d3=n.d3||{},n.d3)}(this,(function(t,e){\"use strict\";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(t){a(i,t,this.t),a(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new n;function a(t,e,r){var n=t.s=e+r,i=n-e,a=n-i;t.t=e-a+(r-i)}var o=1e-6,s=Math.PI,l=s/2,c=s/4,u=2*s,f=180/s,h=s/180,p=Math.abs,d=Math.atan,g=Math.atan2,m=Math.cos,v=Math.ceil,y=Math.exp,x=Math.log,b=Math.pow,_=Math.sin,w=Math.sign||function(t){return t>0?1:t<0?-1:0},T=Math.sqrt,k=Math.tan;function A(t){return t>1?0:t<-1?s:Math.acos(t)}function M(t){return t>1?l:t<-1?-l:Math.asin(t)}function S(t){return(t=_(t/2))*t}function E(){}function L(t,e){t&&P.hasOwnProperty(t.type)&&P[t.type](t,e)}var C={Feature:function(t,e){L(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n=0?1:-1,i=n*r,a=m(e=(e*=h)/2+c),o=_(e),s=N*o,l=B*a+s*m(i),u=s*n*_(i);j.add(g(u,l)),F=t,B=a,N=o}function W(t){return[g(t[1],t[0]),M(t[2])]}function X(t){var e=t[0],r=t[1],n=m(r);return[n*m(e),n*_(e),_(r)]}function Z(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function J(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 K(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Q(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function $(t){var e=T(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var tt,et,rt,nt,it,at,ot,st,lt,ct,ut,ft,ht,pt,dt,gt,mt,vt,yt,xt,bt,_t,wt,Tt,kt,At,Mt=r(),St={point:Et,lineStart:Ct,lineEnd:Pt,polygonStart:function(){St.point=It,St.lineStart=Ot,St.lineEnd=zt,Mt.reset(),V.polygonStart()},polygonEnd:function(){V.polygonEnd(),St.point=Et,St.lineStart=Ct,St.lineEnd=Pt,j<0?(tt=-(rt=180),et=-(nt=90)):Mt>o?nt=90:Mt<-o&&(et=-90),ct[0]=tt,ct[1]=rt},sphere:function(){tt=-(rt=180),et=-(nt=90)}};function Et(t,e){lt.push(ct=[tt=t,rt=t]),ent&&(nt=e)}function Lt(t,e){var r=X([t*h,e*h]);if(st){var n=J(st,r),i=J([n[1],-n[0],0],n);$(i),i=W(i);var a,o=t-it,s=o>0?1:-1,l=i[0]*f*s,c=p(o)>180;c^(s*itnt&&(nt=a):c^(s*it<(l=(l+360)%360-180)&&lnt&&(nt=e)),c?tDt(tt,rt)&&(rt=t):Dt(t,rt)>Dt(tt,rt)&&(tt=t):rt>=tt?(trt&&(rt=t)):t>it?Dt(tt,t)>Dt(tt,rt)&&(rt=t):Dt(t,rt)>Dt(tt,rt)&&(tt=t)}else lt.push(ct=[tt=t,rt=t]);ent&&(nt=e),st=r,it=t}function Ct(){St.point=Lt}function Pt(){ct[0]=tt,ct[1]=rt,St.point=Et,st=null}function It(t,e){if(st){var r=t-it;Mt.add(p(r)>180?r+(r>0?360:-360):r)}else at=t,ot=e;V.point(t,e),Lt(t,e)}function Ot(){V.lineStart()}function zt(){It(at,ot),V.lineEnd(),p(Mt)>o&&(tt=-(rt=180)),ct[0]=tt,ct[1]=rt,st=null}function Dt(t,e){return(e-=t)<0?e+360:e}function Rt(t,e){return t[0]-e[0]}function Ft(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:es?t+Math.round(-t/u)*u:t,e]}function Qt(t,e,r){return(t%=u)?e||r?Jt(te(t),ee(e,r)):te(t):e||r?ee(e,r):Kt}function $t(t){return function(e,r){return[(e+=t)>s?e-u:e<-s?e+u:e,r]}}function te(t){var e=$t(t);return e.invert=$t(-t),e}function ee(t,e){var r=m(t),n=_(t),i=m(e),a=_(e);function o(t,e){var o=m(e),s=m(t)*o,l=_(t)*o,c=_(e),u=c*r+s*n;return[g(l*i-u*a,s*r-c*n),M(u*i+l*a)]}return o.invert=function(t,e){var o=m(e),s=m(t)*o,l=_(t)*o,c=_(e),u=c*i-l*a;return[g(l*i+c*a,s*r+u*n),M(u*r-s*n)]},o}function re(t){function e(e){return(e=t(e[0]*h,e[1]*h))[0]*=f,e[1]*=f,e}return t=Qt(t[0]*h,t[1]*h,t.length>2?t[2]*h:0),e.invert=function(e){return(e=t.invert(e[0]*h,e[1]*h))[0]*=f,e[1]*=f,e},e}function ne(t,e,r,n,i,a){if(r){var o=m(e),s=_(e),l=n*r;null==i?(i=e+n*u,a=e-l/2):(i=ie(o,i),a=ie(o,a),(n>0?ia)&&(i+=n*u));for(var c,f=i;n>0?f>a:f1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}function oe(t,e){return p(t[0]-e[0])=0;--a)i.point((f=u[a])[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 ce(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n=0?1:-1,z=O*I,D=z>s,R=T*C;if(ue.add(g(R*O*_(z),k*P+R*m(z))),f+=D?I+O*u:I,D^b>=r^E>=r){var F=J(X(x),X(S));$(F);var B=J(a,F);$(B);var N=(D^I>=0?-1:1)*M(B[2]);(n>N||n===N&&(F[0]||F[1]))&&(h+=D^I>=0?1:-1)}}return(f<-o||f0){for(h||(a.polygonStart(),h=!0),a.lineStart(),t=0;t1&&2&i&&c.push(c.pop().concat(c.shift())),s.push(c.filter(de))}return p}}function de(t){return t.length>1}function ge(t,e){return((t=t.x)[0]<0?t[1]-l-o:l-t[1])-((e=e.x)[0]<0?e[1]-l-o:l-e[1])}var me=pe((function(){return!0}),(function(t){var e,r=NaN,n=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,c){var u=a>0?s:-s,f=p(a-r);p(f-s)0?l:-l),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(u,n),t.point(a,n),e=0):i!==u&&f>=s&&(p(r-i)o?d((_(e)*(a=m(n))*_(r)-_(n)*(i=m(e))*_(t))/(i*a*s)):(e+n)/2}(r,n,a,c),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(u,n),e=0),t.point(r=a,n=c),i=u},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}}),(function(t,e,r,n){var i;if(null==t)i=r*l,n.point(-s,i),n.point(0,i),n.point(s,i),n.point(s,0),n.point(s,-i),n.point(0,-i),n.point(-s,-i),n.point(-s,0),n.point(-s,i);else if(p(t[0]-e[0])>o){var a=t[0]0,i=p(e)>o;function a(t,r){return m(t)*m(r)>e}function l(t,r,n){var i=[1,0,0],a=J(X(t),X(r)),l=Z(a,a),c=a[0],u=l-c*c;if(!u)return!n&&t;var f=e*l/u,h=-e*c/u,d=J(i,a),g=Q(i,f);K(g,Q(a,h));var m=d,v=Z(g,m),y=Z(m,m),x=v*v-y*(Z(g,g)-1);if(!(x<0)){var b=T(x),_=Q(m,(-v-b)/y);if(K(_,g),_=W(_),!n)return _;var w,k=t[0],A=r[0],M=t[1],S=r[1];A0^_[1]<(p(_[0]-k)s^(k<=_[0]&&_[0]<=A)){var C=Q(m,(-v+b)/y);return K(C,g),[_,W(C)]}}}function c(e,r){var i=n?t:s-t,a=0;return e<-i?a|=1:e>i&&(a|=2),r<-i?a|=4:r>i&&(a|=8),a}return pe(a,(function(t){var e,r,o,u,f;return{lineStart:function(){u=o=!1,f=1},point:function(h,p){var d,g=[h,p],m=a(h,p),v=n?m?0:c(h,p):m?c(h+(h<0?s:-s),p):0;if(!e&&(u=o=m)&&t.lineStart(),m!==o&&(!(d=l(e,g))||oe(e,d)||oe(g,d))&&(g[2]=1),m!==o)f=0,m?(t.lineStart(),d=l(g,e),t.point(d[0],d[1])):(d=l(e,g),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&n^m){var y;v&r||!(y=l(g,e,!0))||(f=0,n?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!m||e&&oe(e,g)||t.point(g[0],g[1]),e=g,o=m,r=v},lineEnd:function(){o&&t.lineEnd(),e=null},clean:function(){return f|(u&&o)<<1}}}),(function(e,n,i,a){ne(a,t,r,i,e,n)}),n?[0,-t]:[-s,t-s])}function ye(t,r,n,i){function a(e,a){return t<=e&&e<=n&&r<=a&&a<=i}function s(e,a,o,s){var c=0,f=0;if(null==e||(c=l(e,o))!==(f=l(a,o))||u(e,a)<0^o>0)do{s.point(0===c||3===c?t:n,c>1?i:r)}while((c=(c+o+4)%4)!==f);else s.point(a[0],a[1])}function l(e,i){return p(e[0]-t)0?0:3:p(e[0]-n)0?2:1:p(e[1]-r)0?1:0:i>0?3:2}function c(t,e){return u(t.x,e.x)}function u(t,e){var r=l(t,1),n=l(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]}return function(o){var l,u,f,h,p,d,g,m,v,y,x,b=o,_=ae(),w={point:T,lineStart:function(){w.point=k,u&&u.push(f=[]);y=!0,v=!1,g=m=NaN},lineEnd:function(){l&&(k(h,p),d&&v&&_.rejoin(),l.push(_.result()));w.point=T,v&&b.lineEnd()},polygonStart:function(){b=_,l=[],u=[],x=!0},polygonEnd:function(){var r=function(){for(var e=0,r=0,n=u.length;ri&&(h-a)*(i-o)>(p-o)*(t-a)&&++e:p<=i&&(h-a)*(i-o)<(p-o)*(t-a)&&--e;return e}(),n=x&&r,a=(l=e.merge(l)).length;(n||a)&&(o.polygonStart(),n&&(o.lineStart(),s(null,null,1,o),o.lineEnd()),a&&le(l,c,r,s,o),o.polygonEnd());b=o,l=u=f=null}};function T(t,e){a(t,e)&&b.point(t,e)}function k(e,o){var s=a(e,o);if(u&&f.push([e,o]),y)h=e,p=o,d=s,y=!1,s&&(b.lineStart(),b.point(e,o));else if(s&&v)b.point(e,o);else{var l=[g=Math.max(-1e9,Math.min(1e9,g)),m=Math.max(-1e9,Math.min(1e9,m))],c=[e=Math.max(-1e9,Math.min(1e9,e)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,r,n,i,a){var o,s=t[0],l=t[1],c=0,u=1,f=e[0]-s,h=e[1]-l;if(o=r-s,f||!(o>0)){if(o/=f,f<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=i-s,f||!(o<0)){if(o/=f,f<0){if(o>u)return;o>c&&(c=o)}else if(f>0){if(o0)){if(o/=h,h<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=a-l,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>c&&(c=o)}else if(h>0){if(o0&&(t[0]=s+c*f,t[1]=l+c*h),u<1&&(e[0]=s+u*f,e[1]=l+u*h),!0}}}}}(l,c,t,r,n,i)?s&&(b.lineStart(),b.point(e,o),x=!1):(v||(b.lineStart(),b.point(l[0],l[1])),b.point(c[0],c[1]),s||b.lineEnd(),x=!1)}g=e,m=o,v=s}return w}}var xe,be,_e,we=r(),Te={sphere:E,point:E,lineStart:function(){Te.point=Ae,Te.lineEnd=ke},lineEnd:E,polygonStart:E,polygonEnd:E};function ke(){Te.point=Te.lineEnd=E}function Ae(t,e){xe=t*=h,be=_(e*=h),_e=m(e),Te.point=Me}function Me(t,e){t*=h;var r=_(e*=h),n=m(e),i=p(t-xe),a=m(i),o=n*_(i),s=_e*r-be*n*a,l=be*r+_e*n*a;we.add(g(T(o*o+s*s),l)),xe=t,be=r,_e=n}function Se(t){return we.reset(),z(t,Te),+we}var Ee=[null,null],Le={type:\"LineString\",coordinates:Ee};function Ce(t,e){return Ee[0]=t,Ee[1]=e,Se(Le)}var Pe={Feature:function(t,e){return Oe(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n0&&(i=Ce(t[a],t[a-1]))>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))<1e-12*i)return!0;r=n}return!1}function Re(t,e){return!!he(t.map(Fe),Be(e))}function Fe(t){return(t=t.map(Be)).pop(),t}function Be(t){return[t[0]*h,t[1]*h]}function Ne(t,r,n){var i=e.range(t,r-o,n).concat(r);return function(t){return i.map((function(e){return[t,e]}))}}function je(t,r,n){var i=e.range(t,r-o,n).concat(r);return function(t){return i.map((function(e){return[e,t]}))}}function Ue(){var t,r,n,i,a,s,l,c,u,f,h,d,g=10,m=g,y=90,x=360,b=2.5;function _(){return{type:\"MultiLineString\",coordinates:w()}}function w(){return e.range(v(i/y)*y,n,y).map(h).concat(e.range(v(c/x)*x,l,x).map(d)).concat(e.range(v(r/g)*g,t,g).filter((function(t){return p(t%y)>o})).map(u)).concat(e.range(v(s/m)*m,a,m).filter((function(t){return p(t%x)>o})).map(f))}return _.lines=function(){return w().map((function(t){return{type:\"LineString\",coordinates:t}}))},_.outline=function(){return{type:\"Polygon\",coordinates:[h(i).concat(d(l).slice(1),h(n).reverse().slice(1),d(c).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],c=+t[0][1],l=+t[1][1],i>n&&(t=i,i=n,n=t),c>l&&(t=c,c=l,l=t),_.precision(b)):[[i,c],[n,l]]},_.extentMinor=function(e){return arguments.length?(r=+e[0][0],t=+e[1][0],s=+e[0][1],a=+e[1][1],r>t&&(e=r,r=t,t=e),s>a&&(e=s,s=a,a=e),_.precision(b)):[[r,s],[t,a]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(y=+t[0],x=+t[1],_):[y,x]},_.stepMinor=function(t){return arguments.length?(g=+t[0],m=+t[1],_):[g,m]},_.precision=function(e){return arguments.length?(b=+e,u=Ne(s,a,90),f=je(r,t,b),h=Ne(c,l,90),d=je(i,n,b),_):b},_.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function Ve(t){return t}var He,qe,Ge,Ye,We=r(),Xe=r(),Ze={point:E,lineStart:E,lineEnd:E,polygonStart:function(){Ze.lineStart=Je,Ze.lineEnd=$e},polygonEnd:function(){Ze.lineStart=Ze.lineEnd=Ze.point=E,We.add(p(Xe)),Xe.reset()},result:function(){var t=We/2;return We.reset(),t}};function Je(){Ze.point=Ke}function Ke(t,e){Ze.point=Qe,He=Ge=t,qe=Ye=e}function Qe(t,e){Xe.add(Ye*t-Ge*e),Ge=t,Ye=e}function $e(){Qe(He,qe)}var tr=1/0,er=tr,rr=-tr,nr=rr,ir={point:function(t,e){trr&&(rr=t);enr&&(nr=e)},lineStart:E,lineEnd:E,polygonStart:E,polygonEnd:E,result:function(){var t=[[tr,er],[rr,nr]];return rr=nr=-(er=tr=1/0),t}};var ar,or,sr,lr,cr=0,ur=0,fr=0,hr=0,pr=0,dr=0,gr=0,mr=0,vr=0,yr={point:xr,lineStart:br,lineEnd:Tr,polygonStart:function(){yr.lineStart=kr,yr.lineEnd=Ar},polygonEnd:function(){yr.point=xr,yr.lineStart=br,yr.lineEnd=Tr},result:function(){var t=vr?[gr/vr,mr/vr]:dr?[hr/dr,pr/dr]:fr?[cr/fr,ur/fr]:[NaN,NaN];return cr=ur=fr=hr=pr=dr=gr=mr=vr=0,t}};function xr(t,e){cr+=t,ur+=e,++fr}function br(){yr.point=_r}function _r(t,e){yr.point=wr,xr(sr=t,lr=e)}function wr(t,e){var r=t-sr,n=e-lr,i=T(r*r+n*n);hr+=i*(sr+t)/2,pr+=i*(lr+e)/2,dr+=i,xr(sr=t,lr=e)}function Tr(){yr.point=xr}function kr(){yr.point=Mr}function Ar(){Sr(ar,or)}function Mr(t,e){yr.point=Sr,xr(ar=sr=t,or=lr=e)}function Sr(t,e){var r=t-sr,n=e-lr,i=T(r*r+n*n);hr+=i*(sr+t)/2,pr+=i*(lr+e)/2,dr+=i,gr+=(i=lr*t-sr*e)*(sr+t),mr+=i*(lr+e),vr+=3*i,xr(sr=t,lr=e)}function Er(t){this._context=t}Er.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,u)}},result:E};var Lr,Cr,Pr,Ir,Or,zr=r(),Dr={point:E,lineStart:function(){Dr.point=Rr},lineEnd:function(){Lr&&Fr(Cr,Pr),Dr.point=E},polygonStart:function(){Lr=!0},polygonEnd:function(){Lr=null},result:function(){var t=+zr;return zr.reset(),t}};function Rr(t,e){Dr.point=Fr,Cr=Ir=t,Pr=Or=e}function Fr(t,e){Ir-=t,Or-=e,zr.add(T(Ir*Ir+Or*Or)),Ir=t,Or=e}function Br(){this._string=[]}function Nr(t){return\"m0,\"+t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+-2*t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+2*t+\"z\"}function jr(t){return function(e){var r=new Ur;for(var n in t)r[n]=t[n];return r.stream=e,r}}function Ur(){}function Vr(t,e,r){var n=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=n&&t.clipExtent(null),z(r,t.stream(ir)),e(ir.result()),null!=n&&t.clipExtent(n),t}function Hr(t,e,r){return Vr(t,(function(r){var n=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(n/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),o=+e[0][0]+(n-a*(r[1][0]+r[0][0]))/2,s=+e[0][1]+(i-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([o,s])}),r)}function qr(t,e,r){return Hr(t,[[0,0],e],r)}function Gr(t,e,r){return Vr(t,(function(r){var n=+e,i=n/(r[1][0]-r[0][0]),a=(n-i*(r[1][0]+r[0][0]))/2,o=-i*r[0][1];t.scale(150*i).translate([a,o])}),r)}function Yr(t,e,r){return Vr(t,(function(r){var n=+e,i=n/(r[1][1]-r[0][1]),a=-i*r[0][0],o=(n-i*(r[1][1]+r[0][1]))/2;t.scale(150*i).translate([a,o])}),r)}Br.prototype={_radius:4.5,_circle:Nr(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push(\"Z\"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push(\"M\",t,\",\",e),this._point=1;break;case 1:this._string.push(\"L\",t,\",\",e);break;default:null==this._circle&&(this._circle=Nr(this._radius)),this._string.push(\"M\",t,\",\",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join(\"\");return this._string=[],t}return null}},Ur.prototype={constructor:Ur,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()}};var Wr=m(30*h);function Xr(t,e){return+e?function(t,e){function r(n,i,a,s,l,c,u,f,h,d,m,v,y,x){var b=u-n,_=f-i,w=b*b+_*_;if(w>4*e&&y--){var k=s+d,A=l+m,S=c+v,E=T(k*k+A*A+S*S),L=M(S/=E),C=p(p(S)-1)e||p((b*z+_*D)/w-.5)>.3||s*d+l*m+c*v2?t[2]%360*h:0,I()):[y*f,x*f,b*f]},C.angle=function(t){return arguments.length?(_=t%360*h,I()):_*f},C.reflectX=function(t){return arguments.length?(w=t?-1:1,I()):w<0},C.reflectY=function(t){return arguments.length?(k=t?-1:1,I()):k<0},C.precision=function(t){return arguments.length?(o=Xr(s,L=t*t),O()):T(L)},C.fitExtent=function(t,e){return Hr(C,t,e)},C.fitSize=function(t,e){return qr(C,t,e)},C.fitWidth=function(t,e){return Gr(C,t,e)},C.fitHeight=function(t,e){return Yr(C,t,e)},function(){return e=t.apply(this,arguments),C.invert=e.invert&&P,I()}}function tn(t){var e=0,r=s/3,n=$r(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*h,r=t[1]*h):[e*f,r*f]},i}function en(t,e){var r=_(t),n=(r+_(e))/2;if(p(n)0?e<-l+o&&(e=-l+o):e>l-o&&(e=l-o);var r=i/b(fn(e),n);return[r*_(n*t),i-r*m(n*t)]}return a.invert=function(t,e){var r=i-e,a=w(n)*T(t*t+r*r),o=g(t,p(r))*w(r);return r*n<0&&(o-=s*w(t)*w(r)),[o/n,2*d(b(i/a,1/n))-l]},a}function pn(t,e){return[t,e]}function dn(t,e){var r=m(t),n=t===e?_(t):(r-m(e))/(e-t),i=r/n+t;if(p(n)o&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},Tn.invert=on(M),kn.invert=on((function(t){return 2*d(t)})),An.invert=function(t,e){return[-e,2*d(y(t))-l]},t.geoAlbers=nn,t.geoAlbersUsa=function(){var t,e,r,n,i,a,s=nn(),l=rn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=rn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){a=[t,e]}};function f(t){var e=t[0],o=t[1];return a=null,r.point(e,o),a||(n.point(e,o),a)||(i.point(e,o),a)}function h(){return t=e=null,f}return f.invert=function(t){var e=s.scale(),r=s.translate(),n=(t[0]-r[0])/e,i=(t[1]-r[1])/e;return(i>=.12&&i<.234&&n>=-.425&&n<-.214?l:i>=.166&&i<.234&&n>=-.214&&n<-.115?c:s).invert(t)},f.stream=function(r){return t&&e===r?t:(n=[s.stream(e=r),l.stream(r),c.stream(r)],i=n.length,t={point:function(t,e){for(var r=-1;++rDt(n[0],n[1])&&(n[1]=i[1]),Dt(i[0],n[1])>Dt(n[0],n[1])&&(n[0]=i[0])):a.push(n=i);for(o=-1/0,e=0,n=a[r=a.length-1];e<=r;n=i,++e)i=a[e],(s=Dt(n[1],i[0]))>o&&(o=s,tt=i[0],rt=n[1])}return lt=ct=null,tt===1/0||et===1/0?[[NaN,NaN],[NaN,NaN]]:[[tt,et],[rt,nt]]},t.geoCentroid=function(t){ut=ft=ht=pt=dt=gt=mt=vt=yt=xt=bt=0,z(t,Bt);var e=yt,r=xt,n=bt,i=e*e+r*r+n*n;return i<1e-12&&(e=gt,r=mt,n=vt,ft2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90]).scale(159.155)},t.geoTransverseMercatorRaw=An,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{\"d3-array\":107}],115:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){\"use strict\";function e(t,e){return t.parent===e.parent?1:2}function r(t,e){return t+e.x}function n(t,e){return Math.max(t,e.y)}function i(t){var e=0,r=t.children,n=r&&r.length;if(n)for(;--n>=0;)e+=r[n].value;else e=1;t.value=e}function a(t,e){var r,n,i,a,s,u=new c(t),f=+t.value&&(u.value=t.value),h=[u];for(null==e&&(e=o);r=h.pop();)if(f&&(r.value=+r.data.value),(i=e(r.data))&&(s=i.length))for(r.children=new Array(s),a=s-1;a>=0;--a)h.push(n=r.children[a]=new c(i[a])),n.parent=r,n.depth=r.depth+1;return u.eachBefore(l)}function o(t){return t.children}function s(t){t.data=t.data.data}function l(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function c(t){this.data=t,this.depth=this.height=0,this.parent=null}c.prototype=a.prototype={constructor:c,count:function(){return this.eachAfter(i)},each:function(t){var e,r,n,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),r=a.children)for(n=0,i=r.length;n=0;--r)i.push(e[r]);return this},sum:function(t){return this.eachAfter((function(e){for(var r=+t(e.data)||0,n=e.children,i=n&&n.length;--i>=0;)r+=n[i].value;e.value=r}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),i=null;t=r.pop(),e=n.pop();for(;t===e;)i=t,t=r.pop(),e=n.pop();return i}(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var i=n.length;t!==r;)n.splice(i,0,t),t=t.parent;return n},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(r){r!==t&&e.push({source:r.parent,target:r})})),e},copy:function(){return a(this).eachBefore(s)}};var u=Array.prototype.slice;function f(t){for(var e,r,n=0,i=(t=function(t){for(var e,r,n=t.length;n;)r=Math.random()*n--|0,e=t[n],t[n]=t[r],t[r]=e;return t}(u.call(t))).length,a=[];n0&&r*r>n*n+i*i}function g(t,e){for(var r=0;r(o*=o)?(n=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-n*n)),r.x=t.x-n*s-a*l,r.y=t.y-n*l+a*s):(n=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-n*n)),r.x=e.x+n*s-a*l,r.y=e.y+n*l+a*s)):(r.x=e.x+r.r,r.y=e.y)}function b(t,e){var r=t.r+e.r-1e-6,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function _(t){var e=t._,r=t.next._,n=e.r+r.r,i=(e.x*r.r+r.x*e.r)/n,a=(e.y*r.r+r.y*e.r)/n;return i*i+a*a}function w(t){this._=t,this.next=null,this.previous=null}function T(t){if(!(i=t.length))return 0;var e,r,n,i,a,o,s,l,c,u,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(r=t[1],e.x=-r.r,r.x=e.r,r.y=0,!(i>2))return e.r+r.r;x(r,e,n=t[2]),e=new w(e),r=new w(r),n=new w(n),e.next=n.previous=r,r.next=e.previous=n,n.next=r.previous=e;t:for(s=3;sh&&(h=s),m=u*u*g,(p=Math.max(h/m,m/f))>d){u-=s;break}d=p}v.push(o={value:u,dice:l1?e:1)},r}(G);var X=function t(e){function r(t,r,n,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,l,c,u,f=-1,h=o.length,p=t.value;++f1?e:1)},r}(G);t.cluster=function(){var t=e,i=1,a=1,o=!1;function s(e){var s,l=0;e.eachAfter((function(e){var i=e.children;i?(e.x=function(t){return t.reduce(r,0)/t.length}(i),e.y=function(t){return 1+t.reduce(n,0)}(i)):(e.x=s?l+=t(e,s):0,e.y=0,s=e)}));var c=function(t){for(var e;e=t.children;)t=e[0];return t}(e),u=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),f=c.x-t(c,u)/2,h=u.x+t(u,c)/2;return e.eachAfter(o?function(t){t.x=(t.x-e.x)*i,t.y=(e.y-t.y)*a}:function(t){t.x=(t.x-f)/(h-f)*i,t.y=(1-(e.y?t.y/e.y:1))*a})}return s.separation=function(e){return arguments.length?(t=e,s):t},s.size=function(t){return arguments.length?(o=!1,i=+t[0],a=+t[1],s):o?null:[i,a]},s.nodeSize=function(t){return arguments.length?(o=!0,i=+t[0],a=+t[1],s):o?[i,a]:null},s},t.hierarchy=a,t.pack=function(){var t=null,e=1,r=1,n=M;function i(i){return i.x=e/2,i.y=r/2,t?i.eachBefore(L(t)).eachAfter(C(n,.5)).eachBefore(P(1)):i.eachBefore(L(E)).eachAfter(C(M,1)).eachAfter(C(n,i.r/Math.min(e,r))).eachBefore(P(Math.min(e,r)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=k(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],r=+t[1],i):[e,r]},i.padding=function(t){return arguments.length?(n=\"function\"==typeof t?t:S(+t),i):n},i},t.packEnclose=f,t.packSiblings=function(t){return T(t),t},t.partition=function(){var t=1,e=1,r=0,n=!1;function i(i){var a=i.height+1;return i.x0=i.y0=r,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(n){n.children&&O(n,n.x0,t*(n.depth+1)/e,n.x1,t*(n.depth+2)/e);var i=n.x0,a=n.y0,o=n.x1-r,s=n.y1-r;o0)throw new Error(\"cycle\");return a}return r.id=function(e){return arguments.length?(t=A(e),r):t},r.parentId=function(t){return arguments.length?(e=A(t),r):e},r},t.tree=function(){var t=B,e=1,r=1,n=null;function i(i){var l=function(t){for(var e,r,n,i,a,o=new H(t,0),s=[o];e=s.pop();)if(n=e._.children)for(e.children=new Array(a=n.length),i=a-1;i>=0;--i)s.push(r=e.children[i]=new H(n[i],i)),r.parent=e;return(o.parent=new H(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),n)i.eachBefore(s);else{var c=i,u=i,f=i;i.eachBefore((function(t){t.xu.x&&(u=t),t.depth>f.depth&&(f=t)}));var h=c===u?1:t(c,u)/2,p=h-c.x,d=e/(u.x+h+p),g=r/(f.depth||1);i.eachBefore((function(t){t.x=(t.x+p)*d,t.y=t.depth*g}))}return i}function a(e){var r=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(r){!function(t){for(var e,r=0,n=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(e);var a=(r[0].z+r[r.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,r,n){if(r){for(var i,a=e,o=e,s=r,l=a.parent.children[0],c=a.m,u=o.m,f=s.m,h=l.m;s=j(s),a=N(a),s&&a;)l=N(l),(o=j(o)).a=e,(i=s.z+f-a.z-c+t(s._,a._))>0&&(U(V(s,e,n),e,i),c+=i,u+=i),f+=s.m,c+=a.m,h+=l.m,u+=o.m;s&&!j(o)&&(o.t=s,o.m+=f-u),a&&!N(l)&&(l.t=a,l.m+=c-h,n=e)}return n}(e,i,e.parent.A||n[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*r}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(n=!1,e=+t[0],r=+t[1],i):n?null:[e,r]},i.nodeSize=function(t){return arguments.length?(n=!0,e=+t[0],r=+t[1],i):n?[e,r]:null},i},t.treemap=function(){var t=W,e=!1,r=1,n=1,i=[0],a=M,o=M,s=M,l=M,c=M;function u(t){return t.x0=t.y0=0,t.x1=r,t.y1=n,t.eachBefore(f),i=[0],e&&t.eachBefore(I),t}function f(e){var r=i[e.depth],n=e.x0+r,u=e.y0+r,f=e.x1-r,h=e.y1-r;f=r-1){var u=s[e];return u.x0=i,u.y0=a,u.x1=o,void(u.y1=l)}var f=c[e],h=n/2+f,p=e+1,d=r-1;for(;p>>1;c[g]l-a){var y=(i*v+o*m)/n;t(e,p,m,i,a,y,l),t(p,r,v,y,a,o,l)}else{var x=(a*v+l*m)/n;t(e,p,m,i,a,o,x),t(p,r,v,i,x,o,l)}}(0,l,t.value,e,r,n,i)},t.treemapDice=O,t.treemapResquarify=X,t.treemapSlice=q,t.treemapSliceDice=function(t,e,r,n,i){(1&t.depth?q:O)(t,e,r,n,i)},t.treemapSquarify=W,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],116:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-color\")):i((n=n||self).d3=n.d3||{},n.d3)}(this,(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=i180||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;na&&(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:y(r,n)})),a=_.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+\"rotate(\",null,n)-2,x:y(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:y(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:y(t,r)},{i:s-2,x:y(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;++r1e-6)if(Math.abs(f*l-c*u)>1e-6&&a){var p=n-o,d=i-s,g=l*l+c*c,m=p*p+d*d,v=Math.sqrt(g),y=Math.sqrt(h),x=a*Math.tan((e-Math.acos((g+h-m)/(2*v*y)))/2),b=x/y,_=x/v;Math.abs(b-1)>1e-6&&(this._+=\"L\"+(t+b*u)+\",\"+(r+b*f)),this._+=\"A\"+a+\",\"+a+\",0,0,\"+ +(f*p>u*d)+\",\"+(this._x1=t+_*l)+\",\"+(this._y1=r+_*c)}else this._+=\"L\"+(this._x1=t)+\",\"+(this._y1=r);else;},arc:function(t,i,a,o,s,l){t=+t,i=+i,l=!!l;var c=(a=+a)*Math.cos(o),u=a*Math.sin(o),f=t+c,h=i+u,p=1^l,d=l?o-s:s-o;if(a<0)throw new Error(\"negative radius: \"+a);null===this._x1?this._+=\"M\"+f+\",\"+h:(Math.abs(this._x1-f)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+=\"L\"+f+\",\"+h),a&&(d<0&&(d=d%r+r),d>n?this._+=\"A\"+a+\",\"+a+\",0,1,\"+p+\",\"+(t-c)+\",\"+(i-u)+\"A\"+a+\",\"+a+\",0,1,\"+p+\",\"+(this._x1=f)+\",\"+(this._y1=h):d>1e-6&&(this._+=\"A\"+a+\",\"+a+\",0,\"+ +(d>=e)+\",\"+p+\",\"+(this._x1=t+a*Math.cos(s))+\",\"+(this._y1=i+a*Math.sin(s))))},rect:function(t,e,r,n){this._+=\"M\"+(this._x0=this._x1=+t)+\",\"+(this._y0=this._y1=+e)+\"h\"+ +r+\"v\"+ +n+\"h\"+-r+\"Z\"},toString:function(){return this._}},t.path=a,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],118:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(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,m=t._y0,v=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(a=(g+v)/2))?g=a:v=a,(u=r>=(o=(m+y)/2))?m=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+v)/2))?g=a:v=a,(u=r>=(o=(m+y)/2))?m=o:y=o}while((f=u<<1|c)==(h=(l>=o)<<1|s>=a));return i[h]=p,i[f]=d,t}function r(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;nf&&(f=i),ah&&(h=a));if(c>f||u>h)return this;for(this.cover(c,u).cover(f,h),n=0;nt||t>=i||n>e||e>=a;)switch(s=(ep||(o=c.y0)>d||(s=c.x1)=y)<<1|t>=v)&&(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,m.data),b=e-+this._y.call(null,m.data),_=x*x+b*b;if(_=(s=(d+m)/2))?d=s:m=s,(u=o>=(l=(g+v)/2))?g=l:v=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;e1?0:t<-1?u:Math.acos(t)}function d(t){return t>=1?f:t<=-1?-f:Math.asin(t)}function g(t){return t.innerRadius}function m(t){return t.outerRadius}function v(t){return t.startAngle}function y(t){return t.endAngle}function x(t){return t&&t.padAngle}function b(t,e,r,n,i,a,o,s){var l=r-t,c=n-e,u=o-i,f=s-a,h=f*l-u*c;if(!(h*h<1e-12))return[t+(h=(u*(e-a)-f*(t-i))/h)*l,e+h*c]}function _(t,e,r,n,i,a,s){var l=t-r,u=e-n,f=(s?a:-a)/c(l*l+u*u),h=f*u,p=-f*l,d=t+h,g=e+p,m=r+h,v=n+p,y=(d+m)/2,x=(g+v)/2,b=m-d,_=v-g,w=b*b+_*_,T=i-a,k=d*v-m*g,A=(_<0?-1:1)*c(o(0,T*T*w-k*k)),M=(k*_-b*A)/w,S=(-k*b-_*A)/w,E=(k*_+b*A)/w,L=(-k*b+_*A)/w,C=M-y,P=S-x,I=E-y,O=L-x;return C*C+P*P>I*I+O*O&&(M=E,S=L),{cx:M,cy:S,x01:-h,y01:-p,x11:M*(i/T-1),y11:S*(i/T-1)}}function w(t){this._context=t}function T(t){return new w(t)}function k(t){return t[0]}function A(t){return t[1]}function M(){var t=k,n=A,i=r(!0),a=null,o=T,s=null;function l(r){var l,c,u,f=r.length,h=!1;for(null==a&&(s=o(u=e.path())),l=0;l<=f;++l)!(l=f;--h)c.point(v[h],y[h]);c.lineEnd(),c.areaEnd()}m&&(v[u]=+t(p,u,r),y[u]=+i(p,u,r),c.point(n?+n(p,u,r):v[u],a?+a(p,u,r):y[u]))}if(d)return c=null,d+\"\"||null}function f(){return M().defined(o).curve(l).context(s)}return u.x=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),n=null,u):t},u.x0=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),u):t},u.x1=function(t){return arguments.length?(n=null==t?null:\"function\"==typeof t?t:r(+t),u):n},u.y=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),a=null,u):i},u.y0=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),u):i},u.y1=function(t){return arguments.length?(a=null==t?null:\"function\"==typeof t?t:r(+t),u):a},u.lineX0=u.lineY0=function(){return f().x(t).y(i)},u.lineY1=function(){return f().x(t).y(a)},u.lineX1=function(){return f().x(n).y(i)},u.defined=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(!!t),u):o},u.curve=function(t){return arguments.length?(l=t,null!=s&&(c=l(s)),u):l},u.context=function(t){return arguments.length?(null==t?s=c=null:c=l(s=t),u):s},u}function E(t,e){return et?1:e>=t?0:NaN}function L(t){return t}w.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var C=I(T);function P(t){this._curve=t}function I(t){function e(e){return new P(t(e))}return e._curve=t,e}function O(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(I(t)):e()._curve},t}function z(){return O(M().curve(C))}function D(){var t=S().curve(C),e=t.curve,r=t.lineX0,n=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return O(r())},delete t.lineX0,t.lineEndAngle=function(){return O(n())},delete t.lineX1,t.lineInnerRadius=function(){return O(i())},delete t.lineY0,t.lineOuterRadius=function(){return O(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(I(t)):e()._curve},t}function R(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var F=Array.prototype.slice;function B(t){return t.source}function N(t){return t.target}function j(t){var n=B,i=N,a=k,o=A,s=null;function l(){var r,l=F.call(arguments),c=n.apply(this,l),u=i.apply(this,l);if(s||(s=r=e.path()),t(s,+a.apply(this,(l[0]=c,l)),+o.apply(this,l),+a.apply(this,(l[0]=u,l)),+o.apply(this,l)),r)return s=null,r+\"\"||null}return l.source=function(t){return arguments.length?(n=t,l):n},l.target=function(t){return arguments.length?(i=t,l):i},l.x=function(t){return arguments.length?(a=\"function\"==typeof t?t:r(+t),l):a},l.y=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(+t),l):o},l.context=function(t){return arguments.length?(s=null==t?null:t,l):s},l}function U(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function V(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e,r=(r+i)/2,n,r,n,i)}function H(t,e,r,n,i){var a=R(e,r),o=R(e,r=(r+i)/2),s=R(n,r),l=R(n,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],l[0],l[1])}var q={draw:function(t,e){var r=Math.sqrt(e/u);t.moveTo(r,0),t.arc(0,0,r,0,h)}},G={draw:function(t,e){var r=Math.sqrt(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Y=Math.sqrt(1/3),W=2*Y,X={draw:function(t,e){var r=Math.sqrt(e/W),n=r*Y;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},Z=Math.sin(u/10)/Math.sin(7*u/10),J=Math.sin(h/10)*Z,K=-Math.cos(h/10)*Z,Q={draw:function(t,e){var r=Math.sqrt(.8908130915292852*e),n=J*r,i=K*r;t.moveTo(0,-r),t.lineTo(n,i);for(var a=1;a<5;++a){var o=h*a/5,s=Math.cos(o),l=Math.sin(o);t.lineTo(l*r,-s*r),t.lineTo(s*n-l*i,l*n+s*i)}t.closePath()}},$={draw:function(t,e){var r=Math.sqrt(e),n=-r/2;t.rect(n,n,r,r)}},tt=Math.sqrt(3),et={draw:function(t,e){var r=-Math.sqrt(e/(3*tt));t.moveTo(0,2*r),t.lineTo(-tt*r,-r),t.lineTo(tt*r,-r),t.closePath()}},rt=-.5,nt=Math.sqrt(3)/2,it=1/Math.sqrt(12),at=3*(it/2+1),ot={draw:function(t,e){var r=Math.sqrt(e/at),n=r/2,i=r*it,a=n,o=r*it+r,s=-a,l=o;t.moveTo(n,i),t.lineTo(a,o),t.lineTo(s,l),t.lineTo(rt*n-nt*i,nt*n+rt*i),t.lineTo(rt*a-nt*o,nt*a+rt*o),t.lineTo(rt*s-nt*l,nt*s+rt*l),t.lineTo(rt*n+nt*i,rt*i-nt*n),t.lineTo(rt*a+nt*o,rt*o-nt*a),t.lineTo(rt*s+nt*l,rt*l-nt*s),t.closePath()}},st=[q,G,X,$,Q,et,ot];function lt(){}function ct(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function ut(t){this._context=t}function ft(t){this._context=t}function ht(t){this._context=t}function pt(t,e){this._basis=new ut(t),this._beta=e}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ct(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ft.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ht.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},pt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n,i=t[0],a=e[0],o=t[r]-i,s=e[r]-a,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+n*o),this._beta*e[l]+(1-this._beta)*(a+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var dt=function t(e){function r(t){return 1===e?new ut(t):new pt(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function gt(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function mt(t,e){this._context=t,this._k=(1-e)/6}mt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:gt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var vt=function t(e){function r(t){return new mt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function yt(t,e){this._context=t,this._k=(1-e)/6}yt.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var xt=function t(e){function r(t){return new yt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function bt(t,e){this._context=t,this._k=(1-e)/6}bt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var _t=function t(e){function r(t){return new bt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function wt(t,e,r){var n=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>1e-12){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*c+t._y1*t._l23_2a-r*t._l12_2a)/u}t._context.bezierCurveTo(n,i,a,o,t._x2,t._y2)}function Tt(t,e){this._context=t,this._alpha=e}Tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var kt=function t(e){function r(t){return e?new Tt(t,e):new mt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function At(t,e){this._context=t,this._alpha=e}At.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Mt=function t(e){function r(t){return e?new At(t,e):new yt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function St(t,e){this._context=t,this._alpha=e}St.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Et=function t(e){function r(t){return e?new St(t,e):new bt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Lt(t){this._context=t}function Ct(t){return t<0?-1:1}function Pt(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),o=(r-t._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Ct(a)+Ct(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function It(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Ot(t,e,r){var n=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-n)/3;t._context.bezierCurveTo(n+s,i+s*e,a-s,o-s*r,a,o)}function zt(t){this._context=t}function Dt(t){this._context=new Rt(t)}function Rt(t){this._context=t}function Ft(t){this._context=t}function Bt(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[n-1]=(t[n]+i[n-1])/2,e=0;e1)for(var r,n,i,a=1,o=t[e[0]],s=o.length;a=0;)r[e]=e;return r}function Vt(t,e){return t[e]}function Ht(t){var e=t.map(qt);return Ut(t).sort((function(t,r){return e[t]-e[r]}))}function qt(t){for(var e,r=-1,n=0,i=t.length,a=-1/0;++ra&&(a=e,n=r);return n}function Gt(t){var e=t.map(Yt);return Ut(t).sort((function(t,r){return e[t]-e[r]}))}function Yt(t){for(var e,r=0,n=-1,i=t.length;++n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},t.arc=function(){var t=g,o=m,w=r(0),T=null,k=v,A=y,M=x,S=null;function E(){var r,g,m=+t.apply(this,arguments),v=+o.apply(this,arguments),y=k.apply(this,arguments)-f,x=A.apply(this,arguments)-f,E=n(x-y),L=x>y;if(S||(S=r=e.path()),v1e-12)if(E>h-1e-12)S.moveTo(v*a(y),v*l(y)),S.arc(0,0,v,y,x,!L),m>1e-12&&(S.moveTo(m*a(x),m*l(x)),S.arc(0,0,m,x,y,L));else{var C,P,I=y,O=x,z=y,D=x,R=E,F=E,B=M.apply(this,arguments)/2,N=B>1e-12&&(T?+T.apply(this,arguments):c(m*m+v*v)),j=s(n(v-m)/2,+w.apply(this,arguments)),U=j,V=j;if(N>1e-12){var H=d(N/m*l(B)),q=d(N/v*l(B));(R-=2*H)>1e-12?(z+=H*=L?1:-1,D-=H):(R=0,z=D=(y+x)/2),(F-=2*q)>1e-12?(I+=q*=L?1:-1,O-=q):(F=0,I=O=(y+x)/2)}var G=v*a(I),Y=v*l(I),W=m*a(D),X=m*l(D);if(j>1e-12){var Z,J=v*a(O),K=v*l(O),Q=m*a(z),$=m*l(z);if(E1e-12?V>1e-12?(C=_(Q,$,G,Y,v,V,L),P=_(J,K,W,X,v,V,L),S.moveTo(C.cx+C.x01,C.cy+C.y01),V1e-12&&R>1e-12?U>1e-12?(C=_(W,X,J,K,m,-U,L),P=_(G,Y,Q,$,m,-U,L),S.lineTo(C.cx+C.x01,C.cy+C.y01),U0&&(d+=f);for(null!=e?g.sort((function(t,r){return e(m[t],m[r])})):null!=n&&g.sort((function(t,e){return n(r[t],r[e])})),s=0,c=d?(y-p*b)/d:0;s0?f*c:0)+b,m[l]={data:r[l],index:s,value:f,startAngle:v,endAngle:u,padAngle:x};return m}return s.value=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),s):i},s.endAngle=function(t){return arguments.length?(a=\"function\"==typeof t?t:r(+t),s):a},s.padAngle=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(+t),s):o},s},t.pointRadial=R,t.radialArea=D,t.radialLine=z,t.stack=function(){var t=r([]),e=Ut,n=jt,i=Vt;function a(r){var a,o,s=t.apply(this,arguments),l=r.length,c=s.length,u=new Array(c);for(a=0;a0)for(var r,n,i,a,o,s,l=0,c=t[e[0]].length;l0?(n[0]=a,n[1]=a+=i):i<0?(n[1]=o,n[0]=o+=i):(n[0]=0,n[1]=i)},t.stackOffsetExpand=function(t,e){if((n=t.length)>0){for(var r,n,i,a=0,o=t[0].length;a0){for(var r,n=0,i=t[e[0]],a=i.length;n0&&(n=(r=t[e[0]]).length)>0){for(var r,n,i,a=0,o=1;o=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:mt,s:vt,S:H,u:q,U:G,V:Y,w:W,W:X,x:null,X:null,y:Z,Y:J,Z:K,\"%\":gt},Ct={a:function(t){return f[t.getUTCDay()]},A:function(t){return u[t.getUTCDay()]},b:function(t){return yt[t.getUTCMonth()]},B:function(t){return h[t.getUTCMonth()]},c:null,d:Q,e:Q,f:nt,H:$,I:tt,j:et,L:rt,m:it,M:at,p:function(t){return c[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:mt,s:vt,S:ot,u:st,U:lt,V:ct,w:ut,W:ft,x:null,X:null,y:ht,Y:pt,Z:dt,\"%\":gt},Pt={a:function(t,e,r){var n=Tt.exec(e.slice(r));return n?(t.w=kt[n[0].toLowerCase()],r+n[0].length):-1},A:function(t,e,r){var n=_t.exec(e.slice(r));return n?(t.w=wt[n[0].toLowerCase()],r+n[0].length):-1},b:function(t,e,r){var n=St.exec(e.slice(r));return n?(t.m=Et[n[0].toLowerCase()],r+n[0].length):-1},B:function(t,e,r){var n=At.exec(e.slice(r));return n?(t.m=Mt[n[0].toLowerCase()],r+n[0].length):-1},c:function(t,e,r){return zt(t,a,e,r)},d:A,e:A,f:P,H:S,I:S,j:M,L:C,m:k,M:E,p:function(t,e,r){var n=xt.exec(e.slice(r));return n?(t.p=bt[n[0].toLowerCase()],r+n[0].length):-1},q:T,Q:O,s:z,S:L,u:m,U:v,V:y,w:g,W:x,x:function(t,e,r){return zt(t,o,e,r)},X:function(t,e,r){return zt(t,l,e,r)},y:_,Y:b,Z:w,\"%\":I};function It(t,e){return function(r){var n,i,a,o=[],l=-1,c=0,u=t.length;for(r instanceof Date||(r=new Date(+r));++l53)return null;\"w\"in c||(c.w=1),\"Z\"in c?(l=(s=n(i(c.y,0,1))).getUTCDay(),s=l>4||0===l?e.utcMonday.ceil(s):e.utcMonday(s),s=e.utcDay.offset(s,7*(c.V-1)),c.y=s.getUTCFullYear(),c.m=s.getUTCMonth(),c.d=s.getUTCDate()+(c.w+6)%7):(l=(s=r(i(c.y,0,1))).getDay(),s=l>4||0===l?e.timeMonday.ceil(s):e.timeMonday(s),s=e.timeDay.offset(s,7*(c.V-1)),c.y=s.getFullYear(),c.m=s.getMonth(),c.d=s.getDate()+(c.w+6)%7)}else(\"W\"in c||\"U\"in c)&&(\"w\"in c||(c.w=\"u\"in c?c.u%7:\"W\"in c?1:0),l=\"Z\"in c?n(i(c.y,0,1)).getUTCDay():r(i(c.y,0,1)).getDay(),c.m=0,c.d=\"W\"in c?(c.w+6)%7+7*c.W-(l+5)%7:c.w+7*c.U-(l+6)%7);return\"Z\"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,n(c)):r(c)}}function zt(t,e,r,n){for(var i,a,o=0,l=e.length,c=r.length;o=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=Pt[i in s?e.charAt(o++):i])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return Lt.x=It(o,Lt),Lt.X=It(l,Lt),Lt.c=It(a,Lt),Ct.x=It(o,Ct),Ct.X=It(l,Ct),Ct.c=It(a,Ct),{format:function(t){var e=It(t+=\"\",Lt);return e.toString=function(){return t},e},parse:function(t){var e=Ot(t+=\"\",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=It(t+=\"\",Ct);return e.toString=function(){return t},e},utcParse:function(t){var e=Ot(t+=\"\",!0);return e.toString=function(){return t},e}}}var o,s={\"-\":\"\",_:\" \",0:\"0\"},l=/^\\s*\\d+/,c=/^%/,u=/[\\\\^$*+?|[\\]().{}]/g;function f(t,e,r){var n=t<0?\"-\":\"\",i=(n?-t:t)+\"\",a=i.length;return n+(a68?1900:2e3),r+n[0].length):-1}function w(t,e,r){var n=/^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||\"00\")),r+n[0].length):-1}function T(t,e,r){var n=l.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function k(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function A(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function M(t,e,r){var n=l.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function S(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function E(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function L(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function C(t,e,r){var n=l.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function P(t,e,r){var n=l.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function I(t,e,r){var n=c.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function O(t,e,r){var n=l.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function z(t,e,r){var n=l.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function D(t,e){return f(t.getDate(),e,2)}function R(t,e){return f(t.getHours(),e,2)}function F(t,e){return f(t.getHours()%12||12,e,2)}function B(t,r){return f(1+e.timeDay.count(e.timeYear(t),t),r,3)}function N(t,e){return f(t.getMilliseconds(),e,3)}function j(t,e){return N(t,e)+\"000\"}function U(t,e){return f(t.getMonth()+1,e,2)}function V(t,e){return f(t.getMinutes(),e,2)}function H(t,e){return f(t.getSeconds(),e,2)}function q(t){var e=t.getDay();return 0===e?7:e}function G(t,r){return f(e.timeSunday.count(e.timeYear(t)-1,t),r,2)}function Y(t,r){var n=t.getDay();return t=n>=4||0===n?e.timeThursday(t):e.timeThursday.ceil(t),f(e.timeThursday.count(e.timeYear(t),t)+(4===e.timeYear(t).getDay()),r,2)}function W(t){return t.getDay()}function X(t,r){return f(e.timeMonday.count(e.timeYear(t)-1,t),r,2)}function Z(t,e){return f(t.getFullYear()%100,e,2)}function J(t,e){return f(t.getFullYear()%1e4,e,4)}function K(t){var e=t.getTimezoneOffset();return(e>0?\"-\":(e*=-1,\"+\"))+f(e/60|0,\"0\",2)+f(e%60,\"0\",2)}function Q(t,e){return f(t.getUTCDate(),e,2)}function $(t,e){return f(t.getUTCHours(),e,2)}function tt(t,e){return f(t.getUTCHours()%12||12,e,2)}function et(t,r){return f(1+e.utcDay.count(e.utcYear(t),t),r,3)}function rt(t,e){return f(t.getUTCMilliseconds(),e,3)}function nt(t,e){return rt(t,e)+\"000\"}function it(t,e){return f(t.getUTCMonth()+1,e,2)}function at(t,e){return f(t.getUTCMinutes(),e,2)}function ot(t,e){return f(t.getUTCSeconds(),e,2)}function st(t){var e=t.getUTCDay();return 0===e?7:e}function lt(t,r){return f(e.utcSunday.count(e.utcYear(t)-1,t),r,2)}function ct(t,r){var n=t.getUTCDay();return t=n>=4||0===n?e.utcThursday(t):e.utcThursday.ceil(t),f(e.utcThursday.count(e.utcYear(t),t)+(4===e.utcYear(t).getUTCDay()),r,2)}function ut(t){return t.getUTCDay()}function ft(t,r){return f(e.utcMonday.count(e.utcYear(t)-1,t),r,2)}function ht(t,e){return f(t.getUTCFullYear()%100,e,2)}function pt(t,e){return f(t.getUTCFullYear()%1e4,e,4)}function dt(){return\"+0000\"}function gt(){return\"%\"}function mt(t){return+t}function vt(t){return Math.floor(+t/1e3)}function yt(e){return o=a(e),t.timeFormat=o.format,t.timeParse=o.parse,t.utcFormat=o.utcFormat,t.utcParse=o.utcParse,o}yt({dateTime:\"%x, %X\",date:\"%-m/%-d/%Y\",time:\"%-I:%M:%S %p\",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\"]});var xt=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat(\"%Y-%m-%dT%H:%M:%S.%LZ\");var bt=+new Date(\"2000-01-01T00:00:00.000Z\")?function(t){var e=new Date(t);return isNaN(e)?null:e}:t.utcParse(\"%Y-%m-%dT%H:%M:%S.%LZ\");t.isoFormat=xt,t.isoParse=bt,t.timeFormatDefaultLocale=yt,t.timeFormatLocale=a,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{\"d3-time\":121}],121:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){\"use strict\";var e=new Date,r=new Date;function n(t,i,a,o){function s(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return s.floor=function(e){return t(e=new Date(+e)),e},s.ceil=function(e){return t(e=new Date(e-1)),i(e,1),t(e),e},s.round=function(t){var e=s(t),r=s.ceil(t);return t-e0))return o;do{o.push(a=new Date(+e)),i(e,n),t(e)}while(a=r)for(;t(r),!e(r);)r.setTime(r-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;i(t,-1),!e(t););else for(;--r>=0;)for(;i(t,1),!e(t););}))},a&&(s.count=function(n,i){return e.setTime(+n),r.setTime(+i),t(e),t(r),Math.floor(a(e,r))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(o?function(e){return o(e)%t==0}:function(e){return s.count(0,e)%t==0}):s:null}),s}var i=n((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?n((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,r){e.setTime(+e+r*t)}),(function(e,r){return(r-e)/t})):i:null};var a=i.range,o=n((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),s=o.range,l=n((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),c=l.range,u=n((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),f=u.range,h=n((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),p=h.range;function d(t){return n((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var g=d(0),m=d(1),v=d(2),y=d(3),x=d(4),b=d(5),_=d(6),w=g.range,T=m.range,k=v.range,A=y.range,M=x.range,S=b.range,E=_.range,L=n((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),C=L.range,P=n((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));P.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,r){e.setFullYear(e.getFullYear()+r*t)})):null};var I=P.range,O=n((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()})),z=O.range,D=n((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()})),R=D.range,F=n((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1})),B=F.range;function N(t){return n((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var j=N(0),U=N(1),V=N(2),H=N(3),q=N(4),G=N(5),Y=N(6),W=j.range,X=U.range,Z=V.range,J=H.range,K=q.range,Q=G.range,$=Y.range,tt=n((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),et=tt.range,rt=n((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));rt.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null};var nt=rt.range;t.timeDay=h,t.timeDays=p,t.timeFriday=b,t.timeFridays=S,t.timeHour=u,t.timeHours=f,t.timeInterval=n,t.timeMillisecond=i,t.timeMilliseconds=a,t.timeMinute=l,t.timeMinutes=c,t.timeMonday=m,t.timeMondays=T,t.timeMonth=L,t.timeMonths=C,t.timeSaturday=_,t.timeSaturdays=E,t.timeSecond=o,t.timeSeconds=s,t.timeSunday=g,t.timeSundays=w,t.timeThursday=x,t.timeThursdays=M,t.timeTuesday=v,t.timeTuesdays=k,t.timeWednesday=y,t.timeWednesdays=A,t.timeWeek=g,t.timeWeeks=w,t.timeYear=P,t.timeYears=I,t.utcDay=F,t.utcDays=B,t.utcFriday=G,t.utcFridays=Q,t.utcHour=D,t.utcHours=R,t.utcMillisecond=i,t.utcMilliseconds=a,t.utcMinute=O,t.utcMinutes=z,t.utcMonday=U,t.utcMondays=X,t.utcMonth=tt,t.utcMonths=et,t.utcSaturday=Y,t.utcSaturdays=$,t.utcSecond=o,t.utcSeconds=s,t.utcSunday=j,t.utcSundays=W,t.utcThursday=q,t.utcThursdays=K,t.utcTuesday=V,t.utcTuesdays=Z,t.utcWednesday=H,t.utcWednesdays=J,t.utcWeek=j,t.utcWeeks=W,t.utcYear=rt,t.utcYears=nt,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],122:[function(t,e,r){arguments[4][121][0].apply(r,arguments)},{dup:121}],123:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){\"use strict\";var e,r,n=0,i=0,a=0,o=0,s=0,l=0,c=\"object\"==typeof performance&&performance.now?performance:Date,u=\"object\"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function f(){return s||(u(h),s=c.now()+l)}function h(){s=0}function p(){this._call=this._time=this._next=null}function d(t,e,r){var n=new p;return n.restart(t,e,r),n}function g(){f(),++n;for(var t,r=e;r;)(t=s-r._time)>=0&&r._call.call(null,t),r=r._next;--n}function m(){s=(o=c.now())+l,n=i=0;try{g()}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,y(a)}(),s=0}}function v(){var t=c.now(),e=t-o;e>1e3&&(l-=e,o=t)}function y(t){n||(i&&(i=clearTimeout(i)),t-s>24?(t<1/0&&(i=setTimeout(m,t-c.now()-l)),a&&(a=clearInterval(a))):(a||(o=c.now(),a=setInterval(v,1e3)),n=1,u(m)))}p.prototype=d.prototype={constructor:p,restart:function(t,n,i){if(\"function\"!=typeof t)throw new TypeError(\"callback is not a function\");i=(null==i?f():+i)+(null==n?0:+n),this._next||r===this||(r?r._next=this:e=this,r=this),this._call=t,this._time=i,y()},stop:function(){this._call&&(this._call=null,this._time=1/0,y())}},t.interval=function(t,e,r){var n=new p,i=e;return null==e?(n.restart(t,e,r),n):(e=+e,r=null==r?f():+r,n.restart((function a(o){o+=i,n.restart(a,i+=e,r),t(o)}),e,r),n)},t.now=f,t.timeout=function(t,e,r){var n=new p;return e=null==e?0:+e,n.restart((function(r){n.stop(),t(r+e)}),e,r),n},t.timer=d,t.timerFlush=g,Object.defineProperty(t,\"__esModule\",{value:!0})}))},{}],124:[function(t,e,r){e.exports=function(){for(var t=0;ts*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];i0)return function(t,e){var r,n;for(r=new Array(t),n=0;n80*r){n=l=t[0],s=c=t[1];for(var b=r;bl&&(l=u),p>c&&(c=p);d=0!==(d=Math.max(l-n,c-s))?1/d:0}return o(y,x,r,n,s,d),x}function i(t,e,r,n,i){var a,o;if(i===E(t,e,r,n)>0)for(a=e;a=e;a-=n)o=A(a,t[a],t[a+1],o);return o&&x(o,o.next)&&(M(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||!x(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(M(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=d(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;e0||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 p,g,m=t;t.prev!==t.next;)if(p=t.prev,g=t.next,f?l(t,n,i,f):s(t))e.push(p.i/r),e.push(t.i/r),e.push(g.i/r),M(t),t=g.next,m=g.next;else if((t=g)===m){h?1===h?o(t=c(a(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(y(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(m(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&y(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(y(i,a,o)>=0)return!1;for(var s=i.xa.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=d(s,l,e,r,n),h=d(c,u,e,r,n),p=t.prevZ,g=t.nextZ;p&&p.z>=f&&g&&g.z<=h;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,g!==t.prev&&g!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;g&&g.z<=h;){if(g!==t.prev&&g!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function c(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!x(i,o)&&b(i,n,n.next,o)&&T(i,o)&&T(o,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(o.i/r),M(n),M(n.next),n=t=o),n=n.next}while(n!==t);return a(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=k(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.x&&n.x>=u&&i!==n.x&&m(ar.x||n.x===r.x&&p(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(t,e)){var r=k(e,t);a(e,e.next),a(r,r.next)}}function p(t,e){return y(t.prev,t,e.prev)<0&&y(e.next,t,t.next)<0}function d(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 g(t){var e=t,r=t;do{(e.x=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&&b(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(T(t,e)&&T(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)&&(y(t.prev,t,e.prev)||y(t,e.prev,e))||x(t,e)&&y(t.prev,t,t.next)>0&&y(e.prev,e,e.next)>0)}function y(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,r,n){var i=w(y(t,e,r)),a=w(y(t,e,n)),o=w(y(r,n,t)),s=w(y(r,n,e));return i!==a&&o!==s||(!(0!==i||!_(t,r,e))||(!(0!==a||!_(t,n,e))||(!(0!==o||!_(r,t,n))||!(0!==s||!_(r,e,n)))))}function _(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function w(t){return t>0?1:t<0?-1:0}function T(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function k(t,e){var r=new S(t.i,t.x,t.y),n=new S(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 A(t,e,r,n){var i=new S(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 M(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 S(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 E(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],130:[function(t,e,r){var n=t(\"strongly-connected-components\");e.exports=function(t,e){var r,i=[],a=[],o=[],s={},l=[];function c(t){var e,n,i=!1;for(a.push(t),o[t]=!0,e=0;e=e}))}(e);for(var r,i=n(t).components.filter((function(t){return t.length>1})),a=1/0,o=0;o=55296&&y<=56319&&(w+=t[++r]),w=T?h.call(T,k,w,g):w,e?(p.value=w,d(m,g,p)):m[g]=w,++g;v=g}if(void 0===v)for(v=o(t.length),e&&(m=new e(v)),r=0;r0?1:-1}},{}],141:[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\":138}],142:[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\":141}],143:[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\":160,\"./valid-value\":162}],144:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?Object.assign:t(\"./shim\")},{\"./is-implemented\":145,\"./shim\":146}],145:[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\")}},{}],146:[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-1}},{}],166:[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}},{}],167:[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}},{}],168:[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\"))},{\"./\":171,d:106,\"es5-ext/object/set-prototype-of\":157,\"es5-ext/string/#/contains\":163,\"es6-symbol\":175}],169:[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,m,v=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,v,u.value,f),h)return;u=t.next()}else for(d=t.length,p=0;p=55296&&m<=56319&&(g+=t[++p]),l.call(e,v,g,f),!h);++p);else c.call(t,(function(t){return l.call(e,v,t,f),h}))}},{\"./get\":170,\"es5-ext/function/is-arguments\":135,\"es5-ext/object/valid-callable\":160,\"es5-ext/string/is-string\":166}],170:[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\":168,\"./string\":173,\"./valid-iterable\":174,\"es5-ext/function/is-arguments\":135,\"es5-ext/string/is-string\":166,\"es6-symbol\":175}],171:[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.__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:106,\"d/auto-bind\":105,\"es5-ext/array/#/clear\":131,\"es5-ext/object/assign\":144,\"es5-ext/object/valid-callable\":160,\"es5-ext/object/valid-value\":162,\"es6-symbol\":175}],172:[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\":135,\"es5-ext/object/is-value\":151,\"es5-ext/string/is-string\":166,\"es6-symbol\":175}],173:[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__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,o.toStringTag,a(\"c\",\"String Iterator\"))},{\"./\":171,d:106,\"es5-ext/object/set-prototype-of\":157,\"es6-symbol\":175}],174:[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\":172}],175:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?t(\"ext/global-this\").Symbol:t(\"./polyfill\")},{\"./is-implemented\":176,\"./polyfill\":181,\"ext/global-this\":188}],176:[function(t,e,r){\"use strict\";var n=t(\"ext/global-this\"),i={object:!0,symbol:!0};e.exports=function(){var t,e=n.Symbol;if(\"function\"!=typeof e)return!1;t=e(\"test symbol\");try{String(t)}catch(t){return!1}return!!i[typeof e.iterator]&&(!!i[typeof e.toPrimitive]&&!!i[typeof e.toStringTag])}},{\"ext/global-this\":188}],177:[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]))}},{}],178:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=Object.create,a=Object.defineProperty,o=Object.prototype,s=i(null);e.exports=function(t){for(var e,r,i=0;s[t+(i||\"\")];)++i;return s[t+=i||\"\"]=!0,a(o,e=\"@@\"+t,n.gs(null,(function(t){r||(r=!0,a(this,e,n(t)),r=!1)}))),e}},{d:106}],179:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=t(\"ext/global-this\").Symbol;e.exports=function(t){return Object.defineProperties(t,{hasInstance:n(\"\",i&&i.hasInstance||t(\"hasInstance\")),isConcatSpreadable:n(\"\",i&&i.isConcatSpreadable||t(\"isConcatSpreadable\")),iterator:n(\"\",i&&i.iterator||t(\"iterator\")),match:n(\"\",i&&i.match||t(\"match\")),replace:n(\"\",i&&i.replace||t(\"replace\")),search:n(\"\",i&&i.search||t(\"search\")),species:n(\"\",i&&i.species||t(\"species\")),split:n(\"\",i&&i.split||t(\"split\")),toPrimitive:n(\"\",i&&i.toPrimitive||t(\"toPrimitive\")),toStringTag:n(\"\",i&&i.toStringTag||t(\"toStringTag\")),unscopables:n(\"\",i&&i.unscopables||t(\"unscopables\"))})}},{d:106,\"ext/global-this\":188}],180:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=t(\"../../../validate-symbol\"),a=Object.create(null);e.exports=function(t){return Object.defineProperties(t,{for:n((function(e){return a[e]?a[e]:a[e]=t(String(e))})),keyFor:n((function(t){var e;for(e in i(t),a)if(a[e]===t)return e}))})}},{\"../../../validate-symbol\":182,d:106}],181:[function(t,e,r){\"use strict\";var n,i,a,o=t(\"d\"),s=t(\"./validate-symbol\"),l=t(\"ext/global-this\").Symbol,c=t(\"./lib/private/generate-name\"),u=t(\"./lib/private/setup/standard-symbols\"),f=t(\"./lib/private/setup/symbol-registry\"),h=Object.create,p=Object.defineProperties,d=Object.defineProperty;if(\"function\"==typeof l)try{String(l()),a=!0}catch(t){}else l=null;i=function(t){if(this instanceof i)throw new TypeError(\"Symbol is not a constructor\");return n(t)},e.exports=n=function t(e){var r;if(this instanceof t)throw new TypeError(\"Symbol is not a constructor\");return a?l(e):(r=h(i.prototype),e=void 0===e?\"\":String(e),p(r,{__description__:o(\"\",e),__name__:o(\"\",c(e))}))},u(n),f(n),p(i.prototype,{constructor:o(n),toString:o(\"\",(function(){return this.__name__}))}),p(n.prototype,{toString:o((function(){return\"Symbol (\"+s(this).__description__+\")\"})),valueOf:o((function(){return s(this)}))}),d(n.prototype,n.toPrimitive,o(\"\",(function(){var t=s(this);return\"symbol\"==typeof t?t:t.toString()}))),d(n.prototype,n.toStringTag,o(\"c\",\"Symbol\")),d(i.prototype,n.toStringTag,o(\"c\",n.prototype[n.toStringTag])),d(i.prototype,n.toPrimitive,o(\"c\",n.prototype[n.toPrimitive]))},{\"./lib/private/generate-name\":178,\"./lib/private/setup/standard-symbols\":179,\"./lib/private/setup/symbol-registry\":180,\"./validate-symbol\":182,d:106,\"ext/global-this\":188}],182:[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\":177}],183:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?WeakMap:t(\"./polyfill\")},{\"./is-implemented\":184,\"./polyfill\":186}],184:[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)))))}},{}],185:[function(t,e,r){\"use strict\";e.exports=\"function\"==typeof WeakMap&&\"[object WeakMap]\"===Object.prototype.toString.call(new WeakMap)},{}],186:[function(t,e,r){\"use strict\";var n,i=t(\"es5-ext/object/is-value\"),a=t(\"es5-ext/object/set-prototype-of\"),o=t(\"es5-ext/object/valid-object\"),s=t(\"es5-ext/object/valid-value\"),l=t(\"es5-ext/string/random-uniq\"),c=t(\"d\"),u=t(\"es6-iterator/get\"),f=t(\"es6-iterator/for-of\"),h=t(\"es6-symbol\").toStringTag,p=t(\"./is-native-implemented\"),d=Array.isArray,g=Object.defineProperty,m=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=p&&a&&WeakMap!==n?a(new WeakMap,v(this)):this,i(e)&&(d(e)||(e=u(e))),g(t,\"__weakMapData__\",c(\"c\",\"$weakMap$\"+l())),e?(f(e,(function(e){s(e),t.set(e[0],e[1])})),t):t},p&&(a&&a(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:c(n)})),Object.defineProperties(n.prototype,{delete:c((function(t){return!!m.call(o(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)})),get:c((function(t){if(m.call(o(t),this.__weakMapData__))return t[this.__weakMapData__]})),has:c((function(t){return m.call(o(t),this.__weakMapData__)})),set:c((function(t,e){return g(o(t),this.__weakMapData__,c(\"c\",e)),this})),toString:c((function(){return\"[object WeakMap]\"}))}),g(n.prototype,h,c(\"c\",\"WeakMap\"))},{\"./is-native-implemented\":185,d:106,\"es5-ext/object/is-value\":151,\"es5-ext/object/set-prototype-of\":157,\"es5-ext/object/valid-object\":161,\"es5-ext/object/valid-value\":162,\"es5-ext/string/random-uniq\":167,\"es6-iterator/for-of\":169,\"es6-iterator/get\":170,\"es6-symbol\":175}],187:[function(t,e,r){var n=function(){if(\"object\"==typeof self&&self)return self;if(\"object\"==typeof window&&window)return window;throw new Error(\"Unable to resolve global `this`\")};e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,\"__global__\",{get:function(){return this},configurable:!0})}catch(t){return n()}try{return __global__||n()}finally{delete Object.prototype.__global__}}()},{}],188:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?globalThis:t(\"./implementation\")},{\"./implementation\":187,\"./is-implemented\":189}],189:[function(t,e,r){\"use strict\";e.exports=function(){return\"object\"==typeof globalThis&&(!!globalThis&&globalThis.Array===Array)}},{}],190:[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\":237}],191:[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;ie[0]-o[0]/2&&(h=o[0]/2,p+=o[1]);return r}},{\"css-font/stringify\":102}],193:[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\",title:void 0!==e.title?e.title:\"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 m=a(f.getImageData(0,0,p,p));d.lineHeight=d.bottom=p-m+g,f.clearRect(0,0,p,p),f.textBaseline=\"alphabetic\",f.fillText(\"H\",0,p);var v=p-a(f.getImageData(0,0,p,p))-1+g;d.baseline=d.alphabetic=v,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.title&&(f.clearRect(0,0,p,p),f.textBaseline=\"top\",f.fillText(h.title,0,0),d.title=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=_-v}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;n0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}e.exports=n,n.canvas=document.createElement(\"canvas\"),n.cache={}},{}],194:[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 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:{}}},T.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),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=T.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(T.baseFontSize+\"px \"+t)}else t=n.parse(n.stringify(t));var i=n.stringify({size:T.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]=T.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:v(c,{origin:\"top\",fontSize:T.baseFontSize,fontStyle:u.join(\" \")})},T.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;h2){for(var w=!t.position[0].length,k=u.mallocFloat(2*this.count),A=0,M=0;A1?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],i*=-1}))),null!=t.color)if(t.color||(t.color=\"transparent\"),\"string\"!=typeof t.color&&isNaN(t.color)){var q;if(\"number\"==typeof t.color[0]&&t.color.length>this.counts.length){var G=t.color.length;q=u.mallocUint8(G);for(var Y=(t.color.subarray||t.color.slice).bind(t.color),W=0;W4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var J=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(J);for(var K=0;K1?this.counts[K]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[K]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*K,4*K+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[K]:this.opacity,baseline:null!=this.baselineOffset[K]?this.baselineOffset[K]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[K]?this.alignOffset[K]:this.alignOffset[0]:0,atlas:this.fontAtlas[K]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*K,2*K+2):this.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=[]},T.prototype.destroy=function(){},T.prototype.kerning=!0,T.prototype.position={constant:new Float32Array(2)},T.prototype.translate=null,T.prototype.scale=null,T.prototype.font=null,T.prototype.text=\"\",T.prototype.positionOffset=[0,0],T.prototype.opacity=1,T.prototype.color=new Uint8Array([0,0,0,255]),T.prototype.alignOffset=[0,0],T.maxAtlasSize=1024,T.atlasCanvas=document.createElement(\"canvas\"),T.atlasContext=T.atlasCanvas.getContext(\"2d\",{alpha:!1}),T.baseFontSize=64,T.fonts={},e.exports=T},{\"bit-twiddle\":81,\"color-normalize\":89,\"css-font\":99,\"detect-kerning\":125,\"es6-weak-map\":183,\"flatten-vertex-data\":191,\"font-atlas\":192,\"font-measure\":193,\"gl-util/context\":226,\"is-plain-obj\":236,\"object-assign\":247,\"parse-rect\":249,\"parse-unit\":251,\"pick-by-alias\":253,regl:283,\"to-px\":314,\"typedarray-pool\":327}],226:[function(t,e,r){(function(r){(function(){\"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*r.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*r.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}function o(){var t=document.createElement(\"canvas\");return t.style.position=\"absolute\",t.style.top=0,t.style.left=0,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\",width:\"w width\",height:\"h height\"},!0),t.pixelRatio||(t.pixelRatio=r.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(\"string\"==typeof t.container){var s=document.querySelector(t.container);if(!s)throw Error(\"Element \"+t.container+\" is not found\");t.container=s}a(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=o(),t.container.appendChild(t.canvas),i(t))}else if(!t.canvas){if(\"undefined\"==typeof document)throw Error(\"Not DOM environment. Use headless-gl.\");t.container=document.body||document.documentElement,t.canvas=o(),t.container.appendChild(t.canvas),i(t)}return t.gl||[\"webgl\",\"experimental-webgl\",\"webgl-experimental\"].some((function(e){try{t.gl=t.canvas.getContext(e,t.attrs)}catch(t){}return t.gl})),t.gl}}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"pick-by-alias\":253}],227:[function(t,e,r){e.exports=function(t){\"string\"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n>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<>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<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g}},{}],231:[function(t,e,r){\"function\"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},{}],232:[function(t,e,r){e.exports=!0},{}],233:[function(t,e,r){\"use strict\";e.exports=\"undefined\"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\\//.test(navigator.appVersion))},{}],234:[function(t,e,r){\"use strict\";e.exports=a,e.exports.isMobile=a,e.exports.default=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[46]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[46]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;if(e||\"undefined\"==typeof navigator||(e=navigator.userAgent),e&&e.headers&&\"string\"==typeof e.headers[\"user-agent\"]&&(e=e.headers[\"user-agent\"]),\"string\"!=typeof e)return!1;var r=t.tablet?i.test(e):n.test(e);return!r&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==e.indexOf(\"Macintosh\")&&-1!==e.indexOf(\"Safari\")&&(r=!0),r}},{}],235:[function(t,e,r){\"use strict\";e.exports=function(t){var e=typeof t;return null!==t&&(\"object\"===e||\"function\"===e)}},{}],236:[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({}))}},{}],237:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e,r=t.length,n=0;n13)&&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}},{}],238:[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))}},{}],239:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?e.exports=n():(t=t||self).mapboxgl=n()}(this,(function(){\"use strict\";var t,e,r;function n(n,i){if(t)if(e){var a=\"var sharedChunk = {}; (\"+t+\")(sharedChunk); (\"+e+\")(sharedChunk);\",o={};t(o),(r=i(o)).workerUrl=window.URL.createObjectURL(new Blob([a],{type:\"text/javascript\"}))}else e=i;else t=i}return n(0,(function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r=n;function n(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}n.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},n.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},n.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},n.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)(n=1))return n;for(;ra?r=i:n=i,i=.5*(n-r)+r}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var i=a;function a(t,e){this.x=t,this.y=e}function o(t,e,n,i){var a=new r(t,e,n,i);return function(t){return a.solve(t)}}a.prototype={clone:function(){return new a(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}},a.convert=function(t){return t instanceof a?t:Array.isArray(t)?new a(t[0],t[1]):t};var s=o(.25,.1,.25,1);function l(t,e,r){return Math.min(r,Math.max(e,t))}function c(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i}function u(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function d(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function g(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e))}))}function m(t,e){return-1!==t.indexOf(e,t.length-e.length)}function v(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?v(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 T(t){for(var e=0,r=0,n=t.length,i=n-1,a=void 0,o=void 0;r@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\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}var M=null;function S(t){if(null==M){var e=t.navigator?t.navigator.userAgent:null;M=!!t.safari||!(!e||!(/\\b(iPad|iPhone|iPod)\\b/.test(e)||e.match(\"Safari\")&&!e.match(\"Chrome\")))}return M}function E(t){try{var e=self[t];return e.setItem(\"_mapbox_test_\",1),e.removeItem(\"_mapbox_test_\"),!0}catch(t){return!1}}var L,C,P,I,O=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),z=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,D=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,R={now:O,frame:function(t){var e=z(t);return{cancel:function(){return D(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var r=self.document.createElement(\"canvas\"),n=r.getContext(\"2d\");if(!n)throw new Error(\"failed to create canvas 2d context\");return r.width=t.width,r.height=t.height,n.drawImage(t,0,0,t.width,t.height),n.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:function(t){return L||(L=self.document.createElement(\"a\")),L.href=t,L.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==C&&(C=self.matchMedia(\"(prefers-reduced-motion: reduce)\")),C.matches)}},F={API_URL:\"https://api.mapbox.com\",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf(\"https://api.mapbox.cn\")?\"https://events.mapbox.cn/events/v2\":0===this.API_URL.indexOf(\"https://api.mapbox.com\")?\"https://events.mapbox.com/events/v2\":null:null},FEEDBACK_URL:\"https://apps.mapbox.com/feedback\",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},B={supported:!1,testSupport:function(t){if(N||!I)return;j?U(t):P=t}},N=!1,j=!1;function U(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,I),t.isContextLost())return;B.supported=!0}catch(t){}t.deleteTexture(e),N=!0}self.document&&((I=self.document.createElement(\"img\")).onload=function(){P&&U(P),P=null,j=!0},I.onerror=function(){N=!0,P=null},I.src=\"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\");var V=\"01\";var H=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function q(t){return 0===t.indexOf(\"mapbox:\")}H.prototype._createSkuToken=function(){var t=function(){for(var t=\"\",e=0;e<10;e++)t+=\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"[Math.floor(62*Math.random())];return{token:[\"1\",V,t].join(\"\"),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},H.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},H.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},H.prototype.normalizeStyleURL=function(t,e){if(!q(t))return t;var r=X(t);return r.path=\"/styles/v1\"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeGlyphsURL=function(t,e){if(!q(t))return t;var r=X(t);return r.path=\"/fonts/v1\"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeSourceURL=function(t,e){if(!q(t))return t;var r=X(t);return r.path=\"/v4/\"+r.authority+\".json\",r.params.push(\"secure\"),this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeSpriteURL=function(t,e,r,n){var i=X(t);return q(t)?(i.path=\"/styles/v1\"+i.path+\"/sprite\"+e+r,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=\"\"+e+r,Z(i))},H.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!q(t))return t;var r=X(t),n=R.devicePixelRatio>=2||512===e?\"@2x\":\"\",i=B.supported?\".webp\":\"$1\";r.path=r.path.replace(/(\\.(png|jpg)\\d*)(?=$)/,\"\"+n+i),r.path=r.path.replace(/^.+\\/v4\\//,\"/\"),r.path=\"/v4\"+r.path;var a=this._customAccessToken||function(t){for(var e=0,r=t;e=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){_(\"Unable to write to LocalStorage\")}},K.prototype.processRequests=function(t){},K.prototype.postEvent=function(t,e,r,n){var i=this;if(F.EVENTS_URL){var a=X(F.EVENTS_URL);a.params.push(\"access_token=\"+(n||F.ACCESS_TOKEN||\"\"));var o={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:\"mapbox-gl-js\",sdkVersion:\"1.10.1\",skuId:V,userId:this.anonId},s=e?u(o,e):o,l={url:Z(a),headers:{\"Content-Type\":\"text/plain\"},body:JSON.stringify([s])};this.pendingRequest=bt(l,(function(t){i.pendingRequest=null,r(t),i.saveEventData(),i.processRequests(n)}))}},K.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var Q,$,tt=function(t){function e(){t.call(this,\"map.load\"),this.success={},this.skuToken=\"\"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postMapLoadEvent=function(t,e,r,n){this.skuToken=r,(F.EVENTS_URL&&n||F.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return q(t)||Y(t)})))&&this.queueRequest({id:e,timestamp:Date.now()},n)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var r=this.queue.shift(),n=r.id,i=r.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),d(this.anonId)||(this.anonId=p()),this.postEvent(i,{skuToken:this.skuToken},(function(t){t||n&&(e.success[n]=!0)}),t))}},e}(K),et=new(function(t){function e(e){t.call(this,\"appUserTurnstile\"),this._customAccessToken=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postTurnstileEvent=function(t,e){F.EVENTS_URL&&F.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return q(t)||Y(t)}))&&this.queueRequest(Date.now(),e)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var r=J(F.ACCESS_TOKEN),n=r?r.u:F.ACCESS_TOKEN,i=n!==this.eventData.tokenU;d(this.anonId)||(this.anonId=p(),i=!0);var a=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(a),l=(a-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||o.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(a,{\"enabled.telemetry\":!1},(function(t){t||(e.eventData.lastSuccess=a,e.eventData.tokenU=n)}),t)}},e}(K)),rt=et.postTurnstileEvent.bind(et),nt=new tt,it=nt.postMapLoadEvent.bind(nt),at=500,ot=50;function st(){self.caches&&!Q&&(Q=self.caches.open(\"mapbox-tiles\"))}function lt(t,e,r){if(st(),Q){var n={status:e.status,statusText:e.statusText,headers:new self.Headers};e.headers.forEach((function(t,e){return n.headers.set(e,t)}));var i=A(e.headers.get(\"Cache-Control\")||\"\");if(!i[\"no-store\"])i[\"max-age\"]&&n.headers.set(\"Expires\",new Date(r+1e3*i[\"max-age\"]).toUTCString()),new Date(n.headers.get(\"Expires\")).getTime()-r<42e4||function(t,e){if(void 0===$)try{new Response(new ReadableStream),$=!0}catch(t){$=!1}$?e(t.body):t.blob().then(e)}(e,(function(e){var r=new self.Response(e,n);st(),Q&&Q.then((function(e){return e.put(ct(t.url),r)})).catch((function(t){return _(t.message)}))}))}}function ct(t){var e=t.indexOf(\"?\");return e<0?t:t.slice(0,e)}function ut(t,e){if(st(),!Q)return e(null);var r=ct(t.url);Q.then((function(t){t.match(r).then((function(n){var i=function(t){if(!t)return!1;var e=new Date(t.headers.get(\"Expires\")||0),r=A(t.headers.get(\"Cache-Control\")||\"\");return e>Date.now()&&!r[\"no-cache\"]}(n);t.delete(r),i&&t.put(r,n.clone()),e(null,n,i)})).catch(e)})).catch(e)}var ft,ht=1/0;function pt(){return null==ft&&(ft=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext(\"2d\")&&\"function\"==typeof self.createImageBitmap),ft}var dt={Unknown:\"Unknown\",Style:\"Style\",Source:\"Source\",Tile:\"Tile\",Glyphs:\"Glyphs\",SpriteImage:\"SpriteImage\",SpriteJSON:\"SpriteJSON\",Image:\"Image\"};\"function\"==typeof Object.freeze&&Object.freeze(dt);var gt=function(t){function e(e,r,n){401===r&&Y(n)&&(e+=\": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes\"),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),mt=k()?function(){return self.worker&&self.worker.referrer}:function(){return(\"blob:\"===self.location.protocol?self.parent:self).location.href};function vt(t,e){var r,n=new self.AbortController,i=new self.Request(t.url,{method:t.method||\"GET\",body:t.body,credentials:t.credentials,headers:t.headers,referrer:mt(),signal:n.signal}),a=!1,o=!1,s=(r=i.url).indexOf(\"sku=\")>0&&Y(r);\"json\"===t.type&&i.headers.set(\"Accept\",\"application/json\");var l=function(r,n,a){if(!o){if(r&&\"SecurityError\"!==r.message&&_(r),n&&a)return c(n);var l=Date.now();self.fetch(i).then((function(r){if(r.ok){var n=s?r.clone():null;return c(r,n,l)}return e(new gt(r.statusText,r.status,t.url))})).catch((function(t){20!==t.code&&e(new Error(t.message))}))}},c=function(r,n,s){(\"arrayBuffer\"===t.type?r.arrayBuffer():\"json\"===t.type?r.json():r.text()).then((function(t){o||(n&&s&<(i,n,s),a=!0,e(null,t,r.headers.get(\"Cache-Control\"),r.headers.get(\"Expires\")))})).catch((function(t){o||e(new Error(t.message))}))};return s?ut(i,l):l(null,null),{cancel:function(){o=!0,a||n.abort()}}}var yt=function(t,e){if(r=t.url,!(/^file:/.test(r)||/^file:/.test(mt())&&!/^\\w+:/.test(r))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty(\"signal\"))return vt(t,e);if(k()&&self.worker&&self.worker.actor){return self.worker.actor.send(\"getResource\",t,e,void 0,!0)}}var r;return function(t,e){var r=new self.XMLHttpRequest;for(var n in r.open(t.method||\"GET\",t.url,!0),\"arrayBuffer\"===t.type&&(r.responseType=\"arraybuffer\"),t.headers)r.setRequestHeader(n,t.headers[n]);return\"json\"===t.type&&(r.responseType=\"text\",r.setRequestHeader(\"Accept\",\"application/json\")),r.withCredentials=\"include\"===t.credentials,r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if(\"json\"===t.type)try{n=JSON.parse(r.response)}catch(t){return e(t)}e(null,n,r.getResponseHeader(\"Cache-Control\"),r.getResponseHeader(\"Expires\"))}else e(new gt(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},xt=function(t,e){return yt(u(t,{type:\"arrayBuffer\"}),e)},bt=function(t,e){return yt(u(t,{method:\"POST\"}),e)};var _t,wt;_t=[],wt=0;var Tt=function(t,e){if(B.supported&&(t.headers||(t.headers={}),t.headers.accept=\"image/webp,*/*\"),wt>=F.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return _t.push(r),r}wt++;var n=!1,i=function(){if(!n)for(n=!0,wt--;_t.length&&wt0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},Et.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var Lt={$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.051129,180,85.051129]},scheme:{type:\"enum\",values:{xyz:{},tms:{}},default:\"xyz\"},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},attribution:{type:\"string\"},promoteId:{type:\"promoteId\"},\"*\":{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.051129,180,85.051129]},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.051129,180,85.051129]},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},attribution:{type:\"string\"},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\"},clusterProperties:{type:\"*\"},lineMetrics:{type:\"boolean\",default:!1},generateId:{type:\"boolean\",default:!1},promoteId:{type:\"promoteId\"}},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\",\"property-type\":\"constant\"}},layout_fill:{\"fill-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_circle:{\"circle-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_heatmap:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},\"layout_fill-extrusion\":{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_line:{\"line-cap\":{type:\"enum\",values:{butt:{},round:{},square:{}},default:\"butt\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-join\":{type:\"enum\",values:{bevel:{},round:{},miter:{}},default:\"miter\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"line-miter-limit\":{type:\"number\",default:2,requires:[{\"line-join\":\"miter\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-round-limit\":{type:\"number\",default:1.05,requires:[{\"line-join\":\"round\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_symbol:{\"symbol-placement\":{type:\"enum\",values:{point:{},line:{},\"line-center\":{}},default:\"point\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-spacing\":{type:\"number\",default:250,minimum:1,units:\"pixels\",requires:[{\"symbol-placement\":\"line\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-avoid-edges\":{type:\"boolean\",default:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"symbol-z-order\":{type:\"enum\",values:{auto:{},\"viewport-y\":{},source:{}},default:\"auto\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-optional\":{type:\"boolean\",default:!1,requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-size\":{type:\"number\",default:1,minimum:0,units:\"factor of the original icon size\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-text-fit\":{type:\"enum\",values:{none:{},width:{},height:{},both:{}},default:\"none\",requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-text-fit-padding\":{type:\"array\",value:\"number\",length:4,default:[0,0,0,0],units:\"pixels\",requires:[\"icon-image\",\"text-field\",{\"icon-text-fit\":[\"both\",\"width\",\"height\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-image\":{type:\"resolvedImage\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-keep-upright\":{type:\"boolean\",default:!1,requires:[\"icon-image\",{\"icon-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-offset\":{type:\"array\",value:\"number\",length:2,default:[0,0],requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-field\":{type:\"formatted\",default:\"\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-font\":{type:\"array\",value:\"string\",default:[\"Open Sans Regular\",\"Arial Unicode MS Regular\"],requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-size\":{type:\"number\",default:16,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-width\":{type:\"number\",default:10,minimum:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-line-height\":{type:\"number\",default:1.2,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-letter-spacing\":{type:\"number\",default:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-justify\":{type:\"enum\",values:{auto:{},left:{},center:{},right:{}},default:\"center\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-radial-offset\":{type:\"number\",units:\"ems\",default:0,requires:[\"text-field\"],\"property-type\":\"data-driven\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]}},\"text-variable-anchor\":{type:\"array\",value:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"text-field\",{\"!\":\"text-variable-anchor\"}],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-angle\":{type:\"number\",default:45,units:\"degrees\",requires:[\"text-field\",{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-writing-mode\":{type:\"array\",value:\"enum\",values:{horizontal:{},vertical:{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-keep-upright\":{type:\"boolean\",default:!0,requires:[\"text-field\",{\"text-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-transform\":{type:\"enum\",values:{none:{},uppercase:{},lowercase:{}},default:\"none\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-offset\":{type:\"array\",value:\"number\",units:\"ems\",length:2,default:[0,0],requires:[\"text-field\",{\"!\":\"text-radial-offset\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-optional\":{type:\"boolean\",default:!1,requires:[\"text-field\",\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_raster:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_hillshade:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},filter:{type:\"array\",value:\"*\"},filter_operator:{type:\"enum\",values:{\"==\":{},\"!=\":{},\">\":{},\">=\":{},\"<\":{},\"<=\":{},in:{},\"!in\":{},all:{},any:{},none:{},has:{},\"!has\":{},within:{}}},geometry_type:{type:\"enum\",values:{Point:{},LineString:{},Polygon:{}}},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}},function_stop:{type:\"array\",minimum:0,maximum:24,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\"},in:{group:\"Lookup\"},\"index-of\":{group:\"Lookup\"},slice:{group:\"Lookup\"},case:{group:\"Decision\"},match:{group:\"Decision\"},coalesce:{group:\"Decision\"},step:{group:\"Ramps, scales, curves\"},interpolate:{group:\"Ramps, scales, curves\"},\"interpolate-hcl\":{group:\"Ramps, scales, curves\"},\"interpolate-lab\":{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\"},format:{group:\"Types\"},image:{group:\"Types\"},\"number-format\":{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\"},\"feature-state\":{group:\"Feature data\"},\"geometry-type\":{group:\"Feature data\"},id:{group:\"Feature data\"},zoom:{group:\"Zoom\"},\"heatmap-density\":{group:\"Heatmap\"},\"line-progress\":{group:\"Feature data\"},accumulated:{group:\"Feature data\"},\"+\":{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\"},distance:{group:\"Math\"},\"==\":{group:\"Decision\"},\"!=\":{group:\"Decision\"},\">\":{group:\"Decision\"},\"<\":{group:\"Decision\"},\">=\":{group:\"Decision\"},\"<=\":{group:\"Decision\"},all:{group:\"Decision\"},any:{group:\"Decision\"},\"!\":{group:\"Decision\"},within:{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:{}},\"property-type\":\"data-constant\",transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]}},position:{type:\"array\",default:[1.15,210,30],length:3,value:\"number\",\"property-type\":\"data-constant\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]}},color:{type:\"color\",\"property-type\":\"data-constant\",default:\"#ffffff\",expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},intensity:{type:\"number\",\"property-type\":\"data-constant\",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:[\"zoom\"]},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\",default:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-outline-color\":{type:\"color\",transition:!0,requires:[{\"!\":\"fill-pattern\"},{\"fill-antialias\":!0}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"}},\"paint_fill-extrusion\":{\"fill-extrusion-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-extrusion-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-extrusion-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"fill-extrusion-height\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-base\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,requires:[\"fill-extrusion-height\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-vertical-gradient\":{type:\"boolean\",default:!0,transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_line:{\"line-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"line-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-width\":{type:\"number\",default:1,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-gap-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-offset\":{type:\"number\",default:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-dasharray\":{type:\"array\",value:\"number\",minimum:0,transition:!0,units:\"line widths\",requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"line-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"line-gradient\":{type:\"color\",transition:!1,requires:[{\"!\":\"line-dasharray\"},{\"!\":\"line-pattern\"},{source:\"geojson\",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:[\"line-progress\"]},\"property-type\":\"color-ramp\"}},paint_circle:{\"circle-radius\":{type:\"number\",default:5,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-blur\":{type:\"number\",default:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"circle-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-scale\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-stroke-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"}},paint_heatmap:{\"heatmap-radius\":{type:\"number\",default:30,minimum:1,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-weight\":{type:\"number\",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-intensity\":{type:\"number\",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"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\"],transition:!1,expression:{interpolated:!0,parameters:[\"heatmap-density\"]},\"property-type\":\"color-ramp\"},\"heatmap-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_symbol:{\"icon-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"icon-image\",\"icon-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-color\":{type:\"color\",default:\"#000000\",transition:!0,overridable:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"text-field\",\"text-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_raster:{\"raster-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-hue-rotate\":{type:\"number\",default:0,period:360,transition:!0,units:\"degrees\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-min\":{type:\"number\",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-max\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-saturation\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-contrast\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-resampling\":{type:\"enum\",values:{linear:{},nearest:{}},default:\"linear\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-fade-duration\":{type:\"number\",default:300,minimum:0,transition:!1,units:\"milliseconds\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_hillshade:{\"hillshade-illumination-direction\":{type:\"number\",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-illumination-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-exaggeration\":{type:\"number\",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-shadow-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-highlight-color\":{type:\"color\",default:\"#FFFFFF\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-accent-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_background:{\"background-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"background-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"background-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"background-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},transition:{duration:{type:\"number\",default:300,minimum:0,units:\"milliseconds\"},delay:{type:\"number\",default:0,minimum:0,units:\"milliseconds\"}},\"property-type\":{\"data-driven\":{type:\"property-type\"},\"cross-faded\":{type:\"property-type\"},\"cross-faded-data-driven\":{type:\"property-type\"},\"color-ramp\":{type:\"property-type\"},\"data-constant\":{type:\"property-type\"},constant:{type:\"property-type\"}},promoteId:{\"*\":{type:\"string\"}}},Ct=function(t,e,r,n){this.message=(t?t+\": \":\"\")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function Pt(t){var e=t.key,r=t.value;return r?[new Ct(e,r,\"constants have been deprecated as of v8\")]:[]}function It(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n\":\"value\"===t.itemType.kind?\"array\":\"array<\"+e+\">\"}return t.kind}var Zt=[Ft,Bt,Nt,jt,Ut,Gt,Vt,Wt(Ht),Yt];function Jt(t,e){if(\"error\"===e.kind)return null;if(\"array\"===t.kind){if(\"array\"===e.kind&&(0===e.N&&\"value\"===e.itemType.kind||!Jt(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=Zt;r255?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]),m=g<=.5?g*(d+1):g+d-g*d,v=2*g-m;return[n(255*s(v,m,p+1/3)),n(255*s(v,m,p)),n(255*s(v,m,p-1/3)),h];default:return null}}return null}}catch(t){}})).parseCSSColor,te=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};te.parse=function(t){if(t){if(t instanceof te)return t;if(\"string\"==typeof t){var e=$t(t);if(e)return new te(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},te.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+\")\"},te.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]},te.black=new te(0,0,0,1),te.white=new te(1,1,1,1),te.transparent=new te(0,0,0,0),te.red=new te(1,0,0,1);var ee=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\"})};ee.prototype.compare=function(t,e){return this.collator.compare(t,e)},ee.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var re=function(t,e,r,n,i){this.text=t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i},ne=function(t){this.sections=t};ne.fromString=function(t){return new ne([new re(t,null,null,null,null)])},ne.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},ne.factory=function(t){return t instanceof ne?t:ne.fromString(t)},ne.prototype.toString=function(){return 0===this.sections.length?\"\":this.sections.map((function(t){return t.text})).join(\"\")},ne.prototype.serialize=function(){for(var t=[\"format\"],e=0,r=this.sections;e=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 oe(t){if(null===t)return!0;if(\"string\"==typeof t)return!0;if(\"boolean\"==typeof t)return!0;if(\"number\"==typeof t)return!0;if(t instanceof te)return!0;if(t instanceof ee)return!0;if(t instanceof ne)return!0;if(t instanceof ie)return!0;if(Array.isArray(t)){for(var e=0,r=t;e2){var s=t[1];if(\"string\"!=typeof s||!(s in fe)||\"object\"===s)return e.error('The item type argument of \"array\" must be one of string, number, boolean',1);a=fe[s],n++}else a=Ht;if(t.length>3){if(null!==t[2]&&(\"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);o=t[2],n++}r=Wt(a,o)}else r=fe[i];for(var l=[];n1)&&e.push(n)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var pe=function(t){this.type=Gt,this.sections=t};pe.parse=function(t,e){if(t.length<2)return e.error(\"Expected at least one argument.\");var r=t[1];if(!Array.isArray(r)&&\"object\"==typeof r)return e.error(\"First argument must be an image or text section.\");for(var n=[],i=!1,a=1;a<=t.length-1;++a){var o=t[a];if(i&&\"object\"==typeof o&&!Array.isArray(o)){i=!1;var s=null;if(o[\"font-scale\"]&&!(s=e.parse(o[\"font-scale\"],1,Bt)))return null;var l=null;if(o[\"text-font\"]&&!(l=e.parse(o[\"text-font\"],1,Wt(Nt))))return null;var c=null;if(o[\"text-color\"]&&!(c=e.parse(o[\"text-color\"],1,Ut)))return null;var u=n[n.length-1];u.scale=s,u.font=l,u.textColor=c}else{var f=e.parse(t[a],1,Ht);if(!f)return null;var h=f.type.kind;if(\"string\"!==h&&\"value\"!==h&&\"null\"!==h&&\"resolvedImage\"!==h)return e.error(\"Formatted text type must be 'string', 'value', 'image' or 'null'.\");i=!0,n.push({content:f,scale:null,font:null,textColor:null})}}return new pe(n)},pe.prototype.evaluate=function(t){return new ne(this.sections.map((function(e){var r=e.content.evaluate(t);return se(r)===Yt?new re(\"\",r,null,null,null):new re(le(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(\",\"):null,e.textColor?e.textColor.evaluate(t):null)})))},pe.prototype.eachChild=function(t){for(var e=0,r=this.sections;e-1),r},de.prototype.eachChild=function(t){t(this.input)},de.prototype.outputDefined=function(){return!1},de.prototype.serialize=function(){return[\"image\",this.input.serialize()]};var ge={\"to-boolean\":jt,\"to-color\":Ut,\"to-number\":Bt,\"to-string\":Nt},me=function(t,e){this.type=t,this.args=e};me.parse=function(t,e){if(t.length<2)return e.error(\"Expected at least one argument.\");var r=t[0];if((\"to-boolean\"===r||\"to-string\"===r)&&2!==t.length)return e.error(\"Expected one argument.\");for(var n=ge[r],i=[],a=1;a4?\"Invalid rbga value \"+JSON.stringify(e)+\": expected an array containing either three or four numeric values.\":ae(e[0],e[1],e[2],e[3])))return new te(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ue(r||\"Could not parse color from value '\"+(\"string\"==typeof e?e:String(JSON.stringify(e)))+\"'\")}if(\"number\"===this.type.kind){for(var o=null,s=0,l=this.args;s=e[2])&&(!(t[1]<=e[1])&&!(t[3]>=e[3])))}function Te(t,e){var r,n=(180+t[0])/360,i=(r=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360),a=Math.pow(2,e.z);return[Math.round(n*a*8192),Math.round(i*a*8192)]}function ke(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function Ae(t,e){for(var r,n,i,a,o,s,l,c=!1,u=0,f=e.length;u0&&f<0||u<0&&f>0}function Ee(t,e,r){for(var n=0,i=r;nr[2]){var i=.5*n,a=t[0]-r[0]>i?-n:r[0]-t[0]>i?n:0;0===a&&(a=t[0]-r[2]>i?-n:r[2]-t[0]>i?n:0),t[0]+=a}_e(e,t)}function ze(t,e,r,n){for(var i=8192*Math.pow(2,n.z),a=[8192*n.x,8192*n.y],o=[],s=0,l=t;s=0)return!1;var r=!0;return t.eachChild((function(t){r&&!Ne(t,e)&&(r=!1)})),r}Re.parse=function(t,e){if(2!==t.length)return e.error(\"'within' expression requires exactly one argument, but found \"+(t.length-1)+\" instead.\");if(oe(t[1])){var r=t[1];if(\"FeatureCollection\"===r.type)for(var n=0;ne))throw new ue(\"Input is not a number.\");o=s-1}return 0}Ue.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)},Ue.prototype._parse=function(t,e){function r(t,e,r){return\"assert\"===r?new he(e,[t]):\"coerce\"===r?new me(e,[t]):t}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 n=t[0];if(\"string\"!=typeof n)return this.error(\"Expression name must be a string, but found \"+typeof n+' instead. If you wanted a literal array, use [\"literal\", [...]].',0),null;var i=this.registry[n];if(i){var a=i.parse(t,this);if(!a)return null;if(this.expectedType){var o=this.expectedType,s=a.type;if(\"string\"!==o.kind&&\"number\"!==o.kind&&\"boolean\"!==o.kind&&\"object\"!==o.kind&&\"array\"!==o.kind||\"value\"!==s.kind)if(\"color\"!==o.kind&&\"formatted\"!==o.kind&&\"resolvedImage\"!==o.kind||\"value\"!==s.kind&&\"string\"!==s.kind){if(this.checkSubtype(o,s))return null}else a=r(a,o,e.typeAnnotation||\"coerce\");else a=r(a,o,e.typeAnnotation||\"assert\")}if(!(a instanceof ce)&&\"resolvedImage\"!==a.type.kind&&function t(e){if(e instanceof je)return t(e.boundExpression);if(e instanceof xe&&\"error\"===e.name)return!1;if(e instanceof be)return!1;if(e instanceof Re)return!1;var r=e instanceof me||e instanceof he,n=!0;if(e.eachChild((function(e){n=r?n&&t(e):n&&e instanceof ce})),!n)return!1;return Fe(e)&&Ne(e,[\"zoom\",\"heatmap-density\",\"line-progress\",\"accumulated\",\"is-supported-script\"])}(a)){var l=new ye;try{a=new ce(a.type,a.evaluate(l))}catch(t){return this.error(t.message),null}}return a}return this.error('Unknown expression \"'+n+'\". 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.\")},Ue.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 Ue(this.registry,n,e||null,i,this.errors)},Ue.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 Dt(n,t))},Ue.prototype.checkSubtype=function(t,e){var r=Jt(t,e);return r&&this.error(r),r};var He=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n=o)return e.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.',l);var u=e.parse(s,c,i);if(!u)return null;i=i||u.type,n.push([o,u])}return new He(i,r,n)},He.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[Ve(e,n)].evaluate(t)},He.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Ge=Object.freeze({__proto__:null,number:qe,color:function(t,e,r){return new te(qe(t.r,e.r,r),qe(t.g,e.g,r),qe(t.b,e.b,r),qe(t.a,e.a,r))},array:function(t,e,r){return t.map((function(t,n){return qe(t,e[n],r)}))}}),Ye=6/29,We=3*Ye*Ye,Xe=Math.PI/180,Ze=180/Math.PI;function Je(t){return t>.008856451679035631?Math.pow(t,1/3):t/We+4/29}function Ke(t){return t>Ye?t*t*t:We*(t-4/29)}function Qe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function $e(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function tr(t){var e=$e(t.r),r=$e(t.g),n=$e(t.b),i=Je((.4124564*e+.3575761*r+.1804375*n)/.95047),a=Je((.2126729*e+.7151522*r+.072175*n)/1);return{l:116*a-16,a:500*(i-a),b:200*(a-Je((.0193339*e+.119192*r+.9503041*n)/1.08883)),alpha:t.a}}function er(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=1*Ke(e),r=.95047*Ke(r),n=1.08883*Ke(n),new te(Qe(3.2404542*r-1.5371385*e-.4985314*n),Qe(-.969266*r+1.8760108*e+.041556*n),Qe(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function rr(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var nr={forward:tr,reverse:er,interpolate:function(t,e,r){return{l:qe(t.l,e.l,r),a:qe(t.a,e.a,r),b:qe(t.b,e.b,r),alpha:qe(t.alpha,e.alpha,r)}}},ir={forward:function(t){var e=tr(t),r=e.l,n=e.a,i=e.b,a=Math.atan2(i,n)*Ze;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*Xe,r=t.c;return er({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:rr(t.h,e.h,r),c:qe(t.c,e.c,r),l:qe(t.l,e.l,r),alpha:qe(t.alpha,e.alpha,r)}}},ar=Object.freeze({__proto__:null,lab:nr,hcl:ir}),or=function(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var a=0,o=i;a1})))return e.error(\"Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.\",1);n={name:\"cubic-bezier\",controlPoints:s}}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(!(i=e.parse(i,2,Bt)))return null;var l=[],c=null;\"interpolate-hcl\"===r||\"interpolate-lab\"===r?c=Ut:e.expectedType&&\"value\"!==e.expectedType.kind&&(c=e.expectedType);for(var u=0;u=f)return e.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.',p);var g=e.parse(h,d,c);if(!g)return null;c=c||g.type,l.push([f,g])}return\"number\"===c.kind||\"color\"===c.kind||\"array\"===c.kind&&\"number\"===c.itemType.kind&&\"number\"==typeof c.N?new or(c,r,n,i,l):e.error(\"Type \"+Xt(c)+\" is not interpolatable.\")},or.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=Ve(e,n),o=e[a],s=e[a+1],l=or.interpolationFactor(this.interpolation,n,o,s),c=r[a].evaluate(t),u=r[a+1].evaluate(t);return\"interpolate\"===this.operator?Ge[this.type.kind.toLowerCase()](c,u,l):\"interpolate-hcl\"===this.operator?ir.reverse(ir.interpolate(ir.forward(c),ir.forward(u),l)):nr.reverse(nr.interpolate(nr.forward(c),nr.forward(u),l))},or.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e=r.length)throw new ue(\"Array index out of bounds: \"+e+\" > \"+(r.length-1)+\".\");if(e!==Math.floor(e))throw new ue(\"Array index must be an integer, but found \"+e+\" instead.\");return r[e]},ur.prototype.eachChild=function(t){t(this.index),t(this.input)},ur.prototype.outputDefined=function(){return!1},ur.prototype.serialize=function(){return[\"at\",this.index.serialize(),this.input.serialize()]};var fr=function(t,e){this.type=jt,this.needle=t,this.haystack=e};fr.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,Ht),n=e.parse(t[2],2,Ht);return r&&n?Kt(r.type,[jt,Nt,Bt,Ft,Ht])?new fr(r,n):e.error(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(r.type)+\" instead\"):null},fr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!r)return!1;if(!Qt(e,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ue(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(se(e))+\" instead.\");if(!Qt(r,[\"string\",\"array\"]))throw new ue(\"Expected second argument to be of type array or string, but found \"+Xt(se(r))+\" instead.\");return r.indexOf(e)>=0},fr.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},fr.prototype.outputDefined=function(){return!0},fr.prototype.serialize=function(){return[\"in\",this.needle.serialize(),this.haystack.serialize()]};var hr=function(t,e,r){this.type=Bt,this.needle=t,this.haystack=e,this.fromIndex=r};hr.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error(\"Expected 3 or 4 arguments, but found \"+(t.length-1)+\" instead.\");var r=e.parse(t[1],1,Ht),n=e.parse(t[2],2,Ht);if(!r||!n)return null;if(!Kt(r.type,[jt,Nt,Bt,Ft,Ht]))return e.error(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(r.type)+\" instead\");if(4===t.length){var i=e.parse(t[3],3,Bt);return i?new hr(r,n,i):null}return new hr(r,n)},hr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!Qt(e,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ue(\"Expected first argument to be of type boolean, string, number or null, but found \"+Xt(se(e))+\" instead.\");if(!Qt(r,[\"string\",\"array\"]))throw new ue(\"Expected second argument to be of type array or string, but found \"+Xt(se(r))+\" instead.\");if(this.fromIndex){var n=this.fromIndex.evaluate(t);return r.indexOf(e,n)}return r.indexOf(e)},hr.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},hr.prototype.outputDefined=function(){return!1},hr.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return[\"index-of\",this.needle.serialize(),this.haystack.serialize(),t]}return[\"index-of\",this.needle.serialize(),this.haystack.serialize()]};var pr=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};pr.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;oNumber.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,se(h)))return null}else r=se(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,Ht);if(!d)return null;var g=e.parse(t[t.length-1],t.length-1,n);return g?\"value\"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new pr(r,n,d,i,a,g):null},pr.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(se(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},pr.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},pr.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},pr.prototype.serialize=function(){for(var t=this,e=[\"match\",this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();i=5)return e.error(\"Expected 3 or 4 arguments, but found \"+(t.length-1)+\" instead.\");var r=e.parse(t[1],1,Ht),n=e.parse(t[2],2,Bt);if(!r||!n)return null;if(!Kt(r.type,[Wt(Ht),Nt,Ht]))return e.error(\"Expected first argument to be of type array or string, but found \"+Xt(r.type)+\" instead\");if(4===t.length){var i=e.parse(t[3],3,Bt);return i?new gr(r.type,r,n,i):null}return new gr(r.type,r,n)},gr.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!Qt(e,[\"string\",\"array\"]))throw new ue(\"Expected first argument to be of type array or string, but found \"+Xt(se(e))+\" instead.\");if(this.endIndex){var n=this.endIndex.evaluate(t);return e.slice(r,n)}return e.slice(r)},gr.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},gr.prototype.outputDefined=function(){return!1},gr.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return[\"slice\",this.input.serialize(),this.beginIndex.serialize(),t]}return[\"slice\",this.input.serialize(),this.beginIndex.serialize()]};var xr=yr(\"==\",(function(t,e,r){return e===r}),vr),br=yr(\"!=\",(function(t,e,r){return e!==r}),(function(t,e,r,n){return!vr(0,e,r,n)})),_r=yr(\"<\",(function(t,e,r){return e\",(function(t,e,r){return e>r}),(function(t,e,r,n){return n.compare(e,r)>0})),Tr=yr(\"<=\",(function(t,e,r){return e<=r}),(function(t,e,r,n){return n.compare(e,r)<=0})),kr=yr(\">=\",(function(t,e,r){return e>=r}),(function(t,e,r,n){return n.compare(e,r)>=0})),Ar=function(t,e,r,n,i){this.type=Nt,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};Ar.parse=function(t,e){if(3!==t.length)return e.error(\"Expected two arguments.\");var r=e.parse(t[1],1,Bt);if(!r)return null;var n=t[2];if(\"object\"!=typeof n||Array.isArray(n))return e.error(\"NumberFormat options argument must be an object.\");var i=null;if(n.locale&&!(i=e.parse(n.locale,1,Nt)))return null;var a=null;if(n.currency&&!(a=e.parse(n.currency,1,Nt)))return null;var o=null;if(n[\"min-fraction-digits\"]&&!(o=e.parse(n[\"min-fraction-digits\"],1,Bt)))return null;var s=null;return n[\"max-fraction-digits\"]&&!(s=e.parse(n[\"max-fraction-digits\"],1,Bt))?null:new Ar(r,i,a,o,s)},Ar.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?\"currency\":\"decimal\",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},Ar.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},Ar.prototype.outputDefined=function(){return!1},Ar.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t[\"min-fraction-digits\"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t[\"max-fraction-digits\"]=this.maxFractionDigits.serialize()),[\"number-format\",this.number.serialize(),t]};var Mr=function(t){this.type=Bt,this.input=t};Mr.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 \"+Xt(r.type)+\" instead.\"):new Mr(r):null},Mr.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 ue(\"Expected value to be of type string or array, but found \"+Xt(se(e))+\" instead.\")},Mr.prototype.eachChild=function(t){t(this.input)},Mr.prototype.outputDefined=function(){return!1},Mr.prototype.serialize=function(){var t=[\"length\"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Sr={\"==\":xr,\"!=\":br,\">\":wr,\"<\":_r,\">=\":kr,\"<=\":Tr,array:he,at:ur,boolean:he,case:dr,coalesce:lr,collator:be,format:pe,image:de,in:fr,\"index-of\":hr,interpolate:or,\"interpolate-hcl\":or,\"interpolate-lab\":or,length:Mr,let:cr,literal:ce,match:pr,number:he,\"number-format\":Ar,object:he,slice:gr,step:He,string:he,\"to-boolean\":me,\"to-color\":me,\"to-number\":me,\"to-string\":me,var:je,within:Re};function Er(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=ae(r,n,i,o);if(s)throw new ue(s);return new te(r/255*o,n/255*o,i/255*o,o)}function Lr(t,e){return t in e}function Cr(t,e){var r=e[t];return void 0===r?null:r}function Pr(t){return{type:t}}function Ir(t){return{result:\"success\",value:t}}function Or(t){return{result:\"error\",value:t}}function zr(t){return\"data-driven\"===t[\"property-type\"]||\"cross-faded-data-driven\"===t[\"property-type\"]}function Dr(t){return!!t.expression&&t.expression.parameters.indexOf(\"zoom\")>-1}function Rr(t){return!!t.expression&&t.expression.interpolated}function Fr(t){return t instanceof Number?\"number\":t instanceof String?\"string\":t instanceof Boolean?\"boolean\":Array.isArray(t)?\"array\":null===t?\"null\":typeof t}function Br(t){return\"object\"==typeof t&&null!==t&&!Array.isArray(t)}function Nr(t){return t}function jr(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function Ur(t,e,r,n,i){return jr(typeof r===i?n[r]:void 0,t.default,e.default)}function Vr(t,e,r){if(\"number\"!==Fr(r))return jr(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=Ve(t.stops.map((function(t){return t[0]})),r);return t.stops[i][1]}function Hr(t,e,r){var n=void 0!==t.base?t.base:1;if(\"number\"!==Fr(r))return jr(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=Ve(t.stops.map((function(t){return t[0]})),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=Ge[e.type]||Nr;if(t.colorSpace&&\"rgb\"!==t.colorSpace){var u=ar[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 qr(t,e,r){return\"color\"===e.type?r=te.parse(r):\"formatted\"===e.type?r=ne.fromString(r.toString()):\"resolvedImage\"===e.type?r=ie.fromString(r.toString()):Fr(r)===e.type||\"enum\"===e.type&&e.values[r]||(r=void 0),jr(r,t.default,e.default)}xe.register(Sr,{error:[{kind:\"error\"},[Nt],function(t,e){var r=e[0];throw new ue(r.evaluate(t))}],typeof:[Nt,[Ht],function(t,e){return Xt(se(e[0].evaluate(t)))}],\"to-rgba\":[Wt(Bt,4),[Ut],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Ut,[Bt,Bt,Bt],Er],rgba:[Ut,[Bt,Bt,Bt,Bt],Er],has:{type:jt,overloads:[[[Nt],function(t,e){return Lr(e[0].evaluate(t),t.properties())}],[[Nt,Vt],function(t,e){var r=e[0],n=e[1];return Lr(r.evaluate(t),n.evaluate(t))}]]},get:{type:Ht,overloads:[[[Nt],function(t,e){return Cr(e[0].evaluate(t),t.properties())}],[[Nt,Vt],function(t,e){var r=e[0],n=e[1];return Cr(r.evaluate(t),n.evaluate(t))}]]},\"feature-state\":[Ht,[Nt],function(t,e){return Cr(e[0].evaluate(t),t.featureState||{})}],properties:[Vt,[],function(t){return t.properties()}],\"geometry-type\":[Nt,[],function(t){return t.geometryType()}],id:[Ht,[],function(t){return t.id()}],zoom:[Bt,[],function(t){return t.globals.zoom}],\"heatmap-density\":[Bt,[],function(t){return t.globals.heatmapDensity||0}],\"line-progress\":[Bt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Ht,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],\"+\":[Bt,Pr(Bt),function(t,e){for(var r=0,n=0,i=e;n\":[jt,[Nt,Ht],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->\":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],\"filter-<=\":[jt,[Nt,Ht],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-<=\":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],\"filter->=\":[jt,[Nt,Ht],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->=\":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],\"filter-has\":[jt,[Ht],function(t,e){return e[0].value in t.properties()}],\"filter-has-id\":[jt,[],function(t){return null!==t.id()&&void 0!==t.id()}],\"filter-type-in\":[jt,[Wt(Nt)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],\"filter-id-in\":[jt,[Wt(Ht)],function(t,e){return e[0].value.indexOf(t.id())>=0}],\"filter-in-small\":[jt,[Nt,Wt(Ht)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],\"filter-in-large\":[jt,[Nt,Wt(Ht)],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)}],all:{type:jt,overloads:[[[jt,jt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[Pr(jt),function(t,e){for(var r=0,n=e;r0&&\"string\"==typeof t[0]&&t[0]in Sr}function Wr(t,e){var r=new Ue(Sr,[],e?function(t){var e={color:Ut,string:Nt,number:Bt,enum:Nt,boolean:jt,formatted:Gt,resolvedImage:Yt};if(\"array\"===t.type)return Wt(e[t.value]||Ht,t.length);return e[t.type]}(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&\"string\"===e.type?{typeAnnotation:\"coerce\"}:void 0);return n?Ir(new Gr(n,e)):Or(r.errors)}Gr.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)},Gr.prototype.evaluate=function(t,e,r,n,i,a){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||\"number\"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new ue(\"Expected value to be one of \"+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(\", \")+\", but found \"+JSON.stringify(o)+\" instead.\");return o}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,\"undefined\"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Xr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent=\"constant\"!==t&&!Be(e.expression)};Xr.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,a)},Xr.prototype.evaluate=function(t,e,r,n,i,a){return this._styleExpression.evaluate(t,e,r,n,i,a)};var Zr=function(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent=\"camera\"!==t&&!Be(e.expression),this.interpolationType=n};function Jr(t,e){if(\"error\"===(t=Wr(t,e)).result)return t;var r=t.value.expression,n=Fe(r);if(!n&&!zr(e))return Or([new Dt(\"\",\"data expressions not supported\")]);var i=Ne(r,[\"zoom\"]);if(!i&&!Dr(e))return Or([new Dt(\"\",\"zoom expressions not supported\")]);var a=function t(e){var r=null;if(e instanceof cr)r=t(e.result);else if(e instanceof lr)for(var n=0,i=e.args;nn.maximum?[new Ct(e,r,r+\" is greater than the maximum value \"+n.maximum)]:[]}function en(t){var e,r,n,i=t.valueSpec,a=Ot(t.value.type),o={},s=\"categorical\"!==a&&void 0===t.value.property,l=!s,c=\"array\"===Fr(t.value.stops)&&\"array\"===Fr(t.value.stops[0])&&\"object\"===Fr(t.value.stops[0][0]),u=Qr({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 Ct(t.key,t.value,'identity function may not have a \"stops\" property')];var e=[],r=t.value;e=e.concat($r({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:f})),\"array\"===Fr(r)&&0===r.length&&e.push(new Ct(t.key,r,\"array must have at least one stop\"));return e},default:function(t){return kn({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return\"identity\"===a&&s&&u.push(new Ct(t.key,t.value,'missing required property \"property\"')),\"identity\"===a||t.value.stops||u.push(new Ct(t.key,t.value,'missing required property \"stops\"')),\"exponential\"===a&&t.valueSpec.expression&&!Rr(t.valueSpec)&&u.push(new Ct(t.key,t.value,\"exponential functions not supported\")),t.styleSpec.$version>=8&&(l&&!zr(t.valueSpec)?u.push(new Ct(t.key,t.value,\"property functions not supported\")):s&&!Dr(t.valueSpec)&&u.push(new Ct(t.key,t.value,\"zoom functions not supported\"))),\"categorical\"!==a&&!c||void 0!==t.value.property||u.push(new Ct(t.key,t.value,'\"property\" property is required')),u;function f(t){var e=[],a=t.value,s=t.key;if(\"array\"!==Fr(a))return[new Ct(s,a,\"array expected, \"+Fr(a)+\" found\")];if(2!==a.length)return[new Ct(s,a,\"array length 2 expected, length \"+a.length+\" found\")];if(c){if(\"object\"!==Fr(a[0]))return[new Ct(s,a,\"object expected, \"+Fr(a[0])+\" found\")];if(void 0===a[0].zoom)return[new Ct(s,a,\"object stop key must have zoom\")];if(void 0===a[0].value)return[new Ct(s,a,\"object stop key must have value\")];if(n&&n>Ot(a[0].zoom))return[new Ct(s,a[0].zoom,\"stop zoom values must appear in ascending order\")];Ot(a[0].zoom)!==n&&(n=Ot(a[0].zoom),r=void 0,o={}),e=e.concat(Qr({key:s+\"[0]\",value:a[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:tn,value:h}}))}else e=e.concat(h({key:s+\"[0]\",value:a[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},a));return Yr(zt(a[1]))?e.concat([new Ct(s+\"[1]\",a[1],\"expressions are not allowed in function stops.\")]):e.concat(kn({key:s+\"[1]\",value:a[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,n){var s=Fr(t.value),l=Ot(t.value),c=null!==t.value?t.value:n;if(e){if(s!==e)return[new Ct(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 Ct(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 zr(i)&&void 0===a&&(u+='\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.'),[new Ct(t.key,c,u)]}return\"categorical\"!==a||\"number\"!==s||isFinite(l)&&Math.floor(l)===l?\"categorical\"!==a&&\"number\"===s&&void 0!==r&&l=2&&\"$id\"!==t[1]&&\"$type\"!==t[1];case\"in\":return t.length>=3&&(\"string\"!=typeof t[1]||Array.isArray(t[2]));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);ee?1:0}function cn(t){if(!t)return!0;var e,r=t[0];return t.length<=1?\"any\"!==r:\"==\"===r?un(t[1],t[2],\"==\"):\"!=\"===r?pn(un(t[1],t[2],\"==\")):\"<\"===r||\">\"===r||\"<=\"===r||\">=\"===r?un(t[1],t[2],r):\"any\"===r?(e=t.slice(1),[\"any\"].concat(e.map(cn))):\"all\"===r?[\"all\"].concat(t.slice(1).map(cn)):\"none\"===r?[\"all\"].concat(t.slice(1).map(cn).map(pn)):\"in\"===r?fn(t[1],t.slice(2)):\"!in\"===r?pn(fn(t[1],t.slice(2))):\"has\"===r?hn(t[1]):\"!has\"===r?pn(hn(t[1])):\"within\"!==r||t}function un(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 fn(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(ln)]]:[\"filter-in-small\",t,[\"literal\",e]]}}function hn(t){switch(t){case\"$type\":return!0;case\"$id\":return[\"filter-has-id\"];default:return[\"filter-has\",t]}}function pn(t){return[\"!\",t]}function dn(t){return an(zt(t.value))?rn(It({},t,{expressionContext:\"filter\",valueSpec:{value:\"boolean\"}})):function t(e){var r=e.value,n=e.key;if(\"array\"!==Fr(r))return[new Ct(n,r,\"array expected, \"+Fr(r)+\" found\")];var i,a=e.styleSpec,o=[];if(r.length<1)return[new Ct(n,r,\"filter array must have at least 1 element\")];switch(o=o.concat(nn({key:n+\"[0]\",value:r[0],valueSpec:a.filter_operator,style:e.style,styleSpec:e.styleSpec})),Ot(r[0])){case\"<\":case\"<=\":case\">\":case\">=\":r.length>=2&&\"$type\"===Ot(r[1])&&o.push(new Ct(n,r,'\"$type\" cannot be use with operator \"'+r[0]+'\"'));case\"==\":case\"!=\":3!==r.length&&o.push(new Ct(n,r,'filter array for operator \"'+r[0]+'\" must have 3 elements'));case\"in\":case\"!in\":r.length>=2&&\"string\"!==(i=Fr(r[1]))&&o.push(new Ct(n+\"[1]\",r[1],\"string expected, \"+i+\" found\"));for(var s=2;s=u[p+0]&&n>=u[p+1])?(o[h]=!0,a.push(c[h])):o[h]=!1}}},Dn.prototype._forEachCell=function(t,e,r,n,i,a,o,s){for(var l=this._convertToCellCoord(t),c=this._convertToCellCoord(e),u=this._convertToCellCoord(r),f=this._convertToCellCoord(n),h=l;h<=u;h++)for(var p=c;p<=f;p++){var d=this.d*p+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(p),this._convertFromCellCoord(h+1),this._convertFromCellCoord(p+1)))&&i.call(this,t,e,r,n,d,a,o,s))return}},Dn.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},Dn.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Dn.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+this.cells.length+1+1,r=0,n=0;n=0)){var f=t[u];c[u]=Bn[l].shallow.indexOf(u)>=0?f:Hn(f,e)}t instanceof Error&&(c.message=t.message)}if(c.$name)throw new Error(\"$name property is reserved for worker serialization logic.\");return\"Object\"!==l&&(c.$name=l),c}throw new Error(\"can't serialize object of type \"+typeof t)}function qn(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||Un(t)||Vn(t)||ArrayBuffer.isView(t)||t instanceof Rn)return t;if(Array.isArray(t))return t.map(qn);if(\"object\"==typeof t){var e=t.$name||\"Object\",r=Bn[e].klass;if(!r)throw new Error(\"can't deserialize unregistered class \"+e);if(r.deserialize)return r.deserialize(t);for(var n=Object.create(r.prototype),i=0,a=Object.keys(t);i=0?s:qn(s)}}return n}throw new Error(\"can't deserialize object of type \"+typeof t)}var Gn=function(){this.first=!0};Gn.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=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 Wn(t){for(var e=0,r=t;e=65097&&t<=65103)||(!!Yn[\"CJK Compatibility Ideographs\"](t)||(!!Yn[\"CJK Compatibility\"](t)||(!!Yn[\"CJK Radicals Supplement\"](t)||(!!Yn[\"CJK Strokes\"](t)||(!(!Yn[\"CJK Symbols and Punctuation\"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||(!!Yn[\"CJK Unified Ideographs Extension A\"](t)||(!!Yn[\"CJK Unified Ideographs\"](t)||(!!Yn[\"Enclosed CJK Letters and Months\"](t)||(!!Yn[\"Hangul Compatibility Jamo\"](t)||(!!Yn[\"Hangul Jamo Extended-A\"](t)||(!!Yn[\"Hangul Jamo Extended-B\"](t)||(!!Yn[\"Hangul Jamo\"](t)||(!!Yn[\"Hangul Syllables\"](t)||(!!Yn.Hiragana(t)||(!!Yn[\"Ideographic Description Characters\"](t)||(!!Yn.Kanbun(t)||(!!Yn[\"Kangxi Radicals\"](t)||(!!Yn[\"Katakana Phonetic Extensions\"](t)||(!(!Yn.Katakana(t)||12540===t)||(!(!Yn[\"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)||(!(!Yn[\"Small Form Variants\"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||(!!Yn[\"Unified Canadian Aboriginal Syllabics\"](t)||(!!Yn[\"Unified Canadian Aboriginal Syllabics Extended\"](t)||(!!Yn[\"Vertical Forms\"](t)||(!!Yn[\"Yijing Hexagram Symbols\"](t)||(!!Yn[\"Yi Syllables\"](t)||!!Yn[\"Yi Radicals\"](t))))))))))))))))))))))))))))))}function Jn(t){return!(Zn(t)||function(t){return!(!Yn[\"Latin-1 Supplement\"](t)||167!==t&&169!==t&&174!==t&&177!==t&&188!==t&&189!==t&&190!==t&&215!==t&&247!==t)||(!(!Yn[\"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)||(!!Yn[\"Letterlike Symbols\"](t)||(!!Yn[\"Number Forms\"](t)||(!(!Yn[\"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))||(!(!Yn[\"Control Pictures\"](t)||9251===t)||(!!Yn[\"Optical Character Recognition\"](t)||(!!Yn[\"Enclosed Alphanumerics\"](t)||(!!Yn[\"Geometric Shapes\"](t)||(!(!Yn[\"Miscellaneous Symbols\"](t)||t>=9754&&t<=9759)||(!(!Yn[\"Miscellaneous Symbols and Arrows\"](t)||!(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243))||(!!Yn[\"CJK Symbols and Punctuation\"](t)||(!!Yn.Katakana(t)||(!!Yn[\"Private Use Area\"](t)||(!!Yn[\"CJK Compatibility Forms\"](t)||(!!Yn[\"Small Form Variants\"](t)||(!!Yn[\"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 Kn(t){return t>=1424&&t<=2303||Yn[\"Arabic Presentation Forms-A\"](t)||Yn[\"Arabic Presentation Forms-B\"](t)}function Qn(t,e){return!(!e&&Kn(t))&&!(t>=2304&&t<=3583||t>=3840&&t<=4255||Yn.Khmer(t))}function $n(t){for(var e=0,r=t;e-1&&(ai=ni),ii&&ii(t)};function li(){ci.fire(new Mt(\"pluginStateChange\",{pluginStatus:ai,pluginURL:oi}))}var ci=new Et,ui=function(){return ai},fi=function(){if(ai!==ti||!oi)throw new Error(\"rtl-text-plugin cannot be downloaded unless a pluginURL is specified\");ai=ei,li(),oi&&xt({url:oi},(function(t){t?si(t):(ai=ri,li())}))},hi={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return ai===ri||null!=hi.applyArabicShaping},isLoading:function(){return ai===ei},setState:function(t){ai=t.pluginStatus,oi=t.pluginURL},isParsed:function(){return null!=hi.applyArabicShaping&&null!=hi.processBidirectionalText&&null!=hi.processStyledBidirectionalText},getPluginURL:function(){return oi}},pi=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 Gn,this.transition={})};pi.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,n=t;rthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}};var di=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(Br(t))return new Kr(t,e);if(Yr(t)){var r=Jr(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=te.parse(t)),{kind:\"constant\",evaluate:function(){return n}}}(void 0===e?t.specification.default:e,t.specification)};di.prototype.isDataDriven=function(){return\"source\"===this.expression.kind||\"composite\"===this.expression.kind},di.prototype.possiblyEvaluate=function(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)};var gi=function(t){this.property=t,this.value=new di(t,void 0)};gi.prototype.transitioned=function(t,e){return new vi(this.property,this.value,e,u({},t.transition,this.transition),t.now)},gi.prototype.untransitioned=function(){return new vi(this.property,this.value,null,{},0)};var mi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};mi.prototype.getValue=function(t){return x(this._values[t].value.value)},mi.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new gi(this._values[t].property)),this._values[t].value=new di(this._values[t].property,null===e?void 0:x(e))},mi.prototype.getTransition=function(t){return x(this._values[t].transition)},mi.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new gi(this._values[t].property)),this._values[t].transition=x(e)||void 0},mi.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);ethis.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(n=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}(o))}return i};var yi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};yi.prototype.possiblyEvaluate=function(t,e,r){for(var n=new _i(this._properties),i=0,a=Object.keys(this._values);in.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(Ti),Ai=function(t){this.specification=t};Ai.prototype.possiblyEvaluate=function(t,e,r,n){if(void 0!==t.value){if(\"constant\"===t.expression.kind){var i=t.expression.evaluate(e,null,{},r,n);return this._calculate(i,i,i,e)}return this._calculate(t.expression.evaluate(new pi(Math.floor(e.zoom-1),e)),t.expression.evaluate(new pi(Math.floor(e.zoom),e)),t.expression.evaluate(new pi(Math.floor(e.zoom+1),e)),e)}},Ai.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},Ai.prototype.interpolate=function(t){return t};var Mi=function(t){this.specification=t};Mi.prototype.possiblyEvaluate=function(t,e,r,n){return!!t.expression.evaluate(e,null,{},r,n)},Mi.prototype.interpolate=function(){return!1};var Si=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var r=t[e];r.specification.overridable&&this.overridableProperties.push(e);var n=this.defaultPropertyValues[e]=new di(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new gi(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};Nn(\"DataDrivenProperty\",Ti),Nn(\"DataConstantProperty\",wi),Nn(\"CrossFadedDataDrivenProperty\",ki),Nn(\"CrossFadedProperty\",Ai),Nn(\"ColorRampProperty\",Mi);var Ei=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},\"custom\"!==e.type&&(e=e,this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,\"background\"!==e.type&&(this.source=e.source,this.sourceLayer=e[\"source-layer\"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new xi(r.layout)),r.paint)){for(var n in this._transitionablePaint=new mi(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(),this.paint=new _i(r.paint)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return\"visibility\"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n=\"layers.\"+this.id+\".layout.\"+t;if(this._validate(In,n,t,e,r))return}\"visibility\"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e},e.prototype.getPaintProperty=function(t){return m(t,\"-transition\")?this._transitionablePaint.getTransition(t.slice(0,-\"-transition\".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n=\"layers.\"+this.id+\".paint.\"+t;if(this._validate(Pn,n,t,e,r))return!1}if(m(t,\"-transition\"))return this._transitionablePaint.setTransition(t.slice(0,-\"-transition\".length),e||void 0),!1;var i=this._transitionablePaint._values[t],a=\"cross-faded-data-driven\"===i.property.specification[\"property-type\"],o=i.value.isDataDriven(),s=i.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var l=this._transitionablePaint._values[t].value;return l.isDataDriven()||o||a||this._handleOverridablePaintPropertyUpdate(t,s,l)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype._handleOverridablePaintPropertyUpdate=function(t,e,r){return!1},e.prototype.isHidden=function(t){return!!(this.minzoom&&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,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)},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 this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),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 void 0===i&&(i={}),(!i||!1!==i.validate)&&On(this,t.call(Ln,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:Lt,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof bi&&zr(e.property.specification)&&((\"source\"===e.value.kind||\"composite\"===e.value.kind)&&e.value.isStateDependent))return!0}return!1},e}(Et),Li={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Ci=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},Pi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Ii(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map((function(t){var i,a=(i=t.type,Li[i].BYTES_PER_ELEMENT),o=r=Oi(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:Oi(r,Math.max(n,e)),alignment:e}}function Oi(t,e){return Math.ceil(t/e)*e}Pi.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Pi.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},Pi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Pi.prototype.clear=function(){this.length=0},Pi.prototype.resize=function(t){this.reserve(t),this.length=t},Pi.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)}},Pi.prototype._refreshViews=function(){throw new Error(\"_refreshViews() must be implemented by each concrete StructArray layout\")};var zi=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;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.int16[n+0]=e,this.int16[n+1]=r,t},e}(Pi);zi.prototype.bytesPerElement=4,Nn(\"StructArrayLayout2i4\",zi);var Di=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;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,t},e}(Pi);Di.prototype.bytesPerElement=8,Nn(\"StructArrayLayout4i8\",Di);var Ri=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;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(Pi);Ri.prototype.bytesPerElement=12,Nn(\"StructArrayLayout2i4i12\",Ri);var Fi=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;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=4*t,l=8*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=a,this.uint8[l+7]=o,t},e}(Pi);Fi.prototype.bytesPerElement=8,Nn(\"StructArrayLayout2i4ub8\",Fi);var Bi=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,n,i,a,o,s,l,c){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,n,i,a,o,s,l,c)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u){var f=9*t,h=18*t;return this.uint16[f+0]=e,this.uint16[f+1]=r,this.uint16[f+2]=n,this.uint16[f+3]=i,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.uint8[h+16]=c,this.uint8[h+17]=u,t},e}(Pi);Bi.prototype.bytesPerElement=18,Nn(\"StructArrayLayout8ui2ub18\",Bi);var Ni=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,l,c,u,f){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,n,i,a,o,s,l,c,u,f)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h){var p=12*t;return this.int16[p+0]=e,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=i,this.uint16[p+4]=a,this.uint16[p+5]=o,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=c,this.int16[p+9]=u,this.int16[p+10]=f,this.int16[p+11]=h,t},e}(Pi);Ni.prototype.bytesPerElement=24,Nn(\"StructArrayLayout4i4ui4i24\",Ni);var ji=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.float32[i+0]=e,this.float32[i+1]=r,this.float32[i+2]=n,t},e}(Pi);ji.prototype.bytesPerElement=12,Nn(\"StructArrayLayout3f12\",ji);var Ui=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;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint32[r+0]=e,t},e}(Pi);Ui.prototype.bytesPerElement=4,Nn(\"StructArrayLayout1ul4\",Ui);var Vi=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){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,r,n,i,a,o,s,l)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c){var u=10*t,f=5*t;return this.int16[u+0]=e,this.int16[u+1]=r,this.int16[u+2]=n,this.int16[u+3]=i,this.int16[u+4]=a,this.int16[u+5]=o,this.uint32[f+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,t},e}(Pi);Vi.prototype.bytesPerElement=20,Nn(\"StructArrayLayout6i1ul2ui20\",Vi);var Hi=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;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(Pi);Hi.prototype.bytesPerElement=12,Nn(\"StructArrayLayout2i2i2i12\",Hi);var qi=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),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i)},e.prototype.emplace=function(t,e,r,n,i,a){var o=4*t,s=8*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=n,this.int16[s+6]=i,this.int16[s+7]=a,t},e}(Pi);qi.prototype.bytesPerElement=16,Nn(\"StructArrayLayout2f1f2i16\",qi);var Gi=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;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=12*t,o=3*t;return this.uint8[a+0]=e,this.uint8[a+1]=r,this.float32[o+1]=n,this.float32[o+2]=i,t},e}(Pi);Gi.prototype.bytesPerElement=12,Nn(\"StructArrayLayout2ub2f12\",Gi);var Yi=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,this.uint16[i+2]=n,t},e}(Pi);Yi.prototype.bytesPerElement=6,Nn(\"StructArrayLayout3ui6\",Yi);var Wi=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,d,g,m){var v=this.length;return this.resize(v+1),this.emplace(v,t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v){var y=24*t,x=12*t,b=48*t;return this.int16[y+0]=e,this.int16[y+1]=r,this.uint16[y+2]=n,this.uint16[y+3]=i,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[y+10]=l,this.uint16[y+11]=c,this.uint16[y+12]=u,this.float32[x+7]=f,this.float32[x+8]=h,this.uint8[b+36]=p,this.uint8[b+37]=d,this.uint8[b+38]=g,this.uint32[x+10]=m,this.int16[y+22]=v,t},e}(Pi);Wi.prototype.bytesPerElement=48,Nn(\"StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48\",Wi);var Xi=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,d,g,m,v,y,x,b,_,w,T,k,A,M,S){var E=this.length;return this.resize(E+1),this.emplace(E,t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,w,T,k,A,M,S)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,w,T,k,A,M,S,E){var L=34*t,C=17*t;return this.int16[L+0]=e,this.int16[L+1]=r,this.int16[L+2]=n,this.int16[L+3]=i,this.int16[L+4]=a,this.int16[L+5]=o,this.int16[L+6]=s,this.int16[L+7]=l,this.uint16[L+8]=c,this.uint16[L+9]=u,this.uint16[L+10]=f,this.uint16[L+11]=h,this.uint16[L+12]=p,this.uint16[L+13]=d,this.uint16[L+14]=g,this.uint16[L+15]=m,this.uint16[L+16]=v,this.uint16[L+17]=y,this.uint16[L+18]=x,this.uint16[L+19]=b,this.uint16[L+20]=_,this.uint16[L+21]=w,this.uint16[L+22]=T,this.uint32[C+12]=k,this.float32[C+13]=A,this.float32[C+14]=M,this.float32[C+15]=S,this.float32[C+16]=E,t},e}(Pi);Xi.prototype.bytesPerElement=68,Nn(\"StructArrayLayout8i15ui1ul4f68\",Xi);var Zi=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;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.float32[r+0]=e,t},e}(Pi);Zi.prototype.bytesPerElement=4,Nn(\"StructArrayLayout1f4\",Zi);var Ji=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.int16[i+0]=e,this.int16[i+1]=r,this.int16[i+2]=n,t},e}(Pi);Ji.prototype.bytesPerElement=6,Nn(\"StructArrayLayout3i6\",Ji);var Ki=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;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=2*t,a=4*t;return this.uint32[i+0]=e,this.uint16[a+2]=r,this.uint16[a+3]=n,t},e}(Pi);Ki.prototype.bytesPerElement=8,Nn(\"StructArrayLayout1ul2ui8\",Ki);var Qi=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;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,t},e}(Pi);Qi.prototype.bytesPerElement=4,Nn(\"StructArrayLayout2ui4\",Qi);var $i=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){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint16[r+0]=e,t},e}(Pi);$i.prototype.bytesPerElement=2,Nn(\"StructArrayLayout1ui2\",$i);var ta=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;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.float32[n+0]=e,this.float32[n+1]=r,t},e}(Pi);ta.prototype.bytesPerElement=8,Nn(\"StructArrayLayout2f8\",ta);var ea=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;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,t},e}(Pi);ea.prototype.bytesPerElement=16,Nn(\"StructArrayLayout4f16\",ea);var ra=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},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Ci);ra.prototype.size=20;var na=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 ra(this,t)},e}(Vi);Nn(\"CollisionBoxArray\",na);var ia=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},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,r),e}(Ci);ia.prototype.size=48;var aa=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 ia(this,t)},e}(Wi);Nn(\"PlacedSymbolArray\",aa);var oa=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},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+12]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},r.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,r),e}(Ci);oa.prototype.size=68;var sa=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 oa(this,t)},e}(Xi);Nn(\"SymbolInstanceArray\",sa);var la=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}(Zi);Nn(\"GlyphOffsetArray\",la);var ca=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}(Ji);Nn(\"SymbolLineVertexArray\",ca);var ua=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.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,r),e}(Ci);ua.prototype.size=8;var fa=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 ua(this,t)},e}(Ki);Nn(\"FeatureIndexArray\",fa);var ha=Ii([{name:\"a_pos\",components:2,type:\"Int16\"}],4).members,pa=function(t){void 0===t&&(t=[]),this.segments=t};function da(t,e){return 256*(t=l(Math.floor(t),0,255))+(e=l(Math.floor(e),0,255))}pa.prototype.prepareSegment=function(t,e,r,n){var i=this.segments[this.segments.length-1];return t>pa.MAX_VERTEX_ARRAY_LENGTH&&_(\"Max vertices per segment is \"+pa.MAX_VERTEX_ARRAY_LENGTH+\": bucket requested \"+t),(!i||i.vertexLength+t>pa.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},pa.prototype.get=function(){return this.segments},pa.prototype.destroy=function(){for(var t=0,e=this.segments;t>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(a>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&t.charCodeAt(c+2))<<16;case 2:l^=(255&t.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(c)))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}})),va=e((function(t){t.exports=function(t,e){for(var r,n=t.length,i=e^n,a=0;n>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(a)|(255&t.charCodeAt(++a))<<8|(255&t.charCodeAt(++a))<<16|(255&t.charCodeAt(++a))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++a;switch(n){case 3:i^=(255&t.charCodeAt(a+2))<<16;case 2:i^=(255&t.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(a)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}})),ya=ma,xa=ma,ba=va;ya.murmur3=xa,ya.murmur2=ba;var _a=function(){this.ids=[],this.positions=[],this.indexed=!1};_a.prototype.add=function(t,e,r,n){this.ids.push(Ta(t)),this.positions.push(e,r,n)},_a.prototype.getPositions=function(t){for(var e=Ta(t),r=0,n=this.ids.length-1;r>1;this.ids[i]>=e?n=i:r=i+1}for(var a=[];this.ids[r]===e;){var o=this.positions[3*r],s=this.positions[3*r+1],l=this.positions[3*r+2];a.push({index:o,start:s,end:l}),r++}return a},_a.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return function t(e,r,n,i){for(;n>1],o=n-1,s=i+1;;){do{o++}while(e[o]a);if(o>=s)break;ka(e,o,s),ka(r,3*o,3*s),ka(r,3*o+1,3*s+1),ka(r,3*o+2,3*s+2)}s-nGa.max||o.yGa.max)&&(_(\"Geometry exceeds allowed extent, reduce your vector tile buffer size\"),o.x=l(o.x,Ga.min,Ga.max),o.y=l(o.y,Ga.min,Ga.max))}return r}function Wa(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var Xa=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.hasPattern=!1,this.layoutVertexArray=new zi,this.indexArray=new Yi,this.segments=new pa,this.programConfigurations=new Ua(ha,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function Za(t,e){for(var r=0;r1){if($a(t,e))return!0;for(var n=0;n1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function no(t,e){for(var r,n,i,a=!1,o=0;oe.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 io(t,e){for(var r=!1,n=0,i=t.length-1;ne.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 ao(t,e,r){var n=r[0],i=r[2];if(t.xi.x&&e.x>i.x||t.yi.y&&e.y>i.y)return!1;var a=w(t,e,r[0]);return a!==w(t,e,r[1])||a!==w(t,e,r[2])||a!==w(t,e,r[3])}function oo(t,e,r){var n=e.paint.get(t).value;return\"constant\"===n.kind?n.value:r.programConfigurations.get(e.id).getMaxValue(t)}function so(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function lo(t,e,r,n,a){if(!e[0]&&!e[1])return t;var o=i.convert(e)._mult(a);\"viewport\"===r&&o._rotate(-n);for(var s=[],l=0;l=8192||u<0||u>=8192)){var f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),h=f.vertexLength;Wa(this.layoutVertexArray,c,u,-1,-1),Wa(this.layoutVertexArray,c,u,1,-1),Wa(this.layoutVertexArray,c,u,1,1),Wa(this.layoutVertexArray,c,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),f.vertexLength+=4,f.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{},n)},Nn(\"CircleBucket\",Xa,{omit:[\"layers\"]});var co=new Si({\"circle-sort-key\":new Ti(Lt.layout_circle[\"circle-sort-key\"])}),uo={paint:new Si({\"circle-radius\":new Ti(Lt.paint_circle[\"circle-radius\"]),\"circle-color\":new Ti(Lt.paint_circle[\"circle-color\"]),\"circle-blur\":new Ti(Lt.paint_circle[\"circle-blur\"]),\"circle-opacity\":new Ti(Lt.paint_circle[\"circle-opacity\"]),\"circle-translate\":new wi(Lt.paint_circle[\"circle-translate\"]),\"circle-translate-anchor\":new wi(Lt.paint_circle[\"circle-translate-anchor\"]),\"circle-pitch-scale\":new wi(Lt.paint_circle[\"circle-pitch-scale\"]),\"circle-pitch-alignment\":new wi(Lt.paint_circle[\"circle-pitch-alignment\"]),\"circle-stroke-width\":new Ti(Lt.paint_circle[\"circle-stroke-width\"]),\"circle-stroke-color\":new Ti(Lt.paint_circle[\"circle-stroke-color\"]),\"circle-stroke-opacity\":new Ti(Lt.paint_circle[\"circle-stroke-opacity\"])}),layout:co},fo=\"undefined\"!=typeof Float32Array?Float32Array:Array;function ho(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}function po(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],m=e[13],v=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*m,t[2]=x*a+b*c+_*p+w*v,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*m,t[6]=x*a+b*c+_*p+w*v,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*m,t[10]=x*a+b*c+_*p+w*v,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*m,t[14]=x*a+b*c+_*p+w*v,t[15]=x*o+b*u+_*d+w*y,t}Math.hypot||(Math.hypot=function(){for(var t=arguments,e=0,r=arguments.length;r--;)e+=t[r]*t[r];return Math.sqrt(e)});var go=po;var mo,vo,yo=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t};mo=new fo(3),fo!=Float32Array&&(mo[0]=0,mo[1]=0,mo[2]=0),vo=mo;function xo(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}!function(){var t=function(){var t=new fo(4);return fo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}()}();var bo=function(t){var e=t[0],r=t[1];return e*e+r*r},_o=(function(){var t=function(){var t=new fo(2);return fo!=Float32Array&&(t[0]=0,t[1]=0),t}()}(),function(t){function e(e){t.call(this,e,uo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Xa(t)},e.prototype.queryRadius=function(t){var e=t;return oo(\"circle-radius\",this,e)+oo(\"circle-stroke-width\",this,e)+so(this.paint.get(\"circle-translate\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o,s){for(var l=lo(t,this.paint.get(\"circle-translate\"),this.paint.get(\"circle-translate-anchor\"),a.angle,o),c=this.paint.get(\"circle-radius\").evaluate(e,r)+this.paint.get(\"circle-stroke-width\").evaluate(e,r),u=\"map\"===this.paint.get(\"circle-pitch-alignment\"),f=u?l:function(t,e){return t.map((function(t){return wo(t,e)}))}(l,s),h=u?c*o:c,p=0,d=n;pt.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;l80*r){n=a=t[0],i=o=t[1];for(var d=r;da&&(a=s),l>o&&(o=l);c=0!==(c=Math.max(a-n,o-i))?1/c:0}return jo(h,p,r,n,i,c),p}function Bo(t,e,r,n,i){var a,o;if(i===ls(t,e,r,n)>0)for(a=e;a=e;a-=n)o=as(a,t[a],t[a+1],o);return o&&$o(o,o.next)&&(os(o),o=o.next),o}function No(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!$o(n,n.next)&&0!==Qo(n.prev,n,n.next))n=n.next;else{if(os(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function jo(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=Xo(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;e0||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?Vo(t,n,i,a):Uo(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),os(t),t=l.next,c=l.next;else if((t=l)===c){o?1===o?jo(t=Ho(No(t),e,r),e,r,n,i,a,2):2===o&&qo(t,e,r,n,i,a):jo(No(t),e,r,n,i,a,1);break}}}function Uo(t){var e=t.prev,r=t,n=t.next;if(Qo(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Jo(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&Qo(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Vo(t,e,r,n){var i=t.prev,a=t,o=t.next;if(Qo(i,a,o)>=0)return!1;for(var s=i.xa.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=Xo(s,l,e,r,n),h=Xo(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&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=h;){if(d!==t.prev&&d!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Ho(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!$o(i,a)&&ts(i,n,n.next,a)&&ns(i,a)&&ns(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),os(n),os(n.next),n=t=a),n=n.next}while(n!==t);return No(n)}function qo(t,e,r,n,i,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&Ko(o,s)){var l=is(o,s);return o=No(o,o.next),l=No(l,l.next),jo(o,e,r,n,i,a),void jo(l,e,r,n,i,a)}s=s.next}o=o.next}while(o!==t)}function Go(t,e){return t.x-e.x}function Yo(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.x&&n.x>=u&&i!==n.x&&Jo(ar.x||n.x===r.x&&Wo(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(t,e)){var r=is(e,t);No(e,e.next),No(r,r.next)}}function Wo(t,e){return Qo(t.prev,t,e.prev)<0&&Qo(e.next,t,t.next)<0}function Xo(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 Zo(t){var e=t,r=t;do{(e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function Ko(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&&ts(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(ns(t,e)&&ns(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)&&(Qo(t.prev,t,e.prev)||Qo(t,e.prev,e))||$o(t,e)&&Qo(t.prev,t,t.next)>0&&Qo(e.prev,e,e.next)>0)}function Qo(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function $o(t,e){return t.x===e.x&&t.y===e.y}function ts(t,e,r,n){var i=rs(Qo(t,e,r)),a=rs(Qo(t,e,n)),o=rs(Qo(r,n,t)),s=rs(Qo(r,n,e));return i!==a&&o!==s||(!(0!==i||!es(t,r,e))||(!(0!==a||!es(t,n,e))||(!(0!==o||!es(r,t,n))||!(0!==s||!es(r,e,n)))))}function es(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function rs(t){return t>0?1:t<0?-1:0}function ns(t,e){return Qo(t.prev,t,t.next)<0?Qo(t,e,t.next)>=0&&Qo(t,t.prev,e)>=0:Qo(t,e,t.prev)<0||Qo(t,t.next,e)<0}function is(t,e){var r=new ss(t.i,t.x,t.y),n=new ss(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 as(t,e,r,n){var i=new ss(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 os(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 ss(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 ls(t,e,r,n){for(var i=0,a=e,o=r-n;an;){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),f=Math.max(n,Math.floor(r-s*c/o+u)),h=Math.min(i,Math.floor(r+(o-s)*c/o+u));t(e,r,f,h,a)}var p=e[r],d=n,g=i;for(us(e,n,r),a(e[i],p)>0&&us(e,n,i);d0;)g--}0===a(e[n],p)?us(e,n,g):(g++,us(e,g,i)),g<=r&&(n=g+1),r<=g&&(i=g-1)}}(t,e,r||0,n||t.length-1,i||fs)}function us(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function fs(t,e){return te?1:0}function hs(t,e){var r=t.length;if(r<=1)return[t];for(var n,i,a=[],o=0;o1)for(var l=0;l0&&(n+=t[i-1].length,r.holes.push(n))}return r},Do.default=Ro;var ms=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.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new zi,this.indexArray=new Yi,this.indexArray2=new Qi,this.programConfigurations=new Ua(zo,t.layers,t.zoom),this.segments=new pa,this.segments2=new pa,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};ms.prototype.populate=function(t,e,r){this.hasPattern=ds(\"fill\",this.layers,e);for(var n=this.layers[0].layout.get(\"fill-sort-key\"),i=[],a=0,o=t;a>3}if(a--,1===n||2===n)o+=t.readSVarint(),s+=t.readSVarint(),1===n&&(e&&l.push(e),e=[]),e.push(new i(o,s));else{if(7!==n)throw new Error(\"unknown command \"+n);e&&e.push(e[0].clone())}}return e&&l.push(e),l},ws.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>3}if(n--,1===r||2===r)(i+=t.readSVarint())s&&(s=i),(a+=t.readSVarint())c&&(c=a);else if(7!==r)throw new Error(\"unknown command \"+r)}return[o,l,s,c]},ws.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=ws.types[this.type];function u(t){for(var e=0;e>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 Es(t,e,r){if(3===t){var n=new As(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}Ms.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 _s(this._pbf,e,this.extent,this._keys,this._values)};var Ls={VectorTile:function(t,e){this.layers=t.readFields(Es,{},e)},VectorTileFeature:_s,VectorTileLayer:As},Cs=Ls.VectorTileFeature.types,Ps=Math.pow(2,13);function Is(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,2*Math.floor(n*Ps)+o,i*Ps*2,a*Ps*2,Math.round(s))}var Os=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.hasPattern=!1,this.layoutVertexArray=new Ri,this.indexArray=new Yi,this.programConfigurations=new Ua(bs,t.layers,t.zoom),this.segments=new pa,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function zs(t,e){return t.x===e.x&&(t.x<0||t.x>8192)||t.y===e.y&&(t.y<0||t.y>8192)}function Ds(t){return t.every((function(t){return t.x<0}))||t.every((function(t){return t.x>8192}))||t.every((function(t){return t.y<0}))||t.every((function(t){return t.y>8192}))}Os.prototype.populate=function(t,e,r){this.features=[],this.hasPattern=ds(\"fill-extrusion\",this.layers,e);for(var n=0,i=t;n=1){var y=d[m-1];if(!zs(v,y)){f.vertexLength+4>pa.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var x=v.sub(y)._perp()._unit(),b=y.dist(v);g+b>32768&&(g=0),Is(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,0,g),Is(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,1,g),g+=b,Is(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,0,g),Is(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,1,g);var _=f.vertexLength;this.indexArray.emplaceBack(_,_+2,_+1),this.indexArray.emplaceBack(_+1,_+2,_+3),f.vertexLength+=4,f.primitiveLength+=2}}}}if(f.vertexLength+l>pa.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),\"Polygon\"===Cs[t.type]){for(var w=[],T=[],k=f.vertexLength,A=0,M=s;A=2&&t[l-1].equals(t[l-2]);)l--;for(var c=0;c0;if(T&&v>c){var A=u.dist(p);if(A>2*f){var M=u.sub(u.sub(p)._mult(f/A)._round());this.updateDistance(p,M),this.addCurrentVertex(M,g,0,0,h),p=M}}var S=p&&d,E=S?r:s?\"butt\":n;if(S&&\"round\"===E&&(_i&&(E=\"bevel\"),\"bevel\"===E&&(_>2&&(E=\"flipbevel\"),_100)y=m.mult(-1);else{var L=_*g.add(m).mag()/g.sub(m).mag();y._perp()._mult(L*(k?-1:1))}this.addCurrentVertex(u,y,0,0,h),this.addCurrentVertex(u,y.mult(-1),0,0,h)}else if(\"bevel\"===E||\"fakeround\"===E){var C=-Math.sqrt(_*_-1),P=k?C:0,I=k?0:C;if(p&&this.addCurrentVertex(u,g,P,I,h),\"fakeround\"===E)for(var O=Math.round(180*w/Math.PI/20),z=1;z2*f){var j=u.add(d.sub(u)._mult(f/N)._round());this.updateDistance(u,j),this.addCurrentVertex(j,m,0,0,h),u=j}}}}},qs.prototype.addCurrentVertex=function(t,e,r,n,i,a){void 0===a&&(a=!1);var o=e.x+e.y*r,s=e.y-e.x*r,l=-e.x+e.y*n,c=-e.y-e.x*n;this.addHalfVertex(t,o,s,a,!1,r,i),this.addHalfVertex(t,l,c,a,!0,-n,i),this.distance>Hs/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,n,i,a))},qs.prototype.addHalfVertex=function(t,e,r,n,i,a,o){var s=t.x,l=t.y,c=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(i?1:0),Math.round(63*e)+128,Math.round(63*r)+128,1+(0===a?0:a<0?-1:1)|(63&c)<<2,c>>6);var u=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,u),o.primitiveLength++),i?this.e2=u:this.e1=u},qs.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(Hs-1):this.distance},qs.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},Nn(\"LineBucket\",qs,{omit:[\"layers\",\"patternFeatures\"]});var Gs=new Si({\"line-cap\":new wi(Lt.layout_line[\"line-cap\"]),\"line-join\":new Ti(Lt.layout_line[\"line-join\"]),\"line-miter-limit\":new wi(Lt.layout_line[\"line-miter-limit\"]),\"line-round-limit\":new wi(Lt.layout_line[\"line-round-limit\"]),\"line-sort-key\":new Ti(Lt.layout_line[\"line-sort-key\"])}),Ys={paint:new Si({\"line-opacity\":new Ti(Lt.paint_line[\"line-opacity\"]),\"line-color\":new Ti(Lt.paint_line[\"line-color\"]),\"line-translate\":new wi(Lt.paint_line[\"line-translate\"]),\"line-translate-anchor\":new wi(Lt.paint_line[\"line-translate-anchor\"]),\"line-width\":new Ti(Lt.paint_line[\"line-width\"]),\"line-gap-width\":new Ti(Lt.paint_line[\"line-gap-width\"]),\"line-offset\":new Ti(Lt.paint_line[\"line-offset\"]),\"line-blur\":new Ti(Lt.paint_line[\"line-blur\"]),\"line-dasharray\":new Ai(Lt.paint_line[\"line-dasharray\"]),\"line-pattern\":new ki(Lt.paint_line[\"line-pattern\"]),\"line-gradient\":new Mi(Lt.paint_line[\"line-gradient\"])}),layout:Gs},Ws=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 pi(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,i){return r=u({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,i)},e}(Ti))(Ys.paint.properties[\"line-width\"].specification);Ws.useIntegerZoom=!0;var Xs=function(t){function e(e){t.call(this,e,Ys)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){\"line-gradient\"===t&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values[\"line-gradient\"].value.expression;this.gradient=Co(t,\"lineProgress\"),this.gradientTexture=null},e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r),this.paint._values[\"line-floorwidth\"]=Ws.possiblyEvaluate(this._transitioningPaint._values[\"line-width\"].value,e)},e.prototype.createBucket=function(t){return new qs(t)},e.prototype.queryRadius=function(t){var e=t,r=Zs(oo(\"line-width\",this,e),oo(\"line-gap-width\",this,e)),n=oo(\"line-offset\",this,e);return r/2+Math.abs(n)+so(this.paint.get(\"line-translate\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,a,o,s){var l=lo(t,this.paint.get(\"line-translate\"),this.paint.get(\"line-translate-anchor\"),o.angle,s),c=s/2*Zs(this.paint.get(\"line-width\").evaluate(e,r),this.paint.get(\"line-gap-width\").evaluate(e,r)),u=this.paint.get(\"line-offset\").evaluate(e,r);return u&&(n=function(t,e){for(var r=[],n=new i(0,0),a=0;a=3)for(var a=0;a0?e+2*t:t}var Js=Ii([{name:\"a_pos_offset\",components:4,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint16\"},{name:\"a_pixeloffset\",components:4,type:\"Int16\"}],4),Ks=Ii([{name:\"a_projected_pos\",components:3,type:\"Float32\"}],4),Qs=(Ii([{name:\"a_fade_opacity\",components:1,type:\"Uint32\"}],4),Ii([{name:\"a_placed\",components:2,type:\"Uint8\"},{name:\"a_shift\",components:2,type:\"Float32\"}])),$s=(Ii([{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\"}]),Ii([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_anchor_pos\",components:2,type:\"Int16\"},{name:\"a_extrude\",components:2,type:\"Int16\"}],4)),tl=Ii([{name:\"a_pos\",components:2,type:\"Float32\"},{name:\"a_radius\",components:1,type:\"Float32\"},{name:\"a_flags\",components:2,type:\"Int16\"}],4);Ii([{name:\"triangle\",components:3,type:\"Uint16\"}]),Ii([{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:\"placedOrientation\"},{type:\"Uint8\",name:\"hidden\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Int16\",name:\"associatedIconIndex\"}]),Ii([{type:\"Int16\",name:\"anchorX\"},{type:\"Int16\",name:\"anchorY\"},{type:\"Int16\",name:\"rightJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"centerJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"leftJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedTextSymbolIndex\"},{type:\"Int16\",name:\"placedIconSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedIconSymbolIndex\"},{type:\"Uint16\",name:\"key\"},{type:\"Uint16\",name:\"textBoxStartIndex\"},{type:\"Uint16\",name:\"textBoxEndIndex\"},{type:\"Uint16\",name:\"verticalTextBoxStartIndex\"},{type:\"Uint16\",name:\"verticalTextBoxEndIndex\"},{type:\"Uint16\",name:\"iconBoxStartIndex\"},{type:\"Uint16\",name:\"iconBoxEndIndex\"},{type:\"Uint16\",name:\"verticalIconBoxStartIndex\"},{type:\"Uint16\",name:\"verticalIconBoxEndIndex\"},{type:\"Uint16\",name:\"featureIndex\"},{type:\"Uint16\",name:\"numHorizontalGlyphVertices\"},{type:\"Uint16\",name:\"numVerticalGlyphVertices\"},{type:\"Uint16\",name:\"numIconVertices\"},{type:\"Uint16\",name:\"numVerticalIconVertices\"},{type:\"Uint16\",name:\"useRuntimeCollisionCircles\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Float32\",name:\"textBoxScale\"},{type:\"Float32\",components:2,name:\"textOffset\"},{type:\"Float32\",name:\"collisionCircleDiameter\"}]),Ii([{type:\"Float32\",name:\"offsetX\"}]),Ii([{type:\"Int16\",name:\"x\"},{type:\"Int16\",name:\"y\"},{type:\"Int16\",name:\"tileUnitDistanceFromAnchor\"}]);function el(t,e,r){return t.sections.forEach((function(t){t.text=function(t,e,r){var n=e.layout.get(\"text-transform\").evaluate(r,{});return\"uppercase\"===n?t=t.toLocaleUpperCase():\"lowercase\"===n&&(t=t.toLocaleLowerCase()),hi.applyArabicShaping&&(t=hi.applyArabicShaping(t)),t}(t.text,e,r)})),t}var rl={\"!\":\"\\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\"};var nl=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<>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)},il=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>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<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g},al=ol;function ol(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}ol.Varint=0,ol.Fixed64=1,ol.Bytes=2,ol.Fixed32=5;var sl=\"undefined\"==typeof TextDecoder?null:new TextDecoder(\"utf8\");function ll(t){return t.type===ol.Bytes?t.readVarint()+t.pos:t.pos+1}function cl(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function ul(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(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 fl(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function wl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}ol.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos>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=bl(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=wl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=bl(this.buf,this.pos)+4294967296*bl(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=bl(this.buf,this.pos)+4294967296*wl(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=nl(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=nl(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(i=a[r.pos++],n=(112&i)>>4,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<3,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<10,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<17,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<24,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(1&i)<<31,i<128)return cl(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=this.pos;return this.pos=t,t-e>=12&&sl?function(t,e,r){return sl.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){var n=\"\",i=e;for(;i239?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,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==ol.Bytes)return t.push(this.readVarint(e));var r=ll(this);for(t=t||[];this.pos127;);else if(e===ol.Bytes)this.pos=this.readVarint()+this.pos;else if(e===ol.Fixed32)this.pos+=4;else{if(e!==ol.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;e268435455||t<0?function(t,e){var r,n;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));if(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;if(e.buf[e.pos++]|=r|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;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;a55295&&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&&ul(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),il(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),il(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=128&&ul(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,ol.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,fl,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,hl,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,gl,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,pl,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,dl,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,ml,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,vl,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,yl,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,xl,e)},writeBytesField:function(t,e){this.writeTag(t,ol.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,ol.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,ol.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,ol.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,ol.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,ol.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,ol.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,ol.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,ol.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,ol.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};function Tl(t,e,r){1===t&&r.readMessage(kl,e)}function kl(t,e,r){if(3===t){var n=r.readMessage(Al,{}),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 So({width:o+6,height:s+6},a),metrics:{width:o,height:s,left:l,top:c,advance:u}})}}function Al(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())}function Ml(t){for(var e=0,r=0,n=0,i=t;n=0;h--){var p=o[h];if(!(f.w>p.w||f.h>p.h)){if(f.x=p.x,f.y=p.y,l=Math.max(l,f.y+f.h),s=Math.max(s,f.x+f.w),f.w===p.w&&f.h===p.h){var d=o.pop();h0&&N>A&&(A=N)}else{var j=r[S.fontStack],U=j&&j[L];if(U&&U.rect)I=U.rect,P=U.metrics;else{var V=e[S.fontStack],H=V&&V[L];if(!H)continue;P=H.metrics}C=24*(_-S.scale)}D?(t.verticalizable=!0,k.push({glyph:L,imageName:O,x:h,y:p+C,vertical:D,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:I}),h+=z*S.scale+c):(k.push({glyph:L,imageName:O,x:h,y:p+C,vertical:D,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:I}),h+=P.advance*S.scale+c)}if(0!==k.length){var q=h-c;d=Math.max(q,d),Vl(k,0,k.length-1,m,A)}h=0;var G=a*_+A;T.lineOffset=Math.max(A,w),p+=G,g=Math.max(G,g),++v}else p+=a,++v}var Y;var W=p- -17,X=Ul(o),Z=X.horizontalAlign,J=X.verticalAlign;(function(t,e,r,n,i,a,o,s,l){var c=(e-r)*i,u=0;u=a!==o?-s*n- -17:(-n*l+.5)*o;for(var f=0,h=t;f=0&&n>=t&&zl[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},Il.prototype.substring=function(t,e){var r=new Il;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},Il.prototype.toString=function(){return this.text},Il.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce((function(e,r){return Math.max(e,t.sections[r].scale)}),0)},Il.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(Pl.forText(t.scale,t.fontStack||e));for(var r=this.sections.length-1,n=0;n=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var zl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Dl={};function Rl(t,e,r,n,i,a){if(e.imageName){var o=n[e.imageName];return o?o.displaySize[0]*e.scale*24/a+i:0}var s=r[e.fontStack],l=s&&s[t];return l?l.metrics.advance*e.scale+i:0}function Fl(t,e,r,n){var i=Math.pow(t-e,2);return n?t=0,f=0,h=0;h-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;sn;)c-=l.shift().angleDelta;if(c>i)return!1;o++,s+=f.dist(h)}return!0}function Jl(t){for(var e=0,r=0;rc){var d=(c-l)/p,g=qe(f.x,h.x,d),m=qe(f.y,h.y,d),v=new ql(g,m,h.angleTo(f),u);return v._round(),!o||Zl(t,v,s,o,e)?v:void 0}l+=p}}function tc(t,e,r,n,i,a,o,s,l){var c=Kl(n,a,o),u=Ql(n,i),f=u*o,h=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-f=0&&_=0&&w=0&&p+u<=f){var T=new ql(_,w,x,g);T._round(),i&&!Zl(e,T,o,i,a)||d.push(T)}}h+=y}l||d.length||s||(d=t(e,h/2,n,i,a,o,s,!0,c));return d}(t,h?e/2*s%e:(u/2+2*a)*o*s%e,e,c,r,f,h,!1,l)}function ec(t,e,r,n,a){for(var o=[],s=0;s=n&&h.x>=n||(f.x>=n?f=new i(n,f.y+(h.y-f.y)*((n-f.x)/(h.x-f.x)))._round():h.x>=n&&(h=new i(n,f.y+(h.y-f.y)*((n-f.x)/(h.x-f.x)))._round()),f.y>=a&&h.y>=a||(f.y>=a?f=new i(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round():h.y>=a&&(h=new i(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}function rc(t,e,r,n){var a=[],o=t.image,s=o.pixelRatio,l=o.paddedRect.w-2,c=o.paddedRect.h-2,u=t.right-t.left,f=t.bottom-t.top,h=o.stretchX||[[0,l]],p=o.stretchY||[[0,c]],d=function(t,e){return t+e[1]-e[0]},g=h.reduce(d,0),m=p.reduce(d,0),v=l-g,y=c-m,x=0,b=g,_=0,w=m,T=0,k=v,A=0,M=y;if(o.content&&n){var S=o.content;x=nc(h,0,S[0]),_=nc(p,0,S[1]),b=nc(h,S[0],S[2]),w=nc(p,S[1],S[3]),T=S[0]-x,A=S[1]-_,k=S[2]-S[0]-b,M=S[3]-S[1]-w}var E=function(n,a,l,c){var h=ac(n.stretch-x,b,u,t.left),p=oc(n.fixed-T,k,n.stretch,g),d=ac(a.stretch-_,w,f,t.top),v=oc(a.fixed-A,M,a.stretch,m),y=ac(l.stretch-x,b,u,t.left),S=oc(l.fixed-T,k,l.stretch,g),E=ac(c.stretch-_,w,f,t.top),L=oc(c.fixed-A,M,c.stretch,m),C=new i(h,d),P=new i(y,d),I=new i(y,E),O=new i(h,E),z=new i(p/s,v/s),D=new i(S/s,L/s),R=e*Math.PI/180;if(R){var F=Math.sin(R),B=Math.cos(R),N=[B,-F,F,B];C._matMult(N),P._matMult(N),O._matMult(N),I._matMult(N)}var j=n.stretch+n.fixed,U=l.stretch+l.fixed,V=a.stretch+a.fixed,H=c.stretch+c.fixed;return{tl:C,tr:P,bl:O,br:I,tex:{x:o.paddedRect.x+1+j,y:o.paddedRect.y+1+V,w:U-j,h:H-V},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:z,pixelOffsetBR:D,minFontScaleX:k/s/u,minFontScaleY:M/s/f,isSDF:r}};if(n&&(o.stretchX||o.stretchY))for(var L=ic(h,v,g),C=ic(p,y,m),P=0;P0&&(d=Math.max(10,d),this.circleDiameter=d)}else{var g=o.top*s-l,m=o.bottom*s+l,v=o.left*s-l,y=o.right*s+l,x=o.collisionPadding;if(x&&(v-=x[0]*s,g-=x[1]*s,y+=x[2]*s,m+=x[3]*s),u){var b=new i(v,g),_=new i(y,g),w=new i(v,m),T=new i(y,m),k=u*Math.PI/180;b._rotate(k),_._rotate(k),w._rotate(k),T._rotate(k),v=Math.min(b.x,_.x,w.x,T.x),y=Math.max(b.x,_.x,w.x,T.x),g=Math.min(b.y,_.y,w.y,T.y),m=Math.max(b.y,_.y,w.y,T.y)}t.emplaceBack(e.x,e.y,v,g,y,m,r,n,a)}this.boxEndIndex=t.length},lc=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=cc),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function cc(t,e){return te?1:0}function uc(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var n=1/0,a=1/0,o=-1/0,s=-1/0,l=t[0],c=0;co)&&(o=u.x),(!c||u.y>s)&&(s=u.y)}var f=o-n,h=s-a,p=Math.min(f,h),d=p/2,g=new lc([],fc);if(0===p)return new i(n,a);for(var m=n;my.d||!y.d)&&(y=b,r&&console.log(\"found best %d after %d probes\",Math.round(1e4*b.d)/1e4,x)),b.max-y.d<=e||(d=b.h/2,g.push(new hc(b.p.x-d,b.p.y-d,d,t)),g.push(new hc(b.p.x+d,b.p.y-d,d,t)),g.push(new hc(b.p.x-d,b.p.y+d,d,t)),g.push(new hc(b.p.x+d,b.p.y+d,d,t)),x+=4)}return r&&(console.log(\"num probes: \"+x),console.log(\"best distance: \"+y.d)),y.p}function fc(t,e){return e.max-t.max}function hc(t,e,r,n){this.p=new i(t,e),this.h=r,this.d=function(t,e){for(var r=!1,n=1/0,i=0;it.y!=u.y>t.y&&t.x<(u.x-c.x)*(t.y-c.y)/(u.y-c.y)+c.x&&(r=!r),n=Math.min(n,ro(t,c,u))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}lc.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},lc.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}},lc.prototype.peek=function(){return this.data[0]},lc.prototype._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},lc.prototype._down=function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];t=0)break;e[t]=o,t=a}e[t]=i};var pc=Number.POSITIVE_INFINITY;function dc(t,e){return e[1]!==pc?function(t,e,r){var n=0,i=0;switch(e=Math.abs(e),r=Math.abs(r),t){case\"top-right\":case\"top-left\":case\"top\":i=r-7;break;case\"bottom-right\":case\"bottom-left\":case\"bottom\":i=7-r}switch(t){case\"top-right\":case\"bottom-right\":case\"right\":n=-e;break;case\"top-left\":case\"bottom-left\":case\"left\":n=e}return[n,i]}(t,e[0],e[1]):function(t,e){var r=0,n=0;e<0&&(e=0);var i=e/Math.sqrt(2);switch(t){case\"top-right\":case\"top-left\":n=i-7;break;case\"bottom-right\":case\"bottom-left\":n=7-i;break;case\"bottom\":n=7-e;break;case\"top\":n=e-7}switch(t){case\"top-right\":case\"bottom-right\":r=-i;break;case\"top-left\":case\"bottom-left\":r=i;break;case\"left\":r=e;break;case\"right\":r=-e}return[r,n]}(t,e[0])}function gc(t){switch(t){case\"right\":case\"top-right\":case\"bottom-right\":return\"right\";case\"left\":case\"top-left\":case\"bottom-left\":return\"left\"}return\"center\"}function mc(t,e,r,n,a,o,s,l,c,u,f,h,p,d,g){var m=function(t,e,r,n,a,o,s,l){for(var c=n.layout.get(\"text-rotate\").evaluate(o,{})*Math.PI/180,u=[],f=0,h=e.positionedLines;f32640&&_(t.layerIds[0]+': Value for \"text-size\" is >= 255. Reduce your \"text-size\".'):\"composite\"===v.kind&&((y=[128*d.compositeTextSizes[0].evaluate(s,{},g),128*d.compositeTextSizes[1].evaluate(s,{},g)])[0]>32640||y[1]>32640)&&_(t.layerIds[0]+': Value for \"text-size\" is >= 255. Reduce your \"text-size\".'),t.addSymbols(t.text,m,y,l,o,s,u,e,c.lineStartIndex,c.lineLength,p,g);for(var x=0,b=f;x=0;o--)if(n.dist(a[o])0)&&(\"constant\"!==a.value.kind||a.value.value.length>0),c=\"constant\"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,u=i.get(\"symbol-sort-key\");if(this.features=[],l||c){for(var f=e.iconDependencies,h=e.glyphDependencies,p=e.availableImages,d=new pi(this.zoom),g=0,m=t;g=0;for(var O=0,z=k.sections;O=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;l0},Mc.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Mc.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Mc.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Mc.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Mc.prototype.addIndicesForPlacedSymbol=function(t,e){for(var r=t.placedSymbolArray.get(e),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r=0&&n.indexOf(t)===r&&e.addIndicesForPlacedSymbol(e.text,t)})),a.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,a.verticalPlacedTextSymbolIndex),a.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.placedIconSymbolIndex),a.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Nn(\"SymbolBucket\",Mc,{omit:[\"layers\",\"collisionBoxArray\",\"features\",\"compareText\"]}),Mc.MAX_GLYPHS=65535,Mc.addDynamicAttributes=wc;var Sc=new Si({\"symbol-placement\":new wi(Lt.layout_symbol[\"symbol-placement\"]),\"symbol-spacing\":new wi(Lt.layout_symbol[\"symbol-spacing\"]),\"symbol-avoid-edges\":new wi(Lt.layout_symbol[\"symbol-avoid-edges\"]),\"symbol-sort-key\":new Ti(Lt.layout_symbol[\"symbol-sort-key\"]),\"symbol-z-order\":new wi(Lt.layout_symbol[\"symbol-z-order\"]),\"icon-allow-overlap\":new wi(Lt.layout_symbol[\"icon-allow-overlap\"]),\"icon-ignore-placement\":new wi(Lt.layout_symbol[\"icon-ignore-placement\"]),\"icon-optional\":new wi(Lt.layout_symbol[\"icon-optional\"]),\"icon-rotation-alignment\":new wi(Lt.layout_symbol[\"icon-rotation-alignment\"]),\"icon-size\":new Ti(Lt.layout_symbol[\"icon-size\"]),\"icon-text-fit\":new wi(Lt.layout_symbol[\"icon-text-fit\"]),\"icon-text-fit-padding\":new wi(Lt.layout_symbol[\"icon-text-fit-padding\"]),\"icon-image\":new Ti(Lt.layout_symbol[\"icon-image\"]),\"icon-rotate\":new Ti(Lt.layout_symbol[\"icon-rotate\"]),\"icon-padding\":new wi(Lt.layout_symbol[\"icon-padding\"]),\"icon-keep-upright\":new wi(Lt.layout_symbol[\"icon-keep-upright\"]),\"icon-offset\":new Ti(Lt.layout_symbol[\"icon-offset\"]),\"icon-anchor\":new Ti(Lt.layout_symbol[\"icon-anchor\"]),\"icon-pitch-alignment\":new wi(Lt.layout_symbol[\"icon-pitch-alignment\"]),\"text-pitch-alignment\":new wi(Lt.layout_symbol[\"text-pitch-alignment\"]),\"text-rotation-alignment\":new wi(Lt.layout_symbol[\"text-rotation-alignment\"]),\"text-field\":new Ti(Lt.layout_symbol[\"text-field\"]),\"text-font\":new Ti(Lt.layout_symbol[\"text-font\"]),\"text-size\":new Ti(Lt.layout_symbol[\"text-size\"]),\"text-max-width\":new Ti(Lt.layout_symbol[\"text-max-width\"]),\"text-line-height\":new wi(Lt.layout_symbol[\"text-line-height\"]),\"text-letter-spacing\":new Ti(Lt.layout_symbol[\"text-letter-spacing\"]),\"text-justify\":new Ti(Lt.layout_symbol[\"text-justify\"]),\"text-radial-offset\":new Ti(Lt.layout_symbol[\"text-radial-offset\"]),\"text-variable-anchor\":new wi(Lt.layout_symbol[\"text-variable-anchor\"]),\"text-anchor\":new Ti(Lt.layout_symbol[\"text-anchor\"]),\"text-max-angle\":new wi(Lt.layout_symbol[\"text-max-angle\"]),\"text-writing-mode\":new wi(Lt.layout_symbol[\"text-writing-mode\"]),\"text-rotate\":new Ti(Lt.layout_symbol[\"text-rotate\"]),\"text-padding\":new wi(Lt.layout_symbol[\"text-padding\"]),\"text-keep-upright\":new wi(Lt.layout_symbol[\"text-keep-upright\"]),\"text-transform\":new Ti(Lt.layout_symbol[\"text-transform\"]),\"text-offset\":new Ti(Lt.layout_symbol[\"text-offset\"]),\"text-allow-overlap\":new wi(Lt.layout_symbol[\"text-allow-overlap\"]),\"text-ignore-placement\":new wi(Lt.layout_symbol[\"text-ignore-placement\"]),\"text-optional\":new wi(Lt.layout_symbol[\"text-optional\"])}),Ec={paint:new Si({\"icon-opacity\":new Ti(Lt.paint_symbol[\"icon-opacity\"]),\"icon-color\":new Ti(Lt.paint_symbol[\"icon-color\"]),\"icon-halo-color\":new Ti(Lt.paint_symbol[\"icon-halo-color\"]),\"icon-halo-width\":new Ti(Lt.paint_symbol[\"icon-halo-width\"]),\"icon-halo-blur\":new Ti(Lt.paint_symbol[\"icon-halo-blur\"]),\"icon-translate\":new wi(Lt.paint_symbol[\"icon-translate\"]),\"icon-translate-anchor\":new wi(Lt.paint_symbol[\"icon-translate-anchor\"]),\"text-opacity\":new Ti(Lt.paint_symbol[\"text-opacity\"]),\"text-color\":new Ti(Lt.paint_symbol[\"text-color\"],{runtimeType:Ut,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),\"text-halo-color\":new Ti(Lt.paint_symbol[\"text-halo-color\"]),\"text-halo-width\":new Ti(Lt.paint_symbol[\"text-halo-width\"]),\"text-halo-blur\":new Ti(Lt.paint_symbol[\"text-halo-blur\"]),\"text-translate\":new wi(Lt.paint_symbol[\"text-translate\"]),\"text-translate-anchor\":new wi(Lt.paint_symbol[\"text-translate-anchor\"])}),layout:Sc},Lc=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Ft,this.defaultValue=t};Lc.prototype.evaluate=function(t){if(t.formattedSection){var e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default},Lc.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},Lc.prototype.outputDefined=function(){return!1},Lc.prototype.serialize=function(){return null},Nn(\"FormatSectionOverride\",Lc,{omit:[\"defaultValue\"]});var Cc=function(t){function e(e){t.call(this,e,Ec)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e,r){if(t.prototype.recalculate.call(this,e,r),\"auto\"===this.layout.get(\"icon-rotation-alignment\")&&(\"point\"!==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\")&&(\"point\"!==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\")),\"point\"===this.layout.get(\"symbol-placement\")){var n=this.layout.get(\"text-writing-mode\");if(n){for(var i=[],a=0,o=n;a\",targetMapId:n,sourceMapId:a.mapId})}}},qc.prototype.receive=function(t){var e=t.data,r=e.id;if(r&&(!e.targetMapId||this.mapId===e.targetMapId))if(\"\"===e.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else k()||e.mustQueue?(this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,e)},qc.prototype.process=function(){if(this.taskQueue.length){var t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}},qc.prototype.processTask=function(t,e){var r=this;if(\"\"===e.type){var n=this.callbacks[t];delete this.callbacks[t],n&&(e.error?n(qn(e.error)):n(null,qn(e.data)))}else{var i=!1,a=S(this.globalScope)?void 0:[],o=e.hasCallback?function(e,n){i=!0,delete r.cancelCallbacks[t],r.target.postMessage({id:t,type:\"\",sourceMapId:r.mapId,error:e?Hn(e):null,data:Hn(n,a)},a)}:function(t){i=!0},s=null,l=qn(e.data);if(this.parent[e.type])s=this.parent[e.type](e.sourceMapId,l,o);else if(this.parent.getWorkerSource){var c=e.type.split(\".\");s=this.parent.getWorkerSource(e.sourceMapId,c[0],l.source)[c[1]](l,o)}else o(new Error(\"Could not find function \"+e.type));!i&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},qc.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener(\"message\",this.receive,!1)};var Yc=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]))};Yc.prototype.setNorthEast=function(t){return this._ne=t instanceof Wc?new Wc(t.lng,t.lat):Wc.convert(t),this},Yc.prototype.setSouthWest=function(t){return this._sw=t instanceof Wc?new Wc(t.lng,t.lat):Wc.convert(t),this},Yc.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof Wc)e=t,r=t;else{if(!(t instanceof Yc)){if(Array.isArray(t)){if(4===t.length||t.every(Array.isArray)){var a=t;return this.extend(Yc.convert(a))}var o=t;return this.extend(Wc.convert(o))}return 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 Wc(e.lng,e.lat),this._ne=new Wc(r.lng,r.lat)),this},Yc.prototype.getCenter=function(){return new Wc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Yc.prototype.getSouthWest=function(){return this._sw},Yc.prototype.getNorthEast=function(){return this._ne},Yc.prototype.getNorthWest=function(){return new Wc(this.getWest(),this.getNorth())},Yc.prototype.getSouthEast=function(){return new Wc(this.getEast(),this.getSouth())},Yc.prototype.getWest=function(){return this._sw.lng},Yc.prototype.getSouth=function(){return this._sw.lat},Yc.prototype.getEast=function(){return this._ne.lng},Yc.prototype.getNorth=function(){return this._ne.lat},Yc.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Yc.prototype.toString=function(){return\"LngLatBounds(\"+this._sw.toString()+\", \"+this._ne.toString()+\")\"},Yc.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Yc.prototype.contains=function(t){var e=Wc.convert(t),r=e.lng,n=e.lat,i=this._sw.lat<=n&&n<=this._ne.lat,a=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=r&&r>=this._ne.lng),i&&a},Yc.convert=function(t){return!t||t instanceof Yc?t:new Yc(t)};var Wc=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\")};Wc.prototype.wrap=function(){return new Wc(c(this.lng,-180,180),this.lat)},Wc.prototype.toArray=function(){return[this.lng,this.lat]},Wc.prototype.toString=function(){return\"LngLat(\"+this.lng+\", \"+this.lat+\")\"},Wc.prototype.distanceTo=function(t){var e=Math.PI/180,r=this.lat*e,n=t.lat*e,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((t.lng-this.lng)*e);return 6371008.8*Math.acos(Math.min(i,1))},Wc.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new Yc(new Wc(this.lng-r,this.lat-e),new Wc(this.lng+r,this.lat+e))},Wc.convert=function(t){if(t instanceof Wc)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Wc(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&\"object\"==typeof t&&null!==t)return new Wc(Number(\"lng\"in t?t.lng:t.lon),Number(t.lat));throw new Error(\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]\")};var Xc=2*Math.PI*6371008.8;function Zc(t){return Xc*Math.cos(t*Math.PI/180)}function Jc(t){return(180+t)/360}function Kc(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Qc(t,e){return t/Zc(e)}function $c(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}var tu=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};tu.fromLngLat=function(t,e){void 0===e&&(e=0);var r=Wc.convert(t);return new tu(Jc(r.lng),Kc(r.lat),Qc(e,r.lat))},tu.prototype.toLngLat=function(){return new Wc(360*this.x-180,$c(this.y))},tu.prototype.toAltitude=function(){return t=this.z,e=this.y,t*Zc($c(e));var t,e},tu.prototype.meterInMercatorCoordinateUnits=function(){return 1/Xc*(t=$c(this.y),1/Math.cos(t*Math.PI/180));var t};var eu=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=iu(0,t,t,e,r)};eu.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},eu.prototype.url=function(t,e){var r,n,i,a,o,s=(r=this.x,n=this.y,i=this.z,a=Gc(256*r,256*(n=Math.pow(2,i)-n-1),i),o=Gc(256*(r+1),256*(n+1),i),a[0]+\",\"+a[1]+\",\"+o[0]+\",\"+o[1]),l=function(t,e,r){for(var n,i=\"\",a=t;a>0;a--)i+=(e&(n=1<this.canonical.z?new nu(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new nu(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},nu.prototype.calculateScaledKey=function(t,e){var r=this.canonical.z-t;return t>this.canonical.z?iu(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):iu(this.wrap*+e,t,t,this.canonical.x>>r,this.canonical.y>>r)},nu.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ>e&&t.canonical.y===this.canonical.y>>e},nu.prototype.children=function(t){if(this.overscaledZ>=t)return[new nu(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 nu(e,this.wrap,e,r,n),new nu(e,this.wrap,e,r+1,n),new nu(e,this.wrap,e,r,n+1),new nu(e,this.wrap,e,r+1,n+1)]},nu.prototype.isLessThan=function(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.y=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError(\"out of range source coordinates for DEM data\");return(e+1)*this.stride+(t+1)},au.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},au.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},au.prototype.getPixels=function(){return new Eo({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},au.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw new Error(\"dem dimension mismatch\");var n=e*this.dim,i=e*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(e){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:a=o-1;break;case 1:o=a+1}for(var s=-e*this.dim,l=-r*this.dim,c=a;c=0&&u[3]>=0&&s.insert(o,u[0],u[1],u[2],u[3])}},uu.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ls.VectorTile(new al(this.rawTileData)).layers,this.sourceLayerCoder=new ou(this.vtLayers?Object.keys(this.vtLayers).sort():[\"_geojsonTileLayer\"])),this.vtLayers},uu.prototype.query=function(t,e,r,n){var a=this;this.loadVTLayers();for(var o=t.params||{},s=8192/t.tileSize/t.scale,l=sn(o.filter),c=t.queryGeometry,u=t.queryPadding*s,f=hu(c),h=this.grid.query(f.minX-u,f.minY-u,f.maxX+u,f.maxY+u),p=hu(t.cameraQueryGeometry),d=this.grid3D.query(p.minX-u,p.minY-u,p.maxX+u,p.maxY+u,(function(e,r,n,a){return function(t,e,r,n,a){for(var o=0,s=t;o=l.x&&a>=l.y)return!0}var c=[new i(e,r),new i(e,a),new i(n,a),new i(n,r)];if(t.length>2)for(var u=0,f=c;u=0)return!0;return!1}(a,f)){var h=this.sourceLayerCoder.decode(r),p=this.vtLayers[h].feature(n);if(i.filter(new pi(this.tileID.overscaledZ),p))for(var d=this.getId(p,h),g=0;gn)i=!1;else if(e)if(this.expirationTimeot&&(t.getActor().send(\"enforceCacheSizeLimit\",at),ht=0)},t.clamp=l,t.clearTileCache=function(t){var e=self.caches.delete(\"mapbox-tiles\");t&&e.catch(t).then((function(){return t()}))},t.clipLine=ec,t.clone=function(t){var e=new fo(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},t.clone$1=x,t.clone$2=function(t){var e=new fo(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=tl,t.config=F,t.create=function(){var t=new fo(16);return fo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=function(){var t=new fo(9);return fo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},t.create$2=function(){var t=new fo(4);return fo!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=Wr,t.createLayout=Ii,t.createStyleLayer=function(t){return\"custom\"===t.type?new Dc(t):new Rc[t.type](t)},t.cross=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},t.deepEqual=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var n=0;n0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t},t.number=qe,t.offscreenCanvasSupported=pt,t.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},t.parseGlyphPBF=function(t){return new al(t).readFields(Tl,[])},t.pbf=al,t.performSymbolLayout=function(t,e,r,n,i,a,o){t.createArrays();var s=512*t.overscaling;t.tilePixelRatio=8192/s,t.compareText={},t.iconsNeedLinear=!1;var l=t.layers[0].layout,c=t.layers[0]._unevaluatedLayout._values,u={};if(\"composite\"===t.textSizeData.kind){var f=t.textSizeData,h=f.minZoom,p=f.maxZoom;u.compositeTextSizes=[c[\"text-size\"].possiblyEvaluate(new pi(h),o),c[\"text-size\"].possiblyEvaluate(new pi(p),o)]}if(\"composite\"===t.iconSizeData.kind){var d=t.iconSizeData,g=d.minZoom,m=d.maxZoom;u.compositeIconSizes=[c[\"icon-size\"].possiblyEvaluate(new pi(g),o),c[\"icon-size\"].possiblyEvaluate(new pi(m),o)]}u.layoutTextSize=c[\"text-size\"].possiblyEvaluate(new pi(t.zoom+1),o),u.layoutIconSize=c[\"icon-size\"].possiblyEvaluate(new pi(t.zoom+1),o),u.textMaxSize=c[\"text-size\"].possiblyEvaluate(new pi(18));for(var v=24*l.get(\"text-line-height\"),y=\"map\"===l.get(\"text-rotation-alignment\")&&\"point\"!==l.get(\"symbol-placement\"),x=l.get(\"text-keep-upright\"),b=l.get(\"text-size\"),w=function(){var a=k[T],s=l.get(\"text-font\").evaluate(a,{},o).join(\",\"),c=b.evaluate(a,{},o),f=u.layoutTextSize.evaluate(a,{},o),h=u.layoutIconSize.evaluate(a,{},o),p={horizontal:{},vertical:void 0},d=a.text,g=[0,0];if(d){var m=d.toString(),w=24*l.get(\"text-letter-spacing\").evaluate(a,{},o),A=function(t){for(var e=0,r=t;e=8192||f.y<0||f.y>=8192||function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,w,T,k,A){var M,S,E,L,C,P=t.addToLineVertexArray(e,r),I=0,O=0,z=0,D=0,R=-1,F=-1,B={},N=ya(\"\"),j=0,U=0;void 0===s._unevaluatedLayout.getValue(\"text-radial-offset\")?(M=s.layout.get(\"text-offset\").evaluate(b,{},k).map((function(t){return 24*t})),j=M[0],U=M[1]):(j=24*s.layout.get(\"text-radial-offset\").evaluate(b,{},k),U=pc);if(t.allowVerticalPlacement&&n.vertical){var V=s.layout.get(\"text-rotate\").evaluate(b,{},k)+90,H=n.vertical;L=new sc(l,e,c,u,f,H,h,p,d,V),o&&(C=new sc(l,e,c,u,f,o,m,v,d,V))}if(i){var q=s.layout.get(\"icon-rotate\").evaluate(b,{}),G=\"none\"!==s.layout.get(\"icon-text-fit\"),Y=rc(i,q,T,G),W=o?rc(o,q,T,G):void 0;E=new sc(l,e,c,u,f,i,m,v,!1,q),I=4*Y.length;var X=t.iconSizeData,Z=null;\"source\"===X.kind?(Z=[128*s.layout.get(\"icon-size\").evaluate(b,{})])[0]>32640&&_(t.layerIds[0]+': Value for \"icon-size\" is >= 255. Reduce your \"icon-size\".'):\"composite\"===X.kind&&((Z=[128*w.compositeIconSizes[0].evaluate(b,{},k),128*w.compositeIconSizes[1].evaluate(b,{},k)])[0]>32640||Z[1]>32640)&&_(t.layerIds[0]+': Value for \"icon-size\" is >= 255. Reduce your \"icon-size\".'),t.addSymbols(t.icon,Y,Z,x,y,b,!1,e,P.lineStartIndex,P.lineLength,-1,k),R=t.icon.placedSymbolArray.length-1,W&&(O=4*W.length,t.addSymbols(t.icon,W,Z,x,y,b,Cl.vertical,e,P.lineStartIndex,P.lineLength,-1,k),F=t.icon.placedSymbolArray.length-1)}for(var J in n.horizontal){var K=n.horizontal[J];if(!S){N=ya(K.text);var Q=s.layout.get(\"text-rotate\").evaluate(b,{},k);S=new sc(l,e,c,u,f,K,h,p,d,Q)}var $=1===K.positionedLines.length;if(z+=mc(t,e,K,a,s,d,b,g,P,n.vertical?Cl.horizontal:Cl.horizontalOnly,$?Object.keys(n.horizontal):[J],B,R,w,k),$)break}n.vertical&&(D+=mc(t,e,n.vertical,a,s,d,b,g,P,Cl.vertical,[\"vertical\"],B,F,w,k));var tt=S?S.boxStartIndex:t.collisionBoxArray.length,et=S?S.boxEndIndex:t.collisionBoxArray.length,rt=L?L.boxStartIndex:t.collisionBoxArray.length,nt=L?L.boxEndIndex:t.collisionBoxArray.length,it=E?E.boxStartIndex:t.collisionBoxArray.length,at=E?E.boxEndIndex:t.collisionBoxArray.length,ot=C?C.boxStartIndex:t.collisionBoxArray.length,st=C?C.boxEndIndex:t.collisionBoxArray.length,lt=-1,ct=function(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e};lt=ct(S,lt),lt=ct(L,lt),lt=ct(E,lt);var ut=(lt=ct(C,lt))>-1?1:0;ut&&(lt*=A/24);t.glyphOffsetArray.length>=Mc.MAX_GLYPHS&&_(\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\");void 0!==b.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey);t.symbolInstances.emplaceBack(e.x,e.y,B.right>=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,R,F,N,tt,et,rt,nt,it,at,ot,st,c,z,D,I,O,ut,0,h,j,U,lt)}(t,f,s,r,n,i,h,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,v,w,A,l,x,T,M,d,e,a,c,u,o)};if(\"line\"===S)for(var P=0,I=ec(e.geometry,0,0,8192,8192);P1){var V=$l(U,k,r.vertical||g,n,24,y);V&&C(U,V)}}else if(\"Polygon\"===e.type)for(var H=0,q=hs(e.geometry,0);H=E.maxzoom))if(\"none\"!==E.visibility)o(S,this.zoom,n),(g[E.id]=E.createBucket({index:u.bucketLayerIDs.length,layers:S,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:b,sourceID:this.source})).populate(_,m,this.tileID.canonical),u.bucketLayerIDs.push(S.map((function(t){return t.id})))}}}var L=t.mapObject(m.glyphDependencies,(function(t){return Object.keys(t).map(Number)}));Object.keys(L).length?a.send(\"getGlyphs\",{uid:this.uid,stacks:L},(function(t,e){f||(f=t,h=e,I.call(l))})):h={};var C=Object.keys(m.iconDependencies);C.length?a.send(\"getImages\",{icons:C,source:this.source,tileID:this.tileID,type:\"icons\"},(function(t,e){f||(f=t,p=e,I.call(l))})):p={};var P=Object.keys(m.patternDependencies);function I(){if(f)return s(f);if(h&&p&&d){var e=new i(h),r=new t.ImageAtlas(p,d);for(var a in g){var l=g[a];l instanceof t.SymbolBucket?(o(l.layers,this.zoom,n),t.performSymbolLayout(l,h,e.positions,p,r.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof t.LineBucket||l instanceof t.FillBucket||l instanceof t.FillExtrusionBucket)&&(o(l.layers,this.zoom,n),l.addFeatures(m,this.tileID.canonical,r.patternPositions))}this.status=\"done\",s(null,{buckets:t.values(g).filter((function(t){return!t.isEmpty()})),featureIndex:u,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?e.positions:null})}}P.length?a.send(\"getImages\",{icons:P,source:this.source,tileID:this.tileID,type:\"patterns\"},(function(t,e){f||(f=t,d=e,I.call(l))})):d={},I.call(this)};var l=function(t,e,r,n){this.actor=t,this.layerIndex=e,this.availableImages=r,this.loadVectorData=n||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(e,r){var n=this,i=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request),s=this.loading[i]=new a(e);s.abort=this.loadVectorData(e,(function(e,a){if(delete n.loading[i],e||!a)return s.status=\"done\",n.loaded[i]=s,r(e);var l=a.rawData,c={};a.expires&&(c.expires=a.expires),a.cacheControl&&(c.cacheControl=a.cacheControl);var u={};if(o){var f=o.finish();f&&(u.resourceTiming=JSON.parse(JSON.stringify(f)))}s.vectorTile=a.vectorTile,s.parse(a.vectorTile,n.layerIndex,n.availableImages,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]=s}))},l.prototype.reloadTile=function(t,e){var r=this,n=this.loaded,i=t.uid,a=this;if(n&&n[i]){var o=n[i];o.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,n){var i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,a.layerIndex,r.availableImages,a.actor,i)),e(t,n)};\"parsing\"===o.status?o.reloadCallback=s:\"done\"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.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()},l.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var c=t.window.ImageBitmap,u=function(){this.loaded={}};u.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,a=e.rawImageData,o=c&&a instanceof c?this.getImageData(a):a,s=new t.DEMData(n,o,i);this.loaded=this.loaded||{},this.loaded[n]=s,r(null,s)},u.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext(\"2d\")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var r=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:r.width,height:r.height},r.data)},u.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var f=function t(e,r){var n,i=e&&e.type;if(\"FeatureCollection\"===i)for(n=0;n=0!=!!e&&t.reverse()}var d=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,g=function(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,\"id\"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};g.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r>31}function P(t,e){for(var r=t.loadGeometry(),n=t.type,i=0,a=0,o=r.length,s=0;s>1;!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),h=Math.max(i,Math.floor(n-l*u/s+f)),p=Math.min(a,Math.floor(n+(s-l)*u/s+f));t(e,r,n,h,p,o)}var d=r[2*n+o],g=i,m=a;for(z(e,r,i,n),r[2*a+o]>d&&z(e,r,i,a);gd;)m--}r[2*i+o]===d?z(e,r,i,m):(m++,z(e,r,m,a)),m<=n&&(i=m+1),n<=m&&(a=m-1)}}(t,e,o,n,i,a%2),O(t,e,r,n,o-1,a+1),O(t,e,r,o+1,i,a+1)}}function z(t,e,r,n){D(t,r,n),D(e,2*r,2*n),D(e,2*r+1,2*n+1)}function D(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function R(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}_.fromVectorTileJs=w,_.fromGeojsonVt=T,_.GeoJSONWrapper=k;var F=function(t){return t[0]},B=function(t){return t[1]},N=function(t,e,r,n,i){void 0===e&&(e=F),void 0===r&&(r=B),void 0===n&&(n=64),void 0===i&&(i=Float64Array),this.nodeSize=n,this.points=t;for(var a=t.length<65536?Uint16Array:Uint32Array,o=this.ids=new a(t.length),s=this.coords=new i(2*t.length),l=0;l=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 m=(f+1)%2;(0===f?r<=s:n<=l)&&(c.push(p),c.push(g-1),c.push(m)),(0===f?i>=s:a>=l)&&(c.push(g+1),c.push(h),c.push(m))}}return u}(this.ids,this.coords,t,e,r,n,this.nodeSize)},N.prototype.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++)R(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];R(d,g,r,n)<=l&&s.push(t[p]);var m=(c+1)%2;(0===c?r-i<=d:n-i<=g)&&(o.push(f),o.push(p-1),o.push(m)),(0===c?r+i>=d:n+i>=g)&&(o.push(p+1),o.push(u),o.push(m))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var j={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},U=function(t){this.options=X(Object.create(j),t),this.trees=new Array(this.options.maxZoom+1)};function V(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function H(t,e){var r=t.geometry.coordinates,n=r[0],i=r[1];return{x:Y(n),y:W(i),zoom:1/0,index:e,parentId:-1}}function q(t){return{type:\"Feature\",id:t.id,properties:G(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 G(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+\"k\":e>=1e3?Math.round(e/100)/10+\"k\":e;return X(X({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function Y(t){return t/360+.5}function W(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 X(t,e){for(var r in e)t[r]=e[r];return t}function Z(t){return t.x}function J(t){return t.y}function K(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 Q(t,e,r,n){var i={id:void 0===t?null:t,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)$(t,e);else if(\"Polygon\"===r||\"MultiLineString\"===r)for(var n=0;n0&&(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=n-r>>1,l=n-r,c=e[r],u=e[r+1],f=e[n],h=e[n+1],p=r+3;po)a=p,o=d;else if(d===o){var g=Math.abs(p-s);gi&&(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 nt(t,e,r,n){for(var i=0;i1?1:r}function ot(t,e,r,n,i,a,o,s){if(n/=e,a>=(r/=e)&&o=n)return null;for(var l=[],c=0;c=r&&d=n)){var g=[];if(\"Point\"===h||\"MultiPoint\"===h)st(f,g,r,n,i);else if(\"LineString\"===h)lt(f,g,r,n,i,!1,s.lineMetrics);else if(\"MultiLineString\"===h)ut(f,g,r,n,i,!1);else if(\"Polygon\"===h)ut(f,g,r,n,i,!0);else if(\"MultiPolygon\"===h)for(var m=0;m=r&&o<=n&&(e.push(t[a]),e.push(t[a+1]),e.push(t[a+2]))}}function lt(t,e,r,n,i,a,o){for(var s,l,c=ct(t),u=0===i?ht:pt,f=t.start,h=0;hr&&(l=u(c,p,d,m,v,r),o&&(c.start=f+s*l)):y>n?x=r&&(l=u(c,p,d,m,v,r),b=!0),x>n&&y<=n&&(l=u(c,p,d,m,v,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&&ft(c,p,d,g),_=c.length-3,a&&_>=3&&(c[_]!==c[0]||c[_+1]!==c[1])&&ft(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 ut(t,e,r,n,i,a){for(var o=0;oo.maxX&&(o.maxX=u),f>o.maxY&&(o.maxY=f)}return o}function xt(t,e,r,n){var i=e.geometry,a=e.type,o=[];if(\"Point\"===a||\"MultiPoint\"===a)for(var s=0;s0&&e.size<(i?o:n))r.numPoints+=e.length/3;else{for(var s=[],l=0;lo)&&(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;n0===e)for(n=0,i=t.length;n24)throw new Error(\"maxZoom should be in the 0-24 range\");if(e.promoteId&&e.generateId)throw new Error(\"promoteId and generateId cannot be used together.\");var n=function(t,e){var r=[];if(\"FeatureCollection\"===t.type)for(var n=0;n=n;c--){var u=+Date.now();s=this._cluster(s,c),this.trees[c]=new N(s,Z,J,a,Float32Array),r&&console.log(\"z%d: %d clusters in %dms\",c,s.length,+Date.now()-u)}return r&&console.timeEnd(\"total time\"),this},U.prototype.getClusters=function(t,e){var r=((t[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,i=180;else if(r>i){var o=this.getClusters([r,n,180,a],e),s=this.getClusters([-180,n,i,a],e);return o.concat(s)}for(var l=this.trees[this._limitZoom(e)],c=[],u=0,f=l.range(Y(r),W(a),Y(i),W(n));u1?this._map(c,!0):null,m=(l<<5)+(e+1)+this.points.length,v=0,y=f;v>5},U.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},U.prototype._map=function(t,e){if(t.numPoints)return e?X({},t.properties):t.properties;var r=this.points[t.index].properties,n=this.options.map(r);return e&&n===r?X({},n):n},_t.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},_t.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<1&&console.time(\"creation\"),h=this.tiles[f]=yt(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<1&&console.time(\"clipping\");var g,m,v,y,x,b,_=.5*l.buffer/l.extent,w=.5-_,T=.5+_,k=1+_;g=m=v=y=null,x=ot(t,u,r-_,r+T,0,h.minX,h.maxX,l),b=ot(t,u,r+w,r+k,0,h.minX,h.maxX,l),t=null,x&&(g=ot(x,u,n-_,n+T,1,h.minY,h.maxY,l),m=ot(x,u,n+w,n+k,1,h.minY,h.maxY,l),x=null),b&&(v=ot(b,u,n-_,n+T,1,h.minY,h.maxY,l),y=ot(b,u,n+w,n+k,1,h.minY,h.maxY,l),b=null),c>1&&console.timeEnd(\"clipping\"),s.push(g||[],e+1,2*r,2*n),s.push(m||[],e+1,2*r,2*n+1),s.push(v||[],e+1,2*r+1,2*n),s.push(y||[],e+1,2*r+1,2*n+1)}}},_t.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<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[wt(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]?mt(this.tiles[s],i):null):null};var kt=function(e){function r(t,r,n,i){e.call(this,t,r,n,Tt),i&&(this.loadGeoJSON=i)}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 e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(n&&n.request&&n.request.collectResourceTiming)&&new t.RequestPerformance(n.request);this.loadGeoJSON(n,(function(a,o){if(a||!o)return r(a);if(\"object\"!=typeof o)return r(new Error(\"Input data given to '\"+n.source+\"' is not a valid GeoJSON object.\"));f(o,!0);try{e._geoJSONIndex=n.cluster?new U(function(e){var r=e.superclusterOptions,n=e.clusterProperties;if(!n||!r)return r;for(var i={},a={},o={accumulated:null,zoom:0},s={properties:null},l=Object.keys(n),c=0,u=l;c=0?0:e.button},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var h=function(e){function r(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requesters=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requesters;e=0?1.2:1))}function v(t,e,r,n,i,a,o){for(var s=0;s65535)e(new Error(\"glyphs > 65535 not supported\"));else if(a.ranges[s])e(null,{stack:r,id:i,glyph:o});else{var l=a.requests[s];l||(l=a.requests[s]=[],x.loadGlyphRange(r,s,n.url,n.requestManager,(function(t,e){if(e){for(var r in e)n._doesCharSupportLocalGlyph(+r)||(a.glyphs[+r]=e[+r]);a.ranges[s]=!0}for(var i=0,o=l;i1&&(l=t[++s]);var u=Math.abs(c-l.left),f=Math.abs(c-l.right),h=Math.min(u,f),p=void 0,d=i/r*(n+1);if(l.isDash){var g=n-Math.abs(d);p=Math.sqrt(h*h+g*g)}else p=n-Math.sqrt(h*h+d*d);this.data[o+c]=Math.max(0,Math.min(255,p+128))}},T.prototype.addRegularDash=function(t){for(var e=t.length-1;e>=0;--e){var r=t[e],n=t[e+1];r.zeroLength?t.splice(e,1):n&&n.isDash===r.isDash&&(n.left=r.left,t.splice(e,1))}var i=t[0],a=t[t.length-1];i.isDash===a.isDash&&(i.left=a.left-this.width,a.right=i.right+this.width);for(var o=this.width*this.nextRow,s=0,l=t[s],c=0;c1&&(l=t[++s]);var u=Math.abs(c-l.left),f=Math.abs(c-l.right),h=Math.min(u,f),p=l.isDash?h:-h;this.data[o+c]=Math.max(0,Math.min(255,p+128))}},T.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=n&&e.x=i&&e.y0&&(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+10&&(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)r.fire(new t.ErrorEvent(e));else{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.getClusterExpansionZoom=function(t,e){return this.actor.send(\"geojson.getClusterExpansionZoom\",{clusterId:t,source:this.id},e),this},r.prototype.getClusterChildren=function(t,e){return this.actor.send(\"geojson.getClusterChildren\",{clusterId:t,source:this.id},e),this},r.prototype.getClusterLeaves=function(t,e,r,n){return this.actor.send(\"geojson.getClusterLeaves\",{source:this.id,clusterId:t,limit:e,offset:r},n),this},r.prototype._updateWorkerData=function(e){var r=this;this._loaded=!1;var n=t.extend({},this.workerOptions),i=this._data;\"string\"==typeof i?(n.request=this.map._requestManager.transformRequest(t.browser.resolveURL(i),t.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(i),this.actor.send(this.type+\".loadData\",n,(function(t,i){r._removed||i&&i.abandoned||(r._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[r.id]&&(r._resourceTiming=i.resourceTiming[r.id].slice(0)),r.actor.send(r.type+\".coalesce\",{source:n.source},null),e(t))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(e,r){var n=this,i=e.actor?\"reloadTile\":\"loadTile\";e.actor=this.actor;var a={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};e.request=this.actor.send(i,a,(function(t,a){return delete e.request,e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(a,n.map.painter,\"reloadTile\"===i),r(null))}))},r.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.actor.send(\"removeTile\",{uid:t.uid,type:this.type,source:this.id})},r.prototype.onRemove=function(){this._removed=!0,this.actor.send(\"removeSource\",{type:this.type,source:this.id})},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),P=t.createLayout([{name:\"a_pos\",type:\"Int16\",components:2},{name:\"a_texture_pos\",type:\"Int16\",components:2}]),I=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._loaded=!1,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(e,r){var n=this;this._loaded=!1,this.fire(new t.Event(\"dataloading\",{dataType:\"source\"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),(function(i,a){n._loaded=!0,i?n.fire(new t.ErrorEvent(i)):a&&(n.image=a,e&&(n.coordinates=e),r&&r(),n._finishLoading())}))},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,(function(){e.texture=null})),this):this},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){var r=this;this.coordinates=e;var n=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var r=1/0,n=1/0,i=-1/0,a=-1/0,o=0,s=e;or.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+this.id,null,\"Playback for this video can be set only between the \"+r.start(0)+\" and \"+r.end(0)+\"-second mark.\"))):this.video.currentTime=e}},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 e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,P.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,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:\"video\",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(I),z=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.ValidationError(\"sources.\"+r,null,'\"coordinates\" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+r,null,'missing required property \"coordinates\"'))),n.animate&&\"boolean\"!=typeof n.animate&&this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+r,null,'optional \"animate\" property must be a boolean value'))),n.canvas?\"string\"==typeof n.canvas||n.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError(\"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.ValidationError(\"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._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.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.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),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 e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,P.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var a=this.tiles[i];\"loaded\"!==a.state&&(a.state=\"loaded\",a.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];tthis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},N.prototype.has=function(t){return t.wrapped().key in this.data},N.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},N.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},N.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},N.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},N.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},N.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},N.prototype.filter=function(t){var e=[];for(var r in this.data)for(var n=0,i=this.data[r];n1||(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._retainLoadedChildren=function(t,e,r,n){for(var i in this._tiles){var a=this._tiles[i];if(!(n[i]||!a.hasData()||a.tileID.overscaledZ<=e||a.tileID.overscaledZ>r)){for(var o=a.tileID;a&&a.tileID.overscaledZ>e+1;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);(a=this._tiles[s.key])&&a.hasData()&&(o=s)}for(var l=o;l.overscaledZ>e;)if(t[(l=l.scaledTo(l.overscaledZ-1)).key]){n[o.key]=o;break}}}},r.prototype.findLoadedParent=function(t,e){if(t.key in this._loadedParentTiles){var r=this._loadedParentTiles[t.key];return r&&r.tileID.overscaledZ>=e?r:null}for(var n=t.overscaledZ-1;n>=e;n--){var i=t.scaledTo(n),a=this._getLoadedTile(i);if(a)return a}},r.prototype._getLoadedTile=function(t){var e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},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 a=e.coveringZoomLevel(this._source),o=Math.max(a-r.maxOverzooming,this._source.minzoom),s=Math.max(a+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,a);if(It(this._source.type)){for(var c={},u={},f=0,h=Object.keys(l);fthis._source.maxzoom){var m=d.children(this._source.maxzoom)[0],v=this.getTile(m);if(v&&v.hasData()){n[m.key]=m;continue}}else{var y=d.children(this._source.maxzoom);if(n[y[0].key]&&n[y[1].key]&&n[y[2].key]&&n[y[3].key])continue}for(var x=g.wasRequested(),b=d.overscaledZ-1;b>=a;--b){var _=d.scaledTo(b);if(i[_.key])break;if(i[_.key]=!0,!(g=this.getTile(_))&&x&&(g=this._addTile(_)),g&&(n[_.key]=_,x=g.wasRequested(),g.hasData()))break}}}return n},r.prototype._updateLoadedParentTileCache=function(){for(var t in this._loadedParentTiles={},this._tiles){for(var e=[],r=void 0,n=this._tiles[t].tileID;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}e.push(n.key);var i=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(i))break;n=i}for(var a=0,o=e;a0||(e.hasData()&&\"reloading\"!==e.state?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,n){var i=this,a=[],o=this.transform;if(!o)return a;for(var s=n?o.getCameraQueryGeometry(e):e,l=e.map((function(t){return o.pointCoordinate(t)})),c=s.map((function(t){return o.pointCoordinate(t)})),u=this.getIds(),f=1/0,h=1/0,p=-1/0,d=-1/0,g=0,m=c;g=0&&v[1].y+m>=0){var y=l.map((function(t){return s.getTilePoint(t)})),x=c.map((function(t){return s.getTilePoint(t)}));a.push({tile:n,tileID:s,queryGeometry:y,cameraQueryGeometry:x,scale:g})}}},x=0;x=t.browser.now())return!0}return!1},r.prototype.setFeatureState=function(t,e,r){t=t||\"_geojsonTileLayer\",this._state.updateState(t,e,r)},r.prototype.removeFeatureState=function(t,e,r){t=t||\"_geojsonTileLayer\",this._state.removeFeatureState(t,e,r)},r.prototype.getFeatureState=function(t,e){return t=t||\"_geojsonTileLayer\",this._state.getState(t,e)},r.prototype.setDependencies=function(t,e,r){var n=this._tiles[t];n&&n.setDependencies(e,r)},r.prototype.reloadTilesForDependencies=function(t,e){for(var r in this._tiles){this._tiles[r].hasDependency(t,e)&&this._reloadTile(r,\"reloading\")}this._cache.filter((function(r){return!r.hasDependency(t,e)}))},r}(t.Evented);function Pt(t,e){var r=Math.abs(2*t.wrap)-+(t.wrap<0),n=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||n-r||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function It(t){return\"raster\"===t||\"image\"===t||\"video\"===t}function Ot(){return new t.window.Worker(Zi.workerUrl)}Ct.maxOverzooming=10,Ct.maxUnderzooming=3;var zt=\"mapboxgl_preloaded_worker_pool\",Dt=function(){this.active={}};Dt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length0?(i-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))};var Kt=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=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function ne(e,r,n,i,a,o,s,l){var c=i?e.textSizeData:e.iconSizeData,u=t.evaluateSizeForZoom(c,n.transform.zoom),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,m=!1,v=0;vMath.abs(n.x-r.x)*i)return{useVertical:!0};return(e===t.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function oe(e,r,n,i,a,o,s,l,c,u,f,h,p,d){var g,m=r/24,v=e.lineOffsetX*m,y=e.lineOffsetY*m;if(e.numGlyphs>1){var x=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,_=e.lineStartIndex+e.lineLength,w=ie(m,l,v,y,n,f,h,e,c,o,p);if(!w)return{notEnoughRoom:!0};var T=te(w.first.point,s).point,k=te(w.last.point,s).point;if(i&&!n){var A=ae(e.writingMode,T,k,d);if(A)return A}g=[w.first];for(var M=e.glyphStartIndex+1;M0?C.point:se(h,L,S,1,a),I=ae(e.writingMode,S,P,d);if(I)return I}var O=le(m*l.getoffsetX(e.glyphStartIndex),v,y,n,f,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,c,o,p);if(!O)return{notEnoughRoom:!0};g=[O]}for(var z=0,D=g;z0?1:-1,g=0;i&&(d*=-1,g=Math.PI),d<0&&(g+=Math.PI);for(var m=d>0?l+s:l+s+1,v=a,y=a,x=0,b=0,_=Math.abs(p),w=[];x+b<=_;){if((m+=d)=c)return null;if(y=v,w.push(v),void 0===(v=h[m])){var T=new t.Point(u.getx(m),u.gety(m)),k=te(T,f);if(k.signedDistanceFromCamera>0)v=h[m]=k.point;else{var A=m-d;v=se(0===x?o:new t.Point(u.getx(A),u.gety(A)),T,y,_-x+1,f)}}x+=b,b=y.dist(v)}var M=(_-x)/b,S=v.sub(y),E=S.mult(M)._add(y);E._add(S._unit()._perp()._mult(n*d));var L=g+Math.atan2(v.y-y.y,v.x-y.x);return w.push(E),{point:E,angle:L,path:w}}Kt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Kt.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)},Kt.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)},Kt.prototype._insertBoxCell=function(t,e,r,n,i,a){this.boxCells[i].push(a)},Kt.prototype._insertCircleCell=function(t,e,r,n,i,a){this.circleCells[i].push(a)},Kt.prototype._query=function(t,e,r,n,i,a){if(r<0||t>this.width||n<0||e>this.height)return!i&&[];var o=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var s=0;s0:o},Kt.prototype._queryCircle=function(t,e,r,n,i){var a=t-r,o=t+r,s=e-r,l=e+r;if(o<0||a>this.width||l<0||s>this.height)return!n&&[];var c=[],u={hitTest:n,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(a,s,o,l,this._queryCellCircle,c,u,i),n?c.length>0:c},Kt.prototype.query=function(t,e,r,n,i){return this._query(t,e,r,n,!1,i)},Kt.prototype.hitTest=function(t,e,r,n,i){return this._query(t,e,r,n,!0,i)},Kt.prototype.hitTestCircle=function(t,e,r,n){return this._queryCircle(t,e,r,!0,n)},Kt.prototype._queryCell=function(t,e,r,n,i,a,o,s){var l=o.seenUids,c=this.boxCells[i];if(null!==c)for(var u=this.bboxes,f=0,h=c;f=u[d+0]&&n>=u[d+1]&&(!s||s(this.boxKeys[p]))){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[p],x1:u[d],y1:u[d+1],x2:u[d+2],y2:u[d+3]})}}}var g=this.circleCells[i];if(null!==g)for(var m=this.circles,v=0,y=g;vo*o+s*s},Kt.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 ce=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ue(t,e){for(var r=0;r=1;P--)C.push(E.path[P]);for(var I=1;I0){for(var R=C[0].clone(),F=C[0].clone(),B=1;B=A.x&&F.x<=M.x&&R.y>=A.y&&F.y<=M.y?[C]:F.xM.x||F.yM.y?[]:t.clipLine([C],A.x,A.y,M.x,M.y)}for(var N=0,j=D;N=this.screenRightBoundary||n<100||e>this.screenBottomBoundary},he.prototype.isInsideGrid=function(t,e,r,n){return r>=0&&t=0&&e0)return this.prevPlacement&&this.prevPlacement.variableOffsets[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID].text&&(g=this.prevPlacement.variableOffsets[f.crossTileID].anchor),this.variableOffsets[f.crossTileID]={textOffset:m,width:r,height:n,anchor:t,textBoxScale:i,prevAnchor:g},this.markUsedJustification(h,t,f,p),h.allowVerticalPlacement&&(this.markUsedOrientation(h,p,f),this.placedOrientations[f.crossTileID]=p),{shift:v,placedGlyphBoxes:y}},we.prototype.placeLayerBucketPart=function(e,r,n){var i=this,a=e.parameters,o=a.bucket,s=a.layout,l=a.posMatrix,c=a.textLabelPlaneMatrix,u=a.labelToScreenMatrix,f=a.textPixelRatio,h=a.holdingForFade,p=a.collisionBoxArray,d=a.partiallyEvaluatedTextSize,g=a.collisionGroup,m=s.get(\"text-optional\"),v=s.get(\"icon-optional\"),y=s.get(\"text-allow-overlap\"),x=s.get(\"icon-allow-overlap\"),b=\"map\"===s.get(\"text-rotation-alignment\"),_=\"map\"===s.get(\"text-pitch-alignment\"),w=\"none\"!==s.get(\"icon-text-fit\"),T=\"viewport-y\"===s.get(\"symbol-z-order\"),k=y&&(x||!o.hasIconData()||v),A=x&&(y||!o.hasTextData()||m);!o.collisionArrays&&p&&o.deserializeCollisionBoxes(p);var M=function(e,a){if(!r[e.crossTileID])if(h)i.placements[e.crossTileID]=new me(!1,!1,!1);else{var p,T=!1,M=!1,S=!0,E=null,L={box:null,offscreen:null},C={box:null,offscreen:null},P=null,I=null,O=0,z=0,D=0;a.textFeatureIndex?O=a.textFeatureIndex:e.useRuntimeCollisionCircles&&(O=e.featureIndex),a.verticalTextFeatureIndex&&(z=a.verticalTextFeatureIndex);var R=a.textBox;if(R){var F=function(r){var n=t.WritingMode.horizontal;if(o.allowVerticalPlacement&&!r&&i.prevPlacement){var a=i.prevPlacement.placedOrientations[e.crossTileID];a&&(i.placedOrientations[e.crossTileID]=a,n=a,i.markUsedOrientation(o,n,e))}return n},B=function(r,n){if(o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&a.verticalTextBox)for(var i=0,s=o.writingModes;i0&&(N=N.filter((function(t){return t!==j.anchor}))).unshift(j.anchor)}var U=function(t,r,n){for(var a=t.x2-t.x1,s=t.y2-t.y1,c=e.textBoxScale,u=w&&!x?r:null,h={box:[],offscreen:!1},p=y?2*N.length:N.length,d=0;d=N.length,k=i.attemptAnchorPlacement(m,t,a,s,c,b,_,f,l,g,v,e,o,n,u);if(k&&(h=k.placedGlyphBoxes)&&h.box&&h.box.length){T=!0,E=k.shift;break}}return h};B((function(){return U(R,a.iconBox,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox,n=L&&L.box&&L.box.length;return o.allowVerticalPlacement&&!n&&e.numVerticalGlyphVertices>0&&r?U(r,a.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}})),L&&(T=L.box,S=L.offscreen);var V=F(L&&L.box);if(!T&&i.prevPlacement){var H=i.prevPlacement.variableOffsets[e.crossTileID];H&&(i.variableOffsets[e.crossTileID]=H,i.markUsedJustification(o,H.anchor,e,V))}}else{var q=function(t,r){var n=i.collisionIndex.placeCollisionBox(t,y,f,l,g.predicate);return n&&n.box&&n.box.length&&(i.markUsedOrientation(o,r,e),i.placedOrientations[e.crossTileID]=r),n};B((function(){return q(R,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox;return o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?q(r,t.WritingMode.vertical):{box:null,offscreen:null}})),F(L&&L.box&&L.box.length)}}if(T=(p=L)&&p.box&&p.box.length>0,S=p&&p.offscreen,e.useRuntimeCollisionCircles){var G=o.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),Y=t.evaluateSizeForFeature(o.textSizeData,d,G),W=s.get(\"text-padding\"),X=e.collisionCircleDiameter;P=i.collisionIndex.placeCollisionCircles(y,G,o.lineVertexArray,o.glyphOffsetArray,Y,l,c,u,n,_,g.predicate,X,W),T=y||P.circles.length>0&&!P.collisionDetected,S=S&&P.offscreen}if(a.iconFeatureIndex&&(D=a.iconFeatureIndex),a.iconBox){var Z=function(t){var e=w&&E?_e(t,E.x,E.y,b,_,i.transform.angle):t;return i.collisionIndex.placeCollisionBox(e,x,f,l,g.predicate)};M=C&&C.box&&C.box.length&&a.verticalIconBox?(I=Z(a.verticalIconBox)).box.length>0:(I=Z(a.iconBox)).box.length>0,S=S&&I.offscreen}var J=m||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,K=v||0===e.numIconVertices;if(J||K?K?J||(M=M&&T):T=M&&T:M=T=M&&T,T&&p&&p.box&&(C&&C.box&&z?i.collisionIndex.insertCollisionBox(p.box,s.get(\"text-ignore-placement\"),o.bucketInstanceId,z,g.ID):i.collisionIndex.insertCollisionBox(p.box,s.get(\"text-ignore-placement\"),o.bucketInstanceId,O,g.ID)),M&&I&&i.collisionIndex.insertCollisionBox(I.box,s.get(\"icon-ignore-placement\"),o.bucketInstanceId,D,g.ID),P&&(T&&i.collisionIndex.insertCollisionCircles(P.circles,s.get(\"text-ignore-placement\"),o.bucketInstanceId,O,g.ID),n)){var Q=o.bucketInstanceId,$=i.collisionCircleArrays[Q];void 0===$&&($=i.collisionCircleArrays[Q]=new ve);for(var tt=0;tt=0;--E){var L=S[E];M(o.symbolInstances.get(L),o.collisionArrays[L])}else for(var C=e.symbolInstanceStart;C=0&&(e.text.placedSymbolArray.get(c).crossTileID=a>=0&&c!==a?0:n.crossTileID)}},we.prototype.markUsedOrientation=function(e,r,n){for(var i=r===t.WritingMode.horizontal||r===t.WritingMode.horizontalOnly?r:0,a=r===t.WritingMode.vertical?r:0,o=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];o0||l>0,x=a.numIconVertices>0,b=i.placedOrientations[a.crossTileID],_=b===t.WritingMode.vertical,w=b===t.WritingMode.horizontal||b===t.WritingMode.horizontalOnly;if(y){var T=Pe(v.text),k=_?Ie:T;d(e.text,s,k);var A=w?Ie:T;d(e.text,l,A);var M=v.text.isHidden();[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach((function(t){t>=0&&(e.text.placedSymbolArray.get(t).hidden=M||_?1:0)})),a.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).hidden=M||w?1:0);var S=i.variableOffsets[a.crossTileID];S&&i.markUsedJustification(e,S.anchor,a,b);var E=i.placedOrientations[a.crossTileID];E&&(i.markUsedJustification(e,\"left\",a,E),i.markUsedOrientation(e,E,a))}if(x){var L=Pe(v.icon),C=!(h&&a.verticalPlacedIconSymbolIndex&&_);if(a.placedIconSymbolIndex>=0){var P=C?L:Ie;d(e.icon,a.numIconVertices,P),e.icon.placedSymbolArray.get(a.placedIconSymbolIndex).hidden=v.icon.isHidden()}if(a.verticalPlacedIconSymbolIndex>=0){var I=C?Ie:L;d(e.icon,a.numVerticalIconVertices,I),e.icon.placedSymbolArray.get(a.verticalPlacedIconSymbolIndex).hidden=v.icon.isHidden()}}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var O=e.collisionArrays[n];if(O){var z=new t.Point(0,0);if(O.textBox||O.verticalTextBox){var D=!0;if(c){var R=i.variableOffsets[g];R?(z=be(R.anchor,R.width,R.height,R.textOffset,R.textBoxScale),u&&z._rotate(f?i.transform.angle:-i.transform.angle)):D=!1}O.textBox&&Te(e.textCollisionBox.collisionVertexArray,v.text.placed,!D||_,z.x,z.y),O.verticalTextBox&&Te(e.textCollisionBox.collisionVertexArray,v.text.placed,!D||w,z.x,z.y)}var F=Boolean(!w&&O.verticalIconBox);O.iconBox&&Te(e.iconCollisionBox.collisionVertexArray,v.icon.placed,F,h?z.x:0,h?z.y:0),O.verticalIconBox&&Te(e.iconCollisionBox.collisionVertexArray,v.icon.placed,!F,h?z.x:0,h?z.y:0)}}},m=0;mt},we.prototype.setStale=function(){this.stale=!0};var ke=Math.pow(2,25),Ae=Math.pow(2,24),Me=Math.pow(2,17),Se=Math.pow(2,16),Ee=Math.pow(2,9),Le=Math.pow(2,8),Ce=Math.pow(2,1);function Pe(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*ke+e*Ae+r*Me+e*Se+r*Ee+e*Le+r*Ce+e}var Ie=0,Oe=function(t){this._sortAcrossTiles=\"viewport-y\"!==t.layout.get(\"symbol-z-order\")&&void 0!==t.layout.get(\"symbol-sort-key\").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Oe.prototype.continuePlacement=function(t,e,r,n,i){for(var a=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=r[e[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if(\"symbol\"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new Oe(s)),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},ze.prototype.commit=function(t){return this.placement.commit(t),this.placement};var De=512/t.EXTENT/2,Re=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;nt.overscaledZ)for(var s in o){var l=o[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,i)}else{var c=o[t.scaledTo(Number(a)).key];c&&c.findMatches(e.symbolInstances,t,i)}}for(var u=0;u1?\"@2x\":\"\",l=t.getJSON(r.transformRequest(r.normalizeSpriteURL(e,s,\".json\"),t.ResourceType.SpriteJSON),(function(t,e){l=null,o||(o=t,i=e,u())})),c=t.getImage(r.transformRequest(r.normalizeSpriteURL(e,s,\".png\"),t.ResourceType.SpriteImage),(function(t,e){c=null,o||(o=t,a=e,u())}));function u(){if(o)n(o);else if(i&&a){var e=t.browser.getImageData(a),r={};for(var s in i){var l=i[s],c=l.width,u=l.height,f=l.x,h=l.y,p=l.sdf,d=l.pixelRatio,g=l.stretchX,m=l.stretchY,v=l.content,y=new t.RGBAImage({width:c,height:u});t.RGBAImage.copy(e,y,{x:f,y:h},{x:0,y:0},{width:c,height:u}),r[s]={data:y,pixelRatio:d,sdf:p,stretchX:g,stretchY:m,content:v}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(e,this.map._requestManager,(function(e,n){if(r._spriteRequest=null,e)r.fire(new t.ErrorEvent(e));else if(n)for(var i in n)r.imageManager.addImage(i,n[i]);r.imageManager.setLoaded(!0),r._availableImages=r.imageManager.listImages(),r.dispatcher.broadcast(\"setImages\",r._availableImages),r.fire(new t.Event(\"data\",{dataType:\"style\"}))}))},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){for(var e=[],r=0,n=t;r0)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._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event(\"data\",{dataType:\"style\"}))},r.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},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._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event(\"data\",{dataType:\"style\"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(e,r,n){var i=this;if(void 0===n&&(n={}),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 Ct(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){void 0===n&&(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{var a;if(\"custom\"===e.type){if(je(this,t.validateCustomStyleLayer(e)))return;a=t.createStyleLayer(e)}else{if(\"object\"==typeof e.source&&(this.addSource(i,e.source),e=t.clone$1(e),e=t.extend(e,{source:i})),this._validate(t.validateStyle.layer,\"layers.\"+i,e,{arrayIndex:-1},n))return;a=t.createStyleLayer(e),this._validateLayer(a),a.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[a.id]=a.serialize()}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&&\"custom\"!==a.type){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),a.onAdd&&a.onAdd(this.map)}}},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._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}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.hasLayer=function(t){return t in this._layers},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,n){void 0===n&&(n={}),this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.deepEqual(i.filter,r))return null==r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(t.validateStyle.filter,\"layers.\"+i.id+\".filter\",r,null,n)||(i.filter=t.clone$1(r),this._updateLayer(i)))}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$1(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getLayoutProperty(r),n)||(a.setLayoutProperty(r,n,i),this._updateLayer(a)):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(e,r){var n=this.getLayer(e);if(n)return n.getLayoutProperty(r);this.fire(new t.ErrorEvent(new Error(\"The layer '\"+e+\"' does not exist in the map's style.\")))},r.prototype.setPaintProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getPaintProperty(r),n)||(a.setPaintProperty(r,n,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[e]=!0):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.setFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=e.sourceLayer,a=this.sourceCaches[n];if(void 0!==a){var o=a.getSource().type;\"geojson\"===o&&i?this.fire(new t.ErrorEvent(new Error(\"GeoJSON sources cannot have a sourceLayer parameter.\"))):\"vector\"!==o||i?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error(\"The feature id parameter must be provided.\"))),a.setFeatureState(i,e.id,r)):this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+n+\"' does not exist in the map's style.\")))},r.prototype.removeFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=this.sourceCaches[n];if(void 0!==i){var a=i.getSource().type,o=\"vector\"===a?e.sourceLayer:void 0;\"vector\"!==a||o?r&&\"string\"!=typeof e.id&&\"number\"!=typeof e.id?this.fire(new t.ErrorEvent(new Error(\"A feature id is required to remove its specific state property.\"))):i.removeFeatureState(o,e.id,r):this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+n+\"' does not exist in the map's style.\")))},r.prototype.getFeatureState=function(e){this._checkLoaded();var r=e.source,n=e.sourceLayer,i=this.sourceCaches[r];if(void 0!==i){if(\"vector\"!==i.getSource().type||n)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error(\"The feature id parameter must be provided.\"))),i.getFeatureState(n,e.id);this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+r+\"' does not exist in the map's style.\")))},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){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._serializeLayers(this._order)},(function(t){return void 0!==t}))},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&\"raster\"!==this.sourceCaches[t.source].getSource().type&&(this._updatedSources[t.source]=\"reload\",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,r=function(t){return\"fill-extrusion\"===e._layers[t].type},n={},i=[],a=this._order.length-1;a>=0;a--){var o=this._order[a];if(r(o)){n[o]=a;for(var s=0,l=t;s=0;d--){var g=this._order[d];if(r(g))for(var m=i.length-1;m>=0;m--){var v=i[m].feature;if(n[v.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}\",\"attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}\"),tr=yr(\"varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}\",\"attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}\"),er=yr(\"uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}\",\"attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}\"),rr=yr(\"#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float opacity\\ngl_FragColor=color*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"attribute vec2 a_pos;uniform mat4 u_matrix;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float opacity\\ngl_Position=u_matrix*vec4(a_pos,0,1);}\"),nr=yr(\"varying vec2 v_pos;\\n#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 outline_color\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\\n#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 outline_color\\n#pragma mapbox: initialize lowp float opacity\\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}\"),ir=yr(\"uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}\"),ar=yr(\"uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}\"),or=yr(\"varying vec4 v_color;void main() {gl_FragColor=v_color;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\\n#pragma mapbox: define highp float base\\n#pragma mapbox: define highp float height\\n#pragma mapbox: define highp vec4 color\\nvoid main() {\\n#pragma mapbox: initialize highp float base\\n#pragma mapbox: initialize highp float height\\n#pragma mapbox: initialize highp vec4 color\\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}\"),sr=yr(\"uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float base\\n#pragma mapbox: initialize lowp float height\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float base\\n#pragma mapbox: initialize lowp float height\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\\n? a_pos\\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}\"),lr=yr(\"#ifdef GL_ES\\nprecision highp float;\\n#endif\\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}\"),cr=yr(\"uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\\n#define PI 3.141592653589793\\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}\"),ur=yr(\"uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\\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\\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\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}\"),fr=yr(\"uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define MAX_LINE_DISTANCE 32767.0\\n#define scale 0.015873016\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\\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\\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\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}\"),hr=yr(\"uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\\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#pragma mapbox: define lowp float floorwidth\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\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#pragma mapbox: initialize lowp float floorwidth\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}\"),pr=yr(\"uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\\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\\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\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\\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\\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\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}\"),dr=yr(\"uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}\"),gr=yr(\"uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}\"),mr=yr(\"#define SDF_PX 8.0\\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\\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\\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\\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\\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\\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\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}\"),vr=yr(\"#define SDF_PX 8.0\\n#define SDF 1.0\\n#define ICON 0.0\\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\\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\\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\\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\\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\\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\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}\");function yr(t,e){var r=/#pragma mapbox: ([\\w]+) ([\\w]+) ([\\w]+) ([\\w]+)/g,n={};return{fragmentSource:t=t.replace(r,(function(t,e,r,i,a){return n[a]=!0,\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nvarying \"+r+\" \"+i+\" \"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"\\n#ifdef HAS_UNIFORM_u_\"+a+\"\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\"})),vertexSource:e=e.replace(r,(function(t,e,r,i,a){var o=\"float\"===i?\"vec2\":\"vec4\",s=a.match(/color/)?\"color\":o;return n[a]?\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nuniform lowp float u_\"+a+\"_t;\\nattribute \"+r+\" \"+o+\" a_\"+a+\";\\nvarying \"+r+\" \"+i+\" \"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"vec4\"===s?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+a+\" = a_\"+a+\";\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+a+\" = unpack_mix_\"+s+\"(a_\"+a+\", u_\"+a+\"_t);\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nuniform lowp float u_\"+a+\"_t;\\nattribute \"+r+\" \"+o+\" a_\"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"vec4\"===s?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+r+\" \"+i+\" \"+a+\" = a_\"+a+\";\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n \"+r+\" \"+i+\" \"+a+\" = unpack_mix_\"+s+\"(a_\"+a+\", u_\"+a+\"_t);\\n#else\\n \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\"}))}}var xr=Object.freeze({__proto__:null,prelude:Ye,background:We,backgroundPattern:Xe,circle:Ze,clippingMask:Je,heatmap:Ke,heatmapTexture:Qe,collisionBox:$e,collisionCircle:tr,debug:er,fill:rr,fillOutline:nr,fillOutlinePattern:ir,fillPattern:ar,fillExtrusion:or,fillExtrusionPattern:sr,hillshadePrepare:lr,hillshade:cr,line:ur,lineGradient:fr,linePattern:hr,lineSDF:pr,raster:dr,symbolIcon:gr,symbolSDF:mr,symbolTextAndIcon:vr}),br=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};br.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>16,s>>16],u_pixel_coord_lower:[65535&o,65535&s]}}_r.prototype.draw=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g){var m,v=t.gl;if(!this.failedToCreate){for(var y in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(n),t.setColorMode(i),t.setCullFace(a),this.fixedUniforms)this.fixedUniforms[y].set(o[y]);p&&p.setUniforms(t,this.binderUniforms,f,{zoom:h});for(var x=(m={},m[v.LINES]=2,m[v.TRIANGLES]=3,m[v.LINE_STRIP]=1,m)[e],b=0,_=u.get();b<_.length;b+=1){var w=_[b],T=w.vaos||(w.vaos={});(T[s]||(T[s]=new br)).bind(t,this,l,p?p.getPaintVertexBuffers():[],c,w.vertexOffset,d,g),v.drawElements(e,w.primitiveLength*x,v.UNSIGNED_SHORT,w.primitiveOffset*x*2)}}};var Tr=function(e,r,n,i){var a=r.style.light,o=a.properties.get(\"position\"),s=[o.x,o.y,o.z],l=t.create$1();\"viewport\"===a.properties.get(\"anchor\")&&t.fromRotation(l,-r.transform.angle),t.transformMat3(s,s,l);var c=a.properties.get(\"color\");return{u_matrix:e,u_lightpos:s,u_lightintensity:a.properties.get(\"intensity\"),u_lightcolor:[c.r,c.g,c.b],u_vertical_gradient:+n,u_opacity:i}},kr=function(e,r,n,i,a,o,s){return t.extend(Tr(e,r,n,i),wr(o,r,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8})},Ar=function(t){return{u_matrix:t}},Mr=function(e,r,n,i){return t.extend(Ar(e),wr(n,r,i))},Sr=function(t,e){return{u_matrix:t,u_world:e}},Er=function(e,r,n,i,a){return t.extend(Mr(e,r,n,i),{u_world:a})},Lr=function(e,r,n,i){var a,o,s=e.transform;if(\"map\"===i.paint.get(\"circle-pitch-alignment\")){var l=pe(n,1,s.zoom);a=!0,o=[l,l]}else a=!1,o=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+(\"map\"===i.paint.get(\"circle-pitch-scale\")),u_matrix:e.translatePosMatrix(r.posMatrix,n,i.paint.get(\"circle-translate\"),i.paint.get(\"circle-translate-anchor\")),u_pitch_with_map:+a,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:o}},Cr=function(t,e,r){var n=pe(r,1,e.zoom),i=Math.pow(2,e.zoom-r.tileID.overscaledZ),a=r.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:n,u_extrude_scale:[e.pixelsToGLUnits[0]/(n*i),e.pixelsToGLUnits[1]/(n*i)],u_overscale_factor:a}},Pr=function(t,e,r){return{u_matrix:t,u_inv_matrix:e,u_camera_to_center_distance:r.cameraToCenterDistance,u_viewport_size:[r.width,r.height]}},Ir=function(t,e,r){return void 0===r&&(r=1),{u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:r}},Or=function(t){return{u_matrix:t}},zr=function(t,e,r,n){return{u_matrix:t,u_extrude_scale:pe(e,1,r),u_intensity:n}};function Dr(e,r){var n=Math.pow(2,r.canonical.z),i=r.canonical.y;return[new t.MercatorCoordinate(0,i/n).toLngLat().lat,new t.MercatorCoordinate(0,(i+1)/n).toLngLat().lat]}var Rr=function(e,r,n){var i=e.transform;return{u_matrix:Ur(e,r,n),u_ratio:1/pe(r,1,i.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Fr=function(e,r,n){return t.extend(Rr(e,r,n),{u_image:0})},Br=function(e,r,n,i){var a=e.transform,o=jr(r,a);return{u_matrix:Ur(e,r,n),u_texsize:r.imageAtlasTexture.size,u_ratio:1/pe(r,1,a.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[o,i.fromScale,i.toScale],u_fade:i.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},Nr=function(e,r,n,i,a){var o=e.transform,s=e.lineAtlas,l=jr(r,o),c=\"round\"===n.layout.get(\"line-cap\"),u=s.getDash(i.from,c),f=s.getDash(i.to,c),h=u.width*a.fromScale,p=f.width*a.toScale;return t.extend(Rr(e,r,n),{u_patternscale_a:[l/h,-u.height/2],u_patternscale_b:[l/p,-f.height/2],u_sdfgamma:s.width/(256*Math.min(h,p)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:f.y,u_mix:a.t})};function jr(t,e){return 1/pe(t,1,e.tileZoom)}function Ur(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get(\"line-translate\"),r.paint.get(\"line-translate-anchor\"))}var Vr=function(t,e,r,n,i){return{u_matrix:t,u_tl_parent:e,u_scale_parent:r,u_buffer_scale:1,u_fade_t:n.mix,u_opacity:n.opacity*i.paint.get(\"raster-opacity\"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get(\"raster-brightness-min\"),u_brightness_high:i.paint.get(\"raster-brightness-max\"),u_saturation_factor:(o=i.paint.get(\"raster-saturation\"),o>0?1-1/(1.001-o):-o),u_contrast_factor:(a=i.paint.get(\"raster-contrast\"),a>0?1/(1-a):1+a),u_spin_weights:Hr(i.paint.get(\"raster-hue-rotate\"))};var a,o};function Hr(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]}var qr,Gr=function(t,e,r,n,i,a,o,s,l,c){var u=i.transform;return{u_is_size_zoom_constant:+(\"constant\"===t||\"source\"===t),u_is_size_feature_constant:+(\"constant\"===t||\"camera\"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:u.cameraToCenterDistance,u_pitch:u.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:u.width/u.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:a,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:c,u_texture:0}},Yr=function(e,r,n,i,a,o,s,l,c,u,f){var h=a.transform;return t.extend(Gr(e,r,n,i,a,o,s,l,c,u),{u_gamma_scale:i?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+f})},Wr=function(e,r,n,i,a,o,s,l,c,u){return t.extend(Yr(e,r,n,i,a,o,s,l,!0,c,!0),{u_texsize_icon:u,u_texture_icon:1})},Xr=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Zr=function(e,r,n,i,a,o){return t.extend(function(t,e,r,n){var i=r.imageManager.getPattern(t.from.toString()),a=r.imageManager.getPattern(t.to.toString()),o=r.imageManager.getPixelSize(),s=o.width,l=o.height,c=Math.pow(2,n.tileID.overscaledZ),u=n.tileSize*Math.pow(2,r.transform.tileZoom)/c,f=u*(n.tileID.canonical.x+n.tileID.wrap*c),h=u*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[s,l],u_mix:e.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/pe(n,1,r.transform.tileZoom),u_pixel_coord_upper:[f>>16,h>>16],u_pixel_coord_lower:[65535&f,65535&h]}}(i,o,n,a),{u_matrix:e,u_opacity:r})},Jr={fillExtrusion:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fillExtrusionPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,r.u_height_factor),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fill:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},fillPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},fillOutline:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world)}},fillOutlinePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},circle:function(e,r){return{u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,r.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},collisionBox:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,r.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,r.u_overscale_factor)}},collisionCircle:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,r.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,r.u_viewport_size)}},debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_overlay:new t.Uniform1i(e,r.u_overlay),u_overlay_scale:new t.Uniform1f(e,r.u_overlay_scale)}},clippingMask:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmap:function(e,r){return{u_extrude_scale:new t.Uniform1f(e,r.u_extrude_scale),u_intensity:new t.Uniform1f(e,r.u_intensity),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmapTexture:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_color_ramp:new t.Uniform1i(e,r.u_color_ramp),u_opacity:new t.Uniform1f(e,r.u_opacity)}},hillshade:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_latrange:new t.Uniform2f(e,r.u_latrange),u_light:new t.Uniform2f(e,r.u_light),u_shadow:new t.UniformColor(e,r.u_shadow),u_highlight:new t.UniformColor(e,r.u_highlight),u_accent:new t.UniformColor(e,r.u_accent)}},hillshadePrepare:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_dimension:new t.Uniform2f(e,r.u_dimension),u_zoom:new t.Uniform1f(e,r.u_zoom),u_maxzoom:new t.Uniform1f(e,r.u_maxzoom),u_unpack:new t.Uniform4f(e,r.u_unpack)}},line:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels)}},lineGradient:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_image:new t.Uniform1i(e,r.u_image)}},linePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_texsize:new t.Uniform2f(e,r.u_texsize),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_image:new t.Uniform1i(e,r.u_image),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},lineSDF:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,r.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,r.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,r.u_sdfgamma),u_image:new t.Uniform1i(e,r.u_image),u_tex_y_a:new t.Uniform1f(e,r.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,r.u_tex_y_b),u_mix:new t.Uniform1f(e,r.u_mix)}},raster:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_tl_parent:new t.Uniform2f(e,r.u_tl_parent),u_scale_parent:new t.Uniform1f(e,r.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,r.u_buffer_scale),u_fade_t:new t.Uniform1f(e,r.u_fade_t),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image0:new t.Uniform1i(e,r.u_image0),u_image1:new t.Uniform1i(e,r.u_image1),u_brightness_low:new t.Uniform1f(e,r.u_brightness_low),u_brightness_high:new t.Uniform1f(e,r.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,r.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,r.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,r.u_spin_weights)}},symbolIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture)}},symbolSDF:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},symbolTextAndIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texsize_icon:new t.Uniform2f(e,r.u_texsize_icon),u_texture:new t.Uniform1i(e,r.u_texture),u_texture_icon:new t.Uniform1i(e,r.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},background:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_color:new t.UniformColor(e,r.u_color)}},backgroundPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image:new t.Uniform1i(e,r.u_image),u_pattern_tl_a:new t.Uniform2f(e,r.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,r.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,r.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,r.u_pattern_br_b),u_texsize:new t.Uniform2f(e,r.u_texsize),u_mix:new t.Uniform1f(e,r.u_mix),u_pattern_size_a:new t.Uniform2f(e,r.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,r.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,r.u_scale_a),u_scale_b:new t.Uniform1f(e,r.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,r.u_tile_units_to_pixels)}}};function Kr(e,r,n,i,a,o,s){for(var l=e.context,c=l.gl,u=e.useProgram(\"collisionBox\"),f=[],h=0,p=0,d=0;d0){var _=t.create(),w=y;t.mul(_,v.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(_,_,v.placementViewportMatrix),f.push({circleArray:b,circleOffset:p,transform:w,invTransform:_}),p=h+=b.length/4}x&&u.draw(l,c.LINES,At.disabled,Mt.disabled,e.colorModeForRenderPass(),Et.disabled,Cr(y,e.transform,m),n.id,x.layoutVertexBuffer,x.indexBuffer,x.segments,null,e.transform.zoom,null,null,x.collisionVertexBuffer)}}if(s&&f.length){var T=e.useProgram(\"collisionCircle\"),k=new t.StructArrayLayout2f1f2i16;k.resize(4*h),k._trim();for(var A=0,M=0,S=f;M=0&&(g[v.associatedIconIndex]={shiftedAnchor:S,angle:E})}else ue(v.numGlyphs,p)}if(f){d.clear();for(var C=e.icon.placedSymbolArray,P=0;P0){var s=t.browser.now(),l=(s-e.timeAdded)/o,c=r?(s-r.timeAdded)/o:-1,u=n.getSource(),f=a.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),h=!r||Math.abs(r.tileID.overscaledZ-f)>Math.abs(e.tileID.overscaledZ-f),p=h&&e.refreshedUponExpiration?1:t.clamp(h?l:1-c,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-p}:{opacity:p,mix:0}}return{opacity:1,mix:0}}var un=new t.Color(1,0,0,1),fn=new t.Color(0,1,0,1),hn=new t.Color(0,0,1,1),pn=new t.Color(1,0,1,1),dn=new t.Color(0,1,1,1);function gn(t){var e=t.transform.padding;mn(t,t.transform.height-(e.top||0),3,un),mn(t,e.bottom||0,3,fn),vn(t,e.left||0,3,hn),vn(t,t.transform.width-(e.right||0),3,pn);var r=t.transform.centerPoint;!function(t,e,r,n){yn(t,e-1,r-10,2,20,n),yn(t,e-10,r-1,20,2,n)}(t,r.x,t.transform.height-r.y,dn)}function mn(t,e,r,n){yn(t,0,e+r/2,t.transform.width,r,n)}function vn(t,e,r,n){yn(t,e-r/2,0,r,t.transform.height,n)}function yn(e,r,n,i,a,o){var s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*t.browser.devicePixelRatio,n*t.browser.devicePixelRatio,i*t.browser.devicePixelRatio,a*t.browser.devicePixelRatio),s.clear({color:o}),l.disable(l.SCISSOR_TEST)}function xn(e,r,n){var i=e.context,a=i.gl,o=n.posMatrix,s=e.useProgram(\"debug\"),l=At.disabled,c=Mt.disabled,u=e.colorModeForRenderPass();i.activeTexture.set(a.TEXTURE0),e.emptyTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE),s.draw(i,a.LINE_STRIP,l,c,u,Et.disabled,Ir(o,t.Color.red),\"$debug\",e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);var f=r.getTileByID(n.key).latestRawTileData,h=f&&f.byteLength||0,p=Math.floor(h/1024),d=r.getTile(n).tileSize,g=512/Math.min(d,512)*(n.overscaledZ/e.transform.zoom)*.5,m=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(m+=\" => \"+n.overscaledZ),function(t,e){t.initDebugOverlayCanvas();var r=t.debugOverlayCanvas,n=t.context.gl,i=t.debugOverlayCanvas.getContext(\"2d\");i.clearRect(0,0,r.width,r.height),i.shadowColor=\"white\",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle=\"white\",i.textBaseline=\"top\",i.font=\"bold 36px Open Sans, sans-serif\",i.fillText(e,5,5),i.strokeText(e,5,5),t.debugOverlayTexture.update(r),t.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}(e,m+\" \"+p+\"kb\"),s.draw(i,a.TRIANGLES,l,c,St.alphaBlended,Et.disabled,Ir(o,t.Color.transparent,g),\"$debug\",e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}var bn={symbol:function(e,r,n,i,a){if(\"translucent\"===e.renderPass){var o=Mt.disabled,s=e.colorModeForRenderPass();n.layout.get(\"text-variable-anchor\")&&function(e,r,n,i,a,o,s){for(var l=r.transform,c=\"map\"===a,u=\"map\"===o,f=0,h=e;f256&&this.clearStencil(),r.setColorMode(St.disabled),r.setDepthMode(At.disabled);var i=this.useProgram(\"clippingMask\");this._tileClippingMaskIDs={};for(var a=0,o=e;a256&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new Mt({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},_n.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Mt({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},_n.prototype.stencilConfigForOverlap=function(t){var e,r=this.context.gl,n=t.sort((function(t,e){return e.overscaledZ-t.overscaledZ})),i=n[n.length-1].overscaledZ,a=n[0].overscaledZ-i+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();for(var o={},s=0;s=0;this.currentLayer--){var w=this.style._layers[i[this.currentLayer]],T=a[w.source],k=u[w.source];this._renderTileClippingMasks(w,k),this.renderLayer(this,T,w,k)}for(this.renderPass=\"translucent\",this.currentLayer=0;this.currentLayer0?e.pop():null},_n.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),r=this.imageManager.getPattern(t.to.toString());return!e||!r},_n.prototype.useProgram=function(t,e){this.cache=this.cache||{};var r=\"\"+t+(e?e.cacheKey:\"\")+(this._showOverdrawInspector?\"/overdraw\":\"\");return this.cache[r]||(this.cache[r]=new _r(this.context,xr[t],e,Jr[t],this._showOverdrawInspector)),this.cache[r]},_n.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},_n.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)},_n.prototype.initDebugOverlayCanvas=function(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=t.window.document.createElement(\"canvas\"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var e=this.context.gl;this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,e.RGBA)}},_n.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var wn=function(t,e){this.points=t,this.planes=e};wn.fromInvProjectionMatrix=function(e,r,n){var i=Math.pow(2,n),a=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((function(r){return t.transformMat4([],r,e)})).map((function(e){return t.scale$1([],e,1/e[3]/r*i)})),o=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(e){var r=t.sub([],a[e[0]],a[e[1]]),n=t.sub([],a[e[2]],a[e[1]]),i=t.normalize([],t.cross([],r,n)),o=-t.dot(i,a[e[1]]);return i.concat(o)}));return new wn(a,o)};var Tn=function(e,r){this.min=e,this.max=r,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};Tn.prototype.quadrant=function(e){for(var r=[e%2==0,e<2],n=t.clone$2(this.min),i=t.clone$2(this.max),a=0;a=0;if(0===o)return 0;o!==r.length&&(n=!1)}if(n)return 2;for(var l=0;l<3;l++){for(var c=Number.MAX_VALUE,u=-Number.MAX_VALUE,f=0;fthis.max[l]-this.min[l])return 0}return 1};var kn=function(t,e,r,n){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),isNaN(t)||t<0||isNaN(e)||e<0||isNaN(r)||r<0||isNaN(n)||n<0)throw new Error(\"Invalid value for edge-insets, top, bottom, left and right must all be numbers\");this.top=t,this.bottom=e,this.left=r,this.right=n};kn.prototype.interpolate=function(e,r,n){return null!=r.top&&null!=e.top&&(this.top=t.number(e.top,r.top,n)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,r.bottom,n)),null!=r.left&&null!=e.left&&(this.left=t.number(e.left,r.left,n)),null!=r.right&&null!=e.right&&(this.right=t.number(e.right,r.right,n)),this},kn.prototype.getCenter=function(e,r){var n=t.clamp((this.left+e-this.right)/2,0,e),i=t.clamp((this.top+r-this.bottom)/2,0,r);return new t.Point(n,i)},kn.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},kn.prototype.clone=function(){return new kn(this.top,this.bottom,this.left,this.right)},kn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var An=function(e,r,n,i,a){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===a||a,this._minZoom=e||0,this._maxZoom=r||22,this._minPitch=null==n?0:n,this._maxPitch=null==i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new kn,this._posMatrixCache={},this._alignedPosMatrixCache={}},Mn={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};An.prototype.clone=function(){var t=new An(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,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._edgeInsets=this._edgeInsets.clone(),t._calcMatrices(),t},Mn.minZoom.get=function(){return this._minZoom},Mn.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Mn.maxZoom.get=function(){return this._maxZoom},Mn.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Mn.minPitch.get=function(){return this._minPitch},Mn.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},Mn.maxPitch.get=function(){return this._maxPitch},Mn.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},Mn.renderWorldCopies.get=function(){return this._renderWorldCopies},Mn.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},Mn.worldSize.get=function(){return this.tileSize*this.scale},Mn.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Mn.size.get=function(){return new t.Point(this.width,this.height)},Mn.bearing.get=function(){return-this.angle/Math.PI*180},Mn.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=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Mn.pitch.get=function(){return this._pitch/Math.PI*180},Mn.pitch.set=function(e){var r=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},Mn.fov.get=function(){return this._fov/Math.PI*180},Mn.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())},Mn.zoom.get=function(){return this._zoom},Mn.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())},Mn.center.get=function(){return this._center},Mn.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Mn.padding.get=function(){return this._edgeInsets.toJSON()},Mn.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},Mn.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},An.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},An.prototype.interpolatePadding=function(t,e,r){this._unmodified=!1,this._edgeInsets.interpolate(t,e,r),this._constrain(),this._calcMatrices()},An.prototype.coveringZoomLevel=function(t){var e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)},An.prototype.getVisibleUnwrappedCoordinates=function(e){var r=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new t.Point(0,0)),i=this.pointCoordinate(new t.Point(this.width,0)),a=this.pointCoordinate(new t.Point(this.width,this.height)),o=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(n.x,i.x,a.x,o.x)),l=Math.floor(Math.max(n.x,i.x,a.x,o.x)),c=s-1;c<=l+1;c++)0!==c&&r.push(new t.UnwrappedTileID(c,e));return r},An.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&&re.maxzoom&&(r=e.maxzoom);var i=t.MercatorCoordinate.fromLngLat(this.center),a=Math.pow(2,r),o=[a*i.x,a*i.y,0],s=wn.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),l=e.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=r);var c=function(t){return{aabb:new Tn([t*a,0,0],[(t+1)*a,a,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}},u=[],f=[],h=r,p=e.reparseOverscaled?n:r;if(this._renderWorldCopies)for(var d=1;d<=3;d++)u.push(c(-d)),u.push(c(d));for(u.push(c(0));u.length>0;){var g=u.pop(),m=g.x,v=g.y,y=g.fullyVisible;if(!y){var x=g.aabb.intersects(s);if(0===x)continue;y=2===x}var b=g.aabb.distanceX(o),_=g.aabb.distanceY(o),w=Math.max(Math.abs(b),Math.abs(_)),T=3+(1<T&&g.zoom>=l)f.push({tileID:new t.OverscaledTileID(g.zoom===h?p:g.zoom,g.wrap,g.zoom,m,v),distanceSq:t.sqrLen([o[0]-.5-m,o[1]-.5-v])});else for(var k=0;k<4;k++){var A=(m<<1)+k%2,M=(v<<1)+(k>>1);u.push({aabb:g.aabb.quadrant(k),zoom:g.zoom+1,x:A,y:M,wrap:g.wrap,fullyVisible:y})}}return f.sort((function(t,e){return t.distanceSq-e.distanceSq})).map((function(t){return t.tileID}))},An.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Mn.unmodified.get=function(){return this._unmodified},An.prototype.zoomScale=function(t){return Math.pow(2,t)},An.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},An.prototype.project=function(e){var r=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(r)*this.worldSize)},An.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},Mn.point.get=function(){return this.project(this.center)},An.prototype.setLocationAtPoint=function(e,r){var n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),a=this.locationCoordinate(e),o=new t.MercatorCoordinate(a.x-(n.x-i.x),a.y-(n.y-i.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())},An.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},An.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},An.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},An.prototype.coordinateLocation=function(t){return t.toLngLat()},An.prototype.pointCoordinate=function(e){var r=[e.x,e.y,0,1],n=[e.x,e.y,1,1];t.transformMat4(r,r,this.pixelMatrixInverse),t.transformMat4(n,n,this.pixelMatrixInverse);var i=r[3],a=n[3],o=r[0]/i,s=n[0]/a,l=r[1]/i,c=n[1]/a,u=r[2]/i,f=n[2]/a,h=u===f?0:(0-u)/(f-u);return new t.MercatorCoordinate(t.number(o,s,h)/this.worldSize,t.number(l,c,h)/this.worldSize)},An.prototype.coordinatePoint=function(e){var r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix),new t.Point(r[0]/r[3],r[1]/r[3])},An.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},An.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},An.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},An.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=t.identity(new Float64Array(16));return t.translate(l,l,[s*o,a.y*o,0]),t.scale(l,l,[o/t.EXTENT,o/t.EXTENT,1]),t.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},An.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},An.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=t.mercatorYfromLat(f[1])*this.worldSize,e=(o=t.mercatorYfromLat(f[0])*this.worldSize)-ao&&(i=o-m)}if(this.lngRange){var v=p.x,y=c.x/2;v-yl&&(n=l-y)}void 0===n&&void 0===i||(this.center=this.unproject(new t.Point(void 0!==n?n:p.x,void 0!==i?i:p.y))),this._unmodified=u,this._constraining=!1}},An.prototype._calcMatrices=function(){if(this.height){var e=this._fov/2,r=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(e)*this.height;var n=Math.PI/2+this._pitch,i=this._fov*(.5+r.y/this.height),a=Math.sin(i)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-n-i,.01,Math.PI-.01)),o=this.point,s=o.x,l=o.y,c=1.01*(Math.cos(Math.PI/2-this._pitch)*a+this.cameraToCenterDistance),u=this.height/50,f=new Float64Array(16);t.perspective(f,this._fov,this.width/this.height,u,c),f[8]=2*-r.x/this.width,f[9]=2*r.y/this.height,t.scale(f,f,[1,-1,1]),t.translate(f,f,[0,0,-this.cameraToCenterDistance]),t.rotateX(f,f,this._pitch),t.rotateZ(f,f,this.angle),t.translate(f,f,[-s,-l,0]),this.mercatorMatrix=t.scale([],f,[this.worldSize,this.worldSize,this.worldSize]),t.scale(f,f,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=f,this.invProjMatrix=t.invert([],this.projMatrix);var h=this.width%2/2,p=this.height%2/2,d=Math.cos(this.angle),g=Math.sin(this.angle),m=s-Math.round(s)+d*h+g*p,v=l-Math.round(l)+d*p+g*h,y=new Float64Array(f);if(t.translate(y,y,[m>.5?m-1:m,v>.5?v-1:v,0]),this.alignedProjMatrix=y,f=t.create(),t.scale(f,f,[this.width/2,-this.height/2,1]),t.translate(f,f,[1,-1,0]),this.labelPlaneMatrix=f,f=t.create(),t.scale(f,f,[1,-1,1]),t.translate(f,f,[-1,-1,0]),t.scale(f,f,[2/this.width,2/this.height,1]),this.glCoordMatrix=f,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(f=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error(\"failed to invert matrix\");this.pixelMatrixInverse=f,this._posMatrixCache={},this._alignedPosMatrixCache={}}},An.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},An.prototype.getCameraPoint=function(){var e=this._pitch,r=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,r))},An.prototype.getCameraQueryGeometry=function(e){var r=this.getCameraPoint();if(1===e.length)return[e[0],r];for(var n=r.x,i=r.y,a=r.x,o=r.y,s=0,l=e;s=3&&!t.some((function(t){return isNaN(t)}))){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0}return!1},Sn.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,\"\",e)}catch(t){}};var En={linearity:.3,easing:t.bezier(0,0,.3,1)},Ln=t.extend({deceleration:2500,maxSpeed:1400},En),Cn=t.extend({deceleration:20,maxSpeed:1400},En),Pn=t.extend({deceleration:1e3,maxSpeed:360},En),In=t.extend({deceleration:1e3,maxSpeed:90},En),On=function(t){this._map=t,this.clear()};function zn(t,e){(!t.duration||t.duration0&&r-e[0].time>160;)e.shift()},On.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var r={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},n=0,i=this._inertiaBuffer;n=this._clickTolerance||this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.dblclick=function(t){return this._firePreventable(new Rn(t.type,this._map,t))},Nn.prototype.mouseover=function(t){this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.mouseout=function(t){this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.touchstart=function(t){return this._firePreventable(new Fn(t.type,this._map,t))},Nn.prototype.touchmove=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype.touchend=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype.touchcancel=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Nn.prototype.isEnabled=function(){return!0},Nn.prototype.isActive=function(){return!1},Nn.prototype.enable=function(){},Nn.prototype.disable=function(){};var jn=function(t){this._map=t};jn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},jn.prototype.mousemove=function(t){this._map.fire(new Rn(t.type,this._map,t))},jn.prototype.mousedown=function(){this._delayContextMenu=!0},jn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Rn(\"contextmenu\",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},jn.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new Rn(t.type,this._map,t)),this._map.listens(\"contextmenu\")&&t.preventDefault()},jn.prototype.isEnabled=function(){return!0},jn.prototype.isActive=function(){return!1},jn.prototype.enable=function(){},jn.prototype.disable=function(){};var Un=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1};function Vn(t,e){for(var r={},n=0;nthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),n.length===this.numTouches&&(this.centroid=function(e){for(var r=new t.Point(0,0),n=0,i=e;n30)&&(this.aborted=!0)}}},Hn.prototype.touchend=function(t,e,r){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){var n=!this.aborted&&this.centroid;if(this.reset(),n)return n}};var qn=function(t){this.singleTap=new Hn(t),this.numTaps=t.numTaps,this.reset()};qn.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},qn.prototype.touchstart=function(t,e,r){this.singleTap.touchstart(t,e,r)},qn.prototype.touchmove=function(t,e,r){this.singleTap.touchmove(t,e,r)},qn.prototype.touchend=function(t,e,r){var n=this.singleTap.touchend(t,e,r);if(n){var i=t.timeStamp-this.lastTime<500,a=!this.lastTap||this.lastTap.dist(n)<30;if(i&&a||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}};var Gn=function(){this._zoomIn=new qn({numTouches:1,numTaps:2}),this._zoomOut=new qn({numTouches:2,numTaps:1}),this.reset()};Gn.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Gn.prototype.touchstart=function(t,e,r){this._zoomIn.touchstart(t,e,r),this._zoomOut.touchstart(t,e,r)},Gn.prototype.touchmove=function(t,e,r){this._zoomIn.touchmove(t,e,r),this._zoomOut.touchmove(t,e,r)},Gn.prototype.touchend=function(t,e,r){var n=this,i=this._zoomIn.touchend(t,e,r),a=this._zoomOut.touchend(t,e,r);return i?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(i)},{originalEvent:t})}}):a?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(a)},{originalEvent:t})}}):void 0},Gn.prototype.touchcancel=function(){this.reset()},Gn.prototype.enable=function(){this._enabled=!0},Gn.prototype.disable=function(){this._enabled=!1,this.reset()},Gn.prototype.isEnabled=function(){return this._enabled},Gn.prototype.isActive=function(){return this._active};var Yn=function(t){this.reset(),this._clickTolerance=t.clickTolerance||1};Yn.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Yn.prototype._correctButton=function(t,e){return!1},Yn.prototype._move=function(t,e){return{}},Yn.prototype.mousedown=function(t,e){if(!this._lastPoint){var n=r.mouseButton(t);this._correctButton(t,n)&&(this._lastPoint=e,this._eventButton=n)}},Yn.prototype.mousemoveWindow=function(t,e){var r=this._lastPoint;if(r&&(t.preventDefault(),this._moved||!(e.dist(r)0&&(this._active=!0);var i=Vn(n,r),a=new t.Point(0,0),o=new t.Point(0,0),s=0;for(var l in i){var c=i[l],u=this._touches[l];u&&(a._add(c),o._add(c.sub(u)),s++,i[l]=c)}if(this._touches=i,!(sMath.abs(t.x)}var ii=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.reset=function(){t.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},e.prototype._start=function(t){this._lastPoints=t,ni(t[0].sub(t[1]))&&(this._valid=!1)},e.prototype._move=function(t,e,r){var n=t[0].sub(this._lastPoints[0]),i=t[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid){this._lastPoints=t,this._active=!0;return{pitchDelta:-.5*((n.y+i.y)/2)}}},e.prototype.gestureBeginsVertically=function(t,e,r){if(void 0!==this._valid)return this._valid;var n=t.mag()>=2,i=e.mag()>=2;if(n||i){if(!n||!i)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;var a=t.y>0==e.y>0;return ni(t)&&ni(e)&&a}},e}(Kn),ai={panStep:100,bearingStep:15,pitchStep:10},oi=function(){var t=ai;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep};function si(t){return t*(2-t)}oi.prototype.reset=function(){this._active=!1},oi.prototype.keydown=function(t){var e=this;if(!(t.altKey||t.ctrlKey||t.metaKey)){var r=0,n=0,i=0,a=0,o=0;switch(t.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:t.shiftKey?n=-1:(t.preventDefault(),a=-1);break;case 39:t.shiftKey?n=1:(t.preventDefault(),a=1);break;case 38:t.shiftKey?i=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?i=-1:(t.preventDefault(),o=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:\"keyboardHandler\",easing:si,zoom:r?Math.round(l)+r*(t.shiftKey?2:1):l,bearing:s.getBearing()+n*e._bearingStep,pitch:s.getPitch()+i*e._pitchStep,offset:[-a*e._panStep,-o*e._panStep],center:s.getCenter()},{originalEvent:t})}}}},oi.prototype.enable=function(){this._enabled=!0},oi.prototype.disable=function(){this._enabled=!1,this.reset()},oi.prototype.isEnabled=function(){return this._enabled},oi.prototype.isActive=function(){return this._active};var li=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll([\"_onWheel\",\"_onTimeout\",\"_onScrollFrame\",\"_onScrollFinished\"],this)};li.prototype.setZoomRate=function(t){this._defaultZoomRate=t},li.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},li.prototype.isEnabled=function(){return!!this._enabled},li.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},li.prototype.isZooming=function(){return!!this._zooming},li.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&\"center\"===t.around)},li.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},li.prototype.wheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=t.browser.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._active||this._start(e)),e.preventDefault()}},li.prototype._onTimeout=function(t){this._type=\"wheel\",this._delta-=this._lastValue,this._active||this._start(t)},li.prototype._start=function(e){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var n=r.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},li.prototype.renderFrame=function(){return this._onScrollFrame()},li.prototype._onScrollFrame=function(){var e=this;if(this._frameId&&(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?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var a=\"number\"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(a*i))),\"wheel\"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o,s=\"number\"==typeof this._targetZoom?this._targetZoom:r.zoom,l=this._startZoom,c=this._easing,u=!1;if(\"wheel\"===this._type&&l&&c){var f=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=c(f);o=t.number(l,s,h),f<1?this._frameId||(this._frameId=!0):u=!0}else o=s,u=!0;return this._active=!0,u&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!u,zoomDelta:o-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},li.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var n=this._prevEase,i=(t.browser.now()-n.start)/n.duration,a=n.easing(i+.01)-n.easing(i),o=.27/Math.sqrt(a*a+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=t.bezier(o,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:r},r},li.prototype.reset=function(){this._active=!1};var ci=function(t,e){this._clickZoom=t,this._tapZoom=e};ci.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ci.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ci.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ci.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ui=function(){this.reset()};ui.prototype.reset=function(){this._active=!1},ui.prototype.dblclick=function(t,e){return t.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(t.shiftKey?-1:1),around:r.unproject(e)},{originalEvent:t})}}},ui.prototype.enable=function(){this._enabled=!0},ui.prototype.disable=function(){this._enabled=!1,this.reset()},ui.prototype.isEnabled=function(){return this._enabled},ui.prototype.isActive=function(){return this._active};var fi=function(){this._tap=new qn({numTouches:1,numTaps:1}),this.reset()};fi.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},fi.prototype.touchstart=function(t,e,r){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=e[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(t,e,r))},fi.prototype.touchmove=function(t,e,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;var n=e[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,t.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(t,e,r)},fi.prototype.touchend=function(t,e,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(t,e,r)&&(this._tapTime=t.timeStamp)},fi.prototype.touchcancel=function(){this.reset()},fi.prototype.enable=function(){this._enabled=!0},fi.prototype.disable=function(){this._enabled=!1,this.reset()},fi.prototype.isEnabled=function(){return this._enabled},fi.prototype.isActive=function(){return this._active};var hi=function(t,e,r){this._el=t,this._mousePan=e,this._touchPan=r};hi.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add(\"mapboxgl-touch-drag-pan\")},hi.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove(\"mapboxgl-touch-drag-pan\")},hi.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},hi.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var pi=function(t,e,r){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=r};pi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},pi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},pi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},pi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var di=function(t,e,r,n){this._el=t,this._touchZoom=e,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0};di.prototype.enable=function(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add(\"mapboxgl-touch-zoom-rotate\")},di.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove(\"mapboxgl-touch-zoom-rotate\")},di.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},di.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},di.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},di.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var gi=function(t){return t.zoom||t.drag||t.pitch||t.rotate},mi=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}(t.Event);function vi(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}var yi=function(e,n){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new On(e),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),t.bindAll([\"handleEvent\",\"handleWindowEvent\"],this);var i=this._el;this._listeners=[[i,\"touchstart\",{passive:!1}],[i,\"touchmove\",{passive:!1}],[i,\"touchend\",void 0],[i,\"touchcancel\",void 0],[i,\"mousedown\",void 0],[i,\"mousemove\",void 0],[i,\"mouseup\",void 0],[t.window.document,\"mousemove\",{capture:!0}],[t.window.document,\"mouseup\",void 0],[i,\"mouseover\",void 0],[i,\"mouseout\",void 0],[i,\"dblclick\",void 0],[i,\"click\",void 0],[i,\"keydown\",{capture:!1}],[i,\"keyup\",void 0],[i,\"wheel\",{passive:!1}],[i,\"contextmenu\",void 0],[t.window,\"blur\",void 0]];for(var a=0,o=this._listeners;aa?Math.min(2,_):Math.max(.5,_),w=Math.pow(m,1-e),T=i.unproject(x.add(b.mult(e*w)).mult(g));i.setLocationAtPoint(i.renderWorldCopies?T.wrap():T,d)}n._fireMoveEvents(r)}),(function(t){n._afterEase(r,t)}),e),this},r.prototype._prepareEase=function(e,r,n){void 0===n&&(n={}),this._moving=!0,r||n.moving||this.fire(new t.Event(\"movestart\",e)),this._zooming&&!n.zooming&&this.fire(new t.Event(\"zoomstart\",e)),this._rotating&&!n.rotating&&this.fire(new t.Event(\"rotatestart\",e)),this._pitching&&!n.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,r){if(!this._easeId||!r||this._easeId!==r){delete this._easeId;var n=this._zooming,i=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new t.Event(\"zoomend\",e)),i&&this.fire(new t.Event(\"rotateend\",e)),a&&this.fire(new t.Event(\"pitchend\",e)),this.fire(new t.Event(\"moveend\",e))}},r.prototype.flyTo=function(e,r){var n=this;if(!e.essential&&t.browser.prefersReducedMotion){var i=t.pick(e,[\"center\",\"zoom\",\"bearing\",\"pitch\",\"around\"]);return this.jumpTo(i,r)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var a=this.transform,o=this.getZoom(),s=this.getBearing(),l=this.getPitch(),c=this.getPadding(),u=\"zoom\"in e?t.clamp(+e.zoom,a.minZoom,a.maxZoom):o,f=\"bearing\"in e?this._normalizeBearing(e.bearing,s):s,h=\"pitch\"in e?+e.pitch:l,p=\"padding\"in e?e.padding:a.padding,d=a.zoomScale(u-o),g=t.Point.convert(e.offset),m=a.centerPoint.add(g),v=a.pointLocation(m),y=t.LngLat.convert(e.center||v);this._normalizeCenter(y);var x=a.project(v),b=a.project(y).sub(x),_=e.curve,w=Math.max(a.width,a.height),T=w/d,k=b.mag();if(\"minZoom\"in e){var A=t.clamp(Math.min(e.minZoom,o,u),a.minZoom,a.maxZoom),M=w/a.zoomScale(A-o);_=Math.sqrt(M/k*2)}var S=_*_;function E(t){var e=(T*T-w*w+(t?-1:1)*S*S*k*k)/(2*(t?T:w)*S*k);return Math.log(Math.sqrt(e*e+1)-e)}function L(t){return(Math.exp(t)-Math.exp(-t))/2}function C(t){return(Math.exp(t)+Math.exp(-t))/2}var P=E(0),I=function(t){return C(P)/C(P+_*t)},O=function(t){return w*((C(P)*(L(e=P+_*t)/C(e))-L(P))/S)/k;var e},z=(E(1)-P)/_;if(Math.abs(k)<1e-6||!isFinite(z)){if(Math.abs(w-T)<1e-6)return this.easeTo(e,r);var D=Te.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==f,this._pitching=h!==l,this._padding=!a.isPaddingEqual(p),this._prepareEase(r,!1),this._ease((function(e){var i=e*z,d=1/I(i);a.zoom=1===e?u:o+a.scaleZoom(d),n._rotating&&(a.bearing=t.number(s,f,e)),n._pitching&&(a.pitch=t.number(l,h,e)),n._padding&&(a.interpolatePadding(c,p,e),m=a.centerPoint.add(g));var v=1===e?y:a.unproject(x.add(b.mult(O(i))).mult(d));a.setLocationAtPoint(a.renderWorldCopies?v.wrap():v,m),n._fireMoveEvents(r)}),(function(){return n._afterEase(r)}),e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){return this._stop()},r.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,e)}if(!t){var n=this.handlers;n&&n.stop()}return this},r.prototype._ease=function(e,r,n){!1===n.animate||0===n.duration?(e(1),r()):(this._easeStart=t.browser.now(),this._easeOptions=n,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<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)180?-360:r<-180?360:0}},r}(t.Evented),bi=function(e){void 0===e&&(e={}),this.options=e,t.bindAll([\"_updateEditLink\",\"_updateData\",\"_updateCompact\"],this)};bi.prototype.getDefaultPosition=function(){return\"bottom-right\"},bi.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-attrib\"),this._innerContainer=r.create(\"div\",\"mapboxgl-ctrl-attrib-inner\",this._container),e&&this._container.classList.add(\"mapboxgl-compact\"),this._updateAttributions(),this._updateEditLink(),this._map.on(\"styledata\",this._updateData),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},bi.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"styledata\",this._updateData),this._map.off(\"sourcedata\",this._updateData),this._map.off(\"moveend\",this._updateEditLink),this._map.off(\"resize\",this._updateCompact),this._map=void 0,this._attribHTML=void 0},bi.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(\".mapbox-improve-map\"));var r=[{key:\"owner\",value:this.styleOwner},{key:\"id\",value:this.styleId},{key:\"access_token\",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){var n=r.reduce((function(t,e,n){return e.value&&(t+=e.key+\"=\"+e.value+(n=0)return!1;return!0}))).join(\" | \");o!==this._attribHTML&&(this._attribHTML=o,t.length?(this._innerContainer.innerHTML=o,this._container.classList.remove(\"mapboxgl-attrib-empty\")):this._container.classList.add(\"mapboxgl-attrib-empty\"),this._editLink=null)}},bi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add(\"mapboxgl-compact\"):this._container.classList.remove(\"mapboxgl-compact\")};var _i=function(){t.bindAll([\"_updateLogo\"],this),t.bindAll([\"_updateCompact\"],this)};_i.prototype.onAdd=function(t){this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl\");var e=r.create(\"a\",\"mapboxgl-ctrl-logo\");return e.target=\"_blank\",e.rel=\"noopener nofollow\",e.href=\"https://www.mapbox.com/\",e.setAttribute(\"aria-label\",this._map._getUIString(\"LogoControl.Title\")),e.setAttribute(\"rel\",\"noopener nofollow\"),this._container.appendChild(e),this._container.style.display=\"none\",this._map.on(\"sourcedata\",this._updateLogo),this._updateLogo(),this._map.on(\"resize\",this._updateCompact),this._updateCompact(),this._container},_i.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"sourcedata\",this._updateLogo),this._map.off(\"resize\",this._updateCompact)},_i.prototype.getDefaultPosition=function(){return\"bottom-left\"},_i.prototype._updateLogo=function(t){t&&\"metadata\"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?\"block\":\"none\")},_i.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}},_i.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add(\"mapboxgl-compact\"):e.classList.remove(\"mapboxgl-compact\")}};var wi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};wi.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},wi.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,n=e?this._queue.concat(e):this._queue;re.maxZoom)throw new Error(\"maxZoom must be greater than or equal to minZoom\");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error(\"maxPitch must be greater than or equal to minPitch\");if(null!=e.minPitch&&e.minPitch<0)throw new Error(\"minPitch must be greater than or equal to 0\");if(null!=e.maxPitch&&e.maxPitch>60)throw new Error(\"maxPitch must be less than or equal to 60\");var i=new An(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(n.call(this,i,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new wi,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},Ti,e.locale),this._requestManager=new t.RequestManager(e.transformRequest,e.accessToken),\"string\"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error(\"Container '\"+e.container+\"' not found.\")}else{if(!(e.container instanceof Ai))throw new Error(\"Invalid type: 'container' must be a String or HTMLElement.\");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll([\"_onWindowOnline\",\"_onWindowResize\",\"_contextLost\",\"_contextRestored\"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error(\"Failed to initialize WebGL.\");this.on(\"move\",(function(){return r._update(!1)})),this.on(\"moveend\",(function(){return r._update(!1)})),this.on(\"zoom\",(function(){return r._update(!0)})),void 0!==t.window&&(t.window.addEventListener(\"online\",this._onWindowOnline,!1),t.window.addEventListener(\"resize\",this._onWindowResize,!1)),this.handlers=new yi(this,e);var a=\"string\"==typeof e.hash&&e.hash||void 0;this._hash=e.hash&&new Sn(a).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new bi({customAttribution:e.customAttribution})),this.addControl(new _i,e.logoPosition),this.on(\"style.load\",(function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)})),this.on(\"data\",(function(e){r._update(\"style\"===e.dataType),r.fire(new t.Event(e.dataType+\"data\",e))})),this.on(\"dataloading\",(function(e){r.fire(new t.Event(e.dataType+\"dataloading\",e))}))}n&&(i.__proto__=n),i.prototype=Object.create(n&&n.prototype),i.prototype.constructor=i;var a={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(e,r){if(void 0===r&&e.getDefaultPosition&&(r=e.getDefaultPosition()),void 0===r&&(r=\"top-right\"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error(\"Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.\")));var n=e.onAdd(this);this._controls.push(e);var i=this._controlPositions[r];return-1!==r.indexOf(\"bottom\")?i.insertBefore(n,i.firstChild):i.appendChild(n),this},i.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error(\"Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.\")));var r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this},i.prototype.resize=function(e){var r=this._containerDimensions(),n=r[0],i=r[1];this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i);var a=!this._moving;return a&&(this.stop(),this.fire(new t.Event(\"movestart\",e)).fire(new t.Event(\"move\",e))),this.fire(new t.Event(\"resize\",e)),a&&this.fire(new t.Event(\"moveend\",e)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},i.prototype.setMinZoom=function(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=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\")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(t){if((t=null==t?0:t)<0)throw new Error(\"minPitch must be greater than or equal to 0\");if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()60)throw new Error(\"maxPitch must be less than or equal to 60\");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error(\"maxPitch must be greater than the current minPitch\")},i.prototype.getMaxPitch=function(){return this.transform.maxPitch},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},i.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},i.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},i.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},i.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},i.prototype._createDelegatedListener=function(t,e,r){var n,i=this;if(\"mouseenter\"===t||\"mouseover\"===t){var a=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){var o=i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[];o.length?a||(a=!0,r.call(i,new Rn(t,i,n.originalEvent,{features:o}))):a=!1},mouseout:function(){a=!1}}}}if(\"mouseleave\"===t||\"mouseout\"===t){var o=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){(i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[]).length?o=!0:o&&(o=!1,r.call(i,new Rn(t,i,n.originalEvent)))},mouseout:function(e){o&&(o=!1,r.call(i,new Rn(t,i,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(n={},n[t]=function(t){var n=i.getLayer(e)?i.queryRenderedFeatures(t.point,{layers:[e]}):[];n.length&&(t.features=n,r.call(i,t),delete t.features)},n)}},i.prototype.on=function(t,e,r){if(void 0===r)return n.prototype.on.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(i),i.delegates)this.on(a,i.delegates[a]);return this},i.prototype.once=function(t,e,r){if(void 0===r)return n.prototype.once.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in i.delegates)this.once(a,i.delegates[a]);return this},i.prototype.off=function(t,e,r){var i=this;if(void 0===r)return n.prototype.off.call(this,t,e);return this._delegatedListeners&&this._delegatedListeners[t]&&function(n){for(var a=n[t],o=0;o180;){var s=n.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;e.lng>n.center.lng?e.lng-=360:e.lng+=360}return e}Ii.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),r.disableDrag()},Ii.prototype.move=function(t,e){var r=this.map,n=this.mouseRotate.mousemoveWindow(t,e);if(n&&n.bearingDelta&&r.setBearing(r.getBearing()+n.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(t,e);i&&i.pitchDelta&&r.setPitch(r.getPitch()+i.pitchDelta)}},Ii.prototype.off=function(){var t=this.element;r.removeEventListener(t,\"mousedown\",this.mousedown),r.removeEventListener(t,\"touchstart\",this.touchstart,{passive:!1}),r.removeEventListener(t,\"touchmove\",this.touchmove),r.removeEventListener(t,\"touchend\",this.touchend),r.removeEventListener(t,\"touchcancel\",this.reset),this.offTemp()},Ii.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(t.window,\"mousemove\",this.mousemove),r.removeEventListener(t.window,\"mouseup\",this.mouseup)},Ii.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),r.mousePos(this.element,e)),r.addEventListener(t.window,\"mousemove\",this.mousemove),r.addEventListener(t.window,\"mouseup\",this.mouseup)},Ii.prototype.mousemove=function(t){this.move(t,r.mousePos(this.element,t))},Ii.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},Ii.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.down({type:\"mousedown\",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},Ii.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},Ii.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)e.getEast()||r.latitudee.getNorth())},n.prototype._setErrorState=function(){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\")}},n.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event(\"outofmaxbounds\",e)),this._updateMarker(),void this._finish();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()}},n.prototype._updateCamera=function(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude),n=e.coords.accuracy,i=this._map.getBearing(),a=t.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),a,{geolocateSource:!0})},n.prototype._updateMarker=function(e){if(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},n.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),r=this._map.unproject([1,t]),n=e.distanceTo(r),i=Math.ceil(2*this._accuracy/n);this._circleElement.style.width=i+\"px\",this._circleElement.style.height=i+\"px\"},n.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},n.prototype._onError=function(e){if(this._map){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\"),this._geolocateButton.disabled=!0;var r=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.title=r,this._geolocateButton.setAttribute(\"aria-label\",r),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&ji)return;this._setErrorState()}\"OFF\"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add(\"mapboxgl-user-location-dot-stale\"),this.fire(new t.Event(\"error\",e)),this._finish()}},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(e){var n=this;if(this._container.addEventListener(\"contextmenu\",(function(t){return t.preventDefault()})),this._geolocateButton=r.create(\"button\",\"mapboxgl-ctrl-geolocate\",this._container),r.create(\"span\",\"mapboxgl-ctrl-icon\",this._geolocateButton).setAttribute(\"aria-hidden\",!0),this._geolocateButton.type=\"button\",!1===e){t.warnOnce(\"Geolocation support is not available so the GeolocateControl will be disabled.\");var i=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute(\"aria-label\",i)}else{var a=this._map._getUIString(\"GeolocateControl.FindMyLocation\");this._geolocateButton.title=a,this._geolocateButton.setAttribute(\"aria-label\",a)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute(\"aria-pressed\",\"false\"),this._watchState=\"OFF\"),this.options.showUserLocation&&(this._dotElement=r.create(\"div\",\"mapboxgl-user-location-dot\"),this._userLocationDotMarker=new Fi(this._dotElement),this._circleElement=r.create(\"div\",\"mapboxgl-user-location-accuracy-circle\"),this._accuracyCircleMarker=new Fi({element:this._circleElement,pitchAlignment:\"map\"}),this.options.trackUserLocation&&(this._watchState=\"OFF\"),this._map.on(\"zoom\",this._onZoom)),this._geolocateButton.addEventListener(\"click\",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on(\"movestart\",(function(e){var r=e.originalEvent&&\"resize\"===e.originalEvent.type;e.geolocateSource||\"ACTIVE_LOCK\"!==n._watchState||r||(n._watchState=\"BACKGROUND\",n._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background\"),n._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),n.fire(new t.Event(\"trackuserlocationend\")))}))},n.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\":Ni--,ji=!1,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\")}if(\"OFF\"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.setAttribute(\"aria-pressed\",\"true\"),++Ni>1?(e={maximumAge:6e5,timeout:0},ji=!0):(e=this.options.positionOptions,ji=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},n.prototype._clearWatch=function(){t.window.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)},n}(t.Evented),Vi={maxWidth:100,unit:\"metric\"},Hi=function(e){this.options=t.extend({},Vi,e),t.bindAll([\"_onMove\",\"setUnit\"],this)};function qi(t,e,r){var n=r&&r.maxWidth||100,i=t._container.clientHeight/2,a=t.unproject([0,i]),o=t.unproject([n,i]),s=a.distanceTo(o);if(r&&\"imperial\"===r.unit){var l=3.2808*s;if(l>5280)Gi(e,n,l/5280,t._getUIString(\"ScaleControl.Miles\"));else Gi(e,n,l,t._getUIString(\"ScaleControl.Feet\"))}else if(r&&\"nautical\"===r.unit){Gi(e,n,s/1852,t._getUIString(\"ScaleControl.NauticalMiles\"))}else s>=1e3?Gi(e,n,s/1e3,t._getUIString(\"ScaleControl.Kilometers\")):Gi(e,n,s,t._getUIString(\"ScaleControl.Meters\"))}function Gi(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:o>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(o),a*o),l=s/r;t.style.width=e*l+\"px\",t.innerHTML=s+\" \"+n}Hi.prototype.getDefaultPosition=function(){return\"bottom-left\"},Hi.prototype._onMove=function(){qi(this._map,this._container,this.options)},Hi.prototype.onAdd=function(t){return this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-scale\",t.getContainer()),this._map.on(\"move\",this._onMove),this._onMove(),this._container},Hi.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"move\",this._onMove),this._map=void 0},Hi.prototype.setUnit=function(t){this.options.unit=t,qi(this._map,this._container,this.options)};var Yi=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce(\"Full screen control 'container' must be a DOM element.\")),t.bindAll([\"_onClickFullscreen\",\"_changeIcon\"],this),\"onfullscreenchange\"in t.window.document?this._fullscreenchange=\"fullscreenchange\":\"onmozfullscreenchange\"in t.window.document?this._fullscreenchange=\"mozfullscreenchange\":\"onwebkitfullscreenchange\"in t.window.document?this._fullscreenchange=\"webkitfullscreenchange\":\"onmsfullscreenchange\"in t.window.document&&(this._fullscreenchange=\"MSFullscreenChange\")};Yi.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-group\"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display=\"none\",t.warnOnce(\"This device does not support fullscreen mode.\")),this._controlContainer},Yi.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Yi.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Yi.prototype._setupUI=function(){var e=this._fullscreenButton=r.create(\"button\",\"mapboxgl-ctrl-fullscreen\",this._controlContainer);r.create(\"span\",\"mapboxgl-ctrl-icon\",e).setAttribute(\"aria-hidden\",!0),e.type=\"button\",this._updateTitle(),this._fullscreenButton.addEventListener(\"click\",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Yi.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute(\"aria-label\",t),this._fullscreenButton.title=t},Yi.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?\"FullscreenControl.Exit\":\"FullscreenControl.Enter\")},Yi.prototype._isFullscreen=function(){return this._fullscreen},Yi.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(\"mapboxgl-ctrl-shrink\"),this._fullscreenButton.classList.toggle(\"mapboxgl-ctrl-fullscreen\"),this._updateTitle())},Yi.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Wi={closeButton:!0,closeOnClick:!0,className:\"\",maxWidth:\"240px\"},Xi=function(e){function n(r){e.call(this),this.options=t.extend(Object.create(Wi),r),t.bindAll([\"_update\",\"_onClose\",\"remove\",\"_onMouseMove\",\"_onMouseUp\",\"_onDrag\"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on(\"click\",this._onClose),this.options.closeOnMove&&this._map.on(\"move\",this._onClose),this._map.on(\"remove\",this.remove),this._update(),this._trackPointer?(this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"mouseup\",this._onMouseUp),this._container&&this._container.classList.add(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"mapboxgl-track-pointer\")):this._map.on(\"move\",this._update),this.fire(new t.Event(\"open\")),this},n.prototype.isOpen=function(){return!!this._map},n.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off(\"move\",this._update),this._map.off(\"move\",this._onClose),this._map.off(\"click\",this._onClose),this._map.off(\"remove\",this.remove),this._map.off(\"mousemove\",this._onMouseMove),this._map.off(\"mouseup\",this._onMouseUp),this._map.off(\"drag\",this._onDrag),delete this._map),this.fire(new t.Event(\"close\")),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on(\"move\",this._update),this._map.off(\"mousemove\",this._onMouseMove),this._container&&this._container.classList.remove(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.remove(\"mapboxgl-track-pointer\")),this},n.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off(\"move\",this._update),this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"drag\",this._onDrag),this._container&&this._container.classList.add(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"mapboxgl-track-pointer\")),this},n.prototype.getElement=function(){return this._container},n.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},n.prototype.setHTML=function(e){var r,n=t.window.document.createDocumentFragment(),i=t.window.document.createElement(\"body\");for(i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},n.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},n.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},n.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},n.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},n.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},n.prototype._createContent=function(){this._content&&r.remove(this._content),this._content=r.create(\"div\",\"mapboxgl-popup-content\",this._container),this.options.closeButton&&(this._closeButton=r.create(\"button\",\"mapboxgl-popup-close-button\",this._content),this._closeButton.type=\"button\",this._closeButton.setAttribute(\"aria-label\",\"Close popup\"),this._closeButton.innerHTML=\"×\",this._closeButton.addEventListener(\"click\",this._onClose))},n.prototype._onMouseUp=function(t){this._update(t.point)},n.prototype._onMouseMove=function(t){this._update(t.point)},n.prototype._onDrag=function(t){this._update(t.point)},n.prototype._update=function(e){var n=this,i=this._lngLat||this._trackPointer;if(this._map&&i&&this._content&&(this._container||(this._container=r.create(\"div\",\"mapboxgl-popup\",this._map.getContainer()),this._tip=r.create(\"div\",\"mapboxgl-popup-tip\",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(\" \").forEach((function(t){return n._container.classList.add(t)})),this._trackPointer&&this._container.classList.add(\"mapboxgl-popup-track-pointer\")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Oi(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var a=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),o=this.options.anchor,s=function e(r){if(r){if(\"number\"==typeof r){var n=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new t.Point(0,0),top:new t.Point(0,r),\"top-left\":new t.Point(n,n),\"top-right\":new t.Point(-n,n),bottom:new t.Point(0,-r),\"bottom-left\":new t.Point(n,-n),\"bottom-right\":new t.Point(-n,-n),left:new t.Point(r,0),right:new t.Point(-r,0)}}if(r instanceof t.Point||Array.isArray(r)){var i=t.Point.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.Point.convert(r.center||[0,0]),top:t.Point.convert(r.top||[0,0]),\"top-left\":t.Point.convert(r[\"top-left\"]||[0,0]),\"top-right\":t.Point.convert(r[\"top-right\"]||[0,0]),bottom:t.Point.convert(r.bottom||[0,0]),\"bottom-left\":t.Point.convert(r[\"bottom-left\"]||[0,0]),\"bottom-right\":t.Point.convert(r[\"bottom-right\"]||[0,0]),left:t.Point.convert(r.left||[0,0]),right:t.Point.convert(r.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!o){var l,c=this._container.offsetWidth,u=this._container.offsetHeight;l=a.y+s.bottom.ythis._map.transform.height-u?[\"bottom\"]:[],a.xthis._map.transform.width-c/2&&l.push(\"right\"),o=0===l.length?\"bottom\":l.join(\"-\")}var f=a.add(s[o]).round();r.setTransform(this._container,zi[o]+\" translate(\"+f.x+\"px,\"+f.y+\"px)\"),Di(this._container,o,\"popup\")}},n.prototype._onClose=function(){this.remove()},n}(t.Evented);var Zi={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Ei,NavigationControl:Pi,GeolocateControl:Ui,AttributionControl:bi,ScaleControl:Hi,FullscreenControl:Yi,Popup:Xi,Marker:Fi,Style:qe,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:function(){Bt().acquire(zt)},clearPrewarmedResources:function(){var t=Rt;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(zt),Rt=null):console.warn(\"Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()\"))},get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return Dt.workerCount},set workerCount(t){Dt.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){t.clearTileCache(e)},workerUrl:\"\"};return Zi})),r}))},{}],240:[function(t,e,r){\"use strict\";e.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},{}],241:[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 m(){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)))}m();var v={element:t};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(e){e?m():function(){if(!s)return;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}}),v};var n=t(\"mouse-event\")},{\"mouse-event\":243}],242:[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}},{}],243:[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<=0)return 1<=-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)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])t!=o-i>t&&(a-c)*(i-u)/(o-u)+c-n>t&&(s=!s),a=c,o=u}return s}};return e}},{}],257:[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;i0}))}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 m(){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 v,y=m();if(y){var x;if(t)(x=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above);else y.seg.otherFill=h.seg.myFill;r&&r.segmentUpdate(y.seg),h.other.remove(),h.remove()}if(a.getHead()!==h){r&&r.rewind(h.seg);continue}if(t)x=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=x?!h.seg.myFill.below:h.seg.myFill.below;else if(null===h.seg.otherFill)v=g?h.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:h.primary?o:i,h.seg.otherFill={above:v,below:v};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;l0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,t)}},a.prototype.read_uint16=function(t){var e=this.input;if(t+2>e.length)throw n(\"unexpected EOF\",\"EBADDATA\");return this.big_endian?256*e[t]+e[t+1]:e[t]+256*e[t+1]},a.prototype.read_uint32=function(t){var e=this.input;if(t+4>e.length)throw n(\"unexpected EOF\",\"EBADDATA\");return this.big_endian?16777216*e[t]+65536*e[t+1]+256*e[t+2]+e[t+3]:e[t]+256*e[t+1]+65536*e[t+2]+16777216*e[t+3]},a.prototype.is_subifd_link=function(t,e){return 0===t&&34665===e||0===t&&34853===e||34665===t&&40965===e},a.prototype.exif_format_length=function(t){switch(t){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},a.prototype.exif_format_read=function(t,e){var r;switch(t){case 1:case 2:return r=this.input[e];case 6:return(r=this.input[e])|33554430*(128&r);case 3:return r=this.read_uint16(e);case 8:return(r=this.read_uint16(e))|131070*(32768&r);case 4:return r=this.read_uint32(e);case 9:return 0|(r=this.read_uint32(e));case 5:case 10:case 11:case 12:case 7:default:return null}},a.prototype.scan_ifd=function(t,e,r){var a=this.read_uint16(e);e+=2;for(var o=0;othis.input.length)throw n(\"unexpected EOF\",\"EBADDATA\");for(var d=[],g=h,m=0;m0&&(this.ifds_to_read.push({id:s,offset:d[0]}),p=!0),!1===r({is_big_endian:this.big_endian,ifd:t,tag:s,format:l,count:c,entry_offset:e+this.start,data_length:f,data_offset:h+this.start,value:d,is_subifd_link:p}))return void(this.aborted=!0);e+=12}0===t&&this.ifds_to_read.push({id:1,offset:this.read_uint32(e)})},e.exports.ExifParser=a,e.exports.get_orientation=function(t){var e=0;try{return new a(t,0,t.length).each((function(t){if(0===t.ifd&&274===t.tag&&Array.isArray(t.value))return e=t.value[0],!1})),e}catch(t){return-1}}},{}],264:[function(t,e,r){\"use strict\";var n=t(\"./common\").readUInt16BE,i=t(\"./common\").readUInt32BE;function a(t,e){if(t.length<4+e)return null;var r=i(t,e);return t.length>4&15,i=15&t[4],a=t[5]>>4&15,o=n(t,6),l=8,c=0;ce.width||t.width===e.width&&t.height>e.height?t:e})),i=r.reduce((function(t,e){return t.height>e.height||t.height===e.height&&t.width>e.width?t:e})),n.width>i.height||n.width===i.height&&n.height>i.width?n:i),s=1;e.transforms.forEach((function(t){var e={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},r={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(\"imir\"===t.type&&(s=0===t.value?r[s]:e[s=e[s=r[s]]]),\"irot\"===t.type)for(var n=0;n1&&(h.variants=f.variants),f.orientation&&(h.orientation=f.orientation),f.exif_location&&f.exif_location.offset+f.exif_location.length<=t.length){var p=a(t,f.exif_location.offset),d=t.slice(f.exif_location.offset+p+4,f.exif_location.offset+f.exif_location.length),g=s.get_orientation(d);g>0&&(h.orientation=g)}return h}}}}}}},{\"../common\":262,\"../exif_utils\":263,\"../miaf_utils\":264}],266:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt16LE,o=n(\"BM\");e.exports=function(t){if(!(t.length<26)&&i(t,0,o))return{width:a(t,18),height:a(t,22),type:\"bmp\",mime:\"image/bmp\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],267:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt16LE,o=n(\"GIF87a\"),s=n(\"GIF89a\");e.exports=function(t){if(!(t.length<10)&&(i(t,0,o)||i(t,0,s)))return{width:a(t,6),height:a(t,8),type:\"gif\",mime:\"image/gif\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],268:[function(t,e,r){\"use strict\";var n=t(\"../common\").readUInt16LE;e.exports=function(t){var e=n(t,0),r=n(t,2),i=n(t,4);if(0===e&&1===r&&i){for(var a=[],o={width:0,height:0},s=0;so.width||c>o.height)&&(o=u)}return{width:o.width,height:o.height,variants:a,type:\"ico\",mime:\"image/x-icon\",wUnits:\"px\",hUnits:\"px\"}}}},{\"../common\":262}],269:[function(t,e,r){\"use strict\";var n=t(\"../common\").readUInt16BE,i=t(\"../common\").str2arr,a=t(\"../common\").sliceEq,o=t(\"../exif_utils\"),s=i(\"Exif\\0\\0\");e.exports=function(t){if(!(t.length<2)&&255===t[0]&&216===t[1]&&255===t[2])for(var e=2;;){for(;;){if(t.length-e<2)return;if(255===t[e++])break}for(var r,i,l=t[e++];255===l;)l=t[e++];if(208<=l&&l<=217||1===l)r=0;else{if(!(192<=l&&l<=254))return;if(t.length-e<2)return;r=n(t,e)-2,e+=2}if(217===l||218===l)return;if(225===l&&r>=10&&a(t,e,s)&&(i=o.get_orientation(t.slice(e+6,e+r))),r>=5&&192<=l&&l<=207&&196!==l&&200!==l&&204!==l){if(t.length-e0&&(c.orientation=i),c}e+=r}}},{\"../common\":262,\"../exif_utils\":263}],270:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt32BE,o=n(\"\\x89PNG\\r\\n\\x1a\\n\"),s=n(\"IHDR\");e.exports=function(t){if(!(t.length<24)&&i(t,0,o)&&i(t,12,s))return{width:a(t,16),height:a(t,20),type:\"png\",mime:\"image/png\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],271:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt32BE,o=n(\"8BPS\\0\\x01\");e.exports=function(t){if(!(t.length<22)&&i(t,0,o))return{width:a(t,18),height:a(t,14),type:\"psd\",mime:\"image/vnd.adobe.photoshop\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],272:[function(t,e,r){\"use strict\";function n(t){return\"number\"==typeof t&&isFinite(t)&&t>0}var i=/<[-_.:a-zA-Z0-9][^>]*>/,a=/^<([-_.:a-zA-Z0-9]+:)?svg\\s/,o=/[^-]\\bwidth=\"([^%]+?)\"|[^-]\\bwidth='([^%]+?)'/,s=/\\bheight=\"([^%]+?)\"|\\bheight='([^%]+?)'/,l=/\\bview[bB]ox=\"(.+?)\"|\\bview[bB]ox='(.+?)'/,c=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function u(t){return c.test(t)?t.match(c)[0]:\"px\"}e.exports=function(t){if(function(t){var e,r=0,n=t.length;for(239===t[0]&&187===t[1]&&191===t[2]&&(r=3);r>14&16383),type:\"webp\",mime:\"image/webp\",wUnits:\"px\",hUnits:\"px\"}}}function h(t,e){return{width:1+(t[e+6]<<16|t[e+5]<<8|t[e+4]),height:1+(t[e+9]<t.length)){for(;e+8=10?r=r||u(t,e+8):\"VP8L\"===p&&d>=9?r=r||f(t,e+8):\"VP8X\"===p&&d>=10?r=r||h(t,e+8):\"EXIF\"===p&&(n=s.get_orientation(t.slice(e+8,e+8+d)),e=1/0),e+=8+d}else e++;if(r)return n>0&&(r.orientation=n),r}}}},{\"../common\":262,\"../exif_utils\":263}],275:[function(t,e,r){\"use strict\";e.exports={avif:t(\"./parse_sync/avif\"),bmp:t(\"./parse_sync/bmp\"),gif:t(\"./parse_sync/gif\"),ico:t(\"./parse_sync/ico\"),jpeg:t(\"./parse_sync/jpeg\"),png:t(\"./parse_sync/png\"),psd:t(\"./parse_sync/psd\"),svg:t(\"./parse_sync/svg\"),tiff:t(\"./parse_sync/tiff\"),webp:t(\"./parse_sync/webp\")}},{\"./parse_sync/avif\":265,\"./parse_sync/bmp\":266,\"./parse_sync/gif\":267,\"./parse_sync/ico\":268,\"./parse_sync/jpeg\":269,\"./parse_sync/png\":270,\"./parse_sync/psd\":271,\"./parse_sync/svg\":272,\"./parse_sync/tiff\":273,\"./parse_sync/webp\":274}],276:[function(t,e,r){\"use strict\";var n=t(\"./lib/parsers_sync\");e.exports=function(t){return function(t){for(var e=Object.keys(n),r=0;r1)for(var r=1;r1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function T(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 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 float dashLength, pixelRatio, thickness, opacity, id, miterMode;\\nuniform sampler2D dashTexture;\\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) / dashLength) * .5 + .25;\\n\\tfloat dash = texture2D(dashTexture, 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||\"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\",splitNull:\"splitNull\"}),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=D}));(I=I.slice(0,R)).push(D)}for(var F=function(t){var e=k.slice(2*z,2*I[t]).concat(D?k.slice(2*D):[]),r=(d.hole||[]).map((function(e){return e-D+(I[t]-z)})),n=c(e,r);n=n.map((function(e){return e+z+(e+zt.length)&&(e=t.length);for(var r=0,n=new Array(e);r 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\"]),l.vert=h([\"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 bool constPointSize;\\nuniform float pixelRatio;\\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\\nuniform sampler2D paletteTexture;\\n\\nconst float maxSize = 100.;\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragBorderRadius, fragWidth;\\n\\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\\n\\nbool isDirect = (paletteSize.x < 1.);\\n\\nvec4 getColor(vec4 id) {\\n return isDirect ? id / 255. : texture2D(paletteTexture,\\n vec2(\\n (id.x + .5) / paletteSize.x,\\n (id.y + .5) / paletteSize.y\\n )\\n );\\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) * pointSizeScale;\\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\"]),m&&(l.frag=l.frag.replace(\"smoothstep\",\"smoothStep\"),s.frag=s.frag.replace(\"smoothstep\",\"smoothStep\")),this.drawCircle=t(l)}b.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},b.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},b.prototype.draw=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;nn)?e.tree=u(t,{bounds:f}):n&&n.length&&(e.tree=n),e.tree){var h={primitive:\"points\",usage:\"static\",data:e.tree,type:\"uint32\"};e.elements?e.elements(h):e.elements=o.elements(h)}var p=v.float32(t);return i({data:p,usage:\"dynamic\"}),a({data:v.fract32(t,p),usage:\"dynamic\"}),s({data:new Uint8Array(c),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=[],s=0,l=Math.min(e.length,r.count);s=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;o4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===i.length?i[0]:i},b.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;i2?(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;nk))&&(s.lower||!(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)||W(t.data))}function c(t,e,r,n,i,a){for(var o=0;o(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)||W(t)||l(t)?e=t:(\"data\"in t&&(e=t.data),\"usage\"in t&&(r=Q[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>>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,r.height>>=i,p(r,n[i]),t.mipmask|=1<e;++e)t.images[e]=null;return t}function C(t){for(var e=t.images,r=0;re){for(var r=0;r=--this.refCount&&F(this)}}),o.profile&&(a.getTotalTextureSize=function(){var t=0;return Object.keys(yt).forEach((function(e){t+=yt[e].stats.size})),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;P.call(r);var a=L();return\"number\"==typeof t?M(a,0|t,\"number\"==typeof e?0|e:0|t):t?(I(r,t),S(a,t)):M(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),E(a,3553),O(r,3553),R(),C(a),o.profile&&(i.stats.size=T(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 z(3553);return yt[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=v();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(),k(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=0;i.mipmask>>l;++l){var c=a>>l,u=s>>l;if(!c||!u)break;t.texImage2D(3553,l,i.format,c,u,0,i.format,i.type,null)}return R(),o.profile&&(i.stats.size=T(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(P.call(l),s=0;6>s;++s)g[s]=L();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(I(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)M(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)E(g[s],34069+s);for(O(l,34067),R(),o.profile&&(h.stats.size=T(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)C(g[s]);return f}var h=new z(34067);yt[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=v();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(),k(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=T(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;er;++r)if(0!=(e.mipmask&1<>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);O(e.texInfo,e.target)}))},refresh:function(){for(var e=0;ei;++i){for(c=0;ct;++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(k).forEach(m)},restore:function(){x.cur=null,x.next=null,x.dirty=!0,X(k).forEach((function(e){e.framebuffer=t.createFramebuffer(),v(e)}))}})}function M(){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,i,a,o){function s(){this.id=++f,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var t=e.oes_vertex_array_object;this.vao=t?t.createVertexArrayOES():null,h[this.id]=this,this.buffers=[]}var c=r.maxAttributes,u=Array(c);for(r=0;r=h.byteLength?c.subdata(h):(c.destroy(),r.buffers[s]=null)),r.buffers[s]||(c=r.buffers[s]=i.create(u,34962,!1,!0)),f.buffer=i.getBuffer(c),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1,t[s]=1;else i.getBuffer(u)?(f.buffer=i.getBuffer(u),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1):i.getBuffer(u.buffer)?(f.buffer=i.getBuffer(u.buffer),f.size=0|(+u.size||f.buffer.dimension),f.normalized=!!u.normalized||!1,f.type=\"type\"in u?K[u.type]:f.buffer.dtype,f.offset=0|(u.offset||0),f.stride=0|(u.stride||0),f.divisor=0|(u.divisor||0),f.state=1):\"x\"in u&&(f.x=+u.x||0,f.y=+u.y||0,f.z=+u.z||0,f.w=+u.w||0,f.state=2)}for(c=0;ct&&(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(e,n,i,a){var o=f[n];o||(o=f[n]={});var p=o[e];if(p&&(p.refCount++,!a))return p;var d=new s(n,e);return r.shaderCount++,l(d,i,a),p||(o[e]=d),h.push(d),j(d,{destroy:function(){if(d.refCount--,0>=d.refCount){t.deleteProgram(d.program);var e=h.indexOf(d);h.splice(e,1),r.shaderCount--}0>=o[d.vertId].refCount&&(t.deleteShader(u[d.vertId]),delete u[d.vertId],delete f[d.fragId][d.vertId]),Object.keys(f[d.fragId]).length||(t.deleteShader(c[d.fragId]),delete c[d.fragId],delete f[d.fragId])}})},restore:function(){c={},u={};for(var t=0;t\"+e+\"?\"+i+\".constant[\"+e+\"]:0;\"})).join(\"\"),\"}}else{\",\"if(\",s,\"(\",i,\".buffer)){\",u,\"=\",a,\".createStream(\",34962,\",\",i,\".buffer);\",\"}else{\",u,\"=\",a,\".getBuffer(\",i,\".buffer);\",\"}\",f,'=\"type\" in ',i,\"?\",o.glTypes,\"[\",i,\".type]:\",u,\".dtype;\",l.normalized,\"=!!\",i,\".normalized;\"),n(\"size\"),n(\"offset\"),n(\"stride\"),n(\"divisor\"),r(\"}}\"),r.exit(\"if(\",l.isStream,\"){\",a,\".destroyStream(\",u,\");\",\"}\"),l}))})),o}function A(t,e,n,i,o){function s(t){var e=c[t];e&&(h[t]=e)}var l=function(t,e){if(\"string\"==typeof(r=t.static).frag&&\"string\"==typeof r.vert){if(0>1)\",s],\");\")}function e(){r(l,\".drawArraysInstancedANGLE(\",[d,g,m,s],\");\")}p&&\"null\"!==p?y?t():(r(\"if(\",p,\"){\"),t(),r(\"}else{\"),e(),r(\"}\")):e()}function o(){function t(){r(u+\".drawElements(\"+[d,m,v,g+\"<<((\"+v+\"-5121)>>1)\"]+\");\")}function e(){r(u+\".drawArrays(\"+[d,g,m]+\");\")}p&&\"null\"!==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),h.elementsActive&&a(\"if(\"+i+\")\"+u+\".bindBuffer(34963,\"+i+\".buffer.buffer);\")):(i=a.def(),a(i,\"=\",f,\".\",\"elements\",\";\",\"if(\",i,\"){\",u,\".bindBuffer(\",34963,\",\",i,\".buffer.buffer);}\",\"else if(\",c.vao,\".currentVAO){\",i,\"=\",t.shared.elements+\".getElements(\"+c.vao,\".currentVAO.elements);\",nt?\"\":\"if(\"+i+\")\"+u+\".bindBuffer(34963,\"+i+\".buffer.buffer);\",\"}\")),i}(),d=i(\"primitive\"),g=i(\"offset\"),m=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 m){if(0===m)return}else r(\"if(\",m,\"){\"),r.exit(\"}\");tt&&(s=i(\"instances\"),l=t.instancing);var v=p+\".type\",y=h.elements&&D(h.elements)&&!h.vaoActive;tt&&(\"number\"!=typeof s||0<=s)?\"string\"==typeof s?(r(\"if(\",s,\">0){\"),a(),r(\"}else if(\",s,\"<0){\"),o(),r(\"}\")):a():o()}function G(t,e,r,n,i){return i=(e=b()).proc(\"body\",i),tt&&(e.instancing=i.def(e.shared.extensions,\".angle_instanced_arrays\")),t(e,i,r,n),e.compile().body}function Y(t,e,r,n){B(t,e),r.useVAO?r.drawVAO?e(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,e),\");\"):e(t.shared.vao,\".setVAO(\",t.shared.vao,\".targetVAO);\"):(e(t.shared.vao,\".setVAO(null);\"),U(t,e,r,n.attributes,(function(){return!0}))),H(t,e,r,n.uniforms,(function(){return!0}),!1),q(t,e,e,r)}function W(t,e,r,n){function i(){return!0}t.batchId=\"a1\",B(t,e),U(t,e,r,n.attributes,i),H(t,e,r,n.uniforms,i,!1),q(t,e,e,r)}function X(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}B(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&&M(t,u,r.context),r.needsFramebuffer&&S(t,u,r.framebuffer),L(t,u,r.state,i),r.profile&&i(r.profile)&&N(t,u,r,!1,!0),n?(r.useVAO?r.drawVAO?i(r.drawVAO)?u(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,u),\");\"):c(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,c),\");\"):c(t.shared.vao,\".setVAO(\",t.shared.vao,\".targetVAO);\"):(c(t.shared.vao,\".setVAO(null);\"),U(t,c,r,n.attributes,a),U(t,u,r,n.attributes,i)),H(t,c,r,n.uniforms,a,!1),H(t,u,r,n.uniforms,i,!0),q(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 G(W,t,r,e,2)})),\"(\",n,\");}\",c,\".call(this,a0[\",s,\"],\",s,\");\"))}function Z(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;M(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),O(Object.keys(r.state)).forEach((function(e){var n=r.state[e].append(t,i);m(n)?n.forEach((function(r,n){i.set(t.next[e],\"[\"+n+\"]\",r)})):i.set(a.next,\".\"+e,n)})),N(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){var o=r.uniforms[n].append(t,i);Array.isArray(o)&&(o=\"[\"+o.join()+\"]\"),i.set(a.uniforms,\"[\"+e.id(n)+\"]\",o)})),Object.keys(r.attributes).forEach((function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new Q).forEach((function(t){i.set(a,\".\"+t,n[t])}))})),r.scopeVAO&&i.set(a.vao,\".targetVAO\",r.scopeVAO.append(t,i)),n(\"vert\"),n(\"frag\"),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.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)}}},xt=[];xt[6408]=4,xt[6407]=3;var bt=[];bt[5121]=1,bt[5126]=4,bt[36193]=2;var _t=[\"x\",\"y\",\"z\",\"w\"],wt=\"blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset\".split(\" \"),Tt={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},At={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,\"increment wrap\":34055,\"decrement wrap\":34056,invert:5386},Mt={cw:2304,ccw:2305},St=new z(!1,!1,!1,(function(){}));return function(t){function e(){if(0===J.length)w&&w.update(),tt=null;else{tt=H.next(e),f();for(var t=J.length-1;0<=t;--t){var r=J[t];r&&r(P,null,0)}m.flush(),w&&w.update()}}function r(){!tt&&0=J.length&&n()}}}}function u(){var t=X.viewport,e=X.scissor_box;t[0]=t[1]=e[0]=e[1]=0,P.viewportWidth=P.framebufferWidth=P.drawingBufferWidth=t[2]=e[2]=m.drawingBufferWidth,P.viewportHeight=P.framebufferHeight=P.drawingBufferHeight=t[3]=e[3]=m.drawingBufferHeight}function f(){P.tick+=1,P.time=g(),u(),W.procs.poll()}function h(){F.refresh(),u(),W.procs.refresh(),w&&w.update()}function g(){return(q()-T)/1e3}if(!(t=i(t)))return null;var m=t.gl,v=m.getContextAttributes();m.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;ie;++e)et(j({framebuffer:t.framebuffer.faces[e]},t),l);else et(t,l);else l(0,t)},prop:V.define.bind(null,1),context:V.define.bind(null,2),this:V.define.bind(null,3),draw:s({}),buffer:function(t){return O.create(t,34962,!1,!1)},elements:function(t){return z.create(t,!1)},texture:F.create2D,cube:F.createCube,renderbuffer:U.create,framebuffer:G.create,framebufferCube:G.createCube,vao:D.createVAO,attributes:v,frame:c,on:function(t,e){var r;switch(t){case\"frame\":return c(e);case\"lost\":r=K;break;case\"restore\":r=Q;break;case\"destroy\":r=$}return r.push(e),{cancel:function(){for(var t=0;t2?\"one of \".concat(e,\" \").concat(t.slice(0,r-1).join(\", \"),\", or \")+t[r-1]:2===r?\"one of \".concat(e,\" \").concat(t[0],\" or \").concat(t[1]):\"of \".concat(e,\" \").concat(t[0])}return\"of \".concat(e,\" \").concat(String(t))}i(\"ERR_INVALID_OPT_VALUE\",(function(t,e){return'The value \"'+e+'\" is invalid for option \"'+t+'\"'}),TypeError),i(\"ERR_INVALID_ARG_TYPE\",(function(t,e,r){var n,i,o,s;if(\"string\"==typeof e&&(i=\"not \",e.substr(!o||o<0?0:+o,i.length)===i)?(n=\"must not be\",e=e.replace(/^not /,\"\")):n=\"must be\",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t,\" argument\"))s=\"The \".concat(t,\" \").concat(n,\" \").concat(a(e,\"type\"));else{var l=function(t,e,r){return\"number\"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,\".\")?\"property\":\"argument\";s='The \"'.concat(t,'\" ').concat(l,\" \").concat(n,\" \").concat(a(e,\"type\"))}return s+=\". Received type \".concat(typeof r)}),TypeError),i(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\"),i(\"ERR_METHOD_NOT_IMPLEMENTED\",(function(t){return\"The \"+t+\" method is not implemented\"})),i(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\"),i(\"ERR_STREAM_DESTROYED\",(function(t){return\"Cannot call \"+t+\" after a stream was destroyed\"})),i(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\"),i(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\"),i(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\"),i(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError),i(\"ERR_UNKNOWN_ENCODING\",(function(t){return\"Unknown encoding: \"+t}),TypeError),i(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\"),e.exports.codes=n},{}],287:[function(t,e,r){(function(r){(function(){\"use strict\";var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=c;var i=t(\"./_stream_readable\"),a=t(\"./_stream_writable\");t(\"inherits\")(c,i);for(var o=n(a.prototype),s=0;s0)if(\"string\"==typeof e||o.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),n)o.endEmitted?w(t,new _):S(t,o,e,!0);else if(o.ended)w(t,new x);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?S(t,o,e,!1):P(t,o)):S(t,o,e,!1)}else n||(o.reading=!1,P(t,o));return!o.ended&&(o.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function L(t){var e=t._readableState;c(\"emitReadable\",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c(\"emitReadable\",e.flowing),e.emittedReadable=!0,r.nextTick(C,t))}function C(t){var e=t._readableState;c(\"emitReadable_\",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit(\"readable\"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,R(t)}function P(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(I,t,e))}function I(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount(\"data\")>0&&t.resume()}function z(t){c(\"readable nexttick read 0\"),t.read(0)}function D(t,e){c(\"resume\",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit(\"resume\"),R(t),e.flowing&&!e.reading&&t.read(0)}function R(t){var e=t._readableState;for(c(\"flow\",e.flowing);e.flowing&&null!==t.read(););}function F(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(\"\"):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function B(t){var e=t._readableState;c(\"endReadable\",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(N,e,t))}function N(t,e){if(c(\"endReadableNT\",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit(\"end\"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function j(t,e){for(var r=0,n=t.length;r=e.highWaterMark:e.length>0)||e.ended))return c(\"read: emitReadable\",e.length,e.ended),0===e.length&&e.ended?B(this):L(this),null;if(0===(t=E(t,e))&&e.ended)return 0===e.length&&B(this),null;var n,i=e.needReadable;return c(\"need readable\",i),(0===e.length||e.length-t0?F(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&B(this)),null!==n&&this.emit(\"data\",n),n},A.prototype._read=function(t){w(this,new b(\"_read()\"))},A.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c(\"pipe count=%d opts=%j\",i.pipesCount,e);var o=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?l:m;function s(e,r){c(\"onunpipe\"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c(\"cleanup\"),t.removeListener(\"close\",d),t.removeListener(\"finish\",g),t.removeListener(\"drain\",u),t.removeListener(\"error\",p),t.removeListener(\"unpipe\",s),n.removeListener(\"end\",l),n.removeListener(\"end\",m),n.removeListener(\"data\",h),f=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function l(){c(\"onend\"),t.end()}i.endEmitted?r.nextTick(o):n.once(\"end\",o),t.on(\"unpipe\",s);var u=function(t){return function(){var e=t._readableState;c(\"pipeOnDrain\",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,\"data\")&&(e.flowing=!0,R(t))}}(n);t.on(\"drain\",u);var f=!1;function h(e){c(\"ondata\");var r=t.write(e);c(\"dest.write\",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==j(i.pipes,t))&&!f&&(c(\"false write response, pause\",i.awaitDrain),i.awaitDrain++),n.pause())}function p(e){c(\"onerror\",e),m(),t.removeListener(\"error\",p),0===a(t,\"error\")&&w(t,e)}function d(){t.removeListener(\"finish\",g),m()}function g(){c(\"onfinish\"),t.removeListener(\"close\",d),m()}function m(){c(\"unpipe\"),n.unpipe(t)}return n.on(\"data\",h),function(t,e,r){if(\"function\"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,\"error\",p),t.once(\"close\",d),t.once(\"finish\",g),t.emit(\"pipe\",n),i.flowing||(c(\"pipe resume\"),n.resume()),t},A.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit(\"unpipe\",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a0,!1!==i.flowing&&this.resume()):\"readable\"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c(\"on readable\",i.length,i.reading),i.length?L(this):i.reading||r.nextTick(z,this))),n},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(t,e){var n=o.prototype.removeListener.call(this,t,e);return\"readable\"===t&&r.nextTick(O,this),n},A.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return\"readable\"!==t&&void 0!==t||r.nextTick(O,this),e},A.prototype.resume=function(){var t=this._readableState;return t.flowing||(c(\"resume\"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(D,t,e))}(this,t)),t.paused=!1,this},A.prototype.pause=function(){return c(\"call pause flowing=%j\",this._readableState.flowing),!1!==this._readableState.flowing&&(c(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this},A.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on(\"end\",(function(){if(c(\"wrapped end\"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on(\"data\",(function(i){(c(\"wrapped data\"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&\"function\"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var a=0;a-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(A.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(t,e,r){r(new g(\"_write()\"))},A.prototype._writev=null,A.prototype.end=function(t,e,n){var i=this._writableState;return\"function\"==typeof t?(n=t,t=null,e=null):\"function\"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,P(t,e),n&&(e.finished?r.nextTick(n):t.once(\"finish\",n));e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(A.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,\"destroyed\",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),A.prototype.destroy=f.destroy,A.prototype._undestroy=f.undestroy,A.prototype._destroy=function(t,e){e(t)}}).call(this)}).call(this,t(\"_process\"),\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"../errors\":286,\"./_stream_duplex\":287,\"./internal/streams/destroy\":294,\"./internal/streams/state\":298,\"./internal/streams/stream\":299,_process:277,buffer:85,inherits:231,\"util-deprecate\":330}],292:[function(t,e,r){(function(r){(function(){\"use strict\";var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var a=t(\"./end-of-stream\"),o=Symbol(\"lastResolve\"),s=Symbol(\"lastReject\"),l=Symbol(\"error\"),c=Symbol(\"ended\"),u=Symbol(\"lastPromise\"),f=Symbol(\"handlePromise\"),h=Symbol(\"stream\");function p(t,e){return{value:t,done:e}}function d(t){var e=t[o];if(null!==e){var r=t[h].read();null!==r&&(t[u]=null,t[o]=null,t[s]=null,e(p(r,!1)))}}function g(t){r.nextTick(d,t)}var m=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var t=this,e=this[l];if(null!==e)return Promise.reject(e);if(this[c])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise((function(e,n){r.nextTick((function(){t[l]?n(t[l]):e(p(void 0,!0))}))}));var n,i=this[u];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(p(void 0,!0)):e[f](r,n)}),n)}}(i,this));else{var a=this[h].read();if(null!==a)return Promise.resolve(p(a,!1));n=new Promise(this[f])}return this[u]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,\"return\",(function(){var t=this;return new Promise((function(e,r){t[h].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),n),m);e.exports=function(t){var e,r=Object.create(v,(i(e={},h,{value:t,writable:!0}),i(e,o,{value:null,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,l,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,f,{value:function(t,e){var n=r[h].read();n?(r[u]=null,r[o]=null,r[s]=null,t(p(n,!1))):(r[o]=t,r[s]=e)},writable:!0}),e));return r[u]=null,a(t,(function(t){if(t&&\"ERR_STREAM_PREMATURE_CLOSE\"!==t.code){var e=r[s];return null!==e&&(r[u]=null,r[o]=null,r[s]=null,e(t)),void(r[l]=t)}var n=r[o];null!==n&&(r[u]=null,r[o]=null,r[s]=null,n(p(void 0,!0))),r[c]=!0})),t.on(\"readable\",g.bind(null,r)),r}}).call(this)}).call(this,t(\"_process\"))},{\"./end-of-stream\":295,_process:277}],293:[function(t,e,r){\"use strict\";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){for(var r=0;r0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:\"unshift\",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:\"shift\",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:\"clear\",value:function(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function(t){if(0===this.length)return\"\";for(var e=this.head,r=\"\"+e.data;e=e.next;)r+=t+e.data;return r}},{key:\"concat\",value:function(t){if(0===this.length)return o.alloc(0);for(var e,r,n,i=o.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,r=i,n=s,o.prototype.copy.call(e,r,n),s+=a.data.length,a=a.next;return i}},{key:\"consume\",value:function(t,e){var r;return ti.length?i.length:t;if(a===i.length?n+=i:n+=i.slice(0,t),0==(t-=a)){a===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(a));break}++r}return this.length-=r,n}},{key:\"_getBuffer\",value:function(t){var e=o.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,a=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,a),0==(t-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,e}},{key:l,value:function(t,e){return s(this,function(t){for(var e=1;e0,(function(t){n||(n=t),t&&o.forEach(c),a||(o.forEach(c),i(n))}))}));return e.reduce(u)}},{\"../../../errors\":286,\"./end-of-stream\":295}],298:[function(t,e,r){\"use strict\";var n=t(\"../../../errors\").codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(t,e,r,i){var a=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new n(i?r:\"highWaterMark\",a);return Math.floor(a)}return t.objectMode?16:16384}}},{\"../../../errors\":286}],299:[function(t,e,r){e.exports=t(\"events\").EventEmitter},{events:84}],300:[function(t,e,r){\"use strict\";var n=t(\"safe-buffer\").Buffer,i=n.isEncoding||function(t){switch((t=\"\"+t)&&t.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return\"utf8\";for(var e;;)switch(t){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return t;default:if(e)return;t=(\"\"+t).toLowerCase(),e=!0}}(t);if(\"string\"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error(\"Unknown encoding: \"+t);return e||t}(t),this.encoding){case\"utf16le\":this.text=l,this.end=c,e=4;break;case\"utf8\":this.fillLast=s,e=4;break;case\"base64\":this.text=u,this.end=f,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,\"\\ufffd\";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,\"\\ufffd\";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,\"\\ufffd\"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){if((t.length-e)%2==0){var r=t.toString(\"utf16le\",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,r)}return e}function u(t,e){var r=(t.length-e)%3;return 0===r?t.toString(\"base64\",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):\"\"}r.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return\"\";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString(\"utf8\",e,n)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{\"safe-buffer\":284}],301:[function(t,e,r){(function(r,n){(function(){var r=t(\"assert\"),i=t(\"debug\")(\"stream-parser\");e.exports=function(t){var e=t&&\"function\"==typeof t._transform,r=t&&\"function\"==typeof t._write;if(!e&&!r)throw new Error(\"must pass a Writable or Transform stream in\");i(\"extending Parser into stream\"),t._bytes=o,t._skipBytes=s,e&&(t._passthrough=l);e?t._transform=u:t._write=c};function a(t){i(\"initializing parser stream\"),t._parserBytesLeft=0,t._parserBuffers=[],t._parserBuffered=0,t._parserState=-1,t._parserCallback=null,\"function\"==typeof t.push&&(t._parserOutput=t.push.bind(t)),t._parserInit=!0}function o(t,e){r(!this._parserCallback,'there is already a \"callback\" set!'),r(isFinite(t)&&t>0,'can only buffer a finite number of bytes > 0, got \"'+t+'\"'),this._parserInit||a(this),i(\"buffering %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=0}function s(t,e){r(!this._parserCallback,'there is already a \"callback\" set!'),r(t>0,'can only skip > 0 bytes, got \"'+t+'\"'),this._parserInit||a(this),i(\"skipping %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=1}function l(t,e){r(!this._parserCallback,'There is already a \"callback\" set!'),r(t>0,'can only pass through > 0 bytes, got \"'+t+'\"'),this._parserInit||a(this),i(\"passing through %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=2}function c(t,e,r){this._parserInit||a(this),i(\"write(%o bytes)\",t.length),\"function\"==typeof e&&(r=e),h(this,t,null,r)}function u(t,e,r){this._parserInit||a(this),i(\"transform(%o bytes)\",t.length),\"function\"!=typeof e&&(e=this._parserOutput),h(this,t,e,r)}function f(t,e,r,a){if(t._parserBytesLeft-=e.length,i(\"%o bytes left for stream piece\",t._parserBytesLeft),0===t._parserState?(t._parserBuffers.push(e),t._parserBuffered+=e.length):2===t._parserState&&r(e),0!==t._parserBytesLeft)return a;var o=t._parserCallback;if(o&&0===t._parserState&&t._parserBuffers.length>1&&(e=n.concat(t._parserBuffers,t._parserBuffered)),0!==t._parserState&&(e=null),t._parserCallback=null,t._parserBuffered=0,t._parserState=-1,t._parserBuffers.splice(0),o){var s=[];e&&s.push(e),r&&s.push(r);var l=o.length>s.length;l&&s.push(p(a));var c=o.apply(t,s);if(!l||a===c)return a}}var h=p((function t(e,r,n,i){return e._parserBytesLeft<=0?i(new Error(\"got data but not currently parsing anything\")):r.length<=e._parserBytesLeft?function(){return f(e,r,n,i)}:function(){var a=r.slice(0,e._parserBytesLeft);return f(e,a,n,(function(o){return o?i(o):r.length>a.length?function(){return t(e,r.slice(a.length),n,i)}:void 0}))}}));function p(t){return function(){for(var e=t.apply(this,arguments);\"function\"==typeof e;)e=e();return e}}}).call(this)}).call(this,t(\"_process\"),t(\"buffer\").Buffer)},{_process:277,assert:75,buffer:85,debug:302}],302:[function(t,e,r){(function(n){(function(){function i(){var t;try{t=r.storage.debug}catch(t){}return!t&&void 0!==n&&\"env\"in n&&(t=n.env.DEBUG),t}(r=e.exports=t(\"./debug\")).log=function(){return\"object\"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},r.formatArgs=function(t){var e=this.useColors;if(t[0]=(e?\"%c\":\"\")+this.namespace+(e?\" %c\":\" \")+t[0]+(e?\"%c \":\" \")+\"+\"+r.humanize(this.diff),!e)return;var n=\"color: \"+this.color;t.splice(1,0,n,\"color: inherit\");var i=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){\"%%\"!==t&&(i++,\"%c\"===t&&(a=i))})),t.splice(a,0,n)},r.save=function(t){try{null==t?r.storage.removeItem(\"debug\"):r.storage.debug=t}catch(t){}},r.load=i,r.useColors=function(){if(\"undefined\"!=typeof window&&window.process&&\"renderer\"===window.process.type)return!0;return\"undefined\"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||\"undefined\"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},r.storage=\"undefined\"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),r.colors=[\"lightseagreen\",\"forestgreen\",\"goldenrod\",\"dodgerblue\",\"darkorchid\",\"crimson\"],r.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return\"[UnexpectedJSONParseError]: \"+t.message}},r.enable(i())}).call(this)}).call(this,t(\"_process\"))},{\"./debug\":303,_process:277}],303:[function(t,e,r){var n;function i(t){function e(){if(e.enabled){var t=e,i=+new Date,a=i-(n||i);t.diff=a,t.prev=n,t.curr=i,n=i;for(var o=new Array(arguments.length),s=0;s0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var r=parseFloat(e[1]);switch((e[2]||\"ms\").toLowerCase()){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return 315576e5*r;case\"days\":case\"day\":case\"d\":return r*o;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return r*a;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return r*i;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return r*n;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return r;default:return}}(t);if(\"number\"===l&&!1===isNaN(t))return e.long?s(r=t,o,\"day\")||s(r,a,\"hour\")||s(r,i,\"minute\")||s(r,n,\"second\")||r+\" ms\":function(t){if(t>=o)return Math.round(t/o)+\"d\";if(t>=a)return Math.round(t/a)+\"h\";if(t>=i)return Math.round(t/i)+\"m\";if(t>=n)return Math.round(t/n)+\"s\";return t+\"ms\"}(t);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(t))}},{}],305:[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;s0;){e=c[c.length-1];var p=t[e];if(a[e]=0&&s[e].push(o[g])}a[e]=d}else{if(n[e]===r[e]){var m=[],v=[],y=0;for(d=l.length-1;d>=0;--d){var x=l[d];if(i[x]=!1,m.push(x),v.push(s[x]),y+=s[x].length,o[x]=f.length,x===e){l.length=d;break}}f.push(m);var b=new Array(y);for(d=0;d1&&(i=1),i<-1&&(i=-1),(t*n-e*r<0?-1:1)*Math.acos(i)};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,m=t.sweepFlag,v=void 0===m?0:m,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 T=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(f,2);T>1&&(u*=Math.sqrt(T),f*=Math.sqrt(T));var k=function(t,e,r,n,a,o,l,c,u,f,h,p){var d=Math.pow(a,2),g=Math.pow(o,2),m=Math.pow(h,2),v=Math.pow(p,2),y=d*g-d*v-g*m;y<0&&(y=0),y/=d*v+g*m;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,T=(h-x)/a,k=(p-b)/o,A=(-h-x)/a,M=(-p-b)/o,S=s(1,0,T,k),E=s(T,k,A,M);return 0===c&&E>0&&(E-=i),1===c&&E<0&&(E+=i),[_,w,S,E]}(e,r,l,c,u,f,g,v,x,b,_,w),A=n(k,4),M=A[0],S=A[1],E=A[2],L=A[3],C=Math.abs(L)/(i/4);Math.abs(1-C)<1e-7&&(C=1);var P=Math.max(Math.ceil(C),1);L/=P;for(var I=0;Ie[2]&&(e[2]=c[u+0]),c[u+1]>e[3]&&(e[3]=c[u+1]);return e}},{\"abs-svg-path\":70,assert:75,\"is-svg-path\":238,\"normalize-svg-path\":309,\"parse-svg-path\":250}],309:[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;d4?(o=m[m.length-4],s=m[m.length-3]):(o=h,s=p),r.push(m)}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\":307}],310:[function(t,e,r){\"use strict\";var n,i=t(\"svg-path-bounds\"),a=t(\"parse-svg-path\"),o=t(\"draw-svg-path\"),s=t(\"is-svg-path\"),l=t(\"bitmap-sdf\"),c=document.createElement(\"canvas\"),u=c.getContext(\"2d\");e.exports=function(t,e){if(!s(t))throw Error(\"Argument should be valid svg path string\");e||(e={});var r,f;e.shape?(r=e.shape[0],f=e.shape[1]):(r=c.width=e.w||e.width||200,f=c.height=e.h||e.height||200);var h=Math.min(r,f),p=e.stroke||0,d=e.viewbox||e.viewBox||i(t),g=[r/(d[2]-d[0]),f/(d[3]-d[1])],m=Math.min(g[0]||0,g[1]||0)/2;u.fillStyle=\"black\",u.fillRect(0,0,r,f),u.fillStyle=\"white\",p&&(\"number\"!=typeof p&&(p=1),u.strokeStyle=p>0?\"white\":\"black\",u.lineWidth=Math.abs(p));if(u.translate(.5*r,.5*f),u.scale(m,m),function(){if(null!=n)return n;var t=document.createElement(\"canvas\").getContext(\"2d\");if(t.canvas.width=t.canvas.height=1,!window.Path2D)return n=!1;var e=new Path2D(\"M0,0h1v1h-1v-1Z\");t.fillStyle=\"black\",t.fill(e);var r=t.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var v=new Path2D(t);u.fill(v),p&&u.stroke(v)}else{var y=a(t);o(u,y),u.fill(),p&&u.stroke()}return u.setTransform(1,0,0,1,0,0),l(u,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*h})}},{\"bitmap-sdf\":82,\"draw-svg-path\":126,\"is-svg-path\":238,\"parse-svg-path\":250,\"svg-path-bounds\":308}],311:[function(t,e,r){(function(e,n){(function(){var i=t(\"process/browser.js\").nextTick,a=Function.prototype.apply,o=Array.prototype.slice,s={},l=0;function c(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new c(a.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(a.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate=\"function\"==typeof e?e:function(t){var e=l++,n=!(arguments.length<2)&&o.call(arguments,1);return s[e]=!0,i((function(){s[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate=\"function\"==typeof n?n:function(t){delete s[t]}}).call(this)}).call(this,t(\"timers\").setImmediate,t(\"timers\").clearImmediate)},{\"process/browser.js\":277,timers:311}],312:[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:I(e[1]),g:I(e[2]),b:I(e[3]),a:R(e[4]),format:i?\"name\":\"hex8\"};if(e=j.hex6.exec(t))return{r:I(e[1]),g:I(e[2]),b:I(e[3]),format:i?\"name\":\"hex\"};if(e=j.hex4.exec(t))return{r:I(e[1]+\"\"+e[1]),g:I(e[2]+\"\"+e[2]),b:I(e[3]+\"\"+e[3]),a:R(e[4]+\"\"+e[4]),format:i?\"name\":\"hex8\"};if(e=j.hex3.exec(t))return{r:I(e[1]+\"\"+e[1]),g:I(e[2]+\"\"+e[2]),b:I(e[3]+\"\"+e[3]),format:i?\"name\":\"hex\"};return!1}(e));\"object\"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(p=e.r,d=e.g,g=e.b,i={r:255*C(p,255),g:255*C(d,255),b:255*C(g,255)},f=!0,h=\"%\"===String(e.r).substr(-1)?\"prgb\":\"rgb\"):U(e.h)&&U(e.s)&&U(e.v)?(l=z(e.s),c=z(e.v),i=function(e,r,n){e=6*C(e,360),r=C(r,100),n=C(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\"):U(e.h)&&U(e.s)&&U(e.l)&&(l=z(e.s),u=z(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=C(t,360),e=C(e,100),r=C(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=L(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=C(t,255),e=C(e,255),r=C(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>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(c(n));return a}function M(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=L(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=[O(a(t).toString(16)),O(a(e).toString(16)),O(a(r).toString(16)),O(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*C(this._r,255))+\"%\",g:a(100*C(this._g,255))+\"%\",b:a(100*C(this._b,255))+\"%\",a:this._a}},toPercentageRgbString:function(){return 1==this._a?\"rgb(\"+a(100*C(this._r,255))+\"%, \"+a(100*C(this._g,255))+\"%, \"+a(100*C(this._b,255))+\"%)\":\"rgba(\"+a(100*C(this._r,255))+\"%, \"+a(100*C(this._g,255))+\"%, \"+a(100*C(this._b,255))+\"%, \"+this._roundA+\")\"},toName:function(){return 0===this._a?\"transparent\":!(this._a<1)&&(E[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(v,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(m,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(M,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(T,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]:z(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;ul&&(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\"},E=c.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(S);function L(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function C(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 P(t){return o(1,s(0,t))}function I(t){return parseInt(t,16)}function O(t){return 1==t.length?\"0\"+t:\"\"+t}function z(t){return t<=1&&(t=100*t+\"%\"),t}function D(e){return t.round(255*parseFloat(e)).toString(16)}function R(t){return I(t)/255}var F,B,N,j=(B=\"[\\\\s|\\\\(]+(\"+(F=\"(?:[-\\\\+]?\\\\d*\\\\.\\\\d+%?)|(?:[-\\\\+]?\\\\d+%?)\")+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")\\\\s*\\\\)?\",N=\"[\\\\s|\\\\(]+(\"+F+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")\\\\s*\\\\)?\",{CSS_UNIT:new RegExp(F),rgb:new RegExp(\"rgb\"+B),rgba:new RegExp(\"rgba\"+N),hsl:new RegExp(\"hsl\"+B),hsla:new RegExp(\"hsla\"+N),hsv:new RegExp(\"hsv\"+B),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 U(t){return!!j.CSS_UNIT.exec(t)}void 0!==e&&e.exports?e.exports=c:window.tinycolor=c}(Math)},{}],313:[function(t,e,r){\"use strict\";e.exports=i,e.exports.float32=e.exports.float=i,e.exports.fract32=e.exports.fract=function(t,e){if(t.length){if(t instanceof Float32Array)return new Float32Array(t.length);e instanceof Float32Array||(e=i(t));for(var r=0,n=e.length;ro&&(o=t[0]),t[1]s&&(s=t[1])}function c(t){switch(t.type){case\"GeometryCollection\":t.geometries.forEach(c);break;case\"Point\":l(t.coordinates);break;case\"MultiPoint\":t.coordinates.forEach(l)}}for(e in t.arcs.forEach((function(t){for(var e,r=-1,l=t.length;++ro&&(o=e[0]),e[1]s&&(s=e[1])})),t.objects)c(t.objects[e]);return[i,a,o,s]}function i(t,e){var r=e.id,n=e.bbox,i=null==e.properties?{}:e.properties,o=a(t,e);return null==r&&null==n?{type:\"Feature\",properties:i,geometry:o}:null==n?{type:\"Feature\",id:r,properties:i,geometry:o}:{type:\"Feature\",id:r,bbox:n,properties:i,geometry:o}}function a(t,e){var n=r(t.transform),i=t.arcs;function a(t,e){e.length&&e.pop();for(var r=i[t<0?~t:t],a=0,o=r.length;a1)n=l(t,e,r);else for(i=0,n=new Array(a=t.arcs.length);i1)for(var a,s,c=1,u=l(i[0]);cu&&(s=i[0],i[0]=i[c],i[c]=s,u=a);return i})).filter((function(t){return t.length>0}))}}function u(t,e){for(var r=0,n=t.length;r>>1;t[i]=2))throw new Error(\"n must be \\u22652\");var r,i=(l=t.bbox||n(t))[0],a=l[1],o=l[2],s=l[3];e={scale:[o-i?(o-i)/(r-1):1,s-a?(s-a)/(r-1):1],translate:[i,a]}}var l,c,u=f(e),h=t.objects,p={};function d(t){return u(t)}function g(t){var e;switch(t.type){case\"GeometryCollection\":e={type:\"GeometryCollection\",geometries:t.geometries.map(g)};break;case\"Point\":e={type:\"Point\",coordinates:d(t.coordinates)};break;case\"MultiPoint\":e={type:\"MultiPoint\",coordinates:t.coordinates.map(d)};break;default:return t}return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),null!=t.properties&&(e.properties=t.properties),e}for(c in h)p[c]=g(h[c]);return{type:\"Topology\",bbox:l,transform:e,objects:p,arcs:t.arcs.map((function(t){var e,r=0,n=1,i=t.length,a=new Array(i);for(a[0]=u(t[0],0);++r\":(e.length>100&&(e=e.slice(0,99)+\"\\u2026\"),e=e.replace(i,(function(t){switch(t){case\"\\n\":return\"\\\\n\";case\"\\r\":return\"\\\\r\";case\"\\u2028\":return\"\\\\u2028\";case\"\\u2029\":return\"\\\\u2029\";default:throw new Error(\"Unexpected character\")}})))}},{\"./safe-to-string\":318}],320:[function(t,e,r){\"use strict\";var n=t(\"../value/is\"),i={object:!0,function:!0,undefined:!0};e.exports=function(t){return!!n(t)&&hasOwnProperty.call(i,typeof t)}},{\"../value/is\":326}],321:[function(t,e,r){\"use strict\";var n=t(\"../lib/resolve-exception\"),i=t(\"./is\");e.exports=function(t){return i(t)?t:n(t,\"%v is not a plain function\",arguments[1])}},{\"../lib/resolve-exception\":317,\"./is\":322}],322:[function(t,e,r){\"use strict\";var n=t(\"../function/is\"),i=/^\\s*class[\\s{/}]/,a=Function.prototype.toString;e.exports=function(t){return!!n(t)&&!i.test(a.call(t))}},{\"../function/is\":316}],323:[function(t,e,r){\"use strict\";var n=t(\"../object/is\");e.exports=function(t){if(!n(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(t){return!1}}},{\"../object/is\":320}],324:[function(t,e,r){\"use strict\";var n=t(\"../value/is\"),i=t(\"../object/is\"),a=Object.prototype.toString;e.exports=function(t){if(!n(t))return null;if(i(t)){var e=t.toString;if(\"function\"!=typeof e)return null;if(e===a)return null}try{return\"\"+t}catch(t){return null}}},{\"../object/is\":320,\"../value/is\":326}],325:[function(t,e,r){\"use strict\";var n=t(\"../lib/resolve-exception\"),i=t(\"./is\");e.exports=function(t){return i(t)?t:n(t,\"Cannot use %v\",arguments[1])}},{\"../lib/resolve-exception\":317,\"./is\":326}],326:[function(t,e,r){\"use strict\";e.exports=function(t){return null!=t}},{}],327:[function(t,e,r){(function(e){(function(){\"use strict\";var n=t(\"bit-twiddle\"),i=t(\"dup\"),a=t(\"buffer\").Buffer;e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var o=\"undefined\"!=typeof Uint8ClampedArray,s=\"undefined\"!=typeof BigUint64Array,l=\"undefined\"!=typeof BigInt64Array,c=e.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=i([32,0])),c.BIGUINT64||(c.BIGUINT64=i([32,0])),c.BIGINT64||(c.BIGINT64=i([32,0])),c.BUFFER||(c.BUFFER=i([32,0]));var u=c.DATA,f=c.BUFFER;function h(t){if(t){var e=t.length||t.byteLength,r=n.log2(e);u[r].push(t)}}function p(t){t=n.nextPow2(t);var e=n.log2(t),r=u[e];return r.length>0?r.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function g(t){return new Uint16Array(p(2*t),0,t)}function m(t){return new Uint32Array(p(4*t),0,t)}function v(t){return new Int8Array(p(t),0,t)}function y(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function T(t){return s?new BigUint64Array(p(8*t),0,t):null}function k(t){return l?new BigInt64Array(p(8*t),0,t):null}function A(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=f[e];return r.length>0?r.pop():new a(t)}r.free=function(t){if(a.isBuffer(t))f[n.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|n.log2(e);u[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeBigUint64=r.freeInt8=r.freeInt16=r.freeInt32=r.freeBigInt64=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){h(t.buffer)},r.freeArrayBuffer=h,r.freeBuffer=function(t){f[n.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||\"arraybuffer\"===e)return p(t);switch(e){case\"uint8\":return d(t);case\"uint16\":return g(t);case\"uint32\":return m(t);case\"int8\":return v(t);case\"int16\":return y(t);case\"int32\":return x(t);case\"float\":case\"float32\":return b(t);case\"double\":case\"float64\":return _(t);case\"uint8_clamped\":return w(t);case\"bigint64\":return k(t);case\"biguint64\":return T(t);case\"buffer\":return M(t);case\"data\":case\"dataview\":return A(t);default:return null}return null},r.mallocArrayBuffer=p,r.mallocUint8=d,r.mallocUint16=g,r.mallocUint32=m,r.mallocInt8=v,r.mallocInt16=y,r.mallocInt32=x,r.mallocFloat32=r.mallocFloat=b,r.mallocFloat64=r.mallocDouble=_,r.mallocUint8Clamped=w,r.mallocBigUint64=T,r.mallocBigInt64=k,r.mallocDataView=A,r.mallocBuffer=M,r.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,u[t].length=0,f[t].length=0}}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"bit-twiddle\":81,buffer:85,dup:128}],328:[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):\"\"}},{}],329:[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;n2111)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>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;if(!(\"number\"==typeof t&&t>=1888&&t<=2111))throw new Error(\"Lunar year outside range 1888-2111\");if(!(\"number\"==typeof e&&e>=1&&e<=12))throw new Error(\"Lunar month outside range 1 - 12\");if(!(\"number\"==typeof r&&r>=1&&r<=30))throw new Error(\"Lunar day outside range 1 - 30\");\"object\"==typeof n?(l=!1,a=n):(l=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:l}}s=o.day-1;var c,u=f[o.year-f[0]],p=u>>13;c=p&&(o.month>p||o.isIntercalary)?o.month:o.month-1;for(var d=0;d>9&4095,(g>>5&15)-1,(31&g)+s);return a.year=m.getFullYear(),a.month=1+m.getMonth(),a.day=m.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{if(!(\"number\"==typeof t&&t>=1888&&t<=2111))throw new Error(\"Solar year outside range 1888-2111\");if(!(\"number\"==typeof e&&e>=1&&e<=12))throw new Error(\"Solar month outside range 1 - 12\");if(!(\"number\"==typeof r&&r>=1&&r<=31))throw new Error(\"Solar day outside range 1 - 31\");i={year:t,month:e,day:r},a=n||{}}var o=h[i.year-h[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=h[a.year-h[0]];var l,c=new Date(o>>9&4095,(o>>5&15)-1,31&o),u=new Date(i.year,i.month-1,i.day);l=Math.round((u-c)/864e5);var p,d=f[a.year-f[0]];for(p=0;p<13;p++){var g=d&1<<12-p?30:29;if(l>13;!m||p=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\":346,\"object-assign\":247}],335:[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\":346,\"object-assign\":247}],336:[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)||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=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=tthis.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\":346,\"object-assign\":247}],337:[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\":346,\"object-assign\":247}],338:[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\":346,\"object-assign\":247}],339:[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;r19||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\":346,\"object-assign\":247}],340:[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=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\":346,\"object-assign\":247}],341:[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(),void 0===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),void 0===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;r0?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\":346,\"object-assign\":247}],343:[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\":346,\"object-assign\":247}],344:[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\":346,\"object-assign\":247}],345:[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;ar)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;ne);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\":346,\"object-assign\":247}],346:[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(;oe-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.minDay&&r-this.minDay13.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\":247}],347:[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+n1}),d=function(t,e,r,n){var i=\"\"+e;if(p(t,n))for(;i.length1},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-1){p=1,d=g;for(var E=this.daysInMonth(h,p);d>E;E=this.daysInMonth(h,p))p++,d-=E}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\":346,\"object-assign\":247}],348:[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}]},{}],349:[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;t(\"../../constants/axis_placeable_objects\");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\"}}})},{\"../../constants/axis_placeable_objects\":472,\"../../plot_api/plot_template\":543,\"../../plots/cartesian/constants\":561,\"../../plots/font_attributes\":585,\"./arrow_paths\":348}],350:[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),a=i.getRefType(e.xref),o=i.getRefType(e.yref);e._extremes={},\"range\"===a&&s(e,r),\"range\"===o&&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,m=3*t.startarrowsize*t.arrowwidth||0,v=m+h,y=m-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,v),ppadminus:Math.max(f,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else v=s?v+s:v,y=s?y-s:y,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(u,d,v),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\":503,\"../../plots/cartesian/axes\":554,\"./draw\":355}],351:[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;r0||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;r2/3?\"right\":\"center\"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var W=!1,X=[\"x\",\"y\"],Z=0;Z1)&&(nt===rt?((pt=it.r2fraction(e[\"a\"+et]))<0||pt>1)&&(W=!0):W=!0),J=it._offset+it.r2p(e[et]),$=.5}else{var dt=\"domain\"===ht;\"x\"===et?(Q=e[et],J=dt?it._offset+it._length*Q:J=T.l+T.w*Q):(Q=1-e[et],J=dt?it._offset+it._length*Q:J=T.t+T.h*Q),$=e.showarrow?.5:Q}if(e.showarrow){ft.head=J;var gt=e[\"a\"+et];if(tt=ot*q(.5,e.xanchor)-st*q(.5,e.yanchor),nt===rt){var mt=l.getRefType(nt);\"domain\"===mt?(\"y\"===et&&(gt=1-gt),ft.tail=it._offset+it._length*gt):\"paper\"===mt?\"y\"===et?(gt=1-gt,ft.tail=T.t+T.h*gt):ft.tail=T.l+T.w*gt:ft.tail=it._offset+it.r2p(gt),K=tt}else ft.tail=J+gt,K=tt+gt;ft.text=ft.tail+tt;var vt=w[\"x\"===et?\"width\":\"height\"];if(\"paper\"===rt&&(ft.head=o.constrain(ft.head,1,vt-1)),\"pixel\"===nt){var yt=-Math.max(ft.tail-3,ft.text),xt=Math.min(ft.tail+3,ft.text)-vt;yt>0?(ft.tail+=yt,ft.text+=yt):xt>0&&(ft.tail-=xt,ft.text-=xt)}ft.tail+=ut,ft.head+=ut}else K=tt=lt*q($,ct),ft.text=J+tt;ft.text+=ut,tt+=ut,K+=ut,e[\"_\"+et+\"padplus\"]=lt/2+K,e[\"_\"+et+\"padminus\"]=lt/2-K,e[\"_\"+et+\"size\"]=lt,e[\"_\"+et+\"shift\"]=tt}if(W)R.remove();else{var bt=0,_t=0;if(\"left\"!==e.align&&(bt=(A-b)*(\"center\"===e.align?.5:1)),\"top\"!==e.valign&&(_t=(D-_)*(\"middle\"===e.valign?.5:1)),f)n.select(\"svg\").attr({x:N+bt-1,y:N+_t}).call(u.setClipUrl,U?L:null,t);else{var wt=N+_t-g.top,Tt=N+bt-g.left;G.call(h.positionText,Tt,wt).call(u.setClipUrl,U?L:null,t)}V.select(\"rect\").call(u.setRect,N,N,A,D),j.call(u.setRect,F/2,F/2,B-F,H-F),R.call(u.setTranslate,Math.round(C.x.text-B/2),Math.round(C.y.text-H/2)),O.attr({transform:\"rotate(\"+P+\",\"+C.x.text+\",\"+C.y.text+\")\"});var kt,At=function(r,n){I.selectAll(\".annotation-arrow-g\").remove();var l=C.x.head,f=C.y.head,h=C.x.tail+r,p=C.y.tail+n,g=C.x.text+r,b=C.y.text+n,_=o.rotationXYMatrix(P,g,b),w=o.apply2DTransform(_),A=o.apply2DTransform2(_),L=+j.attr(\"width\"),z=+j.attr(\"height\"),D=g-.5*L,F=D+L,B=b-.5*z,N=B+z,U=[[D,B,D,N],[D,N,F,N],[F,N,F,B],[F,B,D,B]].map(A);if(!U.reduce((function(t,e){return t^!!o.segmentsIntersect(l,f,l+1e6,f+1e6,e[0],e[1],e[2],e[3])}),!1)){U.forEach((function(t){var e=o.segmentsIntersect(h,p,l,f,t[0],t[1],t[2],t[3]);e&&(h=e.x,p=e.y)}));var V=e.arrowwidth,H=e.arrowcolor,q=e.arrowside,G=I.append(\"g\").style({opacity:c.opacity(H)}).classed(\"annotation-arrow-g\",!0),Y=G.append(\"path\").attr(\"d\",\"M\"+h+\",\"+p+\"L\"+l+\",\"+f).style(\"stroke-width\",V+\"px\").call(c.stroke,c.rgb(H));if(m(Y,q,e),k.annotationPosition&&Y.node().parentNode&&!a){var W=l,X=f;if(e.standoff){var Z=Math.sqrt(Math.pow(l-h,2)+Math.pow(f-p,2));W+=e.standoff*(h-l)/Z,X+=e.standoff*(p-f)/Z}var J,K,Q=G.append(\"path\").classed(\"annotation-arrow\",!0).classed(\"anndrag\",!0).classed(\"cursor-move\",!0).attr({d:\"M3,3H-3V-3H3ZM0,0L\"+(h-W)+\",\"+(p-X),transform:s(W,X)}).style(\"stroke-width\",V+6+\"px\").call(c.stroke,\"rgba(0,0,0,0)\").call(c.fill,\"rgba(0,0,0,0)\");d.init({element:Q.node(),gd:t,prepFn:function(){var t=u.getTranslate(R);J=t.x,K=t.y,v&&v.autorange&&M(v._name+\".autorange\",!0),x&&x.autorange&&M(x._name+\".autorange\",!0)},moveFn:function(t,r){var n=w(J,K),i=n[0]+t,a=n[1]+r;R.call(u.setTranslate,i,a),S(\"x\",y(v,t,\"x\",T,e)),S(\"y\",y(x,r,\"y\",T,e)),e.axref===e.xref&&S(\"ax\",y(v,t,\"ax\",T,e)),e.ayref===e.yref&&S(\"ay\",y(x,r,\"ay\",T,e)),G.attr(\"transform\",s(t,r)),O.attr({transform:\"rotate(\"+P+\",\"+i+\",\"+a+\")\"})},doneFn:function(){i.call(\"_guiRelayout\",t,E());var e=document.querySelector(\".js-notes-box-panel\");e&&e.redraw(e.selectedObj)}})}}};if(e.showarrow&&At(0,0),z)d.init({element:R.node(),gd:t,prepFn:function(){kt=O.attr(\"transform\")},moveFn:function(t,r){var n=\"pointer\";if(e.showarrow)e.axref===e.xref?S(\"ax\",y(v,t,\"ax\",T,e)):S(\"ax\",e.ax+t),e.ayref===e.yref?S(\"ay\",y(x,r,\"ay\",T.w,e)):S(\"ay\",e.ay+r),At(t,r);else{if(a)return;var i,o;if(v)i=y(v,t,\"x\",T,e);else{var l=e._xsize/T.w,c=e.x+(e._xshift-e.xshift)/T.w-l/2;i=d.align(c+t/T.w,l,0,1,e.xanchor)}if(x)o=y(x,r,\"y\",T,e);else{var u=e._ysize/T.h,f=e.y-(e._yshift+e.yshift)/T.h-u/2;o=d.align(f-r/T.h,u,0,1,e.yanchor)}S(\"x\",i),S(\"y\",o),v&&x||(n=d.getCursor(v?.5:i,x?.5:o,e.xanchor,e.yanchor))}O.attr({transform:s(t,r)+kt}),p(R,n)},clickFn:function(r,n){e.captureevents&&t.emit(\"plotly_clickannotation\",Y(n))},doneFn:function(){p(R),i.call(\"_guiRelayout\",t,E());var e=document.querySelector(\".js-notes-box-panel\");e&&e.redraw(e.selectedObj)}})}}}e.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(\".annotation\").remove();for(var r=0;r=0,x=e.indexOf(\"end\")>=0,b=d.backoff*m+r.standoff,_=g.backoff*v+r.startstandoff;if(\"line\"===p.nodeName){o={x:+t.attr(\"x1\"),y:+t.attr(\"y1\")},u={x:+t.attr(\"x2\"),y:+t.attr(\"y2\")};var w=o.x-u.x,T=o.y-u.y;if(h=(f=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T))return void z();if(b){if(b*b>w*w+T*T)return void z();var k=b*Math.cos(f),A=b*Math.sin(f);u.x+=k,u.y+=A,t.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+T*T)return void z();var M=_*Math.cos(f),S=_*Math.sin(f);o.x-=M,o.y-=S,t.attr({x1:o.x,y1:o.y})}}else if(\"path\"===p.nodeName){var E=p.getTotalLength(),L=\"\";if(E1){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\":607,\"../annotations/draw\":355}],362:[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=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+\")\"}o.tinyRGB=function(t){var e=t.toRgb();return\"rgb(\"+Math.round(e.r)+\", \"+Math.round(e.g)+\", \"+Math.round(e.b)+\")\"},o.rgb=function(t){return o.tinyRGB(n(t))},o.opacity=function(t){return t?n(t).getAlpha():0},o.addOpacity=function(t,e){var r=n(t).toRgb();return\"rgba(\"+Math.round(r.r)+\", \"+Math.round(r.g)+\", \"+Math.round(r.b)+\", \"+e+\")\"},o.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||c).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()},o.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(o.combine(t,c))),(i.isDark()?e?i.lighten(e):c:r?i.darken(r):l).toString()},o.stroke=function(t,e){var r=n(e);t.style({stroke:o.tinyRGB(r),\"stroke-opacity\":r.getAlpha()})},o.fill=function(t,e){var r=n(e);t.style({fill:o.tinyRGB(r),\"fill-opacity\":r.getAlpha()})},o.clean=function(t){if(t&&\"object\"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e0?n>=l:n<=l));i++)n>u&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var ct=Math.pow(10,Math.floor(Math.log(lt)/Math.LN10));ot*=ct*c.roundUp(lt/ct,[2,5,10]),(Math.abs(q.start)/q.size+1e-6)%1<2e-6&&(it.tick0=0)}it.dtick=ot}it.domain=o?[rt+I/R.h,rt+K-I/R.h]:[rt+P/R.w,rt+K-P/R.w],it.setScale(),t.attr(\"transform\",u(Math.round(R.l),Math.round(R.t)));var ut,ft=t.select(\".\"+A.cbtitleunshift).attr(\"transform\",u(-Math.round(R.l),-Math.round(R.t))),ht=it.ticklabelposition,pt=it.title.font.size,dt=t.select(\".\"+A.cbaxis),gt=0,mt=0;function vt(n,i){var a={propContainer:it,propName:e._propPrefix+\"title\",traceIndex:e._traceIndex,_meta:e._meta,placeholder:D._dfltTitle.colorbar,containerGroup:t.select(\".\"+A.cbtitle)},o=\"h\"===n.charAt(0)?n.substr(1):\"h\"+n;t.selectAll(\".\"+o+\",.\"+o+\"-math-group\").remove(),g.draw(r,n,f(a,i||{}))}return c.syncOrAsync([a.previousPromises,function(){var t,e;(o&&at||!o&&!at)&&(\"top\"===j&&(t=P+R.l+R.w*O,e=I+R.t+R.h*(1-rt-K)+3+.75*pt),\"bottom\"===j&&(t=P+R.l+R.w*O,e=I+R.t+R.h*(1-rt)-3-.25*pt),\"right\"===j&&(e=I+R.t+R.h*z+3+.75*pt,t=P+R.l+R.w*rt),vt(it._id+\"title\",{attributes:{x:t,y:e,\"text-anchor\":o?\"start\":\"middle\"}}))},function(){if(!o&&!at||o&&at){var a,l=t.select(\".\"+A.cbtitle),f=l.select(\"text\"),h=[-M/2,M/2],d=l.select(\".h\"+it._id+\"title-math-group\").node(),g=15.6;if(f.node()&&(g=parseInt(f.node().style.fontSize,10)*w),d?(a=p.bBox(d),mt=a.width,(gt=a.height)>g&&(h[1]-=(gt-g)/2)):f.node()&&!f.classed(A.jsPlaceholder)&&(a=p.bBox(f.node()),mt=a.width,gt=a.height),o){if(gt){if(gt+=5,\"top\"===j)it.domain[1]-=gt/R.h,h[1]*=-1;else{it.domain[0]+=gt/R.h;var v=m.lineCount(f);h[1]+=(1-v)*g}l.attr(\"transform\",u(h[0],h[1])),it.setScale()}}else mt&&(\"right\"===j&&(it.domain[0]+=(mt+pt/2)/R.w),l.attr(\"transform\",u(h[0],h[1])),it.setScale())}t.selectAll(\".\"+A.cbfills+\",.\"+A.cblines).attr(\"transform\",o?u(0,Math.round(R.h*(1-it.domain[1]))):u(Math.round(R.w*it.domain[0]),0)),dt.attr(\"transform\",o?u(0,Math.round(-R.t)):u(Math.round(-R.l),0));var y=t.select(\".\"+A.cbfills).selectAll(\"rect.\"+A.cbfill).attr(\"style\",\"\").data(Y);y.enter().append(\"rect\").classed(A.cbfill,!0).style(\"stroke\",\"none\"),y.exit().remove();var x=U.map(it.c2p).map(Math.round).sort((function(t,e){return t-e}));y.each((function(t,a){var s=[0===a?U[0]:(Y[a]+Y[a-1])/2,a===Y.length-1?U[1]:(Y[a]+Y[a+1])/2].map(it.c2p).map(Math.round);o&&(s[1]=c.constrain(s[1]+(s[1]>s[0])?1:-1,x[0],x[1]));var l=n.select(this).attr(o?\"x\":\"y\",Q).attr(o?\"y\":\"x\",n.min(s)).attr(o?\"width\":\"height\",Math.max(X,2)).attr(o?\"height\":\"width\",Math.max(n.max(s)-n.min(s),2));if(e._fillgradient)p.gradient(l,r,e._id,o?\"vertical\":\"horizontalreversed\",e._fillgradient,\"fill\");else{var u=H(t).replace(\"e-\",\"\");l.attr(\"fill\",i(u).toHexString())}}));var b=t.select(\".\"+A.cblines).selectAll(\"path.\"+A.cbline).data(B.color&&B.width?W:[]);b.enter().append(\"path\").classed(A.cbline,!0),b.exit().remove(),b.each((function(t){var e=Q,r=Math.round(it.c2p(t))+B.width/2%1;n.select(this).attr(\"d\",\"M\"+(o?e+\",\"+r:r+\",\"+e)+(o?\"h\":\"v\")+X).call(p.lineGroupStyle,B.width,V(t),B.dash)})),dt.selectAll(\"g.\"+it._id+\"tick,path\").remove();var _=Q+X+(M||0)/2-(\"outside\"===e.ticks?1:0),T=s.calcTicks(it),k=s.getTickSigns(it)[2];return s.drawTicks(r,it,{vals:\"inside\"===it.ticks?s.clipEnds(it,T):T,layer:dt,path:s.makeTickPath(it,_,k),transFn:s.makeTransTickFn(it)}),s.drawLabels(r,it,{vals:T,layer:dt,transFn:s.makeTransTickLabelFn(it),labelFns:s.makeLabelFns(it,_)})},function(){if(o&&!at||!o&&at){var t,i,a=it.position||0,s=it._offset+it._length/2;if(\"right\"===j)i=s,t=R.l+R.w*a+10+pt*(it.showticklabels?1:.5);else if(t=s,\"bottom\"===j&&(i=R.t+R.h*a+10+(-1===ht.indexOf(\"inside\")?it.tickfont.size:0)+(\"intside\"!==it.ticks&&e.ticklen||0)),\"top\"===j){var l=N.text.split(\"
\").length;i=R.t+R.h*a+10-X-w*pt*l}vt((o?\"h\":\"v\")+it._id+\"title\",{avoid:{selection:n.select(r).selectAll(\"g.\"+it._id+\"tick\"),side:j,offsetTop:o?0:R.t,offsetLeft:o?R.l:0,maxShift:o?D.width:D.height},attributes:{x:t,y:i,\"text-anchor\":\"middle\"},transform:{rotate:o?-90:0,offset:0}})}},a.previousPromises,function(){var n,s=X+M/2;-1===ht.indexOf(\"inside\")&&(n=p.bBox(dt.node()),s+=o?n.width:n.height),ut=ft.select(\"text\");var c=0,f=o&&\"top\"===j,g=!o&&\"right\"===j,m=0;if(ut.node()&&!ut.classed(A.jsPlaceholder)){var y,x=ft.select(\".h\"+it._id+\"title-math-group\").node();x&&(o&&at||!o&&!at)?(c=(n=p.bBox(x)).width,y=n.height):(c=(n=p.bBox(ft.node())).right-R.l-(o?Q:nt),y=n.bottom-R.t-(o?nt:Q),o||\"top\"!==j||(s+=n.height,m=n.height)),g&&(ut.attr(\"transform\",u(c/2+pt/2,0)),c*=2),s=Math.max(s,o?c:y)}var b=2*(o?P:I)+s+S+M/2,w=0;!o&&N.text&&\"bottom\"===C&&z<=0&&(b+=w=b/2,m+=w),D._hColorbarMoveTitle=w,D._hColorbarMoveCBTitle=m;var F=S+M;t.select(\".\"+A.cbbg).attr(\"x\",(o?Q:nt)-F/2-(o?P:0)).attr(\"y\",(o?nt:Q)-(o?J:I+m-w)).attr(o?\"width\":\"height\",Math.max(b-w,2)).attr(o?\"height\":\"width\",Math.max(J+F,2)).call(d.fill,E).call(d.stroke,e.bordercolor).style(\"stroke-width\",S);var B=g?Math.max(c-10,0):0;if(t.selectAll(\".\"+A.cboutline).attr(\"x\",(o?Q:nt+P)+B).attr(\"y\",(o?nt+I-J:Q)+(f?gt:0)).attr(o?\"width\":\"height\",Math.max(X,2)).attr(o?\"height\":\"width\",Math.max(J-(o?2*I+gt:2*P+B),2)).call(d.stroke,e.outlinecolor).style({fill:\"none\",\"stroke-width\":M}),t.attr(\"transform\",u(R.l-(o?$*b:0),R.t-(o?0:(1-tt)*b-m))),!o&&(S||i(E).getAlpha()&&!i.equals(D.paper_bgcolor,E))){var U=dt.selectAll(\"text\"),V=U[0].length,H=t.select(\".\"+A.cbbg).node(),q=p.bBox(H),G=p.getTranslate(t);U.each((function(t,e){var r=V-1;if(0===e||e===r){var n,i=p.bBox(this),a=p.getTranslate(this);if(e===r){var o=i.right+a.x;(n=q.right+G.x+nt-S-2+O-o)>0&&(n=0)}else if(0===e){var s=i.left+a.x;(n=q.left+G.x+nt+S+2-s)<0&&(n=0)}n&&(V<3?this.setAttribute(\"transform\",\"translate(\"+n+\",0) \"+this.getAttribute(\"transform\")):this.setAttribute(\"visibility\",\"hidden\"))}}))}var Y={},W=T[L],Z=k[L],K=T[C],et=k[C],rt=b-X;o?(\"pixels\"===h?(Y.y=z,Y.t=J*K,Y.b=J*et):(Y.t=Y.b=0,Y.yt=z+l*K,Y.yb=z-l*et),\"pixels\"===_?(Y.x=O,Y.l=b*W,Y.r=b*Z):(Y.l=rt*W,Y.r=rt*Z,Y.xl=O-v*W,Y.xr=O+v*Z)):(\"pixels\"===h?(Y.x=O,Y.l=J*W,Y.r=J*Z):(Y.l=Y.r=0,Y.xl=O+l*W,Y.xr=O-l*Z),\"pixels\"===_?(Y.y=1-z,Y.t=b*K,Y.b=b*et):(Y.t=rt*K,Y.b=rt*et,Y.yt=z-v*K,Y.yb=z+v*et)),a.autoMargin(r,e._id,Y)}],r)}(r,e,t);v&&v.then&&(t._promises||[]).push(v),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,a,s=\"v\"===e.orientation,c=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr(\"transform\"),h(t)},moveFn:function(r,o){t.attr(\"transform\",n+u(r,o)),i=l.align((s?e._uFrac:e._vFrac)+r/c.w,s?e._thickFrac:e._lenFrac,0,1,e.xanchor),a=l.align((s?e._vFrac:1-e._uFrac)-o/c.h,s?e._lenFrac:e._thickFrac,0,1,e.yanchor);var f=l.getCursor(i,a,e.xanchor,e.yanchor);h(t,f)},doneFn:function(){if(h(t),void 0!==i&&void 0!==a){var n={};n[e._propPrefix+\"x\"]=i,n[e._propPrefix+\"y\"]=a,void 0!==e._traceIndex?o.call(\"_guiRestyle\",r,n,e._traceIndex):o.call(\"_guiRelayout\",r,n)}}})}(r,e,t)})),e.exit().each((function(e){a.autoMargin(t,e._id)})).remove(),e.order()}}},{\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/extend\":493,\"../../lib/setcursor\":524,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../plots/cartesian/axis_defaults\":556,\"../../plots/cartesian/layout_attributes\":569,\"../../plots/cartesian/position_defaults\":572,\"../../plots/plots\":619,\"../../registry\":638,\"../color\":366,\"../colorscale/helpers\":377,\"../dragelement\":385,\"../drawing\":388,\"../titles\":464,\"./constants\":368,\"@plotly/d3\":58,tinycolor2:312}],371:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t){return n.isPlainObject(t.colorbar)}},{\"../../lib\":503}],372:[function(t,e,r){\"use strict\";e.exports={moduleType:\"component\",name:\"colorbar\",attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),draw:t(\"./draw\").draw,hasColorbar:t(\"./has_colorbar\")}},{\"./attributes\":367,\"./defaults\":369,\"./draw\":370,\"./has_colorbar\":371}],373:[function(t,e,r){\"use strict\";var n=t(\"../colorbar/attributes\"),i=t(\"../../lib/regex\").counter,a=t(\"../../lib/sort_object_keys\"),o=t(\"./scales.js\").scales;a(o);function s(t){return\"`\"+t+\"`\"}e.exports=function(t,e){t=t||\"\";var r,a=(e=e||{}).cLetter||\"c\",l=(\"onlyIfNumerical\"in e?e.onlyIfNumerical:Boolean(t),\"noScale\"in e?e.noScale:\"marker.line\"===t),c=\"showScaleDflt\"in e?e.showScaleDflt:\"z\"===a,u=\"string\"==typeof e.colorscaleDflt?o[e.colorscaleDflt]:null,f=e.editTypeOverride||\"\",h=t?t+\".\":\"\";\"colorAttr\"in e?(r=e.colorAttr,e.colorAttr):s(h+(r={z:\"z\",c:\"color\"}[a]));var p=a+\"auto\",d=a+\"min\",g=a+\"max\",m=a+\"mid\",v=(s(h+p),s(h+d),s(h+g),{});v[d]=v[g]=void 0;var y={};y[p]=!1;var x={};return\"color\"===r&&(x.color={valType:\"color\",arrayOk:!0,editType:f||\"style\"},e.anim&&(x.color.anim=!0)),x[p]={valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:v},x[d]={valType:\"number\",dflt:null,editType:f||\"plot\",impliedEdits:y},x[g]={valType:\"number\",dflt:null,editType:f||\"plot\",impliedEdits:y},x[m]={valType:\"number\",dflt:null,editType:\"calc\",impliedEdits:v},x.colorscale={valType:\"colorscale\",editType:\"calc\",dflt:u,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:\"boolean\",dflt:!1!==e.autoColorDflt,editType:\"calc\",impliedEdits:{colorscale:void 0}},x.reversescale={valType:\"boolean\",dflt:!1,editType:\"plot\"},l||(x.showscale={valType:\"boolean\",dflt:c,editType:\"calc\"},x.colorbar=n),e.noColorAxis||(x.coloraxis={valType:\"subplotid\",regex:i(\"coloraxis\"),dflt:null,editType:\"calc\"}),x}},{\"../../lib/regex\":520,\"../../lib/sort_object_keys\":526,\"../colorbar/attributes\":367,\"./scales.js\":381}],374:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"./helpers\").extractOpts;e.exports=function(t,e,r){var o,s=t._fullLayout,l=r.vals,c=r.containerStr,u=c?i.nestedProperty(e,c).get():e,f=a(u),h=!1!==f.auto,p=f.min,d=f.max,g=f.mid,m=function(){return i.aggNums(Math.min,null,l)},v=function(){return i.aggNums(Math.max,null,l)};(void 0===p?p=m():h&&(p=u._colorAx&&n(p)?Math.min(p,m()):m()),void 0===d?d=v():h&&(d=u._colorAx&&n(d)?Math.max(d,v()):v()),h&&void 0!==g&&(d-g>g-p?p=g-(d-g):d-g=0?s.colorscale.sequential:s.colorscale.sequentialminus,f._sync(\"colorscale\",o))}},{\"../../lib\":503,\"./helpers\":377,\"fast-isnumeric\":190}],375:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./helpers\").hasColorscale,a=t(\"./helpers\").extractOpts;e.exports=function(t,e){function r(t,e){var r=t[\"_\"+e];void 0!==r&&(t[e]=r)}function o(t,i){var o=i.container?n.nestedProperty(t,i.container).get():t;if(o)if(o.coloraxis)o._colorAx=e[o.coloraxis];else{var s=a(o),l=s.auto;(l||void 0===s.min)&&r(o,i.min),(l||void 0===s.max)&&r(o,i.max),s.autocolorscale&&r(o,\"colorscale\")}}for(var s=0;s=0;n--,i++){var a=t[n];r[i]=[1-a[0],a[1]]}return r}function d(t,e){e=e||{};for(var r=t.domain,o=t.range,l=o.length,c=new Array(l),u=0;u4/3-s?o:s}},{}],383:[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\":503}],384:[function(t,e,r){\"use strict\";r.selectMode=function(t){return\"lasso\"===t||\"select\"===t},r.drawMode=function(t){return\"drawclosedpath\"===t||\"drawopenpath\"===t||\"drawline\"===t||\"drawrect\"===t||\"drawcircle\"===t},r.openMode=function(t){return\"drawline\"===t||\"drawopenpath\"===t},r.rectMode=function(t){return\"select\"===t||\"drawline\"===t||\"drawrect\"===t||\"drawcircle\"===t},r.freeMode=function(t){return\"lasso\"===t||\"drawclosedpath\"===t||\"drawopenpath\"===t},r.selectingOrDrawing=function(t){return r.freeMode(t)||r.rectMode(t)}},{}],385:[function(t,e,r){\"use strict\";var n=t(\"mouse-event-offset\"),i=t(\"has-hover\"),a=t(\"has-passive-events\"),o=t(\"../../lib\").removeElement,s=t(\"../../plots/cartesian/constants\"),l=e.exports={};l.align=t(\"./align\"),l.getCursor=t(\"./cursor\");var c=t(\"./unhover\");function u(){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 f(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(t){var e,r,n,c,h,p,d,g,m=t.gd,v=1,y=m._context.doubleClickDelay,x=t.element;m._mouseDownTime||(m._mouseDownTime=0),x.style.pointerEvents=\"all\",x.onmousedown=_,a?(x._ontouchstart&&x.removeEventListener(\"touchstart\",x._ontouchstart),x._ontouchstart=_,x.addEventListener(\"touchstart\",_,{passive:!1})):x.ontouchstart=_;var b=t.clampFn||function(t,e,r){return Math.abs(t)y&&(v=Math.max(v-1,1)),m._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(v,p),!g){var r;try{r=new MouseEvent(\"click\",e)}catch(t){var n=f(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)}d.dispatchEvent(r)}m._dragging=!1,m._dragged=!1}else m._dragged=!1}},l.coverSlip=u},{\"../../lib\":503,\"../../plots/cartesian/constants\":561,\"./align\":382,\"./cursor\":383,\"./unhover\":386,\"has-hover\":228,\"has-passive-events\":229,\"mouse-event-offset\":242}],386:[function(t,e,r){\"use strict\";var n=t(\"../../lib/events\"),i=t(\"../../lib/throttle\"),a=t(\"../../lib/dom\").getGraphDiv,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&&!t._dragged&&!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/dom\":491,\"../../lib/events\":492,\"../../lib/throttle\":530,\"../fx/constants\":400}],387:[function(t,e,r){\"use strict\";r.dash={valType:\"string\",values:[\"solid\",\"dot\",\"dash\",\"longdash\",\"dashdot\",\"longdashdot\"],dflt:\"solid\",editType:\"style\"},r.pattern={shape:{valType:\"enumerated\",values:[\"\",\"/\",\"\\\\\",\"x\",\"-\",\"|\",\"+\",\".\"],dflt:\"\",arrayOk:!0,editType:\"style\"},fillmode:{valType:\"enumerated\",values:[\"replace\",\"overlay\"],dflt:\"replace\",editType:\"style\"},bgcolor:{valType:\"color\",arrayOk:!0,editType:\"style\"},fgcolor:{valType:\"color\",arrayOk:!0,editType:\"style\"},fgopacity:{valType:\"number\",editType:\"style\",min:0,max:1},size:{valType:\"number\",min:0,dflt:8,arrayOk:!0,editType:\"style\"},solidity:{valType:\"number\",min:0,max:1,dflt:.3,arrayOk:!0,editType:\"style\"},editType:\"style\"}},{}],388:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.numberFormat,o=t(\"fast-isnumeric\"),s=t(\"tinycolor2\"),l=t(\"../../registry\"),c=t(\"../color\"),u=t(\"../colorscale\"),f=i.strTranslate,h=t(\"../../lib/svg_text_utils\"),p=t(\"../../constants/xmlns_namespaces\"),d=t(\"../../constants/alignment\").LINE_SPACING,g=t(\"../../constants/interactions\").DESELECTDIM,m=t(\"../../traces/scatter/subtypes\"),v=t(\"../../traces/scatter/make_bubble_size_func\"),y=t(\"../../components/fx/helpers\").appendArrayPointValue,x=e.exports={};x.font=function(t,e,r,n){i.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(c.fill,n)},x.setPosition=function(t,e,r){t.attr(\"x\",e).attr(\"y\",r)},x.setSize=function(t,e,r){t.attr(\"width\",e).attr(\"height\",r)},x.setRect=function(t,e,r,n,i){t.call(x.setPosition,e,r).call(x.setSize,n,i)},x.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),a=n.c2p(t.y);return!!(o(i)&&o(a)&&e.node())&&(\"text\"===e.node().nodeName?e.attr(\"x\",i).attr(\"y\",a):e.attr(\"transform\",f(i,a)),!0)},x.translatePoints=function(t,e,r){t.each((function(t){var i=n.select(this);x.translatePoint(t,i,e,r)}))},x.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr(\"display\",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:\"none\")},x.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,c=l.traceIs(a,\"bar-like\")?\".bartext\":\".point,.textpoint\";t.selectAll(c).each((function(t){x.hideOutsideRangePoint(t,n.select(this),r,i,o,s)}))}))}},x.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},x.singleLineStyle=function(t,e,r,n,i){e.style(\"fill\",\"none\");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||\"\";c.stroke(e,n||a.color),x.dashLine(e,s,o)},x.lineGroupStyle=function(t,e,r,i){t.style(\"fill\",\"none\").each((function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,s=i||a.dash||\"\";n.select(this).call(c.stroke,r||a.color).call(x.dashLine,s,o)}))},x.dashLine=function(t,e,r){r=+r||0,e=x.dashStyle(e,r),t.style({\"stroke-dasharray\":e,\"stroke-width\":r+\"px\"})},x.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},x.singleFillStyle=function(t){var e=(((n.select(t.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;e&&t.call(c.fill,e)},x.fillGroupStyle=function(t){t.style(\"stroke-width\",0).each((function(t){var e=n.select(this);t[0].trace&&e.call(c.fill,t[0].trace.fillcolor)}))};var b=t(\"./symbol_defs\");x.symbolNames=[],x.symbolFuncs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(b).forEach((function(t){var e=b[t],r=e.n;x.symbolList.push(r,String(r),t,r+100,String(r+100),t+\"-open\"),x.symbolNames[r]=t,x.symbolFuncs[r]=e.f,e.needLine&&(x.symbolNeedLines[r]=!0),e.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),t+\"-dot\",r+300,String(r+300),t+\"-open-dot\"),e.noFill&&(x.symbolNoFill[r]=!0)}));var _=x.symbolNames.length;function w(t,e){var r=t%100;return x.symbolFuncs[r](e)+(t>=200?\"M0,0.5L0.5,0L0,-0.5L-0.5,0Z\":\"\")}x.symbolNumber=function(t){if(o(t))t=+t;else 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=x.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=_||t>=400?0:Math.floor(Math.max(t,0))};var T={x1:1,x2:0,y1:0,y2:0},k={x1:0,x2:0,y1:1,y2:0},A=a(\"~f\"),M={radial:{node:\"radialGradient\"},radialreversed:{node:\"radialGradient\",reversed:!0},horizontal:{node:\"linearGradient\",attrs:T},horizontalreversed:{node:\"linearGradient\",attrs:T,reversed:!0},vertical:{node:\"linearGradient\",attrs:k},verticalreversed:{node:\"linearGradient\",attrs:k,reversed:!0}};x.gradient=function(t,e,r,a,o,l){for(var u=o.length,f=M[a],h=new Array(u),p=0;p\"+v(t);d._gradientUrlQueryParts[y]=1},x.pattern=function(t,e,r,a,o,s,l,u,f,h,p,d){var g=\"legend\"===e;u&&(\"overlay\"===f?(h=u,p=c.contrast(h)):(h=void 0,p=u));var m,v,y,x,b,_,w,T,k,A,M,S=r._fullLayout,E=\"p\"+S._uid+\"-\"+a,L={};switch(o){case\"/\":m=s*Math.sqrt(2),v=s*Math.sqrt(2),_=\"path\",L={d:y=\"M-\"+m/4+\",\"+v/4+\"l\"+m/2+\",-\"+v/2+\"M0,\"+v+\"L\"+m+\",0M\"+m/4*3+\",\"+v/4*5+\"l\"+m/2+\",-\"+v/2,opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"\\\\\":m=s*Math.sqrt(2),v=s*Math.sqrt(2),_=\"path\",L={d:y=\"M\"+m/4*3+\",-\"+v/4+\"l\"+m/2+\",\"+v/2+\"M0,0L\"+m+\",\"+v+\"M-\"+m/4+\",\"+v/4*3+\"l\"+m/2+\",\"+v/2,opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"x\":m=s*Math.sqrt(2),v=s*Math.sqrt(2),y=\"M-\"+m/4+\",\"+v/4+\"l\"+m/2+\",-\"+v/2+\"M0,\"+v+\"L\"+m+\",0M\"+m/4*3+\",\"+v/4*5+\"l\"+m/2+\",-\"+v/2+\"M\"+m/4*3+\",-\"+v/4+\"l\"+m/2+\",\"+v/2+\"M0,0L\"+m+\",\"+v+\"M-\"+m/4+\",\"+v/4*3+\"l\"+m/2+\",\"+v/2,x=s-s*Math.sqrt(1-l),_=\"path\",L={d:y,opacity:d,stroke:p,\"stroke-width\":x+\"px\"};break;case\"|\":_=\"path\",_=\"path\",L={d:y=\"M\"+(m=s)/2+\",0L\"+m/2+\",\"+(v=s),opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"-\":_=\"path\",_=\"path\",L={d:y=\"M0,\"+(v=s)/2+\"L\"+(m=s)+\",\"+v/2,opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"+\":_=\"path\",y=\"M\"+(m=s)/2+\",0L\"+m/2+\",\"+(v=s)+\"M0,\"+v/2+\"L\"+m+\",\"+v/2,x=s-s*Math.sqrt(1-l),_=\"path\",L={d:y,opacity:d,stroke:p,\"stroke-width\":x+\"px\"};break;case\".\":m=s,v=s,l.pattern_filled\";S._patternUrlQueryParts[I]=1},x.initGradients=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,\"g\",\"gradients\").selectAll(\"linearGradient,radialGradient\").remove(),e._gradientUrlQueryParts={}},x.initPatterns=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,\"g\",\"patterns\").selectAll(\"pattern\").remove(),e._patternUrlQueryParts={}},x.getPatternAttr=function(t,e,r){return t&&i.isArrayOrTypedArray(t)?e=100,e.attr(\"d\",w(u,l))}var f,h,p,d=!1;if(t.so)p=s.outlierwidth,h=s.outliercolor,f=o.outliercolor;else{var g=(s||{}).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):i.isArrayOrTypedArray(s.color)?c.defaultLine:s.color,i.isArrayOrTypedArray(o.color)&&(f=c.defaultLine,d=!0),f=\"mc\"in t?t.mcc=n.markerScale(t.mc):o.color||\"rgba(0,0,0,0)\",n.selectedColorFn&&(f=n.selectedColorFn(t))}if(t.om)e.call(c.stroke,f).style({\"stroke-width\":(p||1)+\"px\",fill:\"none\"});else{e.style(\"stroke-width\",(t.isBlank?0:p)+\"px\");var m=o.gradient,v=t.mgt;v?d=!0:v=m&&m.type,i.isArrayOrTypedArray(v)&&(v=v[0],M[v]||(v=0));var y=o.pattern,b=y&&x.getPatternAttr(y.shape,t.i,\"\");if(v&&\"none\"!==v){var _=t.mgc;_?d=!0:_=m.color;var T=r.uid;d&&(T+=\"-\"+t.i),x.gradient(e,a,T,v,[[0,_],[1,f]],\"fill\")}else if(b){var k=x.getPatternAttr(y.bgcolor,t.i,null),A=x.getPatternAttr(y.fgcolor,t.i,null),S=y.fgopacity,E=x.getPatternAttr(y.size,t.i,8),L=x.getPatternAttr(y.solidity,t.i,.3),C=t.mcc||i.isArrayOrTypedArray(y.shape)||i.isArrayOrTypedArray(y.bgcolor)||i.isArrayOrTypedArray(y.size)||i.isArrayOrTypedArray(y.solidity),P=r.uid;C&&(P+=\"-\"+t.i),x.pattern(e,\"point\",a,P,b,E,L,t.mcc,y.fillmode,k,A,S)}else c.fill(e,f);p&&c.stroke(e,h)}},x.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=x.tryColorscale(r,\"\"),e.lineScale=x.tryColorscale(r,\"line\"),l.traceIs(t,\"symbols\")&&(e.ms2mrc=m.isBubble(t)?v(t):function(){return(r.size||6)/2}),t.selectedpoints&&i.extendFlat(e,x.makeSelectedPointStyleFns(t)),e},x.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.marker||{},o=r.marker||{},s=n.marker||{},c=a.opacity,u=o.opacity,f=s.opacity,h=void 0!==u,p=void 0!==f;(i.isArrayOrTypedArray(c)||h||p)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?a.opacity:t.mo;return t.selected?h?u:e:p?f:g*e});var d=a.color,m=o.color,v=s.color;(m||v)&&(e.selectedColorFn=function(t){var e=t.mcc||d;return t.selected?m||e:v||e});var y=a.size,x=o.size,b=s.size,_=void 0!==x,w=void 0!==b;return l.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},x.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:u||(l?e:c.addOpacity(e,g))},e},x.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.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){c.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\",w(x.symbolNumber(n),a)),e.mrc2=a})),a.length&&t.each((function(t){for(var e=n.select(this),r=0;r0?r:0}x.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var o=x.makeSelectedTextStyleFns(e);a=o.selectedTextColorFn}var s=e.texttemplate,l=r._fullLayout;t.each((function(t){var o=n.select(this),c=s?i.extractOption(t,e,\"txt\",\"texttemplate\"):i.extractOption(t,e,\"tx\",\"text\");if(c||0===c){if(s){var u=e._module.formatLabels,f=u?u(t,e,l):{},p={};y(p,e,t.i);var d=e._meta||{};c=i.texttemplateString(c,f,l._d3locale,p,t,d)}var g=t.tp||e.textposition,m=L(t,e),v=a?a(t):t.tc||e.textfont.color;o.call(x.font,t.tf||e.textfont.family,m,v).text(c).call(h.convertToTspans,r).call(E,g,m,t.mrc)}else o.remove()}))}},x.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.makeSelectedTextStyleFns(e);t.each((function(t){var i=n.select(this),a=r.selectedTextColorFn(t),o=t.tp||e.textposition,s=L(t,e);c.fill(i,a);var u=l.traceIs(e,\"bar-like\");E(i,o,s,t.mrc2||t.mrc,u)}))}};function C(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,.25),u=Math.pow(s*s+l*l,.25),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)]]}x.smoothopen=function(t,e){if(t.length<3)return\"M\"+t.join(\"L\");var r,n=\"M\"+t[0],i=[];for(r=1;r=1e4&&(x.savedBBoxes={},O=0),r&&(x.savedBBoxes[r]=m),O++,i.extendFlat({},m)},x.setClipUrl=function(t,e,r){t.attr(\"clip-path\",D(e,r))},x.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}},x.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+=f(e,r)).trim(),t[i](\"transform\",a),a},x.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}},x.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 R=/\\s*sc.*/;x.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(R,\"\");t=(t+=n).trim(),this.setAttribute(\"transform\",t)}))}};var F=/translate\\([^)]*\\)\\s*$/;x.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(F);t=1===e&&1===r?[]:[f(o,s),\"scale(\"+e+\",\"+r+\")\",f(-o,-s)],l&&t.push(l),i.attr(\"transform\",t.join(\"\"))}}))}},{\"../../components/fx/helpers\":402,\"../../constants/alignment\":471,\"../../constants/interactions\":478,\"../../constants/xmlns_namespaces\":480,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../registry\":638,\"../../traces/scatter/make_bubble_size_func\":943,\"../../traces/scatter/subtypes\":951,\"../color\":366,\"../colorscale\":378,\"./symbol_defs\":389,\"@plotly/d3\":58,\"fast-isnumeric\":190,tinycolor2:312}],389:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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},\"arrow-up\":{n:45,f:function(t){var e=n.round(t,2);return\"M0,0L-\"+e+\",\"+n.round(2*t,2)+\"H\"+e+\"Z\"},noDot:!0},\"arrow-down\":{n:46,f:function(t){var e=n.round(t,2);return\"M0,0L-\"+e+\",-\"+n.round(2*t,2)+\"H\"+e+\"Z\"},noDot:!0},\"arrow-left\":{n:47,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,0L\"+e+\",-\"+r+\"V\"+r+\"Z\"},noDot:!0},\"arrow-right\":{n:48,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,0L-\"+e+\",-\"+r+\"V\"+r+\"Z\"},noDot:!0},\"arrow-bar-up\":{n:49,f:function(t){var e=n.round(t,2);return\"M-\"+e+\",0H\"+e+\"M0,0L-\"+e+\",\"+n.round(2*t,2)+\"H\"+e+\"Z\"},needLine:!0,noDot:!0},\"arrow-bar-down\":{n:50,f:function(t){var e=n.round(t,2);return\"M-\"+e+\",0H\"+e+\"M0,0L-\"+e+\",-\"+n.round(2*t,2)+\"H\"+e+\"Z\"},needLine:!0,noDot:!0},\"arrow-bar-left\":{n:51,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,-\"+r+\"V\"+r+\"M0,0L\"+e+\",-\"+r+\"V\"+r+\"Z\"},needLine:!0,noDot:!0},\"arrow-bar-right\":{n:52,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,-\"+r+\"V\"+r+\"M0,0L-\"+e+\",-\"+r+\"V\"+r+\"Z\"},needLine:!0,noDot:!0}}},{\"@plotly/d3\":58}],390:[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\"}}}},{}],391:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../registry\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../lib\"),s=t(\"./compute_error\");function l(t,e,r,i){var l=e[\"error_\"+i]||{},c=[];if(l.visible&&-1!==[\"linear\",\"log\"].indexOf(r.type)){for(var u=s(l),f=0;f0;e.each((function(e){var f,h=e[0].trace,p=h.error_x||{},d=h.error_y||{};h.ids&&(f=function(t){return t.id});var g=o.hasMarkers(h)&&h.marker.maxdisplayed>0;d.visible||p.visible||(e=[]);var m=n.select(this).selectAll(\"g.errorbar\").data(e,f);if(m.exit().remove(),e.length){p.visible||m.selectAll(\"path.xerror\").remove(),d.visible||m.selectAll(\"path.yerror\").remove(),m.style(\"opacity\",1);var v=m.enter().append(\"g\").classed(\"errorbar\",!0);u&&v.style(\"opacity\",0).transition().duration(s.duration).style(\"opacity\",1),a.setClipUrl(m,r.layerClipId,t),m.each((function(t){var e=n.select(this),r=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,l,c);if(!g||t.vis){var a,o=e.select(\"path.yerror\");if(d.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var f=d.width;a=\"M\"+(r.x-f)+\",\"+r.yh+\"h\"+2*f+\"m-\"+f+\",0V\"+r.ys,r.noYS||(a+=\"m-\"+f+\",0h\"+2*f),!o.size()?o=e.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").classed(\"yerror\",!0):u&&(o=o.transition().duration(s.duration).ease(s.easing)),o.attr(\"d\",a)}else o.remove();var h=e.select(\"path.xerror\");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var m=(p.copy_ystyle?d:p).width;a=\"M\"+r.xh+\",\"+(r.y-m)+\"v\"+2*m+\"m0,-\"+m+\"H\"+r.xs,r.noXS||(a+=\"m0,-\"+m+\"v\"+2*m),!h.size()?h=e.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").classed(\"xerror\",!0):u&&(h=h.transition().duration(s.duration).ease(s.easing)),h.attr(\"d\",a)}else h.remove()}}))}}))}},{\"../../traces/scatter/subtypes\":951,\"../drawing\":388,\"@plotly/d3\":58,\"fast-isnumeric\":190}],396:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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\":366,\"@plotly/d3\":58}],397:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"./layout_attributes\").hoverlabel,a=t(\"../../lib/extend\").extendFlat;e.exports={hoverlabel:{bgcolor:a({},i.bgcolor,{arrayOk:!0}),bordercolor:a({},i.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:\"none\"}),align:a({},i.align,{arrayOk:!0}),namelength:a({},i.namelength,{arrayOk:!0}),editType:\"none\"}}},{\"../../lib/extend\":493,\"../../plots/font_attributes\":585,\"./layout_attributes\":407}],398:[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=0&&r.index_[0]._length||ot<0||ot>w[0]._length)return d.unhoverRaw(t,e)}if(e.pointerX=at+_[0]._offset,e.pointerY=ot+w[0]._offset,V=\"xval\"in e?v.flat(l,e.xval):v.p2c(_,at),H=\"yval\"in e?v.flat(l,e.yval):v.p2c(w,ot),!i(V[0])||!i(H[0]))return o.warn(\"Fx.hover failed\",e,t),d.unhoverRaw(t,e)}var ct=1/0;function ut(t,r){for(G=0;Gtt&&(et.splice(0,tt),ct=et[0].distance),y&&0!==B&&0===et.length){$.distance=B,$.index=!1;var f=W._module.hoverPoints($,K,Q,\"closest\",{hoverLayer:u._hoverlayer});if(f&&(f=f.filter((function(t){return t.spikeDistance<=B}))),f&&f.length){var h,d=f.filter((function(t){return t.xa.showspikes&&\"hovered data\"!==t.xa.spikesnap}));if(d.length){var g=d[0];i(g.x0)&&i(g.y0)&&(h=ht(g),(!nt.vLinePoint||nt.vLinePoint.spikeDistance>h.spikeDistance)&&(nt.vLinePoint=h))}var m=f.filter((function(t){return t.ya.showspikes&&\"hovered data\"!==t.ya.spikesnap}));if(m.length){var x=m[0];i(x.x0)&&i(x.y0)&&(h=ht(x),(!nt.hLinePoint||nt.hLinePoint.spikeDistance>h.spikeDistance)&&(nt.hLinePoint=h))}}}}}function ft(t,e,r){for(var n,i=null,a=1/0,o=0;o0&&Math.abs(t.distance)Tt-1;Mt--)Ct(et[Mt]);et=St,mt()}var Pt=t._hoverdata,It=[],Ot=j(t),zt=U(t);for(q=0;q1||et.length>1)||\"closest\"===P&&it&&et.length>1,Wt=p.combine(u.plot_bgcolor||p.background,u.paper_bgcolor),Xt=I(et,{gd:t,hovermode:P,rotateLabels:Yt,bgColor:Wt,container:u._hoverlayer,outerContainer:u._paper.node(),commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance});v.isUnifiedHover(P)||(!function(t,e,r){var n,i,a,o,s,l,c,u=0,f=1,h=t.size(),p=new Array(h),d=0;function g(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;oe.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=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--)}}}t.each((function(t){var n=t[e],i=\"x\"===n._id.charAt(0),a=n.range;0===d&&a&&a[0]>a[1]!==i&&(f=-1),p[d++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(i?T:1)/2,pmin:0,pmax:i?r.width:r.height}]})),p.sort((function(t,e){return t[0].posref-e[0].posref||f*(e[0].traceIndex-t[0].traceIndex)}));for(;!n&&u<=h;){for(u++,n=!0,o=0;o.01&&y.pmin===x.pmin&&y.pmax===x.pmax){for(s=v.length-1;s>=0;s--)v[s].dp+=i;for(m.push.apply(m,v),p.splice(o+1,1),c=0,s=m.length-1;s>=0;s--)c+=m[s].dp;for(a=c/m.length,s=m.length-1;s>=0;s--)m[s].dp-=a;n=!1}else o++}p.forEach(g)}for(o=p.length-1;o>=0;o--){var b=p[o];for(s=b.length-1;s>=0;s--){var _=b[s],w=_.datum;w.offset=_.dp,w.del=_.del}}}(Xt,Yt?\"xa\":\"ya\",u),z(Xt,Yt,u._invScaleX,u._invScaleY));if(s&&s.tagName){var Zt=m.getComponentMethod(\"annotations\",\"hasClickToShow\")(t,It);f(n.select(s),Zt?\"pointer\":\"\")}if(!s||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)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(t,0,Pt))return;Pt&&t.emit(\"plotly_unhover\",{event:e,points:Pt});t.emit(\"plotly_hover\",{event:e,points:t._hoverdata,xaxes:_,yaxes:w,xvals:V,yvals:H})}(t,e,r,a,s)}))},r.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=e.gd,a=j(i),o=U(i),s=I(t.map((function(t){var r=t._x0||t.x0||t.x||0,n=t._x1||t.x1||t.x||0,s=t._y0||t.y0||t.y||0,l=t._y1||t.y1||t.y||0,c=t.eventData;if(c){var u=Math.min(r,n),f=Math.max(r,n),h=Math.min(s,l),d=Math.max(s,l),g=t.trace;if(m.traceIs(g,\"gl3d\")){var v=i._fullLayout[g.scene]._scene.container,y=v.offsetLeft,x=v.offsetTop;u+=y,f+=y,h+=x,d+=x}c.bbox={x0:u+o,x1:f+o,y0:h+a,y1:d+a},e.inOut_bbox&&e.inOut_bbox.push(c.bbox)}else c=!1;return{color:t.color||p.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,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:\"\"},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData:c}})),{gd:i,hovermode:\"closest\",rotateLabels:!1,bgColor:e.bgColor||p.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}),l=0,c=0;return s.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5([\\s\\S]*)<\\/extra>/;function I(t,e){var r=e.gd,i=r._fullLayout,a=e.hovermode,c=e.rotateLabels,f=e.bgColor,d=e.container,g=e.outerContainer,w=e.commonLabelOpts||{};if(0===t.length)return[[]];var T=e.fontFamily||y.HOVERFONT,k=e.fontSize||y.HOVERFONTSIZE,A=t[0],E=A.xa,L=A.ya,P=a.charAt(0),I=A[P+\"Label\"],z=V(r,g),D=z.top,R=z.width,F=z.height,B=void 0!==I&&A.distance<=e.hoverdistance&&(\"x\"===a||\"y\"===a);if(B){var N,j,U=!0;for(N=0;Ni.width-b?(m=i.width-b,e.attr(\"d\",\"M\"+(b-M)+\",0L\"+b+\",\"+x+M+\"v\"+x+(2*S+y.height)+\"H-\"+b+\"V\"+x+M+\"H\"+(b-2*M)+\"Z\")):e.attr(\"d\",\"M0,0L\"+M+\",\"+x+M+\"H\"+(S+y.width/2)+\"v\"+x+(2*S+y.height)+\"H-\"+(S+y.width/2)+\"V\"+x+M+\"H-\"+M+\"Z\")}else{var _,C,P;\"right\"===L.side?(_=\"start\",C=1,P=\"\",m=E._offset+E._length):(_=\"end\",C=-1,P=\"-\",m=E._offset),v=L._offset+(A.y0+A.y1)/2,l.attr(\"text-anchor\",_),e.attr(\"d\",\"M0,0L\"+P+M+\",\"+M+\"V\"+(S+y.height/2)+\"h\"+P+(2*S+y.width)+\"V-\"+(S+y.height/2)+\"H\"+P+M+\"V-\"+M+\"Z\");var O,z=y.height/2,R=D-y.top-z,F=\"clip\"+i._uid+\"commonlabel\"+L._id;if(m=0?at:ot+ct=0?ot:vt+ct=0?nt:it+ut=0?it:yt+ut=0,\"top\"!==t.idealAlign&&G||!Y?G?(z+=j/2,t.anchor=\"start\"):t.anchor=\"middle\":(z-=j/2,t.anchor=\"end\");else if(t.pos=z,G=P+N/2+W<=R,Y=P-N/2-W>=0,\"left\"!==t.idealAlign&&G||!Y)if(G)P+=N/2,t.anchor=\"start\";else{t.anchor=\"middle\";var X=W/2,Z=P+X-R,J=P-X;Z>0&&(P-=Z),J<0&&(P+=-J)}else P-=N/2,t.anchor=\"end\";w.attr(\"text-anchor\",t.anchor),E&&A.attr(\"text-anchor\",t.anchor),e.attr(\"transform\",s(P,z)+(c?l(_):\"\"))})),xt}function O(t,e,r,n,i,a){var s=\"\",l=\"\";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=o.templateString(t.name,t.trace._meta)),s=B(t.name,t.nameLength));var c=r.charAt(0),u=\"x\"===c?\"y\":\"x\";void 0!==t.zLabel?(void 0!==t.xLabel&&(l+=\"x: \"+t.xLabel+\"
\"),void 0!==t.yLabel&&(l+=\"y: \"+t.yLabel+\"
\"),\"choropleth\"!==t.trace.type&&\"choroplethmapbox\"!==t.trace.type&&(l+=(l?\"z: \":\"\")+t.zLabel)):e&&t[c+\"Label\"]===i?l=t[u+\"Label\"]||\"\":void 0===t.xLabel?void 0!==t.yLabel&&\"scattercarpet\"!==t.trace.type&&(l=t.yLabel):l=void 0===t.yLabel?t.xLabel:\"(\"+t.xLabel+\", \"+t.yLabel+\")\",!t.text&&0!==t.text||Array.isArray(t.text)||(l+=(l?\"
\":\"\")+t.text),void 0!==t.extraText&&(l+=(l?\"
\":\"\")+t.extraText),a&&\"\"===l&&!t.hovertemplate&&(\"\"===s&&a.remove(),l=s);var f=t.hovertemplate||!1;if(f){var h=t.hovertemplateLabels||t;t[c+\"Label\"]!==i&&(h[c+\"other\"]=h[c+\"Val\"],h[c+\"otherLabel\"]=h[c+\"Label\"]),l=(l=o.hovertemplateString(f,h,n._d3locale,t.eventData[0]||{},t.trace._meta)).replace(P,(function(e,r){return s=B(r,t.nameLength),\"\"}))}return[l,s]}function z(t,e,r,i){var a=function(t){return t*r},o=function(t){return t*i};t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var i=r.select(\"text.nums\"),s=t.anchor,l=\"end\"===s?-1:1,c={start:1,end:-1,middle:0}[s],f=c*(M+S),p=f+c*(t.txwidth+S),d=0,g=t.offset,m=\"middle\"===s;m&&(f-=t.tx2width/2,p+=t.txwidth/2+S),e&&(g*=-A,d=t.offset*k),r.select(\"path\").attr(\"d\",m?\"M-\"+a(t.bx/2+t.tx2width/2)+\",\"+o(g-t.by/2)+\"h\"+a(t.bx)+\"v\"+o(t.by)+\"h-\"+a(t.bx)+\"Z\":\"M0,0L\"+a(l*M+d)+\",\"+o(M+g)+\"v\"+o(t.by/2-M)+\"h\"+a(l*t.bx)+\"v-\"+o(t.by)+\"H\"+a(l*M+d)+\"V\"+o(g-M)+\"Z\");var v=d+f,y=g+t.ty0-t.by/2+S,x=t.textAlign||\"auto\";\"auto\"!==x&&(\"left\"===x&&\"start\"!==s?(i.attr(\"text-anchor\",\"start\"),v=m?-t.bx/2-t.tx2width/2+S:-t.bx-S):\"right\"===x&&\"end\"!==s&&(i.attr(\"text-anchor\",\"end\"),v=m?t.bx/2-t.tx2width/2-S:t.bx+S)),i.call(u.positionText,a(v),o(y)),t.tx2width&&(r.select(\"text.name\").call(u.positionText,a(p+c*S+d),o(g+t.ty0-t.by/2+S)),r.select(\"rect\").call(h.setRect,a(p+(c-1)*t.tx2width/2+d),o(g-t.by/2-1),a(t.tx2width),o(t.by+2)))}))}function D(t,e){var r=t.index,n=t.trace||{},a=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var c=Array.isArray(r)?function(t,e){var i=o.castOption(a,r,t);return l(i)?i:o.extractOption({},n,\"\",e)}:function(t,e){return o.extractOption(s,n,t,e)};function u(e,r,n){var i=c(r,n);l(i)&&(t[e]=i)}if(u(\"hoverinfo\",\"hi\",\"hoverinfo\"),u(\"bgcolor\",\"hbg\",\"hoverlabel.bgcolor\"),u(\"borderColor\",\"hbc\",\"hoverlabel.bordercolor\"),u(\"fontFamily\",\"htf\",\"hoverlabel.font.family\"),u(\"fontSize\",\"hts\",\"hoverlabel.font.size\"),u(\"fontColor\",\"htc\",\"hoverlabel.font.color\"),u(\"nameLength\",\"hnl\",\"hoverlabel.namelength\"),u(\"textAlign\",\"hta\",\"hoverlabel.align\"),t.posref=\"y\"===e||\"closest\"===e&&\"h\"===n.orientation?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:g.hoverLabelText(t.xa,t.xLabelVal,n.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel=\"yLabel\"in t?t.yLabel:g.hoverLabelText(t.ya,t.yLabelVal,n.yhoverformat),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 f=g.tickText(t.xa,t.xa.c2l(t.xerr),\"hover\").text;void 0!==t.xerrneg?t.xLabel+=\" +\"+f+\" / -\"+g.tickText(t.xa,t.xa.c2l(t.xerrneg),\"hover\").text:t.xLabel+=\" \\xb1 \"+f,\"x\"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||\"log\"===t.ya.type&&t.yerr<=0)){var h=g.tickText(t.ya,t.ya.c2l(t.yerr),\"hover\").text;void 0!==t.yerrneg?t.yLabel+=\" +\"+h+\" / -\"+g.tickText(t.ya,t.ya.c2l(t.yerrneg),\"hover\").text:t.yLabel+=\" \\xb1 \"+h,\"y\"===e&&(t.distance+=1)}var p=t.hoverinfo||t.trace.hoverinfo;return p&&\"all\"!==p&&(-1===(p=Array.isArray(p)?p:p.split(\"+\")).indexOf(\"x\")&&(t.xLabel=void 0),-1===p.indexOf(\"y\")&&(t.yLabel=void 0),-1===p.indexOf(\"z\")&&(t.zLabel=void 0),-1===p.indexOf(\"text\")&&(t.text=void 0),-1===p.indexOf(\"name\")&&(t.name=void 0)),t}function R(t,e,r){var n,i,o=r.container,s=r.fullLayout,l=s._size,c=r.event,u=!!e.hLinePoint,f=!!e.vLinePoint;if(o.selectAll(\".spikeline\").remove(),f||u){var d=p.combine(s.plot_bgcolor,s.paper_bgcolor);if(u){var m,v,y=e.hLinePoint;n=y&&y.xa,\"cursor\"===(i=y&&y.ya).spikesnap?(m=c.pointerX,v=c.pointerY):(m=n._offset+y.x,v=i._offset+y.y);var x,b,_=a.readability(y.color,d)<1.5?p.contrast(d):y.color,w=i.spikemode,T=i.spikethickness,k=i.spikecolor||_,A=g.getPxPosition(t,i);if(-1!==w.indexOf(\"toaxis\")||-1!==w.indexOf(\"across\")){if(-1!==w.indexOf(\"toaxis\")&&(x=A,b=m),-1!==w.indexOf(\"across\")){var M=i._counterDomainMin,S=i._counterDomainMax;\"free\"===i.anchor&&(M=Math.min(M,i.position),S=Math.max(S,i.position)),x=l.l+M*l.w,b=l.l+S*l.w}o.insert(\"line\",\":first-child\").attr({x1:x,x2:b,y1:v,y2:v,\"stroke-width\":T,stroke:k,\"stroke-dasharray\":h.dashStyle(i.spikedash,T)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),o.insert(\"line\",\":first-child\").attr({x1:x,x2:b,y1:v,y2:v,\"stroke-width\":T+2,stroke:d}).classed(\"spikeline\",!0).classed(\"crisp\",!0)}-1!==w.indexOf(\"marker\")&&o.insert(\"circle\",\":first-child\").attr({cx:A+(\"right\"!==i.side?T:-T),cy:v,r:T,fill:k}).classed(\"spikeline\",!0)}if(f){var E,L,C=e.vLinePoint;n=C&&C.xa,i=C&&C.ya,\"cursor\"===n.spikesnap?(E=c.pointerX,L=c.pointerY):(E=n._offset+C.x,L=i._offset+C.y);var P,I,O=a.readability(C.color,d)<1.5?p.contrast(d):C.color,z=n.spikemode,D=n.spikethickness,R=n.spikecolor||O,F=g.getPxPosition(t,n);if(-1!==z.indexOf(\"toaxis\")||-1!==z.indexOf(\"across\")){if(-1!==z.indexOf(\"toaxis\")&&(P=F,I=L),-1!==z.indexOf(\"across\")){var B=n._counterDomainMin,N=n._counterDomainMax;\"free\"===n.anchor&&(B=Math.min(B,n.position),N=Math.max(N,n.position)),P=l.t+(1-N)*l.h,I=l.t+(1-B)*l.h}o.insert(\"line\",\":first-child\").attr({x1:E,x2:E,y1:P,y2:I,\"stroke-width\":D,stroke:R,\"stroke-dasharray\":h.dashStyle(n.spikedash,D)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),o.insert(\"line\",\":first-child\").attr({x1:E,x2:E,y1:P,y2:I,\"stroke-width\":D+2,stroke:d}).classed(\"spikeline\",!0).classed(\"crisp\",!0)}-1!==z.indexOf(\"marker\")&&o.insert(\"circle\",\":first-child\").attr({cx:E,cy:F-(\"top\"!==n.side?D:-D),r:D,fill:R}).classed(\"spikeline\",!0)}}}function F(t,e){return!e||(e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint)}function B(t,e){return u.plainText(t||\"\",{len:e,allowedTags:[\"br\",\"sub\",\"sup\",\"b\",\"i\",\"em\"]})}function N(t,e,r){var n=e[t+\"a\"],i=e[t+\"Val\"],a=e.cd[0];if(\"category\"===n.type)i=n._categoriesMap[i];else if(\"date\"===n.type){var o=e.trace[t+\"periodalignment\"];if(o){var s=e.cd[e.index],l=s[t+\"Start\"];void 0===l&&(l=s[t]);var c=s[t+\"End\"];void 0===c&&(c=s[t]);var u=c-l;\"end\"===o?i+=u:\"middle\"===o&&(i+=u/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&(\"group\"!==r.boxmode&&\"group\"!==r.violinmode||(i+=a.t.dPos)),i}function j(t){return t.offsetTop+t.clientTop}function U(t){return t.offsetLeft+t.clientLeft}function V(t,e){var r=t._fullLayout,n=e.getBoundingClientRect(),i=n.x,a=n.y,s=i+n.width,l=a+n.height,c=o.apply3DTransform(r._invTransform)(i,a),u=o.apply3DTransform(r._invTransform)(s,l),f=c[0],h=c[1],p=u[0],d=u[1];return{x:f,y:h,width:p-f,height:d-h,top:Math.min(h,d),left:Math.min(f,p),right:Math.max(f,p),bottom:Math.max(h,d)}}},{\"../../lib\":503,\"../../lib/events\":492,\"../../lib/override_cursor\":514,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"../color\":366,\"../dragelement\":385,\"../drawing\":388,\"../legend/defaults\":418,\"../legend/draw\":419,\"./constants\":400,\"./helpers\":402,\"@plotly/d3\":58,\"fast-isnumeric\":190,tinycolor2:312}],404:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../color\"),a=t(\"./helpers\").isUnifiedHover;e.exports=function(t,e,r,o){o=o||{};var s=e.legend;function l(t){o.font[t]||(o.font[t]=s?e.legend.font[t]:e.font[t])}e&&a(e.hovermode)&&(o.font||(o.font={}),l(\"size\"),l(\"family\"),l(\"color\"),s?(o.bgcolor||(o.bgcolor=i.combine(e.legend.bgcolor,e.paper_bgcolor)),o.bordercolor||(o.bordercolor=e.legend.bordercolor)):o.bgcolor||(o.bgcolor=e.paper_bgcolor)),r(\"hoverlabel.bgcolor\",o.bgcolor),r(\"hoverlabel.bordercolor\",o.bordercolor),r(\"hoverlabel.namelength\",o.namelength),n.coerceFont(r,\"hoverlabel.font\",o.font),r(\"hoverlabel.align\",o.align)}},{\"../../lib\":503,\"../color\":366,\"./helpers\":402}],405:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e){function r(r,a){return void 0!==e[r]?e[r]:n.coerce(t,e,i,r,a)}return r(\"clickmode\"),r(\"hovermode\")}},{\"../../lib\":503,\"./layout_attributes\":407}],406:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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,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\":503,\"../dragelement\":385,\"./attributes\":397,\"./calc\":398,\"./click\":399,\"./constants\":400,\"./defaults\":401,\"./helpers\":402,\"./hover\":403,\"./layout_attributes\":407,\"./layout_defaults\":408,\"./layout_global_defaults\":409,\"@plotly/d3\":58}],407:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"../../plots/font_attributes\"),a=i({editType:\"none\"});a.family.dflt=n.HOVERFONT,a.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\",\"drawclosedpath\",\"drawopenpath\",\"drawline\",\"drawrect\",\"drawcircle\",\"orbit\",\"turntable\",!1],dflt:\"zoom\",editType:\"modebar\"},hovermode:{valType:\"enumerated\",values:[\"x\",\"y\",\"closest\",!1,\"x unified\",\"y unified\"],dflt:\"closest\",editType:\"modebar\"},hoverdistance:{valType:\"integer\",min:-1,dflt:20,editType:\"none\"},spikedistance:{valType:\"integer\",min:-1,dflt:-1,editType:\"none\"},hoverlabel:{bgcolor:{valType:\"color\",editType:\"none\"},bordercolor:{valType:\"color\",editType:\"none\"},font:a,grouptitlefont:i({editType:\"none\"}),align:{valType:\"enumerated\",values:[\"left\",\"right\",\"auto\"],dflt:\"auto\",editType:\"none\"},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\":585,\"./constants\":400}],408:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\"),a=t(\"./hovermode_defaults\"),o=t(\"./hoverlabel_defaults\");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}a(t,e)&&(r(\"hoverdistance\"),r(\"spikedistance\")),\"select\"===r(\"dragmode\")&&r(\"selectdirection\");var s=e._has(\"mapbox\"),l=e._has(\"geo\"),c=e._basePlotModules.length;\"zoom\"===e.dragmode&&((s||l)&&1===c||s&&l&&2===c)&&(e.dragmode=\"pan\"),o(t,e,r),n.coerceFont(r,\"hoverlabel.grouptitlefont\",e.hoverlabel.font)}},{\"../../lib\":503,\"./hoverlabel_defaults\":404,\"./hovermode_defaults\":405,\"./layout_attributes\":407}],409:[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\":503,\"./hoverlabel_defaults\":404,\"./layout_attributes\":407}],410:[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;h1){if(!h&&!p&&!d)\"independent\"===k(\"pattern\")&&(h=!0);m._hasSubplotGrid=h;var x,b,_=\"top to bottom\"===k(\"roworder\"),w=h?.2:.1,T=h?.3:.1;g&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),m._domains={x:u(\"x\",k,w,x,y),y:u(\"y\",k,T,b,v,_)}}else delete e.grid}function k(t,e){return n.coerce(r,m,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,m=r.columns,v=\"independent\"===r.pattern,y=r._axisMap={};if(d){var x=h.subplots||[];l=r.subplots=new Array(g);var b=1;for(n=0;n1);if(!1===_&&(e.legend=void 0),(!1!==_||f.uirevision)&&(p(\"uirevision\",e.uirevision),!1!==_)){p(\"bgcolor\",e.paper_bgcolor),p(\"bordercolor\"),p(\"borderwidth\");var w,T,k,A=i.coerceFont(p,\"font\",e.font),M=\"h\"===p(\"orientation\");if(M?(w=0,n.getComponentMethod(\"rangeslider\",\"isVisible\")(t.xaxis)?(T=1.1,k=\"bottom\"):(T=-.1,k=\"top\")):(w=1.02,T=1,k=\"auto\"),p(\"traceorder\",x),c.isGrouped(e.legend)&&p(\"tracegroupgap\"),p(\"itemsizing\"),p(\"itemwidth\"),p(\"itemclick\"),p(\"itemdoubleclick\"),p(\"groupclick\"),p(\"x\",w),p(\"xanchor\"),p(\"y\",T),p(\"yanchor\",k),p(\"valign\"),i.noneOrAll(f,h,[\"x\",\"y\"]),p(\"title.text\")){p(\"title.side\",M?\"left\":\"top\");var S=i.extendFlat({},A,{size:i.bigFont(A.size)});i.coerceFont(p,\"title.font\",S)}}}},{\"../../lib\":503,\"../../plot_api/plot_template\":543,\"../../plots/attributes\":550,\"../../plots/layout_attributes\":610,\"../../registry\":638,\"./attributes\":416,\"./helpers\":422}],419:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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/alignment\"),g=d.LINE_SPACING,m=d.FROM_TL,v=d.FROM_BR,y=t(\"./get_legend_data\"),x=t(\"./style\"),b=t(\"./helpers\");function _(t,e,r,n,i){var a=r.data()[0][0].trace,l={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&&(l.group=a._group),o.traceIs(a,\"pie-like\")&&(l.label=r.datum()[0].label),!1!==s.triggerHandler(t,\"plotly_legendclick\",l))if(1===n)e._clickTimeout=setTimeout((function(){t._fullLayout&&h(r,t,n)}),t._context.doubleClickDelay);else if(2===n){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,\"plotly_legenddoubleclick\",l)&&h(r,t,n)}}function w(t,e,r){var n,a,s=t.data()[0][0],l=s.trace,u=o.traceIs(l,\"pie-like\"),h=!r._inHover&&e._context.edits.legendText&&!u,d=r._maxNameLength;s.groupTitle?(n=s.groupTitle.text,a=s.groupTitle.font):(a=r.font,r.entries?n=s.text:(n=u?s.label:l.name,l._meta&&(n=i.templateString(n,l._meta))));var g=i.ensureSingle(t,\"text\",\"legendtext\");g.attr(\"text-anchor\",\"start\").call(c.font,a).text(h?T(n,d):n);var m=r.itemwidth+2*p.itemGap;f.positionText(g,m,0),h?g.call(f.makeEditable,{gd:e,text:n}).call(A,t,e,r).on(\"edit\",(function(n){this.text(T(n,d)).call(A,t,e,r);var a=s.trace._fullInput||{},c={};if(o.hasTransform(a,\"groupby\")){var u=o.getTransformIndices(a,\"groupby\"),f=u[u.length-1],h=i.keyedContainer(a,\"transforms[\"+f+\"].styles\",\"target\",\"value.name\");h.set(s.trace._group,n),c=h.constructUpdate()}else c.name=n;return o.call(\"_guiRestyle\",e,c,l.index)})):A(g,t,e,r)}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 k(t,e){var r,a=e._context.doubleClickDelay,o=1,s=i.ensureSingle(t,\"rect\",\"legendtoggle\",(function(t){e._context.staticPlot||t.style(\"cursor\",\"pointer\").attr(\"pointer-events\",\"all\"),t.call(u.fill,\"rgba(0,0,0,0)\")}));e._context.staticPlot||(s.on(\"mousedown\",(function(){(r=(new Date).getTime())-e._legendMouseDownTimea&&(o=Math.max(o-1,1)),_(e,r,t,o,n.event)}})))}function A(t,e,r,n,i){n._inHover&&t.attr(\"data-notex\",!0),f.convertToTspans(t,r,(function(){!function(t,e,r,n){var i=t.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend)return void t.remove();var a=t.select(\"g[class*=math-group]\"),o=a.node();r||(r=e._fullLayout.legend);var s,l=r.borderwidth;s=1===n?r.title.font:i.groupTitle?i.groupTitle.font:r.font;var u,h,d=s.size*g;if(o){var m=c.bBox(o);u=m.height,h=m.width,1===n?c.setTranslate(a,l,l+.75*u):c.setTranslate(a,0,.25*u)}else{var v=t.select(1===n?\".legendtitletext\":\".legendtext\"),y=f.lineCount(v),x=v.node();if(u=d*y,h=x?c.bBox(x).width:0,1===n)\"left\"===r.title.side&&(h+=2*p.itemGap),f.positionText(v,l+p.titlePad,l+d);else{var b=2*p.itemGap+r.itemwidth;i.groupTitle&&(b=p.itemGap,h-=r.itemwidth),f.positionText(v,b,-d*((y-1)/2-.3))}}1===n?(r._titleWidth=h,r._titleHeight=u):(i.lineHeight=d,i.height=Math.max(u,16)+3,i.width=h)}(e,r,n,i)}))}function M(t){return i.isRightAnchor(t)?\"right\":i.isCenterAnchor(t)?\"center\":\"left\"}function S(t){return i.isBottomAnchor(t)?\"bottom\":i.isMiddleAnchor(t)?\"middle\":\"top\"}e.exports=function(t,e){return e||(e=t._fullLayout.legend||{}),function(t,e){var r,s,f=t._fullLayout,h=\"legend\"+f._uid,d=e._inHover;d?(r=e.layer,h+=\"-hover\"):r=f._infolayer;if(!r)return;t._legendMouseDownTime||(t._legendMouseDownTime=0);if(d){if(!e.entries)return;s=y(e.entries,e)}else{if(!t.calcdata)return;s=f.showlegend&&y(t.calcdata,e)}var g=f.hiddenlabels||[];if(!(d||f.showlegend&&s.length))return r.selectAll(\".legend\").remove(),f._topdefs.select(\"#\"+h).remove(),a.autoMargin(t,\"legend\");var T=i.ensureSingle(r,\"g\",\"legend\",(function(t){d||t.attr(\"pointer-events\",\"all\")})),E=i.ensureSingleById(f._topdefs,\"clipPath\",h,(function(t){t.append(\"rect\")})),L=i.ensureSingle(T,\"rect\",\"bg\",(function(t){t.attr(\"shape-rendering\",\"crispEdges\")}));L.call(u.stroke,e.bordercolor).call(u.fill,e.bgcolor).style(\"stroke-width\",e.borderwidth+\"px\");var C=i.ensureSingle(T,\"g\",\"scrollbox\"),P=e.title;if(e._titleWidth=0,e._titleHeight=0,P.text){var I=i.ensureSingle(C,\"text\",\"legendtitletext\");I.attr(\"text-anchor\",\"start\").call(c.font,P.font).text(P.text),A(I,C,t,e,1)}else C.selectAll(\".legendtitletext\").remove();var O=i.ensureSingle(T,\"rect\",\"scrollbar\",(function(t){t.attr(p.scrollBarEnterAttrs).call(u.fill,p.scrollBarColor)})),z=C.selectAll(\"g.groups\").data(s);z.enter().append(\"g\").attr(\"class\",\"groups\"),z.exit().remove();var D=z.selectAll(\"g.traces\").data(i.identity);D.enter().append(\"g\").attr(\"class\",\"traces\"),D.exit().remove(),D.style(\"opacity\",(function(t){var e=t[0].trace;return o.traceIs(e,\"pie-like\")?-1!==g.indexOf(t[0].label)?.5:1:\"legendonly\"===e.visible?.5:1})).each((function(){n.select(this).call(w,t,e)})).call(x,t,e).each((function(){d||n.select(this).call(k,t)})),i.syncOrAsync([a.previousPromises,function(){return function(t,e,r,i){var a=t._fullLayout;i||(i=a.legend);var o=a._size,s=b.isVertical(i),l=b.isGrouped(i),u=i.borderwidth,f=2*u,h=p.itemGap,d=i.itemwidth+2*h,g=2*(u+h),m=S(i),v=i.y<0||0===i.y&&\"top\"===m,y=i.y>1||1===i.y&&\"bottom\"===m,x=i.tracegroupgap;i._maxHeight=Math.max(v||y?a.height/2:o.h,30);var _=0;i._width=0,i._height=0;var w=function(t){var e=0,r=0,n=t.title.side;n&&(-1!==n.indexOf(\"left\")&&(e=t._titleWidth),-1!==n.indexOf(\"top\")&&(r=t._titleHeight));return[e,r]}(i);if(s)r.each((function(t){var e=t[0].height;c.setTranslate(this,u+w[0],u+w[1]+i._height+e/2+h),i._height+=e,i._width=Math.max(i._width,t[0].width)})),_=d+i._width,i._width+=h+d+f,i._height+=g,l&&(e.each((function(t,e){c.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var T=M(i),k=i.x<0||0===i.x&&\"right\"===T,A=i.x>1||1===i.x&&\"left\"===T,E=y||v,L=a.width/2;i._maxWidth=Math.max(k?E&&\"left\"===T?o.l+o.w:L:A?E&&\"right\"===T?o.r+o.w:L:o.w,2*d);var C=0,P=0;r.each((function(t){var e=t[0].width+d;C=Math.max(C,e),P+=e})),_=null;var I=0;if(l){var O=0,z=0,D=0;e.each((function(){var t=0,e=0;n.select(this).selectAll(\"g.traces\").each((function(r){var n=r[0].width,i=r[0].height;c.setTranslate(this,w[0],w[1]+u+h+i/2+e),e+=i,t=Math.max(t,d+n)}));var r=t+h;z>0&&r+u+z>i._maxWidth?(I=Math.max(I,z),z=0,D+=O+x,O=e):O=Math.max(O,e),c.setTranslate(this,z,D),z+=r})),i._width=Math.max(I,z)+u,i._height=D+O+g}else{var R=r.size(),F=P+f+(R-1)*h=i._maxWidth&&(I=Math.max(I,U),N=0,j+=B,i._height+=B,B=0),c.setTranslate(this,w[0]+u+N,w[1]+u+j+e/2+h),U=N+r+h,N+=n,B=Math.max(B,e)})),F?(i._width=N+f,i._height=B+g):(i._width=Math.max(I,U)+f,i._height+=B+g)}}i._width=Math.ceil(Math.max(i._width+w[0],i._titleWidth+2*(u+p.titlePad))),i._height=Math.ceil(Math.max(i._height+w[1],i._titleHeight+2*(u+p.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var V=t._context.edits,H=V.legendText||V.legendPosition;r.each((function(t){var e=n.select(this).select(\".legendtoggle\"),r=t[0].height,i=H?d:_||d+t[0].width;s||(i+=h/2),c.setRect(e,0,-r/2,i,r)}))}(t,z,D,e)},function(){var s,u,g,y,x=f._size,b=e.borderwidth;if(!d){if(function(t){var e=t._fullLayout.legend,r=M(e),n=S(e);return a.autoMargin(t,\"legend\",{x:e.x,y:e.y,l:e._width*m[r],r:e._width*v[r],b:e._effHeight*v[n],t:e._effHeight*m[n]})}(t))return;var w=x.l+x.w*e.x-m[M(e)]*e._width,k=x.t+x.h*(1-e.y)-m[S(e)]*e._effHeight;if(f.margin.autoexpand){var A=w,P=k;w=i.constrain(w,0,f.width-e._width),k=i.constrain(k,0,f.height-e._effHeight),w!==A&&i.log(\"Constrain legend.x to make legend fit inside graph\"),k!==P&&i.log(\"Constrain legend.y to make legend fit inside graph\")}c.setTranslate(T,w,k)}if(O.on(\".drag\",null),T.on(\"wheel\",null),d||e._height<=e._maxHeight||t._context.staticPlot){var I=e._effHeight;d&&(I=e._height),L.attr({width:e._width-b,height:I-b,x:b/2,y:b/2}),c.setTranslate(C,0,0),E.select(\"rect\").attr({width:e._width-2*b,height:I-2*b,x:b,y:b}),c.setClipUrl(C,h,t),c.setRect(O,0,0,0,0),delete e._scrollY}else{var z,D,R,F=Math.max(p.scrollBarMinHeight,e._effHeight*e._effHeight/e._height),B=e._effHeight-F-2*p.scrollBarMargin,N=e._height-e._effHeight,j=B/N,U=Math.min(e._scrollY||0,N);L.attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-b,x:b/2,y:b/2}),E.select(\"rect\").attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-2*b,x:b,y:b+U}),c.setClipUrl(C,h,t),q(U,F,j),T.on(\"wheel\",(function(){q(U=i.constrain(e._scrollY+n.event.deltaY/B*N,0,N),F,j),0!==U&&U!==N&&n.event.preventDefault()}));var V=n.behavior.drag().on(\"dragstart\",(function(){var t=n.event.sourceEvent;z=\"touchstart\"===t.type?t.changedTouches[0].clientY:t.clientY,R=U})).on(\"drag\",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(D=\"touchmove\"===t.type?t.changedTouches[0].clientY:t.clientY,q(U=function(t,e,r){var n=(r-e)/j+t;return i.constrain(n,0,N)}(R,z,D),F,j))}));O.call(V);var H=n.behavior.drag().on(\"dragstart\",(function(){var t=n.event.sourceEvent;\"touchstart\"===t.type&&(z=t.changedTouches[0].clientY,R=U)})).on(\"drag\",(function(){var t=n.event.sourceEvent;\"touchmove\"===t.type&&(D=t.changedTouches[0].clientY,q(U=function(t,e,r){var n=(e-r)/j+t;return i.constrain(n,0,N)}(R,z,D),F,j))}));C.call(H)}function q(r,n,i){e._scrollY=t._fullLayout.legend._scrollY=r,c.setTranslate(C,0,-r),c.setRect(O,e._width,p.scrollBarMargin+r*i,p.scrollBarWidth,n),E.select(\"rect\").attr(\"y\",b+r)}t._context.edits.legendPosition&&(T.classed(\"cursor-move\",!0),l.init({element:T.node(),gd:t,prepFn:function(){var t=c.getTranslate(T);g=t.x,y=t.y},moveFn:function(t,r){var n=g+t,i=y+r;c.setTranslate(T,n,i),s=l.align(n,0,x.l,x.l+x.w,e.xanchor),u=l.align(i,0,x.t+x.h,x.t,e.yanchor)},doneFn:function(){void 0!==s&&void 0!==u&&o.call(\"_guiRelayout\",t,{\"legend.x\":s,\"legend.y\":u})},clickFn:function(e,n){var i=r.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&&_(t,T,i,e,n)}}))}],t)}(t,e)}},{\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/events\":492,\"../../lib/svg_text_utils\":529,\"../../plots/plots\":619,\"../../registry\":638,\"../color\":366,\"../dragelement\":385,\"../drawing\":388,\"./constants\":417,\"./get_legend_data\":420,\"./handle_click\":421,\"./helpers\":422,\"./style\":424,\"@plotly/d3\":58}],420:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"./helpers\");e.exports=function(t,e){var r,a,o=e._inHover,s=i.isGrouped(e),l=i.isReversed(e),c={},u=[],f=!1,h={},p=0,d=0;function g(t,r){if(\"\"!==t&&i.isGrouped(e))-1===u.indexOf(t)?(u.push(t),f=!0,c[t]=[r]):c[t].push(r);else{var n=\"~~i\"+p;u.push(n),c[n]=[r],p++}}for(r=0;rA&&(k=A)}w[r][0]._groupMinRank=k,w[r][0]._preGroupSort=r}var M=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(w.forEach((function(t,e){t[0]._preGroupSort=e})),w.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),r=0;rr?r:t}e.exports=function(t,e,r){var v=e._fullLayout;r||(r=v.legend);var y=\"constant\"===r.itemsizing,x=r.itemwidth,b=(x+2*p.itemGap)/2,_=o(b,0),w=function(t,e,r,n){var i;if(t+1)i=t;else{if(!(e&&e.width>0))return 0;i=e.width}return y?n:Math.min(i,r)};function T(t,a,o){var u=t[0].trace,f=u.marker||{},h=f.line||{},p=o?u.visible&&u.type===o:i.traceIs(u,\"bar\"),d=n.select(a).select(\"g.legendpoints\").selectAll(\"path.legend\"+o).data(p?[t]:[]);d.enter().append(\"path\").classed(\"legend\"+o,!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),d.exit().remove(),d.each((function(t){var i=n.select(this),a=t[0],o=w(a.mlw,f.line,5,2);i.style(\"stroke-width\",o+\"px\");var p=a.mcc;if(!r._inHover&&\"mc\"in a){var d=c(f),g=d.mid;void 0===g&&(g=(d.max+d.min)/2),p=s.tryColorscale(f,\"\")(g)}var v=p||a.mc||f.color,y=f.pattern,x=y&&s.getPatternAttr(y.shape,0,\"\");if(x){var b=s.getPatternAttr(y.bgcolor,0,null),_=s.getPatternAttr(y.fgcolor,0,null),T=y.fgopacity,k=m(y.size,8,10),A=m(y.solidity,.5,1),M=\"legend-\"+u.uid;i.call(s.pattern,\"legend\",e,M,x,k,A,p,y.fillmode,b,_,T)}else i.call(l.fill,v);o&&l.stroke(i,a.mlc||h.color)}))}function k(t,e,r){var o=t[0],s=o.trace,l=r?s.visible&&s.type===r:i.traceIs(s,r),c=n.select(e).select(\"g.legendpoints\").selectAll(\"path.legend\"+r).data(l?[t]:[]);if(c.enter().append(\"path\").classed(\"legend\"+r,!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),c.exit().remove(),c.size()){var u=(s.marker||{}).line,p=w(h(u.width,o.pts),u,5,2),d=a.minExtend(s,{marker:{line:{width:p}}});d.marker.line.color=u.color;var g=a.minExtend(o,{trace:d});f(c,g,d)}}t.each((function(t){var e=n.select(this),i=a.ensureSingle(e,\"g\",\"layers\");i.style(\"opacity\",t[0].trace.opacity);var s=r.valign,l=t[0].lineHeight,c=t[0].height;if(\"middle\"!==s&&l&&c){var u={top:1,bottom:-1}[s]*(.5*(l-c+3));i.attr(\"transform\",o(0,u))}else i.attr(\"transform\",null);i.selectAll(\"g.legendfill\").data([t]).enter().append(\"g\").classed(\"legendfill\",!0),i.selectAll(\"g.legendlines\").data([t]).enter().append(\"g\").classed(\"legendlines\",!0);var f=i.selectAll(\"g.legendsymbols\").data([t]);f.enter().append(\"g\").classed(\"legendsymbols\",!0),f.selectAll(\"g.legendpoints\").data([t]).enter().append(\"g\").classed(\"legendpoints\",!0)})).each((function(t){var r,i=t[0].trace,o=[];if(i.visible)switch(i.type){case\"histogram2d\":case\"heatmap\":o=[[\"M-15,-2V4H15V-2Z\"]],r=!0;break;case\"choropleth\":case\"choroplethmapbox\":o=[[\"M-6,-6V6H6V-6Z\"]],r=!0;break;case\"densitymapbox\":o=[[\"M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0\"]],r=\"radial\";break;case\"cone\":o=[[\"M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z\"],[\"M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z\"],[\"M-6,-2 A2,2 0 0,0 -6,2 L6,0Z\"]],r=!1;break;case\"streamtube\":o=[[\"M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z\"],[\"M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z\"],[\"M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z\"]],r=!1;break;case\"surface\":o=[[\"M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z\"],[\"M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z\"]],r=!0;break;case\"mesh3d\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6H6L0,6Z\"]],r=!1;break;case\"volume\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6H6L0,6Z\"]],r=!0;break;case\"isosurface\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6 A12,24 0 0,0 6,-6 L0,6Z\"]],r=!1}var u=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legend3dandfriends\").data(o);u.enter().append(\"path\").classed(\"legend3dandfriends\",!0).attr(\"transform\",_).style(\"stroke-miterlimit\",1),u.exit().remove(),u.each((function(t,o){var u,f=n.select(this),h=c(i),p=h.colorscale,g=h.reversescale;if(p){if(!r){var m=p.length;u=0===o?p[g?m-1:0][1]:1===o?p[g?0:m-1][1]:p[Math.floor((m-1)/2)][1]}}else{var v=i.vertexcolor||i.facecolor||i.color;u=a.isArrayOrTypedArray(v)?v[o]||v[0]:v}f.attr(\"d\",t[0]),u?f.call(l.fill,u):f.call((function(t){if(t.size()){var n=\"legendfill-\"+i.uid;s.gradient(t,e,n,d(g,\"radial\"===r),p,\"fill\")}}))}))})).each((function(t){var e=t[0].trace,r=\"waterfall\"===e.type;if(t[0]._distinct&&r){var i=t[0].trace[t[0].dir].marker;return t[0].mc=i.color,t[0].mlw=i.line.width,t[0].mlc=i.line.color,T(t,this,\"waterfall\")}var a=[];e.visible&&r&&(a=t[0].hasTotals?[[\"increasing\",\"M-6,-6V6H0Z\"],[\"totals\",\"M6,6H0L-6,-6H-0Z\"],[\"decreasing\",\"M6,6V-6H0Z\"]]:[[\"increasing\",\"M-6,-6V6H6Z\"],[\"decreasing\",\"M6,6V-6H-6Z\"]]);var o=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendwaterfall\").data(a);o.enter().append(\"path\").classed(\"legendwaterfall\",!0).attr(\"transform\",_).style(\"stroke-miterlimit\",1),o.exit().remove(),o.each((function(t){var r=n.select(this),i=e[t[0]].marker,a=w(void 0,i.line,5,2);r.attr(\"d\",t[1]).style(\"stroke-width\",a+\"px\").call(l.fill,i.color),a&&r.call(l.stroke,i.line.color)}))})).each((function(t){T(t,this,\"funnel\")})).each((function(t){T(t,this)})).each((function(t){var r=t[0].trace,o=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendbox\").data(r.visible&&i.traceIs(r,\"box-violin\")?[t]:[]);o.enter().append(\"path\").classed(\"legendbox\",!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),o.exit().remove(),o.each((function(){var t=n.select(this);if(\"all\"!==r.boxpoints&&\"all\"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=w(void 0,r.line,5,2);t.style(\"stroke-width\",i+\"px\").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var c=a.minExtend(r,{marker:{size:y?12:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:\"diameter\"}});o.call(s.pointStyle,c,e)}}))})).each((function(t){k(t,this,\"funnelarea\")})).each((function(t){k(t,this,\"pie\")})).each((function(t){var r,i,o=g(t),l=o.showFill,f=o.showLine,h=o.showGradientLine,p=o.showGradientFill,m=o.anyFill,v=o.anyLine,y=t[0],b=y.trace,_=c(b),T=_.colorscale,k=_.reversescale,A=u.hasMarkers(b)||!m?\"M5,0\":v?\"M5,-2\":\"M5,-3\",M=n.select(this),S=M.select(\".legendfill\").selectAll(\"path\").data(l||p?[t]:[]);if(S.enter().append(\"path\").classed(\"js-fill\",!0),S.exit().remove(),S.attr(\"d\",A+\"h\"+x+\"v6h-\"+x+\"z\").call(l?s.fillGroupStyle:function(t){if(t.size()){var r=\"legendfill-\"+b.uid;s.gradient(t,e,r,d(k),T,\"fill\")}}),f||h){var E=w(void 0,b.line,10,5);i=a.minExtend(b,{line:{width:E}}),r=[a.minExtend(y,{trace:i})]}var L=M.select(\".legendlines\").selectAll(\"path\").data(f||h?[r]:[]);L.enter().append(\"path\").classed(\"js-line\",!0),L.exit().remove(),L.attr(\"d\",A+(h?\"l\"+x+\",0.0001\":\"h\"+x)).call(f?s.lineGroupStyle:function(t){if(t.size()){var r=\"legendline-\"+b.uid;s.lineGroupStyle(t),s.gradient(t,e,r,d(k),T,\"stroke\")}})})).each((function(t){var r,i,o=g(t),l=o.anyFill,c=o.anyLine,f=o.showLine,h=o.showMarker,p=t[0],d=p.trace,m=!h&&!c&&!l&&u.hasText(d);function v(t,e,r,n){var i=a.nestedProperty(d,t).get(),o=a.isArrayOrTypedArray(i)&&e?e(i):i;if(y&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function x(t){return p._distinct&&p.index&&t[p.index]?t[p.index]:t[0]}if(h||m||f){var b={},w={};if(h){b.mc=v(\"marker.color\",x),b.mx=v(\"marker.symbol\",x),b.mo=v(\"marker.opacity\",a.mean,[.2,1]),b.mlc=v(\"marker.line.color\",x),b.mlw=v(\"marker.line.width\",a.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:\"diameter\"};var T=v(\"marker.size\",a.mean,[2,16],12);b.ms=T,w.marker.size=T}f&&(w.line={width:v(\"line.width\",x,[0,10],5)}),m&&(b.tx=\"Aa\",b.tp=v(\"textposition\",x),b.ts=10,b.tc=v(\"textfont.color\",x),b.tf=v(\"textfont.family\",x)),r=[a.minExtend(p,b)],(i=a.minExtend(d,w)).selectedpoints=null,i.texttemplate=null}var k=n.select(this).select(\"g.legendpoints\"),A=k.selectAll(\"path.scatterpts\").data(h?r:[]);A.enter().insert(\"path\",\":first-child\").classed(\"scatterpts\",!0).attr(\"transform\",_),A.exit().remove(),A.call(s.pointStyle,i,e),h&&(r[0].mrc=3);var M=k.selectAll(\"g.pointtext\").data(m?r:[]);M.enter().append(\"g\").classed(\"pointtext\",!0).append(\"text\").attr(\"transform\",_),M.exit().remove(),M.selectAll(\"text\").call(s.textPointStyle,i,e)})).each((function(t){var e=t[0].trace,r=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendcandle\").data(e.visible&&\"candlestick\"===e.type?[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\",_).style(\"stroke-miterlimit\",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?\"increasing\":\"decreasing\"],o=w(void 0,a.line,5,2);i.style(\"stroke-width\",o+\"px\").call(l.fill,a.fillcolor),o&&l.stroke(i,a.line.color)}))})).each((function(t){var e=t[0].trace,r=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendohlc\").data(e.visible&&\"ohlc\"===e.type?[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\",_).style(\"stroke-miterlimit\",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?\"increasing\":\"decreasing\"],o=w(void 0,a.line,5,2);i.style(\"fill\",\"none\").call(s.dashLine,a.line.dash,o),o&&l.stroke(i,a.line.color)}))}))}},{\"../../lib\":503,\"../../registry\":638,\"../../traces/pie/helpers\":905,\"../../traces/pie/style_one\":911,\"../../traces/scatter/subtypes\":951,\"../color\":366,\"../colorscale/helpers\":377,\"../drawing\":388,\"./constants\":417,\"@plotly/d3\":58}],425:[function(t,e,r){\"use strict\";t(\"./constants\");e.exports={editType:\"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\"},uirevision:{valType:\"any\",editType:\"none\"},add:{valType:\"string\",arrayOk:!0,dflt:\"\",editType:\"modebar\"},remove:{valType:\"string\",arrayOk:!0,dflt:\"\",editType:\"modebar\"}}},{\"./constants\":427}],426:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../plots/plots\"),a=t(\"../../plots/cartesian/axis_ids\"),o=t(\"../../fonts/ploticon\"),s=t(\"../shapes/draw\").eraseActiveShape,l=t(\"../../lib\"),c=l._,u=e.exports={};function f(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=c._cartesianSpikesEnabled;if(\"zoom\"===s){var p,d=\"in\"===l?.5:2,g=(1+d)/2,m=(1-d)/2;for(i=0;i1?(I=[\"toggleHover\"],O=[\"resetViews\"]):v?(P=[\"zoomInGeo\",\"zoomOutGeo\"],I=[\"hoverClosestGeo\"],O=[\"resetGeo\"]):m?(I=[\"hoverClosest3d\"],O=[\"resetCameraDefault3d\",\"resetCameraLastSave3d\"]):w?(P=[\"zoomInMapbox\",\"zoomOutMapbox\"],I=[\"toggleHover\"],O=[\"resetViewMapbox\"]):b?I=[\"hoverClosestGl2d\"]:y?I=[\"hoverClosestPie\"]:A?(I=[\"hoverClosestCartesian\",\"hoverCompareCartesian\"],O=[\"resetViewSankey\"]):I=[\"toggleHover\"];g&&(I=[\"toggleSpikelines\",\"hoverClosestCartesian\",\"hoverCompareCartesian\"]);(function(t){for(var e=0;e0)){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.max)e=F[r+1];else if(t=n.pmax)e=F[r+1];else if(t0?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||\"multicategory\"===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;lp&&(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;oy?(k=f,E=\"y0\",A=y,L=\"y1\"):(k=y,E=\"y1\",A=f,L=\"y0\");Z(n),Q(s,r),function(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),s=a.getFromId(r,i),l=\"\";\"paper\"===n||o.autorange||(l+=n);\"paper\"===i||s.autorange||(l+=i);u.setClipUrl(t,l?\"clip\"+r._fullLayout._uid+l:null,r)}(e,r,t),X.moveFn=\"move\"===O?J:K,X.altKey=n.altKey},doneFn:function(){if(v(t))return;p(e),$(s),b(e,t,r),n.call(\"_guiRelayout\",t,l.getUpdateObj())},clickFn:function(){if(v(t))return;$(s)}};function Z(r){if(v(t))O=null;else if(R)O=\"path\"===r.target.tagName?\"move\":\"start-point\"===r.target.attributes[\"data-line-point\"].value?\"resize-over-start-point\":\"resize-over-end-point\";else{var n=X.element.getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top,o=r.clientX-n.left,s=r.clientY-n.top,l=!F&&i>10&&a>10&&!r.shiftKey?h.getCursor(o/i,1-s/a):\"move\";p(e,l),O=l.split(\"-\")[0]}}function J(n,i){if(\"path\"===r.type){var a=function(t){return t},o=a,l=a;z?B(\"xanchor\",r.xanchor=G(x+n)):(o=function(t){return G(H(t)+n)},N&&\"date\"===N.type&&(o=g.encodeDate(o))),D?B(\"yanchor\",r.yanchor=Y(T+i)):(l=function(t){return Y(q(t)+i)},U&&\"date\"===U.type&&(l=g.encodeDate(l))),B(\"path\",r.path=w(I,o,l))}else z?B(\"xanchor\",r.xanchor=G(x+n)):(B(\"x0\",r.x0=G(c+n)),B(\"x1\",r.x1=G(m+n))),D?B(\"yanchor\",r.yanchor=Y(T+i)):(B(\"y0\",r.y0=Y(f+i)),B(\"y1\",r.y1=Y(y+i)));e.attr(\"d\",_(t,r)),Q(s,r)}function K(n,i){if(F){var a=function(t){return t},o=a,l=a;z?B(\"xanchor\",r.xanchor=G(x+n)):(o=function(t){return G(H(t)+n)},N&&\"date\"===N.type&&(o=g.encodeDate(o))),D?B(\"yanchor\",r.yanchor=Y(T+i)):(l=function(t){return Y(q(t)+i)},U&&\"date\"===U.type&&(l=g.encodeDate(l))),B(\"path\",r.path=w(I,o,l))}else if(R){if(\"resize-over-start-point\"===O){var u=c+n,h=D?f-i:f+i;B(\"x0\",r.x0=z?u:G(u)),B(\"y0\",r.y0=D?h:Y(h))}else if(\"resize-over-end-point\"===O){var p=m+n,d=D?y-i:y+i;B(\"x1\",r.x1=z?p:G(p)),B(\"y1\",r.y1=D?d:Y(d))}}else{var v=function(t){return-1!==O.indexOf(t)},b=v(\"n\"),j=v(\"s\"),V=v(\"w\"),W=v(\"e\"),X=b?k+i:k,Z=j?A+i:A,J=V?M+n:M,K=W?S+n:S;D&&(b&&(X=k-i),j&&(Z=A-i)),(!D&&Z-X>10||D&&X-Z>10)&&(B(E,r[E]=D?X:Y(X)),B(L,r[L]=D?Z:Y(Z))),K-J>10&&(B(C,r[C]=z?J:G(J)),B(P,r[P]=z?K:G(K)))}e.attr(\"d\",_(t,r)),Q(s,r)}function Q(t,e){(z||D)&&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=H(z?e.xanchor:i.midRange(r?[e.x0,e.x1]:g.extractPathCoords(e.path,d.paramIsX))),o=q(D?e.yanchor:i.midRange(r?[e.y0,e.y1]:g.extractPathCoords(e.path,d.paramIsY)));if(a=g.roundPositionForSharpStrokeRendering(a,1),o=g.roundPositionForSharpStrokeRendering(o,1),z&&D){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(z){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 $(t){t.selectAll(\".visual-cue\").remove()}h.init(X),W.node().onmousemove=Z}(t,z,l,e,r,O):!0===l.editable&&z.style(\"pointer-events\",P||c.opacity(S)*M<=.5?\"stroke\":\"all\");z.node().addEventListener(\"click\",(function(){return function(t,e){if(!y(t))return;var r=+e.node().getAttribute(\"data-index\");if(r>=0){if(r===t._fullLayout._activeShapeIndex)return void T(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=T,m(t)}}(t,z)}))}}function b(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,\"\").replace(/[xyz][1-9]* *domain/g,\"\");u.setClipUrl(t,n?\"clip\"+e._fullLayout._uid+n:null,e)}function _(t,e){var r,n,o,s,l,c,u,f,h=e.type,p=a.getRefType(e.xref),m=a.getRefType(e.yref),v=a.getFromId(t,e.xref),y=a.getFromId(t,e.yref),x=t._fullLayout._size;if(v?\"domain\"===p?n=function(t){return v._offset+v._length*t}:(r=g.shapePositionToRange(v),n=function(t){return v._offset+v.r2p(r(t,!0))}):n=function(t){return x.l+x.w*t},y?\"domain\"===m?s=function(t){return y._offset+y._length*(1-t)}:(o=g.shapePositionToRange(y),s=function(t){return y._offset+y.r2p(o(t,!0))}):s=function(t){return x.t+x.h*(1-t)},\"path\"===h)return v&&\"date\"===v.type&&(n=g.decodeDate(n)),y&&\"date\"===y.type&&(s=g.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(d.segmentRE,(function(t){var n=0,c=t.charAt(0),u=d.paramIsX[c],f=d.paramIsY[c],h=d.numParams[c],p=t.substr(1).replace(d.paramRE,(function(t){return u[n]?t=\"pixel\"===a?e(s)+Number(t):e(t):f[n]&&(t=\"pixel\"===o?r(l)-Number(t):r(t)),++n>h&&(t=\"X\"),t}));return n>h&&(p=p.replace(/[\\s,]*X.*/,\"\"),i.log(\"Ignoring extra params in segment \"+t)),c+p}))}(e,n,s);if(\"pixel\"===e.xsizemode){var b=n(e.xanchor);l=b+e.x0,c=b+e.x1}else l=n(e.x0),c=n(e.x1);if(\"pixel\"===e.ysizemode){var _=s(e.yanchor);u=_-e.y0,f=_-e.y1}else u=s(e.y0),f=s(e.y1);if(\"line\"===h)return\"M\"+l+\",\"+u+\"L\"+c+\",\"+f;if(\"rect\"===h)return\"M\"+l+\",\"+u+\"H\"+c+\"V\"+f+\"H\"+l+\"Z\";var w=(l+c)/2,T=(u+f)/2,k=Math.abs(w-l),A=Math.abs(T-u),M=\"A\"+k+\",\"+A,S=w+k+\",\"+T;return\"M\"+S+M+\" 0 1,1 \"+(w+\",\"+(T-A))+M+\" 0 0,1 \"+S+\"Z\"}function w(t,e,r){return t.replace(d.segmentRE,(function(t){var n=0,i=t.charAt(0),a=d.paramIsX[i],o=d.paramIsY[i],s=d.numParams[i];return i+t.substr(1).replace(d.paramRE,(function(t){return n>=s||(a[n]?t=e(t):o[n]&&(t=r(t)),n++),t}))}))}function T(t){y(t)&&(t._fullLayout._activeShapeIndex>=0&&(l(t),delete t._fullLayout._activeShapeIndex,m(t)))}e.exports={draw:m,drawOne:x,eraseActiveShape:function(t){if(!y(t))return;l(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e=0&&f(v),r.attr(\"d\",g(e)),A&&!h)&&(k=function(t,e){for(var r=0;r1&&(2!==t.length||\"Z\"!==t[1][0])&&(0===T&&(t[0][0]=\"M\"),e[w]=t,y(),x())}}()}}function I(t,r){!function(t,r){if(e.length)for(var n=0;n0&&l0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr(\"transform\",l(o-.5*f.gripWidth,e._dims.currentValueTotalHeight))}}function E(t,e){var r=t._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,e))}function L(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 C(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 P(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;i0?[0]:[]);function s(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,m(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,v);l.enter().append(\"g\").classed(f.groupClassName,!0),l.exit().each(s).remove();for(var c=0;c0||h<0){var v={left:[-d,0],right:[d,0],top:[0,-d],bottom:[0,d]}[b.side];e.attr(\"transform\",l(v[0],v[1]))}}}return R.call(F),O&&(E?R.on(\".opacity\",null):(A=0,M=!0,R.text(y).on(\"mouseover.opacity\",(function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style(\"opacity\",1)})).on(\"mouseout.opacity\",(function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style(\"opacity\",0)}))),R.call(f.makeEditable,{gd:t}).on(\"edit\",(function(e){void 0!==x?o.call(\"_guiRestyle\",t,v,e,x):o.call(\"_guiRelayout\",t,v,e)})).on(\"cancel\",(function(){this.text(this.attr(\"data-unformatted\")).call(F)})).on(\"input\",(function(t){this.text(t||\" \").call(f.positionText,_.x,_.y)}))),R.classed(\"js-placeholder\",M),T}}},{\"../../constants/alignment\":471,\"../../constants/interactions\":478,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/plots\":619,\"../../registry\":638,\"../color\":366,\"../drawing\":388,\"@plotly/d3\":58,\"fast-isnumeric\":190}],465:[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\"}]},args2:{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({editType:\"arraydraw\"}),{}),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\":493,\"../../plot_api/edit_types\":536,\"../../plot_api/plot_template\":543,\"../../plots/font_attributes\":585,\"../../plots/pad_attributes\":618,\"../color/attributes\":365}],466:[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\"}}},{}],467:[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(\"args2\"),r(\"label\"),r(\"execute\"))}e.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},{\"../../lib\":503,\"../../plots/array_container_defaults\":549,\"./attributes\":465,\"./constants\":466}],468:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../plots/plots\"),a=t(\"../color\"),o=t(\"../drawing\"),s=t(\"../../lib\"),l=t(\"../../lib/svg_text_utils\"),c=t(\"../../plot_api/plot_template\").arrayEditor,u=t(\"../../constants/alignment\").LINE_SPACING,f=t(\"./constants\"),h=t(\"./scrollbox\");function p(t){return t._index}function d(t,e){return+t.attr(f.menuIndexAttrName)===e._index}function g(t,e,r,n,i,a,o,s){e.active=o,c(t.layout,f.name,e).applyUpdate(\"active\",o),\"buttons\"===e.type?v(t,n,null,null,e):\"dropdown\"===e.type&&(i.attr(f.menuIndexAttrName,\"-1\"),m(t,n,i,a,e),s||v(t,n,i,a,e))}function m(t,e,r,n,i){var a=s.ensureSingle(e,\"g\",f.headerClassName,(function(t){t.style(\"pointer-events\",\"all\")})),l=i._dims,c=i.active,u=i.buttons[c]||f.blankHeaderOpts,h={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};a.call(y,i,u,t).call(M,i,h,p),s.ensureSingle(e,\"text\",f.headerArrowClassName,(function(t){t.attr(\"text-anchor\",\"end\").call(o.font,i.font).text(f.arrowSymbol[i.direction])})).attr({x:l.headerWidth-f.arrowOffsetX+i.pad.l,y:l.headerHeight/2+f.textOffsetY+i.pad.t}),a.on(\"click\",(function(){r.call(S,String(d(r,i)?-1:i._index)),v(t,e,r,n,i)})),a.on(\"mouseover\",(function(){a.call(w)})),a.on(\"mouseout\",(function(){a.call(T,i)})),o.setTranslate(e,l.lx,l.ly)}function v(t,e,r,a,o){r||(r=e).attr(\"pointer-events\",\"all\");var l=function(t){return-1==+t.attr(f.menuIndexAttrName)}(r)&&\"buttons\"!==o.type?[]:o.buttons,c=\"dropdown\"===o.type?f.dropdownButtonClassName:f.buttonClassName,u=r.selectAll(\"g.\"+c).data(s.filterVisible(l)),h=u.enter().append(\"g\").classed(c,!0),p=u.exit();\"dropdown\"===o.type?(h.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\"),p.transition().attr(\"opacity\",\"0\").remove()):p.remove();var d=0,m=0,v=o._dims,x=-1!==[\"up\",\"down\"].indexOf(o.direction);\"dropdown\"===o.type&&(x?m=v.headerHeight+f.gapButtonHeader:d=v.headerWidth+f.gapButtonHeader),\"dropdown\"===o.type&&\"up\"===o.direction&&(m=-f.gapButtonHeader+f.gapButton-v.openHeight),\"dropdown\"===o.type&&\"left\"===o.direction&&(d=-f.gapButtonHeader+f.gapButton-v.openWidth);var b={x:v.lx+d+o.pad.l,y:v.ly+m+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},k={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each((function(s,l){var c=n.select(this);c.call(y,o,s,t).call(M,o,b),c.on(\"click\",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(g(t,o,0,e,r,a,-1),i.executeAPICommand(t,s.method,s.args2)):(g(t,o,0,e,r,a,l),i.executeAPICommand(t,s.method,s.args))),t.emit(\"plotly_buttonclicked\",{menu:o,button:s,active:o.active}))})),c.on(\"mouseover\",(function(){c.call(w)})),c.on(\"mouseout\",(function(){c.call(T,o),u.call(_,o)}))})),u.call(_,o),x?(k.w=Math.max(v.openWidth,v.headerWidth),k.h=b.y-k.t):(k.w=b.x-k.l,k.h=Math.max(v.openHeight,v.headerHeight)),k.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,h=i._dims,p=i.active;if(u)for(s=0,l=0;l0?[0]:[]);if(o.enter().append(\"g\").classed(f.containerClassName,!0).style(\"cursor\",\"pointer\"),o.exit().each((function(){n.select(this).selectAll(\"g.\"+f.headerGroupClassName).each(a)})).remove(),0!==r.length){var l=o.selectAll(\"g.\"+f.headerGroupClassName).data(r,p);l.enter().append(\"g\").classed(f.headerGroupClassName,!0);for(var c=s.ensureSingle(o,\"g\",f.dropdownButtonGroupClassName,(function(t){t.style(\"pointer-events\",\"all\")})),u=0;uw,A=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,S=d,E=m+v;E+M>c&&(E=c-M);var L=this.container.selectAll(\"rect.scrollbar-horizontal\").data(k?[0]:[]);L.exit().on(\".drag\",null).remove(),L.enter().append(\"rect\").classed(\"scrollbar-horizontal\",!0).call(i.fill,s.barColor),k?(this.hbar=L.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:E,width:A,height:M}),this._hbarXMin=S+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=v>T,P=s.barWidth+2*s.barPad,I=s.barLength+2*s.barPad,O=d+g,z=m;O+P>l&&(O=l-P);var D=this.container.selectAll(\"rect.scrollbar-vertical\").data(C?[0]:[]);D.exit().on(\".drag\",null).remove(),D.enter().append(\"rect\").classed(\"scrollbar-vertical\",!0).call(i.fill,s.barColor),C?(this.vbar=D.attr({rx:s.barRadius,ry:s.barRadius,x:O,y:z,width:P,height:I}),this._vbarYMin=z+I/2,this._vbarTranslateMax=T-I):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,B=C?f+P+.5:f+.5,N=h-.5,j=k?p+M+.5:p+.5,U=o._topdefs.selectAll(\"#\"+R).data(k||C?[0]:[]);if(U.exit().remove(),U.enter().append(\"clipPath\").attr(\"id\",R).append(\"rect\"),k||C?(this._clipRect=U.select(\"rect\").attr({x:Math.floor(F),y:Math.floor(N),width:Math.ceil(B)-Math.floor(F),height:Math.ceil(j)-Math.floor(N)}),this.container.call(a.setClipUrl,R,this.gd),this.bg.attr({x:d,y:m,width:g,height:v})):(this.bg.attr({width:0,height:0}),this.container.on(\"wheel\",null).on(\".drag\",null).call(a.setClipUrl,null),delete this._clipRect),k||C){var V=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(V);var H=n.behavior.drag().on(\"dragstart\",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on(\"drag\",this._onBarDrag.bind(this));k&&this.hbar.on(\".drag\",null).call(H),C&&this.vbar.on(\".drag\",null).call(H)}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\":503,\"../color\":366,\"../drawing\":388,\"@plotly/d3\":58}],471:[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,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:\"right\",right:\"left\",top:\"bottom\",bottom:\"top\"}}},{}],472:[function(t,e,r){\"use strict\";e.exports={axisRefDescription:function(t,e,r){return[\"If set to a\",t,\"axis id (e.g. *\"+t+\"* or\",\"*\"+t+\"2*), the `\"+t+\"` position refers to a\",t,\"coordinate. If set to *paper*, the `\"+t+\"`\",\"position refers to the distance from the\",e,\"of the plotting\",\"area in normalized coordinates where *0* (*1*) corresponds to the\",e,\"(\"+r+\"). If set to a\",t,\"axis ID followed by\",\"*domain* (separated by a space), the position behaves like for\",\"*paper*, but refers to the distance in fractions of the domain\",\"length from the\",e,\"of the domain of that axis: e.g.,\",\"*\"+t+\"2 domain* refers to the domain of the second\",t,\" axis and a\",t,\"position of 0.5 refers to the\",\"point between the\",e,\"and the\",r,\"of the domain of the\",\"second\",t,\"axis.\"].join(\" \")}}},{}],473:[function(t,e,r){\"use strict\";e.exports={INCREASING:{COLOR:\"#3D9970\",SYMBOL:\"\\u25b2\"},DECREASING:{COLOR:\"#FF4136\",SYMBOL:\"\\u25bc\"}}},{}],474:[function(t,e,r){\"use strict\";e.exports={FORMAT_LINK:\"https://github.com/d3/d3-format/tree/v1.4.5#d3-format\",DATE_FORMAT_LINK:\"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format\"}},{}],475:[function(t,e,r){\"use strict\";e.exports={COMPARISON_OPS:[\"=\",\"!=\",\"<\",\">=\",\">\",\"<=\"],COMPARISON_OPS2:[\"=\",\"<\",\">=\",\">\",\"<=\"],INTERVAL_OPS:[\"[]\",\"()\",\"[)\",\"(]\",\"][\",\")(\",\"](\",\")[\"],SET_OPS:[\"{}\",\"}{\"],CONSTRAINT_REDUCTION:{\"=\":\"=\",\"<\":\"<\",\"<=\":\"<\",\">\":\">\",\">=\":\">\",\"[]\":\"[]\",\"()\":\"[]\",\"[)\":\"[]\",\"(]\":\"[]\",\"][\":\"][\",\")(\":\"][\",\"](\":\"][\",\")[\":\"][\"}}},{}],476:[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]}},{}],477:[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\"}},{}],478:[function(t,e,r){\"use strict\";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],479:[function(t,e,r){\"use strict\";e.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:\"\\u2212\"}},{}],480:[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}},{}],481:[function(t,e,r){\"use strict\";r.version=t(\"./version\").version,t(\"native-promise-only\"),t(\"../build/plotcss\");for(var n=t(\"./registry\"),i=r.register=n.register,a=t(\"./plot_api\"),o=Object.keys(a),s=0;splotly-logomark\"}}},{}],483:[function(t,e,r){\"use strict\";r.isLeftAnchor=function(t){return\"left\"===t.xanchor||\"auto\"===t.xanchor&&t.x<=1/3},r.isCenterAnchor=function(t){return\"center\"===t.xanchor||\"auto\"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isRightAnchor=function(t){return\"right\"===t.xanchor||\"auto\"===t.xanchor&&t.x>=2/3},r.isTopAnchor=function(t){return\"top\"===t.yanchor||\"auto\"===t.yanchor&&t.y>=2/3},r.isMiddleAnchor=function(t){return\"middle\"===t.yanchor||\"auto\"===t.yanchor&&t.y>1/3&&t.y<2/3},r.isBottomAnchor=function(t){return\"bottom\"===t.yanchor||\"auto\"===t.yanchor&&t.y<=1/3}},{}],484:[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-14}function c(t,e){return a(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0](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 m(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}g?(u=0,f=o,h=s):r=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\":510}],485:[function(t,e,r){\"use strict\";var n=Array.isArray,i=ArrayBuffer,a=DataView;function o(t){return i.isView(t)&&!(t instanceof a)}function s(t){return n(t)||o(t)}function l(t,e,r){if(s(t)){if(s(t[0])){for(var n=r,i=0;ii.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&ti.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.get(t,r))}},angle:{coerceFunction:function(t,e,r){\"auto\"===t?e.set(\"auto\"):n(t)?e.set(f(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||u(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&&!!u(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=n&&t<=i?t:u}if(\"string\"!=typeof t&&\"number\"!=typeof t)return u;t=String(t);var c=_(e),v=t.charAt(0);!c||\"G\"!==v&&\"g\"!==v||(t=t.substr(1),e=\"\");var w=c&&\"chinese\"===e.substr(0,7),T=t.match(w?x:y);if(!T)return u;var k=T[1],A=T[3]||\"1\",M=Number(T[5]||1),S=Number(T[7]||0),E=Number(T[9]||0),L=Number(T[11]||0);if(c){if(2===k.length)return u;var C;k=Number(k);try{var P=m.getComponentMethod(\"calendars\",\"getCal\")(e);if(w){var I=\"i\"===A.charAt(A.length-1);A=parseInt(A,10),C=P.newDate(k,P.toMonthIndex(k,A,I),M)}else C=P.newDate(k,Number(A),M)}catch(t){return u}return C?(C.toJD()-g)*f+S*h+E*p+L*d:u}k=2===k.length?(Number(k)+2e3-b)%100+b:Number(k),A-=1;var O=new Date(Date.UTC(2e3,A,M,S,E));return O.setUTCFullYear(k),O.getUTCMonth()!==A||O.getUTCDate()!==M?u:O.getTime()+L*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 T=90*f,k=3*h,A=5*p;function M(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,E=Math.floor(l(t,f));try{a=m.getComponentMethod(\"calendars\",\"getCal\")(r).fromJD(S).formatDate(\"yyyy-mm-dd\")}catch(t){a=v(\"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=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 M(a(\"%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,E=/%h/g,L={1:\"1\",2:\"1\",3:\"2\",4:\"2\"};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(t=t.replace(E,(function(){return L[r(\"%q\")(i)]})),_(n))try{t=m.getComponentMethod(\"calendars\",\"worldCalFmt\")(t,e,n)}catch(t){return\"Invalid\"}return r(t)(i)}var P=[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),P[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 I=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=m.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+I);return c.setUTCMonth(c.getUTCMonth()+e)+n-I},r.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,c=_(e)&&m.getComponentMethod(\"calendars\",\"getCal\")(e),u=0;u0&&t[e+1][0]<0)return e;return null}switch(e=\"RUS\"===s||\"FJI\"===s?function(t){var e;if(null===c(t))e=t;else for(e=new Array(t.length),i=0;ie?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 a=h.tester(r);a.pts.pop(),l.push(a)}:function(t){l.push(h.tester(t))},a.type){case\"MultiPolygon\":for(r=0;ri&&(i=c,e=l)}else e=r;return o.default(e).geometry.coordinates}(u),n.fIn=t,n.fOut=u,s.push(u)}else c.log([\"Location\",n.loc,\"does not have a valid GeoJSON geometry.\",\"Traces with locationmode *geojson-id* only support\",\"*Polygon* and *MultiPolygon* geometries.\"].join(\" \"))}delete i[r]}switch(r.type){case\"FeatureCollection\":var h=r.features;for(n=0;n100?(clearInterval(a),n(\"Unexpected error while fetching from \"+t)):void i++}),50)}))}for(var o=0;o0&&(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;r1||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,m=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(m)},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.xo?r.x-o:0,f=r.yl?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;f0?p=i:h=i,f++}return a}},{\"./mod\":510}],499:[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(\"./array\").isArrayOrTypedArray,c=a(s);function u(t,e){var r=t;return r[3]*=e,r}function f(t){if(n(t))return c;var e=a(t);return e.length?e:c}function h(t){return n(t)?t:1}e.exports={formatColor:function(t,e,r){var n,i,s,p,d,g=t.color,m=l(g),v=l(e),y=o.extractOpts(t),x=[];if(n=void 0!==y.colorscale?o.makeColorScaleFuncFromTrace(t):f,i=m?function(t,e){return void 0===t[e]?c:a(n(t[e]))}:f,s=v?function(t,e){return void 0===t[e]?1:h(t[e])}:h,m||v)for(var b=0;b1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var a=String(e).length;if(i>=String(t).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf(\"e+\")&&(n=+o)}}return n}},{}],503:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-time-format\").utcFormat,a=t(\"d3-format\").format,o=t(\"fast-isnumeric\"),s=t(\"../constants/numerical\"),l=s.FP_SAFE,c=-l,u=s.BADNUM,f=e.exports={};f.adjustFormat=function(t){return!t||/^\\d[.]\\df/.test(t)||/[.]\\d%/.test(t)?t:\"0.f\"===t?\"~f\":/^\\d%/.test(t)?\"~%\":/^\\ds/.test(t)?\"~s\":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?\"~\"+t:t};var h={};f.warnBadFormat=function(t){var e=String(t);h[e]||(h[e]=1,f.warn('encountered bad format: \"'+e+'\"'))},f.noFormat=function(t){return String(t)},f.numberFormat=function(t){var e;try{e=a(f.adjustFormat(t))}catch(e){return f.warnBadFormat(t),f.noFormat}return e},f.nestedProperty=t(\"./nested_property\"),f.keyedContainer=t(\"./keyed_container\"),f.relativeAttr=t(\"./relative_attr\"),f.isPlainObject=t(\"./is_plain_object\"),f.toLogRange=t(\"./to_log_range\"),f.relinkPrivateKeys=t(\"./relink_private\");var p=t(\"./array\");f.isTypedArray=p.isTypedArray,f.isArrayOrTypedArray=p.isArrayOrTypedArray,f.isArray1D=p.isArray1D,f.ensureArray=p.ensureArray,f.concat=p.concat,f.maxRowLength=p.maxRowLength,f.minRowLength=p.minRowLength;var d=t(\"./mod\");f.mod=d.mod,f.modHalf=d.modHalf;var g=t(\"./coerce\");f.valObjectMeta=g.valObjectMeta,f.coerce=g.coerce,f.coerce2=g.coerce2,f.coerceFont=g.coerceFont,f.coercePattern=g.coercePattern,f.coerceHoverinfo=g.coerceHoverinfo,f.coerceSelectionMarkerOpacity=g.coerceSelectionMarkerOpacity,f.validate=g.validate;var m=t(\"./dates\");f.dateTime2ms=m.dateTime2ms,f.isDateTime=m.isDateTime,f.ms2DateTime=m.ms2DateTime,f.ms2DateTimeLocal=m.ms2DateTimeLocal,f.cleanDate=m.cleanDate,f.isJSDate=m.isJSDate,f.formatDate=m.formatDate,f.incrementMonth=m.incrementMonth,f.dateTick0=m.dateTick0,f.dfltRange=m.dfltRange,f.findExactDates=m.findExactDates,f.MIN_MS=m.MIN_MS,f.MAX_MS=m.MAX_MS;var v=t(\"./search\");f.findBin=v.findBin,f.sorterAsc=v.sorterAsc,f.sorterDes=v.sorterDes,f.distinctVals=v.distinctVals,f.roundUp=v.roundUp,f.sort=v.sort,f.findIndexOfMin=v.findIndexOfMin,f.sortObjectKeys=t(\"./sort_object_keys\");var y=t(\"./stats\");f.aggNums=y.aggNums,f.len=y.len,f.mean=y.mean,f.median=y.median,f.midRange=y.midRange,f.variance=y.variance,f.stdev=y.stdev,f.interp=y.interp;var x=t(\"./matrix\");f.init2dArray=x.init2dArray,f.transposeRagged=x.transposeRagged,f.dot=x.dot,f.translationMatrix=x.translationMatrix,f.rotationMatrix=x.rotationMatrix,f.rotationXYMatrix=x.rotationXYMatrix,f.apply3DTransform=x.apply3DTransform,f.apply2DTransform=x.apply2DTransform,f.apply2DTransform2=x.apply2DTransform2,f.convertCssMatrix=x.convertCssMatrix,f.inverseTransformMatrix=x.inverseTransformMatrix;var b=t(\"./angles\");f.deg2rad=b.deg2rad,f.rad2deg=b.rad2deg,f.angleDelta=b.angleDelta,f.angleDist=b.angleDist,f.isFullCircle=b.isFullCircle,f.isAngleInsideSector=b.isAngleInsideSector,f.isPtInsideSector=b.isPtInsideSector,f.pathArc=b.pathArc,f.pathSector=b.pathSector,f.pathAnnulus=b.pathAnnulus;var _=t(\"./anchor_utils\");f.isLeftAnchor=_.isLeftAnchor,f.isCenterAnchor=_.isCenterAnchor,f.isRightAnchor=_.isRightAnchor,f.isTopAnchor=_.isTopAnchor,f.isMiddleAnchor=_.isMiddleAnchor,f.isBottomAnchor=_.isBottomAnchor;var w=t(\"./geometry2d\");f.segmentsIntersect=w.segmentsIntersect,f.segmentDistance=w.segmentDistance,f.getTextLocation=w.getTextLocation,f.clearLocationCache=w.clearLocationCache,f.getVisibleSegment=w.getVisibleSegment,f.findPointOnPath=w.findPointOnPath;var T=t(\"./extend\");f.extendFlat=T.extendFlat,f.extendDeep=T.extendDeep,f.extendDeepAll=T.extendDeepAll,f.extendDeepNoArrays=T.extendDeepNoArrays;var k=t(\"./loggers\");f.log=k.log,f.warn=k.warn,f.error=k.error;var A=t(\"./regex\");f.counterRegex=A.counter;var M=t(\"./throttle\");f.throttle=M.throttle,f.throttleDone=M.done,f.clearThrottle=M.clear;var S=t(\"./dom\");function E(t){var e={};for(var r in t)for(var n=t[r],i=0;il||t=e)&&(o(t)&&t>=0&&t%1==0)},f.noop=t(\"./noop\"),f.identity=t(\"./identity\"),f.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},f.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},f.simpleMap=function(t,e,r,n,i){for(var a=t.length,o=new Array(a),s=0;s=Math.pow(2,r)?i>10?(f.warn(\"randstr failed uniqueness\"),l):t(e,r,n,(i||0)+1):l},f.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},f.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=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},f.syncOrAsync=function(t,e,r){var n;function i(){return f.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},f.stripTrailingSlash=function(t){return\"/\"===t.substr(-1)?t.substr(0,t.length-1):t},f.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n0?e:0}))},f.fillArray=function(t,e,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(t))for(var i=0;i1?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},f.TEMPLATE_STRING_REGEX=/%{([^\\s%{}:]*)([:|\\|][^}]*)?}/g;var z=/^\\w*$/;f.templateString=function(t,e){var r={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,n){var i;return z.test(n)?i=e[n]:(r[n]=r[n]||f.nestedProperty(e,n).get,i=r[n]()),f.isValidTextValue(i)?i:\"\"}))};var D={max:10,count:0,name:\"hovertemplate\"};f.hovertemplateString=function(){return B.apply(D,arguments)};var R={max:10,count:0,name:\"texttemplate\"};f.texttemplateString=function(){return B.apply(R,arguments)};var F=/^[:|\\|]/;function B(t,e,r){var n=this,a=arguments;e||(e={});var o={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,s,l){var c,u,h,p=\"_xother\"===s||\"_yother\"===s,d=\"_xother_\"===s||\"_yother_\"===s,g=\"xother_\"===s||\"yother_\"===s,m=\"xother\"===s||\"yother\"===s||p||g||d,v=s;if((p||d)&&(v=v.substring(1)),(g||d)&&(v=v.substring(0,v.length-1)),m){if(void 0===(c=e[v]))return\"\"}else for(h=3;h=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 N=2e9;f.seedPseudoRandom=function(){N=2e9},f.pseudoRandom=function(){var t=N;return N=(69069*N+1)%4294967296,Math.abs(N-t)<429496729?f.pseudoRandom():N/4294967296},f.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=f.extractOption(t,e,\"htx\",\"hovertext\");if(f.isValidTextValue(i))return n(i);var a=f.extractOption(t,e,\"tx\",\"text\");return f.isValidTextValue(a)?n(a):void 0},f.isValidTextValue=function(t){return t||0===t},f.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+\"%\",n=0;n1&&(c=1):c=0,f.strTranslate(i-c*(r+o),a-c*(n+s))+f.strScale(c)+(l?\"rotate(\"+l+(e?\"\":\" \"+r+\" \"+n)+\")\":\"\")},f.ensureUniformFontSize=function(t,e){var r=f.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},f.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)},f.bigFont=function(t){return Math.round(1.2*t)};var j=f.getFirefoxVersion(),U=null!==j&&j<86;f.getPositionFromD3Event=function(){return U?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},{\"../constants/numerical\":479,\"./anchor_utils\":483,\"./angles\":484,\"./array\":485,\"./clean_number\":486,\"./clear_responsive\":488,\"./coerce\":489,\"./dates\":490,\"./dom\":491,\"./extend\":493,\"./filter_unique\":494,\"./filter_visible\":495,\"./geometry2d\":498,\"./identity\":501,\"./increment\":502,\"./is_plain_object\":504,\"./keyed_container\":505,\"./localize\":506,\"./loggers\":507,\"./make_trace_groups\":508,\"./matrix\":509,\"./mod\":510,\"./nested_property\":511,\"./noop\":512,\"./notifier\":513,\"./preserve_drawing_buffer\":517,\"./push_unique\":518,\"./regex\":520,\"./relative_attr\":521,\"./relink_private\":522,\"./search\":523,\"./sort_object_keys\":526,\"./stats\":527,\"./throttle\":530,\"./to_log_range\":531,\"@plotly/d3\":58,\"d3-format\":112,\"d3-time-format\":120,\"fast-isnumeric\":190}],504:[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).hasOwnProperty(\"hasOwnProperty\")}},{}],505:[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;o2)return c[e]=2|c[e],h.set(t,null);if(f){for(o=e;o1){var e=[\"LOG:\"];for(t=0;t1){var r=[];for(t=0;t\"),\"long\")}},a.warn=function(){var t;if(n.logging>0){var e=[\"WARN:\"];for(t=0;t0){var r=[];for(t=0;t\"),\"stick\")}},a.error=function(){var t;if(n.logging>0){var e=[\"ERROR:\"];for(t=0;t0){var r=[];for(t=0;t\"),\"stick\")}}},{\"../plot_api/plot_config\":541,\"./notifier\":513}],508:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\");e.exports=function(t,e,r){var i=t.selectAll(\"g.\"+r.replace(/\\s/g,\".\")).data(e,(function(t){return t[0].trace.uid}));i.exit().remove(),i.enter().append(\"g\").attr(\"class\",r),i.order();var a=t.classed(\"rangeplot\")?\"nodeRangePlot3\":\"node3\";return i.each((function(t){t[0][a]=n.select(this)})),i}},{\"@plotly/d3\":58}],509:[function(t,e,r){\"use strict\";var n=t(\"gl-mat4\");r.init2dArray=function(t,e){for(var r=new Array(t),n=0;ne/2?t-Math.round(t/e)*e:t}}},{}],511:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./array\").isArrayOrTypedArray;function a(t,e){return function(){var r,n,o,s,l,c=t;for(s=0;s/g),l=0;la||c===i||cs)&&(!e||!l(t))}:function(t,e){var l=t[0],c=t[1];if(l===i||la||c===i||cs)return!1;var u,f,h,p,d,g=r.length,m=r[0][0],v=r[0][1],y=0;for(u=1;uMath.max(f,m)||c>Math.max(h,v)))if(cu||Math.abs(n(o,h))>i)return!0;return!1},a.filter=function(t,e){var r=[t[0]],n=0,i=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c1&&o(t.pop());return{addPt:o,raw:t,filtered:r}}},{\"../constants/numerical\":479,\"./matrix\":509}],516:[function(t,e,r){(function(r){(function(){\"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}n.regl||(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)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./show_no_webgl_msg\":525,regl:283}],517:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"is-mobile\");e.exports=function(t){var e;if(\"string\"!=typeof(e=t&&t.hasOwnProperty(\"userAgent\")?t.userAgent:function(){var t;\"undefined\"!=typeof navigator&&(t=navigator.userAgent);t&&t.headers&&\"string\"==typeof t.headers[\"user-agent\"]&&(t=t.headers[\"user-agent\"]);return t}()))return!0;var r=i({ua:{headers:{\"user-agent\":e}},tablet:!0,featureDetect:!1});if(!r)for(var a=e.split(\" \"),o=1;o-1;s--){var l=a[s];if(\"Version/\"===l.substr(0,8)){var c=l.substr(8).split(\".\")[0];if(n(c)&&(c=+c),c>=13)return!0}}}return r}},{\"fast-isnumeric\":190,\"is-mobile\":234}],518:[function(t,e,r){\"use strict\";e.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;ni.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(!(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=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function u(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,o,f=0,h=e.length,p=0,d=h>1?(e[h-1]-e[0])/(h-1):1;for(o=d>=0?r?s:l:r?u:c,t+=1e-9*d*(r?-1:1)*(d>=0?1:-1);f90&&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,n=t.slice();for(n.sort(r.sorterAsc),e=n.length-1;e>-1&&n[e]===o;e--);for(var i,a=n[e]-n[0]||1,s=a/(e||1)/1e4,l=[],c=0;c<=e;c++){var u=n[c],f=u-i;void 0===i?(l.push(u),i=u):f>s&&(a=Math.min(a,f),l.push(u),i=u)}return{vals:l,minDiff:a}},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;i0&&(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;ia.length)&&(o=a.length),n(e)||(e=!1),i(a[0])){for(l=new Array(o),s=0;st.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{\"./array\":485,\"fast-isnumeric\":190}],528:[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\":89}],529:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../lib\"),a=i.strTranslate,o=t(\"../constants/xmlns_namespaces\"),s=t(\"../constants/alignment\").LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,d){var A=t.text(),M=!t.attr(\"data-notex\")&&\"undefined\"!=typeof MathJax&&A.match(l),L=n.select(t.node().parentNode);if(!L.empty()){var C=t.attr(\"class\")?t.attr(\"class\").split(\" \")[0]:\"text\";return C+=\"-math\",L.selectAll(\"svg.\"+C).remove(),L.selectAll(\"g.\"+C+\"-group\").remove(),t.style(\"display\",null).attr({\"data-unformatted\":A,\"data-math\":\"N\"}),M?(e&&e._promises||[]).push(new Promise((function(e){t.style(\"display\",\"none\");var r=parseInt(t.node().style.fontSize,10),o={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)}))}(M[2],o,(function(n,i,o){L.selectAll(\"svg.\"+C).remove(),L.selectAll(\"g.\"+C+\"-group\").remove();var s=n&&n.select(\"svg\");if(!s||!s.node())return P(),void e();var l=L.append(\"g\").classed(C+\"-group\",!0).attr({\"pointer-events\":\"none\",\"data-unformatted\":A,\"data-math\":\"Y\"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var c=o.width,u=o.height;s.attr({class:C,height:u,preserveAspectRatio:\"xMinYMin meet\"}).style({overflow:\"visible\",\"pointer-events\":\"none\"});var f=t.node().style.fill||\"black\",h=s.select(\"g\");h.attr({fill:f,stroke:f});var p=h.node().getBoundingClientRect(),g=p.width,m=p.height;(g>c||m>u)&&(s.style(\"overflow\",\"hidden\"),g=(p=s.node().getBoundingClientRect()).width,m=p.height);var v=+t.attr(\"x\"),y=+t.attr(\"y\"),x=-(r||t.node().getBoundingClientRect().height)/4;if(\"y\"===C[0])l.attr({transform:\"rotate(\"+[-90,v,y]+\")\"+a(-g/2,x-m/2)});else if(\"l\"===C[0])y=x-m/2;else if(\"a\"===C[0]&&0!==C.indexOf(\"atitle\"))v=0,y=x;else{var b=t.attr(\"text-anchor\");v-=g*(\"middle\"===b?.5:\"end\"===b?1:0),y=y+x-m/2}s.attr({x:v,y:y}),d&&d.call(t,l),e(l)}))}))):P(),t}function P(){L.empty()||(C=t.attr(\"class\")+\"-math\",L.select(\"svg.\"+C).remove()),t.text(\"\").style(\"white-space\",\"pre\"),function(t,e){e=e.replace(g,\" \");var r,a=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(o.svg,\"tspan\");n.select(e).attr({class:\"line\",dy:c*s+\"em\"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var a=1;a doesnt match end tag <\"+t+\">. Pretending it did match.\",e),r=l[l.length-1].node}else i.log(\"Ignoring unexpected end tag .\",e)}y.test(e)?u():(r=t,l=[{node:t}]);for(var L=e.split(m),C=0;C|>|>)/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=[\"http:\",\"https:\",\"mailto:\",\"\",void 0,\":\"],g=r.NEWLINES=/(\\r\\n?|\\n)/g,m=/(<[^<>]*>)/,v=/<(\\/?)([^ >]*)(\\s+(.*))?>/i,y=//i;r.BR_TAG_ALL=//gi;var x=/(^|[\\s\"'])style\\s*=\\s*(\"([^\"]*);?\"|'([^']*);?')/i,b=/(^|[\\s\"'])href\\s*=\\s*(\"([^\"]*)\"|'([^']*)')/i,_=/(^|[\\s\"'])target\\s*=\\s*(\"([^\"\\s]*)\"|'([^'\\s]*)')/i,w=/(^|[\\s\"'])popup\\s*=\\s*(\"([\\w=,]*)\"|'([\\w=,]*)')/i;function T(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&S(n)}var k=/(^|;)\\s*color:/;r.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:[\"br\"],i=\"...\".length,a=t.split(m),o=[],s=\"\",l=0,c=0;ci?o.push(u.substr(0,d-i)+\"...\"):o.push(u.substr(0,d));break}s=\"\"}}return o.join(\"\")};var A={mu:\"\\u03bc\",amp:\"&\",lt:\"<\",gt:\">\",nbsp:\"\\xa0\",times:\"\\xd7\",plusmn:\"\\xb1\",deg:\"\\xb0\"},M=/&(#\\d+|#x[\\da-fA-F]+|[a-z]+);/g;function S(t){return t.replace(M,(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)):A[e])||t}))}function E(t){var e=encodeURI(decodeURI(t)),r=document.createElement(\"a\"),n=document.createElement(\"a\");r.href=t,n.href=e;var i=r.protocol,a=n.protocol;return-1!==d.indexOf(i)&&-1!==d.indexOf(a)?e:\"\"}function L(t,e,r){var n,a,o,s=r.horizontalAlign,l=r.verticalAlign||\"top\",c=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return a=\"bottom\"===l?function(){return c.bottom-n.height}:\"middle\"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},o=\"right\"===s?function(){return c.right-n.width}:\"center\"===s?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var t=o()-u.left,e=a()-u.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+\"px\",left:t+\"px\",\"z-index\":1e3}),this}}r.convertEntities=S,r.sanitizeHTML=function(t){t=t.replace(g,\" \");for(var e=document.createElement(\"p\"),r=e,i=[],a=t.split(m),o=0;oa.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)}},{}],531:[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\":190}],532:[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\":587,\"topojson-client\":315}],533:[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\"}}},{}],534:[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\"}}},{}],535:[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;s0&&o.log(\"Clearing previous rejected promises from queue.\"),t._promises=[]},r.cleanLayout=function(t){var e,n;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 a=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,f=(s.subplotsRegistry.ternary||{}).attrRegex,h=(s.subplotsRegistry.gl3d||{}).attrRegex,g=Object.keys(t);for(e=0;e3?(O.x=1.02,O.xanchor=\"left\"):O.x<-2&&(O.x=-.02,O.xanchor=\"right\"),O.y>3?(O.y=1.02,O.yanchor=\"bottom\"):O.y<-2&&(O.y=-.02,O.yanchor=\"top\")),d(t),\"rotate\"===t.dragmode&&(t.dragmode=\"orbit\"),c.clean(t),t.template&&t.template.layout&&r.cleanLayout(t.template.layout),t},r.cleanData=function(t){for(var e=0;e0)return t.substr(0,e)}r.hasParent=function(t,e){for(var r=b(e);r;){if(r in t)return!0;r=b(r)}return!1};var _=[\"x\",\"y\",\"z\"];r.clearAxisTypes=function(t,e,r){for(var n=0;n1&&a.warn(\"Full array edits are incompatible with other edits\",f);var y=r[\"\"][\"\"];if(c(y))e.set(null);else{if(!Array.isArray(y))return a.warn(\"Unrecognized full array edit value\",f,y),!0;e.set(y)}return!g&&(h(m,v),p(t),!0)}var x,b,_,w,T,k,A,M,S=Object.keys(r).map(Number).sort(o),E=e.get(),L=E||[],C=u(v,f).get(),P=[],I=-1,O=L.length;for(x=0;xL.length-(A?0:1))a.warn(\"index out of range\",f,_);else if(void 0!==k)T.length>1&&a.warn(\"Insertion & removal are incompatible with edits to the same index.\",f,_),c(k)?P.push(_):A?(\"add\"===k&&(k={}),L.splice(_,0,k),C&&C.splice(_,0,{})):a.warn(\"Unrecognized full object edit value\",f,_,k),-1===I&&(I=_);else for(b=0;b=0;x--)L.splice(P[x],1),C&&C.splice(P[x],1);if(L.length?E||e.set(L):e.set(null),g)return!1;if(h(m,v),d!==i){var z;if(-1===I)z=S;else{for(O=Math.max(L.length,O),z=[],x=0;x=I);x++)z.push(_);for(x=I;x=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(void 0===e)throw new Error(\"currentIndices is a required argument.\");if(Array.isArray(e)||(e=[e]),P(t,e,\"currentIndices\"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&P(t,r,\"newIndices\"),void 0!==r&&e.length!==r.length)throw new Error(\"current and new indices must be of equal length.\")}function O(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(void 0===r)throw new Error(\"indices must be an integer or array of integers\");for(var a in P(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 l=function(t,e,r,n){var a,l,c,u,f,h=o.isPlainObject(n),p=[];for(var d in Array.isArray(r)||(r=[r]),r=C(r,t.data.length-1),e)for(var g=0;g-1&&-1===r.indexOf(\"grouptitlefont\")?l(r,r.replace(\"titlefont\",\"title.font\")):r.indexOf(\"titleposition\")>-1?l(r,r.replace(\"titleposition\",\"title.position\")):r.indexOf(\"titleside\")>-1?l(r,r.replace(\"titleside\",\"title.side\")):r.indexOf(\"titleoffset\")>-1&&l(r,r.replace(\"titleoffset\",\"title.offset\")):l(r,r.replace(\"title\",\"title.text\"));function l(e,r){t[r]=t[e],delete t[e]}}function U(t,e,r){t=o.getGraphDiv(t),_.clearPromiseQueue(t);var n={};if(\"string\"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn(\"Relayout fail.\",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=W(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[h.previousPromises];a.layoutReplot?s.push(w.layoutReplot):Object.keys(n).length&&(V(t,a,i)||h.supplyDefaults(t),a.legend&&s.push(w.doLegend),a.layoutstyle&&s.push(w.layoutStyles),a.axrange&&H(s,i.rangesAltered),a.ticks&&s.push(w.doTicksRelayout),a.modebar&&s.push(w.doModeBar),a.camera&&s.push(w.doCamera),a.colorbars&&s.push(w.doColorBars),s.push(M)),s.push(h.rehover,h.redrag),c.add(t,U,[t,i.undoit],U,[t,i.redoit]);var l=o.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit(\"plotly_relayout\",i.eventData),t}))}function V(t,e,r){var n=t._fullLayout;if(!e.axrange)return!1;for(var i in e)if(\"axrange\"!==i&&e[i])return!1;for(var a in r.rangesAltered){var o=p.id2name(a),s=t.layout[o],l=n[o];if(l.autorange=s.autorange,s.range&&(l.range=s.range.slice()),l.cleanRange(),l._matchGroup)for(var c in l._matchGroup)if(c!==a){var u=n[p.id2name(c)];u.autorange=l.autorange,u.range=l.range.slice(),u._input.range=l.range.slice()}}return!0}function H(t,e){var r=e?function(t){var r=[],n=!0;for(var i in e){var a=p.getFromId(t,i);if(r.push(i),-1!==(a.ticklabelposition||\"\").indexOf(\"inside\")&&a._anchorAxis&&r.push(a._anchorAxis._id),a._matchGroup)for(var o in a._matchGroup)e[o]||r.push(o);a.automargin&&(n=!1)}return p.draw(t,r,{skipTitle:n})}:function(t){return p.draw(t,\"redraw\")};t.push(y,w.doAutoRangeAndConstraints,r,w.drawData,w.finalDraw)}var q=/^[xyz]axis[0-9]*\\.range(\\[[0|1]\\])?$/,G=/^[xyz]axis[0-9]*\\.autorange$/,Y=/^[xyz]axis[0-9]*\\.domain(\\[[0|1]\\])?$/;function W(t,e){var r,n,i,a=t.layout,l=t._fullLayout,c=l._guiEditing,h=F(l._preGUI,c),d=Object.keys(e),g=p.list(t),m=o.extendDeepAll({},e),v={};for(j(e),d=Object.keys(e),n=0;n0&&\"string\"!=typeof O.parts[D];)D--;var B=O.parts[D],N=O.parts[D-1]+\".\"+B,U=O.parts.slice(0,D).join(\".\"),V=s(t.layout,U).get(),H=s(l,U).get(),W=O.get();if(void 0!==z){M[I]=z,S[I]=\"reverse\"===B?z:R(W);var Z=f.getLayoutValObject(l,O.parts);if(Z&&Z.impliedEdits&&null!==z)for(var J in Z.impliedEdits)E(o.relativeAttr(I,J),Z.impliedEdits[J]);if(-1!==[\"width\",\"height\"].indexOf(I))if(z){E(\"autosize\",null);var K=\"height\"===I?\"width\":\"height\";E(K,l[K])}else l[I]=t._initialAutoSize[I];else if(\"autosize\"===I)E(\"width\",z?null:l.width),E(\"height\",z?null:l.height);else if(N.match(q))P(N),s(l,U+\"._inputRange\").set(null);else if(N.match(G)){P(N),s(l,U+\"._inputRange\").set(null);var Q=s(l,U).get();Q._inputDomain&&(Q._input.domain=Q._inputDomain.slice())}else N.match(Y)&&s(l,U+\"._inputDomain\").set(null);if(\"type\"===B){L=V;var $=\"linear\"===H.type&&\"log\"===z,tt=\"log\"===H.type&&\"linear\"===z;if($||tt){if(L&&L.range)if(H.autorange)$&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var et=L.range[0],rt=L.range[1];$?(et<=0&&rt<=0&&E(U+\".autorange\",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),E(U+\".range[0]\",Math.log(et)/Math.LN10),E(U+\".range[1]\",Math.log(rt)/Math.LN10)):(E(U+\".range[0]\",Math.pow(10,et)),E(U+\".range[1]\",Math.pow(10,rt)))}else E(U+\".autorange\",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[O.parts[0]]&&\"radialaxis\"===O.parts[1]&&delete l[O.parts[0]]._subplot.viewInitial[\"radialaxis.range\"],u.getComponentMethod(\"annotations\",\"convertCoords\")(t,H,z,E),u.getComponentMethod(\"images\",\"convertCoords\")(t,H,z,E)}else E(U+\".autorange\",!0),E(U+\".range\",null);s(l,U+\"._inputRange\").set(null)}else if(B.match(k)){var nt=s(l,I).get(),it=(z||{}).type;it&&\"-\"!==it||(it=\"linear\"),u.getComponentMethod(\"annotations\",\"convertCoords\")(t,nt,it,E),u.getComponentMethod(\"images\",\"convertCoords\")(t,nt,it,E)}var at=b.containerArrayMatch(I);if(at){r=at.array,n=at.index;var ot=at.property,st=Z||{editType:\"calc\"};\"\"!==n&&\"\"===ot&&(b.isAddVal(z)?S[I]=null:b.isRemoveVal(z)?S[I]=(s(a,r).get()||[])[n]:o.warn(\"unrecognized full object value\",e)),T.update(A,st),v[r]||(v[r]={});var lt=v[r][n];lt||(lt=v[r][n]={}),lt[ot]=z,delete e[I]}else\"reverse\"===B?(V.range?V.range.reverse():(E(U+\".autorange\",!0),V.range=[1,0]),H.autorange?A.calc=!0:A.plot=!0):(l._has(\"scatter-like\")&&l._has(\"regl\")&&\"dragmode\"===I&&(\"lasso\"===z||\"select\"===z)&&\"lasso\"!==W&&\"select\"!==W||l._has(\"gl2d\")?A.plot=!0:Z?T.update(A,Z):A.calc=!0,O.set(z))}}for(r in v){b.applyContainerArrayChanges(t,h(a,r),v[r],A,h)||(A.plot=!0)}for(var ct in C){var ut=(L=p.getFromId(t,ct))&&L._constraintGroup;if(ut)for(var ft in A.calc=!0,ut)C[ft]||(p.getFromId(t,ft)._constraintShrinkable=!0)}return(X(t)||e.height||e.width)&&(A.plot=!0),(A.plot||A.calc)&&(A.layoutReplot=!0),{flags:A,rangesAltered:C,undoit:S,redoit:M,eventData:m}}function X(t){var e=t._fullLayout,r=e.width,n=e.height;return t.layout.autosize&&h.plotAutoSize(t,t.layout,e),e.width!==r||e.height!==n}function Z(t,e,n,i){t=o.getGraphDiv(t),_.clearPromiseQueue(t),o.isPlainObject(e)||(e={}),o.isPlainObject(n)||(n={}),Object.keys(e).length&&(t.changed=!0),Object.keys(n).length&&(t.changed=!0);var a=_.coerceTraceIndices(t,i),s=N(t,o.extendFlat({},e),a),l=s.flags,u=W(t,o.extendFlat({},n)),f=u.flags;(l.calc||f.calc)&&(t.calcdata=void 0),l.clearAxisTypes&&_.clearAxisTypes(t,a,n);var p=[];f.layoutReplot?p.push(w.layoutReplot):l.fullReplot?p.push(r._doPlot):(p.push(h.previousPromises),V(t,f,u)||h.supplyDefaults(t),l.style&&p.push(w.doTraceStyle),(l.colorbars||f.colorbars)&&p.push(w.doColorBars),f.legend&&p.push(w.doLegend),f.layoutstyle&&p.push(w.layoutStyles),f.axrange&&H(p,u.rangesAltered),f.ticks&&p.push(w.doTicksRelayout),f.modebar&&p.push(w.doModeBar),f.camera&&p.push(w.doCamera),p.push(M)),p.push(h.rehover,h.redrag),c.add(t,Z,[t,s.undoit,u.undoit,s.traces],Z,[t,s.redoit,u.redoit,s.traces]);var d=o.syncOrAsync(p,t);return d&&d.then||(d=Promise.resolve(t)),d.then((function(){return t.emit(\"plotly_update\",{data:s.eventData,layout:u.eventData}),t}))}function J(t){return function(e){e._fullLayout._guiEditing=!0;var r=t.apply(null,arguments);return e._fullLayout._guiEditing=!1,r}}var K=[{pattern:/^hiddenlabels/,attr:\"legend.uirevision\"},{pattern:/^((x|y)axis\\d*)\\.((auto)?range|title\\.text)/},{pattern:/axis\\d*\\.showspikes$/,attr:\"modebar.uirevision\"},{pattern:/(hover|drag)mode$/,attr:\"modebar.uirevision\"},{pattern:/^(scene\\d*)\\.camera/},{pattern:/^(geo\\d*)\\.(projection|center|fitbounds)/},{pattern:/^(ternary\\d*\\.[abc]axis)\\.(min|title\\.text)$/},{pattern:/^(polar\\d*\\.radialaxis)\\.((auto)?range|angle|title\\.text)/},{pattern:/^(polar\\d*\\.angularaxis)\\.rotation/},{pattern:/^(mapbox\\d*)\\.(center|zoom|bearing|pitch)/},{pattern:/^legend\\.(x|y)$/,attr:\"editrevision\"},{pattern:/^(shapes|annotations)/,attr:\"editrevision\"},{pattern:/^title\\.text$/,attr:\"editrevision\"}],Q=[{pattern:/^selectedpoints$/,attr:\"selectionrevision\"},{pattern:/(^|value\\.)visible$/,attr:\"legend.uirevision\"},{pattern:/^dimensions\\[\\d+\\]\\.constraintrange/},{pattern:/^node\\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\\.)name$/},{pattern:/colorbar\\.title\\.text$/},{pattern:/colorbar\\.(x|y)$/,attr:\"editrevision\"}];function $(t,e){for(var r=0;r1;)if(n.pop(),void 0!==(r=s(e,n.join(\".\")+\".uirevision\").get()))return r;return e.uirevision}function et(t,e){for(var r=0;r=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 f(){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,h.transition(t,e.frame.data,e.frame.layout,_.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&&f()};e()}var d,g,m=0;function v(t){return Array.isArray(i)?m>=i.length?t.transitionOpts=i[m]:t.transitionOpts=i[0]:t.transitionOpts=i,m++,t}var y=[],x=null==e,b=Array.isArray(e);if(!x&&!b&&o.isPlainObject(e))y.push({type:\"object\",data:v(o.extendFlat({},e))});else if(x||-1!==[\"string\",\"number\"].indexOf(typeof e))for(d=0;d0&&kk)&&A.push(g);y=A}}y.length>0?function(e){if(0!==e.length){for(var i=0;i=0;n--)if(o.isPlainObject(e[n])){var g=e[n].name,m=(u[g]||d[g]||{}).name,v=e[n].name,y=u[m]||d[m];m&&v&&\"number\"==typeof v&&y&&A<5&&(A++,o.warn('addFrames: overwriting frame \"'+(u[m]||d[m]).name+'\" with a frame whose name of type \"number\" also equates to \"'+m+'\". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===A&&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:h.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}p.sort((function(t,e){return t.index>e.index?-1:t.index=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=0;r--)n=e[r],a.push({type:\"delete\",index:n}),s.unshift({type:\"insert\",index:n,value:i[n]});var l=h.modifyFrames,u=h.modifyFrames,f=[t,s],p=[t,a];return c&&c.add(t,l,f,u,p),h.modifyFrames(t,a)},r.addTraces=function t(e,n,i){e=o.getGraphDiv(e);var a,s,l=[],u=r.deleteTraces,f=t,h=[e,l],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(void 0===e)throw new Error(\"traces must be defined.\");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!y(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function y(t){return t===Math.round(t)&&t>=0}function x(){var t,e,r={};for(t in f(r,o),n.subplotsRegistry){if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i=l.length)return!1;i=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else{var u=t._module;if(u||(u=(n.modules[t.type||a.type.dflt]||{})._module),!u)return!1;if(!(i=(r=u.attributes)&&r[o])){var f=u.basePlotModule;f&&f.attributes&&(i=f.attributes[o])}i||(i=a[o])}return v(i,e,s)},r.getLayoutValObject=function(t,e){return v(function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var c;for(r=0;r=i&&(r._input||{})._templateitemname;o&&(a=i);var s,l=e+\"[\"+a+\"]\";function c(){s={},o&&(s[l]={},s[l].templateitemname=o)}function u(t,e){o?n.nestedProperty(s[l],t).set(e):s[l+\".\"+t]=e}function f(){var t=s;return c(),t}return c(),{modifyBase:function(t,e){s[t]=e},modifyItem:u,getUpdateObj:f,applyUpdate:function(e,r){e&&u(e,r);var i=f();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},{\"../lib\":503,\"../plots/attributes\":550}],544:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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,m=d.clean,v=t(\"../plots/cartesian/autorange\").doAutoRange;function y(t,e,r){for(var n=0;n=t[1]||i[1]<=t[0])&&(a[0]e[0]))return!0}return!1}function x(t){var e,i,s,u,d,g,m=t._fullLayout,v=m._size,x=v.p,_=h.list(t,\"\",!0);if(m._paperdiv.style({width:t._context.responsive&&m.autosize&&!t._context._hasZeroWidth&&!t.layout.width?\"100%\":m.width+\"px\",height:t._context.responsive&&m.autosize&&!t._context._hasZeroHeight&&!t.layout.height?\"100%\":m.height+\"px\"}).selectAll(\".main-svg\").call(c.setSize,m.width,m.height),t._context.setBackground(t,m.paper_bgcolor),r.drawMainTitle(t),f.manage(t),!m._has(\"cartesian\"))return a.previousPromises(t);function T(t,e,r){var n=t._lw/2;return\"x\"===t._id.charAt(0)?e?\"top\"===r?e._offset-x-n:e._offset+e._length+x+n:v.t+v.h*(1-(t.position||0))+n%1:e?\"right\"===r?e._offset+e._length+x+n:e._offset-x-n:v.l+v.w*(t.position||0)+n%1}for(e=0;e<_.length;e++){var k=(u=_[e])._anchorAxis;u._linepositions={},u._lw=c.crispRound(t,u.linewidth,1),u._mainLinePosition=T(u,k,u.side),u._mainMirrorPosition=u.mirror&&k?T(u,k,p.OPPOSITE_SIDE[u.side]):null}var A=[],M=[],S=[],E=1===l.opacity(m.paper_bgcolor)&&1===l.opacity(m.plot_bgcolor)&&m.paper_bgcolor===m.plot_bgcolor;for(i in m._plots)if((s=m._plots[i]).mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var L=s.xaxis.domain,C=s.yaxis.domain,P=s.plotgroup;if(y(L,C,S)){var I=P.node(),O=s.bg=o.ensureSingle(P,\"rect\",\"bg\");I.insertBefore(O.node(),I.childNodes[0]),M.push(i)}else P.select(\"rect.bg\").remove(),S.push([L,C]),E||(A.push(i),M.push(i))}var z,D,R,F,B,N,j,U,V,H,q,G,Y,W=m._bgLayer.selectAll(\".bg\").data(A);for(W.enter().append(\"rect\").classed(\"bg\",!0),W.exit().remove(),W.each((function(t){m._plots[t].bg=n.select(this)})),e=0;eT?u.push({code:\"unused\",traceType:y,templateCount:w,dataCount:T}):T>w&&u.push({code:\"reused\",traceType:y,templateCount:w,dataCount:T})}}else u.push({code:\"data\"});if(function t(e,r){for(var n in e)if(\"_\"!==n.charAt(0)){var a=e[n],o=g(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)&&m(a)&&t(a,o)}}({data:p,layout:h},\"\"),u.length)return u.map(v)}},{\"../lib\":503,\"../plots/attributes\":550,\"../plots/plots\":619,\"./plot_config\":541,\"./plot_schema\":542,\"./plot_template\":543}],546:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./plot_api\"),a=t(\"../plots/plots\"),o=t(\"../lib\"),s=t(\"../snapshot/helpers\"),l=t(\"../snapshot/tosvg\"),c=t(\"../snapshot/svgtoimg\"),u=t(\"../version\").version,f={format:{valType:\"enumerated\",values:[\"png\",\"jpeg\",\"webp\",\"svg\",\"full-json\"],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}};e.exports=function(t,e){var r,h,p,d;function g(t){return!(t in e)||o.validate(e[t],f[t])}if(e=e||{},o.isPlainObject(t)?(r=t.data||[],h=t.layout||{},p=t.config||{},d={}):(t=o.getGraphDiv(t),r=o.extendDeep([],t.data),h=o.extendDeep({},t.layout),p=t._context,d=t._fullLayout||{}),!g(\"width\")&&null!==e.width||!g(\"height\")&&null!==e.height)throw new Error(\"Height and width should be pixel values.\");if(!g(\"format\"))throw new Error(\"Export format is not \"+o.join2(f.format.values,\", \",\" or \")+\".\");var m={};function v(t,r){return o.coerce(e,m,f,t,r)}var y=v(\"format\"),x=v(\"width\"),b=v(\"height\"),_=v(\"scale\"),w=v(\"setBackground\"),T=v(\"imageDataOnly\"),k=document.createElement(\"div\");k.style.position=\"absolute\",k.style.left=\"-5000px\",document.body.appendChild(k);var A=o.extendFlat({},h);x?A.width=x:null===e.width&&n(d.width)&&(A.width=d.width),b?A.height=b:null===e.height&&n(d.height)&&(A.height=d.height);var M=o.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=s.getRedrawFunc(k);function E(){return new Promise((function(t){setTimeout(t,s.getDelay(k._fullLayout))}))}function L(){return new Promise((function(t,e){var r=l(k,y,_),n=k._fullLayout.width,f=k._fullLayout.height;function h(){i.purge(k),document.body.removeChild(k)}if(\"full-json\"===y){var p=a.graphJson(k,!1,\"keepdata\",\"object\",!0,!0);return p.version=u,p=JSON.stringify(p),h(),t(T?p:s.encodeJSON(p))}if(h(),\"svg\"===y)return t(T?r:s.encodeSVG(r));var d=document.createElement(\"canvas\");d.id=o.randstr(),c({format:y,width:n,height:f,scale:_,canvas:d,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.newPlot(k,r,A,M).then(S).then(E).then(L).then((function(e){t(function(t){return T?t.replace(s.IMAGE_URL_PREFIX,\"\"):t}(e))})).catch((function(t){e(t)}))}))}},{\"../lib\":503,\"../plots/plots\":619,\"../snapshot/helpers\":642,\"../snapshot/svgtoimg\":644,\"../snapshot/tosvg\":646,\"../version\":1119,\"./plot_api\":540,\"fast-isnumeric\":190}],547:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plots/plots\"),a=t(\"./plot_schema\"),o=t(\"./plot_config\").dfltConfig,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;hx.length&&i.push(d(\"unused\",a,v.concat(x.length)));var A,M,S,E,L,C=x.length,P=Array.isArray(k);if(P&&(C=Math.min(C,k.length)),2===b.dimensions)for(M=0;Mx[M].length&&i.push(d(\"unused\",a,v.concat(M,x[M].length)));var I=x[M].length;for(A=0;A<(P?Math.min(I,k[M].length):I);A++)S=P?k[M][A]:k,E=y[M][A],L=x[M][A],n.validate(E,S)?L!==E&&L!==+E&&i.push(d(\"dynamic\",a,v.concat(M,A),E,L)):i.push(d(\"value\",a,v.concat(M,A),E))}else i.push(d(\"array\",a,v.concat(M),y[M]));else for(M=0;M1&&p.push(d(\"object\",\"layout\"))),i.supplyDefaults(g);for(var m=g._fullData,v=r.length,y=0;y0&&Math.round(f)===f))return{vals:i};c=f}for(var h=e.calendar,p=\"start\"===l,d=\"end\"===l,g=t[r+\"period0\"],m=a(g,h)||0,v=[],y=[],x=[],b=i.length,_=0;_A;)k=o(k,-c,h);for(;k<=A;)k=o(k,c,h);T=o(k,-c,h)}else{for(k=m+(w=Math.round((A-m)/u))*u;k>A;)k-=u;for(;k<=A;)k+=u;T=k-u}v[_]=p?T:d?k:(T+k)/2,y[_]=T,x[_]=k}return{vals:v,starts:y,ends:x}}},{\"../../constants/numerical\":479,\"../../lib\":503,\"fast-isnumeric\":190}],552:[function(t,e,r){\"use strict\";e.exports={xaxis:{valType:\"subplotid\",dflt:\"x\",editType:\"calc+clearAxisTypes\"},yaxis:{valType:\"subplotid\",dflt:\"y\",editType:\"calc+clearAxisTypes\"}}},{}],553:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../lib\"),o=t(\"../../constants/numerical\").FP_SAFE,s=t(\"../../registry\"),l=t(\"../../components/drawing\"),c=t(\"./axis_ids\"),u=c.getFromId,f=c.isLinked;function h(t,e){var r,n,i=[],o=t._fullLayout,s=d(o,e,0),l=d(o,e,1),c=g(t,e),u=c.min,f=c.max;if(0===u.length||0===f.length)return a.simpleMap(e.range,e.r2l);var h=u[0].val,m=f[0].val;for(r=1;r0&&((T=E-s(x)-l(b))>L?k/T>C&&(_=x,w=b,C=k/T):k/E>C&&(_={val:x.val,nopad:1},w={val:b.val,nopad:1},C=k/E));if(h===m){var P=h-1,I=h+1;if(M)if(0===h)i=[0,1];else{var O=(h>0?f:u).reduce((function(t,e){return Math.max(t,l(e))}),0),z=h/(1-Math.min(.5,O/E));i=h>0?[0,z]:[z,0]}else i=S?[Math.max(0,P),Math.max(1,I)]:[P,I]}else M?(_.val>=0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:0,nopad:1})):S&&(_.val-C*s(_)<0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:1,nopad:1})),C=(w.val-_.val-p(e,x.val,b.val))/(E-s(_)-l(w)),i=[_.val-C*s(_),w.val+C*l(w)];return v&&i.reverse(),a.simpleMap(i,e.l2r||Number)}function p(t,e,r){var n=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),S=A((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=A(r.vpadplus||r.vpad),L=A(r.vpadminus||r.vpad);if(!T){if(h=1/0,p=-1/0,w)for(n=0;n0&&(h=a),a>p&&a-o&&(h=a),a>p&&a=I;n--)P(n);return{min:d,max:g,opts:r}},concatExtremes:g};function g(t,e,r){var n,i,a,o=e._id,s=t._fullData,l=t._fullLayout,c=[],f=[];function h(t,e){for(n=0;n=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 x(t){return i(t)&&Math.abs(t)=e}},{\"../../components/drawing\":388,\"../../constants/numerical\":479,\"../../lib\":503,\"../../registry\":638,\"./axis_ids\":558,\"@plotly/d3\":58,\"fast-isnumeric\":190}],554:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../plots/plots\"),o=t(\"../../registry\"),s=t(\"../../lib\"),l=s.strTranslate,c=t(\"../../lib/svg_text_utils\"),u=t(\"../../components/titles\"),f=t(\"../../components/color\"),h=t(\"../../components/drawing\"),p=t(\"./layout_attributes\"),d=t(\"./clean_ticks\"),g=t(\"../../constants/numerical\"),m=g.ONEMAXYEAR,v=g.ONEAVGYEAR,y=g.ONEMINYEAR,x=g.ONEMAXQUARTER,b=g.ONEAVGQUARTER,_=g.ONEMINQUARTER,w=g.ONEMAXMONTH,T=g.ONEAVGMONTH,k=g.ONEMINMONTH,A=g.ONEWEEK,M=g.ONEDAY,S=M/2,E=g.ONEHOUR,L=g.ONEMIN,C=g.ONESEC,P=g.MINUS_SIGN,I=g.BADNUM,O={K:\"zeroline\"},z={K:\"gridline\",L:\"path\"},D={K:\"tick\",L:\"path\"},R={K:\"tick\",L:\"text\"},F=t(\"../../constants/alignment\"),B=F.MID_SHIFT,N=F.CAP_SHIFT,j=F.LINE_SPACING,U=F.OPPOSITE_SIDE,V=e.exports={};V.setConvert=t(\"./set_convert\");var H=t(\"./axis_autotype\"),q=t(\"./axis_ids\"),G=q.idSort,Y=q.isLinked;V.id2name=q.id2name,V.name2id=q.name2id,V.cleanId=q.cleanId,V.list=q.list,V.listIds=q.listIds,V.getFromId=q.getFromId,V.getFromTrace=q.getFromTrace;var W=t(\"./autorange\");V.getAutoRange=W.getAutoRange,V.findExtremes=W.findExtremes;function X(t){var e=1e-4*(t[1]-t[0]);return[t[0]-e,t[1]+e]}V.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]||(\"string\"==typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(t){return t+\" domain\"}))),u[c]={valType:\"enumerated\",values:l.concat(a?\"string\"==typeof a?[a]:a:[]),dflt:i},s.coerce(t,e,u,c)},V.getRefType=function(t){return void 0===t?t:\"paper\"===t?\"paper\":\"pixel\"===t?\"pixel\":/( domain)$/.test(t)?\"domain\":\"range\"},V.coercePosition=function(t,e,r,n,i,a){var o,l;if(\"range\"!==V.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var c=V.getFromId(e,n);l=r(i,a=c.fraction2r(a)),o=c.cleanPos}t[i]=o(l)},V.cleanPosition=function(t,e,r){return(\"paper\"===r||\"pixel\"===r?s.ensureNumber:V.getFromId(e,r).cleanPos)(t)},V.redrawComponents=function(t,e){e=e||V.listIds(t);var r=t._fullLayout;function n(n,i,a,s){for(var l=o.getComponentMethod(n,i),c={},u=0;u2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},V.saveRangeInitial=function(t,e){for(var r=V.list(t,\"\",!0),n=!1,i=0;i.3*h||u(n)||u(a))){var p=r.dtick/2;t+=t+p.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=V.tickIncrement(t,\"M6\",\"reverse\")+1.5*M:a.exactMonths>.8?t=V.tickIncrement(t,\"M1\",\"reverse\")+15.5*M:t-=S;var l=V.tickIncrement(t,r);if(l<=n)return l}return t}(y,t,v,c,a)),m=y,0;m<=u;)m=V.tickIncrement(m,v,!1,a);return{start:e.c2r(y,0,a),end:e.c2r(m,0,a),size:v,_dataSpan:u-c}},V.prepTicks=function(t,e){var r=s.simpleMap(t.range,t.r2l,void 0,void 0,e);if(t._dtickInit=t.dtick,t._tick0Init=t.tick0,\"auto\"===t.tickmode||!t.dtick){var n,a=t.nticks;a||(\"category\"===t.type||\"multicategory\"===t.type?(n=t.tickfont?s.bigFont(t.tickfont.size||12):15,a=t._length/n):(n=\"y\"===t._id.charAt(0)?40:80,a=s.constrain(t._length/n,4,9)+1),\"radialaxis\"===t._name&&(a*=2)),\"array\"===t.tickmode&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,V.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}\"period\"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||\"M\"!==t.dtick.charAt(0))}var n=r(),a=V.getTickFormat(t);if(a){var o=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(e=E,o&&!n&&t.dticka&&f=o:d<=o;d=V.tickIncrement(d,t.dtick,l,t.calendar)){if(R++,t.rangebreaks&&!l){if(d=u)break}if(P.length>C||d===O)break;O=d;var F=!1;h&&d!==(0|d)&&(F=!0);var B={minor:F,value:d};L>1&&R%L&&(B.skipLabel=!0),P.push(B)}if(p&&function(t,e,r){for(var n=0;n0?(a=n-1,o=n):(a=n,o=n);var s,l=t[a].value,c=t[o].value,u=Math.abs(c-l),f=r||u,h=0;f>=y?h=u>=y&&u<=m?u:v:r===b&&f>=_?h=u>=_&&u<=x?u:b:f>=k?h=u>=k&&u<=w?u:T:r===A&&f>=A?h=A:f>=M?h=M:r===S&&f>=S?h=S:r===E&&f>=E&&(h=E),h>=u&&(h=u,s=!0);var p=i+h;if(e.rangebreaks&&h>0){for(var d=0,g=0;g<84;g++){var L=(g+.5)/84;e.maskBreaks(i*(1-L)+L*p)!==I&&d++}(h*=d/84)||(t[n].drop=!0),s&&u>A&&(h=u)}(h>0||0===n)&&(t[n].periodX=i+h/2)}}(P,t,t._definedDelta),t.rangebreaks){var N=\"y\"===t._id.charAt(0),j=1;\"auto\"===t.tickmode&&(j=t.tickfont?t.tickfont.size:12);var U=NaN;for(z=P.length-1;z>-1;z--)if(P[z].drop)P.splice(z,1);else{P[z].value=Mt(P[z].value,t);var H=t.c2p(P[z].value);(N?U>H-j:Uu||Gu&&(q.periodX=u),G10||\"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>=L&&a<=16||e>=E)t._tickround=\"M\";else if(e>=C&&a<=19||e>=L)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),u=void 0===t.minexponent?3:t.minexponent;Math.abs(c)>u&&(ut(t.exponentformat)&&!ft(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function lt(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}}V.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,0);var a=2*e;if(a>v)e/=v,r=n(10),t.dtick=\"M\"+12*ot(e,r,$);else if(a>T)e/=T,t.dtick=\"M\"+ot(e,1,tt);else if(a>M){t.dtick=ot(e,M,t._hasDayOfWeekBreaks?[1,2,7,14]:rt);var o=V.getTickFormat(t),l=\"period\"===t.ticklabelmode;l&&(t._rawTick0=t.tick0),/%[uVW]/.test(o)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),l&&(t._dowTick0=t.tick0)}else a>E?t.dtick=ot(e,E,tt):a>L?t.dtick=ot(e,L,et):a>C?t.dtick=ot(e,C,et):(r=n(10),t.dtick=ot(e,r,$))}else if(\"log\"===t.type){t.tick0=0;var c=s.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(c[1]-c[0])<1){var u=1.5*Math.abs((c[1]-c[0])/e);e=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/u,r=n(10),t.dtick=\"L\"+ot(e,r,$)}else t.dtick=e>.3?\"D2\":\"D1\"}else\"category\"===t.type||\"multicategory\"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):At(t)?(t.tick0=0,r=1,t.dtick=ot(e,r,at)):(t.tick0=0,r=n(10),t.dtick=ot(e,r,$));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&\"string\"!=typeof t.dtick){var f=t.dtick;throw t.dtick=1,\"ax.dtick error: \"+String(f)}},V.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return s.increment(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?it:nt,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)},V.tickFirst=function(t,e){var r=t.r2l||Number,a=s.simpleMap(t.range,r,void 0,void 0,e),o=a[1] \")}else t._prevDateHead=l,c+=\"
\"+l;e.text=c}(t,o,r,c):\"log\"===u?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=ht(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||ut(p)&&ft(f)?(e.text=0===f?1:1===f?\"10\":\"10\"+(f>1?\"\":P)+h+\"\",e.fontSize*=1.25):(\"e\"===p||\"E\"===p)&&h>2?e.text=\"1\"+p+(f>0?\"+\":P)+h:(e.text=ht(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,g):\"category\"===u?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=\"\");e.text=String(r)}(t,o):\"multicategory\"===u?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],a=void 0===i[1]?\"\":String(i[1]),o=void 0===i[0]?\"\":String(i[0]);r?e.text=o+\" - \"+a:(e.text=a,e.text2=o)}(t,o,r):At(t)?function(t,e,r,n,i){if(\"radians\"!==t.thetaunit||r)e.text=ht(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){for(var r=1;!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=ht(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=[\"\",o[0],\"\",\"\\u2044\",\"\",o[1],\"\",\"\\u03c0\"].join(\"\"),l&&(e.text=P+e.text)}}}}(t,o,r,c,g):function(t,e,r,n,i){\"never\"===i?i=\"\":\"all\"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i=\"hide\");e.text=ht(e.x,t,i,n)}(t,o,0,c,g),n||(t.tickprefix&&!d(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!d(t.showticksuffix)&&(o.text+=t.ticksuffix)),\"boundaries\"===t.tickson||t.showdividers){var m=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};o.xbnd=[m(o.x-.5),m(o.x+t.dtick-.5)]}return o},V.hoverLabelText=function(t,e,r){r&&(t=s.extendFlat({},t,{hoverformat:r}));var n=Array.isArray(e)?e[0]:e,i=Array.isArray(e)?e[1]:void 0;if(void 0!==i&&i!==n)return V.hoverLabelText(t,n,r)+\" - \"+V.hoverLabelText(t,i,r);var a=\"log\"===t.type&&n<=0,o=V.tickText(t,t.c2l(a?-n:n),\"hover\").text;return a?0===n?\"0\":P+o:o};var ct=[\"f\",\"p\",\"n\",\"\\u03bc\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\"];function ut(t){return\"SI\"===t||\"B\"===t}function ft(t){return t>14||t<-15}function ht(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||\"B\",c=e._tickexponent,u=V.getTickFormat(e),f=e.separatethousands;if(n){var h={exponentformat:l,minexponent:e.minexponent,dtick:\"none\"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:\"none\"===e.showexponent?e.range.map(e.r2d):[0,t||1]};st(h),o=(Number(h._tickround)||0)+4,c=h._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,P);var p,d=Math.pow(10,-o)/2;if(\"none\"===l&&(c=0),(t=Math.abs(t))\"+p+\"\":\"B\"===l&&9===c?t+=\"B\":ut(l)&&(t+=ct[c/3+5]));return a?P+t:t}function pt(t,e){for(var r=[],n={},i=0;i1&&r=i.min&&t=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=o(i)))){r=n;break}break;case\"log\":for(e=0;e0?r.bottom-f:0,h)))),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1];if(\"x\"===d){if(\"b\"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?f-r.top:0,h),p.reverse()),r.width>0){var m=r.right-(e._offset+e._length);m>0&&(n.xr=1,n.r=m);var v=e._offset-r.left;v>0&&(n.xl=0,n.l=v)}}else if(\"l\"===l?n[l]=e._depth=Math.max(r.height>0?f-r.left:0,h):(n[l]=e._depth=Math.max(r.height>0?r.right-f:0,h),p.reverse()),r.height>0){var y=r.bottom-(e._offset+e._length);y>0&&(n.yb=0,n.b=y);var x=e._offset-r.top;x>0&&(n.yt=1,n.t=x)}n[g]=\"free\"===e.anchor?e.position:e._anchorAxis.domain[p[0]],e.title.text!==c._dfltTitle[d]&&(n[l]+=mt(e)+(e.title.standoff||0)),e.mirror&&\"free\"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[u]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[u]+=h),!0===e.mirror||\"ticks\"===e.mirror?i[g]=e._anchorAxis.domain[p[1]]:\"all\"!==e.mirror&&\"allticks\"!==e.mirror||(i[g]=[e._counterDomainMin,e._counterDomainMax][p[1]]))}K&&(s=o.getComponentMethod(\"rangeslider\",\"autoMarginOpts\")(t,e)),a.autoMargin(t,xt(e),n),a.autoMargin(t,bt(e),i),a.autoMargin(t,_t(e),s)})),r.skipTitle||K&&\"bottom\"===e.side||Z.push((function(){return function(t,e){var r,n=t._fullLayout,i=e._id,a=i.charAt(0),o=e.title.font.size;if(e.title.hasOwnProperty(\"standoff\"))r=e._depth+e.title.standoff+mt(e);else{var s=St(e);if(\"multicategory\"===e.type)r=e._depth;else{var l=1.5*o;s&&(l=.5*o,\"outside\"===e.ticks&&(l+=e.ticklen)),r=10+l+(e.linewidth?e.linewidth-1:0)}s||(r+=\"x\"===a?\"top\"===e.side?o*(e.showticklabels?1:0):o*(e.showticklabels?1.5:.5):\"right\"===e.side?o*(e.showticklabels?1:.5):o*(e.showticklabels?.5:0))}var c,f,p,d,g=V.getPxPosition(t,e);\"x\"===a?(f=e._offset+e._length/2,p=\"top\"===e.side?g-r:g+r):(p=e._offset+e._length/2,f=\"right\"===e.side?g+r:g-r,c={rotate:\"-90\",offset:0});if(\"multicategory\"!==e.type){var m=e._selections[e._id+\"tick\"];if(d={selection:m,side:e.side},m&&m.node()&&m.node().parentNode){var v=h.getTranslate(m.node().parentNode);d.offsetLeft=v.x,d.offsetTop=v.y}e.title.hasOwnProperty(\"standoff\")&&(d.pad=0)}return u.draw(t,i+\"title\",{propContainer:e,propName:e._name+\".title.text\",placeholder:n._dfltTitle[a],avoid:d,transform:c,attributes:{x:f,y:p,\"text-anchor\":\"middle\"}})}(t,e)})),s.syncOrAsync(Z)}}function Q(t){var r=p+(t||\"tick\");return w[r]||(w[r]=function(t,e){var r,n,i,a;t._selections[e].size()?(r=1/0,n=-1/0,i=1/0,a=-1/0,t._selections[e].each((function(){var t=yt(this),e=h.bBox(t.node().parentNode);r=Math.min(r,e.top),n=Math.max(n,e.bottom),i=Math.min(i,e.left),a=Math.max(a,e.right)}))):(r=0,n=0,i=0,a=0);return{top:r,bottom:n,left:i,right:a,height:n-r,width:a-i}}(e,r)),w[r]}},V.getTickSigns=function(t){var e=t._id.charAt(0),r={x:\"top\",y:\"right\"}[e],n=t.side===r?1:-1,i=[-1,1,n,-n];return\"inside\"!==t.ticks==(\"x\"===e)&&(i=i.map((function(t){return-t}))),t.side&&i.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),i},V.makeTransTickFn=function(t){return\"x\"===t._id.charAt(0)?function(e){return l(t._offset+t.l2p(e.x),0)}:function(e){return l(0,t._offset+t.l2p(e.x))}},V.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||\"\",r=function(t){return-1!==e.indexOf(t)},n=r(\"top\"),i=r(\"left\"),a=r(\"right\"),o=r(\"bottom\"),s=r(\"inside\"),l=o||i||n||a;if(!l&&!s)return[0,0];var c=t.side,u=l?(t.tickwidth||0)/2:0,f=3,h=t.tickfont?t.tickfont.size:12;(o||n)&&(u+=h*N,f+=(t.linewidth||0)/2);(i||a)&&(u+=(t.linewidth||0)/2,f+=3);s&&\"top\"===c&&(f-=h*(1-N));(i||n)&&(u=-u);\"bottom\"!==c&&\"right\"!==c||(f=-f);return[l?u:0,s?f:0]}(t),r=e[0],n=e[1];return\"x\"===t._id.charAt(0)?function(e){return l(r+t._offset+t.l2p(dt(e)),n)}:function(e){return l(n,r+t._offset+t.l2p(dt(e)))}},V.makeTickPath=function(t,e,r,n){n=void 0!==n?n:t.ticklen;var i=t._id.charAt(0),a=(t.linewidth||1)/2;return\"x\"===i?\"M0,\"+(e+a*r)+\"v\"+n*r:\"M\"+(e+a*r)+\",0h\"+n*r},V.makeLabelFns=function(t,e,r){var n=t.ticklabelposition||\"\",a=function(t){return-1!==n.indexOf(t)},o=a(\"top\"),l=a(\"left\"),c=a(\"right\"),u=a(\"bottom\")||l||o||c,f=a(\"inside\"),h=\"inside\"===n&&\"inside\"===t.ticks||!f&&\"outside\"===t.ticks&&\"boundaries\"!==t.tickson,p=0,d=0,g=h?t.ticklen:0;if(f?g*=-1:u&&(g=0),h&&(p+=g,r)){var m=s.deg2rad(r);p=g*Math.cos(m)+1,d=g*Math.sin(m)}t.showticklabels&&(h||t.showline)&&(p+=.2*t.tickfont.size);var v,y,x,b,_,w={labelStandoff:p+=(t.linewidth||1)/2*(f?-1:1),labelShift:d},T=0,k=t.side,A=t._id.charAt(0),M=t.tickangle;if(\"x\"===A)b=(_=!f&&\"bottom\"===k||f&&\"top\"===k)?1:-1,f&&(b*=-1),v=d*b,y=e+p*b,x=_?1:-.2,90===Math.abs(M)&&(f?x+=B:x=-90===M&&\"bottom\"===k?N:90===M&&\"top\"===k?B:.5,T=B/2*(M/90)),w.xFn=function(t){return t.dx+v+T*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*x},w.anchorFn=function(t,e){if(u){if(l)return\"end\";if(c)return\"start\"}return i(e)&&0!==e&&180!==e?e*b<0!==f?\"end\":\"start\":\"middle\"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:\"top\"===t.side!==f?-n:0};else if(\"y\"===A){if(b=(_=!f&&\"left\"===k||f&&\"right\"===k)?1:-1,f&&(b*=-1),v=p,y=d*b,x=0,f||90!==Math.abs(M)||(x=-90===M&&\"left\"===k||90===M&&\"right\"===k?N:.5),f){var S=i(M)?+M:0;if(0!==S){var E=s.deg2rad(S);T=Math.abs(Math.sin(E))*N*b,x=0}}w.xFn=function(t){return t.dx+e-(v+t.fontSize*x)*b+T*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*B},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?\"middle\":_?\"end\":\"start\"},w.heightFn=function(e,r,n){return\"right\"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},V.drawTicks=function(t,e,r){r=r||{};var n=e._id+\"tick\",i=r.vals;\"period\"===e.ticklabelmode&&(i=i.slice()).shift();var a=r.layer.selectAll(\"path.\"+n).data(e.ticks?i:[],gt);a.exit().remove(),a.enter().append(\"path\").classed(n,1).classed(\"ticks\",1).classed(\"crisp\",!1!==r.crisp).call(f.stroke,e.tickcolor).style(\"stroke-width\",h.crispRound(t,e.tickwidth,1)+\"px\").attr(\"d\",r.path).style(\"display\",null),Et(e,[D]),a.attr(\"transform\",r.transFn)},V.drawGrid=function(t,e,r){r=r||{};var n=e._id+\"grid\",i=r.vals,a=r.counterAxis;if(!1===e.showgrid)i=[];else if(a&&V.shouldShowZeroLine(t,e,a))for(var o=\"array\"===e.tickmode,s=0;sp||a.leftp||a.top+(e.tickangle?0:t.fontSize/4)e[\"_visibleLabelMin_\"+r._id]?l.style(\"display\",\"none\"):\"tick\"!==t.K||i||l.style(\"display\",null)}))}))}))}))},x(v,m+1?m:g);var b=null;e._selections&&(e._selections[f]=v);var _=[function(){return y.length&&Promise.all(y)}];e.automargin&&a._redrawFromAutoMarginCount&&90===m?(b=90,_.push((function(){x(v,m)}))):_.push((function(){if(x(v,g),p.length&&\"x\"===u&&!i(g)&&(\"log\"!==e.type||\"D\"!==String(e.dtick).charAt(0))){b=0;var t,n=0,a=[];if(v.each((function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),i=yt(this),o=h.bBox(i.node());a.push({top:0,bottom:10,height:10,left:r-o.width/2,right:r+o.width/2+2,width:o.width+2})})),\"boundaries\"!==e.tickson&&!e.showdividers||r.secondary){var o=p.length,l=Math.abs((p[o-1].x-p[0].x)*e._m)/(o-1),c=e.ticklabelposition||\"\",f=function(t){return-1!==c.indexOf(t)},d=f(\"top\"),m=f(\"left\"),y=f(\"right\"),_=f(\"bottom\")||m||d||y?(e.tickwidth||0)+6:0,w=l<2.5*n||\"multicategory\"===e.type||\"realaxis\"===e._name;for(t=0;t1)for(n=1;n2*o}(i,e))return\"date\";var m=\"strict\"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=f(r),i=0,o=0,s={},u=0;u2*i}(i,m)?\"category\":function(t,e){for(var r=t.length,n=0;n=2){var l,c,u=\"\";if(2===o.length)for(l=0;l<2;l++)if(c=x(o[l])){u=g;break}var f=i(\"pattern\",u);if(f===g)for(l=0;l<2;l++)(c=x(o[l]))&&(e.bounds[l]=o[l]=c-1);if(f)for(l=0;l<2;l++)switch(c=o[l],f){case g:if(!n(c))return void(e.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(e.enabled=!1);e.bounds[l]=o[l]=c;break;case m:if(!n(c))return void(e.enabled=!1);if((c=+c)<0||c>24)return void(e.enabled=!1);e.bounds[l]=o[l]=c}if(!1===r.autorange){var h=r.range;if(h[0]h[1])return void(e.enabled=!1)}else if(o[0]>h[0]&&o[1]n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},r.ref2id=function(t){return!!/^[xyz]/.test(t)&&t.split(\" \")[0]},r.isLinked=function(t,e){return a(e,t._axisMatchGroups)||a(e,t._axisConstraintGroups)}},{\"../../registry\":638,\"./constants\":561}],559:[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;nn?i.substr(n):a.substr(r))+o:i+a+t*e:o}function m(t,e){for(var r=e._size,n=r.h/r.w,i={},a=Object.keys(t),o=0;oc*x)||T)for(r=0;rO&&FP&&(P=F);h/=(P-C)/(2*I),C=l.l2r(C),P=l.l2r(P),l.range=l._input.range=S=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function N(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\",c(r,n)).attr(\"d\",i+\"Z\")}function j(t,e,r){return t.append(\"path\").attr(\"class\",\"zoombox-corners\").style({fill:f.background,stroke:f.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"transform\",c(e,r)).attr(\"d\",\"M0,0Z\")}function U(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\"),V(t,e,i,a)}function V(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 H(t){n.select(t).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}function q(t){I&&t.data&&t._context.showTips&&(i.notifier(i._(t,\"Double-click to zoom back out\"),\"long\"),I=!1)}function G(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,P)/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 Y(t,e,r,n,a){for(var o,s,l,c,u=!1,f={},h={},p=(a||{}).xaHash,d=(a||{}).yaHash,g=0;g=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(H(i),2!==t||vt||qt(),mt)o.indexOf(\"select\")>-1&&S(r,i,J,K,e.id,Pt),o.indexOf(\"event\")>-1&&p.click(i,r,e.id);else if(1===t&&vt){var s=g?O:I,c=\"s\"===g||\"w\"===v?0:1,f=s._name+\".range[\"+c+\"]\",h=function(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return\"date\"===t.type?n:\"log\"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a(\".\"+r+\"g\")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a(\".\"+String(r)+\"g\")(n))}(s,c),d=\"left\",m=\"middle\";if(s.fixedrange)return;g?(m=\"n\"===g?\"top\":\"bottom\",\"right\"===s.side&&(d=\"right\")):\"e\"===v&&(d=\"right\"),i._context.showAxisRangeEntryBoxes&&n.select(bt).call(u.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(h),fill:s.tickfont?s.tickfont.color:\"#444\",horizontalAlign:d,verticalAlign:m}).on(\"edit\",(function(t){var e=s.d2r(t);void 0!==e&&l.call(\"_guiRelayout\",i,f,e)}))}}}function zt(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(tt,pt*e+_t)),i=Math.max(0,Math.min(et,dt*r+wt)),a=Math.abs(n-_t),o=Math.abs(i-wt);function s(){St=\"\",Tt.r=Tt.l,Tt.t=Tt.b,Lt.attr(\"d\",\"M0,0Z\")}if(Tt.l=Math.min(_t,n),Tt.r=Math.max(_t,n),Tt.t=Math.min(wt,i),Tt.b=Math.max(wt,i),rt.isSubplotConstrained)a>P||o>P?(St=\"xy\",a/tt>o/et?(o=a*et/tt,wt>i?Tt.t=wt-o:Tt.b=wt+o):(a=o*tt/et,_t>n?Tt.l=_t-a:Tt.r=_t+a),Lt.attr(\"d\",G(Tt))):s();else if(nt.isSubplotConstrained)if(a>P||o>P){St=\"xy\";var l=Math.min(Tt.l/tt,(et-Tt.b)/et),c=Math.max(Tt.r/tt,(et-Tt.t)/et);Tt.l=l*tt,Tt.r=c*tt,Tt.b=(1-l)*et,Tt.t=(1-c)*et,Lt.attr(\"d\",G(Tt))}else s();else!at||o0){var u;if(nt.isSubplotConstrained||!it&&1===at.length){for(u=0;ug[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s)}return r(\"layer\"),e}},{\"../../lib\":503,\"fast-isnumeric\":190}],573:[function(t,e,r){\"use strict\";var n=t(\"./show_dflt\");e.exports=function(t,e,r,i,a){a||(a={});var o=a.tickSuffixDflt,s=n(t);r(\"tickprefix\")&&r(\"showtickprefix\",s),r(\"ticksuffix\",o)&&r(\"showticksuffix\",s)}},{\"./show_dflt\":577}],574:[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)],t.setScale()}},{\"../../constants/alignment\":471}],575:[function(t,e,r){\"use strict\";var n=t(\"polybooljs\"),i=t(\"../../registry\"),a=t(\"../../components/drawing\").dashStyle,o=t(\"../../components/color\"),s=t(\"../../components/fx\"),l=t(\"../../components/fx/helpers\").makeEventData,c=t(\"../../components/dragelement/helpers\"),u=c.freeMode,f=c.rectMode,h=c.drawMode,p=c.openMode,d=c.selectMode,g=t(\"../../components/shapes/draw_newshape/display_outlines\"),m=t(\"../../components/shapes/draw_newshape/helpers\").handleEllipse,v=t(\"../../components/shapes/draw_newshape/newshapes\"),y=t(\"../../lib\"),x=t(\"../../lib/polygon\"),b=t(\"../../lib/throttle\"),_=t(\"./axis_ids\").getFromId,w=t(\"../../lib/clear_gl_canvases\"),T=t(\"../../plot_api/subroutines\").redrawReglTraces,k=t(\"./constants\"),A=k.MINSELECT,M=x.filter,S=x.tester,E=t(\"./handle_outline\").clearSelect,L=t(\"./helpers\"),C=L.p2r,P=L.axValue,I=L.getTransform;function O(t,e,r,n,i,a,o){var s,l,c,u,f,h,d,m,v,y=e._hoverdata,x=e._fullLayout.clickmode.indexOf(\"event\")>-1,b=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(y)){F(t,e,a);var _=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n0?function(t,e){var r,n,i,a=[];for(i=0;i0&&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;i1)return!1;if((i+=r.selectedpoints.length)>1)return!1}return 1===i}(s)&&(h=j(_))){for(o&&o.remove(),v=0;v=0&&n._fullLayout._deactivateShape(n),h(e)){var a=n._fullLayout._zoomlayer.selectAll(\".select-outline-\"+r.id);if(a&&n._fullLayout._drawing){var o=v(a,t);o&&i.call(\"_guiRelayout\",n,{shapes:o}),n._fullLayout._drawing=!1}}r.selection={},r.selection.selectionDefs=t.selectionDefs=[],r.selection.mergedPolygons=t.mergedPolygons=[]}function N(t,e,r,n){var i,a,o,s=[],l=e.map((function(t){return t._id})),c=r.map((function(t){return t._id}));for(o=0;o0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function U(t,e,r){var n,a,o,s;for(n=0;n=0)L._fullLayout._deactivateShape(L);else if(!_){var r=z.clickmode;b.done(gt).then((function(){if(b.clear(gt),2===t){for(ft.remove(),$=0;$-1&&O(e,L,i.xaxes,i.yaxes,i.subplot,i,ft),\"event\"===r&&L.emit(\"plotly_selected\",void 0);s.click(L,e)})).catch(y.error)}},i.doneFn=function(){dt.remove(),b.done(gt).then((function(){b.clear(gt),i.gd.emit(\"plotly_selected\",et),Q&&i.selectionDefs&&(Q.subtract=ut,i.selectionDefs.push(Q),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,K)),i.doneFnCompleted&&i.doneFnCompleted(mt)})).catch(y.error),_&&B(i)}},clearSelect:E,clearSelectionsCache:B,selectOnClick:O}},{\"../../components/color\":366,\"../../components/dragelement/helpers\":384,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../components/fx/helpers\":402,\"../../components/shapes/draw_newshape/display_outlines\":454,\"../../components/shapes/draw_newshape/helpers\":455,\"../../components/shapes/draw_newshape/newshapes\":456,\"../../lib\":503,\"../../lib/clear_gl_canvases\":487,\"../../lib/polygon\":515,\"../../lib/throttle\":530,\"../../plot_api/subroutines\":544,\"../../registry\":638,\"./axis_ids\":558,\"./constants\":561,\"./handle_outline\":565,\"./helpers\":566,polybooljs:254}],576:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-time-format\").utcFormat,a=t(\"../../lib\"),o=a.numberFormat,s=t(\"fast-isnumeric\"),l=a.cleanNumber,c=a.ms2DateTime,u=a.dateTime2ms,f=a.ensureNumber,h=a.isArrayOrTypedArray,p=t(\"../../constants/numerical\"),d=p.FP_SAFE,g=p.BADNUM,m=p.LOG_CLIP,v=p.ONEWEEK,y=p.ONEDAY,x=p.ONEHOUR,b=p.ONEMIN,_=p.ONESEC,w=t(\"./axis_ids\"),T=t(\"./constants\"),k=T.HOUR_PATTERN,A=T.WEEKDAY_PATTERN;function M(t){return Math.pow(10,t)}function S(t){return null!=t}e.exports=function(t,e){e=e||{};var r=t._id||\"x\",p=r.charAt(0);function E(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*m*Math.abs(n-i))}return g}function L(e,r,n,i){if((i||{}).msUTC&&s(e))return+e;var o=u(e,n||t.calendar);if(o===g){if(!s(e))return g;e=+e;var l=Math.floor(10*a.mod(e+.05,1)),c=Math.round(e-l/10);o=u(new Date(c))+l/10}return o}function C(e,r,n){return c(e,r,n||t.calendar)}function P(e){return t._categories[Math.round(e)]}function I(e){if(S(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push(\"number\"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return g}function O(e){if(t._categoriesMap)return t._categoriesMap[e]}function z(t){var e=O(t);return void 0!==e?e:s(t)?+t:void 0}function D(t){return s(t)?+t:O(t)}function R(t,e,r){return n.round(r+e*t,2)}function F(t,e,r){return(t-r)/e}var B=function(e){return s(e)?R(e,t._m,t._b):g},N=function(e){return F(e,t._m,t._b)};if(t.rangebreaks){var j=\"y\"===p;B=function(e){if(!s(e))return g;var r=t._rangebreaks.length;if(!r)return R(e,t._m,t._b);var n=j;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,a=i*e,o=0,l=0;lu)){o=a<(c+u)/2?l:l+1;break}o=l+1}var f=t._B[o]||0;return isFinite(f)?R(e,t._m2,f):0},N=function(e){var r=t._rangebreaks.length;if(!r)return F(e,t._m,t._b);for(var n=0,i=0;it._rangebreaks[i].pmax&&(n=i+1);return F(e,t._m2,t._B[n])}}t.c2l=\"log\"===t.type?E:f,t.l2c=\"log\"===t.type?M:f,t.l2p=B,t.p2l=N,t.c2p=\"log\"===t.type?function(t,e){return B(E(t,e))}:B,t.p2c=\"log\"===t.type?function(t){return M(N(t))}:N,-1!==[\"linear\",\"-\"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=f,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=N,t.cleanPos=f):\"log\"===t.type?(t.d2r=t.d2l=function(t,e){return E(l(t),e)},t.r2d=t.r2c=function(t){return M(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=f,t.c2r=E,t.l2d=M,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return M(N(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=N,t.cleanPos=f):\"date\"===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=L,t.c2d=t.c2r=t.l2d=t.l2r=C,t.d2p=t.r2p=function(e,r,n){return t.l2p(L(e,0,n))},t.p2d=t.p2r=function(t,e,r){return C(N(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,g,t.calendar)}):\"category\"===t.type?(t.d2c=t.d2l=I,t.r2d=t.c2d=t.l2d=P,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=D(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=f,t.r2l=D,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return\"string\"==typeof t&&\"\"!==t?t:f(t)}):\"multicategory\"===t.type&&(t.r2d=t.c2d=t.l2d=P,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=z(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=O,t.l2r=t.c2r=f,t.r2l=z,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return Array.isArray(t)||\"string\"==typeof t&&\"\"!==t?t:f(t)},t.setupMultiCategory=function(n){var i,o,s=t._traceIndices,l=t._matchGroup;if(l&&0===t._categories.length)for(var c in l)if(c!==r){var u=e[w.id2name(c)];s=s.concat(u._traceIndices)}var f=[[0,{}],[0,{}]],d=[];for(i=0;id&&(o[n]=d),o[0]===o[1]){var c=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=c,o[1]+=c}}else a.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=w.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?\"_r\":\"range\",o=t.calendar;t.cleanRange(a);var s,l,c=t.r2l(t[a][0],o),u=t.r2l(t[a][1],o),f=\"y\"===p;if((f?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks)&&(t._rangebreaks=t.locateBreaks(Math.min(c,u),Math.max(c,u)),t._rangebreaks.length)){for(s=0;su&&(h=!h),h&&t._rangebreaks.reverse();var d=h?-1:1;for(t._m2=d*t._length/(Math.abs(u-c)-t._lBreaks),t._B.push(-t._m2*(f?u:c)),s=0;si&&(i+=7,oi&&(i+=24,o=n&&o=n&&e=s.min&&(ts.max&&(s.max=n),i=!1)}i&&c.push({min:t,max:n})}};for(n=0;nr.duration?(!function(){for(var r={},n=0;n rect\").call(o.setTranslate,0,0).call(o.setScale,1,1),t.plot.call(o.setTranslate,e._offset,r._offset).call(o.setScale,1,1);var n=t.plot.selectAll(\".scatterlayer .trace\");n.selectAll(\".point\").call(o.setPointGroupScale,1,1),n.selectAll(\".textpoint\").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,t)}function m(e,r){var n=e.plotinfo,i=n.xaxis,l=n.yaxis,c=i._length,u=l._length,f=!!e.xr1,h=!!e.yr1,p=[];if(f){var d=a.simpleMap(e.xr0,i.r2l),g=a.simpleMap(e.xr1,i.r2l),m=d[1]-d[0],v=g[1]-g[0];p[0]=(d[0]*(1-r)+r*g[0]-d[0])/(d[1]-d[0])*c,p[2]=c*(1-r+r*v/m),i.range[0]=i.l2r(d[0]*(1-r)+r*g[0]),i.range[1]=i.l2r(d[1]*(1-r)+r*g[1])}else p[0]=0,p[2]=c;if(h){var y=a.simpleMap(e.yr0,l.r2l),x=a.simpleMap(e.yr1,l.r2l),b=y[1]-y[0],_=x[1]-x[0];p[1]=(y[1]*(1-r)+r*x[1]-y[1])/(y[0]-y[1])*u,p[3]=u*(1-r+r*_/b),l.range[0]=i.l2r(y[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(y[1]*(1-r)+r*x[1])}else p[1]=0,p[3]=u;s.drawOne(t,i,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[i._id,l._id]);var w=f?c/p[2]:1,T=h?u/p[3]:1,k=f?p[0]:0,A=h?p[1]:0,M=f?p[0]/p[2]*c:0,S=h?p[1]/p[3]*u:0,E=i._offset-M,L=l._offset-S;n.clipRect.call(o.setTranslate,k,A).call(o.setScale,1/w,1/T),n.plot.call(o.setTranslate,E,L).call(o.setScale,w,T),o.setPointGroupScale(n.zoomScalePts,1/w,1/T),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}s.redrawComponents(t)}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../registry\":638,\"./axes\":554,\"@plotly/d3\":58}],582:[function(t,e,r){\"use strict\";var n=t(\"../../registry\").traceIs,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(t,\"box-violin\"),o=n(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(\"autotypenumbers\",s.autotypenumbersDflt),\"-\"===r(\"type\",(s.splomStash||{}).type)&&(!function(t,e){if(\"-\"!==t.type)return;var r,s=t._id,l=s.charAt(0);-1!==s.indexOf(\"scene\")&&(s=l);var c=function(t,e,r){for(var n=0;n0&&(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,s,l);if(!c)return;if(\"histogram\"===c.type&&l==={v:\"y\",h:\"x\"}[c.orientation||\"v\"])return void(t.type=\"linear\");var u=l+\"calendar\",f=c[u],h={noMultiCategory:!n(c,\"cartesian\")||n(c,\"noMultiCategory\")};\"box\"===c.type&&c._hasPreCompStats&&l==={h:\"x\",v:\"y\"}[c.orientation||\"v\"]&&(h.noMultiCategory=!0);if(h.autotypenumbers=t.autotypenumbers,o(c,l)){var p=a(c),d=[];for(r=0;r0?\".\":\"\")+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;f0&&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]]]}}e.exports=function(t){return new M(t)},S.plot=function(t,e,r){var n=this,i=e[this.id],a=[],o=!1;for(var s in w.layerNameToAdjective)if(\"frame\"!==s&&i[\"show\"+s]){o=!0;break}for(var l=0;l0&&a._module.calcGeoJSON(i,e)}if(!this.updateProjection(t,e)){this.viewInitial&&this.scope===r.scope||this.saveViewInitial(r),this.scope=r.scope,this.updateBaseLayers(e,r),this.updateDims(e,r),this.updateFx(e,r),d.generalUpdatePerTraceModule(this.graphDiv,this,t,r);var o=this.layers.frontplot.select(\".scatterlayer\");this.dataPoints.point=o.selectAll(\".point\"),this.dataPoints.text=o.selectAll(\"text\"),this.dataPaths.line=o.selectAll(\".js-line\");var s=this.layers.backplot.select(\".choroplethlayer\");this.dataPaths.choropleth=s.selectAll(\"path\"),this.render()}},S.updateProjection=function(t,e){var r=this.graphDiv,n=e[this.id],l=e._size,u=n.domain,f=n.projection,h=n.lonaxis,p=n.lataxis,d=h._ax,g=p._ax,v=this.projection=function(t){var e=t.projection,r=e.type,n=w.projNames[r];n=\"geo\"+c.titleCase(n);for(var l=(i[n]||s[n])(),u=t._isSatellite?180*Math.acos(1/e.distance)/Math.PI:t._isClipped?w.lonaxisSpan[r]/2:null,f=[\"center\",\"rotate\",\"parallels\",\"clipExtent\"],h=function(t){return t?l:[]},p=0;pu*Math.PI/180}return!1},l.getPath=function(){return a().projection(l)},l.getBounds=function(t){return l.getPath().bounds(t)},l.precision(w.precision),t._isSatellite&&l.tilt(e.tilt).distance(e.distance);u&&l.clipAngle(u-w.clipPad);return l}(n),y=[[l.l+l.w*u.x[0],l.t+l.h*(1-u.y[1])],[l.l+l.w*u.x[1],l.t+l.h*(1-u.y[0])]],x=n.center||{},b=f.rotation||{},_=h.range||[],T=p.range||[];if(n.fitbounds){d._length=y[1][0]-y[0][0],g._length=y[1][1]-y[0][1],d.range=m(r,d),g.range=m(r,g);var k=(d.range[0]+d.range[1])/2,A=(g.range[0]+g.range[1])/2;if(n._isScoped)x={lon:k,lat:A};else if(n._isClipped){x={lon:k,lat:A},b={lon:k,lat:A,roll:b.roll};var M=f.type,S=w.lonaxisSpan[M]/2||180,L=w.lataxisSpan[M]/2||90;_=[k-S,k+S],T=[A-L,A+L]}else x={lon:k,lat:A},b={lon:k,lat:b.lat,roll:b.roll}}v.center([x.lon-b.lon,x.lat-b.lat]).rotate([-b.lon,-b.lat,b.roll]).parallels(f.parallels);var C=E(_,T);v.fitExtent(y,C);var P=this.bounds=v.getBounds(C),I=this.fitScale=v.scale(),O=v.translate();if(n.fitbounds){var z=v.getBounds(E(d.range,g.range)),D=Math.min((P[1][0]-P[0][0])/(z[1][0]-z[0][0]),(P[1][1]-P[0][1])/(z[1][1]-z[0][1]));isFinite(D)?v.scale(D*I):c.warn(\"Something went wrong during\"+this.id+\"fitbounds computations.\")}else v.scale(f.scale*I);var R=this.midPt=[(P[0][0]+P[1][0])/2,(P[0][1]+P[1][1])/2];if(v.translate([O[0]+(R[0]-O[0]),O[1]+(R[1]-O[1])]).clipExtent(P),n._isAlbersUsa){var F=v([x.lon,x.lat]),B=v.translate();v.translate([B[0]-(F[0]-B[0]),B[1]-(F[1]-B[1])])}},S.updateBaseLayers=function(t,e){var r=this,i=r.topojson,a=r.layers,o=r.basePaths;function s(t){return\"lonaxis\"===t||\"lataxis\"===t}function l(t){return Boolean(w.lineLayers[t])}function c(t){return Boolean(w.fillLayers[t])}var u=(this.hasChoropleth?w.layersForChoropleth:w.layers).filter((function(t){return l(t)||c(t)?e[\"show\"+t]:!s(t)||e[t].showgrid})),p=r.framework.selectAll(\".layer\").data(u,String);p.exit().each((function(t){delete a[t],delete o[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\"):s(t)?o[t]=e.append(\"path\").style(\"fill\",\"none\"):\"backplot\"===t?e.append(\"g\").classed(\"choroplethlayer\",!0):\"frontplot\"===t?e.append(\"g\").classed(\"scatterlayer\",!0):l(t)?o[t]=e.append(\"path\").style(\"fill\",\"none\").style(\"stroke-miterlimit\",2):c(t)&&(o[t]=e.append(\"path\").style(\"stroke\",\"none\"))})),p.order(),p.each((function(r){var n=o[r],a=w.layerNameToAdjective[r];\"frame\"===r?n.datum(w.sphereSVG):l(r)||c(r)?n.datum(A(i,i.objects[r])):s(r)&&n.datum(function(t,e,r){var n,i,a,o=e[t],s=w.scopeDefaults[e.scope];\"lonaxis\"===t?(n=s.lonaxisRange,i=s.lataxisRange,a=function(t,e){return[t,e]}):\"lataxis\"===t&&(n=s.lataxisRange,i=s.lonaxisRange,a=function(t,e){return[e,t]});var l={type:\"linear\",range:[n[0],n[1]-1e-6],tick0:o.tick0,dtick:o.dtick};g.setConvert(l,r);var c=g.calcTicks(l);e.isScoped||\"lonaxis\"!==t||c.pop();for(var u=c.length,f=new Array(u),h=0;h-1&&b(n.event,i,[r.xaxis],[r.yaxis],r.id,f),s.indexOf(\"event\")>-1&&p.click(i,n.event))}))}function h(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},S.makeFramework=function(){var t=this,e=t.graphDiv,r=e._fullLayout,i=\"clip\"+r._uid+t.id;t.clipDef=r._clips.append(\"clipPath\").attr(\"id\",i),t.clipRect=t.clipDef.append(\"rect\"),t.framework=n.select(t.container).append(\"g\").attr(\"class\",\"geo \"+t.id).call(h.setClipUrl,i,e),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\"},g.setConvert(t.mockAxis,r)},S.saveViewInitial=function(t){var e,r=t.center||{},n=t.projection,i=n.rotation||{};this.viewInitial={fitbounds:t.fitbounds,\"projection.scale\":n.scale},e=t._isScoped?{\"center.lon\":r.lon,\"center.lat\":r.lat}:t._isClipped?{\"projection.rotation.lon\":i.lon,\"projection.rotation.lat\":i.lat}:{\"center.lon\":r.lon,\"center.lat\":r.lat,\"projection.rotation.lon\":i.lon},c.extendFlat(this.viewInitial,e)},S.render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?u(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\":366,\"../../components/dragelement\":385,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/geo_location_utils\":496,\"../../lib/topojson_utils\":532,\"../../registry\":638,\"../cartesian/autorange\":553,\"../cartesian/axes\":554,\"../cartesian/select\":575,\"../plots\":619,\"./constants\":587,\"./zoom\":592,\"@plotly/d3\":58,\"d3-geo\":114,\"d3-geo-projection\":113,\"topojson-client\":315}],589:[function(t,e,r){\"use strict\";var n=t(\"../../plots/get_data\").getSubplotCalcData,i=t(\"../../lib\").counterRegex,a=t(\"./geo\"),o=\"geo\",s=i(o),l={};l.geo={valType:\"subplotid\",dflt:o,editType:\"calc\"},e.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:t(\"./layout_attributes\"),supplyLayoutDefaults:t(\"./layout_defaults\"),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots.geo,s=0;s0&&P<0&&(P+=360);var I,O,z,D=(C+P)/2;if(!p){var R=d?f.projRotate:[D,0,0];I=r(\"projection.rotation.lon\",R[0]),r(\"projection.rotation.lat\",R[1]),r(\"projection.rotation.roll\",R[2]),r(\"showcoastlines\",!d&&x)&&(r(\"coastlinecolor\"),r(\"coastlinewidth\")),r(\"showocean\",!!x&&void 0)&&r(\"oceancolor\")}(p?(O=-96.6,z=38.7):(O=d?D:I,z=(L[0]+L[1])/2),r(\"center.lon\",O),r(\"center.lat\",z),g&&(r(\"projection.tilt\"),r(\"projection.distance\")),m)&&r(\"projection.parallels\",f.projParallels||[0,60]);r(\"projection.scale\"),r(\"showland\",!!x&&void 0)&&r(\"landcolor\"),r(\"showlakes\",!!x&&void 0)&&r(\"lakecolor\"),r(\"showrivers\",!!x&&void 0)&&(r(\"rivercolor\"),r(\"riverwidth\")),r(\"showcountries\",d&&\"usa\"!==u&&x)&&(r(\"countrycolor\"),r(\"countrywidth\")),(\"usa\"===u||\"north america\"===u&&50===c)&&(r(\"showsubunits\",x),r(\"subunitcolor\"),r(\"subunitwidth\")),d||r(\"showframe\",x)&&(r(\"framecolor\"),r(\"framewidth\")),r(\"bgcolor\"),r(\"fitbounds\")&&(delete e.projection.scale,d?(delete e.center.lon,delete e.center.lat):v?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}e.exports=function(t,e,r){i(t,e,r,{type:\"geo\",attributes:s,handleDefaults:c,fullData:r,partition:\"y\"})}},{\"../../lib\":503,\"../get_data\":593,\"../subplot_defaults\":632,\"./constants\":587,\"./layout_attributes\":590}],592:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../registry\"),o=Math.PI/180,s=180/Math.PI,l={cursor:\"pointer\"},c={cursor:\"auto\"};function u(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function f(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],c=o._fullLayout,u=c[n],f={},h={};function p(t,e){f[n+\".\"+t]=i.nestedProperty(l,t).get(),a.call(\"_storeDirectGUIEdit\",s,c._preGUI,f);var r=i.nestedProperty(u,t);r.get()!==e&&(r.set(e),i.nestedProperty(l,t).set(e),h[n+\".\"+t]=e)}r(p),p(\"projection.scale\",e.scale()/t.fitScale),p(\"fitbounds\",!1),o.emit(\"plotly_relayout\",h)}function h(t,e){var r=u(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(l)})).on(\"zoom\",(function(){e.scale(n.event.scale).translate(n.event.translate),t.render();var r=e.invert(t.midPt);t.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":e.scale()/t.fitScale,\"geo.center.lon\":r[0],\"geo.center.lat\":r[1]})})).on(\"zoomend\",(function(){n.select(this).style(c),f(t,e,i)})),r}function p(t,e){var r,i,a,o,s,h,p,d,g,m=u(0,e);function v(t){return e.invert(t)}function y(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 m.on(\"zoomstart\",(function(){n.select(this).style(l),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,s=v(r)})).on(\"zoom\",(function(){if(h=n.mouse(this),function(t){var r=v(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>2||Math.abs(n[1]-t[1])>2}(r))return m.scale(e.scale()),void m.translate(e.translate());e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),s?v(h)&&(d=v(h),p=[o[0]+(d[0]-s[0]),i[1],i[2]],e.rotate(p),o=p):s=v(r=h),g=!0,t.render();var l=e.rotate(),c=e.invert(t.midPt);t.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":e.scale()/t.fitScale,\"geo.center.lon\":c[0],\"geo.center.lat\":c[1],\"geo.projection.rotation.lon\":-l[0]})})).on(\"zoomend\",(function(){n.select(this).style(c),g&&f(t,e,y)})),m}function d(t,e){var r,i={r:e.rotate(),k:e.scale()},a=u(0,e),o=function(t){var e=0,r=arguments.length,i=[];for(;++ed?(a=(f>0?90:-90)-p,i=0):(a=Math.asin(f/d)*s-p,i=Math.sqrt(d*d-f*f));var g=180-a-2*p,m=(Math.atan2(h,u)-Math.atan2(c,i))*s,v=(Math.atan2(h,u)-Math.atan2(c,-i))*s;return b(r[0],r[1],a,m)<=b(r[0],r[1],g,v)?[a,m,r[2]]:[g,v,r[2]]}function b(t,e,r,n){var i=_(r-t),a=_(n-e);return Math.sqrt(i*i+a*a)}function _(t){return(t%360+540)%360-180}function w(t,e,r){var n=r*o,i=t.slice(),a=0===e?1:0,s=2===e?1:2,l=Math.cos(n),c=Math.sin(n);return i[a]=t[a]*l-t[s]*c,i[s]=t[s]*l+t[a]*c,i}function T(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*s,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*s]}function k(t,e){for(var r=0,n=0,i=t.length;nMath.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(a)*_*(s>=0?1:-1),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[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&&(m(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&&(m(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).999&&(g=\"turntable\"):g=\"turntable\")}else g=\"turntable\";r(\"dragmode\",g),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:u,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{\"../../../components/color\":366,\"../../../lib\":503,\"../../../registry\":638,\"../../get_data\":593,\"../../subplot_defaults\":632,\"./axis_defaults\":601,\"./layout_attributes\":604}],604:[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),{}),projection:{type:{valType:\"enumerated\",values:[\"perspective\",\"orthographic\"],dflt:\"perspective\",editType:\"calc\"},editType:\"calc\"},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],editType:\"plot\"},hovermode:{valType:\"enumerated\",values:[\"closest\",!1],dflt:\"closest\",editType:\"modebar\"},uirevision:{valType:\"any\",editType:\"none\"},editType:\"plot\",_deprecated:{cameraposition:{valType:\"info_array\",editType:\"camera\"}}}},{\"../../../lib\":503,\"../../../lib/extend\":493,\"../../domain\":584,\"./axis_attributes\":600}],605:[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\":528}],606:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[a[c]];if(u._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/t.dataScale[c],Math.abs(u._length)===1/0||isNaN(u._length))l[c]=[];else{u._input_range=u.range.slice(),u.range[0]=r[c].lo/t.dataScale[c],u.range[1]=r[c].hi/t.dataScale[c],u._m=1/(t.dataScale[c]*r[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var f=u.tickmode;if(\"auto\"===u.tickmode){u.tickmode=\"linear\";var h=u.nticks||i.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/h)}for(var p=n.calcTicks(u,{msUTC:!0}),d=0;d/g,\" \"));l[c]=p,u.tickmode=f}}e.ticks=l;for(c=0;c<3;++c){o[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]);for(d=0;d<2;++d)e.bounds[d][c]=t.glplot.bounds[d][c]}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;ar.deltaY?1.1:1/1.1,a=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(t)}}),!!c&&{passive:!1}),t.glplot.canvas.addEventListener(\"mousemove\",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit(\"plotly_relayouting\",e)}})),t.staticMode||t.glplot.canvas.addEventListener(\"webglcontextlost\",(function(r){e&&e.emit&&e.emit(\"plotly_webglcontextlost\",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},w.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,\"viewBox\",\"0 0 \"+s+\" \"+l),n.setAttributeNS(null,\"width\",s),n.setAttributeNS(null,\"height\",l),b(e),e.glplot.axes.update(e.axesOptions);for(var c=Object.keys(e.traces),u=null,h=e.glplot.selection,g=0;g\")):\"isosurface\"===t.type||\"volume\"===t.type?(T.valueLabel=p.hoverLabelText(e._mockAxis,e._mockAxis.d2l(h.traceCoordinate[3]),t.valuehoverformat),S.push(\"value: \"+T.valueLabel),h.textLabel&&S.push(h.textLabel),x=S.join(\"
\")):x=h.textLabel;var E={x:h.traceCoordinate[0],y:h.traceCoordinate[1],z:h.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:w};d.appendArrayPointValue(E,_,w),t._module.eventData&&(E=_._module.eventData(E,h,_,{},w));var L={points:[E]};if(e.fullSceneLayout.hovermode){var C=[];d.loneHover({trace:_,x:(.5+.5*y[0]/y[3])*s,y:(.5-.5*y[1]/y[3])*l,xLabel:T.xLabel,yLabel:T.yLabel,zLabel:T.zLabel,text:x,name:u.name,color:d.castHoverOption(_,w,\"bgcolor\")||u.color,borderColor:d.castHoverOption(_,w,\"bordercolor\"),fontFamily:d.castHoverOption(_,w,\"font.family\"),fontSize:d.castHoverOption(_,w,\"font.size\"),fontColor:d.castHoverOption(_,w,\"font.color\"),nameLength:d.castHoverOption(_,w,\"namelength\"),textAlign:d.castHoverOption(_,w,\"align\"),hovertemplate:f.castOption(_,w,\"hovertemplate\"),hovertemplateLabels:f.extendFlat({},E,T),eventData:[E]},{container:n,gd:r,inOut_bbox:C}),E.bbox=C[0]}h.buttons&&h.distance<5?r.emit(\"plotly_click\",L):r.emit(\"plotly_hover\",L),this.oldEventData=L}else d.loneUnhover(n),this.oldEventData&&r.emit(\"plotly_unhover\",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)},w.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):f.error(\"Catastrophic and unrecoverable WebGL error. Context lost.\")};requestAnimationFrame(e)};var k=[\"xaxis\",\"yaxis\",\"zaxis\"];function A(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var a=k[i],o=a.charAt(0),s=n[a],l=e[o],c=e[o+\"calendar\"],u=e[\"_\"+o+\"length\"];if(f.isArrayOrTypedArray(l))for(var h,p=0;p<(u||l.length);p++)if(f.isArrayOrTypedArray(l[p]))for(var d=0;dm[1][a])m[0][a]=-1,m[1][a]=1;else{var L=m[1][a]-m[0][a];m[0][a]-=L/32,m[1][a]+=L/32}if(\"reversed\"===s.autorange){var C=m[0][a];m[0][a]=m[1][a],m[1][a]=C}}else{var P=s.range;m[0][a]=s.r2l(P[0]),m[1][a]=s.r2l(P[1])}m[0][a]===m[1][a]&&(m[0][a]-=1,m[1][a]+=1),v[a]=m[1][a]-m[0][a],this.glplot.setBounds(a,{min:m[0][a]*h[a],max:m[1][a]*h[a]})}var I=c.aspectmode;if(\"cube\"===I)d=[1,1,1];else if(\"manual\"===I){var O=c.aspectratio;d=[O.x,O.y,O.z]}else{if(\"auto\"!==I&&\"data\"!==I)throw new Error(\"scene.js aspectRatio was not one of the enumerated types\");var z=[1,1,1];for(a=0;a<3;++a){var D=y[l=(s=c[k[a]]).type];z[a]=Math.pow(D.acc,1/D.count)/h[a]}d=\"data\"===I||Math.max.apply(null,z)/Math.min.apply(null,z)<=4?z:[1,1,1]}c.aspectratio.x=u.aspectratio.x=d[0],c.aspectratio.y=u.aspectratio.y=d[1],c.aspectratio.z=u.aspectratio.z=d[2],this.glplot.setAspectratio(c.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),this.viewInitial.aspectmode||(this.viewInitial.aspectmode=c.aspectmode);var R=c.domain||null,F=e._size||null;if(R&&F){var B=this.container.style;B.position=\"absolute\",B.left=F.l+R.x[0]*F.w+\"px\",B.top=F.t+(1-R.y[1])*F.h+\"px\",B.width=F.w*(R.x[1]-R.x[0])+\"px\",B.height=F.h*(R.y[1]-R.y[0])+\"px\"}this.glplot.redraw()}},w.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener(\"wheel\",this.camera.wheelListener),this.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},w.getCamera=function(){var t;return this.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(t=this.camera).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]},projection:{type:!0===t._ortho?\"orthographic\":\"perspective\"}}},w.setViewport=function(t){var e,r=t.camera;this.camera.lookAt.apply(this,[[(e=r).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]]),this.glplot.setAspectratio(t.aspectratio),\"orthographic\"===r.projection.type!==this.camera._ortho&&(this.glplot.redraw(),this.glplot.clearRGBA(),this.glplot.dispose(),this.initializeGLPlot())},w.isCameraChanged=function(t){var e=this.getCamera(),r=f.nestedProperty(t,this.id+\".camera\").get();function n(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]]}var i=!1;if(void 0===r)i=!0;else{for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!n(e,r,a,o)){i=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(i=!0)}return i},w.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=f.nestedProperty(t,this.id+\".aspectratio\").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},w.saveLayout=function(t){var e,r,n,i,a,o,s=this.fullLayout,l=this.isCameraChanged(t),c=this.isAspectChanged(t),h=l||c;if(h){var p={};if(l&&(e=this.getCamera(),n=(r=f.nestedProperty(t,this.id+\".camera\")).get(),p[this.id+\".camera\"]=n),c&&(i=this.glplot.getAspectratio(),o=(a=f.nestedProperty(t,this.id+\".aspectratio\")).get(),p[this.id+\".aspectratio\"]=o),u.call(\"_storeDirectGUIEdit\",t,s._preGUI,p),l)r.set(e),f.nestedProperty(s,this.id+\".camera\").set(e);if(c)a.set(i),f.nestedProperty(s,this.id+\".aspectratio\").set(i),this.glplot.redraw()}return h},w.updateFx=function(t,e){var r=this.camera;if(r)if(\"orbit\"===t)r.mode=\"orbit\",r.keyBindingMode=\"rotate\";else if(\"turntable\"===t){r.up=[0,0,1],r.mode=\"turntable\",r.keyBindingMode=\"rotate\";var n=this.graphDiv,i=n._fullLayout,a=this.fullSceneLayout.camera,o=a.up.x,s=a.up.y,l=a.up.z;if(l/Math.sqrt(o*o+s*s+l*l)<.999){var c=this.id+\".camera.up\",h={x:0,y:0,z:1},p={};p[c]=h;var d=n.layout;u.call(\"_storeDirectGUIEdit\",d,i._preGUI,p),a.up=h,f.nestedProperty(d,c).set(h)}}else r.keyBindingMode=t;this.fullSceneLayout.hovermode=e},w.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),function(t,e,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)t[a+l]=Math.min(s*t[a+l],255)}}(a,r,i);var o=document.createElement(\"canvas\");o.width=r,o.height=i;var s,l=o.getContext(\"2d\"),c=l.createImageData(r,i);switch(c.data.set(a),l.putImageData(c,0,0),t){case\"jpeg\":s=o.toDataURL(\"image/jpeg\");break;case\"webp\":s=o.toDataURL(\"image/webp\");break;default:s=o.toDataURL(\"image/png\")}return this.staticMode&&this.container.removeChild(n),s},w.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[k[t]];p.setConvert(e,this.fullLayout),e.setScale=f.noop}},w.make4thDimension=function(){var t=this.graphDiv._fullLayout;this._mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},p.setConvert(this._mockAxis,t)},e.exports=_},{\"../../../stackgl_modules\":1120,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/show_no_webgl_msg\":525,\"../../lib/str2rgbarray\":528,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"./layout/convert\":602,\"./layout/spikes\":605,\"./layout/tick_marks\":606,\"./project\":607,\"has-passive-events\":229,\"webgl-context\":331}],609:[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;aOpenStreetMap
contributors',a=['\\xa9 Carto',i].join(\" \"),o=['Map tiles by Stamen Design','under CC BY 3.0',\"|\",'Data by OpenStreetMap contributors','under ODbL'].join(\" \"),s={\"open-street-map\":{id:\"osm\",version:8,sources:{\"plotly-osm-tiles\":{type:\"raster\",attribution:i,tiles:[\"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png\",\"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-osm-tiles\",type:\"raster\",source:\"plotly-osm-tiles\",minzoom:0,maxzoom:22}]},\"white-bg\":{id:\"white-bg\",version:8,sources:{},layers:[{id:\"white-bg\",type:\"background\",paint:{\"background-color\":\"#FFFFFF\"},minzoom:0,maxzoom:22}]},\"carto-positron\":{id:\"carto-positron\",version:8,sources:{\"plotly-carto-positron\":{type:\"raster\",attribution:a,tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-positron\",type:\"raster\",source:\"plotly-carto-positron\",minzoom:0,maxzoom:22}]},\"carto-darkmatter\":{id:\"carto-darkmatter\",version:8,sources:{\"plotly-carto-darkmatter\":{type:\"raster\",attribution:a,tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-darkmatter\",type:\"raster\",source:\"plotly-carto-darkmatter\",minzoom:0,maxzoom:22}]},\"stamen-terrain\":{id:\"stamen-terrain\",version:8,sources:{\"plotly-stamen-terrain\":{type:\"raster\",attribution:o,tiles:[\"https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-terrain\",type:\"raster\",source:\"plotly-stamen-terrain\",minzoom:0,maxzoom:22}]},\"stamen-toner\":{id:\"stamen-toner\",version:8,sources:{\"plotly-stamen-toner\":{type:\"raster\",attribution:o,tiles:[\"https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-toner\",type:\"raster\",source:\"plotly-stamen-toner\",minzoom:0,maxzoom:22}]},\"stamen-watercolor\":{id:\"stamen-watercolor\",version:8,sources:{\"plotly-stamen-watercolor\":{type:\"raster\",attribution:['Map tiles by Stamen Design','under CC BY 3.0',\"|\",'Data by OpenStreetMap contributors','under CC BY SA'].join(\" \"),tiles:[\"https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-watercolor\",type:\"raster\",source:\"plotly-stamen-watercolor\",minzoom:0,maxzoom:22}]}},l=n(s);e.exports={requiredVersion:\"1.10.1\",styleUrlPrefix:\"mapbox://styles/mapbox/\",styleUrlSuffix:\"v9\",styleValuesMapbox:[\"basic\",\"streets\",\"outdoors\",\"light\",\"dark\",\"satellite\",\"satellite-streets\"],styleValueDflt:\"basic\",stylesNonMapbox:s,styleValuesNonMapbox:l,traceLayerPrefix:\"plotly-trace-layer-\",layoutLayerPrefix:\"plotly-layout-layer-\",wrongVersionErrorMsg:[\"Your custom plotly.js bundle is not using the correct mapbox-gl version\",\"Please install mapbox-gl@1.10.1.\"].join(\"\\n\"),noAccessTokenErrorMsg:[\"Missing Mapbox access token.\",\"Mapbox trace type require a Mapbox access token to be registered.\",\"For example:\",\" Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });\",\"More info here: https://www.mapbox.com/help/define-access-token/\"].join(\"\\n\"),missingStyleErrorMsg:[\"No valid mapbox style found, please set `mapbox.style` to one of:\",l.join(\", \"),\"or register a Mapbox access token to use a Mapbox-served style.\"].join(\"\\n\"),multipleTokensErrorMsg:[\"Set multiple mapbox access token across different mapbox subplot,\",\"using first token found as mapbox-gl does not allow multipleaccess tokens on the same page.\"].join(\"\\n\"),mapOnErrorMsg:\"Mapbox error.\",mapboxLogo:{path0:\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\",path1:\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\",path2:\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\",polygon:\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34\"},styleRules:{map:\"overflow:hidden;position:relative;\",\"missing-css\":\"display:none;\",canary:\"background-color:salmon;\",\"ctrl-bottom-left\":\"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;\",\"ctrl-bottom-right\":\"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;\",ctrl:\"clear: both; pointer-events: auto; transform: translate(0, 0);\",\"ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner\":\"display: none;\",\"ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner\":\"display: block; margin-top:2px\",\"ctrl-attrib.mapboxgl-compact:hover\":\"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;\",\"ctrl-attrib.mapboxgl-compact::after\":'content: \"\"; cursor: pointer; position: absolute; background-image: url(\\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"%3E %3Cpath fill=\"%23333333\" fill-rule=\"evenodd\" d=\"M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0\"/%3E %3C/svg%3E\\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',\"ctrl-attrib.mapboxgl-compact\":\"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;\",\"ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; right: 0\",\"ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; left: 0\",\"ctrl-bottom-left .mapboxgl-ctrl\":\"margin: 0 0 10px 10px; float: left;\",\"ctrl-bottom-right .mapboxgl-ctrl\":\"margin: 0 10px 10px 0; float: right;\",\"ctrl-attrib\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a:hover\":\"color: inherit; text-decoration: underline;\",\"ctrl-attrib .mapbox-improve-map\":\"font-weight: bold; margin-left: 2px;\",\"attrib-empty\":\"display: none;\",\"ctrl-logo\":'display:block; width: 21px; height: 21px; background-image: url(\\'data:image/svg+xml;charset=utf-8,%3C?xml version=\"1.0\" encoding=\"utf-8\"?%3E %3Csvg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 21 21\" style=\"enable-background:new 0 0 21 21;\" xml:space=\"preserve\"%3E%3Cg transform=\"translate(0,0.01)\"%3E%3Cpath d=\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3Cpath d=\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpath d=\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpolygon points=\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 \" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3C/g%3E%3C/svg%3E\\')'}}},{\"../../lib/sort_object_keys\":526}],612:[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\":503}],613:[function(t,e,r){\"use strict\";var n=t(\"mapbox-gl/dist/mapbox-gl-unminified\"),i=t(\"../../lib\"),a=i.strTranslate,o=i.strScale,s=t(\"../../plots/get_data\").getSubplotCalcData,l=t(\"../../constants/xmlns_namespaces\"),c=t(\"@plotly/d3\"),u=t(\"../../components/drawing\"),f=t(\"../../lib/svg_text_utils\"),h=t(\"./mapbox\"),p=r.constants=t(\"./constants\");function d(t){return\"string\"==typeof t&&(-1!==p.styleValuesMapbox.indexOf(t)||0===t.indexOf(\"mapbox://\"))}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,a=e._subplots.mapbox;if(n.version!==p.requiredVersion)throw new Error(p.wrongVersionErrorMsg);var o=function(t,e){var r=t._fullLayout;if(\"\"===t._context.mapboxAccessToken)return\"\";for(var n=[],a=[],o=!1,s=!1,l=0;l1&&i.warn(p.multipleTokensErrorMsg),n[0]):(a.length&&i.log([\"Listed mapbox access token(s)\",a.join(\",\"),\"but did not use a Mapbox map style, ignoring token(s).\"].join(\" \")),\"\")}(t,a);n.accessToken=o;for(var l=0;l_/2){var w=v.split(\"|\").join(\"
\");x.text(w).attr(\"data-unformatted\",w).call(f.convertToTspans,t),b=u.bBox(x.node())}x.attr(\"transform\",a(-3,8-b.height)),y.insert(\"rect\",\".static-attribution\").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:\"rgba(255, 255, 255, 0.75)\"});var T=1;b.width+6>_&&(T=_/(b.width+6));var k=[n.l+n.w*h.x[1],n.t+n.h*(1-h.y[0])];y.attr(\"transform\",a(k[0],k[1])+o(T))}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n0){for(var r=0;r0}function u(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,\"line-dasharray\":t.line.dash});break;case\"fill\":n.extendFlat(r,{\"fill-color\":t.color,\"fill-outline-color\":t.fill.outlinecolor,\"fill-opacity\":t.opacity});break;case\"symbol\":var i=t.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(e,{\"icon-image\":i.icon+\"-15\",\"icon-size\":i.iconsize/10,\"text-field\":i.text,\"text-size\":i.textfont.size,\"text-anchor\":o.anchor,\"text-offset\":o.offset,\"symbol-placement\":i.placement}),n.extendFlat(r,{\"icon-color\":t.color,\"text-color\":i.textfont.color,\"text-opacity\":t.opacity});break;case\"raster\":n.extendFlat(r,{\"raster-fade-duration\":0,\"raster-opacity\":t.opacity})}return{layout:e,paint:r}}l.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):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=c(t)},l.needsNewImage=function(t){return this.subplot.map.getSource(this.idSource)&&\"image\"===this.sourceType&&\"image\"===t.sourcetype&&(this.source!==t.source||JSON.stringify(this.coordinates)!==JSON.stringify(t.coordinates))},l.needsNewSource=function(t){return this.sourceType!==t.sourcetype||JSON.stringify(this.source)!==JSON.stringify(t.source)||this.layerType!==t.type},l.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup[\"layout-\"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup[\"layout-\"+this.index]},l.updateImage=function(t){this.subplot.map.getSource(this.idSource).updateImage({url:t.source,coordinates:t.coordinates});var e=this.findFollowingMapboxLayerId(this.lookupBelow());null!==e&&this.subplot.map.moveLayer(this.idLayer,e)},l.updateSource=function(t){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,c(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,a={type:r};\"geojson\"===r?e=\"data\":\"vector\"===r?e=\"string\"==typeof n?\"url\":\"tiles\":\"raster\"===r?(e=\"tiles\",a.tileSize=256):\"image\"===r&&(e=\"url\",a.coordinates=t.coordinates);a[e]=n,t.sourceattribution&&(a.attribution=i(t.sourceattribution));return a}(t);e.addSource(this.idSource,r)}},l.findFollowingMapboxLayerId=function(t){if(\"traces\"===t)for(var e=this.subplot.getMapLayers(),r=0;r1)for(r=0;r-1&&v(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf(\"event\")>-1&&c.click(n,e.originalEvent)}}},_.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,o=t.dragmode;a=f(o)?function(t,r){(t.range={})[e.id]=[c([r.xmin,r.ymin]),c([r.xmax,r.ymax])]}:function(t,r,n){(t.lassoPoints={})[e.id]=n.filtered.map(c)};var s=e.dragOptions;e.dragOptions=i.extendDeep(s||{},{dragmode:t.dragmode,element:e.div,gd:n,plotinfo:{id:e.id,domain:t[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off(\"click\",e.onClickInPanHandler),p(o)||h(o)?(r.dragPan.disable(),r.on(\"zoomstart\",e.clearSelect),e.dragOptions.prepFn=function(t,r,n){d(t,r,n,e.dragOptions,o)},l.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 c(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},_.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])},_.updateLayers=function(t){var e,r=t[this.id].layers,n=this.layerList;if(r.length!==n.length){for(e=0;e=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\"),l=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(){b.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()&&l.text()?\" - \":\"\")}},b.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit(\"plotly_beforeexport\");var 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=b.graphJson(t,!1,\"keepdata\"),i.node().submit(),r.remove(),t.emit(\"plotly_afterexport\"),!1}};var T=[\"days\",\"shortDays\",\"months\",\"shortMonths\",\"periods\",\"dateTime\",\"date\",\"time\",\"decimal\",\"thousands\",\"grouping\",\"currency\"],k=[\"year\",\"month\",\"dayMonth\",\"dayMonthYear\"];function A(t,e){var r=t._context.locale;r||(r=\"en-US\");var n=!1,i={};function a(t){for(var r=!0,a=0;a1&&z.length>1){for(s.getComponentMethod(\"grid\",\"sizeDefaults\")(c,l),o=0;o15&&z.length>15&&0===l.shapes.length&&0===l.images.length,b.linkSubplots(h,l,f,n),b.cleanPlot(h,l,f,n);var N=!(!n._has||!n._has(\"gl2d\")),j=!(!l._has||!l._has(\"gl2d\")),U=!(!n._has||!n._has(\"cartesian\"))||N,V=!(!l._has||!l._has(\"cartesian\"))||j;U&&!V?n._bgLayer.remove():V&&!U&&(l._shouldCreateBgLayer=!0),n._zoomlayer&&!t._dragging&&d({_fullLayout:n}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i0){var f=1-2*s;n=Math.round(f*n),i=Math.round(f*i)}}var h=b.layoutAttributes.width.min,p=b.layoutAttributes.height.min;n1,g=!e.height&&Math.abs(r.height-i)>1;(g||d)&&(d&&(r.width=n),g&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),b.sanitizeMargins(r)},b.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a,o,l=s.componentsRegistry,c=e._basePlotModules,f=s.subplotsRegistry.cartesian;for(i in l)(o=l[i]).includeBasePlot&&o.includeBasePlot(t,e);for(var h in c.length||c.push(f),e._has(\"cartesian\")&&(s.getComponentMethod(\"grid\",\"contentDefaults\")(t,e),f.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(u.subplotSort);for(a=0;a1&&(r.l/=g,r.r/=g)}if(f){var m=(r.t+r.b)/f;m>1&&(r.t/=m,r.b/=m)}var v=void 0!==r.xl?r.xl:r.x,y=void 0!==r.xr?r.xr:r.x,x=void 0!==r.yt?r.yt:r.y,_=void 0!==r.yb?r.yb:r.y;h[e]={l:{val:v,size:r.l+d},r:{val:y,size:r.r+d},b:{val:_,size:r.b+d},t:{val:x,size:r.t+d}},p[e]=1}else delete h[e],delete p[e];if(!n._replotting)return b.doAutoMargin(t)}},b.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,n=e.height;e._size||(e._size={}),C(e);var i=e._size,a=e.margin,l=u.extendFlat({},i),c=a.l,f=a.r,h=a.t,d=a.b,g=e._pushmargin,m=e._pushmarginIds;if(!1!==e.margin.autoexpand){for(var v in g)m[v]||delete g[v];for(var y in g.base={l:{val:0,size:c},r:{val:1,size:f},t:{val:1,size:h},b:{val:0,size:d}},g){var x=g[y].l||{},_=g[y].b||{},w=x.val,T=x.size,k=_.val,A=_.size;for(var M in g){if(o(T)&&g[M].r){var S=g[M].r.val,E=g[M].r.size;if(S>w){var L=(T*S+(E-r)*w)/(S-w),P=(E*(1-w)+(T-r)*(1-S))/(S-w);L+P>c+f&&(c=L,f=P)}}if(o(A)&&g[M].t){var I=g[M].t.val,O=g[M].t.size;if(I>k){var z=(A*I+(O-n)*k)/(I-k),D=(O*(1-k)+(A-n)*(1-I))/(I-k);z+D>d+h&&(d=z,h=D)}}}}}var R=u.constrain(r-a.l-a.r,2,64),F=u.constrain(n-a.t-a.b,2,64),B=Math.max(0,r-R),N=Math.max(0,n-F);if(B){var j=(c+f)/B;j>1&&(c/=j,f/=j)}if(N){var U=(d+h)/N;U>1&&(d/=U,h/=U)}if(i.l=Math.round(c),i.r=Math.round(f),i.t=Math.round(h),i.b=Math.round(d),i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e._replotting&&b.didMarginChange(l,i)){\"_redrawFromAutoMarginCount\"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var V=3*(1+Object.keys(m).length);if(e._redrawFromAutoMarginCount0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return s.call(\"redraw\",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit(\"plotly_transitioninterrupted\",[])}));var a=0,o=0;function l(){return a++,function(){o++,n||o!==a||function(e){if(!t._transitionData)return;(function(t){if(t)for(;t.length;)t.shift()})(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return s.call(\"redraw\",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit(\"plotly_transitioned\",[])})).then(e)}(i)}}r.runFn(l),setTimeout(l())}))}],a=u.syncOrAsync(i,t);return a&&a.then||(a=Promise.resolve()),a.then((function(){return t}))}b.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},b.graphJson=function(t,e,r,n,i,a){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&b.supplyDefaults(t);var o=i?t._fullData:t.data,s=i?t._fullLayout:t.layout,l=(t._transitionData||{})._frames;function c(t,e){if(\"function\"==typeof t)return e?\"_function_\":null;if(u.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(a){if(-1===[\"_\",\"[\"].indexOf(a.charAt(0)))if(\"function\"!=typeof t[a]){if(\"keepdata\"===r){if(\"src\"===a.substr(a.length-3))return}else if(\"keepstream\"===r){if(\"string\"==typeof(n=t[a+\"src\"])&&n.indexOf(\":\")>0&&!u.isPlainObject(t.stream))return}else if(\"keepall\"!==r&&\"string\"==typeof(n=t[a+\"src\"])&&n.indexOf(\":\")>0)return;i[a]=c(t[a],e)}else e&&(i[a]=\"_function\")})),i}return Array.isArray(t)?t.map((function(t){return c(t,e)})):u.isTypedArray(t)?u.simpleMap(t,u.identity):u.isJSDate(t)?u.ms2DateTimeLocal(+t):t}var f={data:(o||[]).map((function(t){var r=c(t);return e&&delete r.fit,r}))};if(!e&&(f.layout=c(s),i)){var h=s._size;f.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return l&&(f.frames=c(l)),a&&(f.config=c(t._context,!0)),\"object\"===n?f:JSON.stringify(f)},b.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r=0;a--)if(s[a].enabled){r._indexToPoints=s[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(t,r))}Array.isArray(o)&&o[0]||(o=[{x:h,y:h}]),o[0].t||(o[0].t={}),o[0].trace=r,d[e]=o}}for(z(o,c,f),i=0;i1e-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;a0?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=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]}(p),b=x[2]-x[0],_=x[3]-x[1],w=h/f,T=Math.abs(_/b);w>T?(d=f,y=(h-(g=f*T))/n.h/2,m=[o[0],o[1]],v=[s[0]+y,s[1]-y]):(g=h,y=(f-(d=h/T))/n.w/2,m=[o[0]+y,o[1]-y],v=[s[0],s[1]]),this.xLength2=d,this.yLength2=g,this.xDomain2=m,this.yDomain2=v;var k,A=this.xOffset2=n.l+n.w*m[0],M=this.yOffset2=n.t+n.h*(1-v[1]),S=this.radius=d/b,E=this.innerRadius=this.getHole(e)*S,L=this.cx=A-S*x[0],C=this.cy=M+S*x[3],P=this.cxx=L-A,I=this.cyy=C-M,O=i.side;\"counterclockwise\"===O?(k=O,O=\"top\"):\"clockwise\"===O&&(k=O,O=\"bottom\"),this.radialAxis=this.mockAxis(t,e,i,{_id:\"x\",side:O,_trueSide:k,domain:[E/n.w,S/n.w]}),this.angularAxis=this.mockAxis(t,e,a,{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:m}),this.yaxis=this.mockCartesianAxis(t,e,{_id:\"y\",domain:v});var z=this.pathSubplot();this.clipPaths.forTraces.select(\"path\").attr(\"d\",z).attr(\"transform\",l(P,I)),r.frontplot.attr(\"transform\",l(A,M)).call(u.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr(\"d\",z).attr(\"transform\",l(L,C)).call(c.fill,e.bgcolor)},N.mockAxis=function(t,e,r,n){var i=o.extendFlat({},r,n);return d(i,e,t),i},N.mockCartesianAxis=function(t,e,r){var n=this,i=n.isSmith,a=r._id,s=o.extendFlat({type:\"linear\"},r);p(s,t);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var t=n.sectorBBox,r=l[a],i=n.radialAxis._rl,o=(i[1]-i[0])/(1-n.getHole(e));s.range=[t[r[0]]*o,t[r[1]]*o]},s.isPtWithinRange=\"x\"!==a||i?function(){return!0}:function(t){return n.isPtInside(t)},s.setRange(),s.setScale(),s},N.doAutoRange=function(t,e){var r=this.gd,n=this.radialAxis,i=this.getRadial(e);g(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\")]},N.updateRadialAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=r.getRadial(e),g=D(r.getSector(e)[0],360),m=r.radialAxis,v=u90&&g<=270&&(m.tickangle=180);var x=y?function(t){var e=O(r,C([t.x,0]));return l(e[0]-f,e[1]-p)}:function(t){return l(m.l2p(t.x)+u,0)},b=y?function(t){return I(r,t.x,-1/0,1/0)}:function(t){return r.pathArc(m.r2p(t.x)+u)},_=j(d);if(r.radialTickLayout!==_&&(i[\"radial-axis\"].selectAll(\".xtick\").remove(),r.radialTickLayout=_),v){m.setScale();var w=0,T=y?(m.tickvals||[]).filter((function(t){return t>=0})).map((function(t){return h.tickText(m,t,!0,!1)})):h.calcTicks(m),k=y?T:h.clipEnds(m,T),A=h.getTickSigns(m)[2];y&&((\"top\"===m.ticks&&\"bottom\"===m.side||\"bottom\"===m.ticks&&\"top\"===m.side)&&(A=-A),\"top\"===m.ticks&&\"top\"===m.side&&(w=-m.ticklen),\"bottom\"===m.ticks&&\"bottom\"===m.side&&(w=m.ticklen)),h.drawTicks(n,m,{vals:T,layer:i[\"radial-axis\"],path:h.makeTickPath(m,0,A),transFn:x,crisp:!1}),h.drawGrid(n,m,{vals:k,layer:i[\"radial-grid\"],path:b,transFn:o.noop,crisp:!1}),h.drawLabels(n,m,{vals:T,layer:i[\"radial-axis\"],transFn:x,labelFns:h.makeLabelFns(m,w)})}var M=r.radialAxisAngle=r.vangles?F(U(R(d.angle),r.vangles)):d.angle,S=l(f,p),E=S+s(-M);V(i[\"radial-axis\"],v&&(d.showticklabels||d.ticks),{transform:E}),V(i[\"radial-grid\"],v&&d.showgrid,{transform:y?\"\":S}),V(i[\"radial-line\"].select(\"line\"),v&&d.showline,{x1:y?-a:u,y1:0,x2:a,y2:0,transform:E}).attr(\"stroke-width\",d.linewidth).call(c.stroke,d.linecolor)},N.updateRadialAxisTitle=function(t,e,r){if(!this.isSmith){var n=this.gd,i=this.radius,a=this.cx,o=this.cy,s=this.getRadial(e),l=this.id+\"title\",c=0;if(s.title){var f=u.bBox(this.layers[\"radial-axis\"].node()).height,h=s.title.font.size,p=s.side;c=\"top\"===p?h:\"counterclockwise\"===p?-(f+.4*h):f+.8*h}var d=void 0!==r?r:this.radialAxisAngle,g=R(d),m=Math.cos(g),v=Math.sin(g),y=a+i/2*m+c*v,b=o-i/2*v+c*m;this.layers[\"radial-axis-title\"]=x.draw(n,l,{propContainer:s,propName:this.id+\".radialaxis.title\",placeholder:z(n,\"Click to enter radial axis title\"),attributes:{x:y,y:b,\"text-anchor\":\"middle\"},transform:{rotate:-d}})}},N.updateAngularAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=r.getAngular(e),g=r.angularAxis,m=r.isSmith;m||(r.fillViewInitialKey(\"angularaxis.rotation\",d.rotation),g.setGeometry(),g.setScale());var v=m?function(t){var e=O(r,C([0,t.x]));return Math.atan2(e[0]-f,e[1]-p)-Math.PI/2}:function(t){return g.t2g(t.x)};\"linear\"===g.type&&\"radians\"===g.thetaunit&&(g.tick0=F(g.tick0),g.dtick=F(g.dtick));var y=function(t){return l(f+a*Math.cos(t),p-a*Math.sin(t))},x=m?function(t){var e=O(r,C([0,t.x]));return l(e[0],e[1])}:function(t){return y(v(t))},b=m?function(t){var e=O(r,C([0,t.x])),n=Math.atan2(e[0]-f,e[1]-p)-Math.PI/2;return l(e[0],e[1])+s(-F(n))}:function(t){var e=v(t);return y(e)+s(-F(e))},_=m?function(t){return P(r,t.x,0,1/0)}:function(t){var e=v(t),r=Math.cos(e),n=Math.sin(e);return\"M\"+[f+u*r,p-u*n]+\"L\"+[f+a*r,p-a*n]},w=h.makeLabelFns(g,0).labelStandoff,T={xFn:function(t){var e=v(t);return Math.cos(e)*w},yFn:function(t){var e=v(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(w+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*M)},anchorFn:function(t){var e=v(t),r=Math.cos(e);return Math.abs(r)<.1?\"middle\":r>0?\"start\":\"end\"},heightFn:function(t,e,r){var n=v(t);return-.5*(1+Math.sin(n))*r}},k=j(d);r.angularTickLayout!==k&&(i[\"angular-axis\"].selectAll(\".\"+g._id+\"tick\").remove(),r.angularTickLayout=k);var A,S=m?[1/0].concat(g.tickvals||[]).map((function(t){return h.tickText(g,t,!0,!1)})):h.calcTicks(g);if(m&&(S[0].text=\"\\u221e\",S[0].fontSize*=1.75),\"linear\"===e.gridshape?(A=S.map(v),o.angleDelta(A[0],A[1])<0&&(A=A.slice().reverse())):A=null,r.vangles=A,\"category\"===g.type&&(S=S.filter((function(t){return o.isAngleInsideSector(v(t),r.sectorInRad)}))),g.visible){var E=\"inside\"===g.ticks?-1:1,L=(g.linewidth||1)/2;h.drawTicks(n,g,{vals:S,layer:i[\"angular-axis\"],path:\"M\"+E*L+\",0h\"+E*g.ticklen,transFn:b,crisp:!1}),h.drawGrid(n,g,{vals:S,layer:i[\"angular-grid\"],path:_,transFn:o.noop,crisp:!1}),h.drawLabels(n,g,{vals:S,layer:i[\"angular-axis\"],repositionOnUpdate:!0,transFn:x,labelFns:T})}V(i[\"angular-line\"].select(\"path\"),d.showline,{d:r.pathSubplot(),transform:l(f,p)}).attr(\"stroke-width\",d.linewidth).call(c.stroke,d.linecolor)},N.updateFx=function(t,e){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1)),this.updateHoverAndMainDrag(t))},N.updateHoverAndMainDrag=function(t){var e,r,s=this,c=s.isSmith,u=s.gd,f=s.layers,h=t._zoomlayer,p=S.MINZOOM,d=S.OFFEDGE,g=s.radius,x=s.innerRadius,T=s.cx,k=s.cy,A=s.cxx,M=s.cyy,L=s.sectorInRad,C=s.vangles,P=s.radialAxis,I=E.clampTiny,O=E.findXYatLength,z=E.findEnclosingVertexAngles,D=S.cornerHalfWidth,R=S.cornerLen/2,F=m.makeDragger(f,\"path\",\"maindrag\",\"crosshair\");n.select(F).attr(\"d\",s.pathSubplot()).attr(\"transform\",l(T,k)),F.onmousemove=function(t){y.hover(u,t,s.id),u._fullLayout._lasthover=F,u._fullLayout._hoversubplot=s.id},F.onmouseout=function(t){u._dragging||v.unhover(u,t)};var B,N,j,U,V,H,q,G,Y,W={element:F,gd:u,subplot:s.id,plotinfo:{id:s.id,xaxis:s.xaxis,yaxis:s.yaxis},xaxes:[s.xaxis],yaxes:[s.yaxis]};function X(t,e){return Math.sqrt(t*t+e*e)}function Z(t,e){return X(t-A,e-M)}function J(t,e){return Math.atan2(M-e,t-A)}function K(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function Q(t,e){if(0===t)return s.pathSector(2*D);var r=R/t,n=e-r,i=e+r,a=Math.max(0,Math.min(t,g)),o=a-D,l=a+D;return\"M\"+K(o,n)+\"A\"+[o,o]+\" 0,0,0 \"+K(o,i)+\"L\"+K(l,i)+\"A\"+[l,l]+\" 0,0,1 \"+K(l,n)+\"Z\"}function $(t,e,r){if(0===t)return s.pathSector(2*D);var n,i,a=K(t,e),o=K(t,r),l=I((a[0]+o[0])/2),c=I((a[1]+o[1])/2);if(l&&c){var u=c/l,f=-1/u,h=O(D,u,l,c);n=O(R,f,h[0][0],h[0][1]),i=O(R,f,h[1][0],h[1][1])}else{var p,d;c?(p=R,d=D):(p=D,d=R),n=[[l-p,c-d],[l+p,c-d]],i=[[l-p,c+d],[l+p,c+d]]}return\"M\"+n.join(\"L\")+\"L\"+i.reverse().join(\"L\")+\"Z\"}function tt(t,e){return e=Math.max(Math.min(e,g),x),tp?(t-1&&1===t&&_(e,u,[s.xaxis],[s.yaxis],s.id,W),r.indexOf(\"event\")>-1&&y.click(u,e,s.id)}W.prepFn=function(t,n,a){var l=u._fullLayout.dragmode,f=F.getBoundingClientRect();u._fullLayout._calcInverseTransform(u);var p=u._fullLayout._invTransform;e=u._fullLayout._invScaleX,r=u._fullLayout._invScaleY;var d=o.apply3DTransform(p)(n-f.left,a-f.top);if(B=d[0],N=d[1],C){var v=E.findPolygonOffset(g,L[0],L[1],C);B+=A+v[0],N+=M+v[1]}switch(l){case\"zoom\":W.clickFn=st,c||(W.moveFn=C?it:rt,W.doneFn=at,function(){j=null,U=null,V=s.pathSubplot(),H=!1;var t=u._fullLayout[s.id];q=i(t.bgcolor).getLuminance(),(G=m.makeZoombox(h,q,T,k,V)).attr(\"fill-rule\",\"evenodd\"),Y=m.makeCorners(h,T,k),w(u)}());break;case\"select\":case\"lasso\":b(t,n,a,W,l)}},v.init(W)},N.updateRadialDrag=function(t,e,r){var i=this,c=i.gd,u=i.layers,f=i.radius,h=i.innerRadius,p=i.cx,d=i.cy,g=i.radialAxis,y=S.radialDragBoxSize,x=y/2;if(g.visible){var b,_,T,M=R(i.radialAxisAngle),E=g._rl,L=E[0],C=E[1],P=E[r],I=.75*(E[1]-E[0])/(1-i.getHole(e))/f;r?(b=p+(f+x)*Math.cos(M),_=d-(f+x)*Math.sin(M),T=\"radialdrag\"):(b=p+(h-x)*Math.cos(M),_=d-(h-x)*Math.sin(M),T=\"radialdrag-inner\");var O,z,D,B=m.makeRectDragger(u,T,\"crosshair\",-x,-x,y,y),N={element:B,gd:c};V(n.select(B),g.visible&&h0==(r?D>L:Dn?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;o0?1:0}function i(t){var e=t[0],r=t[1];if(!isFinite(e)||!isFinite(r))return[1,0];var n=(e+1)*(e+1)+r*r;return[(e*e+r*r-1)/n,2*r/n]}function a(t,e){var r=e[0],n=e[1];return[r*t.radius+t.cx,-n*t.radius+t.cy]}function o(t,e){return e*t.radius}e.exports={smith:i,reactanceArc:function(t,e,r,n){var s=a(t,i([r,e])),l=s[0],c=s[1],u=a(t,i([n,e])),f=u[0],h=u[1];if(0===e)return[\"M\"+l+\",\"+c,\"L\"+f+\",\"+h].join(\" \");var p=o(t,1/Math.abs(e));return[\"M\"+l+\",\"+c,\"A\"+p+\",\"+p+\" 0 0,\"+(e<0?1:0)+\" \"+f+\",\"+h].join(\" \")},resistanceArc:function(t,e,r,s){var l=o(t,1/(e+1)),c=a(t,i([e,r])),u=c[0],f=c[1],h=a(t,i([e,s])),p=h[0],d=h[1];if(n(r)!==n(s)){var g=a(t,i([e,0]));return[\"M\"+u+\",\"+f,\"A\"+l+\",\"+l+\" 0 0,\"+(00){for(var n=[],i=0;i=u&&(h.min=0,d.min=0,m.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function g(t,e,r,n){var i=h[e._name];function o(r,n){return a.coerce(t,e,i,r,n)}o(\"uirevision\",n.uirevision),e.type=\"linear\";var p=o(\"color\"),d=p!==i.color.dflt?p:r.font.color,g=e._name.charAt(0).toUpperCase(),m=\"Component \"+g,v=o(\"title.text\",m);e._hovertitle=v===m?v:g,a.coerceFont(o,\"title.font\",{family:r.font.family,size:a.bigFont(r.font.size),color:d}),o(\"min\"),u(t,e,o,\"linear\"),l(t,e,o,\"linear\"),s(t,e,o,\"linear\"),c(t,e,o,{outerTicks:!0}),o(\"showticklabels\")&&(a.coerceFont(o,\"tickfont\",{family:r.font.family,size:r.font.size,color:d}),o(\"tickangle\"),o(\"tickformat\")),f(t,e,o,{dfltColor:p,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),o(\"hoverformat\"),o(\"layer\")}e.exports=function(t,e,r){o(t,e,r,{type:\"ternary\",attributes:h,handleDefaults:d,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{\"../../components/color\":366,\"../../lib\":503,\"../../plot_api/plot_template\":543,\"../cartesian/line_grid_defaults\":571,\"../cartesian/prefix_suffix_defaults\":573,\"../cartesian/tick_label_defaults\":578,\"../cartesian/tick_mark_defaults\":579,\"../cartesian/tick_value_defaults\":580,\"../subplot_defaults\":632,\"./layout_attributes\":635}],637:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"tinycolor2\"),a=t(\"../../registry\"),o=t(\"../../lib\"),s=o.strTranslate,l=o._,c=t(\"../../components/color\"),u=t(\"../../components/drawing\"),f=t(\"../cartesian/set_convert\"),h=t(\"../../lib/extend\").extendFlat,p=t(\"../plots\"),d=t(\"../cartesian/axes\"),g=t(\"../../components/dragelement\"),m=t(\"../../components/fx\"),v=t(\"../../components/dragelement/helpers\"),y=v.freeMode,x=v.rectMode,b=t(\"../../components/titles\"),_=t(\"../cartesian/select\").prepSelect,w=t(\"../cartesian/select\").selectOnClick,T=t(\"../cartesian/select\").clearSelect,k=t(\"../cartesian/select\").clearSelectionsCache,A=t(\"../cartesian/constants\");function M(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=M;var S=M.prototype;S.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},S.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var i=0;iE*b?i=(a=b)*E:a=(i=x)/E,o=v*i/x,l=y*a/b,r=e.l+e.w*g-i/2,n=e.t+e.h*(1-m)-a/2,p.x0=r,p.y0=n,p.w=i,p.h=a,p.sum=_,p.xaxis={type:\"linear\",range:[w+2*k-_,_-w-2*T],domain:[g-o/2,g+o/2],_id:\"x\"},f(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(t){return t.a>=p.aaxis.range[0]&&t.a<=p.aaxis.range[1]&&t.b>=p.baxis.range[1]&&t.b<=p.baxis.range[0]&&t.c>=p.caxis.range[1]&&t.c<=p.caxis.range[0]},p.yaxis={type:\"linear\",range:[w,_-T-k],domain:[m-l/2,m+l/2],_id:\"y\"},f(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var A=p.yaxis.domain[0],M=p.aaxis=h({},t.aaxis,{range:[w,_-T-k],side:\"left\",tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+l*E],anchor:\"free\",position:0,_id:\"y\",_length:i});f(M,p.graphDiv._fullLayout),M.setScale();var S=p.baxis=h({},t.baxis,{range:[_-w-k,T],side:\"bottom\",domain:p.xaxis.domain,anchor:\"free\",position:0,_id:\"x\",_length:i});f(S,p.graphDiv._fullLayout),S.setScale();var L=p.caxis=h({},t.caxis,{range:[_-w-T,k],side:\"right\",tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+l*E],anchor:\"free\",position:0,_id:\"y\",_length:i});f(L,p.graphDiv._fullLayout),L.setScale();var C=\"M\"+r+\",\"+(n+a)+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";p.clipDef.select(\"path\").attr(\"d\",C),p.layers.plotbg.select(\"path\").attr(\"d\",C);var P=\"M0,\"+a+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";p.clipDefRelative.select(\"path\").attr(\"d\",P);var I=s(r,n);p.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",I),p.clipDefRelative.select(\"path\").attr(\"transform\",null);var O=s(r-S._offset,n+a);p.layers.baxis.attr(\"transform\",O),p.layers.bgrid.attr(\"transform\",O);var z=s(r+i/2,n)+\"rotate(30)\"+s(0,-M._offset);p.layers.aaxis.attr(\"transform\",z),p.layers.agrid.attr(\"transform\",z);var D=s(r+i/2,n)+\"rotate(-30)\"+s(0,-L._offset);p.layers.caxis.attr(\"transform\",D),p.layers.cgrid.attr(\"transform\",D),p.drawAxes(!0),p.layers.aline.select(\"path\").attr(\"d\",M.showline?\"M\"+r+\",\"+(n+a)+\"l\"+i/2+\",-\"+a:\"M0,0\").call(c.stroke,M.linecolor||\"#000\").style(\"stroke-width\",(M.linewidth||0)+\"px\"),p.layers.bline.select(\"path\").attr(\"d\",S.showline?\"M\"+r+\",\"+(n+a)+\"h\"+i:\"M0,0\").call(c.stroke,S.linecolor||\"#000\").style(\"stroke-width\",(S.linewidth||0)+\"px\"),p.layers.cline.select(\"path\").attr(\"d\",L.showline?\"M\"+(r+i/2)+\",\"+n+\"l\"+i/2+\",\"+a:\"M0,0\").call(c.stroke,L.linecolor||\"#000\").style(\"stroke-width\",(L.linewidth||0)+\"px\"),p.graphDiv._context.staticPlot||p.initInteractions(),u.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},S.drawAxes=function(t){var e=this.graphDiv,r=this.id.substr(7)+\"title\",n=this.layers,i=this.aaxis,a=this.baxis,o=this.caxis;if(this.drawAx(i),this.drawAx(a),this.drawAx(o),t){var s=Math.max(i.showticklabels?i.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+(\"outside\"===o.ticks?.87*o.ticklen:0)),c=(a.showticklabels?a.tickfont.size:0)+(\"outside\"===a.ticks?a.ticklen:0)+3;n[\"a-title\"]=b.draw(e,\"a\"+r,{propContainer:i,propName:this.id+\".aaxis.title\",placeholder:l(e,\"Click to enter Component A title\"),attributes:{x:this.x0+this.w/2,y:this.y0-i.title.font.size/3-s,\"text-anchor\":\"middle\"}}),n[\"b-title\"]=b.draw(e,\"b\"+r,{propContainer:a,propName:this.id+\".baxis.title\",placeholder:l(e,\"Click to enter Component B title\"),attributes:{x:this.x0-c,y:this.y0+this.h+.83*a.title.font.size+c,\"text-anchor\":\"middle\"}}),n[\"c-title\"]=b.draw(e,\"c\"+r,{propContainer:o,propName:this.id+\".caxis.title\",placeholder:l(e,\"Click to enter Component C title\"),attributes:{x:this.x0+this.w+c,y:this.y0+this.h+.83*o.title.font.size+c,\"text-anchor\":\"middle\"}})}},S.drawAx=function(t){var e,r=this.graphDiv,n=t._name,i=n.charAt(0),a=t._id,s=this.layers[n],l=i+\"tickLayout\",c=(e=t).ticks+String(e.ticklen)+String(e.showticklabels);this[l]!==c&&(s.selectAll(\".\"+a+\"tick\").remove(),this[l]=c),t.setScale();var u=d.calcTicks(t),f=d.clipEnds(t,u),h=d.makeTransTickFn(t),p=d.getTickSigns(t)[2],g=o.deg2rad(30),m=p*(t.linewidth||1)/2,v=p*t.ticklen,y=this.w,x=this.h,b=\"b\"===i?\"M0,\"+m+\"l\"+Math.sin(g)*v+\",\"+Math.cos(g)*v:\"M\"+m+\",0l\"+Math.cos(g)*v+\",\"+-Math.sin(g)*v,_={a:\"M0,0l\"+x+\",-\"+y/2,b:\"M0,0l-\"+y/2+\",-\"+x,c:\"M0,0l-\"+x+\",\"+y/2}[i];d.drawTicks(r,t,{vals:\"inside\"===t.ticks?f:u,layer:s,path:b,transFn:h,crisp:!1}),d.drawGrid(r,t,{vals:f,layer:this.layers[i+\"grid\"],path:_,transFn:h,crisp:!1}),d.drawLabels(r,t,{vals:u,layer:s,transFn:h,labelFns:d.makeLabelFns(t,0,30)})};var L=A.MINZOOM/2+.87,C=\"m-0.87,.5h\"+L+\"v3h-\"+(L+5.2)+\"l\"+(L/2+2.6)+\",-\"+(.87*L+4.5)+\"l2.6,1.5l-\"+L/2+\",\"+.87*L+\"Z\",P=\"m0.87,.5h-\"+L+\"v3h\"+(L+5.2)+\"l-\"+(L/2+2.6)+\",-\"+(.87*L+4.5)+\"l-2.6,1.5l\"+L/2+\",\"+.87*L+\"Z\",I=\"m0,1l\"+L/2+\",\"+.87*L+\"l2.6,-1.5l-\"+(L/2+2.6)+\",-\"+(.87*L+4.5)+\"l-\"+(L/2+2.6)+\",\"+(.87*L+4.5)+\"l2.6,1.5l\"+L/2+\",-\"+.87*L+\"Z\",O=!0;function z(t){n.select(t).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}S.clearSelect=function(){k(this.dragOptions),T(this.dragOptions.gd)},S.initInteractions=function(){var t,e,r,n,f,h,p,d,v,b,T,k,M=this,S=M.layers.plotbg.select(\"path\").node(),L=M.graphDiv,D=L._fullLayout._zoomlayer;function R(t){var e={};return e[M.id+\".aaxis.min\"]=t.a,e[M.id+\".baxis.min\"]=t.b,e[M.id+\".caxis.min\"]=t.c,e}function F(t,e){var r=L._fullLayout.clickmode;z(L),2===t&&(L.emit(\"plotly_doubleclick\",null),a.call(\"_guiRelayout\",L,R({a:0,b:0,c:0}))),r.indexOf(\"select\")>-1&&1===t&&w(e,L,[M.xaxis],[M.yaxis],M.id,M.dragOptions),r.indexOf(\"event\")>-1&&m.click(L,e,M.id)}function B(t,e){return 1-e/M.h}function N(t,e){return 1-(t+(M.h-e)/Math.sqrt(3))/M.w}function j(t,e){return(t-(M.h-e)/Math.sqrt(3))/M.w}function U(i,a){var o=r+i*t,s=n+a*e,l=Math.max(0,Math.min(1,B(0,n),B(0,s))),c=Math.max(0,Math.min(1,N(r,n),N(o,s))),u=Math.max(0,Math.min(1,j(r,n),j(o,s))),g=(l/2+u)*M.w,m=(1-l/2-c)*M.w,y=(g+m)/2,x=m-g,_=(1-l)*M.h,w=_-x/E;x.2?\"rgba(0,0,0,0.4)\":\"rgba(255,255,255,0.3)\").duration(200),k.transition().style(\"opacity\",1).duration(200),b=!0),L.emit(\"plotly_relayouting\",R(p))}function V(){z(L),p!==f&&(a.call(\"_guiRelayout\",L,R(p)),O&&L.data&&L._context.showTips&&(o.notifier(l(L,\"Double-click to zoom back out\"),\"long\"),O=!1))}function H(t,e){var r=t/M.xaxis._m,n=e/M.yaxis._m,i=[(p={a:f.a-n,b:f.b+(r+n)/2,c:f.c-(r-n)/2}).a,p.b,p.c].sort(o.sorterAsc),a=i.indexOf(p.a),l=i.indexOf(p.b),c=i.indexOf(p.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),p={a:i[a],b:i[l],c:i[c]},e=(f.a-p.a)*M.yaxis._m,t=(f.c-p.c-f.b+p.b)*M.xaxis._m);var h=s(M.x0+t,M.y0+e);M.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",h);var d=s(-t,-e);M.clipDefRelative.select(\"path\").attr(\"transform\",d),M.aaxis.range=[p.a,M.sum-p.b-p.c],M.baxis.range=[M.sum-p.a-p.c,p.b],M.caxis.range=[M.sum-p.a-p.b,p.c],M.drawAxes(!1),M._hasClipOnAxisFalse&&M.plotContainer.select(\".scatterlayer\").selectAll(\".trace\").call(u.hideOutsideRangePoints,M),L.emit(\"plotly_relayouting\",R(p))}function q(){a.call(\"_guiRelayout\",L,R(p))}this.dragOptions={element:S,gd:L,plotinfo:{id:M.id,domain:L._fullLayout[M.id].domain,xaxis:M.xaxis,yaxis:M.yaxis},subplot:M.id,prepFn:function(a,l,u){M.dragOptions.xaxes=[M.xaxis],M.dragOptions.yaxes=[M.yaxis],t=L._fullLayout._invScaleX,e=L._fullLayout._invScaleY;var g=M.dragOptions.dragmode=L._fullLayout.dragmode;y(g)?M.dragOptions.minDrag=1:M.dragOptions.minDrag=void 0,\"zoom\"===g?(M.dragOptions.moveFn=U,M.dragOptions.clickFn=F,M.dragOptions.doneFn=V,function(t,e,a){var l=S.getBoundingClientRect();r=e-l.left,n=a-l.top,L._fullLayout._calcInverseTransform(L);var u=L._fullLayout._invTransform,g=o.apply3DTransform(u)(r,n);r=g[0],n=g[1],f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=f,h=M.aaxis.range[1]-f.a,d=i(M.graphDiv._fullLayout[M.id].bgcolor).getLuminance(),v=\"M0,\"+M.h+\"L\"+M.w/2+\", 0L\"+M.w+\",\"+M.h+\"Z\",b=!1,T=D.append(\"path\").attr(\"class\",\"zoombox\").attr(\"transform\",s(M.x0,M.y0)).style({fill:d>.2?\"rgba(0,0,0,0)\":\"rgba(255,255,255,0)\",\"stroke-width\":0}).attr(\"d\",v),k=D.append(\"path\").attr(\"class\",\"zoombox-corners\").attr(\"transform\",s(M.x0,M.y0)).style({fill:c.background,stroke:c.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"d\",\"M0,0Z\"),M.clearSelect(L)}(0,l,u)):\"pan\"===g?(M.dragOptions.moveFn=H,M.dragOptions.clickFn=F,M.dragOptions.doneFn=q,f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=f,M.clearSelect(L)):(x(g)||y(g))&&_(a,l,u,M.dragOptions,g)}},S.onmousemove=function(t){m.hover(L,t,M.id),L._fullLayout._lasthover=S,L._fullLayout._hoversubplot=M.id},S.onmouseout=function(t){L._dragging||g.unhover(L,t)},g.init(this.dragOptions)}},{\"../../components/color\":366,\"../../components/dragelement\":385,\"../../components/dragelement/helpers\":384,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../components/titles\":464,\"../../lib\":503,\"../../lib/extend\":493,\"../../registry\":638,\"../cartesian/axes\":554,\"../cartesian/constants\":561,\"../cartesian/select\":575,\"../cartesian/set_convert\":576,\"../plots\":619,\"@plotly/d3\":58,tinycolor2:312}],638:[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/dom\").addStyleRule,l=t(\"./lib/extend\"),c=t(\"./plots/attributes\"),u=t(\"./plots/layout_attributes\"),f=l.extendFlat,h=l.extendDeepAll;function p(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)b(i,t.name)}(t.basePlotModule);for(var o={},l=0;l-1&&(f[p[r]].title={text:\"\"});for(r=0;r\")?\"\":e.html(t).text()}));return e.remove(),r}(T),T=(T=T.replace(/&(?!\\w+;|\\#[0-9]+;| \\#x[0-9A-F]+;)/g,\"&\")).replace(c,\"'\"),i.isIE()&&(T=(T=(T=T.replace(/\"/gi,\"'\")).replace(/(\\('#)([^']*)('\\))/gi,'(\"#$2\")')).replace(/(\\\\')/gi,'\"')),T}},{\"../components/color\":366,\"../components/drawing\":388,\"../constants/xmlns_namespaces\":480,\"../lib\":503,\"@plotly/d3\":58}],647:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){for(var r=0;rf+c||!n(u))}for(var p=0;pa))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)?e0?e+=r:u<0&&(e-=r)}return e}function z(t){var e=u,r=t.b,i=O(t);return n.inbox(r-e,i-e,_+(i-e)/(i-r)-1)}var D=t[f+\"a\"],R=t[h+\"a\"];g=Math.abs(D.r2c(D.range[1])-D.r2c(D.range[0]));var F=n.getDistanceFunction(i,p,d,(function(t){return(p(t)+d(t))/2}));if(n.getClosest(m,F,t),!1!==t.index&&m[t.index].p!==c){k||(L=function(t){return Math.min(A(t),t.p-y.bargroupwidth/2)},C=function(t){return Math.max(M(t),t.p+y.bargroupwidth/2)});var B=m[t.index],N=v.base?B.b+B.s:B.s;t[h+\"0\"]=t[h+\"1\"]=R.c2p(B[h],!0),t[h+\"LabelVal\"]=N;var j=y.extents[y.extents.round(B.p)];t[f+\"0\"]=D.c2p(x?L(B):j[0],!0),t[f+\"1\"]=D.c2p(x?C(B):j[1],!0);var U=void 0!==B.orig_p;return t[f+\"LabelVal\"]=U?B.orig_p:B.p,t.labelLabel=l(D,t[f+\"LabelVal\"],v[f+\"hoverformat\"]),t.valueLabel=l(R,t[h+\"LabelVal\"],v[h+\"hoverformat\"]),t.baseLabel=l(R,B.b,v[h+\"hoverformat\"]),t.spikeDistance=(function(t){var e=u,r=t.b,i=O(t);return n.inbox(r-e,i-e,w+(i-e)/(i-r)-1)}(B)+function(t){return P(A(t),M(t),w)}(B))/2,t[f+\"Spike\"]=D.c2p(B.p,!0),o(B,v,t),t.hovertemplate=v.hovertemplate,t}}function f(t,e){var r=e.mcc||t.marker.color,n=e.mlcc||t.marker.line.color,i=s(t,e);return a.opacity(r)?r:a.opacity(n)&&i?n:void 0}e.exports={hoverPoints:function(t,e,r,n,a){var o=u(t,e,r,n,a);if(o){var s=o.cd,l=s[0].trace,c=s[o.index];return o.color=f(l,c),i.getComponentMethod(\"errorbars\",\"hoverInfo\")(c,l,o),[o]}},hoverOnBars:u,getTraceColor:f}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"./helpers\":654}],656:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\").crossTraceCalc,colorbar:t(\"../scatter/marker_colorbar\"),arraysToCalcdata:t(\"./arrays_to_calcdata\"),plot:t(\"./plot\").plot,style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"bar\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"bar\",\"oriented\",\"errorBarsOK\",\"showLegend\",\"zoomScale\"],animatable:!0,meta:{}}},{\"../../plots/cartesian\":568,\"../scatter/marker_colorbar\":944,\"./arrays_to_calcdata\":647,\"./attributes\":648,\"./calc\":649,\"./cross_trace_calc\":651,\"./defaults\":652,\"./event_data\":653,\"./hover\":655,\"./layout_attributes\":657,\"./layout_defaults\":658,\"./plot\":659,\"./select\":660,\"./style\":662}],657:[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\"}}},{}],658:[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=s(\"barmode\"),p=0;p0}function S(t){return\"auto\"===t?0:t}function E(t,e){var r=Math.PI/180*e,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:t.width*i+t.height*n,y:t.width*n+t.height*i}}function L(t,e,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,c=a.anchor||\"end\",u=\"end\"===c,f=\"start\"===c,h=((a.leftToRight||0)+1)/2,p=1-h,d=i.width,g=i.height,m=Math.abs(e-t),v=Math.abs(n-r),y=m>2*_&&v>2*_?_:0;m-=2*y,v-=2*y;var x=S(l);\"auto\"!==l||d<=m&&g<=v||!(d>m||g>v)||(d>v||g>m)&&d.01?q:function(t,e,r){return r&&t===e?t:Math.abs(t-e)>=2?q(t):t>e?Math.ceil(t):Math.floor(t)};B=G(B,N,D),N=G(N,B,D),j=G(j,U,!D),U=G(U,j,!D)}var Y=A(a.ensureSingle(I,\"path\"),P,m,v);if(Y.style(\"vector-effect\",\"non-scaling-stroke\").attr(\"d\",isNaN((N-B)*(U-j))||V&&t._context.staticPlot?\"M0,0Z\":\"M\"+B+\",\"+j+\"V\"+U+\"H\"+N+\"V\"+j+\"Z\").call(l.setClipUrl,e.layerClipId,t),!P.uniformtext.mode&&R){var W=l.makePointStyleFns(f);l.singlePointStyle(c,Y,f,W,t)}!function(t,e,r,n,i,s,c,f,p,m,v){var w,T=e.xaxis,M=e.yaxis,C=t._fullLayout;function P(e,r,n){return a.ensureSingle(e,\"text\").text(r).attr({class:\"bartext bartext-\"+w,\"text-anchor\":\"middle\",\"data-notex\":1}).call(l.font,n).call(o.convertToTspans,t)}var I=n[0].trace,O=\"h\"===I.orientation,z=function(t,e,r,n,i){var o,s=e[0].trace;o=s.texttemplate?function(t,e,r,n,i){var o=e[0].trace,s=a.castOption(o,r,\"texttemplate\");if(!s)return\"\";var l,c,f,h,p=\"histogram\"===o.type,d=\"waterfall\"===o.type,g=\"funnel\"===o.type,m=\"h\"===o.orientation;m?(l=\"y\",c=i,f=\"x\",h=n):(l=\"x\",c=n,f=\"y\",h=i);function v(t){return u(h,h.c2l(t),!0).text}var y=e[r],x={};x.label=y.p,x.labelLabel=x[l+\"Label\"]=(_=y.p,u(c,c.c2l(_),!0).text);var _;var w=a.castOption(o,y.i,\"text\");(0===w||w)&&(x.text=w);x.value=y.s,x.valueLabel=x[f+\"Label\"]=v(y.s);var T={};b(T,o,y.i),(p||void 0===T.x)&&(T.x=m?x.value:x.label);(p||void 0===T.y)&&(T.y=m?x.label:x.value);(p||void 0===T.xLabel)&&(T.xLabel=m?x.valueLabel:x.labelLabel);(p||void 0===T.yLabel)&&(T.yLabel=m?x.labelLabel:x.valueLabel);d&&(x.delta=+y.rawS||y.s,x.deltaLabel=v(x.delta),x.final=y.v,x.finalLabel=v(x.final),x.initial=x.final-x.delta,x.initialLabel=v(x.initial));g&&(x.value=y.s,x.valueLabel=v(x.value),x.percentInitial=y.begR,x.percentInitialLabel=a.formatPercent(y.begR),x.percentPrevious=y.difR,x.percentPreviousLabel=a.formatPercent(y.difR),x.percentTotal=y.sumR,x.percenTotalLabel=a.formatPercent(y.sumR));var k=a.castOption(o,y.i,\"customdata\");k&&(x.customdata=k);return a.texttemplateString(s,x,t._d3locale,T,x,o._meta||{})}(t,e,r,n,i):s.textinfo?function(t,e,r,n){var i=t[0].trace,o=\"h\"===i.orientation,s=\"waterfall\"===i.type,l=\"funnel\"===i.type;function c(t){return u(o?r:n,+t,!0).text}var f,h=i.textinfo,p=t[e],d=h.split(\"+\"),g=[],m=function(t){return-1!==d.indexOf(t)};m(\"label\")&&g.push((v=t[e].p,u(o?n:r,v,!0).text));var v;m(\"text\")&&(0===(f=a.castOption(i,p.i,\"text\"))||f)&&g.push(f);if(s){var y=+p.rawS||p.s,x=p.v,b=x-y;m(\"initial\")&&g.push(c(b)),m(\"delta\")&&g.push(c(y)),m(\"final\")&&g.push(c(x))}if(l){m(\"value\")&&g.push(c(p.s));var _=0;m(\"percent initial\")&&_++,m(\"percent previous\")&&_++,m(\"percent total\")&&_++;var w=_>1;m(\"percent initial\")&&(f=a.formatPercent(p.begR),w&&(f+=\" of initial\"),g.push(f)),m(\"percent previous\")&&(f=a.formatPercent(p.difR),w&&(f+=\" of previous\"),g.push(f)),m(\"percent total\")&&(f=a.formatPercent(p.sumR),w&&(f+=\" of total\"),g.push(f))}return g.join(\"
\")}(e,r,n,i):g.getValue(s.text,r);return g.coerceString(y,o)}(C,n,i,T,M);w=function(t,e){var r=g.getValue(t.textposition,e);return g.coerceEnumerated(x,r)}(I,i);var D=\"stack\"===m.mode||\"relative\"===m.mode,R=n[i],F=!D||R._outmost;if(!z||\"none\"===w||(R.isBlank||s===c||f===p)&&(\"auto\"===w||\"inside\"===w))return void r.select(\"text\").remove();var B=C.font,N=d.getBarColor(n[i],I),j=d.getInsideTextFont(I,i,B,N),U=d.getOutsideTextFont(I,i,B),V=r.datum();O?\"log\"===T.type&&V.s0<=0&&(s=T.range[0]=G*(Z/Y):Z>=Y*(X/G);G>0&&Y>0&&(J||K||Q)?w=\"inside\":(w=\"outside\",H.remove(),H=null)}else w=\"inside\";if(!H){W=a.ensureUniformFontSize(t,\"outside\"===w?U:j);var $=(H=P(r,z,W)).attr(\"transform\");if(H.attr(\"transform\",\"\"),q=l.bBox(H.node()),G=q.width,Y=q.height,H.attr(\"transform\",$),G<=0||Y<=0)return void H.remove()}var tt,et,rt=I.textangle;\"outside\"===w?(et=\"both\"===I.constraintext||\"outside\"===I.constraintext,tt=function(t,e,r,n,i,a){var o,s=!!a.isHorizontal,l=!!a.constrained,c=a.angle||0,u=i.width,f=i.height,h=Math.abs(e-t),p=Math.abs(n-r);o=s?p>2*_?_:0:h>2*_?_:0;var d=1;l&&(d=s?Math.min(1,p/f):Math.min(1,h/u));var g=S(c),m=E(i,g),v=(s?m.x:m.y)/2,y=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=(t+e)/2,w=(r+n)/2,T=0,A=0,M=s?k(e,t):k(r,n);s?(b=e-M*o,T=M*v):(w=n+M*o,A=-M*v);return{textX:y,textY:x,targetX:b,targetY:w,anchorX:T,anchorY:A,scale:d,rotate:g}}(s,c,f,p,q,{isHorizontal:O,constrained:et,angle:rt})):(et=\"both\"===I.constraintext||\"inside\"===I.constraintext,tt=L(s,c,f,p,q,{isHorizontal:O,constrained:et,angle:rt,anchor:I.insidetextanchor}));tt.fontSize=W.size,h(\"histogram\"===I.type?\"bar\":I.type,tt,C),R.transform=tt,A(H,C,m,v).attr(\"transform\",a.getTextTransform(tt))}(t,e,I,r,p,B,N,j,U,m,v),e.layerClipId&&l.hideOutsideRangePoint(c,I.select(\"text\"),w,C,f.xcalendar,f.ycalendar)}));var j=!1===f.cliponaxis;l.setClipUrl(c,j?null:e.layerClipId,t)}));c.getComponentMethod(\"errorbars\",\"plot\")(t,I,e,m)},toMoveInsideBar:L}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../components/fx/helpers\":402,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"./attributes\":648,\"./constants\":650,\"./helpers\":654,\"./style\":662,\"./uniform_text\":664,\"@plotly/d3\":58,\"fast-isnumeric\":190}],660:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){var a=e.c2p(n?t.s0:t.p0,!0),o=e.c2p(n?t.s1:t.p1,!0),s=r.c2p(n?t.p0:t.s0,!0),l=r.c2p(n?t.p1:t.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}e.exports=function(t,e){var r,i=t.cd,a=t.xaxis,o=t.yaxis,s=i[0].trace,l=\"funnel\"===s.type,c=\"h\"===s.orientation,u=[];if(!1===e)for(r=0;r1||0===i.bargap&&0===i.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr(\"shape-rendering\",\"crispEdges\")})),e.selectAll(\"g.points\").each((function(e){d(n.select(this),e[0].trace,t)})),s.getComponentMethod(\"errorbars\",\"style\")(e)},styleTextPoints:g,styleOnSelect:function(t,e,r){var 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.ensureUniformFontSize(r,m(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):(d(r,i,t),s.getComponentMethod(\"errorbars\",\"style\")(r))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:_,resizeText:l}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../lib\":503,\"../../registry\":638,\"./attributes\":648,\"./helpers\":654,\"./uniform_text\":664,\"@plotly/d3\":58}],663:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/helpers\").hasColorscale,a=t(\"../../components/colorscale/defaults\"),o=t(\"../../lib\").coercePattern;e.exports=function(t,e,r,s,l){var c=r(\"marker.color\",s),u=i(t,\"marker\");u&&a(t,e,l,r,{prefix:\"marker.\",cLetter:\"c\"}),r(\"marker.line.color\",n.defaultLine),i(t,\"marker.line\")&&a(t,e,l,r,{prefix:\"marker.line.\",cLetter:\"c\"}),r(\"marker.line.width\"),r(\"marker.opacity\"),o(r,\"marker.pattern\",c,u),r(\"selected.marker.color\"),r(\"unselected.marker.color\")}},{\"../../components/color\":366,\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503}],664:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\");function a(t){return\"_\"+t+\"Text_minsize\"}e.exports={recordMinTextSize:function(t,e,r){if(r.uniformtext.mode){var n=a(t),i=r.uniformtext.minsize,o=e.scale*e.fontSize;e.hide=o g.point\"}e.selectAll(s).each((function(t){var e=t.transform;e&&(e.scale=l&&e.hide?0:o/e.fontSize,n.select(this).select(\"text\").attr(\"transform\",i.getTextTransform(e)))}))}}}},{\"../../lib\":503,\"@plotly/d3\":58}],665:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../lib/extend\").extendFlat,a=t(\"../scatterpolar/attributes\"),o=t(\"../bar/attributes\");e.exports={r:a.r,theta:a.theta,r0:a.r0,dr:a.dr,theta0:a.theta0,dtheta:a.dtheta,thetaunit:a.thetaunit,base:i({},o.base,{}),offset:i({},o.offset,{}),width:i({},o.width,{}),text:i({},o.text,{}),hovertext:i({},o.hovertext,{}),marker:o.marker,hoverinfo:a.hoverinfo,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{\"../../lib/extend\":493,\"../../plots/template_attributes\":633,\"../bar/attributes\":648,\"../scatterpolar/attributes\":1e3}],666:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/helpers\").hasColorscale,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,m=0;mh.range[1]&&(x+=Math.PI);if(n.getClosest(c,(function(t){return g(y,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?m+Math.min(1,Math.abs(t.thetag1-t.thetag0)/v)-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.hovertemplate=u.hovertemplate,t.color=a(u,b),t.xLabelVal=t.yLabelVal=void 0,b.s<0&&(t.idealAlign=\"left\"),[t]}}},{\"../../components/fx\":406,\"../../lib\":503,\"../../plots/polar/helpers\":621,\"../bar/hover\":655,\"../scatterpolar/hover\":1004}],669:[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\"),formatLabels:t(\"../scatterpolar/format_labels\"),style:t(\"../bar/style\").style,styleOnSelect:t(\"../bar/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../bar/select\"),meta:{}}},{\"../../plots/polar\":622,\"../bar/select\":660,\"../bar/style\":662,\"../scatter/marker_colorbar\":944,\"../scatterpolar/format_labels\":1003,\"./attributes\":665,\"./calc\":666,\"./defaults\":667,\"./hover\":668,\"./layout_attributes\":670,\"./layout_defaults\":671,\"./plot\":672}],670:[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\"}}},{}],671:[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;l0?(c=o,u=l):(c=l,u=o);var f=[s.findEnclosingVertexAngles(c,t.vangles)[0],(c+u)/2,s.findEnclosingVertexAngles(u,t.vangles)[1]];return s.pathPolygonAnnulus(n,i,c,u,f,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(){var r=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),m=(p+d)/2;t.ct=[l.c2p(g*Math.cos(m)),c.c2p(g*Math.sin(m))],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,t)}))}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../plots/polar/helpers\":621,\"@plotly/d3\":58,\"fast-isnumeric\":190}],673:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../bar/attributes\"),a=t(\"../../components/color/attributes\"),o=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../lib/extend\").extendFlat,c=n.marker,u=c.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\"},dx:{valType:\"number\",editType:\"calc\"},dy:{valType:\"number\",editType:\"calc\"},xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,xhoverformat:o(\"x\"),yhoverformat:o(\"y\"),name:{valType:\"string\",editType:\"calc+clearAxisTypes\"},q1:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},median:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},q3:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},lowerfence:{valType:\"data_array\",editType:\"calc\"},upperfence:{valType:\"data_array\",editType:\"calc\"},notched:{valType:\"boolean\",editType:\"calc\"},notchwidth:{valType:\"number\",min:0,max:.5,dflt:.25,editType:\"calc\"},notchspan:{valType:\"data_array\",editType:\"calc\"},boxpoints:{valType:\"enumerated\",values:[\"all\",\"outliers\",\"suspectedoutliers\",!1],editType:\"calc\"},jitter:{valType:\"number\",min:0,max:1,editType:\"calc\"},pointpos:{valType:\"number\",min:-2,max:2,editType:\"calc\"},boxmean:{valType:\"enumerated\",values:[!0,\"sd\",!1],editType:\"calc\"},mean:{valType:\"data_array\",editType:\"calc\"},sd:{valType:\"data_array\",editType:\"calc\"},orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc+clearAxisTypes\"},quartilemethod:{valType:\"enumerated\",values:[\"linear\",\"exclusive\",\"inclusive\"],dflt:\"linear\",editType:\"calc\"},width:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},marker:{outliercolor:{valType:\"color\",dflt:\"rgba(0, 0, 0, 0)\",editType:\"style\"},symbol:l({},c.symbol,{arrayOk:!1,editType:\"plot\"}),opacity:l({},c.opacity,{arrayOk:!1,dflt:1,editType:\"style\"}),size:l({},c.size,{arrayOk:!1,editType:\"calc\"}),color:l({},c.color,{arrayOk:!1,editType:\"style\"}),line:{color:l({},u.color,{arrayOk:!1,dflt:a.defaultLine,editType:\"style\"}),width:l({},u.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,whiskerwidth:{valType:\"number\",min:0,max:1,dflt:.5,editType:\"calc\"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:n.selected.marker,editType:\"style\"},unselected:{marker:n.unselected.marker,editType:\"style\"},text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),hovertemplate:s({}),hoveron:{valType:\"flaglist\",flags:[\"boxes\",\"points\"],dflt:\"boxes+points\",editType:\"style\"}}},{\"../../components/color/attributes\":365,\"../../lib/extend\":493,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../bar/attributes\":648,\"../scatter/attributes\":926}],674:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../plots/cartesian/align_period\"),o=t(\"../../lib\"),s=t(\"../../constants/numerical\").BADNUM,l=o._;e.exports=function(t,e){var r,c,y,x,b,_,w,T=t._fullLayout,k=i.getFromId(t,e.xaxis||\"x\"),A=i.getFromId(t,e.yaxis||\"y\"),M=[],S=\"violin\"===e.type?\"_numViolins\":\"_numBoxes\";\"h\"===e.orientation?(y=k,x=\"x\",b=A,_=\"y\",w=!!e.yperiodalignment):(y=A,x=\"y\",b=k,_=\"x\",w=!!e.xperiodalignment);var E,L,C,P,I,O,z=function(t,e,r,i){var s,l=e+\"0\"in t,c=\"d\"+e in t;if(e in t||l&&c){var u=r.makeCalcdata(t,e);return[a(t,r,e,u).vals,u]}s=l?t[e+\"0\"]:\"name\"in t&&(\"category\"===r.type||n(t.name)&&-1!==[\"linear\",\"log\"].indexOf(r.type)||o.isDateTime(t.name)&&\"date\"===r.type)?t.name:i;for(var f=\"multicategory\"===r.type?r.r2c_just_indices(s):r.d2c(s,0,t[e+\"calendar\"]),h=t._length,p=new Array(h),d=0;dE.uf};if(e._hasPreCompStats){var U=e[x],V=function(t){return y.d2c((e[t]||[])[r])},H=1/0,q=-1/0;for(r=0;r=E.q1&&E.q3>=E.med){var Y=V(\"lowerfence\");E.lf=Y!==s&&Y<=E.q1?Y:p(E,C,P);var W=V(\"upperfence\");E.uf=W!==s&&W>=E.q3?W:d(E,C,P);var X=V(\"mean\");E.mean=X!==s?X:P?o.mean(C,P):(E.q1+E.q3)/2;var Z=V(\"sd\");E.sd=X!==s&&Z>=0?Z:P?o.stdev(C,P,E.mean):E.q3-E.q1,E.lo=g(E),E.uo=m(E);var J=V(\"notchspan\");J=J!==s&&J>0?J:v(E,P),E.ln=E.med-J,E.un=E.med+J;var K=E.lf,Q=E.uf;e.boxpoints&&C.length&&(K=Math.min(K,C[0]),Q=Math.max(Q,C[P-1])),e.notched&&(K=Math.min(K,E.ln),Q=Math.max(Q,E.un)),E.min=K,E.max=Q}else{var $;o.warn([\"Invalid input - make sure that q1 <= median <= q3\",\"q1 = \"+E.q1,\"median = \"+E.med,\"q3 = \"+E.q3].join(\"\\n\")),$=E.med!==s?E.med:E.q1!==s?E.q3!==s?(E.q1+E.q3)/2:E.q1:E.q3!==s?E.q3:0,E.med=$,E.q1=E.q3=$,E.lf=E.uf=$,E.mean=E.sd=$,E.ln=E.un=$,E.min=E.max=$}H=Math.min(H,E.min),q=Math.max(q,E.max),E.pts2=L.filter(j),M.push(E)}}e._extremes[y._id]=i.findExtremes(y,[H,q],{padded:!0})}else{var tt=y.makeCalcdata(e,x),et=function(t,e){for(var r=t.length,n=new Array(r+1),i=0;i=0&&it0){var ut,ft;if((E={}).pos=E[_]=B[r],L=E.pts=nt[r].sort(f),P=(C=E[x]=L.map(h)).length,E.min=C[0],E.max=C[P-1],E.mean=o.mean(C,P),E.sd=o.stdev(C,P,E.mean),E.med=o.interp(C,.5),P%2&&(lt||ct))lt?(ut=C.slice(0,P/2),ft=C.slice(P/2+1)):ct&&(ut=C.slice(0,P/2+1),ft=C.slice(P/2)),E.q1=o.interp(ut,.5),E.q3=o.interp(ft,.5);else E.q1=o.interp(C,.25),E.q3=o.interp(C,.75);E.lf=p(E,C,P),E.uf=d(E,C,P),E.lo=g(E),E.uo=m(E);var ht=v(E,P);E.ln=E.med-ht,E.un=E.med+ht,at=Math.min(at,E.ln),ot=Math.max(ot,E.un),E.pts2=L.filter(j),M.push(E)}e._extremes[y._id]=i.findExtremes(y,e.notched?tt.concat([at,ot]):tt,{padded:!0})}return function(t,e){if(o.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r0?(M[0].t={num:T[S],dPos:N,posLetter:_,valLetter:x,labels:{med:l(t,\"median:\"),min:l(t,\"min:\"),q1:l(t,\"q1:\"),q3:l(t,\"q3:\"),max:l(t,\"max:\"),mean:\"sd\"===e.boxmean?l(t,\"mean \\xb1 \\u03c3:\"):l(t,\"mean:\"),lf:l(t,\"lower fence:\"),uf:l(t,\"upper fence:\")}},T[S]++,M):[{t:{empty:!0}}]};var c={text:\"tx\",hovertext:\"htx\"};function u(t,e,r){for(var n in c)o.isArrayOrTypedArray(e[n])&&(Array.isArray(r)?o.isArrayOrTypedArray(e[n][r[0]])&&(t[c[n]]=e[n][r[0]][r[1]]):t[c[n]]=e[n][r])}function f(t,e){return t.v-e.v}function h(t){return t.v}function p(t,e,r){return 0===r?t.q1:Math.min(t.q1,e[Math.min(o.findBin(2.5*t.q1-1.5*t.q3,e,!0)+1,r-1)])}function d(t,e,r){return 0===r?t.q3:Math.max(t.q3,e[Math.max(o.findBin(2.5*t.q3-1.5*t.q1,e),0)])}function g(t){return 4*t.q1-3*t.q3}function m(t){return 4*t.q3-3*t.q1}function v(t,e){return 0===e?0:1.57*(t.q3-t.q1)/Math.sqrt(e)}},{\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/align_period\":551,\"../../plots/cartesian/axes\":554,\"fast-isnumeric\":190}],675:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/constraints\").getAxisGroup,o=[\"v\",\"h\"];function s(t,e,r,o){var s,l,c,u=e.calcdata,f=e._fullLayout,h=o._id,p=h.charAt(0),d=[],g=0;for(s=0;s1,b=1-f[t+\"gap\"],_=1-f[t+\"groupgap\"];for(s=0;s0){var q=E.pointpos,G=E.jitter,Y=E.marker.size/2,W=0;q+G>=0&&((W=V*(q+G))>M?(H=!0,j=Y,B=W):W>R&&(j=Y,B=M)),W<=M&&(B=M);var X=0;q-G<=0&&((X=-V*(q-G))>S?(H=!0,U=Y,N=X):X>F&&(U=Y,N=S)),X<=S&&(N=S)}else B=M,N=S;var Z=new Array(c.length);for(l=0;l0?(m=\"v\",v=x>0?Math.min(_,b):Math.min(b)):x>0?(m=\"h\",v=Math.min(_)):v=0;if(v){e._length=v;var S=r(\"orientation\",m);e._hasPreCompStats?\"v\"===S&&0===x?(r(\"x0\",0),r(\"dx\",1)):\"h\"===S&&0===y&&(r(\"y0\",0),r(\"dy\",1)):\"v\"===S&&0===x?r(\"x0\"):\"h\"===S&&0===y&&r(\"y0\"),i.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\"],a)}else e.visible=!1}function f(t,e,r,i){var a=i.prefix,o=n.coerce2(t,e,c,\"marker.outliercolor\"),s=r(\"marker.line.outliercolor\"),l=\"outliers\";e._hasPreCompStats?l=\"all\":(o||s)&&(l=\"suspectedoutliers\");var u=r(a+\"points\",l);u?(r(\"jitter\",\"all\"===u?.3:0),r(\"pointpos\",\"all\"===u?-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\"===u&&(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\"),r(\"hovertext\")):delete e.marker;var f=r(\"hoveron\");\"all\"!==f&&-1===f.indexOf(\"points\")||r(\"hovertemplate\"),n.coerceSelectionMarkerOpacity(e,r)}e.exports={supplyDefaults:function(t,e,r,i){function s(r,i){return n.coerce(t,e,c,r,i)}if(u(t,e,s,i),!1!==e.visible){o(t,e,i,s),s(\"xhoverformat\"),s(\"yhoverformat\");var l=e._hasPreCompStats;l&&(s(\"lowerfence\"),s(\"upperfence\")),s(\"line.color\",(t.marker||{}).color||r),s(\"line.width\"),s(\"fillcolor\",a.addOpacity(e.line.color,.5));var h=!1;if(l){var p=s(\"mean\"),d=s(\"sd\");p&&p.length&&(h=!0,d&&d.length&&(h=\"sd\"))}s(\"boxmean\",h),s(\"whiskerwidth\"),s(\"width\"),s(\"quartilemethod\");var g=!1;if(l){var m=s(\"notchspan\");m&&m.length&&(g=!0)}else n.validate(t.notchwidth,c.notchwidth)&&(g=!0);s(\"notched\",g)&&s(\"notchwidth\"),f(t,e,s,{prefix:\"box\"})}},crossTraceDefaults:function(t,e){var r,i;function a(t){return n.coerce(i._input,i,c,t)}for(var o=0;ot.lo&&(x.so=!0)}return a}));h.enter().append(\"path\").classed(\"point\",!0),h.exit().remove(),h.call(a.translatePoints,o,s)}function l(t,e,r,a){var o,s,l=e.val,c=e.pos,u=!!c.rangebreaks,f=a.bPos,h=a.bPosPxOffset||0,p=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var d=t.selectAll(\"path.mean\").data(\"box\"===r.type&&r.boxmean||\"violin\"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);d.enter().append(\"path\").attr(\"class\",\"mean\").style({fill:\"none\",\"vector-effect\":\"non-scaling-stroke\"}),d.exit().remove(),d.each((function(t){var e=c.c2l(t.pos+f,!0),i=c.l2p(e-o)+h,a=c.l2p(e+s)+h,d=u?(i+a)/2:c.l2p(e)+h,g=l.c2p(t.mean,!0),m=l.c2p(t.mean-t.sd,!0),v=l.c2p(t.mean+t.sd,!0);\"h\"===r.orientation?n.select(this).attr(\"d\",\"M\"+g+\",\"+i+\"V\"+a+(\"sd\"===p?\"m0,0L\"+m+\",\"+d+\"L\"+g+\",\"+i+\"L\"+v+\",\"+d+\"Z\":\"\")):n.select(this).attr(\"d\",\"M\"+i+\",\"+g+\"H\"+a+(\"sd\"===p?\"m0,0L\"+d+\",\"+m+\"L\"+i+\",\"+g+\"L\"+d+\",\"+v+\"Z\":\"\"))}))}e.exports={plot:function(t,e,r,a){var c=e.xaxis,u=e.yaxis;i.makeTraceGroups(a,r,\"trace boxes\").each((function(t){var e,r,i=n.select(this),a=t[0],f=a.t,h=a.trace;(f.wdPos=f.bdPos*h.whiskerwidth,!0!==h.visible||f.empty)?i.remove():(\"h\"===h.orientation?(e=u,r=c):(e=c,r=u),o(i,{pos:e,val:r},h,f),s(i,{x:c,y:u},h,f),l(i,{pos:e,val:r},h,f))}))},plotBoxAndWhiskers:o,plotPoints:s,plotBoxMean:l}},{\"../../components/drawing\":388,\"../../lib\":503,\"@plotly/d3\":58}],683:[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=10)return null;for(var i=1/0,a=-1/0,o=e.length,s=0;s0?Math.floor:Math.ceil,I=L>0?Math.ceil:Math.floor,O=L>0?Math.min:Math.max,z=L>0?Math.max:Math.min,D=P(S+C),R=I(E-C),F=[[f=M(S)]];for(a=D;a*L=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}},{}],697:[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,m,v,y,x=t[\"_\"+e],b=t[e+\"axis\"],_=b._gridlines=[],w=b._minorgridlines=[],T=b._boundarylines=[],k=t[\"_\"+r],A=t[r+\"axis\"];\"array\"===b.tickmode&&(b.tickvals=x.slice());var M=t._xctrl,S=t._yctrl,E=M[0].length,L=M.length,C=t._a.length,P=t._b.length;n.prepTicks(b),\"array\"===b.tickmode&&delete b.tickvals;var I=b.smoothing?3:1;function O(n){var i,a,o,s,l,c,u,f,p,d,g,m,v=[],y=[],x={};if(\"b\"===e)for(a=t.b2j(n),o=Math.floor(Math.max(0,Math.min(P-2,a))),s=a-o,x.length=P,x.crossLength=C,x.xy=function(e){return t.evalxy([],e,a)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},i=0;i0&&(p=t.dxydi([],i-1,o,0,s),v.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),d=t.dxydi([],i-1,o,1,s),v.push(f[0]-d[0]/3),y.push(f[1]-d[1]/3)),v.push(f[0]),y.push(f[1]),l=f;else for(i=t.a2i(n),c=Math.floor(Math.max(0,Math.min(C-2,i))),u=i-c,x.length=C,x.crossLength=P,x.xy=function(e){return t.evalxy([],i,e)},x.dxy=function(e,r){return t.dxydj([],c,e,u,r)},a=0;a0&&(g=t.dxydj([],c,a-1,u,0),v.push(l[0]+g[0]/3),y.push(l[1]+g[1]/3),m=t.dxydj([],c,a-1,u,1),v.push(f[0]-m[0]/3),y.push(f[1]-m[1]/3)),v.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=v,x.y=y,x.smoothing=A.smoothing,x}function z(n){var i,a,o,s,l,c=[],u=[],f={};if(f.length=x.length,f.crossLength=k.length,\"b\"===e)for(o=Math.max(0,Math.min(P-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;ix.length-1||_.push(i(z(o),{color:b.gridcolor,width:b.gridwidth}));for(h=u;hx.length-1||g<0||g>x.length-1))for(m=x[s],v=x[g],a=0;ax[x.length-1]||w.push(i(O(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&T.push(i(z(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(z(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(O(p),{color:b.gridcolor,width:b.gridwidth}));for(h=u-1;hx[x.length-1]||w.push(i(O(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&T.push(i(O(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(O(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{\"../../lib/extend\":493,\"../../plots/cartesian/axes\":554}],698:[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;re.length&&(t=t.slice(0,e.length)):t=[],i=0;i90&&(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(n,e,r),offsetMultplier:c}}},{}],712:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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=c.strRotate,f=c.strTranslate,h=t(\"../../constants/alignment\");function p(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 d(t,e,r,a,o,c,h,p){var d=c.selectAll(\"text.\"+p).data(h);d.enter().append(\"text\").classed(p,!0);var g=0,m={};return d.each((function(o,c){var h;if(\"auto\"===o.axis.tickangle)h=s(a,e,r,o.xy,o.dxy);else{var p=(o.axis.tickangle+180)*Math.PI/180;h=s(a,e,r,o.xy,[Math.cos(p),Math.sin(p)])}c||(m={angle:h.angle,flip:h.flip});var d=(o.endAnchor?-1:1)*h.flip,v=n.select(this).attr({\"text-anchor\":d>0?\"start\":\"end\",\"data-notex\":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,t),y=i.bBox(this);v.attr(\"transform\",f(h.p[0],h.p[1])+u(h.angle)+f(o.axis.labelpadding*d,.3*y.height)),g=Math.max(g,y.width+o.axis.labelpadding)})),d.exit().remove(),m.maxExtent=g,m}e.exports=function(t,e,r,i){var l=e.xaxis,u=e.yaxis,f=t._fullLayout._clips;c.makeTraceGroups(i,r,\"trace\").each((function(e){var r=n.select(this),i=e[0],h=i.trace,g=h.aaxis,m=h.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\",h.opacity),p(l,u,x,g,\"a\",g._gridlines),p(l,u,x,m,\"b\",m._gridlines),p(l,u,y,g,\"a\",g._minorgridlines),p(l,u,y,m,\"b\",m._minorgridlines),p(l,u,b,g,\"a-boundary\",g._boundarylines),p(l,u,b,m,\"b-boundary\",m._boundarylines);var w=d(t,l,u,h,i,_,g._labels,\"a-label\"),T=d(t,l,u,h,i,_,m._labels,\"b-label\");!function(t,e,r,n,i,a,o,l){var u,f,h,p,d=c.aggNums(Math.min,null,r.a),g=c.aggNums(Math.max,null,r.a),m=c.aggNums(Math.min,null,r.b),y=c.aggNums(Math.max,null,r.b);u=.5*(d+g),f=m,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)));v(t,e,r,n,h,p,r.aaxis,i,a,o,\"a-title\"),u=d,f=.5*(m+y),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)));v(t,e,r,n,h,p,r.baxis,i,a,l,\"b-title\")}(t,_,h,i,l,u,w,T),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;f90&&y<270,b=n.select(this);b.text(h.title.text).call(l.convertToTspans,t),x&&(_=(-l.lineCount(b)+m)*g*a-_),b.attr(\"transform\",f(e.p[0],e.p[1])+u(e.angle)+f(0,_)).attr(\"text-anchor\",\"middle\").call(i.font,h.title.font)})),b.exit().remove()}},{\"../../components/drawing\":388,\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"./makepath\":709,\"./map_1d_array\":710,\"./orient_text\":711,\"@plotly/d3\":58}],713:[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],m=r[u-1],v=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=v*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;p-=x,d+=x,g-=b,m+=b,t.isVisible=function(t,e){return t>p&&tg&&ed||em},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&&(ne[c-1]|ir[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,m=0,v=[];ne[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)))),ir[u-1]?(p=u-2,d=1,m=(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(v,f,p,h,d),l[0]+=v[0]*g,l[1]+=v[1]*g),m&&(t.dxydj(v,f,p,h,d),l[0]+=v[0]*m,l[1]+=v[1]*m)}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=v*(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\":523,\"./compute_control_points\":701,\"./constants\":702,\"./create_i_derivative_evaluator\":703,\"./create_j_derivative_evaluator\":704,\"./create_spline_evaluator\":705}],714:[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),e0&&void 0!==(n=t[r-1][e])&&(a++,i+=n),r0&&a0&&i1e-5);return n.log(\"Smoother converged to\",k,\"after\",A,\"iterations\"),t}},{\"../../lib\":503}],715:[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\":503}],716:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../scattergeo/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../plots/attributes\"),s=t(\"../../components/color/attributes\").defaultLine,l=t(\"../../lib/extend\").extendFlat,c=i.marker.line;e.exports=l({locations:{valType:\"data_array\",editType:\"calc\"},locationmode:i.locationmode,z:{valType:\"data_array\",editType:\"calc\"},geojson:l({},i.geojson,{}),featureidkey:i.featureidkey,text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),marker:{line:{color:l({},c.color,{dflt:s}),width:l({},c.width,{dflt:1}),editType:\"calc\"},opacity:{valType:\"number\",arrayOk:!0,min:0,max:1,dflt:1,editType:\"style\"},editType:\"calc\"},selected:{marker:{opacity:i.selected.marker.opacity,editType:\"plot\"},editType:\"plot\"},unselected:{marker:{opacity:i.unselected.marker.opacity,editType:\"plot\"},editType:\"plot\"},hoverinfo:l({},o.hoverinfo,{editType:\"calc\",flags:[\"location\",\"z\",\"text\",\"name\"]}),hovertemplate:n(),showlegend:l({},o.showlegend,{dflt:!1})},a(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))},{\"../../components/color/attributes\":365,\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/template_attributes\":633,\"../scattergeo/attributes\":968}],717:[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\");function l(t){return t&&\"string\"==typeof t}e.exports=function(t,e){var r,c=e._length,u=new Array(c);r=e.geojson?function(t){return l(t)||n(t)}:l;for(var f=0;f\")}(t,f,o),[t]}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"./attributes\":716}],721:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../heatmap/colorbar\"),calc:t(\"./calc\"),calcGeoJSON:t(\"./plot\").calcGeoJSON,plot:t(\"./plot\").plot,style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"choropleth\",basePlotModule:t(\"../../plots/geo\"),categories:[\"geo\",\"noOpacity\",\"showLegend\"],meta:{}}},{\"../../plots/geo\":589,\"../heatmap/colorbar\":795,\"./attributes\":716,\"./calc\":717,\"./defaults\":718,\"./event_data\":719,\"./hover\":720,\"./plot\":722,\"./select\":723,\"./style\":724}],722:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../lib/geo_location_utils\"),o=t(\"../../lib/topojson_utils\").getTopojsonFeatures,s=t(\"../../plots/cartesian/autorange\").findExtremes,l=t(\"./style\").style;e.exports={calcGeoJSON:function(t,e){for(var r=t[0].trace,n=e[r.geo],i=n._subplot,l=r.locationmode,c=r._length,u=\"geojson-id\"===l?a.extractTraceFeature(t):o(r,i.topojson),f=[],h=[],p=0;p=0;n--){var i=r[n].id;if(\"string\"==typeof i&&0===i.indexOf(\"water\"))for(var a=n+1;a=0;r--)t.removeLayer(e[r][1])},s.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new o(t,r.uid),a=i.sourceId,s=n(e),l=i.below=t.belowLookup[\"trace-\"+r.uid];return t.map.addSource(a,{type:\"geojson\",data:s.geojson}),i._addLayers(s,l),e[0].trace._glTrace=i,i}},{\"../../plots/mapbox/constants\":611,\"./convert\":726}],730:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../mesh3d/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,c={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\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:a({editType:\"calc\"},{keys:[\"norm\"]}),uhoverformat:i(\"u\",1),vhoverformat:i(\"v\",1),whoverformat:i(\"w\",1),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),showlegend:l({},s.showlegend,{dflt:!1})};l(c,n(\"\",{colorAttr:\"u/v/w norm\",showScaleDflt:!0,editTypeOverride:\"calc\"}));[\"opacity\",\"lightposition\",\"lighting\"].forEach((function(t){c[t]=o[t]})),c.hoverinfo=l({},s.hoverinfo,{editType:\"calc\",flags:[\"x\",\"y\",\"z\",\"u\",\"v\",\"w\",\"norm\",\"text\",\"name\"],dflt:\"x+y+z+norm+text+name\"}),c.transforms=void 0,e.exports=c},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../mesh3d/attributes\":867}],731:[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;co.level||o.starts.length&&a===o.level)}break;case\"constraint\":if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,l=n.y.length,c=-1/0,u=1/0;for(r=0;r\":p>c&&(n.prefixBoundary=!0);break;case\"<\":(pc||n.starts.length&&h===u)&&(n.prefixBoundary=!0);break;case\"][\":f=Math.min(p[0],p[1]),h=Math.max(p[0],p[1]),fc&&(n.prefixBoundary=!0)}}}},{}],738:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale\"),i=t(\"./make_color_map\"),a=t(\"./end_plus\");e.exports={min:\"zmin\",max:\"zmax\",calc:function(t,e,r){var o=e.contours,s=e.line,l=o.size||1,c=o.coloring,u=i(e,{isColorbar:!0});if(\"heatmap\"===c){var f=n.extractOpts(e);r._fillgradient=f.reversescale?n.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else\"fill\"===c&&(r._fillcolor=u);r._line={color:\"lines\"===c?u:s.color,width:!1!==o.showlines?s.width:0,dash:s.dash},r._levels={start:o.start,end:a(o),size:l}}}},{\"../../components/colorscale\":378,\"./end_plus\":746,\"./make_color_map\":751}],739:[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}}},{}],740:[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,m=r(\"contours.operation\");(g._operation=c[m],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),\"=\"===m?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\":366,\"../../constants/filter_ops\":475,\"./label_defaults\":750,\"fast-isnumeric\":190}],741:[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\":475,\"fast-isnumeric\":190}],742:[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\")}},{}],743:[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),starts:n.extendDeep([],t.starts)})}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;r1e3){n.warn(\"Too many contours, clipping at 1000\",t);break}return l}},{\"../../lib\":503,\"./constraint_mapping\":741,\"./end_plus\":746}],746:[function(t,e,r){\"use strict\";e.exports=function(t){return t.end+t.size/1e6}},{}],747:[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])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]}(f,r,e),p=[s(t,e,[-h[0],-h[1]])],d=t.z.length,g=t.z[0].length,m=e.slice(),v=h.slice();for(c=0;c<1e4;c++){if(f>20?(f=i.CHOOSESADDLE[f][(h[0]||h[1])<0?0:1],t.crossings[u]=i.SADDLEREMAINDER[f]):delete t.crossings[u],!(h=i.NEWDELTA[f])){n.log(\"Found bad marching index:\",f,e,t.level);break}p.push(s(t,e,h)),e[0]+=h[0],e[1]+=h[1],u=e.join(\",\"),a(p[p.length-1],p[p.length-2],o,l)&&p.pop();var y=h[0]&&(e[0]<0||e[0]>g-2)||h[1]&&(e[1]<0||e[1]>d-2);if(e[0]===m[0]&&e[1]===m[1]&&h[0]===v[0]&&h[1]===v[1]||r&&y)break;f=t.crossings[u]}1e4===c&&n.log(\"Infinite loop in contour?\");var x,b,_,w,T,k,A,M,S,E,L,C,P,I,O,z=a(p[0],p[p.length-1],o,l),D=0,R=.2*t.smoothing,F=[],B=0;for(c=1;c=B;c--)if((x=F[c])=B&&x+F[b]M&&S--,t.edgepaths[S]=L.concat(p,E));break}V||(t.edgepaths[M]=p.concat(E))}for(M=0;Mt?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=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;hn.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;b2*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.fontSize,a=e.width+i/3,o=Math.max(0,e.height-i/3),s=t.x,l=t.y,c=t.theta,u=Math.sin(c),f=Math.cos(c),h=function(t,e){return[s+t*f-e*u,l+t*u+e*f]},p=[h(-a/2,-o/2),h(-a/2,o/2),h(a/2,o/2),h(a/2,-o/2)];r.push({text:e.text,x:s,y:l,dy:e.dy,theta:c,level:e.level,width:a,height:o}),n.push(p)},r.drawLabels=function(t,e,r,a,o){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(s.convertToTspans,r)})),o){for(var c=\"\",u=0;ur.end&&(r.start=r.end=(r.start+r.end)/2),t._input.contours||(t._input.contours={}),i.extendFlat(t._input.contours,{start:r.start,end:r.end,size:r.size}),t._input.autocontour=!0}else if(\"constraint\"!==r.type){var c,u=r.start,f=r.end,h=t._input.contours;if(u>f&&(r.start=h.start=f,f=r.end=h.end=u,u=r.start),!(r.size>0))c=u===f?1:a(u,f,t.ncontours).dtick,h.size=r.size=c}}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554}],755:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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\":388,\"../heatmap/style\":805,\"./make_color_map\":751,\"@plotly/d3\":58}],756:[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\":376,\"./label_defaults\":750}],757:[function(t,e,r){\"use strict\";var n=t(\"../heatmap/attributes\"),i=t(\"../contour/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../lib/extend\").extendFlat,s=i.contours;e.exports=o({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,hovertext:n.hovertext,transpose:n.transpose,atype:n.xtype,btype:n.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:s.type,start:s.start,end:s.end,size:s.size,coloring:{valType:\"enumerated\",values:[\"fill\",\"lines\",\"none\"],dflt:\"fill\",editType:\"calc\"},showlines:s.showlines,showlabels:s.showlabels,labelfont:s.labelfont,labelformat:s.labelformat,operation:s.operation,value:s.value,editType:\"calc\",impliedEdits:{autocontour:!1}},line:{color:i.line.color,width:i.line.width,dash:i.line.dash,smoothing:i.line.smoothing,editType:\"plot\"},transforms:void 0},a(\"\",{cLetter:\"z\",autoColorDflt:!1}))},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../contour/attributes\":735,\"../heatmap/attributes\":792}],758:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\"),i=t(\"../../lib\"),a=t(\"../heatmap/convert_column_xyz\"),o=t(\"../heatmap/clean_2d_array\"),s=t(\"../heatmap/interp2d\"),l=t(\"../heatmap/find_empties\"),c=t(\"../heatmap/make_bound_array\"),u=t(\"./defaults\"),f=t(\"../carpet/lookup_carpetid\"),h=t(\"../contour/set_contours\");e.exports=function(t,e){var r=e._carpetTrace=f(t,e);if(r&&r.visible&&\"legendonly\"!==r.visible){if(!e.a||!e.b){var p=t.data[r.index],d=t.data[e.index];d.a||(d.a=p.a),d.b||(d.b=p.b),u(d,e,e._defaultColor,t._fullLayout)}var g=function(t,e){var r,u,f,h,p,d,g,m=e._carpetTrace,v=m.aaxis,y=m.baxis;v._minDtick=0,y._minDtick=0,i.isArray1D(e.z)&&a(e,v,y,\"a\",\"b\",[\"z\"]);r=e._a=e._a||e.a,h=e._b=e._b||e.b,r=r?v.makeCalcdata(e,\"_a\"):[],h=h?y.makeCalcdata(e,\"_b\"):[],u=e.a0||0,f=e.da||1,p=e.b0||0,d=e.db||1,g=e._z=o(e._z||e.z,e.transpose),e._emptypoints=l(g),s(g,e._emptypoints);var x=i.maxRowLength(g),b=\"scaled\"===e.xtype?\"\":r,_=c(e,b,u,f,x,v),w=\"scaled\"===e.ytype?\"\":h,T=c(e,w,p,d,g.length,y),k={a:_,b:T,z:g};\"levels\"===e.contours.type&&\"none\"!==e.contours.coloring&&n(t,e,{vals:g,containerStr:\"\",cLetter:\"z\"});return[k]}(t,e);return h(e,e._z),g}}},{\"../../components/colorscale/calc\":374,\"../../lib\":503,\"../carpet/lookup_carpetid\":708,\"../contour/set_contours\":754,\"../heatmap/clean_2d_array\":794,\"../heatmap/convert_column_xyz\":796,\"../heatmap/find_empties\":798,\"../heatmap/interp2d\":801,\"../heatmap/make_bound_array\":803,\"./defaults\":759}],759:[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\":503,\"../contour/constraint_defaults\":740,\"../contour/contours_defaults\":742,\"../contour/style_defaults\":756,\"../heatmap/xyz_defaults\":807,\"./attributes\":757}],760:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../contour/colorbar\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../contour/style\"),moduleType:\"trace\",name:\"contourcarpet\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"carpet\",\"contour\",\"symbols\",\"showLegend\",\"hasLines\",\"carpetDependent\",\"noHover\",\"noSortingByValue\"],meta:{}}},{\"../../plots/cartesian\":568,\"../contour/colorbar\":738,\"../contour/style\":755,\"./attributes\":757,\"./calc\":758,\"./defaults\":759,\"./plot\":761}],761:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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(\"../contour/empty_pathinfo\"),d=t(\"../contour/close_boundaries\"),g=t(\"../carpet/lookup_carpetid\"),m=t(\"../carpet/axis_aligned_line\");function v(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 y(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function x(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,b){var _=e.xaxis,w=e.yaxis;s.makeTraceGroups(b,r,\"contour\").each((function(r){var b=n.select(this),T=r[0],k=T.trace,A=k._carpetTrace=g(t,k),M=t.calcdata[A.index][0];if(A.visible&&\"legendonly\"!==A.visible){var S=T.a,E=T.b,L=k.contours,C=p(L,e,T),P=\"constraint\"===L.type,I=L._operation,O=P?\"=\"===I?\"lines\":\"fill\":L.coloring,z=[[S[0],E[E.length-1]],[S[S.length-1],E[E.length-1]],[S[S.length-1],E[0]],[S[0],E[0]]];l(C);var D=1e-8*(S[S.length-1]-S[0]),R=1e-8*(E[E.length-1]-E[0]);c(C,D,R);var F,B,N,j,U=C;\"constraint\"===L.type&&(U=h(C,I)),function(t,e){var r,n,i,a,o,s,l,c,u;for(r=0;r=0;j--)F=M.clipsegments[j],B=i([],F.x,_.c2p),N=i([],F.y,w.c2p),B.reverse(),N.reverse(),V.push(a(B,N,F.bicubic));var H=\"M\"+V.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=0&&(h=L,d=g):Math.abs(f[1]-h[1])=0&&(h=L,d=g):s.log(\"endpt to newendpt is not vert. or horz.\",f,h,L)}if(d>=0)break;y+=S(f,h),f=h}if(d===e.edgepaths.length){s.log(\"unclosed perimeter path\");break}u=d,(b=-1===x.indexOf(u))&&(u=x[0],y+=S(f,h)+\"Z\",f=null)}for(u=0;um&&(n.max=m);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/I),f.LABELMAX),a=0;a0?+p[u]:0),f.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:v},properties:y})}}var b=o.extractOpts(e),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],T=[\"interpolate\",[\"linear\"],[\"heatmap-density\"],0,a.opacity(w)<1?w:a.addOpacity(w,0)];for(u=1;u<_.length;u++)T.push(_[u][0],_[u][1]);var k=[\"interpolate\",[\"linear\"],[\"get\",\"z\"],b.min,0,b.max,1];return i.extendFlat(c.heatmap.paint,{\"heatmap-weight\":d?k:1/(b.max-b.min),\"heatmap-color\":T,\"heatmap-radius\":g?{type:\"identity\",property:\"r\"}:e.radius,\"heatmap-opacity\":e.opacity}),c.geojson={type:\"FeatureCollection\",features:f},c.heatmap.layout.visibility=\"visible\",c}},{\"../../components/color\":366,\"../../components/colorscale\":378,\"../../constants/numerical\":479,\"../../lib\":503,\"../../lib/geojson_utils\":497,\"fast-isnumeric\":190}],765:[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(\"lon\")||[],c=s(\"lat\")||[],u=Math.min(l.length,c.length);u?(e._length=u,s(\"z\"),s(\"radius\"),s(\"below\"),s(\"text\"),s(\"hovertext\"),s(\"hovertemplate\"),i(t,e,o,s,{prefix:\"\",cLetter:\"z\"})):e.visible=!1}},{\"../../components/colorscale/defaults\":376,\"../../lib\":503,\"./attributes\":762}],766:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.z=e.z,t}},{}],767:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../scattermapbox/hover\").hoverPoints,a=t(\"../scattermapbox/hover\").getExtraText;e.exports=function(t,e,r){var o=i(t,e,r);if(o){var s=o[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,\"z\"in u){var f=s.subplot.mockAxis;s.z=u.z,s.zLabel=n.tickText(f,f.c2l(u.z),\"hover\").text}return s.extraText=a(c,u,l[0].t.labels),[s]}}},{\"../../plots/cartesian/axes\":554,\"../scattermapbox/hover\":996}],768:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../heatmap/colorbar\"),formatLabels:t(\"../scattermapbox/format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),getBelow:function(t,e){for(var r=e.getMapLayers(),n=0;n=0;r--)t.removeLayer(e[r][1])},o.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new a(t,r.uid),o=i.sourceId,s=n(e),l=i.below=t.belowLookup[\"trace-\"+r.uid];return t.map.addSource(o,{type:\"geojson\",data:s.geojson}),i._addLayers(s,l),i}},{\"../../plots/mapbox/constants\":611,\"./convert\":764}],770:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){for(var r=0;r\"),l.color=function(t,e){var r=t.marker,i=e.mc||r.color,a=e.mlc||r.line.color,o=e.mlw||r.line.width;if(n(i))return i;if(n(a)&&o)return a}(u,h),[l]}}},{\"../../components/color\":366,\"../../lib\":503,\"../bar/hover\":655}],778:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\"),plot:t(\"./plot\"),style:t(\"./style\").style,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"../bar/select\"),moduleType:\"trace\",name:\"funnel\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"../bar/select\":660,\"./attributes\":771,\"./calc\":772,\"./cross_trace_calc\":774,\"./defaults\":775,\"./event_data\":776,\"./hover\":777,\"./layout_attributes\":779,\"./layout_defaults\":780,\"./plot\":781,\"./style\":782}],779:[function(t,e,r){\"use strict\";e.exports={funnelmode:{valType:\"enumerated\",values:[\"stack\",\"group\",\"overlay\"],dflt:\"stack\",editType:\"calc\"},funnelgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},funnelgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],780:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s path\").each((function(t){if(!t.isBlank){var e=s.marker;n.select(this).call(a.fill,t.mc||e.color).call(a.stroke,t.mlc||e.line.color).call(i.dashLine,e.line.dash,t.mlw||e.line.width).style(\"opacity\",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(\".regions\").each((function(){n.select(this).selectAll(\"path\").style(\"stroke-width\",0).call(a.fill,s.connector.fillcolor)})),r.selectAll(\".lines\").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll(\"path\"),t.width,t.color,t.dash)}))}))}}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../constants/interactions\":478,\"../bar/style\":662,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],783:[function(t,e,r){\"use strict\";var n=t(\"../pie/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/domain\").attributes,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../../plots/template_attributes\").texttemplateAttrs,l=t(\"../../lib/extend\").extendFlat;e.exports={labels:n.labels,label0:n.label0,dlabel:n.dlabel,values:n.values,marker:{colors:n.marker.colors,line:{color:l({},n.marker.line.color,{dflt:null}),width:l({},n.marker.line.width,{dflt:1}),editType:\"calc\"},editType:\"calc\"},text:n.text,hovertext:n.hovertext,scalegroup:l({},n.scalegroup,{}),textinfo:l({},n.textinfo,{flags:[\"label\",\"text\",\"value\",\"percent\"]}),texttemplate:s({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),hoverinfo:l({},i.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:o({},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),textposition:l({},n.textposition,{values:[\"inside\",\"none\"],dflt:\"inside\"}),textfont:n.textfont,insidetextfont:n.insidetextfont,title:{text:n.title.text,font:n.title.font,position:l({},n.title.position,{values:[\"top left\",\"top center\",\"top right\"],dflt:\"top center\"}),editType:\"plot\"},domain:a({name:\"funnelarea\",trace:!0,editType:\"calc\"}),aspectratio:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},baseratio:{valType:\"number\",min:0,max:1,dflt:.333,editType:\"plot\"}}},{\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/domain\":584,\"../../plots/template_attributes\":633,\"../pie/attributes\":900}],784:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"funnelarea\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":619}],785:[function(t,e,r){\"use strict\";var n=t(\"../pie/calc\");e.exports={calc:function(t,e){return n.calc(t,e)},crossTraceCalc:function(t){n.crossTraceCalc(t,{type:\"funnelarea\"})}}},{\"../pie/calc\":902}],786:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../plots/domain\").defaults,o=t(\"../bar/defaults\").handleText,s=t(\"../pie/defaults\").handleLabelsAndValues;e.exports=function(t,e,r,l){function c(r,a){return n.coerce(t,e,i,r,a)}var u=c(\"labels\"),f=c(\"values\"),h=s(u,f),p=h.len;if(e._hasLabels=h.hasLabels,e._hasValues=h.hasValues,!e._hasLabels&&e._hasValues&&(c(\"label0\"),c(\"dlabel\")),p){e._length=p,c(\"marker.line.width\")&&c(\"marker.line.color\",l.paper_bgcolor),c(\"marker.colors\"),c(\"scalegroup\");var d,g=c(\"text\"),m=c(\"texttemplate\");if(m||(d=c(\"textinfo\",Array.isArray(g)?\"text+percent\":\"percent\")),c(\"hovertext\"),c(\"hovertemplate\"),m||d&&\"none\"!==d){var v=c(\"textposition\");o(t,e,l,c,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}a(e,l,c),c(\"title.text\")&&(c(\"title.position\"),n.coerceFont(c,\"title.font\",l.font)),c(\"aspectratio\"),c(\"baseratio\")}else e.visible=!1}},{\"../../lib\":503,\"../../plots/domain\":584,\"../bar/defaults\":652,\"../pie/defaults\":903,\"./attributes\":783}],787:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"funnelarea\",basePlotModule:t(\"./base_plot\"),categories:[\"pie-like\",\"funnelarea\",\"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\"),style:t(\"./style\"),styleOne:t(\"../pie/style_one\"),meta:{}}},{\"../pie/style_one\":911,\"./attributes\":783,\"./base_plot\":784,\"./calc\":785,\"./defaults\":786,\"./layout_attributes\":788,\"./layout_defaults\":789,\"./plot\":790,\"./style\":791}],788:[function(t,e,r){\"use strict\";var n=t(\"../pie/layout_attributes\").hiddenlabels;e.exports={hiddenlabels:n,funnelareacolorway:{valType:\"colorlist\",editType:\"calc\"},extendfunnelareacolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{\"../pie/layout_attributes\":907}],789:[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(\"funnelareacolorway\",e.colorway),r(\"extendfunnelareacolors\")}},{\"../../lib\":503,\"./layout_attributes\":788}],790:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/drawing\"),a=t(\"../../lib\"),o=a.strScale,s=a.strTranslate,l=t(\"../../lib/svg_text_utils\"),c=t(\"../bar/plot\").toMoveInsideBar,u=t(\"../bar/uniform_text\"),f=u.recordMinTextSize,h=u.clearMinTextSize,p=t(\"../pie/helpers\"),d=t(\"../pie/plot\"),g=d.attachFxHandlers,m=d.determineInsideTextFont,v=d.layoutAreas,y=d.prerenderTitles,x=d.positionTitleOutside,b=d.formatSliceLabel;function _(t,e){return\"l\"+(e[0]-t[0])+\",\"+(e[1]-t[1])}e.exports=function(t,e){var r=t._fullLayout;h(\"funnelarea\",r),y(e,t),v(e,r._size),a.makeTraceGroups(r._funnelarealayer,e,\"trace\").each((function(e){var u=n.select(this),h=e[0],d=h.trace;!function(t){if(!t.length)return;var e=t[0],r=e.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a,o=Math.pow(i,2),s=e.vTotal,l=s,c=s*o/(1-o)/s;function u(){var t,e={x:t=Math.sqrt(c),y:-t};return[e.x,e.y]}var f,h,p=[];for(p.push(u()),f=t.length-1;f>-1;f--)if(!(h=t[f]).hidden){var d=h.v/l;c+=d,p.push(u())}var g=1/0,m=-1/0;for(f=0;f-1;f--)if(!(h=t[f]).hidden){var A=p[k+=1][0],M=p[k][1];h.TL=[-A,M],h.TR=[A,M],h.BL=w,h.BR=T,h.pxmid=(S=h.TR,E=h.BR,[.5*(S[0]+E[0]),.5*(S[1]+E[1])]),w=h.TL,T=h.TR}var S,E}(e),u.each((function(){var u=n.select(this).selectAll(\"g.slice\").data(e);u.enter().append(\"g\").classed(\"slice\",!0),u.exit().remove(),u.each((function(o,s){if(o.hidden)n.select(this).selectAll(\"path,g\").remove();else{o.pointNumber=o.i,o.curveNumber=d.index;var u=h.cx,v=h.cy,y=n.select(this),x=y.selectAll(\"path.surface\").data([o]);x.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":\"all\"}),y.call(g,t,e);var w=\"M\"+(u+o.TR[0])+\",\"+(v+o.TR[1])+_(o.TR,o.BR)+_(o.BR,o.BL)+_(o.BL,o.TL)+\"Z\";x.attr(\"d\",w),b(t,o,h);var T=p.castOption(d.textposition,o.pts),k=y.selectAll(\"g.slicetext\").data(o.text&&\"none\"!==T?[0]:[]);k.enter().append(\"g\").classed(\"slicetext\",!0),k.exit().remove(),k.each((function(){var h=a.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),p=a.ensureUniformFontSize(t,m(d,o,r.font));h.text(o.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(i.font,p).call(l.convertToTspans,t);var g,y,x,b=i.bBox(h.node()),_=Math.min(o.BL[1],o.BR[1])+v,w=Math.max(o.TL[1],o.TR[1])+v;y=Math.max(o.TL[0],o.BL[0])+u,x=Math.min(o.TR[0],o.BR[0])+u,(g=c(y,x,_,w,b,{isHorizontal:!0,constrained:!0,angle:0,anchor:\"middle\"})).fontSize=p.size,f(d.type,g,r),e[s].transform=g,h.attr(\"transform\",a.getTextTransform(g))}))}}));var v=n.select(this).selectAll(\"g.titletext\").data(d.title.text?[0]:[]);v.enter().append(\"g\").classed(\"titletext\",!0),v.exit().remove(),v.each((function(){var e=a.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),c=d.title.text;d._meta&&(c=a.templateString(c,d._meta)),e.text(c).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(i.font,d.title.font).call(l.convertToTspans,t);var u=x(h,r._size);e.attr(\"transform\",s(u.x,u.y)+o(Math.min(1,u.scale))+s(u.tx,u.ty))}))}))}))}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../bar/plot\":659,\"../bar/uniform_text\":664,\"../pie/helpers\":905,\"../pie/plot\":909,\"@plotly/d3\":58}],791:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../pie/style_one\"),a=t(\"../bar/uniform_text\").resizeText;e.exports=function(t){var e=t._fullLayout._funnelarealayer.selectAll(\".trace\");a(t,e,\"funnelarea\"),e.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)}))}))}},{\"../bar/uniform_text\":664,\"../pie/style_one\":911,\"@plotly/d3\":58}],792:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/font_attributes\"),o=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../plots/template_attributes\").texttemplateAttrs,c=t(\"../../components/colorscale/attributes\"),u=t(\"../../lib/extend\").extendFlat;e.exports=u({z:{valType:\"data_array\",editType:\"calc\"},x:u({},n.x,{impliedEdits:{xtype:\"array\"}}),x0:u({},n.x0,{impliedEdits:{xtype:\"scaled\"}}),dx:u({},n.dx,{impliedEdits:{xtype:\"scaled\"}}),y:u({},n.y,{impliedEdits:{ytype:\"array\"}}),y0:u({},n.y0,{impliedEdits:{ytype:\"scaled\"}}),dy:u({},n.dy,{impliedEdits:{ytype:\"scaled\"}}),xperiod:u({},n.xperiod,{impliedEdits:{xtype:\"scaled\"}}),yperiod:u({},n.yperiod,{impliedEdits:{ytype:\"scaled\"}}),xperiod0:u({},n.xperiod0,{impliedEdits:{xtype:\"scaled\"}}),yperiod0:u({},n.yperiod0,{impliedEdits:{ytype:\"scaled\"}}),xperiodalignment:u({},n.xperiodalignment,{impliedEdits:{xtype:\"scaled\"}}),yperiodalignment:u({},n.yperiodalignment,{impliedEdits:{ytype:\"scaled\"}}),text:{valType:\"data_array\",editType:\"calc\"},hovertext:{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\"},hoverongaps:{valType:\"boolean\",dflt:!0,editType:\"none\"},connectgaps:{valType:\"boolean\",editType:\"calc\"},xgap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},ygap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},xhoverformat:o(\"x\"),yhoverformat:o(\"y\"),zhoverformat:o(\"z\",1),hovertemplate:s(),texttemplate:l({arrayOk:!1,editType:\"plot\"},{keys:[\"x\",\"y\",\"z\",\"text\"]}),textfont:a({editType:\"plot\",autoSize:!0,autoColor:!0,colorEditType:\"style\"}),showlegend:u({},i.showlegend,{dflt:!1})},{transforms:void 0},c(\"\",{cLetter:\"z\",autoColorDflt:!1}))},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/font_attributes\":585,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926}],793:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../plots/cartesian/align_period\"),s=t(\"../histogram2d/calc\"),l=t(\"../../components/colorscale/calc\"),c=t(\"./convert_column_xyz\"),u=t(\"./clean_2d_array\"),f=t(\"./interp2d\"),h=t(\"./find_empties\"),p=t(\"./make_bound_array\"),d=t(\"../../constants/numerical\").BADNUM;function g(t){for(var e=[],r=t.length,n=0;nD){O(\"x scale is not linear\");break}}if(x.length&&\"fast\"===P){var R=(x[x.length-1]-x[0])/(x.length-1),F=Math.abs(R/100);for(k=0;kF){O(\"y scale is not linear\");break}}}var B=i.maxRowLength(T),N=\"scaled\"===e.xtype?\"\":r,j=p(e,N,m,v,B,M),U=\"scaled\"===e.ytype?\"\":x,V=p(e,U,b,_,T.length,S);C||(e._extremes[M._id]=a.findExtremes(M,j),e._extremes[S._id]=a.findExtremes(S,V));var H={x:j,y:V,z:T,text:e._text||e.text,hovertext:e._hovertext||e.hovertext};if(e.xperiodalignment&&y&&(H.orig_x=y),e.yperiodalignment&&w&&(H.orig_y=w),N&&N.length===j.length-1&&(H.xCenter=N),U&&U.length===V.length-1&&(H.yCenter=U),L&&(H.xRanges=A.xRanges,H.yRanges=A.yRanges,H.pts=A.pts),E||l(t,e,{vals:T,cLetter:\"z\"}),E&&e.contours&&\"heatmap\"===e.contours.coloring){var q={type:\"contour\"===e.type?\"heatmap\":\"histogram2d\",xcalendar:e.xcalendar,ycalendar:e.ycalendar};H.xfill=p(q,N,m,v,B,M),H.yfill=p(q,U,b,_,T.length,S)}return[H]}},{\"../../components/colorscale/calc\":374,\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/align_period\":551,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"../histogram2d/calc\":826,\"./clean_2d_array\":794,\"./convert_column_xyz\":796,\"./find_empties\":798,\"./interp2d\":801,\"./make_bound_array\":803}],794:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e,r,o){var s,l,c,u,f,h;function p(t){if(n(t))return+t}if(e&&e.transpose){for(s=0,f=0;f=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]}))}},{\"../../lib\":503}],799:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../components/colorscale\").extractOpts;e.exports=function(t,e,r,s,l){l||(l={});var c,u,f,h,p=l.isContour,d=t.cd[0],g=d.trace,m=t.xa,v=t.ya,y=d.x,x=d.y,b=d.z,_=d.xCenter,w=d.yCenter,T=d.zmask,k=g.zhoverformat,A=y,M=x;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>=b[0].length||h<0||h>b.length)return}else{if(n.inbox(e-y[0],e-y[y.length-1],0)>0||n.inbox(r-x[0],r-x[x.length-1],0)>0)return;if(p){var S;for(A=[2*y[0]-y[1]],S=1;Sg&&(v=Math.max(v,Math.abs(t[a][o]-d)/(m-g))))}return v}e.exports=function(t,e){var r,i=1;for(o(t,e),r=0;r.01;r++)i=o(t,e,a(i));return i>.01&&n.log(\"interp2d didn't converge quickly\",i),t}},{\"../../lib\":503}],802:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){t(\"texttemplate\");var r=n.extendFlat({},e.font,{color:\"auto\",size:\"auto\"});n.coerceFont(t,\"textfont\",r)}},{\"../../lib\":503}],803:[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;u0;)_=w.c2p(R[S]),S--;for(_0;)M=T.c2p(F[S]),S--;if(MGt||Gt>T._length))for(E=Ut;EWt||Wt>w._length)){var Xt=u({x:Yt,y:qt},I,t._fullLayout);Xt.x=Yt,Xt.y=qt;var Zt=P.z[S][E];void 0===Zt?(Xt.z=\"\",Xt.zLabel=\"\"):(Xt.z=Zt,Xt.zLabel=s.tickText(Ft,Zt,\"hover\").text);var Jt=P.text&&P.text[S]&&P.text[S][E];void 0!==Jt&&!1!==Jt||(Jt=\"\"),Xt.text=Jt;var Kt=l.texttemplateString(Dt,Xt,t._fullLayout._d3locale,Xt,I._meta||{});if(Kt){var Qt=Kt.split(\"
\"),$t=Qt.length,te=0;for(L=0;L<$t;L++)te=Math.max(te,Qt[L].length);Ht.push({l:$t,c:te,t:Kt,x:Wt,y:Gt,z:Zt})}}}}var ee=I.textfont,re=ee.family,ne=ee.size,ie=t._fullLayout.font.size;if(!ne||\"auto\"===ne){var ae=1/0,oe=1/0,se=0,le=0;for(L=0;L0&&(a=!0);for(var l=0;la){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]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],m=Math.min(f(d+h,d+p,n,a),f(g+h,g+p,n,a)),v=Math.min(f(d+c,d+h,n,a),f(g+c,g+h,n,a));if(m>v&&vo){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(cr.r2l(B)&&(j=o.tickIncrement(j,b.size,!0,p)),z.start=r.l2r(j),F||i.nestedProperty(e,v+\".start\").set(z.start)}var U=b.end,V=r.r2l(O.end),H=void 0!==V;if((b.endFound||H)&&V!==r.r2l(U)){var q=H?V:i.aggNums(Math.max,null,d);z.end=r.l2r(q),H||i.nestedProperty(e,v+\".start\").set(z.end)}var G=\"autobin\"+s;return!1===e._input[G]&&(e._input[v]=i.extendFlat({},e[v]||{}),delete e._input[G],delete e[G]),[z,d]}e.exports={calc:function(t,e){var r,a,p,d,g=[],m=[],v=\"h\"===e.orientation,y=o.getFromId(t,v?e.yaxis:e.xaxis),x=v?\"y\":\"x\",b={x:\"y\",y:\"x\"}[x],_=e[x+\"calendar\"],w=e.cumulative,T=h(t,e,y,x),k=T[0],A=T[1],M=\"string\"==typeof k.size,S=[],E=M?S:k,L=[],C=[],P=[],I=0,O=e.histnorm,z=e.histfunc,D=-1!==O.indexOf(\"density\");w.enabled&&D&&(O=O.replace(/ ?density$/,\"\"),D=!1);var R,F=\"max\"===z||\"min\"===z?null:0,B=l.count,N=c[O],j=!1,U=function(t){return y.r2c(t,0,_)};for(i.isArrayOrTypedArray(e[b])&&\"count\"!==z&&(R=e[b],j=\"avg\"===z,B=l[z]),r=U(k.start),p=U(k.end)+(r-o.tickIncrement(r,k.size,!1,_))/1e6;r=0&&d=0;n--)s(n);else if(\"increasing\"===e){for(n=1;n=0;n--)t[n]+=t[n+1];\"exclude\"===r&&(t.push(0),t.shift())}}(m,w.direction,w.currentbin);var K=Math.min(g.length,m.length),Q=[],$=0,tt=K-1;for(r=0;r=$;r--)if(m[r]){tt=r;break}for(r=$;r<=tt;r++)if(n(g[r])&&n(m[r])){var et={p:g[r],s:m[r],b:0};w.enabled||(et.pts=P[r],Y?et.ph0=et.ph1=P[r].length?A[P[r][0]]:g[r]:(e._computePh=!0,et.ph0=q(S[r]),et.ph1=q(S[r+1],!0))),Q.push(et)}return 1===Q.length&&(Q[0].width1=o.tickIncrement(Q[0].p,k.size,!1,_)-Q[0].p),s(Q,e),i.isArrayOrTypedArray(e.selectedpoints)&&i.tagSelected(Q,e,Z),Q},calcAllAutoBins:h}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"../bar/arrays_to_calcdata\":647,\"./average\":813,\"./bin_functions\":815,\"./bin_label_vals\":816,\"./norm_functions\":824,\"fast-isnumeric\":190}],818:[function(t,e,r){\"use strict\";e.exports={eventDataKeys:[\"binNumber\"]}},{}],819:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axis_ids\"),a=t(\"../../registry\").traceIs,o=t(\"../bar/defaults\").handleGroupingDefaults,s=n.nestedProperty,l=t(\"../../plots/cartesian/constraints\").getAxisGroup,c=[{aStr:{x:\"xbins.start\",y:\"ybins.start\"},name:\"start\"},{aStr:{x:\"xbins.end\",y:\"ybins.end\"},name:\"end\"},{aStr:{x:\"xbins.size\",y:\"ybins.size\"},name:\"size\"},{aStr:{x:\"nbinsx\",y:\"nbinsy\"},name:\"nbins\"}],u=[\"x\",\"y\"];e.exports=function(t,e){var r,f,h,p,d,g,m,v=e._histogramBinOpts={},y=[],x={},b=[];function _(t,e){return n.coerce(r._input,r,r._module.attributes,t,e)}function w(t){return\"v\"===t.orientation?\"x\":\"y\"}function T(t,r,a){var o=t.uid+\"__\"+a;r||(r=o);var s=function(t,r){return i.getFromTrace({_fullLayout:e},t,r).type}(t,a),l=t[a+\"calendar\"]||\"\",c=v[r],u=!0;c&&(s===c.axType&&l===c.calendar?(u=!1,c.traces.push(t),c.dirs.push(a)):(r=o,s!==c.axType&&n.warn([\"Attempted to group the bins of trace\",t.index,\"set on a\",\"type:\"+s,\"axis\",\"with bins on\",\"type:\"+c.axType,\"axis.\"].join(\" \")),l!==c.calendar&&n.warn([\"Attempted to group the bins of trace\",t.index,\"set with a\",l,\"calendar\",\"with bins\",c.calendar?\"on a \"+c.calendar+\" calendar\":\"w/o a set calendar\"].join(\" \")))),u&&(v[r]={traces:[t],dirs:[a],axType:s,calendar:t[a+\"calendar\"]||\"\"}),t[\"_\"+a+\"bingroup\"]=r}for(d=0;dS&&T.splice(S,T.length-S),M.length>S&&M.splice(S,M.length-S);var E=[],L=[],C=[],P=\"string\"==typeof w.size,I=\"string\"==typeof A.size,O=[],z=[],D=P?O:w,R=I?z:A,F=0,B=[],N=[],j=e.histnorm,U=e.histfunc,V=-1!==j.indexOf(\"density\"),H=\"max\"===U||\"min\"===U?null:0,q=a.count,G=o[j],Y=!1,W=[],X=[],Z=\"z\"in e?e.z:\"marker\"in e&&Array.isArray(e.marker.color)?e.marker.color:\"\";Z&&\"count\"!==U&&(Y=\"avg\"===U,q=a[U]);var J=w.size,K=x(w.start),Q=x(w.end)+(K-i.tickIncrement(K,J,!1,v))/1e6;for(r=K;r=0&&p=0&&d-1,flipY:E.tiling.flip.indexOf(\"y\")>-1,orientation:E.tiling.orientation,pad:{inner:E.tiling.pad},maxDepth:E._maxDepth}).descendants(),O=1/0,z=-1/0;I.forEach((function(t){var e=t.depth;e>=E._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(O=Math.min(O,e),z=Math.max(z,e))})),p=p.data(I,u.getPtId),E._maxVisibleLayers=isFinite(z)?z-O+1:0,p.enter().append(\"g\").classed(\"slice\",!0),T(p,!1,{},[g,m],x),p.order();var D=null;if(w&&M){var R=u.getPtId(M);p.each((function(t){null===D&&u.getPtId(t)===R&&(D={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var F=function(){return D||{x0:0,x1:g,y0:0,y1:m}},B=p;return w&&(B=B.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),B.each((function(s){s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-E.tiling.pad),s._hoverY=y(P?s.y1-E.tiling.pad/2:s.y0+E.tiling.pad/2);var p=n.select(this),d=i.ensureSingle(p,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?d.transition().attrTween(\"d\",(function(t){var e=k(t,!1,F(),[g,m],{orientation:E.tiling.orientation,flipX:E.tiling.flip.indexOf(\"x\")>-1,flipY:E.tiling.flip.indexOf(\"y\")>-1});return function(t){return x(e(t))}})):d.attr(\"d\",x),p.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{isTransitioning:t._transitioning}),d.call(l,s,E,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text=\"\":s._text=h(s,r,E,e,S)||\"\";var T=i.ensureSingle(p,\"g\",\"slicetext\"),M=i.ensureSingle(T,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),I=i.ensureUniformFontSize(t,u.determineTextFont(E,s,S.font));M.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",C?\"end\":L?\"start\":\"middle\").call(a.font,I).call(o.convertToTspans,t),s.textBB=a.bBox(M.node()),s.transform=b(s,{fontSize:I.size}),s.transform.fontSize=I.size,w?M.transition().attrTween(\"transform\",(function(t){var e=A(t,!1,F(),[g,m]);return function(t){return _(e(t))}})):M.attr(\"transform\",_(s))})),D}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../sunburst/fx\":1050,\"../sunburst/helpers\":1051,\"../sunburst/plot\":1055,\"../treemap/constants\":1074,\"./partition\":842,\"./style\":844,\"@plotly/d3\":58}],839:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"icicle\",basePlotModule:t(\"./base_plot\"),categories:[],animatable:!0,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\"),style:t(\"./style\").style,colorbar:t(\"../scatter/marker_colorbar\"),meta:{}}},{\"../scatter/marker_colorbar\":944,\"./attributes\":834,\"./base_plot\":835,\"./calc\":836,\"./defaults\":837,\"./layout_attributes\":840,\"./layout_defaults\":841,\"./plot\":843,\"./style\":844}],840:[function(t,e,r){\"use strict\";e.exports={iciclecolorway:{valType:\"colorlist\",editType:\"calc\"},extendiciclecolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],841:[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(\"iciclecolorway\",e.colorway),r(\"extendiciclecolors\")}},{\"../../lib\":503,\"./layout_attributes\":840}],842:[function(t,e,r){\"use strict\";var n=t(\"d3-hierarchy\"),i=t(\"../treemap/flip_tree\");e.exports=function(t,e,r){var a=r.flipX,o=r.flipY,s=\"h\"===r.orientation,l=r.maxDepth,c=e[0],u=e[1];l&&(c=(t.height+1)*e[0]/Math.min(t.height+1,l),u=(t.height+1)*e[1]/Math.min(t.height+1,l));var f=n.partition().padding(r.pad.inner).size(s?[e[1],c]:[e[0],u])(t);return(s||a||o)&&i(f,e,{swapXY:s,flipX:a,flipY:o}),f}},{\"../treemap/flip_tree\":1079,\"d3-hierarchy\":115}],843:[function(t,e,r){\"use strict\";var n=t(\"../treemap/draw\"),i=t(\"./draw_descendants\");e.exports=function(t,e,r,a){return n(t,e,r,a,{type:\"icicle\",drawDescendants:i})}},{\"../treemap/draw\":1076,\"./draw_descendants\":838}],844:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../bar/uniform_text\").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,\"marker.line.color\")||i.defaultLine,c=a.castOption(r,s,\"marker.line.width\")||0;t.style(\"stroke-width\",c).call(i.fill,n.color).call(i.stroke,l).style(\"opacity\",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._iciclelayer.selectAll(\".trace\");o(t,e,\"icicle\"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style(\"opacity\",r.opacity),e.selectAll(\"path.surface\").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{\"../../components/color\":366,\"../../lib\":503,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],845:[function(t,e,r){\"use strict\";for(var n=t(\"../../plots/attributes\"),i=t(\"../../plots/template_attributes\").hovertemplateAttrs,a=t(\"../../lib/extend\").extendFlat,o=t(\"./constants\").colormodel,s=[\"rgb\",\"rgba\",\"rgba256\",\"hsl\",\"hsla\"],l=[],c=[],u=0;u0||n.inbox(r-o.y0,r-(o.y0+o.h*s.dy),0)>0)){var u,f=Math.floor((e-o.x0)/s.dx),h=Math.floor(Math.abs(r-o.y0)/s.dy);if(s._hasZ?u=o.z[h][f]:s._hasSource&&(u=s._canvas.el.getContext(\"2d\").getImageData(f,h,1,1).data),u){var p,d=o.hi||s.hoverinfo;if(d){var g=d.split(\"+\");-1!==g.indexOf(\"all\")&&(g=[\"color\"]),-1!==g.indexOf(\"color\")&&(p=!0)}var m,v=a.colormodel[s.colormodel],y=v.colormodel||s.colormodel,x=y.length,b=s._scaler(u),_=v.suffix,w=[];(s.hovertemplate||p)&&(w.push(\"[\"+[b[0]+_[0],b[1]+_[1],b[2]+_[2]].join(\", \")),4===x&&w.push(\", \"+b[3]+_[3]),w.push(\"]\"),w=w.join(\"\"),t.extraText=y.toUpperCase()+\": \"+w),Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[h])?m=s.hovertext[h][f]:Array.isArray(s.text)&&Array.isArray(s.text[h])&&(m=s.text[h][f]);var T=c.c2p(o.y0+(h+.5)*s.dy),k=o.x0+(f+.5)*s.dx,A=o.y0+(h+.5)*s.dy,M=\"[\"+u.slice(0,s.colormodel.length).join(\", \")+\"]\";return[i.extendFlat(t,{index:[h,f],x0:l.c2p(o.x0+f*s.dx),x1:l.c2p(o.x0+(f+1)*s.dx),y0:T,y1:T,color:b,xVal:k,xLabelVal:k,yVal:A,yLabelVal:A,zLabelVal:M,text:m,hovertemplateLabels:{zLabel:M,colorLabel:w,\"color[0]Label\":b[0]+_[0],\"color[1]Label\":b[1]+_[1],\"color[2]Label\":b[2]+_[2],\"color[3]Label\":b[3]+_[3]}})]}}}},{\"../../components/fx\":406,\"../../lib\":503,\"./constants\":847}],852:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"./style\"),hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"image\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"2dMap\",\"noSortingByValue\"],animatable:!1,meta:{}}},{\"../../plots/cartesian\":568,\"./attributes\":845,\"./calc\":846,\"./defaults\":848,\"./event_data\":849,\"./hover\":851,\"./plot\":853,\"./style\":854}],853:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.strTranslate,o=t(\"../../constants/xmlns_namespaces\"),s=t(\"./constants\"),l=i.isIOS()||i.isSafari()||i.isIE();e.exports=function(t,e,r,c){var u=e.xaxis,f=e.yaxis,h=!(l||t._context._exportedPlot);i.makeTraceGroups(c,r,\"im\").each((function(e){var r=n.select(this),l=e[0],c=l.trace,p=(\"fast\"===c.zsmooth||!1===c.zsmooth&&h)&&!c._hasZ&&c._hasSource&&\"linear\"===u.type&&\"linear\"===f.type;c._realImage=p;var d,g,m,v,y,x,b=l.z,_=l.x0,w=l.y0,T=l.w,k=l.h,A=c.dx,M=c.dy;for(x=0;void 0===d&&x0;)g=u.c2p(_+x*A),x--;for(x=0;void 0===v&&x0;)y=f.c2p(w+x*M),x--;if(gI[0];if(O||z){var D=d+S/2,R=v+E/2;C+=\"transform:\"+a(D+\"px\",R+\"px\")+\"scale(\"+(O?-1:1)+\",\"+(z?-1:1)+\")\"+a(-D+\"px\",-R+\"px\")+\";\"}}L.attr(\"style\",C);var F=new Promise((function(t){if(c._hasZ)t();else if(c._hasSource)if(c._canvas&&c._canvas.el.width===T&&c._canvas.el.height===k&&c._canvas.source===c.source)t();else{var e=document.createElement(\"canvas\");e.width=T,e.height=k;var r=e.getContext(\"2d\");c._image=c._image||new Image;var n=c._image;n.onload=function(){r.drawImage(n,0,0),c._canvas={el:e,source:c.source},t()},n.setAttribute(\"src\",c.source)}})).then((function(){var t;if(c._hasZ)t=B((function(t,e){return b[e][t]})).toDataURL(\"image/png\");else if(c._hasSource)if(p)t=c.source;else{var e=c._canvas.el.getContext(\"2d\").getImageData(0,0,T,k).data;t=B((function(t,r){var n=4*(r*T+t);return[e[n],e[n+1],e[n+2],e[n+3]]})).toDataURL(\"image/png\")}L.attr({\"xlink:href\":t,height:E,width:S,x:d,y:v})}));t._promises.push(F)}function B(t){var e=document.createElement(\"canvas\");e.width=S,e.height=E;var r,n=e.getContext(\"2d\"),a=function(t){return i.constrain(Math.round(u.c2p(_+t*A)-d),0,S)},o=function(t){return i.constrain(Math.round(f.c2p(w+t*M)-v),0,E)},h=s.colormodel[c.colormodel],p=h.colormodel||c.colormodel,g=h.fmt;for(x=0;x0}function T(t){t.each((function(t){y.stroke(n.select(this),t.line.color)})).each((function(t){y.fill(n.select(this),t.color)})).style(\"stroke-width\",(function(t){return t.line.width}))}function k(t,e,r){var n=t._fullLayout,i=o.extendFlat({type:\"linear\",ticks:\"outside\",range:r,showline:!0},e),a={type:\"linear\",_id:\"x\"+e._id},s={letter:\"x\",font:n.font,noHover:!0,noTickson:!0};function l(t,e){return o.coerce(i,a,v,t,e)}return g(i,a,l,s,n),m(i,a,l,s),a}function A(t,e,r){return[Math.min(e/t.width,r/t.height),t,e+\"x\"+r]}function M(t,e,r,i){var a=document.createElementNS(\"http://www.w3.org/2000/svg\",\"text\"),o=n.select(a);return o.text(t).attr(\"x\",0).attr(\"y\",0).attr(\"text-anchor\",r).attr(\"data-unformatted\",t).call(p.convertToTspans,i).call(f.font,e),f.bBox(o.node())}function S(t,e,r,n,i,a){var s=\"_cache\"+e;t[s]&&t[s].key===i||(t[s]={key:i,value:r});var l=o.aggNums(a,null,[t[s].value,n],2);return t[s].value=l,l}e.exports=function(t,e,r,g){var m,v=t._fullLayout;w(r)&&g&&(m=g()),o.makeTraceGroups(v._indicatorlayer,e,\"trace\").each((function(e){var g,E,L,C,P,I=e[0].trace,O=n.select(this),z=I._hasGauge,D=I._isAngular,R=I._isBullet,F=I.domain,B={w:v._size.w*(F.x[1]-F.x[0]),h:v._size.h*(F.y[1]-F.y[0]),l:v._size.l+v._size.w*F.x[0],r:v._size.r+v._size.w*(1-F.x[1]),t:v._size.t+v._size.h*(1-F.y[1]),b:v._size.b+v._size.h*F.y[0]},N=B.l+B.w/2,j=B.t+B.h/2,U=Math.min(B.w/2,B.h),V=h.innerRadius*U,H=I.align||\"center\";if(E=j,z){if(D&&(g=N,E=j+U/2,L=function(t){return function(t,e){var r=Math.sqrt(t.width/2*(t.width/2)+t.height*t.height);return[e/r,t,e]}(t,.9*V)}),R){var q=h.bulletPadding,G=1-h.bulletNumberDomainSize+q;g=B.l+(G+(1-G)*b[H])*B.w,L=function(t){return A(t,(h.bulletNumberDomainSize-q)*B.w,B.h)}}}else g=B.l+b[H]*B.w,L=function(t){return A(t,B.w,B.h)};!function(t,e,r,i){var c,u,h,g=r[0].trace,m=i.numbersX,v=i.numbersY,T=g.align||\"center\",A=x[T],E=i.transitionOpts,L=i.onComplete,C=o.ensureSingle(e,\"g\",\"numbers\"),P=[];g._hasNumber&&P.push(\"number\");g._hasDelta&&(P.push(\"delta\"),\"left\"===g.delta.position&&P.reverse());var I=C.selectAll(\"text\").data(P);function O(e,r,n,i){if(!e.match(\"s\")||n>=0==i>=0||r(n).slice(-1).match(_)||r(i).slice(-1).match(_))return r;var a=e.slice().replace(\"s\",\"f\").replace(/\\d+/,(function(t){return parseInt(t)-1})),o=k(t,{tickformat:a});return function(t){return Math.abs(t)<1?d.tickText(o,t).text:r(t)}}I.enter().append(\"text\"),I.attr(\"text-anchor\",(function(){return A})).attr(\"class\",(function(t){return t})).attr(\"x\",null).attr(\"y\",null).attr(\"dx\",null).attr(\"dy\",null),I.exit().remove();var z,D=g.mode+g.align;g._hasDelta&&(z=function(){var e=k(t,{tickformat:g.delta.valueformat},g._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=function(t){return g.delta.relative?t.relativeDelta:t.delta},s=function(t,e){return 0===t||\"number\"!=typeof t||isNaN(t)?\"-\":(t>0?g.delta.increasing.symbol:g.delta.decreasing.symbol)+e(t)},l=function(t){return t.delta>=0?g.delta.increasing.color:g.delta.decreasing.color};void 0===g._deltaLastValue&&(g._deltaLastValue=o(r[0]));var c=C.select(\"text.delta\");function h(){c.text(s(o(r[0]),i)).call(y.fill,l(r[0])).call(p.convertToTspans,t)}return c.call(f.font,g.delta.font).call(y.fill,l({delta:g._deltaLastValue})),w(E)?c.transition().duration(E.duration).ease(E.easing).tween(\"text\",(function(){var t=n.select(this),e=o(r[0]),c=g._deltaLastValue,u=O(g.delta.valueformat,i,c,e),f=a(c,e);return g._deltaLastValue=e,function(e){t.text(s(f(e),u)),t.call(y.fill,l({delta:f(e)}))}})).each(\"end\",(function(){h(),L&&L()})).each(\"interrupt\",(function(){h(),L&&L()})):h(),u=M(s(o(r[0]),i),g.delta.font,A,t),c}(),D+=g.delta.position+g.delta.font.size+g.delta.font.family+g.delta.valueformat,D+=g.delta.increasing.symbol+g.delta.decreasing.symbol,h=u);g._hasNumber&&(!function(){var e=k(t,{tickformat:g.number.valueformat},g._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=g.number.suffix,s=g.number.prefix,l=C.select(\"text.number\");function u(){var e=\"number\"==typeof r[0].y?s+i(r[0].y)+o:\"-\";l.text(e).call(f.font,g.number.font).call(p.convertToTspans,t)}w(E)?l.transition().duration(E.duration).ease(E.easing).each(\"end\",(function(){u(),L&&L()})).each(\"interrupt\",(function(){u(),L&&L()})).attrTween(\"text\",(function(){var t=n.select(this),e=a(r[0].lastY,r[0].y);g._lastValue=r[0].y;var l=O(g.number.valueformat,i,r[0].lastY,r[0].y);return function(r){t.text(s+l(e(r))+o)}})):u(),c=M(s+i(r[0].y)+o,g.number.font,A,t)}(),D+=g.number.font.size+g.number.font.family+g.number.valueformat+g.number.suffix+g.number.prefix,h=c);if(g._hasDelta&&g._hasNumber){var R,F,B=[(c.left+c.right)/2,(c.top+c.bottom)/2],N=[(u.left+u.right)/2,(u.top+u.bottom)/2],j=.75*g.delta.font.size;\"left\"===g.delta.position&&(R=S(g,\"deltaPos\",0,-1*(c.width*b[g.align]+u.width*(1-b[g.align])+j),D,Math.min),F=B[1]-N[1],h={width:c.width+u.width+j,height:Math.max(c.height,u.height),left:u.left+R,right:c.right,top:Math.min(c.top,u.top+F),bottom:Math.max(c.bottom,u.bottom+F)}),\"right\"===g.delta.position&&(R=S(g,\"deltaPos\",0,c.width*(1-b[g.align])+u.width*b[g.align]+j,D,Math.max),F=B[1]-N[1],h={width:c.width+u.width+j,height:Math.max(c.height,u.height),left:c.left,right:u.right+R,top:Math.min(c.top,u.top+F),bottom:Math.max(c.bottom,u.bottom+F)}),\"bottom\"===g.delta.position&&(R=null,F=u.height,h={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height,bottom:c.bottom+u.height}),\"top\"===g.delta.position&&(R=null,F=c.top,h={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height-u.height,bottom:c.bottom}),z.attr({dx:R,dy:F})}(g._hasNumber||g._hasDelta)&&C.attr(\"transform\",(function(){var t=i.numbersScaler(h);D+=t[2];var e,r=S(g,\"numbersScale\",1,t[0],D,Math.min);g._scaleNumbers||(r=1),e=g._isAngular?v-r*h.bottom:v-r*(h.top+h.bottom)/2,g._numbersTop=r*h.top+e;var n=h[T];\"center\"===T&&(n=(h.left+h.right)/2);var a=m-r*n;return a=S(g,\"numbersTranslate\",0,a,D,Math.max),l(a,e)+s(r)}))}(t,O,e,{numbersX:g,numbersY:E,numbersScaler:L,transitionOpts:r,onComplete:m}),z&&(C={range:I.gauge.axis.range,color:I.gauge.bgcolor,line:{color:I.gauge.bordercolor,width:0},thickness:1},P={range:I.gauge.axis.range,color:\"rgba(0, 0, 0, 0)\",line:{color:I.gauge.bordercolor,width:I.gauge.borderwidth},thickness:1});var Y=O.selectAll(\"g.angular\").data(D?e:[]);Y.exit().remove();var W=O.selectAll(\"g.angularaxis\").data(D?e:[]);W.exit().remove(),D&&function(t,e,r,a){var o,s,f,h,p=r[0].trace,g=a.size,m=a.radius,v=a.innerRadius,y=a.gaugeBg,x=a.gaugeOutline,b=[g.l+g.w/2,g.t+g.h/2+m/2],_=a.gauge,A=a.layer,M=a.transitionOpts,S=a.onComplete,E=Math.PI/2;function L(t){var e=p.gauge.axis.range[0],r=(t-e)/(p.gauge.axis.range[1]-e)*Math.PI-E;return r<-E?-E:r>E?E:r}function C(t){return n.svg.arc().innerRadius((v+m)/2-t/2*(m-v)).outerRadius((v+m)/2+t/2*(m-v)).startAngle(-E)}function P(t){t.attr(\"d\",(function(t){return C(t.thickness).startAngle(L(t.range[0])).endAngle(L(t.range[1]))()}))}_.enter().append(\"g\").classed(\"angular\",!0),_.attr(\"transform\",l(b[0],b[1])),A.enter().append(\"g\").classed(\"angularaxis\",!0).classed(\"crisp\",!0),A.selectAll(\"g.xangularaxistick,path,text\").remove(),(o=k(t,p.gauge.axis)).type=\"linear\",o.range=p.gauge.axis.range,o._id=\"xangularaxis\",o.ticklabeloverflow=\"allow\",o.setScale();var I=function(t){return(o.range[0]-t.x)/(o.range[1]-o.range[0])*Math.PI+Math.PI},O={},z=d.makeLabelFns(o,0).labelStandoff;O.xFn=function(t){var e=I(t);return Math.cos(e)*z},O.yFn=function(t){var e=I(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(z+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*u)},O.anchorFn=function(t){var e=I(t),r=Math.cos(e);return Math.abs(r)<.1?\"middle\":r>0?\"start\":\"end\"},O.heightFn=function(t,e,r){var n=I(t);return-.5*(1+Math.sin(n))*r};var D=function(t){return l(b[0]+m*Math.cos(t),b[1]-m*Math.sin(t))};f=function(t){return D(I(t))};if(s=d.calcTicks(o),h=d.getTickSigns(o)[2],o.visible){h=\"inside\"===o.ticks?-1:1;var R=(o.linewidth||1)/2;d.drawTicks(t,o,{vals:s,layer:A,path:\"M\"+h*R+\",0h\"+h*o.ticklen,transFn:function(t){var e=I(t);return D(e)+\"rotate(\"+-c(e)+\")\"}}),d.drawLabels(t,o,{vals:s,layer:A,transFn:f,labelFns:O})}var F=[y].concat(p.gauge.steps),B=_.selectAll(\"g.bg-arc\").data(F);B.enter().append(\"g\").classed(\"bg-arc\",!0).append(\"path\"),B.select(\"path\").call(P).call(T),B.exit().remove();var N=C(p.gauge.bar.thickness),j=_.selectAll(\"g.value-arc\").data([p.gauge.bar]);j.enter().append(\"g\").classed(\"value-arc\",!0).append(\"path\");var U=j.select(\"path\");w(M)?(U.transition().duration(M.duration).ease(M.easing).each(\"end\",(function(){S&&S()})).each(\"interrupt\",(function(){S&&S()})).attrTween(\"d\",(V=N,H=L(r[0].lastY),q=L(r[0].y),function(){var t=i(H,q);return function(e){return V.endAngle(t(e))()}})),p._lastValue=r[0].y):U.attr(\"d\",\"number\"==typeof r[0].y?N.endAngle(L(r[0].y)):\"M0,0Z\");var V,H,q;U.call(T),j.exit().remove(),F=[];var G=p.gauge.threshold.value;(G||0===G)&&F.push({range:[G,G],color:p.gauge.threshold.color,line:{color:p.gauge.threshold.line.color,width:p.gauge.threshold.line.width},thickness:p.gauge.threshold.thickness});var Y=_.selectAll(\"g.threshold-arc\").data(F);Y.enter().append(\"g\").classed(\"threshold-arc\",!0).append(\"path\"),Y.select(\"path\").call(P).call(T),Y.exit().remove();var W=_.selectAll(\"g.gauge-outline\").data([x]);W.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"path\"),W.select(\"path\").call(P).call(T),W.exit().remove()}(t,0,e,{radius:U,innerRadius:V,gauge:Y,layer:W,size:B,gaugeBg:C,gaugeOutline:P,transitionOpts:r,onComplete:m});var X=O.selectAll(\"g.bullet\").data(R?e:[]);X.exit().remove();var Z=O.selectAll(\"g.bulletaxis\").data(R?e:[]);Z.exit().remove(),R&&function(t,e,r,n){var i,a,o,s,c,u=r[0].trace,f=n.gauge,p=n.layer,g=n.gaugeBg,m=n.gaugeOutline,v=n.size,x=u.domain,b=n.transitionOpts,_=n.onComplete;f.enter().append(\"g\").classed(\"bullet\",!0),f.attr(\"transform\",l(v.l,v.t)),p.enter().append(\"g\").classed(\"bulletaxis\",!0).classed(\"crisp\",!0),p.selectAll(\"g.xbulletaxistick,path,text\").remove();var A=v.h,M=u.gauge.bar.thickness*A,S=x.x[0],E=x.x[0]+(x.x[1]-x.x[0])*(u._hasNumber||u._hasDelta?1-h.bulletNumberDomainSize:1);(i=k(t,u.gauge.axis))._id=\"xbulletaxis\",i.domain=[S,E],i.setScale(),a=d.calcTicks(i),o=d.makeTransTickFn(i),s=d.getTickSigns(i)[2],c=v.t+v.h,i.visible&&(d.drawTicks(t,i,{vals:\"inside\"===i.ticks?d.clipEnds(i,a):a,layer:p,path:d.makeTickPath(i,c,s),transFn:o}),d.drawLabels(t,i,{vals:a,layer:p,transFn:o,labelFns:d.makeLabelFns(i,c)}));function L(t){t.attr(\"width\",(function(t){return Math.max(0,i.c2p(t.range[1])-i.c2p(t.range[0]))})).attr(\"x\",(function(t){return i.c2p(t.range[0])})).attr(\"y\",(function(t){return.5*(1-t.thickness)*A})).attr(\"height\",(function(t){return t.thickness*A}))}var C=[g].concat(u.gauge.steps),P=f.selectAll(\"g.bg-bullet\").data(C);P.enter().append(\"g\").classed(\"bg-bullet\",!0).append(\"rect\"),P.select(\"rect\").call(L).call(T),P.exit().remove();var I=f.selectAll(\"g.value-bullet\").data([u.gauge.bar]);I.enter().append(\"g\").classed(\"value-bullet\",!0).append(\"rect\"),I.select(\"rect\").attr(\"height\",M).attr(\"y\",(A-M)/2).call(T),w(b)?I.select(\"rect\").transition().duration(b.duration).ease(b.easing).each(\"end\",(function(){_&&_()})).each(\"interrupt\",(function(){_&&_()})).attr(\"width\",Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y)))):I.select(\"rect\").attr(\"width\",\"number\"==typeof r[0].y?Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y))):0);I.exit().remove();var O=r.filter((function(){return u.gauge.threshold.value||0===u.gauge.threshold.value})),z=f.selectAll(\"g.threshold-bullet\").data(O);z.enter().append(\"g\").classed(\"threshold-bullet\",!0).append(\"line\"),z.select(\"line\").attr(\"x1\",i.c2p(u.gauge.threshold.value)).attr(\"x2\",i.c2p(u.gauge.threshold.value)).attr(\"y1\",(1-u.gauge.threshold.thickness)/2*A).attr(\"y2\",(1-(1-u.gauge.threshold.thickness)/2)*A).call(y.stroke,u.gauge.threshold.line.color).style(\"stroke-width\",u.gauge.threshold.line.width),z.exit().remove();var D=f.selectAll(\"g.gauge-outline\").data([m]);D.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"rect\"),D.select(\"rect\").call(L).call(T),D.exit().remove()}(t,0,e,{gauge:X,layer:Z,size:B,gaugeBg:C,gaugeOutline:P,transitionOpts:r,onComplete:m});var J=O.selectAll(\"text.title\").data(e);J.exit().remove(),J.enter().append(\"text\").classed(\"title\",!0),J.attr(\"text-anchor\",(function(){return R?x.right:x[I.title.align]})).text(I.title.text).call(f.font,I.title.font).call(p.convertToTspans,t),J.attr(\"transform\",(function(){var t,e=B.l+B.w*b[I.title.align],r=h.titlePadding,n=f.bBox(J.node());if(z){if(D)if(I.gauge.axis.visible)t=f.bBox(W.node()).top-r-n.bottom;else t=B.t+B.h/2-U/2-n.bottom-r;R&&(t=E-(n.top+n.bottom)/2,e=B.l-h.bulletPadding*B.w)}else t=I._numbersTop-r-n.bottom;return l(e,t)}))}))}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../plots/cartesian/axis_defaults\":556,\"../../plots/cartesian/layout_attributes\":569,\"../../plots/cartesian/position_defaults\":572,\"./constants\":858,\"@plotly/d3\":58,\"d3-interpolate\":116}],862:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../mesh3d/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=t(\"../../plot_api/edit_types\").overrideAll;var u=e.exports=c(l({x:{valType:\"data_array\"},y:{valType:\"data_array\"},z:{valType:\"data_array\"},value:{valType:\"data_array\"},isomin:{valType:\"number\"},isomax:{valType:\"number\"},surface:{show:{valType:\"boolean\",dflt:!0},count:{valType:\"integer\",dflt:2,min:1},fill:{valType:\"number\",min:0,max:1,dflt:1},pattern:{valType:\"flaglist\",flags:[\"A\",\"B\",\"C\",\"D\",\"E\"],extras:[\"all\",\"odd\",\"even\"],dflt:\"all\"}},spaceframe:{show:{valType:\"boolean\",dflt:!1},fill:{valType:\"number\",min:0,max:1,dflt:.15}},slices:{x:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}},y:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}},z:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}},y:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}},z:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}}},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:a(),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),valuehoverformat:i(\"value\",1),showlegend:l({},s.showlegend,{dflt:!1})},n(\"\",{colorAttr:\"`value`\",showScaleDflt:!0,editTypeOverride:\"calc\"}),{opacity:o.opacity,lightposition:o.lightposition,lighting:o.lighting,flatshading:o.flatshading,contour:o.contour,hoverinfo:l({},s.hoverinfo)}),\"calc\",\"nested\");u.flatshading.dflt=!0,u.lighting.facenormalsepsilon.dflt=0,u.x.editType=u.y.editType=u.z.editType=u.value.editType=\"calc+clearAxisTypes\",u.transforms=void 0},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/edit_types\":536,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../mesh3d/attributes\":867}],863:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\"),i=t(\"../streamtube/calc\").processGrid,a=t(\"../streamtube/calc\").filter;e.exports=function(t,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length),e._x=a(e.x,e._len),e._y=a(e.y,e._len),e._z=a(e.z,e._len),e._value=a(e.value,e._len);var r=i(e);e._gridFill=r.fill,e._Xs=r.Xs,e._Ys=r.Ys,e._Zs=r.Zs,e._len=r.len;for(var o=1/0,s=-1/0,l=0;l0;r--){var n=Math.min(e[r],e[r-1]),i=Math.max(e[r],e[r-1]);if(i>n&&n-1}function R(t,e){return null===t?e:t}function F(e,r,n){C();var i,a,o,l=[r],c=[n];if(s>=1)l=[r],c=[n];else if(s>0){var u=function(t,e){var r=t[0],n=t[1],i=t[2],a=function(t,e,r){for(var n=[],i=0;i-1?n[p]:L(d,g,v);h[p]=x>-1?x:I(d,g,v,R(e,y))}i=h[0],a=h[1],o=h[2],t._meshI.push(i),t._meshJ.push(a),t._meshK.push(o),++m}}function B(t,e,r,n){var i=t[3];in&&(i=n);for(var a=(t[3]-i)/(t[3]-e[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*t[s]+a*e[s];return o}function N(t,e,r){return t>=e&&t<=r}function j(t){var e=.001*(E-S);return t>=S-e&&t<=E+e}function U(e){for(var r=[],n=0;n<4;n++){var i=e[n];r.push([t._x[i],t._y[i],t._z[i],t._value[i]])}return r}function V(t,e,r,n,i,a){a||(a=1),r=[-1,-1,-1];var o=!1,s=[N(e[0][3],n,i),N(e[1][3],n,i),N(e[2][3],n,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(t,e,r){return j(e[0][3])&&j(e[1][3])&&j(e[2][3])?(F(t,e,r),!0):a<3&&V(t,e,r,S,E,++a)};if(s[0]&&s[1]&&s[2])return l(t,e,r)||o;var c=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach((function(a){if(s[a[0]]&&s[a[1]]&&!s[a[2]]){var u=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(h,u,n,i),d=B(h,f,n,i);o=l(t,[d,p,u],[-1,-1,r[a[0]]])||o,o=l(t,[u,f,d],[r[a[0]],r[a[1]],-1])||o,c=!0}})),c||[[0,1,2],[1,2,0],[2,0,1]].forEach((function(a){if(s[a[0]]&&!s[a[1]]&&!s[a[2]]){var u=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(f,u,n,i),d=B(h,u,n,i);o=l(t,[d,p,u],[-1,-1,r[a[0]]])||o,c=!0}})),o}function H(t,e,r,n){var i=!1,a=U(e),o=[N(a[0][3],r,n),N(a[1][3],r,n),N(a[2][3],r,n),N(a[3][3],r,n)];if(!(o[0]||o[1]||o[2]||o[3]))return i;if(o[0]&&o[1]&&o[2]&&o[3])return g&&(i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(3,0,1),n(2,3,0),n(1,2,3)}(t,a,e)||i),i;var s=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]];if(g)i=F(t,[c,u,f],[e[l[0]],e[l[1]],e[l[2]]])||i;else{var p=B(h,c,r,n),d=B(h,u,r,n),m=B(h,f,r,n);i=F(null,[p,d,m],[-1,-1,-1])||i}s=!0}})),s?i:([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(f,c,r,n),d=B(f,u,r,n),m=B(h,u,r,n),v=B(h,c,r,n);g?(i=F(t,[c,v,p],[e[l[0]],-1,-1])||i,i=F(t,[u,d,m],[e[l[1]],-1,-1])||i):i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(2,3,0)}(null,[p,d,m,v],[-1,-1,-1,-1])||i,s=!0}})),s||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach((function(l){if(o[l[0]]&&!o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(u,c,r,n),d=B(f,c,r,n),m=B(h,c,r,n);g?(i=F(t,[c,p,d],[e[l[0]],-1,-1])||i,i=F(t,[c,d,m],[e[l[0]],-1,-1])||i,i=F(t,[c,m,p],[e[l[0]],-1,-1])||i):i=F(null,[p,d,m],[-1,-1,-1])||i,s=!0}})),i)}function q(t,e,r,n,i,a,o,s,l,c,u){var f=!1;return d&&(D(t,\"A\")&&(f=H(null,[e,r,n,a],c,u)||f),D(t,\"B\")&&(f=H(null,[r,n,i,l],c,u)||f),D(t,\"C\")&&(f=H(null,[r,a,o,l],c,u)||f),D(t,\"D\")&&(f=H(null,[n,a,s,l],c,u)||f),D(t,\"E\")&&(f=H(null,[r,n,a,l],c,u)||f)),g&&(f=H(t,[r,n,a,l],c,u)||f),f}function G(t,e,r,n,i,a,o,s){return[!0===s[0]||V(t,U([e,r,n]),[e,r,n],a,o),!0===s[1]||V(t,U([n,i,e]),[n,i,e],a,o)]}function Y(t,e,r,n,i,a,o,s,l){return s?G(t,e,r,i,n,a,o,l):G(t,r,i,n,e,a,o,l)}function W(t,e,r,n,i,a,o){var s,l,c,u,f=!1,h=function(){f=V(t,[s,l,c],[-1,-1,-1],i,a)||f,f=V(t,[c,u,s],[-1,-1,-1],i,a)||f},p=o[0],d=o[1],g=o[2];return p&&(s=O(U([k(e,r-0,n-0)])[0],U([k(e-1,r-0,n-0)])[0],p),l=O(U([k(e,r-0,n-1)])[0],U([k(e-1,r-0,n-1)])[0],p),c=O(U([k(e,r-1,n-1)])[0],U([k(e-1,r-1,n-1)])[0],p),u=O(U([k(e,r-1,n-0)])[0],U([k(e-1,r-1,n-0)])[0],p),h()),d&&(s=O(U([k(e-0,r,n-0)])[0],U([k(e-0,r-1,n-0)])[0],d),l=O(U([k(e-0,r,n-1)])[0],U([k(e-0,r-1,n-1)])[0],d),c=O(U([k(e-1,r,n-1)])[0],U([k(e-1,r-1,n-1)])[0],d),u=O(U([k(e-1,r,n-0)])[0],U([k(e-1,r-1,n-0)])[0],d),h()),g&&(s=O(U([k(e-0,r-0,n)])[0],U([k(e-0,r-0,n-1)])[0],g),l=O(U([k(e-0,r-1,n)])[0],U([k(e-0,r-1,n-1)])[0],g),c=O(U([k(e-1,r-1,n)])[0],U([k(e-1,r-1,n-1)])[0],g),u=O(U([k(e-1,r-0,n)])[0],U([k(e-1,r-0,n-1)])[0],g),h()),f}function X(t,e,r,n,i,a,o,s,l,c,u,f){var h=t;return f?(d&&\"even\"===t&&(h=null),q(h,e,r,n,i,a,o,s,l,c,u)):(d&&\"odd\"===t&&(h=null),q(h,l,s,o,a,i,n,r,e,c,u))}function Z(t,e,r,n,i){for(var a=[],o=0,s=0;sMath.abs(d-M)?[A,d]:[d,M];$(e,T[0],T[1])}}var L=[[Math.min(S,M),Math.max(S,M)],[Math.min(A,E),Math.max(A,E)]];[\"x\",\"y\",\"z\"].forEach((function(e){for(var r=[],n=0;n0&&(u.push(p.id),\"x\"===e?f.push([p.distRatio,0,0]):\"y\"===e?f.push([0,p.distRatio,0]):f.push([0,0,p.distRatio]))}else c=nt(1,\"x\"===e?b-1:\"y\"===e?_-1:w-1);u.length>0&&(r[i]=\"x\"===e?tt(null,u,a,o,f,r[i]):\"y\"===e?et(null,u,a,o,f,r[i]):rt(null,u,a,o,f,r[i]),i++),c.length>0&&(r[i]=\"x\"===e?Z(null,c,a,o,r[i]):\"y\"===e?J(null,c,a,o,r[i]):K(null,c,a,o,r[i]),i++)}var d=t.caps[e];d.show&&d.fill&&(z(d.fill),r[i]=\"x\"===e?Z(null,[0,b-1],a,o,r[i]):\"y\"===e?J(null,[0,_-1],a,o,r[i]):K(null,[0,w-1],a,o,r[i]),i++)}})),0===m&&P(),t._meshX=n,t._meshY=i,t._meshZ=a,t._meshIntensity=o,t._Xs=v,t._Ys=y,t._Zs=x}(),t}e.exports={findNearestOnAxis:l,generateIsoMeshes:h,createIsosurfaceTrace:function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new c(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}}},{\"../../../stackgl_modules\":1120,\"../../components/colorscale\":378,\"../../lib/gl_format_color\":499,\"../../lib/str2rgbarray\":528,\"../../plots/gl3d/zip3\":609}],865:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"./attributes\"),o=t(\"../../components/colorscale/defaults\");function s(t,e,r,n,a){var s=a(\"isomin\"),l=a(\"isomax\");null!=l&&null!=s&&s>l&&(e.isomin=null,e.isomax=null);var c=a(\"x\"),u=a(\"y\"),f=a(\"z\"),h=a(\"value\");c&&c.length&&u&&u.length&&f&&f.length&&h&&h.length?(i.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\",\"z\"],n),a(\"valuehoverformat\"),[\"x\",\"y\",\"z\"].forEach((function(t){a(t+\"hoverformat\");var e=\"caps.\"+t;a(e+\".show\")&&a(e+\".fill\");var r=\"slices.\"+t;a(r+\".show\")&&(a(r+\".fill\"),a(r+\".locations\"))})),a(\"spaceframe.show\")&&a(\"spaceframe.fill\"),a(\"surface.show\")&&(a(\"surface.count\"),a(\"surface.fill\"),a(\"surface.pattern\")),a(\"contour.show\")&&(a(\"contour.color\"),a(\"contour.width\")),[\"text\",\"hovertext\",\"hovertemplate\",\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lighting.vertexnormalsepsilon\",\"lighting.facenormalsepsilon\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"flatshading\",\"opacity\"].forEach((function(t){a(t)})),o(t,e,n,a,{prefix:\"\",cLetter:\"c\"}),e._length=null):e.visible=!1}e.exports={supplyDefaults:function(t,e,r,i){s(t,e,r,i,(function(r,i){return n.coerce(t,e,a,r,i)}))},supplyIsoDefaults:s}},{\"../../components/colorscale/defaults\":376,\"../../lib\":503,\"../../registry\":638,\"./attributes\":862}],866:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,calc:t(\"./calc\"),colorbar:{min:\"cmin\",max:\"cmax\"},plot:t(\"./convert\").createIsosurfaceTrace,moduleType:\"trace\",name:\"isosurface\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"showLegend\"],meta:{}}},{\"../../plots/gl3d\":598,\"./attributes\":862,\"./calc\":863,\"./convert\":864,\"./defaults\":865}],867:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../surface/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat;e.exports=l({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\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:a({editType:\"calc\"}),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),delaunayaxis:{valType:\"enumerated\",values:[\"x\",\"y\",\"z\"],dflt:\"z\",editType:\"calc\"},alphahull:{valType:\"number\",dflt:-1,editType:\"calc\"},intensity:{valType:\"data_array\",editType:\"calc\"},intensitymode:{valType:\"enumerated\",values:[\"vertex\",\"cell\"],dflt:\"vertex\",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\"}),{opacity:o.opacity,flatshading:{valType:\"boolean\",dflt:!1,editType:\"calc\"},contour:{show:l({},o.contours.x.show,{}),color:o.contours.x.color,width:o.contours.x.width,editType:\"calc\"},lightposition:{x:l({},o.lightposition.x,{dflt:1e5}),y:l({},o.lightposition.y,{dflt:1e5}),z:l({},o.lightposition.z,{dflt:0}),editType:\"calc\"},lighting:l({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\"},o.lighting),hoverinfo:l({},s.hoverinfo,{editType:\"calc\"}),showlegend:l({},s.showlegend,{dflt:!1})})},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../surface/attributes\":1057}],868:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.intensity&&n(t,e,{vals:e.intensity,containerStr:\"\",cLetter:\"c\"})}},{\"../../components/colorscale/calc\":374}],869:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_mesh3d,i=t(\"../../../stackgl_modules\").delaunay_triangulate,a=t(\"../../../stackgl_modules\").alpha_shape,o=t(\"../../../stackgl_modules\").convex_hull,s=t(\"../../lib/gl_format_color\").parseColorScale,l=t(\"../../lib/str2rgbarray\"),c=t(\"../../components/colorscale\").extractOpts,u=t(\"../../plots/gl3d/zip3\");function f(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name=\"\",this.color=\"#fff\",this.data=null,this.showContour=!1}var h=f.prototype;function p(t){for(var e=[],r=t.length,n=0;n=e-.5)return!1;return!0}h.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.data._cellCenter?t.traceCoordinate=t.data.dataCoordinate:t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},h.update=function(t){var e=this.scene,r=e.fullSceneLayout;this.data=t;var n,f=t.x.length,h=u(d(r.xaxis,t.x,e.dataScale[0],t.xcalendar),d(r.yaxis,t.y,e.dataScale[1],t.ycalendar),d(r.zaxis,t.z,e.dataScale[2],t.zcalendar));if(t.i&&t.j&&t.k){if(t.i.length!==t.j.length||t.j.length!==t.k.length||!m(t.i,f)||!m(t.j,f)||!m(t.k,f))return;n=u(g(t.i),g(t.j),g(t.k))}else n=0===t.alphahull?o(h):t.alphahull>0?a(t.alphahull,h):function(t,e){for(var r=[\"x\",\"y\",\"z\"].indexOf(t),n=[],a=e.length,o=0;ov):m=A>w,v=A;var M=c(w,T,k,A);M.pos=_,M.yc=(w+A)/2,M.i=b,M.dir=m?\"increasing\":\"decreasing\",M.x=M.pos,M.y=[k,T],y&&(M.orig_p=r[b]),d&&(M.tx=e.text[b]),g&&(M.htx=e.hovertext[b]),x.push(M)}else x.push({pos:_,empty:!0})}return e._extremes[l._id]=a.findExtremes(l,n.concat(h,f),{padded:!0}),x.length&&(x[0].t={labels:{open:i(t,\"open:\")+\" \",high:i(t,\"high:\")+\" \",low:i(t,\"low:\")+\" \",close:i(t,\"close:\")+\" \"}}),x}e.exports={calc:function(t,e){var r=a.getFromId(t,e.xaxis),i=a.getFromId(t,e.yaxis),s=function(t,e,r){var i=r._minDiff;if(!i){var a,s=t._fullData,l=[];for(i=1/0,a=0;a\"+c.labels[x]+n.hoverLabelText(s,b,l.yhoverformat):((y=i.extendFlat({},h)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=c.labels[x]+n.hoverLabelText(s,b,l.yhoverformat),y.name=\"\",f.push(y),m[b]=y)}return f}function h(t,e,r,i){var a=t.cd,o=t.ya,l=a[0].trace,f=a[0].t,h=u(t,e,r,i);if(!h)return[];var p=a[h.index],d=h.index=p.i,g=p.dir;function m(t){return f.labels[t]+n.hoverLabelText(o,l[t][d],l.yhoverformat)}var v=p.hi||l.hoverinfo,y=v.split(\"+\"),x=\"all\"===v,b=x||-1!==y.indexOf(\"y\"),_=x||-1!==y.indexOf(\"text\"),w=b?[m(\"open\"),m(\"high\"),m(\"low\"),m(\"close\")+\" \"+c[g]]:[];return _&&s(p,l,w),h.extraText=w.join(\"
\"),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?f(t,e,r,n):h(t,e,r,n)},hoverSplit:f,hoverOnPoints:h}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../constants/delta.js\":473,\"../../lib\":503,\"../../plots/cartesian/axes\":554}],876:[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\":568,\"./attributes\":872,\"./calc\":873,\"./defaults\":874,\"./hover\":875,\"./plot\":878,\"./select\":879,\"./style\":880}],877:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o=r(\"x\"),s=r(\"open\"),l=r(\"high\"),c=r(\"low\"),u=r(\"close\");if(r(\"hoverlabel.split\"),n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\"],a),s&&l&&c&&u){var f=Math.min(s.length,l.length,c.length,u.length);return o&&(f=Math.min(f,i.minRowLength(o))),e._length=f,f}}},{\"../../lib\":503,\"../../registry\":638}],878:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o=e.yaxis,s=e.xaxis,l=!!s.rangebreaks;i.makeTraceGroups(a,r,\"trace ohlc\").each((function(t){var e=n.select(this),r=t[0],a=r.t;if(!0!==r.trace.visible||a.empty)e.remove();else{var c=a.tickLen,u=e.selectAll(\"path\").data(i.identity);u.enter().append(\"path\"),u.exit().remove(),u.attr(\"d\",(function(t){if(t.empty)return\"M0,0Z\";var e=s.c2p(t.pos-c,!0),r=s.c2p(t.pos+c,!0),n=l?(e+r)/2:s.c2p(t.pos,!0);return\"M\"+e+\",\"+o.c2p(t.o,!0)+\"H\"+n+\"M\"+n+\",\"+o.c2p(t.h,!0)+\"V\"+o.c2p(t.l,!0)+\"M\"+r+\",\"+o.c2p(t.c,!0)+\"H\"+n}))}}))}},{\"../../lib\":503,\"@plotly/d3\":58}],879:[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=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;e0;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\"),s(\"line.hovertemplate\");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(\"hovertemplate\"),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 m={family:f.font.family,size:Math.round(f.font.size/1.2),color:f.font.color};n.coerceFont(h,\"tickfont\",m)}},{\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503,\"../../plots/array_container_defaults\":549,\"../../plots/domain\":584,\"../parcoords/merge_length\":897,\"./attributes\":881}],885:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcats\",basePlotModule:t(\"./base_plot\"),categories:[\"noOpacity\"],meta:{}}},{\"./attributes\":881,\"./base_plot\":882,\"./calc\":883,\"./defaults\":884,\"./plot\":887}],886:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-interpolate\").interpolateNumber,a=t(\"../../plot_api/plot_api\"),o=t(\"../../components/fx\"),s=t(\"../../lib\"),l=s.strTranslate,c=t(\"../../components/drawing\"),u=t(\"tinycolor2\"),f=t(\"../../lib/svg_text_utils\");function h(t,e,r,i){var a=t.map(F.bind(0,e,r)),o=i.selectAll(\"g.parcatslayer\").data([null]);o.enter().append(\"g\").attr(\"class\",\"parcatslayer\").style(\"pointer-events\",\"all\");var u=o.selectAll(\"g.trace.parcats\").data(a,p),h=u.enter().append(\"g\").attr(\"class\",\"trace parcats\");u.attr(\"transform\",(function(t){return l(t.x,t.y)})),h.append(\"g\").attr(\"class\",\"paths\");var y=u.select(\"g.paths\").selectAll(\"path.path\").data((function(t){return t.paths}),p);y.attr(\"fill\",(function(t){return t.model.color}));var x=y.enter().append(\"path\").attr(\"class\",\"path\").attr(\"stroke-opacity\",0).attr(\"fill\",(function(t){return t.model.color})).attr(\"fill-opacity\",0);_(x),y.attr(\"d\",(function(t){return t.svgD})),x.empty()||y.sort(g),y.exit().remove(),y.on(\"mouseover\",m).on(\"mouseout\",v).on(\"click\",b),h.append(\"g\").attr(\"class\",\"dimensions\");var w=u.select(\"g.dimensions\").selectAll(\"g.dimension\").data((function(t){return t.dimensions}),p);w.enter().append(\"g\").attr(\"class\",\"dimension\"),w.attr(\"transform\",(function(t){return l(t.x,0)})),w.exit().remove();var A=w.selectAll(\"g.category\").data((function(t){return t.categories}),p),M=A.enter().append(\"g\").attr(\"class\",\"category\");A.attr(\"transform\",(function(t){return l(0,t.y)})),M.append(\"rect\").attr(\"class\",\"catrect\").attr(\"pointer-events\",\"none\"),A.select(\"rect.catrect\").attr(\"fill\",\"none\").attr(\"width\",(function(t){return t.width})).attr(\"height\",(function(t){return t.height})),T(M);var S=A.selectAll(\"rect.bandrect\").data((function(t){return t.bands}),p);S.each((function(){s.raiseToTop(this)})),S.attr(\"fill\",(function(t){return t.color}));var E=S.enter().append(\"rect\").attr(\"class\",\"bandrect\").attr(\"stroke-opacity\",0).attr(\"fill\",(function(t){return t.color})).attr(\"fill-opacity\",0);S.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\"})),k(E),S.exit().remove(),M.append(\"text\").attr(\"class\",\"catlabel\").attr(\"pointer-events\",\"none\");var z=e._fullLayout.paper_bgcolor;A.select(\"text.catlabel\").attr(\"text-anchor\",(function(t){return d(t)?\"start\":\"end\"})).attr(\"alignment-baseline\",\"middle\").style(\"text-shadow\",f.makeTextShadow(z)).style(\"fill\",\"rgb(0, 0, 0)\").attr(\"x\",(function(t){return d(t)?t.width+5:-5})).attr(\"y\",(function(t){return t.height/2})).text((function(t){return t.model.categoryLabel})).each((function(t){c.font(n.select(this),t.parcatsViewModel.categorylabelfont),f.convertToTspans(n.select(this),e)})),M.append(\"text\").attr(\"class\",\"dimlabel\"),A.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){c.font(n.select(this),t.parcatsViewModel.labelfont)})),A.selectAll(\"rect.bandrect\").on(\"mouseover\",L).on(\"mouseout\",C),A.exit().remove(),w.call(n.behavior.drag().origin((function(t){return{x:t.x,y:0}})).on(\"dragstart\",P).on(\"drag\",I).on(\"dragend\",O)),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 p(t){return t.key}function d(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function g(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor\"),L=n.mouse(f)[0];o.loneHover({trace:h,x:b-d.left+g.left,y:_-d.top+g.top,text:E,color:t.model.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:10,fontColor:T,idealAlign:L1&&h.displayInd===f.dimensions.length-1?(i=c.left,a=\"left\"):(i=c.left+c.width,a=\"right\");var g=u.model.count,m=u.model.categoryLabel,v=g/u.parcatsViewModel.model.count,y={countLabel:g,categoryLabel:m,probabilityLabel:v.toFixed(3)},x=[];-1!==u.parcatsViewModel.hoverinfoItems.indexOf(\"count\")&&x.push([\"Count:\",y.countLabel].join(\" \")),-1!==u.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")&&x.push([\"P(\"+y.categoryLabel+\"):\",y.probabilityLabel].join(\" \"));var b=x.join(\"
\");return{trace:p,x:o*(i-e.left),y:s*(d-e.top),text:b,color:\"lightgray\",borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:12,fontColor:\"black\",idealAlign:a,hovertemplate:p.hovertemplate,hovertemplateLabels:y,eventData:[{data:p._input,fullData:p,count:g,category:m,probability:v}]}}function L(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,a=i._paperdiv.node().getBoundingClientRect(),l=t.parcatsViewModel.hoveron;if(\"color\"===l?(!function(t){var e=n.select(t).datum(),r=A(e);w(r),r.each((function(){s.raiseToTop(this)})),n.select(t.parentNode).selectAll(\"rect.bandrect\").filter((function(t){return t.color===e.color})).each((function(){s.raiseToTop(this),n.select(this).attr(\"stroke\",\"black\").attr(\"stroke-width\",1.5)}))}(this),S(this,\"plotly_hover\",n.event)):(!function(t){n.select(t.parentNode).selectAll(\"rect.bandrect\").each((function(t){var e=A(t);w(e),e.each((function(){s.raiseToTop(this)}))})),n.select(t.parentNode).select(\"rect.catrect\").attr(\"stroke\",\"black\").attr(\"stroke-width\",2.5)}(this),M(this,\"plotly_hover\",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf(\"none\"))\"category\"===l?e=E(r,a,this):\"color\"===l?e=function(t,e,r){t._fullLayout._calcInverseTransform(t);var i,a,o=t._fullLayout._invScaleX,s=t._fullLayout._invScaleY,l=r.getBoundingClientRect(),c=n.select(r).datum(),f=c.categoryViewModel,h=f.parcatsViewModel,p=h.model.dimensions[f.model.dimensionInd],d=h.trace,g=l.y+l.height/2;h.dimensions.length>1&&p.displayInd===h.dimensions.length-1?(i=l.left,a=\"left\"):(i=l.left+l.width,a=\"right\");var m=f.model.categoryLabel,v=c.parcatsViewModel.model.count,y=0;c.categoryViewModel.bands.forEach((function(t){t.color===c.color&&(y+=t.count)}));var x=f.model.count,b=0;h.pathSelection.each((function(t){t.model.color===c.color&&(b+=t.model.count)}));var _=y/v,w=y/b,T=y/x,k={countLabel:v,categoryLabel:m,probabilityLabel:_.toFixed(3)},A=[];-1!==f.parcatsViewModel.hoverinfoItems.indexOf(\"count\")&&A.push([\"Count:\",k.countLabel].join(\" \")),-1!==f.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")&&(A.push(\"P(color \\u2229 \"+m+\"): \"+k.probabilityLabel),A.push(\"P(\"+m+\" | color): \"+w.toFixed(3)),A.push(\"P(color | \"+m+\"): \"+T.toFixed(3)));var M=A.join(\"
\"),S=u.mostReadable(c.color,[\"black\",\"white\"]);return{trace:d,x:o*(i-e.left),y:s*(g-e.top),text:M,color:c.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontColor:S,fontSize:10,idealAlign:a,hovertemplate:d.hovertemplate,hovertemplateLabels:k,eventData:[{data:d._input,fullData:d,category:m,count:v,probability:_,categorycount:x,colorcount:b,bandcolorcount:y}]}}(r,a,this):\"dimension\"===l&&(e=function(t,e,r){var i=[];return n.select(r.parentNode.parentNode).selectAll(\"g.category\").select(\"rect.catrect\").each((function(){i.push(E(t,e,this))})),i}(r,a,this)),e&&o.loneHover(e,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r})}}function C(t){var e=t.parcatsViewModel;if(!e.dragDimension&&(_(e.pathSelection),T(e.dimensionSelection.selectAll(\"g.category\")),k(e.dimensionSelection.selectAll(\"g.category\").selectAll(\"rect.bandrect\")),o.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(g),-1===e.hoverinfoItems.indexOf(\"skip\"))){\"color\"===t.parcatsViewModel.hoveron?S(this,\"plotly_unhover\",n.event):M(this,\"plotly_unhover\",n.event)}}function P(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,s.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll(\"rect.bandrect\").each((function(e){e.yf.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.dragXp.x&&(a.model.displayInd=p.model.displayInd,p.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=a.model.displayInd}j(t.parcatsViewModel),N(t.parcatsViewModel),R(t.parcatsViewModel),D(t.parcatsViewModel)}}function O(t){if(\"fixed\"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll(\"text\").attr(\"font-weight\",\"normal\");var e={},r=z(t.parcatsViewModel),i=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),o=t.initialDragDimensionDisplayInds.some((function(t,e){return t!==i[e]}));o&&i.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?S(t.potentialClickBand,\"plotly_click\",n.event.sourceEvent):M(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,j(t.parcatsViewModel),N(t.parcatsViewModel),n.transition().duration(300).ease(\"cubic-in-out\").each((function(){R(t.parcatsViewModel,!0),D(t.parcatsViewModel,!0)})).each(\"end\",(function(){(o||s)&&a.restyle(t.parcatsViewModel.graphDiv,e,[r])}))}}function z(t){for(var e,r=t.graphDiv._fullData,n=0;n=0;s--)u+=\"C\"+c[s]+\",\"+(e[s+1]+n)+\" \"+l[s]+\",\"+(e[s]+n)+\" \"+(t[s]+r[s])+\",\"+(e[s]+n),u+=\"l-\"+r[s]+\",0 \";return u+=\"Z\"}function N(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)),ni?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;g0?d*(v.count/p):0;for(var y,x=new Array(n.length),b=0;b1?(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,m=e.categories.map((function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}}));for(m.sort((function(t,e){return t.displayInd-e.displayInd})),c=0;c0?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){h(r,t,n,e)}},{\"../../components/drawing\":388,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plot_api/plot_api\":540,\"@plotly/d3\":58,\"d3-interpolate\":116,tinycolor2:312}],887:[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\":886}],888:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/layout_attributes\"),a=t(\"../../plots/font_attributes\"),o=t(\"../../plots/domain\").attributes,s=t(\"../../lib/extend\").extendFlat,l=t(\"../../plot_api/plot_template\").templatedArray;e.exports={domain:o({name:\"parcoords\",trace:!0,editType:\"plot\"}),labelangle:{valType:\"angle\",dflt:0,editType:\"plot\"},labelside:{valType:\"enumerated\",values:[\"top\",\"bottom\"],dflt:\"top\",editType:\"plot\"},labelfont:a({editType:\"plot\"}),tickfont:a({editType:\"plot\"}),rangefont:a({editType:\"plot\"}),dimensions:l(\"dimension\",{label:{valType:\"string\",editType:\"plot\"},tickvals:s({},i.tickvals,{editType:\"plot\"}),ticktext:s({},i.ticktext,{editType:\"plot\"}),tickformat:s({},i.tickformat,{editType:\"plot\"}),visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},range:{valType:\"info_array\",items:[{valType:\"number\",editType:\"plot\"},{valType:\"number\",editType:\"plot\"}],editType:\"plot\"},constraintrange:{valType:\"info_array\",freeLength:!0,dimensions:\"1-2\",items:[{valType:\"any\",editType:\"plot\"},{valType:\"any\",editType:\"plot\"}],editType:\"plot\"},multiselect:{valType:\"boolean\",dflt:!0,editType:\"plot\"},values:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\"}),line:s({editType:\"calc\"},n(\"line\",{colorscaleDflt:\"Viridis\",autoColorDflt:!1,editTypeOverride:\"calc\"}))}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/plot_template\":543,\"../../plots/cartesian/layout_attributes\":569,\"../../plots/domain\":584,\"../../plots/font_attributes\":585}],889:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"@plotly/d3\"),a=t(\"../../lib/gup\").keyFun,o=t(\"../../lib/gup\").repeat,s=t(\"../../lib\").sorterAsc,l=t(\"../../lib\").strTranslate,c=n.bar.snapRatio;function u(t,e){return t*(1-c)+e*c}var f=n.bar.snapClose;function h(t,e){return t*(1-f)+e*f}function p(t,e,r,n){if(function(t,e){for(var r=0;r=e[r][0]&&t<=e[r][1])return!0;return!1}(r,n))return r;var i=t?-1:1,a=0,o=e.length-1;if(i<0){var s=a;a=o,o=s}for(var l=e[a],c=l,f=a;i*fe){h=r;break}}if(a=u,isNaN(a)&&(a=isNaN(f)||isNaN(h)?isNaN(f)?h:f:e-c[f][1]t[1]+r||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 m=t.unitTickvals,y=t.unitToPaddedPx.invert(e);for(r=0;r=x[0]&&y<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function w(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[r-a.grabPoint,r+a.barLength-a.grabPoint].map(e.unitToPaddedPx.invert):a.newExtent=[a.startExtent,e.unitToPaddedPx.invert(r)].sort(s),e.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(e),b(t.parentNode)}function T(t,e){var r=_(e,e.height-i.mouse(t)[1]-2*n.verticalPadding),a=\"crosshair\";r.clickableOrdinalRange?a=\"pointer\":r.region&&(a=r.region+\"-resize\"),i.select(document.body).style(\"cursor\",a)}function k(t){t.on(\"mousemove\",(function(t){i.event.preventDefault(),t.parent.inBrushDrag||T(this,t)})).on(\"mouseleave\",(function(t){t.parent.inBrushDrag||y()})).call(i.behavior.drag().on(\"dragstart\",(function(t){!function(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.unitToPaddedPx.invert(r),o=e.brush,s=_(e,r),l=s.interval,c=o.svgBrush;if(c.wasDragged=!1,c.grabbingBar=\"ns\"===s.region,c.grabbingBar){var u=l.map(e.unitToPaddedPx);c.grabPoint=r-u[0]-n.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=e.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter((function(t){return t[0]!==l[0]&&t[1]!==l[1]}))),c.startExtent=s.region?l[\"s\"===s.region?1:0]:a,e.parent.inBrushDrag=!0,c.brushStartCallback()}(this,t)})).on(\"drag\",(function(t){w(this,t)})).on(\"dragend\",(function(t){!function(t,e){var r=e.brush,n=r.filter,a=r.svgBrush;a._dragging||(T(t,e),w(t,e),e.brush.svgBrush.wasDragged=!1),a._dragging=!1,i.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,e.parent.inBrushDrag=!1,y(),!a.wasDragged)return a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&e.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&M(r)):M(r),a.brushCallback(e),b(t.parentNode),void a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(e.ordinal){var l=e.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(c?[a.newExtent]:[]),a.extent.length||M(r),a.brushCallback(e),c?b(t.parentNode,s):(s(),b(t.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,t)})))}function A(t,e){return t[0]-e[0]}function M(t){t.filterSpecified=!1,t.svgBrush.extent=[[-1/0,1/0]]}function S(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 1===n.length&&n[0][0]>n[0][1]&&(n=[]),n}e.exports={makeBrush:function(t,e,r,n,i,a){var o,l=function(){var t,e,r=[];return{set:function(n){1===(r=n.map((function(t){return t.slice().sort(s)})).sort(A)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),t=S(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,e){var r=t.selectAll(\".\"+n.cn.axisBrush).data(o,a);r.enter().append(\"g\").classed(n.cn.axisBrush,!0),function(t,e){var r=t.selectAll(\".background\").data(o);r.enter().append(\"rect\").classed(\"background\",!0).call(d).call(g).style(\"pointer-events\",\"auto\").attr(\"transform\",l(0,n.verticalPadding)),r.call(k).attr(\"height\",(function(t){return t.height-n.verticalPadding}));var i=t.selectAll(\".highlight-shadow\").data(o);i.enter().append(\"line\").classed(\"highlight-shadow\",!0).attr(\"x\",-n.bar.width/2).attr(\"stroke-width\",n.bar.width+n.bar.strokeWidth).attr(\"stroke\",e).attr(\"opacity\",n.bar.strokeOpacity).attr(\"stroke-linecap\",\"butt\"),i.attr(\"y1\",(function(t){return t.height})).call(x);var a=t.selectAll(\".highlight\").data(o);a.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\"),a.attr(\"y1\",(function(t){return t.height})).call(x)}(r,e)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map((function(t){return t.sort(s)})),t=e.multiselect?S(t.sort(A)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map((function(t){var e=[p(0,r,t[0],[]),p(1,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\":503,\"../../lib/gup\":500,\"./constants\":892,\"@plotly/d3\":58}],890:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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.style.width,height:this.style.height})})),window.setTimeout((function(){n.selectAll(\"#filterBarPattern\").attr(\"id\",\"filterBarPattern\")}),60)}},{\"../../constants/xmlns_namespaces\":480,\"../../plots/get_data\":593,\"./plot\":899,\"@plotly/d3\":58}],891:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray,i=t(\"../../components/colorscale\"),a=t(\"../../lib/gup\").wrap;e.exports=function(t,e){var r,o;return i.hasColorscale(e,\"line\")&&n(e.line.color)?(r=e.line.color,o=i.extractOpts(e.line).colorscale,i.calc(t,e,{vals:r,containerStr:\"line\",cLetter:\"c\"})):(r=function(t){for(var e=new Array(t),r=0;rf&&(n.log(\"parcoords traces support up to \"+f+\" dimensions at the moment\"),d.splice(f));var g=s(t,e,{name:\"dimensions\",layout:l,handleItemDefaults:p}),m=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,l,u);o(e,l,u),Array.isArray(g)&&g.length||(e.visible=!1),h(e,g,\"values\",m);var v={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(u,\"labelfont\",v),n.coerceFont(u,\"tickfont\",v),n.coerceFont(u,\"rangefont\",v),u(\"labelangle\"),u(\"labelside\")}},{\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503,\"../../plots/array_container_defaults\":549,\"../../plots/cartesian/axes\":554,\"../../plots/domain\":584,\"./attributes\":888,\"./axisbrush\":889,\"./constants\":892,\"./merge_length\":897}],894:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isTypedArray;r.convertTypedArray=function(t){return n(t)?Array.prototype.slice.call(t):t},r.isOrdinal=function(t){return!!t.tickvals},r.isVisible=function(t){return t.visible||!(\"visible\"in t)}},{\"../../lib\":503}],895:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcoords\",basePlotModule:t(\"./base_plot\"),categories:[\"gl\",\"regl\",\"noOpacity\",\"noHover\"],meta:{}}},{\"./attributes\":888,\"./base_plot\":890,\"./calc\":891,\"./defaults\":893,\"./plot\":899}],896:[function(t,e,r){\"use strict\";var n=t(\"glslify\"),i=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nattribute vec4 p01_04, p05_08, p09_12, p13_16,\\n p17_20, p21_24, p25_28, p29_32,\\n p33_36, p37_40, p41_44, p45_48,\\n p49_52, p53_56, p57_60, colors;\\n\\nuniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,\\n loA, hiA, loB, hiB, loC, hiC, loD, hiD;\\n\\nuniform vec2 resolution, viewBoxPos, viewBoxSize;\\nuniform float maskHeight;\\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\\nuniform vec4 contextColor;\\nuniform sampler2D maskTexture, palette;\\n\\nbool isPick = (drwLayer > 1.5);\\nbool isContext = (drwLayer < 0.5);\\n\\nconst vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);\\nconst vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);\\n\\nfloat val(mat4 p, mat4 v) {\\n return dot(matrixCompMult(p, v) * UNITS, UNITS);\\n}\\n\\nfloat axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {\\n float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);\\n float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);\\n return y1 * (1.0 - ratio) + y2 * ratio;\\n}\\n\\nint iMod(int a, int b) {\\n return a - b * (a / b);\\n}\\n\\nbool fOutside(float p, float lo, float hi) {\\n return (lo < hi) && (lo > p || p > hi);\\n}\\n\\nbool vOutside(vec4 p, vec4 lo, vec4 hi) {\\n return (\\n fOutside(p[0], lo[0], hi[0]) ||\\n fOutside(p[1], lo[1], hi[1]) ||\\n fOutside(p[2], lo[2], hi[2]) ||\\n fOutside(p[3], lo[3], hi[3])\\n );\\n}\\n\\nbool mOutside(mat4 p, mat4 lo, mat4 hi) {\\n return (\\n vOutside(p[0], lo[0], hi[0]) ||\\n vOutside(p[1], lo[1], hi[1]) ||\\n vOutside(p[2], lo[2], hi[2]) ||\\n vOutside(p[3], lo[3], hi[3])\\n );\\n}\\n\\nbool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {\\n return mOutside(A, loA, hiA) ||\\n mOutside(B, loB, hiB) ||\\n mOutside(C, loC, hiC) ||\\n mOutside(D, loD, hiD);\\n}\\n\\nbool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {\\n mat4 pnts[4];\\n pnts[0] = A;\\n pnts[1] = B;\\n pnts[2] = C;\\n pnts[3] = D;\\n\\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 if(0 == iMod(\\n int(255.0 * texture2D(maskTexture,\\n vec2(\\n (float(i * 2 + j / 2) + 0.5) / 8.0,\\n (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight\\n ))[3]\\n ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),\\n 2\\n )) return true;\\n }\\n }\\n }\\n return false;\\n}\\n\\nvec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {\\n float x = 0.5 * sign(v) + 0.5;\\n float y = axisY(x, A, B, C, D);\\n float z = 1.0 - abs(v);\\n\\n z += isContext ? 0.0 : 2.0 * float(\\n outsideBoundingBox(A, B, C, D) ||\\n outsideRasterMask(A, B, C, D)\\n );\\n\\n return vec4(\\n 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,\\n z,\\n 1.0\\n );\\n}\\n\\nvoid main() {\\n mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);\\n mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);\\n mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);\\n mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);\\n\\n float v = colors[3];\\n\\n gl_Position = position(isContext, v, A, B, C, D);\\n\\n fragColor =\\n isContext ? vec4(contextColor) :\\n isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));\\n}\\n\"]),a=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n gl_FragColor = fragColor;\\n}\\n\"]),o=t(\"./constants\").maxDimensionCount,s=t(\"../../lib\"),l=new Uint8Array(4),c=new Uint8Array(4),u={shape:[256,1],format:\"rgba\",type:\"uint8\",mag:\"nearest\",min:\"nearest\"};function f(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 h(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:l})}(t),r.drawCompleted=!0),function s(l){var c=Math.min(n,i-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],f(t,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),r.clearOnly||(a.count=2*c,a.offset=2*l*n,e(a),l*n+c>>8*e)%256/255}function g(t,e,r){for(var n=new Array(8*e),i=0,a=0;au&&(u=t[i].dim1.canvasX,o=i);0===s&&f(T,0,0,r.canvasWidth,r.canvasHeight);var p=function(t){var e,r,n,i=[[],[]];for(n=0;n<64;n++){var a=!t&&no._length&&(S=S.slice(0,o._length));var L,C=o.tickvals;function P(t,e){return{val:t,text:L[e]}}function I(t,e){return t.val-e.val}if(Array.isArray(C)&&C.length){L=o.ticktext,Array.isArray(L)&&L.length?L.length>C.length?L=L.slice(0,C.length):C.length>L.length&&(C=C.slice(0,L.length)):L=C.map(a(o.tickformat));for(var O=1;O=r||l>=i)return;var c=t.lineLayer.readPixel(s,i-1-l),u=0!==c[3],f=u?c[2]+256*(c[1]+256*c[0]):null,h={x:s,y:l,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:f};f!==B&&(u?a.hover(h):a.unhover&&a.unhover(h),B=f)}})),F.style(\"opacity\",(function(t){return t.pick?0:1})),h.style(\"background\",\"rgba(255, 255, 255, 0)\");var N=h.selectAll(\".\"+y.cn.parcoords).data(R,d);N.exit().remove(),N.enter().append(\"g\").classed(y.cn.parcoords,!0).style(\"shape-rendering\",\"crispEdges\").style(\"pointer-events\",\"none\"),N.attr(\"transform\",(function(t){return c(t.model.translateX,t.model.translateY)}));var j=N.selectAll(\".\"+y.cn.parcoordsControlView).data(g,d);j.enter().append(\"g\").classed(y.cn.parcoordsControlView,!0),j.attr(\"transform\",(function(t){return c(t.model.pad.l,t.model.pad.t)}));var U=j.selectAll(\".\"+y.cn.yAxis).data((function(t){return t.dimensions}),d);U.enter().append(\"g\").classed(y.cn.yAxis,!0),j.each((function(t){O(U,t,_)})),F.each((function(t){if(t.viewModel){!t.lineLayer||a?t.lineLayer=b(this,t):t.lineLayer.update(t),(t.key||0===t.key)&&(t.viewModel[t.key]=t.lineLayer);var e=!t.context||a;t.lineLayer.render(t.viewModel.panels,e)}})),U.attr(\"transform\",(function(t){return c(t.xScale(t.xIndex),0)})),U.call(n.behavior.drag().origin((function(t){return t})).on(\"drag\",(function(t){var e=t.parent;S.linePickActive(!1),t.x=Math.max(-y.overdrag,Math.min(t.model.width+y.overdrag,n.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,U.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})),O(U,e,_),U.filter((function(e){return 0!==Math.abs(t.xIndex-e.xIndex)})).attr(\"transform\",(function(t){return c(t.xScale(t.xIndex),0)})),n.select(this).attr(\"transform\",c(t.x,0)),U.each((function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!E(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,O(U,e,_),n.select(this).attr(\"transform\",(function(t){return c(t.x,0)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!E(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),S.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(e.key,e.dimensions.map((function(t){return t.crossfilterDimensionIndex})))}))),U.exit().remove();var V=U.selectAll(\".\"+y.cn.axisOverlays).data(g,d);V.enter().append(\"g\").classed(y.cn.axisOverlays,!0),V.selectAll(\".\"+y.cn.axis).remove();var H=V.selectAll(\".\"+y.cn.axis).data(g,d);H.enter().append(\"g\").classed(y.cn.axis,!0),H.each((function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,i=r.domain();n.select(this).call(n.svg.axis().orient(\"left\").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?i:null).tickFormat((function(e){return v.isOrdinal(t)?e:z(t.model.dimensions[t.visibleIndex],e)})).scale(r)),f.font(H.selectAll(\"text\"),t.model.tickFont)})),H.selectAll(\".domain, .tick>line\").attr(\"fill\",\"none\").attr(\"stroke\",\"black\").attr(\"stroke-opacity\",.25).attr(\"stroke-width\",\"1px\"),H.selectAll(\"text\").style(\"text-shadow\",u.makeTextShadow(T)).style(\"cursor\",\"default\");var q=V.selectAll(\".\"+y.cn.axisHeading).data(g,d);q.enter().append(\"g\").classed(y.cn.axisHeading,!0);var G=q.selectAll(\".\"+y.cn.axisTitle).data(g,d);G.enter().append(\"text\").classed(y.cn.axisTitle,!0).attr(\"text-anchor\",\"middle\").style(\"cursor\",\"ew-resize\").style(\"pointer-events\",\"auto\"),G.text((function(t){return t.label})).each((function(e){var r=n.select(this);f.font(r,e.model.labelFont),u.convertToTspans(r,t)})).attr(\"transform\",(function(t){var e=I(t.model.labelAngle,t.model.labelSide),r=y.axisTitleOffset;return(e.dir>0?\"\":c(0,2*r+t.model.height))+l(e.degrees)+c(-r*e.dx,-r*e.dy)})).attr(\"text-anchor\",(function(t){var e=I(t.model.labelAngle,t.model.labelSide);return 2*Math.abs(e.dx)>Math.abs(e.dy)?e.dir*e.dx<0?\"start\":\"end\":\"middle\"}));var Y=V.selectAll(\".\"+y.cn.axisExtent).data(g,d);Y.enter().append(\"g\").classed(y.cn.axisExtent,!0);var W=Y.selectAll(\".\"+y.cn.axisExtentTop).data(g,d);W.enter().append(\"g\").classed(y.cn.axisExtentTop,!0),W.attr(\"transform\",c(0,-y.axisExtentOffset));var X=W.selectAll(\".\"+y.cn.axisExtentTopText).data(g,d);X.enter().append(\"text\").classed(y.cn.axisExtentTopText,!0).call(P),X.text((function(t){return D(t,!0)})).each((function(t){f.font(n.select(this),t.model.rangeFont)}));var Z=Y.selectAll(\".\"+y.cn.axisExtentBottom).data(g,d);Z.enter().append(\"g\").classed(y.cn.axisExtentBottom,!0),Z.attr(\"transform\",(function(t){return c(0,t.model.height+y.axisExtentOffset)}));var J=Z.selectAll(\".\"+y.cn.axisExtentBottomText).data(g,d);J.enter().append(\"text\").classed(y.cn.axisExtentBottomText,!0).attr(\"dy\",\"0.75em\").call(P),J.text((function(t){return D(t,!1)})).each((function(t){f.font(n.select(this),t.model.rangeFont)})),x.ensureAxisBrush(V,T)}},{\"../../components/colorscale\":378,\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/gup\":500,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"./axisbrush\":889,\"./constants\":892,\"./helpers\":894,\"./lines\":896,\"@plotly/d3\":58,\"color-rgba\":91}],899:[function(t,e,r){\"use strict\";var n=t(\"./parcoords\"),i=t(\"../../lib/prepare_regl\"),a=t(\"./helpers\").isVisible;function o(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return-1===i&&(i+=e.length),i}e.exports=function(t,e){var r=t._fullLayout;if(i(t)){var s={},l={},c={},u={},f=r._size;e.forEach((function(e,r){var n=e[0].trace;c[r]=n.index;var i=u[r]=n._fullInput.index;s[r]=t.data[i].dimensions,l[r]=t.data[i].dimensions.slice()}));n(t,e,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{filterChanged:function(e,n,i){var a=l[e][n],o=i.map((function(t){return t.slice()})),s=\"dimensions[\"+n+\"].constraintrange\",f=r._tracePreGUI[t._fullData[c[e]]._fullInput.uid];if(void 0===f[s]){var h=a.constraintrange;f[s]=h||null}var p=t._fullData[c[e]].dimensions[n];o.length?(1===o.length&&(o=o[0]),a.constraintrange=o,p.constraintrange=o.slice(),o=[o]):(delete a.constraintrange,delete p.constraintrange,o=null);var d={};d[s]=o,t.emit(\"plotly_restyle\",[d,[u[e]]])},hover:function(e){t.emit(\"plotly_hover\",e)},unhover:function(e){t.emit(\"plotly_unhover\",e)},axesMoved:function(e,r){var n=function(t,e){return function(r,n){return o(t,e,r)-o(t,e,n)}}(r,l[e].filter(a));s[e].sort(n),l[e].filter((function(t){return!a(t)})).sort((function(t){return l[e].indexOf(t)})).forEach((function(t){s[e].splice(s[e].indexOf(t),1),s[e].splice(l[e].indexOf(t),0,t)})),t.emit(\"plotly_restyle\",[{dimensions:[s[e]]},[u[e]]])}})}}},{\"../../lib/prepare_regl\":516,\"./helpers\":894,\"./parcoords\":898}],900:[function(t,e,r){\"use strict\";var n=t(\"../../plots/attributes\"),i=t(\"../../plots/domain\").attributes,a=t(\"../../plots/font_attributes\"),o=t(\"../../components/color/attributes\"),s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../plots/template_attributes\").texttemplateAttrs,c=t(\"../../lib/extend\").extendFlat,u=a({editType:\"plot\",arrayOk:!0,colorEditType:\"plot\"});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:o.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:\"plot\"},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:c({},n.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:s({},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),texttemplate:l({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),textposition:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"auto\",\"none\"],dflt:\"auto\",arrayOk:!0,editType:\"plot\"},textfont:c({},u,{}),insidetextorientation:{valType:\"enumerated\",values:[\"horizontal\",\"radial\",\"tangential\",\"auto\"],dflt:\"auto\",editType:\"plot\"},insidetextfont:c({},u,{}),outsidetextfont:c({},u,{}),automargin:{valType:\"boolean\",dflt:!1,editType:\"plot\"},title:{text:{valType:\"string\",dflt:\"\",editType:\"plot\"},font:c({},u,{}),position:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle center\",\"bottom left\",\"bottom center\",\"bottom right\"],editType:\"plot\"},editType:\"plot\"},domain:i({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\"},_deprecated:{title:{valType:\"string\",dflt:\"\",editType:\"calc\"},titlefont:c({},u,{}),titleposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle center\",\"bottom left\",\"bottom center\",\"bottom right\"],editType:\"calc\"}}}},{\"../../components/color/attributes\":365,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/domain\":584,\"../../plots/font_attributes\":585,\"../../plots/template_attributes\":633}],901:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"pie\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":619}],902:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"tinycolor2\"),a=t(\"../../components/color\"),o={};function s(t){return function(e,r){return!!e&&(!!(e=i(e)).isValid()&&(e=a.addOpacity(e,e.getAlpha()),t[r]||(t[r]=e),e))}}function l(t,e){var r,n=JSON.stringify(t),a=e[n];if(!a){for(a=t.slice(),r=0;r=0})),(\"funnelarea\"===e.type?v:e.sort)&&a.sort((function(t,e){return e.v-t.v})),a[0]&&(a[0].vTotal=m),a},crossTraceCalc:function(t,e){var r=(e||{}).type;r||(r=\"pie\");var n=t._fullLayout,i=t.calcdata,a=n[r+\"colorway\"],s=n[\"_\"+r+\"colormap\"];n[\"extend\"+r+\"colors\"]&&(a=l(a,o));for(var c=0,u=0;u0){s=!0;break}}s||(o=0)}return{hasLabels:r,hasValues:a,len:o}}e.exports={handleLabelsAndValues:l,supplyDefaults:function(t,e,r,n){function c(r,n){return i.coerce(t,e,a,r,n)}var u=l(c(\"labels\"),c(\"values\")),f=u.len;if(e._hasLabels=u.hasLabels,e._hasValues=u.hasValues,!e._hasLabels&&e._hasValues&&(c(\"label0\"),c(\"dlabel\")),f){e._length=f,c(\"marker.line.width\")&&c(\"marker.line.color\"),c(\"marker.colors\"),c(\"scalegroup\");var h,p=c(\"text\"),d=c(\"texttemplate\");if(d||(h=c(\"textinfo\",Array.isArray(p)?\"text+percent\":\"percent\")),c(\"hovertext\"),c(\"hovertemplate\"),d||h&&\"none\"!==h){var g=c(\"textposition\");s(t,e,n,c,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||\"auto\"===g||\"outside\"===g)&&c(\"automargin\"),(\"inside\"===g||\"auto\"===g||Array.isArray(g))&&c(\"insidetextorientation\")}o(e,n,c);var m=c(\"hole\");if(c(\"title.text\")){var v=c(\"title.position\",m?\"middle center\":\"top center\");m||\"middle center\"!==v||(e.title.position=\"top center\"),i.coerceFont(c,\"title.font\",n.font)}c(\"sort\"),c(\"direction\"),c(\"rotation\"),c(\"pull\")}else e.visible=!1}}},{\"../../lib\":503,\"../../plots/domain\":584,\"../bar/defaults\":652,\"./attributes\":900,\"fast-isnumeric\":190}],904:[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,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return 1===t.pts.length&&(r.pointNumber=r.i=t.pts[0]),n(r,e,t.pts),\"funnelarea\"===e.type&&(delete r.v,delete r.i),r}},{\"../../components/fx/helpers\":402}],905:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");function i(t){return-1!==t.indexOf(\"e\")?t.replace(/[.]?0+e/,\"e\"):-1!==t.indexOf(\".\")?t.replace(/[.]?0+$/,\"\"):t}r.formatPiePercent=function(t,e){var r=i((100*t).toPrecision(3));return n.numSeparate(r,e)+\"%\"},r.formatPieValue=function(t,e){var r=i(t.toPrecision(10));return n.numSeparate(r,e)},r.getFirstFilled=function(t,e){if(Array.isArray(t))for(var r=0;r\"),name:f.hovertemplate||-1!==h.indexOf(\"name\")?f.name:void 0,idealAlign:t.pxmid[0]<0?\"left\":\"right\",color:m.castOption(_.bgcolor,t.pts)||t.color,borderColor:m.castOption(_.bordercolor,t.pts),fontFamily:m.castOption(w.family,t.pts),fontSize:m.castOption(w.size,t.pts),fontColor:m.castOption(w.color,t.pts),nameLength:m.castOption(_.namelength,t.pts),textAlign:m.castOption(_.align,t.pts),hovertemplate:m.castOption(f.hovertemplate,t.pts),hovertemplateLabels:t,eventData:[v(t,f)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e,inOut_bbox:T}),t.bbox=T[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,e.emit(\"plotly_hover\",{points:[v(t,f)],event:n.event})}})),t.on(\"mouseout\",(function(t){var r=e._fullLayout,i=e._fullData[c.index],o=n.select(this).datum();c._hasHoverEvent&&(t.originalEvent=n.event,e.emit(\"plotly_unhover\",{points:[v(o,i)],event:n.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(a.loneUnhover(r._hoverlayer.node()),c._hasHoverLabel=!1)})),t.on(\"click\",(function(t){var r=e._fullLayout,i=e._fullData[c.index];e._dragging||!1===r.hovermode||(e._hoverdata=[v(t,i)],a.click(e,n.event))}))}function b(t,e,r){var n=m.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=m.castOption(t._input.textfont.color,e.pts));var i=m.castOption(t.insidetextfont.family,e.pts)||m.castOption(t.textfont.family,e.pts)||r.family,a=m.castOption(t.insidetextfont.size,e.pts)||m.castOption(t.textfont.size,e.pts)||r.size;return{color:n||o.contrast(e.color),family:i,size:a}}function _(t,e){for(var r,n,i=0;ie&&e>n||r=-4;m-=2)v(Math.PI*m,\"tan\");for(m=4;m>=-4;m-=2)v(Math.PI*(m+1),\"tan\")}if(f||p){for(m=4;m>=-4;m-=2)v(Math.PI*(m+1.5),\"rad\");for(m=4;m>=-4;m-=2)v(Math.PI*(m+.5),\"rad\")}}if(s||d||f){var y=Math.sqrt(t.width*t.width+t.height*t.height);if((a={scale:i*n*2/y,rCenter:1-i,rotate:0}).textPosAngle=(e.startangle+e.stopangle)/2,a.scale>=1)return a;g.push(a)}(d||p)&&((a=T(t,n,o,l,c)).textPosAngle=(e.startangle+e.stopangle)/2,g.push(a)),(d||h)&&((a=k(t,n,o,l,c)).textPosAngle=(e.startangle+e.stopangle)/2,g.push(a));for(var x=0,b=0,_=0;_=1)break}return g[x]}function T(t,e,r,n,i){e=Math.max(0,e-2*g);var a=t.width/t.height,o=S(a,n,e,r);return{scale:2*o/t.height,rCenter:A(a,o/e),rotate:M(i)}}function k(t,e,r,n,i){e=Math.max(0,e-2*g);var a=t.height/t.width,o=S(a,n,e,r);return{scale:2*o/t.width,rCenter:A(a,o/e),rotate:M(i+Math.PI/2)}}function A(t,e){return Math.cos(e)-t*e}function M(t){return(180/Math.PI*t+720)%180-90}function S(t,e,r,n){var i=t+1/(2*Math.tan(e));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(t*t+n/2)+t))}function E(t,e){return t.v!==e.vTotal||e.trace.hole?Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2):1}function L(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 C(t,e){var r,n,i,a=t.trace,o={x:t.cx,y:t.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=I(a),-1!==a.title.position.indexOf(\"top\")?(o.y-=(1+i)*t.r,s.ty-=t.titleBox.height):-1!==a.title.position.indexOf(\"bottom\")&&(o.y+=(1+i)*t.r);var l,c,u=(l=t.r,c=t.trace.aspectratio,l/(void 0===c?1:c)),f=e.w*(a.domain.x[1]-a.domain.x[0])/2;return-1!==a.title.position.indexOf(\"left\")?(f+=u,o.x-=(1+i)*u,s.tx+=t.titleBox.width/2):-1!==a.title.position.indexOf(\"center\")?f*=2:-1!==a.title.position.indexOf(\"right\")&&(f+=u,o.x+=(1+i)*u,s.tx-=t.titleBox.width/2),r=f/t.titleBox.width,n=P(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}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 I(t){var e,r=t.pull;if(!r)return 0;if(Array.isArray(r))for(r=0,e=0;er&&(r=t.pull[e]);return r}function O(t,e){for(var r=[],n=0;n1?(c=r.r,u=c/i.aspectratio):(u=r.r,c=u*i.aspectratio),c*=(1+i.baseratio)/2,l=c*u}o=Math.min(o,l/r.vTotal)}for(n=0;n\")}if(a){var x=l.castOption(i,e.i,\"texttemplate\");if(x){var b=function(t){return{label:t.label,value:t.v,valueLabel:m.formatPieValue(t.v,n.separators),percent:t.v/r.vTotal,percentLabel:m.formatPiePercent(t.v/r.vTotal,n.separators),color:t.color,text:t.text,customdata:l.castOption(i,t.i,\"customdata\")}}(e),_=m.getFirstFilled(i.text,e.pts);(y(_)||\"\"===_)&&(b.text=_),e.text=l.texttemplateString(x,b,t._fullLayout._d3locale,b,i._meta||{})}else e.text=\"\"}}function R(t,e){var r=t.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(e.left+e.right)/2,o=(e.top+e.bottom)/2;t.textX=a*n-o*i,t.textY=a*i+o*n,t.noCenter=!0}e.exports={plot:function(t,e){var r=t._fullLayout,a=r._size;d(\"pie\",r),_(e,t),O(e,a);var h=l.makeTraceGroups(r._pielayer,e,\"trace\").each((function(e){var h=n.select(this),d=e[0],g=d.trace;!function(t){var e,r,n,i=t[0],a=i.r,o=i.trace,s=m.getRotationAngle(o.rotation),l=2*Math.PI/i.vTotal,c=\"px0\",u=\"px1\";if(\"counterclockwise\"===o.direction){for(e=0;ei.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-o.hole,r.rInscribed=E(r,i))}(e),h.attr(\"stroke-linejoin\",\"round\"),h.each((function(){var v=n.select(this).selectAll(\"g.slice\").data(e);v.enter().append(\"g\").classed(\"slice\",!0),v.exit().remove();var y=[[[],[]],[[],[]]],_=!1;v.each((function(i,a){if(i.hidden)n.select(this).selectAll(\"path,g\").remove();else{i.pointNumber=i.i,i.curveNumber=g.index,y[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var o=d.cx,c=d.cy,u=n.select(this),h=u.selectAll(\"path.surface\").data([i]);if(h.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":\"all\"}),u.call(x,t,e),g.pull){var v=+m.castOption(g.pull,i.pts)||0;v>0&&(o+=v*i.pxmid[0],c+=v*i.pxmid[1])}i.cxFinal=o,i.cyFinal=c;var T=g.hole;if(i.v===d.vTotal){var k=\"M\"+(o+i.px0[0])+\",\"+(c+i.px0[1])+C(i.px0,i.pxmid,!0,1)+C(i.pxmid,i.px0,!0,1)+\"Z\";T?h.attr(\"d\",\"M\"+(o+T*i.px0[0])+\",\"+(c+T*i.px0[1])+C(i.px0,i.pxmid,!1,T)+C(i.pxmid,i.px0,!1,T)+\"Z\"+k):h.attr(\"d\",k)}else{var A=C(i.px0,i.px1,!0,1);if(T){var M=1-T;h.attr(\"d\",\"M\"+(o+T*i.px1[0])+\",\"+(c+T*i.px1[1])+C(i.px1,i.px0,!1,T)+\"l\"+M*i.px0[0]+\",\"+M*i.px0[1]+A+\"Z\")}else h.attr(\"d\",\"M\"+o+\",\"+c+\"l\"+i.px0[0]+\",\"+i.px0[1]+A+\"Z\")}D(t,i,d);var S=m.castOption(g.textposition,i.pts),E=u.selectAll(\"g.slicetext\").data(i.text&&\"none\"!==S?[0]:[]);E.enter().append(\"g\").classed(\"slicetext\",!0),E.exit().remove(),E.each((function(){var u=l.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),h=l.ensureUniformFontSize(t,\"outside\"===S?function(t,e,r){var n=m.castOption(t.outsidetextfont.color,e.pts)||m.castOption(t.textfont.color,e.pts)||r.color,i=m.castOption(t.outsidetextfont.family,e.pts)||m.castOption(t.textfont.family,e.pts)||r.family,a=m.castOption(t.outsidetextfont.size,e.pts)||m.castOption(t.textfont.size,e.pts)||r.size;return{color:n,family:i,size:a}}(g,i,r.font):b(g,i,r.font));u.text(i.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(s.font,h).call(f.convertToTspans,t);var v,y=s.bBox(u.node());if(\"outside\"===S)v=L(y,i);else if(v=w(y,i,d),\"auto\"===S&&v.scale<1){var x=l.ensureUniformFontSize(t,g.outsidetextfont);u.call(s.font,x),v=L(y=s.bBox(u.node()),i)}var T=v.textPosAngle,k=void 0===T?i.pxmid:z(d.r,T);if(v.targetX=o+k[0]*v.rCenter+(v.x||0),v.targetY=c+k[1]*v.rCenter+(v.y||0),R(v,y),v.outside){var A=v.targetY;i.yLabelMin=A-y.height/2,i.yLabelMid=A,i.yLabelMax=A+y.height/2,i.labelExtraX=0,i.labelExtraY=0,_=!0}v.fontSize=h.size,p(g.type,v,r),e[a].transform=v,u.attr(\"transform\",l.getTextTransform(v))}))}function C(t,e,r,n){var a=n*(e[0]-t[0]),o=n*(e[1]-t[1]);return\"a\"+n*d.r+\",\"+n*d.r+\" 0 \"+i.largeArc+(r?\" 1 \":\" 0 \")+a+\",\"+o}}));var T=n.select(this).selectAll(\"g.titletext\").data(g.title.text?[0]:[]);if(T.enter().append(\"g\").classed(\"titletext\",!0),T.exit().remove(),T.each((function(){var e,r=l.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),i=g.title.text;g._meta&&(i=l.templateString(i,g._meta)),r.text(i).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(s.font,g.title.font).call(f.convertToTspans,t),e=\"middle center\"===g.title.position?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.title.font.size}}(d):C(d,a),r.attr(\"transform\",u(e.x,e.y)+c(Math.min(1,e.scale))+u(e.tx,e.ty))})),_&&function(t,e){var r,n,i,a,o,s,l,c,u,f,h,p,d;function g(t,e){return t.pxmid[1]-e.pxmid[1]}function v(t,e){return e.pxmid[1]-t.pxmid[1]}function y(t,r){r||(r={});var i,c,u,h,p=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),d=n?t.yLabelMin:t.yLabelMax,g=n?t.yLabelMax:t.yLabelMin,v=t.cyFinal+o(t.px0[1],t.px1[1]),y=p-d;if(y*l>0&&(t.labelExtraY=y),Array.isArray(e.pull))for(c=0;c=(m.castOption(e.pull,u.pts)||0)||((t.pxmid[1]-u.pxmid[1])*l>0?(y=u.cyFinal+o(u.px0[1],u.px1[1])-d-t.labelExtraY)*l>0&&(t.labelExtraY+=y):(g+t.labelExtraY-v)*l>0&&(i=3*s*Math.abs(c-f.indexOf(t)),(h=u.cxFinal+a(u.px0[0],u.px1[0])+i-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=h)))}for(n=0;n<2;n++)for(i=n?g:v,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,(c=t[n][r]).sort(i),u=t[1-n][r],f=u.concat(c),p=[],h=0;hMath.abs(f)?s+=\"l\"+f*t.pxmid[0]/t.pxmid[1]+\",\"+f+\"H\"+(a+t.labelExtraX+c):s+=\"l\"+t.labelExtraX+\",\"+u+\"v\"+(f-u)+\"h\"+c}else s+=\"V\"+(t.yLabelMid+t.labelExtraY)+\"h\"+c;l.ensureSingle(r,\"path\",\"textline\").call(o.stroke,e.outsidetextfont.color).attr({\"stroke-width\":Math.min(2,e.outsidetextfont.size/8),d:s,fill:\"none\"})}else r.select(\"path.textline\").remove()}))}(v,g),_&&g.automargin){var k=s.bBox(h.node()),A=g.domain,M=a.w*(A.x[1]-A.x[0]),S=a.h*(A.y[1]-A.y[0]),E=(.5*M-d.r)/a.w,P=(.5*S-d.r)/a.h;i.autoMargin(t,\"pie.\"+g.uid+\".automargin\",{xl:A.x[0]-E,xr:A.x[1]+E,yb:A.y[0]-P,yt:A.y[1]+P,l:Math.max(d.cx-d.r-k.left,0),r:Math.max(k.right-(d.cx+d.r),0),b:Math.max(k.bottom-(d.cy+d.r),0),t:Math.max(d.cy-d.r-k.top,0),pad:5})}}))}));setTimeout((function(){h.selectAll(\"tspan\").each((function(){var t=n.select(this);t.attr(\"dy\")&&t.attr(\"dy\",t.attr(\"dy\"))}))}),0)},formatSliceLabel:D,transformInsideText:w,determineInsideTextFont:b,positionTitleOutside:C,prerenderTitles:_,layoutAreas:O,attachFxHandlers:x,computeTransform:R}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/plots\":619,\"../bar/constants\":650,\"../bar/uniform_text\":664,\"./event_data\":904,\"./helpers\":905,\"@plotly/d3\":58}],910:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"./style_one\"),a=t(\"../bar/uniform_text\").resizeText;e.exports=function(t){var e=t._fullLayout._pielayer.selectAll(\".trace\");a(t,e,\"pie\"),e.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)}))}))}},{\"../bar/uniform_text\":664,\"./style_one\":911,\"@plotly/d3\":58}],911:[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\":366,\"./helpers\":905}],912:[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\":926}],913:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").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;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);if(p)r=p;else for(r=new Int32Array(e),l=0;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var g=i(t.marker.color),m=i(t.marker.border.color),v=t.opacity*t.marker.opacity;g[3]*=v,this.pointcloudOptions.color=g;var y=t.marker.blend;if(null===y){y=c.length<100||u.length<100}this.pointcloudOptions.blend=y,m[3]*=v,this.pointcloudOptions.borderColor=m;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,T=b/2||.5;t._extremes[_._id]=a(_,[d[0],d[2]],{ppad:T}),t._extremes[w._id]=a(w,[d[1],d[3]],{ppad:T})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},{\"../../../stackgl_modules\":1120,\"../../lib/str2rgbarray\":528,\"../../plots/cartesian/autorange\":553,\"../scatter/get_trace_color\":936}],914:[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\":503,\"./attributes\":912}],915:[function(t,e,r){\"use strict\";[\"*pointcloud* trace is deprecated!\",\"Please consider switching to the *scattergl* trace type.\"].join(\" \");e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"../scatter3d/calc\"),plot:t(\"./convert\"),moduleType:\"trace\",name:\"pointcloud\",basePlotModule:t(\"../../plots/gl2d\"),categories:[\"gl\",\"gl2d\",\"showLegend\"],meta:{}}},{\"../../plots/gl2d\":596,\"../scatter3d/calc\":955,\"./attributes\":912,\"./convert\":913,\"./defaults\":914}],916:[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(\"../../plots/template_attributes\").hovertemplateAttrs,c=t(\"../../components/colorscale/attributes\"),u=t(\"../../plot_api/plot_template\").templatedArray,f=t(\"../../plots/cartesian/axis_format_attributes\").descriptionOnlyNumbers,h=t(\"../../lib/extend\").extendFlat,p=t(\"../../plot_api/edit_types\").overrideAll;(e.exports=p({hoverinfo:h({},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\",description:f(\"value\")},valuesuffix:{valType:\"string\",dflt:\"\"},arrangement:{valType:\"enumerated\",values:[\"snap\",\"perpendicular\",\"freeform\",\"fixed\"],dflt:\"snap\"},textfont:n({}),customdata:void 0,node:{label:{valType:\"data_array\",dflt:[]},groups:{valType:\"info_array\",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:\"number\",editType:\"calc\"}},x:{valType:\"data_array\",dflt:[]},y:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},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,hovertemplate:l({},{keys:[\"value\",\"label\"]})},link:{label:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},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,hovertemplate:l({},{keys:[\"value\",\"label\"]}),colorscales:u(\"concentrationscales\",{editType:\"calc\",label:{valType:\"string\",editType:\"calc\",dflt:\"\"},cmax:{valType:\"number\",editType:\"calc\",dflt:1},cmin:{valType:\"number\",editType:\"calc\",dflt:0},colorscale:h(c().colorscale,{dflt:[[0,\"white\"],[1,\"black\"]]})})}},\"calc\",\"nested\")).transforms=void 0},{\"../../components/color/attributes\":365,\"../../components/colorscale/attributes\":373,\"../../components/fx/attributes\":397,\"../../lib/extend\":493,\"../../plot_api/edit_types\":536,\"../../plot_api/plot_template\":543,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/domain\":584,\"../../plots/font_attributes\":585,\"../../plots/template_attributes\":633}],917:[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\"),s=t(\"../../lib/setcursor\"),l=t(\"../../components/dragelement\"),c=t(\"../../plots/cartesian/select\").prepSelect,u=t(\"../../lib\"),f=t(\"../../registry\");function h(t,e){var r=t._fullData[e],n=t._fullLayout,i=n.dragmode,a=\"pan\"===n.dragmode?\"move\":\"crosshair\",o=r._bgRect;if(\"pan\"!==i&&\"zoom\"!==i){s(o,a);var h={_id:\"x\",c2p:u.identity,_offset:r._sankey.translateX,_length:r._sankey.width},p={_id:\"y\",c2p:u.identity,_offset:r._sankey.translateY,_length:r._sankey.height},d={gd:t,element:o.node(),plotinfo:{id:e,xaxis:h,yaxis:p,fillRangeItems:u.noop},subplot:e,xaxes:[h],yaxes:[p],doneFnCompleted:function(r){var n,i=t._fullData[e],a=i.node.groups.slice(),o=[];function s(t){for(var e=i._sankey.graph.nodes,r=0;ry&&(y=a.source[e]),a.target[e]>y&&(y=a.target[e]);var x,b=y+1;t.node._count=b;var _=t.node.groups,w={};for(e=0;e<_.length;e++){var T=_[e];for(x=0;x0&&s(E,b)&&s(L,b)&&(!w.hasOwnProperty(E)||!w.hasOwnProperty(L)||w[E]!==w[L])){w.hasOwnProperty(L)&&(L=w[L]),w.hasOwnProperty(E)&&(E=w[E]),L=+L,h[E=+E]=h[L]=!0;var C=\"\";a.label&&a.label[e]&&(C=a.label[e]);var P=null;C&&p.hasOwnProperty(C)&&(P=p[C]),c.push({pointNumber:e,label:C,color:u?a.color[e]:a.color,customdata:f?a.customdata[e]:a.customdata,concentrationscale:P,source:E,target:L,value:+S}),M.source.push(E),M.target.push(L)}}var I=b+_.length,O=o(r.color),z=o(r.customdata),D=[];for(e=0;eb-1,childrenNodes:[],pointNumber:e,label:R,color:O?r.color[e]:r.color,customdata:z?r.customdata[e]:r.customdata})}var F=!1;return function(t,e,r){for(var a=i.init2dArray(t,0),o=0;o1}))}(I,M.source,M.target)&&(F=!0),{circular:F,links:c,nodes:D,groups:_,groupLookup:w}}e.exports=function(t,e){var r=c(e);return a({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},{\"../../components/colorscale\":378,\"../../lib\":503,\"../../lib/gup\":500,\"strongly-connected-components\":306}],919:[function(t,e,r){\"use strict\";e.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:\"linear\",cn:{sankey:\"sankey\",sankeyLinks:\"sankey-links\",sankeyLink:\"sankey-link\",sankeyNodeSet:\"sankey-node-set\",sankeyNode:\"sankey-node\",nodeRect:\"node-rect\",nodeLabel:\"node-label\"}}},{}],920:[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\"),u=t(\"../../plots/array_container_defaults\");function f(t,e){function r(r,a){return n.coerce(t,e,i.link.colorscales,r,a)}r(\"label\"),r(\"cmin\"),r(\"cmax\"),r(\"colorscale\")}e.exports=function(t,e,r,h){function p(r,a){return n.coerce(t,e,i,r,a)}var d=n.extendDeep(h.hoverlabel,t.hoverlabel),g=t.node,m=c.newContainer(e,\"node\");function v(t,e){return n.coerce(g,m,i.node,t,e)}v(\"label\"),v(\"groups\"),v(\"x\"),v(\"y\"),v(\"pad\"),v(\"thickness\"),v(\"line.color\"),v(\"line.width\"),v(\"hoverinfo\",t.hoverinfo),l(g,m,v,d),v(\"hovertemplate\");var y=h.colorway;v(\"color\",m.label.map((function(t,e){return a.addOpacity(function(t){return y[t%y.length]}(e),.8)}))),v(\"customdata\");var x=t.link||{},b=c.newContainer(e,\"link\");function _(t,e){return n.coerce(x,b,i.link,t,e)}_(\"label\"),_(\"source\"),_(\"target\"),_(\"value\"),_(\"line.color\"),_(\"line.width\"),_(\"hoverinfo\",t.hoverinfo),l(x,b,_,d),_(\"hovertemplate\");var w,T=o(h.paper_bgcolor).getLuminance()<.333?\"rgba(255, 255, 255, 0.6)\":\"rgba(0, 0, 0, 0.2)\";_(\"color\",n.repeat(T,b.value.length)),_(\"customdata\"),u(x,b,{name:\"colorscales\",handleItemDefaults:f}),s(e,h,p),p(\"orientation\"),p(\"valueformat\"),p(\"valuesuffix\"),m.x.length&&m.y.length&&(w=\"freeform\"),p(\"arrangement\",w),n.coerceFont(p,\"textfont\",n.extendFlat({},h.font)),e._length=null}},{\"../../components/color\":366,\"../../components/fx/hoverlabel_defaults\":404,\"../../lib\":503,\"../../plot_api/plot_template\":543,\"../../plots/array_container_defaults\":549,\"../../plots/domain\":584,\"./attributes\":916,tinycolor2:312}],921:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),moduleType:\"trace\",name:\"sankey\",basePlotModule:t(\"./base_plot\"),selectPoints:t(\"./select.js\"),categories:[\"noOpacity\"],meta:{}}},{\"./attributes\":916,\"./base_plot\":917,\"./calc\":918,\"./defaults\":920,\"./plot\":922,\"./select.js\":924}],922:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.numberFormat,o=t(\"./render\"),s=t(\"../../components/fx\"),l=t(\"../../components/color\"),c=t(\"./constants\").cn,u=i._;function f(t){return\"\"!==t}function h(t,e){return t.filter((function(t){return t.key===e.traceId}))}function p(t,e){n.select(t).select(\"path\").style(\"fill-opacity\",e),n.select(t).select(\"rect\").style(\"fill-opacity\",e)}function d(t){n.select(t).select(\"text.name\").style(\"fill\",\"black\")}function g(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function m(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&&h(r,e).selectAll(\".\"+c.sankeyLink).filter(g(e)).call(x.bind(0,e,r,!1))}function y(t,e,r){e&&r&&h(r,e).selectAll(\".\"+c.sankeyLink).filter(g(e)).call(b.bind(0,e,r,!1))}function x(t,e,r,n){var i=n.datum().link.label;n.style(\"fill-opacity\",(function(t){if(!t.link.concentrationscale)return.4})),i&&h(e,t).selectAll(\".\"+c.sankeyLink).filter((function(t){return t.link.label===i})).style(\"fill-opacity\",(function(t){if(!t.link.concentrationscale)return.4})),r&&h(e,t).selectAll(\".\"+c.sankeyNode).filter(m(t)).call(v)}function b(t,e,r,n){var i=n.datum().link.label;n.style(\"fill-opacity\",(function(t){return t.tinyColorAlpha})),i&&h(e,t).selectAll(\".\"+c.sankeyLink).filter((function(t){return t.link.label===i})).style(\"fill-opacity\",(function(t){return t.tinyColorAlpha})),r&&h(e,t).selectAll(c.sankeyNode).filter(m(t)).call(y)}function _(t,e){var r=t.hoverlabel||{},n=i.nestedProperty(r,e).get();return!Array.isArray(n)&&n}e.exports=function(t,e){for(var r=t._fullLayout,i=r._paper,h=r._size,g=0;g\"),color:_(o,\"bgcolor\")||l.addOpacity(g.color,1),borderColor:_(o,\"bordercolor\"),fontFamily:_(o,\"font.family\"),fontSize:_(o,\"font.size\"),fontColor:_(o,\"font.color\"),nameLength:_(o,\"namelength\"),textAlign:_(o,\"align\"),idealAlign:n.event.x\"),color:_(o,\"bgcolor\")||i.tinyColorHue,borderColor:_(o,\"bordercolor\"),fontFamily:_(o,\"font.family\"),fontSize:_(o,\"font.size\"),fontColor:_(o,\"font.color\"),nameLength:_(o,\"namelength\"),textAlign:_(o,\"align\"),idealAlign:\"left\",hovertemplate:o.hovertemplate,hovertemplateLabels:y,eventData:[i.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});p(w,.85),d(w)}}},unhover:function(e,i,a){!1!==t._fullLayout.hovermode&&(n.select(e).call(y,i,a),\"skip\"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,t.emit(\"plotly_unhover\",{event:n.event,points:[i.node]})),s.loneUnhover(r._hoverlayer.node()))},select:function(e,r,i){var a=r.node;a.originalEvent=n.event,t._hoverdata=[a],n.select(e).call(y,r,i),s.click(t,{target:!0})}}})}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../lib\":503,\"./constants\":919,\"./render\":923,\"@plotly/d3\":58}],923:[function(t,e,r){\"use strict\";var n=t(\"d3-force\"),i=t(\"d3-interpolate\").interpolateNumber,a=t(\"@plotly/d3\"),o=t(\"@plotly/d3-sankey\"),s=t(\"@plotly/d3-sankey-circular\"),l=t(\"./constants\"),c=t(\"tinycolor2\"),u=t(\"../../components/color\"),f=t(\"../../components/drawing\"),h=t(\"../../lib\"),p=h.strTranslate,d=h.strRotate,g=t(\"../../lib/gup\"),m=g.keyFun,v=g.repeat,y=g.unwrap,x=t(\"../../lib/svg_text_utils\"),b=t(\"../../registry\"),_=t(\"../../constants/alignment\"),w=_.CAP_SHIFT,T=_.LINE_SPACING;function k(t,e,r){var n,i=y(e),a=i.trace,u=a.domain,f=\"h\"===a.orientation,p=a.node.pad,d=a.node.thickness,g=t.width*(u.x[1]-u.x[0]),m=t.height*(u.y[1]-u.y[0]),v=i._nodes,x=i._links,b=i.circular;(n=b?s.sankeyCircular().circularLinkGap(0):o.sankey()).iterations(l.sankeyIterations).size(f?[g,m]:[m,g]).nodeWidth(d).nodePadding(p).nodeId((function(t){return t.pointNumber})).nodes(v).links(x);var _,w,T,k=n();for(var A in n.nodePadding()=i||(r=i-e.y0)>1e-6&&(e.y0+=r,e.y1+=r),i=e.y1+p}))}(function(t){var e,r,n=t.map((function(t,e){return{x0:t.x0,index:e}})).sort((function(t,e){return t.x0-e.x0})),i=[],a=-1,o=-1/0;for(_=0;_o+d&&(a+=1,e=s.x0),o=s.x0,i[a]||(i[a]=[]),i[a].push(s),r=e-s.x0,s.x0+=r,s.x1+=r}return i}(v=k.nodes));n.update(k)}return{circular:b,key:r,trace:a,guid:h.randstr(),horizontal:f,width:g,height:m,nodePad:a.node.pad,nodeLineColor:a.node.line.color,nodeLineWidth:a.node.line.width,linkLineColor:a.link.line.color,linkLineWidth:a.link.line.width,valueFormat:a.valueformat,valueSuffix:a.valuesuffix,textFont:a.textfont,translateX:u.x[0]*t.width+t.margin.l,translateY:t.height-u.y[1]*t.height+t.margin.t,dragParallel:f?m:g,dragPerpendicular:f?g:m,arrangement:a.arrangement,sankey:n,graph:k,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function A(t,e,r){var n=c(e.color),i=e.source.label+\"|\"+e.target.label+\"__\"+r;return e.trace=t.trace,e.curveNumber=t.trace.index,{circular:t.circular,key:i,traceId:t.key,pointNumber:e.pointNumber,link:e,tinyColorHue:u.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:M,linkLineColor:t.linkLineColor,linkLineWidth:t.linkLineWidth,valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,parent:t,interactionState:t.interactionState,flow:e.flow}}function M(){return function(t){if(t.link.circular)return e=t.link,r=e.width/2,n=e.circularPathData,\"top\"===e.circularLinkType?\"M \"+n.targetX+\" \"+(n.targetY+r)+\" L\"+n.rightInnerExtent+\" \"+(n.targetY+r)+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightSmallArcRadius+r)+\" 0 0 1 \"+(n.rightFullExtent-r)+\" \"+(n.targetY-n.rightSmallArcRadius)+\"L\"+(n.rightFullExtent-r)+\" \"+n.verticalRightInnerExtent+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightLargeArcRadius+r)+\" 0 0 1 \"+n.rightInnerExtent+\" \"+(n.verticalFullExtent-r)+\"L\"+n.leftInnerExtent+\" \"+(n.verticalFullExtent-r)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftLargeArcRadius+r)+\" 0 0 1 \"+(n.leftFullExtent+r)+\" \"+n.verticalLeftInnerExtent+\"L\"+(n.leftFullExtent+r)+\" \"+(n.sourceY-n.leftSmallArcRadius)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftSmallArcRadius+r)+\" 0 0 1 \"+n.leftInnerExtent+\" \"+(n.sourceY+r)+\"L\"+n.sourceX+\" \"+(n.sourceY+r)+\"L\"+n.sourceX+\" \"+(n.sourceY-r)+\"L\"+n.leftInnerExtent+\" \"+(n.sourceY-r)+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftSmallArcRadius-r)+\" 0 0 0 \"+(n.leftFullExtent-r)+\" \"+(n.sourceY-n.leftSmallArcRadius)+\"L\"+(n.leftFullExtent-r)+\" \"+n.verticalLeftInnerExtent+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftLargeArcRadius-r)+\" 0 0 0 \"+n.leftInnerExtent+\" \"+(n.verticalFullExtent+r)+\"L\"+n.rightInnerExtent+\" \"+(n.verticalFullExtent+r)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightLargeArcRadius-r)+\" 0 0 0 \"+(n.rightFullExtent+r)+\" \"+n.verticalRightInnerExtent+\"L\"+(n.rightFullExtent+r)+\" \"+(n.targetY-n.rightSmallArcRadius)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightSmallArcRadius-r)+\" 0 0 0 \"+n.rightInnerExtent+\" \"+(n.targetY-r)+\"L\"+n.targetX+\" \"+(n.targetY-r)+\"Z\":\"M \"+n.targetX+\" \"+(n.targetY-r)+\" L\"+n.rightInnerExtent+\" \"+(n.targetY-r)+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightSmallArcRadius+r)+\" 0 0 0 \"+(n.rightFullExtent-r)+\" \"+(n.targetY+n.rightSmallArcRadius)+\"L\"+(n.rightFullExtent-r)+\" \"+n.verticalRightInnerExtent+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightLargeArcRadius+r)+\" 0 0 0 \"+n.rightInnerExtent+\" \"+(n.verticalFullExtent+r)+\"L\"+n.leftInnerExtent+\" \"+(n.verticalFullExtent+r)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftLargeArcRadius+r)+\" 0 0 0 \"+(n.leftFullExtent+r)+\" \"+n.verticalLeftInnerExtent+\"L\"+(n.leftFullExtent+r)+\" \"+(n.sourceY+n.leftSmallArcRadius)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftSmallArcRadius+r)+\" 0 0 0 \"+n.leftInnerExtent+\" \"+(n.sourceY-r)+\"L\"+n.sourceX+\" \"+(n.sourceY-r)+\"L\"+n.sourceX+\" \"+(n.sourceY+r)+\"L\"+n.leftInnerExtent+\" \"+(n.sourceY+r)+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftSmallArcRadius-r)+\" 0 0 1 \"+(n.leftFullExtent-r)+\" \"+(n.sourceY+n.leftSmallArcRadius)+\"L\"+(n.leftFullExtent-r)+\" \"+n.verticalLeftInnerExtent+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftLargeArcRadius-r)+\" 0 0 1 \"+n.leftInnerExtent+\" \"+(n.verticalFullExtent-r)+\"L\"+n.rightInnerExtent+\" \"+(n.verticalFullExtent-r)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightLargeArcRadius-r)+\" 0 0 1 \"+(n.rightFullExtent+r)+\" \"+n.verticalRightInnerExtent+\"L\"+(n.rightFullExtent+r)+\" \"+(n.targetY+n.rightSmallArcRadius)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightSmallArcRadius-r)+\" 0 0 1 \"+n.rightInnerExtent+\" \"+(n.targetY+r)+\"L\"+n.targetX+\" \"+(n.targetY+r)+\"Z\";var e,r,n,a=t.link.source.x1,o=t.link.target.x0,s=i(a,o),l=s(.5),c=s(.5),u=t.link.y0-t.link.width/2,f=t.link.y0+t.link.width/2,h=t.link.y1-t.link.width/2,p=t.link.y1+t.link.width/2;return\"M\"+a+\",\"+u+\"C\"+l+\",\"+u+\" \"+c+\",\"+h+\" \"+o+\",\"+h+\"L\"+o+\",\"+p+\"C\"+c+\",\"+p+\" \"+l+\",\"+f+\" \"+a+\",\"+f+\"Z\"}}function S(t,e){var r=c(e.color),n=l.nodePadAcross,i=t.nodePad/2;e.dx=e.x1-e.x0,e.dy=e.y1-e.y0;var a=e.dx,o=Math.max(.5,e.dy),s=\"node_\"+e.pointNumber;return e.group&&(s=h.randstr()),e.trace=t.trace,e.curveNumber=t.trace.index,{index:e.pointNumber,key:s,partOfGroup:e.partOfGroup||!1,group:e.group,traceId:t.key,trace:t.trace,node:e,nodePad:t.nodePad,nodeLineColor:t.nodeLineColor,nodeLineWidth:t.nodeLineWidth,textFont:t.textFont,size:t.horizontal?t.height:t.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:t.horizontal?e.dy/2+1:e.dx/2+1,left:1===e.originalLayer,sizeAcross:t.width,forceLayouts:t.forceLayouts,horizontal:t.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:u.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,graph:t.graph,arrangement:t.arrangement,uniqueNodeLabelPathId:[t.guid,t.key,s].join(\"_\"),interactionState:t.interactionState,figure:t}}function E(t){t.attr(\"transform\",(function(t){return p(t.node.x0.toFixed(3),t.node.y0.toFixed(3))}))}function L(t){t.call(E)}function C(t,e){t.call(L),e.attr(\"d\",M())}function P(t){t.attr(\"width\",(function(t){return t.node.x1-t.node.x0})).attr(\"height\",(function(t){return t.visibleHeight}))}function I(t){return t.link.width>1||t.linkLineWidth>0}function O(t){return p(t.translateX,t.translateY)+(t.horizontal?\"matrix(1 0 0 1 0 0)\":\"matrix(0 1 1 0 0 0)\")}function z(t,e,r){t.on(\".basic\",null).on(\"mouseover.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.hover(this,t,e),t.interactionState.hovered=[this,t])})).on(\"mousemove.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.follow(this,t),t.interactionState.hovered=[this,t])})).on(\"mouseout.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(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||t.partOfGroup||r.select(this,t,e)}))}function D(t,e,r,i){var o=a.behavior.drag().origin((function(t){return{x:t.node.x0+t.visibleWidth/2,y:t.node.y0+t.visibleHeight/2}})).on(\"dragstart\",(function(a){if(\"fixed\"!==a.arrangement&&(h.ensureSingle(i._fullLayout._infolayer,\"g\",\"dragcover\",(function(t){i._fullLayout._dragCover=t})),h.raiseToTop(this),a.interactionState.dragInProgress=a.node,F(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),\"snap\"===a.arrangement)){var o=a.traceId+\"|\"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):function(t,e,r,i){!function(t){for(var e=0;e0&&n.forceLayouts[e].alpha(0)}}(0,e,a,r)).stop()}(0,o,a),function(t,e,r,n,i){window.requestAnimationFrame((function a(){var o;for(o=0;o0)window.requestAnimationFrame(a);else{var s=r.node.originalX;r.node.x0=s-r.visibleWidth/2,r.node.x1=s+r.visibleWidth/2,R(r,i)}}))}(t,e,a,o,i)}})).on(\"drag\",(function(r){if(\"fixed\"!==r.arrangement){var n=a.event.x,i=a.event.y;\"snap\"===r.arrangement?(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2,r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2):(\"freeform\"===r.arrangement&&(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2),i=Math.max(0,Math.min(r.size-r.visibleHeight/2,i)),r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2),F(r.node),\"snap\"!==r.arrangement&&(r.sankey.update(r.graph),C(t.filter(B(r)),e))}})).on(\"dragend\",(function(t){if(\"fixed\"!==t.arrangement){t.interactionState.dragInProgress=!1;for(var e=0;el&&C[v].gap;)v--;for(x=C[v].s,g=C.length-1;g>v;g--)C[g].s=x;for(;lM[u]&&u=0;i--){var a=t[i];if(\"scatter\"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],933:[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(\"./period_defaults\"),u=t(\"./stack_defaults\"),f=t(\"./marker_defaults\"),h=t(\"./line_defaults\"),p=t(\"./line_shape_defaults\"),d=t(\"./text_defaults\"),g=t(\"./fillcolor_defaults\");e.exports=function(t,e,r,m){function v(r,i){return n.coerce(t,e,a,r,i)}var y=l(t,e,m,v);if(y||(e.visible=!1),e.visible){c(t,e,m,v),v(\"xhoverformat\"),v(\"yhoverformat\");var x=u(t,e,m,v),b=!x&&y=Math.min(e,r)&&d<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(h.c2p(t.x)-d);return a=Math.min(e,r)&&g<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(p.c2p(t.y)-g);return aW!=(N=z[I][1])>=W&&(R=z[I-1][0],F=z[I][0],N-B&&(D=R+(F-R)*(W-B)/(N-B),H=Math.min(H,D),q=Math.max(q,D)));H=Math.max(H,0),q=Math.min(q,h._length);var X=s.defaultLine;return s.opacity(f.fillcolor)?X=f.fillcolor:s.opacity((f.line||{}).color)&&(X=f.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:H,x1:q,y0:W,y1:W,color:X,hovertemplate:!1}),delete t.index,f.text&&!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../lib\":503,\"../../registry\":638,\"./get_trace_color\":936}],938:[function(t,e,r){\"use strict\";var n=t(\"./subtypes\");e.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"./cross_trace_defaults\"),calc:t(\"./calc\").calc,crossTraceCalc:t(\"./cross_trace_calc\"),arraysToCalcdata:t(\"./arrays_to_calcdata\"),plot:t(\"./plot\"),colorbar:t(\"./marker_colorbar\"),formatLabels:t(\"./format_labels\"),style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"./select\"),animatable:!0,moduleType:\"trace\",name:\"scatter\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"symbols\",\"errorBarsOK\",\"showLegend\",\"scatter-like\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"./arrays_to_calcdata\":925,\"./attributes\":926,\"./calc\":927,\"./cross_trace_calc\":931,\"./cross_trace_defaults\":932,\"./defaults\":933,\"./format_labels\":935,\"./hover\":937,\"./marker_colorbar\":944,\"./plot\":947,\"./select\":948,\"./style\":950,\"./subtypes\":951}],939:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray,i=t(\"../../components/colorscale/helpers\").hasColorscale,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\"}):s(\"line.color\",!n(c)&&c||r);s(\"line.width\"),(l||{}).noDash||s(\"line.dash\")}},{\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503}],940:[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,m,v,y,x,b,_,w,T,k,A,M,S=e.xaxis,E=e.yaxis,L=\"log\"===S.type,C=\"log\"===E.type,P=S._length,I=E._length,O=e.connectGaps,z=e.baseTolerance,D=e.shape,R=\"linear\"===D,F=e.fill&&\"none\"!==e.fill,B=[],N=f.minTolerance,j=t.length,U=new Array(j),V=0;function H(r){var n=t[r];if(!n)return!1;var a=e.linearized?S.l2p(n.x):S.c2p(n.x),l=e.linearized?E.l2p(n.y):E.c2p(n.y);if(a===i){if(L&&(a=S.c2p(n.x,!0)),a===i)return!1;C&&l===i&&(a*=Math.abs(S._m*I*(S._m>0?o:s)/(E._m*P*(E._m>0?o:s)))),a*=1e3}if(l===i){if(C&&(l=E.c2p(n.y,!0)),l===i)return!1;l*=1e3}return[a,l]}function q(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&&crt||t[1]it)return[u(t[0],et,rt),u(t[1],nt,it)]}function st(t,e){return t[0]===e[0]&&(t[0]===et||t[0]===rt)||(t[1]===e[1]&&(t[1]===nt||t[1]===it)||void 0)}function lt(t,e,r){return function(n,i){var a=ot(n),o=ot(i),s=[];if(a&&o&&st(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 ct(t){var e=t[0],r=t[1],n=e===U[V-1][0],i=r===U[V-1][1];if(!n||!i)if(V>1){var a=e===U[V-2][0],o=r===U[V-2][1];n&&(e===et||e===rt)&&a?o?V--:U[V-1]=t:i&&(r===nt||r===it)&&o?a?V--:U[V-1]=t:U[V++]=t}else U[V++]=t}function ut(t){U[V-1][0]!==t[0]&&U[V-1][1]!==t[1]&&ct([Z,J]),ct(t),K=null,Z=J=0}function ft(t){if(A=t[0]/P,M=t[1]/I,W=t[0]rt?rt:0,X=t[1]it?it:0,W||X){if(V)if(K){var e=$(K,t);e.length>1&&(ut(e[0]),U[V++]=e[1])}else Q=$(U[V-1],t)[0],U[V++]=Q;else U[V++]=[W||t[0],X||t[1]];var r=U[V-1];W&&X&&(r[0]!==W||r[1]!==X)?(K&&(Z!==W&&J!==X?ct(Z&&J?(n=K,a=(i=t)[0]-n[0],o=(i[1]-n[1])/a,(n[1]*i[0]-i[1]*n[0])/a>0?[o>0?et:rt,it]:[o>0?rt:et,nt]):[Z||W,J||X]):Z&&J&&ct([Z,J])),ct([W,X])):Z-W&&J-X&&ct([W||Z,X||J]),K=t,Z=W,J=X}else K&&ut($(K,t)[0]),U[V++]=t;var n,i,a,o}for(\"linear\"===D||\"spline\"===D?$=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var a=at[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&&Y(o,t)G(d,ht))break;a=d,(_=v[0]*m[0]+v[1]*m[1])>x?(x=_,h=d,g=!1):_=t.length||!d)break;ft(d),n=d}}else ft(h)}K&&ct([Z||K[0],J||K[1]]),B.push(U.slice(0,V))}return B}},{\"../../constants/numerical\":479,\"../../lib\":503,\"./constants\":930}],941:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){\"spline\"===r(\"line.shape\")&&r(\"line.smoothing\")}},{}],942:[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=0?l=p:(l=p=h,h++),l0?Math.max(r,a):0}}},{\"fast-isnumeric\":190}],944:[function(t,e,r){\"use strict\";e.exports={container:\"marker\",min:\"cmin\",max:\"cmax\"}},{}],945:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/helpers\").hasColorscale,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\":366,\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"./subtypes\":951}],946:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").dateTick0,i=t(\"../../constants/numerical\").ONEWEEK;function a(t,e){return n(e,t%i==0?1:0)}e.exports=function(t,e,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n(\"xperiod\");o&&(n(\"xperiod0\",a(o,e.xcalendar)),n(\"xperiodalignment\"))}if(i.y){var s=n(\"yperiod\");s&&(n(\"yperiod0\",a(s,e.ycalendar)),n(\"yperiodalignment\"))}}},{\"../../constants/numerical\":479,\"../../lib\":503}],947:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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 m;!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),m=0;o.forEach((function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(t){return v?t.transition():t}var x=r.xaxis,b=r.yaxis,_=f[0].trace,w=_.line,T=n.select(d),k=o(T,\"g\",\"errorbars\"),A=o(T,\"g\",\"lines\"),M=o(T,\"g\",\"points\"),S=o(T,\"g\",\"text\");if(i.getComponentMethod(\"errorbars\",\"plot\")(t,k,r,g),!0===_.visible){var E,L;y(T).style(\"opacity\",_.opacity);var C=_.fill.charAt(_.fill.length-1);\"x\"!==C&&\"y\"!==C&&(C=\"\"),f[0][r.isRangePlot?\"nodeRangePlot3\":\"node3\"]=T;var P,I,O=\"\",z=[],D=_._prevtrace;D&&(O=D._prevRevpath||\"\",L=D._nextFill,z=D._polygons);var R,F,B,N,j,U,V,H=\"\",q=\"\",G=[],Y=a.noop;if(E=_._ownFill,c.hasLines(_)||\"none\"!==_.fill){for(L&&L.datum(f),-1!==[\"hv\",\"vh\",\"hvh\",\"vhv\"].indexOf(w.shape)?(R=l.steps(w.shape),F=l.steps(w.shape.split(\"\").reverse().join(\"\"))):R=F=\"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\")},B=function(t){return F(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,fill:_.fill}),V=_._polygons=new Array(G.length),m=0;m1){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 W=A.selectAll(\".js-line\").data(G);y(W.exit()).style(\"opacity\",0).remove(),W.each(Y(!1)),W.enter().append(\"path\").classed(\"js-line\",!0).style(\"vector-effect\",\"non-scaling-stroke\").call(l.lineGroupStyle).each(Y(!0)),l.setClipUrl(W,r.layerClipId,t),G.length?(E?(E.datum(f),N&&U&&(C?(\"y\"===C?N[1]=U[1]=b.c2p(0,!0):\"x\"===C&&(N[0]=U[0]=x.c2p(0,!0)),y(E).attr(\"d\",\"M\"+U+\"L\"+N+\"L\"+H.substr(1)).call(l.singleFillStyle)):y(E).attr(\"d\",H+\"Z\").call(l.singleFillStyle))):L&&(\"tonext\"===_.fill.substr(0,6)&&H&&O?(\"tonext\"===_.fill?y(L).attr(\"d\",H+\"Z\"+O+\"Z\").call(l.singleFillStyle):y(L).attr(\"d\",H+\"L\"+O.substr(1)+\"Z\").call(l.singleFillStyle),_._polygons=_._polygons.concat(z)):(Z(L),_._polygons=null)),_._prevRevpath=q,_._prevPolygons=V):(E?Z(E):L&&Z(L),_._polygons=_._prevRevpath=_._prevPolygons=null),M.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 m=s,_=u.stackgroup,w=_&&\"infer zero\"===t._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?m=w?K:J:_&&!w&&(m=Q),f&&(d=m),h&&(g=m)}var T,k=(o=e.selectAll(\"path.point\").data(d,p)).enter().append(\"path\").classed(\"point\",!0);v&&k.call(l.pointStyle,u,t).call(l.translatePoints,x,b).style(\"opacity\",0).transition().style(\"opacity\",1),o.order(),f&&(T=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,T,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()})),v?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()}(M,S,f);var X=!1===_.cliponaxis?null:r.layerClipId;l.setClipUrl(M,X,t),l.setClipUrl(S,X,t)}function Z(t){y(t).attr(\"d\",\"M0,0Z\")}function J(t){return t.filter((function(t){return!t.gap&&t.vis}))}function K(t){return t.filter((function(t){return t.vis}))}function Q(t){return t.filter((function(t){return!t.gap}))}function $(t){return t.id}function tt(t){if(t.ids)return $}function et(){return!1}}e.exports=function(t,e,r,i,a,c){var u,h,d=!a,g=!!a&&a.duration>0,m=f(t,e,r);((u=i.selectAll(\"g.trace\").data(m,(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(e){var i=o(n.select(this),\"g\",\"fills\");l.setClipUrl(i,r.layerClipId,t);var a=e[0].trace,c=[];a._ownfill&&c.push(\"_ownFill\"),a._nexttrace&&c.push(\"_nextFill\");var u=i.selectAll(\"g\").data(c,s);u.enter().append(\"g\"),u.exit().each((function(t){a[t]=null})).remove(),u.order().each((function(t){a[t]=o(n.select(this),\"path\",\"js-fill\")}))}))}(t,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,m,this,a)}))}))):u.each((function(r,n){p(t,n,e,r,m,this,a)}));d&&u.exit().remove(),i.selectAll(\"path:not([d])\").remove()}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/polygon\":515,\"../../registry\":638,\"./line_points\":940,\"./link_traces\":942,\"./subtypes\":951,\"@plotly/d3\":58}],948:[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;r0){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-1?-1:t.indexOf(\"right\")>-1?1:0}function b(t){return null==t?0:t.indexOf(\"top\")>-1?-1:t.indexOf(\"bottom\")>-1?1:0}function _(t,e){return e(4*t)}function w(t){return p[t]}function T(t,e,r,n,i){var a=null;if(l.isArrayOrTypedArray(t)){a=[];for(var o=0;o=0){var g=function(t,e,r){var n,i=(r+1)%3,a=(r+2)%3,o=[],l=[];for(n=0;n=0&&f(\"surfacecolor\",h||p);for(var d=[\"x\",\"y\",\"z\"],g=0;g<3;++g){var m=\"projection.\"+d[g];f(m+\".show\")&&(f(m+\".opacity\"),f(m+\".scale\"))}var v=n.getComponentMethod(\"errorbars\",\"supplyDefaults\");v(t,e,h||p||r,{axis:\"z\"}),v(t,e,h||p||r,{axis:\"y\",inherit:\"z\"}),v(t,e,h||p||r,{axis:\"x\",inherit:\"z\"})}else e.visible=!1}},{\"../../lib\":503,\"../../registry\":638,\"../scatter/line_defaults\":939,\"../scatter/marker_defaults\":945,\"../scatter/subtypes\":951,\"../scatter/text_defaults\":952,\"./attributes\":954}],959:[function(t,e,r){\"use strict\";e.exports={plot:t(\"./convert\"),attributes:t(\"./attributes\"),markerSymbols:t(\"../../constants/gl3d_markers\"),supplyDefaults:t(\"./defaults\"),colorbar:[{container:\"marker\",min:\"cmin\",max:\"cmax\"},{container:\"line\",min:\"cmin\",max:\"cmax\"}],calc:t(\"./calc\"),moduleType:\"trace\",name:\"scatter3d\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../constants/gl3d_markers\":477,\"../../plots/gl3d\":598,\"./attributes\":954,\"./calc\":955,\"./convert\":957,\"./defaults\":958}],960:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../../plots/template_attributes\").texttemplateAttrs,s=t(\"../../components/colorscale/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=n.marker,u=n.line,f=c.line;e.exports={carpet:{valType:\"string\",editType:\"calc\"},a:{valType:\"data_array\",editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},mode:l({},n.mode,{dflt:\"markers\"}),text:l({},n.text,{}),texttemplate:o({editType:\"plot\"},{keys:[\"a\",\"b\",\"text\"]}),hovertext:l({},n.hovertext,{}),line:{color:u.color,width:u.width,dash:u.dash,shape:l({},u.shape,{values:[\"linear\",\"spline\"]}),smoothing:u.smoothing,editType:\"calc\"},connectgaps:n.connectgaps,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\"},s(\"marker.line\")),gradient:c.gradient,editType:\"calc\"},s(\"marker\")),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:l({},i.hoverinfo,{flags:[\"a\",\"b\",\"text\",\"name\"]}),hoveron:n.hoveron,hovertemplate:a()}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926}],961:[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\")}return o}function y(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,\"\"):t._hovertitle,m.push(r+\": \"+e.toFixed(3)+t.labelsuffix)}}},{\"../../lib\":503,\"../scatter/hover\":937}],966:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../scatter/select\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"scattercarpet\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"svg\",\"carpet\",\"symbols\",\"showLegend\",\"carpetDependent\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":960,\"./calc\":961,\"./defaults\":962,\"./event_data\":963,\"./format_labels\":964,\"./hover\":965,\"./plot\":967}],967:[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\")}(c,g,t,l[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}},{\"../../components/fx\":406,\"../../constants/numerical\":479,\"../../lib\":503,\"../scatter/get_trace_color\":936,\"./attributes\":968}],974:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),calcGeoJSON:t(\"./plot\").calcGeoJSON,plot:t(\"./plot\").plot,style:t(\"./style\"),styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"scattergeo\",basePlotModule:t(\"../../plots/geo\"),categories:[\"geo\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/geo\":589,\"../scatter/marker_colorbar\":944,\"../scatter/style\":950,\"./attributes\":968,\"./calc\":969,\"./defaults\":970,\"./event_data\":971,\"./format_labels\":972,\"./hover\":973,\"./plot\":975,\"./select\":976,\"./style\":977}],975:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../lib/topojson_utils\").getTopojsonFeatures,o=t(\"../../lib/geojson_utils\"),s=t(\"../../lib/geo_location_utils\"),l=t(\"../../plots/cartesian/autorange\").findExtremes,c=t(\"../../constants/numerical\").BADNUM,u=t(\"../scatter/calc\").calcMarkerSize,f=t(\"../scatter/subtypes\"),h=t(\"./style\");e.exports={calcGeoJSON:function(t,e){var r,n,i=t[0].trace,o=e[i.geo],f=o._subplot,h=i._length;if(Array.isArray(i.locations)){var p=i.locationmode,d=\"geojson-id\"===p?s.extractTraceFeature(t):a(i,f.topojson);for(r=0;r=m,w=2*b,T={},k=l.makeCalcdata(e,\"x\"),A=y.makeCalcdata(e,\"y\"),M=s(e,l,\"x\",k),S=s(e,y,\"y\",A),E=M.vals,L=S.vals;e._x=E,e._y=L,e.xperiodalignment&&(e._origX=k,e._xStarts=M.starts,e._xEnds=M.ends),e.yperiodalignment&&(e._origY=A,e._yStarts=S.starts,e._yEnds=S.ends);var C=new Array(w),P=new Array(b);for(r=0;r1&&i.extendFlat(s.line,p.linePositions(t,r,n));if(s.errorX||s.errorY){var l=p.errorBarPositions(t,r,n,a,o);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}s.text&&(i.extendFlat(s.text,{positions:n},p.textPosition(t,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},p.textPosition(t,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},p.textPosition(t,r,s.text,s.markerUnsel)));return s}(t,0,e,C,E,L),z=d(t,x);return f(o,e),_?O.marker&&(I=O.marker.sizeAvg||Math.max(O.marker.size,3)):I=c(e,b),u(t,e,l,y,E,L,I),O.errorX&&v(e,l,O.errorX),O.errorY&&v(e,y,O.errorY),O.fill&&!z.fill2d&&(z.fill2d=!0),O.marker&&!z.scatter2d&&(z.scatter2d=!0),O.line&&!z.line2d&&(z.line2d=!0),!O.errorX&&!O.errorY||z.error2d||(z.error2d=!0),O.text&&!z.glText&&(z.glText=!0),O.marker&&(O.marker.snap=b),z.lineOptions.push(O.line),z.errorXOptions.push(O.errorX),z.errorYOptions.push(O.errorY),z.fillOptions.push(O.fill),z.markerOptions.push(O.marker),z.markerSelectedOptions.push(O.markerSel),z.markerUnselectedOptions.push(O.markerUnsel),z.textOptions.push(O.text),z.textSelectedOptions.push(O.textSel),z.textUnselectedOptions.push(O.textUnsel),z.selectBatch.push([]),z.unselectBatch.push([]),T._scene=z,T.index=z.count,T.x=E,T.y=L,T.positions=C,z.count++,[{x:!1,y:!1,t:T,trace:e}]}},{\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/align_period\":551,\"../../plots/cartesian/autorange\":553,\"../../plots/cartesian/axis_ids\":558,\"../scatter/calc\":927,\"../scatter/colorscale_calc\":929,\"./constants\":980,\"./convert\":981,\"./scene_update\":989,\"@plotly/point-cluster\":59}],980:[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]}}},{}],981:[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(\"./helpers\"),d=t(\"./constants\"),g=t(\"../../constants/interactions\").DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=t(\"../../components/fx/helpers\").appendArrayPointValue;function y(t,e){var r,i=t._fullLayout,a=e._length,o=e.textfont,l=e.textposition,c=Array.isArray(l)?l:[l],u=o.color,f=o.size,h=o.family,p={},d=t._context.plotGlPixelRatio,g=e.texttemplate;if(g){p.text=[];var m=i._d3locale,y=Array.isArray(g),x=y?Math.min(g.length,a):a,b=y?function(t){return g[t]}:function(){return g};for(r=0;rd.TOO_MANY_POINTS||f.hasMarkers(e)?\"rect\":\"round\";if(c&&e.connectgaps){var h=n[0],p=n[1];for(i=0;i1?l[i]:l[0]:l,d=Array.isArray(c)?c.length>1?c[i]:c[0]:c,g=m[p],v=m[d],y=u?u/.8+1:0,x=-v*y-.5*v;o.offset[i]=[g*y/h,x/h]}}return o}}},{\"../../components/drawing\":388,\"../../components/fx/helpers\":402,\"../../constants/interactions\":478,\"../../lib\":503,\"../../lib/gl_format_color\":499,\"../../plots/cartesian/axis_ids\":558,\"../../registry\":638,\"../scatter/make_bubble_size_func\":943,\"../scatter/subtypes\":951,\"./constants\":980,\"./helpers\":985,\"color-normalize\":89,\"fast-isnumeric\":190,\"svg-path-sdf\":310}],982:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"./helpers\"),o=t(\"./attributes\"),s=t(\"../scatter/constants\"),l=t(\"../scatter/subtypes\"),c=t(\"../scatter/xy_defaults\"),u=t(\"../scatter/period_defaults\"),f=t(\"../scatter/marker_defaults\"),h=t(\"../scatter/line_defaults\"),p=t(\"../scatter/fillcolor_defaults\"),d=t(\"../scatter/text_defaults\");e.exports=function(t,e,r,g){function m(r,i){return n.coerce(t,e,o,r,i)}var v=!!t.marker&&a.isOpenSymbol(t.marker.symbol),y=l.isBubble(t),x=c(t,e,g,m);if(x){u(t,e,g,m),m(\"xhoverformat\"),m(\"yhoverformat\");var b=x100},r.isDotSymbol=function(t){return\"string\"==typeof t?n.DOT_RE.test(t):t>200}},{\"./constants\":980}],986:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../scatter/get_trace_color\");function o(t,e,r,o){var s=t.xa,l=t.ya,c=t.distance,u=t.dxy,f=t.index,h={pointNumber:f,x:e[f],y:r[f]};h.tx=Array.isArray(o.text)?o.text[f]:o.text,h.htx=Array.isArray(o.hovertext)?o.hovertext[f]:o.hovertext,h.data=Array.isArray(o.customdata)?o.customdata[f]:o.customdata,h.tp=Array.isArray(o.textposition)?o.textposition[f]:o.textposition;var p=o.textfont;p&&(h.ts=i.isArrayOrTypedArray(p.size)?p.size[f]:p.size,h.tc=Array.isArray(p.color)?p.color[f]:p.color,h.tf=Array.isArray(p.family)?p.family[f]:p.family);var d=o.marker;d&&(h.ms=i.isArrayOrTypedArray(d.size)?d.size[f]:d.size,h.mo=i.isArrayOrTypedArray(d.opacity)?d.opacity[f]:d.opacity,h.mx=i.isArrayOrTypedArray(d.symbol)?d.symbol[f]:d.symbol,h.mc=i.isArrayOrTypedArray(d.color)?d.color[f]:d.color);var g=d&&d.line;g&&(h.mlc=Array.isArray(g.color)?g.color[f]:g.color,h.mlw=i.isArrayOrTypedArray(g.width)?g.width[f]:g.width);var m=d&&d.gradient;m&&\"none\"!==m.type&&(h.mgt=Array.isArray(m.type)?m.type[f]:m.type,h.mgc=Array.isArray(m.color)?m.color[f]:m.color);var v=s.c2p(h.x,!0),y=l.c2p(h.y,!0),x=h.mrc||1,b=o.hoverlabel;b&&(h.hbg=Array.isArray(b.bgcolor)?b.bgcolor[f]:b.bgcolor,h.hbc=Array.isArray(b.bordercolor)?b.bordercolor[f]:b.bordercolor,h.hts=i.isArrayOrTypedArray(b.font.size)?b.font.size[f]:b.font.size,h.htc=Array.isArray(b.font.color)?b.font.color[f]:b.font.color,h.htf=Array.isArray(b.font.family)?b.font.family[f]:b.font.family,h.hnl=i.isArrayOrTypedArray(b.namelength)?b.namelength[f]:b.namelength);var _=o.hoverinfo;_&&(h.hi=Array.isArray(_)?_[f]:_);var w=o.hovertemplate;w&&(h.ht=Array.isArray(w)?w[f]:w);var T={};T[t.index]=h;var k=o._origX,A=o._origY,M=i.extendFlat({},t,{color:a(o,h),x0:v-x,x1:v+x,xLabelVal:k?k[f]:h.x,y0:y-x,y1:y+x,yLabelVal:A?A[f]:h.y,cd:T,distance:c,spikeDistance:u,hovertemplate:h.ht});return h.htx?M.text=h.htx:h.tx?M.text=h.tx:o.text&&(M.text=o.text),i.fillText(h,o,M),n.getComponentMethod(\"errorbars\",\"hoverInfo\")(h,o,M),M}e.exports={hoverPoints:function(t,e,r,n){var i,a,s,l,c,u,f,h,p,d,g=t.cd,m=g[0].t,v=g[0].trace,y=t.xa,x=t.ya,b=m.x,_=m.y,w=y.c2p(e),T=x.c2p(r),k=t.distance;if(m.tree){var A=y.p2c(w-k),M=y.p2c(w+k),S=x.p2c(T-k),E=x.p2c(T+k);i=\"x\"===n?m.tree.range(Math.min(A,M),Math.min(x._rl[0],x._rl[1]),Math.max(A,M),Math.max(x._rl[0],x._rl[1])):m.tree.range(Math.min(A,M),Math.min(S,E),Math.max(A,M),Math.max(S,E))}else i=m.ids;var L=k;if(\"x\"===n){var C=!!v.xperiodalignment,P=!!v.yperiodalignment;for(u=0;u=Math.min(I,O)&&w<=Math.max(I,O)?0:1/0}if(f=Math.min(z,D)&&T<=Math.max(z,D)?0:1/0}d=Math.sqrt(f*f+h*h),s=i[u]}}}else for(u=i.length-1;u>-1;u--)l=b[a=i[u]],c=_[a],f=y.c2p(l)-w,h=x.c2p(c)-T,(p=Math.sqrt(f*f+h*h))v.glText.length){var w=b-v.glText.length;for(d=0;dr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t})),v.line2d.update(v.lineOptions)),v.error2d){var k=(v.errorXOptions||[]).concat(v.errorYOptions||[]);v.error2d.update(k)}v.scatter2d&&v.scatter2d.update(v.markerOptions),v.fillOrder=s.repeat(null,b),v.fill2d&&(v.fillOptions=v.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=v.lineOptions[e],u=[];s._ownfill&&u.push(e),s._nexttrace&&u.push(e+1),u.length&&(v.fillOrder[e]=u);var f,h,p=[],d=c&&c.positions||l.positions;if(\"tozeroy\"===s.fill){for(f=0;ff&&isNaN(d[h+1]);)h-=2;0!==d[f+1]&&(p=[d[f],0]),p=p.concat(d.slice(f,h+2)),0!==d[h+1]&&(p=p.concat([d[h],0]))}else if(\"tozerox\"===s.fill){for(f=0;ff&&isNaN(d[h]);)h-=2;0!==d[f]&&(p=[0,d[f+1]]),p=p.concat(d.slice(f,h+2)),0!==d[h]&&(p=p.concat([0,d[h+1]]))}else if(\"toself\"===s.fill||\"tonext\"===s.fill){for(p=[],i=0,t.splitNull=!0,a=0;a-1;for(d=0;d\")}function u(t){return t+\"\\xb0\"}}e.exports={hoverPoints:function(t,e,r){var o=t.cd,c=o[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(o,(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=o[t.index],m=g.lonlat,v=[i.modHalf(m[0],360)+p,m[1]],y=u.c2p(v),x=f.c2p(v),b=g.mrc||1;t.x0=y-b,t.x1=y+b,t.y0=x-b,t.y1=x+b;var _={};_[c.subplot]={_subplot:h};var w=c._module.formatLabels(g,c,_);return t.lonLabel=w.lonLabel,t.latLabel=w.latLabel,t.color=a(c,g),t.extraText=l(c,g,o[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}},getExtraText:l}},{\"../../components/fx\":406,\"../../constants/numerical\":479,\"../../lib\":503,\"../scatter/get_trace_color\":936}],997:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"../scattergeo/calc\"),plot:t(\"./plot\"),hoverPoints:t(\"./hover\").hoverPoints,eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),styleOnSelect:function(t,e){e&&e[0].trace._glTrace.update(e)},moduleType:\"trace\",name:\"scattermapbox\",basePlotModule:t(\"../../plots/mapbox\"),categories:[\"mapbox\",\"gl\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/mapbox\":613,\"../scatter/marker_colorbar\":944,\"../scattergeo/calc\":969,\"./attributes\":991,\"./defaults\":993,\"./event_data\":994,\"./format_labels\":995,\"./hover\":996,\"./plot\":998,\"./select\":999}],998:[function(t,e,r){\"use strict\";var n=t(\"./convert\"),i=t(\"../../plots/mapbox/constants\").traceLayerPrefix,a=[\"fill\",\"line\",\"circle\",\"symbol\"];function o(t,e){this.type=\"scattermapbox\",this.subplot=t,this.uid=e,this.sourceIds={fill:\"source-\"+e+\"-fill\",line:\"source-\"+e+\"-line\",circle:\"source-\"+e+\"-circle\",symbol:\"source-\"+e+\"-symbol\"},this.layerIds={fill:i+e+\"-fill\",line:i+e+\"-line\",circle:i+e+\"-circle\",symbol:i+e+\"-symbol\"},this.below=null}var s=o.prototype;s.addSource=function(t,e){this.subplot.map.addSource(this.sourceIds[t],{type:\"geojson\",data:e.geojson})},s.setSourceData=function(t,e){this.subplot.map.getSource(this.sourceIds[t]).setData(e.geojson)},s.addLayer=function(t,e,r){this.subplot.addLayer({type:t,id:this.layerIds[t],source:this.sourceIds[t],layout:e.layout,paint:e.paint},r)},s.update=function(t){var e,r,i,o=this.subplot,s=o.map,l=n(o.gd,t),c=o.belowLookup[\"trace-\"+this.uid];if(c!==this.below){for(e=a.length-1;e>=0;e--)r=a[e],s.removeLayer(this.layerIds[r]);for(e=0;e=0;e--){var r=a[e];t.removeLayer(this.layerIds[r]),t.removeSource(this.sourceIds[r])}},e.exports=function(t,e){for(var r=e[0].trace,i=new o(t,r.uid),s=n(t.gd,e),l=i.below=t.belowLookup[\"trace-\"+r.uid],c=0;c\")}}e.exports={hoverPoints: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)return o;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,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}},{\"../scatter/hover\":937}],1005:[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\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"../scatter/select\"),meta:{}}},{\"../../plots/polar\":622,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":1e3,\"./calc\":1001,\"./defaults\":1002,\"./format_labels\":1003,\"./hover\":1004,\"./plot\":1006}],1006:[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=c&&(y.marker.cluster=d.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=_),y.line&&_.length>1&&l.extendFlat(y.line,s.linePositions(t,p,_)),y.text&&(l.extendFlat(y.text,{positions:_},s.textPosition(t,p,y.text,y.marker)),l.extendFlat(y.textSel,{positions:_},s.textPosition(t,p,y.text,y.markerSel)),l.extendFlat(y.textUnsel,{positions:_},s.textPosition(t,p,y.text,y.markerUnsel))),y.fill&&!h.fill2d&&(h.fill2d=!0),y.marker&&!h.scatter2d&&(h.scatter2d=!0),y.line&&!h.line2d&&(h.line2d=!0),y.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(y.line),h.fillOptions.push(y.fill),h.markerOptions.push(y.marker),h.markerSelectedOptions.push(y.markerSel),h.markerUnselectedOptions.push(y.markerUnsel),h.textOptions.push(y.text),h.textSelectedOptions.push(y.textSel),h.textUnselectedOptions.push(y.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),d.x=w,d.y=T,d.rawx=w,d.rawy=T,d.r=m,d.theta=v,d.positions=_,d._scene=h,d.index=h.count,h.count++}})),a(t,e,r)}}},{\"../../lib\":503,\"../scattergl/constants\":980,\"../scattergl/convert\":981,\"../scattergl/plot\":988,\"../scattergl/scene_update\":989,\"@plotly/point-cluster\":59,\"fast-isnumeric\":190}],1014:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../plots/template_attributes\").texttemplateAttrs,a=t(\"../../lib/extend\").extendFlat,o=t(\"../scatter/attributes\"),s=t(\"../../plots/attributes\"),l=o.line;e.exports={mode:o.mode,real:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},imag:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},text:o.text,texttemplate:i({editType:\"plot\"},{keys:[\"real\",\"imag\",\"text\"]}),hovertext:o.hovertext,line:{color:l.color,width:l.width,dash:l.dash,shape:a({},l.shape,{values:[\"linear\",\"spline\"]}),smoothing:l.smoothing,editType:\"calc\"},connectgaps:o.connectgaps,marker:o.marker,cliponaxis:a({},o.cliponaxis,{dflt:!1}),textposition:o.textposition,textfont:o.textfont,fill:a({},o.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:o.fillcolor,hoverinfo:a({},s.hoverinfo,{flags:[\"real\",\"imag\",\"text\",\"name\"]}),hoveron:o.hoveron,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926}],1015:[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(\"../scatter/calc\").calcMarkerSize;e.exports=function(t,e){for(var r=t._fullLayout,c=e.subplot,u=r[c].realaxis,f=r[c].imaginaryaxis,h=u.makeCalcdata(e,\"real\"),p=f.makeCalcdata(e,\"imag\"),d=e._length,g=new Array(d),m=0;m\")}}e.exports={hoverPoints: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)return o;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,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}},{\"../scatter/hover\":937}],1019:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"scattersmith\",basePlotModule:t(\"../../plots/smith\"),categories:[\"smith\",\"symbols\",\"showLegend\",\"scatter-like\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"../scatter/select\"),meta:{}}},{\"../../plots/smith\":629,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":1014,\"./calc\":1015,\"./defaults\":1016,\"./format_labels\":1017,\"./hover\":1018,\"./plot\":1020}],1020:[function(t,e,r){\"use strict\";var n=t(\"../scatter/plot\"),i=t(\"../../constants/numerical\").BADNUM,a=t(\"../../plots/smith/helpers\").smith;e.exports=function(t,e,r){for(var o=e.layers.frontplot.select(\"g.scatterlayer\"),s={xaxis:e.xaxis,yaxis:e.yaxis,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},l=0;l\"),o.hovertemplate=h.hovertemplate,a}function x(t,e){v.push(t._hovertitle+\": \"+e)}}},{\"../scatter/hover\":937}],1027:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../scatter/select\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"scatterternary\",basePlotModule:t(\"../../plots/ternary\"),categories:[\"ternary\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/ternary\":634,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":1021,\"./calc\":1022,\"./defaults\":1023,\"./event_data\":1024,\"./format_labels\":1025,\"./hover\":1026,\"./plot\":1028}],1028:[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\":947}],1029:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../scattergl/attributes\"),l=t(\"../../plots/cartesian/constants\").idRegex,c=t(\"../../plot_api/plot_template\").templatedArray,u=t(\"../../lib/extend\").extendFlat,f=n.marker,h=f.line,p=u(i(\"marker.line\",{editTypeOverride:\"calc\"}),{width:u({},h.width,{editType:\"calc\"}),editType:\"calc\"}),d=u(i(\"marker\"),{symbol:f.symbol,size:u({},f.size,{editType:\"markerSize\"}),sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:f.opacity,colorbar:f.colorbar,line:p,editType:\"calc\"});function g(t){return{valType:\"info_array\",freeLength:!0,editType:\"calc\",items:{valType:\"subplotid\",regex:l[t],editType:\"plot\"}}}d.color.editType=d.cmin.editType=d.cmax.editType=\"style\",e.exports={dimensions:c(\"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\"},matches:{valType:\"boolean\",dflt:!1,editType:\"calc\"},editType:\"calc+clearAxisTypes\"},editType:\"calc+clearAxisTypes\"}),text:u({},s.text,{}),hovertext:u({},s.hovertext,{}),hovertemplate:o(),xhoverformat:a(\"x\"),yhoverformat:a(\"y\"),marker:d,xaxes:g(\"x\"),yaxes:g(\"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:s.selected.marker,editType:\"calc\"},unselected:{marker:s.unselected.marker,editType:\"calc\"},opacity:s.opacity}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/plot_template\":543,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/cartesian/constants\":561,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926,\"../scattergl/attributes\":978}],1030:[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;function u(t,e,r){for(var n=r.matrixOptions.data.length,i=e._visibleDims,a=r.viewOpts.ranges=new Array(n),o=0;oh?b.sizeAvg||Math.max(b.size,3):a(e,x),p=0;pa&&l||i-1,P=!0;if(o(x)||!!p.selectedpoints||C){var I=p._length;if(p.selectedpoints){g.selectBatch=p.selectedpoints;var O=p.selectedpoints,z={};for(l=0;l1&&(u=g[y-1],h=m[y-1],d=v[y-1]),e=0;eu?\"-\":\"+\")+\"x\")).replace(\"y\",(f>h?\"-\":\"+\")+\"y\")).replace(\"z\",(p>d?\"-\":\"+\")+\"z\");var L=function(){y=0,M=[],S=[],E=[]};(!y||y2?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,u=e._len,f={};function d(t,e){var n=r[e],o=i[c[e]];return a.simpleMap(t,(function(t){return n.d2l(t)*o}))}if(f.vectors=l(d(e._u,\"xaxis\"),d(e._v,\"yaxis\"),d(e._w,\"zaxis\"),u),!u)return{positions:[],cells:[]};var g=d(e._Xs,\"xaxis\"),m=d(e._Ys,\"yaxis\"),v=d(e._Zs,\"zaxis\");if(f.meshgrid=[g,m,v],f.gridFill=e._gridFill,e._slen)f.startingPositions=l(d(e._startsX,\"xaxis\"),d(e._startsY,\"yaxis\"),d(e._startsZ,\"zaxis\"));else{for(var y=m[0],x=h(g),b=h(v),_=new Array(x.length*b.length),w=0,T=0;T=0};v?(r=Math.min(m.length,x.length),l=function(t){return A(m[t])&&M(t)},f=function(t){return String(m[t])}):(r=Math.min(y.length,x.length),l=function(t){return A(y[t])&&M(t)},f=function(t){return String(y[t])}),_&&(r=Math.min(r,b.length));for(var S=0;S1){for(var P=a.randstr(),I=0;I\"),name:A||z(\"name\")?y.name:void 0,color:k(\"hoverlabel.bgcolor\")||x.color,borderColor:k(\"hoverlabel.bordercolor\"),fontFamily:k(\"hoverlabel.font.family\"),fontSize:k(\"hoverlabel.font.size\"),fontColor:k(\"hoverlabel.font.color\"),nameLength:k(\"hoverlabel.namelength\"),textAlign:k(\"hoverlabel.align\"),hovertemplate:A,hovertemplateLabels:P,eventData:l};m&&(F.x0=E-i.rInscribed*i.rpx1,F.x1=E+i.rInscribed*i.rpx1,F.idealAlign=i.pxmid[0]<0?\"left\":\"right\"),v&&(F.x=E,F.idealAlign=E<0?\"left\":\"right\");var B=[];o.loneHover(F,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:r,inOut_bbox:B}),l[0].bbox=B[0],d._hasHoverLabel=!0}if(v){var N=t.select(\"path.surface\");h.styleOne(N,i,y,{hovered:!0})}d._hasHoverEvent=!0,r.emit(\"plotly_hover\",{points:l||[f(i,y,h.eventDataKeys)],event:n.event})}})),t.on(\"mouseout\",(function(e){var i=r._fullLayout,a=r._fullData[d.index],s=n.select(this).datum();if(d._hasHoverEvent&&(e.originalEvent=n.event,r.emit(\"plotly_unhover\",{points:[f(s,a,h.eventDataKeys)],event:n.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(o.loneUnhover(i._hoverlayer.node()),d._hasHoverLabel=!1),v){var l=t.select(\"path.surface\");h.styleOne(l,s,a,{hovered:!1})}})),t.on(\"click\",(function(t){var e=r._fullLayout,a=r._fullData[d.index],s=m&&(c.isHierarchyRoot(t)||c.isLeaf(t)),u=c.getPtId(t),p=c.isEntry(t)?c.findEntryWithChild(g,u):c.findEntryWithLevel(g,u),v=c.getPtId(p),y={points:[f(t,a,h.eventDataKeys)],event:n.event};s||(y.nextLevel=v);var x=l.triggerHandler(r,\"plotly_\"+d.type+\"click\",y);if(!1!==x&&e.hovermode&&(r._hoverdata=[f(t,a,h.eventDataKeys)],o.click(r,n.event)),!s&&!1!==x&&!r._dragging&&!r._transitioning){i.call(\"_storeDirectGUIEdit\",a,e._tracePreGUI[a.uid],{level:a.level});var b={data:[{level:v}],traces:[d.index]},_={frame:{redraw:!1,duration:h.transitionTime},transition:{duration:h.transitionTime,easing:h.transitionEasing},mode:\"immediate\",fromcurrent:!0};o.loneUnhover(e._hoverlayer.node()),i.call(\"animate\",r,b,_)}}))}},{\"../../components/fx\":406,\"../../components/fx/helpers\":402,\"../../lib\":503,\"../../lib/events\":492,\"../../registry\":638,\"../pie/helpers\":905,\"./helpers\":1051,\"@plotly/d3\":58}],1051:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\"),a=t(\"../../lib/setcursor\"),o=t(\"../pie/helpers\");function s(t){return t.data.data.pid}r.findEntryWithLevel=function(t,e){var n;return e&&t.eachAfter((function(t){if(r.getPtId(t)===e)return n=t.copy()})),n||t},r.findEntryWithChild=function(t,e){var n;return t.eachAfter((function(t){for(var i=t.children||[],a=0;a0)},r.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},r.isHeader=function(t,e){return!(r.isLeaf(t)||t.depth===e._maxDepth-1)},r.getParent=function(t,e){return r.findEntryWithLevel(t,s(e))},r.listPath=function(t,e){var n=t.parent;if(!n)return[];var i=e?[n.data[e]]:[n];return r.listPath(n,e).concat(i)},r.getPath=function(t){return r.listPath(t,\"label\").join(\"/\")+\"/\"},r.formatValue=o.formatPieValue,r.formatPercent=function(t,e){var r=n.formatPercent(t,0);return\"0%\"===r&&(r=o.formatPiePercent(t,e)),r}},{\"../../components/color\":366,\"../../lib\":503,\"../../lib/setcursor\":524,\"../pie/helpers\":905}],1052:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"sunburst\",basePlotModule:t(\"./base_plot\"),categories:[],animatable:!0,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\").plot,style:t(\"./style\").style,colorbar:t(\"../scatter/marker_colorbar\"),meta:{}}},{\"../scatter/marker_colorbar\":944,\"./attributes\":1045,\"./base_plot\":1046,\"./calc\":1047,\"./defaults\":1049,\"./layout_attributes\":1053,\"./layout_defaults\":1054,\"./plot\":1055,\"./style\":1056}],1053:[function(t,e,r){\"use strict\";e.exports={sunburstcolorway:{valType:\"colorlist\",editType:\"calc\"},extendsunburstcolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],1054:[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(\"sunburstcolorway\",e.colorway),r(\"extendsunburstcolors\")}},{\"../../lib\":503,\"./layout_attributes\":1053}],1055:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-hierarchy\"),a=t(\"d3-interpolate\").interpolate,o=t(\"../../components/drawing\"),s=t(\"../../lib\"),l=t(\"../../lib/svg_text_utils\"),c=t(\"../bar/uniform_text\"),u=c.recordMinTextSize,f=c.clearMinTextSize,h=t(\"../pie/plot\"),p=t(\"../pie/helpers\").getRotationAngle,d=h.computeTransform,g=h.transformInsideText,m=t(\"./style\").styleOne,v=t(\"../bar/style\").resizeText,y=t(\"./fx\"),x=t(\"./constants\"),b=t(\"./helpers\");function _(t,e,c,f){var h=t._fullLayout,v=!h.uniformtext.mode&&b.hasTransition(f),_=n.select(c).selectAll(\"g.slice\"),T=e[0],k=T.trace,A=T.hierarchy,M=b.findEntryWithLevel(A,k.level),S=b.getMaxDepth(k),E=h._size,L=k.domain,C=E.w*(L.x[1]-L.x[0]),P=E.h*(L.y[1]-L.y[0]),I=.5*Math.min(C,P),O=T.cx=E.l+E.w*(L.x[1]+L.x[0])/2,z=T.cy=E.t+E.h*(1-L.y[0])-P/2;if(!M)return _.remove();var D=null,R={};v&&_.each((function(t){R[b.getPtId(t)]={rpx0:t.rpx0,rpx1:t.rpx1,x0:t.x0,x1:t.x1,transform:t.transform},!D&&b.isEntry(t)&&(D=t)}));var F=function(t){return i.partition().size([2*Math.PI,t.height+1])(t)}(M).descendants(),B=M.height+1,N=0,j=S;T.hasMultipleRoots&&b.isHierarchyRoot(M)&&(F=F.slice(1),B-=1,N=1,j+=1),F=F.filter((function(t){return t.y1<=j}));var U=p(k.rotation);U&&F.forEach((function(t){t.x0+=U,t.x1+=U}));var V=Math.min(B,S),H=function(t){return(t-N)/V*I},q=function(t,e){return[t*Math.cos(e),-t*Math.sin(e)]},G=function(t){return s.pathAnnulus(t.rpx0,t.rpx1,t.x0,t.x1,O,z)},Y=function(t){return O+w(t)[0]*(t.transform.rCenter||0)+(t.transform.x||0)},W=function(t){return z+w(t)[1]*(t.transform.rCenter||0)+(t.transform.y||0)};(_=_.data(F,b.getPtId)).enter().append(\"g\").classed(\"slice\",!0),v?_.exit().transition().each((function(){var t=n.select(this);t.select(\"path.surface\").transition().attrTween(\"d\",(function(t){var e=function(t){var e,r=b.getPtId(t),n=R[r],i=R[b.getPtId(M)];if(i){var o=(t.x1>i.x1?2*Math.PI:0)+U;e=t.rpx1X?2*Math.PI:0)+U;e={x0:i,x1:i}}else e={rpx0:I,rpx1:I},s.extendFlat(e,K(t));else e={rpx0:0,rpx1:0};else e={x0:U,x1:U};return a(e,n)}(t);return function(t){return G(e(t))}})):f.attr(\"d\",G),c.call(y,M,t,e,{eventDataKeys:x.eventDataKeys,transitionTime:x.CLICK_TRANSITION_TIME,transitionEasing:x.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,t,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:t._transitioning}),f.call(m,i,k);var p=s.ensureSingle(c,\"g\",\"slicetext\"),_=s.ensureSingle(p,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),w=s.ensureUniformFontSize(t,b.determineTextFont(k,i,h.font));_.text(r.formatSliceLabel(i,M,k,e,h)).classed(\"slicetext\",!0).attr(\"text-anchor\",\"middle\").call(o.font,w).call(l.convertToTspans,t);var A=o.bBox(_.node());i.transform=g(A,i,T),i.transform.targetX=Y(i),i.transform.targetY=W(i);var S=function(t,e){var r=t.transform;return d(r,e),r.fontSize=w.size,u(k.type,r,h),s.getTextTransform(r)};v?_.transition().attrTween(\"transform\",(function(t){var e=function(t){var e,r=R[b.getPtId(t)],n=t.transform;if(r)e=r;else if(e={rpx1:t.rpx1,transform:{textPosAngle:n.textPosAngle,scale:0,rotate:n.rotate,rCenter:n.rCenter,x:n.x,y:n.y}},D)if(t.parent)if(X){var i=t.x1>X?2*Math.PI:0;e.x0=e.x1=i}else s.extendFlat(e,K(t));else e.x0=e.x1=U;else e.x0=e.x1=U;var o=a(e.transform.textPosAngle,t.transform.textPosAngle),l=a(e.rpx1,t.rpx1),c=a(e.x0,t.x0),f=a(e.x1,t.x1),p=a(e.transform.scale,n.scale),d=a(e.transform.rotate,n.rotate),g=0===n.rCenter?3:0===e.transform.rCenter?1/3:1,m=a(e.transform.rCenter,n.rCenter);return function(t){var e=l(t),r=c(t),i=f(t),a=function(t){return m(Math.pow(t,g))}(t),s={pxmid:q(e,(r+i)/2),rpx1:e,transform:{textPosAngle:o(t),rCenter:a,x:n.x,y:n.y}};return u(k.type,n,h),{transform:{targetX:Y(s),targetY:W(s),scale:p(t),rotate:d(t),rCenter:a}}}}(t);return function(t){return S(e(t),A)}})):_.attr(\"transform\",S(i,A))}))}function w(t){return e=t.rpx1,r=t.transform.textPosAngle,[e*Math.sin(r),-e*Math.cos(r)];var e,r}r.plot=function(t,e,r,i){var a,o,s=t._fullLayout,l=s._sunburstlayer,c=!r,u=!s.uniformtext.mode&&b.hasTransition(r);(f(\"sunburst\",s),(a=l.selectAll(\"g.trace.sunburst\").data(e,(function(t){return t[0].trace.uid}))).enter().append(\"g\").classed(\"trace\",!0).classed(\"sunburst\",!0).attr(\"stroke-linejoin\",\"round\"),a.order(),u)?(i&&(o=i()),n.transition().duration(r.duration).ease(r.easing).each(\"end\",(function(){o&&o()})).each(\"interrupt\",(function(){o&&o()})).each((function(){l.selectAll(\"g.trace\").each((function(e){_(t,e,this,r)}))}))):(a.each((function(e){_(t,e,this,r)})),s.uniformtext.mode&&v(t,s._sunburstlayer.selectAll(\".trace\"),\"sunburst\"));c&&a.exit().remove()},r.formatSliceLabel=function(t,e,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!(a||o&&\"none\"!==o))return\"\";var l=i.separators,c=n[0],u=t.data.data,f=c.hierarchy,h=b.isHierarchyRoot(t),p=b.getParent(f,t),d=b.getValue(t);if(!a){var g,m=o.split(\"+\"),v=function(t){return-1!==m.indexOf(t)},y=[];if(v(\"label\")&&u.label&&y.push(u.label),u.hasOwnProperty(\"v\")&&v(\"value\")&&y.push(b.formatValue(u.v,l)),!h){v(\"current path\")&&y.push(b.getPath(t.data));var x=0;v(\"percent parent\")&&x++,v(\"percent entry\")&&x++,v(\"percent root\")&&x++;var _=x>1;if(x){var w,T=function(t){g=b.formatPercent(w,l),_&&(g+=\" of \"+t),y.push(g)};v(\"percent parent\")&&!h&&(w=d/b.getValue(p),T(\"parent\")),v(\"percent entry\")&&(w=d/b.getValue(e),T(\"entry\")),v(\"percent root\")&&(w=d/b.getValue(f),T(\"root\"))}}return v(\"text\")&&(g=s.castOption(r,u.i,\"text\"),s.isValidTextValue(g)&&y.push(g)),y.join(\"
\")}var k=s.castOption(r,u.i,\"texttemplate\");if(!k)return\"\";var A={};u.label&&(A.label=u.label),u.hasOwnProperty(\"v\")&&(A.value=u.v,A.valueLabel=b.formatValue(u.v,l)),A.currentPath=b.getPath(t.data),h||(A.percentParent=d/b.getValue(p),A.percentParentLabel=b.formatPercent(A.percentParent,l),A.parent=b.getPtLabel(p)),A.percentEntry=d/b.getValue(e),A.percentEntryLabel=b.formatPercent(A.percentEntry,l),A.entry=b.getPtLabel(e),A.percentRoot=d/b.getValue(f),A.percentRootLabel=b.formatPercent(A.percentRoot,l),A.root=b.getPtLabel(f),u.hasOwnProperty(\"color\")&&(A.color=u.color);var M=s.castOption(r,u.i,\"text\");return(s.isValidTextValue(M)||\"\"===M)&&(A.text=M),A.customdata=s.castOption(r,u.i,\"customdata\"),s.texttemplateString(k,A,i._d3locale,A,r._meta||{})}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../bar/style\":662,\"../bar/uniform_text\":664,\"../pie/helpers\":905,\"../pie/plot\":909,\"./constants\":1048,\"./fx\":1050,\"./helpers\":1051,\"./style\":1056,\"@plotly/d3\":58,\"d3-hierarchy\":115,\"d3-interpolate\":116}],1056:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../bar/uniform_text\").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,\"marker.line.color\")||i.defaultLine,c=a.castOption(r,s,\"marker.line.width\")||0;t.style(\"stroke-width\",c).call(i.fill,n.color).call(i.stroke,l).style(\"opacity\",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._sunburstlayer.selectAll(\".trace\");o(t,e,\"sunburst\"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style(\"opacity\",r.opacity),e.selectAll(\"path.surface\").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{\"../../components/color\":366,\"../../lib\":503,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],1057:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=t(\"../../plot_api/edit_types\").overrideAll;function u(t){return{show:{valType:\"boolean\",dflt:!1},start:{valType:\"number\",dflt:null,editType:\"plot\"},end:{valType:\"number\",dflt:null,editType:\"plot\"},size:{valType:\"number\",dflt:null,min:0,editType:\"plot\"},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 f=e.exports=c(l({z:{valType:\"data_array\"},x:{valType:\"data_array\"},y:{valType:\"data_array\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:o(),xhoverformat:a(\"x\"),yhoverformat:a(\"y\"),zhoverformat:a(\"z\"),connectgaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},surfacecolor:{valType:\"data_array\"}},i(\"\",{colorAttr:\"z or surfacecolor\",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:\"calc\"}),{contours:{x:u(),y:u(),z:u()},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},opacityscale:{valType:\"any\",editType:\"calc\"},_deprecated:{zauto:l({},i.zauto,{}),zmin:l({},i.zmin,{}),zmax:l({},i.zmax,{})},hoverinfo:l({},s.hoverinfo),showlegend:l({},s.showlegend,{dflt:!1})}),\"calc\",\"nested\");f.x.editType=f.y.editType=f.z.editType=\"calc+clearAxisTypes\",f.transforms=void 0},{\"../../components/color\":366,\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/edit_types\":536,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633}],1058:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.surfacecolor?n(t,e,{vals:e.surfacecolor,containerStr:\"\",cLetter:\"c\"}):n(t,e,{vals:e.z,containerStr:\"\",cLetter:\"c\"})}},{\"../../components/colorscale/calc\":374}],1059:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_surface3d,i=t(\"../../../stackgl_modules\").ndarray,a=t(\"../../../stackgl_modules\").ndarray_linear_interpolate.d2,o=t(\"../heatmap/interp2d\"),s=t(\"../heatmap/find_empties\"),l=t(\"../../lib\").isArrayOrTypedArray,c=t(\"../../lib/gl_format_color\").parseColorScale,u=t(\"../../lib/str2rgbarray\"),f=t(\"../../components/colorscale\").extractOpts;function h(t,e,r){this.scene=t,this.uid=r,this.surface=e,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var p=h.prototype;p.getXat=function(t,e,r,n){var i=l(this.data.x)?l(this.data.x[0])?this.data.x[e][t]:this.data.x[t]:t;return void 0===r?i:n.d2l(i,0,r)},p.getYat=function(t,e,r,n){var i=l(this.data.y)?l(this.data.y[0])?this.data.y[e][t]:this.data.y[e]:e;return void 0===r?i:n.d2l(i,0,r)},p.getZat=function(t,e,r,n){var i=this.data.z[e][t];return null===i&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[e][t]),void 0===r?i:n.d2l(i,0,r)},p.handlePick=function(t){if(t.object===this.surface){var e=(t.data.index[0]-1)/this.dataScaleX-1,r=(t.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(e),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);t.index=[n,i],t.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],t.dataCoordinate=[this.getXat(n,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=t.dataCoordinate[a];null!=o&&(t.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return Array.isArray(s)&&s[i]&&void 0!==s[i][n]?t.textLabel=s[i][n]:t.textLabel=s||\"\",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}};var d=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function g(t,e){if(t0){r=d[n];break}return r}function y(t,e){if(!(t<1||e<1)){for(var r=m(t),n=m(e),i=1,a=0;a_;)r--,r/=v(r),++r1?n:1},p.refineCoords=function(t){for(var e=this.dataScaleX,r=this.dataScaleY,n=t[0].shape[0],a=t[0].shape[1],o=0|Math.floor(t[0].shape[0]*e+1),s=0|Math.floor(t[0].shape[1]*r+1),l=1+n+1,c=1+a+1,u=i(new Float32Array(l*c),[l,c]),f=[1/e,0,0,0,1/r,0,0,0,1],h=0;h0&&null!==this.contourStart[t]&&null!==this.contourEnd[t]&&this.contourEnd[t]>this.contourStart[t]))for(i[t]=!0,e=this.contourStart[t];ea&&(this.minValues[e]=a),this.maxValues[e]\",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\"}}},{}],1066:[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=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)}))),m=e.domain,v=Math.floor(t._fullLayout._size.w*(m.x[1]-m.x[0])),y=Math.floor(t._fullLayout._size.h*(m.y[1]-m.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),T=f(h(x,_),[]),k=f(w,T),A={},M=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})),E=S.reduce(s,0);S=S.map((function(t){return t/E*v}));var L=Math.max(o(e.header.line.width),o(e.cells.line.width)),C={key:e.uid+t._context.staticPlot,translateX:m.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-m.y[1]),size:t._fullLayout._size,width:v,maxLineWidth:L,height:y,columnOrder:M,groupHeight:y,rowBlocks:k,headerRowBlocks:T,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:M[e],xScale:u,x:void 0,calcdata:void 0,columnWidth:S[e]}}))};return C.columns.forEach((function(t){t.calcdata=C,t.x=u(t)})),C}},{\"../../lib/extend\":493,\"./constants\":1065,\"fast-isnumeric\":190}],1067:[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\":493}],1068:[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/i),l=!o||s;t.mayHaveMarkup=o&&i.match(/[<&>]/);var c,u=\"string\"==typeof(c=i)&&c.match(n.latexCheck);t.latex=u;var f,h,p=u?\"\":T(t.calcdata.cells.prefix,e,r)||\"\",d=u?\"\":T(t.calcdata.cells.suffix,e,r)||\"\",g=u?null:T(t.calcdata.cells.format,e,r)||null,m=p+(g?a(g)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&&!l&&!u&&(f=w(m)),t.cellHeightMayIncrease=s||u||t.mayHaveMarkup||(void 0===f?w(m):f),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var v=(\" \"===n.wrapSplitCharacter?m.replace(/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){var e=D(t.rowBlocks,t.page)-t.scrollY;return u(0,e)})),t&&(C(t,r,e,c,n.prevPages,n,0),C(t,r,e,c,n.prevPages,n,1),x(r,t))}}function L(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,u=s.scrollY;s.scrollY=void 0===a?s.scrollY+c*i.event.dy:a;var f=l.selectAll(\".\"+n.cn.yColumn).selectAll(\".\"+n.cn.columnBlock).filter(A);return E(t,f,l),s.scrollY===u}}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]}));b(t,e,a,r),i[o]=n[o]})))}function P(t,e,r,a){return function(){var o=i.select(e.parentNode);o.each((function(t){var e=t.fragments;o.selectAll(\"tspan.line\").each((function(t,r){e[r].width=this.getComputedTextLength()}));var r,i,a=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+a)>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})),o.selectAll(\"tspan.line\").remove(),_(o.select(\".\"+n.cn.cellText),r,t,a),i.select(e.parentNode.parentNode).call(z)}}function I(t,e,r,a,o){return function(){if(!o.settledY){var s=i.select(e.parentNode),l=B(o),c=o.key-l.firstRowIndex,f=l.rows[c].rowHeight,h=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:f,p=Math.max(h,f);p-l.rows[c].rowHeight&&(l.rows[c].rowHeight=p,t.selectAll(\".\"+n.cn.columnCell).call(z),E(null,t.filter(A),0),x(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 u(O(o,i.select(this.parentNode).select(\".\"+n.cn.cellTextHolder).node().getBoundingClientRect().width),a)})),o.settledY=!0}}}function O(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 z(t){t.attr(\"transform\",(function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce((function(t,e){return t+R(e,1/0)}),0),r=R(B(t),t.key);return u(0,r+e)})).selectAll(\".\"+n.cn.cellRect).attr(\"height\",(function(t){return(e=B(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r}))}function D(t,e){for(var r=0,n=e-1;n>=0;n--)r+=F(t[n]);return r}function R(t,e){for(var r=0,n=0;n\",\"<\",\"|\",\"/\",\"\\\\\"],dflt:\">\",editType:\"plot\"},thickness:{valType:\"number\",min:12,editType:\"plot\"},textfont:u({},s.textfont,{}),editType:\"calc\"},text:s.text,textinfo:l.textinfo,texttemplate:i({editType:\"plot\"},{keys:c.eventDataKeys.concat([\"label\",\"value\"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:n({},{keys:c.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u({},s.outsidetextfont,{}),textposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle left\",\"middle center\",\"middle right\",\"bottom left\",\"bottom center\",\"bottom right\"],dflt:\"top left\",editType:\"plot\"},sort:s.sort,root:l.root,domain:o({name:\"treemap\",trace:!0,editType:\"calc\"})}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/domain\":584,\"../../plots/template_attributes\":633,\"../pie/attributes\":900,\"../sunburst/attributes\":1045,\"./constants\":1074}],1072:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"treemap\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":619}],1073:[function(t,e,r){\"use strict\";var n=t(\"../sunburst/calc\");r.calc=function(t,e){return n.calc(t,e)},r.crossTraceCalc=function(t){return n._runCrossTraceCalc(\"treemap\",t)}},{\"../sunburst/calc\":1047}],1074:[function(t,e,r){\"use strict\";e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:\"poly\",eventDataKeys:[\"currentPath\",\"root\",\"entry\",\"percentRoot\",\"percentEntry\",\"percentParent\"],gapWithPathbar:1}},{}],1075:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../components/color\"),o=t(\"../../plots/domain\").defaults,s=t(\"../bar/defaults\").handleText,l=t(\"../bar/constants\").TEXTPAD,c=t(\"../../components/colorscale\"),u=c.hasColorscale,f=c.handleDefaults;e.exports=function(t,e,r,c){function h(r,a){return n.coerce(t,e,i,r,a)}var p=h(\"labels\"),d=h(\"parents\");if(p&&p.length&&d&&d.length){var g=h(\"values\");g&&g.length?h(\"branchvalues\"):h(\"count\"),h(\"level\"),h(\"maxdepth\"),\"squarify\"===h(\"tiling.packing\")&&h(\"tiling.squarifyratio\"),h(\"tiling.flip\"),h(\"tiling.pad\");var m=h(\"text\");h(\"texttemplate\"),e.texttemplate||h(\"textinfo\",Array.isArray(m)?\"text+label\":\"label\"),h(\"hovertext\"),h(\"hovertemplate\");var v=h(\"pathbar.visible\");s(t,e,c,h,\"auto\",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h(\"textposition\");var y=-1!==e.textposition.indexOf(\"bottom\");h(\"marker.line.width\")&&h(\"marker.line.color\",c.paper_bgcolor);var x=h(\"marker.colors\");(e._hasColorscale=u(t,\"marker\",\"colors\")||(t.marker||{}).coloraxis)?f(t,e,c,h,{prefix:\"marker.\",cLetter:\"c\"}):h(\"marker.depthfade\",!(x||[]).length);var b=2*e.textfont.size;h(\"marker.pad.t\",y?b/4:b),h(\"marker.pad.l\",b/4),h(\"marker.pad.r\",b/4),h(\"marker.pad.b\",y?b:b/4),e._hovered={marker:{line:{width:2,color:a.contrast(c.paper_bgcolor)}}},v&&(h(\"pathbar.thickness\",e.pathbar.textfont.size+2*l),h(\"pathbar.side\"),h(\"pathbar.edgeshape\")),h(\"sort\"),h(\"root.color\"),o(e,c,h),e._length=null}else e.visible=!1}},{\"../../components/color\":366,\"../../components/colorscale\":378,\"../../lib\":503,\"../../plots/domain\":584,\"../bar/constants\":650,\"../bar/defaults\":652,\"./attributes\":1071}],1076:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../sunburst/helpers\"),a=t(\"../bar/uniform_text\").clearMinTextSize,o=t(\"../bar/style\").resizeText,s=t(\"./plot_one\");e.exports=function(t,e,r,l,c){var u,f,h=c.type,p=c.drawDescendants,d=t._fullLayout,g=d[\"_\"+h+\"layer\"],m=!r;(a(h,d),(u=g.selectAll(\"g.trace.\"+h).data(e,(function(t){return t[0].trace.uid}))).enter().append(\"g\").classed(\"trace\",!0).classed(h,!0),u.order(),!d.uniformtext.mode&&i.hasTransition(r))?(l&&(f=l()),n.transition().duration(r.duration).ease(r.easing).each(\"end\",(function(){f&&f()})).each(\"interrupt\",(function(){f&&f()})).each((function(){g.selectAll(\"g.trace\").each((function(e){s(t,e,this,r,p)}))}))):(u.each((function(e){s(t,e,this,r,p)})),d.uniformtext.mode&&o(t,g.selectAll(\".trace\"),h));m&&u.exit().remove()}},{\"../bar/style\":662,\"../bar/uniform_text\":664,\"../sunburst/helpers\":1051,\"./plot_one\":1085,\"@plotly/d3\":58}],1077:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../lib/svg_text_utils\"),s=t(\"./partition\"),l=t(\"./style\").styleOne,c=t(\"./constants\"),u=t(\"../sunburst/helpers\"),f=t(\"../sunburst/fx\");e.exports=function(t,e,r,h,p){var d=p.barDifY,g=p.width,m=p.height,v=p.viewX,y=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,T=p.handleSlicesExit,k=p.makeUpdateSliceInterpolator,A=p.makeUpdateTextInterpolator,M={},S=t._fullLayout,E=e[0],L=E.trace,C=E.hierarchy,P=g/L._entryDepth,I=u.listPath(r.data,\"id\"),O=s(C.copy(),[g,m],{packing:\"dice\",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(O=O.filter((function(t){var e=I.indexOf(t.data.id);return-1!==e&&(t.x0=P*e,t.x1=P*(e+1),t.y0=d,t.y1=d+m,t.onPathbar=!0,!0)}))).reverse(),(h=h.data(O,u.getPtId)).enter().append(\"g\").classed(\"pathbar\",!0),T(h,!0,M,[g,m],x),h.order();var z=h;w&&(z=z.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),z.each((function(s){s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-Math.min(g,m)/2),s._hoverY=y(s.y1-m/2);var h=n.select(this),p=i.ensureSingle(h,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?p.transition().attrTween(\"d\",(function(t){var e=k(t,!0,M,[g,m]);return function(t){return x(e(t))}})):p.attr(\"d\",x),h.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),p.call(l,s,L,{hovered:!1}),s._text=(u.getPtLabel(s)||\"\").split(\"
\").join(\" \")||\"\";var d=i.ensureSingle(h,\"g\",\"slicetext\"),T=i.ensureSingle(d,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),E=i.ensureUniformFontSize(t,u.determineTextFont(L,s,S.font,{onPathbar:!0}));T.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",\"start\").call(a.font,E).call(o.convertToTspans,t),s.textBB=a.bBox(T.node()),s.transform=b(s,{fontSize:E.size,onPathbar:!0}),s.transform.fontSize=E.size,w?T.transition().attrTween(\"transform\",(function(t){var e=A(t,!0,M,[g,m]);return function(t){return _(e(t))}})):T.attr(\"transform\",_(s))}))}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../sunburst/fx\":1050,\"../sunburst/helpers\":1051,\"./constants\":1074,\"./partition\":1083,\"./style\":1086,\"@plotly/d3\":58}],1078:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../lib/svg_text_utils\"),s=t(\"./partition\"),l=t(\"./style\").styleOne,c=t(\"./constants\"),u=t(\"../sunburst/helpers\"),f=t(\"../sunburst/fx\"),h=t(\"../sunburst/plot\").formatSliceLabel;e.exports=function(t,e,r,p,d){var g=d.width,m=d.height,v=d.viewX,y=d.viewY,x=d.pathSlice,b=d.toMoveInsideSlice,_=d.strTransform,w=d.hasTransition,T=d.handleSlicesExit,k=d.makeUpdateSliceInterpolator,A=d.makeUpdateTextInterpolator,M=d.prevEntry,S=t._fullLayout,E=e[0].trace,L=-1!==E.textposition.indexOf(\"left\"),C=-1!==E.textposition.indexOf(\"right\"),P=-1!==E.textposition.indexOf(\"bottom\"),I=!P&&!E.marker.pad.t||P&&!E.marker.pad.b,O=s(r,[g,m],{packing:E.tiling.packing,squarifyratio:E.tiling.squarifyratio,flipX:E.tiling.flip.indexOf(\"x\")>-1,flipY:E.tiling.flip.indexOf(\"y\")>-1,pad:{inner:E.tiling.pad,top:E.marker.pad.t,left:E.marker.pad.l,right:E.marker.pad.r,bottom:E.marker.pad.b}}).descendants(),z=1/0,D=-1/0;O.forEach((function(t){var e=t.depth;e>=E._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(z=Math.min(z,e),D=Math.max(D,e))})),p=p.data(O,u.getPtId),E._maxVisibleLayers=isFinite(D)?D-z+1:0,p.enter().append(\"g\").classed(\"slice\",!0),T(p,!1,{},[g,m],x),p.order();var R=null;if(w&&M){var F=u.getPtId(M);p.each((function(t){null===R&&u.getPtId(t)===F&&(R={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var B=function(){return R||{x0:0,x1:g,y0:0,y1:m}},N=p;return w&&(N=N.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),N.each((function(s){var p=u.isHeader(s,E);s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-E.marker.pad.r),s._hoverY=y(P?s.y1-E.marker.pad.b/2:s.y0+E.marker.pad.t/2);var d=n.select(this),T=i.ensureSingle(d,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?T.transition().attrTween(\"d\",(function(t){var e=k(t,!1,B(),[g,m]);return function(t){return x(e(t))}})):T.attr(\"d\",x),d.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{isTransitioning:t._transitioning}),T.call(l,s,E,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text=\"\":s._text=p?I?\"\":u.getPtLabel(s)||\"\":h(s,r,E,e,S)||\"\";var M=i.ensureSingle(d,\"g\",\"slicetext\"),O=i.ensureSingle(M,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),z=i.ensureUniformFontSize(t,u.determineTextFont(E,s,S.font));O.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",C?\"end\":L||p?\"start\":\"middle\").call(a.font,z).call(o.convertToTspans,t),s.textBB=a.bBox(O.node()),s.transform=b(s,{fontSize:z.size,isHeader:p}),s.transform.fontSize=z.size,w?O.transition().attrTween(\"transform\",(function(t){var e=A(t,!1,B(),[g,m]);return function(t){return _(e(t))}})):O.attr(\"transform\",_(s))})),R}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../sunburst/fx\":1050,\"../sunburst/helpers\":1051,\"../sunburst/plot\":1055,\"./constants\":1074,\"./partition\":1083,\"./style\":1086,\"@plotly/d3\":58}],1079:[function(t,e,r){\"use strict\";e.exports=function t(e,r,n){var i;n.swapXY&&(i=e.x0,e.x0=e.y0,e.y0=i,i=e.x1,e.x1=e.y1,e.y1=i),n.flipX&&(i=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-i),n.flipY&&(i=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-i);var a=e.children;if(a)for(var o=0;o-1?C+O:-(I+O):0,D={x0:P,x1:P,y0:z,y1:z+I},R=function(t,e,r){var n=v.tiling.pad,i=function(t){return t-n<=e.x0},a=function(t){return t+n>=e.x1},o=function(t){return t-n<=e.y0},s=function(t){return t+n>=e.y1};return t.x0===e.x0&&t.x1===e.x1&&t.y0===e.y0&&t.y1===e.y1?{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}:{x0:i(t.x0-n)?0:a(t.x0-n)?r[0]:t.x0,x1:i(t.x1+n)?0:a(t.x1+n)?r[0]:t.x1,y0:o(t.y0-n)?0:s(t.y0-n)?r[1]:t.y0,y1:o(t.y1+n)?0:s(t.y1+n)?r[1]:t.y1}},F=null,B={},N={},j=null,U=function(t,e){return e?B[h(t)]:N[h(t)]},V=function(t,e,r,n){if(e)return B[h(x)]||D;var i=N[v.level]||r;return function(t){return t.data.depth-b.data.depth=(n-=(y?m:m.r)-s)){var x=(r+n)/2;r=x,n=x}var b;f?i<(b=a-(y?m:m.b))&&b\"===tt?(l.x-=a,c.x-=a,u.x-=a,f.x-=a):\"/\"===tt?(u.x-=a,f.x-=a,o.x-=a/2,s.x-=a/2):\"\\\\\"===tt?(l.x-=a,c.x-=a,o.x-=a/2,s.x-=a/2):\"<\"===tt&&(o.x-=a,s.x-=a),$(l),$(f),$(o),$(c),$(u),$(s),\"M\"+K(l.x,l.y)+\"L\"+K(c.x,c.y)+\"L\"+K(s.x,s.y)+\"L\"+K(u.x,u.y)+\"L\"+K(f.x,f.y)+\"L\"+K(o.x,o.y)+\"Z\"},toMoveInsideSlice:et,makeUpdateSliceInterpolator:nt,makeUpdateTextInterpolator:it,handleSlicesExit:at,hasTransition:A,strTransform:ot}):w.remove()}},{\"../../lib\":503,\"../bar/constants\":650,\"../bar/plot\":659,\"../bar/uniform_text\":664,\"../sunburst/helpers\":1051,\"./constants\":1074,\"./draw_ancestors\":1077,\"@plotly/d3\":58,\"d3-interpolate\":116}],1086:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../sunburst/helpers\"),s=t(\"../bar/uniform_text\").resizeText;function l(t,e,r,n){var s,l,c=(n||{}).hovered,u=e.data.data,f=u.i,h=u.color,p=o.isHierarchyRoot(e),d=1;if(c)s=r._hovered.marker.line.color,l=r._hovered.marker.line.width;else if(p&&h===r.root.color)d=100,s=\"rgba(0,0,0,0)\",l=0;else if(s=a.castOption(r,f,\"marker.line.color\")||i.defaultLine,l=a.castOption(r,f,\"marker.line.width\")||0,!r._hasColorscale&&!e.onPathbar){var g=r.marker.depthfade;if(g){var m,v=i.combine(i.addOpacity(r._backgroundColor,.75),h);if(!0===g){var y=o.getMaxDepth(r);m=isFinite(y)?o.isLeaf(e)?0:r._maxVisibleLayers-(e.data.depth-r._entryDepth):e.data.height+1}else m=e.data.depth-r._entryDepth,r._atRootLevel||m++;if(m>0)for(var x=0;x0){var x,b,_,w,T,k=t.xa,A=t.ya;\"h\"===p.orientation?(T=e,x=\"y\",_=A,b=\"x\",w=k):(T=r,x=\"x\",_=k,b=\"y\",w=A);var M=h[t.index];if(T>=M.span[0]&&T<=M.span[1]){var S=n.extendFlat({},t),E=w.c2p(T,!0),L=o.getKdeValue(M,p,T),C=o.getPositionOnKdePath(M,p,E),P=_._offset,I=_._length;S[x+\"0\"]=C[0],S[x+\"1\"]=C[1],S[b+\"0\"]=S[b+\"1\"]=E,S[b+\"Label\"]=b+\": \"+i.hoverLabelText(w,T,p[b+\"hoverformat\"])+\", \"+h[0].t.labels.kde+\" \"+L.toFixed(3),S.spikeDistance=y[0].spikeDistance;var O=x+\"Spike\";S[O]=y[0][O],y[0].spikeDistance=void 0,y[0][O]=void 0,S.hovertemplate=!1,v.push(S),(u={stroke:t.color})[x+\"1\"]=n.constrain(P+C[0],P,P+I),u[x+\"2\"]=n.constrain(P+C[1],P,P+I),u[b+\"1\"]=u[b+\"2\"]=w._offset+E}}g&&(v=v.concat(y))}-1!==d.indexOf(\"points\")&&(c=a.hoverOnPoints(t,e,r));var z=f.selectAll(\".violinline-\"+p.uid).data(u?[0]:[]);return z.enter().append(\"line\").classed(\"violinline-\"+p.uid,!0).attr(\"stroke-width\",1.5),z.exit().remove(),z.attr(u),\"closest\"===s?c?[c]:v:c?(v.push(c),v):v}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"../box/hover\":678,\"./helpers\":1091}],1093:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"../box/defaults\").crossTraceDefaults,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\":568,\"../box/defaults\":676,\"../box/select\":683,\"../scatter/style\":950,\"./attributes\":1087,\"./calc\":1088,\"./cross_trace_calc\":1089,\"./defaults\":1090,\"./hover\":1092,\"./layout_attributes\":1094,\"./layout_defaults\":1095,\"./plot\":1096,\"./style\":1097}],1094:[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\":503,\"../box/layout_attributes\":680}],1095:[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\":503,\"../box/layout_defaults\":681,\"./layout_attributes\":1094}],1096:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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,linearized:!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;if(!0!==c.visible||s.empty)r.remove();else{var d=s.bPos,g=s.bdPos,m=e[s.valLetter+\"axis\"],v=e[s.posLetter+\"axis\"],y=\"both\"===c.side,x=y||\"positive\"===c.side,b=y||\"negative\"===c.side,_=r.selectAll(\"path.violin\").data(i.identity);_.enter().append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").attr(\"class\",\"violin\"),_.exit().remove(),_.each((function(t){var e,r,i,a,o,l,f,h,_=n.select(this),w=t.density,T=w.length,k=v.c2l(t.pos+d,!0),A=v.l2p(k);if(c.width)e=s.maxKDE/g;else{var M=u._violinScaleGroupStats[c.scalegroup];e=\"count\"===c.scalemode?M.maxKDE/g*(M.maxCount/t.pts.length):M.maxKDE/g}if(x){for(f=new Array(T),o=0;o\")),u.color=function(t,e){var r=t[e.dir].marker,n=r.color,a=r.line.color,o=r.line.width;if(i(n))return n;if(i(a)&&o)return a}(h,m),[u]}function k(t){return n(g,t,h[d+\"hoverformat\"])}}},{\"../../components/color\":366,\"../../constants/delta.js\":473,\"../../plots/cartesian/axes\":554,\"../bar/hover\":655}],1109:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\"),plot:t(\"./plot\"),style:t(\"./style\").style,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"../bar/select\"),moduleType:\"trace\",name:\"waterfall\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"../bar/select\":660,\"./attributes\":1102,\"./calc\":1103,\"./cross_trace_calc\":1105,\"./defaults\":1106,\"./event_data\":1107,\"./hover\":1108,\"./layout_attributes\":1110,\"./layout_defaults\":1111,\"./plot\":1112,\"./style\":1113}],1110:[function(t,e,r){\"use strict\";e.exports={waterfallmode:{valType:\"enumerated\",values:[\"group\",\"overlay\"],dflt:\"group\",editType:\"calc\"},waterfallgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},waterfallgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],1111:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s0&&(m+=h?\"M\"+f[0]+\",\"+d[1]+\"V\"+d[0]:\"M\"+f[1]+\",\"+d[0]+\"H\"+f[0]),\"between\"!==p&&(r.isSum||s path\").each((function(t){if(!t.isBlank){var e=s[t.dir].marker;n.select(this).call(a.fill,e.color).call(a.stroke,e.line.color).call(i.dashLine,e.line.dash,e.line.width).style(\"opacity\",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(\".lines\").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll(\"path\"),t.width,t.color,t.dash)}))}))}}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../constants/interactions\":478,\"../bar/style\":662,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],1114:[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,a=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,i=0;ii&&(i=u,o=c)}}return i?a(o):s};case\"rms\":return function(t,e){for(var r=0,i=0,o=0;o\":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[0]&&es[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 es[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[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?(m=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(f))},v=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(m=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},v=function(t,e){var r=x[t.astr][e];t.get().push(r)}),k(m);for(var w=o(e.transforms,r),T=0;T1?\"%{group} (%{trace})\":\"%{group}\");var l=t.styles,c=o.styles=[];if(l)for(a=0;a0?o-4:o;for(r=0;r>16&255,l[u++]=e>>8&255,l[u++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,l[u++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e);return l},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=0,s=r-i;os?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;s0)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>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join(\"\")}i[\"-\".charCodeAt(0)]=62,i[\"_\".charCodeAt(0)]=63},{}],2:[function(t,e,r){},{}],3:[function(t,e,r){(function(e){(function(){\n", + "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\":255,\"./lib/epsilon\":256,\"./lib/geojson\":257,\"./lib/intersecter\":258,\"./lib/segment-chainer\":260,\"./lib/segment-selector\":261}],255:[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\")}}}},{}],256:[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)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])t!=o-i>t&&(a-c)*(i-u)/(o-u)+c-n>t&&(s=!s),a=c,o=u}return s}};return e}},{}],257:[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;i0}))}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 m(){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 v,y=m();if(y){var x;if(t)(x=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above);else y.seg.otherFill=h.seg.myFill;r&&r.segmentUpdate(y.seg),h.other.remove(),h.remove()}if(a.getHead()!==h){r&&r.rewind(h.seg);continue}if(t)x=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=x?!h.seg.myFill.below:h.seg.myFill.below;else if(null===h.seg.otherFill)v=g?h.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:h.primary?o:i,h.seg.otherFill={above:v,below:v};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;l0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,t)}},a.prototype.read_uint16=function(t){var e=this.input;if(t+2>e.length)throw n(\"unexpected EOF\",\"EBADDATA\");return this.big_endian?256*e[t]+e[t+1]:e[t]+256*e[t+1]},a.prototype.read_uint32=function(t){var e=this.input;if(t+4>e.length)throw n(\"unexpected EOF\",\"EBADDATA\");return this.big_endian?16777216*e[t]+65536*e[t+1]+256*e[t+2]+e[t+3]:e[t]+256*e[t+1]+65536*e[t+2]+16777216*e[t+3]},a.prototype.is_subifd_link=function(t,e){return 0===t&&34665===e||0===t&&34853===e||34665===t&&40965===e},a.prototype.exif_format_length=function(t){switch(t){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},a.prototype.exif_format_read=function(t,e){var r;switch(t){case 1:case 2:return r=this.input[e];case 6:return(r=this.input[e])|33554430*(128&r);case 3:return r=this.read_uint16(e);case 8:return(r=this.read_uint16(e))|131070*(32768&r);case 4:return r=this.read_uint32(e);case 9:return 0|(r=this.read_uint32(e));case 5:case 10:case 11:case 12:case 7:default:return null}},a.prototype.scan_ifd=function(t,e,r){var a=this.read_uint16(e);e+=2;for(var o=0;othis.input.length)throw n(\"unexpected EOF\",\"EBADDATA\");for(var d=[],g=h,m=0;m0&&(this.ifds_to_read.push({id:s,offset:d[0]}),p=!0),!1===r({is_big_endian:this.big_endian,ifd:t,tag:s,format:l,count:c,entry_offset:e+this.start,data_length:f,data_offset:h+this.start,value:d,is_subifd_link:p}))return void(this.aborted=!0);e+=12}0===t&&this.ifds_to_read.push({id:1,offset:this.read_uint32(e)})},e.exports.ExifParser=a,e.exports.get_orientation=function(t){var e=0;try{return new a(t,0,t.length).each((function(t){if(0===t.ifd&&274===t.tag&&Array.isArray(t.value))return e=t.value[0],!1})),e}catch(t){return-1}}},{}],264:[function(t,e,r){\"use strict\";var n=t(\"./common\").readUInt16BE,i=t(\"./common\").readUInt32BE;function a(t,e){if(t.length<4+e)return null;var r=i(t,e);return t.length>4&15,i=15&t[4],a=t[5]>>4&15,o=n(t,6),l=8,c=0;ce.width||t.width===e.width&&t.height>e.height?t:e})),i=r.reduce((function(t,e){return t.height>e.height||t.height===e.height&&t.width>e.width?t:e})),n.width>i.height||n.width===i.height&&n.height>i.width?n:i),s=1;e.transforms.forEach((function(t){var e={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},r={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(\"imir\"===t.type&&(s=0===t.value?r[s]:e[s=e[s=r[s]]]),\"irot\"===t.type)for(var n=0;n1&&(h.variants=f.variants),f.orientation&&(h.orientation=f.orientation),f.exif_location&&f.exif_location.offset+f.exif_location.length<=t.length){var p=a(t,f.exif_location.offset),d=t.slice(f.exif_location.offset+p+4,f.exif_location.offset+f.exif_location.length),g=s.get_orientation(d);g>0&&(h.orientation=g)}return h}}}}}}},{\"../common\":262,\"../exif_utils\":263,\"../miaf_utils\":264}],266:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt16LE,o=n(\"BM\");e.exports=function(t){if(!(t.length<26)&&i(t,0,o))return{width:a(t,18),height:a(t,22),type:\"bmp\",mime:\"image/bmp\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],267:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt16LE,o=n(\"GIF87a\"),s=n(\"GIF89a\");e.exports=function(t){if(!(t.length<10)&&(i(t,0,o)||i(t,0,s)))return{width:a(t,6),height:a(t,8),type:\"gif\",mime:\"image/gif\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],268:[function(t,e,r){\"use strict\";var n=t(\"../common\").readUInt16LE;e.exports=function(t){var e=n(t,0),r=n(t,2),i=n(t,4);if(0===e&&1===r&&i){for(var a=[],o={width:0,height:0},s=0;so.width||c>o.height)&&(o=u)}return{width:o.width,height:o.height,variants:a,type:\"ico\",mime:\"image/x-icon\",wUnits:\"px\",hUnits:\"px\"}}}},{\"../common\":262}],269:[function(t,e,r){\"use strict\";var n=t(\"../common\").readUInt16BE,i=t(\"../common\").str2arr,a=t(\"../common\").sliceEq,o=t(\"../exif_utils\"),s=i(\"Exif\\0\\0\");e.exports=function(t){if(!(t.length<2)&&255===t[0]&&216===t[1]&&255===t[2])for(var e=2;;){for(;;){if(t.length-e<2)return;if(255===t[e++])break}for(var r,i,l=t[e++];255===l;)l=t[e++];if(208<=l&&l<=217||1===l)r=0;else{if(!(192<=l&&l<=254))return;if(t.length-e<2)return;r=n(t,e)-2,e+=2}if(217===l||218===l)return;if(225===l&&r>=10&&a(t,e,s)&&(i=o.get_orientation(t.slice(e+6,e+r))),r>=5&&192<=l&&l<=207&&196!==l&&200!==l&&204!==l){if(t.length-e0&&(c.orientation=i),c}e+=r}}},{\"../common\":262,\"../exif_utils\":263}],270:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt32BE,o=n(\"\\x89PNG\\r\\n\\x1a\\n\"),s=n(\"IHDR\");e.exports=function(t){if(!(t.length<24)&&i(t,0,o)&&i(t,12,s))return{width:a(t,16),height:a(t,20),type:\"png\",mime:\"image/png\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],271:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt32BE,o=n(\"8BPS\\0\\x01\");e.exports=function(t){if(!(t.length<22)&&i(t,0,o))return{width:a(t,18),height:a(t,14),type:\"psd\",mime:\"image/vnd.adobe.photoshop\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":262}],272:[function(t,e,r){\"use strict\";function n(t){return\"number\"==typeof t&&isFinite(t)&&t>0}var i=/<[-_.:a-zA-Z0-9][^>]*>/,a=/^<([-_.:a-zA-Z0-9]+:)?svg\\s/,o=/[^-]\\bwidth=\"([^%]+?)\"|[^-]\\bwidth='([^%]+?)'/,s=/\\bheight=\"([^%]+?)\"|\\bheight='([^%]+?)'/,l=/\\bview[bB]ox=\"(.+?)\"|\\bview[bB]ox='(.+?)'/,c=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function u(t){return c.test(t)?t.match(c)[0]:\"px\"}e.exports=function(t){if(function(t){var e,r=0,n=t.length;for(239===t[0]&&187===t[1]&&191===t[2]&&(r=3);r>14&16383),type:\"webp\",mime:\"image/webp\",wUnits:\"px\",hUnits:\"px\"}}}function h(t,e){return{width:1+(t[e+6]<<16|t[e+5]<<8|t[e+4]),height:1+(t[e+9]<t.length)){for(;e+8=10?r=r||u(t,e+8):\"VP8L\"===p&&d>=9?r=r||f(t,e+8):\"VP8X\"===p&&d>=10?r=r||h(t,e+8):\"EXIF\"===p&&(n=s.get_orientation(t.slice(e+8,e+8+d)),e=1/0),e+=8+d}else e++;if(r)return n>0&&(r.orientation=n),r}}}},{\"../common\":262,\"../exif_utils\":263}],275:[function(t,e,r){\"use strict\";e.exports={avif:t(\"./parse_sync/avif\"),bmp:t(\"./parse_sync/bmp\"),gif:t(\"./parse_sync/gif\"),ico:t(\"./parse_sync/ico\"),jpeg:t(\"./parse_sync/jpeg\"),png:t(\"./parse_sync/png\"),psd:t(\"./parse_sync/psd\"),svg:t(\"./parse_sync/svg\"),tiff:t(\"./parse_sync/tiff\"),webp:t(\"./parse_sync/webp\")}},{\"./parse_sync/avif\":265,\"./parse_sync/bmp\":266,\"./parse_sync/gif\":267,\"./parse_sync/ico\":268,\"./parse_sync/jpeg\":269,\"./parse_sync/png\":270,\"./parse_sync/psd\":271,\"./parse_sync/svg\":272,\"./parse_sync/tiff\":273,\"./parse_sync/webp\":274}],276:[function(t,e,r){\"use strict\";var n=t(\"./lib/parsers_sync\");e.exports=function(t){return function(t){for(var e=Object.keys(n),r=0;r1)for(var r=1;r1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function T(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 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 float dashLength, pixelRatio, thickness, opacity, id, miterMode;\\nuniform sampler2D dashTexture;\\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) / dashLength) * .5 + .25;\\n\\tfloat dash = texture2D(dashTexture, 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||\"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\",splitNull:\"splitNull\"}),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=D}));(I=I.slice(0,R)).push(D)}for(var F=function(t){var e=k.slice(2*z,2*I[t]).concat(D?k.slice(2*D):[]),r=(d.hole||[]).map((function(e){return e-D+(I[t]-z)})),n=c(e,r);n=n.map((function(e){return e+z+(e+zt.length)&&(e=t.length);for(var r=0,n=new Array(e);r 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\"]),l.vert=h([\"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 bool constPointSize;\\nuniform float pixelRatio;\\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\\nuniform sampler2D paletteTexture;\\n\\nconst float maxSize = 100.;\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragBorderRadius, fragWidth;\\n\\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\\n\\nbool isDirect = (paletteSize.x < 1.);\\n\\nvec4 getColor(vec4 id) {\\n return isDirect ? id / 255. : texture2D(paletteTexture,\\n vec2(\\n (id.x + .5) / paletteSize.x,\\n (id.y + .5) / paletteSize.y\\n )\\n );\\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) * pointSizeScale;\\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\"]),m&&(l.frag=l.frag.replace(\"smoothstep\",\"smoothStep\"),s.frag=s.frag.replace(\"smoothstep\",\"smoothStep\")),this.drawCircle=t(l)}b.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},b.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},b.prototype.draw=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;nn)?e.tree=u(t,{bounds:f}):n&&n.length&&(e.tree=n),e.tree){var h={primitive:\"points\",usage:\"static\",data:e.tree,type:\"uint32\"};e.elements?e.elements(h):e.elements=o.elements(h)}var p=v.float32(t);return i({data:p,usage:\"dynamic\"}),a({data:v.fract32(t,p),usage:\"dynamic\"}),s({data:new Uint8Array(c),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=[],s=0,l=Math.min(e.length,r.count);s=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;o4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===i.length?i[0]:i},b.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;i2?(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;nk))&&(s.lower||!(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)||W(t.data))}function c(t,e,r,n,i,a){for(var o=0;o(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)||W(t)||l(t)?e=t:(\"data\"in t&&(e=t.data),\"usage\"in t&&(r=Q[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>>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,r.height>>=i,p(r,n[i]),t.mipmask|=1<e;++e)t.images[e]=null;return t}function C(t){for(var e=t.images,r=0;re){for(var r=0;r=--this.refCount&&F(this)}}),o.profile&&(a.getTotalTextureSize=function(){var t=0;return Object.keys(yt).forEach((function(e){t+=yt[e].stats.size})),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;P.call(r);var a=L();return\"number\"==typeof t?M(a,0|t,\"number\"==typeof e?0|e:0|t):t?(I(r,t),S(a,t)):M(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),E(a,3553),O(r,3553),R(),C(a),o.profile&&(i.stats.size=T(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 z(3553);return yt[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=v();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(),k(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=0;i.mipmask>>l;++l){var c=a>>l,u=s>>l;if(!c||!u)break;t.texImage2D(3553,l,i.format,c,u,0,i.format,i.type,null)}return R(),o.profile&&(i.stats.size=T(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(P.call(l),s=0;6>s;++s)g[s]=L();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(I(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)M(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)E(g[s],34069+s);for(O(l,34067),R(),o.profile&&(h.stats.size=T(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)C(g[s]);return f}var h=new z(34067);yt[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=v();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(),k(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=T(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;er;++r)if(0!=(e.mipmask&1<>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);O(e.texInfo,e.target)}))},refresh:function(){for(var e=0;ei;++i){for(c=0;ct;++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(k).forEach(m)},restore:function(){x.cur=null,x.next=null,x.dirty=!0,X(k).forEach((function(e){e.framebuffer=t.createFramebuffer(),v(e)}))}})}function M(){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,i,a,o){function s(){this.id=++f,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var t=e.oes_vertex_array_object;this.vao=t?t.createVertexArrayOES():null,h[this.id]=this,this.buffers=[]}var c=r.maxAttributes,u=Array(c);for(r=0;r=h.byteLength?c.subdata(h):(c.destroy(),r.buffers[s]=null)),r.buffers[s]||(c=r.buffers[s]=i.create(u,34962,!1,!0)),f.buffer=i.getBuffer(c),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1,t[s]=1;else i.getBuffer(u)?(f.buffer=i.getBuffer(u),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1):i.getBuffer(u.buffer)?(f.buffer=i.getBuffer(u.buffer),f.size=0|(+u.size||f.buffer.dimension),f.normalized=!!u.normalized||!1,f.type=\"type\"in u?K[u.type]:f.buffer.dtype,f.offset=0|(u.offset||0),f.stride=0|(u.stride||0),f.divisor=0|(u.divisor||0),f.state=1):\"x\"in u&&(f.x=+u.x||0,f.y=+u.y||0,f.z=+u.z||0,f.w=+u.w||0,f.state=2)}for(c=0;ct&&(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(e,n,i,a){var o=f[n];o||(o=f[n]={});var p=o[e];if(p&&(p.refCount++,!a))return p;var d=new s(n,e);return r.shaderCount++,l(d,i,a),p||(o[e]=d),h.push(d),j(d,{destroy:function(){if(d.refCount--,0>=d.refCount){t.deleteProgram(d.program);var e=h.indexOf(d);h.splice(e,1),r.shaderCount--}0>=o[d.vertId].refCount&&(t.deleteShader(u[d.vertId]),delete u[d.vertId],delete f[d.fragId][d.vertId]),Object.keys(f[d.fragId]).length||(t.deleteShader(c[d.fragId]),delete c[d.fragId],delete f[d.fragId])}})},restore:function(){c={},u={};for(var t=0;t\"+e+\"?\"+i+\".constant[\"+e+\"]:0;\"})).join(\"\"),\"}}else{\",\"if(\",s,\"(\",i,\".buffer)){\",u,\"=\",a,\".createStream(\",34962,\",\",i,\".buffer);\",\"}else{\",u,\"=\",a,\".getBuffer(\",i,\".buffer);\",\"}\",f,'=\"type\" in ',i,\"?\",o.glTypes,\"[\",i,\".type]:\",u,\".dtype;\",l.normalized,\"=!!\",i,\".normalized;\"),n(\"size\"),n(\"offset\"),n(\"stride\"),n(\"divisor\"),r(\"}}\"),r.exit(\"if(\",l.isStream,\"){\",a,\".destroyStream(\",u,\");\",\"}\"),l}))})),o}function A(t,e,n,i,o){function s(t){var e=c[t];e&&(h[t]=e)}var l=function(t,e){if(\"string\"==typeof(r=t.static).frag&&\"string\"==typeof r.vert){if(0>1)\",s],\");\")}function e(){r(l,\".drawArraysInstancedANGLE(\",[d,g,m,s],\");\")}p&&\"null\"!==p?y?t():(r(\"if(\",p,\"){\"),t(),r(\"}else{\"),e(),r(\"}\")):e()}function o(){function t(){r(u+\".drawElements(\"+[d,m,v,g+\"<<((\"+v+\"-5121)>>1)\"]+\");\")}function e(){r(u+\".drawArrays(\"+[d,g,m]+\");\")}p&&\"null\"!==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),h.elementsActive&&a(\"if(\"+i+\")\"+u+\".bindBuffer(34963,\"+i+\".buffer.buffer);\")):(i=a.def(),a(i,\"=\",f,\".\",\"elements\",\";\",\"if(\",i,\"){\",u,\".bindBuffer(\",34963,\",\",i,\".buffer.buffer);}\",\"else if(\",c.vao,\".currentVAO){\",i,\"=\",t.shared.elements+\".getElements(\"+c.vao,\".currentVAO.elements);\",nt?\"\":\"if(\"+i+\")\"+u+\".bindBuffer(34963,\"+i+\".buffer.buffer);\",\"}\")),i}(),d=i(\"primitive\"),g=i(\"offset\"),m=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 m){if(0===m)return}else r(\"if(\",m,\"){\"),r.exit(\"}\");tt&&(s=i(\"instances\"),l=t.instancing);var v=p+\".type\",y=h.elements&&D(h.elements)&&!h.vaoActive;tt&&(\"number\"!=typeof s||0<=s)?\"string\"==typeof s?(r(\"if(\",s,\">0){\"),a(),r(\"}else if(\",s,\"<0){\"),o(),r(\"}\")):a():o()}function G(t,e,r,n,i){return i=(e=b()).proc(\"body\",i),tt&&(e.instancing=i.def(e.shared.extensions,\".angle_instanced_arrays\")),t(e,i,r,n),e.compile().body}function Y(t,e,r,n){B(t,e),r.useVAO?r.drawVAO?e(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,e),\");\"):e(t.shared.vao,\".setVAO(\",t.shared.vao,\".targetVAO);\"):(e(t.shared.vao,\".setVAO(null);\"),U(t,e,r,n.attributes,(function(){return!0}))),H(t,e,r,n.uniforms,(function(){return!0}),!1),q(t,e,e,r)}function W(t,e,r,n){function i(){return!0}t.batchId=\"a1\",B(t,e),U(t,e,r,n.attributes,i),H(t,e,r,n.uniforms,i,!1),q(t,e,e,r)}function X(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}B(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&&M(t,u,r.context),r.needsFramebuffer&&S(t,u,r.framebuffer),L(t,u,r.state,i),r.profile&&i(r.profile)&&N(t,u,r,!1,!0),n?(r.useVAO?r.drawVAO?i(r.drawVAO)?u(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,u),\");\"):c(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,c),\");\"):c(t.shared.vao,\".setVAO(\",t.shared.vao,\".targetVAO);\"):(c(t.shared.vao,\".setVAO(null);\"),U(t,c,r,n.attributes,a),U(t,u,r,n.attributes,i)),H(t,c,r,n.uniforms,a,!1),H(t,u,r,n.uniforms,i,!0),q(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 G(W,t,r,e,2)})),\"(\",n,\");}\",c,\".call(this,a0[\",s,\"],\",s,\");\"))}function Z(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;M(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),O(Object.keys(r.state)).forEach((function(e){var n=r.state[e].append(t,i);m(n)?n.forEach((function(r,n){i.set(t.next[e],\"[\"+n+\"]\",r)})):i.set(a.next,\".\"+e,n)})),N(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){var o=r.uniforms[n].append(t,i);Array.isArray(o)&&(o=\"[\"+o.join()+\"]\"),i.set(a.uniforms,\"[\"+e.id(n)+\"]\",o)})),Object.keys(r.attributes).forEach((function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new Q).forEach((function(t){i.set(a,\".\"+t,n[t])}))})),r.scopeVAO&&i.set(a.vao,\".targetVAO\",r.scopeVAO.append(t,i)),n(\"vert\"),n(\"frag\"),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.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)}}},xt=[];xt[6408]=4,xt[6407]=3;var bt=[];bt[5121]=1,bt[5126]=4,bt[36193]=2;var _t=[\"x\",\"y\",\"z\",\"w\"],wt=\"blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset\".split(\" \"),Tt={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},At={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,\"increment wrap\":34055,\"decrement wrap\":34056,invert:5386},Mt={cw:2304,ccw:2305},St=new z(!1,!1,!1,(function(){}));return function(t){function e(){if(0===J.length)w&&w.update(),tt=null;else{tt=H.next(e),f();for(var t=J.length-1;0<=t;--t){var r=J[t];r&&r(P,null,0)}m.flush(),w&&w.update()}}function r(){!tt&&0=J.length&&n()}}}}function u(){var t=X.viewport,e=X.scissor_box;t[0]=t[1]=e[0]=e[1]=0,P.viewportWidth=P.framebufferWidth=P.drawingBufferWidth=t[2]=e[2]=m.drawingBufferWidth,P.viewportHeight=P.framebufferHeight=P.drawingBufferHeight=t[3]=e[3]=m.drawingBufferHeight}function f(){P.tick+=1,P.time=g(),u(),W.procs.poll()}function h(){F.refresh(),u(),W.procs.refresh(),w&&w.update()}function g(){return(q()-T)/1e3}if(!(t=i(t)))return null;var m=t.gl,v=m.getContextAttributes();m.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;ie;++e)et(j({framebuffer:t.framebuffer.faces[e]},t),l);else et(t,l);else l(0,t)},prop:V.define.bind(null,1),context:V.define.bind(null,2),this:V.define.bind(null,3),draw:s({}),buffer:function(t){return O.create(t,34962,!1,!1)},elements:function(t){return z.create(t,!1)},texture:F.create2D,cube:F.createCube,renderbuffer:U.create,framebuffer:G.create,framebufferCube:G.createCube,vao:D.createVAO,attributes:v,frame:c,on:function(t,e){var r;switch(t){case\"frame\":return c(e);case\"lost\":r=K;break;case\"restore\":r=Q;break;case\"destroy\":r=$}return r.push(e),{cancel:function(){for(var t=0;t2?\"one of \".concat(e,\" \").concat(t.slice(0,r-1).join(\", \"),\", or \")+t[r-1]:2===r?\"one of \".concat(e,\" \").concat(t[0],\" or \").concat(t[1]):\"of \".concat(e,\" \").concat(t[0])}return\"of \".concat(e,\" \").concat(String(t))}i(\"ERR_INVALID_OPT_VALUE\",(function(t,e){return'The value \"'+e+'\" is invalid for option \"'+t+'\"'}),TypeError),i(\"ERR_INVALID_ARG_TYPE\",(function(t,e,r){var n,i,o,s;if(\"string\"==typeof e&&(i=\"not \",e.substr(!o||o<0?0:+o,i.length)===i)?(n=\"must not be\",e=e.replace(/^not /,\"\")):n=\"must be\",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t,\" argument\"))s=\"The \".concat(t,\" \").concat(n,\" \").concat(a(e,\"type\"));else{var l=function(t,e,r){return\"number\"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,\".\")?\"property\":\"argument\";s='The \"'.concat(t,'\" ').concat(l,\" \").concat(n,\" \").concat(a(e,\"type\"))}return s+=\". Received type \".concat(typeof r)}),TypeError),i(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\"),i(\"ERR_METHOD_NOT_IMPLEMENTED\",(function(t){return\"The \"+t+\" method is not implemented\"})),i(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\"),i(\"ERR_STREAM_DESTROYED\",(function(t){return\"Cannot call \"+t+\" after a stream was destroyed\"})),i(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\"),i(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\"),i(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\"),i(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError),i(\"ERR_UNKNOWN_ENCODING\",(function(t){return\"Unknown encoding: \"+t}),TypeError),i(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\"),e.exports.codes=n},{}],287:[function(t,e,r){(function(r){(function(){\"use strict\";var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=c;var i=t(\"./_stream_readable\"),a=t(\"./_stream_writable\");t(\"inherits\")(c,i);for(var o=n(a.prototype),s=0;s0)if(\"string\"==typeof e||o.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),n)o.endEmitted?w(t,new _):S(t,o,e,!0);else if(o.ended)w(t,new x);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?S(t,o,e,!1):P(t,o)):S(t,o,e,!1)}else n||(o.reading=!1,P(t,o));return!o.ended&&(o.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function L(t){var e=t._readableState;c(\"emitReadable\",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c(\"emitReadable\",e.flowing),e.emittedReadable=!0,r.nextTick(C,t))}function C(t){var e=t._readableState;c(\"emitReadable_\",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit(\"readable\"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,R(t)}function P(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(I,t,e))}function I(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount(\"data\")>0&&t.resume()}function z(t){c(\"readable nexttick read 0\"),t.read(0)}function D(t,e){c(\"resume\",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit(\"resume\"),R(t),e.flowing&&!e.reading&&t.read(0)}function R(t){var e=t._readableState;for(c(\"flow\",e.flowing);e.flowing&&null!==t.read(););}function F(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(\"\"):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function B(t){var e=t._readableState;c(\"endReadable\",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(N,e,t))}function N(t,e){if(c(\"endReadableNT\",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit(\"end\"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function j(t,e){for(var r=0,n=t.length;r=e.highWaterMark:e.length>0)||e.ended))return c(\"read: emitReadable\",e.length,e.ended),0===e.length&&e.ended?B(this):L(this),null;if(0===(t=E(t,e))&&e.ended)return 0===e.length&&B(this),null;var n,i=e.needReadable;return c(\"need readable\",i),(0===e.length||e.length-t0?F(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&B(this)),null!==n&&this.emit(\"data\",n),n},A.prototype._read=function(t){w(this,new b(\"_read()\"))},A.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c(\"pipe count=%d opts=%j\",i.pipesCount,e);var o=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?l:m;function s(e,r){c(\"onunpipe\"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c(\"cleanup\"),t.removeListener(\"close\",d),t.removeListener(\"finish\",g),t.removeListener(\"drain\",u),t.removeListener(\"error\",p),t.removeListener(\"unpipe\",s),n.removeListener(\"end\",l),n.removeListener(\"end\",m),n.removeListener(\"data\",h),f=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function l(){c(\"onend\"),t.end()}i.endEmitted?r.nextTick(o):n.once(\"end\",o),t.on(\"unpipe\",s);var u=function(t){return function(){var e=t._readableState;c(\"pipeOnDrain\",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,\"data\")&&(e.flowing=!0,R(t))}}(n);t.on(\"drain\",u);var f=!1;function h(e){c(\"ondata\");var r=t.write(e);c(\"dest.write\",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==j(i.pipes,t))&&!f&&(c(\"false write response, pause\",i.awaitDrain),i.awaitDrain++),n.pause())}function p(e){c(\"onerror\",e),m(),t.removeListener(\"error\",p),0===a(t,\"error\")&&w(t,e)}function d(){t.removeListener(\"finish\",g),m()}function g(){c(\"onfinish\"),t.removeListener(\"close\",d),m()}function m(){c(\"unpipe\"),n.unpipe(t)}return n.on(\"data\",h),function(t,e,r){if(\"function\"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,\"error\",p),t.once(\"close\",d),t.once(\"finish\",g),t.emit(\"pipe\",n),i.flowing||(c(\"pipe resume\"),n.resume()),t},A.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit(\"unpipe\",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a0,!1!==i.flowing&&this.resume()):\"readable\"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c(\"on readable\",i.length,i.reading),i.length?L(this):i.reading||r.nextTick(z,this))),n},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(t,e){var n=o.prototype.removeListener.call(this,t,e);return\"readable\"===t&&r.nextTick(O,this),n},A.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return\"readable\"!==t&&void 0!==t||r.nextTick(O,this),e},A.prototype.resume=function(){var t=this._readableState;return t.flowing||(c(\"resume\"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(D,t,e))}(this,t)),t.paused=!1,this},A.prototype.pause=function(){return c(\"call pause flowing=%j\",this._readableState.flowing),!1!==this._readableState.flowing&&(c(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this},A.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on(\"end\",(function(){if(c(\"wrapped end\"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on(\"data\",(function(i){(c(\"wrapped data\"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&\"function\"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var a=0;a-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(A.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(t,e,r){r(new g(\"_write()\"))},A.prototype._writev=null,A.prototype.end=function(t,e,n){var i=this._writableState;return\"function\"==typeof t?(n=t,t=null,e=null):\"function\"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,P(t,e),n&&(e.finished?r.nextTick(n):t.once(\"finish\",n));e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(A.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,\"destroyed\",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),A.prototype.destroy=f.destroy,A.prototype._undestroy=f.undestroy,A.prototype._destroy=function(t,e){e(t)}}).call(this)}).call(this,t(\"_process\"),\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"../errors\":286,\"./_stream_duplex\":287,\"./internal/streams/destroy\":294,\"./internal/streams/state\":298,\"./internal/streams/stream\":299,_process:277,buffer:85,inherits:231,\"util-deprecate\":330}],292:[function(t,e,r){(function(r){(function(){\"use strict\";var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var a=t(\"./end-of-stream\"),o=Symbol(\"lastResolve\"),s=Symbol(\"lastReject\"),l=Symbol(\"error\"),c=Symbol(\"ended\"),u=Symbol(\"lastPromise\"),f=Symbol(\"handlePromise\"),h=Symbol(\"stream\");function p(t,e){return{value:t,done:e}}function d(t){var e=t[o];if(null!==e){var r=t[h].read();null!==r&&(t[u]=null,t[o]=null,t[s]=null,e(p(r,!1)))}}function g(t){r.nextTick(d,t)}var m=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var t=this,e=this[l];if(null!==e)return Promise.reject(e);if(this[c])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise((function(e,n){r.nextTick((function(){t[l]?n(t[l]):e(p(void 0,!0))}))}));var n,i=this[u];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(p(void 0,!0)):e[f](r,n)}),n)}}(i,this));else{var a=this[h].read();if(null!==a)return Promise.resolve(p(a,!1));n=new Promise(this[f])}return this[u]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,\"return\",(function(){var t=this;return new Promise((function(e,r){t[h].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),n),m);e.exports=function(t){var e,r=Object.create(v,(i(e={},h,{value:t,writable:!0}),i(e,o,{value:null,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,l,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,f,{value:function(t,e){var n=r[h].read();n?(r[u]=null,r[o]=null,r[s]=null,t(p(n,!1))):(r[o]=t,r[s]=e)},writable:!0}),e));return r[u]=null,a(t,(function(t){if(t&&\"ERR_STREAM_PREMATURE_CLOSE\"!==t.code){var e=r[s];return null!==e&&(r[u]=null,r[o]=null,r[s]=null,e(t)),void(r[l]=t)}var n=r[o];null!==n&&(r[u]=null,r[o]=null,r[s]=null,n(p(void 0,!0))),r[c]=!0})),t.on(\"readable\",g.bind(null,r)),r}}).call(this)}).call(this,t(\"_process\"))},{\"./end-of-stream\":295,_process:277}],293:[function(t,e,r){\"use strict\";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){for(var r=0;r0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:\"unshift\",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:\"shift\",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:\"clear\",value:function(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function(t){if(0===this.length)return\"\";for(var e=this.head,r=\"\"+e.data;e=e.next;)r+=t+e.data;return r}},{key:\"concat\",value:function(t){if(0===this.length)return o.alloc(0);for(var e,r,n,i=o.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,r=i,n=s,o.prototype.copy.call(e,r,n),s+=a.data.length,a=a.next;return i}},{key:\"consume\",value:function(t,e){var r;return ti.length?i.length:t;if(a===i.length?n+=i:n+=i.slice(0,t),0==(t-=a)){a===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(a));break}++r}return this.length-=r,n}},{key:\"_getBuffer\",value:function(t){var e=o.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,a=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,a),0==(t-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,e}},{key:l,value:function(t,e){return s(this,function(t){for(var e=1;e0,(function(t){n||(n=t),t&&o.forEach(c),a||(o.forEach(c),i(n))}))}));return e.reduce(u)}},{\"../../../errors\":286,\"./end-of-stream\":295}],298:[function(t,e,r){\"use strict\";var n=t(\"../../../errors\").codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(t,e,r,i){var a=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new n(i?r:\"highWaterMark\",a);return Math.floor(a)}return t.objectMode?16:16384}}},{\"../../../errors\":286}],299:[function(t,e,r){e.exports=t(\"events\").EventEmitter},{events:84}],300:[function(t,e,r){\"use strict\";var n=t(\"safe-buffer\").Buffer,i=n.isEncoding||function(t){switch((t=\"\"+t)&&t.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return\"utf8\";for(var e;;)switch(t){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return t;default:if(e)return;t=(\"\"+t).toLowerCase(),e=!0}}(t);if(\"string\"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error(\"Unknown encoding: \"+t);return e||t}(t),this.encoding){case\"utf16le\":this.text=l,this.end=c,e=4;break;case\"utf8\":this.fillLast=s,e=4;break;case\"base64\":this.text=u,this.end=f,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,\"\\ufffd\";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,\"\\ufffd\";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,\"\\ufffd\"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){if((t.length-e)%2==0){var r=t.toString(\"utf16le\",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,r)}return e}function u(t,e){var r=(t.length-e)%3;return 0===r?t.toString(\"base64\",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):\"\"}r.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return\"\";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString(\"utf8\",e,n)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{\"safe-buffer\":284}],301:[function(t,e,r){(function(r,n){(function(){var r=t(\"assert\"),i=t(\"debug\")(\"stream-parser\");e.exports=function(t){var e=t&&\"function\"==typeof t._transform,r=t&&\"function\"==typeof t._write;if(!e&&!r)throw new Error(\"must pass a Writable or Transform stream in\");i(\"extending Parser into stream\"),t._bytes=o,t._skipBytes=s,e&&(t._passthrough=l);e?t._transform=u:t._write=c};function a(t){i(\"initializing parser stream\"),t._parserBytesLeft=0,t._parserBuffers=[],t._parserBuffered=0,t._parserState=-1,t._parserCallback=null,\"function\"==typeof t.push&&(t._parserOutput=t.push.bind(t)),t._parserInit=!0}function o(t,e){r(!this._parserCallback,'there is already a \"callback\" set!'),r(isFinite(t)&&t>0,'can only buffer a finite number of bytes > 0, got \"'+t+'\"'),this._parserInit||a(this),i(\"buffering %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=0}function s(t,e){r(!this._parserCallback,'there is already a \"callback\" set!'),r(t>0,'can only skip > 0 bytes, got \"'+t+'\"'),this._parserInit||a(this),i(\"skipping %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=1}function l(t,e){r(!this._parserCallback,'There is already a \"callback\" set!'),r(t>0,'can only pass through > 0 bytes, got \"'+t+'\"'),this._parserInit||a(this),i(\"passing through %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=2}function c(t,e,r){this._parserInit||a(this),i(\"write(%o bytes)\",t.length),\"function\"==typeof e&&(r=e),h(this,t,null,r)}function u(t,e,r){this._parserInit||a(this),i(\"transform(%o bytes)\",t.length),\"function\"!=typeof e&&(e=this._parserOutput),h(this,t,e,r)}function f(t,e,r,a){if(t._parserBytesLeft-=e.length,i(\"%o bytes left for stream piece\",t._parserBytesLeft),0===t._parserState?(t._parserBuffers.push(e),t._parserBuffered+=e.length):2===t._parserState&&r(e),0!==t._parserBytesLeft)return a;var o=t._parserCallback;if(o&&0===t._parserState&&t._parserBuffers.length>1&&(e=n.concat(t._parserBuffers,t._parserBuffered)),0!==t._parserState&&(e=null),t._parserCallback=null,t._parserBuffered=0,t._parserState=-1,t._parserBuffers.splice(0),o){var s=[];e&&s.push(e),r&&s.push(r);var l=o.length>s.length;l&&s.push(p(a));var c=o.apply(t,s);if(!l||a===c)return a}}var h=p((function t(e,r,n,i){return e._parserBytesLeft<=0?i(new Error(\"got data but not currently parsing anything\")):r.length<=e._parserBytesLeft?function(){return f(e,r,n,i)}:function(){var a=r.slice(0,e._parserBytesLeft);return f(e,a,n,(function(o){return o?i(o):r.length>a.length?function(){return t(e,r.slice(a.length),n,i)}:void 0}))}}));function p(t){return function(){for(var e=t.apply(this,arguments);\"function\"==typeof e;)e=e();return e}}}).call(this)}).call(this,t(\"_process\"),t(\"buffer\").Buffer)},{_process:277,assert:75,buffer:85,debug:302}],302:[function(t,e,r){(function(n){(function(){function i(){var t;try{t=r.storage.debug}catch(t){}return!t&&void 0!==n&&\"env\"in n&&(t=n.env.DEBUG),t}(r=e.exports=t(\"./debug\")).log=function(){return\"object\"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},r.formatArgs=function(t){var e=this.useColors;if(t[0]=(e?\"%c\":\"\")+this.namespace+(e?\" %c\":\" \")+t[0]+(e?\"%c \":\" \")+\"+\"+r.humanize(this.diff),!e)return;var n=\"color: \"+this.color;t.splice(1,0,n,\"color: inherit\");var i=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){\"%%\"!==t&&(i++,\"%c\"===t&&(a=i))})),t.splice(a,0,n)},r.save=function(t){try{null==t?r.storage.removeItem(\"debug\"):r.storage.debug=t}catch(t){}},r.load=i,r.useColors=function(){if(\"undefined\"!=typeof window&&window.process&&\"renderer\"===window.process.type)return!0;return\"undefined\"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||\"undefined\"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},r.storage=\"undefined\"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),r.colors=[\"lightseagreen\",\"forestgreen\",\"goldenrod\",\"dodgerblue\",\"darkorchid\",\"crimson\"],r.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return\"[UnexpectedJSONParseError]: \"+t.message}},r.enable(i())}).call(this)}).call(this,t(\"_process\"))},{\"./debug\":303,_process:277}],303:[function(t,e,r){var n;function i(t){function e(){if(e.enabled){var t=e,i=+new Date,a=i-(n||i);t.diff=a,t.prev=n,t.curr=i,n=i;for(var o=new Array(arguments.length),s=0;s0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var r=parseFloat(e[1]);switch((e[2]||\"ms\").toLowerCase()){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return 315576e5*r;case\"days\":case\"day\":case\"d\":return r*o;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return r*a;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return r*i;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return r*n;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return r;default:return}}(t);if(\"number\"===l&&!1===isNaN(t))return e.long?s(r=t,o,\"day\")||s(r,a,\"hour\")||s(r,i,\"minute\")||s(r,n,\"second\")||r+\" ms\":function(t){if(t>=o)return Math.round(t/o)+\"d\";if(t>=a)return Math.round(t/a)+\"h\";if(t>=i)return Math.round(t/i)+\"m\";if(t>=n)return Math.round(t/n)+\"s\";return t+\"ms\"}(t);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(t))}},{}],305:[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;s0;){e=c[c.length-1];var p=t[e];if(a[e]=0&&s[e].push(o[g])}a[e]=d}else{if(n[e]===r[e]){var m=[],v=[],y=0;for(d=l.length-1;d>=0;--d){var x=l[d];if(i[x]=!1,m.push(x),v.push(s[x]),y+=s[x].length,o[x]=f.length,x===e){l.length=d;break}}f.push(m);var b=new Array(y);for(d=0;d1&&(i=1),i<-1&&(i=-1),(t*n-e*r<0?-1:1)*Math.acos(i)};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,m=t.sweepFlag,v=void 0===m?0:m,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 T=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(f,2);T>1&&(u*=Math.sqrt(T),f*=Math.sqrt(T));var k=function(t,e,r,n,a,o,l,c,u,f,h,p){var d=Math.pow(a,2),g=Math.pow(o,2),m=Math.pow(h,2),v=Math.pow(p,2),y=d*g-d*v-g*m;y<0&&(y=0),y/=d*v+g*m;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,T=(h-x)/a,k=(p-b)/o,A=(-h-x)/a,M=(-p-b)/o,S=s(1,0,T,k),E=s(T,k,A,M);return 0===c&&E>0&&(E-=i),1===c&&E<0&&(E+=i),[_,w,S,E]}(e,r,l,c,u,f,g,v,x,b,_,w),A=n(k,4),M=A[0],S=A[1],E=A[2],L=A[3],C=Math.abs(L)/(i/4);Math.abs(1-C)<1e-7&&(C=1);var P=Math.max(Math.ceil(C),1);L/=P;for(var I=0;Ie[2]&&(e[2]=c[u+0]),c[u+1]>e[3]&&(e[3]=c[u+1]);return e}},{\"abs-svg-path\":70,assert:75,\"is-svg-path\":238,\"normalize-svg-path\":309,\"parse-svg-path\":250}],309:[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;d4?(o=m[m.length-4],s=m[m.length-3]):(o=h,s=p),r.push(m)}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\":307}],310:[function(t,e,r){\"use strict\";var n,i=t(\"svg-path-bounds\"),a=t(\"parse-svg-path\"),o=t(\"draw-svg-path\"),s=t(\"is-svg-path\"),l=t(\"bitmap-sdf\"),c=document.createElement(\"canvas\"),u=c.getContext(\"2d\");e.exports=function(t,e){if(!s(t))throw Error(\"Argument should be valid svg path string\");e||(e={});var r,f;e.shape?(r=e.shape[0],f=e.shape[1]):(r=c.width=e.w||e.width||200,f=c.height=e.h||e.height||200);var h=Math.min(r,f),p=e.stroke||0,d=e.viewbox||e.viewBox||i(t),g=[r/(d[2]-d[0]),f/(d[3]-d[1])],m=Math.min(g[0]||0,g[1]||0)/2;u.fillStyle=\"black\",u.fillRect(0,0,r,f),u.fillStyle=\"white\",p&&(\"number\"!=typeof p&&(p=1),u.strokeStyle=p>0?\"white\":\"black\",u.lineWidth=Math.abs(p));if(u.translate(.5*r,.5*f),u.scale(m,m),function(){if(null!=n)return n;var t=document.createElement(\"canvas\").getContext(\"2d\");if(t.canvas.width=t.canvas.height=1,!window.Path2D)return n=!1;var e=new Path2D(\"M0,0h1v1h-1v-1Z\");t.fillStyle=\"black\",t.fill(e);var r=t.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var v=new Path2D(t);u.fill(v),p&&u.stroke(v)}else{var y=a(t);o(u,y),u.fill(),p&&u.stroke()}return u.setTransform(1,0,0,1,0,0),l(u,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*h})}},{\"bitmap-sdf\":82,\"draw-svg-path\":126,\"is-svg-path\":238,\"parse-svg-path\":250,\"svg-path-bounds\":308}],311:[function(t,e,r){(function(e,n){(function(){var i=t(\"process/browser.js\").nextTick,a=Function.prototype.apply,o=Array.prototype.slice,s={},l=0;function c(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new c(a.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(a.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate=\"function\"==typeof e?e:function(t){var e=l++,n=!(arguments.length<2)&&o.call(arguments,1);return s[e]=!0,i((function(){s[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate=\"function\"==typeof n?n:function(t){delete s[t]}}).call(this)}).call(this,t(\"timers\").setImmediate,t(\"timers\").clearImmediate)},{\"process/browser.js\":277,timers:311}],312:[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:I(e[1]),g:I(e[2]),b:I(e[3]),a:R(e[4]),format:i?\"name\":\"hex8\"};if(e=j.hex6.exec(t))return{r:I(e[1]),g:I(e[2]),b:I(e[3]),format:i?\"name\":\"hex\"};if(e=j.hex4.exec(t))return{r:I(e[1]+\"\"+e[1]),g:I(e[2]+\"\"+e[2]),b:I(e[3]+\"\"+e[3]),a:R(e[4]+\"\"+e[4]),format:i?\"name\":\"hex8\"};if(e=j.hex3.exec(t))return{r:I(e[1]+\"\"+e[1]),g:I(e[2]+\"\"+e[2]),b:I(e[3]+\"\"+e[3]),format:i?\"name\":\"hex\"};return!1}(e));\"object\"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(p=e.r,d=e.g,g=e.b,i={r:255*C(p,255),g:255*C(d,255),b:255*C(g,255)},f=!0,h=\"%\"===String(e.r).substr(-1)?\"prgb\":\"rgb\"):U(e.h)&&U(e.s)&&U(e.v)?(l=z(e.s),c=z(e.v),i=function(e,r,n){e=6*C(e,360),r=C(r,100),n=C(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\"):U(e.h)&&U(e.s)&&U(e.l)&&(l=z(e.s),u=z(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=C(t,360),e=C(e,100),r=C(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=L(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=C(t,255),e=C(e,255),r=C(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>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(c(n));return a}function M(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=L(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=[O(a(t).toString(16)),O(a(e).toString(16)),O(a(r).toString(16)),O(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*C(this._r,255))+\"%\",g:a(100*C(this._g,255))+\"%\",b:a(100*C(this._b,255))+\"%\",a:this._a}},toPercentageRgbString:function(){return 1==this._a?\"rgb(\"+a(100*C(this._r,255))+\"%, \"+a(100*C(this._g,255))+\"%, \"+a(100*C(this._b,255))+\"%)\":\"rgba(\"+a(100*C(this._r,255))+\"%, \"+a(100*C(this._g,255))+\"%, \"+a(100*C(this._b,255))+\"%, \"+this._roundA+\")\"},toName:function(){return 0===this._a?\"transparent\":!(this._a<1)&&(E[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(v,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(m,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(M,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(T,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]:z(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;ul&&(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\"},E=c.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(S);function L(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function C(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 P(t){return o(1,s(0,t))}function I(t){return parseInt(t,16)}function O(t){return 1==t.length?\"0\"+t:\"\"+t}function z(t){return t<=1&&(t=100*t+\"%\"),t}function D(e){return t.round(255*parseFloat(e)).toString(16)}function R(t){return I(t)/255}var F,B,N,j=(B=\"[\\\\s|\\\\(]+(\"+(F=\"(?:[-\\\\+]?\\\\d*\\\\.\\\\d+%?)|(?:[-\\\\+]?\\\\d+%?)\")+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")\\\\s*\\\\)?\",N=\"[\\\\s|\\\\(]+(\"+F+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")\\\\s*\\\\)?\",{CSS_UNIT:new RegExp(F),rgb:new RegExp(\"rgb\"+B),rgba:new RegExp(\"rgba\"+N),hsl:new RegExp(\"hsl\"+B),hsla:new RegExp(\"hsla\"+N),hsv:new RegExp(\"hsv\"+B),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 U(t){return!!j.CSS_UNIT.exec(t)}void 0!==e&&e.exports?e.exports=c:window.tinycolor=c}(Math)},{}],313:[function(t,e,r){\"use strict\";e.exports=i,e.exports.float32=e.exports.float=i,e.exports.fract32=e.exports.fract=function(t,e){if(t.length){if(t instanceof Float32Array)return new Float32Array(t.length);e instanceof Float32Array||(e=i(t));for(var r=0,n=e.length;ro&&(o=t[0]),t[1]s&&(s=t[1])}function c(t){switch(t.type){case\"GeometryCollection\":t.geometries.forEach(c);break;case\"Point\":l(t.coordinates);break;case\"MultiPoint\":t.coordinates.forEach(l)}}for(e in t.arcs.forEach((function(t){for(var e,r=-1,l=t.length;++ro&&(o=e[0]),e[1]s&&(s=e[1])})),t.objects)c(t.objects[e]);return[i,a,o,s]}function i(t,e){var r=e.id,n=e.bbox,i=null==e.properties?{}:e.properties,o=a(t,e);return null==r&&null==n?{type:\"Feature\",properties:i,geometry:o}:null==n?{type:\"Feature\",id:r,properties:i,geometry:o}:{type:\"Feature\",id:r,bbox:n,properties:i,geometry:o}}function a(t,e){var n=r(t.transform),i=t.arcs;function a(t,e){e.length&&e.pop();for(var r=i[t<0?~t:t],a=0,o=r.length;a1)n=l(t,e,r);else for(i=0,n=new Array(a=t.arcs.length);i1)for(var a,s,c=1,u=l(i[0]);cu&&(s=i[0],i[0]=i[c],i[c]=s,u=a);return i})).filter((function(t){return t.length>0}))}}function u(t,e){for(var r=0,n=t.length;r>>1;t[i]=2))throw new Error(\"n must be \\u22652\");var r,i=(l=t.bbox||n(t))[0],a=l[1],o=l[2],s=l[3];e={scale:[o-i?(o-i)/(r-1):1,s-a?(s-a)/(r-1):1],translate:[i,a]}}var l,c,u=f(e),h=t.objects,p={};function d(t){return u(t)}function g(t){var e;switch(t.type){case\"GeometryCollection\":e={type:\"GeometryCollection\",geometries:t.geometries.map(g)};break;case\"Point\":e={type:\"Point\",coordinates:d(t.coordinates)};break;case\"MultiPoint\":e={type:\"MultiPoint\",coordinates:t.coordinates.map(d)};break;default:return t}return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),null!=t.properties&&(e.properties=t.properties),e}for(c in h)p[c]=g(h[c]);return{type:\"Topology\",bbox:l,transform:e,objects:p,arcs:t.arcs.map((function(t){var e,r=0,n=1,i=t.length,a=new Array(i);for(a[0]=u(t[0],0);++r\":(e.length>100&&(e=e.slice(0,99)+\"\\u2026\"),e=e.replace(i,(function(t){switch(t){case\"\\n\":return\"\\\\n\";case\"\\r\":return\"\\\\r\";case\"\\u2028\":return\"\\\\u2028\";case\"\\u2029\":return\"\\\\u2029\";default:throw new Error(\"Unexpected character\")}})))}},{\"./safe-to-string\":318}],320:[function(t,e,r){\"use strict\";var n=t(\"../value/is\"),i={object:!0,function:!0,undefined:!0};e.exports=function(t){return!!n(t)&&hasOwnProperty.call(i,typeof t)}},{\"../value/is\":326}],321:[function(t,e,r){\"use strict\";var n=t(\"../lib/resolve-exception\"),i=t(\"./is\");e.exports=function(t){return i(t)?t:n(t,\"%v is not a plain function\",arguments[1])}},{\"../lib/resolve-exception\":317,\"./is\":322}],322:[function(t,e,r){\"use strict\";var n=t(\"../function/is\"),i=/^\\s*class[\\s{/}]/,a=Function.prototype.toString;e.exports=function(t){return!!n(t)&&!i.test(a.call(t))}},{\"../function/is\":316}],323:[function(t,e,r){\"use strict\";var n=t(\"../object/is\");e.exports=function(t){if(!n(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(t){return!1}}},{\"../object/is\":320}],324:[function(t,e,r){\"use strict\";var n=t(\"../value/is\"),i=t(\"../object/is\"),a=Object.prototype.toString;e.exports=function(t){if(!n(t))return null;if(i(t)){var e=t.toString;if(\"function\"!=typeof e)return null;if(e===a)return null}try{return\"\"+t}catch(t){return null}}},{\"../object/is\":320,\"../value/is\":326}],325:[function(t,e,r){\"use strict\";var n=t(\"../lib/resolve-exception\"),i=t(\"./is\");e.exports=function(t){return i(t)?t:n(t,\"Cannot use %v\",arguments[1])}},{\"../lib/resolve-exception\":317,\"./is\":326}],326:[function(t,e,r){\"use strict\";e.exports=function(t){return null!=t}},{}],327:[function(t,e,r){(function(e){(function(){\"use strict\";var n=t(\"bit-twiddle\"),i=t(\"dup\"),a=t(\"buffer\").Buffer;e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var o=\"undefined\"!=typeof Uint8ClampedArray,s=\"undefined\"!=typeof BigUint64Array,l=\"undefined\"!=typeof BigInt64Array,c=e.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=i([32,0])),c.BIGUINT64||(c.BIGUINT64=i([32,0])),c.BIGINT64||(c.BIGINT64=i([32,0])),c.BUFFER||(c.BUFFER=i([32,0]));var u=c.DATA,f=c.BUFFER;function h(t){if(t){var e=t.length||t.byteLength,r=n.log2(e);u[r].push(t)}}function p(t){t=n.nextPow2(t);var e=n.log2(t),r=u[e];return r.length>0?r.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function g(t){return new Uint16Array(p(2*t),0,t)}function m(t){return new Uint32Array(p(4*t),0,t)}function v(t){return new Int8Array(p(t),0,t)}function y(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function T(t){return s?new BigUint64Array(p(8*t),0,t):null}function k(t){return l?new BigInt64Array(p(8*t),0,t):null}function A(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=f[e];return r.length>0?r.pop():new a(t)}r.free=function(t){if(a.isBuffer(t))f[n.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|n.log2(e);u[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeBigUint64=r.freeInt8=r.freeInt16=r.freeInt32=r.freeBigInt64=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){h(t.buffer)},r.freeArrayBuffer=h,r.freeBuffer=function(t){f[n.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||\"arraybuffer\"===e)return p(t);switch(e){case\"uint8\":return d(t);case\"uint16\":return g(t);case\"uint32\":return m(t);case\"int8\":return v(t);case\"int16\":return y(t);case\"int32\":return x(t);case\"float\":case\"float32\":return b(t);case\"double\":case\"float64\":return _(t);case\"uint8_clamped\":return w(t);case\"bigint64\":return k(t);case\"biguint64\":return T(t);case\"buffer\":return M(t);case\"data\":case\"dataview\":return A(t);default:return null}return null},r.mallocArrayBuffer=p,r.mallocUint8=d,r.mallocUint16=g,r.mallocUint32=m,r.mallocInt8=v,r.mallocInt16=y,r.mallocInt32=x,r.mallocFloat32=r.mallocFloat=b,r.mallocFloat64=r.mallocDouble=_,r.mallocUint8Clamped=w,r.mallocBigUint64=T,r.mallocBigInt64=k,r.mallocDataView=A,r.mallocBuffer=M,r.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,u[t].length=0,f[t].length=0}}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"bit-twiddle\":81,buffer:85,dup:128}],328:[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):\"\"}},{}],329:[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;n2111)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>13},isIntercalaryMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);return!!r&&r===e},leap year: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.leap year(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;if(!(\"number\"==typeof t&&t>=1888&&t<=2111))throw new Error(\"Lunar year outside range 1888-2111\");if(!(\"number\"==typeof e&&e>=1&&e<=12))throw new Error(\"Lunar month outside range 1 - 12\");if(!(\"number\"==typeof r&&r>=1&&r<=30))throw new Error(\"Lunar day outside range 1 - 30\");\"object\"==typeof n?(l=!1,a=n):(l=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:l}}s=o.day-1;var c,u=f[o.year-f[0]],p=u>>13;c=p&&(o.month>p||o.isIntercalary)?o.month:o.month-1;for(var d=0;d>9&4095,(g>>5&15)-1,(31&g)+s);return a.year=m.getFullYear(),a.month=1+m.getMonth(),a.day=m.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{if(!(\"number\"==typeof t&&t>=1888&&t<=2111))throw new Error(\"Solar year outside range 1888-2111\");if(!(\"number\"==typeof e&&e>=1&&e<=12))throw new Error(\"Solar month outside range 1 - 12\");if(!(\"number\"==typeof r&&r>=1&&r<=31))throw new Error(\"Solar day outside range 1 - 31\");i={year:t,month:e,day:r},a=n||{}}var o=h[i.year-h[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=h[a.year-h[0]];var l,c=new Date(o>>9&4095,(o>>5&15)-1,31&o),u=new Date(i.year,i.month-1,i.day);l=Math.round((u-c)/864e5);var p,d=f[a.year-f[0]];for(p=0;p<13;p++){var g=d&1<<12-p?30:29;if(l>13;!m||p=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\":346,\"object-assign\":247}],335:[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}},leap year: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.leap year(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\":346,\"object-assign\":247}],336:[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}},leap year: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.leap year(t)||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.leap year(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=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=tthis.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\":346,\"object-assign\":247}],337:[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}},leap year: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.leap year(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.leap year(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\":346,\"object-assign\":247}],338:[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}},leap year: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.leap year(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\":346,\"object-assign\":247}],339:[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\"]}},leap year: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;r19||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\":346,\"object-assign\":247}],340:[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:[\"Some\",\"Mangal\",\"Budh\",\"Veer\",\"Shukar\",\"Sanichar\",\"Et\"],dayNamesMin:[\"So\",\"Ma\",\"Bu\",\"Ve\",\"Sh\",\"Sa\",\"Et\"],digits:null,dateFormat:\"dd-mm-yyyy\",firstDay:0,isRTL:!1}},leap year:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[\"\"].invalidYear);return o.leap year(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.leap year(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=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\":346,\"object-assign\":247}],341:[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\",\"Some\",\"Mangl\",\"Budha\",\"Bihi\",\"Shukra\",\"Shani\"],dayNamesMin:[\"Aai\",\"So\",\"Man\",\"Bu\",\"Bi\",\"Shu\",\"Sha\"],digits:null,dateFormat:\"dd/mm/yyyy\",firstDay:1,isRTL:!1}},leap year: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(),void 0===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),void 0===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;r0?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.leap year(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\":346,\"object-assign\":247}],343:[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}},leap year:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(e.year());return a.leap year(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.leap year(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\":346,\"object-assign\":247}],344:[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}},leap year:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(e.year());return a.leap year(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.leap year(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\":346,\"object-assign\":247}],345:[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}},leap year: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;ar)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;ne);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\":346,\"object-assign\":247}],346:[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},leap year:function(){return this._calendar.leap year(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.leap year(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(;oe-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.minDay&&r-this.minDay13.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\":247}],347:[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+n1}),d=function(t,e,r,n){var i=\"\"+e;if(p(t,n))for(;i.length1},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-1){p=1,d=g;for(var E=this.daysInMonth(h,p);d>E;E=this.daysInMonth(h,p))p++,d-=E}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\":346,\"object-assign\":247}],348:[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}]},{}],349:[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;t(\"../../constants/axis_placeable_objects\");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\"}}})},{\"../../constants/axis_placeable_objects\":472,\"../../plot_api/plot_template\":543,\"../../plots/cartesian/constants\":561,\"../../plots/font_attributes\":585,\"./arrow_paths\":348}],350:[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),a=i.getRefType(e.xref),o=i.getRefType(e.yref);e._extremes={},\"range\"===a&&s(e,r),\"range\"===o&&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,m=3*t.startarrowsize*t.arrowwidth||0,v=m+h,y=m-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,v),ppadminus:Math.max(f,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else v=s?v+s:v,y=s?y-s:y,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(u,d,v),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\":503,\"../../plots/cartesian/axes\":554,\"./draw\":355}],351:[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;r0||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;r2/3?\"right\":\"center\"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var W=!1,X=[\"x\",\"y\"],Z=0;Z1)&&(nt===rt?((pt=it.r2fraction(e[\"a\"+et]))<0||pt>1)&&(W=!0):W=!0),J=it._offset+it.r2p(e[et]),$=.5}else{var dt=\"domain\"===ht;\"x\"===et?(Q=e[et],J=dt?it._offset+it._length*Q:J=T.l+T.w*Q):(Q=1-e[et],J=dt?it._offset+it._length*Q:J=T.t+T.h*Q),$=e.showarrow?.5:Q}if(e.showarrow){ft.head=J;var gt=e[\"a\"+et];if(tt=ot*q(.5,e.xanchor)-st*q(.5,e.yanchor),nt===rt){var mt=l.getRefType(nt);\"domain\"===mt?(\"y\"===et&&(gt=1-gt),ft.tail=it._offset+it._length*gt):\"paper\"===mt?\"y\"===et?(gt=1-gt,ft.tail=T.t+T.h*gt):ft.tail=T.l+T.w*gt:ft.tail=it._offset+it.r2p(gt),K=tt}else ft.tail=J+gt,K=tt+gt;ft.text=ft.tail+tt;var vt=w[\"x\"===et?\"width\":\"height\"];if(\"paper\"===rt&&(ft.head=o.constrain(ft.head,1,vt-1)),\"pixel\"===nt){var yt=-Math.max(ft.tail-3,ft.text),xt=Math.min(ft.tail+3,ft.text)-vt;yt>0?(ft.tail+=yt,ft.text+=yt):xt>0&&(ft.tail-=xt,ft.text-=xt)}ft.tail+=ut,ft.head+=ut}else K=tt=lt*q($,ct),ft.text=J+tt;ft.text+=ut,tt+=ut,K+=ut,e[\"_\"+et+\"padplus\"]=lt/2+K,e[\"_\"+et+\"padminus\"]=lt/2-K,e[\"_\"+et+\"size\"]=lt,e[\"_\"+et+\"shift\"]=tt}if(W)R.remove();else{var bt=0,_t=0;if(\"left\"!==e.align&&(bt=(A-b)*(\"center\"===e.align?.5:1)),\"top\"!==e.valign&&(_t=(D-_)*(\"middle\"===e.valign?.5:1)),f)n.select(\"svg\").attr({x:N+bt-1,y:N+_t}).call(u.setClipUrl,U?L:null,t);else{var wt=N+_t-g.top,Tt=N+bt-g.left;G.call(h.positionText,Tt,wt).call(u.setClipUrl,U?L:null,t)}V.select(\"rect\").call(u.setRect,N,N,A,D),j.call(u.setRect,F/2,F/2,B-F,H-F),R.call(u.setTranslate,Math.round(C.x.text-B/2),Math.round(C.y.text-H/2)),O.attr({transform:\"rotate(\"+P+\",\"+C.x.text+\",\"+C.y.text+\")\"});var kt,At=function(r,n){I.selectAll(\".annotation-arrow-g\").remove();var l=C.x.head,f=C.y.head,h=C.x.tail+r,p=C.y.tail+n,g=C.x.text+r,b=C.y.text+n,_=o.rotationXYMatrix(P,g,b),w=o.apply2DTransform(_),A=o.apply2DTransform2(_),L=+j.attr(\"width\"),z=+j.attr(\"height\"),D=g-.5*L,F=D+L,B=b-.5*z,N=B+z,U=[[D,B,D,N],[D,N,F,N],[F,N,F,B],[F,B,D,B]].map(A);if(!U.reduce((function(t,e){return t^!!o.segmentsIntersect(l,f,l+1e6,f+1e6,e[0],e[1],e[2],e[3])}),!1)){U.forEach((function(t){var e=o.segmentsIntersect(h,p,l,f,t[0],t[1],t[2],t[3]);e&&(h=e.x,p=e.y)}));var V=e.arrowwidth,H=e.arrowcolor,q=e.arrowside,G=I.append(\"g\").style({opacity:c.opacity(H)}).classed(\"annotation-arrow-g\",!0),Y=G.append(\"path\").attr(\"d\",\"M\"+h+\",\"+p+\"L\"+l+\",\"+f).style(\"stroke-width\",V+\"px\").call(c.stroke,c.rgb(H));if(m(Y,q,e),k.annotationPosition&&Y.node().parentNode&&!a){var W=l,X=f;if(e.standoff){var Z=Math.sqrt(Math.pow(l-h,2)+Math.pow(f-p,2));W+=e.standoff*(h-l)/Z,X+=e.standoff*(p-f)/Z}var J,K,Q=G.append(\"path\").classed(\"annotation-arrow\",!0).classed(\"anndrag\",!0).classed(\"cursor-move\",!0).attr({d:\"M3,3H-3V-3H3ZM0,0L\"+(h-W)+\",\"+(p-X),transform:s(W,X)}).style(\"stroke-width\",V+6+\"px\").call(c.stroke,\"rgba(0,0,0,0)\").call(c.fill,\"rgba(0,0,0,0)\");d.init({element:Q.node(),gd:t,prepFn:function(){var t=u.getTranslate(R);J=t.x,K=t.y,v&&v.autorange&&M(v._name+\".autorange\",!0),x&&x.autorange&&M(x._name+\".autorange\",!0)},moveFn:function(t,r){var n=w(J,K),i=n[0]+t,a=n[1]+r;R.call(u.setTranslate,i,a),S(\"x\",y(v,t,\"x\",T,e)),S(\"y\",y(x,r,\"y\",T,e)),e.axref===e.xref&&S(\"ax\",y(v,t,\"ax\",T,e)),e.ayref===e.yref&&S(\"ay\",y(x,r,\"ay\",T,e)),G.attr(\"transform\",s(t,r)),O.attr({transform:\"rotate(\"+P+\",\"+i+\",\"+a+\")\"})},doneFn:function(){i.call(\"_guiRelayout\",t,E());var e=document.querySelector(\".js-notes-box-panel\");e&&e.redraw(e.selectedObj)}})}}};if(e.showarrow&&At(0,0),z)d.init({element:R.node(),gd:t,prepFn:function(){kt=O.attr(\"transform\")},moveFn:function(t,r){var n=\"pointer\";if(e.showarrow)e.axref===e.xref?S(\"ax\",y(v,t,\"ax\",T,e)):S(\"ax\",e.ax+t),e.ayref===e.yref?S(\"ay\",y(x,r,\"ay\",T.w,e)):S(\"ay\",e.ay+r),At(t,r);else{if(a)return;var i,o;if(v)i=y(v,t,\"x\",T,e);else{var l=e._xsize/T.w,c=e.x+(e._xshift-e.xshift)/T.w-l/2;i=d.align(c+t/T.w,l,0,1,e.xanchor)}if(x)o=y(x,r,\"y\",T,e);else{var u=e._ysize/T.h,f=e.y-(e._yshift+e.yshift)/T.h-u/2;o=d.align(f-r/T.h,u,0,1,e.yanchor)}S(\"x\",i),S(\"y\",o),v&&x||(n=d.getCursor(v?.5:i,x?.5:o,e.xanchor,e.yanchor))}O.attr({transform:s(t,r)+kt}),p(R,n)},clickFn:function(r,n){e.captureevents&&t.emit(\"plotly_clickannotation\",Y(n))},doneFn:function(){p(R),i.call(\"_guiRelayout\",t,E());var e=document.querySelector(\".js-notes-box-panel\");e&&e.redraw(e.selectedObj)}})}}}e.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(\".annotation\").remove();for(var r=0;r=0,x=e.indexOf(\"end\")>=0,b=d.backoff*m+r.standoff,_=g.backoff*v+r.startstandoff;if(\"line\"===p.nodeName){o={x:+t.attr(\"x1\"),y:+t.attr(\"y1\")},u={x:+t.attr(\"x2\"),y:+t.attr(\"y2\")};var w=o.x-u.x,T=o.y-u.y;if(h=(f=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T))return void z();if(b){if(b*b>w*w+T*T)return void z();var k=b*Math.cos(f),A=b*Math.sin(f);u.x+=k,u.y+=A,t.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+T*T)return void z();var M=_*Math.cos(f),S=_*Math.sin(f);o.x-=M,o.y-=S,t.attr({x1:o.x,y1:o.y})}}else if(\"path\"===p.nodeName){var E=p.getTotalLength(),L=\"\";if(E1){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\":607,\"../annotations/draw\":355}],362:[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=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+\")\"}o.tinyRGB=function(t){var e=t.toRgb();return\"rgb(\"+Math.round(e.r)+\", \"+Math.round(e.g)+\", \"+Math.round(e.b)+\")\"},o.rgb=function(t){return o.tinyRGB(n(t))},o.opacity=function(t){return t?n(t).getAlpha():0},o.addOpacity=function(t,e){var r=n(t).toRgb();return\"rgba(\"+Math.round(r.r)+\", \"+Math.round(r.g)+\", \"+Math.round(r.b)+\", \"+e+\")\"},o.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||c).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()},o.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(o.combine(t,c))),(i.isDark()?e?i.lighten(e):c:r?i.darken(r):l).toString()},o.stroke=function(t,e){var r=n(e);t.style({stroke:o.tinyRGB(r),\"stroke-opacity\":r.getAlpha()})},o.fill=function(t,e){var r=n(e);t.style({fill:o.tinyRGB(r),\"fill-opacity\":r.getAlpha()})},o.clean=function(t){if(t&&\"object\"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e0?n>=l:n<=l));i++)n>u&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var ct=Math.pow(10,Math.floor(Math.log(lt)/Math.LN10));ot*=ct*c.roundUp(lt/ct,[2,5,10]),(Math.abs(q.start)/q.size+1e-6)%1<2e-6&&(it.tick0=0)}it.dtick=ot}it.domain=o?[rt+I/R.h,rt+K-I/R.h]:[rt+P/R.w,rt+K-P/R.w],it.setScale(),t.attr(\"transform\",u(Math.round(R.l),Math.round(R.t)));var ut,ft=t.select(\".\"+A.cbtitleunshift).attr(\"transform\",u(-Math.round(R.l),-Math.round(R.t))),ht=it.ticklabelposition,pt=it.title.font.size,dt=t.select(\".\"+A.cbaxis),gt=0,mt=0;function vt(n,i){var a={propContainer:it,propName:e._propPrefix+\"title\",traceIndex:e._traceIndex,_meta:e._meta,placeholder:D._dfltTitle.colorbar,containerGroup:t.select(\".\"+A.cbtitle)},o=\"h\"===n.charAt(0)?n.substr(1):\"h\"+n;t.selectAll(\".\"+o+\",.\"+o+\"-math-group\").remove(),g.draw(r,n,f(a,i||{}))}return c.syncOrAsync([a.previousPromises,function(){var t,e;(o&&at||!o&&!at)&&(\"top\"===j&&(t=P+R.l+R.w*O,e=I+R.t+R.h*(1-rt-K)+3+.75*pt),\"bottom\"===j&&(t=P+R.l+R.w*O,e=I+R.t+R.h*(1-rt)-3-.25*pt),\"right\"===j&&(e=I+R.t+R.h*z+3+.75*pt,t=P+R.l+R.w*rt),vt(it._id+\"title\",{attributes:{x:t,y:e,\"text-anchor\":o?\"start\":\"middle\"}}))},function(){if(!o&&!at||o&&at){var a,l=t.select(\".\"+A.cbtitle),f=l.select(\"text\"),h=[-M/2,M/2],d=l.select(\".h\"+it._id+\"title-math-group\").node(),g=15.6;if(f.node()&&(g=parseInt(f.node().style.fontSize,10)*w),d?(a=p.bBox(d),mt=a.width,(gt=a.height)>g&&(h[1]-=(gt-g)/2)):f.node()&&!f.classed(A.jsPlaceholder)&&(a=p.bBox(f.node()),mt=a.width,gt=a.height),o){if(gt){if(gt+=5,\"top\"===j)it.domain[1]-=gt/R.h,h[1]*=-1;else{it.domain[0]+=gt/R.h;var v=m.lineCount(f);h[1]+=(1-v)*g}l.attr(\"transform\",u(h[0],h[1])),it.setScale()}}else mt&&(\"right\"===j&&(it.domain[0]+=(mt+pt/2)/R.w),l.attr(\"transform\",u(h[0],h[1])),it.setScale())}t.selectAll(\".\"+A.cbfills+\",.\"+A.cblines).attr(\"transform\",o?u(0,Math.round(R.h*(1-it.domain[1]))):u(Math.round(R.w*it.domain[0]),0)),dt.attr(\"transform\",o?u(0,Math.round(-R.t)):u(Math.round(-R.l),0));var y=t.select(\".\"+A.cbfills).selectAll(\"rect.\"+A.cbfill).attr(\"style\",\"\").data(Y);y.enter().append(\"rect\").classed(A.cbfill,!0).style(\"stroke\",\"none\"),y.exit().remove();var x=U.map(it.c2p).map(Math.round).sort((function(t,e){return t-e}));y.each((function(t,a){var s=[0===a?U[0]:(Y[a]+Y[a-1])/2,a===Y.length-1?U[1]:(Y[a]+Y[a+1])/2].map(it.c2p).map(Math.round);o&&(s[1]=c.constrain(s[1]+(s[1]>s[0])?1:-1,x[0],x[1]));var l=n.select(this).attr(o?\"x\":\"y\",Q).attr(o?\"y\":\"x\",n.min(s)).attr(o?\"width\":\"height\",Math.max(X,2)).attr(o?\"height\":\"width\",Math.max(n.max(s)-n.min(s),2));if(e._fillgradient)p.gradient(l,r,e._id,o?\"vertical\":\"horizontalreversed\",e._fillgradient,\"fill\");else{var u=H(t).replace(\"e-\",\"\");l.attr(\"fill\",i(u).toHexString())}}));var b=t.select(\".\"+A.cblines).selectAll(\"path.\"+A.cbline).data(B.color&&B.width?W:[]);b.enter().append(\"path\").classed(A.cbline,!0),b.exit().remove(),b.each((function(t){var e=Q,r=Math.round(it.c2p(t))+B.width/2%1;n.select(this).attr(\"d\",\"M\"+(o?e+\",\"+r:r+\",\"+e)+(o?\"h\":\"v\")+X).call(p.lineGroupStyle,B.width,V(t),B.dash)})),dt.selectAll(\"g.\"+it._id+\"tick,path\").remove();var _=Q+X+(M||0)/2-(\"outside\"===e.ticks?1:0),T=s.calcTicks(it),k=s.getTickSigns(it)[2];return s.drawTicks(r,it,{vals:\"inside\"===it.ticks?s.clipEnds(it,T):T,layer:dt,path:s.makeTickPath(it,_,k),transFn:s.makeTransTickFn(it)}),s.drawLabels(r,it,{vals:T,layer:dt,transFn:s.makeTransTickLabelFn(it),labelFns:s.makeLabelFns(it,_)})},function(){if(o&&!at||!o&&at){var t,i,a=it.position||0,s=it._offset+it._length/2;if(\"right\"===j)i=s,t=R.l+R.w*a+10+pt*(it.showticklabels?1:.5);else if(t=s,\"bottom\"===j&&(i=R.t+R.h*a+10+(-1===ht.indexOf(\"inside\")?it.tickfont.size:0)+(\"intside\"!==it.ticks&&e.ticklen||0)),\"top\"===j){var l=N.text.split(\"
\").length;i=R.t+R.h*a+10-X-w*pt*l}vt((o?\"h\":\"v\")+it._id+\"title\",{avoid:{selection:n.select(r).selectAll(\"g.\"+it._id+\"tick\"),side:j,offsetTop:o?0:R.t,offsetLeft:o?R.l:0,maxShift:o?D.width:D.height},attributes:{x:t,y:i,\"text-anchor\":\"middle\"},transform:{rotate:o?-90:0,offset:0}})}},a.previousPromises,function(){var n,s=X+M/2;-1===ht.indexOf(\"inside\")&&(n=p.bBox(dt.node()),s+=o?n.width:n.height),ut=ft.select(\"text\");var c=0,f=o&&\"top\"===j,g=!o&&\"right\"===j,m=0;if(ut.node()&&!ut.classed(A.jsPlaceholder)){var y,x=ft.select(\".h\"+it._id+\"title-math-group\").node();x&&(o&&at||!o&&!at)?(c=(n=p.bBox(x)).width,y=n.height):(c=(n=p.bBox(ft.node())).right-R.l-(o?Q:nt),y=n.bottom-R.t-(o?nt:Q),o||\"top\"!==j||(s+=n.height,m=n.height)),g&&(ut.attr(\"transform\",u(c/2+pt/2,0)),c*=2),s=Math.max(s,o?c:y)}var b=2*(o?P:I)+s+S+M/2,w=0;!o&&N.text&&\"bottom\"===C&&z<=0&&(b+=w=b/2,m+=w),D._hColorbarMoveTitle=w,D._hColorbarMoveCBTitle=m;var F=S+M;t.select(\".\"+A.cbbg).attr(\"x\",(o?Q:nt)-F/2-(o?P:0)).attr(\"y\",(o?nt:Q)-(o?J:I+m-w)).attr(o?\"width\":\"height\",Math.max(b-w,2)).attr(o?\"height\":\"width\",Math.max(J+F,2)).call(d.fill,E).call(d.stroke,e.bordercolor).style(\"stroke-width\",S);var B=g?Math.max(c-10,0):0;if(t.selectAll(\".\"+A.cboutline).attr(\"x\",(o?Q:nt+P)+B).attr(\"y\",(o?nt+I-J:Q)+(f?gt:0)).attr(o?\"width\":\"height\",Math.max(X,2)).attr(o?\"height\":\"width\",Math.max(J-(o?2*I+gt:2*P+B),2)).call(d.stroke,e.outlinecolor).style({fill:\"none\",\"stroke-width\":M}),t.attr(\"transform\",u(R.l-(o?$*b:0),R.t-(o?0:(1-tt)*b-m))),!o&&(S||i(E).getAlpha()&&!i.equals(D.paper_bgcolor,E))){var U=dt.selectAll(\"text\"),V=U[0].length,H=t.select(\".\"+A.cbbg).node(),q=p.bBox(H),G=p.getTranslate(t);U.each((function(t,e){var r=V-1;if(0===e||e===r){var n,i=p.bBox(this),a=p.getTranslate(this);if(e===r){var o=i.right+a.x;(n=q.right+G.x+nt-S-2+O-o)>0&&(n=0)}else if(0===e){var s=i.left+a.x;(n=q.left+G.x+nt+S+2-s)<0&&(n=0)}n&&(V<3?this.setAttribute(\"transform\",\"translate(\"+n+\",0) \"+this.getAttribute(\"transform\")):this.setAttribute(\"visibility\",\"hidden\"))}}))}var Y={},W=T[L],Z=k[L],K=T[C],et=k[C],rt=b-X;o?(\"pixels\"===h?(Y.y=z,Y.t=J*K,Y.b=J*et):(Y.t=Y.b=0,Y.yt=z+l*K,Y.yb=z-l*et),\"pixels\"===_?(Y.x=O,Y.l=b*W,Y.r=b*Z):(Y.l=rt*W,Y.r=rt*Z,Y.xl=O-v*W,Y.xr=O+v*Z)):(\"pixels\"===h?(Y.x=O,Y.l=J*W,Y.r=J*Z):(Y.l=Y.r=0,Y.xl=O+l*W,Y.xr=O-l*Z),\"pixels\"===_?(Y.y=1-z,Y.t=b*K,Y.b=b*et):(Y.t=rt*K,Y.b=rt*et,Y.yt=z-v*K,Y.yb=z+v*et)),a.autoMargin(r,e._id,Y)}],r)}(r,e,t);v&&v.then&&(t._promises||[]).push(v),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,a,s=\"v\"===e.orientation,c=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr(\"transform\"),h(t)},moveFn:function(r,o){t.attr(\"transform\",n+u(r,o)),i=l.align((s?e._uFrac:e._vFrac)+r/c.w,s?e._thickFrac:e._lenFrac,0,1,e.xanchor),a=l.align((s?e._vFrac:1-e._uFrac)-o/c.h,s?e._lenFrac:e._thickFrac,0,1,e.yanchor);var f=l.getCursor(i,a,e.xanchor,e.yanchor);h(t,f)},doneFn:function(){if(h(t),void 0!==i&&void 0!==a){var n={};n[e._propPrefix+\"x\"]=i,n[e._propPrefix+\"y\"]=a,void 0!==e._traceIndex?o.call(\"_guiRestyle\",r,n,e._traceIndex):o.call(\"_guiRelayout\",r,n)}}})}(r,e,t)})),e.exit().each((function(e){a.autoMargin(t,e._id)})).remove(),e.order()}}},{\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/extend\":493,\"../../lib/setcursor\":524,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../plots/cartesian/axis_defaults\":556,\"../../plots/cartesian/layout_attributes\":569,\"../../plots/cartesian/position_defaults\":572,\"../../plots/plots\":619,\"../../registry\":638,\"../color\":366,\"../colorscale/helpers\":377,\"../dragelement\":385,\"../drawing\":388,\"../titles\":464,\"./constants\":368,\"@plotly/d3\":58,tinycolor2:312}],371:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t){return n.isPlainObject(t.colorbar)}},{\"../../lib\":503}],372:[function(t,e,r){\"use strict\";e.exports={moduleType:\"component\",name:\"colorbar\",attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),draw:t(\"./draw\").draw,hasColorbar:t(\"./has_colorbar\")}},{\"./attributes\":367,\"./defaults\":369,\"./draw\":370,\"./has_colorbar\":371}],373:[function(t,e,r){\"use strict\";var n=t(\"../colorbar/attributes\"),i=t(\"../../lib/regex\").counter,a=t(\"../../lib/sort_object_keys\"),o=t(\"./scales.js\").scales;a(o);function s(t){return\"`\"+t+\"`\"}e.exports=function(t,e){t=t||\"\";var r,a=(e=e||{}).cLetter||\"c\",l=(\"onlyIfNumerical\"in e?e.onlyIfNumerical:Boolean(t),\"noScale\"in e?e.noScale:\"marker.line\"===t),c=\"showScaleDflt\"in e?e.showScaleDflt:\"z\"===a,u=\"string\"==typeof e.colorscaleDflt?o[e.colorscaleDflt]:null,f=e.editTypeOverride||\"\",h=t?t+\".\":\"\";\"colorAttr\"in e?(r=e.colorAttr,e.colorAttr):s(h+(r={z:\"z\",c:\"color\"}[a]));var p=a+\"auto\",d=a+\"min\",g=a+\"max\",m=a+\"mid\",v=(s(h+p),s(h+d),s(h+g),{});v[d]=v[g]=void 0;var y={};y[p]=!1;var x={};return\"color\"===r&&(x.color={valType:\"color\",arrayOk:!0,editType:f||\"style\"},e.anim&&(x.color.anim=!0)),x[p]={valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:v},x[d]={valType:\"number\",dflt:null,editType:f||\"plot\",impliedEdits:y},x[g]={valType:\"number\",dflt:null,editType:f||\"plot\",impliedEdits:y},x[m]={valType:\"number\",dflt:null,editType:\"calc\",impliedEdits:v},x.colorscale={valType:\"colorscale\",editType:\"calc\",dflt:u,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:\"boolean\",dflt:!1!==e.autoColorDflt,editType:\"calc\",impliedEdits:{colorscale:void 0}},x.reversescale={valType:\"boolean\",dflt:!1,editType:\"plot\"},l||(x.showscale={valType:\"boolean\",dflt:c,editType:\"calc\"},x.colorbar=n),e.noColorAxis||(x.coloraxis={valType:\"subplotid\",regex:i(\"coloraxis\"),dflt:null,editType:\"calc\"}),x}},{\"../../lib/regex\":520,\"../../lib/sort_object_keys\":526,\"../colorbar/attributes\":367,\"./scales.js\":381}],374:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"./helpers\").extractOpts;e.exports=function(t,e,r){var o,s=t._fullLayout,l=r.vals,c=r.containerStr,u=c?i.nestedProperty(e,c).get():e,f=a(u),h=!1!==f.auto,p=f.min,d=f.max,g=f.mid,m=function(){return i.aggNums(Math.min,null,l)},v=function(){return i.aggNums(Math.max,null,l)};(void 0===p?p=m():h&&(p=u._colorAx&&n(p)?Math.min(p,m()):m()),void 0===d?d=v():h&&(d=u._colorAx&&n(d)?Math.max(d,v()):v()),h&&void 0!==g&&(d-g>g-p?p=g-(d-g):d-g=0?s.colorscale.sequential:s.colorscale.sequentialminus,f._sync(\"colorscale\",o))}},{\"../../lib\":503,\"./helpers\":377,\"fast-isnumeric\":190}],375:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./helpers\").hasColorscale,a=t(\"./helpers\").extractOpts;e.exports=function(t,e){function r(t,e){var r=t[\"_\"+e];void 0!==r&&(t[e]=r)}function o(t,i){var o=i.container?n.nestedProperty(t,i.container).get():t;if(o)if(o.coloraxis)o._colorAx=e[o.coloraxis];else{var s=a(o),l=s.auto;(l||void 0===s.min)&&r(o,i.min),(l||void 0===s.max)&&r(o,i.max),s.autocolorscale&&r(o,\"colorscale\")}}for(var s=0;s=0;n--,i++){var a=t[n];r[i]=[1-a[0],a[1]]}return r}function d(t,e){e=e||{};for(var r=t.domain,o=t.range,l=o.length,c=new Array(l),u=0;u4/3-s?o:s}},{}],383:[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\":503}],384:[function(t,e,r){\"use strict\";r.selectMode=function(t){return\"lasso\"===t||\"select\"===t},r.drawMode=function(t){return\"drawclosedpath\"===t||\"drawopenpath\"===t||\"drawline\"===t||\"drawrect\"===t||\"drawcircle\"===t},r.openMode=function(t){return\"drawline\"===t||\"drawopenpath\"===t},r.rectMode=function(t){return\"select\"===t||\"drawline\"===t||\"drawrect\"===t||\"drawcircle\"===t},r.freeMode=function(t){return\"lasso\"===t||\"drawclosedpath\"===t||\"drawopenpath\"===t},r.selectingOrDrawing=function(t){return r.freeMode(t)||r.rectMode(t)}},{}],385:[function(t,e,r){\"use strict\";var n=t(\"mouse-event-offset\"),i=t(\"has-hover\"),a=t(\"has-passive-events\"),o=t(\"../../lib\").removeElement,s=t(\"../../plots/cartesian/constants\"),l=e.exports={};l.align=t(\"./align\"),l.getCursor=t(\"./cursor\");var c=t(\"./unhover\");function u(){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 f(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(t){var e,r,n,c,h,p,d,g,m=t.gd,v=1,y=m._context.doubleClickDelay,x=t.element;m._mouseDownTime||(m._mouseDownTime=0),x.style.pointerEvents=\"all\",x.onmousedown=_,a?(x._ontouchstart&&x.removeEventListener(\"touchstart\",x._ontouchstart),x._ontouchstart=_,x.addEventListener(\"touchstart\",_,{passive:!1})):x.ontouchstart=_;var b=t.clampFn||function(t,e,r){return Math.abs(t)y&&(v=Math.max(v-1,1)),m._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(v,p),!g){var r;try{r=new MouseEvent(\"click\",e)}catch(t){var n=f(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)}d.dispatchEvent(r)}m._dragging=!1,m._dragged=!1}else m._dragged=!1}},l.coverSlip=u},{\"../../lib\":503,\"../../plots/cartesian/constants\":561,\"./align\":382,\"./cursor\":383,\"./unhover\":386,\"has-hover\":228,\"has-passive-events\":229,\"mouse-event-offset\":242}],386:[function(t,e,r){\"use strict\";var n=t(\"../../lib/events\"),i=t(\"../../lib/throttle\"),a=t(\"../../lib/dom\").getGraphDiv,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&&!t._dragged&&!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/dom\":491,\"../../lib/events\":492,\"../../lib/throttle\":530,\"../fx/constants\":400}],387:[function(t,e,r){\"use strict\";r.dash={valType:\"string\",values:[\"solid\",\"dot\",\"dash\",\"longdash\",\"dashdot\",\"longdashdot\"],dflt:\"solid\",editType:\"style\"},r.pattern={shape:{valType:\"enumerated\",values:[\"\",\"/\",\"\\\\\",\"x\",\"-\",\"|\",\"+\",\".\"],dflt:\"\",arrayOk:!0,editType:\"style\"},fillmode:{valType:\"enumerated\",values:[\"replace\",\"overlay\"],dflt:\"replace\",editType:\"style\"},bgcolor:{valType:\"color\",arrayOk:!0,editType:\"style\"},fgcolor:{valType:\"color\",arrayOk:!0,editType:\"style\"},fgopacity:{valType:\"number\",editType:\"style\",min:0,max:1},size:{valType:\"number\",min:0,dflt:8,arrayOk:!0,editType:\"style\"},solidity:{valType:\"number\",min:0,max:1,dflt:.3,arrayOk:!0,editType:\"style\"},editType:\"style\"}},{}],388:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.numberFormat,o=t(\"fast-isnumeric\"),s=t(\"tinycolor2\"),l=t(\"../../registry\"),c=t(\"../color\"),u=t(\"../colorscale\"),f=i.strTranslate,h=t(\"../../lib/svg_text_utils\"),p=t(\"../../constants/xmlns_namespaces\"),d=t(\"../../constants/alignment\").LINE_SPACING,g=t(\"../../constants/interactions\").DESELECTDIM,m=t(\"../../traces/scatter/subtypes\"),v=t(\"../../traces/scatter/make_bubble_size_func\"),y=t(\"../../components/fx/helpers\").appendArrayPointValue,x=e.exports={};x.font=function(t,e,r,n){i.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(c.fill,n)},x.setPosition=function(t,e,r){t.attr(\"x\",e).attr(\"y\",r)},x.setSize=function(t,e,r){t.attr(\"width\",e).attr(\"height\",r)},x.setRect=function(t,e,r,n,i){t.call(x.setPosition,e,r).call(x.setSize,n,i)},x.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),a=n.c2p(t.y);return!!(o(i)&&o(a)&&e.node())&&(\"text\"===e.node().nodeName?e.attr(\"x\",i).attr(\"y\",a):e.attr(\"transform\",f(i,a)),!0)},x.translatePoints=function(t,e,r){t.each((function(t){var i=n.select(this);x.translatePoint(t,i,e,r)}))},x.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr(\"display\",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:\"none\")},x.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,c=l.traceIs(a,\"bar-like\")?\".bartext\":\".point,.textpoint\";t.selectAll(c).each((function(t){x.hideOutsideRangePoint(t,n.select(this),r,i,o,s)}))}))}},x.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},x.singleLineStyle=function(t,e,r,n,i){e.style(\"fill\",\"none\");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||\"\";c.stroke(e,n||a.color),x.dashLine(e,s,o)},x.lineGroupStyle=function(t,e,r,i){t.style(\"fill\",\"none\").each((function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,s=i||a.dash||\"\";n.select(this).call(c.stroke,r||a.color).call(x.dashLine,s,o)}))},x.dashLine=function(t,e,r){r=+r||0,e=x.dashStyle(e,r),t.style({\"stroke-dasharray\":e,\"stroke-width\":r+\"px\"})},x.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},x.singleFillStyle=function(t){var e=(((n.select(t.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;e&&t.call(c.fill,e)},x.fillGroupStyle=function(t){t.style(\"stroke-width\",0).each((function(t){var e=n.select(this);t[0].trace&&e.call(c.fill,t[0].trace.fillcolor)}))};var b=t(\"./symbol_defs\");x.symbolNames=[],x.symbolFuncs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(b).forEach((function(t){var e=b[t],r=e.n;x.symbolList.push(r,String(r),t,r+100,String(r+100),t+\"-open\"),x.symbolNames[r]=t,x.symbolFuncs[r]=e.f,e.needLine&&(x.symbolNeedLines[r]=!0),e.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),t+\"-dot\",r+300,String(r+300),t+\"-open-dot\"),e.noFill&&(x.symbolNoFill[r]=!0)}));var _=x.symbolNames.length;function w(t,e){var r=t%100;return x.symbolFuncs[r](e)+(t>=200?\"M0,0.5L0.5,0L0,-0.5L-0.5,0Z\":\"\")}x.symbolNumber=function(t){if(o(t))t=+t;else 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=x.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=_||t>=400?0:Math.floor(Math.max(t,0))};var T={x1:1,x2:0,y1:0,y2:0},k={x1:0,x2:0,y1:1,y2:0},A=a(\"~f\"),M={radial:{node:\"radialGradient\"},radialreversed:{node:\"radialGradient\",reversed:!0},horizontal:{node:\"linearGradient\",attrs:T},horizontalreversed:{node:\"linearGradient\",attrs:T,reversed:!0},vertical:{node:\"linearGradient\",attrs:k},verticalreversed:{node:\"linearGradient\",attrs:k,reversed:!0}};x.gradient=function(t,e,r,a,o,l){for(var u=o.length,f=M[a],h=new Array(u),p=0;p\"+v(t);d._gradientUrlQueryParts[y]=1},x.pattern=function(t,e,r,a,o,s,l,u,f,h,p,d){var g=\"legend\"===e;u&&(\"overlay\"===f?(h=u,p=c.contrast(h)):(h=void 0,p=u));var m,v,y,x,b,_,w,T,k,A,M,S=r._fullLayout,E=\"p\"+S._uid+\"-\"+a,L={};switch(o){case\"/\":m=s*Math.sqrt(2),v=s*Math.sqrt(2),_=\"path\",L={d:y=\"M-\"+m/4+\",\"+v/4+\"l\"+m/2+\",-\"+v/2+\"M0,\"+v+\"L\"+m+\",0M\"+m/4*3+\",\"+v/4*5+\"l\"+m/2+\",-\"+v/2,opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"\\\\\":m=s*Math.sqrt(2),v=s*Math.sqrt(2),_=\"path\",L={d:y=\"M\"+m/4*3+\",-\"+v/4+\"l\"+m/2+\",\"+v/2+\"M0,0L\"+m+\",\"+v+\"M-\"+m/4+\",\"+v/4*3+\"l\"+m/2+\",\"+v/2,opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"x\":m=s*Math.sqrt(2),v=s*Math.sqrt(2),y=\"M-\"+m/4+\",\"+v/4+\"l\"+m/2+\",-\"+v/2+\"M0,\"+v+\"L\"+m+\",0M\"+m/4*3+\",\"+v/4*5+\"l\"+m/2+\",-\"+v/2+\"M\"+m/4*3+\",-\"+v/4+\"l\"+m/2+\",\"+v/2+\"M0,0L\"+m+\",\"+v+\"M-\"+m/4+\",\"+v/4*3+\"l\"+m/2+\",\"+v/2,x=s-s*Math.sqrt(1-l),_=\"path\",L={d:y,opacity:d,stroke:p,\"stroke-width\":x+\"px\"};break;case\"|\":_=\"path\",_=\"path\",L={d:y=\"M\"+(m=s)/2+\",0L\"+m/2+\",\"+(v=s),opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"-\":_=\"path\",_=\"path\",L={d:y=\"M0,\"+(v=s)/2+\"L\"+(m=s)+\",\"+v/2,opacity:d,stroke:p,\"stroke-width\":(x=l*s)+\"px\"};break;case\"+\":_=\"path\",y=\"M\"+(m=s)/2+\",0L\"+m/2+\",\"+(v=s)+\"M0,\"+v/2+\"L\"+m+\",\"+v/2,x=s-s*Math.sqrt(1-l),_=\"path\",L={d:y,opacity:d,stroke:p,\"stroke-width\":x+\"px\"};break;case\".\":m=s,v=s,l.pattern_filled\";S._patternUrlQueryParts[I]=1},x.initGradients=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,\"g\",\"gradients\").selectAll(\"linearGradient,radialGradient\").remove(),e._gradientUrlQueryParts={}},x.initPatterns=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,\"g\",\"patterns\").selectAll(\"pattern\").remove(),e._patternUrlQueryParts={}},x.getPatternAttr=function(t,e,r){return t&&i.isArrayOrTypedArray(t)?e=100,e.attr(\"d\",w(u,l))}var f,h,p,d=!1;if(t.so)p=s.outlierwidth,h=s.outliercolor,f=o.outliercolor;else{var g=(s||{}).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):i.isArrayOrTypedArray(s.color)?c.defaultLine:s.color,i.isArrayOrTypedArray(o.color)&&(f=c.defaultLine,d=!0),f=\"mc\"in t?t.mcc=n.markerScale(t.mc):o.color||\"rgba(0,0,0,0)\",n.selectedColorFn&&(f=n.selectedColorFn(t))}if(t.om)e.call(c.stroke,f).style({\"stroke-width\":(p||1)+\"px\",fill:\"none\"});else{e.style(\"stroke-width\",(t.isBlank?0:p)+\"px\");var m=o.gradient,v=t.mgt;v?d=!0:v=m&&m.type,i.isArrayOrTypedArray(v)&&(v=v[0],M[v]||(v=0));var y=o.pattern,b=y&&x.getPatternAttr(y.shape,t.i,\"\");if(v&&\"none\"!==v){var _=t.mgc;_?d=!0:_=m.color;var T=r.uid;d&&(T+=\"-\"+t.i),x.gradient(e,a,T,v,[[0,_],[1,f]],\"fill\")}else if(b){var k=x.getPatternAttr(y.bgcolor,t.i,null),A=x.getPatternAttr(y.fgcolor,t.i,null),S=y.fgopacity,E=x.getPatternAttr(y.size,t.i,8),L=x.getPatternAttr(y.solidity,t.i,.3),C=t.mcc||i.isArrayOrTypedArray(y.shape)||i.isArrayOrTypedArray(y.bgcolor)||i.isArrayOrTypedArray(y.size)||i.isArrayOrTypedArray(y.solidity),P=r.uid;C&&(P+=\"-\"+t.i),x.pattern(e,\"point\",a,P,b,E,L,t.mcc,y.fillmode,k,A,S)}else c.fill(e,f);p&&c.stroke(e,h)}},x.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=x.tryColorscale(r,\"\"),e.lineScale=x.tryColorscale(r,\"line\"),l.traceIs(t,\"symbols\")&&(e.ms2mrc=m.isBubble(t)?v(t):function(){return(r.size||6)/2}),t.selectedpoints&&i.extendFlat(e,x.makeSelectedPointStyleFns(t)),e},x.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.marker||{},o=r.marker||{},s=n.marker||{},c=a.opacity,u=o.opacity,f=s.opacity,h=void 0!==u,p=void 0!==f;(i.isArrayOrTypedArray(c)||h||p)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?a.opacity:t.mo;return t.selected?h?u:e:p?f:g*e});var d=a.color,m=o.color,v=s.color;(m||v)&&(e.selectedColorFn=function(t){var e=t.mcc||d;return t.selected?m||e:v||e});var y=a.size,x=o.size,b=s.size,_=void 0!==x,w=void 0!==b;return l.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},x.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:u||(l?e:c.addOpacity(e,g))},e},x.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.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){c.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\",w(x.symbolNumber(n),a)),e.mrc2=a})),a.length&&t.each((function(t){for(var e=n.select(this),r=0;r0?r:0}x.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var o=x.makeSelectedTextStyleFns(e);a=o.selectedTextColorFn}var s=e.texttemplate,l=r._fullLayout;t.each((function(t){var o=n.select(this),c=s?i.extractOption(t,e,\"txt\",\"texttemplate\"):i.extractOption(t,e,\"tx\",\"text\");if(c||0===c){if(s){var u=e._module.formatLabels,f=u?u(t,e,l):{},p={};y(p,e,t.i);var d=e._meta||{};c=i.texttemplateString(c,f,l._d3locale,p,t,d)}var g=t.tp||e.textposition,m=L(t,e),v=a?a(t):t.tc||e.textfont.color;o.call(x.font,t.tf||e.textfont.family,m,v).text(c).call(h.convertToTspans,r).call(E,g,m,t.mrc)}else o.remove()}))}},x.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.makeSelectedTextStyleFns(e);t.each((function(t){var i=n.select(this),a=r.selectedTextColorFn(t),o=t.tp||e.textposition,s=L(t,e);c.fill(i,a);var u=l.traceIs(e,\"bar-like\");E(i,o,s,t.mrc2||t.mrc,u)}))}};function C(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,.25),u=Math.pow(s*s+l*l,.25),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)]]}x.smoothopen=function(t,e){if(t.length<3)return\"M\"+t.join(\"L\");var r,n=\"M\"+t[0],i=[];for(r=1;r=1e4&&(x.savedBBoxes={},O=0),r&&(x.savedBBoxes[r]=m),O++,i.extendFlat({},m)},x.setClipUrl=function(t,e,r){t.attr(\"clip-path\",D(e,r))},x.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}},x.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+=f(e,r)).trim(),t[i](\"transform\",a),a},x.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}},x.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 R=/\\s*sc.*/;x.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(R,\"\");t=(t+=n).trim(),this.setAttribute(\"transform\",t)}))}};var F=/translate\\([^)]*\\)\\s*$/;x.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(F);t=1===e&&1===r?[]:[f(o,s),\"scale(\"+e+\",\"+r+\")\",f(-o,-s)],l&&t.push(l),i.attr(\"transform\",t.join(\"\"))}}))}},{\"../../components/fx/helpers\":402,\"../../constants/alignment\":471,\"../../constants/interactions\":478,\"../../constants/xmlns_namespaces\":480,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../registry\":638,\"../../traces/scatter/make_bubble_size_func\":943,\"../../traces/scatter/subtypes\":951,\"../color\":366,\"../colorscale\":378,\"./symbol_defs\":389,\"@plotly/d3\":58,\"fast-isnumeric\":190,tinycolor2:312}],389:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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},\"arrow-up\":{n:45,f:function(t){var e=n.round(t,2);return\"M0,0L-\"+e+\",\"+n.round(2*t,2)+\"H\"+e+\"Z\"},noDot:!0},\"arrow-down\":{n:46,f:function(t){var e=n.round(t,2);return\"M0,0L-\"+e+\",-\"+n.round(2*t,2)+\"H\"+e+\"Z\"},noDot:!0},\"arrow-left\":{n:47,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,0L\"+e+\",-\"+r+\"V\"+r+\"Z\"},noDot:!0},\"arrow-right\":{n:48,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,0L-\"+e+\",-\"+r+\"V\"+r+\"Z\"},noDot:!0},\"arrow-bar-up\":{n:49,f:function(t){var e=n.round(t,2);return\"M-\"+e+\",0H\"+e+\"M0,0L-\"+e+\",\"+n.round(2*t,2)+\"H\"+e+\"Z\"},needLine:!0,noDot:!0},\"arrow-bar-down\":{n:50,f:function(t){var e=n.round(t,2);return\"M-\"+e+\",0H\"+e+\"M0,0L-\"+e+\",-\"+n.round(2*t,2)+\"H\"+e+\"Z\"},needLine:!0,noDot:!0},\"arrow-bar-left\":{n:51,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,-\"+r+\"V\"+r+\"M0,0L\"+e+\",-\"+r+\"V\"+r+\"Z\"},needLine:!0,noDot:!0},\"arrow-bar-right\":{n:52,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return\"M0,-\"+r+\"V\"+r+\"M0,0L-\"+e+\",-\"+r+\"V\"+r+\"Z\"},needLine:!0,noDot:!0}}},{\"@plotly/d3\":58}],390:[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\"}}}},{}],391:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../registry\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../lib\"),s=t(\"./compute_error\");function l(t,e,r,i){var l=e[\"error_\"+i]||{},c=[];if(l.visible&&-1!==[\"linear\",\"log\"].indexOf(r.type)){for(var u=s(l),f=0;f0;e.each((function(e){var f,h=e[0].trace,p=h.error_x||{},d=h.error_y||{};h.ids&&(f=function(t){return t.id});var g=o.hasMarkers(h)&&h.marker.maxdisplayed>0;d.visible||p.visible||(e=[]);var m=n.select(this).selectAll(\"g.errorbar\").data(e,f);if(m.exit().remove(),e.length){p.visible||m.selectAll(\"path.xerror\").remove(),d.visible||m.selectAll(\"path.yerror\").remove(),m.style(\"opacity\",1);var v=m.enter().append(\"g\").classed(\"errorbar\",!0);u&&v.style(\"opacity\",0).transition().duration(s.duration).style(\"opacity\",1),a.setClipUrl(m,r.layerClipId,t),m.each((function(t){var e=n.select(this),r=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,l,c);if(!g||t.vis){var a,o=e.select(\"path.yerror\");if(d.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var f=d.width;a=\"M\"+(r.x-f)+\",\"+r.yh+\"h\"+2*f+\"m-\"+f+\",0V\"+r.ys,r.noYS||(a+=\"m-\"+f+\",0h\"+2*f),!o.size()?o=e.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").classed(\"yerror\",!0):u&&(o=o.transition().duration(s.duration).ease(s.easing)),o.attr(\"d\",a)}else o.remove();var h=e.select(\"path.xerror\");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var m=(p.copy_ystyle?d:p).width;a=\"M\"+r.xh+\",\"+(r.y-m)+\"v\"+2*m+\"m0,-\"+m+\"H\"+r.xs,r.noXS||(a+=\"m0,-\"+m+\"v\"+2*m),!h.size()?h=e.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").classed(\"xerror\",!0):u&&(h=h.transition().duration(s.duration).ease(s.easing)),h.attr(\"d\",a)}else h.remove()}}))}}))}},{\"../../traces/scatter/subtypes\":951,\"../drawing\":388,\"@plotly/d3\":58,\"fast-isnumeric\":190}],396:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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\":366,\"@plotly/d3\":58}],397:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"./layout_attributes\").hoverlabel,a=t(\"../../lib/extend\").extendFlat;e.exports={hoverlabel:{bgcolor:a({},i.bgcolor,{arrayOk:!0}),bordercolor:a({},i.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:\"none\"}),align:a({},i.align,{arrayOk:!0}),namelength:a({},i.namelength,{arrayOk:!0}),editType:\"none\"}}},{\"../../lib/extend\":493,\"../../plots/font_attributes\":585,\"./layout_attributes\":407}],398:[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=0&&r.index_[0]._length||ot<0||ot>w[0]._length)return d.unhoverRaw(t,e)}if(e.pointerX=at+_[0]._offset,e.pointerY=ot+w[0]._offset,V=\"xval\"in e?v.flat(l,e.xval):v.p2c(_,at),H=\"yval\"in e?v.flat(l,e.yval):v.p2c(w,ot),!i(V[0])||!i(H[0]))return o.warn(\"Fx.hover failed\",e,t),d.unhoverRaw(t,e)}var ct=1/0;function ut(t,r){for(G=0;Gtt&&(et.splice(0,tt),ct=et[0].distance),y&&0!==B&&0===et.length){$.distance=B,$.index=!1;var f=W._module.hoverPoints($,K,Q,\"closest\",{hoverLayer:u._hoverlayer});if(f&&(f=f.filter((function(t){return t.spikeDistance<=B}))),f&&f.length){var h,d=f.filter((function(t){return t.xa.showspikes&&\"hovered data\"!==t.xa.spikesnap}));if(d.length){var g=d[0];i(g.x0)&&i(g.y0)&&(h=ht(g),(!nt.vLinePoint||nt.vLinePoint.spikeDistance>h.spikeDistance)&&(nt.vLinePoint=h))}var m=f.filter((function(t){return t.ya.showspikes&&\"hovered data\"!==t.ya.spikesnap}));if(m.length){var x=m[0];i(x.x0)&&i(x.y0)&&(h=ht(x),(!nt.hLinePoint||nt.hLinePoint.spikeDistance>h.spikeDistance)&&(nt.hLinePoint=h))}}}}}function ft(t,e,r){for(var n,i=null,a=1/0,o=0;o0&&Math.abs(t.distance)Tt-1;Mt--)Ct(et[Mt]);et=St,mt()}var Pt=t._hoverdata,It=[],Ot=j(t),zt=U(t);for(q=0;q1||et.length>1)||\"closest\"===P&&it&&et.length>1,Wt=p.combine(u.plot_bgcolor||p.background,u.paper_bgcolor),Xt=I(et,{gd:t,hovermode:P,rotateLabels:Yt,bgColor:Wt,container:u._hoverlayer,outerContainer:u._paper.node(),commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance});v.isUnifiedHover(P)||(!function(t,e,r){var n,i,a,o,s,l,c,u=0,f=1,h=t.size(),p=new Array(h),d=0;function g(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;oe.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=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--)}}}t.each((function(t){var n=t[e],i=\"x\"===n._id.charAt(0),a=n.range;0===d&&a&&a[0]>a[1]!==i&&(f=-1),p[d++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(i?T:1)/2,pmin:0,pmax:i?r.width:r.height}]})),p.sort((function(t,e){return t[0].posref-e[0].posref||f*(e[0].traceIndex-t[0].traceIndex)}));for(;!n&&u<=h;){for(u++,n=!0,o=0;o.01&&y.pmin===x.pmin&&y.pmax===x.pmax){for(s=v.length-1;s>=0;s--)v[s].dp+=i;for(m.push.apply(m,v),p.splice(o+1,1),c=0,s=m.length-1;s>=0;s--)c+=m[s].dp;for(a=c/m.length,s=m.length-1;s>=0;s--)m[s].dp-=a;n=!1}else o++}p.forEach(g)}for(o=p.length-1;o>=0;o--){var b=p[o];for(s=b.length-1;s>=0;s--){var _=b[s],w=_.datum;w.offset=_.dp,w.del=_.del}}}(Xt,Yt?\"xa\":\"ya\",u),z(Xt,Yt,u._invScaleX,u._invScaleY));if(s&&s.tagName){var Zt=m.getComponentMethod(\"annotations\",\"hasClickToShow\")(t,It);f(n.select(s),Zt?\"pointer\":\"\")}if(!s||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)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(t,0,Pt))return;Pt&&t.emit(\"plotly_unhover\",{event:e,points:Pt});t.emit(\"plotly_hover\",{event:e,points:t._hoverdata,xaxes:_,yaxes:w,xvals:V,yvals:H})}(t,e,r,a,s)}))},r.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=e.gd,a=j(i),o=U(i),s=I(t.map((function(t){var r=t._x0||t.x0||t.x||0,n=t._x1||t.x1||t.x||0,s=t._y0||t.y0||t.y||0,l=t._y1||t.y1||t.y||0,c=t.eventData;if(c){var u=Math.min(r,n),f=Math.max(r,n),h=Math.min(s,l),d=Math.max(s,l),g=t.trace;if(m.traceIs(g,\"gl3d\")){var v=i._fullLayout[g.scene]._scene.container,y=v.offsetLeft,x=v.offsetTop;u+=y,f+=y,h+=x,d+=x}c.bbox={x0:u+o,x1:f+o,y0:h+a,y1:d+a},e.inOut_bbox&&e.inOut_bbox.push(c.bbox)}else c=!1;return{color:t.color||p.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,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:\"\"},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData:c}})),{gd:i,hovermode:\"closest\",rotateLabels:!1,bgColor:e.bgColor||p.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}),l=0,c=0;return s.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5([\\s\\S]*)<\\/extra>/;function I(t,e){var r=e.gd,i=r._fullLayout,a=e.hovermode,c=e.rotateLabels,f=e.bgColor,d=e.container,g=e.outerContainer,w=e.commonLabelOpts||{};if(0===t.length)return[[]];var T=e.fontFamily||y.HOVERFONT,k=e.fontSize||y.HOVERFONTSIZE,A=t[0],E=A.xa,L=A.ya,P=a.charAt(0),I=A[P+\"Label\"],z=V(r,g),D=z.top,R=z.width,F=z.height,B=void 0!==I&&A.distance<=e.hoverdistance&&(\"x\"===a||\"y\"===a);if(B){var N,j,U=!0;for(N=0;Ni.width-b?(m=i.width-b,e.attr(\"d\",\"M\"+(b-M)+\",0L\"+b+\",\"+x+M+\"v\"+x+(2*S+y.height)+\"H-\"+b+\"V\"+x+M+\"H\"+(b-2*M)+\"Z\")):e.attr(\"d\",\"M0,0L\"+M+\",\"+x+M+\"H\"+(S+y.width/2)+\"v\"+x+(2*S+y.height)+\"H-\"+(S+y.width/2)+\"V\"+x+M+\"H-\"+M+\"Z\")}else{var _,C,P;\"right\"===L.side?(_=\"start\",C=1,P=\"\",m=E._offset+E._length):(_=\"end\",C=-1,P=\"-\",m=E._offset),v=L._offset+(A.y0+A.y1)/2,l.attr(\"text-anchor\",_),e.attr(\"d\",\"M0,0L\"+P+M+\",\"+M+\"V\"+(S+y.height/2)+\"h\"+P+(2*S+y.width)+\"V-\"+(S+y.height/2)+\"H\"+P+M+\"V-\"+M+\"Z\");var O,z=y.height/2,R=D-y.top-z,F=\"clip\"+i._uid+\"commonlabel\"+L._id;if(m=0?at:ot+ct=0?ot:vt+ct=0?nt:it+ut=0?it:yt+ut=0,\"top\"!==t.idealAlign&&G||!Y?G?(z+=j/2,t.anchor=\"start\"):t.anchor=\"middle\":(z-=j/2,t.anchor=\"end\");else if(t.pos=z,G=P+N/2+W<=R,Y=P-N/2-W>=0,\"left\"!==t.idealAlign&&G||!Y)if(G)P+=N/2,t.anchor=\"start\";else{t.anchor=\"middle\";var X=W/2,Z=P+X-R,J=P-X;Z>0&&(P-=Z),J<0&&(P+=-J)}else P-=N/2,t.anchor=\"end\";w.attr(\"text-anchor\",t.anchor),E&&A.attr(\"text-anchor\",t.anchor),e.attr(\"transform\",s(P,z)+(c?l(_):\"\"))})),xt}function O(t,e,r,n,i,a){var s=\"\",l=\"\";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=o.templateString(t.name,t.trace._meta)),s=B(t.name,t.nameLength));var c=r.charAt(0),u=\"x\"===c?\"y\":\"x\";void 0!==t.zLabel?(void 0!==t.xLabel&&(l+=\"x: \"+t.xLabel+\"
\"),void 0!==t.yLabel&&(l+=\"y: \"+t.yLabel+\"
\"),\"choropleth\"!==t.trace.type&&\"choroplethmapbox\"!==t.trace.type&&(l+=(l?\"z: \":\"\")+t.zLabel)):e&&t[c+\"Label\"]===i?l=t[u+\"Label\"]||\"\":void 0===t.xLabel?void 0!==t.yLabel&&\"scattercarpet\"!==t.trace.type&&(l=t.yLabel):l=void 0===t.yLabel?t.xLabel:\"(\"+t.xLabel+\", \"+t.yLabel+\")\",!t.text&&0!==t.text||Array.isArray(t.text)||(l+=(l?\"
\":\"\")+t.text),void 0!==t.extraText&&(l+=(l?\"
\":\"\")+t.extraText),a&&\"\"===l&&!t.hovertemplate&&(\"\"===s&&a.remove(),l=s);var f=t.hovertemplate||!1;if(f){var h=t.hovertemplateLabels||t;t[c+\"Label\"]!==i&&(h[c+\"other\"]=h[c+\"Val\"],h[c+\"otherLabel\"]=h[c+\"Label\"]),l=(l=o.hovertemplateString(f,h,n._d3locale,t.eventData[0]||{},t.trace._meta)).replace(P,(function(e,r){return s=B(r,t.nameLength),\"\"}))}return[l,s]}function z(t,e,r,i){var a=function(t){return t*r},o=function(t){return t*i};t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var i=r.select(\"text.nums\"),s=t.anchor,l=\"end\"===s?-1:1,c={start:1,end:-1,middle:0}[s],f=c*(M+S),p=f+c*(t.txwidth+S),d=0,g=t.offset,m=\"middle\"===s;m&&(f-=t.tx2width/2,p+=t.txwidth/2+S),e&&(g*=-A,d=t.offset*k),r.select(\"path\").attr(\"d\",m?\"M-\"+a(t.bx/2+t.tx2width/2)+\",\"+o(g-t.by/2)+\"h\"+a(t.bx)+\"v\"+o(t.by)+\"h-\"+a(t.bx)+\"Z\":\"M0,0L\"+a(l*M+d)+\",\"+o(M+g)+\"v\"+o(t.by/2-M)+\"h\"+a(l*t.bx)+\"v-\"+o(t.by)+\"H\"+a(l*M+d)+\"V\"+o(g-M)+\"Z\");var v=d+f,y=g+t.ty0-t.by/2+S,x=t.textAlign||\"auto\";\"auto\"!==x&&(\"left\"===x&&\"start\"!==s?(i.attr(\"text-anchor\",\"start\"),v=m?-t.bx/2-t.tx2width/2+S:-t.bx-S):\"right\"===x&&\"end\"!==s&&(i.attr(\"text-anchor\",\"end\"),v=m?t.bx/2-t.tx2width/2-S:t.bx+S)),i.call(u.positionText,a(v),o(y)),t.tx2width&&(r.select(\"text.name\").call(u.positionText,a(p+c*S+d),o(g+t.ty0-t.by/2+S)),r.select(\"rect\").call(h.setRect,a(p+(c-1)*t.tx2width/2+d),o(g-t.by/2-1),a(t.tx2width),o(t.by+2)))}))}function D(t,e){var r=t.index,n=t.trace||{},a=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var c=Array.isArray(r)?function(t,e){var i=o.castOption(a,r,t);return l(i)?i:o.extractOption({},n,\"\",e)}:function(t,e){return o.extractOption(s,n,t,e)};function u(e,r,n){var i=c(r,n);l(i)&&(t[e]=i)}if(u(\"hoverinfo\",\"hi\",\"hoverinfo\"),u(\"bgcolor\",\"hbg\",\"hoverlabel.bgcolor\"),u(\"borderColor\",\"hbc\",\"hoverlabel.bordercolor\"),u(\"fontFamily\",\"htf\",\"hoverlabel.font.family\"),u(\"fontSize\",\"hts\",\"hoverlabel.font.size\"),u(\"fontColor\",\"htc\",\"hoverlabel.font.color\"),u(\"nameLength\",\"hnl\",\"hoverlabel.namelength\"),u(\"textAlign\",\"hta\",\"hoverlabel.align\"),t.posref=\"y\"===e||\"closest\"===e&&\"h\"===n.orientation?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:g.hoverLabelText(t.xa,t.xLabelVal,n.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel=\"yLabel\"in t?t.yLabel:g.hoverLabelText(t.ya,t.yLabelVal,n.yhoverformat),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 f=g.tickText(t.xa,t.xa.c2l(t.xerr),\"hover\").text;void 0!==t.xerrneg?t.xLabel+=\" +\"+f+\" / -\"+g.tickText(t.xa,t.xa.c2l(t.xerrneg),\"hover\").text:t.xLabel+=\" \\xb1 \"+f,\"x\"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||\"log\"===t.ya.type&&t.yerr<=0)){var h=g.tickText(t.ya,t.ya.c2l(t.yerr),\"hover\").text;void 0!==t.yerrneg?t.yLabel+=\" +\"+h+\" / -\"+g.tickText(t.ya,t.ya.c2l(t.yerrneg),\"hover\").text:t.yLabel+=\" \\xb1 \"+h,\"y\"===e&&(t.distance+=1)}var p=t.hoverinfo||t.trace.hoverinfo;return p&&\"all\"!==p&&(-1===(p=Array.isArray(p)?p:p.split(\"+\")).indexOf(\"x\")&&(t.xLabel=void 0),-1===p.indexOf(\"y\")&&(t.yLabel=void 0),-1===p.indexOf(\"z\")&&(t.zLabel=void 0),-1===p.indexOf(\"text\")&&(t.text=void 0),-1===p.indexOf(\"name\")&&(t.name=void 0)),t}function R(t,e,r){var n,i,o=r.container,s=r.fullLayout,l=s._size,c=r.event,u=!!e.hLinePoint,f=!!e.vLinePoint;if(o.selectAll(\".spikeline\").remove(),f||u){var d=p.combine(s.plot_bgcolor,s.paper_bgcolor);if(u){var m,v,y=e.hLinePoint;n=y&&y.xa,\"cursor\"===(i=y&&y.ya).spikesnap?(m=c.pointerX,v=c.pointerY):(m=n._offset+y.x,v=i._offset+y.y);var x,b,_=a.readability(y.color,d)<1.5?p.contrast(d):y.color,w=i.spikemode,T=i.spikethickness,k=i.spikecolor||_,A=g.getPxPosition(t,i);if(-1!==w.indexOf(\"toaxis\")||-1!==w.indexOf(\"across\")){if(-1!==w.indexOf(\"toaxis\")&&(x=A,b=m),-1!==w.indexOf(\"across\")){var M=i._counterDomainMin,S=i._counterDomainMax;\"free\"===i.anchor&&(M=Math.min(M,i.position),S=Math.max(S,i.position)),x=l.l+M*l.w,b=l.l+S*l.w}o.insert(\"line\",\":first-child\").attr({x1:x,x2:b,y1:v,y2:v,\"stroke-width\":T,stroke:k,\"stroke-dasharray\":h.dashStyle(i.spikedash,T)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),o.insert(\"line\",\":first-child\").attr({x1:x,x2:b,y1:v,y2:v,\"stroke-width\":T+2,stroke:d}).classed(\"spikeline\",!0).classed(\"crisp\",!0)}-1!==w.indexOf(\"marker\")&&o.insert(\"circle\",\":first-child\").attr({cx:A+(\"right\"!==i.side?T:-T),cy:v,r:T,fill:k}).classed(\"spikeline\",!0)}if(f){var E,L,C=e.vLinePoint;n=C&&C.xa,i=C&&C.ya,\"cursor\"===n.spikesnap?(E=c.pointerX,L=c.pointerY):(E=n._offset+C.x,L=i._offset+C.y);var P,I,O=a.readability(C.color,d)<1.5?p.contrast(d):C.color,z=n.spikemode,D=n.spikethickness,R=n.spikecolor||O,F=g.getPxPosition(t,n);if(-1!==z.indexOf(\"toaxis\")||-1!==z.indexOf(\"across\")){if(-1!==z.indexOf(\"toaxis\")&&(P=F,I=L),-1!==z.indexOf(\"across\")){var B=n._counterDomainMin,N=n._counterDomainMax;\"free\"===n.anchor&&(B=Math.min(B,n.position),N=Math.max(N,n.position)),P=l.t+(1-N)*l.h,I=l.t+(1-B)*l.h}o.insert(\"line\",\":first-child\").attr({x1:E,x2:E,y1:P,y2:I,\"stroke-width\":D,stroke:R,\"stroke-dasharray\":h.dashStyle(n.spikedash,D)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),o.insert(\"line\",\":first-child\").attr({x1:E,x2:E,y1:P,y2:I,\"stroke-width\":D+2,stroke:d}).classed(\"spikeline\",!0).classed(\"crisp\",!0)}-1!==z.indexOf(\"marker\")&&o.insert(\"circle\",\":first-child\").attr({cx:E,cy:F-(\"top\"!==n.side?D:-D),r:D,fill:R}).classed(\"spikeline\",!0)}}}function F(t,e){return!e||(e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint)}function B(t,e){return u.plainText(t||\"\",{len:e,allowedTags:[\"br\",\"sub\",\"sup\",\"b\",\"i\",\"em\"]})}function N(t,e,r){var n=e[t+\"a\"],i=e[t+\"Val\"],a=e.cd[0];if(\"category\"===n.type)i=n._categoriesMap[i];else if(\"date\"===n.type){var o=e.trace[t+\"periodalignment\"];if(o){var s=e.cd[e.index],l=s[t+\"Start\"];void 0===l&&(l=s[t]);var c=s[t+\"End\"];void 0===c&&(c=s[t]);var u=c-l;\"end\"===o?i+=u:\"middle\"===o&&(i+=u/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&(\"group\"!==r.boxmode&&\"group\"!==r.violinmode||(i+=a.t.dPos)),i}function j(t){return t.offsetTop+t.clientTop}function U(t){return t.offsetLeft+t.clientLeft}function V(t,e){var r=t._fullLayout,n=e.getBoundingClientRect(),i=n.x,a=n.y,s=i+n.width,l=a+n.height,c=o.apply3DTransform(r._invTransform)(i,a),u=o.apply3DTransform(r._invTransform)(s,l),f=c[0],h=c[1],p=u[0],d=u[1];return{x:f,y:h,width:p-f,height:d-h,top:Math.min(h,d),left:Math.min(f,p),right:Math.max(f,p),bottom:Math.max(h,d)}}},{\"../../lib\":503,\"../../lib/events\":492,\"../../lib/override_cursor\":514,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"../color\":366,\"../dragelement\":385,\"../drawing\":388,\"../legend/defaults\":418,\"../legend/draw\":419,\"./constants\":400,\"./helpers\":402,\"@plotly/d3\":58,\"fast-isnumeric\":190,tinycolor2:312}],404:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../color\"),a=t(\"./helpers\").isUnifiedHover;e.exports=function(t,e,r,o){o=o||{};var s=e.legend;function l(t){o.font[t]||(o.font[t]=s?e.legend.font[t]:e.font[t])}e&&a(e.hovermode)&&(o.font||(o.font={}),l(\"size\"),l(\"family\"),l(\"color\"),s?(o.bgcolor||(o.bgcolor=i.combine(e.legend.bgcolor,e.paper_bgcolor)),o.bordercolor||(o.bordercolor=e.legend.bordercolor)):o.bgcolor||(o.bgcolor=e.paper_bgcolor)),r(\"hoverlabel.bgcolor\",o.bgcolor),r(\"hoverlabel.bordercolor\",o.bordercolor),r(\"hoverlabel.namelength\",o.namelength),n.coerceFont(r,\"hoverlabel.font\",o.font),r(\"hoverlabel.align\",o.align)}},{\"../../lib\":503,\"../color\":366,\"./helpers\":402}],405:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e){function r(r,a){return void 0!==e[r]?e[r]:n.coerce(t,e,i,r,a)}return r(\"clickmode\"),r(\"hovermode\")}},{\"../../lib\":503,\"./layout_attributes\":407}],406:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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,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\":503,\"../dragelement\":385,\"./attributes\":397,\"./calc\":398,\"./click\":399,\"./constants\":400,\"./defaults\":401,\"./helpers\":402,\"./hover\":403,\"./layout_attributes\":407,\"./layout_defaults\":408,\"./layout_global_defaults\":409,\"@plotly/d3\":58}],407:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"../../plots/font_attributes\"),a=i({editType:\"none\"});a.family.dflt=n.HOVERFONT,a.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\",\"drawclosedpath\",\"drawopenpath\",\"drawline\",\"drawrect\",\"drawcircle\",\"orbit\",\"turntable\",!1],dflt:\"zoom\",editType:\"modebar\"},hovermode:{valType:\"enumerated\",values:[\"x\",\"y\",\"closest\",!1,\"x unified\",\"y unified\"],dflt:\"closest\",editType:\"modebar\"},hoverdistance:{valType:\"integer\",min:-1,dflt:20,editType:\"none\"},spikedistance:{valType:\"integer\",min:-1,dflt:-1,editType:\"none\"},hoverlabel:{bgcolor:{valType:\"color\",editType:\"none\"},bordercolor:{valType:\"color\",editType:\"none\"},font:a,grouptitlefont:i({editType:\"none\"}),align:{valType:\"enumerated\",values:[\"left\",\"right\",\"auto\"],dflt:\"auto\",editType:\"none\"},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\":585,\"./constants\":400}],408:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\"),a=t(\"./hovermode_defaults\"),o=t(\"./hoverlabel_defaults\");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}a(t,e)&&(r(\"hoverdistance\"),r(\"spikedistance\")),\"select\"===r(\"dragmode\")&&r(\"selectdirection\");var s=e._has(\"mapbox\"),l=e._has(\"geo\"),c=e._basePlotModules.length;\"zoom\"===e.dragmode&&((s||l)&&1===c||s&&l&&2===c)&&(e.dragmode=\"pan\"),o(t,e,r),n.coerceFont(r,\"hoverlabel.grouptitlefont\",e.hoverlabel.font)}},{\"../../lib\":503,\"./hoverlabel_defaults\":404,\"./hovermode_defaults\":405,\"./layout_attributes\":407}],409:[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\":503,\"./hoverlabel_defaults\":404,\"./layout_attributes\":407}],410:[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;h1){if(!h&&!p&&!d)\"independent\"===k(\"pattern\")&&(h=!0);m._hasSubplotGrid=h;var x,b,_=\"top to bottom\"===k(\"roworder\"),w=h?.2:.1,T=h?.3:.1;g&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),m._domains={x:u(\"x\",k,w,x,y),y:u(\"y\",k,T,b,v,_)}}else delete e.grid}function k(t,e){return n.coerce(r,m,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,m=r.columns,v=\"independent\"===r.pattern,y=r._axisMap={};if(d){var x=h.subplots||[];l=r.subplots=new Array(g);var b=1;for(n=0;n1);if(!1===_&&(e.legend=void 0),(!1!==_||f.uirevision)&&(p(\"uirevision\",e.uirevision),!1!==_)){p(\"bgcolor\",e.paper_bgcolor),p(\"bordercolor\"),p(\"borderwidth\");var w,T,k,A=i.coerceFont(p,\"font\",e.font),M=\"h\"===p(\"orientation\");if(M?(w=0,n.getComponentMethod(\"rangeslider\",\"isVisible\")(t.xaxis)?(T=1.1,k=\"bottom\"):(T=-.1,k=\"top\")):(w=1.02,T=1,k=\"auto\"),p(\"traceorder\",x),c.isGrouped(e.legend)&&p(\"tracegroupgap\"),p(\"itemsizing\"),p(\"itemwidth\"),p(\"itemclick\"),p(\"itemdoubleclick\"),p(\"groupclick\"),p(\"x\",w),p(\"xanchor\"),p(\"y\",T),p(\"yanchor\",k),p(\"valign\"),i.noneOrAll(f,h,[\"x\",\"y\"]),p(\"title.text\")){p(\"title.side\",M?\"left\":\"top\");var S=i.extendFlat({},A,{size:i.bigFont(A.size)});i.coerceFont(p,\"title.font\",S)}}}},{\"../../lib\":503,\"../../plot_api/plot_template\":543,\"../../plots/attributes\":550,\"../../plots/layout_attributes\":610,\"../../registry\":638,\"./attributes\":416,\"./helpers\":422}],419:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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/alignment\"),g=d.LINE_SPACING,m=d.FROM_TL,v=d.FROM_BR,y=t(\"./get_legend_data\"),x=t(\"./style\"),b=t(\"./helpers\");function _(t,e,r,n,i){var a=r.data()[0][0].trace,l={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&&(l.group=a._group),o.traceIs(a,\"pie-like\")&&(l.label=r.datum()[0].label),!1!==s.triggerHandler(t,\"plotly_legendclick\",l))if(1===n)e._clickTimeout=setTimeout((function(){t._fullLayout&&h(r,t,n)}),t._context.doubleClickDelay);else if(2===n){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,\"plotly_legenddoubleclick\",l)&&h(r,t,n)}}function w(t,e,r){var n,a,s=t.data()[0][0],l=s.trace,u=o.traceIs(l,\"pie-like\"),h=!r._inHover&&e._context.edits.legendText&&!u,d=r._maxNameLength;s.groupTitle?(n=s.groupTitle.text,a=s.groupTitle.font):(a=r.font,r.entries?n=s.text:(n=u?s.label:l.name,l._meta&&(n=i.templateString(n,l._meta))));var g=i.ensureSingle(t,\"text\",\"legendtext\");g.attr(\"text-anchor\",\"start\").call(c.font,a).text(h?T(n,d):n);var m=r.itemwidth+2*p.itemGap;f.positionText(g,m,0),h?g.call(f.makeEditable,{gd:e,text:n}).call(A,t,e,r).on(\"edit\",(function(n){this.text(T(n,d)).call(A,t,e,r);var a=s.trace._fullInput||{},c={};if(o.hasTransform(a,\"groupby\")){var u=o.getTransformIndices(a,\"groupby\"),f=u[u.length-1],h=i.keyedContainer(a,\"transforms[\"+f+\"].styles\",\"target\",\"value.name\");h.set(s.trace._group,n),c=h.constructUpdate()}else c.name=n;return o.call(\"_guiRestyle\",e,c,l.index)})):A(g,t,e,r)}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 k(t,e){var r,a=e._context.doubleClickDelay,o=1,s=i.ensureSingle(t,\"rect\",\"legendtoggle\",(function(t){e._context.staticPlot||t.style(\"cursor\",\"pointer\").attr(\"pointer-events\",\"all\"),t.call(u.fill,\"rgba(0,0,0,0)\")}));e._context.staticPlot||(s.on(\"mousedown\",(function(){(r=(new Date).getTime())-e._legendMouseDownTimea&&(o=Math.max(o-1,1)),_(e,r,t,o,n.event)}})))}function A(t,e,r,n,i){n._inHover&&t.attr(\"data-notex\",!0),f.convertToTspans(t,r,(function(){!function(t,e,r,n){var i=t.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend)return void t.remove();var a=t.select(\"g[class*=math-group]\"),o=a.node();r||(r=e._fullLayout.legend);var s,l=r.borderwidth;s=1===n?r.title.font:i.groupTitle?i.groupTitle.font:r.font;var u,h,d=s.size*g;if(o){var m=c.bBox(o);u=m.height,h=m.width,1===n?c.setTranslate(a,l,l+.75*u):c.setTranslate(a,0,.25*u)}else{var v=t.select(1===n?\".legendtitletext\":\".legendtext\"),y=f.lineCount(v),x=v.node();if(u=d*y,h=x?c.bBox(x).width:0,1===n)\"left\"===r.title.side&&(h+=2*p.itemGap),f.positionText(v,l+p.titlePad,l+d);else{var b=2*p.itemGap+r.itemwidth;i.groupTitle&&(b=p.itemGap,h-=r.itemwidth),f.positionText(v,b,-d*((y-1)/2-.3))}}1===n?(r._titleWidth=h,r._titleHeight=u):(i.lineHeight=d,i.height=Math.max(u,16)+3,i.width=h)}(e,r,n,i)}))}function M(t){return i.isRightAnchor(t)?\"right\":i.isCenterAnchor(t)?\"center\":\"left\"}function S(t){return i.isBottomAnchor(t)?\"bottom\":i.isMiddleAnchor(t)?\"middle\":\"top\"}e.exports=function(t,e){return e||(e=t._fullLayout.legend||{}),function(t,e){var r,s,f=t._fullLayout,h=\"legend\"+f._uid,d=e._inHover;d?(r=e.layer,h+=\"-hover\"):r=f._infolayer;if(!r)return;t._legendMouseDownTime||(t._legendMouseDownTime=0);if(d){if(!e.entries)return;s=y(e.entries,e)}else{if(!t.calcdata)return;s=f.showlegend&&y(t.calcdata,e)}var g=f.hiddenlabels||[];if(!(d||f.showlegend&&s.length))return r.selectAll(\".legend\").remove(),f._topdefs.select(\"#\"+h).remove(),a.autoMargin(t,\"legend\");var T=i.ensureSingle(r,\"g\",\"legend\",(function(t){d||t.attr(\"pointer-events\",\"all\")})),E=i.ensureSingleById(f._topdefs,\"clipPath\",h,(function(t){t.append(\"rect\")})),L=i.ensureSingle(T,\"rect\",\"bg\",(function(t){t.attr(\"shape-rendering\",\"crispEdges\")}));L.call(u.stroke,e.bordercolor).call(u.fill,e.bgcolor).style(\"stroke-width\",e.borderwidth+\"px\");var C=i.ensureSingle(T,\"g\",\"scrollbox\"),P=e.title;if(e._titleWidth=0,e._titleHeight=0,P.text){var I=i.ensureSingle(C,\"text\",\"legendtitletext\");I.attr(\"text-anchor\",\"start\").call(c.font,P.font).text(P.text),A(I,C,t,e,1)}else C.selectAll(\".legendtitletext\").remove();var O=i.ensureSingle(T,\"rect\",\"scrollbar\",(function(t){t.attr(p.scrollBarEnterAttrs).call(u.fill,p.scrollBarColor)})),z=C.selectAll(\"g.groups\").data(s);z.enter().append(\"g\").attr(\"class\",\"groups\"),z.exit().remove();var D=z.selectAll(\"g.traces\").data(i.identity);D.enter().append(\"g\").attr(\"class\",\"traces\"),D.exit().remove(),D.style(\"opacity\",(function(t){var e=t[0].trace;return o.traceIs(e,\"pie-like\")?-1!==g.indexOf(t[0].label)?.5:1:\"legendonly\"===e.visible?.5:1})).each((function(){n.select(this).call(w,t,e)})).call(x,t,e).each((function(){d||n.select(this).call(k,t)})),i.syncOrAsync([a.previousPromises,function(){return function(t,e,r,i){var a=t._fullLayout;i||(i=a.legend);var o=a._size,s=b.isVertical(i),l=b.isGrouped(i),u=i.borderwidth,f=2*u,h=p.itemGap,d=i.itemwidth+2*h,g=2*(u+h),m=S(i),v=i.y<0||0===i.y&&\"top\"===m,y=i.y>1||1===i.y&&\"bottom\"===m,x=i.tracegroupgap;i._maxHeight=Math.max(v||y?a.height/2:o.h,30);var _=0;i._width=0,i._height=0;var w=function(t){var e=0,r=0,n=t.title.side;n&&(-1!==n.indexOf(\"left\")&&(e=t._titleWidth),-1!==n.indexOf(\"top\")&&(r=t._titleHeight));return[e,r]}(i);if(s)r.each((function(t){var e=t[0].height;c.setTranslate(this,u+w[0],u+w[1]+i._height+e/2+h),i._height+=e,i._width=Math.max(i._width,t[0].width)})),_=d+i._width,i._width+=h+d+f,i._height+=g,l&&(e.each((function(t,e){c.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var T=M(i),k=i.x<0||0===i.x&&\"right\"===T,A=i.x>1||1===i.x&&\"left\"===T,E=y||v,L=a.width/2;i._maxWidth=Math.max(k?E&&\"left\"===T?o.l+o.w:L:A?E&&\"right\"===T?o.r+o.w:L:o.w,2*d);var C=0,P=0;r.each((function(t){var e=t[0].width+d;C=Math.max(C,e),P+=e})),_=null;var I=0;if(l){var O=0,z=0,D=0;e.each((function(){var t=0,e=0;n.select(this).selectAll(\"g.traces\").each((function(r){var n=r[0].width,i=r[0].height;c.setTranslate(this,w[0],w[1]+u+h+i/2+e),e+=i,t=Math.max(t,d+n)}));var r=t+h;z>0&&r+u+z>i._maxWidth?(I=Math.max(I,z),z=0,D+=O+x,O=e):O=Math.max(O,e),c.setTranslate(this,z,D),z+=r})),i._width=Math.max(I,z)+u,i._height=D+O+g}else{var R=r.size(),F=P+f+(R-1)*h=i._maxWidth&&(I=Math.max(I,U),N=0,j+=B,i._height+=B,B=0),c.setTranslate(this,w[0]+u+N,w[1]+u+j+e/2+h),U=N+r+h,N+=n,B=Math.max(B,e)})),F?(i._width=N+f,i._height=B+g):(i._width=Math.max(I,U)+f,i._height+=B+g)}}i._width=Math.ceil(Math.max(i._width+w[0],i._titleWidth+2*(u+p.titlePad))),i._height=Math.ceil(Math.max(i._height+w[1],i._titleHeight+2*(u+p.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var V=t._context.edits,H=V.legendText||V.legendPosition;r.each((function(t){var e=n.select(this).select(\".legendtoggle\"),r=t[0].height,i=H?d:_||d+t[0].width;s||(i+=h/2),c.setRect(e,0,-r/2,i,r)}))}(t,z,D,e)},function(){var s,u,g,y,x=f._size,b=e.borderwidth;if(!d){if(function(t){var e=t._fullLayout.legend,r=M(e),n=S(e);return a.autoMargin(t,\"legend\",{x:e.x,y:e.y,l:e._width*m[r],r:e._width*v[r],b:e._effHeight*v[n],t:e._effHeight*m[n]})}(t))return;var w=x.l+x.w*e.x-m[M(e)]*e._width,k=x.t+x.h*(1-e.y)-m[S(e)]*e._effHeight;if(f.margin.autoexpand){var A=w,P=k;w=i.constrain(w,0,f.width-e._width),k=i.constrain(k,0,f.height-e._effHeight),w!==A&&i.log(\"Constrain legend.x to make legend fit inside graph\"),k!==P&&i.log(\"Constrain legend.y to make legend fit inside graph\")}c.setTranslate(T,w,k)}if(O.on(\".drag\",null),T.on(\"wheel\",null),d||e._height<=e._maxHeight||t._context.staticPlot){var I=e._effHeight;d&&(I=e._height),L.attr({width:e._width-b,height:I-b,x:b/2,y:b/2}),c.setTranslate(C,0,0),E.select(\"rect\").attr({width:e._width-2*b,height:I-2*b,x:b,y:b}),c.setClipUrl(C,h,t),c.setRect(O,0,0,0,0),delete e._scrollY}else{var z,D,R,F=Math.max(p.scrollBarMinHeight,e._effHeight*e._effHeight/e._height),B=e._effHeight-F-2*p.scrollBarMargin,N=e._height-e._effHeight,j=B/N,U=Math.min(e._scrollY||0,N);L.attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-b,x:b/2,y:b/2}),E.select(\"rect\").attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-2*b,x:b,y:b+U}),c.setClipUrl(C,h,t),q(U,F,j),T.on(\"wheel\",(function(){q(U=i.constrain(e._scrollY+n.event.deltaY/B*N,0,N),F,j),0!==U&&U!==N&&n.event.preventDefault()}));var V=n.behavior.drag().on(\"dragstart\",(function(){var t=n.event.sourceEvent;z=\"touchstart\"===t.type?t.changedTouches[0].clientY:t.clientY,R=U})).on(\"drag\",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(D=\"touchmove\"===t.type?t.changedTouches[0].clientY:t.clientY,q(U=function(t,e,r){var n=(r-e)/j+t;return i.constrain(n,0,N)}(R,z,D),F,j))}));O.call(V);var H=n.behavior.drag().on(\"dragstart\",(function(){var t=n.event.sourceEvent;\"touchstart\"===t.type&&(z=t.changedTouches[0].clientY,R=U)})).on(\"drag\",(function(){var t=n.event.sourceEvent;\"touchmove\"===t.type&&(D=t.changedTouches[0].clientY,q(U=function(t,e,r){var n=(e-r)/j+t;return i.constrain(n,0,N)}(R,z,D),F,j))}));C.call(H)}function q(r,n,i){e._scrollY=t._fullLayout.legend._scrollY=r,c.setTranslate(C,0,-r),c.setRect(O,e._width,p.scrollBarMargin+r*i,p.scrollBarWidth,n),E.select(\"rect\").attr(\"y\",b+r)}t._context.edits.legendPosition&&(T.classed(\"cursor-move\",!0),l.init({element:T.node(),gd:t,prepFn:function(){var t=c.getTranslate(T);g=t.x,y=t.y},moveFn:function(t,r){var n=g+t,i=y+r;c.setTranslate(T,n,i),s=l.align(n,0,x.l,x.l+x.w,e.xanchor),u=l.align(i,0,x.t+x.h,x.t,e.yanchor)},doneFn:function(){void 0!==s&&void 0!==u&&o.call(\"_guiRelayout\",t,{\"legend.x\":s,\"legend.y\":u})},clickFn:function(e,n){var i=r.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&&_(t,T,i,e,n)}}))}],t)}(t,e)}},{\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/events\":492,\"../../lib/svg_text_utils\":529,\"../../plots/plots\":619,\"../../registry\":638,\"../color\":366,\"../dragelement\":385,\"../drawing\":388,\"./constants\":417,\"./get_legend_data\":420,\"./handle_click\":421,\"./helpers\":422,\"./style\":424,\"@plotly/d3\":58}],420:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"./helpers\");e.exports=function(t,e){var r,a,o=e._inHover,s=i.isGrouped(e),l=i.isReversed(e),c={},u=[],f=!1,h={},p=0,d=0;function g(t,r){if(\"\"!==t&&i.isGrouped(e))-1===u.indexOf(t)?(u.push(t),f=!0,c[t]=[r]):c[t].push(r);else{var n=\"~~i\"+p;u.push(n),c[n]=[r],p++}}for(r=0;rA&&(k=A)}w[r][0]._groupMinRank=k,w[r][0]._preGroupSort=r}var M=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(w.forEach((function(t,e){t[0]._preGroupSort=e})),w.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),r=0;rr?r:t}e.exports=function(t,e,r){var v=e._fullLayout;r||(r=v.legend);var y=\"constant\"===r.itemsizing,x=r.itemwidth,b=(x+2*p.itemGap)/2,_=o(b,0),w=function(t,e,r,n){var i;if(t+1)i=t;else{if(!(e&&e.width>0))return 0;i=e.width}return y?n:Math.min(i,r)};function T(t,a,o){var u=t[0].trace,f=u.marker||{},h=f.line||{},p=o?u.visible&&u.type===o:i.traceIs(u,\"bar\"),d=n.select(a).select(\"g.legendpoints\").selectAll(\"path.legend\"+o).data(p?[t]:[]);d.enter().append(\"path\").classed(\"legend\"+o,!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),d.exit().remove(),d.each((function(t){var i=n.select(this),a=t[0],o=w(a.mlw,f.line,5,2);i.style(\"stroke-width\",o+\"px\");var p=a.mcc;if(!r._inHover&&\"mc\"in a){var d=c(f),g=d.mid;void 0===g&&(g=(d.max+d.min)/2),p=s.tryColorscale(f,\"\")(g)}var v=p||a.mc||f.color,y=f.pattern,x=y&&s.getPatternAttr(y.shape,0,\"\");if(x){var b=s.getPatternAttr(y.bgcolor,0,null),_=s.getPatternAttr(y.fgcolor,0,null),T=y.fgopacity,k=m(y.size,8,10),A=m(y.solidity,.5,1),M=\"legend-\"+u.uid;i.call(s.pattern,\"legend\",e,M,x,k,A,p,y.fillmode,b,_,T)}else i.call(l.fill,v);o&&l.stroke(i,a.mlc||h.color)}))}function k(t,e,r){var o=t[0],s=o.trace,l=r?s.visible&&s.type===r:i.traceIs(s,r),c=n.select(e).select(\"g.legendpoints\").selectAll(\"path.legend\"+r).data(l?[t]:[]);if(c.enter().append(\"path\").classed(\"legend\"+r,!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),c.exit().remove(),c.size()){var u=(s.marker||{}).line,p=w(h(u.width,o.pts),u,5,2),d=a.minExtend(s,{marker:{line:{width:p}}});d.marker.line.color=u.color;var g=a.minExtend(o,{trace:d});f(c,g,d)}}t.each((function(t){var e=n.select(this),i=a.ensureSingle(e,\"g\",\"layers\");i.style(\"opacity\",t[0].trace.opacity);var s=r.valign,l=t[0].lineHeight,c=t[0].height;if(\"middle\"!==s&&l&&c){var u={top:1,bottom:-1}[s]*(.5*(l-c+3));i.attr(\"transform\",o(0,u))}else i.attr(\"transform\",null);i.selectAll(\"g.legendfill\").data([t]).enter().append(\"g\").classed(\"legendfill\",!0),i.selectAll(\"g.legendlines\").data([t]).enter().append(\"g\").classed(\"legendlines\",!0);var f=i.selectAll(\"g.legendsymbols\").data([t]);f.enter().append(\"g\").classed(\"legendsymbols\",!0),f.selectAll(\"g.legendpoints\").data([t]).enter().append(\"g\").classed(\"legendpoints\",!0)})).each((function(t){var r,i=t[0].trace,o=[];if(i.visible)switch(i.type){case\"histogram2d\":case\"heatmap\":o=[[\"M-15,-2V4H15V-2Z\"]],r=!0;break;case\"choropleth\":case\"choroplethmapbox\":o=[[\"M-6,-6V6H6V-6Z\"]],r=!0;break;case\"densitymapbox\":o=[[\"M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0\"]],r=\"radial\";break;case\"cone\":o=[[\"M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z\"],[\"M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z\"],[\"M-6,-2 A2,2 0 0,0 -6,2 L6,0Z\"]],r=!1;break;case\"streamtube\":o=[[\"M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z\"],[\"M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z\"],[\"M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z\"]],r=!1;break;case\"surface\":o=[[\"M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z\"],[\"M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z\"]],r=!0;break;case\"mesh3d\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6H6L0,6Z\"]],r=!1;break;case\"volume\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6H6L0,6Z\"]],r=!0;break;case\"isosurface\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6 A12,24 0 0,0 6,-6 L0,6Z\"]],r=!1}var u=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legend3dandfriends\").data(o);u.enter().append(\"path\").classed(\"legend3dandfriends\",!0).attr(\"transform\",_).style(\"stroke-miterlimit\",1),u.exit().remove(),u.each((function(t,o){var u,f=n.select(this),h=c(i),p=h.colorscale,g=h.reversescale;if(p){if(!r){var m=p.length;u=0===o?p[g?m-1:0][1]:1===o?p[g?0:m-1][1]:p[Math.floor((m-1)/2)][1]}}else{var v=i.vertexcolor||i.facecolor||i.color;u=a.isArrayOrTypedArray(v)?v[o]||v[0]:v}f.attr(\"d\",t[0]),u?f.call(l.fill,u):f.call((function(t){if(t.size()){var n=\"legendfill-\"+i.uid;s.gradient(t,e,n,d(g,\"radial\"===r),p,\"fill\")}}))}))})).each((function(t){var e=t[0].trace,r=\"waterfall\"===e.type;if(t[0]._distinct&&r){var i=t[0].trace[t[0].dir].marker;return t[0].mc=i.color,t[0].mlw=i.line.width,t[0].mlc=i.line.color,T(t,this,\"waterfall\")}var a=[];e.visible&&r&&(a=t[0].hasTotals?[[\"increasing\",\"M-6,-6V6H0Z\"],[\"totals\",\"M6,6H0L-6,-6H-0Z\"],[\"decreasing\",\"M6,6V-6H0Z\"]]:[[\"increasing\",\"M-6,-6V6H6Z\"],[\"decreasing\",\"M6,6V-6H-6Z\"]]);var o=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendwaterfall\").data(a);o.enter().append(\"path\").classed(\"legendwaterfall\",!0).attr(\"transform\",_).style(\"stroke-miterlimit\",1),o.exit().remove(),o.each((function(t){var r=n.select(this),i=e[t[0]].marker,a=w(void 0,i.line,5,2);r.attr(\"d\",t[1]).style(\"stroke-width\",a+\"px\").call(l.fill,i.color),a&&r.call(l.stroke,i.line.color)}))})).each((function(t){T(t,this,\"funnel\")})).each((function(t){T(t,this)})).each((function(t){var r=t[0].trace,o=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendbox\").data(r.visible&&i.traceIs(r,\"box-violin\")?[t]:[]);o.enter().append(\"path\").classed(\"legendbox\",!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),o.exit().remove(),o.each((function(){var t=n.select(this);if(\"all\"!==r.boxpoints&&\"all\"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=w(void 0,r.line,5,2);t.style(\"stroke-width\",i+\"px\").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var c=a.minExtend(r,{marker:{size:y?12:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:\"diameter\"}});o.call(s.pointStyle,c,e)}}))})).each((function(t){k(t,this,\"funnelarea\")})).each((function(t){k(t,this,\"pie\")})).each((function(t){var r,i,o=g(t),l=o.showFill,f=o.showLine,h=o.showGradientLine,p=o.showGradientFill,m=o.anyFill,v=o.anyLine,y=t[0],b=y.trace,_=c(b),T=_.colorscale,k=_.reversescale,A=u.hasMarkers(b)||!m?\"M5,0\":v?\"M5,-2\":\"M5,-3\",M=n.select(this),S=M.select(\".legendfill\").selectAll(\"path\").data(l||p?[t]:[]);if(S.enter().append(\"path\").classed(\"js-fill\",!0),S.exit().remove(),S.attr(\"d\",A+\"h\"+x+\"v6h-\"+x+\"z\").call(l?s.fillGroupStyle:function(t){if(t.size()){var r=\"legendfill-\"+b.uid;s.gradient(t,e,r,d(k),T,\"fill\")}}),f||h){var E=w(void 0,b.line,10,5);i=a.minExtend(b,{line:{width:E}}),r=[a.minExtend(y,{trace:i})]}var L=M.select(\".legendlines\").selectAll(\"path\").data(f||h?[r]:[]);L.enter().append(\"path\").classed(\"js-line\",!0),L.exit().remove(),L.attr(\"d\",A+(h?\"l\"+x+\",0.0001\":\"h\"+x)).call(f?s.lineGroupStyle:function(t){if(t.size()){var r=\"legendline-\"+b.uid;s.lineGroupStyle(t),s.gradient(t,e,r,d(k),T,\"stroke\")}})})).each((function(t){var r,i,o=g(t),l=o.anyFill,c=o.anyLine,f=o.showLine,h=o.showMarker,p=t[0],d=p.trace,m=!h&&!c&&!l&&u.hasText(d);function v(t,e,r,n){var i=a.nestedProperty(d,t).get(),o=a.isArrayOrTypedArray(i)&&e?e(i):i;if(y&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function x(t){return p._distinct&&p.index&&t[p.index]?t[p.index]:t[0]}if(h||m||f){var b={},w={};if(h){b.mc=v(\"marker.color\",x),b.mx=v(\"marker.symbol\",x),b.mo=v(\"marker.opacity\",a.mean,[.2,1]),b.mlc=v(\"marker.line.color\",x),b.mlw=v(\"marker.line.width\",a.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:\"diameter\"};var T=v(\"marker.size\",a.mean,[2,16],12);b.ms=T,w.marker.size=T}f&&(w.line={width:v(\"line.width\",x,[0,10],5)}),m&&(b.tx=\"Aa\",b.tp=v(\"textposition\",x),b.ts=10,b.tc=v(\"textfont.color\",x),b.tf=v(\"textfont.family\",x)),r=[a.minExtend(p,b)],(i=a.minExtend(d,w)).selectedpoints=null,i.texttemplate=null}var k=n.select(this).select(\"g.legendpoints\"),A=k.selectAll(\"path.scatterpts\").data(h?r:[]);A.enter().insert(\"path\",\":first-child\").classed(\"scatterpts\",!0).attr(\"transform\",_),A.exit().remove(),A.call(s.pointStyle,i,e),h&&(r[0].mrc=3);var M=k.selectAll(\"g.pointtext\").data(m?r:[]);M.enter().append(\"g\").classed(\"pointtext\",!0).append(\"text\").attr(\"transform\",_),M.exit().remove(),M.selectAll(\"text\").call(s.textPointStyle,i,e)})).each((function(t){var e=t[0].trace,r=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendcandle\").data(e.visible&&\"candlestick\"===e.type?[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\",_).style(\"stroke-miterlimit\",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?\"increasing\":\"decreasing\"],o=w(void 0,a.line,5,2);i.style(\"stroke-width\",o+\"px\").call(l.fill,a.fillcolor),o&&l.stroke(i,a.line.color)}))})).each((function(t){var e=t[0].trace,r=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendohlc\").data(e.visible&&\"ohlc\"===e.type?[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\",_).style(\"stroke-miterlimit\",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?\"increasing\":\"decreasing\"],o=w(void 0,a.line,5,2);i.style(\"fill\",\"none\").call(s.dashLine,a.line.dash,o),o&&l.stroke(i,a.line.color)}))}))}},{\"../../lib\":503,\"../../registry\":638,\"../../traces/pie/helpers\":905,\"../../traces/pie/style_one\":911,\"../../traces/scatter/subtypes\":951,\"../color\":366,\"../colorscale/helpers\":377,\"../drawing\":388,\"./constants\":417,\"@plotly/d3\":58}],425:[function(t,e,r){\"use strict\";t(\"./constants\");e.exports={editType:\"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\"},uirevision:{valType:\"any\",editType:\"none\"},add:{valType:\"string\",arrayOk:!0,dflt:\"\",editType:\"modebar\"},remove:{valType:\"string\",arrayOk:!0,dflt:\"\",editType:\"modebar\"}}},{\"./constants\":427}],426:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../plots/plots\"),a=t(\"../../plots/cartesian/axis_ids\"),o=t(\"../../fonts/ploticon\"),s=t(\"../shapes/draw\").eraseActiveShape,l=t(\"../../lib\"),c=l._,u=e.exports={};function f(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=c._cartesianSpikesEnabled;if(\"zoom\"===s){var p,d=\"in\"===l?.5:2,g=(1+d)/2,m=(1-d)/2;for(i=0;i1?(I=[\"toggleHover\"],O=[\"resetViews\"]):v?(P=[\"zoomInGeo\",\"zoomOutGeo\"],I=[\"hoverClosestGeo\"],O=[\"resetGeo\"]):m?(I=[\"hoverClosest3d\"],O=[\"resetCameraDefault3d\",\"resetCameraLastSave3d\"]):w?(P=[\"zoomInMapbox\",\"zoomOutMapbox\"],I=[\"toggleHover\"],O=[\"resetViewMapbox\"]):b?I=[\"hoverClosestGl2d\"]:y?I=[\"hoverClosestPie\"]:A?(I=[\"hoverClosestCartesian\",\"hoverCompareCartesian\"],O=[\"resetViewSankey\"]):I=[\"toggleHover\"];g&&(I=[\"toggleSpikelines\",\"hoverClosestCartesian\",\"hoverCompareCartesian\"]);(function(t){for(var e=0;e0)){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.max)e=F[r+1];else if(t=n.pmax)e=F[r+1];else if(t0?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||\"multicategory\"===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;lp&&(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;oy?(k=f,E=\"y0\",A=y,L=\"y1\"):(k=y,E=\"y1\",A=f,L=\"y0\");Z(n),Q(s,r),function(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),s=a.getFromId(r,i),l=\"\";\"paper\"===n||o.autorange||(l+=n);\"paper\"===i||s.autorange||(l+=i);u.setClipUrl(t,l?\"clip\"+r._fullLayout._uid+l:null,r)}(e,r,t),X.moveFn=\"move\"===O?J:K,X.altKey=n.altKey},doneFn:function(){if(v(t))return;p(e),$(s),b(e,t,r),n.call(\"_guiRelayout\",t,l.getUpdateObj())},clickFn:function(){if(v(t))return;$(s)}};function Z(r){if(v(t))O=null;else if(R)O=\"path\"===r.target.tagName?\"move\":\"start-point\"===r.target.attributes[\"data-line-point\"].value?\"resize-over-start-point\":\"resize-over-end-point\";else{var n=X.element.getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top,o=r.clientX-n.left,s=r.clientY-n.top,l=!F&&i>10&&a>10&&!r.shiftKey?h.getCursor(o/i,1-s/a):\"move\";p(e,l),O=l.split(\"-\")[0]}}function J(n,i){if(\"path\"===r.type){var a=function(t){return t},o=a,l=a;z?B(\"xanchor\",r.xanchor=G(x+n)):(o=function(t){return G(H(t)+n)},N&&\"date\"===N.type&&(o=g.encodeDate(o))),D?B(\"yanchor\",r.yanchor=Y(T+i)):(l=function(t){return Y(q(t)+i)},U&&\"date\"===U.type&&(l=g.encodeDate(l))),B(\"path\",r.path=w(I,o,l))}else z?B(\"xanchor\",r.xanchor=G(x+n)):(B(\"x0\",r.x0=G(c+n)),B(\"x1\",r.x1=G(m+n))),D?B(\"yanchor\",r.yanchor=Y(T+i)):(B(\"y0\",r.y0=Y(f+i)),B(\"y1\",r.y1=Y(y+i)));e.attr(\"d\",_(t,r)),Q(s,r)}function K(n,i){if(F){var a=function(t){return t},o=a,l=a;z?B(\"xanchor\",r.xanchor=G(x+n)):(o=function(t){return G(H(t)+n)},N&&\"date\"===N.type&&(o=g.encodeDate(o))),D?B(\"yanchor\",r.yanchor=Y(T+i)):(l=function(t){return Y(q(t)+i)},U&&\"date\"===U.type&&(l=g.encodeDate(l))),B(\"path\",r.path=w(I,o,l))}else if(R){if(\"resize-over-start-point\"===O){var u=c+n,h=D?f-i:f+i;B(\"x0\",r.x0=z?u:G(u)),B(\"y0\",r.y0=D?h:Y(h))}else if(\"resize-over-end-point\"===O){var p=m+n,d=D?y-i:y+i;B(\"x1\",r.x1=z?p:G(p)),B(\"y1\",r.y1=D?d:Y(d))}}else{var v=function(t){return-1!==O.indexOf(t)},b=v(\"n\"),j=v(\"s\"),V=v(\"w\"),W=v(\"e\"),X=b?k+i:k,Z=j?A+i:A,J=V?M+n:M,K=W?S+n:S;D&&(b&&(X=k-i),j&&(Z=A-i)),(!D&&Z-X>10||D&&X-Z>10)&&(B(E,r[E]=D?X:Y(X)),B(L,r[L]=D?Z:Y(Z))),K-J>10&&(B(C,r[C]=z?J:G(J)),B(P,r[P]=z?K:G(K)))}e.attr(\"d\",_(t,r)),Q(s,r)}function Q(t,e){(z||D)&&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=H(z?e.xanchor:i.midRange(r?[e.x0,e.x1]:g.extractPathCoords(e.path,d.paramIsX))),o=q(D?e.yanchor:i.midRange(r?[e.y0,e.y1]:g.extractPathCoords(e.path,d.paramIsY)));if(a=g.roundPositionForSharpStrokeRendering(a,1),o=g.roundPositionForSharpStrokeRendering(o,1),z&&D){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(z){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 $(t){t.selectAll(\".visual-cue\").remove()}h.init(X),W.node().onmousemove=Z}(t,z,l,e,r,O):!0===l.editable&&z.style(\"pointer-events\",P||c.opacity(S)*M<=.5?\"stroke\":\"all\");z.node().addEventListener(\"click\",(function(){return function(t,e){if(!y(t))return;var r=+e.node().getAttribute(\"data-index\");if(r>=0){if(r===t._fullLayout._activeShapeIndex)return void T(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=T,m(t)}}(t,z)}))}}function b(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,\"\").replace(/[xyz][1-9]* *domain/g,\"\");u.setClipUrl(t,n?\"clip\"+e._fullLayout._uid+n:null,e)}function _(t,e){var r,n,o,s,l,c,u,f,h=e.type,p=a.getRefType(e.xref),m=a.getRefType(e.yref),v=a.getFromId(t,e.xref),y=a.getFromId(t,e.yref),x=t._fullLayout._size;if(v?\"domain\"===p?n=function(t){return v._offset+v._length*t}:(r=g.shapePositionToRange(v),n=function(t){return v._offset+v.r2p(r(t,!0))}):n=function(t){return x.l+x.w*t},y?\"domain\"===m?s=function(t){return y._offset+y._length*(1-t)}:(o=g.shapePositionToRange(y),s=function(t){return y._offset+y.r2p(o(t,!0))}):s=function(t){return x.t+x.h*(1-t)},\"path\"===h)return v&&\"date\"===v.type&&(n=g.decodeDate(n)),y&&\"date\"===y.type&&(s=g.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(d.segmentRE,(function(t){var n=0,c=t.charAt(0),u=d.paramIsX[c],f=d.paramIsY[c],h=d.numParams[c],p=t.substr(1).replace(d.paramRE,(function(t){return u[n]?t=\"pixel\"===a?e(s)+Number(t):e(t):f[n]&&(t=\"pixel\"===o?r(l)-Number(t):r(t)),++n>h&&(t=\"X\"),t}));return n>h&&(p=p.replace(/[\\s,]*X.*/,\"\"),i.log(\"Ignoring extra params in segment \"+t)),c+p}))}(e,n,s);if(\"pixel\"===e.xsizemode){var b=n(e.xanchor);l=b+e.x0,c=b+e.x1}else l=n(e.x0),c=n(e.x1);if(\"pixel\"===e.ysizemode){var _=s(e.yanchor);u=_-e.y0,f=_-e.y1}else u=s(e.y0),f=s(e.y1);if(\"line\"===h)return\"M\"+l+\",\"+u+\"L\"+c+\",\"+f;if(\"rect\"===h)return\"M\"+l+\",\"+u+\"H\"+c+\"V\"+f+\"H\"+l+\"Z\";var w=(l+c)/2,T=(u+f)/2,k=Math.abs(w-l),A=Math.abs(T-u),M=\"A\"+k+\",\"+A,S=w+k+\",\"+T;return\"M\"+S+M+\" 0 1,1 \"+(w+\",\"+(T-A))+M+\" 0 0,1 \"+S+\"Z\"}function w(t,e,r){return t.replace(d.segmentRE,(function(t){var n=0,i=t.charAt(0),a=d.paramIsX[i],o=d.paramIsY[i],s=d.numParams[i];return i+t.substr(1).replace(d.paramRE,(function(t){return n>=s||(a[n]?t=e(t):o[n]&&(t=r(t)),n++),t}))}))}function T(t){y(t)&&(t._fullLayout._activeShapeIndex>=0&&(l(t),delete t._fullLayout._activeShapeIndex,m(t)))}e.exports={draw:m,drawOne:x,eraseActiveShape:function(t){if(!y(t))return;l(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e=0&&f(v),r.attr(\"d\",g(e)),A&&!h)&&(k=function(t,e){for(var r=0;r1&&(2!==t.length||\"Z\"!==t[1][0])&&(0===T&&(t[0][0]=\"M\"),e[w]=t,y(),x())}}()}}function I(t,r){!function(t,r){if(e.length)for(var n=0;n0&&l0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr(\"transform\",l(o-.5*f.gripWidth,e._dims.currentValueTotalHeight))}}function E(t,e){var r=t._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,e))}function L(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 C(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 P(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;i0?[0]:[]);function s(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,m(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,v);l.enter().append(\"g\").classed(f.groupClassName,!0),l.exit().each(s).remove();for(var c=0;c0||h<0){var v={left:[-d,0],right:[d,0],top:[0,-d],bottom:[0,d]}[b.side];e.attr(\"transform\",l(v[0],v[1]))}}}return R.call(F),O&&(E?R.on(\".opacity\",null):(A=0,M=!0,R.text(y).on(\"mouseover.opacity\",(function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style(\"opacity\",1)})).on(\"mouseout.opacity\",(function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style(\"opacity\",0)}))),R.call(f.makeEditable,{gd:t}).on(\"edit\",(function(e){void 0!==x?o.call(\"_guiRestyle\",t,v,e,x):o.call(\"_guiRelayout\",t,v,e)})).on(\"cancel\",(function(){this.text(this.attr(\"data-unformatted\")).call(F)})).on(\"input\",(function(t){this.text(t||\" \").call(f.positionText,_.x,_.y)}))),R.classed(\"js-placeholder\",M),T}}},{\"../../constants/alignment\":471,\"../../constants/interactions\":478,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/plots\":619,\"../../registry\":638,\"../color\":366,\"../drawing\":388,\"@plotly/d3\":58,\"fast-isnumeric\":190}],465:[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\"}]},args2:{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({editType:\"arraydraw\"}),{}),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\":493,\"../../plot_api/edit_types\":536,\"../../plot_api/plot_template\":543,\"../../plots/font_attributes\":585,\"../../plots/pad_attributes\":618,\"../color/attributes\":365}],466:[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\"}}},{}],467:[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(\"args2\"),r(\"label\"),r(\"execute\"))}e.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},{\"../../lib\":503,\"../../plots/array_container_defaults\":549,\"./attributes\":465,\"./constants\":466}],468:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../plots/plots\"),a=t(\"../color\"),o=t(\"../drawing\"),s=t(\"../../lib\"),l=t(\"../../lib/svg_text_utils\"),c=t(\"../../plot_api/plot_template\").arrayEditor,u=t(\"../../constants/alignment\").LINE_SPACING,f=t(\"./constants\"),h=t(\"./scrollbox\");function p(t){return t._index}function d(t,e){return+t.attr(f.menuIndexAttrName)===e._index}function g(t,e,r,n,i,a,o,s){e.active=o,c(t.layout,f.name,e).applyUpdate(\"active\",o),\"buttons\"===e.type?v(t,n,null,null,e):\"dropdown\"===e.type&&(i.attr(f.menuIndexAttrName,\"-1\"),m(t,n,i,a,e),s||v(t,n,i,a,e))}function m(t,e,r,n,i){var a=s.ensureSingle(e,\"g\",f.headerClassName,(function(t){t.style(\"pointer-events\",\"all\")})),l=i._dims,c=i.active,u=i.buttons[c]||f.blankHeaderOpts,h={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};a.call(y,i,u,t).call(M,i,h,p),s.ensureSingle(e,\"text\",f.headerArrowClassName,(function(t){t.attr(\"text-anchor\",\"end\").call(o.font,i.font).text(f.arrowSymbol[i.direction])})).attr({x:l.headerWidth-f.arrowOffsetX+i.pad.l,y:l.headerHeight/2+f.textOffsetY+i.pad.t}),a.on(\"click\",(function(){r.call(S,String(d(r,i)?-1:i._index)),v(t,e,r,n,i)})),a.on(\"mouseover\",(function(){a.call(w)})),a.on(\"mouseout\",(function(){a.call(T,i)})),o.setTranslate(e,l.lx,l.ly)}function v(t,e,r,a,o){r||(r=e).attr(\"pointer-events\",\"all\");var l=function(t){return-1==+t.attr(f.menuIndexAttrName)}(r)&&\"buttons\"!==o.type?[]:o.buttons,c=\"dropdown\"===o.type?f.dropdownButtonClassName:f.buttonClassName,u=r.selectAll(\"g.\"+c).data(s.filterVisible(l)),h=u.enter().append(\"g\").classed(c,!0),p=u.exit();\"dropdown\"===o.type?(h.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\"),p.transition().attr(\"opacity\",\"0\").remove()):p.remove();var d=0,m=0,v=o._dims,x=-1!==[\"up\",\"down\"].indexOf(o.direction);\"dropdown\"===o.type&&(x?m=v.headerHeight+f.gapButtonHeader:d=v.headerWidth+f.gapButtonHeader),\"dropdown\"===o.type&&\"up\"===o.direction&&(m=-f.gapButtonHeader+f.gapButton-v.openHeight),\"dropdown\"===o.type&&\"left\"===o.direction&&(d=-f.gapButtonHeader+f.gapButton-v.openWidth);var b={x:v.lx+d+o.pad.l,y:v.ly+m+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},k={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each((function(s,l){var c=n.select(this);c.call(y,o,s,t).call(M,o,b),c.on(\"click\",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(g(t,o,0,e,r,a,-1),i.executeAPICommand(t,s.method,s.args2)):(g(t,o,0,e,r,a,l),i.executeAPICommand(t,s.method,s.args))),t.emit(\"plotly_buttonclicked\",{menu:o,button:s,active:o.active}))})),c.on(\"mouseover\",(function(){c.call(w)})),c.on(\"mouseout\",(function(){c.call(T,o),u.call(_,o)}))})),u.call(_,o),x?(k.w=Math.max(v.openWidth,v.headerWidth),k.h=b.y-k.t):(k.w=b.x-k.l,k.h=Math.max(v.openHeight,v.headerHeight)),k.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,h=i._dims,p=i.active;if(u)for(s=0,l=0;l0?[0]:[]);if(o.enter().append(\"g\").classed(f.containerClassName,!0).style(\"cursor\",\"pointer\"),o.exit().each((function(){n.select(this).selectAll(\"g.\"+f.headerGroupClassName).each(a)})).remove(),0!==r.length){var l=o.selectAll(\"g.\"+f.headerGroupClassName).data(r,p);l.enter().append(\"g\").classed(f.headerGroupClassName,!0);for(var c=s.ensureSingle(o,\"g\",f.dropdownButtonGroupClassName,(function(t){t.style(\"pointer-events\",\"all\")})),u=0;uw,A=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,S=d,E=m+v;E+M>c&&(E=c-M);var L=this.container.selectAll(\"rect.scrollbar-horizontal\").data(k?[0]:[]);L.exit().on(\".drag\",null).remove(),L.enter().append(\"rect\").classed(\"scrollbar-horizontal\",!0).call(i.fill,s.barColor),k?(this.hbar=L.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:E,width:A,height:M}),this._hbarXMin=S+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=v>T,P=s.barWidth+2*s.barPad,I=s.barLength+2*s.barPad,O=d+g,z=m;O+P>l&&(O=l-P);var D=this.container.selectAll(\"rect.scrollbar-vertical\").data(C?[0]:[]);D.exit().on(\".drag\",null).remove(),D.enter().append(\"rect\").classed(\"scrollbar-vertical\",!0).call(i.fill,s.barColor),C?(this.vbar=D.attr({rx:s.barRadius,ry:s.barRadius,x:O,y:z,width:P,height:I}),this._vbarYMin=z+I/2,this._vbarTranslateMax=T-I):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,B=C?f+P+.5:f+.5,N=h-.5,j=k?p+M+.5:p+.5,U=o._topdefs.selectAll(\"#\"+R).data(k||C?[0]:[]);if(U.exit().remove(),U.enter().append(\"clipPath\").attr(\"id\",R).append(\"rect\"),k||C?(this._clipRect=U.select(\"rect\").attr({x:Math.floor(F),y:Math.floor(N),width:Math.ceil(B)-Math.floor(F),height:Math.ceil(j)-Math.floor(N)}),this.container.call(a.setClipUrl,R,this.gd),this.bg.attr({x:d,y:m,width:g,height:v})):(this.bg.attr({width:0,height:0}),this.container.on(\"wheel\",null).on(\".drag\",null).call(a.setClipUrl,null),delete this._clipRect),k||C){var V=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(V);var H=n.behavior.drag().on(\"dragstart\",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on(\"drag\",this._onBarDrag.bind(this));k&&this.hbar.on(\".drag\",null).call(H),C&&this.vbar.on(\".drag\",null).call(H)}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\":503,\"../color\":366,\"../drawing\":388,\"@plotly/d3\":58}],471:[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,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:\"right\",right:\"left\",top:\"bottom\",bottom:\"top\"}}},{}],472:[function(t,e,r){\"use strict\";e.exports={axisRefDescription:function(t,e,r){return[\"If set to a\",t,\"axis id (e.g. *\"+t+\"* or\",\"*\"+t+\"2*), the `\"+t+\"` position refers to a\",t,\"coordinate. If set to *paper*, the `\"+t+\"`\",\"position refers to the distance from the\",e,\"of the plotting\",\"area in normalized coordinates where *0* (*1*) corresponds to the\",e,\"(\"+r+\"). If set to a\",t,\"axis ID followed by\",\"*domain* (separated by a space), the position behaves like for\",\"*paper*, but refers to the distance in fractions of the domain\",\"length from the\",e,\"of the domain of that axis: e.g.,\",\"*\"+t+\"2 domain* refers to the domain of the second\",t,\" axis and a\",t,\"position of 0.5 refers to the\",\"point between the\",e,\"and the\",r,\"of the domain of the\",\"second\",t,\"axis.\"].join(\" \")}}},{}],473:[function(t,e,r){\"use strict\";e.exports={INCREASING:{COLOR:\"#3D9970\",SYMBOL:\"\\u25b2\"},DECREASING:{COLOR:\"#FF4136\",SYMBOL:\"\\u25bc\"}}},{}],474:[function(t,e,r){\"use strict\";e.exports={FORMAT_LINK:\"https://github.com/d3/d3-format/tree/v1.4.5#d3-format\",DATE_FORMAT_LINK:\"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format\"}},{}],475:[function(t,e,r){\"use strict\";e.exports={COMPARISON_OPS:[\"=\",\"!=\",\"<\",\">=\",\">\",\"<=\"],COMPARISON_OPS2:[\"=\",\"<\",\">=\",\">\",\"<=\"],INTERVAL_OPS:[\"[]\",\"()\",\"[)\",\"(]\",\"][\",\")(\",\"](\",\")[\"],SET_OPS:[\"{}\",\"}{\"],CONSTRAINT_REDUCTION:{\"=\":\"=\",\"<\":\"<\",\"<=\":\"<\",\">\":\">\",\">=\":\">\",\"[]\":\"[]\",\"()\":\"[]\",\"[)\":\"[]\",\"(]\":\"[]\",\"][\":\"][\",\")(\":\"][\",\"](\":\"][\",\")[\":\"][\"}}},{}],476:[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]}},{}],477:[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\"}},{}],478:[function(t,e,r){\"use strict\";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],479:[function(t,e,r){\"use strict\";e.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:\"\\u2212\"}},{}],480:[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}},{}],481:[function(t,e,r){\"use strict\";r.version=t(\"./version\").version,t(\"native-promise-only\"),t(\"../build/plotcss\");for(var n=t(\"./registry\"),i=r.register=n.register,a=t(\"./plot_api\"),o=Object.keys(a),s=0;splotly-logomark\"}}},{}],483:[function(t,e,r){\"use strict\";r.isLeftAnchor=function(t){return\"left\"===t.xanchor||\"auto\"===t.xanchor&&t.x<=1/3},r.isCenterAnchor=function(t){return\"center\"===t.xanchor||\"auto\"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isRightAnchor=function(t){return\"right\"===t.xanchor||\"auto\"===t.xanchor&&t.x>=2/3},r.isTopAnchor=function(t){return\"top\"===t.yanchor||\"auto\"===t.yanchor&&t.y>=2/3},r.isMiddleAnchor=function(t){return\"middle\"===t.yanchor||\"auto\"===t.yanchor&&t.y>1/3&&t.y<2/3},r.isBottomAnchor=function(t){return\"bottom\"===t.yanchor||\"auto\"===t.yanchor&&t.y<=1/3}},{}],484:[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-14}function c(t,e){return a(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0](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 m(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}g?(u=0,f=o,h=s):r=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\":510}],485:[function(t,e,r){\"use strict\";var n=Array.isArray,i=ArrayBuffer,a=DataView;function o(t){return i.isView(t)&&!(t instanceof a)}function s(t){return n(t)||o(t)}function l(t,e,r){if(s(t)){if(s(t[0])){for(var n=r,i=0;ii.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&ti.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.get(t,r))}},angle:{coerceFunction:function(t,e,r){\"auto\"===t?e.set(\"auto\"):n(t)?e.set(f(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||u(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&&!!u(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=n&&t<=i?t:u}if(\"string\"!=typeof t&&\"number\"!=typeof t)return u;t=String(t);var c=_(e),v=t.charAt(0);!c||\"G\"!==v&&\"g\"!==v||(t=t.substr(1),e=\"\");var w=c&&\"chinese\"===e.substr(0,7),T=t.match(w?x:y);if(!T)return u;var k=T[1],A=T[3]||\"1\",M=Number(T[5]||1),S=Number(T[7]||0),E=Number(T[9]||0),L=Number(T[11]||0);if(c){if(2===k.length)return u;var C;k=Number(k);try{var P=m.getComponentMethod(\"calendars\",\"getCal\")(e);if(w){var I=\"i\"===A.charAt(A.length-1);A=parseInt(A,10),C=P.newDate(k,P.toMonthIndex(k,A,I),M)}else C=P.newDate(k,Number(A),M)}catch(t){return u}return C?(C.toJD()-g)*f+S*h+E*p+L*d:u}k=2===k.length?(Number(k)+2e3-b)%100+b:Number(k),A-=1;var O=new Date(Date.UTC(2e3,A,M,S,E));return O.setUTCFullYear(k),O.getUTCMonth()!==A||O.getUTCDate()!==M?u:O.getTime()+L*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 T=90*f,k=3*h,A=5*p;function M(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,E=Math.floor(l(t,f));try{a=m.getComponentMethod(\"calendars\",\"getCal\")(r).fromJD(S).formatDate(\"yyyy-mm-dd\")}catch(t){a=v(\"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=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 M(a(\"%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,E=/%h/g,L={1:\"1\",2:\"1\",3:\"2\",4:\"2\"};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(t=t.replace(E,(function(){return L[r(\"%q\")(i)]})),_(n))try{t=m.getComponentMethod(\"calendars\",\"worldCalFmt\")(t,e,n)}catch(t){return\"Invalid\"}return r(t)(i)}var P=[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),P[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 I=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=m.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+I);return c.setUTCMonth(c.getUTCMonth()+e)+n-I},r.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,c=_(e)&&m.getComponentMethod(\"calendars\",\"getCal\")(e),u=0;u0&&t[e+1][0]<0)return e;return null}switch(e=\"RUS\"===s||\"FJI\"===s?function(t){var e;if(null===c(t))e=t;else for(e=new Array(t.length),i=0;ie?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 a=h.tester(r);a.pts.pop(),l.push(a)}:function(t){l.push(h.tester(t))},a.type){case\"MultiPolygon\":for(r=0;ri&&(i=c,e=l)}else e=r;return o.default(e).geometry.coordinates}(u),n.fIn=t,n.fOut=u,s.push(u)}else c.log([\"Location\",n.loc,\"does not have a valid GeoJSON geometry.\",\"Traces with locationmode *geojson-id* only support\",\"*Polygon* and *MultiPolygon* geometries.\"].join(\" \"))}delete i[r]}switch(r.type){case\"FeatureCollection\":var h=r.features;for(n=0;n100?(clearInterval(a),n(\"Unexpected error while fetching from \"+t)):void i++}),50)}))}for(var o=0;o0&&(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;r1||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,m=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(m)},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.xo?r.x-o:0,f=r.yl?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;f0?p=i:h=i,f++}return a}},{\"./mod\":510}],499:[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(\"./array\").isArrayOrTypedArray,c=a(s);function u(t,e){var r=t;return r[3]*=e,r}function f(t){if(n(t))return c;var e=a(t);return e.length?e:c}function h(t){return n(t)?t:1}e.exports={formatColor:function(t,e,r){var n,i,s,p,d,g=t.color,m=l(g),v=l(e),y=o.extractOpts(t),x=[];if(n=void 0!==y.colorscale?o.makeColorScaleFuncFromTrace(t):f,i=m?function(t,e){return void 0===t[e]?c:a(n(t[e]))}:f,s=v?function(t,e){return void 0===t[e]?1:h(t[e])}:h,m||v)for(var b=0;b1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var a=String(e).length;if(i>=String(t).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf(\"e+\")&&(n=+o)}}return n}},{}],503:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-time-format\").utcFormat,a=t(\"d3-format\").format,o=t(\"fast-isnumeric\"),s=t(\"../constants/numerical\"),l=s.FP_SAFE,c=-l,u=s.BADNUM,f=e.exports={};f.adjustFormat=function(t){return!t||/^\\d[.]\\df/.test(t)||/[.]\\d%/.test(t)?t:\"0.f\"===t?\"~f\":/^\\d%/.test(t)?\"~%\":/^\\ds/.test(t)?\"~s\":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?\"~\"+t:t};var h={};f.warnBadFormat=function(t){var e=String(t);h[e]||(h[e]=1,f.warn('encountered bad format: \"'+e+'\"'))},f.noFormat=function(t){return String(t)},f.numberFormat=function(t){var e;try{e=a(f.adjustFormat(t))}catch(e){return f.warnBadFormat(t),f.noFormat}return e},f.nestedProperty=t(\"./nested_property\"),f.keyedContainer=t(\"./keyed_container\"),f.relativeAttr=t(\"./relative_attr\"),f.isPlainObject=t(\"./is_plain_object\"),f.toLogRange=t(\"./to_log_range\"),f.relinkPrivateKeys=t(\"./relink_private\");var p=t(\"./array\");f.isTypedArray=p.isTypedArray,f.isArrayOrTypedArray=p.isArrayOrTypedArray,f.isArray1D=p.isArray1D,f.ensureArray=p.ensureArray,f.concat=p.concat,f.maxRowLength=p.maxRowLength,f.minRowLength=p.minRowLength;var d=t(\"./mod\");f.mod=d.mod,f.modHalf=d.modHalf;var g=t(\"./coerce\");f.valObjectMeta=g.valObjectMeta,f.coerce=g.coerce,f.coerce2=g.coerce2,f.coerceFont=g.coerceFont,f.coercePattern=g.coercePattern,f.coerceHoverinfo=g.coerceHoverinfo,f.coerceSelectionMarkerOpacity=g.coerceSelectionMarkerOpacity,f.validate=g.validate;var m=t(\"./dates\");f.dateTime2ms=m.dateTime2ms,f.isDateTime=m.isDateTime,f.ms2DateTime=m.ms2DateTime,f.ms2DateTimeLocal=m.ms2DateTimeLocal,f.cleanDate=m.cleanDate,f.isJSDate=m.isJSDate,f.formatDate=m.formatDate,f.incrementMonth=m.incrementMonth,f.dateTick0=m.dateTick0,f.dfltRange=m.dfltRange,f.findExactDates=m.findExactDates,f.MIN_MS=m.MIN_MS,f.MAX_MS=m.MAX_MS;var v=t(\"./search\");f.findBin=v.findBin,f.sorterAsc=v.sorterAsc,f.sorterDes=v.sorterDes,f.distinctVals=v.distinctVals,f.roundUp=v.roundUp,f.sort=v.sort,f.findIndexOfMin=v.findIndexOfMin,f.sortObjectKeys=t(\"./sort_object_keys\");var y=t(\"./stats\");f.aggNums=y.aggNums,f.len=y.len,f.mean=y.mean,f.median=y.median,f.midRange=y.midRange,f.variance=y.variance,f.stdev=y.stdev,f.interp=y.interp;var x=t(\"./matrix\");f.init2dArray=x.init2dArray,f.transposeRagged=x.transposeRagged,f.dot=x.dot,f.translationMatrix=x.translationMatrix,f.rotationMatrix=x.rotationMatrix,f.rotationXYMatrix=x.rotationXYMatrix,f.apply3DTransform=x.apply3DTransform,f.apply2DTransform=x.apply2DTransform,f.apply2DTransform2=x.apply2DTransform2,f.convertCssMatrix=x.convertCssMatrix,f.inverseTransformMatrix=x.inverseTransformMatrix;var b=t(\"./angles\");f.deg2rad=b.deg2rad,f.rad2deg=b.rad2deg,f.angleDelta=b.angleDelta,f.angleDist=b.angleDist,f.isFullCircle=b.isFullCircle,f.isAngleInsideSector=b.isAngleInsideSector,f.isPtInsideSector=b.isPtInsideSector,f.pathArc=b.pathArc,f.pathSector=b.pathSector,f.pathAnnulus=b.pathAnnulus;var _=t(\"./anchor_utils\");f.isLeftAnchor=_.isLeftAnchor,f.isCenterAnchor=_.isCenterAnchor,f.isRightAnchor=_.isRightAnchor,f.isTopAnchor=_.isTopAnchor,f.isMiddleAnchor=_.isMiddleAnchor,f.isBottomAnchor=_.isBottomAnchor;var w=t(\"./geometry2d\");f.segmentsIntersect=w.segmentsIntersect,f.segmentDistance=w.segmentDistance,f.getTextLocation=w.getTextLocation,f.clearLocationCache=w.clearLocationCache,f.getVisibleSegment=w.getVisibleSegment,f.findPointOnPath=w.findPointOnPath;var T=t(\"./extend\");f.extendFlat=T.extendFlat,f.extendDeep=T.extendDeep,f.extendDeepAll=T.extendDeepAll,f.extendDeepNoArrays=T.extendDeepNoArrays;var k=t(\"./loggers\");f.log=k.log,f.warn=k.warn,f.error=k.error;var A=t(\"./regex\");f.counterRegex=A.counter;var M=t(\"./throttle\");f.throttle=M.throttle,f.throttleDone=M.done,f.clearThrottle=M.clear;var S=t(\"./dom\");function E(t){var e={};for(var r in t)for(var n=t[r],i=0;il||t=e)&&(o(t)&&t>=0&&t%1==0)},f.noop=t(\"./noop\"),f.identity=t(\"./identity\"),f.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},f.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},f.simpleMap=function(t,e,r,n,i){for(var a=t.length,o=new Array(a),s=0;s=Math.pow(2,r)?i>10?(f.warn(\"randstr failed uniqueness\"),l):t(e,r,n,(i||0)+1):l},f.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},f.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=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},f.syncOrAsync=function(t,e,r){var n;function i(){return f.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},f.stripTrailingSlash=function(t){return\"/\"===t.substr(-1)?t.substr(0,t.length-1):t},f.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n0?e:0}))},f.fillArray=function(t,e,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(t))for(var i=0;i1?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},f.TEMPLATE_STRING_REGEX=/%{([^\\s%{}:]*)([:|\\|][^}]*)?}/g;var z=/^\\w*$/;f.templateString=function(t,e){var r={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,n){var i;return z.test(n)?i=e[n]:(r[n]=r[n]||f.nestedProperty(e,n).get,i=r[n]()),f.isValidTextValue(i)?i:\"\"}))};var D={max:10,count:0,name:\"hovertemplate\"};f.hovertemplateString=function(){return B.apply(D,arguments)};var R={max:10,count:0,name:\"texttemplate\"};f.texttemplateString=function(){return B.apply(R,arguments)};var F=/^[:|\\|]/;function B(t,e,r){var n=this,a=arguments;e||(e={});var o={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,s,l){var c,u,h,p=\"_xother\"===s||\"_yother\"===s,d=\"_xother_\"===s||\"_yother_\"===s,g=\"xother_\"===s||\"yother_\"===s,m=\"xother\"===s||\"yother\"===s||p||g||d,v=s;if((p||d)&&(v=v.substring(1)),(g||d)&&(v=v.substring(0,v.length-1)),m){if(void 0===(c=e[v]))return\"\"}else for(h=3;h=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 N=2e9;f.seedPseudoRandom=function(){N=2e9},f.pseudoRandom=function(){var t=N;return N=(69069*N+1)%4294967296,Math.abs(N-t)<429496729?f.pseudoRandom():N/4294967296},f.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=f.extractOption(t,e,\"htx\",\"hovertext\");if(f.isValidTextValue(i))return n(i);var a=f.extractOption(t,e,\"tx\",\"text\");return f.isValidTextValue(a)?n(a):void 0},f.isValidTextValue=function(t){return t||0===t},f.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+\"%\",n=0;n1&&(c=1):c=0,f.strTranslate(i-c*(r+o),a-c*(n+s))+f.strScale(c)+(l?\"rotate(\"+l+(e?\"\":\" \"+r+\" \"+n)+\")\":\"\")},f.ensureUniformFontSize=function(t,e){var r=f.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},f.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)},f.bigFont=function(t){return Math.round(1.2*t)};var j=f.getFirefoxVersion(),U=null!==j&&j<86;f.getPositionFromD3Event=function(){return U?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},{\"../constants/numerical\":479,\"./anchor_utils\":483,\"./angles\":484,\"./array\":485,\"./clean_number\":486,\"./clear_responsive\":488,\"./coerce\":489,\"./dates\":490,\"./dom\":491,\"./extend\":493,\"./filter_unique\":494,\"./filter_visible\":495,\"./geometry2d\":498,\"./identity\":501,\"./increment\":502,\"./is_plain_object\":504,\"./keyed_container\":505,\"./localize\":506,\"./loggers\":507,\"./make_trace_groups\":508,\"./matrix\":509,\"./mod\":510,\"./nested_property\":511,\"./noop\":512,\"./notifier\":513,\"./preserve_drawing_buffer\":517,\"./push_unique\":518,\"./regex\":520,\"./relative_attr\":521,\"./relink_private\":522,\"./search\":523,\"./sort_object_keys\":526,\"./stats\":527,\"./throttle\":530,\"./to_log_range\":531,\"@plotly/d3\":58,\"d3-format\":112,\"d3-time-format\":120,\"fast-isnumeric\":190}],504:[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).hasOwnProperty(\"hasOwnProperty\")}},{}],505:[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;o2)return c[e]=2|c[e],h.set(t,null);if(f){for(o=e;o1){var e=[\"LOG:\"];for(t=0;t1){var r=[];for(t=0;t\"),\"long\")}},a.warn=function(){var t;if(n.logging>0){var e=[\"WARN:\"];for(t=0;t0){var r=[];for(t=0;t\"),\"stick\")}},a.error=function(){var t;if(n.logging>0){var e=[\"ERROR:\"];for(t=0;t0){var r=[];for(t=0;t\"),\"stick\")}}},{\"../plot_api/plot_config\":541,\"./notifier\":513}],508:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\");e.exports=function(t,e,r){var i=t.selectAll(\"g.\"+r.replace(/\\s/g,\".\")).data(e,(function(t){return t[0].trace.uid}));i.exit().remove(),i.enter().append(\"g\").attr(\"class\",r),i.order();var a=t.classed(\"rangeplot\")?\"nodeRangePlot3\":\"node3\";return i.each((function(t){t[0][a]=n.select(this)})),i}},{\"@plotly/d3\":58}],509:[function(t,e,r){\"use strict\";var n=t(\"gl-mat4\");r.init2dArray=function(t,e){for(var r=new Array(t),n=0;ne/2?t-Math.round(t/e)*e:t}}},{}],511:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./array\").isArrayOrTypedArray;function a(t,e){return function(){var r,n,o,s,l,c=t;for(s=0;s/g),l=0;la||c===i||cs)&&(!e||!l(t))}:function(t,e){var l=t[0],c=t[1];if(l===i||la||c===i||cs)return!1;var u,f,h,p,d,g=r.length,m=r[0][0],v=r[0][1],y=0;for(u=1;uMath.max(f,m)||c>Math.max(h,v)))if(cu||Math.abs(n(o,h))>i)return!0;return!1},a.filter=function(t,e){var r=[t[0]],n=0,i=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c1&&o(t.pop());return{addPt:o,raw:t,filtered:r}}},{\"../constants/numerical\":479,\"./matrix\":509}],516:[function(t,e,r){(function(r){(function(){\"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}n.regl||(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)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./show_no_webgl_msg\":525,regl:283}],517:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"is-mobile\");e.exports=function(t){var e;if(\"string\"!=typeof(e=t&&t.hasOwnProperty(\"userAgent\")?t.userAgent:function(){var t;\"undefined\"!=typeof navigator&&(t=navigator.userAgent);t&&t.headers&&\"string\"==typeof t.headers[\"user-agent\"]&&(t=t.headers[\"user-agent\"]);return t}()))return!0;var r=i({ua:{headers:{\"user-agent\":e}},tablet:!0,featureDetect:!1});if(!r)for(var a=e.split(\" \"),o=1;o-1;s--){var l=a[s];if(\"Version/\"===l.substr(0,8)){var c=l.substr(8).split(\".\")[0];if(n(c)&&(c=+c),c>=13)return!0}}}return r}},{\"fast-isnumeric\":190,\"is-mobile\":234}],518:[function(t,e,r){\"use strict\";e.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;ni.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(!(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=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function u(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,o,f=0,h=e.length,p=0,d=h>1?(e[h-1]-e[0])/(h-1):1;for(o=d>=0?r?s:l:r?u:c,t+=1e-9*d*(r?-1:1)*(d>=0?1:-1);f90&&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,n=t.slice();for(n.sort(r.sorterAsc),e=n.length-1;e>-1&&n[e]===o;e--);for(var i,a=n[e]-n[0]||1,s=a/(e||1)/1e4,l=[],c=0;c<=e;c++){var u=n[c],f=u-i;void 0===i?(l.push(u),i=u):f>s&&(a=Math.min(a,f),l.push(u),i=u)}return{vals:l,minDiff:a}},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;i0&&(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;ia.length)&&(o=a.length),n(e)||(e=!1),i(a[0])){for(l=new Array(o),s=0;st.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{\"./array\":485,\"fast-isnumeric\":190}],528:[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\":89}],529:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../lib\"),a=i.strTranslate,o=t(\"../constants/xmlns_namespaces\"),s=t(\"../constants/alignment\").LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,d){var A=t.text(),M=!t.attr(\"data-notex\")&&\"undefined\"!=typeof MathJax&&A.match(l),L=n.select(t.node().parentNode);if(!L.empty()){var C=t.attr(\"class\")?t.attr(\"class\").split(\" \")[0]:\"text\";return C+=\"-math\",L.selectAll(\"svg.\"+C).remove(),L.selectAll(\"g.\"+C+\"-group\").remove(),t.style(\"display\",null).attr({\"data-unformatted\":A,\"data-math\":\"N\"}),M?(e&&e._promises||[]).push(new Promise((function(e){t.style(\"display\",\"none\");var r=parseInt(t.node().style.fontSize,10),o={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)}))}(M[2],o,(function(n,i,o){L.selectAll(\"svg.\"+C).remove(),L.selectAll(\"g.\"+C+\"-group\").remove();var s=n&&n.select(\"svg\");if(!s||!s.node())return P(),void e();var l=L.append(\"g\").classed(C+\"-group\",!0).attr({\"pointer-events\":\"none\",\"data-unformatted\":A,\"data-math\":\"Y\"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var c=o.width,u=o.height;s.attr({class:C,height:u,preserveAspectRatio:\"xMinYMin meet\"}).style({overflow:\"visible\",\"pointer-events\":\"none\"});var f=t.node().style.fill||\"black\",h=s.select(\"g\");h.attr({fill:f,stroke:f});var p=h.node().getBoundingClientRect(),g=p.width,m=p.height;(g>c||m>u)&&(s.style(\"overflow\",\"hidden\"),g=(p=s.node().getBoundingClientRect()).width,m=p.height);var v=+t.attr(\"x\"),y=+t.attr(\"y\"),x=-(r||t.node().getBoundingClientRect().height)/4;if(\"y\"===C[0])l.attr({transform:\"rotate(\"+[-90,v,y]+\")\"+a(-g/2,x-m/2)});else if(\"l\"===C[0])y=x-m/2;else if(\"a\"===C[0]&&0!==C.indexOf(\"atitle\"))v=0,y=x;else{var b=t.attr(\"text-anchor\");v-=g*(\"middle\"===b?.5:\"end\"===b?1:0),y=y+x-m/2}s.attr({x:v,y:y}),d&&d.call(t,l),e(l)}))}))):P(),t}function P(){L.empty()||(C=t.attr(\"class\")+\"-math\",L.select(\"svg.\"+C).remove()),t.text(\"\").style(\"white-space\",\"pre\"),function(t,e){e=e.replace(g,\" \");var r,a=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(o.svg,\"tspan\");n.select(e).attr({class:\"line\",dy:c*s+\"em\"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var a=1;a doesnt match end tag <\"+t+\">. Pretending it did match.\",e),r=l[l.length-1].node}else i.log(\"Ignoring unexpected end tag .\",e)}y.test(e)?u():(r=t,l=[{node:t}]);for(var L=e.split(m),C=0;C|>|>)/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=[\"http:\",\"https:\",\"mailto:\",\"\",void 0,\":\"],g=r.NEWLINES=/(\\r\\n?|\\n)/g,m=/(<[^<>]*>)/,v=/<(\\/?)([^ >]*)(\\s+(.*))?>/i,y=//i;r.BR_TAG_ALL=//gi;var x=/(^|[\\s\"'])style\\s*=\\s*(\"([^\"]*);?\"|'([^']*);?')/i,b=/(^|[\\s\"'])href\\s*=\\s*(\"([^\"]*)\"|'([^']*)')/i,_=/(^|[\\s\"'])target\\s*=\\s*(\"([^\"\\s]*)\"|'([^'\\s]*)')/i,w=/(^|[\\s\"'])popup\\s*=\\s*(\"([\\w=,]*)\"|'([\\w=,]*)')/i;function T(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&S(n)}var k=/(^|;)\\s*color:/;r.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:[\"br\"],i=\"...\".length,a=t.split(m),o=[],s=\"\",l=0,c=0;ci?o.push(u.substr(0,d-i)+\"...\"):o.push(u.substr(0,d));break}s=\"\"}}return o.join(\"\")};var A={mu:\"\\u03bc\",amp:\"&\",lt:\"<\",gt:\">\",nbsp:\"\\xa0\",times:\"\\xd7\",plusmn:\"\\xb1\",deg:\"\\xb0\"},M=/&(#\\d+|#x[\\da-fA-F]+|[a-z]+);/g;function S(t){return t.replace(M,(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)):A[e])||t}))}function E(t){var e=encodeURI(decodeURI(t)),r=document.createElement(\"a\"),n=document.createElement(\"a\");r.href=t,n.href=e;var i=r.protocol,a=n.protocol;return-1!==d.indexOf(i)&&-1!==d.indexOf(a)?e:\"\"}function L(t,e,r){var n,a,o,s=r.horizontalAlign,l=r.verticalAlign||\"top\",c=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return a=\"bottom\"===l?function(){return c.bottom-n.height}:\"middle\"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},o=\"right\"===s?function(){return c.right-n.width}:\"center\"===s?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var t=o()-u.left,e=a()-u.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+\"px\",left:t+\"px\",\"z-index\":1e3}),this}}r.convertEntities=S,r.sanitizeHTML=function(t){t=t.replace(g,\" \");for(var e=document.createElement(\"p\"),r=e,i=[],a=t.split(m),o=0;oa.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)}},{}],531:[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\":190}],532:[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\":587,\"topojson-client\":315}],533:[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\"}}},{}],534:[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\"}}},{}],535:[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;s0&&o.log(\"Clearing previous rejected promises from queue.\"),t._promises=[]},r.cleanLayout=function(t){var e,n;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 a=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,f=(s.subplotsRegistry.ternary||{}).attrRegex,h=(s.subplotsRegistry.gl3d||{}).attrRegex,g=Object.keys(t);for(e=0;e3?(O.x=1.02,O.xanchor=\"left\"):O.x<-2&&(O.x=-.02,O.xanchor=\"right\"),O.y>3?(O.y=1.02,O.yanchor=\"bottom\"):O.y<-2&&(O.y=-.02,O.yanchor=\"top\")),d(t),\"rotate\"===t.dragmode&&(t.dragmode=\"orbit\"),c.clean(t),t.template&&t.template.layout&&r.cleanLayout(t.template.layout),t},r.cleanData=function(t){for(var e=0;e0)return t.substr(0,e)}r.hasParent=function(t,e){for(var r=b(e);r;){if(r in t)return!0;r=b(r)}return!1};var _=[\"x\",\"y\",\"z\"];r.clearAxisTypes=function(t,e,r){for(var n=0;n1&&a.warn(\"Full array edits are incompatible with other edits\",f);var y=r[\"\"][\"\"];if(c(y))e.set(null);else{if(!Array.isArray(y))return a.warn(\"Unrecognized full array edit value\",f,y),!0;e.set(y)}return!g&&(h(m,v),p(t),!0)}var x,b,_,w,T,k,A,M,S=Object.keys(r).map(Number).sort(o),E=e.get(),L=E||[],C=u(v,f).get(),P=[],I=-1,O=L.length;for(x=0;xL.length-(A?0:1))a.warn(\"index out of range\",f,_);else if(void 0!==k)T.length>1&&a.warn(\"Insertion & removal are incompatible with edits to the same index.\",f,_),c(k)?P.push(_):A?(\"add\"===k&&(k={}),L.splice(_,0,k),C&&C.splice(_,0,{})):a.warn(\"Unrecognized full object edit value\",f,_,k),-1===I&&(I=_);else for(b=0;b=0;x--)L.splice(P[x],1),C&&C.splice(P[x],1);if(L.length?E||e.set(L):e.set(null),g)return!1;if(h(m,v),d!==i){var z;if(-1===I)z=S;else{for(O=Math.max(L.length,O),z=[],x=0;x=I);x++)z.push(_);for(x=I;x=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(void 0===e)throw new Error(\"currentIndices is a required argument.\");if(Array.isArray(e)||(e=[e]),P(t,e,\"currentIndices\"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&P(t,r,\"newIndices\"),void 0!==r&&e.length!==r.length)throw new Error(\"current and new indices must be of equal length.\")}function O(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(void 0===r)throw new Error(\"indices must be an integer or array of integers\");for(var a in P(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 correspondence with the keys and number of traces in the update object\")}}(t,e,r,n);for(var l=function(t,e,r,n){var a,l,c,u,f,h=o.isPlainObject(n),p=[];for(var d in Array.isArray(r)||(r=[r]),r=C(r,t.data.length-1),e)for(var g=0;g-1&&-1===r.indexOf(\"grouptitlefont\")?l(r,r.replace(\"titlefont\",\"title.font\")):r.indexOf(\"titleposition\")>-1?l(r,r.replace(\"titleposition\",\"title.position\")):r.indexOf(\"titleside\")>-1?l(r,r.replace(\"titleside\",\"title.side\")):r.indexOf(\"titleoffset\")>-1&&l(r,r.replace(\"titleoffset\",\"title.offset\")):l(r,r.replace(\"title\",\"title.text\"));function l(e,r){t[r]=t[e],delete t[e]}}function U(t,e,r){t=o.getGraphDiv(t),_.clearPromiseQueue(t);var n={};if(\"string\"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn(\"Relayout fail.\",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=W(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[h.previousPromises];a.layoutReplot?s.push(w.layoutReplot):Object.keys(n).length&&(V(t,a,i)||h.supplyDefaults(t),a.legend&&s.push(w.doLegend),a.layoutstyle&&s.push(w.layoutStyles),a.axrange&&H(s,i.rangesAltered),a.ticks&&s.push(w.doTicksRelayout),a.modebar&&s.push(w.doModeBar),a.camera&&s.push(w.doCamera),a.colorbars&&s.push(w.doColorBars),s.push(M)),s.push(h.rehover,h.redrag),c.add(t,U,[t,i.undoit],U,[t,i.redoit]);var l=o.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit(\"plotly_relayout\",i.eventData),t}))}function V(t,e,r){var n=t._fullLayout;if(!e.axrange)return!1;for(var i in e)if(\"axrange\"!==i&&e[i])return!1;for(var a in r.rangesAltered){var o=p.id2name(a),s=t.layout[o],l=n[o];if(l.autorange=s.autorange,s.range&&(l.range=s.range.slice()),l.cleanRange(),l._matchGroup)for(var c in l._matchGroup)if(c!==a){var u=n[p.id2name(c)];u.autorange=l.autorange,u.range=l.range.slice(),u._input.range=l.range.slice()}}return!0}function H(t,e){var r=e?function(t){var r=[],n=!0;for(var i in e){var a=p.getFromId(t,i);if(r.push(i),-1!==(a.ticklabelposition||\"\").indexOf(\"inside\")&&a._anchorAxis&&r.push(a._anchorAxis._id),a._matchGroup)for(var o in a._matchGroup)e[o]||r.push(o);a.automargin&&(n=!1)}return p.draw(t,r,{skipTitle:n})}:function(t){return p.draw(t,\"redraw\")};t.push(y,w.doAutoRangeAndConstraints,r,w.drawData,w.finalDraw)}var q=/^[xyz]axis[0-9]*\\.range(\\[[0|1]\\])?$/,G=/^[xyz]axis[0-9]*\\.autorange$/,Y=/^[xyz]axis[0-9]*\\.domain(\\[[0|1]\\])?$/;function W(t,e){var r,n,i,a=t.layout,l=t._fullLayout,c=l._guiEditing,h=F(l._preGUI,c),d=Object.keys(e),g=p.list(t),m=o.extendDeepAll({},e),v={};for(j(e),d=Object.keys(e),n=0;n0&&\"string\"!=typeof O.parts[D];)D--;var B=O.parts[D],N=O.parts[D-1]+\".\"+B,U=O.parts.slice(0,D).join(\".\"),V=s(t.layout,U).get(),H=s(l,U).get(),W=O.get();if(void 0!==z){M[I]=z,S[I]=\"reverse\"===B?z:R(W);var Z=f.getLayoutValObject(l,O.parts);if(Z&&Z.impliedEdits&&null!==z)for(var J in Z.impliedEdits)E(o.relativeAttr(I,J),Z.impliedEdits[J]);if(-1!==[\"width\",\"height\"].indexOf(I))if(z){E(\"autosize\",null);var K=\"height\"===I?\"width\":\"height\";E(K,l[K])}else l[I]=t._initialAutoSize[I];else if(\"autosize\"===I)E(\"width\",z?null:l.width),E(\"height\",z?null:l.height);else if(N.match(q))P(N),s(l,U+\"._inputRange\").set(null);else if(N.match(G)){P(N),s(l,U+\"._inputRange\").set(null);var Q=s(l,U).get();Q._inputDomain&&(Q._input.domain=Q._inputDomain.slice())}else N.match(Y)&&s(l,U+\"._inputDomain\").set(null);if(\"type\"===B){L=V;var $=\"linear\"===H.type&&\"log\"===z,tt=\"log\"===H.type&&\"linear\"===z;if($||tt){if(L&&L.range)if(H.autorange)$&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var et=L.range[0],rt=L.range[1];$?(et<=0&&rt<=0&&E(U+\".autorange\",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),E(U+\".range[0]\",Math.log(et)/Math.LN10),E(U+\".range[1]\",Math.log(rt)/Math.LN10)):(E(U+\".range[0]\",Math.pow(10,et)),E(U+\".range[1]\",Math.pow(10,rt)))}else E(U+\".autorange\",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[O.parts[0]]&&\"radialaxis\"===O.parts[1]&&delete l[O.parts[0]]._subplot.viewInitial[\"radialaxis.range\"],u.getComponentMethod(\"annotations\",\"convertCoords\")(t,H,z,E),u.getComponentMethod(\"images\",\"convertCoords\")(t,H,z,E)}else E(U+\".autorange\",!0),E(U+\".range\",null);s(l,U+\"._inputRange\").set(null)}else if(B.match(k)){var nt=s(l,I).get(),it=(z||{}).type;it&&\"-\"!==it||(it=\"linear\"),u.getComponentMethod(\"annotations\",\"convertCoords\")(t,nt,it,E),u.getComponentMethod(\"images\",\"convertCoords\")(t,nt,it,E)}var at=b.containerArrayMatch(I);if(at){r=at.array,n=at.index;var ot=at.property,st=Z||{editType:\"calc\"};\"\"!==n&&\"\"===ot&&(b.isAddVal(z)?S[I]=null:b.isRemoveVal(z)?S[I]=(s(a,r).get()||[])[n]:o.warn(\"unrecognized full object value\",e)),T.update(A,st),v[r]||(v[r]={});var lt=v[r][n];lt||(lt=v[r][n]={}),lt[ot]=z,delete e[I]}else\"reverse\"===B?(V.range?V.range.reverse():(E(U+\".autorange\",!0),V.range=[1,0]),H.autorange?A.calc=!0:A.plot=!0):(l._has(\"scatter-like\")&&l._has(\"regl\")&&\"dragmode\"===I&&(\"lasso\"===z||\"select\"===z)&&\"lasso\"!==W&&\"select\"!==W||l._has(\"gl2d\")?A.plot=!0:Z?T.update(A,Z):A.calc=!0,O.set(z))}}for(r in v){b.applyContainerArrayChanges(t,h(a,r),v[r],A,h)||(A.plot=!0)}for(var ct in C){var ut=(L=p.getFromId(t,ct))&&L._constraintGroup;if(ut)for(var ft in A.calc=!0,ut)C[ft]||(p.getFromId(t,ft)._constraintShrinkable=!0)}return(X(t)||e.height||e.width)&&(A.plot=!0),(A.plot||A.calc)&&(A.layoutReplot=!0),{flags:A,rangesAltered:C,undoit:S,redoit:M,eventData:m}}function X(t){var e=t._fullLayout,r=e.width,n=e.height;return t.layout.autosize&&h.plotAutoSize(t,t.layout,e),e.width!==r||e.height!==n}function Z(t,e,n,i){t=o.getGraphDiv(t),_.clearPromiseQueue(t),o.isPlainObject(e)||(e={}),o.isPlainObject(n)||(n={}),Object.keys(e).length&&(t.changed=!0),Object.keys(n).length&&(t.changed=!0);var a=_.coerceTraceIndices(t,i),s=N(t,o.extendFlat({},e),a),l=s.flags,u=W(t,o.extendFlat({},n)),f=u.flags;(l.calc||f.calc)&&(t.calcdata=void 0),l.clearAxisTypes&&_.clearAxisTypes(t,a,n);var p=[];f.layoutReplot?p.push(w.layoutReplot):l.fullReplot?p.push(r._doPlot):(p.push(h.previousPromises),V(t,f,u)||h.supplyDefaults(t),l.style&&p.push(w.doTraceStyle),(l.colorbars||f.colorbars)&&p.push(w.doColorBars),f.legend&&p.push(w.doLegend),f.layoutstyle&&p.push(w.layoutStyles),f.axrange&&H(p,u.rangesAltered),f.ticks&&p.push(w.doTicksRelayout),f.modebar&&p.push(w.doModeBar),f.camera&&p.push(w.doCamera),p.push(M)),p.push(h.rehover,h.redrag),c.add(t,Z,[t,s.undoit,u.undoit,s.traces],Z,[t,s.redoit,u.redoit,s.traces]);var d=o.syncOrAsync(p,t);return d&&d.then||(d=Promise.resolve(t)),d.then((function(){return t.emit(\"plotly_update\",{data:s.eventData,layout:u.eventData}),t}))}function J(t){return function(e){e._fullLayout._guiEditing=!0;var r=t.apply(null,arguments);return e._fullLayout._guiEditing=!1,r}}var K=[{pattern:/^hiddenlabels/,attr:\"legend.uirevision\"},{pattern:/^((x|y)axis\\d*)\\.((auto)?range|title\\.text)/},{pattern:/axis\\d*\\.showspikes$/,attr:\"modebar.uirevision\"},{pattern:/(hover|drag)mode$/,attr:\"modebar.uirevision\"},{pattern:/^(scene\\d*)\\.camera/},{pattern:/^(geo\\d*)\\.(projection|center|fitbounds)/},{pattern:/^(ternary\\d*\\.[abc]axis)\\.(min|title\\.text)$/},{pattern:/^(polar\\d*\\.radialaxis)\\.((auto)?range|angle|title\\.text)/},{pattern:/^(polar\\d*\\.angularaxis)\\.rotation/},{pattern:/^(mapbox\\d*)\\.(center|zoom|bearing|pitch)/},{pattern:/^legend\\.(x|y)$/,attr:\"editrevision\"},{pattern:/^(shapes|annotations)/,attr:\"editrevision\"},{pattern:/^title\\.text$/,attr:\"editrevision\"}],Q=[{pattern:/^selectedpoints$/,attr:\"selectionrevision\"},{pattern:/(^|value\\.)visible$/,attr:\"legend.uirevision\"},{pattern:/^dimensions\\[\\d+\\]\\.constraintrange/},{pattern:/^node\\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\\.)name$/},{pattern:/colorbar\\.title\\.text$/},{pattern:/colorbar\\.(x|y)$/,attr:\"editrevision\"}];function $(t,e){for(var r=0;r1;)if(n.pop(),void 0!==(r=s(e,n.join(\".\")+\".uirevision\").get()))return r;return e.uirevision}function et(t,e){for(var r=0;r=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 f(){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,h.transition(t,e.frame.data,e.frame.layout,_.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&&f()};e()}var d,g,m=0;function v(t){return Array.isArray(i)?m>=i.length?t.transitionOpts=i[m]:t.transitionOpts=i[0]:t.transitionOpts=i,m++,t}var y=[],x=null==e,b=Array.isArray(e);if(!x&&!b&&o.isPlainObject(e))y.push({type:\"object\",data:v(o.extendFlat({},e))});else if(x||-1!==[\"string\",\"number\"].indexOf(typeof e))for(d=0;d0&&kk)&&A.push(g);y=A}}y.length>0?function(e){if(0!==e.length){for(var i=0;i=0;n--)if(o.isPlainObject(e[n])){var g=e[n].name,m=(u[g]||d[g]||{}).name,v=e[n].name,y=u[m]||d[m];m&&v&&\"number\"==typeof v&&y&&A<5&&(A++,o.warn('addFrames: overwriting frame \"'+(u[m]||d[m]).name+'\" with a frame whose name of type \"number\" also equates to \"'+m+'\". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===A&&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:h.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}p.sort((function(t,e){return t.index>e.index?-1:t.index=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=0;r--)n=e[r],a.push({type:\"delete\",index:n}),s.unshift({type:\"insert\",index:n,value:i[n]});var l=h.modifyFrames,u=h.modifyFrames,f=[t,s],p=[t,a];return c&&c.add(t,l,f,u,p),h.modifyFrames(t,a)},r.addTraces=function t(e,n,i){e=o.getGraphDiv(e);var a,s,l=[],u=r.deleteTraces,f=t,h=[e,l],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(void 0===e)throw new Error(\"traces must be defined.\");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!y(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function y(t){return t===Math.round(t)&&t>=0}function x(){var t,e,r={};for(t in f(r,o),n.subplotsRegistry){if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i=l.length)return!1;i=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else{var u=t._module;if(u||(u=(n.modules[t.type||a.type.dflt]||{})._module),!u)return!1;if(!(i=(r=u.attributes)&&r[o])){var f=u.basePlotModule;f&&f.attributes&&(i=f.attributes[o])}i||(i=a[o])}return v(i,e,s)},r.getLayoutValObject=function(t,e){return v(function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var c;for(r=0;r=i&&(r._input||{})._templateitemname;o&&(a=i);var s,l=e+\"[\"+a+\"]\";function c(){s={},o&&(s[l]={},s[l].templateitemname=o)}function u(t,e){o?n.nestedProperty(s[l],t).set(e):s[l+\".\"+t]=e}function f(){var t=s;return c(),t}return c(),{modifyBase:function(t,e){s[t]=e},modifyItem:u,getUpdateObj:f,applyUpdate:function(e,r){e&&u(e,r);var i=f();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},{\"../lib\":503,\"../plots/attributes\":550}],544:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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,m=d.clean,v=t(\"../plots/cartesian/autorange\").doAutoRange;function y(t,e,r){for(var n=0;n=t[1]||i[1]<=t[0])&&(a[0]e[0]))return!0}return!1}function x(t){var e,i,s,u,d,g,m=t._fullLayout,v=m._size,x=v.p,_=h.list(t,\"\",!0);if(m._paperdiv.style({width:t._context.responsive&&m.autosize&&!t._context._hasZeroWidth&&!t.layout.width?\"100%\":m.width+\"px\",height:t._context.responsive&&m.autosize&&!t._context._hasZeroHeight&&!t.layout.height?\"100%\":m.height+\"px\"}).selectAll(\".main-svg\").call(c.setSize,m.width,m.height),t._context.setBackground(t,m.paper_bgcolor),r.drawMainTitle(t),f.manage(t),!m._has(\"cartesian\"))return a.previousPromises(t);function T(t,e,r){var n=t._lw/2;return\"x\"===t._id.charAt(0)?e?\"top\"===r?e._offset-x-n:e._offset+e._length+x+n:v.t+v.h*(1-(t.position||0))+n%1:e?\"right\"===r?e._offset+e._length+x+n:e._offset-x-n:v.l+v.w*(t.position||0)+n%1}for(e=0;e<_.length;e++){var k=(u=_[e])._anchorAxis;u._linepositions={},u._lw=c.crispRound(t,u.linewidth,1),u._mainLinePosition=T(u,k,u.side),u._mainMirrorPosition=u.mirror&&k?T(u,k,p.OPPOSITE_SIDE[u.side]):null}var A=[],M=[],S=[],E=1===l.opacity(m.paper_bgcolor)&&1===l.opacity(m.plot_bgcolor)&&m.paper_bgcolor===m.plot_bgcolor;for(i in m._plots)if((s=m._plots[i]).mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var L=s.xaxis.domain,C=s.yaxis.domain,P=s.plotgroup;if(y(L,C,S)){var I=P.node(),O=s.bg=o.ensureSingle(P,\"rect\",\"bg\");I.insertBefore(O.node(),I.childNodes[0]),M.push(i)}else P.select(\"rect.bg\").remove(),S.push([L,C]),E||(A.push(i),M.push(i))}var z,D,R,F,B,N,j,U,V,H,q,G,Y,W=m._bgLayer.selectAll(\".bg\").data(A);for(W.enter().append(\"rect\").classed(\"bg\",!0),W.exit().remove(),W.each((function(t){m._plots[t].bg=n.select(this)})),e=0;eT?u.push({code:\"unused\",traceType:y,templateCount:w,dataCount:T}):T>w&&u.push({code:\"reused\",traceType:y,templateCount:w,dataCount:T})}}else u.push({code:\"data\"});if(function t(e,r){for(var n in e)if(\"_\"!==n.charAt(0)){var a=e[n],o=g(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)&&m(a)&&t(a,o)}}({data:p,layout:h},\"\"),u.length)return u.map(v)}},{\"../lib\":503,\"../plots/attributes\":550,\"../plots/plots\":619,\"./plot_config\":541,\"./plot_schema\":542,\"./plot_template\":543}],546:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./plot_api\"),a=t(\"../plots/plots\"),o=t(\"../lib\"),s=t(\"../snapshot/helpers\"),l=t(\"../snapshot/tosvg\"),c=t(\"../snapshot/svgtoimg\"),u=t(\"../version\").version,f={format:{valType:\"enumerated\",values:[\"png\",\"jpeg\",\"webp\",\"svg\",\"full-json\"],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}};e.exports=function(t,e){var r,h,p,d;function g(t){return!(t in e)||o.validate(e[t],f[t])}if(e=e||{},o.isPlainObject(t)?(r=t.data||[],h=t.layout||{},p=t.config||{},d={}):(t=o.getGraphDiv(t),r=o.extendDeep([],t.data),h=o.extendDeep({},t.layout),p=t._context,d=t._fullLayout||{}),!g(\"width\")&&null!==e.width||!g(\"height\")&&null!==e.height)throw new Error(\"Height and width should be pixel values.\");if(!g(\"format\"))throw new Error(\"Export format is not \"+o.join2(f.format.values,\", \",\" or \")+\".\");var m={};function v(t,r){return o.coerce(e,m,f,t,r)}var y=v(\"format\"),x=v(\"width\"),b=v(\"height\"),_=v(\"scale\"),w=v(\"setBackground\"),T=v(\"imageDataOnly\"),k=document.createElement(\"div\");k.style.position=\"absolute\",k.style.left=\"-5000px\",document.body.appendChild(k);var A=o.extendFlat({},h);x?A.width=x:null===e.width&&n(d.width)&&(A.width=d.width),b?A.height=b:null===e.height&&n(d.height)&&(A.height=d.height);var M=o.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=s.getRedrawFunc(k);function E(){return new Promise((function(t){setTimeout(t,s.getDelay(k._fullLayout))}))}function L(){return new Promise((function(t,e){var r=l(k,y,_),n=k._fullLayout.width,f=k._fullLayout.height;function h(){i.purge(k),document.body.removeChild(k)}if(\"full-json\"===y){var p=a.graphJson(k,!1,\"keepdata\",\"object\",!0,!0);return p.version=u,p=JSON.stringify(p),h(),t(T?p:s.encodeJSON(p))}if(h(),\"svg\"===y)return t(T?r:s.encodeSVG(r));var d=document.createElement(\"canvas\");d.id=o.randstr(),c({format:y,width:n,height:f,scale:_,canvas:d,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.newPlot(k,r,A,M).then(S).then(E).then(L).then((function(e){t(function(t){return T?t.replace(s.IMAGE_URL_PREFIX,\"\"):t}(e))})).catch((function(t){e(t)}))}))}},{\"../lib\":503,\"../plots/plots\":619,\"../snapshot/helpers\":642,\"../snapshot/svgtoimg\":644,\"../snapshot/tosvg\":646,\"../version\":1119,\"./plot_api\":540,\"fast-isnumeric\":190}],547:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plots/plots\"),a=t(\"./plot_schema\"),o=t(\"./plot_config\").dfltConfig,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;hx.length&&i.push(d(\"unused\",a,v.concat(x.length)));var A,M,S,E,L,C=x.length,P=Array.isArray(k);if(P&&(C=Math.min(C,k.length)),2===b.dimensions)for(M=0;Mx[M].length&&i.push(d(\"unused\",a,v.concat(M,x[M].length)));var I=x[M].length;for(A=0;A<(P?Math.min(I,k[M].length):I);A++)S=P?k[M][A]:k,E=y[M][A],L=x[M][A],n.validate(E,S)?L!==E&&L!==+E&&i.push(d(\"dynamic\",a,v.concat(M,A),E,L)):i.push(d(\"value\",a,v.concat(M,A),E))}else i.push(d(\"array\",a,v.concat(M),y[M]));else for(M=0;M1&&p.push(d(\"object\",\"layout\"))),i.supplyDefaults(g);for(var m=g._fullData,v=r.length,y=0;y0&&Math.round(f)===f))return{vals:i};c=f}for(var h=e.calendar,p=\"start\"===l,d=\"end\"===l,g=t[r+\"period0\"],m=a(g,h)||0,v=[],y=[],x=[],b=i.length,_=0;_A;)k=o(k,-c,h);for(;k<=A;)k=o(k,c,h);T=o(k,-c,h)}else{for(k=m+(w=Math.round((A-m)/u))*u;k>A;)k-=u;for(;k<=A;)k+=u;T=k-u}v[_]=p?T:d?k:(T+k)/2,y[_]=T,x[_]=k}return{vals:v,starts:y,ends:x}}},{\"../../constants/numerical\":479,\"../../lib\":503,\"fast-isnumeric\":190}],552:[function(t,e,r){\"use strict\";e.exports={xaxis:{valType:\"subplotid\",dflt:\"x\",editType:\"calc+clearAxisTypes\"},yaxis:{valType:\"subplotid\",dflt:\"y\",editType:\"calc+clearAxisTypes\"}}},{}],553:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../lib\"),o=t(\"../../constants/numerical\").FP_SAFE,s=t(\"../../registry\"),l=t(\"../../components/drawing\"),c=t(\"./axis_ids\"),u=c.getFromId,f=c.isLinked;function h(t,e){var r,n,i=[],o=t._fullLayout,s=d(o,e,0),l=d(o,e,1),c=g(t,e),u=c.min,f=c.max;if(0===u.length||0===f.length)return a.simpleMap(e.range,e.r2l);var h=u[0].val,m=f[0].val;for(r=1;r0&&((T=E-s(x)-l(b))>L?k/T>C&&(_=x,w=b,C=k/T):k/E>C&&(_={val:x.val,nopad:1},w={val:b.val,nopad:1},C=k/E));if(h===m){var P=h-1,I=h+1;if(M)if(0===h)i=[0,1];else{var O=(h>0?f:u).reduce((function(t,e){return Math.max(t,l(e))}),0),z=h/(1-Math.min(.5,O/E));i=h>0?[0,z]:[z,0]}else i=S?[Math.max(0,P),Math.max(1,I)]:[P,I]}else M?(_.val>=0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:0,nopad:1})):S&&(_.val-C*s(_)<0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:1,nopad:1})),C=(w.val-_.val-p(e,x.val,b.val))/(E-s(_)-l(w)),i=[_.val-C*s(_),w.val+C*l(w)];return v&&i.reverse(),a.simpleMap(i,e.l2r||Number)}function p(t,e,r){var n=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),S=A((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=A(r.vpadplus||r.vpad),L=A(r.vpadminus||r.vpad);if(!T){if(h=1/0,p=-1/0,w)for(n=0;n0&&(h=a),a>p&&a-o&&(h=a),a>p&&a=I;n--)P(n);return{min:d,max:g,opts:r}},concatExtremes:g};function g(t,e,r){var n,i,a,o=e._id,s=t._fullData,l=t._fullLayout,c=[],f=[];function h(t,e){for(n=0;n=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 x(t){return i(t)&&Math.abs(t)=e}},{\"../../components/drawing\":388,\"../../constants/numerical\":479,\"../../lib\":503,\"../../registry\":638,\"./axis_ids\":558,\"@plotly/d3\":58,\"fast-isnumeric\":190}],554:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../plots/plots\"),o=t(\"../../registry\"),s=t(\"../../lib\"),l=s.strTranslate,c=t(\"../../lib/svg_text_utils\"),u=t(\"../../components/titles\"),f=t(\"../../components/color\"),h=t(\"../../components/drawing\"),p=t(\"./layout_attributes\"),d=t(\"./clean_ticks\"),g=t(\"../../constants/numerical\"),m=g.ONEMAXYEAR,v=g.ONEAVGYEAR,y=g.ONEMINYEAR,x=g.ONEMAXQUARTER,b=g.ONEAVGQUARTER,_=g.ONEMINQUARTER,w=g.ONEMAXMONTH,T=g.ONEAVGMONTH,k=g.ONEMINMONTH,A=g.ONEWEEK,M=g.ONEDAY,S=M/2,E=g.ONEHOUR,L=g.ONEMIN,C=g.ONESEC,P=g.MINUS_SIGN,I=g.BADNUM,O={K:\"zeroline\"},z={K:\"gridline\",L:\"path\"},D={K:\"tick\",L:\"path\"},R={K:\"tick\",L:\"text\"},F=t(\"../../constants/alignment\"),B=F.MID_SHIFT,N=F.CAP_SHIFT,j=F.LINE_SPACING,U=F.OPPOSITE_SIDE,V=e.exports={};V.setConvert=t(\"./set_convert\");var H=t(\"./axis_autotype\"),q=t(\"./axis_ids\"),G=q.idSort,Y=q.isLinked;V.id2name=q.id2name,V.name2id=q.name2id,V.cleanId=q.cleanId,V.list=q.list,V.listIds=q.listIds,V.getFromId=q.getFromId,V.getFromTrace=q.getFromTrace;var W=t(\"./autorange\");V.getAutoRange=W.getAutoRange,V.findExtremes=W.findExtremes;function X(t){var e=1e-4*(t[1]-t[0]);return[t[0]-e,t[1]+e]}V.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]||(\"string\"==typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(t){return t+\" domain\"}))),u[c]={valType:\"enumerated\",values:l.concat(a?\"string\"==typeof a?[a]:a:[]),dflt:i},s.coerce(t,e,u,c)},V.getRefType=function(t){return void 0===t?t:\"paper\"===t?\"paper\":\"pixel\"===t?\"pixel\":/( domain)$/.test(t)?\"domain\":\"range\"},V.coercePosition=function(t,e,r,n,i,a){var o,l;if(\"range\"!==V.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var c=V.getFromId(e,n);l=r(i,a=c.fraction2r(a)),o=c.cleanPos}t[i]=o(l)},V.cleanPosition=function(t,e,r){return(\"paper\"===r||\"pixel\"===r?s.ensureNumber:V.getFromId(e,r).cleanPos)(t)},V.redrawComponents=function(t,e){e=e||V.listIds(t);var r=t._fullLayout;function n(n,i,a,s){for(var l=o.getComponentMethod(n,i),c={},u=0;u2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},V.saveRangeInitial=function(t,e){for(var r=V.list(t,\"\",!0),n=!1,i=0;i.3*h||u(n)||u(a))){var p=r.dtick/2;t+=t+p.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=V.tickIncrement(t,\"M6\",\"reverse\")+1.5*M:a.exactMonths>.8?t=V.tickIncrement(t,\"M1\",\"reverse\")+15.5*M:t-=S;var l=V.tickIncrement(t,r);if(l<=n)return l}return t}(y,t,v,c,a)),m=y,0;m<=u;)m=V.tickIncrement(m,v,!1,a);return{start:e.c2r(y,0,a),end:e.c2r(m,0,a),size:v,_dataSpan:u-c}},V.prepTicks=function(t,e){var r=s.simpleMap(t.range,t.r2l,void 0,void 0,e);if(t._dtickInit=t.dtick,t._tick0Init=t.tick0,\"auto\"===t.tickmode||!t.dtick){var n,a=t.nticks;a||(\"category\"===t.type||\"multicategory\"===t.type?(n=t.tickfont?s.bigFont(t.tickfont.size||12):15,a=t._length/n):(n=\"y\"===t._id.charAt(0)?40:80,a=s.constrain(t._length/n,4,9)+1),\"radialaxis\"===t._name&&(a*=2)),\"array\"===t.tickmode&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,V.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}\"period\"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||\"M\"!==t.dtick.charAt(0))}var n=r(),a=V.getTickFormat(t);if(a){var o=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(e=E,o&&!n&&t.dticka&&f=o:d<=o;d=V.tickIncrement(d,t.dtick,l,t.calendar)){if(R++,t.rangebreaks&&!l){if(d=u)break}if(P.length>C||d===O)break;O=d;var F=!1;h&&d!==(0|d)&&(F=!0);var B={minor:F,value:d};L>1&&R%L&&(B.skipLabel=!0),P.push(B)}if(p&&function(t,e,r){for(var n=0;n0?(a=n-1,o=n):(a=n,o=n);var s,l=t[a].value,c=t[o].value,u=Math.abs(c-l),f=r||u,h=0;f>=y?h=u>=y&&u<=m?u:v:r===b&&f>=_?h=u>=_&&u<=x?u:b:f>=k?h=u>=k&&u<=w?u:T:r===A&&f>=A?h=A:f>=M?h=M:r===S&&f>=S?h=S:r===E&&f>=E&&(h=E),h>=u&&(h=u,s=!0);var p=i+h;if(e.rangebreaks&&h>0){for(var d=0,g=0;g<84;g++){var L=(g+.5)/84;e.maskBreaks(i*(1-L)+L*p)!==I&&d++}(h*=d/84)||(t[n].drop=!0),s&&u>A&&(h=u)}(h>0||0===n)&&(t[n].periodX=i+h/2)}}(P,t,t._definedDelta),t.rangebreaks){var N=\"y\"===t._id.charAt(0),j=1;\"auto\"===t.tickmode&&(j=t.tickfont?t.tickfont.size:12);var U=NaN;for(z=P.length-1;z>-1;z--)if(P[z].drop)P.splice(z,1);else{P[z].value=Mt(P[z].value,t);var H=t.c2p(P[z].value);(N?U>H-j:Uu||Gu&&(q.periodX=u),G10||\"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>=L&&a<=16||e>=E)t._tickround=\"M\";else if(e>=C&&a<=19||e>=L)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),u=void 0===t.minexponent?3:t.minexponent;Math.abs(c)>u&&(ut(t.exponentformat)&&!ft(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function lt(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}}V.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,0);var a=2*e;if(a>v)e/=v,r=n(10),t.dtick=\"M\"+12*ot(e,r,$);else if(a>T)e/=T,t.dtick=\"M\"+ot(e,1,tt);else if(a>M){t.dtick=ot(e,M,t._hasDayOfWeekBreaks?[1,2,7,14]:rt);var o=V.getTickFormat(t),l=\"period\"===t.ticklabelmode;l&&(t._rawTick0=t.tick0),/%[uVW]/.test(o)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),l&&(t._dowTick0=t.tick0)}else a>E?t.dtick=ot(e,E,tt):a>L?t.dtick=ot(e,L,et):a>C?t.dtick=ot(e,C,et):(r=n(10),t.dtick=ot(e,r,$))}else if(\"log\"===t.type){t.tick0=0;var c=s.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(c[1]-c[0])<1){var u=1.5*Math.abs((c[1]-c[0])/e);e=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/u,r=n(10),t.dtick=\"L\"+ot(e,r,$)}else t.dtick=e>.3?\"D2\":\"D1\"}else\"category\"===t.type||\"multicategory\"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):At(t)?(t.tick0=0,r=1,t.dtick=ot(e,r,at)):(t.tick0=0,r=n(10),t.dtick=ot(e,r,$));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&\"string\"!=typeof t.dtick){var f=t.dtick;throw t.dtick=1,\"ax.dtick error: \"+String(f)}},V.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return s.increment(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?it:nt,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)},V.tickFirst=function(t,e){var r=t.r2l||Number,a=s.simpleMap(t.range,r,void 0,void 0,e),o=a[1] \")}else t._prevDateHead=l,c+=\"
\"+l;e.text=c}(t,o,r,c):\"log\"===u?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=ht(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||ut(p)&&ft(f)?(e.text=0===f?1:1===f?\"10\":\"10\"+(f>1?\"\":P)+h+\"\",e.fontSize*=1.25):(\"e\"===p||\"E\"===p)&&h>2?e.text=\"1\"+p+(f>0?\"+\":P)+h:(e.text=ht(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,g):\"category\"===u?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=\"\");e.text=String(r)}(t,o):\"multicategory\"===u?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],a=void 0===i[1]?\"\":String(i[1]),o=void 0===i[0]?\"\":String(i[0]);r?e.text=o+\" - \"+a:(e.text=a,e.text2=o)}(t,o,r):At(t)?function(t,e,r,n,i){if(\"radians\"!==t.thetaunit||r)e.text=ht(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){for(var r=1;!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=ht(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=[\"\",o[0],\"\",\"\\u2044\",\"\",o[1],\"\",\"\\u03c0\"].join(\"\"),l&&(e.text=P+e.text)}}}}(t,o,r,c,g):function(t,e,r,n,i){\"never\"===i?i=\"\":\"all\"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i=\"hide\");e.text=ht(e.x,t,i,n)}(t,o,0,c,g),n||(t.tickprefix&&!d(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!d(t.showticksuffix)&&(o.text+=t.ticksuffix)),\"boundaries\"===t.tickson||t.showdividers){var m=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};o.xbnd=[m(o.x-.5),m(o.x+t.dtick-.5)]}return o},V.hoverLabelText=function(t,e,r){r&&(t=s.extendFlat({},t,{hoverformat:r}));var n=Array.isArray(e)?e[0]:e,i=Array.isArray(e)?e[1]:void 0;if(void 0!==i&&i!==n)return V.hoverLabelText(t,n,r)+\" - \"+V.hoverLabelText(t,i,r);var a=\"log\"===t.type&&n<=0,o=V.tickText(t,t.c2l(a?-n:n),\"hover\").text;return a?0===n?\"0\":P+o:o};var ct=[\"f\",\"p\",\"n\",\"\\u03bc\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\"];function ut(t){return\"SI\"===t||\"B\"===t}function ft(t){return t>14||t<-15}function ht(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||\"B\",c=e._tickexponent,u=V.getTickFormat(e),f=e.separatethousands;if(n){var h={exponentformat:l,minexponent:e.minexponent,dtick:\"none\"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:\"none\"===e.showexponent?e.range.map(e.r2d):[0,t||1]};st(h),o=(Number(h._tickround)||0)+4,c=h._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,P);var p,d=Math.pow(10,-o)/2;if(\"none\"===l&&(c=0),(t=Math.abs(t))\"+p+\"\":\"B\"===l&&9===c?t+=\"B\":ut(l)&&(t+=ct[c/3+5]));return a?P+t:t}function pt(t,e){for(var r=[],n={},i=0;i1&&r=i.min&&t=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=o(i)))){r=n;break}break;case\"log\":for(e=0;e0?r.bottom-f:0,h)))),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1];if(\"x\"===d){if(\"b\"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?f-r.top:0,h),p.reverse()),r.width>0){var m=r.right-(e._offset+e._length);m>0&&(n.xr=1,n.r=m);var v=e._offset-r.left;v>0&&(n.xl=0,n.l=v)}}else if(\"l\"===l?n[l]=e._depth=Math.max(r.height>0?f-r.left:0,h):(n[l]=e._depth=Math.max(r.height>0?r.right-f:0,h),p.reverse()),r.height>0){var y=r.bottom-(e._offset+e._length);y>0&&(n.yb=0,n.b=y);var x=e._offset-r.top;x>0&&(n.yt=1,n.t=x)}n[g]=\"free\"===e.anchor?e.position:e._anchorAxis.domain[p[0]],e.title.text!==c._dfltTitle[d]&&(n[l]+=mt(e)+(e.title.standoff||0)),e.mirror&&\"free\"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[u]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[u]+=h),!0===e.mirror||\"ticks\"===e.mirror?i[g]=e._anchorAxis.domain[p[1]]:\"all\"!==e.mirror&&\"allticks\"!==e.mirror||(i[g]=[e._counterDomainMin,e._counterDomainMax][p[1]]))}K&&(s=o.getComponentMethod(\"rangeslider\",\"autoMarginOpts\")(t,e)),a.autoMargin(t,xt(e),n),a.autoMargin(t,bt(e),i),a.autoMargin(t,_t(e),s)})),r.skipTitle||K&&\"bottom\"===e.side||Z.push((function(){return function(t,e){var r,n=t._fullLayout,i=e._id,a=i.charAt(0),o=e.title.font.size;if(e.title.hasOwnProperty(\"standoff\"))r=e._depth+e.title.standoff+mt(e);else{var s=St(e);if(\"multicategory\"===e.type)r=e._depth;else{var l=1.5*o;s&&(l=.5*o,\"outside\"===e.ticks&&(l+=e.ticklen)),r=10+l+(e.linewidth?e.linewidth-1:0)}s||(r+=\"x\"===a?\"top\"===e.side?o*(e.showticklabels?1:0):o*(e.showticklabels?1.5:.5):\"right\"===e.side?o*(e.showticklabels?1:.5):o*(e.showticklabels?.5:0))}var c,f,p,d,g=V.getPxPosition(t,e);\"x\"===a?(f=e._offset+e._length/2,p=\"top\"===e.side?g-r:g+r):(p=e._offset+e._length/2,f=\"right\"===e.side?g+r:g-r,c={rotate:\"-90\",offset:0});if(\"multicategory\"!==e.type){var m=e._selections[e._id+\"tick\"];if(d={selection:m,side:e.side},m&&m.node()&&m.node().parentNode){var v=h.getTranslate(m.node().parentNode);d.offsetLeft=v.x,d.offsetTop=v.y}e.title.hasOwnProperty(\"standoff\")&&(d.pad=0)}return u.draw(t,i+\"title\",{propContainer:e,propName:e._name+\".title.text\",placeholder:n._dfltTitle[a],avoid:d,transform:c,attributes:{x:f,y:p,\"text-anchor\":\"middle\"}})}(t,e)})),s.syncOrAsync(Z)}}function Q(t){var r=p+(t||\"tick\");return w[r]||(w[r]=function(t,e){var r,n,i,a;t._selections[e].size()?(r=1/0,n=-1/0,i=1/0,a=-1/0,t._selections[e].each((function(){var t=yt(this),e=h.bBox(t.node().parentNode);r=Math.min(r,e.top),n=Math.max(n,e.bottom),i=Math.min(i,e.left),a=Math.max(a,e.right)}))):(r=0,n=0,i=0,a=0);return{top:r,bottom:n,left:i,right:a,height:n-r,width:a-i}}(e,r)),w[r]}},V.getTickSigns=function(t){var e=t._id.charAt(0),r={x:\"top\",y:\"right\"}[e],n=t.side===r?1:-1,i=[-1,1,n,-n];return\"inside\"!==t.ticks==(\"x\"===e)&&(i=i.map((function(t){return-t}))),t.side&&i.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),i},V.makeTransTickFn=function(t){return\"x\"===t._id.charAt(0)?function(e){return l(t._offset+t.l2p(e.x),0)}:function(e){return l(0,t._offset+t.l2p(e.x))}},V.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||\"\",r=function(t){return-1!==e.indexOf(t)},n=r(\"top\"),i=r(\"left\"),a=r(\"right\"),o=r(\"bottom\"),s=r(\"inside\"),l=o||i||n||a;if(!l&&!s)return[0,0];var c=t.side,u=l?(t.tickwidth||0)/2:0,f=3,h=t.tickfont?t.tickfont.size:12;(o||n)&&(u+=h*N,f+=(t.linewidth||0)/2);(i||a)&&(u+=(t.linewidth||0)/2,f+=3);s&&\"top\"===c&&(f-=h*(1-N));(i||n)&&(u=-u);\"bottom\"!==c&&\"right\"!==c||(f=-f);return[l?u:0,s?f:0]}(t),r=e[0],n=e[1];return\"x\"===t._id.charAt(0)?function(e){return l(r+t._offset+t.l2p(dt(e)),n)}:function(e){return l(n,r+t._offset+t.l2p(dt(e)))}},V.makeTickPath=function(t,e,r,n){n=void 0!==n?n:t.ticklen;var i=t._id.charAt(0),a=(t.linewidth||1)/2;return\"x\"===i?\"M0,\"+(e+a*r)+\"v\"+n*r:\"M\"+(e+a*r)+\",0h\"+n*r},V.makeLabelFns=function(t,e,r){var n=t.ticklabelposition||\"\",a=function(t){return-1!==n.indexOf(t)},o=a(\"top\"),l=a(\"left\"),c=a(\"right\"),u=a(\"bottom\")||l||o||c,f=a(\"inside\"),h=\"inside\"===n&&\"inside\"===t.ticks||!f&&\"outside\"===t.ticks&&\"boundaries\"!==t.tickson,p=0,d=0,g=h?t.ticklen:0;if(f?g*=-1:u&&(g=0),h&&(p+=g,r)){var m=s.deg2rad(r);p=g*Math.cos(m)+1,d=g*Math.sin(m)}t.showticklabels&&(h||t.showline)&&(p+=.2*t.tickfont.size);var v,y,x,b,_,w={labelStandoff:p+=(t.linewidth||1)/2*(f?-1:1),labelShift:d},T=0,k=t.side,A=t._id.charAt(0),M=t.tickangle;if(\"x\"===A)b=(_=!f&&\"bottom\"===k||f&&\"top\"===k)?1:-1,f&&(b*=-1),v=d*b,y=e+p*b,x=_?1:-.2,90===Math.abs(M)&&(f?x+=B:x=-90===M&&\"bottom\"===k?N:90===M&&\"top\"===k?B:.5,T=B/2*(M/90)),w.xFn=function(t){return t.dx+v+T*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*x},w.anchorFn=function(t,e){if(u){if(l)return\"end\";if(c)return\"start\"}return i(e)&&0!==e&&180!==e?e*b<0!==f?\"end\":\"start\":\"middle\"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:\"top\"===t.side!==f?-n:0};else if(\"y\"===A){if(b=(_=!f&&\"left\"===k||f&&\"right\"===k)?1:-1,f&&(b*=-1),v=p,y=d*b,x=0,f||90!==Math.abs(M)||(x=-90===M&&\"left\"===k||90===M&&\"right\"===k?N:.5),f){var S=i(M)?+M:0;if(0!==S){var E=s.deg2rad(S);T=Math.abs(Math.sin(E))*N*b,x=0}}w.xFn=function(t){return t.dx+e-(v+t.fontSize*x)*b+T*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*B},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?\"middle\":_?\"end\":\"start\"},w.heightFn=function(e,r,n){return\"right\"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},V.drawTicks=function(t,e,r){r=r||{};var n=e._id+\"tick\",i=r.vals;\"period\"===e.ticklabelmode&&(i=i.slice()).shift();var a=r.layer.selectAll(\"path.\"+n).data(e.ticks?i:[],gt);a.exit().remove(),a.enter().append(\"path\").classed(n,1).classed(\"ticks\",1).classed(\"crisp\",!1!==r.crisp).call(f.stroke,e.tickcolor).style(\"stroke-width\",h.crispRound(t,e.tickwidth,1)+\"px\").attr(\"d\",r.path).style(\"display\",null),Et(e,[D]),a.attr(\"transform\",r.transFn)},V.drawGrid=function(t,e,r){r=r||{};var n=e._id+\"grid\",i=r.vals,a=r.counterAxis;if(!1===e.showgrid)i=[];else if(a&&V.shouldShowZeroLine(t,e,a))for(var o=\"array\"===e.tickmode,s=0;sp||a.leftp||a.top+(e.tickangle?0:t.fontSize/4)e[\"_visibleLabelMin_\"+r._id]?l.style(\"display\",\"none\"):\"tick\"!==t.K||i||l.style(\"display\",null)}))}))}))}))},x(v,m+1?m:g);var b=null;e._selections&&(e._selections[f]=v);var _=[function(){return y.length&&Promise.all(y)}];e.automargin&&a._redrawFromAutoMarginCount&&90===m?(b=90,_.push((function(){x(v,m)}))):_.push((function(){if(x(v,g),p.length&&\"x\"===u&&!i(g)&&(\"log\"!==e.type||\"D\"!==String(e.dtick).charAt(0))){b=0;var t,n=0,a=[];if(v.each((function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),i=yt(this),o=h.bBox(i.node());a.push({top:0,bottom:10,height:10,left:r-o.width/2,right:r+o.width/2+2,width:o.width+2})})),\"boundaries\"!==e.tickson&&!e.showdividers||r.secondary){var o=p.length,l=Math.abs((p[o-1].x-p[0].x)*e._m)/(o-1),c=e.ticklabelposition||\"\",f=function(t){return-1!==c.indexOf(t)},d=f(\"top\"),m=f(\"left\"),y=f(\"right\"),_=f(\"bottom\")||m||d||y?(e.tickwidth||0)+6:0,w=l<2.5*n||\"multicategory\"===e.type||\"realaxis\"===e._name;for(t=0;t1)for(n=1;n2*o}(i,e))return\"date\";var m=\"strict\"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=f(r),i=0,o=0,s={},u=0;u2*i}(i,m)?\"category\":function(t,e){for(var r=t.length,n=0;n=2){var l,c,u=\"\";if(2===o.length)for(l=0;l<2;l++)if(c=x(o[l])){u=g;break}var f=i(\"pattern\",u);if(f===g)for(l=0;l<2;l++)(c=x(o[l]))&&(e.bounds[l]=o[l]=c-1);if(f)for(l=0;l<2;l++)switch(c=o[l],f){case g:if(!n(c))return void(e.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(e.enabled=!1);e.bounds[l]=o[l]=c;break;case m:if(!n(c))return void(e.enabled=!1);if((c=+c)<0||c>24)return void(e.enabled=!1);e.bounds[l]=o[l]=c}if(!1===r.autorange){var h=r.range;if(h[0]h[1])return void(e.enabled=!1)}else if(o[0]>h[0]&&o[1]n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},r.ref2id=function(t){return!!/^[xyz]/.test(t)&&t.split(\" \")[0]},r.isLinked=function(t,e){return a(e,t._axisMatchGroups)||a(e,t._axisConstraintGroups)}},{\"../../registry\":638,\"./constants\":561}],559:[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;nn?i.substr(n):a.substr(r))+o:i+a+t*e:o}function m(t,e){for(var r=e._size,n=r.h/r.w,i={},a=Object.keys(t),o=0;oc*x)||T)for(r=0;rO&&FP&&(P=F);h/=(P-C)/(2*I),C=l.l2r(C),P=l.l2r(P),l.range=l._input.range=S=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function N(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\",c(r,n)).attr(\"d\",i+\"Z\")}function j(t,e,r){return t.append(\"path\").attr(\"class\",\"zoombox-corners\").style({fill:f.background,stroke:f.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"transform\",c(e,r)).attr(\"d\",\"M0,0Z\")}function U(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\"),V(t,e,i,a)}function V(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 H(t){n.select(t).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}function q(t){I&&t.data&&t._context.showTips&&(i.notifier(i._(t,\"Double-click to zoom back out\"),\"long\"),I=!1)}function G(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,P)/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 Y(t,e,r,n,a){for(var o,s,l,c,u=!1,f={},h={},p=(a||{}).xaHash,d=(a||{}).yaHash,g=0;g=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(H(i),2!==t||vt||qt(),mt)o.indexOf(\"select\")>-1&&S(r,i,J,K,e.id,Pt),o.indexOf(\"event\")>-1&&p.click(i,r,e.id);else if(1===t&&vt){var s=g?O:I,c=\"s\"===g||\"w\"===v?0:1,f=s._name+\".range[\"+c+\"]\",h=function(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return\"date\"===t.type?n:\"log\"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a(\".\"+r+\"g\")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a(\".\"+String(r)+\"g\")(n))}(s,c),d=\"left\",m=\"middle\";if(s.fixedrange)return;g?(m=\"n\"===g?\"top\":\"bottom\",\"right\"===s.side&&(d=\"right\")):\"e\"===v&&(d=\"right\"),i._context.showAxisRangeEntryBoxes&&n.select(bt).call(u.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(h),fill:s.tickfont?s.tickfont.color:\"#444\",horizontalAlign:d,verticalAlign:m}).on(\"edit\",(function(t){var e=s.d2r(t);void 0!==e&&l.call(\"_guiRelayout\",i,f,e)}))}}}function zt(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(tt,pt*e+_t)),i=Math.max(0,Math.min(et,dt*r+wt)),a=Math.abs(n-_t),o=Math.abs(i-wt);function s(){St=\"\",Tt.r=Tt.l,Tt.t=Tt.b,Lt.attr(\"d\",\"M0,0Z\")}if(Tt.l=Math.min(_t,n),Tt.r=Math.max(_t,n),Tt.t=Math.min(wt,i),Tt.b=Math.max(wt,i),rt.isSubplotConstrained)a>P||o>P?(St=\"xy\",a/tt>o/et?(o=a*et/tt,wt>i?Tt.t=wt-o:Tt.b=wt+o):(a=o*tt/et,_t>n?Tt.l=_t-a:Tt.r=_t+a),Lt.attr(\"d\",G(Tt))):s();else if(nt.isSubplotConstrained)if(a>P||o>P){St=\"xy\";var l=Math.min(Tt.l/tt,(et-Tt.b)/et),c=Math.max(Tt.r/tt,(et-Tt.t)/et);Tt.l=l*tt,Tt.r=c*tt,Tt.b=(1-l)*et,Tt.t=(1-c)*et,Lt.attr(\"d\",G(Tt))}else s();else!at||o0){var u;if(nt.isSubplotConstrained||!it&&1===at.length){for(u=0;ug[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s)}return r(\"layer\"),e}},{\"../../lib\":503,\"fast-isnumeric\":190}],573:[function(t,e,r){\"use strict\";var n=t(\"./show_dflt\");e.exports=function(t,e,r,i,a){a||(a={});var o=a.tickSuffixDflt,s=n(t);r(\"tickprefix\")&&r(\"showtickprefix\",s),r(\"ticksuffix\",o)&&r(\"showticksuffix\",s)}},{\"./show_dflt\":577}],574:[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)],t.setScale()}},{\"../../constants/alignment\":471}],575:[function(t,e,r){\"use strict\";var n=t(\"polybooljs\"),i=t(\"../../registry\"),a=t(\"../../components/drawing\").dashStyle,o=t(\"../../components/color\"),s=t(\"../../components/fx\"),l=t(\"../../components/fx/helpers\").makeEventData,c=t(\"../../components/dragelement/helpers\"),u=c.freeMode,f=c.rectMode,h=c.drawMode,p=c.openMode,d=c.selectMode,g=t(\"../../components/shapes/draw_newshape/display_outlines\"),m=t(\"../../components/shapes/draw_newshape/helpers\").handleEllipse,v=t(\"../../components/shapes/draw_newshape/newshapes\"),y=t(\"../../lib\"),x=t(\"../../lib/polygon\"),b=t(\"../../lib/throttle\"),_=t(\"./axis_ids\").getFromId,w=t(\"../../lib/clear_gl_canvases\"),T=t(\"../../plot_api/subroutines\").redrawReglTraces,k=t(\"./constants\"),A=k.MINSELECT,M=x.filter,S=x.tester,E=t(\"./handle_outline\").clearSelect,L=t(\"./helpers\"),C=L.p2r,P=L.axValue,I=L.getTransform;function O(t,e,r,n,i,a,o){var s,l,c,u,f,h,d,m,v,y=e._hoverdata,x=e._fullLayout.clickmode.indexOf(\"event\")>-1,b=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(y)){F(t,e,a);var _=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n0?function(t,e){var r,n,i,a=[];for(i=0;i0&&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;i1)return!1;if((i+=r.selectedpoints.length)>1)return!1}return 1===i}(s)&&(h=j(_))){for(o&&o.remove(),v=0;v=0&&n._fullLayout._deactivateShape(n),h(e)){var a=n._fullLayout._zoomlayer.selectAll(\".select-outline-\"+r.id);if(a&&n._fullLayout._drawing){var o=v(a,t);o&&i.call(\"_guiRelayout\",n,{shapes:o}),n._fullLayout._drawing=!1}}r.selection={},r.selection.selectionDefs=t.selectionDefs=[],r.selection.mergedPolygons=t.mergedPolygons=[]}function N(t,e,r,n){var i,a,o,s=[],l=e.map((function(t){return t._id})),c=r.map((function(t){return t._id}));for(o=0;o0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function U(t,e,r){var n,a,o,s;for(n=0;n=0)L._fullLayout._deactivateShape(L);else if(!_){var r=z.clickmode;b.done(gt).then((function(){if(b.clear(gt),2===t){for(ft.remove(),$=0;$-1&&O(e,L,i.xaxes,i.yaxes,i.subplot,i,ft),\"event\"===r&&L.emit(\"plotly_selected\",void 0);s.click(L,e)})).catch(y.error)}},i.doneFn=function(){dt.remove(),b.done(gt).then((function(){b.clear(gt),i.gd.emit(\"plotly_selected\",et),Q&&i.selectionDefs&&(Q.subtract=ut,i.selectionDefs.push(Q),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,K)),i.doneFnCompleted&&i.doneFnCompleted(mt)})).catch(y.error),_&&B(i)}},clearSelect:E,clearSelectionsCache:B,selectOnClick:O}},{\"../../components/color\":366,\"../../components/dragelement/helpers\":384,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../components/fx/helpers\":402,\"../../components/shapes/draw_newshape/display_outlines\":454,\"../../components/shapes/draw_newshape/helpers\":455,\"../../components/shapes/draw_newshape/newshapes\":456,\"../../lib\":503,\"../../lib/clear_gl_canvases\":487,\"../../lib/polygon\":515,\"../../lib/throttle\":530,\"../../plot_api/subroutines\":544,\"../../registry\":638,\"./axis_ids\":558,\"./constants\":561,\"./handle_outline\":565,\"./helpers\":566,polybooljs:254}],576:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-time-format\").utcFormat,a=t(\"../../lib\"),o=a.numberFormat,s=t(\"fast-isnumeric\"),l=a.cleanNumber,c=a.ms2DateTime,u=a.dateTime2ms,f=a.ensureNumber,h=a.isArrayOrTypedArray,p=t(\"../../constants/numerical\"),d=p.FP_SAFE,g=p.BADNUM,m=p.LOG_CLIP,v=p.ONEWEEK,y=p.ONEDAY,x=p.ONEHOUR,b=p.ONEMIN,_=p.ONESEC,w=t(\"./axis_ids\"),T=t(\"./constants\"),k=T.HOUR_PATTERN,A=T.WEEKDAY_PATTERN;function M(t){return Math.pow(10,t)}function S(t){return null!=t}e.exports=function(t,e){e=e||{};var r=t._id||\"x\",p=r.charAt(0);function E(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*m*Math.abs(n-i))}return g}function L(e,r,n,i){if((i||{}).msUTC&&s(e))return+e;var o=u(e,n||t.calendar);if(o===g){if(!s(e))return g;e=+e;var l=Math.floor(10*a.mod(e+.05,1)),c=Math.round(e-l/10);o=u(new Date(c))+l/10}return o}function C(e,r,n){return c(e,r,n||t.calendar)}function P(e){return t._categories[Math.round(e)]}function I(e){if(S(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push(\"number\"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return g}function O(e){if(t._categoriesMap)return t._categoriesMap[e]}function z(t){var e=O(t);return void 0!==e?e:s(t)?+t:void 0}function D(t){return s(t)?+t:O(t)}function R(t,e,r){return n.round(r+e*t,2)}function F(t,e,r){return(t-r)/e}var B=function(e){return s(e)?R(e,t._m,t._b):g},N=function(e){return F(e,t._m,t._b)};if(t.rangebreaks){var j=\"y\"===p;B=function(e){if(!s(e))return g;var r=t._rangebreaks.length;if(!r)return R(e,t._m,t._b);var n=j;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,a=i*e,o=0,l=0;lu)){o=a<(c+u)/2?l:l+1;break}o=l+1}var f=t._B[o]||0;return isFinite(f)?R(e,t._m2,f):0},N=function(e){var r=t._rangebreaks.length;if(!r)return F(e,t._m,t._b);for(var n=0,i=0;it._rangebreaks[i].pmax&&(n=i+1);return F(e,t._m2,t._B[n])}}t.c2l=\"log\"===t.type?E:f,t.l2c=\"log\"===t.type?M:f,t.l2p=B,t.p2l=N,t.c2p=\"log\"===t.type?function(t,e){return B(E(t,e))}:B,t.p2c=\"log\"===t.type?function(t){return M(N(t))}:N,-1!==[\"linear\",\"-\"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=f,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=N,t.cleanPos=f):\"log\"===t.type?(t.d2r=t.d2l=function(t,e){return E(l(t),e)},t.r2d=t.r2c=function(t){return M(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=f,t.c2r=E,t.l2d=M,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return M(N(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=N,t.cleanPos=f):\"date\"===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=L,t.c2d=t.c2r=t.l2d=t.l2r=C,t.d2p=t.r2p=function(e,r,n){return t.l2p(L(e,0,n))},t.p2d=t.p2r=function(t,e,r){return C(N(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,g,t.calendar)}):\"category\"===t.type?(t.d2c=t.d2l=I,t.r2d=t.c2d=t.l2d=P,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=D(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=f,t.r2l=D,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return\"string\"==typeof t&&\"\"!==t?t:f(t)}):\"multicategory\"===t.type&&(t.r2d=t.c2d=t.l2d=P,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=z(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=O,t.l2r=t.c2r=f,t.r2l=z,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return Array.isArray(t)||\"string\"==typeof t&&\"\"!==t?t:f(t)},t.setupMultiCategory=function(n){var i,o,s=t._traceIndices,l=t._matchGroup;if(l&&0===t._categories.length)for(var c in l)if(c!==r){var u=e[w.id2name(c)];s=s.concat(u._traceIndices)}var f=[[0,{}],[0,{}]],d=[];for(i=0;id&&(o[n]=d),o[0]===o[1]){var c=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=c,o[1]+=c}}else a.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=w.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?\"_r\":\"range\",o=t.calendar;t.cleanRange(a);var s,l,c=t.r2l(t[a][0],o),u=t.r2l(t[a][1],o),f=\"y\"===p;if((f?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks)&&(t._rangebreaks=t.locateBreaks(Math.min(c,u),Math.max(c,u)),t._rangebreaks.length)){for(s=0;su&&(h=!h),h&&t._rangebreaks.reverse();var d=h?-1:1;for(t._m2=d*t._length/(Math.abs(u-c)-t._lBreaks),t._B.push(-t._m2*(f?u:c)),s=0;si&&(i+=7,oi&&(i+=24,o=n&&o=n&&e=s.min&&(ts.max&&(s.max=n),i=!1)}i&&c.push({min:t,max:n})}};for(n=0;nr.duration?(!function(){for(var r={},n=0;n rect\").call(o.setTranslate,0,0).call(o.setScale,1,1),t.plot.call(o.setTranslate,e._offset,r._offset).call(o.setScale,1,1);var n=t.plot.selectAll(\".scatterlayer .trace\");n.selectAll(\".point\").call(o.setPointGroupScale,1,1),n.selectAll(\".textpoint\").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,t)}function m(e,r){var n=e.plotinfo,i=n.xaxis,l=n.yaxis,c=i._length,u=l._length,f=!!e.xr1,h=!!e.yr1,p=[];if(f){var d=a.simpleMap(e.xr0,i.r2l),g=a.simpleMap(e.xr1,i.r2l),m=d[1]-d[0],v=g[1]-g[0];p[0]=(d[0]*(1-r)+r*g[0]-d[0])/(d[1]-d[0])*c,p[2]=c*(1-r+r*v/m),i.range[0]=i.l2r(d[0]*(1-r)+r*g[0]),i.range[1]=i.l2r(d[1]*(1-r)+r*g[1])}else p[0]=0,p[2]=c;if(h){var y=a.simpleMap(e.yr0,l.r2l),x=a.simpleMap(e.yr1,l.r2l),b=y[1]-y[0],_=x[1]-x[0];p[1]=(y[1]*(1-r)+r*x[1]-y[1])/(y[0]-y[1])*u,p[3]=u*(1-r+r*_/b),l.range[0]=i.l2r(y[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(y[1]*(1-r)+r*x[1])}else p[1]=0,p[3]=u;s.drawOne(t,i,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[i._id,l._id]);var w=f?c/p[2]:1,T=h?u/p[3]:1,k=f?p[0]:0,A=h?p[1]:0,M=f?p[0]/p[2]*c:0,S=h?p[1]/p[3]*u:0,E=i._offset-M,L=l._offset-S;n.clipRect.call(o.setTranslate,k,A).call(o.setScale,1/w,1/T),n.plot.call(o.setTranslate,E,L).call(o.setScale,w,T),o.setPointGroupScale(n.zoomScalePts,1/w,1/T),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}s.redrawComponents(t)}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../registry\":638,\"./axes\":554,\"@plotly/d3\":58}],582:[function(t,e,r){\"use strict\";var n=t(\"../../registry\").traceIs,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(t,\"box-violin\"),o=n(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(\"autotypenumbers\",s.autotypenumbersDflt),\"-\"===r(\"type\",(s.splomStash||{}).type)&&(!function(t,e){if(\"-\"!==t.type)return;var r,s=t._id,l=s.charAt(0);-1!==s.indexOf(\"scene\")&&(s=l);var c=function(t,e,r){for(var n=0;n0&&(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,s,l);if(!c)return;if(\"histogram\"===c.type&&l==={v:\"y\",h:\"x\"}[c.orientation||\"v\"])return void(t.type=\"linear\");var u=l+\"calendar\",f=c[u],h={noMultiCategory:!n(c,\"cartesian\")||n(c,\"noMultiCategory\")};\"box\"===c.type&&c._hasPreCompStats&&l==={h:\"x\",v:\"y\"}[c.orientation||\"v\"]&&(h.noMultiCategory=!0);if(h.autotypenumbers=t.autotypenumbers,o(c,l)){var p=a(c),d=[];for(r=0;r0?\".\":\"\")+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;f0&&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]]]}}e.exports=function(t){return new M(t)},S.plot=function(t,e,r){var n=this,i=e[this.id],a=[],o=!1;for(var s in w.layerNameToAdjective)if(\"frame\"!==s&&i[\"show\"+s]){o=!0;break}for(var l=0;l0&&a._module.calcGeoJSON(i,e)}if(!this.updateProjection(t,e)){this.viewInitial&&this.scope===r.scope||this.saveViewInitial(r),this.scope=r.scope,this.updateBaseLayers(e,r),this.updateDims(e,r),this.updateFx(e,r),d.generalUpdatePerTraceModule(this.graphDiv,this,t,r);var o=this.layers.frontplot.select(\".scatterlayer\");this.dataPoints.point=o.selectAll(\".point\"),this.dataPoints.text=o.selectAll(\"text\"),this.dataPaths.line=o.selectAll(\".js-line\");var s=this.layers.backplot.select(\".choroplethlayer\");this.dataPaths.choropleth=s.selectAll(\"path\"),this.render()}},S.updateProjection=function(t,e){var r=this.graphDiv,n=e[this.id],l=e._size,u=n.domain,f=n.projection,h=n.lonaxis,p=n.lataxis,d=h._ax,g=p._ax,v=this.projection=function(t){var e=t.projection,r=e.type,n=w.projNames[r];n=\"geo\"+c.titleCase(n);for(var l=(i[n]||s[n])(),u=t._isSatellite?180*Math.acos(1/e.distance)/Math.PI:t._isClipped?w.lonaxisSpan[r]/2:null,f=[\"center\",\"rotate\",\"parallels\",\"clipExtent\"],h=function(t){return t?l:[]},p=0;pu*Math.PI/180}return!1},l.getPath=function(){return a().projection(l)},l.getBounds=function(t){return l.getPath().bounds(t)},l.precision(w.precision),t._isSatellite&&l.tilt(e.tilt).distance(e.distance);u&&l.clipAngle(u-w.clipPad);return l}(n),y=[[l.l+l.w*u.x[0],l.t+l.h*(1-u.y[1])],[l.l+l.w*u.x[1],l.t+l.h*(1-u.y[0])]],x=n.center||{},b=f.rotation||{},_=h.range||[],T=p.range||[];if(n.fitbounds){d._length=y[1][0]-y[0][0],g._length=y[1][1]-y[0][1],d.range=m(r,d),g.range=m(r,g);var k=(d.range[0]+d.range[1])/2,A=(g.range[0]+g.range[1])/2;if(n._isScoped)x={lon:k,lat:A};else if(n._isClipped){x={lon:k,lat:A},b={lon:k,lat:A,roll:b.roll};var M=f.type,S=w.lonaxisSpan[M]/2||180,L=w.lataxisSpan[M]/2||90;_=[k-S,k+S],T=[A-L,A+L]}else x={lon:k,lat:A},b={lon:k,lat:b.lat,roll:b.roll}}v.center([x.lon-b.lon,x.lat-b.lat]).rotate([-b.lon,-b.lat,b.roll]).parallels(f.parallels);var C=E(_,T);v.fitExtent(y,C);var P=this.bounds=v.getBounds(C),I=this.fitScale=v.scale(),O=v.translate();if(n.fitbounds){var z=v.getBounds(E(d.range,g.range)),D=Math.min((P[1][0]-P[0][0])/(z[1][0]-z[0][0]),(P[1][1]-P[0][1])/(z[1][1]-z[0][1]));isFinite(D)?v.scale(D*I):c.warn(\"Something went wrong during\"+this.id+\"fitbounds computations.\")}else v.scale(f.scale*I);var R=this.midPt=[(P[0][0]+P[1][0])/2,(P[0][1]+P[1][1])/2];if(v.translate([O[0]+(R[0]-O[0]),O[1]+(R[1]-O[1])]).clipExtent(P),n._isAlbersUsa){var F=v([x.lon,x.lat]),B=v.translate();v.translate([B[0]-(F[0]-B[0]),B[1]-(F[1]-B[1])])}},S.updateBaseLayers=function(t,e){var r=this,i=r.topojson,a=r.layers,o=r.basePaths;function s(t){return\"lonaxis\"===t||\"lataxis\"===t}function l(t){return Boolean(w.lineLayers[t])}function c(t){return Boolean(w.fillLayers[t])}var u=(this.hasChoropleth?w.layersForChoropleth:w.layers).filter((function(t){return l(t)||c(t)?e[\"show\"+t]:!s(t)||e[t].showgrid})),p=r.framework.selectAll(\".layer\").data(u,String);p.exit().each((function(t){delete a[t],delete o[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\"):s(t)?o[t]=e.append(\"path\").style(\"fill\",\"none\"):\"backplot\"===t?e.append(\"g\").classed(\"choroplethlayer\",!0):\"frontplot\"===t?e.append(\"g\").classed(\"scatterlayer\",!0):l(t)?o[t]=e.append(\"path\").style(\"fill\",\"none\").style(\"stroke-miterlimit\",2):c(t)&&(o[t]=e.append(\"path\").style(\"stroke\",\"none\"))})),p.order(),p.each((function(r){var n=o[r],a=w.layerNameToAdjective[r];\"frame\"===r?n.datum(w.sphereSVG):l(r)||c(r)?n.datum(A(i,i.objects[r])):s(r)&&n.datum(function(t,e,r){var n,i,a,o=e[t],s=w.scopeDefaults[e.scope];\"lonaxis\"===t?(n=s.lonaxisRange,i=s.lataxisRange,a=function(t,e){return[t,e]}):\"lataxis\"===t&&(n=s.lataxisRange,i=s.lonaxisRange,a=function(t,e){return[e,t]});var l={type:\"linear\",range:[n[0],n[1]-1e-6],tick0:o.tick0,dtick:o.dtick};g.setConvert(l,r);var c=g.calcTicks(l);e.isScoped||\"lonaxis\"!==t||c.pop();for(var u=c.length,f=new Array(u),h=0;h-1&&b(n.event,i,[r.xaxis],[r.yaxis],r.id,f),s.indexOf(\"event\")>-1&&p.click(i,n.event))}))}function h(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},S.makeFramework=function(){var t=this,e=t.graphDiv,r=e._fullLayout,i=\"clip\"+r._uid+t.id;t.clipDef=r._clips.append(\"clipPath\").attr(\"id\",i),t.clipRect=t.clipDef.append(\"rect\"),t.framework=n.select(t.container).append(\"g\").attr(\"class\",\"geo \"+t.id).call(h.setClipUrl,i,e),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\"},g.setConvert(t.mockAxis,r)},S.saveViewInitial=function(t){var e,r=t.center||{},n=t.projection,i=n.rotation||{};this.viewInitial={fitbounds:t.fitbounds,\"projection.scale\":n.scale},e=t._isScoped?{\"center.lon\":r.lon,\"center.lat\":r.lat}:t._isClipped?{\"projection.rotation.lon\":i.lon,\"projection.rotation.lat\":i.lat}:{\"center.lon\":r.lon,\"center.lat\":r.lat,\"projection.rotation.lon\":i.lon},c.extendFlat(this.viewInitial,e)},S.render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?u(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\":366,\"../../components/dragelement\":385,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/geo_location_utils\":496,\"../../lib/topojson_utils\":532,\"../../registry\":638,\"../cartesian/autorange\":553,\"../cartesian/axes\":554,\"../cartesian/select\":575,\"../plots\":619,\"./constants\":587,\"./zoom\":592,\"@plotly/d3\":58,\"d3-geo\":114,\"d3-geo-projection\":113,\"topojson-client\":315}],589:[function(t,e,r){\"use strict\";var n=t(\"../../plots/get_data\").getSubplotCalcData,i=t(\"../../lib\").counterRegex,a=t(\"./geo\"),o=\"geo\",s=i(o),l={};l.geo={valType:\"subplotid\",dflt:o,editType:\"calc\"},e.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:t(\"./layout_attributes\"),supplyLayoutDefaults:t(\"./layout_defaults\"),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots.geo,s=0;s0&&P<0&&(P+=360);var I,O,z,D=(C+P)/2;if(!p){var R=d?f.projRotate:[D,0,0];I=r(\"projection.rotation.lon\",R[0]),r(\"projection.rotation.lat\",R[1]),r(\"projection.rotation.roll\",R[2]),r(\"showcoastlines\",!d&&x)&&(r(\"coastlinecolor\"),r(\"coastlinewidth\")),r(\"showocean\",!!x&&void 0)&&r(\"oceancolor\")}(p?(O=-96.6,z=38.7):(O=d?D:I,z=(L[0]+L[1])/2),r(\"center.lon\",O),r(\"center.lat\",z),g&&(r(\"projection.tilt\"),r(\"projection.distance\")),m)&&r(\"projection.parallels\",f.projParallels||[0,60]);r(\"projection.scale\"),r(\"showland\",!!x&&void 0)&&r(\"landcolor\"),r(\"showlakes\",!!x&&void 0)&&r(\"lakecolor\"),r(\"showrivers\",!!x&&void 0)&&(r(\"rivercolor\"),r(\"riverwidth\")),r(\"showcountries\",d&&\"usa\"!==u&&x)&&(r(\"countrycolor\"),r(\"countrywidth\")),(\"usa\"===u||\"north america\"===u&&50===c)&&(r(\"showsubunits\",x),r(\"subunitcolor\"),r(\"subunitwidth\")),d||r(\"showframe\",x)&&(r(\"framecolor\"),r(\"framewidth\")),r(\"bgcolor\"),r(\"fitbounds\")&&(delete e.projection.scale,d?(delete e.center.lon,delete e.center.lat):v?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}e.exports=function(t,e,r){i(t,e,r,{type:\"geo\",attributes:s,handleDefaults:c,fullData:r,partition:\"y\"})}},{\"../../lib\":503,\"../get_data\":593,\"../subplot_defaults\":632,\"./constants\":587,\"./layout_attributes\":590}],592:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../registry\"),o=Math.PI/180,s=180/Math.PI,l={cursor:\"pointer\"},c={cursor:\"auto\"};function u(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function f(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],c=o._fullLayout,u=c[n],f={},h={};function p(t,e){f[n+\".\"+t]=i.nestedProperty(l,t).get(),a.call(\"_storeDirectGUIEdit\",s,c._preGUI,f);var r=i.nestedProperty(u,t);r.get()!==e&&(r.set(e),i.nestedProperty(l,t).set(e),h[n+\".\"+t]=e)}r(p),p(\"projection.scale\",e.scale()/t.fitScale),p(\"fitbounds\",!1),o.emit(\"plotly_relayout\",h)}function h(t,e){var r=u(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(l)})).on(\"zoom\",(function(){e.scale(n.event.scale).translate(n.event.translate),t.render();var r=e.invert(t.midPt);t.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":e.scale()/t.fitScale,\"geo.center.lon\":r[0],\"geo.center.lat\":r[1]})})).on(\"zoomend\",(function(){n.select(this).style(c),f(t,e,i)})),r}function p(t,e){var r,i,a,o,s,h,p,d,g,m=u(0,e);function v(t){return e.invert(t)}function y(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 m.on(\"zoomstart\",(function(){n.select(this).style(l),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,s=v(r)})).on(\"zoom\",(function(){if(h=n.mouse(this),function(t){var r=v(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>2||Math.abs(n[1]-t[1])>2}(r))return m.scale(e.scale()),void m.translate(e.translate());e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),s?v(h)&&(d=v(h),p=[o[0]+(d[0]-s[0]),i[1],i[2]],e.rotate(p),o=p):s=v(r=h),g=!0,t.render();var l=e.rotate(),c=e.invert(t.midPt);t.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":e.scale()/t.fitScale,\"geo.center.lon\":c[0],\"geo.center.lat\":c[1],\"geo.projection.rotation.lon\":-l[0]})})).on(\"zoomend\",(function(){n.select(this).style(c),g&&f(t,e,y)})),m}function d(t,e){var r,i={r:e.rotate(),k:e.scale()},a=u(0,e),o=function(t){var e=0,r=arguments.length,i=[];for(;++ed?(a=(f>0?90:-90)-p,i=0):(a=Math.asin(f/d)*s-p,i=Math.sqrt(d*d-f*f));var g=180-a-2*p,m=(Math.atan2(h,u)-Math.atan2(c,i))*s,v=(Math.atan2(h,u)-Math.atan2(c,-i))*s;return b(r[0],r[1],a,m)<=b(r[0],r[1],g,v)?[a,m,r[2]]:[g,v,r[2]]}function b(t,e,r,n){var i=_(r-t),a=_(n-e);return Math.sqrt(i*i+a*a)}function _(t){return(t%360+540)%360-180}function w(t,e,r){var n=r*o,i=t.slice(),a=0===e?1:0,s=2===e?1:2,l=Math.cos(n),c=Math.sin(n);return i[a]=t[a]*l-t[s]*c,i[s]=t[s]*l+t[a]*c,i}function T(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*s,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*s]}function k(t,e){for(var r=0,n=0,i=t.length;nMath.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(a)*_*(s>=0?1:-1),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[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&&(m(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&&(m(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).999&&(g=\"turntable\"):g=\"turntable\")}else g=\"turntable\";r(\"dragmode\",g),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:u,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{\"../../../components/color\":366,\"../../../lib\":503,\"../../../registry\":638,\"../../get_data\":593,\"../../subplot_defaults\":632,\"./axis_defaults\":601,\"./layout_attributes\":604}],604:[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),{}),projection:{type:{valType:\"enumerated\",values:[\"perspective\",\"orthographic\"],dflt:\"perspective\",editType:\"calc\"},editType:\"calc\"},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],editType:\"plot\"},hovermode:{valType:\"enumerated\",values:[\"closest\",!1],dflt:\"closest\",editType:\"modebar\"},uirevision:{valType:\"any\",editType:\"none\"},editType:\"plot\",_deprecated:{cameraposition:{valType:\"info_array\",editType:\"camera\"}}}},{\"../../../lib\":503,\"../../../lib/extend\":493,\"../../domain\":584,\"./axis_attributes\":600}],605:[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\":528}],606:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[a[c]];if(u._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/t.dataScale[c],Math.abs(u._length)===1/0||isNaN(u._length))l[c]=[];else{u._input_range=u.range.slice(),u.range[0]=r[c].lo/t.dataScale[c],u.range[1]=r[c].hi/t.dataScale[c],u._m=1/(t.dataScale[c]*r[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var f=u.tickmode;if(\"auto\"===u.tickmode){u.tickmode=\"linear\";var h=u.nticks||i.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/h)}for(var p=n.calcTicks(u,{msUTC:!0}),d=0;d/g,\" \"));l[c]=p,u.tickmode=f}}e.ticks=l;for(c=0;c<3;++c){o[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]);for(d=0;d<2;++d)e.bounds[d][c]=t.glplot.bounds[d][c]}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;ar.deltaY?1.1:1/1.1,a=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(t)}}),!!c&&{passive:!1}),t.glplot.canvas.addEventListener(\"mousemove\",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit(\"plotly_relayouting\",e)}})),t.staticMode||t.glplot.canvas.addEventListener(\"webglcontextlost\",(function(r){e&&e.emit&&e.emit(\"plotly_webglcontextlost\",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},w.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,\"viewBox\",\"0 0 \"+s+\" \"+l),n.setAttributeNS(null,\"width\",s),n.setAttributeNS(null,\"height\",l),b(e),e.glplot.axes.update(e.axesOptions);for(var c=Object.keys(e.traces),u=null,h=e.glplot.selection,g=0;g\")):\"isosurface\"===t.type||\"volume\"===t.type?(T.valueLabel=p.hoverLabelText(e._mockAxis,e._mockAxis.d2l(h.traceCoordinate[3]),t.valuehoverformat),S.push(\"value: \"+T.valueLabel),h.textLabel&&S.push(h.textLabel),x=S.join(\"
\")):x=h.textLabel;var E={x:h.traceCoordinate[0],y:h.traceCoordinate[1],z:h.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:w};d.appendArrayPointValue(E,_,w),t._module.eventData&&(E=_._module.eventData(E,h,_,{},w));var L={points:[E]};if(e.fullSceneLayout.hovermode){var C=[];d.loneHover({trace:_,x:(.5+.5*y[0]/y[3])*s,y:(.5-.5*y[1]/y[3])*l,xLabel:T.xLabel,yLabel:T.yLabel,zLabel:T.zLabel,text:x,name:u.name,color:d.castHoverOption(_,w,\"bgcolor\")||u.color,borderColor:d.castHoverOption(_,w,\"bordercolor\"),fontFamily:d.castHoverOption(_,w,\"font.family\"),fontSize:d.castHoverOption(_,w,\"font.size\"),fontColor:d.castHoverOption(_,w,\"font.color\"),nameLength:d.castHoverOption(_,w,\"namelength\"),textAlign:d.castHoverOption(_,w,\"align\"),hovertemplate:f.castOption(_,w,\"hovertemplate\"),hovertemplateLabels:f.extendFlat({},E,T),eventData:[E]},{container:n,gd:r,inOut_bbox:C}),E.bbox=C[0]}h.buttons&&h.distance<5?r.emit(\"plotly_click\",L):r.emit(\"plotly_hover\",L),this.oldEventData=L}else d.loneUnhover(n),this.oldEventData&&r.emit(\"plotly_unhover\",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)},w.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):f.error(\"Catastrophic and unrecoverable WebGL error. Context lost.\")};requestAnimationFrame(e)};var k=[\"xaxis\",\"yaxis\",\"zaxis\"];function A(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var a=k[i],o=a.charAt(0),s=n[a],l=e[o],c=e[o+\"calendar\"],u=e[\"_\"+o+\"length\"];if(f.isArrayOrTypedArray(l))for(var h,p=0;p<(u||l.length);p++)if(f.isArrayOrTypedArray(l[p]))for(var d=0;dm[1][a])m[0][a]=-1,m[1][a]=1;else{var L=m[1][a]-m[0][a];m[0][a]-=L/32,m[1][a]+=L/32}if(\"reversed\"===s.autorange){var C=m[0][a];m[0][a]=m[1][a],m[1][a]=C}}else{var P=s.range;m[0][a]=s.r2l(P[0]),m[1][a]=s.r2l(P[1])}m[0][a]===m[1][a]&&(m[0][a]-=1,m[1][a]+=1),v[a]=m[1][a]-m[0][a],this.glplot.setBounds(a,{min:m[0][a]*h[a],max:m[1][a]*h[a]})}var I=c.aspectmode;if(\"cube\"===I)d=[1,1,1];else if(\"manual\"===I){var O=c.aspectratio;d=[O.x,O.y,O.z]}else{if(\"auto\"!==I&&\"data\"!==I)throw new Error(\"scene.js aspectRatio was not one of the enumerated types\");var z=[1,1,1];for(a=0;a<3;++a){var D=y[l=(s=c[k[a]]).type];z[a]=Math.pow(D.acc,1/D.count)/h[a]}d=\"data\"===I||Math.max.apply(null,z)/Math.min.apply(null,z)<=4?z:[1,1,1]}c.aspectratio.x=u.aspectratio.x=d[0],c.aspectratio.y=u.aspectratio.y=d[1],c.aspectratio.z=u.aspectratio.z=d[2],this.glplot.setAspectratio(c.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),this.viewInitial.aspectmode||(this.viewInitial.aspectmode=c.aspectmode);var R=c.domain||null,F=e._size||null;if(R&&F){var B=this.container.style;B.position=\"absolute\",B.left=F.l+R.x[0]*F.w+\"px\",B.top=F.t+(1-R.y[1])*F.h+\"px\",B.width=F.w*(R.x[1]-R.x[0])+\"px\",B.height=F.h*(R.y[1]-R.y[0])+\"px\"}this.glplot.redraw()}},w.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener(\"wheel\",this.camera.wheelListener),this.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},w.getCamera=function(){var t;return this.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(t=this.camera).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]},projection:{type:!0===t._ortho?\"orthographic\":\"perspective\"}}},w.setViewport=function(t){var e,r=t.camera;this.camera.lookAt.apply(this,[[(e=r).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]]),this.glplot.setAspectratio(t.aspectratio),\"orthographic\"===r.projection.type!==this.camera._ortho&&(this.glplot.redraw(),this.glplot.clearRGBA(),this.glplot.dispose(),this.initializeGLPlot())},w.isCameraChanged=function(t){var e=this.getCamera(),r=f.nestedProperty(t,this.id+\".camera\").get();function n(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]]}var i=!1;if(void 0===r)i=!0;else{for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!n(e,r,a,o)){i=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(i=!0)}return i},w.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=f.nestedProperty(t,this.id+\".aspectratio\").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},w.saveLayout=function(t){var e,r,n,i,a,o,s=this.fullLayout,l=this.isCameraChanged(t),c=this.isAspectChanged(t),h=l||c;if(h){var p={};if(l&&(e=this.getCamera(),n=(r=f.nestedProperty(t,this.id+\".camera\")).get(),p[this.id+\".camera\"]=n),c&&(i=this.glplot.getAspectratio(),o=(a=f.nestedProperty(t,this.id+\".aspectratio\")).get(),p[this.id+\".aspectratio\"]=o),u.call(\"_storeDirectGUIEdit\",t,s._preGUI,p),l)r.set(e),f.nestedProperty(s,this.id+\".camera\").set(e);if(c)a.set(i),f.nestedProperty(s,this.id+\".aspectratio\").set(i),this.glplot.redraw()}return h},w.updateFx=function(t,e){var r=this.camera;if(r)if(\"orbit\"===t)r.mode=\"orbit\",r.keyBindingMode=\"rotate\";else if(\"turntable\"===t){r.up=[0,0,1],r.mode=\"turntable\",r.keyBindingMode=\"rotate\";var n=this.graphDiv,i=n._fullLayout,a=this.fullSceneLayout.camera,o=a.up.x,s=a.up.y,l=a.up.z;if(l/Math.sqrt(o*o+s*s+l*l)<.999){var c=this.id+\".camera.up\",h={x:0,y:0,z:1},p={};p[c]=h;var d=n.layout;u.call(\"_storeDirectGUIEdit\",d,i._preGUI,p),a.up=h,f.nestedProperty(d,c).set(h)}}else r.keyBindingMode=t;this.fullSceneLayout.hovermode=e},w.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),function(t,e,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)t[a+l]=Math.min(s*t[a+l],255)}}(a,r,i);var o=document.createElement(\"canvas\");o.width=r,o.height=i;var s,l=o.getContext(\"2d\"),c=l.createImageData(r,i);switch(c.data.set(a),l.putImageData(c,0,0),t){case\"jpeg\":s=o.toDataURL(\"image/jpeg\");break;case\"webp\":s=o.toDataURL(\"image/webp\");break;default:s=o.toDataURL(\"image/png\")}return this.staticMode&&this.container.removeChild(n),s},w.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[k[t]];p.setConvert(e,this.fullLayout),e.setScale=f.noop}},w.make4thDimension=function(){var t=this.graphDiv._fullLayout;this._mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},p.setConvert(this._mockAxis,t)},e.exports=_},{\"../../../stackgl_modules\":1120,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/show_no_webgl_msg\":525,\"../../lib/str2rgbarray\":528,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"./layout/convert\":602,\"./layout/spikes\":605,\"./layout/tick_marks\":606,\"./project\":607,\"has-passive-events\":229,\"webgl-context\":331}],609:[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;aOpenStreetMap
contributors',a=['\\xa9 Carto',i].join(\" \"),o=['Map tiles by Stamen Design','under CC BY 3.0',\"|\",'Data by OpenStreetMap contributors','under ODbL'].join(\" \"),s={\"open-street-map\":{id:\"osm\",version:8,sources:{\"plotly-osm-tiles\":{type:\"raster\",attribution:i,tiles:[\"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png\",\"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-osm-tiles\",type:\"raster\",source:\"plotly-osm-tiles\",minzoom:0,maxzoom:22}]},\"white-bg\":{id:\"white-bg\",version:8,sources:{},layers:[{id:\"white-bg\",type:\"background\",paint:{\"background-color\":\"#FFFFFF\"},minzoom:0,maxzoom:22}]},\"carto-positron\":{id:\"carto-positron\",version:8,sources:{\"plotly-carto-positron\":{type:\"raster\",attribution:a,tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-positron\",type:\"raster\",source:\"plotly-carto-positron\",minzoom:0,maxzoom:22}]},\"carto-darkmatter\":{id:\"carto-darkmatter\",version:8,sources:{\"plotly-carto-darkmatter\":{type:\"raster\",attribution:a,tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-darkmatter\",type:\"raster\",source:\"plotly-carto-darkmatter\",minzoom:0,maxzoom:22}]},\"stamen-terrain\":{id:\"stamen-terrain\",version:8,sources:{\"plotly-stamen-terrain\":{type:\"raster\",attribution:o,tiles:[\"https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-terrain\",type:\"raster\",source:\"plotly-stamen-terrain\",minzoom:0,maxzoom:22}]},\"stamen-toner\":{id:\"stamen-toner\",version:8,sources:{\"plotly-stamen-toner\":{type:\"raster\",attribution:o,tiles:[\"https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-toner\",type:\"raster\",source:\"plotly-stamen-toner\",minzoom:0,maxzoom:22}]},\"stamen-watercolor\":{id:\"stamen-watercolor\",version:8,sources:{\"plotly-stamen-watercolor\":{type:\"raster\",attribution:['Map tiles by Stamen Design','under CC BY 3.0',\"|\",'Data by OpenStreetMap contributors','under CC BY SA'].join(\" \"),tiles:[\"https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-watercolor\",type:\"raster\",source:\"plotly-stamen-watercolor\",minzoom:0,maxzoom:22}]}},l=n(s);e.exports={requiredVersion:\"1.10.1\",styleUrlPrefix:\"mapbox://styles/mapbox/\",styleUrlSuffix:\"v9\",styleValuesMapbox:[\"basic\",\"streets\",\"outdoors\",\"light\",\"dark\",\"satellite\",\"satellite-streets\"],styleValueDflt:\"basic\",stylesNonMapbox:s,styleValuesNonMapbox:l,traceLayerPrefix:\"plotly-trace-layer-\",layoutLayerPrefix:\"plotly-layout-layer-\",wrongVersionErrorMsg:[\"Your custom plotly.js bundle is not using the correct mapbox-gl version\",\"Please install mapbox-gl@1.10.1.\"].join(\"\\n\"),noAccessTokenErrorMsg:[\"Missing Mapbox access token.\",\"Mapbox trace type require a Mapbox access token to be registered.\",\"For example:\",\" Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });\",\"More info here: https://www.mapbox.com/help/define-access-token/\"].join(\"\\n\"),missingStyleErrorMsg:[\"No valid mapbox style found, please set `mapbox.style` to one of:\",l.join(\", \"),\"or register a Mapbox access token to use a Mapbox-served style.\"].join(\"\\n\"),multipleTokensErrorMsg:[\"Set multiple mapbox access token across different mapbox subplot,\",\"using first token found as mapbox-gl does not allow multipleaccess tokens on the same page.\"].join(\"\\n\"),mapOnErrorMsg:\"Mapbox error.\",mapboxLogo:{path0:\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\",path1:\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\",path2:\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\",polygon:\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34\"},styleRules:{map:\"overflow:hidden;position:relative;\",\"missing-css\":\"display:none;\",canary:\"background-color:salmon;\",\"ctrl-bottom-left\":\"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;\",\"ctrl-bottom-right\":\"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;\",ctrl:\"clear: both; pointer-events: auto; transform: translate(0, 0);\",\"ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner\":\"display: none;\",\"ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner\":\"display: block; margin-top:2px\",\"ctrl-attrib.mapboxgl-compact:hover\":\"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;\",\"ctrl-attrib.mapboxgl-compact::after\":'content: \"\"; cursor: pointer; position: absolute; background-image: url(\\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"%3E %3Cpath fill=\"%23333333\" fill-rule=\"evenodd\" d=\"M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0\"/%3E %3C/svg%3E\\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',\"ctrl-attrib.mapboxgl-compact\":\"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;\",\"ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; right: 0\",\"ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; left: 0\",\"ctrl-bottom-left .mapboxgl-ctrl\":\"margin: 0 0 10px 10px; float: left;\",\"ctrl-bottom-right .mapboxgl-ctrl\":\"margin: 0 10px 10px 0; float: right;\",\"ctrl-attrib\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a:hover\":\"color: inherit; text-decoration: underline;\",\"ctrl-attrib .mapbox-improve-map\":\"font-weight: bold; margin-left: 2px;\",\"attrib-empty\":\"display: none;\",\"ctrl-logo\":'display:block; width: 21px; height: 21px; background-image: url(\\'data:image/svg+xml;charset=utf-8,%3C?xml version=\"1.0\" encoding=\"utf-8\"?%3E %3Csvg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 21 21\" style=\"enable-background:new 0 0 21 21;\" xml:space=\"preserve\"%3E%3Cg transform=\"translate(0,0.01)\"%3E%3Cpath d=\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3Cpath d=\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpath d=\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpolygon points=\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 \" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3C/g%3E%3C/svg%3E\\')'}}},{\"../../lib/sort_object_keys\":526}],612:[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\":503}],613:[function(t,e,r){\"use strict\";var n=t(\"mapbox-gl/dist/mapbox-gl-unminified\"),i=t(\"../../lib\"),a=i.strTranslate,o=i.strScale,s=t(\"../../plots/get_data\").getSubplotCalcData,l=t(\"../../constants/xmlns_namespaces\"),c=t(\"@plotly/d3\"),u=t(\"../../components/drawing\"),f=t(\"../../lib/svg_text_utils\"),h=t(\"./mapbox\"),p=r.constants=t(\"./constants\");function d(t){return\"string\"==typeof t&&(-1!==p.styleValuesMapbox.indexOf(t)||0===t.indexOf(\"mapbox://\"))}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,a=e._subplots.mapbox;if(n.version!==p.requiredVersion)throw new Error(p.wrongVersionErrorMsg);var o=function(t,e){var r=t._fullLayout;if(\"\"===t._context.mapboxAccessToken)return\"\";for(var n=[],a=[],o=!1,s=!1,l=0;l1&&i.warn(p.multipleTokensErrorMsg),n[0]):(a.length&&i.log([\"Listed mapbox access token(s)\",a.join(\",\"),\"but did not use a Mapbox map style, ignoring token(s).\"].join(\" \")),\"\")}(t,a);n.accessToken=o;for(var l=0;l_/2){var w=v.split(\"|\").join(\"
\");x.text(w).attr(\"data-unformatted\",w).call(f.convertToTspans,t),b=u.bBox(x.node())}x.attr(\"transform\",a(-3,8-b.height)),y.insert(\"rect\",\".static-attribution\").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:\"rgba(255, 255, 255, 0.75)\"});var T=1;b.width+6>_&&(T=_/(b.width+6));var k=[n.l+n.w*h.x[1],n.t+n.h*(1-h.y[0])];y.attr(\"transform\",a(k[0],k[1])+o(T))}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n0){for(var r=0;r0}function u(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,\"line-dasharray\":t.line.dash});break;case\"fill\":n.extendFlat(r,{\"fill-color\":t.color,\"fill-outline-color\":t.fill.outlinecolor,\"fill-opacity\":t.opacity});break;case\"symbol\":var i=t.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(e,{\"icon-image\":i.icon+\"-15\",\"icon-size\":i.iconsize/10,\"text-field\":i.text,\"text-size\":i.textfont.size,\"text-anchor\":o.anchor,\"text-offset\":o.offset,\"symbol-placement\":i.placement}),n.extendFlat(r,{\"icon-color\":t.color,\"text-color\":i.textfont.color,\"text-opacity\":t.opacity});break;case\"raster\":n.extendFlat(r,{\"raster-fade-duration\":0,\"raster-opacity\":t.opacity})}return{layout:e,paint:r}}l.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):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=c(t)},l.needsNewImage=function(t){return this.subplot.map.getSource(this.idSource)&&\"image\"===this.sourceType&&\"image\"===t.sourcetype&&(this.source!==t.source||JSON.stringify(this.coordinates)!==JSON.stringify(t.coordinates))},l.needsNewSource=function(t){return this.sourceType!==t.sourcetype||JSON.stringify(this.source)!==JSON.stringify(t.source)||this.layerType!==t.type},l.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup[\"layout-\"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup[\"layout-\"+this.index]},l.updateImage=function(t){this.subplot.map.getSource(this.idSource).updateImage({url:t.source,coordinates:t.coordinates});var e=this.findFollowingMapboxLayerId(this.lookupBelow());null!==e&&this.subplot.map.moveLayer(this.idLayer,e)},l.updateSource=function(t){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,c(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,a={type:r};\"geojson\"===r?e=\"data\":\"vector\"===r?e=\"string\"==typeof n?\"url\":\"tiles\":\"raster\"===r?(e=\"tiles\",a.tileSize=256):\"image\"===r&&(e=\"url\",a.coordinates=t.coordinates);a[e]=n,t.sourceattribution&&(a.attribution=i(t.sourceattribution));return a}(t);e.addSource(this.idSource,r)}},l.findFollowingMapboxLayerId=function(t){if(\"traces\"===t)for(var e=this.subplot.getMapLayers(),r=0;r1)for(r=0;r-1&&v(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf(\"event\")>-1&&c.click(n,e.originalEvent)}}},_.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,o=t.dragmode;a=f(o)?function(t,r){(t.range={})[e.id]=[c([r.xmin,r.ymin]),c([r.xmax,r.ymax])]}:function(t,r,n){(t.lassoPoints={})[e.id]=n.filtered.map(c)};var s=e.dragOptions;e.dragOptions=i.extendDeep(s||{},{dragmode:t.dragmode,element:e.div,gd:n,plotinfo:{id:e.id,domain:t[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off(\"click\",e.onClickInPanHandler),p(o)||h(o)?(r.dragPan.disable(),r.on(\"zoomstart\",e.clearSelect),e.dragOptions.prepFn=function(t,r,n){d(t,r,n,e.dragOptions,o)},l.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 c(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},_.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])},_.updateLayers=function(t){var e,r=t[this.id].layers,n=this.layerList;if(r.length!==n.length){for(e=0;e=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\"),l=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(){b.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()&&l.text()?\" - \":\"\")}},b.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit(\"plotly_beforeexport\");var 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=b.graphJson(t,!1,\"keepdata\"),i.node().submit(),r.remove(),t.emit(\"plotly_afterexport\"),!1}};var T=[\"days\",\"shortDays\",\"months\",\"shortMonths\",\"periods\",\"dateTime\",\"date\",\"time\",\"decimal\",\"thousands\",\"grouping\",\"currency\"],k=[\"year\",\"month\",\"dayMonth\",\"dayMonthYear\"];function A(t,e){var r=t._context.locale;r||(r=\"en-US\");var n=!1,i={};function a(t){for(var r=!0,a=0;a1&&z.length>1){for(s.getComponentMethod(\"grid\",\"sizeDefaults\")(c,l),o=0;o15&&z.length>15&&0===l.shapes.length&&0===l.images.length,b.linkSubplots(h,l,f,n),b.cleanPlot(h,l,f,n);var N=!(!n._has||!n._has(\"gl2d\")),j=!(!l._has||!l._has(\"gl2d\")),U=!(!n._has||!n._has(\"cartesian\"))||N,V=!(!l._has||!l._has(\"cartesian\"))||j;U&&!V?n._bgLayer.remove():V&&!U&&(l._shouldCreateBgLayer=!0),n._zoomlayer&&!t._dragging&&d({_fullLayout:n}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i0){var f=1-2*s;n=Math.round(f*n),i=Math.round(f*i)}}var h=b.layoutAttributes.width.min,p=b.layoutAttributes.height.min;n1,g=!e.height&&Math.abs(r.height-i)>1;(g||d)&&(d&&(r.width=n),g&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),b.sanitizeMargins(r)},b.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a,o,l=s.componentsRegistry,c=e._basePlotModules,f=s.subplotsRegistry.cartesian;for(i in l)(o=l[i]).includeBasePlot&&o.includeBasePlot(t,e);for(var h in c.length||c.push(f),e._has(\"cartesian\")&&(s.getComponentMethod(\"grid\",\"contentDefaults\")(t,e),f.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(u.subplotSort);for(a=0;a1&&(r.l/=g,r.r/=g)}if(f){var m=(r.t+r.b)/f;m>1&&(r.t/=m,r.b/=m)}var v=void 0!==r.xl?r.xl:r.x,y=void 0!==r.xr?r.xr:r.x,x=void 0!==r.yt?r.yt:r.y,_=void 0!==r.yb?r.yb:r.y;h[e]={l:{val:v,size:r.l+d},r:{val:y,size:r.r+d},b:{val:_,size:r.b+d},t:{val:x,size:r.t+d}},p[e]=1}else delete h[e],delete p[e];if(!n._replotting)return b.doAutoMargin(t)}},b.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,n=e.height;e._size||(e._size={}),C(e);var i=e._size,a=e.margin,l=u.extendFlat({},i),c=a.l,f=a.r,h=a.t,d=a.b,g=e._pushmargin,m=e._pushmarginIds;if(!1!==e.margin.autoexpand){for(var v in g)m[v]||delete g[v];for(var y in g.base={l:{val:0,size:c},r:{val:1,size:f},t:{val:1,size:h},b:{val:0,size:d}},g){var x=g[y].l||{},_=g[y].b||{},w=x.val,T=x.size,k=_.val,A=_.size;for(var M in g){if(o(T)&&g[M].r){var S=g[M].r.val,E=g[M].r.size;if(S>w){var L=(T*S+(E-r)*w)/(S-w),P=(E*(1-w)+(T-r)*(1-S))/(S-w);L+P>c+f&&(c=L,f=P)}}if(o(A)&&g[M].t){var I=g[M].t.val,O=g[M].t.size;if(I>k){var z=(A*I+(O-n)*k)/(I-k),D=(O*(1-k)+(A-n)*(1-I))/(I-k);z+D>d+h&&(d=z,h=D)}}}}}var R=u.constrain(r-a.l-a.r,2,64),F=u.constrain(n-a.t-a.b,2,64),B=Math.max(0,r-R),N=Math.max(0,n-F);if(B){var j=(c+f)/B;j>1&&(c/=j,f/=j)}if(N){var U=(d+h)/N;U>1&&(d/=U,h/=U)}if(i.l=Math.round(c),i.r=Math.round(f),i.t=Math.round(h),i.b=Math.round(d),i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e._replotting&&b.didMarginChange(l,i)){\"_redrawFromAutoMarginCount\"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var V=3*(1+Object.keys(m).length);if(e._redrawFromAutoMarginCount0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return s.call(\"redraw\",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit(\"plotly_transitioninterrupted\",[])}));var a=0,o=0;function l(){return a++,function(){o++,n||o!==a||function(e){if(!t._transitionData)return;(function(t){if(t)for(;t.length;)t.shift()})(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return s.call(\"redraw\",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit(\"plotly_transitioned\",[])})).then(e)}(i)}}r.runFn(l),setTimeout(l())}))}],a=u.syncOrAsync(i,t);return a&&a.then||(a=Promise.resolve()),a.then((function(){return t}))}b.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},b.graphJson=function(t,e,r,n,i,a){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&b.supplyDefaults(t);var o=i?t._fullData:t.data,s=i?t._fullLayout:t.layout,l=(t._transitionData||{})._frames;function c(t,e){if(\"function\"==typeof t)return e?\"_function_\":null;if(u.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(a){if(-1===[\"_\",\"[\"].indexOf(a.charAt(0)))if(\"function\"!=typeof t[a]){if(\"keepdata\"===r){if(\"src\"===a.substr(a.length-3))return}else if(\"keepstream\"===r){if(\"string\"==typeof(n=t[a+\"src\"])&&n.indexOf(\":\")>0&&!u.isPlainObject(t.stream))return}else if(\"keepall\"!==r&&\"string\"==typeof(n=t[a+\"src\"])&&n.indexOf(\":\")>0)return;i[a]=c(t[a],e)}else e&&(i[a]=\"_function\")})),i}return Array.isArray(t)?t.map((function(t){return c(t,e)})):u.isTypedArray(t)?u.simpleMap(t,u.identity):u.isJSDate(t)?u.ms2DateTimeLocal(+t):t}var f={data:(o||[]).map((function(t){var r=c(t);return e&&delete r.fit,r}))};if(!e&&(f.layout=c(s),i)){var h=s._size;f.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return l&&(f.frames=c(l)),a&&(f.config=c(t._context,!0)),\"object\"===n?f:JSON.stringify(f)},b.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r=0;a--)if(s[a].enabled){r._indexToPoints=s[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(t,r))}Array.isArray(o)&&o[0]||(o=[{x:h,y:h}]),o[0].t||(o[0].t={}),o[0].trace=r,d[e]=o}}for(z(o,c,f),i=0;i1e-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;a0?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=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]}(p),b=x[2]-x[0],_=x[3]-x[1],w=h/f,T=Math.abs(_/b);w>T?(d=f,y=(h-(g=f*T))/n.h/2,m=[o[0],o[1]],v=[s[0]+y,s[1]-y]):(g=h,y=(f-(d=h/T))/n.w/2,m=[o[0]+y,o[1]-y],v=[s[0],s[1]]),this.xLength2=d,this.yLength2=g,this.xDomain2=m,this.yDomain2=v;var k,A=this.xOffset2=n.l+n.w*m[0],M=this.yOffset2=n.t+n.h*(1-v[1]),S=this.radius=d/b,E=this.innerRadius=this.getHole(e)*S,L=this.cx=A-S*x[0],C=this.cy=M+S*x[3],P=this.cxx=L-A,I=this.cyy=C-M,O=i.side;\"counterclockwise\"===O?(k=O,O=\"top\"):\"clockwise\"===O&&(k=O,O=\"bottom\"),this.radialAxis=this.mockAxis(t,e,i,{_id:\"x\",side:O,_trueSide:k,domain:[E/n.w,S/n.w]}),this.angularAxis=this.mockAxis(t,e,a,{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:m}),this.yaxis=this.mockCartesianAxis(t,e,{_id:\"y\",domain:v});var z=this.pathSubplot();this.clipPaths.forTraces.select(\"path\").attr(\"d\",z).attr(\"transform\",l(P,I)),r.frontplot.attr(\"transform\",l(A,M)).call(u.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr(\"d\",z).attr(\"transform\",l(L,C)).call(c.fill,e.bgcolor)},N.mockAxis=function(t,e,r,n){var i=o.extendFlat({},r,n);return d(i,e,t),i},N.mockCartesianAxis=function(t,e,r){var n=this,i=n.isSmith,a=r._id,s=o.extendFlat({type:\"linear\"},r);p(s,t);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var t=n.sectorBBox,r=l[a],i=n.radialAxis._rl,o=(i[1]-i[0])/(1-n.getHole(e));s.range=[t[r[0]]*o,t[r[1]]*o]},s.isPtWithinRange=\"x\"!==a||i?function(){return!0}:function(t){return n.isPtInside(t)},s.setRange(),s.setScale(),s},N.doAutoRange=function(t,e){var r=this.gd,n=this.radialAxis,i=this.getRadial(e);g(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\")]},N.updateRadialAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=r.getRadial(e),g=D(r.getSector(e)[0],360),m=r.radialAxis,v=u90&&g<=270&&(m.tickangle=180);var x=y?function(t){var e=O(r,C([t.x,0]));return l(e[0]-f,e[1]-p)}:function(t){return l(m.l2p(t.x)+u,0)},b=y?function(t){return I(r,t.x,-1/0,1/0)}:function(t){return r.pathArc(m.r2p(t.x)+u)},_=j(d);if(r.radialTickLayout!==_&&(i[\"radial-axis\"].selectAll(\".xtick\").remove(),r.radialTickLayout=_),v){m.setScale();var w=0,T=y?(m.tickvals||[]).filter((function(t){return t>=0})).map((function(t){return h.tickText(m,t,!0,!1)})):h.calcTicks(m),k=y?T:h.clipEnds(m,T),A=h.getTickSigns(m)[2];y&&((\"top\"===m.ticks&&\"bottom\"===m.side||\"bottom\"===m.ticks&&\"top\"===m.side)&&(A=-A),\"top\"===m.ticks&&\"top\"===m.side&&(w=-m.ticklen),\"bottom\"===m.ticks&&\"bottom\"===m.side&&(w=m.ticklen)),h.drawTicks(n,m,{vals:T,layer:i[\"radial-axis\"],path:h.makeTickPath(m,0,A),transFn:x,crisp:!1}),h.drawGrid(n,m,{vals:k,layer:i[\"radial-grid\"],path:b,transFn:o.noop,crisp:!1}),h.drawLabels(n,m,{vals:T,layer:i[\"radial-axis\"],transFn:x,labelFns:h.makeLabelFns(m,w)})}var M=r.radialAxisAngle=r.vangles?F(U(R(d.angle),r.vangles)):d.angle,S=l(f,p),E=S+s(-M);V(i[\"radial-axis\"],v&&(d.showticklabels||d.ticks),{transform:E}),V(i[\"radial-grid\"],v&&d.showgrid,{transform:y?\"\":S}),V(i[\"radial-line\"].select(\"line\"),v&&d.showline,{x1:y?-a:u,y1:0,x2:a,y2:0,transform:E}).attr(\"stroke-width\",d.linewidth).call(c.stroke,d.linecolor)},N.updateRadialAxisTitle=function(t,e,r){if(!this.isSmith){var n=this.gd,i=this.radius,a=this.cx,o=this.cy,s=this.getRadial(e),l=this.id+\"title\",c=0;if(s.title){var f=u.bBox(this.layers[\"radial-axis\"].node()).height,h=s.title.font.size,p=s.side;c=\"top\"===p?h:\"counterclockwise\"===p?-(f+.4*h):f+.8*h}var d=void 0!==r?r:this.radialAxisAngle,g=R(d),m=Math.cos(g),v=Math.sin(g),y=a+i/2*m+c*v,b=o-i/2*v+c*m;this.layers[\"radial-axis-title\"]=x.draw(n,l,{propContainer:s,propName:this.id+\".radialaxis.title\",placeholder:z(n,\"Click to enter radial axis title\"),attributes:{x:y,y:b,\"text-anchor\":\"middle\"},transform:{rotate:-d}})}},N.updateAngularAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=r.getAngular(e),g=r.angularAxis,m=r.isSmith;m||(r.fillViewInitialKey(\"angularaxis.rotation\",d.rotation),g.setGeometry(),g.setScale());var v=m?function(t){var e=O(r,C([0,t.x]));return Math.atan2(e[0]-f,e[1]-p)-Math.PI/2}:function(t){return g.t2g(t.x)};\"linear\"===g.type&&\"radians\"===g.thetaunit&&(g.tick0=F(g.tick0),g.dtick=F(g.dtick));var y=function(t){return l(f+a*Math.cos(t),p-a*Math.sin(t))},x=m?function(t){var e=O(r,C([0,t.x]));return l(e[0],e[1])}:function(t){return y(v(t))},b=m?function(t){var e=O(r,C([0,t.x])),n=Math.atan2(e[0]-f,e[1]-p)-Math.PI/2;return l(e[0],e[1])+s(-F(n))}:function(t){var e=v(t);return y(e)+s(-F(e))},_=m?function(t){return P(r,t.x,0,1/0)}:function(t){var e=v(t),r=Math.cos(e),n=Math.sin(e);return\"M\"+[f+u*r,p-u*n]+\"L\"+[f+a*r,p-a*n]},w=h.makeLabelFns(g,0).labelStandoff,T={xFn:function(t){var e=v(t);return Math.cos(e)*w},yFn:function(t){var e=v(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(w+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*M)},anchorFn:function(t){var e=v(t),r=Math.cos(e);return Math.abs(r)<.1?\"middle\":r>0?\"start\":\"end\"},heightFn:function(t,e,r){var n=v(t);return-.5*(1+Math.sin(n))*r}},k=j(d);r.angularTickLayout!==k&&(i[\"angular-axis\"].selectAll(\".\"+g._id+\"tick\").remove(),r.angularTickLayout=k);var A,S=m?[1/0].concat(g.tickvals||[]).map((function(t){return h.tickText(g,t,!0,!1)})):h.calcTicks(g);if(m&&(S[0].text=\"\\u221e\",S[0].fontSize*=1.75),\"linear\"===e.gridshape?(A=S.map(v),o.angleDelta(A[0],A[1])<0&&(A=A.slice().reverse())):A=null,r.vangles=A,\"category\"===g.type&&(S=S.filter((function(t){return o.isAngleInsideSector(v(t),r.sectorInRad)}))),g.visible){var E=\"inside\"===g.ticks?-1:1,L=(g.linewidth||1)/2;h.drawTicks(n,g,{vals:S,layer:i[\"angular-axis\"],path:\"M\"+E*L+\",0h\"+E*g.ticklen,transFn:b,crisp:!1}),h.drawGrid(n,g,{vals:S,layer:i[\"angular-grid\"],path:_,transFn:o.noop,crisp:!1}),h.drawLabels(n,g,{vals:S,layer:i[\"angular-axis\"],repositionOnUpdate:!0,transFn:x,labelFns:T})}V(i[\"angular-line\"].select(\"path\"),d.showline,{d:r.pathSubplot(),transform:l(f,p)}).attr(\"stroke-width\",d.linewidth).call(c.stroke,d.linecolor)},N.updateFx=function(t,e){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1)),this.updateHoverAndMainDrag(t))},N.updateHoverAndMainDrag=function(t){var e,r,s=this,c=s.isSmith,u=s.gd,f=s.layers,h=t._zoomlayer,p=S.MINZOOM,d=S.OFFEDGE,g=s.radius,x=s.innerRadius,T=s.cx,k=s.cy,A=s.cxx,M=s.cyy,L=s.sectorInRad,C=s.vangles,P=s.radialAxis,I=E.clampTiny,O=E.findXYatLength,z=E.findEnclosingVertexAngles,D=S.cornerHalfWidth,R=S.cornerLen/2,F=m.makeDragger(f,\"path\",\"maindrag\",\"crosshair\");n.select(F).attr(\"d\",s.pathSubplot()).attr(\"transform\",l(T,k)),F.onmousemove=function(t){y.hover(u,t,s.id),u._fullLayout._lasthover=F,u._fullLayout._hoversubplot=s.id},F.onmouseout=function(t){u._dragging||v.unhover(u,t)};var B,N,j,U,V,H,q,G,Y,W={element:F,gd:u,subplot:s.id,plotinfo:{id:s.id,xaxis:s.xaxis,yaxis:s.yaxis},xaxes:[s.xaxis],yaxes:[s.yaxis]};function X(t,e){return Math.sqrt(t*t+e*e)}function Z(t,e){return X(t-A,e-M)}function J(t,e){return Math.atan2(M-e,t-A)}function K(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function Q(t,e){if(0===t)return s.pathSector(2*D);var r=R/t,n=e-r,i=e+r,a=Math.max(0,Math.min(t,g)),o=a-D,l=a+D;return\"M\"+K(o,n)+\"A\"+[o,o]+\" 0,0,0 \"+K(o,i)+\"L\"+K(l,i)+\"A\"+[l,l]+\" 0,0,1 \"+K(l,n)+\"Z\"}function $(t,e,r){if(0===t)return s.pathSector(2*D);var n,i,a=K(t,e),o=K(t,r),l=I((a[0]+o[0])/2),c=I((a[1]+o[1])/2);if(l&&c){var u=c/l,f=-1/u,h=O(D,u,l,c);n=O(R,f,h[0][0],h[0][1]),i=O(R,f,h[1][0],h[1][1])}else{var p,d;c?(p=R,d=D):(p=D,d=R),n=[[l-p,c-d],[l+p,c-d]],i=[[l-p,c+d],[l+p,c+d]]}return\"M\"+n.join(\"L\")+\"L\"+i.reverse().join(\"L\")+\"Z\"}function tt(t,e){return e=Math.max(Math.min(e,g),x),tp?(t-1&&1===t&&_(e,u,[s.xaxis],[s.yaxis],s.id,W),r.indexOf(\"event\")>-1&&y.click(u,e,s.id)}W.prepFn=function(t,n,a){var l=u._fullLayout.dragmode,f=F.getBoundingClientRect();u._fullLayout._calcInverseTransform(u);var p=u._fullLayout._invTransform;e=u._fullLayout._invScaleX,r=u._fullLayout._invScaleY;var d=o.apply3DTransform(p)(n-f.left,a-f.top);if(B=d[0],N=d[1],C){var v=E.findPolygonOffset(g,L[0],L[1],C);B+=A+v[0],N+=M+v[1]}switch(l){case\"zoom\":W.clickFn=st,c||(W.moveFn=C?it:rt,W.doneFn=at,function(){j=null,U=null,V=s.pathSubplot(),H=!1;var t=u._fullLayout[s.id];q=i(t.bgcolor).getLuminance(),(G=m.makeZoombox(h,q,T,k,V)).attr(\"fill-rule\",\"evenodd\"),Y=m.makeCorners(h,T,k),w(u)}());break;case\"select\":case\"lasso\":b(t,n,a,W,l)}},v.init(W)},N.updateRadialDrag=function(t,e,r){var i=this,c=i.gd,u=i.layers,f=i.radius,h=i.innerRadius,p=i.cx,d=i.cy,g=i.radialAxis,y=S.radialDragBoxSize,x=y/2;if(g.visible){var b,_,T,M=R(i.radialAxisAngle),E=g._rl,L=E[0],C=E[1],P=E[r],I=.75*(E[1]-E[0])/(1-i.getHole(e))/f;r?(b=p+(f+x)*Math.cos(M),_=d-(f+x)*Math.sin(M),T=\"radialdrag\"):(b=p+(h-x)*Math.cos(M),_=d-(h-x)*Math.sin(M),T=\"radialdrag-inner\");var O,z,D,B=m.makeRectDragger(u,T,\"crosshair\",-x,-x,y,y),N={element:B,gd:c};V(n.select(B),g.visible&&h0==(r?D>L:Dn?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;o0?1:0}function i(t){var e=t[0],r=t[1];if(!isFinite(e)||!isFinite(r))return[1,0];var n=(e+1)*(e+1)+r*r;return[(e*e+r*r-1)/n,2*r/n]}function a(t,e){var r=e[0],n=e[1];return[r*t.radius+t.cx,-n*t.radius+t.cy]}function o(t,e){return e*t.radius}e.exports={smith:i,reactanceArc:function(t,e,r,n){var s=a(t,i([r,e])),l=s[0],c=s[1],u=a(t,i([n,e])),f=u[0],h=u[1];if(0===e)return[\"M\"+l+\",\"+c,\"L\"+f+\",\"+h].join(\" \");var p=o(t,1/Math.abs(e));return[\"M\"+l+\",\"+c,\"A\"+p+\",\"+p+\" 0 0,\"+(e<0?1:0)+\" \"+f+\",\"+h].join(\" \")},resistanceArc:function(t,e,r,s){var l=o(t,1/(e+1)),c=a(t,i([e,r])),u=c[0],f=c[1],h=a(t,i([e,s])),p=h[0],d=h[1];if(n(r)!==n(s)){var g=a(t,i([e,0]));return[\"M\"+u+\",\"+f,\"A\"+l+\",\"+l+\" 0 0,\"+(00){for(var n=[],i=0;i=u&&(h.min=0,d.min=0,m.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function g(t,e,r,n){var i=h[e._name];function o(r,n){return a.coerce(t,e,i,r,n)}o(\"uirevision\",n.uirevision),e.type=\"linear\";var p=o(\"color\"),d=p!==i.color.dflt?p:r.font.color,g=e._name.charAt(0).toUpperCase(),m=\"Component \"+g,v=o(\"title.text\",m);e._hovertitle=v===m?v:g,a.coerceFont(o,\"title.font\",{family:r.font.family,size:a.bigFont(r.font.size),color:d}),o(\"min\"),u(t,e,o,\"linear\"),l(t,e,o,\"linear\"),s(t,e,o,\"linear\"),c(t,e,o,{outerTicks:!0}),o(\"showticklabels\")&&(a.coerceFont(o,\"tickfont\",{family:r.font.family,size:r.font.size,color:d}),o(\"tickangle\"),o(\"tickformat\")),f(t,e,o,{dfltColor:p,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),o(\"hoverformat\"),o(\"layer\")}e.exports=function(t,e,r){o(t,e,r,{type:\"ternary\",attributes:h,handleDefaults:d,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{\"../../components/color\":366,\"../../lib\":503,\"../../plot_api/plot_template\":543,\"../cartesian/line_grid_defaults\":571,\"../cartesian/prefix_suffix_defaults\":573,\"../cartesian/tick_label_defaults\":578,\"../cartesian/tick_mark_defaults\":579,\"../cartesian/tick_value_defaults\":580,\"../subplot_defaults\":632,\"./layout_attributes\":635}],637:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"tinycolor2\"),a=t(\"../../registry\"),o=t(\"../../lib\"),s=o.strTranslate,l=o._,c=t(\"../../components/color\"),u=t(\"../../components/drawing\"),f=t(\"../cartesian/set_convert\"),h=t(\"../../lib/extend\").extendFlat,p=t(\"../plots\"),d=t(\"../cartesian/axes\"),g=t(\"../../components/dragelement\"),m=t(\"../../components/fx\"),v=t(\"../../components/dragelement/helpers\"),y=v.freeMode,x=v.rectMode,b=t(\"../../components/titles\"),_=t(\"../cartesian/select\").prepSelect,w=t(\"../cartesian/select\").selectOnClick,T=t(\"../cartesian/select\").clearSelect,k=t(\"../cartesian/select\").clearSelectionsCache,A=t(\"../cartesian/constants\");function M(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=M;var S=M.prototype;S.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},S.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var i=0;iE*b?i=(a=b)*E:a=(i=x)/E,o=v*i/x,l=y*a/b,r=e.l+e.w*g-i/2,n=e.t+e.h*(1-m)-a/2,p.x0=r,p.y0=n,p.w=i,p.h=a,p.sum=_,p.xaxis={type:\"linear\",range:[w+2*k-_,_-w-2*T],domain:[g-o/2,g+o/2],_id:\"x\"},f(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(t){return t.a>=p.aaxis.range[0]&&t.a<=p.aaxis.range[1]&&t.b>=p.baxis.range[1]&&t.b<=p.baxis.range[0]&&t.c>=p.caxis.range[1]&&t.c<=p.caxis.range[0]},p.yaxis={type:\"linear\",range:[w,_-T-k],domain:[m-l/2,m+l/2],_id:\"y\"},f(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var A=p.yaxis.domain[0],M=p.aaxis=h({},t.aaxis,{range:[w,_-T-k],side:\"left\",tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+l*E],anchor:\"free\",position:0,_id:\"y\",_length:i});f(M,p.graphDiv._fullLayout),M.setScale();var S=p.baxis=h({},t.baxis,{range:[_-w-k,T],side:\"bottom\",domain:p.xaxis.domain,anchor:\"free\",position:0,_id:\"x\",_length:i});f(S,p.graphDiv._fullLayout),S.setScale();var L=p.caxis=h({},t.caxis,{range:[_-w-T,k],side:\"right\",tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+l*E],anchor:\"free\",position:0,_id:\"y\",_length:i});f(L,p.graphDiv._fullLayout),L.setScale();var C=\"M\"+r+\",\"+(n+a)+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";p.clipDef.select(\"path\").attr(\"d\",C),p.layers.plotbg.select(\"path\").attr(\"d\",C);var P=\"M0,\"+a+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";p.clipDefRelative.select(\"path\").attr(\"d\",P);var I=s(r,n);p.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",I),p.clipDefRelative.select(\"path\").attr(\"transform\",null);var O=s(r-S._offset,n+a);p.layers.baxis.attr(\"transform\",O),p.layers.bgrid.attr(\"transform\",O);var z=s(r+i/2,n)+\"rotate(30)\"+s(0,-M._offset);p.layers.aaxis.attr(\"transform\",z),p.layers.agrid.attr(\"transform\",z);var D=s(r+i/2,n)+\"rotate(-30)\"+s(0,-L._offset);p.layers.caxis.attr(\"transform\",D),p.layers.cgrid.attr(\"transform\",D),p.drawAxes(!0),p.layers.aline.select(\"path\").attr(\"d\",M.showline?\"M\"+r+\",\"+(n+a)+\"l\"+i/2+\",-\"+a:\"M0,0\").call(c.stroke,M.linecolor||\"#000\").style(\"stroke-width\",(M.linewidth||0)+\"px\"),p.layers.bline.select(\"path\").attr(\"d\",S.showline?\"M\"+r+\",\"+(n+a)+\"h\"+i:\"M0,0\").call(c.stroke,S.linecolor||\"#000\").style(\"stroke-width\",(S.linewidth||0)+\"px\"),p.layers.cline.select(\"path\").attr(\"d\",L.showline?\"M\"+(r+i/2)+\",\"+n+\"l\"+i/2+\",\"+a:\"M0,0\").call(c.stroke,L.linecolor||\"#000\").style(\"stroke-width\",(L.linewidth||0)+\"px\"),p.graphDiv._context.staticPlot||p.initInteractions(),u.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},S.drawAxes=function(t){var e=this.graphDiv,r=this.id.substr(7)+\"title\",n=this.layers,i=this.aaxis,a=this.baxis,o=this.caxis;if(this.drawAx(i),this.drawAx(a),this.drawAx(o),t){var s=Math.max(i.showticklabels?i.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+(\"outside\"===o.ticks?.87*o.ticklen:0)),c=(a.showticklabels?a.tickfont.size:0)+(\"outside\"===a.ticks?a.ticklen:0)+3;n[\"a-title\"]=b.draw(e,\"a\"+r,{propContainer:i,propName:this.id+\".aaxis.title\",placeholder:l(e,\"Click to enter Component A title\"),attributes:{x:this.x0+this.w/2,y:this.y0-i.title.font.size/3-s,\"text-anchor\":\"middle\"}}),n[\"b-title\"]=b.draw(e,\"b\"+r,{propContainer:a,propName:this.id+\".baxis.title\",placeholder:l(e,\"Click to enter Component B title\"),attributes:{x:this.x0-c,y:this.y0+this.h+.83*a.title.font.size+c,\"text-anchor\":\"middle\"}}),n[\"c-title\"]=b.draw(e,\"c\"+r,{propContainer:o,propName:this.id+\".caxis.title\",placeholder:l(e,\"Click to enter Component C title\"),attributes:{x:this.x0+this.w+c,y:this.y0+this.h+.83*o.title.font.size+c,\"text-anchor\":\"middle\"}})}},S.drawAx=function(t){var e,r=this.graphDiv,n=t._name,i=n.charAt(0),a=t._id,s=this.layers[n],l=i+\"tickLayout\",c=(e=t).ticks+String(e.ticklen)+String(e.showticklabels);this[l]!==c&&(s.selectAll(\".\"+a+\"tick\").remove(),this[l]=c),t.setScale();var u=d.calcTicks(t),f=d.clipEnds(t,u),h=d.makeTransTickFn(t),p=d.getTickSigns(t)[2],g=o.deg2rad(30),m=p*(t.linewidth||1)/2,v=p*t.ticklen,y=this.w,x=this.h,b=\"b\"===i?\"M0,\"+m+\"l\"+Math.sin(g)*v+\",\"+Math.cos(g)*v:\"M\"+m+\",0l\"+Math.cos(g)*v+\",\"+-Math.sin(g)*v,_={a:\"M0,0l\"+x+\",-\"+y/2,b:\"M0,0l-\"+y/2+\",-\"+x,c:\"M0,0l-\"+x+\",\"+y/2}[i];d.drawTicks(r,t,{vals:\"inside\"===t.ticks?f:u,layer:s,path:b,transFn:h,crisp:!1}),d.drawGrid(r,t,{vals:f,layer:this.layers[i+\"grid\"],path:_,transFn:h,crisp:!1}),d.drawLabels(r,t,{vals:u,layer:s,transFn:h,labelFns:d.makeLabelFns(t,0,30)})};var L=A.MINZOOM/2+.87,C=\"m-0.87,.5h\"+L+\"v3h-\"+(L+5.2)+\"l\"+(L/2+2.6)+\",-\"+(.87*L+4.5)+\"l2.6,1.5l-\"+L/2+\",\"+.87*L+\"Z\",P=\"m0.87,.5h-\"+L+\"v3h\"+(L+5.2)+\"l-\"+(L/2+2.6)+\",-\"+(.87*L+4.5)+\"l-2.6,1.5l\"+L/2+\",\"+.87*L+\"Z\",I=\"m0,1l\"+L/2+\",\"+.87*L+\"l2.6,-1.5l-\"+(L/2+2.6)+\",-\"+(.87*L+4.5)+\"l-\"+(L/2+2.6)+\",\"+(.87*L+4.5)+\"l2.6,1.5l\"+L/2+\",-\"+.87*L+\"Z\",O=!0;function z(t){n.select(t).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}S.clearSelect=function(){k(this.dragOptions),T(this.dragOptions.gd)},S.initInteractions=function(){var t,e,r,n,f,h,p,d,v,b,T,k,M=this,S=M.layers.plotbg.select(\"path\").node(),L=M.graphDiv,D=L._fullLayout._zoomlayer;function R(t){var e={};return e[M.id+\".aaxis.min\"]=t.a,e[M.id+\".baxis.min\"]=t.b,e[M.id+\".caxis.min\"]=t.c,e}function F(t,e){var r=L._fullLayout.clickmode;z(L),2===t&&(L.emit(\"plotly_doubleclick\",null),a.call(\"_guiRelayout\",L,R({a:0,b:0,c:0}))),r.indexOf(\"select\")>-1&&1===t&&w(e,L,[M.xaxis],[M.yaxis],M.id,M.dragOptions),r.indexOf(\"event\")>-1&&m.click(L,e,M.id)}function B(t,e){return 1-e/M.h}function N(t,e){return 1-(t+(M.h-e)/Math.sqrt(3))/M.w}function j(t,e){return(t-(M.h-e)/Math.sqrt(3))/M.w}function U(i,a){var o=r+i*t,s=n+a*e,l=Math.max(0,Math.min(1,B(0,n),B(0,s))),c=Math.max(0,Math.min(1,N(r,n),N(o,s))),u=Math.max(0,Math.min(1,j(r,n),j(o,s))),g=(l/2+u)*M.w,m=(1-l/2-c)*M.w,y=(g+m)/2,x=m-g,_=(1-l)*M.h,w=_-x/E;x.2?\"rgba(0,0,0,0.4)\":\"rgba(255,255,255,0.3)\").duration(200),k.transition().style(\"opacity\",1).duration(200),b=!0),L.emit(\"plotly_relayouting\",R(p))}function V(){z(L),p!==f&&(a.call(\"_guiRelayout\",L,R(p)),O&&L.data&&L._context.showTips&&(o.notifier(l(L,\"Double-click to zoom back out\"),\"long\"),O=!1))}function H(t,e){var r=t/M.xaxis._m,n=e/M.yaxis._m,i=[(p={a:f.a-n,b:f.b+(r+n)/2,c:f.c-(r-n)/2}).a,p.b,p.c].sort(o.sorterAsc),a=i.indexOf(p.a),l=i.indexOf(p.b),c=i.indexOf(p.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),p={a:i[a],b:i[l],c:i[c]},e=(f.a-p.a)*M.yaxis._m,t=(f.c-p.c-f.b+p.b)*M.xaxis._m);var h=s(M.x0+t,M.y0+e);M.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",h);var d=s(-t,-e);M.clipDefRelative.select(\"path\").attr(\"transform\",d),M.aaxis.range=[p.a,M.sum-p.b-p.c],M.baxis.range=[M.sum-p.a-p.c,p.b],M.caxis.range=[M.sum-p.a-p.b,p.c],M.drawAxes(!1),M._hasClipOnAxisFalse&&M.plotContainer.select(\".scatterlayer\").selectAll(\".trace\").call(u.hideOutsideRangePoints,M),L.emit(\"plotly_relayouting\",R(p))}function q(){a.call(\"_guiRelayout\",L,R(p))}this.dragOptions={element:S,gd:L,plotinfo:{id:M.id,domain:L._fullLayout[M.id].domain,xaxis:M.xaxis,yaxis:M.yaxis},subplot:M.id,prepFn:function(a,l,u){M.dragOptions.xaxes=[M.xaxis],M.dragOptions.yaxes=[M.yaxis],t=L._fullLayout._invScaleX,e=L._fullLayout._invScaleY;var g=M.dragOptions.dragmode=L._fullLayout.dragmode;y(g)?M.dragOptions.minDrag=1:M.dragOptions.minDrag=void 0,\"zoom\"===g?(M.dragOptions.moveFn=U,M.dragOptions.clickFn=F,M.dragOptions.doneFn=V,function(t,e,a){var l=S.getBoundingClientRect();r=e-l.left,n=a-l.top,L._fullLayout._calcInverseTransform(L);var u=L._fullLayout._invTransform,g=o.apply3DTransform(u)(r,n);r=g[0],n=g[1],f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=f,h=M.aaxis.range[1]-f.a,d=i(M.graphDiv._fullLayout[M.id].bgcolor).getLuminance(),v=\"M0,\"+M.h+\"L\"+M.w/2+\", 0L\"+M.w+\",\"+M.h+\"Z\",b=!1,T=D.append(\"path\").attr(\"class\",\"zoombox\").attr(\"transform\",s(M.x0,M.y0)).style({fill:d>.2?\"rgba(0,0,0,0)\":\"rgba(255,255,255,0)\",\"stroke-width\":0}).attr(\"d\",v),k=D.append(\"path\").attr(\"class\",\"zoombox-corners\").attr(\"transform\",s(M.x0,M.y0)).style({fill:c.background,stroke:c.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"d\",\"M0,0Z\"),M.clearSelect(L)}(0,l,u)):\"pan\"===g?(M.dragOptions.moveFn=H,M.dragOptions.clickFn=F,M.dragOptions.doneFn=q,f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=f,M.clearSelect(L)):(x(g)||y(g))&&_(a,l,u,M.dragOptions,g)}},S.onmousemove=function(t){m.hover(L,t,M.id),L._fullLayout._lasthover=S,L._fullLayout._hoversubplot=M.id},S.onmouseout=function(t){L._dragging||g.unhover(L,t)},g.init(this.dragOptions)}},{\"../../components/color\":366,\"../../components/dragelement\":385,\"../../components/dragelement/helpers\":384,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../components/titles\":464,\"../../lib\":503,\"../../lib/extend\":493,\"../../registry\":638,\"../cartesian/axes\":554,\"../cartesian/constants\":561,\"../cartesian/select\":575,\"../cartesian/set_convert\":576,\"../plots\":619,\"@plotly/d3\":58,tinycolor2:312}],638:[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/dom\").addStyleRule,l=t(\"./lib/extend\"),c=t(\"./plots/attributes\"),u=t(\"./plots/layout_attributes\"),f=l.extendFlat,h=l.extendDeepAll;function p(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)b(i,t.name)}(t.basePlotModule);for(var o={},l=0;l-1&&(f[p[r]].title={text:\"\"});for(r=0;r\")?\"\":e.html(t).text()}));return e.remove(),r}(T),T=(T=T.replace(/&(?!\\w+;|\\#[0-9]+;| \\#x[0-9A-F]+;)/g,\"&\")).replace(c,\"'\"),i.isIE()&&(T=(T=(T=T.replace(/\"/gi,\"'\")).replace(/(\\('#)([^']*)('\\))/gi,'(\"#$2\")')).replace(/(\\\\')/gi,'\"')),T}},{\"../components/color\":366,\"../components/drawing\":388,\"../constants/xmlns_namespaces\":480,\"../lib\":503,\"@plotly/d3\":58}],647:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){for(var r=0;rf+c||!n(u))}for(var p=0;pa))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)?e0?e+=r:u<0&&(e-=r)}return e}function z(t){var e=u,r=t.b,i=O(t);return n.inbox(r-e,i-e,_+(i-e)/(i-r)-1)}var D=t[f+\"a\"],R=t[h+\"a\"];g=Math.abs(D.r2c(D.range[1])-D.r2c(D.range[0]));var F=n.getDistanceFunction(i,p,d,(function(t){return(p(t)+d(t))/2}));if(n.getClosest(m,F,t),!1!==t.index&&m[t.index].p!==c){k||(L=function(t){return Math.min(A(t),t.p-y.bargroupwidth/2)},C=function(t){return Math.max(M(t),t.p+y.bargroupwidth/2)});var B=m[t.index],N=v.base?B.b+B.s:B.s;t[h+\"0\"]=t[h+\"1\"]=R.c2p(B[h],!0),t[h+\"LabelVal\"]=N;var j=y.extents[y.extents.round(B.p)];t[f+\"0\"]=D.c2p(x?L(B):j[0],!0),t[f+\"1\"]=D.c2p(x?C(B):j[1],!0);var U=void 0!==B.orig_p;return t[f+\"LabelVal\"]=U?B.orig_p:B.p,t.labelLabel=l(D,t[f+\"LabelVal\"],v[f+\"hoverformat\"]),t.valueLabel=l(R,t[h+\"LabelVal\"],v[h+\"hoverformat\"]),t.baseLabel=l(R,B.b,v[h+\"hoverformat\"]),t.spikeDistance=(function(t){var e=u,r=t.b,i=O(t);return n.inbox(r-e,i-e,w+(i-e)/(i-r)-1)}(B)+function(t){return P(A(t),M(t),w)}(B))/2,t[f+\"Spike\"]=D.c2p(B.p,!0),o(B,v,t),t.hovertemplate=v.hovertemplate,t}}function f(t,e){var r=e.mcc||t.marker.color,n=e.mlcc||t.marker.line.color,i=s(t,e);return a.opacity(r)?r:a.opacity(n)&&i?n:void 0}e.exports={hoverPoints:function(t,e,r,n,a){var o=u(t,e,r,n,a);if(o){var s=o.cd,l=s[0].trace,c=s[o.index];return o.color=f(l,c),i.getComponentMethod(\"errorbars\",\"hoverInfo\")(c,l,o),[o]}},hoverOnBars:u,getTraceColor:f}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"./helpers\":654}],656:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\").crossTraceCalc,colorbar:t(\"../scatter/marker_colorbar\"),arraysToCalcdata:t(\"./arrays_to_calcdata\"),plot:t(\"./plot\").plot,style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"bar\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"bar\",\"oriented\",\"errorBarsOK\",\"showLegend\",\"zoomScale\"],animatable:!0,meta:{}}},{\"../../plots/cartesian\":568,\"../scatter/marker_colorbar\":944,\"./arrays_to_calcdata\":647,\"./attributes\":648,\"./calc\":649,\"./cross_trace_calc\":651,\"./defaults\":652,\"./event_data\":653,\"./hover\":655,\"./layout_attributes\":657,\"./layout_defaults\":658,\"./plot\":659,\"./select\":660,\"./style\":662}],657:[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\"}}},{}],658:[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=s(\"barmode\"),p=0;p0}function S(t){return\"auto\"===t?0:t}function E(t,e){var r=Math.PI/180*e,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:t.width*i+t.height*n,y:t.width*n+t.height*i}}function L(t,e,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,c=a.anchor||\"end\",u=\"end\"===c,f=\"start\"===c,h=((a.leftToRight||0)+1)/2,p=1-h,d=i.width,g=i.height,m=Math.abs(e-t),v=Math.abs(n-r),y=m>2*_&&v>2*_?_:0;m-=2*y,v-=2*y;var x=S(l);\"auto\"!==l||d<=m&&g<=v||!(d>m||g>v)||(d>v||g>m)&&d.01?q:function(t,e,r){return r&&t===e?t:Math.abs(t-e)>=2?q(t):t>e?Math.ceil(t):Math.floor(t)};B=G(B,N,D),N=G(N,B,D),j=G(j,U,!D),U=G(U,j,!D)}var Y=A(a.ensureSingle(I,\"path\"),P,m,v);if(Y.style(\"vector-effect\",\"non-scaling-stroke\").attr(\"d\",isNaN((N-B)*(U-j))||V&&t._context.staticPlot?\"M0,0Z\":\"M\"+B+\",\"+j+\"V\"+U+\"H\"+N+\"V\"+j+\"Z\").call(l.setClipUrl,e.layerClipId,t),!P.uniformtext.mode&&R){var W=l.makePointStyleFns(f);l.singlePointStyle(c,Y,f,W,t)}!function(t,e,r,n,i,s,c,f,p,m,v){var w,T=e.xaxis,M=e.yaxis,C=t._fullLayout;function P(e,r,n){return a.ensureSingle(e,\"text\").text(r).attr({class:\"bartext bartext-\"+w,\"text-anchor\":\"middle\",\"data-notex\":1}).call(l.font,n).call(o.convertToTspans,t)}var I=n[0].trace,O=\"h\"===I.orientation,z=function(t,e,r,n,i){var o,s=e[0].trace;o=s.texttemplate?function(t,e,r,n,i){var o=e[0].trace,s=a.castOption(o,r,\"texttemplate\");if(!s)return\"\";var l,c,f,h,p=\"histogram\"===o.type,d=\"waterfall\"===o.type,g=\"funnel\"===o.type,m=\"h\"===o.orientation;m?(l=\"y\",c=i,f=\"x\",h=n):(l=\"x\",c=n,f=\"y\",h=i);function v(t){return u(h,h.c2l(t),!0).text}var y=e[r],x={};x.label=y.p,x.labelLabel=x[l+\"Label\"]=(_=y.p,u(c,c.c2l(_),!0).text);var _;var w=a.castOption(o,y.i,\"text\");(0===w||w)&&(x.text=w);x.value=y.s,x.valueLabel=x[f+\"Label\"]=v(y.s);var T={};b(T,o,y.i),(p||void 0===T.x)&&(T.x=m?x.value:x.label);(p||void 0===T.y)&&(T.y=m?x.label:x.value);(p||void 0===T.xLabel)&&(T.xLabel=m?x.valueLabel:x.labelLabel);(p||void 0===T.yLabel)&&(T.yLabel=m?x.labelLabel:x.valueLabel);d&&(x.delta=+y.rawS||y.s,x.deltaLabel=v(x.delta),x.final=y.v,x.finalLabel=v(x.final),x.initial=x.final-x.delta,x.initialLabel=v(x.initial));g&&(x.value=y.s,x.valueLabel=v(x.value),x.percentInitial=y.begR,x.percentInitialLabel=a.formatPercent(y.begR),x.percentPrevious=y.difR,x.percentPreviousLabel=a.formatPercent(y.difR),x.percentTotal=y.sumR,x.percenTotalLabel=a.formatPercent(y.sumR));var k=a.castOption(o,y.i,\"customdata\");k&&(x.customdata=k);return a.texttemplateString(s,x,t._d3locale,T,x,o._meta||{})}(t,e,r,n,i):s.textinfo?function(t,e,r,n){var i=t[0].trace,o=\"h\"===i.orientation,s=\"waterfall\"===i.type,l=\"funnel\"===i.type;function c(t){return u(o?r:n,+t,!0).text}var f,h=i.textinfo,p=t[e],d=h.split(\"+\"),g=[],m=function(t){return-1!==d.indexOf(t)};m(\"label\")&&g.push((v=t[e].p,u(o?n:r,v,!0).text));var v;m(\"text\")&&(0===(f=a.castOption(i,p.i,\"text\"))||f)&&g.push(f);if(s){var y=+p.rawS||p.s,x=p.v,b=x-y;m(\"initial\")&&g.push(c(b)),m(\"delta\")&&g.push(c(y)),m(\"final\")&&g.push(c(x))}if(l){m(\"value\")&&g.push(c(p.s));var _=0;m(\"percent initial\")&&_++,m(\"percent previous\")&&_++,m(\"percent total\")&&_++;var w=_>1;m(\"percent initial\")&&(f=a.formatPercent(p.begR),w&&(f+=\" of initial\"),g.push(f)),m(\"percent previous\")&&(f=a.formatPercent(p.difR),w&&(f+=\" of previous\"),g.push(f)),m(\"percent total\")&&(f=a.formatPercent(p.sumR),w&&(f+=\" of total\"),g.push(f))}return g.join(\"
\")}(e,r,n,i):g.getValue(s.text,r);return g.coerceString(y,o)}(C,n,i,T,M);w=function(t,e){var r=g.getValue(t.textposition,e);return g.coerceEnumerated(x,r)}(I,i);var D=\"stack\"===m.mode||\"relative\"===m.mode,R=n[i],F=!D||R._outmost;if(!z||\"none\"===w||(R.isBlank||s===c||f===p)&&(\"auto\"===w||\"inside\"===w))return void r.select(\"text\").remove();var B=C.font,N=d.getBarColor(n[i],I),j=d.getInsideTextFont(I,i,B,N),U=d.getOutsideTextFont(I,i,B),V=r.datum();O?\"log\"===T.type&&V.s0<=0&&(s=T.range[0]=G*(Z/Y):Z>=Y*(X/G);G>0&&Y>0&&(J||K||Q)?w=\"inside\":(w=\"outside\",H.remove(),H=null)}else w=\"inside\";if(!H){W=a.ensureUniformFontSize(t,\"outside\"===w?U:j);var $=(H=P(r,z,W)).attr(\"transform\");if(H.attr(\"transform\",\"\"),q=l.bBox(H.node()),G=q.width,Y=q.height,H.attr(\"transform\",$),G<=0||Y<=0)return void H.remove()}var tt,et,rt=I.textangle;\"outside\"===w?(et=\"both\"===I.constraintext||\"outside\"===I.constraintext,tt=function(t,e,r,n,i,a){var o,s=!!a.isHorizontal,l=!!a.constrained,c=a.angle||0,u=i.width,f=i.height,h=Math.abs(e-t),p=Math.abs(n-r);o=s?p>2*_?_:0:h>2*_?_:0;var d=1;l&&(d=s?Math.min(1,p/f):Math.min(1,h/u));var g=S(c),m=E(i,g),v=(s?m.x:m.y)/2,y=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=(t+e)/2,w=(r+n)/2,T=0,A=0,M=s?k(e,t):k(r,n);s?(b=e-M*o,T=M*v):(w=n+M*o,A=-M*v);return{textX:y,textY:x,targetX:b,targetY:w,anchorX:T,anchorY:A,scale:d,rotate:g}}(s,c,f,p,q,{isHorizontal:O,constrained:et,angle:rt})):(et=\"both\"===I.constraintext||\"inside\"===I.constraintext,tt=L(s,c,f,p,q,{isHorizontal:O,constrained:et,angle:rt,anchor:I.insidetextanchor}));tt.fontSize=W.size,h(\"histogram\"===I.type?\"bar\":I.type,tt,C),R.transform=tt,A(H,C,m,v).attr(\"transform\",a.getTextTransform(tt))}(t,e,I,r,p,B,N,j,U,m,v),e.layerClipId&&l.hideOutsideRangePoint(c,I.select(\"text\"),w,C,f.xcalendar,f.ycalendar)}));var j=!1===f.cliponaxis;l.setClipUrl(c,j?null:e.layerClipId,t)}));c.getComponentMethod(\"errorbars\",\"plot\")(t,I,e,m)},toMoveInsideBar:L}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../components/fx/helpers\":402,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"./attributes\":648,\"./constants\":650,\"./helpers\":654,\"./style\":662,\"./uniform_text\":664,\"@plotly/d3\":58,\"fast-isnumeric\":190}],660:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){var a=e.c2p(n?t.s0:t.p0,!0),o=e.c2p(n?t.s1:t.p1,!0),s=r.c2p(n?t.p0:t.s0,!0),l=r.c2p(n?t.p1:t.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}e.exports=function(t,e){var r,i=t.cd,a=t.xaxis,o=t.yaxis,s=i[0].trace,l=\"funnel\"===s.type,c=\"h\"===s.orientation,u=[];if(!1===e)for(r=0;r1||0===i.bargap&&0===i.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr(\"shape-rendering\",\"crispEdges\")})),e.selectAll(\"g.points\").each((function(e){d(n.select(this),e[0].trace,t)})),s.getComponentMethod(\"errorbars\",\"style\")(e)},styleTextPoints:g,styleOnSelect:function(t,e,r){var 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.ensureUniformFontSize(r,m(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):(d(r,i,t),s.getComponentMethod(\"errorbars\",\"style\")(r))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:_,resizeText:l}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../lib\":503,\"../../registry\":638,\"./attributes\":648,\"./helpers\":654,\"./uniform_text\":664,\"@plotly/d3\":58}],663:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/helpers\").hasColorscale,a=t(\"../../components/colorscale/defaults\"),o=t(\"../../lib\").coercePattern;e.exports=function(t,e,r,s,l){var c=r(\"marker.color\",s),u=i(t,\"marker\");u&&a(t,e,l,r,{prefix:\"marker.\",cLetter:\"c\"}),r(\"marker.line.color\",n.defaultLine),i(t,\"marker.line\")&&a(t,e,l,r,{prefix:\"marker.line.\",cLetter:\"c\"}),r(\"marker.line.width\"),r(\"marker.opacity\"),o(r,\"marker.pattern\",c,u),r(\"selected.marker.color\"),r(\"unselected.marker.color\")}},{\"../../components/color\":366,\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503}],664:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\");function a(t){return\"_\"+t+\"Text_minsize\"}e.exports={recordMinTextSize:function(t,e,r){if(r.uniformtext.mode){var n=a(t),i=r.uniformtext.minsize,o=e.scale*e.fontSize;e.hide=o g.point\"}e.selectAll(s).each((function(t){var e=t.transform;e&&(e.scale=l&&e.hide?0:o/e.fontSize,n.select(this).select(\"text\").attr(\"transform\",i.getTextTransform(e)))}))}}}},{\"../../lib\":503,\"@plotly/d3\":58}],665:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../lib/extend\").extendFlat,a=t(\"../scatterpolar/attributes\"),o=t(\"../bar/attributes\");e.exports={r:a.r,theta:a.theta,r0:a.r0,dr:a.dr,theta0:a.theta0,dtheta:a.dtheta,thetaunit:a.thetaunit,base:i({},o.base,{}),offset:i({},o.offset,{}),width:i({},o.width,{}),text:i({},o.text,{}),hovertext:i({},o.hovertext,{}),marker:o.marker,hoverinfo:a.hoverinfo,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{\"../../lib/extend\":493,\"../../plots/template_attributes\":633,\"../bar/attributes\":648,\"../scatterpolar/attributes\":1e3}],666:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/helpers\").hasColorscale,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,m=0;mh.range[1]&&(x+=Math.PI);if(n.getClosest(c,(function(t){return g(y,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?m+Math.min(1,Math.abs(t.thetag1-t.thetag0)/v)-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.hovertemplate=u.hovertemplate,t.color=a(u,b),t.xLabelVal=t.yLabelVal=void 0,b.s<0&&(t.idealAlign=\"left\"),[t]}}},{\"../../components/fx\":406,\"../../lib\":503,\"../../plots/polar/helpers\":621,\"../bar/hover\":655,\"../scatterpolar/hover\":1004}],669:[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\"),formatLabels:t(\"../scatterpolar/format_labels\"),style:t(\"../bar/style\").style,styleOnSelect:t(\"../bar/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../bar/select\"),meta:{}}},{\"../../plots/polar\":622,\"../bar/select\":660,\"../bar/style\":662,\"../scatter/marker_colorbar\":944,\"../scatterpolar/format_labels\":1003,\"./attributes\":665,\"./calc\":666,\"./defaults\":667,\"./hover\":668,\"./layout_attributes\":670,\"./layout_defaults\":671,\"./plot\":672}],670:[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\"}}},{}],671:[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;l0?(c=o,u=l):(c=l,u=o);var f=[s.findEnclosingVertexAngles(c,t.vangles)[0],(c+u)/2,s.findEnclosingVertexAngles(u,t.vangles)[1]];return s.pathPolygonAnnulus(n,i,c,u,f,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(){var r=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),m=(p+d)/2;t.ct=[l.c2p(g*Math.cos(m)),c.c2p(g*Math.sin(m))],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,t)}))}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../plots/polar/helpers\":621,\"@plotly/d3\":58,\"fast-isnumeric\":190}],673:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../bar/attributes\"),a=t(\"../../components/color/attributes\"),o=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../lib/extend\").extendFlat,c=n.marker,u=c.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\"},dx:{valType:\"number\",editType:\"calc\"},dy:{valType:\"number\",editType:\"calc\"},xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,xhoverformat:o(\"x\"),yhoverformat:o(\"y\"),name:{valType:\"string\",editType:\"calc+clearAxisTypes\"},q1:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},median:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},q3:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},lowerfence:{valType:\"data_array\",editType:\"calc\"},upperfence:{valType:\"data_array\",editType:\"calc\"},notched:{valType:\"boolean\",editType:\"calc\"},notchwidth:{valType:\"number\",min:0,max:.5,dflt:.25,editType:\"calc\"},notchspan:{valType:\"data_array\",editType:\"calc\"},boxpoints:{valType:\"enumerated\",values:[\"all\",\"outliers\",\"suspectedoutliers\",!1],editType:\"calc\"},jitter:{valType:\"number\",min:0,max:1,editType:\"calc\"},pointpos:{valType:\"number\",min:-2,max:2,editType:\"calc\"},boxmean:{valType:\"enumerated\",values:[!0,\"sd\",!1],editType:\"calc\"},mean:{valType:\"data_array\",editType:\"calc\"},sd:{valType:\"data_array\",editType:\"calc\"},orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc+clearAxisTypes\"},quartilemethod:{valType:\"enumerated\",values:[\"linear\",\"exclusive\",\"inclusive\"],dflt:\"linear\",editType:\"calc\"},width:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},marker:{outliercolor:{valType:\"color\",dflt:\"rgba(0, 0, 0, 0)\",editType:\"style\"},symbol:l({},c.symbol,{arrayOk:!1,editType:\"plot\"}),opacity:l({},c.opacity,{arrayOk:!1,dflt:1,editType:\"style\"}),size:l({},c.size,{arrayOk:!1,editType:\"calc\"}),color:l({},c.color,{arrayOk:!1,editType:\"style\"}),line:{color:l({},u.color,{arrayOk:!1,dflt:a.defaultLine,editType:\"style\"}),width:l({},u.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,whiskerwidth:{valType:\"number\",min:0,max:1,dflt:.5,editType:\"calc\"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:n.selected.marker,editType:\"style\"},unselected:{marker:n.unselected.marker,editType:\"style\"},text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),hovertemplate:s({}),hoveron:{valType:\"flaglist\",flags:[\"boxes\",\"points\"],dflt:\"boxes+points\",editType:\"style\"}}},{\"../../components/color/attributes\":365,\"../../lib/extend\":493,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../bar/attributes\":648,\"../scatter/attributes\":926}],674:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../plots/cartesian/align_period\"),o=t(\"../../lib\"),s=t(\"../../constants/numerical\").BADNUM,l=o._;e.exports=function(t,e){var r,c,y,x,b,_,w,T=t._fullLayout,k=i.getFromId(t,e.xaxis||\"x\"),A=i.getFromId(t,e.yaxis||\"y\"),M=[],S=\"violin\"===e.type?\"_numViolins\":\"_numBoxes\";\"h\"===e.orientation?(y=k,x=\"x\",b=A,_=\"y\",w=!!e.yperiodalignment):(y=A,x=\"y\",b=k,_=\"x\",w=!!e.xperiodalignment);var E,L,C,P,I,O,z=function(t,e,r,i){var s,l=e+\"0\"in t,c=\"d\"+e in t;if(e in t||l&&c){var u=r.makeCalcdata(t,e);return[a(t,r,e,u).vals,u]}s=l?t[e+\"0\"]:\"name\"in t&&(\"category\"===r.type||n(t.name)&&-1!==[\"linear\",\"log\"].indexOf(r.type)||o.isDateTime(t.name)&&\"date\"===r.type)?t.name:i;for(var f=\"multicategory\"===r.type?r.r2c_just_indices(s):r.d2c(s,0,t[e+\"calendar\"]),h=t._length,p=new Array(h),d=0;dE.uf};if(e._hasPreCompStats){var U=e[x],V=function(t){return y.d2c((e[t]||[])[r])},H=1/0,q=-1/0;for(r=0;r=E.q1&&E.q3>=E.med){var Y=V(\"lowerfence\");E.lf=Y!==s&&Y<=E.q1?Y:p(E,C,P);var W=V(\"upperfence\");E.uf=W!==s&&W>=E.q3?W:d(E,C,P);var X=V(\"mean\");E.mean=X!==s?X:P?o.mean(C,P):(E.q1+E.q3)/2;var Z=V(\"sd\");E.sd=X!==s&&Z>=0?Z:P?o.stdev(C,P,E.mean):E.q3-E.q1,E.lo=g(E),E.uo=m(E);var J=V(\"notchspan\");J=J!==s&&J>0?J:v(E,P),E.ln=E.med-J,E.un=E.med+J;var K=E.lf,Q=E.uf;e.boxpoints&&C.length&&(K=Math.min(K,C[0]),Q=Math.max(Q,C[P-1])),e.notched&&(K=Math.min(K,E.ln),Q=Math.max(Q,E.un)),E.min=K,E.max=Q}else{var $;o.warn([\"Invalid input - make sure that q1 <= median <= q3\",\"q1 = \"+E.q1,\"median = \"+E.med,\"q3 = \"+E.q3].join(\"\\n\")),$=E.med!==s?E.med:E.q1!==s?E.q3!==s?(E.q1+E.q3)/2:E.q1:E.q3!==s?E.q3:0,E.med=$,E.q1=E.q3=$,E.lf=E.uf=$,E.mean=E.sd=$,E.ln=E.un=$,E.min=E.max=$}H=Math.min(H,E.min),q=Math.max(q,E.max),E.pts2=L.filter(j),M.push(E)}}e._extremes[y._id]=i.findExtremes(y,[H,q],{padded:!0})}else{var tt=y.makeCalcdata(e,x),et=function(t,e){for(var r=t.length,n=new Array(r+1),i=0;i=0&&it0){var ut,ft;if((E={}).pos=E[_]=B[r],L=E.pts=nt[r].sort(f),P=(C=E[x]=L.map(h)).length,E.min=C[0],E.max=C[P-1],E.mean=o.mean(C,P),E.sd=o.stdev(C,P,E.mean),E.med=o.interp(C,.5),P%2&&(lt||ct))lt?(ut=C.slice(0,P/2),ft=C.slice(P/2+1)):ct&&(ut=C.slice(0,P/2+1),ft=C.slice(P/2)),E.q1=o.interp(ut,.5),E.q3=o.interp(ft,.5);else E.q1=o.interp(C,.25),E.q3=o.interp(C,.75);E.lf=p(E,C,P),E.uf=d(E,C,P),E.lo=g(E),E.uo=m(E);var ht=v(E,P);E.ln=E.med-ht,E.un=E.med+ht,at=Math.min(at,E.ln),ot=Math.max(ot,E.un),E.pts2=L.filter(j),M.push(E)}e._extremes[y._id]=i.findExtremes(y,e.notched?tt.concat([at,ot]):tt,{padded:!0})}return function(t,e){if(o.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r0?(M[0].t={num:T[S],dPos:N,posLetter:_,valLetter:x,labels:{med:l(t,\"median:\"),min:l(t,\"min:\"),q1:l(t,\"q1:\"),q3:l(t,\"q3:\"),max:l(t,\"max:\"),mean:\"sd\"===e.boxmean?l(t,\"mean \\xb1 \\u03c3:\"):l(t,\"mean:\"),lf:l(t,\"lower fence:\"),uf:l(t,\"upper fence:\")}},T[S]++,M):[{t:{empty:!0}}]};var c={text:\"tx\",hovertext:\"htx\"};function u(t,e,r){for(var n in c)o.isArrayOrTypedArray(e[n])&&(Array.isArray(r)?o.isArrayOrTypedArray(e[n][r[0]])&&(t[c[n]]=e[n][r[0]][r[1]]):t[c[n]]=e[n][r])}function f(t,e){return t.v-e.v}function h(t){return t.v}function p(t,e,r){return 0===r?t.q1:Math.min(t.q1,e[Math.min(o.findBin(2.5*t.q1-1.5*t.q3,e,!0)+1,r-1)])}function d(t,e,r){return 0===r?t.q3:Math.max(t.q3,e[Math.max(o.findBin(2.5*t.q3-1.5*t.q1,e),0)])}function g(t){return 4*t.q1-3*t.q3}function m(t){return 4*t.q3-3*t.q1}function v(t,e){return 0===e?0:1.57*(t.q3-t.q1)/Math.sqrt(e)}},{\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/align_period\":551,\"../../plots/cartesian/axes\":554,\"fast-isnumeric\":190}],675:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/constraints\").getAxisGroup,o=[\"v\",\"h\"];function s(t,e,r,o){var s,l,c,u=e.calcdata,f=e._fullLayout,h=o._id,p=h.charAt(0),d=[],g=0;for(s=0;s1,b=1-f[t+\"gap\"],_=1-f[t+\"groupgap\"];for(s=0;s0){var q=E.pointpos,G=E.jitter,Y=E.marker.size/2,W=0;q+G>=0&&((W=V*(q+G))>M?(H=!0,j=Y,B=W):W>R&&(j=Y,B=M)),W<=M&&(B=M);var X=0;q-G<=0&&((X=-V*(q-G))>S?(H=!0,U=Y,N=X):X>F&&(U=Y,N=S)),X<=S&&(N=S)}else B=M,N=S;var Z=new Array(c.length);for(l=0;l0?(m=\"v\",v=x>0?Math.min(_,b):Math.min(b)):x>0?(m=\"h\",v=Math.min(_)):v=0;if(v){e._length=v;var S=r(\"orientation\",m);e._hasPreCompStats?\"v\"===S&&0===x?(r(\"x0\",0),r(\"dx\",1)):\"h\"===S&&0===y&&(r(\"y0\",0),r(\"dy\",1)):\"v\"===S&&0===x?r(\"x0\"):\"h\"===S&&0===y&&r(\"y0\"),i.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\"],a)}else e.visible=!1}function f(t,e,r,i){var a=i.prefix,o=n.coerce2(t,e,c,\"marker.outliercolor\"),s=r(\"marker.line.outliercolor\"),l=\"outliers\";e._hasPreCompStats?l=\"all\":(o||s)&&(l=\"suspectedoutliers\");var u=r(a+\"points\",l);u?(r(\"jitter\",\"all\"===u?.3:0),r(\"pointpos\",\"all\"===u?-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\"===u&&(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\"),r(\"hovertext\")):delete e.marker;var f=r(\"hoveron\");\"all\"!==f&&-1===f.indexOf(\"points\")||r(\"hovertemplate\"),n.coerceSelectionMarkerOpacity(e,r)}e.exports={supplyDefaults:function(t,e,r,i){function s(r,i){return n.coerce(t,e,c,r,i)}if(u(t,e,s,i),!1!==e.visible){o(t,e,i,s),s(\"xhoverformat\"),s(\"yhoverformat\");var l=e._hasPreCompStats;l&&(s(\"lowerfence\"),s(\"upperfence\")),s(\"line.color\",(t.marker||{}).color||r),s(\"line.width\"),s(\"fillcolor\",a.addOpacity(e.line.color,.5));var h=!1;if(l){var p=s(\"mean\"),d=s(\"sd\");p&&p.length&&(h=!0,d&&d.length&&(h=\"sd\"))}s(\"boxmean\",h),s(\"whiskerwidth\"),s(\"width\"),s(\"quartilemethod\");var g=!1;if(l){var m=s(\"notchspan\");m&&m.length&&(g=!0)}else n.validate(t.notchwidth,c.notchwidth)&&(g=!0);s(\"notched\",g)&&s(\"notchwidth\"),f(t,e,s,{prefix:\"box\"})}},crossTraceDefaults:function(t,e){var r,i;function a(t){return n.coerce(i._input,i,c,t)}for(var o=0;ot.lo&&(x.so=!0)}return a}));h.enter().append(\"path\").classed(\"point\",!0),h.exit().remove(),h.call(a.translatePoints,o,s)}function l(t,e,r,a){var o,s,l=e.val,c=e.pos,u=!!c.rangebreaks,f=a.bPos,h=a.bPosPxOffset||0,p=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var d=t.selectAll(\"path.mean\").data(\"box\"===r.type&&r.boxmean||\"violin\"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);d.enter().append(\"path\").attr(\"class\",\"mean\").style({fill:\"none\",\"vector-effect\":\"non-scaling-stroke\"}),d.exit().remove(),d.each((function(t){var e=c.c2l(t.pos+f,!0),i=c.l2p(e-o)+h,a=c.l2p(e+s)+h,d=u?(i+a)/2:c.l2p(e)+h,g=l.c2p(t.mean,!0),m=l.c2p(t.mean-t.sd,!0),v=l.c2p(t.mean+t.sd,!0);\"h\"===r.orientation?n.select(this).attr(\"d\",\"M\"+g+\",\"+i+\"V\"+a+(\"sd\"===p?\"m0,0L\"+m+\",\"+d+\"L\"+g+\",\"+i+\"L\"+v+\",\"+d+\"Z\":\"\")):n.select(this).attr(\"d\",\"M\"+i+\",\"+g+\"H\"+a+(\"sd\"===p?\"m0,0L\"+d+\",\"+m+\"L\"+i+\",\"+g+\"L\"+d+\",\"+v+\"Z\":\"\"))}))}e.exports={plot:function(t,e,r,a){var c=e.xaxis,u=e.yaxis;i.makeTraceGroups(a,r,\"trace boxes\").each((function(t){var e,r,i=n.select(this),a=t[0],f=a.t,h=a.trace;(f.wdPos=f.bdPos*h.whiskerwidth,!0!==h.visible||f.empty)?i.remove():(\"h\"===h.orientation?(e=u,r=c):(e=c,r=u),o(i,{pos:e,val:r},h,f),s(i,{x:c,y:u},h,f),l(i,{pos:e,val:r},h,f))}))},plotBoxAndWhiskers:o,plotPoints:s,plotBoxMean:l}},{\"../../components/drawing\":388,\"../../lib\":503,\"@plotly/d3\":58}],683:[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=10)return null;for(var i=1/0,a=-1/0,o=e.length,s=0;s0?Math.floor:Math.ceil,I=L>0?Math.ceil:Math.floor,O=L>0?Math.min:Math.max,z=L>0?Math.max:Math.min,D=P(S+C),R=I(E-C),F=[[f=M(S)]];for(a=D;a*L=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}},{}],697:[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,m,v,y,x=t[\"_\"+e],b=t[e+\"axis\"],_=b._gridlines=[],w=b._minorgridlines=[],T=b._boundarylines=[],k=t[\"_\"+r],A=t[r+\"axis\"];\"array\"===b.tickmode&&(b.tickvals=x.slice());var M=t._xctrl,S=t._yctrl,E=M[0].length,L=M.length,C=t._a.length,P=t._b.length;n.prepTicks(b),\"array\"===b.tickmode&&delete b.tickvals;var I=b.smoothing?3:1;function O(n){var i,a,o,s,l,c,u,f,p,d,g,m,v=[],y=[],x={};if(\"b\"===e)for(a=t.b2j(n),o=Math.floor(Math.max(0,Math.min(P-2,a))),s=a-o,x.length=P,x.crossLength=C,x.xy=function(e){return t.evalxy([],e,a)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},i=0;i0&&(p=t.dxydi([],i-1,o,0,s),v.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),d=t.dxydi([],i-1,o,1,s),v.push(f[0]-d[0]/3),y.push(f[1]-d[1]/3)),v.push(f[0]),y.push(f[1]),l=f;else for(i=t.a2i(n),c=Math.floor(Math.max(0,Math.min(C-2,i))),u=i-c,x.length=C,x.crossLength=P,x.xy=function(e){return t.evalxy([],i,e)},x.dxy=function(e,r){return t.dxydj([],c,e,u,r)},a=0;a0&&(g=t.dxydj([],c,a-1,u,0),v.push(l[0]+g[0]/3),y.push(l[1]+g[1]/3),m=t.dxydj([],c,a-1,u,1),v.push(f[0]-m[0]/3),y.push(f[1]-m[1]/3)),v.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=v,x.y=y,x.smoothing=A.smoothing,x}function z(n){var i,a,o,s,l,c=[],u=[],f={};if(f.length=x.length,f.crossLength=k.length,\"b\"===e)for(o=Math.max(0,Math.min(P-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;ix.length-1||_.push(i(z(o),{color:b.gridcolor,width:b.gridwidth}));for(h=u;hx.length-1||g<0||g>x.length-1))for(m=x[s],v=x[g],a=0;ax[x.length-1]||w.push(i(O(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&T.push(i(z(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(z(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(O(p),{color:b.gridcolor,width:b.gridwidth}));for(h=u-1;hx[x.length-1]||w.push(i(O(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&T.push(i(O(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(O(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{\"../../lib/extend\":493,\"../../plots/cartesian/axes\":554}],698:[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;re.length&&(t=t.slice(0,e.length)):t=[],i=0;i90&&(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(n,e,r),offsetMultplier:c}}},{}],712:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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=c.strRotate,f=c.strTranslate,h=t(\"../../constants/alignment\");function p(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 d(t,e,r,a,o,c,h,p){var d=c.selectAll(\"text.\"+p).data(h);d.enter().append(\"text\").classed(p,!0);var g=0,m={};return d.each((function(o,c){var h;if(\"auto\"===o.axis.tickangle)h=s(a,e,r,o.xy,o.dxy);else{var p=(o.axis.tickangle+180)*Math.PI/180;h=s(a,e,r,o.xy,[Math.cos(p),Math.sin(p)])}c||(m={angle:h.angle,flip:h.flip});var d=(o.endAnchor?-1:1)*h.flip,v=n.select(this).attr({\"text-anchor\":d>0?\"start\":\"end\",\"data-notex\":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,t),y=i.bBox(this);v.attr(\"transform\",f(h.p[0],h.p[1])+u(h.angle)+f(o.axis.labelpadding*d,.3*y.height)),g=Math.max(g,y.width+o.axis.labelpadding)})),d.exit().remove(),m.maxExtent=g,m}e.exports=function(t,e,r,i){var l=e.xaxis,u=e.yaxis,f=t._fullLayout._clips;c.makeTraceGroups(i,r,\"trace\").each((function(e){var r=n.select(this),i=e[0],h=i.trace,g=h.aaxis,m=h.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\",h.opacity),p(l,u,x,g,\"a\",g._gridlines),p(l,u,x,m,\"b\",m._gridlines),p(l,u,y,g,\"a\",g._minorgridlines),p(l,u,y,m,\"b\",m._minorgridlines),p(l,u,b,g,\"a-boundary\",g._boundarylines),p(l,u,b,m,\"b-boundary\",m._boundarylines);var w=d(t,l,u,h,i,_,g._labels,\"a-label\"),T=d(t,l,u,h,i,_,m._labels,\"b-label\");!function(t,e,r,n,i,a,o,l){var u,f,h,p,d=c.aggNums(Math.min,null,r.a),g=c.aggNums(Math.max,null,r.a),m=c.aggNums(Math.min,null,r.b),y=c.aggNums(Math.max,null,r.b);u=.5*(d+g),f=m,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)));v(t,e,r,n,h,p,r.aaxis,i,a,o,\"a-title\"),u=d,f=.5*(m+y),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)));v(t,e,r,n,h,p,r.baxis,i,a,l,\"b-title\")}(t,_,h,i,l,u,w,T),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;f90&&y<270,b=n.select(this);b.text(h.title.text).call(l.convertToTspans,t),x&&(_=(-l.lineCount(b)+m)*g*a-_),b.attr(\"transform\",f(e.p[0],e.p[1])+u(e.angle)+f(0,_)).attr(\"text-anchor\",\"middle\").call(i.font,h.title.font)})),b.exit().remove()}},{\"../../components/drawing\":388,\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"./makepath\":709,\"./map_1d_array\":710,\"./orient_text\":711,\"@plotly/d3\":58}],713:[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],m=r[u-1],v=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=v*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;p-=x,d+=x,g-=b,m+=b,t.isVisible=function(t,e){return t>p&&tg&&ed||em},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&&(ne[c-1]|ir[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,m=0,v=[];ne[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)))),ir[u-1]?(p=u-2,d=1,m=(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(v,f,p,h,d),l[0]+=v[0]*g,l[1]+=v[1]*g),m&&(t.dxydj(v,f,p,h,d),l[0]+=v[0]*m,l[1]+=v[1]*m)}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=v*(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\":523,\"./compute_control_points\":701,\"./constants\":702,\"./create_i_derivative_evaluator\":703,\"./create_j_derivative_evaluator\":704,\"./create_spline_evaluator\":705}],714:[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),e0&&void 0!==(n=t[r-1][e])&&(a++,i+=n),r0&&a0&&i1e-5);return n.log(\"Smoother converged to\",k,\"after\",A,\"iterations\"),t}},{\"../../lib\":503}],715:[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\":503}],716:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../scattergeo/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../plots/attributes\"),s=t(\"../../components/color/attributes\").defaultLine,l=t(\"../../lib/extend\").extendFlat,c=i.marker.line;e.exports=l({locations:{valType:\"data_array\",editType:\"calc\"},locationmode:i.locationmode,z:{valType:\"data_array\",editType:\"calc\"},geojson:l({},i.geojson,{}),featureidkey:i.featureidkey,text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),marker:{line:{color:l({},c.color,{dflt:s}),width:l({},c.width,{dflt:1}),editType:\"calc\"},opacity:{valType:\"number\",arrayOk:!0,min:0,max:1,dflt:1,editType:\"style\"},editType:\"calc\"},selected:{marker:{opacity:i.selected.marker.opacity,editType:\"plot\"},editType:\"plot\"},unselected:{marker:{opacity:i.unselected.marker.opacity,editType:\"plot\"},editType:\"plot\"},hoverinfo:l({},o.hoverinfo,{editType:\"calc\",flags:[\"location\",\"z\",\"text\",\"name\"]}),hovertemplate:n(),showlegend:l({},o.showlegend,{dflt:!1})},a(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))},{\"../../components/color/attributes\":365,\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/template_attributes\":633,\"../scattergeo/attributes\":968}],717:[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\");function l(t){return t&&\"string\"==typeof t}e.exports=function(t,e){var r,c=e._length,u=new Array(c);r=e.geojson?function(t){return l(t)||n(t)}:l;for(var f=0;f\")}(t,f,o),[t]}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"./attributes\":716}],721:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../heatmap/colorbar\"),calc:t(\"./calc\"),calcGeoJSON:t(\"./plot\").calcGeoJSON,plot:t(\"./plot\").plot,style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"choropleth\",basePlotModule:t(\"../../plots/geo\"),categories:[\"geo\",\"noOpacity\",\"showLegend\"],meta:{}}},{\"../../plots/geo\":589,\"../heatmap/colorbar\":795,\"./attributes\":716,\"./calc\":717,\"./defaults\":718,\"./event_data\":719,\"./hover\":720,\"./plot\":722,\"./select\":723,\"./style\":724}],722:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../lib/geo_location_utils\"),o=t(\"../../lib/topojson_utils\").getTopojsonFeatures,s=t(\"../../plots/cartesian/autorange\").findExtremes,l=t(\"./style\").style;e.exports={calcGeoJSON:function(t,e){for(var r=t[0].trace,n=e[r.geo],i=n._subplot,l=r.locationmode,c=r._length,u=\"geojson-id\"===l?a.extractTraceFeature(t):o(r,i.topojson),f=[],h=[],p=0;p=0;n--){var i=r[n].id;if(\"string\"==typeof i&&0===i.indexOf(\"water\"))for(var a=n+1;a=0;r--)t.removeLayer(e[r][1])},s.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new o(t,r.uid),a=i.sourceId,s=n(e),l=i.below=t.belowLookup[\"trace-\"+r.uid];return t.map.addSource(a,{type:\"geojson\",data:s.geojson}),i._addLayers(s,l),e[0].trace._glTrace=i,i}},{\"../../plots/mapbox/constants\":611,\"./convert\":726}],730:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../mesh3d/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,c={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\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:a({editType:\"calc\"},{keys:[\"norm\"]}),uhoverformat:i(\"u\",1),vhoverformat:i(\"v\",1),whoverformat:i(\"w\",1),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),showlegend:l({},s.showlegend,{dflt:!1})};l(c,n(\"\",{colorAttr:\"u/v/w norm\",showScaleDflt:!0,editTypeOverride:\"calc\"}));[\"opacity\",\"lightposition\",\"lighting\"].forEach((function(t){c[t]=o[t]})),c.hoverinfo=l({},s.hoverinfo,{editType:\"calc\",flags:[\"x\",\"y\",\"z\",\"u\",\"v\",\"w\",\"norm\",\"text\",\"name\"],dflt:\"x+y+z+norm+text+name\"}),c.transforms=void 0,e.exports=c},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../mesh3d/attributes\":867}],731:[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;co.level||o.starts.length&&a===o.level)}break;case\"constraint\":if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,l=n.y.length,c=-1/0,u=1/0;for(r=0;r\":p>c&&(n.prefixBoundary=!0);break;case\"<\":(pc||n.starts.length&&h===u)&&(n.prefixBoundary=!0);break;case\"][\":f=Math.min(p[0],p[1]),h=Math.max(p[0],p[1]),fc&&(n.prefixBoundary=!0)}}}},{}],738:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale\"),i=t(\"./make_color_map\"),a=t(\"./end_plus\");e.exports={min:\"zmin\",max:\"zmax\",calc:function(t,e,r){var o=e.contours,s=e.line,l=o.size||1,c=o.coloring,u=i(e,{isColorbar:!0});if(\"heatmap\"===c){var f=n.extractOpts(e);r._fillgradient=f.reversescale?n.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else\"fill\"===c&&(r._fillcolor=u);r._line={color:\"lines\"===c?u:s.color,width:!1!==o.showlines?s.width:0,dash:s.dash},r._levels={start:o.start,end:a(o),size:l}}}},{\"../../components/colorscale\":378,\"./end_plus\":746,\"./make_color_map\":751}],739:[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}}},{}],740:[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,m=r(\"contours.operation\");(g._operation=c[m],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),\"=\"===m?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\":366,\"../../constants/filter_ops\":475,\"./label_defaults\":750,\"fast-isnumeric\":190}],741:[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\":475,\"fast-isnumeric\":190}],742:[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\")}},{}],743:[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),starts:n.extendDeep([],t.starts)})}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;r1e3){n.warn(\"Too many contours, clipping at 1000\",t);break}return l}},{\"../../lib\":503,\"./constraint_mapping\":741,\"./end_plus\":746}],746:[function(t,e,r){\"use strict\";e.exports=function(t){return t.end+t.size/1e6}},{}],747:[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])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]}(f,r,e),p=[s(t,e,[-h[0],-h[1]])],d=t.z.length,g=t.z[0].length,m=e.slice(),v=h.slice();for(c=0;c<1e4;c++){if(f>20?(f=i.CHOOSESADDLE[f][(h[0]||h[1])<0?0:1],t.crossings[u]=i.SADDLEREMAINDER[f]):delete t.crossings[u],!(h=i.NEWDELTA[f])){n.log(\"Found bad marching index:\",f,e,t.level);break}p.push(s(t,e,h)),e[0]+=h[0],e[1]+=h[1],u=e.join(\",\"),a(p[p.length-1],p[p.length-2],o,l)&&p.pop();var y=h[0]&&(e[0]<0||e[0]>g-2)||h[1]&&(e[1]<0||e[1]>d-2);if(e[0]===m[0]&&e[1]===m[1]&&h[0]===v[0]&&h[1]===v[1]||r&&y)break;f=t.crossings[u]}1e4===c&&n.log(\"Infinite loop in contour?\");var x,b,_,w,T,k,A,M,S,E,L,C,P,I,O,z=a(p[0],p[p.length-1],o,l),D=0,R=.2*t.smoothing,F=[],B=0;for(c=1;c=B;c--)if((x=F[c])=B&&x+F[b]M&&S--,t.edgepaths[S]=L.concat(p,E));break}V||(t.edgepaths[M]=p.concat(E))}for(M=0;Mt?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=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;hn.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;b2*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.fontSize,a=e.width+i/3,o=Math.max(0,e.height-i/3),s=t.x,l=t.y,c=t.theta,u=Math.sin(c),f=Math.cos(c),h=function(t,e){return[s+t*f-e*u,l+t*u+e*f]},p=[h(-a/2,-o/2),h(-a/2,o/2),h(a/2,o/2),h(a/2,-o/2)];r.push({text:e.text,x:s,y:l,dy:e.dy,theta:c,level:e.level,width:a,height:o}),n.push(p)},r.drawLabels=function(t,e,r,a,o){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(s.convertToTspans,r)})),o){for(var c=\"\",u=0;ur.end&&(r.start=r.end=(r.start+r.end)/2),t._input.contours||(t._input.contours={}),i.extendFlat(t._input.contours,{start:r.start,end:r.end,size:r.size}),t._input.autocontour=!0}else if(\"constraint\"!==r.type){var c,u=r.start,f=r.end,h=t._input.contours;if(u>f&&(r.start=h.start=f,f=r.end=h.end=u,u=r.start),!(r.size>0))c=u===f?1:a(u,f,t.ncontours).dtick,h.size=r.size=c}}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554}],755:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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\":388,\"../heatmap/style\":805,\"./make_color_map\":751,\"@plotly/d3\":58}],756:[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\":376,\"./label_defaults\":750}],757:[function(t,e,r){\"use strict\";var n=t(\"../heatmap/attributes\"),i=t(\"../contour/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../lib/extend\").extendFlat,s=i.contours;e.exports=o({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,hovertext:n.hovertext,transpose:n.transpose,atype:n.xtype,btype:n.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:s.type,start:s.start,end:s.end,size:s.size,coloring:{valType:\"enumerated\",values:[\"fill\",\"lines\",\"none\"],dflt:\"fill\",editType:\"calc\"},showlines:s.showlines,showlabels:s.showlabels,labelfont:s.labelfont,labelformat:s.labelformat,operation:s.operation,value:s.value,editType:\"calc\",impliedEdits:{autocontour:!1}},line:{color:i.line.color,width:i.line.width,dash:i.line.dash,smoothing:i.line.smoothing,editType:\"plot\"},transforms:void 0},a(\"\",{cLetter:\"z\",autoColorDflt:!1}))},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../contour/attributes\":735,\"../heatmap/attributes\":792}],758:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\"),i=t(\"../../lib\"),a=t(\"../heatmap/convert_column_xyz\"),o=t(\"../heatmap/clean_2d_array\"),s=t(\"../heatmap/interp2d\"),l=t(\"../heatmap/find_empties\"),c=t(\"../heatmap/make_bound_array\"),u=t(\"./defaults\"),f=t(\"../carpet/lookup_carpetid\"),h=t(\"../contour/set_contours\");e.exports=function(t,e){var r=e._carpetTrace=f(t,e);if(r&&r.visible&&\"legendonly\"!==r.visible){if(!e.a||!e.b){var p=t.data[r.index],d=t.data[e.index];d.a||(d.a=p.a),d.b||(d.b=p.b),u(d,e,e._defaultColor,t._fullLayout)}var g=function(t,e){var r,u,f,h,p,d,g,m=e._carpetTrace,v=m.aaxis,y=m.baxis;v._minDtick=0,y._minDtick=0,i.isArray1D(e.z)&&a(e,v,y,\"a\",\"b\",[\"z\"]);r=e._a=e._a||e.a,h=e._b=e._b||e.b,r=r?v.makeCalcdata(e,\"_a\"):[],h=h?y.makeCalcdata(e,\"_b\"):[],u=e.a0||0,f=e.da||1,p=e.b0||0,d=e.db||1,g=e._z=o(e._z||e.z,e.transpose),e._emptypoints=l(g),s(g,e._emptypoints);var x=i.maxRowLength(g),b=\"scaled\"===e.xtype?\"\":r,_=c(e,b,u,f,x,v),w=\"scaled\"===e.ytype?\"\":h,T=c(e,w,p,d,g.length,y),k={a:_,b:T,z:g};\"levels\"===e.contours.type&&\"none\"!==e.contours.coloring&&n(t,e,{vals:g,containerStr:\"\",cLetter:\"z\"});return[k]}(t,e);return h(e,e._z),g}}},{\"../../components/colorscale/calc\":374,\"../../lib\":503,\"../carpet/lookup_carpetid\":708,\"../contour/set_contours\":754,\"../heatmap/clean_2d_array\":794,\"../heatmap/convert_column_xyz\":796,\"../heatmap/find_empties\":798,\"../heatmap/interp2d\":801,\"../heatmap/make_bound_array\":803,\"./defaults\":759}],759:[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\":503,\"../contour/constraint_defaults\":740,\"../contour/contours_defaults\":742,\"../contour/style_defaults\":756,\"../heatmap/xyz_defaults\":807,\"./attributes\":757}],760:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../contour/colorbar\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../contour/style\"),moduleType:\"trace\",name:\"contourcarpet\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"carpet\",\"contour\",\"symbols\",\"showLegend\",\"hasLines\",\"carpetDependent\",\"noHover\",\"noSortingByValue\"],meta:{}}},{\"../../plots/cartesian\":568,\"../contour/colorbar\":738,\"../contour/style\":755,\"./attributes\":757,\"./calc\":758,\"./defaults\":759,\"./plot\":761}],761:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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(\"../contour/empty_pathinfo\"),d=t(\"../contour/close_boundaries\"),g=t(\"../carpet/lookup_carpetid\"),m=t(\"../carpet/axis_aligned_line\");function v(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 y(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function x(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,b){var _=e.xaxis,w=e.yaxis;s.makeTraceGroups(b,r,\"contour\").each((function(r){var b=n.select(this),T=r[0],k=T.trace,A=k._carpetTrace=g(t,k),M=t.calcdata[A.index][0];if(A.visible&&\"legendonly\"!==A.visible){var S=T.a,E=T.b,L=k.contours,C=p(L,e,T),P=\"constraint\"===L.type,I=L._operation,O=P?\"=\"===I?\"lines\":\"fill\":L.coloring,z=[[S[0],E[E.length-1]],[S[S.length-1],E[E.length-1]],[S[S.length-1],E[0]],[S[0],E[0]]];l(C);var D=1e-8*(S[S.length-1]-S[0]),R=1e-8*(E[E.length-1]-E[0]);c(C,D,R);var F,B,N,j,U=C;\"constraint\"===L.type&&(U=h(C,I)),function(t,e){var r,n,i,a,o,s,l,c,u;for(r=0;r=0;j--)F=M.clipsegments[j],B=i([],F.x,_.c2p),N=i([],F.y,w.c2p),B.reverse(),N.reverse(),V.push(a(B,N,F.bicubic));var H=\"M\"+V.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=0&&(h=L,d=g):Math.abs(f[1]-h[1])=0&&(h=L,d=g):s.log(\"endpt to newendpt is not vert. or horz.\",f,h,L)}if(d>=0)break;y+=S(f,h),f=h}if(d===e.edgepaths.length){s.log(\"unclosed perimeter path\");break}u=d,(b=-1===x.indexOf(u))&&(u=x[0],y+=S(f,h)+\"Z\",f=null)}for(u=0;um&&(n.max=m);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/I),f.LABELMAX),a=0;a0?+p[u]:0),f.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:v},properties:y})}}var b=o.extractOpts(e),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],T=[\"interpolate\",[\"linear\"],[\"heatmap-density\"],0,a.opacity(w)<1?w:a.addOpacity(w,0)];for(u=1;u<_.length;u++)T.push(_[u][0],_[u][1]);var k=[\"interpolate\",[\"linear\"],[\"get\",\"z\"],b.min,0,b.max,1];return i.extendFlat(c.heatmap.paint,{\"heatmap-weight\":d?k:1/(b.max-b.min),\"heatmap-color\":T,\"heatmap-radius\":g?{type:\"identity\",property:\"r\"}:e.radius,\"heatmap-opacity\":e.opacity}),c.geojson={type:\"FeatureCollection\",features:f},c.heatmap.layout.visibility=\"visible\",c}},{\"../../components/color\":366,\"../../components/colorscale\":378,\"../../constants/numerical\":479,\"../../lib\":503,\"../../lib/geojson_utils\":497,\"fast-isnumeric\":190}],765:[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(\"lon\")||[],c=s(\"lat\")||[],u=Math.min(l.length,c.length);u?(e._length=u,s(\"z\"),s(\"radius\"),s(\"below\"),s(\"text\"),s(\"hovertext\"),s(\"hovertemplate\"),i(t,e,o,s,{prefix:\"\",cLetter:\"z\"})):e.visible=!1}},{\"../../components/colorscale/defaults\":376,\"../../lib\":503,\"./attributes\":762}],766:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.z=e.z,t}},{}],767:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../scattermapbox/hover\").hoverPoints,a=t(\"../scattermapbox/hover\").getExtraText;e.exports=function(t,e,r){var o=i(t,e,r);if(o){var s=o[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,\"z\"in u){var f=s.subplot.mockAxis;s.z=u.z,s.zLabel=n.tickText(f,f.c2l(u.z),\"hover\").text}return s.extraText=a(c,u,l[0].t.labels),[s]}}},{\"../../plots/cartesian/axes\":554,\"../scattermapbox/hover\":996}],768:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../heatmap/colorbar\"),formatLabels:t(\"../scattermapbox/format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),getBelow:function(t,e){for(var r=e.getMapLayers(),n=0;n=0;r--)t.removeLayer(e[r][1])},o.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new a(t,r.uid),o=i.sourceId,s=n(e),l=i.below=t.belowLookup[\"trace-\"+r.uid];return t.map.addSource(o,{type:\"geojson\",data:s.geojson}),i._addLayers(s,l),i}},{\"../../plots/mapbox/constants\":611,\"./convert\":764}],770:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){for(var r=0;r\"),l.color=function(t,e){var r=t.marker,i=e.mc||r.color,a=e.mlc||r.line.color,o=e.mlw||r.line.width;if(n(i))return i;if(n(a)&&o)return a}(u,h),[l]}}},{\"../../components/color\":366,\"../../lib\":503,\"../bar/hover\":655}],778:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\"),plot:t(\"./plot\"),style:t(\"./style\").style,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"../bar/select\"),moduleType:\"trace\",name:\"funnel\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"../bar/select\":660,\"./attributes\":771,\"./calc\":772,\"./cross_trace_calc\":774,\"./defaults\":775,\"./event_data\":776,\"./hover\":777,\"./layout_attributes\":779,\"./layout_defaults\":780,\"./plot\":781,\"./style\":782}],779:[function(t,e,r){\"use strict\";e.exports={funnelmode:{valType:\"enumerated\",values:[\"stack\",\"group\",\"overlay\"],dflt:\"stack\",editType:\"calc\"},funnelgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},funnelgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],780:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s path\").each((function(t){if(!t.isBlank){var e=s.marker;n.select(this).call(a.fill,t.mc||e.color).call(a.stroke,t.mlc||e.line.color).call(i.dashLine,e.line.dash,t.mlw||e.line.width).style(\"opacity\",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(\".regions\").each((function(){n.select(this).selectAll(\"path\").style(\"stroke-width\",0).call(a.fill,s.connector.fillcolor)})),r.selectAll(\".lines\").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll(\"path\"),t.width,t.color,t.dash)}))}))}}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../constants/interactions\":478,\"../bar/style\":662,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],783:[function(t,e,r){\"use strict\";var n=t(\"../pie/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/domain\").attributes,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../../plots/template_attributes\").texttemplateAttrs,l=t(\"../../lib/extend\").extendFlat;e.exports={labels:n.labels,label0:n.label0,dlabel:n.dlabel,values:n.values,marker:{colors:n.marker.colors,line:{color:l({},n.marker.line.color,{dflt:null}),width:l({},n.marker.line.width,{dflt:1}),editType:\"calc\"},editType:\"calc\"},text:n.text,hovertext:n.hovertext,scalegroup:l({},n.scalegroup,{}),textinfo:l({},n.textinfo,{flags:[\"label\",\"text\",\"value\",\"percent\"]}),texttemplate:s({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),hoverinfo:l({},i.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:o({},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),textposition:l({},n.textposition,{values:[\"inside\",\"none\"],dflt:\"inside\"}),textfont:n.textfont,insidetextfont:n.insidetextfont,title:{text:n.title.text,font:n.title.font,position:l({},n.title.position,{values:[\"top left\",\"top center\",\"top right\"],dflt:\"top center\"}),editType:\"plot\"},domain:a({name:\"funnelarea\",trace:!0,editType:\"calc\"}),aspectratio:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},baseratio:{valType:\"number\",min:0,max:1,dflt:.333,editType:\"plot\"}}},{\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/domain\":584,\"../../plots/template_attributes\":633,\"../pie/attributes\":900}],784:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"funnelarea\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":619}],785:[function(t,e,r){\"use strict\";var n=t(\"../pie/calc\");e.exports={calc:function(t,e){return n.calc(t,e)},crossTraceCalc:function(t){n.crossTraceCalc(t,{type:\"funnelarea\"})}}},{\"../pie/calc\":902}],786:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../plots/domain\").defaults,o=t(\"../bar/defaults\").handleText,s=t(\"../pie/defaults\").handleLabelsAndValues;e.exports=function(t,e,r,l){function c(r,a){return n.coerce(t,e,i,r,a)}var u=c(\"labels\"),f=c(\"values\"),h=s(u,f),p=h.len;if(e._hasLabels=h.hasLabels,e._hasValues=h.hasValues,!e._hasLabels&&e._hasValues&&(c(\"label0\"),c(\"dlabel\")),p){e._length=p,c(\"marker.line.width\")&&c(\"marker.line.color\",l.paper_bgcolor),c(\"marker.colors\"),c(\"scalegroup\");var d,g=c(\"text\"),m=c(\"texttemplate\");if(m||(d=c(\"textinfo\",Array.isArray(g)?\"text+percent\":\"percent\")),c(\"hovertext\"),c(\"hovertemplate\"),m||d&&\"none\"!==d){var v=c(\"textposition\");o(t,e,l,c,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}a(e,l,c),c(\"title.text\")&&(c(\"title.position\"),n.coerceFont(c,\"title.font\",l.font)),c(\"aspectratio\"),c(\"baseratio\")}else e.visible=!1}},{\"../../lib\":503,\"../../plots/domain\":584,\"../bar/defaults\":652,\"../pie/defaults\":903,\"./attributes\":783}],787:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"funnelarea\",basePlotModule:t(\"./base_plot\"),categories:[\"pie-like\",\"funnelarea\",\"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\"),style:t(\"./style\"),styleOne:t(\"../pie/style_one\"),meta:{}}},{\"../pie/style_one\":911,\"./attributes\":783,\"./base_plot\":784,\"./calc\":785,\"./defaults\":786,\"./layout_attributes\":788,\"./layout_defaults\":789,\"./plot\":790,\"./style\":791}],788:[function(t,e,r){\"use strict\";var n=t(\"../pie/layout_attributes\").hiddenlabels;e.exports={hiddenlabels:n,funnelareacolorway:{valType:\"colorlist\",editType:\"calc\"},extendfunnelareacolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{\"../pie/layout_attributes\":907}],789:[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(\"funnelareacolorway\",e.colorway),r(\"extendfunnelareacolors\")}},{\"../../lib\":503,\"./layout_attributes\":788}],790:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/drawing\"),a=t(\"../../lib\"),o=a.strScale,s=a.strTranslate,l=t(\"../../lib/svg_text_utils\"),c=t(\"../bar/plot\").toMoveInsideBar,u=t(\"../bar/uniform_text\"),f=u.recordMinTextSize,h=u.clearMinTextSize,p=t(\"../pie/helpers\"),d=t(\"../pie/plot\"),g=d.attachFxHandlers,m=d.determineInsideTextFont,v=d.layoutAreas,y=d.prerenderTitles,x=d.positionTitleOutside,b=d.formatSliceLabel;function _(t,e){return\"l\"+(e[0]-t[0])+\",\"+(e[1]-t[1])}e.exports=function(t,e){var r=t._fullLayout;h(\"funnelarea\",r),y(e,t),v(e,r._size),a.makeTraceGroups(r._funnelarealayer,e,\"trace\").each((function(e){var u=n.select(this),h=e[0],d=h.trace;!function(t){if(!t.length)return;var e=t[0],r=e.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a,o=Math.pow(i,2),s=e.vTotal,l=s,c=s*o/(1-o)/s;function u(){var t,e={x:t=Math.sqrt(c),y:-t};return[e.x,e.y]}var f,h,p=[];for(p.push(u()),f=t.length-1;f>-1;f--)if(!(h=t[f]).hidden){var d=h.v/l;c+=d,p.push(u())}var g=1/0,m=-1/0;for(f=0;f-1;f--)if(!(h=t[f]).hidden){var A=p[k+=1][0],M=p[k][1];h.TL=[-A,M],h.TR=[A,M],h.BL=w,h.BR=T,h.pxmid=(S=h.TR,E=h.BR,[.5*(S[0]+E[0]),.5*(S[1]+E[1])]),w=h.TL,T=h.TR}var S,E}(e),u.each((function(){var u=n.select(this).selectAll(\"g.slice\").data(e);u.enter().append(\"g\").classed(\"slice\",!0),u.exit().remove(),u.each((function(o,s){if(o.hidden)n.select(this).selectAll(\"path,g\").remove();else{o.pointNumber=o.i,o.curveNumber=d.index;var u=h.cx,v=h.cy,y=n.select(this),x=y.selectAll(\"path.surface\").data([o]);x.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":\"all\"}),y.call(g,t,e);var w=\"M\"+(u+o.TR[0])+\",\"+(v+o.TR[1])+_(o.TR,o.BR)+_(o.BR,o.BL)+_(o.BL,o.TL)+\"Z\";x.attr(\"d\",w),b(t,o,h);var T=p.castOption(d.textposition,o.pts),k=y.selectAll(\"g.slicetext\").data(o.text&&\"none\"!==T?[0]:[]);k.enter().append(\"g\").classed(\"slicetext\",!0),k.exit().remove(),k.each((function(){var h=a.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),p=a.ensureUniformFontSize(t,m(d,o,r.font));h.text(o.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(i.font,p).call(l.convertToTspans,t);var g,y,x,b=i.bBox(h.node()),_=Math.min(o.BL[1],o.BR[1])+v,w=Math.max(o.TL[1],o.TR[1])+v;y=Math.max(o.TL[0],o.BL[0])+u,x=Math.min(o.TR[0],o.BR[0])+u,(g=c(y,x,_,w,b,{isHorizontal:!0,constrained:!0,angle:0,anchor:\"middle\"})).fontSize=p.size,f(d.type,g,r),e[s].transform=g,h.attr(\"transform\",a.getTextTransform(g))}))}}));var v=n.select(this).selectAll(\"g.titletext\").data(d.title.text?[0]:[]);v.enter().append(\"g\").classed(\"titletext\",!0),v.exit().remove(),v.each((function(){var e=a.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),c=d.title.text;d._meta&&(c=a.templateString(c,d._meta)),e.text(c).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(i.font,d.title.font).call(l.convertToTspans,t);var u=x(h,r._size);e.attr(\"transform\",s(u.x,u.y)+o(Math.min(1,u.scale))+s(u.tx,u.ty))}))}))}))}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../bar/plot\":659,\"../bar/uniform_text\":664,\"../pie/helpers\":905,\"../pie/plot\":909,\"@plotly/d3\":58}],791:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../pie/style_one\"),a=t(\"../bar/uniform_text\").resizeText;e.exports=function(t){var e=t._fullLayout._funnelarealayer.selectAll(\".trace\");a(t,e,\"funnelarea\"),e.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)}))}))}},{\"../bar/uniform_text\":664,\"../pie/style_one\":911,\"@plotly/d3\":58}],792:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/font_attributes\"),o=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../plots/template_attributes\").texttemplateAttrs,c=t(\"../../components/colorscale/attributes\"),u=t(\"../../lib/extend\").extendFlat;e.exports=u({z:{valType:\"data_array\",editType:\"calc\"},x:u({},n.x,{impliedEdits:{xtype:\"array\"}}),x0:u({},n.x0,{impliedEdits:{xtype:\"scaled\"}}),dx:u({},n.dx,{impliedEdits:{xtype:\"scaled\"}}),y:u({},n.y,{impliedEdits:{ytype:\"array\"}}),y0:u({},n.y0,{impliedEdits:{ytype:\"scaled\"}}),dy:u({},n.dy,{impliedEdits:{ytype:\"scaled\"}}),xperiod:u({},n.xperiod,{impliedEdits:{xtype:\"scaled\"}}),yperiod:u({},n.yperiod,{impliedEdits:{ytype:\"scaled\"}}),xperiod0:u({},n.xperiod0,{impliedEdits:{xtype:\"scaled\"}}),yperiod0:u({},n.yperiod0,{impliedEdits:{ytype:\"scaled\"}}),xperiodalignment:u({},n.xperiodalignment,{impliedEdits:{xtype:\"scaled\"}}),yperiodalignment:u({},n.yperiodalignment,{impliedEdits:{ytype:\"scaled\"}}),text:{valType:\"data_array\",editType:\"calc\"},hovertext:{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\"},hoverongaps:{valType:\"boolean\",dflt:!0,editType:\"none\"},connectgaps:{valType:\"boolean\",editType:\"calc\"},xgap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},ygap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},xhoverformat:o(\"x\"),yhoverformat:o(\"y\"),zhoverformat:o(\"z\",1),hovertemplate:s(),texttemplate:l({arrayOk:!1,editType:\"plot\"},{keys:[\"x\",\"y\",\"z\",\"text\"]}),textfont:a({editType:\"plot\",autoSize:!0,autoColor:!0,colorEditType:\"style\"}),showlegend:u({},i.showlegend,{dflt:!1})},{transforms:void 0},c(\"\",{cLetter:\"z\",autoColorDflt:!1}))},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/font_attributes\":585,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926}],793:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../plots/cartesian/align_period\"),s=t(\"../histogram2d/calc\"),l=t(\"../../components/colorscale/calc\"),c=t(\"./convert_column_xyz\"),u=t(\"./clean_2d_array\"),f=t(\"./interp2d\"),h=t(\"./find_empties\"),p=t(\"./make_bound_array\"),d=t(\"../../constants/numerical\").BADNUM;function g(t){for(var e=[],r=t.length,n=0;nD){O(\"x scale is not linear\");break}}if(x.length&&\"fast\"===P){var R=(x[x.length-1]-x[0])/(x.length-1),F=Math.abs(R/100);for(k=0;kF){O(\"y scale is not linear\");break}}}var B=i.maxRowLength(T),N=\"scaled\"===e.xtype?\"\":r,j=p(e,N,m,v,B,M),U=\"scaled\"===e.ytype?\"\":x,V=p(e,U,b,_,T.length,S);C||(e._extremes[M._id]=a.findExtremes(M,j),e._extremes[S._id]=a.findExtremes(S,V));var H={x:j,y:V,z:T,text:e._text||e.text,hovertext:e._hovertext||e.hovertext};if(e.xperiodalignment&&y&&(H.orig_x=y),e.yperiodalignment&&w&&(H.orig_y=w),N&&N.length===j.length-1&&(H.xCenter=N),U&&U.length===V.length-1&&(H.yCenter=U),L&&(H.xRanges=A.xRanges,H.yRanges=A.yRanges,H.pts=A.pts),E||l(t,e,{vals:T,cLetter:\"z\"}),E&&e.contours&&\"heatmap\"===e.contours.coloring){var q={type:\"contour\"===e.type?\"heatmap\":\"histogram2d\",xcalendar:e.xcalendar,ycalendar:e.ycalendar};H.xfill=p(q,N,m,v,B,M),H.yfill=p(q,U,b,_,T.length,S)}return[H]}},{\"../../components/colorscale/calc\":374,\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/align_period\":551,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"../histogram2d/calc\":826,\"./clean_2d_array\":794,\"./convert_column_xyz\":796,\"./find_empties\":798,\"./interp2d\":801,\"./make_bound_array\":803}],794:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e,r,o){var s,l,c,u,f,h;function p(t){if(n(t))return+t}if(e&&e.transpose){for(s=0,f=0;f=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]}))}},{\"../../lib\":503}],799:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../components/colorscale\").extractOpts;e.exports=function(t,e,r,s,l){l||(l={});var c,u,f,h,p=l.isContour,d=t.cd[0],g=d.trace,m=t.xa,v=t.ya,y=d.x,x=d.y,b=d.z,_=d.xCenter,w=d.yCenter,T=d.zmask,k=g.zhoverformat,A=y,M=x;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>=b[0].length||h<0||h>b.length)return}else{if(n.inbox(e-y[0],e-y[y.length-1],0)>0||n.inbox(r-x[0],r-x[x.length-1],0)>0)return;if(p){var S;for(A=[2*y[0]-y[1]],S=1;Sg&&(v=Math.max(v,Math.abs(t[a][o]-d)/(m-g))))}return v}e.exports=function(t,e){var r,i=1;for(o(t,e),r=0;r.01;r++)i=o(t,e,a(i));return i>.01&&n.log(\"interp2d didn't converge quickly\",i),t}},{\"../../lib\":503}],802:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){t(\"texttemplate\");var r=n.extendFlat({},e.font,{color:\"auto\",size:\"auto\"});n.coerceFont(t,\"textfont\",r)}},{\"../../lib\":503}],803:[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;u0;)_=w.c2p(R[S]),S--;for(_0;)M=T.c2p(F[S]),S--;if(MGt||Gt>T._length))for(E=Ut;EWt||Wt>w._length)){var Xt=u({x:Yt,y:qt},I,t._fullLayout);Xt.x=Yt,Xt.y=qt;var Zt=P.z[S][E];void 0===Zt?(Xt.z=\"\",Xt.zLabel=\"\"):(Xt.z=Zt,Xt.zLabel=s.tickText(Ft,Zt,\"hover\").text);var Jt=P.text&&P.text[S]&&P.text[S][E];void 0!==Jt&&!1!==Jt||(Jt=\"\"),Xt.text=Jt;var Kt=l.texttemplateString(Dt,Xt,t._fullLayout._d3locale,Xt,I._meta||{});if(Kt){var Qt=Kt.split(\"
\"),$t=Qt.length,te=0;for(L=0;L<$t;L++)te=Math.max(te,Qt[L].length);Ht.push({l:$t,c:te,t:Kt,x:Wt,y:Gt,z:Zt})}}}}var ee=I.textfont,re=ee.family,ne=ee.size,ie=t._fullLayout.font.size;if(!ne||\"auto\"===ne){var ae=1/0,oe=1/0,se=0,le=0;for(L=0;L0&&(a=!0);for(var l=0;la){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]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],m=Math.min(f(d+h,d+p,n,a),f(g+h,g+p,n,a)),v=Math.min(f(d+c,d+h,n,a),f(g+c,g+h,n,a));if(m>v&&vo){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(cr.r2l(B)&&(j=o.tickIncrement(j,b.size,!0,p)),z.start=r.l2r(j),F||i.nestedProperty(e,v+\".start\").set(z.start)}var U=b.end,V=r.r2l(O.end),H=void 0!==V;if((b.endFound||H)&&V!==r.r2l(U)){var q=H?V:i.aggNums(Math.max,null,d);z.end=r.l2r(q),H||i.nestedProperty(e,v+\".start\").set(z.end)}var G=\"autobin\"+s;return!1===e._input[G]&&(e._input[v]=i.extendFlat({},e[v]||{}),delete e._input[G],delete e[G]),[z,d]}e.exports={calc:function(t,e){var r,a,p,d,g=[],m=[],v=\"h\"===e.orientation,y=o.getFromId(t,v?e.yaxis:e.xaxis),x=v?\"y\":\"x\",b={x:\"y\",y:\"x\"}[x],_=e[x+\"calendar\"],w=e.cumulative,T=h(t,e,y,x),k=T[0],A=T[1],M=\"string\"==typeof k.size,S=[],E=M?S:k,L=[],C=[],P=[],I=0,O=e.histnorm,z=e.histfunc,D=-1!==O.indexOf(\"density\");w.enabled&&D&&(O=O.replace(/ ?density$/,\"\"),D=!1);var R,F=\"max\"===z||\"min\"===z?null:0,B=l.count,N=c[O],j=!1,U=function(t){return y.r2c(t,0,_)};for(i.isArrayOrTypedArray(e[b])&&\"count\"!==z&&(R=e[b],j=\"avg\"===z,B=l[z]),r=U(k.start),p=U(k.end)+(r-o.tickIncrement(r,k.size,!1,_))/1e6;r=0&&d=0;n--)s(n);else if(\"increasing\"===e){for(n=1;n=0;n--)t[n]+=t[n+1];\"exclude\"===r&&(t.push(0),t.shift())}}(m,w.direction,w.currentbin);var K=Math.min(g.length,m.length),Q=[],$=0,tt=K-1;for(r=0;r=$;r--)if(m[r]){tt=r;break}for(r=$;r<=tt;r++)if(n(g[r])&&n(m[r])){var et={p:g[r],s:m[r],b:0};w.enabled||(et.pts=P[r],Y?et.ph0=et.ph1=P[r].length?A[P[r][0]]:g[r]:(e._computePh=!0,et.ph0=q(S[r]),et.ph1=q(S[r+1],!0))),Q.push(et)}return 1===Q.length&&(Q[0].width1=o.tickIncrement(Q[0].p,k.size,!1,_)-Q[0].p),s(Q,e),i.isArrayOrTypedArray(e.selectedpoints)&&i.tagSelected(Q,e,Z),Q},calcAllAutoBins:h}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"../../registry\":638,\"../bar/arrays_to_calcdata\":647,\"./average\":813,\"./bin_functions\":815,\"./bin_label_vals\":816,\"./norm_functions\":824,\"fast-isnumeric\":190}],818:[function(t,e,r){\"use strict\";e.exports={eventDataKeys:[\"binNumber\"]}},{}],819:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axis_ids\"),a=t(\"../../registry\").traceIs,o=t(\"../bar/defaults\").handleGroupingDefaults,s=n.nestedProperty,l=t(\"../../plots/cartesian/constraints\").getAxisGroup,c=[{aStr:{x:\"xbins.start\",y:\"ybins.start\"},name:\"start\"},{aStr:{x:\"xbins.end\",y:\"ybins.end\"},name:\"end\"},{aStr:{x:\"xbins.size\",y:\"ybins.size\"},name:\"size\"},{aStr:{x:\"nbinsx\",y:\"nbinsy\"},name:\"nbins\"}],u=[\"x\",\"y\"];e.exports=function(t,e){var r,f,h,p,d,g,m,v=e._histogramBinOpts={},y=[],x={},b=[];function _(t,e){return n.coerce(r._input,r,r._module.attributes,t,e)}function w(t){return\"v\"===t.orientation?\"x\":\"y\"}function T(t,r,a){var o=t.uid+\"__\"+a;r||(r=o);var s=function(t,r){return i.getFromTrace({_fullLayout:e},t,r).type}(t,a),l=t[a+\"calendar\"]||\"\",c=v[r],u=!0;c&&(s===c.axType&&l===c.calendar?(u=!1,c.traces.push(t),c.dirs.push(a)):(r=o,s!==c.axType&&n.warn([\"Attempted to group the bins of trace\",t.index,\"set on a\",\"type:\"+s,\"axis\",\"with bins on\",\"type:\"+c.axType,\"axis.\"].join(\" \")),l!==c.calendar&&n.warn([\"Attempted to group the bins of trace\",t.index,\"set with a\",l,\"calendar\",\"with bins\",c.calendar?\"on a \"+c.calendar+\" calendar\":\"w/o a set calendar\"].join(\" \")))),u&&(v[r]={traces:[t],dirs:[a],axType:s,calendar:t[a+\"calendar\"]||\"\"}),t[\"_\"+a+\"bingroup\"]=r}for(d=0;dS&&T.splice(S,T.length-S),M.length>S&&M.splice(S,M.length-S);var E=[],L=[],C=[],P=\"string\"==typeof w.size,I=\"string\"==typeof A.size,O=[],z=[],D=P?O:w,R=I?z:A,F=0,B=[],N=[],j=e.histnorm,U=e.histfunc,V=-1!==j.indexOf(\"density\"),H=\"max\"===U||\"min\"===U?null:0,q=a.count,G=o[j],Y=!1,W=[],X=[],Z=\"z\"in e?e.z:\"marker\"in e&&Array.isArray(e.marker.color)?e.marker.color:\"\";Z&&\"count\"!==U&&(Y=\"avg\"===U,q=a[U]);var J=w.size,K=x(w.start),Q=x(w.end)+(K-i.tickIncrement(K,J,!1,v))/1e6;for(r=K;r=0&&p=0&&d-1,flipY:E.tiling.flip.indexOf(\"y\")>-1,orientation:E.tiling.orientation,pad:{inner:E.tiling.pad},maxDepth:E._maxDepth}).descendants(),O=1/0,z=-1/0;I.forEach((function(t){var e=t.depth;e>=E._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(O=Math.min(O,e),z=Math.max(z,e))})),p=p.data(I,u.getPtId),E._maxVisibleLayers=isFinite(z)?z-O+1:0,p.enter().append(\"g\").classed(\"slice\",!0),T(p,!1,{},[g,m],x),p.order();var D=null;if(w&&M){var R=u.getPtId(M);p.each((function(t){null===D&&u.getPtId(t)===R&&(D={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var F=function(){return D||{x0:0,x1:g,y0:0,y1:m}},B=p;return w&&(B=B.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),B.each((function(s){s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-E.tiling.pad),s._hoverY=y(P?s.y1-E.tiling.pad/2:s.y0+E.tiling.pad/2);var p=n.select(this),d=i.ensureSingle(p,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?d.transition().attrTween(\"d\",(function(t){var e=k(t,!1,F(),[g,m],{orientation:E.tiling.orientation,flipX:E.tiling.flip.indexOf(\"x\")>-1,flipY:E.tiling.flip.indexOf(\"y\")>-1});return function(t){return x(e(t))}})):d.attr(\"d\",x),p.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{isTransitioning:t._transitioning}),d.call(l,s,E,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text=\"\":s._text=h(s,r,E,e,S)||\"\";var T=i.ensureSingle(p,\"g\",\"slicetext\"),M=i.ensureSingle(T,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),I=i.ensureUniformFontSize(t,u.determineTextFont(E,s,S.font));M.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",C?\"end\":L?\"start\":\"middle\").call(a.font,I).call(o.convertToTspans,t),s.textBB=a.bBox(M.node()),s.transform=b(s,{fontSize:I.size}),s.transform.fontSize=I.size,w?M.transition().attrTween(\"transform\",(function(t){var e=A(t,!1,F(),[g,m]);return function(t){return _(e(t))}})):M.attr(\"transform\",_(s))})),D}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../sunburst/fx\":1050,\"../sunburst/helpers\":1051,\"../sunburst/plot\":1055,\"../treemap/constants\":1074,\"./partition\":842,\"./style\":844,\"@plotly/d3\":58}],839:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"icicle\",basePlotModule:t(\"./base_plot\"),categories:[],animatable:!0,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\"),style:t(\"./style\").style,colorbar:t(\"../scatter/marker_colorbar\"),meta:{}}},{\"../scatter/marker_colorbar\":944,\"./attributes\":834,\"./base_plot\":835,\"./calc\":836,\"./defaults\":837,\"./layout_attributes\":840,\"./layout_defaults\":841,\"./plot\":843,\"./style\":844}],840:[function(t,e,r){\"use strict\";e.exports={iciclecolorway:{valType:\"colorlist\",editType:\"calc\"},extendiciclecolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],841:[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(\"iciclecolorway\",e.colorway),r(\"extendiciclecolors\")}},{\"../../lib\":503,\"./layout_attributes\":840}],842:[function(t,e,r){\"use strict\";var n=t(\"d3-hierarchy\"),i=t(\"../treemap/flip_tree\");e.exports=function(t,e,r){var a=r.flipX,o=r.flipY,s=\"h\"===r.orientation,l=r.maxDepth,c=e[0],u=e[1];l&&(c=(t.height+1)*e[0]/Math.min(t.height+1,l),u=(t.height+1)*e[1]/Math.min(t.height+1,l));var f=n.partition().padding(r.pad.inner).size(s?[e[1],c]:[e[0],u])(t);return(s||a||o)&&i(f,e,{swapXY:s,flipX:a,flipY:o}),f}},{\"../treemap/flip_tree\":1079,\"d3-hierarchy\":115}],843:[function(t,e,r){\"use strict\";var n=t(\"../treemap/draw\"),i=t(\"./draw_descendants\");e.exports=function(t,e,r,a){return n(t,e,r,a,{type:\"icicle\",drawDescendants:i})}},{\"../treemap/draw\":1076,\"./draw_descendants\":838}],844:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../bar/uniform_text\").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,\"marker.line.color\")||i.defaultLine,c=a.castOption(r,s,\"marker.line.width\")||0;t.style(\"stroke-width\",c).call(i.fill,n.color).call(i.stroke,l).style(\"opacity\",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._iciclelayer.selectAll(\".trace\");o(t,e,\"icicle\"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style(\"opacity\",r.opacity),e.selectAll(\"path.surface\").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{\"../../components/color\":366,\"../../lib\":503,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],845:[function(t,e,r){\"use strict\";for(var n=t(\"../../plots/attributes\"),i=t(\"../../plots/template_attributes\").hovertemplateAttrs,a=t(\"../../lib/extend\").extendFlat,o=t(\"./constants\").colormodel,s=[\"rgb\",\"rgba\",\"rgba256\",\"hsl\",\"hsla\"],l=[],c=[],u=0;u0||n.inbox(r-o.y0,r-(o.y0+o.h*s.dy),0)>0)){var u,f=Math.floor((e-o.x0)/s.dx),h=Math.floor(Math.abs(r-o.y0)/s.dy);if(s._hasZ?u=o.z[h][f]:s._hasSource&&(u=s._canvas.el.getContext(\"2d\").getImageData(f,h,1,1).data),u){var p,d=o.hi||s.hoverinfo;if(d){var g=d.split(\"+\");-1!==g.indexOf(\"all\")&&(g=[\"color\"]),-1!==g.indexOf(\"color\")&&(p=!0)}var m,v=a.colormodel[s.colormodel],y=v.colormodel||s.colormodel,x=y.length,b=s._scaler(u),_=v.suffix,w=[];(s.hovertemplate||p)&&(w.push(\"[\"+[b[0]+_[0],b[1]+_[1],b[2]+_[2]].join(\", \")),4===x&&w.push(\", \"+b[3]+_[3]),w.push(\"]\"),w=w.join(\"\"),t.extraText=y.toUpperCase()+\": \"+w),Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[h])?m=s.hovertext[h][f]:Array.isArray(s.text)&&Array.isArray(s.text[h])&&(m=s.text[h][f]);var T=c.c2p(o.y0+(h+.5)*s.dy),k=o.x0+(f+.5)*s.dx,A=o.y0+(h+.5)*s.dy,M=\"[\"+u.slice(0,s.colormodel.length).join(\", \")+\"]\";return[i.extendFlat(t,{index:[h,f],x0:l.c2p(o.x0+f*s.dx),x1:l.c2p(o.x0+(f+1)*s.dx),y0:T,y1:T,color:b,xVal:k,xLabelVal:k,yVal:A,yLabelVal:A,zLabelVal:M,text:m,hovertemplateLabels:{zLabel:M,colorLabel:w,\"color[0]Label\":b[0]+_[0],\"color[1]Label\":b[1]+_[1],\"color[2]Label\":b[2]+_[2],\"color[3]Label\":b[3]+_[3]}})]}}}},{\"../../components/fx\":406,\"../../lib\":503,\"./constants\":847}],852:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"./style\"),hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"image\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"2dMap\",\"noSortingByValue\"],animatable:!1,meta:{}}},{\"../../plots/cartesian\":568,\"./attributes\":845,\"./calc\":846,\"./defaults\":848,\"./event_data\":849,\"./hover\":851,\"./plot\":853,\"./style\":854}],853:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.strTranslate,o=t(\"../../constants/xmlns_namespaces\"),s=t(\"./constants\"),l=i.isIOS()||i.isSafari()||i.isIE();e.exports=function(t,e,r,c){var u=e.xaxis,f=e.yaxis,h=!(l||t._context._exportedPlot);i.makeTraceGroups(c,r,\"im\").each((function(e){var r=n.select(this),l=e[0],c=l.trace,p=(\"fast\"===c.zsmooth||!1===c.zsmooth&&h)&&!c._hasZ&&c._hasSource&&\"linear\"===u.type&&\"linear\"===f.type;c._realImage=p;var d,g,m,v,y,x,b=l.z,_=l.x0,w=l.y0,T=l.w,k=l.h,A=c.dx,M=c.dy;for(x=0;void 0===d&&x0;)g=u.c2p(_+x*A),x--;for(x=0;void 0===v&&x0;)y=f.c2p(w+x*M),x--;if(gI[0];if(O||z){var D=d+S/2,R=v+E/2;C+=\"transform:\"+a(D+\"px\",R+\"px\")+\"scale(\"+(O?-1:1)+\",\"+(z?-1:1)+\")\"+a(-D+\"px\",-R+\"px\")+\";\"}}L.attr(\"style\",C);var F=new Promise((function(t){if(c._hasZ)t();else if(c._hasSource)if(c._canvas&&c._canvas.el.width===T&&c._canvas.el.height===k&&c._canvas.source===c.source)t();else{var e=document.createElement(\"canvas\");e.width=T,e.height=k;var r=e.getContext(\"2d\");c._image=c._image||new Image;var n=c._image;n.onload=function(){r.drawImage(n,0,0),c._canvas={el:e,source:c.source},t()},n.setAttribute(\"src\",c.source)}})).then((function(){var t;if(c._hasZ)t=B((function(t,e){return b[e][t]})).toDataURL(\"image/png\");else if(c._hasSource)if(p)t=c.source;else{var e=c._canvas.el.getContext(\"2d\").getImageData(0,0,T,k).data;t=B((function(t,r){var n=4*(r*T+t);return[e[n],e[n+1],e[n+2],e[n+3]]})).toDataURL(\"image/png\")}L.attr({\"xlink:href\":t,height:E,width:S,x:d,y:v})}));t._promises.push(F)}function B(t){var e=document.createElement(\"canvas\");e.width=S,e.height=E;var r,n=e.getContext(\"2d\"),a=function(t){return i.constrain(Math.round(u.c2p(_+t*A)-d),0,S)},o=function(t){return i.constrain(Math.round(f.c2p(w+t*M)-v),0,E)},h=s.colormodel[c.colormodel],p=h.colormodel||c.colormodel,g=h.fmt;for(x=0;x0}function T(t){t.each((function(t){y.stroke(n.select(this),t.line.color)})).each((function(t){y.fill(n.select(this),t.color)})).style(\"stroke-width\",(function(t){return t.line.width}))}function k(t,e,r){var n=t._fullLayout,i=o.extendFlat({type:\"linear\",ticks:\"outside\",range:r,showline:!0},e),a={type:\"linear\",_id:\"x\"+e._id},s={letter:\"x\",font:n.font,noHover:!0,noTickson:!0};function l(t,e){return o.coerce(i,a,v,t,e)}return g(i,a,l,s,n),m(i,a,l,s),a}function A(t,e,r){return[Math.min(e/t.width,r/t.height),t,e+\"x\"+r]}function M(t,e,r,i){var a=document.createElementNS(\"http://www.w3.org/2000/svg\",\"text\"),o=n.select(a);return o.text(t).attr(\"x\",0).attr(\"y\",0).attr(\"text-anchor\",r).attr(\"data-unformatted\",t).call(p.convertToTspans,i).call(f.font,e),f.bBox(o.node())}function S(t,e,r,n,i,a){var s=\"_cache\"+e;t[s]&&t[s].key===i||(t[s]={key:i,value:r});var l=o.aggNums(a,null,[t[s].value,n],2);return t[s].value=l,l}e.exports=function(t,e,r,g){var m,v=t._fullLayout;w(r)&&g&&(m=g()),o.makeTraceGroups(v._indicatorlayer,e,\"trace\").each((function(e){var g,E,L,C,P,I=e[0].trace,O=n.select(this),z=I._hasGauge,D=I._isAngular,R=I._isBullet,F=I.domain,B={w:v._size.w*(F.x[1]-F.x[0]),h:v._size.h*(F.y[1]-F.y[0]),l:v._size.l+v._size.w*F.x[0],r:v._size.r+v._size.w*(1-F.x[1]),t:v._size.t+v._size.h*(1-F.y[1]),b:v._size.b+v._size.h*F.y[0]},N=B.l+B.w/2,j=B.t+B.h/2,U=Math.min(B.w/2,B.h),V=h.innerRadius*U,H=I.align||\"center\";if(E=j,z){if(D&&(g=N,E=j+U/2,L=function(t){return function(t,e){var r=Math.sqrt(t.width/2*(t.width/2)+t.height*t.height);return[e/r,t,e]}(t,.9*V)}),R){var q=h.bulletPadding,G=1-h.bulletNumberDomainSize+q;g=B.l+(G+(1-G)*b[H])*B.w,L=function(t){return A(t,(h.bulletNumberDomainSize-q)*B.w,B.h)}}}else g=B.l+b[H]*B.w,L=function(t){return A(t,B.w,B.h)};!function(t,e,r,i){var c,u,h,g=r[0].trace,m=i.numbersX,v=i.numbersY,T=g.align||\"center\",A=x[T],E=i.transitionOpts,L=i.onComplete,C=o.ensureSingle(e,\"g\",\"numbers\"),P=[];g._hasNumber&&P.push(\"number\");g._hasDelta&&(P.push(\"delta\"),\"left\"===g.delta.position&&P.reverse());var I=C.selectAll(\"text\").data(P);function O(e,r,n,i){if(!e.match(\"s\")||n>=0==i>=0||r(n).slice(-1).match(_)||r(i).slice(-1).match(_))return r;var a=e.slice().replace(\"s\",\"f\").replace(/\\d+/,(function(t){return parseInt(t)-1})),o=k(t,{tickformat:a});return function(t){return Math.abs(t)<1?d.tickText(o,t).text:r(t)}}I.enter().append(\"text\"),I.attr(\"text-anchor\",(function(){return A})).attr(\"class\",(function(t){return t})).attr(\"x\",null).attr(\"y\",null).attr(\"dx\",null).attr(\"dy\",null),I.exit().remove();var z,D=g.mode+g.align;g._hasDelta&&(z=function(){var e=k(t,{tickformat:g.delta.valueformat},g._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=function(t){return g.delta.relative?t.relativeDelta:t.delta},s=function(t,e){return 0===t||\"number\"!=typeof t||isNaN(t)?\"-\":(t>0?g.delta.increasing.symbol:g.delta.decreasing.symbol)+e(t)},l=function(t){return t.delta>=0?g.delta.increasing.color:g.delta.decreasing.color};void 0===g._deltaLastValue&&(g._deltaLastValue=o(r[0]));var c=C.select(\"text.delta\");function h(){c.text(s(o(r[0]),i)).call(y.fill,l(r[0])).call(p.convertToTspans,t)}return c.call(f.font,g.delta.font).call(y.fill,l({delta:g._deltaLastValue})),w(E)?c.transition().duration(E.duration).ease(E.easing).tween(\"text\",(function(){var t=n.select(this),e=o(r[0]),c=g._deltaLastValue,u=O(g.delta.valueformat,i,c,e),f=a(c,e);return g._deltaLastValue=e,function(e){t.text(s(f(e),u)),t.call(y.fill,l({delta:f(e)}))}})).each(\"end\",(function(){h(),L&&L()})).each(\"interrupt\",(function(){h(),L&&L()})):h(),u=M(s(o(r[0]),i),g.delta.font,A,t),c}(),D+=g.delta.position+g.delta.font.size+g.delta.font.family+g.delta.valueformat,D+=g.delta.increasing.symbol+g.delta.decreasing.symbol,h=u);g._hasNumber&&(!function(){var e=k(t,{tickformat:g.number.valueformat},g._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=g.number.suffix,s=g.number.prefix,l=C.select(\"text.number\");function u(){var e=\"number\"==typeof r[0].y?s+i(r[0].y)+o:\"-\";l.text(e).call(f.font,g.number.font).call(p.convertToTspans,t)}w(E)?l.transition().duration(E.duration).ease(E.easing).each(\"end\",(function(){u(),L&&L()})).each(\"interrupt\",(function(){u(),L&&L()})).attrTween(\"text\",(function(){var t=n.select(this),e=a(r[0].lastY,r[0].y);g._lastValue=r[0].y;var l=O(g.number.valueformat,i,r[0].lastY,r[0].y);return function(r){t.text(s+l(e(r))+o)}})):u(),c=M(s+i(r[0].y)+o,g.number.font,A,t)}(),D+=g.number.font.size+g.number.font.family+g.number.valueformat+g.number.suffix+g.number.prefix,h=c);if(g._hasDelta&&g._hasNumber){var R,F,B=[(c.left+c.right)/2,(c.top+c.bottom)/2],N=[(u.left+u.right)/2,(u.top+u.bottom)/2],j=.75*g.delta.font.size;\"left\"===g.delta.position&&(R=S(g,\"deltaPos\",0,-1*(c.width*b[g.align]+u.width*(1-b[g.align])+j),D,Math.min),F=B[1]-N[1],h={width:c.width+u.width+j,height:Math.max(c.height,u.height),left:u.left+R,right:c.right,top:Math.min(c.top,u.top+F),bottom:Math.max(c.bottom,u.bottom+F)}),\"right\"===g.delta.position&&(R=S(g,\"deltaPos\",0,c.width*(1-b[g.align])+u.width*b[g.align]+j,D,Math.max),F=B[1]-N[1],h={width:c.width+u.width+j,height:Math.max(c.height,u.height),left:c.left,right:u.right+R,top:Math.min(c.top,u.top+F),bottom:Math.max(c.bottom,u.bottom+F)}),\"bottom\"===g.delta.position&&(R=null,F=u.height,h={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height,bottom:c.bottom+u.height}),\"top\"===g.delta.position&&(R=null,F=c.top,h={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height-u.height,bottom:c.bottom}),z.attr({dx:R,dy:F})}(g._hasNumber||g._hasDelta)&&C.attr(\"transform\",(function(){var t=i.numbersScaler(h);D+=t[2];var e,r=S(g,\"numbersScale\",1,t[0],D,Math.min);g._scaleNumbers||(r=1),e=g._isAngular?v-r*h.bottom:v-r*(h.top+h.bottom)/2,g._numbersTop=r*h.top+e;var n=h[T];\"center\"===T&&(n=(h.left+h.right)/2);var a=m-r*n;return a=S(g,\"numbersTranslate\",0,a,D,Math.max),l(a,e)+s(r)}))}(t,O,e,{numbersX:g,numbersY:E,numbersScaler:L,transitionOpts:r,onComplete:m}),z&&(C={range:I.gauge.axis.range,color:I.gauge.bgcolor,line:{color:I.gauge.bordercolor,width:0},thickness:1},P={range:I.gauge.axis.range,color:\"rgba(0, 0, 0, 0)\",line:{color:I.gauge.bordercolor,width:I.gauge.borderwidth},thickness:1});var Y=O.selectAll(\"g.angular\").data(D?e:[]);Y.exit().remove();var W=O.selectAll(\"g.angularaxis\").data(D?e:[]);W.exit().remove(),D&&function(t,e,r,a){var o,s,f,h,p=r[0].trace,g=a.size,m=a.radius,v=a.innerRadius,y=a.gaugeBg,x=a.gaugeOutline,b=[g.l+g.w/2,g.t+g.h/2+m/2],_=a.gauge,A=a.layer,M=a.transitionOpts,S=a.onComplete,E=Math.PI/2;function L(t){var e=p.gauge.axis.range[0],r=(t-e)/(p.gauge.axis.range[1]-e)*Math.PI-E;return r<-E?-E:r>E?E:r}function C(t){return n.svg.arc().innerRadius((v+m)/2-t/2*(m-v)).outerRadius((v+m)/2+t/2*(m-v)).startAngle(-E)}function P(t){t.attr(\"d\",(function(t){return C(t.thickness).startAngle(L(t.range[0])).endAngle(L(t.range[1]))()}))}_.enter().append(\"g\").classed(\"angular\",!0),_.attr(\"transform\",l(b[0],b[1])),A.enter().append(\"g\").classed(\"angularaxis\",!0).classed(\"crisp\",!0),A.selectAll(\"g.xangularaxistick,path,text\").remove(),(o=k(t,p.gauge.axis)).type=\"linear\",o.range=p.gauge.axis.range,o._id=\"xangularaxis\",o.ticklabeloverflow=\"allow\",o.setScale();var I=function(t){return(o.range[0]-t.x)/(o.range[1]-o.range[0])*Math.PI+Math.PI},O={},z=d.makeLabelFns(o,0).labelStandoff;O.xFn=function(t){var e=I(t);return Math.cos(e)*z},O.yFn=function(t){var e=I(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(z+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*u)},O.anchorFn=function(t){var e=I(t),r=Math.cos(e);return Math.abs(r)<.1?\"middle\":r>0?\"start\":\"end\"},O.heightFn=function(t,e,r){var n=I(t);return-.5*(1+Math.sin(n))*r};var D=function(t){return l(b[0]+m*Math.cos(t),b[1]-m*Math.sin(t))};f=function(t){return D(I(t))};if(s=d.calcTicks(o),h=d.getTickSigns(o)[2],o.visible){h=\"inside\"===o.ticks?-1:1;var R=(o.linewidth||1)/2;d.drawTicks(t,o,{vals:s,layer:A,path:\"M\"+h*R+\",0h\"+h*o.ticklen,transFn:function(t){var e=I(t);return D(e)+\"rotate(\"+-c(e)+\")\"}}),d.drawLabels(t,o,{vals:s,layer:A,transFn:f,labelFns:O})}var F=[y].concat(p.gauge.steps),B=_.selectAll(\"g.bg-arc\").data(F);B.enter().append(\"g\").classed(\"bg-arc\",!0).append(\"path\"),B.select(\"path\").call(P).call(T),B.exit().remove();var N=C(p.gauge.bar.thickness),j=_.selectAll(\"g.value-arc\").data([p.gauge.bar]);j.enter().append(\"g\").classed(\"value-arc\",!0).append(\"path\");var U=j.select(\"path\");w(M)?(U.transition().duration(M.duration).ease(M.easing).each(\"end\",(function(){S&&S()})).each(\"interrupt\",(function(){S&&S()})).attrTween(\"d\",(V=N,H=L(r[0].lastY),q=L(r[0].y),function(){var t=i(H,q);return function(e){return V.endAngle(t(e))()}})),p._lastValue=r[0].y):U.attr(\"d\",\"number\"==typeof r[0].y?N.endAngle(L(r[0].y)):\"M0,0Z\");var V,H,q;U.call(T),j.exit().remove(),F=[];var G=p.gauge.threshold.value;(G||0===G)&&F.push({range:[G,G],color:p.gauge.threshold.color,line:{color:p.gauge.threshold.line.color,width:p.gauge.threshold.line.width},thickness:p.gauge.threshold.thickness});var Y=_.selectAll(\"g.threshold-arc\").data(F);Y.enter().append(\"g\").classed(\"threshold-arc\",!0).append(\"path\"),Y.select(\"path\").call(P).call(T),Y.exit().remove();var W=_.selectAll(\"g.gauge-outline\").data([x]);W.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"path\"),W.select(\"path\").call(P).call(T),W.exit().remove()}(t,0,e,{radius:U,innerRadius:V,gauge:Y,layer:W,size:B,gaugeBg:C,gaugeOutline:P,transitionOpts:r,onComplete:m});var X=O.selectAll(\"g.bullet\").data(R?e:[]);X.exit().remove();var Z=O.selectAll(\"g.bulletaxis\").data(R?e:[]);Z.exit().remove(),R&&function(t,e,r,n){var i,a,o,s,c,u=r[0].trace,f=n.gauge,p=n.layer,g=n.gaugeBg,m=n.gaugeOutline,v=n.size,x=u.domain,b=n.transitionOpts,_=n.onComplete;f.enter().append(\"g\").classed(\"bullet\",!0),f.attr(\"transform\",l(v.l,v.t)),p.enter().append(\"g\").classed(\"bulletaxis\",!0).classed(\"crisp\",!0),p.selectAll(\"g.xbulletaxistick,path,text\").remove();var A=v.h,M=u.gauge.bar.thickness*A,S=x.x[0],E=x.x[0]+(x.x[1]-x.x[0])*(u._hasNumber||u._hasDelta?1-h.bulletNumberDomainSize:1);(i=k(t,u.gauge.axis))._id=\"xbulletaxis\",i.domain=[S,E],i.setScale(),a=d.calcTicks(i),o=d.makeTransTickFn(i),s=d.getTickSigns(i)[2],c=v.t+v.h,i.visible&&(d.drawTicks(t,i,{vals:\"inside\"===i.ticks?d.clipEnds(i,a):a,layer:p,path:d.makeTickPath(i,c,s),transFn:o}),d.drawLabels(t,i,{vals:a,layer:p,transFn:o,labelFns:d.makeLabelFns(i,c)}));function L(t){t.attr(\"width\",(function(t){return Math.max(0,i.c2p(t.range[1])-i.c2p(t.range[0]))})).attr(\"x\",(function(t){return i.c2p(t.range[0])})).attr(\"y\",(function(t){return.5*(1-t.thickness)*A})).attr(\"height\",(function(t){return t.thickness*A}))}var C=[g].concat(u.gauge.steps),P=f.selectAll(\"g.bg-bullet\").data(C);P.enter().append(\"g\").classed(\"bg-bullet\",!0).append(\"rect\"),P.select(\"rect\").call(L).call(T),P.exit().remove();var I=f.selectAll(\"g.value-bullet\").data([u.gauge.bar]);I.enter().append(\"g\").classed(\"value-bullet\",!0).append(\"rect\"),I.select(\"rect\").attr(\"height\",M).attr(\"y\",(A-M)/2).call(T),w(b)?I.select(\"rect\").transition().duration(b.duration).ease(b.easing).each(\"end\",(function(){_&&_()})).each(\"interrupt\",(function(){_&&_()})).attr(\"width\",Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y)))):I.select(\"rect\").attr(\"width\",\"number\"==typeof r[0].y?Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y))):0);I.exit().remove();var O=r.filter((function(){return u.gauge.threshold.value||0===u.gauge.threshold.value})),z=f.selectAll(\"g.threshold-bullet\").data(O);z.enter().append(\"g\").classed(\"threshold-bullet\",!0).append(\"line\"),z.select(\"line\").attr(\"x1\",i.c2p(u.gauge.threshold.value)).attr(\"x2\",i.c2p(u.gauge.threshold.value)).attr(\"y1\",(1-u.gauge.threshold.thickness)/2*A).attr(\"y2\",(1-(1-u.gauge.threshold.thickness)/2)*A).call(y.stroke,u.gauge.threshold.line.color).style(\"stroke-width\",u.gauge.threshold.line.width),z.exit().remove();var D=f.selectAll(\"g.gauge-outline\").data([m]);D.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"rect\"),D.select(\"rect\").call(L).call(T),D.exit().remove()}(t,0,e,{gauge:X,layer:Z,size:B,gaugeBg:C,gaugeOutline:P,transitionOpts:r,onComplete:m});var J=O.selectAll(\"text.title\").data(e);J.exit().remove(),J.enter().append(\"text\").classed(\"title\",!0),J.attr(\"text-anchor\",(function(){return R?x.right:x[I.title.align]})).text(I.title.text).call(f.font,I.title.font).call(p.convertToTspans,t),J.attr(\"transform\",(function(){var t,e=B.l+B.w*b[I.title.align],r=h.titlePadding,n=f.bBox(J.node());if(z){if(D)if(I.gauge.axis.visible)t=f.bBox(W.node()).top-r-n.bottom;else t=B.t+B.h/2-U/2-n.bottom-r;R&&(t=E-(n.top+n.bottom)/2,e=B.l-h.bulletPadding*B.w)}else t=I._numbersTop-r-n.bottom;return l(e,t)}))}))}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../constants/alignment\":471,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"../../plots/cartesian/axis_defaults\":556,\"../../plots/cartesian/layout_attributes\":569,\"../../plots/cartesian/position_defaults\":572,\"./constants\":858,\"@plotly/d3\":58,\"d3-interpolate\":116}],862:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../mesh3d/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=t(\"../../plot_api/edit_types\").overrideAll;var u=e.exports=c(l({x:{valType:\"data_array\"},y:{valType:\"data_array\"},z:{valType:\"data_array\"},value:{valType:\"data_array\"},isomin:{valType:\"number\"},isomax:{valType:\"number\"},surface:{show:{valType:\"boolean\",dflt:!0},count:{valType:\"integer\",dflt:2,min:1},fill:{valType:\"number\",min:0,max:1,dflt:1},pattern:{valType:\"flaglist\",flags:[\"A\",\"B\",\"C\",\"D\",\"E\"],extras:[\"all\",\"odd\",\"even\"],dflt:\"all\"}},spaceframe:{show:{valType:\"boolean\",dflt:!1},fill:{valType:\"number\",min:0,max:1,dflt:.15}},slices:{x:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}},y:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}},z:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}},y:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}},z:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}}},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:a(),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),valuehoverformat:i(\"value\",1),showlegend:l({},s.showlegend,{dflt:!1})},n(\"\",{colorAttr:\"`value`\",showScaleDflt:!0,editTypeOverride:\"calc\"}),{opacity:o.opacity,lightposition:o.lightposition,lighting:o.lighting,flatshading:o.flatshading,contour:o.contour,hoverinfo:l({},s.hoverinfo)}),\"calc\",\"nested\");u.flatshading.dflt=!0,u.lighting.facenormalsepsilon.dflt=0,u.x.editType=u.y.editType=u.z.editType=u.value.editType=\"calc+clearAxisTypes\",u.transforms=void 0},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/edit_types\":536,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../mesh3d/attributes\":867}],863:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\"),i=t(\"../streamtube/calc\").processGrid,a=t(\"../streamtube/calc\").filter;e.exports=function(t,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length),e._x=a(e.x,e._len),e._y=a(e.y,e._len),e._z=a(e.z,e._len),e._value=a(e.value,e._len);var r=i(e);e._gridFill=r.fill,e._Xs=r.Xs,e._Ys=r.Ys,e._Zs=r.Zs,e._len=r.len;for(var o=1/0,s=-1/0,l=0;l0;r--){var n=Math.min(e[r],e[r-1]),i=Math.max(e[r],e[r-1]);if(i>n&&n-1}function R(t,e){return null===t?e:t}function F(e,r,n){C();var i,a,o,l=[r],c=[n];if(s>=1)l=[r],c=[n];else if(s>0){var u=function(t,e){var r=t[0],n=t[1],i=t[2],a=function(t,e,r){for(var n=[],i=0;i-1?n[p]:L(d,g,v);h[p]=x>-1?x:I(d,g,v,R(e,y))}i=h[0],a=h[1],o=h[2],t._meshI.push(i),t._meshJ.push(a),t._meshK.push(o),++m}}function B(t,e,r,n){var i=t[3];in&&(i=n);for(var a=(t[3]-i)/(t[3]-e[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*t[s]+a*e[s];return o}function N(t,e,r){return t>=e&&t<=r}function j(t){var e=.001*(E-S);return t>=S-e&&t<=E+e}function U(e){for(var r=[],n=0;n<4;n++){var i=e[n];r.push([t._x[i],t._y[i],t._z[i],t._value[i]])}return r}function V(t,e,r,n,i,a){a||(a=1),r=[-1,-1,-1];var o=!1,s=[N(e[0][3],n,i),N(e[1][3],n,i),N(e[2][3],n,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(t,e,r){return j(e[0][3])&&j(e[1][3])&&j(e[2][3])?(F(t,e,r),!0):a<3&&V(t,e,r,S,E,++a)};if(s[0]&&s[1]&&s[2])return l(t,e,r)||o;var c=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach((function(a){if(s[a[0]]&&s[a[1]]&&!s[a[2]]){var u=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(h,u,n,i),d=B(h,f,n,i);o=l(t,[d,p,u],[-1,-1,r[a[0]]])||o,o=l(t,[u,f,d],[r[a[0]],r[a[1]],-1])||o,c=!0}})),c||[[0,1,2],[1,2,0],[2,0,1]].forEach((function(a){if(s[a[0]]&&!s[a[1]]&&!s[a[2]]){var u=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(f,u,n,i),d=B(h,u,n,i);o=l(t,[d,p,u],[-1,-1,r[a[0]]])||o,c=!0}})),o}function H(t,e,r,n){var i=!1,a=U(e),o=[N(a[0][3],r,n),N(a[1][3],r,n),N(a[2][3],r,n),N(a[3][3],r,n)];if(!(o[0]||o[1]||o[2]||o[3]))return i;if(o[0]&&o[1]&&o[2]&&o[3])return g&&(i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(3,0,1),n(2,3,0),n(1,2,3)}(t,a,e)||i),i;var s=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]];if(g)i=F(t,[c,u,f],[e[l[0]],e[l[1]],e[l[2]]])||i;else{var p=B(h,c,r,n),d=B(h,u,r,n),m=B(h,f,r,n);i=F(null,[p,d,m],[-1,-1,-1])||i}s=!0}})),s?i:([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(f,c,r,n),d=B(f,u,r,n),m=B(h,u,r,n),v=B(h,c,r,n);g?(i=F(t,[c,v,p],[e[l[0]],-1,-1])||i,i=F(t,[u,d,m],[e[l[1]],-1,-1])||i):i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(2,3,0)}(null,[p,d,m,v],[-1,-1,-1,-1])||i,s=!0}})),s||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach((function(l){if(o[l[0]]&&!o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(u,c,r,n),d=B(f,c,r,n),m=B(h,c,r,n);g?(i=F(t,[c,p,d],[e[l[0]],-1,-1])||i,i=F(t,[c,d,m],[e[l[0]],-1,-1])||i,i=F(t,[c,m,p],[e[l[0]],-1,-1])||i):i=F(null,[p,d,m],[-1,-1,-1])||i,s=!0}})),i)}function q(t,e,r,n,i,a,o,s,l,c,u){var f=!1;return d&&(D(t,\"A\")&&(f=H(null,[e,r,n,a],c,u)||f),D(t,\"B\")&&(f=H(null,[r,n,i,l],c,u)||f),D(t,\"C\")&&(f=H(null,[r,a,o,l],c,u)||f),D(t,\"D\")&&(f=H(null,[n,a,s,l],c,u)||f),D(t,\"E\")&&(f=H(null,[r,n,a,l],c,u)||f)),g&&(f=H(t,[r,n,a,l],c,u)||f),f}function G(t,e,r,n,i,a,o,s){return[!0===s[0]||V(t,U([e,r,n]),[e,r,n],a,o),!0===s[1]||V(t,U([n,i,e]),[n,i,e],a,o)]}function Y(t,e,r,n,i,a,o,s,l){return s?G(t,e,r,i,n,a,o,l):G(t,r,i,n,e,a,o,l)}function W(t,e,r,n,i,a,o){var s,l,c,u,f=!1,h=function(){f=V(t,[s,l,c],[-1,-1,-1],i,a)||f,f=V(t,[c,u,s],[-1,-1,-1],i,a)||f},p=o[0],d=o[1],g=o[2];return p&&(s=O(U([k(e,r-0,n-0)])[0],U([k(e-1,r-0,n-0)])[0],p),l=O(U([k(e,r-0,n-1)])[0],U([k(e-1,r-0,n-1)])[0],p),c=O(U([k(e,r-1,n-1)])[0],U([k(e-1,r-1,n-1)])[0],p),u=O(U([k(e,r-1,n-0)])[0],U([k(e-1,r-1,n-0)])[0],p),h()),d&&(s=O(U([k(e-0,r,n-0)])[0],U([k(e-0,r-1,n-0)])[0],d),l=O(U([k(e-0,r,n-1)])[0],U([k(e-0,r-1,n-1)])[0],d),c=O(U([k(e-1,r,n-1)])[0],U([k(e-1,r-1,n-1)])[0],d),u=O(U([k(e-1,r,n-0)])[0],U([k(e-1,r-1,n-0)])[0],d),h()),g&&(s=O(U([k(e-0,r-0,n)])[0],U([k(e-0,r-0,n-1)])[0],g),l=O(U([k(e-0,r-1,n)])[0],U([k(e-0,r-1,n-1)])[0],g),c=O(U([k(e-1,r-1,n)])[0],U([k(e-1,r-1,n-1)])[0],g),u=O(U([k(e-1,r-0,n)])[0],U([k(e-1,r-0,n-1)])[0],g),h()),f}function X(t,e,r,n,i,a,o,s,l,c,u,f){var h=t;return f?(d&&\"even\"===t&&(h=null),q(h,e,r,n,i,a,o,s,l,c,u)):(d&&\"odd\"===t&&(h=null),q(h,l,s,o,a,i,n,r,e,c,u))}function Z(t,e,r,n,i){for(var a=[],o=0,s=0;sMath.abs(d-M)?[A,d]:[d,M];$(e,T[0],T[1])}}var L=[[Math.min(S,M),Math.max(S,M)],[Math.min(A,E),Math.max(A,E)]];[\"x\",\"y\",\"z\"].forEach((function(e){for(var r=[],n=0;n0&&(u.push(p.id),\"x\"===e?f.push([p.distRatio,0,0]):\"y\"===e?f.push([0,p.distRatio,0]):f.push([0,0,p.distRatio]))}else c=nt(1,\"x\"===e?b-1:\"y\"===e?_-1:w-1);u.length>0&&(r[i]=\"x\"===e?tt(null,u,a,o,f,r[i]):\"y\"===e?et(null,u,a,o,f,r[i]):rt(null,u,a,o,f,r[i]),i++),c.length>0&&(r[i]=\"x\"===e?Z(null,c,a,o,r[i]):\"y\"===e?J(null,c,a,o,r[i]):K(null,c,a,o,r[i]),i++)}var d=t.caps[e];d.show&&d.fill&&(z(d.fill),r[i]=\"x\"===e?Z(null,[0,b-1],a,o,r[i]):\"y\"===e?J(null,[0,_-1],a,o,r[i]):K(null,[0,w-1],a,o,r[i]),i++)}})),0===m&&P(),t._meshX=n,t._meshY=i,t._meshZ=a,t._meshIntensity=o,t._Xs=v,t._Ys=y,t._Zs=x}(),t}e.exports={findNearestOnAxis:l,generateIsoMeshes:h,createIsosurfaceTrace:function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new c(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}}},{\"../../../stackgl_modules\":1120,\"../../components/colorscale\":378,\"../../lib/gl_format_color\":499,\"../../lib/str2rgbarray\":528,\"../../plots/gl3d/zip3\":609}],865:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"./attributes\"),o=t(\"../../components/colorscale/defaults\");function s(t,e,r,n,a){var s=a(\"isomin\"),l=a(\"isomax\");null!=l&&null!=s&&s>l&&(e.isomin=null,e.isomax=null);var c=a(\"x\"),u=a(\"y\"),f=a(\"z\"),h=a(\"value\");c&&c.length&&u&&u.length&&f&&f.length&&h&&h.length?(i.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\",\"z\"],n),a(\"valuehoverformat\"),[\"x\",\"y\",\"z\"].forEach((function(t){a(t+\"hoverformat\");var e=\"caps.\"+t;a(e+\".show\")&&a(e+\".fill\");var r=\"slices.\"+t;a(r+\".show\")&&(a(r+\".fill\"),a(r+\".locations\"))})),a(\"spaceframe.show\")&&a(\"spaceframe.fill\"),a(\"surface.show\")&&(a(\"surface.count\"),a(\"surface.fill\"),a(\"surface.pattern\")),a(\"contour.show\")&&(a(\"contour.color\"),a(\"contour.width\")),[\"text\",\"hovertext\",\"hovertemplate\",\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lighting.vertexnormalsepsilon\",\"lighting.facenormalsepsilon\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"flatshading\",\"opacity\"].forEach((function(t){a(t)})),o(t,e,n,a,{prefix:\"\",cLetter:\"c\"}),e._length=null):e.visible=!1}e.exports={supplyDefaults:function(t,e,r,i){s(t,e,r,i,(function(r,i){return n.coerce(t,e,a,r,i)}))},supplyIsoDefaults:s}},{\"../../components/colorscale/defaults\":376,\"../../lib\":503,\"../../registry\":638,\"./attributes\":862}],866:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,calc:t(\"./calc\"),colorbar:{min:\"cmin\",max:\"cmax\"},plot:t(\"./convert\").createIsosurfaceTrace,moduleType:\"trace\",name:\"isosurface\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"showLegend\"],meta:{}}},{\"../../plots/gl3d\":598,\"./attributes\":862,\"./calc\":863,\"./convert\":864,\"./defaults\":865}],867:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../surface/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat;e.exports=l({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\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:a({editType:\"calc\"}),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),delaunayaxis:{valType:\"enumerated\",values:[\"x\",\"y\",\"z\"],dflt:\"z\",editType:\"calc\"},alphahull:{valType:\"number\",dflt:-1,editType:\"calc\"},intensity:{valType:\"data_array\",editType:\"calc\"},intensitymode:{valType:\"enumerated\",values:[\"vertex\",\"cell\"],dflt:\"vertex\",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\"}),{opacity:o.opacity,flatshading:{valType:\"boolean\",dflt:!1,editType:\"calc\"},contour:{show:l({},o.contours.x.show,{}),color:o.contours.x.color,width:o.contours.x.width,editType:\"calc\"},lightposition:{x:l({},o.lightposition.x,{dflt:1e5}),y:l({},o.lightposition.y,{dflt:1e5}),z:l({},o.lightposition.z,{dflt:0}),editType:\"calc\"},lighting:l({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\"},o.lighting),hoverinfo:l({},s.hoverinfo,{editType:\"calc\"}),showlegend:l({},s.showlegend,{dflt:!1})})},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633,\"../surface/attributes\":1057}],868:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.intensity&&n(t,e,{vals:e.intensity,containerStr:\"\",cLetter:\"c\"})}},{\"../../components/colorscale/calc\":374}],869:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_mesh3d,i=t(\"../../../stackgl_modules\").delaunay_triangulate,a=t(\"../../../stackgl_modules\").alpha_shape,o=t(\"../../../stackgl_modules\").convex_hull,s=t(\"../../lib/gl_format_color\").parseColorScale,l=t(\"../../lib/str2rgbarray\"),c=t(\"../../components/colorscale\").extractOpts,u=t(\"../../plots/gl3d/zip3\");function f(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name=\"\",this.color=\"#fff\",this.data=null,this.showContour=!1}var h=f.prototype;function p(t){for(var e=[],r=t.length,n=0;n=e-.5)return!1;return!0}h.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.data._cellCenter?t.traceCoordinate=t.data.dataCoordinate:t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},h.update=function(t){var e=this.scene,r=e.fullSceneLayout;this.data=t;var n,f=t.x.length,h=u(d(r.xaxis,t.x,e.dataScale[0],t.xcalendar),d(r.yaxis,t.y,e.dataScale[1],t.ycalendar),d(r.zaxis,t.z,e.dataScale[2],t.zcalendar));if(t.i&&t.j&&t.k){if(t.i.length!==t.j.length||t.j.length!==t.k.length||!m(t.i,f)||!m(t.j,f)||!m(t.k,f))return;n=u(g(t.i),g(t.j),g(t.k))}else n=0===t.alphahull?o(h):t.alphahull>0?a(t.alphahull,h):function(t,e){for(var r=[\"x\",\"y\",\"z\"].indexOf(t),n=[],a=e.length,o=0;ov):m=A>w,v=A;var M=c(w,T,k,A);M.pos=_,M.yc=(w+A)/2,M.i=b,M.dir=m?\"increasing\":\"decreasing\",M.x=M.pos,M.y=[k,T],y&&(M.orig_p=r[b]),d&&(M.tx=e.text[b]),g&&(M.htx=e.hovertext[b]),x.push(M)}else x.push({pos:_,empty:!0})}return e._extremes[l._id]=a.findExtremes(l,n.concat(h,f),{padded:!0}),x.length&&(x[0].t={labels:{open:i(t,\"open:\")+\" \",high:i(t,\"high:\")+\" \",low:i(t,\"low:\")+\" \",close:i(t,\"close:\")+\" \"}}),x}e.exports={calc:function(t,e){var r=a.getFromId(t,e.xaxis),i=a.getFromId(t,e.yaxis),s=function(t,e,r){var i=r._minDiff;if(!i){var a,s=t._fullData,l=[];for(i=1/0,a=0;a\"+c.labels[x]+n.hoverLabelText(s,b,l.yhoverformat):((y=i.extendFlat({},h)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=c.labels[x]+n.hoverLabelText(s,b,l.yhoverformat),y.name=\"\",f.push(y),m[b]=y)}return f}function h(t,e,r,i){var a=t.cd,o=t.ya,l=a[0].trace,f=a[0].t,h=u(t,e,r,i);if(!h)return[];var p=a[h.index],d=h.index=p.i,g=p.dir;function m(t){return f.labels[t]+n.hoverLabelText(o,l[t][d],l.yhoverformat)}var v=p.hi||l.hoverinfo,y=v.split(\"+\"),x=\"all\"===v,b=x||-1!==y.indexOf(\"y\"),_=x||-1!==y.indexOf(\"text\"),w=b?[m(\"open\"),m(\"high\"),m(\"low\"),m(\"close\")+\" \"+c[g]]:[];return _&&s(p,l,w),h.extraText=w.join(\"
\"),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?f(t,e,r,n):h(t,e,r,n)},hoverSplit:f,hoverOnPoints:h}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../constants/delta.js\":473,\"../../lib\":503,\"../../plots/cartesian/axes\":554}],876:[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\":568,\"./attributes\":872,\"./calc\":873,\"./defaults\":874,\"./hover\":875,\"./plot\":878,\"./select\":879,\"./style\":880}],877:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o=r(\"x\"),s=r(\"open\"),l=r(\"high\"),c=r(\"low\"),u=r(\"close\");if(r(\"hoverlabel.split\"),n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\"],a),s&&l&&c&&u){var f=Math.min(s.length,l.length,c.length,u.length);return o&&(f=Math.min(f,i.minRowLength(o))),e._length=f,f}}},{\"../../lib\":503,\"../../registry\":638}],878:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o=e.yaxis,s=e.xaxis,l=!!s.rangebreaks;i.makeTraceGroups(a,r,\"trace ohlc\").each((function(t){var e=n.select(this),r=t[0],a=r.t;if(!0!==r.trace.visible||a.empty)e.remove();else{var c=a.tickLen,u=e.selectAll(\"path\").data(i.identity);u.enter().append(\"path\"),u.exit().remove(),u.attr(\"d\",(function(t){if(t.empty)return\"M0,0Z\";var e=s.c2p(t.pos-c,!0),r=s.c2p(t.pos+c,!0),n=l?(e+r)/2:s.c2p(t.pos,!0);return\"M\"+e+\",\"+o.c2p(t.o,!0)+\"H\"+n+\"M\"+n+\",\"+o.c2p(t.h,!0)+\"V\"+o.c2p(t.l,!0)+\"M\"+r+\",\"+o.c2p(t.c,!0)+\"H\"+n}))}}))}},{\"../../lib\":503,\"@plotly/d3\":58}],879:[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=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;e0;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\"),s(\"line.hovertemplate\");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(\"hovertemplate\"),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 m={family:f.font.family,size:Math.round(f.font.size/1.2),color:f.font.color};n.coerceFont(h,\"tickfont\",m)}},{\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503,\"../../plots/array_container_defaults\":549,\"../../plots/domain\":584,\"../parcoords/merge_length\":897,\"./attributes\":881}],885:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcats\",basePlotModule:t(\"./base_plot\"),categories:[\"noOpacity\"],meta:{}}},{\"./attributes\":881,\"./base_plot\":882,\"./calc\":883,\"./defaults\":884,\"./plot\":887}],886:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-interpolate\").interpolateNumber,a=t(\"../../plot_api/plot_api\"),o=t(\"../../components/fx\"),s=t(\"../../lib\"),l=s.strTranslate,c=t(\"../../components/drawing\"),u=t(\"tinycolor2\"),f=t(\"../../lib/svg_text_utils\");function h(t,e,r,i){var a=t.map(F.bind(0,e,r)),o=i.selectAll(\"g.parcatslayer\").data([null]);o.enter().append(\"g\").attr(\"class\",\"parcatslayer\").style(\"pointer-events\",\"all\");var u=o.selectAll(\"g.trace.parcats\").data(a,p),h=u.enter().append(\"g\").attr(\"class\",\"trace parcats\");u.attr(\"transform\",(function(t){return l(t.x,t.y)})),h.append(\"g\").attr(\"class\",\"paths\");var y=u.select(\"g.paths\").selectAll(\"path.path\").data((function(t){return t.paths}),p);y.attr(\"fill\",(function(t){return t.model.color}));var x=y.enter().append(\"path\").attr(\"class\",\"path\").attr(\"stroke-opacity\",0).attr(\"fill\",(function(t){return t.model.color})).attr(\"fill-opacity\",0);_(x),y.attr(\"d\",(function(t){return t.svgD})),x.empty()||y.sort(g),y.exit().remove(),y.on(\"mouseover\",m).on(\"mouseout\",v).on(\"click\",b),h.append(\"g\").attr(\"class\",\"dimensions\");var w=u.select(\"g.dimensions\").selectAll(\"g.dimension\").data((function(t){return t.dimensions}),p);w.enter().append(\"g\").attr(\"class\",\"dimension\"),w.attr(\"transform\",(function(t){return l(t.x,0)})),w.exit().remove();var A=w.selectAll(\"g.category\").data((function(t){return t.categories}),p),M=A.enter().append(\"g\").attr(\"class\",\"category\");A.attr(\"transform\",(function(t){return l(0,t.y)})),M.append(\"rect\").attr(\"class\",\"catrect\").attr(\"pointer-events\",\"none\"),A.select(\"rect.catrect\").attr(\"fill\",\"none\").attr(\"width\",(function(t){return t.width})).attr(\"height\",(function(t){return t.height})),T(M);var S=A.selectAll(\"rect.bandrect\").data((function(t){return t.bands}),p);S.each((function(){s.raiseToTop(this)})),S.attr(\"fill\",(function(t){return t.color}));var E=S.enter().append(\"rect\").attr(\"class\",\"bandrect\").attr(\"stroke-opacity\",0).attr(\"fill\",(function(t){return t.color})).attr(\"fill-opacity\",0);S.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\"})),k(E),S.exit().remove(),M.append(\"text\").attr(\"class\",\"catlabel\").attr(\"pointer-events\",\"none\");var z=e._fullLayout.paper_bgcolor;A.select(\"text.catlabel\").attr(\"text-anchor\",(function(t){return d(t)?\"start\":\"end\"})).attr(\"alignment-baseline\",\"middle\").style(\"text-shadow\",f.makeTextShadow(z)).style(\"fill\",\"rgb(0, 0, 0)\").attr(\"x\",(function(t){return d(t)?t.width+5:-5})).attr(\"y\",(function(t){return t.height/2})).text((function(t){return t.model.categoryLabel})).each((function(t){c.font(n.select(this),t.parcatsViewModel.categorylabelfont),f.convertToTspans(n.select(this),e)})),M.append(\"text\").attr(\"class\",\"dimlabel\"),A.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){c.font(n.select(this),t.parcatsViewModel.labelfont)})),A.selectAll(\"rect.bandrect\").on(\"mouseover\",L).on(\"mouseout\",C),A.exit().remove(),w.call(n.behavior.drag().origin((function(t){return{x:t.x,y:0}})).on(\"dragstart\",P).on(\"drag\",I).on(\"dragend\",O)),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 p(t){return t.key}function d(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function g(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor\"),L=n.mouse(f)[0];o.loneHover({trace:h,x:b-d.left+g.left,y:_-d.top+g.top,text:E,color:t.model.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:10,fontColor:T,idealAlign:L1&&h.displayInd===f.dimensions.length-1?(i=c.left,a=\"left\"):(i=c.left+c.width,a=\"right\");var g=u.model.count,m=u.model.categoryLabel,v=g/u.parcatsViewModel.model.count,y={countLabel:g,categoryLabel:m,probabilityLabel:v.toFixed(3)},x=[];-1!==u.parcatsViewModel.hoverinfoItems.indexOf(\"count\")&&x.push([\"Count:\",y.countLabel].join(\" \")),-1!==u.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")&&x.push([\"P(\"+y.categoryLabel+\"):\",y.probabilityLabel].join(\" \"));var b=x.join(\"
\");return{trace:p,x:o*(i-e.left),y:s*(d-e.top),text:b,color:\"lightgray\",borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:12,fontColor:\"black\",idealAlign:a,hovertemplate:p.hovertemplate,hovertemplateLabels:y,eventData:[{data:p._input,fullData:p,count:g,category:m,probability:v}]}}function L(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,a=i._paperdiv.node().getBoundingClientRect(),l=t.parcatsViewModel.hoveron;if(\"color\"===l?(!function(t){var e=n.select(t).datum(),r=A(e);w(r),r.each((function(){s.raiseToTop(this)})),n.select(t.parentNode).selectAll(\"rect.bandrect\").filter((function(t){return t.color===e.color})).each((function(){s.raiseToTop(this),n.select(this).attr(\"stroke\",\"black\").attr(\"stroke-width\",1.5)}))}(this),S(this,\"plotly_hover\",n.event)):(!function(t){n.select(t.parentNode).selectAll(\"rect.bandrect\").each((function(t){var e=A(t);w(e),e.each((function(){s.raiseToTop(this)}))})),n.select(t.parentNode).select(\"rect.catrect\").attr(\"stroke\",\"black\").attr(\"stroke-width\",2.5)}(this),M(this,\"plotly_hover\",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf(\"none\"))\"category\"===l?e=E(r,a,this):\"color\"===l?e=function(t,e,r){t._fullLayout._calcInverseTransform(t);var i,a,o=t._fullLayout._invScaleX,s=t._fullLayout._invScaleY,l=r.getBoundingClientRect(),c=n.select(r).datum(),f=c.categoryViewModel,h=f.parcatsViewModel,p=h.model.dimensions[f.model.dimensionInd],d=h.trace,g=l.y+l.height/2;h.dimensions.length>1&&p.displayInd===h.dimensions.length-1?(i=l.left,a=\"left\"):(i=l.left+l.width,a=\"right\");var m=f.model.categoryLabel,v=c.parcatsViewModel.model.count,y=0;c.categoryViewModel.bands.forEach((function(t){t.color===c.color&&(y+=t.count)}));var x=f.model.count,b=0;h.pathSelection.each((function(t){t.model.color===c.color&&(b+=t.model.count)}));var _=y/v,w=y/b,T=y/x,k={countLabel:v,categoryLabel:m,probabilityLabel:_.toFixed(3)},A=[];-1!==f.parcatsViewModel.hoverinfoItems.indexOf(\"count\")&&A.push([\"Count:\",k.countLabel].join(\" \")),-1!==f.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")&&(A.push(\"P(color \\u2229 \"+m+\"): \"+k.probabilityLabel),A.push(\"P(\"+m+\" | color): \"+w.toFixed(3)),A.push(\"P(color | \"+m+\"): \"+T.toFixed(3)));var M=A.join(\"
\"),S=u.mostReadable(c.color,[\"black\",\"white\"]);return{trace:d,x:o*(i-e.left),y:s*(g-e.top),text:M,color:c.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontColor:S,fontSize:10,idealAlign:a,hovertemplate:d.hovertemplate,hovertemplateLabels:k,eventData:[{data:d._input,fullData:d,category:m,count:v,probability:_,categorycount:x,colorcount:b,bandcolorcount:y}]}}(r,a,this):\"dimension\"===l&&(e=function(t,e,r){var i=[];return n.select(r.parentNode.parentNode).selectAll(\"g.category\").select(\"rect.catrect\").each((function(){i.push(E(t,e,this))})),i}(r,a,this)),e&&o.loneHover(e,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r})}}function C(t){var e=t.parcatsViewModel;if(!e.dragDimension&&(_(e.pathSelection),T(e.dimensionSelection.selectAll(\"g.category\")),k(e.dimensionSelection.selectAll(\"g.category\").selectAll(\"rect.bandrect\")),o.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(g),-1===e.hoverinfoItems.indexOf(\"skip\"))){\"color\"===t.parcatsViewModel.hoveron?S(this,\"plotly_unhover\",n.event):M(this,\"plotly_unhover\",n.event)}}function P(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,s.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll(\"rect.bandrect\").each((function(e){e.yf.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.dragXp.x&&(a.model.displayInd=p.model.displayInd,p.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=a.model.displayInd}j(t.parcatsViewModel),N(t.parcatsViewModel),R(t.parcatsViewModel),D(t.parcatsViewModel)}}function O(t){if(\"fixed\"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll(\"text\").attr(\"font-weight\",\"normal\");var e={},r=z(t.parcatsViewModel),i=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),o=t.initialDragDimensionDisplayInds.some((function(t,e){return t!==i[e]}));o&&i.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?S(t.potentialClickBand,\"plotly_click\",n.event.sourceEvent):M(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,j(t.parcatsViewModel),N(t.parcatsViewModel),n.transition().duration(300).ease(\"cubic-in-out\").each((function(){R(t.parcatsViewModel,!0),D(t.parcatsViewModel,!0)})).each(\"end\",(function(){(o||s)&&a.restyle(t.parcatsViewModel.graphDiv,e,[r])}))}}function z(t){for(var e,r=t.graphDiv._fullData,n=0;n=0;s--)u+=\"C\"+c[s]+\",\"+(e[s+1]+n)+\" \"+l[s]+\",\"+(e[s]+n)+\" \"+(t[s]+r[s])+\",\"+(e[s]+n),u+=\"l-\"+r[s]+\",0 \";return u+=\"Z\"}function N(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)),ni?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;g0?d*(v.count/p):0;for(var y,x=new Array(n.length),b=0;b1?(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,m=e.categories.map((function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}}));for(m.sort((function(t,e){return t.displayInd-e.displayInd})),c=0;c0?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){h(r,t,n,e)}},{\"../../components/drawing\":388,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plot_api/plot_api\":540,\"@plotly/d3\":58,\"d3-interpolate\":116,tinycolor2:312}],887:[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\":886}],888:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/layout_attributes\"),a=t(\"../../plots/font_attributes\"),o=t(\"../../plots/domain\").attributes,s=t(\"../../lib/extend\").extendFlat,l=t(\"../../plot_api/plot_template\").templatedArray;e.exports={domain:o({name:\"parcoords\",trace:!0,editType:\"plot\"}),labelangle:{valType:\"angle\",dflt:0,editType:\"plot\"},labelside:{valType:\"enumerated\",values:[\"top\",\"bottom\"],dflt:\"top\",editType:\"plot\"},labelfont:a({editType:\"plot\"}),tickfont:a({editType:\"plot\"}),rangefont:a({editType:\"plot\"}),dimensions:l(\"dimension\",{label:{valType:\"string\",editType:\"plot\"},tickvals:s({},i.tickvals,{editType:\"plot\"}),ticktext:s({},i.ticktext,{editType:\"plot\"}),tickformat:s({},i.tickformat,{editType:\"plot\"}),visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},range:{valType:\"info_array\",items:[{valType:\"number\",editType:\"plot\"},{valType:\"number\",editType:\"plot\"}],editType:\"plot\"},constraintrange:{valType:\"info_array\",freeLength:!0,dimensions:\"1-2\",items:[{valType:\"any\",editType:\"plot\"},{valType:\"any\",editType:\"plot\"}],editType:\"plot\"},multiselect:{valType:\"boolean\",dflt:!0,editType:\"plot\"},values:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\"}),line:s({editType:\"calc\"},n(\"line\",{colorscaleDflt:\"Viridis\",autoColorDflt:!1,editTypeOverride:\"calc\"}))}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/plot_template\":543,\"../../plots/cartesian/layout_attributes\":569,\"../../plots/domain\":584,\"../../plots/font_attributes\":585}],889:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"@plotly/d3\"),a=t(\"../../lib/gup\").keyFun,o=t(\"../../lib/gup\").repeat,s=t(\"../../lib\").sorterAsc,l=t(\"../../lib\").strTranslate,c=n.bar.snapRatio;function u(t,e){return t*(1-c)+e*c}var f=n.bar.snapClose;function h(t,e){return t*(1-f)+e*f}function p(t,e,r,n){if(function(t,e){for(var r=0;r=e[r][0]&&t<=e[r][1])return!0;return!1}(r,n))return r;var i=t?-1:1,a=0,o=e.length-1;if(i<0){var s=a;a=o,o=s}for(var l=e[a],c=l,f=a;i*fe){h=r;break}}if(a=u,isNaN(a)&&(a=isNaN(f)||isNaN(h)?isNaN(f)?h:f:e-c[f][1]t[1]+r||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 m=t.unitTickvals,y=t.unitToPaddedPx.invert(e);for(r=0;r=x[0]&&y<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function w(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[r-a.grabPoint,r+a.barLength-a.grabPoint].map(e.unitToPaddedPx.invert):a.newExtent=[a.startExtent,e.unitToPaddedPx.invert(r)].sort(s),e.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(e),b(t.parentNode)}function T(t,e){var r=_(e,e.height-i.mouse(t)[1]-2*n.verticalPadding),a=\"crosshair\";r.clickableOrdinalRange?a=\"pointer\":r.region&&(a=r.region+\"-resize\"),i.select(document.body).style(\"cursor\",a)}function k(t){t.on(\"mousemove\",(function(t){i.event.preventDefault(),t.parent.inBrushDrag||T(this,t)})).on(\"mouseleave\",(function(t){t.parent.inBrushDrag||y()})).call(i.behavior.drag().on(\"dragstart\",(function(t){!function(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.unitToPaddedPx.invert(r),o=e.brush,s=_(e,r),l=s.interval,c=o.svgBrush;if(c.wasDragged=!1,c.grabbingBar=\"ns\"===s.region,c.grabbingBar){var u=l.map(e.unitToPaddedPx);c.grabPoint=r-u[0]-n.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=e.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter((function(t){return t[0]!==l[0]&&t[1]!==l[1]}))),c.startExtent=s.region?l[\"s\"===s.region?1:0]:a,e.parent.inBrushDrag=!0,c.brushStartCallback()}(this,t)})).on(\"drag\",(function(t){w(this,t)})).on(\"dragend\",(function(t){!function(t,e){var r=e.brush,n=r.filter,a=r.svgBrush;a._dragging||(T(t,e),w(t,e),e.brush.svgBrush.wasDragged=!1),a._dragging=!1,i.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,e.parent.inBrushDrag=!1,y(),!a.wasDragged)return a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&e.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&M(r)):M(r),a.brushCallback(e),b(t.parentNode),void a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(e.ordinal){var l=e.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(c?[a.newExtent]:[]),a.extent.length||M(r),a.brushCallback(e),c?b(t.parentNode,s):(s(),b(t.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,t)})))}function A(t,e){return t[0]-e[0]}function M(t){t.filterSpecified=!1,t.svgBrush.extent=[[-1/0,1/0]]}function S(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 1===n.length&&n[0][0]>n[0][1]&&(n=[]),n}e.exports={makeBrush:function(t,e,r,n,i,a){var o,l=function(){var t,e,r=[];return{set:function(n){1===(r=n.map((function(t){return t.slice().sort(s)})).sort(A)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),t=S(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,e){var r=t.selectAll(\".\"+n.cn.axisBrush).data(o,a);r.enter().append(\"g\").classed(n.cn.axisBrush,!0),function(t,e){var r=t.selectAll(\".background\").data(o);r.enter().append(\"rect\").classed(\"background\",!0).call(d).call(g).style(\"pointer-events\",\"auto\").attr(\"transform\",l(0,n.verticalPadding)),r.call(k).attr(\"height\",(function(t){return t.height-n.verticalPadding}));var i=t.selectAll(\".highlight-shadow\").data(o);i.enter().append(\"line\").classed(\"highlight-shadow\",!0).attr(\"x\",-n.bar.width/2).attr(\"stroke-width\",n.bar.width+n.bar.strokeWidth).attr(\"stroke\",e).attr(\"opacity\",n.bar.strokeOpacity).attr(\"stroke-linecap\",\"butt\"),i.attr(\"y1\",(function(t){return t.height})).call(x);var a=t.selectAll(\".highlight\").data(o);a.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\"),a.attr(\"y1\",(function(t){return t.height})).call(x)}(r,e)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map((function(t){return t.sort(s)})),t=e.multiselect?S(t.sort(A)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map((function(t){var e=[p(0,r,t[0],[]),p(1,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\":503,\"../../lib/gup\":500,\"./constants\":892,\"@plotly/d3\":58}],890:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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.style.width,height:this.style.height})})),window.setTimeout((function(){n.selectAll(\"#filterBarPattern\").attr(\"id\",\"filterBarPattern\")}),60)}},{\"../../constants/xmlns_namespaces\":480,\"../../plots/get_data\":593,\"./plot\":899,\"@plotly/d3\":58}],891:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray,i=t(\"../../components/colorscale\"),a=t(\"../../lib/gup\").wrap;e.exports=function(t,e){var r,o;return i.hasColorscale(e,\"line\")&&n(e.line.color)?(r=e.line.color,o=i.extractOpts(e.line).colorscale,i.calc(t,e,{vals:r,containerStr:\"line\",cLetter:\"c\"})):(r=function(t){for(var e=new Array(t),r=0;rf&&(n.log(\"parcoords traces support up to \"+f+\" dimensions at the moment\"),d.splice(f));var g=s(t,e,{name:\"dimensions\",layout:l,handleItemDefaults:p}),m=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,l,u);o(e,l,u),Array.isArray(g)&&g.length||(e.visible=!1),h(e,g,\"values\",m);var v={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(u,\"labelfont\",v),n.coerceFont(u,\"tickfont\",v),n.coerceFont(u,\"rangefont\",v),u(\"labelangle\"),u(\"labelside\")}},{\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503,\"../../plots/array_container_defaults\":549,\"../../plots/cartesian/axes\":554,\"../../plots/domain\":584,\"./attributes\":888,\"./axisbrush\":889,\"./constants\":892,\"./merge_length\":897}],894:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isTypedArray;r.convertTypedArray=function(t){return n(t)?Array.prototype.slice.call(t):t},r.isOrdinal=function(t){return!!t.tickvals},r.isVisible=function(t){return t.visible||!(\"visible\"in t)}},{\"../../lib\":503}],895:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcoords\",basePlotModule:t(\"./base_plot\"),categories:[\"gl\",\"regl\",\"noOpacity\",\"noHover\"],meta:{}}},{\"./attributes\":888,\"./base_plot\":890,\"./calc\":891,\"./defaults\":893,\"./plot\":899}],896:[function(t,e,r){\"use strict\";var n=t(\"glslify\"),i=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nattribute vec4 p01_04, p05_08, p09_12, p13_16,\\n p17_20, p21_24, p25_28, p29_32,\\n p33_36, p37_40, p41_44, p45_48,\\n p49_52, p53_56, p57_60, colors;\\n\\nuniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,\\n loA, hiA, loB, hiB, loC, hiC, loD, hiD;\\n\\nuniform vec2 resolution, viewBoxPos, viewBoxSize;\\nuniform float maskHeight;\\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\\nuniform vec4 contextColor;\\nuniform sampler2D maskTexture, palette;\\n\\nbool isPick = (drwLayer > 1.5);\\nbool isContext = (drwLayer < 0.5);\\n\\nconst vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);\\nconst vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);\\n\\nfloat val(mat4 p, mat4 v) {\\n return dot(matrixCompMult(p, v) * UNITS, UNITS);\\n}\\n\\nfloat axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {\\n float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);\\n float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);\\n return y1 * (1.0 - ratio) + y2 * ratio;\\n}\\n\\nint iMod(int a, int b) {\\n return a - b * (a / b);\\n}\\n\\nbool fOutside(float p, float lo, float hi) {\\n return (lo < hi) && (lo > p || p > hi);\\n}\\n\\nbool vOutside(vec4 p, vec4 lo, vec4 hi) {\\n return (\\n fOutside(p[0], lo[0], hi[0]) ||\\n fOutside(p[1], lo[1], hi[1]) ||\\n fOutside(p[2], lo[2], hi[2]) ||\\n fOutside(p[3], lo[3], hi[3])\\n );\\n}\\n\\nbool mOutside(mat4 p, mat4 lo, mat4 hi) {\\n return (\\n vOutside(p[0], lo[0], hi[0]) ||\\n vOutside(p[1], lo[1], hi[1]) ||\\n vOutside(p[2], lo[2], hi[2]) ||\\n vOutside(p[3], lo[3], hi[3])\\n );\\n}\\n\\nbool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {\\n return mOutside(A, loA, hiA) ||\\n mOutside(B, loB, hiB) ||\\n mOutside(C, loC, hiC) ||\\n mOutside(D, loD, hiD);\\n}\\n\\nbool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {\\n mat4 pnts[4];\\n pnts[0] = A;\\n pnts[1] = B;\\n pnts[2] = C;\\n pnts[3] = D;\\n\\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 if(0 == iMod(\\n int(255.0 * texture2D(maskTexture,\\n vec2(\\n (float(i * 2 + j / 2) + 0.5) / 8.0,\\n (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight\\n ))[3]\\n ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),\\n 2\\n )) return true;\\n }\\n }\\n }\\n return false;\\n}\\n\\nvec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {\\n float x = 0.5 * sign(v) + 0.5;\\n float y = axisY(x, A, B, C, D);\\n float z = 1.0 - abs(v);\\n\\n z += isContext ? 0.0 : 2.0 * float(\\n outsideBoundingBox(A, B, C, D) ||\\n outsideRasterMask(A, B, C, D)\\n );\\n\\n return vec4(\\n 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,\\n z,\\n 1.0\\n );\\n}\\n\\nvoid main() {\\n mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);\\n mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);\\n mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);\\n mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);\\n\\n float v = colors[3];\\n\\n gl_Position = position(isContext, v, A, B, C, D);\\n\\n fragColor =\\n isContext ? vec4(contextColor) :\\n isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));\\n}\\n\"]),a=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n gl_FragColor = fragColor;\\n}\\n\"]),o=t(\"./constants\").maxDimensionCount,s=t(\"../../lib\"),l=new Uint8Array(4),c=new Uint8Array(4),u={shape:[256,1],format:\"rgba\",type:\"uint8\",mag:\"nearest\",min:\"nearest\"};function f(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 h(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:l})}(t),r.drawCompleted=!0),function s(l){var c=Math.min(n,i-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],f(t,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),r.clearOnly||(a.count=2*c,a.offset=2*l*n,e(a),l*n+c>>8*e)%256/255}function g(t,e,r){for(var n=new Array(8*e),i=0,a=0;au&&(u=t[i].dim1.canvasX,o=i);0===s&&f(T,0,0,r.canvasWidth,r.canvasHeight);var p=function(t){var e,r,n,i=[[],[]];for(n=0;n<64;n++){var a=!t&&no._length&&(S=S.slice(0,o._length));var L,C=o.tickvals;function P(t,e){return{val:t,text:L[e]}}function I(t,e){return t.val-e.val}if(Array.isArray(C)&&C.length){L=o.ticktext,Array.isArray(L)&&L.length?L.length>C.length?L=L.slice(0,C.length):C.length>L.length&&(C=C.slice(0,L.length)):L=C.map(a(o.tickformat));for(var O=1;O=r||l>=i)return;var c=t.lineLayer.readPixel(s,i-1-l),u=0!==c[3],f=u?c[2]+256*(c[1]+256*c[0]):null,h={x:s,y:l,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:f};f!==B&&(u?a.hover(h):a.unhover&&a.unhover(h),B=f)}})),F.style(\"opacity\",(function(t){return t.pick?0:1})),h.style(\"background\",\"rgba(255, 255, 255, 0)\");var N=h.selectAll(\".\"+y.cn.parcoords).data(R,d);N.exit().remove(),N.enter().append(\"g\").classed(y.cn.parcoords,!0).style(\"shape-rendering\",\"crispEdges\").style(\"pointer-events\",\"none\"),N.attr(\"transform\",(function(t){return c(t.model.translateX,t.model.translateY)}));var j=N.selectAll(\".\"+y.cn.parcoordsControlView).data(g,d);j.enter().append(\"g\").classed(y.cn.parcoordsControlView,!0),j.attr(\"transform\",(function(t){return c(t.model.pad.l,t.model.pad.t)}));var U=j.selectAll(\".\"+y.cn.yAxis).data((function(t){return t.dimensions}),d);U.enter().append(\"g\").classed(y.cn.yAxis,!0),j.each((function(t){O(U,t,_)})),F.each((function(t){if(t.viewModel){!t.lineLayer||a?t.lineLayer=b(this,t):t.lineLayer.update(t),(t.key||0===t.key)&&(t.viewModel[t.key]=t.lineLayer);var e=!t.context||a;t.lineLayer.render(t.viewModel.panels,e)}})),U.attr(\"transform\",(function(t){return c(t.xScale(t.xIndex),0)})),U.call(n.behavior.drag().origin((function(t){return t})).on(\"drag\",(function(t){var e=t.parent;S.linePickActive(!1),t.x=Math.max(-y.overdrag,Math.min(t.model.width+y.overdrag,n.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,U.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})),O(U,e,_),U.filter((function(e){return 0!==Math.abs(t.xIndex-e.xIndex)})).attr(\"transform\",(function(t){return c(t.xScale(t.xIndex),0)})),n.select(this).attr(\"transform\",c(t.x,0)),U.each((function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!E(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,O(U,e,_),n.select(this).attr(\"transform\",(function(t){return c(t.x,0)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!E(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),S.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(e.key,e.dimensions.map((function(t){return t.crossfilterDimensionIndex})))}))),U.exit().remove();var V=U.selectAll(\".\"+y.cn.axisOverlays).data(g,d);V.enter().append(\"g\").classed(y.cn.axisOverlays,!0),V.selectAll(\".\"+y.cn.axis).remove();var H=V.selectAll(\".\"+y.cn.axis).data(g,d);H.enter().append(\"g\").classed(y.cn.axis,!0),H.each((function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,i=r.domain();n.select(this).call(n.svg.axis().orient(\"left\").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?i:null).tickFormat((function(e){return v.isOrdinal(t)?e:z(t.model.dimensions[t.visibleIndex],e)})).scale(r)),f.font(H.selectAll(\"text\"),t.model.tickFont)})),H.selectAll(\".domain, .tick>line\").attr(\"fill\",\"none\").attr(\"stroke\",\"black\").attr(\"stroke-opacity\",.25).attr(\"stroke-width\",\"1px\"),H.selectAll(\"text\").style(\"text-shadow\",u.makeTextShadow(T)).style(\"cursor\",\"default\");var q=V.selectAll(\".\"+y.cn.axisHeading).data(g,d);q.enter().append(\"g\").classed(y.cn.axisHeading,!0);var G=q.selectAll(\".\"+y.cn.axisTitle).data(g,d);G.enter().append(\"text\").classed(y.cn.axisTitle,!0).attr(\"text-anchor\",\"middle\").style(\"cursor\",\"ew-resize\").style(\"pointer-events\",\"auto\"),G.text((function(t){return t.label})).each((function(e){var r=n.select(this);f.font(r,e.model.labelFont),u.convertToTspans(r,t)})).attr(\"transform\",(function(t){var e=I(t.model.labelAngle,t.model.labelSide),r=y.axisTitleOffset;return(e.dir>0?\"\":c(0,2*r+t.model.height))+l(e.degrees)+c(-r*e.dx,-r*e.dy)})).attr(\"text-anchor\",(function(t){var e=I(t.model.labelAngle,t.model.labelSide);return 2*Math.abs(e.dx)>Math.abs(e.dy)?e.dir*e.dx<0?\"start\":\"end\":\"middle\"}));var Y=V.selectAll(\".\"+y.cn.axisExtent).data(g,d);Y.enter().append(\"g\").classed(y.cn.axisExtent,!0);var W=Y.selectAll(\".\"+y.cn.axisExtentTop).data(g,d);W.enter().append(\"g\").classed(y.cn.axisExtentTop,!0),W.attr(\"transform\",c(0,-y.axisExtentOffset));var X=W.selectAll(\".\"+y.cn.axisExtentTopText).data(g,d);X.enter().append(\"text\").classed(y.cn.axisExtentTopText,!0).call(P),X.text((function(t){return D(t,!0)})).each((function(t){f.font(n.select(this),t.model.rangeFont)}));var Z=Y.selectAll(\".\"+y.cn.axisExtentBottom).data(g,d);Z.enter().append(\"g\").classed(y.cn.axisExtentBottom,!0),Z.attr(\"transform\",(function(t){return c(0,t.model.height+y.axisExtentOffset)}));var J=Z.selectAll(\".\"+y.cn.axisExtentBottomText).data(g,d);J.enter().append(\"text\").classed(y.cn.axisExtentBottomText,!0).attr(\"dy\",\"0.75em\").call(P),J.text((function(t){return D(t,!1)})).each((function(t){f.font(n.select(this),t.model.rangeFont)})),x.ensureAxisBrush(V,T)}},{\"../../components/colorscale\":378,\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/gup\":500,\"../../lib/svg_text_utils\":529,\"../../plots/cartesian/axes\":554,\"./axisbrush\":889,\"./constants\":892,\"./helpers\":894,\"./lines\":896,\"@plotly/d3\":58,\"color-rgba\":91}],899:[function(t,e,r){\"use strict\";var n=t(\"./parcoords\"),i=t(\"../../lib/prepare_regl\"),a=t(\"./helpers\").isVisible;function o(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return-1===i&&(i+=e.length),i}e.exports=function(t,e){var r=t._fullLayout;if(i(t)){var s={},l={},c={},u={},f=r._size;e.forEach((function(e,r){var n=e[0].trace;c[r]=n.index;var i=u[r]=n._fullInput.index;s[r]=t.data[i].dimensions,l[r]=t.data[i].dimensions.slice()}));n(t,e,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{filterChanged:function(e,n,i){var a=l[e][n],o=i.map((function(t){return t.slice()})),s=\"dimensions[\"+n+\"].constraintrange\",f=r._tracePreGUI[t._fullData[c[e]]._fullInput.uid];if(void 0===f[s]){var h=a.constraintrange;f[s]=h||null}var p=t._fullData[c[e]].dimensions[n];o.length?(1===o.length&&(o=o[0]),a.constraintrange=o,p.constraintrange=o.slice(),o=[o]):(delete a.constraintrange,delete p.constraintrange,o=null);var d={};d[s]=o,t.emit(\"plotly_restyle\",[d,[u[e]]])},hover:function(e){t.emit(\"plotly_hover\",e)},unhover:function(e){t.emit(\"plotly_unhover\",e)},axesMoved:function(e,r){var n=function(t,e){return function(r,n){return o(t,e,r)-o(t,e,n)}}(r,l[e].filter(a));s[e].sort(n),l[e].filter((function(t){return!a(t)})).sort((function(t){return l[e].indexOf(t)})).forEach((function(t){s[e].splice(s[e].indexOf(t),1),s[e].splice(l[e].indexOf(t),0,t)})),t.emit(\"plotly_restyle\",[{dimensions:[s[e]]},[u[e]]])}})}}},{\"../../lib/prepare_regl\":516,\"./helpers\":894,\"./parcoords\":898}],900:[function(t,e,r){\"use strict\";var n=t(\"../../plots/attributes\"),i=t(\"../../plots/domain\").attributes,a=t(\"../../plots/font_attributes\"),o=t(\"../../components/color/attributes\"),s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../plots/template_attributes\").texttemplateAttrs,c=t(\"../../lib/extend\").extendFlat,u=a({editType:\"plot\",arrayOk:!0,colorEditType:\"plot\"});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:o.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:\"plot\"},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:c({},n.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:s({},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),texttemplate:l({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),textposition:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"auto\",\"none\"],dflt:\"auto\",arrayOk:!0,editType:\"plot\"},textfont:c({},u,{}),insidetextorientation:{valType:\"enumerated\",values:[\"horizontal\",\"radial\",\"tangential\",\"auto\"],dflt:\"auto\",editType:\"plot\"},insidetextfont:c({},u,{}),outsidetextfont:c({},u,{}),automargin:{valType:\"boolean\",dflt:!1,editType:\"plot\"},title:{text:{valType:\"string\",dflt:\"\",editType:\"plot\"},font:c({},u,{}),position:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle center\",\"bottom left\",\"bottom center\",\"bottom right\"],editType:\"plot\"},editType:\"plot\"},domain:i({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\"},_deprecated:{title:{valType:\"string\",dflt:\"\",editType:\"calc\"},titlefont:c({},u,{}),titleposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle center\",\"bottom left\",\"bottom center\",\"bottom right\"],editType:\"calc\"}}}},{\"../../components/color/attributes\":365,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/domain\":584,\"../../plots/font_attributes\":585,\"../../plots/template_attributes\":633}],901:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"pie\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":619}],902:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"tinycolor2\"),a=t(\"../../components/color\"),o={};function s(t){return function(e,r){return!!e&&(!!(e=i(e)).isValid()&&(e=a.addOpacity(e,e.getAlpha()),t[r]||(t[r]=e),e))}}function l(t,e){var r,n=JSON.stringify(t),a=e[n];if(!a){for(a=t.slice(),r=0;r=0})),(\"funnelarea\"===e.type?v:e.sort)&&a.sort((function(t,e){return e.v-t.v})),a[0]&&(a[0].vTotal=m),a},crossTraceCalc:function(t,e){var r=(e||{}).type;r||(r=\"pie\");var n=t._fullLayout,i=t.calcdata,a=n[r+\"colorway\"],s=n[\"_\"+r+\"colormap\"];n[\"extend\"+r+\"colors\"]&&(a=l(a,o));for(var c=0,u=0;u0){s=!0;break}}s||(o=0)}return{hasLabels:r,hasValues:a,len:o}}e.exports={handleLabelsAndValues:l,supplyDefaults:function(t,e,r,n){function c(r,n){return i.coerce(t,e,a,r,n)}var u=l(c(\"labels\"),c(\"values\")),f=u.len;if(e._hasLabels=u.hasLabels,e._hasValues=u.hasValues,!e._hasLabels&&e._hasValues&&(c(\"label0\"),c(\"dlabel\")),f){e._length=f,c(\"marker.line.width\")&&c(\"marker.line.color\"),c(\"marker.colors\"),c(\"scalegroup\");var h,p=c(\"text\"),d=c(\"texttemplate\");if(d||(h=c(\"textinfo\",Array.isArray(p)?\"text+percent\":\"percent\")),c(\"hovertext\"),c(\"hovertemplate\"),d||h&&\"none\"!==h){var g=c(\"textposition\");s(t,e,n,c,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||\"auto\"===g||\"outside\"===g)&&c(\"automargin\"),(\"inside\"===g||\"auto\"===g||Array.isArray(g))&&c(\"insidetextorientation\")}o(e,n,c);var m=c(\"hole\");if(c(\"title.text\")){var v=c(\"title.position\",m?\"middle center\":\"top center\");m||\"middle center\"!==v||(e.title.position=\"top center\"),i.coerceFont(c,\"title.font\",n.font)}c(\"sort\"),c(\"direction\"),c(\"rotation\"),c(\"pull\")}else e.visible=!1}}},{\"../../lib\":503,\"../../plots/domain\":584,\"../bar/defaults\":652,\"./attributes\":900,\"fast-isnumeric\":190}],904:[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,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return 1===t.pts.length&&(r.pointNumber=r.i=t.pts[0]),n(r,e,t.pts),\"funnelarea\"===e.type&&(delete r.v,delete r.i),r}},{\"../../components/fx/helpers\":402}],905:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");function i(t){return-1!==t.indexOf(\"e\")?t.replace(/[.]?0+e/,\"e\"):-1!==t.indexOf(\".\")?t.replace(/[.]?0+$/,\"\"):t}r.formatPiePercent=function(t,e){var r=i((100*t).toPrecision(3));return n.numSeparate(r,e)+\"%\"},r.formatPieValue=function(t,e){var r=i(t.toPrecision(10));return n.numSeparate(r,e)},r.getFirstFilled=function(t,e){if(Array.isArray(t))for(var r=0;r\"),name:f.hovertemplate||-1!==h.indexOf(\"name\")?f.name:void 0,idealAlign:t.pxmid[0]<0?\"left\":\"right\",color:m.castOption(_.bgcolor,t.pts)||t.color,borderColor:m.castOption(_.bordercolor,t.pts),fontFamily:m.castOption(w.family,t.pts),fontSize:m.castOption(w.size,t.pts),fontColor:m.castOption(w.color,t.pts),nameLength:m.castOption(_.namelength,t.pts),textAlign:m.castOption(_.align,t.pts),hovertemplate:m.castOption(f.hovertemplate,t.pts),hovertemplateLabels:t,eventData:[v(t,f)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e,inOut_bbox:T}),t.bbox=T[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,e.emit(\"plotly_hover\",{points:[v(t,f)],event:n.event})}})),t.on(\"mouseout\",(function(t){var r=e._fullLayout,i=e._fullData[c.index],o=n.select(this).datum();c._hasHoverEvent&&(t.originalEvent=n.event,e.emit(\"plotly_unhover\",{points:[v(o,i)],event:n.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(a.loneUnhover(r._hoverlayer.node()),c._hasHoverLabel=!1)})),t.on(\"click\",(function(t){var r=e._fullLayout,i=e._fullData[c.index];e._dragging||!1===r.hovermode||(e._hoverdata=[v(t,i)],a.click(e,n.event))}))}function b(t,e,r){var n=m.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=m.castOption(t._input.textfont.color,e.pts));var i=m.castOption(t.insidetextfont.family,e.pts)||m.castOption(t.textfont.family,e.pts)||r.family,a=m.castOption(t.insidetextfont.size,e.pts)||m.castOption(t.textfont.size,e.pts)||r.size;return{color:n||o.contrast(e.color),family:i,size:a}}function _(t,e){for(var r,n,i=0;ie&&e>n||r=-4;m-=2)v(Math.PI*m,\"tan\");for(m=4;m>=-4;m-=2)v(Math.PI*(m+1),\"tan\")}if(f||p){for(m=4;m>=-4;m-=2)v(Math.PI*(m+1.5),\"rad\");for(m=4;m>=-4;m-=2)v(Math.PI*(m+.5),\"rad\")}}if(s||d||f){var y=Math.sqrt(t.width*t.width+t.height*t.height);if((a={scale:i*n*2/y,rCenter:1-i,rotate:0}).textPosAngle=(e.startangle+e.stopangle)/2,a.scale>=1)return a;g.push(a)}(d||p)&&((a=T(t,n,o,l,c)).textPosAngle=(e.startangle+e.stopangle)/2,g.push(a)),(d||h)&&((a=k(t,n,o,l,c)).textPosAngle=(e.startangle+e.stopangle)/2,g.push(a));for(var x=0,b=0,_=0;_=1)break}return g[x]}function T(t,e,r,n,i){e=Math.max(0,e-2*g);var a=t.width/t.height,o=S(a,n,e,r);return{scale:2*o/t.height,rCenter:A(a,o/e),rotate:M(i)}}function k(t,e,r,n,i){e=Math.max(0,e-2*g);var a=t.height/t.width,o=S(a,n,e,r);return{scale:2*o/t.width,rCenter:A(a,o/e),rotate:M(i+Math.PI/2)}}function A(t,e){return Math.cos(e)-t*e}function M(t){return(180/Math.PI*t+720)%180-90}function S(t,e,r,n){var i=t+1/(2*Math.tan(e));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(t*t+n/2)+t))}function E(t,e){return t.v!==e.vTotal||e.trace.hole?Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2):1}function L(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 C(t,e){var r,n,i,a=t.trace,o={x:t.cx,y:t.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=I(a),-1!==a.title.position.indexOf(\"top\")?(o.y-=(1+i)*t.r,s.ty-=t.titleBox.height):-1!==a.title.position.indexOf(\"bottom\")&&(o.y+=(1+i)*t.r);var l,c,u=(l=t.r,c=t.trace.aspectratio,l/(void 0===c?1:c)),f=e.w*(a.domain.x[1]-a.domain.x[0])/2;return-1!==a.title.position.indexOf(\"left\")?(f+=u,o.x-=(1+i)*u,s.tx+=t.titleBox.width/2):-1!==a.title.position.indexOf(\"center\")?f*=2:-1!==a.title.position.indexOf(\"right\")&&(f+=u,o.x+=(1+i)*u,s.tx-=t.titleBox.width/2),r=f/t.titleBox.width,n=P(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}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 I(t){var e,r=t.pull;if(!r)return 0;if(Array.isArray(r))for(r=0,e=0;er&&(r=t.pull[e]);return r}function O(t,e){for(var r=[],n=0;n1?(c=r.r,u=c/i.aspectratio):(u=r.r,c=u*i.aspectratio),c*=(1+i.baseratio)/2,l=c*u}o=Math.min(o,l/r.vTotal)}for(n=0;n\")}if(a){var x=l.castOption(i,e.i,\"texttemplate\");if(x){var b=function(t){return{label:t.label,value:t.v,valueLabel:m.formatPieValue(t.v,n.separators),percent:t.v/r.vTotal,percentLabel:m.formatPiePercent(t.v/r.vTotal,n.separators),color:t.color,text:t.text,customdata:l.castOption(i,t.i,\"customdata\")}}(e),_=m.getFirstFilled(i.text,e.pts);(y(_)||\"\"===_)&&(b.text=_),e.text=l.texttemplateString(x,b,t._fullLayout._d3locale,b,i._meta||{})}else e.text=\"\"}}function R(t,e){var r=t.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(e.left+e.right)/2,o=(e.top+e.bottom)/2;t.textX=a*n-o*i,t.textY=a*i+o*n,t.noCenter=!0}e.exports={plot:function(t,e){var r=t._fullLayout,a=r._size;d(\"pie\",r),_(e,t),O(e,a);var h=l.makeTraceGroups(r._pielayer,e,\"trace\").each((function(e){var h=n.select(this),d=e[0],g=d.trace;!function(t){var e,r,n,i=t[0],a=i.r,o=i.trace,s=m.getRotationAngle(o.rotation),l=2*Math.PI/i.vTotal,c=\"px0\",u=\"px1\";if(\"counterclockwise\"===o.direction){for(e=0;ei.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-o.hole,r.rInscribed=E(r,i))}(e),h.attr(\"stroke-linejoin\",\"round\"),h.each((function(){var v=n.select(this).selectAll(\"g.slice\").data(e);v.enter().append(\"g\").classed(\"slice\",!0),v.exit().remove();var y=[[[],[]],[[],[]]],_=!1;v.each((function(i,a){if(i.hidden)n.select(this).selectAll(\"path,g\").remove();else{i.pointNumber=i.i,i.curveNumber=g.index,y[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var o=d.cx,c=d.cy,u=n.select(this),h=u.selectAll(\"path.surface\").data([i]);if(h.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":\"all\"}),u.call(x,t,e),g.pull){var v=+m.castOption(g.pull,i.pts)||0;v>0&&(o+=v*i.pxmid[0],c+=v*i.pxmid[1])}i.cxFinal=o,i.cyFinal=c;var T=g.hole;if(i.v===d.vTotal){var k=\"M\"+(o+i.px0[0])+\",\"+(c+i.px0[1])+C(i.px0,i.pxmid,!0,1)+C(i.pxmid,i.px0,!0,1)+\"Z\";T?h.attr(\"d\",\"M\"+(o+T*i.px0[0])+\",\"+(c+T*i.px0[1])+C(i.px0,i.pxmid,!1,T)+C(i.pxmid,i.px0,!1,T)+\"Z\"+k):h.attr(\"d\",k)}else{var A=C(i.px0,i.px1,!0,1);if(T){var M=1-T;h.attr(\"d\",\"M\"+(o+T*i.px1[0])+\",\"+(c+T*i.px1[1])+C(i.px1,i.px0,!1,T)+\"l\"+M*i.px0[0]+\",\"+M*i.px0[1]+A+\"Z\")}else h.attr(\"d\",\"M\"+o+\",\"+c+\"l\"+i.px0[0]+\",\"+i.px0[1]+A+\"Z\")}D(t,i,d);var S=m.castOption(g.textposition,i.pts),E=u.selectAll(\"g.slicetext\").data(i.text&&\"none\"!==S?[0]:[]);E.enter().append(\"g\").classed(\"slicetext\",!0),E.exit().remove(),E.each((function(){var u=l.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),h=l.ensureUniformFontSize(t,\"outside\"===S?function(t,e,r){var n=m.castOption(t.outsidetextfont.color,e.pts)||m.castOption(t.textfont.color,e.pts)||r.color,i=m.castOption(t.outsidetextfont.family,e.pts)||m.castOption(t.textfont.family,e.pts)||r.family,a=m.castOption(t.outsidetextfont.size,e.pts)||m.castOption(t.textfont.size,e.pts)||r.size;return{color:n,family:i,size:a}}(g,i,r.font):b(g,i,r.font));u.text(i.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(s.font,h).call(f.convertToTspans,t);var v,y=s.bBox(u.node());if(\"outside\"===S)v=L(y,i);else if(v=w(y,i,d),\"auto\"===S&&v.scale<1){var x=l.ensureUniformFontSize(t,g.outsidetextfont);u.call(s.font,x),v=L(y=s.bBox(u.node()),i)}var T=v.textPosAngle,k=void 0===T?i.pxmid:z(d.r,T);if(v.targetX=o+k[0]*v.rCenter+(v.x||0),v.targetY=c+k[1]*v.rCenter+(v.y||0),R(v,y),v.outside){var A=v.targetY;i.yLabelMin=A-y.height/2,i.yLabelMid=A,i.yLabelMax=A+y.height/2,i.labelExtraX=0,i.labelExtraY=0,_=!0}v.fontSize=h.size,p(g.type,v,r),e[a].transform=v,u.attr(\"transform\",l.getTextTransform(v))}))}function C(t,e,r,n){var a=n*(e[0]-t[0]),o=n*(e[1]-t[1]);return\"a\"+n*d.r+\",\"+n*d.r+\" 0 \"+i.largeArc+(r?\" 1 \":\" 0 \")+a+\",\"+o}}));var T=n.select(this).selectAll(\"g.titletext\").data(g.title.text?[0]:[]);if(T.enter().append(\"g\").classed(\"titletext\",!0),T.exit().remove(),T.each((function(){var e,r=l.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),i=g.title.text;g._meta&&(i=l.templateString(i,g._meta)),r.text(i).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(s.font,g.title.font).call(f.convertToTspans,t),e=\"middle center\"===g.title.position?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.title.font.size}}(d):C(d,a),r.attr(\"transform\",u(e.x,e.y)+c(Math.min(1,e.scale))+u(e.tx,e.ty))})),_&&function(t,e){var r,n,i,a,o,s,l,c,u,f,h,p,d;function g(t,e){return t.pxmid[1]-e.pxmid[1]}function v(t,e){return e.pxmid[1]-t.pxmid[1]}function y(t,r){r||(r={});var i,c,u,h,p=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),d=n?t.yLabelMin:t.yLabelMax,g=n?t.yLabelMax:t.yLabelMin,v=t.cyFinal+o(t.px0[1],t.px1[1]),y=p-d;if(y*l>0&&(t.labelExtraY=y),Array.isArray(e.pull))for(c=0;c=(m.castOption(e.pull,u.pts)||0)||((t.pxmid[1]-u.pxmid[1])*l>0?(y=u.cyFinal+o(u.px0[1],u.px1[1])-d-t.labelExtraY)*l>0&&(t.labelExtraY+=y):(g+t.labelExtraY-v)*l>0&&(i=3*s*Math.abs(c-f.indexOf(t)),(h=u.cxFinal+a(u.px0[0],u.px1[0])+i-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=h)))}for(n=0;n<2;n++)for(i=n?g:v,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,(c=t[n][r]).sort(i),u=t[1-n][r],f=u.concat(c),p=[],h=0;hMath.abs(f)?s+=\"l\"+f*t.pxmid[0]/t.pxmid[1]+\",\"+f+\"H\"+(a+t.labelExtraX+c):s+=\"l\"+t.labelExtraX+\",\"+u+\"v\"+(f-u)+\"h\"+c}else s+=\"V\"+(t.yLabelMid+t.labelExtraY)+\"h\"+c;l.ensureSingle(r,\"path\",\"textline\").call(o.stroke,e.outsidetextfont.color).attr({\"stroke-width\":Math.min(2,e.outsidetextfont.size/8),d:s,fill:\"none\"})}else r.select(\"path.textline\").remove()}))}(v,g),_&&g.automargin){var k=s.bBox(h.node()),A=g.domain,M=a.w*(A.x[1]-A.x[0]),S=a.h*(A.y[1]-A.y[0]),E=(.5*M-d.r)/a.w,P=(.5*S-d.r)/a.h;i.autoMargin(t,\"pie.\"+g.uid+\".automargin\",{xl:A.x[0]-E,xr:A.x[1]+E,yb:A.y[0]-P,yt:A.y[1]+P,l:Math.max(d.cx-d.r-k.left,0),r:Math.max(k.right-(d.cx+d.r),0),b:Math.max(k.bottom-(d.cy+d.r),0),t:Math.max(d.cy-d.r-k.top,0),pad:5})}}))}));setTimeout((function(){h.selectAll(\"tspan\").each((function(){var t=n.select(this);t.attr(\"dy\")&&t.attr(\"dy\",t.attr(\"dy\"))}))}),0)},formatSliceLabel:D,transformInsideText:w,determineInsideTextFont:b,positionTitleOutside:C,prerenderTitles:_,layoutAreas:O,attachFxHandlers:x,computeTransform:R}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../components/fx\":406,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../../plots/plots\":619,\"../bar/constants\":650,\"../bar/uniform_text\":664,\"./event_data\":904,\"./helpers\":905,\"@plotly/d3\":58}],910:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"./style_one\"),a=t(\"../bar/uniform_text\").resizeText;e.exports=function(t){var e=t._fullLayout._pielayer.selectAll(\".trace\");a(t,e,\"pie\"),e.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)}))}))}},{\"../bar/uniform_text\":664,\"./style_one\":911,\"@plotly/d3\":58}],911:[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\":366,\"./helpers\":905}],912:[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\":926}],913:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").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;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);if(p)r=p;else for(r=new Int32Array(e),l=0;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var g=i(t.marker.color),m=i(t.marker.border.color),v=t.opacity*t.marker.opacity;g[3]*=v,this.pointcloudOptions.color=g;var y=t.marker.blend;if(null===y){y=c.length<100||u.length<100}this.pointcloudOptions.blend=y,m[3]*=v,this.pointcloudOptions.borderColor=m;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,T=b/2||.5;t._extremes[_._id]=a(_,[d[0],d[2]],{ppad:T}),t._extremes[w._id]=a(w,[d[1],d[3]],{ppad:T})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},{\"../../../stackgl_modules\":1120,\"../../lib/str2rgbarray\":528,\"../../plots/cartesian/autorange\":553,\"../scatter/get_trace_color\":936}],914:[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\":503,\"./attributes\":912}],915:[function(t,e,r){\"use strict\";[\"*pointcloud* trace is deprecated!\",\"Please consider switching to the *scattergl* trace type.\"].join(\" \");e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"../scatter3d/calc\"),plot:t(\"./convert\"),moduleType:\"trace\",name:\"pointcloud\",basePlotModule:t(\"../../plots/gl2d\"),categories:[\"gl\",\"gl2d\",\"showLegend\"],meta:{}}},{\"../../plots/gl2d\":596,\"../scatter3d/calc\":955,\"./attributes\":912,\"./convert\":913,\"./defaults\":914}],916:[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(\"../../plots/template_attributes\").hovertemplateAttrs,c=t(\"../../components/colorscale/attributes\"),u=t(\"../../plot_api/plot_template\").templatedArray,f=t(\"../../plots/cartesian/axis_format_attributes\").descriptionOnlyNumbers,h=t(\"../../lib/extend\").extendFlat,p=t(\"../../plot_api/edit_types\").overrideAll;(e.exports=p({hoverinfo:h({},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\",description:f(\"value\")},valuesuffix:{valType:\"string\",dflt:\"\"},arrangement:{valType:\"enumerated\",values:[\"snap\",\"perpendicular\",\"freeform\",\"fixed\"],dflt:\"snap\"},textfont:n({}),customdata:void 0,node:{label:{valType:\"data_array\",dflt:[]},groups:{valType:\"info_array\",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:\"number\",editType:\"calc\"}},x:{valType:\"data_array\",dflt:[]},y:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},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,hovertemplate:l({},{keys:[\"value\",\"label\"]})},link:{label:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},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,hovertemplate:l({},{keys:[\"value\",\"label\"]}),colorscales:u(\"concentrationscales\",{editType:\"calc\",label:{valType:\"string\",editType:\"calc\",dflt:\"\"},cmax:{valType:\"number\",editType:\"calc\",dflt:1},cmin:{valType:\"number\",editType:\"calc\",dflt:0},colorscale:h(c().colorscale,{dflt:[[0,\"white\"],[1,\"black\"]]})})}},\"calc\",\"nested\")).transforms=void 0},{\"../../components/color/attributes\":365,\"../../components/colorscale/attributes\":373,\"../../components/fx/attributes\":397,\"../../lib/extend\":493,\"../../plot_api/edit_types\":536,\"../../plot_api/plot_template\":543,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/domain\":584,\"../../plots/font_attributes\":585,\"../../plots/template_attributes\":633}],917:[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\"),s=t(\"../../lib/setcursor\"),l=t(\"../../components/dragelement\"),c=t(\"../../plots/cartesian/select\").prepSelect,u=t(\"../../lib\"),f=t(\"../../registry\");function h(t,e){var r=t._fullData[e],n=t._fullLayout,i=n.dragmode,a=\"pan\"===n.dragmode?\"move\":\"crosshair\",o=r._bgRect;if(\"pan\"!==i&&\"zoom\"!==i){s(o,a);var h={_id:\"x\",c2p:u.identity,_offset:r._sankey.translateX,_length:r._sankey.width},p={_id:\"y\",c2p:u.identity,_offset:r._sankey.translateY,_length:r._sankey.height},d={gd:t,element:o.node(),plotinfo:{id:e,xaxis:h,yaxis:p,fillRangeItems:u.noop},subplot:e,xaxes:[h],yaxes:[p],doneFnCompleted:function(r){var n,i=t._fullData[e],a=i.node.groups.slice(),o=[];function s(t){for(var e=i._sankey.graph.nodes,r=0;ry&&(y=a.source[e]),a.target[e]>y&&(y=a.target[e]);var x,b=y+1;t.node._count=b;var _=t.node.groups,w={};for(e=0;e<_.length;e++){var T=_[e];for(x=0;x0&&s(E,b)&&s(L,b)&&(!w.hasOwnProperty(E)||!w.hasOwnProperty(L)||w[E]!==w[L])){w.hasOwnProperty(L)&&(L=w[L]),w.hasOwnProperty(E)&&(E=w[E]),L=+L,h[E=+E]=h[L]=!0;var C=\"\";a.label&&a.label[e]&&(C=a.label[e]);var P=null;C&&p.hasOwnProperty(C)&&(P=p[C]),c.push({pointNumber:e,label:C,color:u?a.color[e]:a.color,customdata:f?a.customdata[e]:a.customdata,concentrationscale:P,source:E,target:L,value:+S}),M.source.push(E),M.target.push(L)}}var I=b+_.length,O=o(r.color),z=o(r.customdata),D=[];for(e=0;eb-1,childrenNodes:[],pointNumber:e,label:R,color:O?r.color[e]:r.color,customdata:z?r.customdata[e]:r.customdata})}var F=!1;return function(t,e,r){for(var a=i.init2dArray(t,0),o=0;o1}))}(I,M.source,M.target)&&(F=!0),{circular:F,links:c,nodes:D,groups:_,groupLookup:w}}e.exports=function(t,e){var r=c(e);return a({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},{\"../../components/colorscale\":378,\"../../lib\":503,\"../../lib/gup\":500,\"strongly-connected-components\":306}],919:[function(t,e,r){\"use strict\";e.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:\"linear\",cn:{sankey:\"sankey\",sankeyLinks:\"sankey-links\",sankeyLink:\"sankey-link\",sankeyNodeSet:\"sankey-node-set\",sankeyNode:\"sankey-node\",nodeRect:\"node-rect\",nodeLabel:\"node-label\"}}},{}],920:[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\"),u=t(\"../../plots/array_container_defaults\");function f(t,e){function r(r,a){return n.coerce(t,e,i.link.colorscales,r,a)}r(\"label\"),r(\"cmin\"),r(\"cmax\"),r(\"colorscale\")}e.exports=function(t,e,r,h){function p(r,a){return n.coerce(t,e,i,r,a)}var d=n.extendDeep(h.hoverlabel,t.hoverlabel),g=t.node,m=c.newContainer(e,\"node\");function v(t,e){return n.coerce(g,m,i.node,t,e)}v(\"label\"),v(\"groups\"),v(\"x\"),v(\"y\"),v(\"pad\"),v(\"thickness\"),v(\"line.color\"),v(\"line.width\"),v(\"hoverinfo\",t.hoverinfo),l(g,m,v,d),v(\"hovertemplate\");var y=h.colorway;v(\"color\",m.label.map((function(t,e){return a.addOpacity(function(t){return y[t%y.length]}(e),.8)}))),v(\"customdata\");var x=t.link||{},b=c.newContainer(e,\"link\");function _(t,e){return n.coerce(x,b,i.link,t,e)}_(\"label\"),_(\"source\"),_(\"target\"),_(\"value\"),_(\"line.color\"),_(\"line.width\"),_(\"hoverinfo\",t.hoverinfo),l(x,b,_,d),_(\"hovertemplate\");var w,T=o(h.paper_bgcolor).getLuminance()<.333?\"rgba(255, 255, 255, 0.6)\":\"rgba(0, 0, 0, 0.2)\";_(\"color\",n.repeat(T,b.value.length)),_(\"customdata\"),u(x,b,{name:\"colorscales\",handleItemDefaults:f}),s(e,h,p),p(\"orientation\"),p(\"valueformat\"),p(\"valuesuffix\"),m.x.length&&m.y.length&&(w=\"freeform\"),p(\"arrangement\",w),n.coerceFont(p,\"textfont\",n.extendFlat({},h.font)),e._length=null}},{\"../../components/color\":366,\"../../components/fx/hoverlabel_defaults\":404,\"../../lib\":503,\"../../plot_api/plot_template\":543,\"../../plots/array_container_defaults\":549,\"../../plots/domain\":584,\"./attributes\":916,tinycolor2:312}],921:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),moduleType:\"trace\",name:\"sankey\",basePlotModule:t(\"./base_plot\"),selectPoints:t(\"./select.js\"),categories:[\"noOpacity\"],meta:{}}},{\"./attributes\":916,\"./base_plot\":917,\"./calc\":918,\"./defaults\":920,\"./plot\":922,\"./select.js\":924}],922:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.numberFormat,o=t(\"./render\"),s=t(\"../../components/fx\"),l=t(\"../../components/color\"),c=t(\"./constants\").cn,u=i._;function f(t){return\"\"!==t}function h(t,e){return t.filter((function(t){return t.key===e.traceId}))}function p(t,e){n.select(t).select(\"path\").style(\"fill-opacity\",e),n.select(t).select(\"rect\").style(\"fill-opacity\",e)}function d(t){n.select(t).select(\"text.name\").style(\"fill\",\"black\")}function g(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function m(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&&h(r,e).selectAll(\".\"+c.sankeyLink).filter(g(e)).call(x.bind(0,e,r,!1))}function y(t,e,r){e&&r&&h(r,e).selectAll(\".\"+c.sankeyLink).filter(g(e)).call(b.bind(0,e,r,!1))}function x(t,e,r,n){var i=n.datum().link.label;n.style(\"fill-opacity\",(function(t){if(!t.link.concentrationscale)return.4})),i&&h(e,t).selectAll(\".\"+c.sankeyLink).filter((function(t){return t.link.label===i})).style(\"fill-opacity\",(function(t){if(!t.link.concentrationscale)return.4})),r&&h(e,t).selectAll(\".\"+c.sankeyNode).filter(m(t)).call(v)}function b(t,e,r,n){var i=n.datum().link.label;n.style(\"fill-opacity\",(function(t){return t.tinyColorAlpha})),i&&h(e,t).selectAll(\".\"+c.sankeyLink).filter((function(t){return t.link.label===i})).style(\"fill-opacity\",(function(t){return t.tinyColorAlpha})),r&&h(e,t).selectAll(c.sankeyNode).filter(m(t)).call(y)}function _(t,e){var r=t.hoverlabel||{},n=i.nestedProperty(r,e).get();return!Array.isArray(n)&&n}e.exports=function(t,e){for(var r=t._fullLayout,i=r._paper,h=r._size,g=0;g\"),color:_(o,\"bgcolor\")||l.addOpacity(g.color,1),borderColor:_(o,\"bordercolor\"),fontFamily:_(o,\"font.family\"),fontSize:_(o,\"font.size\"),fontColor:_(o,\"font.color\"),nameLength:_(o,\"namelength\"),textAlign:_(o,\"align\"),idealAlign:n.event.x\"),color:_(o,\"bgcolor\")||i.tinyColorHue,borderColor:_(o,\"bordercolor\"),fontFamily:_(o,\"font.family\"),fontSize:_(o,\"font.size\"),fontColor:_(o,\"font.color\"),nameLength:_(o,\"namelength\"),textAlign:_(o,\"align\"),idealAlign:\"left\",hovertemplate:o.hovertemplate,hovertemplateLabels:y,eventData:[i.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});p(w,.85),d(w)}}},unhover:function(e,i,a){!1!==t._fullLayout.hovermode&&(n.select(e).call(y,i,a),\"skip\"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,t.emit(\"plotly_unhover\",{event:n.event,points:[i.node]})),s.loneUnhover(r._hoverlayer.node()))},select:function(e,r,i){var a=r.node;a.originalEvent=n.event,t._hoverdata=[a],n.select(e).call(y,r,i),s.click(t,{target:!0})}}})}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../lib\":503,\"./constants\":919,\"./render\":923,\"@plotly/d3\":58}],923:[function(t,e,r){\"use strict\";var n=t(\"d3-force\"),i=t(\"d3-interpolate\").interpolateNumber,a=t(\"@plotly/d3\"),o=t(\"@plotly/d3-sankey\"),s=t(\"@plotly/d3-sankey-circular\"),l=t(\"./constants\"),c=t(\"tinycolor2\"),u=t(\"../../components/color\"),f=t(\"../../components/drawing\"),h=t(\"../../lib\"),p=h.strTranslate,d=h.strRotate,g=t(\"../../lib/gup\"),m=g.keyFun,v=g.repeat,y=g.unwrap,x=t(\"../../lib/svg_text_utils\"),b=t(\"../../registry\"),_=t(\"../../constants/alignment\"),w=_.CAP_SHIFT,T=_.LINE_SPACING;function k(t,e,r){var n,i=y(e),a=i.trace,u=a.domain,f=\"h\"===a.orientation,p=a.node.pad,d=a.node.thickness,g=t.width*(u.x[1]-u.x[0]),m=t.height*(u.y[1]-u.y[0]),v=i._nodes,x=i._links,b=i.circular;(n=b?s.sankeyCircular().circularLinkGap(0):o.sankey()).iterations(l.sankeyIterations).size(f?[g,m]:[m,g]).nodeWidth(d).nodePadding(p).nodeId((function(t){return t.pointNumber})).nodes(v).links(x);var _,w,T,k=n();for(var A in n.nodePadding()=i||(r=i-e.y0)>1e-6&&(e.y0+=r,e.y1+=r),i=e.y1+p}))}(function(t){var e,r,n=t.map((function(t,e){return{x0:t.x0,index:e}})).sort((function(t,e){return t.x0-e.x0})),i=[],a=-1,o=-1/0;for(_=0;_o+d&&(a+=1,e=s.x0),o=s.x0,i[a]||(i[a]=[]),i[a].push(s),r=e-s.x0,s.x0+=r,s.x1+=r}return i}(v=k.nodes));n.update(k)}return{circular:b,key:r,trace:a,guid:h.randstr(),horizontal:f,width:g,height:m,nodePad:a.node.pad,nodeLineColor:a.node.line.color,nodeLineWidth:a.node.line.width,linkLineColor:a.link.line.color,linkLineWidth:a.link.line.width,valueFormat:a.valueformat,valueSuffix:a.valuesuffix,textFont:a.textfont,translateX:u.x[0]*t.width+t.margin.l,translateY:t.height-u.y[1]*t.height+t.margin.t,dragParallel:f?m:g,dragPerpendicular:f?g:m,arrangement:a.arrangement,sankey:n,graph:k,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function A(t,e,r){var n=c(e.color),i=e.source.label+\"|\"+e.target.label+\"__\"+r;return e.trace=t.trace,e.curveNumber=t.trace.index,{circular:t.circular,key:i,traceId:t.key,pointNumber:e.pointNumber,link:e,tinyColorHue:u.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:M,linkLineColor:t.linkLineColor,linkLineWidth:t.linkLineWidth,valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,parent:t,interactionState:t.interactionState,flow:e.flow}}function M(){return function(t){if(t.link.circular)return e=t.link,r=e.width/2,n=e.circularPathData,\"top\"===e.circularLinkType?\"M \"+n.targetX+\" \"+(n.targetY+r)+\" L\"+n.rightInnerExtent+\" \"+(n.targetY+r)+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightSmallArcRadius+r)+\" 0 0 1 \"+(n.rightFullExtent-r)+\" \"+(n.targetY-n.rightSmallArcRadius)+\"L\"+(n.rightFullExtent-r)+\" \"+n.verticalRightInnerExtent+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightLargeArcRadius+r)+\" 0 0 1 \"+n.rightInnerExtent+\" \"+(n.verticalFullExtent-r)+\"L\"+n.leftInnerExtent+\" \"+(n.verticalFullExtent-r)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftLargeArcRadius+r)+\" 0 0 1 \"+(n.leftFullExtent+r)+\" \"+n.verticalLeftInnerExtent+\"L\"+(n.leftFullExtent+r)+\" \"+(n.sourceY-n.leftSmallArcRadius)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftSmallArcRadius+r)+\" 0 0 1 \"+n.leftInnerExtent+\" \"+(n.sourceY+r)+\"L\"+n.sourceX+\" \"+(n.sourceY+r)+\"L\"+n.sourceX+\" \"+(n.sourceY-r)+\"L\"+n.leftInnerExtent+\" \"+(n.sourceY-r)+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftSmallArcRadius-r)+\" 0 0 0 \"+(n.leftFullExtent-r)+\" \"+(n.sourceY-n.leftSmallArcRadius)+\"L\"+(n.leftFullExtent-r)+\" \"+n.verticalLeftInnerExtent+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftLargeArcRadius-r)+\" 0 0 0 \"+n.leftInnerExtent+\" \"+(n.verticalFullExtent+r)+\"L\"+n.rightInnerExtent+\" \"+(n.verticalFullExtent+r)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightLargeArcRadius-r)+\" 0 0 0 \"+(n.rightFullExtent+r)+\" \"+n.verticalRightInnerExtent+\"L\"+(n.rightFullExtent+r)+\" \"+(n.targetY-n.rightSmallArcRadius)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightSmallArcRadius-r)+\" 0 0 0 \"+n.rightInnerExtent+\" \"+(n.targetY-r)+\"L\"+n.targetX+\" \"+(n.targetY-r)+\"Z\":\"M \"+n.targetX+\" \"+(n.targetY-r)+\" L\"+n.rightInnerExtent+\" \"+(n.targetY-r)+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightSmallArcRadius+r)+\" 0 0 0 \"+(n.rightFullExtent-r)+\" \"+(n.targetY+n.rightSmallArcRadius)+\"L\"+(n.rightFullExtent-r)+\" \"+n.verticalRightInnerExtent+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightLargeArcRadius+r)+\" 0 0 0 \"+n.rightInnerExtent+\" \"+(n.verticalFullExtent+r)+\"L\"+n.leftInnerExtent+\" \"+(n.verticalFullExtent+r)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftLargeArcRadius+r)+\" 0 0 0 \"+(n.leftFullExtent+r)+\" \"+n.verticalLeftInnerExtent+\"L\"+(n.leftFullExtent+r)+\" \"+(n.sourceY+n.leftSmallArcRadius)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftSmallArcRadius+r)+\" 0 0 0 \"+n.leftInnerExtent+\" \"+(n.sourceY-r)+\"L\"+n.sourceX+\" \"+(n.sourceY-r)+\"L\"+n.sourceX+\" \"+(n.sourceY+r)+\"L\"+n.leftInnerExtent+\" \"+(n.sourceY+r)+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftSmallArcRadius-r)+\" 0 0 1 \"+(n.leftFullExtent-r)+\" \"+(n.sourceY+n.leftSmallArcRadius)+\"L\"+(n.leftFullExtent-r)+\" \"+n.verticalLeftInnerExtent+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftLargeArcRadius-r)+\" 0 0 1 \"+n.leftInnerExtent+\" \"+(n.verticalFullExtent-r)+\"L\"+n.rightInnerExtent+\" \"+(n.verticalFullExtent-r)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightLargeArcRadius-r)+\" 0 0 1 \"+(n.rightFullExtent+r)+\" \"+n.verticalRightInnerExtent+\"L\"+(n.rightFullExtent+r)+\" \"+(n.targetY+n.rightSmallArcRadius)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightSmallArcRadius-r)+\" 0 0 1 \"+n.rightInnerExtent+\" \"+(n.targetY+r)+\"L\"+n.targetX+\" \"+(n.targetY+r)+\"Z\";var e,r,n,a=t.link.source.x1,o=t.link.target.x0,s=i(a,o),l=s(.5),c=s(.5),u=t.link.y0-t.link.width/2,f=t.link.y0+t.link.width/2,h=t.link.y1-t.link.width/2,p=t.link.y1+t.link.width/2;return\"M\"+a+\",\"+u+\"C\"+l+\",\"+u+\" \"+c+\",\"+h+\" \"+o+\",\"+h+\"L\"+o+\",\"+p+\"C\"+c+\",\"+p+\" \"+l+\",\"+f+\" \"+a+\",\"+f+\"Z\"}}function S(t,e){var r=c(e.color),n=l.nodePadAcross,i=t.nodePad/2;e.dx=e.x1-e.x0,e.dy=e.y1-e.y0;var a=e.dx,o=Math.max(.5,e.dy),s=\"node_\"+e.pointNumber;return e.group&&(s=h.randstr()),e.trace=t.trace,e.curveNumber=t.trace.index,{index:e.pointNumber,key:s,partOfGroup:e.partOfGroup||!1,group:e.group,traceId:t.key,trace:t.trace,node:e,nodePad:t.nodePad,nodeLineColor:t.nodeLineColor,nodeLineWidth:t.nodeLineWidth,textFont:t.textFont,size:t.horizontal?t.height:t.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:t.horizontal?e.dy/2+1:e.dx/2+1,left:1===e.originalLayer,sizeAcross:t.width,forceLayouts:t.forceLayouts,horizontal:t.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:u.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,graph:t.graph,arrangement:t.arrangement,uniqueNodeLabelPathId:[t.guid,t.key,s].join(\"_\"),interactionState:t.interactionState,figure:t}}function E(t){t.attr(\"transform\",(function(t){return p(t.node.x0.toFixed(3),t.node.y0.toFixed(3))}))}function L(t){t.call(E)}function C(t,e){t.call(L),e.attr(\"d\",M())}function P(t){t.attr(\"width\",(function(t){return t.node.x1-t.node.x0})).attr(\"height\",(function(t){return t.visibleHeight}))}function I(t){return t.link.width>1||t.linkLineWidth>0}function O(t){return p(t.translateX,t.translateY)+(t.horizontal?\"matrix(1 0 0 1 0 0)\":\"matrix(0 1 1 0 0 0)\")}function z(t,e,r){t.on(\".basic\",null).on(\"mouseover.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.hover(this,t,e),t.interactionState.hovered=[this,t])})).on(\"mousemove.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.follow(this,t),t.interactionState.hovered=[this,t])})).on(\"mouseout.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(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||t.partOfGroup||r.select(this,t,e)}))}function D(t,e,r,i){var o=a.behavior.drag().origin((function(t){return{x:t.node.x0+t.visibleWidth/2,y:t.node.y0+t.visibleHeight/2}})).on(\"dragstart\",(function(a){if(\"fixed\"!==a.arrangement&&(h.ensureSingle(i._fullLayout._infolayer,\"g\",\"dragcover\",(function(t){i._fullLayout._dragCover=t})),h.raiseToTop(this),a.interactionState.dragInProgress=a.node,F(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),\"snap\"===a.arrangement)){var o=a.traceId+\"|\"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):function(t,e,r,i){!function(t){for(var e=0;e0&&n.forceLayouts[e].alpha(0)}}(0,e,a,r)).stop()}(0,o,a),function(t,e,r,n,i){window.requestAnimationFrame((function a(){var o;for(o=0;o0)window.requestAnimationFrame(a);else{var s=r.node.originalX;r.node.x0=s-r.visibleWidth/2,r.node.x1=s+r.visibleWidth/2,R(r,i)}}))}(t,e,a,o,i)}})).on(\"drag\",(function(r){if(\"fixed\"!==r.arrangement){var n=a.event.x,i=a.event.y;\"snap\"===r.arrangement?(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2,r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2):(\"freeform\"===r.arrangement&&(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2),i=Math.max(0,Math.min(r.size-r.visibleHeight/2,i)),r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2),F(r.node),\"snap\"!==r.arrangement&&(r.sankey.update(r.graph),C(t.filter(B(r)),e))}})).on(\"dragend\",(function(t){if(\"fixed\"!==t.arrangement){t.interactionState.dragInProgress=!1;for(var e=0;el&&C[v].gap;)v--;for(x=C[v].s,g=C.length-1;g>v;g--)C[g].s=x;for(;lM[u]&&u=0;i--){var a=t[i];if(\"scatter\"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],933:[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(\"./period_defaults\"),u=t(\"./stack_defaults\"),f=t(\"./marker_defaults\"),h=t(\"./line_defaults\"),p=t(\"./line_shape_defaults\"),d=t(\"./text_defaults\"),g=t(\"./fillcolor_defaults\");e.exports=function(t,e,r,m){function v(r,i){return n.coerce(t,e,a,r,i)}var y=l(t,e,m,v);if(y||(e.visible=!1),e.visible){c(t,e,m,v),v(\"xhoverformat\"),v(\"yhoverformat\");var x=u(t,e,m,v),b=!x&&y=Math.min(e,r)&&d<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(h.c2p(t.x)-d);return a=Math.min(e,r)&&g<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(p.c2p(t.y)-g);return aW!=(N=z[I][1])>=W&&(R=z[I-1][0],F=z[I][0],N-B&&(D=R+(F-R)*(W-B)/(N-B),H=Math.min(H,D),q=Math.max(q,D)));H=Math.max(H,0),q=Math.min(q,h._length);var X=s.defaultLine;return s.opacity(f.fillcolor)?X=f.fillcolor:s.opacity((f.line||{}).color)&&(X=f.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:H,x1:q,y0:W,y1:W,color:X,hovertemplate:!1}),delete t.index,f.text&&!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},{\"../../components/color\":366,\"../../components/fx\":406,\"../../lib\":503,\"../../registry\":638,\"./get_trace_color\":936}],938:[function(t,e,r){\"use strict\";var n=t(\"./subtypes\");e.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"./cross_trace_defaults\"),calc:t(\"./calc\").calc,crossTraceCalc:t(\"./cross_trace_calc\"),arraysToCalcdata:t(\"./arrays_to_calcdata\"),plot:t(\"./plot\"),colorbar:t(\"./marker_colorbar\"),formatLabels:t(\"./format_labels\"),style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"./select\"),animatable:!0,moduleType:\"trace\",name:\"scatter\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"symbols\",\"errorBarsOK\",\"showLegend\",\"scatter-like\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"./arrays_to_calcdata\":925,\"./attributes\":926,\"./calc\":927,\"./cross_trace_calc\":931,\"./cross_trace_defaults\":932,\"./defaults\":933,\"./format_labels\":935,\"./hover\":937,\"./marker_colorbar\":944,\"./plot\":947,\"./select\":948,\"./style\":950,\"./subtypes\":951}],939:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray,i=t(\"../../components/colorscale/helpers\").hasColorscale,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\"}):s(\"line.color\",!n(c)&&c||r);s(\"line.width\"),(l||{}).noDash||s(\"line.dash\")}},{\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"../../lib\":503}],940:[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,m,v,y,x,b,_,w,T,k,A,M,S=e.xaxis,E=e.yaxis,L=\"log\"===S.type,C=\"log\"===E.type,P=S._length,I=E._length,O=e.connectGaps,z=e.baseTolerance,D=e.shape,R=\"linear\"===D,F=e.fill&&\"none\"!==e.fill,B=[],N=f.minTolerance,j=t.length,U=new Array(j),V=0;function H(r){var n=t[r];if(!n)return!1;var a=e.linearized?S.l2p(n.x):S.c2p(n.x),l=e.linearized?E.l2p(n.y):E.c2p(n.y);if(a===i){if(L&&(a=S.c2p(n.x,!0)),a===i)return!1;C&&l===i&&(a*=Math.abs(S._m*I*(S._m>0?o:s)/(E._m*P*(E._m>0?o:s)))),a*=1e3}if(l===i){if(C&&(l=E.c2p(n.y,!0)),l===i)return!1;l*=1e3}return[a,l]}function q(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&&crt||t[1]it)return[u(t[0],et,rt),u(t[1],nt,it)]}function st(t,e){return t[0]===e[0]&&(t[0]===et||t[0]===rt)||(t[1]===e[1]&&(t[1]===nt||t[1]===it)||void 0)}function lt(t,e,r){return function(n,i){var a=ot(n),o=ot(i),s=[];if(a&&o&&st(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 ct(t){var e=t[0],r=t[1],n=e===U[V-1][0],i=r===U[V-1][1];if(!n||!i)if(V>1){var a=e===U[V-2][0],o=r===U[V-2][1];n&&(e===et||e===rt)&&a?o?V--:U[V-1]=t:i&&(r===nt||r===it)&&o?a?V--:U[V-1]=t:U[V++]=t}else U[V++]=t}function ut(t){U[V-1][0]!==t[0]&&U[V-1][1]!==t[1]&&ct([Z,J]),ct(t),K=null,Z=J=0}function ft(t){if(A=t[0]/P,M=t[1]/I,W=t[0]rt?rt:0,X=t[1]it?it:0,W||X){if(V)if(K){var e=$(K,t);e.length>1&&(ut(e[0]),U[V++]=e[1])}else Q=$(U[V-1],t)[0],U[V++]=Q;else U[V++]=[W||t[0],X||t[1]];var r=U[V-1];W&&X&&(r[0]!==W||r[1]!==X)?(K&&(Z!==W&&J!==X?ct(Z&&J?(n=K,a=(i=t)[0]-n[0],o=(i[1]-n[1])/a,(n[1]*i[0]-i[1]*n[0])/a>0?[o>0?et:rt,it]:[o>0?rt:et,nt]):[Z||W,J||X]):Z&&J&&ct([Z,J])),ct([W,X])):Z-W&&J-X&&ct([W||Z,X||J]),K=t,Z=W,J=X}else K&&ut($(K,t)[0]),U[V++]=t;var n,i,a,o}for(\"linear\"===D||\"spline\"===D?$=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var a=at[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&&Y(o,t)G(d,ht))break;a=d,(_=v[0]*m[0]+v[1]*m[1])>x?(x=_,h=d,g=!1):_=t.length||!d)break;ft(d),n=d}}else ft(h)}K&&ct([Z||K[0],J||K[1]]),B.push(U.slice(0,V))}return B}},{\"../../constants/numerical\":479,\"../../lib\":503,\"./constants\":930}],941:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){\"spline\"===r(\"line.shape\")&&r(\"line.smoothing\")}},{}],942:[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=0?l=p:(l=p=h,h++),l0?Math.max(r,a):0}}},{\"fast-isnumeric\":190}],944:[function(t,e,r){\"use strict\";e.exports={container:\"marker\",min:\"cmin\",max:\"cmax\"}},{}],945:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/helpers\").hasColorscale,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\":366,\"../../components/colorscale/defaults\":376,\"../../components/colorscale/helpers\":377,\"./subtypes\":951}],946:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").dateTick0,i=t(\"../../constants/numerical\").ONEWEEK;function a(t,e){return n(e,t%i==0?1:0)}e.exports=function(t,e,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n(\"xperiod\");o&&(n(\"xperiod0\",a(o,e.xcalendar)),n(\"xperiodalignment\"))}if(i.y){var s=n(\"yperiod\");s&&(n(\"yperiod0\",a(s,e.ycalendar)),n(\"yperiodalignment\"))}}},{\"../../constants/numerical\":479,\"../../lib\":503}],947:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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 m;!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),m=0;o.forEach((function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(t){return v?t.transition():t}var x=r.xaxis,b=r.yaxis,_=f[0].trace,w=_.line,T=n.select(d),k=o(T,\"g\",\"errorbars\"),A=o(T,\"g\",\"lines\"),M=o(T,\"g\",\"points\"),S=o(T,\"g\",\"text\");if(i.getComponentMethod(\"errorbars\",\"plot\")(t,k,r,g),!0===_.visible){var E,L;y(T).style(\"opacity\",_.opacity);var C=_.fill.charAt(_.fill.length-1);\"x\"!==C&&\"y\"!==C&&(C=\"\"),f[0][r.isRangePlot?\"nodeRangePlot3\":\"node3\"]=T;var P,I,O=\"\",z=[],D=_._prevtrace;D&&(O=D._prevRevpath||\"\",L=D._nextFill,z=D._polygons);var R,F,B,N,j,U,V,H=\"\",q=\"\",G=[],Y=a.noop;if(E=_._ownFill,c.hasLines(_)||\"none\"!==_.fill){for(L&&L.datum(f),-1!==[\"hv\",\"vh\",\"hvh\",\"vhv\"].indexOf(w.shape)?(R=l.steps(w.shape),F=l.steps(w.shape.split(\"\").reverse().join(\"\"))):R=F=\"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\")},B=function(t){return F(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,fill:_.fill}),V=_._polygons=new Array(G.length),m=0;m1){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 W=A.selectAll(\".js-line\").data(G);y(W.exit()).style(\"opacity\",0).remove(),W.each(Y(!1)),W.enter().append(\"path\").classed(\"js-line\",!0).style(\"vector-effect\",\"non-scaling-stroke\").call(l.lineGroupStyle).each(Y(!0)),l.setClipUrl(W,r.layerClipId,t),G.length?(E?(E.datum(f),N&&U&&(C?(\"y\"===C?N[1]=U[1]=b.c2p(0,!0):\"x\"===C&&(N[0]=U[0]=x.c2p(0,!0)),y(E).attr(\"d\",\"M\"+U+\"L\"+N+\"L\"+H.substr(1)).call(l.singleFillStyle)):y(E).attr(\"d\",H+\"Z\").call(l.singleFillStyle))):L&&(\"tonext\"===_.fill.substr(0,6)&&H&&O?(\"tonext\"===_.fill?y(L).attr(\"d\",H+\"Z\"+O+\"Z\").call(l.singleFillStyle):y(L).attr(\"d\",H+\"L\"+O.substr(1)+\"Z\").call(l.singleFillStyle),_._polygons=_._polygons.concat(z)):(Z(L),_._polygons=null)),_._prevRevpath=q,_._prevPolygons=V):(E?Z(E):L&&Z(L),_._polygons=_._prevRevpath=_._prevPolygons=null),M.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 m=s,_=u.stackgroup,w=_&&\"infer zero\"===t._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?m=w?K:J:_&&!w&&(m=Q),f&&(d=m),h&&(g=m)}var T,k=(o=e.selectAll(\"path.point\").data(d,p)).enter().append(\"path\").classed(\"point\",!0);v&&k.call(l.pointStyle,u,t).call(l.translatePoints,x,b).style(\"opacity\",0).transition().style(\"opacity\",1),o.order(),f&&(T=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,T,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()})),v?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()}(M,S,f);var X=!1===_.cliponaxis?null:r.layerClipId;l.setClipUrl(M,X,t),l.setClipUrl(S,X,t)}function Z(t){y(t).attr(\"d\",\"M0,0Z\")}function J(t){return t.filter((function(t){return!t.gap&&t.vis}))}function K(t){return t.filter((function(t){return t.vis}))}function Q(t){return t.filter((function(t){return!t.gap}))}function $(t){return t.id}function tt(t){if(t.ids)return $}function et(){return!1}}e.exports=function(t,e,r,i,a,c){var u,h,d=!a,g=!!a&&a.duration>0,m=f(t,e,r);((u=i.selectAll(\"g.trace\").data(m,(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(e){var i=o(n.select(this),\"g\",\"fills\");l.setClipUrl(i,r.layerClipId,t);var a=e[0].trace,c=[];a._ownfill&&c.push(\"_ownFill\"),a._nexttrace&&c.push(\"_nextFill\");var u=i.selectAll(\"g\").data(c,s);u.enter().append(\"g\"),u.exit().each((function(t){a[t]=null})).remove(),u.order().each((function(t){a[t]=o(n.select(this),\"path\",\"js-fill\")}))}))}(t,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,m,this,a)}))}))):u.each((function(r,n){p(t,n,e,r,m,this,a)}));d&&u.exit().remove(),i.selectAll(\"path:not([d])\").remove()}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/polygon\":515,\"../../registry\":638,\"./line_points\":940,\"./link_traces\":942,\"./subtypes\":951,\"@plotly/d3\":58}],948:[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;r0){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-1?-1:t.indexOf(\"right\")>-1?1:0}function b(t){return null==t?0:t.indexOf(\"top\")>-1?-1:t.indexOf(\"bottom\")>-1?1:0}function _(t,e){return e(4*t)}function w(t){return p[t]}function T(t,e,r,n,i){var a=null;if(l.isArrayOrTypedArray(t)){a=[];for(var o=0;o=0){var g=function(t,e,r){var n,i=(r+1)%3,a=(r+2)%3,o=[],l=[];for(n=0;n=0&&f(\"surfacecolor\",h||p);for(var d=[\"x\",\"y\",\"z\"],g=0;g<3;++g){var m=\"projection.\"+d[g];f(m+\".show\")&&(f(m+\".opacity\"),f(m+\".scale\"))}var v=n.getComponentMethod(\"errorbars\",\"supplyDefaults\");v(t,e,h||p||r,{axis:\"z\"}),v(t,e,h||p||r,{axis:\"y\",inherit:\"z\"}),v(t,e,h||p||r,{axis:\"x\",inherit:\"z\"})}else e.visible=!1}},{\"../../lib\":503,\"../../registry\":638,\"../scatter/line_defaults\":939,\"../scatter/marker_defaults\":945,\"../scatter/subtypes\":951,\"../scatter/text_defaults\":952,\"./attributes\":954}],959:[function(t,e,r){\"use strict\";e.exports={plot:t(\"./convert\"),attributes:t(\"./attributes\"),markerSymbols:t(\"../../constants/gl3d_markers\"),supplyDefaults:t(\"./defaults\"),colorbar:[{container:\"marker\",min:\"cmin\",max:\"cmax\"},{container:\"line\",min:\"cmin\",max:\"cmax\"}],calc:t(\"./calc\"),moduleType:\"trace\",name:\"scatter3d\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../constants/gl3d_markers\":477,\"../../plots/gl3d\":598,\"./attributes\":954,\"./calc\":955,\"./convert\":957,\"./defaults\":958}],960:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../../plots/template_attributes\").texttemplateAttrs,s=t(\"../../components/colorscale/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=n.marker,u=n.line,f=c.line;e.exports={carpet:{valType:\"string\",editType:\"calc\"},a:{valType:\"data_array\",editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},mode:l({},n.mode,{dflt:\"markers\"}),text:l({},n.text,{}),texttemplate:o({editType:\"plot\"},{keys:[\"a\",\"b\",\"text\"]}),hovertext:l({},n.hovertext,{}),line:{color:u.color,width:u.width,dash:u.dash,shape:l({},u.shape,{values:[\"linear\",\"spline\"]}),smoothing:u.smoothing,editType:\"calc\"},connectgaps:n.connectgaps,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\"},s(\"marker.line\")),gradient:c.gradient,editType:\"calc\"},s(\"marker\")),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:l({},i.hoverinfo,{flags:[\"a\",\"b\",\"text\",\"name\"]}),hoveron:n.hoveron,hovertemplate:a()}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926}],961:[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\")}return o}function y(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,\"\"):t._hovertitle,m.push(r+\": \"+e.toFixed(3)+t.labelsuffix)}}},{\"../../lib\":503,\"../scatter/hover\":937}],966:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../scatter/select\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"scattercarpet\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"svg\",\"carpet\",\"symbols\",\"showLegend\",\"carpetDependent\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":960,\"./calc\":961,\"./defaults\":962,\"./event_data\":963,\"./format_labels\":964,\"./hover\":965,\"./plot\":967}],967:[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\")}(c,g,t,l[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}},{\"../../components/fx\":406,\"../../constants/numerical\":479,\"../../lib\":503,\"../scatter/get_trace_color\":936,\"./attributes\":968}],974:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),calcGeoJSON:t(\"./plot\").calcGeoJSON,plot:t(\"./plot\").plot,style:t(\"./style\"),styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"scattergeo\",basePlotModule:t(\"../../plots/geo\"),categories:[\"geo\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/geo\":589,\"../scatter/marker_colorbar\":944,\"../scatter/style\":950,\"./attributes\":968,\"./calc\":969,\"./defaults\":970,\"./event_data\":971,\"./format_labels\":972,\"./hover\":973,\"./plot\":975,\"./select\":976,\"./style\":977}],975:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../lib/topojson_utils\").getTopojsonFeatures,o=t(\"../../lib/geojson_utils\"),s=t(\"../../lib/geo_location_utils\"),l=t(\"../../plots/cartesian/autorange\").findExtremes,c=t(\"../../constants/numerical\").BADNUM,u=t(\"../scatter/calc\").calcMarkerSize,f=t(\"../scatter/subtypes\"),h=t(\"./style\");e.exports={calcGeoJSON:function(t,e){var r,n,i=t[0].trace,o=e[i.geo],f=o._subplot,h=i._length;if(Array.isArray(i.locations)){var p=i.locationmode,d=\"geojson-id\"===p?s.extractTraceFeature(t):a(i,f.topojson);for(r=0;r=m,w=2*b,T={},k=l.makeCalcdata(e,\"x\"),A=y.makeCalcdata(e,\"y\"),M=s(e,l,\"x\",k),S=s(e,y,\"y\",A),E=M.vals,L=S.vals;e._x=E,e._y=L,e.xperiodalignment&&(e._origX=k,e._xStarts=M.starts,e._xEnds=M.ends),e.yperiodalignment&&(e._origY=A,e._yStarts=S.starts,e._yEnds=S.ends);var C=new Array(w),P=new Array(b);for(r=0;r1&&i.extendFlat(s.line,p.linePositions(t,r,n));if(s.errorX||s.errorY){var l=p.errorBarPositions(t,r,n,a,o);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}s.text&&(i.extendFlat(s.text,{positions:n},p.textPosition(t,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},p.textPosition(t,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},p.textPosition(t,r,s.text,s.markerUnsel)));return s}(t,0,e,C,E,L),z=d(t,x);return f(o,e),_?O.marker&&(I=O.marker.sizeAvg||Math.max(O.marker.size,3)):I=c(e,b),u(t,e,l,y,E,L,I),O.errorX&&v(e,l,O.errorX),O.errorY&&v(e,y,O.errorY),O.fill&&!z.fill2d&&(z.fill2d=!0),O.marker&&!z.scatter2d&&(z.scatter2d=!0),O.line&&!z.line2d&&(z.line2d=!0),!O.errorX&&!O.errorY||z.error2d||(z.error2d=!0),O.text&&!z.glText&&(z.glText=!0),O.marker&&(O.marker.snap=b),z.lineOptions.push(O.line),z.errorXOptions.push(O.errorX),z.errorYOptions.push(O.errorY),z.fillOptions.push(O.fill),z.markerOptions.push(O.marker),z.markerSelectedOptions.push(O.markerSel),z.markerUnselectedOptions.push(O.markerUnsel),z.textOptions.push(O.text),z.textSelectedOptions.push(O.textSel),z.textUnselectedOptions.push(O.textUnsel),z.selectBatch.push([]),z.unselectBatch.push([]),T._scene=z,T.index=z.count,T.x=E,T.y=L,T.positions=C,z.count++,[{x:!1,y:!1,t:T,trace:e}]}},{\"../../constants/numerical\":479,\"../../lib\":503,\"../../plots/cartesian/align_period\":551,\"../../plots/cartesian/autorange\":553,\"../../plots/cartesian/axis_ids\":558,\"../scatter/calc\":927,\"../scatter/colorscale_calc\":929,\"./constants\":980,\"./convert\":981,\"./scene_update\":989,\"@plotly/point-cluster\":59}],980:[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]}}},{}],981:[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(\"./helpers\"),d=t(\"./constants\"),g=t(\"../../constants/interactions\").DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=t(\"../../components/fx/helpers\").appendArrayPointValue;function y(t,e){var r,i=t._fullLayout,a=e._length,o=e.textfont,l=e.textposition,c=Array.isArray(l)?l:[l],u=o.color,f=o.size,h=o.family,p={},d=t._context.plotGlPixelRatio,g=e.texttemplate;if(g){p.text=[];var m=i._d3locale,y=Array.isArray(g),x=y?Math.min(g.length,a):a,b=y?function(t){return g[t]}:function(){return g};for(r=0;rd.TOO_MANY_POINTS||f.hasMarkers(e)?\"rect\":\"round\";if(c&&e.connectgaps){var h=n[0],p=n[1];for(i=0;i1?l[i]:l[0]:l,d=Array.isArray(c)?c.length>1?c[i]:c[0]:c,g=m[p],v=m[d],y=u?u/.8+1:0,x=-v*y-.5*v;o.offset[i]=[g*y/h,x/h]}}return o}}},{\"../../components/drawing\":388,\"../../components/fx/helpers\":402,\"../../constants/interactions\":478,\"../../lib\":503,\"../../lib/gl_format_color\":499,\"../../plots/cartesian/axis_ids\":558,\"../../registry\":638,\"../scatter/make_bubble_size_func\":943,\"../scatter/subtypes\":951,\"./constants\":980,\"./helpers\":985,\"color-normalize\":89,\"fast-isnumeric\":190,\"svg-path-sdf\":310}],982:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"./helpers\"),o=t(\"./attributes\"),s=t(\"../scatter/constants\"),l=t(\"../scatter/subtypes\"),c=t(\"../scatter/xy_defaults\"),u=t(\"../scatter/period_defaults\"),f=t(\"../scatter/marker_defaults\"),h=t(\"../scatter/line_defaults\"),p=t(\"../scatter/fillcolor_defaults\"),d=t(\"../scatter/text_defaults\");e.exports=function(t,e,r,g){function m(r,i){return n.coerce(t,e,o,r,i)}var v=!!t.marker&&a.isOpenSymbol(t.marker.symbol),y=l.isBubble(t),x=c(t,e,g,m);if(x){u(t,e,g,m),m(\"xhoverformat\"),m(\"yhoverformat\");var b=x100},r.isDotSymbol=function(t){return\"string\"==typeof t?n.DOT_RE.test(t):t>200}},{\"./constants\":980}],986:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../scatter/get_trace_color\");function o(t,e,r,o){var s=t.xa,l=t.ya,c=t.distance,u=t.dxy,f=t.index,h={pointNumber:f,x:e[f],y:r[f]};h.tx=Array.isArray(o.text)?o.text[f]:o.text,h.htx=Array.isArray(o.hovertext)?o.hovertext[f]:o.hovertext,h.data=Array.isArray(o.customdata)?o.customdata[f]:o.customdata,h.tp=Array.isArray(o.textposition)?o.textposition[f]:o.textposition;var p=o.textfont;p&&(h.ts=i.isArrayOrTypedArray(p.size)?p.size[f]:p.size,h.tc=Array.isArray(p.color)?p.color[f]:p.color,h.tf=Array.isArray(p.family)?p.family[f]:p.family);var d=o.marker;d&&(h.ms=i.isArrayOrTypedArray(d.size)?d.size[f]:d.size,h.mo=i.isArrayOrTypedArray(d.opacity)?d.opacity[f]:d.opacity,h.mx=i.isArrayOrTypedArray(d.symbol)?d.symbol[f]:d.symbol,h.mc=i.isArrayOrTypedArray(d.color)?d.color[f]:d.color);var g=d&&d.line;g&&(h.mlc=Array.isArray(g.color)?g.color[f]:g.color,h.mlw=i.isArrayOrTypedArray(g.width)?g.width[f]:g.width);var m=d&&d.gradient;m&&\"none\"!==m.type&&(h.mgt=Array.isArray(m.type)?m.type[f]:m.type,h.mgc=Array.isArray(m.color)?m.color[f]:m.color);var v=s.c2p(h.x,!0),y=l.c2p(h.y,!0),x=h.mrc||1,b=o.hoverlabel;b&&(h.hbg=Array.isArray(b.bgcolor)?b.bgcolor[f]:b.bgcolor,h.hbc=Array.isArray(b.bordercolor)?b.bordercolor[f]:b.bordercolor,h.hts=i.isArrayOrTypedArray(b.font.size)?b.font.size[f]:b.font.size,h.htc=Array.isArray(b.font.color)?b.font.color[f]:b.font.color,h.htf=Array.isArray(b.font.family)?b.font.family[f]:b.font.family,h.hnl=i.isArrayOrTypedArray(b.namelength)?b.namelength[f]:b.namelength);var _=o.hoverinfo;_&&(h.hi=Array.isArray(_)?_[f]:_);var w=o.hovertemplate;w&&(h.ht=Array.isArray(w)?w[f]:w);var T={};T[t.index]=h;var k=o._origX,A=o._origY,M=i.extendFlat({},t,{color:a(o,h),x0:v-x,x1:v+x,xLabelVal:k?k[f]:h.x,y0:y-x,y1:y+x,yLabelVal:A?A[f]:h.y,cd:T,distance:c,spikeDistance:u,hovertemplate:h.ht});return h.htx?M.text=h.htx:h.tx?M.text=h.tx:o.text&&(M.text=o.text),i.fillText(h,o,M),n.getComponentMethod(\"errorbars\",\"hoverInfo\")(h,o,M),M}e.exports={hoverPoints:function(t,e,r,n){var i,a,s,l,c,u,f,h,p,d,g=t.cd,m=g[0].t,v=g[0].trace,y=t.xa,x=t.ya,b=m.x,_=m.y,w=y.c2p(e),T=x.c2p(r),k=t.distance;if(m.tree){var A=y.p2c(w-k),M=y.p2c(w+k),S=x.p2c(T-k),E=x.p2c(T+k);i=\"x\"===n?m.tree.range(Math.min(A,M),Math.min(x._rl[0],x._rl[1]),Math.max(A,M),Math.max(x._rl[0],x._rl[1])):m.tree.range(Math.min(A,M),Math.min(S,E),Math.max(A,M),Math.max(S,E))}else i=m.ids;var L=k;if(\"x\"===n){var C=!!v.xperiodalignment,P=!!v.yperiodalignment;for(u=0;u=Math.min(I,O)&&w<=Math.max(I,O)?0:1/0}if(f=Math.min(z,D)&&T<=Math.max(z,D)?0:1/0}d=Math.sqrt(f*f+h*h),s=i[u]}}}else for(u=i.length-1;u>-1;u--)l=b[a=i[u]],c=_[a],f=y.c2p(l)-w,h=x.c2p(c)-T,(p=Math.sqrt(f*f+h*h))v.glText.length){var w=b-v.glText.length;for(d=0;dr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t})),v.line2d.update(v.lineOptions)),v.error2d){var k=(v.errorXOptions||[]).concat(v.errorYOptions||[]);v.error2d.update(k)}v.scatter2d&&v.scatter2d.update(v.markerOptions),v.fillOrder=s.repeat(null,b),v.fill2d&&(v.fillOptions=v.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=v.lineOptions[e],u=[];s._ownfill&&u.push(e),s._nexttrace&&u.push(e+1),u.length&&(v.fillOrder[e]=u);var f,h,p=[],d=c&&c.positions||l.positions;if(\"tozeroy\"===s.fill){for(f=0;ff&&isNaN(d[h+1]);)h-=2;0!==d[f+1]&&(p=[d[f],0]),p=p.concat(d.slice(f,h+2)),0!==d[h+1]&&(p=p.concat([d[h],0]))}else if(\"tozerox\"===s.fill){for(f=0;ff&&isNaN(d[h]);)h-=2;0!==d[f]&&(p=[0,d[f+1]]),p=p.concat(d.slice(f,h+2)),0!==d[h]&&(p=p.concat([0,d[h+1]]))}else if(\"toself\"===s.fill||\"tonext\"===s.fill){for(p=[],i=0,t.splitNull=!0,a=0;a-1;for(d=0;d\")}function u(t){return t+\"\\xb0\"}}e.exports={hoverPoints:function(t,e,r){var o=t.cd,c=o[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(o,(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=o[t.index],m=g.lonlat,v=[i.modHalf(m[0],360)+p,m[1]],y=u.c2p(v),x=f.c2p(v),b=g.mrc||1;t.x0=y-b,t.x1=y+b,t.y0=x-b,t.y1=x+b;var _={};_[c.subplot]={_subplot:h};var w=c._module.formatLabels(g,c,_);return t.lonLabel=w.lonLabel,t.latLabel=w.latLabel,t.color=a(c,g),t.extraText=l(c,g,o[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}},getExtraText:l}},{\"../../components/fx\":406,\"../../constants/numerical\":479,\"../../lib\":503,\"../scatter/get_trace_color\":936}],997:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"../scattergeo/calc\"),plot:t(\"./plot\"),hoverPoints:t(\"./hover\").hoverPoints,eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),styleOnSelect:function(t,e){e&&e[0].trace._glTrace.update(e)},moduleType:\"trace\",name:\"scattermapbox\",basePlotModule:t(\"../../plots/mapbox\"),categories:[\"mapbox\",\"gl\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/mapbox\":613,\"../scatter/marker_colorbar\":944,\"../scattergeo/calc\":969,\"./attributes\":991,\"./defaults\":993,\"./event_data\":994,\"./format_labels\":995,\"./hover\":996,\"./plot\":998,\"./select\":999}],998:[function(t,e,r){\"use strict\";var n=t(\"./convert\"),i=t(\"../../plots/mapbox/constants\").traceLayerPrefix,a=[\"fill\",\"line\",\"circle\",\"symbol\"];function o(t,e){this.type=\"scattermapbox\",this.subplot=t,this.uid=e,this.sourceIds={fill:\"source-\"+e+\"-fill\",line:\"source-\"+e+\"-line\",circle:\"source-\"+e+\"-circle\",symbol:\"source-\"+e+\"-symbol\"},this.layerIds={fill:i+e+\"-fill\",line:i+e+\"-line\",circle:i+e+\"-circle\",symbol:i+e+\"-symbol\"},this.below=null}var s=o.prototype;s.addSource=function(t,e){this.subplot.map.addSource(this.sourceIds[t],{type:\"geojson\",data:e.geojson})},s.setSourceData=function(t,e){this.subplot.map.getSource(this.sourceIds[t]).setData(e.geojson)},s.addLayer=function(t,e,r){this.subplot.addLayer({type:t,id:this.layerIds[t],source:this.sourceIds[t],layout:e.layout,paint:e.paint},r)},s.update=function(t){var e,r,i,o=this.subplot,s=o.map,l=n(o.gd,t),c=o.belowLookup[\"trace-\"+this.uid];if(c!==this.below){for(e=a.length-1;e>=0;e--)r=a[e],s.removeLayer(this.layerIds[r]);for(e=0;e=0;e--){var r=a[e];t.removeLayer(this.layerIds[r]),t.removeSource(this.sourceIds[r])}},e.exports=function(t,e){for(var r=e[0].trace,i=new o(t,r.uid),s=n(t.gd,e),l=i.below=t.belowLookup[\"trace-\"+r.uid],c=0;c\")}}e.exports={hoverPoints: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)return o;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,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}},{\"../scatter/hover\":937}],1005:[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\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"../scatter/select\"),meta:{}}},{\"../../plots/polar\":622,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":1e3,\"./calc\":1001,\"./defaults\":1002,\"./format_labels\":1003,\"./hover\":1004,\"./plot\":1006}],1006:[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=c&&(y.marker.cluster=d.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=_),y.line&&_.length>1&&l.extendFlat(y.line,s.linePositions(t,p,_)),y.text&&(l.extendFlat(y.text,{positions:_},s.textPosition(t,p,y.text,y.marker)),l.extendFlat(y.textSel,{positions:_},s.textPosition(t,p,y.text,y.markerSel)),l.extendFlat(y.textUnsel,{positions:_},s.textPosition(t,p,y.text,y.markerUnsel))),y.fill&&!h.fill2d&&(h.fill2d=!0),y.marker&&!h.scatter2d&&(h.scatter2d=!0),y.line&&!h.line2d&&(h.line2d=!0),y.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(y.line),h.fillOptions.push(y.fill),h.markerOptions.push(y.marker),h.markerSelectedOptions.push(y.markerSel),h.markerUnselectedOptions.push(y.markerUnsel),h.textOptions.push(y.text),h.textSelectedOptions.push(y.textSel),h.textUnselectedOptions.push(y.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),d.x=w,d.y=T,d.rawx=w,d.rawy=T,d.r=m,d.theta=v,d.positions=_,d._scene=h,d.index=h.count,h.count++}})),a(t,e,r)}}},{\"../../lib\":503,\"../scattergl/constants\":980,\"../scattergl/convert\":981,\"../scattergl/plot\":988,\"../scattergl/scene_update\":989,\"@plotly/point-cluster\":59,\"fast-isnumeric\":190}],1014:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../plots/template_attributes\").texttemplateAttrs,a=t(\"../../lib/extend\").extendFlat,o=t(\"../scatter/attributes\"),s=t(\"../../plots/attributes\"),l=o.line;e.exports={mode:o.mode,real:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},imag:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},text:o.text,texttemplate:i({editType:\"plot\"},{keys:[\"real\",\"imag\",\"text\"]}),hovertext:o.hovertext,line:{color:l.color,width:l.width,dash:l.dash,shape:a({},l.shape,{values:[\"linear\",\"spline\"]}),smoothing:l.smoothing,editType:\"calc\"},connectgaps:o.connectgaps,marker:o.marker,cliponaxis:a({},o.cliponaxis,{dflt:!1}),textposition:o.textposition,textfont:o.textfont,fill:a({},o.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:o.fillcolor,hoverinfo:a({},s.hoverinfo,{flags:[\"real\",\"imag\",\"text\",\"name\"]}),hoveron:o.hoveron,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{\"../../lib/extend\":493,\"../../plots/attributes\":550,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926}],1015:[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(\"../scatter/calc\").calcMarkerSize;e.exports=function(t,e){for(var r=t._fullLayout,c=e.subplot,u=r[c].realaxis,f=r[c].imaginaryaxis,h=u.makeCalcdata(e,\"real\"),p=f.makeCalcdata(e,\"imag\"),d=e._length,g=new Array(d),m=0;m\")}}e.exports={hoverPoints: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)return o;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,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}},{\"../scatter/hover\":937}],1019:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"scattersmith\",basePlotModule:t(\"../../plots/smith\"),categories:[\"smith\",\"symbols\",\"showLegend\",\"scatter-like\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"../scatter/select\"),meta:{}}},{\"../../plots/smith\":629,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":1014,\"./calc\":1015,\"./defaults\":1016,\"./format_labels\":1017,\"./hover\":1018,\"./plot\":1020}],1020:[function(t,e,r){\"use strict\";var n=t(\"../scatter/plot\"),i=t(\"../../constants/numerical\").BADNUM,a=t(\"../../plots/smith/helpers\").smith;e.exports=function(t,e,r){for(var o=e.layers.frontplot.select(\"g.scatterlayer\"),s={xaxis:e.xaxis,yaxis:e.yaxis,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},l=0;l\"),o.hovertemplate=h.hovertemplate,a}function x(t,e){v.push(t._hovertitle+\": \"+e)}}},{\"../scatter/hover\":937}],1027:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../scatter/select\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"scatterternary\",basePlotModule:t(\"../../plots/ternary\"),categories:[\"ternary\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/ternary\":634,\"../scatter/marker_colorbar\":944,\"../scatter/select\":948,\"../scatter/style\":950,\"./attributes\":1021,\"./calc\":1022,\"./defaults\":1023,\"./event_data\":1024,\"./format_labels\":1025,\"./hover\":1026,\"./plot\":1028}],1028:[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\":947}],1029:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../scattergl/attributes\"),l=t(\"../../plots/cartesian/constants\").idRegex,c=t(\"../../plot_api/plot_template\").templatedArray,u=t(\"../../lib/extend\").extendFlat,f=n.marker,h=f.line,p=u(i(\"marker.line\",{editTypeOverride:\"calc\"}),{width:u({},h.width,{editType:\"calc\"}),editType:\"calc\"}),d=u(i(\"marker\"),{symbol:f.symbol,size:u({},f.size,{editType:\"markerSize\"}),sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:f.opacity,colorbar:f.colorbar,line:p,editType:\"calc\"});function g(t){return{valType:\"info_array\",freeLength:!0,editType:\"calc\",items:{valType:\"subplotid\",regex:l[t],editType:\"plot\"}}}d.color.editType=d.cmin.editType=d.cmax.editType=\"style\",e.exports={dimensions:c(\"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\"},matches:{valType:\"boolean\",dflt:!1,editType:\"calc\"},editType:\"calc+clearAxisTypes\"},editType:\"calc+clearAxisTypes\"}),text:u({},s.text,{}),hovertext:u({},s.hovertext,{}),hovertemplate:o(),xhoverformat:a(\"x\"),yhoverformat:a(\"y\"),marker:d,xaxes:g(\"x\"),yaxes:g(\"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:s.selected.marker,editType:\"calc\"},unselected:{marker:s.unselected.marker,editType:\"calc\"},opacity:s.opacity}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/plot_template\":543,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/cartesian/constants\":561,\"../../plots/template_attributes\":633,\"../scatter/attributes\":926,\"../scattergl/attributes\":978}],1030:[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;function u(t,e,r){for(var n=r.matrixOptions.data.length,i=e._visibleDims,a=r.viewOpts.ranges=new Array(n),o=0;oh?b.sizeAvg||Math.max(b.size,3):a(e,x),p=0;pa&&l||i-1,P=!0;if(o(x)||!!p.selectedpoints||C){var I=p._length;if(p.selectedpoints){g.selectBatch=p.selectedpoints;var O=p.selectedpoints,z={};for(l=0;l1&&(u=g[y-1],h=m[y-1],d=v[y-1]),e=0;eu?\"-\":\"+\")+\"x\")).replace(\"y\",(f>h?\"-\":\"+\")+\"y\")).replace(\"z\",(p>d?\"-\":\"+\")+\"z\");var L=function(){y=0,M=[],S=[],E=[]};(!y||y2?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,u=e._len,f={};function d(t,e){var n=r[e],o=i[c[e]];return a.simpleMap(t,(function(t){return n.d2l(t)*o}))}if(f.vectors=l(d(e._u,\"xaxis\"),d(e._v,\"yaxis\"),d(e._w,\"zaxis\"),u),!u)return{positions:[],cells:[]};var g=d(e._Xs,\"xaxis\"),m=d(e._Ys,\"yaxis\"),v=d(e._Zs,\"zaxis\");if(f.meshgrid=[g,m,v],f.gridFill=e._gridFill,e._slen)f.startingPositions=l(d(e._startsX,\"xaxis\"),d(e._startsY,\"yaxis\"),d(e._startsZ,\"zaxis\"));else{for(var y=m[0],x=h(g),b=h(v),_=new Array(x.length*b.length),w=0,T=0;T=0};v?(r=Math.min(m.length,x.length),l=function(t){return A(m[t])&&M(t)},f=function(t){return String(m[t])}):(r=Math.min(y.length,x.length),l=function(t){return A(y[t])&&M(t)},f=function(t){return String(y[t])}),_&&(r=Math.min(r,b.length));for(var S=0;S1){for(var P=a.randstr(),I=0;I\"),name:A||z(\"name\")?y.name:void 0,color:k(\"hoverlabel.bgcolor\")||x.color,borderColor:k(\"hoverlabel.bordercolor\"),fontFamily:k(\"hoverlabel.font.family\"),fontSize:k(\"hoverlabel.font.size\"),fontColor:k(\"hoverlabel.font.color\"),nameLength:k(\"hoverlabel.namelength\"),textAlign:k(\"hoverlabel.align\"),hovertemplate:A,hovertemplateLabels:P,eventData:l};m&&(F.x0=E-i.rInscribed*i.rpx1,F.x1=E+i.rInscribed*i.rpx1,F.idealAlign=i.pxmid[0]<0?\"left\":\"right\"),v&&(F.x=E,F.idealAlign=E<0?\"left\":\"right\");var B=[];o.loneHover(F,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:r,inOut_bbox:B}),l[0].bbox=B[0],d._hasHoverLabel=!0}if(v){var N=t.select(\"path.surface\");h.styleOne(N,i,y,{hovered:!0})}d._hasHoverEvent=!0,r.emit(\"plotly_hover\",{points:l||[f(i,y,h.eventDataKeys)],event:n.event})}})),t.on(\"mouseout\",(function(e){var i=r._fullLayout,a=r._fullData[d.index],s=n.select(this).datum();if(d._hasHoverEvent&&(e.originalEvent=n.event,r.emit(\"plotly_unhover\",{points:[f(s,a,h.eventDataKeys)],event:n.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(o.loneUnhover(i._hoverlayer.node()),d._hasHoverLabel=!1),v){var l=t.select(\"path.surface\");h.styleOne(l,s,a,{hovered:!1})}})),t.on(\"click\",(function(t){var e=r._fullLayout,a=r._fullData[d.index],s=m&&(c.isHierarchyRoot(t)||c.isLeaf(t)),u=c.getPtId(t),p=c.isEntry(t)?c.findEntryWithChild(g,u):c.findEntryWithLevel(g,u),v=c.getPtId(p),y={points:[f(t,a,h.eventDataKeys)],event:n.event};s||(y.nextLevel=v);var x=l.triggerHandler(r,\"plotly_\"+d.type+\"click\",y);if(!1!==x&&e.hovermode&&(r._hoverdata=[f(t,a,h.eventDataKeys)],o.click(r,n.event)),!s&&!1!==x&&!r._dragging&&!r._transitioning){i.call(\"_storeDirectGUIEdit\",a,e._tracePreGUI[a.uid],{level:a.level});var b={data:[{level:v}],traces:[d.index]},_={frame:{redraw:!1,duration:h.transitionTime},transition:{duration:h.transitionTime,easing:h.transitionEasing},mode:\"immediate\",fromcurrent:!0};o.loneUnhover(e._hoverlayer.node()),i.call(\"animate\",r,b,_)}}))}},{\"../../components/fx\":406,\"../../components/fx/helpers\":402,\"../../lib\":503,\"../../lib/events\":492,\"../../registry\":638,\"../pie/helpers\":905,\"./helpers\":1051,\"@plotly/d3\":58}],1051:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\"),a=t(\"../../lib/setcursor\"),o=t(\"../pie/helpers\");function s(t){return t.data.data.pid}r.findEntryWithLevel=function(t,e){var n;return e&&t.eachAfter((function(t){if(r.getPtId(t)===e)return n=t.copy()})),n||t},r.findEntryWithChild=function(t,e){var n;return t.eachAfter((function(t){for(var i=t.children||[],a=0;a0)},r.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},r.isHeader=function(t,e){return!(r.isLeaf(t)||t.depth===e._maxDepth-1)},r.getParent=function(t,e){return r.findEntryWithLevel(t,s(e))},r.listPath=function(t,e){var n=t.parent;if(!n)return[];var i=e?[n.data[e]]:[n];return r.listPath(n,e).concat(i)},r.getPath=function(t){return r.listPath(t,\"label\").join(\"/\")+\"/\"},r.formatValue=o.formatPieValue,r.formatPercent=function(t,e){var r=n.formatPercent(t,0);return\"0%\"===r&&(r=o.formatPiePercent(t,e)),r}},{\"../../components/color\":366,\"../../lib\":503,\"../../lib/setcursor\":524,\"../pie/helpers\":905}],1052:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"sunburst\",basePlotModule:t(\"./base_plot\"),categories:[],animatable:!0,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\").plot,style:t(\"./style\").style,colorbar:t(\"../scatter/marker_colorbar\"),meta:{}}},{\"../scatter/marker_colorbar\":944,\"./attributes\":1045,\"./base_plot\":1046,\"./calc\":1047,\"./defaults\":1049,\"./layout_attributes\":1053,\"./layout_defaults\":1054,\"./plot\":1055,\"./style\":1056}],1053:[function(t,e,r){\"use strict\";e.exports={sunburstcolorway:{valType:\"colorlist\",editType:\"calc\"},extendsunburstcolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],1054:[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(\"sunburstcolorway\",e.colorway),r(\"extendsunburstcolors\")}},{\"../../lib\":503,\"./layout_attributes\":1053}],1055:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-hierarchy\"),a=t(\"d3-interpolate\").interpolate,o=t(\"../../components/drawing\"),s=t(\"../../lib\"),l=t(\"../../lib/svg_text_utils\"),c=t(\"../bar/uniform_text\"),u=c.recordMinTextSize,f=c.clearMinTextSize,h=t(\"../pie/plot\"),p=t(\"../pie/helpers\").getRotationAngle,d=h.computeTransform,g=h.transformInsideText,m=t(\"./style\").styleOne,v=t(\"../bar/style\").resizeText,y=t(\"./fx\"),x=t(\"./constants\"),b=t(\"./helpers\");function _(t,e,c,f){var h=t._fullLayout,v=!h.uniformtext.mode&&b.hasTransition(f),_=n.select(c).selectAll(\"g.slice\"),T=e[0],k=T.trace,A=T.hierarchy,M=b.findEntryWithLevel(A,k.level),S=b.getMaxDepth(k),E=h._size,L=k.domain,C=E.w*(L.x[1]-L.x[0]),P=E.h*(L.y[1]-L.y[0]),I=.5*Math.min(C,P),O=T.cx=E.l+E.w*(L.x[1]+L.x[0])/2,z=T.cy=E.t+E.h*(1-L.y[0])-P/2;if(!M)return _.remove();var D=null,R={};v&&_.each((function(t){R[b.getPtId(t)]={rpx0:t.rpx0,rpx1:t.rpx1,x0:t.x0,x1:t.x1,transform:t.transform},!D&&b.isEntry(t)&&(D=t)}));var F=function(t){return i.partition().size([2*Math.PI,t.height+1])(t)}(M).descendants(),B=M.height+1,N=0,j=S;T.hasMultipleRoots&&b.isHierarchyRoot(M)&&(F=F.slice(1),B-=1,N=1,j+=1),F=F.filter((function(t){return t.y1<=j}));var U=p(k.rotation);U&&F.forEach((function(t){t.x0+=U,t.x1+=U}));var V=Math.min(B,S),H=function(t){return(t-N)/V*I},q=function(t,e){return[t*Math.cos(e),-t*Math.sin(e)]},G=function(t){return s.pathAnnulus(t.rpx0,t.rpx1,t.x0,t.x1,O,z)},Y=function(t){return O+w(t)[0]*(t.transform.rCenter||0)+(t.transform.x||0)},W=function(t){return z+w(t)[1]*(t.transform.rCenter||0)+(t.transform.y||0)};(_=_.data(F,b.getPtId)).enter().append(\"g\").classed(\"slice\",!0),v?_.exit().transition().each((function(){var t=n.select(this);t.select(\"path.surface\").transition().attrTween(\"d\",(function(t){var e=function(t){var e,r=b.getPtId(t),n=R[r],i=R[b.getPtId(M)];if(i){var o=(t.x1>i.x1?2*Math.PI:0)+U;e=t.rpx1X?2*Math.PI:0)+U;e={x0:i,x1:i}}else e={rpx0:I,rpx1:I},s.extendFlat(e,K(t));else e={rpx0:0,rpx1:0};else e={x0:U,x1:U};return a(e,n)}(t);return function(t){return G(e(t))}})):f.attr(\"d\",G),c.call(y,M,t,e,{eventDataKeys:x.eventDataKeys,transitionTime:x.CLICK_TRANSITION_TIME,transitionEasing:x.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,t,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:t._transitioning}),f.call(m,i,k);var p=s.ensureSingle(c,\"g\",\"slicetext\"),_=s.ensureSingle(p,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),w=s.ensureUniformFontSize(t,b.determineTextFont(k,i,h.font));_.text(r.formatSliceLabel(i,M,k,e,h)).classed(\"slicetext\",!0).attr(\"text-anchor\",\"middle\").call(o.font,w).call(l.convertToTspans,t);var A=o.bBox(_.node());i.transform=g(A,i,T),i.transform.targetX=Y(i),i.transform.targetY=W(i);var S=function(t,e){var r=t.transform;return d(r,e),r.fontSize=w.size,u(k.type,r,h),s.getTextTransform(r)};v?_.transition().attrTween(\"transform\",(function(t){var e=function(t){var e,r=R[b.getPtId(t)],n=t.transform;if(r)e=r;else if(e={rpx1:t.rpx1,transform:{textPosAngle:n.textPosAngle,scale:0,rotate:n.rotate,rCenter:n.rCenter,x:n.x,y:n.y}},D)if(t.parent)if(X){var i=t.x1>X?2*Math.PI:0;e.x0=e.x1=i}else s.extendFlat(e,K(t));else e.x0=e.x1=U;else e.x0=e.x1=U;var o=a(e.transform.textPosAngle,t.transform.textPosAngle),l=a(e.rpx1,t.rpx1),c=a(e.x0,t.x0),f=a(e.x1,t.x1),p=a(e.transform.scale,n.scale),d=a(e.transform.rotate,n.rotate),g=0===n.rCenter?3:0===e.transform.rCenter?1/3:1,m=a(e.transform.rCenter,n.rCenter);return function(t){var e=l(t),r=c(t),i=f(t),a=function(t){return m(Math.pow(t,g))}(t),s={pxmid:q(e,(r+i)/2),rpx1:e,transform:{textPosAngle:o(t),rCenter:a,x:n.x,y:n.y}};return u(k.type,n,h),{transform:{targetX:Y(s),targetY:W(s),scale:p(t),rotate:d(t),rCenter:a}}}}(t);return function(t){return S(e(t),A)}})):_.attr(\"transform\",S(i,A))}))}function w(t){return e=t.rpx1,r=t.transform.textPosAngle,[e*Math.sin(r),-e*Math.cos(r)];var e,r}r.plot=function(t,e,r,i){var a,o,s=t._fullLayout,l=s._sunburstlayer,c=!r,u=!s.uniformtext.mode&&b.hasTransition(r);(f(\"sunburst\",s),(a=l.selectAll(\"g.trace.sunburst\").data(e,(function(t){return t[0].trace.uid}))).enter().append(\"g\").classed(\"trace\",!0).classed(\"sunburst\",!0).attr(\"stroke-linejoin\",\"round\"),a.order(),u)?(i&&(o=i()),n.transition().duration(r.duration).ease(r.easing).each(\"end\",(function(){o&&o()})).each(\"interrupt\",(function(){o&&o()})).each((function(){l.selectAll(\"g.trace\").each((function(e){_(t,e,this,r)}))}))):(a.each((function(e){_(t,e,this,r)})),s.uniformtext.mode&&v(t,s._sunburstlayer.selectAll(\".trace\"),\"sunburst\"));c&&a.exit().remove()},r.formatSliceLabel=function(t,e,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!(a||o&&\"none\"!==o))return\"\";var l=i.separators,c=n[0],u=t.data.data,f=c.hierarchy,h=b.isHierarchyRoot(t),p=b.getParent(f,t),d=b.getValue(t);if(!a){var g,m=o.split(\"+\"),v=function(t){return-1!==m.indexOf(t)},y=[];if(v(\"label\")&&u.label&&y.push(u.label),u.hasOwnProperty(\"v\")&&v(\"value\")&&y.push(b.formatValue(u.v,l)),!h){v(\"current path\")&&y.push(b.getPath(t.data));var x=0;v(\"percent parent\")&&x++,v(\"percent entry\")&&x++,v(\"percent root\")&&x++;var _=x>1;if(x){var w,T=function(t){g=b.formatPercent(w,l),_&&(g+=\" of \"+t),y.push(g)};v(\"percent parent\")&&!h&&(w=d/b.getValue(p),T(\"parent\")),v(\"percent entry\")&&(w=d/b.getValue(e),T(\"entry\")),v(\"percent root\")&&(w=d/b.getValue(f),T(\"root\"))}}return v(\"text\")&&(g=s.castOption(r,u.i,\"text\"),s.isValidTextValue(g)&&y.push(g)),y.join(\"
\")}var k=s.castOption(r,u.i,\"texttemplate\");if(!k)return\"\";var A={};u.label&&(A.label=u.label),u.hasOwnProperty(\"v\")&&(A.value=u.v,A.valueLabel=b.formatValue(u.v,l)),A.currentPath=b.getPath(t.data),h||(A.percentParent=d/b.getValue(p),A.percentParentLabel=b.formatPercent(A.percentParent,l),A.parent=b.getPtLabel(p)),A.percentEntry=d/b.getValue(e),A.percentEntryLabel=b.formatPercent(A.percentEntry,l),A.entry=b.getPtLabel(e),A.percentRoot=d/b.getValue(f),A.percentRootLabel=b.formatPercent(A.percentRoot,l),A.root=b.getPtLabel(f),u.hasOwnProperty(\"color\")&&(A.color=u.color);var M=s.castOption(r,u.i,\"text\");return(s.isValidTextValue(M)||\"\"===M)&&(A.text=M),A.customdata=s.castOption(r,u.i,\"customdata\"),s.texttemplateString(k,A,i._d3locale,A,r._meta||{})}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../bar/style\":662,\"../bar/uniform_text\":664,\"../pie/helpers\":905,\"../pie/plot\":909,\"./constants\":1048,\"./fx\":1050,\"./helpers\":1051,\"./style\":1056,\"@plotly/d3\":58,\"d3-hierarchy\":115,\"d3-interpolate\":116}],1056:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../bar/uniform_text\").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,\"marker.line.color\")||i.defaultLine,c=a.castOption(r,s,\"marker.line.width\")||0;t.style(\"stroke-width\",c).call(i.fill,n.color).call(i.stroke,l).style(\"opacity\",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._sunburstlayer.selectAll(\".trace\");o(t,e,\"sunburst\"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style(\"opacity\",r.opacity),e.selectAll(\"path.surface\").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{\"../../components/color\":366,\"../../lib\":503,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],1057:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=t(\"../../plot_api/edit_types\").overrideAll;function u(t){return{show:{valType:\"boolean\",dflt:!1},start:{valType:\"number\",dflt:null,editType:\"plot\"},end:{valType:\"number\",dflt:null,editType:\"plot\"},size:{valType:\"number\",dflt:null,min:0,editType:\"plot\"},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 f=e.exports=c(l({z:{valType:\"data_array\"},x:{valType:\"data_array\"},y:{valType:\"data_array\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:o(),xhoverformat:a(\"x\"),yhoverformat:a(\"y\"),zhoverformat:a(\"z\"),connectgaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},surfacecolor:{valType:\"data_array\"}},i(\"\",{colorAttr:\"z or surfacecolor\",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:\"calc\"}),{contours:{x:u(),y:u(),z:u()},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},opacityscale:{valType:\"any\",editType:\"calc\"},_deprecated:{zauto:l({},i.zauto,{}),zmin:l({},i.zmin,{}),zmax:l({},i.zmax,{})},hoverinfo:l({},s.hoverinfo),showlegend:l({},s.showlegend,{dflt:!1})}),\"calc\",\"nested\");f.x.editType=f.y.editType=f.z.editType=\"calc+clearAxisTypes\",f.transforms=void 0},{\"../../components/color\":366,\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plot_api/edit_types\":536,\"../../plots/attributes\":550,\"../../plots/cartesian/axis_format_attributes\":557,\"../../plots/template_attributes\":633}],1058:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.surfacecolor?n(t,e,{vals:e.surfacecolor,containerStr:\"\",cLetter:\"c\"}):n(t,e,{vals:e.z,containerStr:\"\",cLetter:\"c\"})}},{\"../../components/colorscale/calc\":374}],1059:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_surface3d,i=t(\"../../../stackgl_modules\").ndarray,a=t(\"../../../stackgl_modules\").ndarray_linear_interpolate.d2,o=t(\"../heatmap/interp2d\"),s=t(\"../heatmap/find_empties\"),l=t(\"../../lib\").isArrayOrTypedArray,c=t(\"../../lib/gl_format_color\").parseColorScale,u=t(\"../../lib/str2rgbarray\"),f=t(\"../../components/colorscale\").extractOpts;function h(t,e,r){this.scene=t,this.uid=r,this.surface=e,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var p=h.prototype;p.getXat=function(t,e,r,n){var i=l(this.data.x)?l(this.data.x[0])?this.data.x[e][t]:this.data.x[t]:t;return void 0===r?i:n.d2l(i,0,r)},p.getYat=function(t,e,r,n){var i=l(this.data.y)?l(this.data.y[0])?this.data.y[e][t]:this.data.y[e]:e;return void 0===r?i:n.d2l(i,0,r)},p.getZat=function(t,e,r,n){var i=this.data.z[e][t];return null===i&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[e][t]),void 0===r?i:n.d2l(i,0,r)},p.handlePick=function(t){if(t.object===this.surface){var e=(t.data.index[0]-1)/this.dataScaleX-1,r=(t.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(e),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);t.index=[n,i],t.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],t.dataCoordinate=[this.getXat(n,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=t.dataCoordinate[a];null!=o&&(t.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return Array.isArray(s)&&s[i]&&void 0!==s[i][n]?t.textLabel=s[i][n]:t.textLabel=s||\"\",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}};var d=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function g(t,e){if(t0){r=d[n];break}return r}function y(t,e){if(!(t<1||e<1)){for(var r=m(t),n=m(e),i=1,a=0;a_;)r--,r/=v(r),++r1?n:1},p.refineCoords=function(t){for(var e=this.dataScaleX,r=this.dataScaleY,n=t[0].shape[0],a=t[0].shape[1],o=0|Math.floor(t[0].shape[0]*e+1),s=0|Math.floor(t[0].shape[1]*r+1),l=1+n+1,c=1+a+1,u=i(new Float32Array(l*c),[l,c]),f=[1/e,0,0,0,1/r,0,0,0,1],h=0;h0&&null!==this.contourStart[t]&&null!==this.contourEnd[t]&&this.contourEnd[t]>this.contourStart[t]))for(i[t]=!0,e=this.contourStart[t];ea&&(this.minValues[e]=a),this.maxValues[e]\",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\"}}},{}],1066:[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=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)}))),m=e.domain,v=Math.floor(t._fullLayout._size.w*(m.x[1]-m.x[0])),y=Math.floor(t._fullLayout._size.h*(m.y[1]-m.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),T=f(h(x,_),[]),k=f(w,T),A={},M=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})),E=S.reduce(s,0);S=S.map((function(t){return t/E*v}));var L=Math.max(o(e.header.line.width),o(e.cells.line.width)),C={key:e.uid+t._context.staticPlot,translateX:m.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-m.y[1]),size:t._fullLayout._size,width:v,maxLineWidth:L,height:y,columnOrder:M,groupHeight:y,rowBlocks:k,headerRowBlocks:T,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:M[e],xScale:u,x:void 0,calcdata:void 0,columnWidth:S[e]}}))};return C.columns.forEach((function(t){t.calcdata=C,t.x=u(t)})),C}},{\"../../lib/extend\":493,\"./constants\":1065,\"fast-isnumeric\":190}],1067:[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\":493}],1068:[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/i),l=!o||s;t.mayHaveMarkup=o&&i.match(/[<&>]/);var c,u=\"string\"==typeof(c=i)&&c.match(n.latexCheck);t.latex=u;var f,h,p=u?\"\":T(t.calcdata.cells.prefix,e,r)||\"\",d=u?\"\":T(t.calcdata.cells.suffix,e,r)||\"\",g=u?null:T(t.calcdata.cells.format,e,r)||null,m=p+(g?a(g)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&&!l&&!u&&(f=w(m)),t.cellHeightMayIncrease=s||u||t.mayHaveMarkup||(void 0===f?w(m):f),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var v=(\" \"===n.wrapSplitCharacter?m.replace(/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){var e=D(t.rowBlocks,t.page)-t.scrollY;return u(0,e)})),t&&(C(t,r,e,c,n.prevPages,n,0),C(t,r,e,c,n.prevPages,n,1),x(r,t))}}function L(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,u=s.scrollY;s.scrollY=void 0===a?s.scrollY+c*i.event.dy:a;var f=l.selectAll(\".\"+n.cn.yColumn).selectAll(\".\"+n.cn.columnBlock).filter(A);return E(t,f,l),s.scrollY===u}}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]}));b(t,e,a,r),i[o]=n[o]})))}function P(t,e,r,a){return function(){var o=i.select(e.parentNode);o.each((function(t){var e=t.fragments;o.selectAll(\"tspan.line\").each((function(t,r){e[r].width=this.getComputedTextLength()}));var r,i,a=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+a)>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})),o.selectAll(\"tspan.line\").remove(),_(o.select(\".\"+n.cn.cellText),r,t,a),i.select(e.parentNode.parentNode).call(z)}}function I(t,e,r,a,o){return function(){if(!o.settledY){var s=i.select(e.parentNode),l=B(o),c=o.key-l.firstRowIndex,f=l.rows[c].rowHeight,h=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:f,p=Math.max(h,f);p-l.rows[c].rowHeight&&(l.rows[c].rowHeight=p,t.selectAll(\".\"+n.cn.columnCell).call(z),E(null,t.filter(A),0),x(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 u(O(o,i.select(this.parentNode).select(\".\"+n.cn.cellTextHolder).node().getBoundingClientRect().width),a)})),o.settledY=!0}}}function O(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 z(t){t.attr(\"transform\",(function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce((function(t,e){return t+R(e,1/0)}),0),r=R(B(t),t.key);return u(0,r+e)})).selectAll(\".\"+n.cn.cellRect).attr(\"height\",(function(t){return(e=B(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r}))}function D(t,e){for(var r=0,n=e-1;n>=0;n--)r+=F(t[n]);return r}function R(t,e){for(var r=0,n=0;n\",\"<\",\"|\",\"/\",\"\\\\\"],dflt:\">\",editType:\"plot\"},thickness:{valType:\"number\",min:12,editType:\"plot\"},textfont:u({},s.textfont,{}),editType:\"calc\"},text:s.text,textinfo:l.textinfo,texttemplate:i({editType:\"plot\"},{keys:c.eventDataKeys.concat([\"label\",\"value\"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:n({},{keys:c.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u({},s.outsidetextfont,{}),textposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle left\",\"middle center\",\"middle right\",\"bottom left\",\"bottom center\",\"bottom right\"],dflt:\"top left\",editType:\"plot\"},sort:s.sort,root:l.root,domain:o({name:\"treemap\",trace:!0,editType:\"calc\"})}},{\"../../components/colorscale/attributes\":373,\"../../lib/extend\":493,\"../../plots/domain\":584,\"../../plots/template_attributes\":633,\"../pie/attributes\":900,\"../sunburst/attributes\":1045,\"./constants\":1074}],1072:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"treemap\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":619}],1073:[function(t,e,r){\"use strict\";var n=t(\"../sunburst/calc\");r.calc=function(t,e){return n.calc(t,e)},r.crossTraceCalc=function(t){return n._runCrossTraceCalc(\"treemap\",t)}},{\"../sunburst/calc\":1047}],1074:[function(t,e,r){\"use strict\";e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:\"poly\",eventDataKeys:[\"currentPath\",\"root\",\"entry\",\"percentRoot\",\"percentEntry\",\"percentParent\"],gapWithPathbar:1}},{}],1075:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../components/color\"),o=t(\"../../plots/domain\").defaults,s=t(\"../bar/defaults\").handleText,l=t(\"../bar/constants\").TEXTPAD,c=t(\"../../components/colorscale\"),u=c.hasColorscale,f=c.handleDefaults;e.exports=function(t,e,r,c){function h(r,a){return n.coerce(t,e,i,r,a)}var p=h(\"labels\"),d=h(\"parents\");if(p&&p.length&&d&&d.length){var g=h(\"values\");g&&g.length?h(\"branchvalues\"):h(\"count\"),h(\"level\"),h(\"maxdepth\"),\"squarify\"===h(\"tiling.packing\")&&h(\"tiling.squarifyratio\"),h(\"tiling.flip\"),h(\"tiling.pad\");var m=h(\"text\");h(\"texttemplate\"),e.texttemplate||h(\"textinfo\",Array.isArray(m)?\"text+label\":\"label\"),h(\"hovertext\"),h(\"hovertemplate\");var v=h(\"pathbar.visible\");s(t,e,c,h,\"auto\",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h(\"textposition\");var y=-1!==e.textposition.indexOf(\"bottom\");h(\"marker.line.width\")&&h(\"marker.line.color\",c.paper_bgcolor);var x=h(\"marker.colors\");(e._hasColorscale=u(t,\"marker\",\"colors\")||(t.marker||{}).coloraxis)?f(t,e,c,h,{prefix:\"marker.\",cLetter:\"c\"}):h(\"marker.depthfade\",!(x||[]).length);var b=2*e.textfont.size;h(\"marker.pad.t\",y?b/4:b),h(\"marker.pad.l\",b/4),h(\"marker.pad.r\",b/4),h(\"marker.pad.b\",y?b:b/4),e._hovered={marker:{line:{width:2,color:a.contrast(c.paper_bgcolor)}}},v&&(h(\"pathbar.thickness\",e.pathbar.textfont.size+2*l),h(\"pathbar.side\"),h(\"pathbar.edgeshape\")),h(\"sort\"),h(\"root.color\"),o(e,c,h),e._length=null}else e.visible=!1}},{\"../../components/color\":366,\"../../components/colorscale\":378,\"../../lib\":503,\"../../plots/domain\":584,\"../bar/constants\":650,\"../bar/defaults\":652,\"./attributes\":1071}],1076:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../sunburst/helpers\"),a=t(\"../bar/uniform_text\").clearMinTextSize,o=t(\"../bar/style\").resizeText,s=t(\"./plot_one\");e.exports=function(t,e,r,l,c){var u,f,h=c.type,p=c.drawDescendants,d=t._fullLayout,g=d[\"_\"+h+\"layer\"],m=!r;(a(h,d),(u=g.selectAll(\"g.trace.\"+h).data(e,(function(t){return t[0].trace.uid}))).enter().append(\"g\").classed(\"trace\",!0).classed(h,!0),u.order(),!d.uniformtext.mode&&i.hasTransition(r))?(l&&(f=l()),n.transition().duration(r.duration).ease(r.easing).each(\"end\",(function(){f&&f()})).each(\"interrupt\",(function(){f&&f()})).each((function(){g.selectAll(\"g.trace\").each((function(e){s(t,e,this,r,p)}))}))):(u.each((function(e){s(t,e,this,r,p)})),d.uniformtext.mode&&o(t,g.selectAll(\".trace\"),h));m&&u.exit().remove()}},{\"../bar/style\":662,\"../bar/uniform_text\":664,\"../sunburst/helpers\":1051,\"./plot_one\":1085,\"@plotly/d3\":58}],1077:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../lib/svg_text_utils\"),s=t(\"./partition\"),l=t(\"./style\").styleOne,c=t(\"./constants\"),u=t(\"../sunburst/helpers\"),f=t(\"../sunburst/fx\");e.exports=function(t,e,r,h,p){var d=p.barDifY,g=p.width,m=p.height,v=p.viewX,y=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,T=p.handleSlicesExit,k=p.makeUpdateSliceInterpolator,A=p.makeUpdateTextInterpolator,M={},S=t._fullLayout,E=e[0],L=E.trace,C=E.hierarchy,P=g/L._entryDepth,I=u.listPath(r.data,\"id\"),O=s(C.copy(),[g,m],{packing:\"dice\",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(O=O.filter((function(t){var e=I.indexOf(t.data.id);return-1!==e&&(t.x0=P*e,t.x1=P*(e+1),t.y0=d,t.y1=d+m,t.onPathbar=!0,!0)}))).reverse(),(h=h.data(O,u.getPtId)).enter().append(\"g\").classed(\"pathbar\",!0),T(h,!0,M,[g,m],x),h.order();var z=h;w&&(z=z.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),z.each((function(s){s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-Math.min(g,m)/2),s._hoverY=y(s.y1-m/2);var h=n.select(this),p=i.ensureSingle(h,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?p.transition().attrTween(\"d\",(function(t){var e=k(t,!0,M,[g,m]);return function(t){return x(e(t))}})):p.attr(\"d\",x),h.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),p.call(l,s,L,{hovered:!1}),s._text=(u.getPtLabel(s)||\"\").split(\"
\").join(\" \")||\"\";var d=i.ensureSingle(h,\"g\",\"slicetext\"),T=i.ensureSingle(d,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),E=i.ensureUniformFontSize(t,u.determineTextFont(L,s,S.font,{onPathbar:!0}));T.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",\"start\").call(a.font,E).call(o.convertToTspans,t),s.textBB=a.bBox(T.node()),s.transform=b(s,{fontSize:E.size,onPathbar:!0}),s.transform.fontSize=E.size,w?T.transition().attrTween(\"transform\",(function(t){var e=A(t,!0,M,[g,m]);return function(t){return _(e(t))}})):T.attr(\"transform\",_(s))}))}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../sunburst/fx\":1050,\"../sunburst/helpers\":1051,\"./constants\":1074,\"./partition\":1083,\"./style\":1086,\"@plotly/d3\":58}],1078:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../lib/svg_text_utils\"),s=t(\"./partition\"),l=t(\"./style\").styleOne,c=t(\"./constants\"),u=t(\"../sunburst/helpers\"),f=t(\"../sunburst/fx\"),h=t(\"../sunburst/plot\").formatSliceLabel;e.exports=function(t,e,r,p,d){var g=d.width,m=d.height,v=d.viewX,y=d.viewY,x=d.pathSlice,b=d.toMoveInsideSlice,_=d.strTransform,w=d.hasTransition,T=d.handleSlicesExit,k=d.makeUpdateSliceInterpolator,A=d.makeUpdateTextInterpolator,M=d.prevEntry,S=t._fullLayout,E=e[0].trace,L=-1!==E.textposition.indexOf(\"left\"),C=-1!==E.textposition.indexOf(\"right\"),P=-1!==E.textposition.indexOf(\"bottom\"),I=!P&&!E.marker.pad.t||P&&!E.marker.pad.b,O=s(r,[g,m],{packing:E.tiling.packing,squarifyratio:E.tiling.squarifyratio,flipX:E.tiling.flip.indexOf(\"x\")>-1,flipY:E.tiling.flip.indexOf(\"y\")>-1,pad:{inner:E.tiling.pad,top:E.marker.pad.t,left:E.marker.pad.l,right:E.marker.pad.r,bottom:E.marker.pad.b}}).descendants(),z=1/0,D=-1/0;O.forEach((function(t){var e=t.depth;e>=E._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(z=Math.min(z,e),D=Math.max(D,e))})),p=p.data(O,u.getPtId),E._maxVisibleLayers=isFinite(D)?D-z+1:0,p.enter().append(\"g\").classed(\"slice\",!0),T(p,!1,{},[g,m],x),p.order();var R=null;if(w&&M){var F=u.getPtId(M);p.each((function(t){null===R&&u.getPtId(t)===F&&(R={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var B=function(){return R||{x0:0,x1:g,y0:0,y1:m}},N=p;return w&&(N=N.transition().each(\"end\",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),N.each((function(s){var p=u.isHeader(s,E);s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-E.marker.pad.r),s._hoverY=y(P?s.y1-E.marker.pad.b/2:s.y0+E.marker.pad.t/2);var d=n.select(this),T=i.ensureSingle(d,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",\"all\")}));w?T.transition().attrTween(\"d\",(function(t){var e=k(t,!1,B(),[g,m]);return function(t){return x(e(t))}})):T.attr(\"d\",x),d.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{isTransitioning:t._transitioning}),T.call(l,s,E,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text=\"\":s._text=p?I?\"\":u.getPtLabel(s)||\"\":h(s,r,E,e,S)||\"\";var M=i.ensureSingle(d,\"g\",\"slicetext\"),O=i.ensureSingle(M,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),z=i.ensureUniformFontSize(t,u.determineTextFont(E,s,S.font));O.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",C?\"end\":L||p?\"start\":\"middle\").call(a.font,z).call(o.convertToTspans,t),s.textBB=a.bBox(O.node()),s.transform=b(s,{fontSize:z.size,isHeader:p}),s.transform.fontSize=z.size,w?O.transition().attrTween(\"transform\",(function(t){var e=A(t,!1,B(),[g,m]);return function(t){return _(e(t))}})):O.attr(\"transform\",_(s))})),R}},{\"../../components/drawing\":388,\"../../lib\":503,\"../../lib/svg_text_utils\":529,\"../sunburst/fx\":1050,\"../sunburst/helpers\":1051,\"../sunburst/plot\":1055,\"./constants\":1074,\"./partition\":1083,\"./style\":1086,\"@plotly/d3\":58}],1079:[function(t,e,r){\"use strict\";e.exports=function t(e,r,n){var i;n.swapXY&&(i=e.x0,e.x0=e.y0,e.y0=i,i=e.x1,e.x1=e.y1,e.y1=i),n.flipX&&(i=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-i),n.flipY&&(i=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-i);var a=e.children;if(a)for(var o=0;o-1?C+O:-(I+O):0,D={x0:P,x1:P,y0:z,y1:z+I},R=function(t,e,r){var n=v.tiling.pad,i=function(t){return t-n<=e.x0},a=function(t){return t+n>=e.x1},o=function(t){return t-n<=e.y0},s=function(t){return t+n>=e.y1};return t.x0===e.x0&&t.x1===e.x1&&t.y0===e.y0&&t.y1===e.y1?{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}:{x0:i(t.x0-n)?0:a(t.x0-n)?r[0]:t.x0,x1:i(t.x1+n)?0:a(t.x1+n)?r[0]:t.x1,y0:o(t.y0-n)?0:s(t.y0-n)?r[1]:t.y0,y1:o(t.y1+n)?0:s(t.y1+n)?r[1]:t.y1}},F=null,B={},N={},j=null,U=function(t,e){return e?B[h(t)]:N[h(t)]},V=function(t,e,r,n){if(e)return B[h(x)]||D;var i=N[v.level]||r;return function(t){return t.data.depth-b.data.depth=(n-=(y?m:m.r)-s)){var x=(r+n)/2;r=x,n=x}var b;f?i<(b=a-(y?m:m.b))&&b\"===tt?(l.x-=a,c.x-=a,u.x-=a,f.x-=a):\"/\"===tt?(u.x-=a,f.x-=a,o.x-=a/2,s.x-=a/2):\"\\\\\"===tt?(l.x-=a,c.x-=a,o.x-=a/2,s.x-=a/2):\"<\"===tt&&(o.x-=a,s.x-=a),$(l),$(f),$(o),$(c),$(u),$(s),\"M\"+K(l.x,l.y)+\"L\"+K(c.x,c.y)+\"L\"+K(s.x,s.y)+\"L\"+K(u.x,u.y)+\"L\"+K(f.x,f.y)+\"L\"+K(o.x,o.y)+\"Z\"},toMoveInsideSlice:et,makeUpdateSliceInterpolator:nt,makeUpdateTextInterpolator:it,handleSlicesExit:at,hasTransition:A,strTransform:ot}):w.remove()}},{\"../../lib\":503,\"../bar/constants\":650,\"../bar/plot\":659,\"../bar/uniform_text\":664,\"../sunburst/helpers\":1051,\"./constants\":1074,\"./draw_ancestors\":1077,\"@plotly/d3\":58,\"d3-interpolate\":116}],1086:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../sunburst/helpers\"),s=t(\"../bar/uniform_text\").resizeText;function l(t,e,r,n){var s,l,c=(n||{}).hovered,u=e.data.data,f=u.i,h=u.color,p=o.isHierarchyRoot(e),d=1;if(c)s=r._hovered.marker.line.color,l=r._hovered.marker.line.width;else if(p&&h===r.root.color)d=100,s=\"rgba(0,0,0,0)\",l=0;else if(s=a.castOption(r,f,\"marker.line.color\")||i.defaultLine,l=a.castOption(r,f,\"marker.line.width\")||0,!r._hasColorscale&&!e.onPathbar){var g=r.marker.depthfade;if(g){var m,v=i.combine(i.addOpacity(r._backgroundColor,.75),h);if(!0===g){var y=o.getMaxDepth(r);m=isFinite(y)?o.isLeaf(e)?0:r._maxVisibleLayers-(e.data.depth-r._entryDepth):e.data.height+1}else m=e.data.depth-r._entryDepth,r._atRootLevel||m++;if(m>0)for(var x=0;x0){var x,b,_,w,T,k=t.xa,A=t.ya;\"h\"===p.orientation?(T=e,x=\"y\",_=A,b=\"x\",w=k):(T=r,x=\"x\",_=k,b=\"y\",w=A);var M=h[t.index];if(T>=M.span[0]&&T<=M.span[1]){var S=n.extendFlat({},t),E=w.c2p(T,!0),L=o.getKdeValue(M,p,T),C=o.getPositionOnKdePath(M,p,E),P=_._offset,I=_._length;S[x+\"0\"]=C[0],S[x+\"1\"]=C[1],S[b+\"0\"]=S[b+\"1\"]=E,S[b+\"Label\"]=b+\": \"+i.hoverLabelText(w,T,p[b+\"hoverformat\"])+\", \"+h[0].t.labels.kde+\" \"+L.toFixed(3),S.spikeDistance=y[0].spikeDistance;var O=x+\"Spike\";S[O]=y[0][O],y[0].spikeDistance=void 0,y[0][O]=void 0,S.hovertemplate=!1,v.push(S),(u={stroke:t.color})[x+\"1\"]=n.constrain(P+C[0],P,P+I),u[x+\"2\"]=n.constrain(P+C[1],P,P+I),u[b+\"1\"]=u[b+\"2\"]=w._offset+E}}g&&(v=v.concat(y))}-1!==d.indexOf(\"points\")&&(c=a.hoverOnPoints(t,e,r));var z=f.selectAll(\".violinline-\"+p.uid).data(u?[0]:[]);return z.enter().append(\"line\").classed(\"violinline-\"+p.uid,!0).attr(\"stroke-width\",1.5),z.exit().remove(),z.attr(u),\"closest\"===s?c?[c]:v:c?(v.push(c),v):v}},{\"../../lib\":503,\"../../plots/cartesian/axes\":554,\"../box/hover\":678,\"./helpers\":1091}],1093:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"../box/defaults\").crossTraceDefaults,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\":568,\"../box/defaults\":676,\"../box/select\":683,\"../scatter/style\":950,\"./attributes\":1087,\"./calc\":1088,\"./cross_trace_calc\":1089,\"./defaults\":1090,\"./hover\":1092,\"./layout_attributes\":1094,\"./layout_defaults\":1095,\"./plot\":1096,\"./style\":1097}],1094:[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\":503,\"../box/layout_attributes\":680}],1095:[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\":503,\"../box/layout_defaults\":681,\"./layout_attributes\":1094}],1096:[function(t,e,r){\"use strict\";var n=t(\"@plotly/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,linearized:!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;if(!0!==c.visible||s.empty)r.remove();else{var d=s.bPos,g=s.bdPos,m=e[s.valLetter+\"axis\"],v=e[s.posLetter+\"axis\"],y=\"both\"===c.side,x=y||\"positive\"===c.side,b=y||\"negative\"===c.side,_=r.selectAll(\"path.violin\").data(i.identity);_.enter().append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").attr(\"class\",\"violin\"),_.exit().remove(),_.each((function(t){var e,r,i,a,o,l,f,h,_=n.select(this),w=t.density,T=w.length,k=v.c2l(t.pos+d,!0),A=v.l2p(k);if(c.width)e=s.maxKDE/g;else{var M=u._violinScaleGroupStats[c.scalegroup];e=\"count\"===c.scalemode?M.maxKDE/g*(M.maxCount/t.pts.length):M.maxKDE/g}if(x){for(f=new Array(T),o=0;o\")),u.color=function(t,e){var r=t[e.dir].marker,n=r.color,a=r.line.color,o=r.line.width;if(i(n))return n;if(i(a)&&o)return a}(h,m),[u]}function k(t){return n(g,t,h[d+\"hoverformat\"])}}},{\"../../components/color\":366,\"../../constants/delta.js\":473,\"../../plots/cartesian/axes\":554,\"../bar/hover\":655}],1109:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\"),plot:t(\"./plot\"),style:t(\"./style\").style,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"../bar/select\"),moduleType:\"trace\",name:\"waterfall\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":568,\"../bar/select\":660,\"./attributes\":1102,\"./calc\":1103,\"./cross_trace_calc\":1105,\"./defaults\":1106,\"./event_data\":1107,\"./hover\":1108,\"./layout_attributes\":1110,\"./layout_defaults\":1111,\"./plot\":1112,\"./style\":1113}],1110:[function(t,e,r){\"use strict\";e.exports={waterfallmode:{valType:\"enumerated\",values:[\"group\",\"overlay\"],dflt:\"group\",editType:\"calc\"},waterfallgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},waterfallgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],1111:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s0&&(m+=h?\"M\"+f[0]+\",\"+d[1]+\"V\"+d[0]:\"M\"+f[1]+\",\"+d[0]+\"H\"+f[0]),\"between\"!==p&&(r.isSum||s path\").each((function(t){if(!t.isBlank){var e=s[t.dir].marker;n.select(this).call(a.fill,e.color).call(a.stroke,e.line.color).call(i.dashLine,e.line.dash,e.line.width).style(\"opacity\",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(\".lines\").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll(\"path\"),t.width,t.color,t.dash)}))}))}}},{\"../../components/color\":366,\"../../components/drawing\":388,\"../../constants/interactions\":478,\"../bar/style\":662,\"../bar/uniform_text\":664,\"@plotly/d3\":58}],1114:[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,a=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,i=0;ii&&(i=u,o=c)}}return i?a(o):s};case\"rms\":return function(t,e){for(var r=0,i=0,o=0;o\":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[0]&&es[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 es[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[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?(m=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(f))},v=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(m=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},v=function(t,e){var r=x[t.astr][e];t.get().push(r)}),k(m);for(var w=o(e.transforms,r),T=0;T1?\"%{group} (%{trace})\":\"%{group}\");var l=t.styles,c=o.styles=[];if(l)for(a=0;a0?o-4:o;for(r=0;r>16&255,l[u++]=e>>8&255,l[u++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,l[u++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e);return l},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=0,s=r-i;os?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;s0)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>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join(\"\")}i[\"-\".charCodeAt(0)]=62,i[\"_\".charCodeAt(0)]=63},{}],2:[function(t,e,r){},{}],3:[function(t,e,r){(function(e){(function(){\n", "/*!\n", " * The buffer module from node.js, for the browser.\n", " *\n", @@ -156,7 +156,7 @@ " * Copyright (c) 2014-2015, Jon Schlinkert.\n", " * Licensed under the MIT License.\n", " */\n", - "\"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||void 0===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)}},{}],278:[function(t,e,r){(function(t){(function(){e.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this)}).call(this,void 0!==n?n:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}],279:[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];(l=o-((r=a+o)-a))&&(t[--n]=r,r=l)}var s=0;for(i=n;i0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=33306690738754716e-32*n;return o>=s||o<=-s?o:f(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],p=r[2]-n[2],d=a*c,g=o*l,m=o*s,v=i*c,y=i*l,x=a*s,b=u*(d-g)+f*(m-v)+p*(y-x),_=7771561172376103e-31*((Math.abs(d)+Math.abs(g))*Math.abs(u)+(Math.abs(m)+Math.abs(v))*Math.abs(f)+(Math.abs(y)+Math.abs(x))*Math.abs(p));return b>_||-b>_?b:h(t,e,r,n)}];function d(t){var e=p[t.length];return e||(e=p[t.length]=u(t.length)),e.apply(void 0,t)}function g(t,e,r,n,i,a,o){return function(e,r,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return n(e,r);case 3:return i(e,r,s);case 4:return a(e,r,s,l);case 5:return o(e,r,s,l,c)}for(var u=new Array(arguments.length),f=0;f0&&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);if(Math.max(c,u)=n?(i=f,(l+=1)=n?(i=f,(l+=1)>1,c=e[2*l+1];if(c===a)return l;a>1,c=e[2*l+1];if(c===a)return l;a>1,c=e[2*l+1];if(c===a)return l;a>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=t.length||0!==a(t[m],s)););}return r}function f(t,e){if(e<0)return[];for(var r=[],i=(1<>>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>1:(t>>1)-1}function x(t){for(var e=v(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n0;){var r=y(t);if(r>=0)if(e0){var t=k[0];return m(0,M-1),M-=1,x(0),t}return-1}function w(t,e){var r=k[t];return c[r]===e?t:(c[r]=-1/0,b(t),_(),c[r]=e,b((M+=1)-1))}function T(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))}}var k=[],A=new Array(a);for(f=0;f>1;f>=0;--f)x(f);for(;;){var S=_();if(S<0||c[S]>r)break;T(S)}var E=[];for(f=0;f=0&&r>=0&&e!==r){var n=A[e],i=A[r];n!==i&&C.push([n,i])}})),i.unique(i.normalize(C)),{positions:E,edges:C}};var n=t(\"robust-orientation\"),i=t(\"simplicial-complex\")},{\"robust-orientation\":284,\"simplicial-complex\":295}],298:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,a,o,s;if(e[0][0]e[1][0]))return i(e,t);r=e[1],a=e[0]}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])){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 lu?s-u:l-u}r=e[1],i=e[0]}t[0][1]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)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\":298,\"binary-search-bounds\":31,\"functional-red-black-tree\":69,\"robust-orientation\":284}],300:[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;l0||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;l0||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;l0||n>0&&c<0)&&r.push(o(i,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},{\"robust-dot-product\":281,\"robust-sum\":289}],301:[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(t){return i(o(t),arguments)}function n(t,r){return e.apply(null,[t].concat(r||[]))}function i(r,n){var i,a,o,s,l,c,u,f,h,p=1,d=r.length,g=\"\";for(a=0;a=0),s.type){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.width?parseInt(s.width):0);break;case\"e\":i=s.precision?parseFloat(i).toExponential(s.precision):parseFloat(i).toExponential();break;case\"f\":i=s.precision?parseFloat(i).toFixed(s.precision):parseFloat(i);break;case\"g\":i=s.precision?String(Number(i.toPrecision(s.precision))):parseFloat(i);break;case\"o\":i=(parseInt(i,10)>>>0).toString(8);break;case\"s\":i=String(i),i=s.precision?i.substring(0,s.precision):i;break;case\"t\":i=String(!!i),i=s.precision?i.substring(0,s.precision):i;break;case\"T\":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=s.precision?i.substring(0,s.precision):i;break;case\"u\":i=parseInt(i,10)>>>0;break;case\"v\":i=i.valueOf(),i=s.precision?i.substring(0,s.precision):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.type)?g+=i:(!t.number.test(s.type)||f&&!s.sign?h=\"\":(h=f?\"+\":\"-\",i=i.toString().replace(t.sign,\"\")),c=s.pad_char?\"0\"===s.pad_char?\"0\":s.pad_char.charAt(1):\" \",u=s.width-(h+i).length,l=s.width&&u>0?c.repeat(u):\"\",g+=s.align?h+i+l:\"0\"===c?h+l+i:l+h+i)}return g}var a=Object.create(null);function o(e){if(a[e])return a[e];for(var r,n=e,i=[],o=0;n;){if(null!==(r=t.text.exec(n)))i.push(r[0]);else if(null!==(r=t.modulo.exec(n)))i.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\");i.push({placeholder:r[0],param_no:r[1],keys:r[2],sign:r[3],pad_char:r[4],align:r[5],width:r[6],precision:r[7],type:r[8]})}n=n.substring(r[0].length)}return a[e]=i}void 0!==r&&(r.sprintf=e,r.vsprintf=n),\"undefined\"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}()},{}],302:[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=i(t,e),n=r.length,a=new Array(n),o=new Array(n),s=0;sn|0},vertex:function(t,e,r,n,i,a,o,s,l,c,u,f,h){var p=(o<<0)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==p&&15!==p)switch(p){case 0:u.push([t-.5,e-.5]);break;case 1:u.push([t-.25-.25*(n+r-2*h)/(r-n),e-.25-.25*(i+r-2*h)/(r-i)]);break;case 2:u.push([t-.75-.25*(-n-r+2*h)/(n-r),e-.25-.25*(a+n-2*h)/(n-a)]);break;case 3:u.push([t-.5,e-.5-.5*(i+r+a+n-4*h)/(r-i+n-a)]);break;case 4:u.push([t-.25-.25*(a+i-2*h)/(i-a),e-.75-.25*(-i-r+2*h)/(i-r)]);break;case 5:u.push([t-.5-.5*(n+r+a+i-4*h)/(r-n+i-a),e-.5]);break;case 6:u.push([t-.5-.25*(-n-r+a+i)/(n-r+i-a),e-.5-.25*(-i-r+a+n)/(i-r+n-a)]);break;case 7:u.push([t-.75-.25*(a+i-2*h)/(i-a),e-.75-.25*(a+n-2*h)/(n-a)]);break;case 8:u.push([t-.75-.25*(-a-i+2*h)/(a-i),e-.75-.25*(-a-n+2*h)/(a-n)]);break;case 9:u.push([t-.5-.25*(n+r+-a-i)/(r-n+a-i),e-.5-.25*(i+r+-a-n)/(r-i+a-n)]);break;case 10:u.push([t-.5-.5*(-n-r-a-i+4*h)/(n-r+a-i),e-.5]);break;case 11:u.push([t-.25-.25*(-a-i+2*h)/(a-i),e-.75-.25*(i+r-2*h)/(r-i)]);break;case 12:u.push([t-.5,e-.5-.5*(-i-r-a-n+4*h)/(i-r+a-n)]);break;case 13:u.push([t-.75-.25*(n+r-2*h)/(r-n),e-.25-.25*(-a-n+2*h)/(a-n)]);break;case 14:u.push([t-.25-.25*(-n-r+2*h)/(n-r),e-.25-.25*(-i-r+2*h)/(i-r)]);break;case 15:u.push([t-.5,e-.5])}},cell:function(t,e,r,n,i,a,o,s,l){i?s.push([t,e]):s.push([e,t])}});return function(t,e){var r=[],i=[];return n(t,r,i,e),{positions:r,cells:i}}}};var o={}},{\"ndarray-extract-contour\":251,\"zero-crossings\":318}],303:[function(t,e,r){(function(r){(function(){\"use strict\";e.exports=function t(e,r,i){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;o0&&(f+=.02);var p=new Float32Array(u),d=0,g=-.5*f;for(h=0;hMath.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],m=Math.cos(d),v=Math.sin(d),y=Math.cos(g),x=Math.sin(g),b=this.computedCenter,_=m*y,w=v*y,T=x,k=-m*x,A=-v*x,M=y,S=this.computedEye,E=this.computedMatrix;for(a=0;a<3;++a){var L=_*r[a]+w*h[a]+T*e[a];E[4*a+1]=k*r[a]+A*h[a]+M*e[a],E[4*a+2]=L,E[4*a+3]=0}var C=E[1],P=E[5],I=E[9],O=E[2],z=E[6],D=E[10],R=P*D-I*z,F=I*O-C*D,B=C*z-P*O,N=c(R,F,B);R/=N,F/=N,B/=N,E[0]=R,E[4]=F,E[8]=B;for(a=0;a<3;++a)S[a]=b[a]+E[2+4*a]*p;for(a=0;a<3;++a){u=0;for(var j=0;j<3;++j)u+=E[a+4*j]*S[j];E[12+a]=-u}E[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,m=(f/=d)*e+o*r,v=(h/=d)*e+s*r;this.center.move(t,g,m,v);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 m=c(s,l,f);s/=m,l/=m,f/=m}var v,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*f,T=c(x-=s*w,b-=l*w,_-=f*w),k=l*(_/=T)-f*(b/=T),A=f*(x/=T)-s*_,M=s*b-l*x,S=c(k,A,M);if(k/=S,A/=S,M/=S,this.center.jump(t,q,G,Y),this.radius.idle(t),this.up.jump(t,s,l,f),this.right.jump(t,x,b,_),2===a){var E=e[1],L=e[5],C=e[9],P=E*x+L*b+C*_,I=E*k+L*A+C*M;v=R<0?-Math.PI/2:Math.PI/2,y=Math.atan2(I,P)}else{var O=e[2],z=e[6],D=e[10],R=O*s+z*l+D*f,F=O*x+z*b+D*_,B=O*k+z*A+D*M;v=Math.asin(u(R)),y=Math.atan2(B,F)}this.angle.jump(t,y,v),this.recalcMatrix(t);var N=e[2],j=e[6],U=e[10],V=this.computedMatrix;i(V,e);var H=V[15],q=V[12]/H,G=V[13]/H,Y=V[14]/H,W=Math.exp(this.computedRadius[0]);this.center.jump(t,q-N*W,G-j*W,Y-U*W)},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],m=d[1],v=d[2],y=i*g+a*m+o*v,x=c(g-=y*i,m-=y*a,v-=y*o);if(!(x<.01&&(x=c(g=a*h-o*f,m=o*l-i*h,v=i*f-a*l))<1e-6)){g/=x,m/=x,v/=x,this.up.set(t,i,a,o),this.right.set(t,g,m,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var b=a*v-o*m,_=o*g-i*v,w=i*m-a*g,T=c(b,_,w),k=i*l+a*f+o*h,A=g*l+m*f+v*h,M=(b/=T)*l+(_/=T)*f+(w/=T)*h,S=Math.asin(u(k)),E=Math.atan2(M,A),L=this.angle._state,C=L[L.length-1],P=L[L.length-2];C%=2*Math.PI;var I=Math.abs(C+2*Math.PI-E),O=Math.abs(C-E),z=Math.abs(C-2*Math.PI-E);I0?r.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function g(t){return new Uint16Array(p(2*t),0,t)}function m(t){return new Uint32Array(p(4*t),0,t)}function v(t){return new Int8Array(p(t),0,t)}function y(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function T(t){return s?new BigUint64Array(p(8*t),0,t):null}function k(t){return l?new BigInt64Array(p(8*t),0,t):null}function A(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=f[e];return r.length>0?r.pop():new a(t)}r.free=function(t){if(a.isBuffer(t))f[n.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|n.log2(e);u[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeBigUint64=r.freeInt8=r.freeInt16=r.freeInt32=r.freeBigInt64=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){h(t.buffer)},r.freeArrayBuffer=h,r.freeBuffer=function(t){f[n.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||\"arraybuffer\"===e)return p(t);switch(e){case\"uint8\":return d(t);case\"uint16\":return g(t);case\"uint32\":return m(t);case\"int8\":return v(t);case\"int16\":return y(t);case\"int32\":return x(t);case\"float\":case\"float32\":return b(t);case\"double\":case\"float64\":return _(t);case\"uint8_clamped\":return w(t);case\"bigint64\":return k(t);case\"biguint64\":return T(t);case\"buffer\":return M(t);case\"data\":case\"dataview\":return A(t);default:return null}return null},r.mallocArrayBuffer=p,r.mallocUint8=d,r.mallocUint16=g,r.mallocUint32=m,r.mallocInt8=v,r.mallocInt16=y,r.mallocInt32=x,r.mallocFloat32=r.mallocFloat=b,r.mallocFloat64=r.mallocDouble=_,r.mallocUint8Clamped=w,r.mallocBigUint64=T,r.mallocBigInt64=k,r.mallocDataView=A,r.mallocBuffer=M,r.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,u[t].length=0,f[t].length=0}}).call(this)}).call(this,void 0!==n?n:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"bit-twiddle\":32,buffer:3,dup:65}],309:[function(t,e,r){\"use strict\";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e0&&(a=n.size),n.lineSpacing&&n.lineSpacing>0&&(o=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts));return r.font=[n.fontStyle,n.fontVariant,n.fontWeight,a+\"px\",n.font].filter((function(t){return t})).join(\" \"),r.textAlign=\"start\",r.textBaseline=\"alphabetic\",r.direction=\"ltr\",h(function(t,e,r,n,a,o){r=r.replace(/\\n/g,\"\"),r=!0===o.breaklines?r.replace(/\\/g,\"\\n\"):r.replace(/\\/g,\" \");var s=\"\",l=[];for(p=0;p-1?parseInt(t[1+i]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(n=n.replace(S(),\"?px \"),m*=Math.pow(.75,l-s),n=n.replace(\"?px \",S())),g+=.25*x*(l-s)}if(!0===o.superscripts){var c=t.indexOf(\"+\"),u=r.indexOf(\"+\"),f=c>-1?parseInt(t[1+c]):0,h=u>-1?parseInt(r[1+u]):0;f!==h&&(n=n.replace(S(),\"?px \"),m*=Math.pow(.75,h-f),n=n.replace(\"?px \",S())),g-=.25*x*(h-f)}if(!0===o.bolds){var p=t.indexOf(\"b|\")>-1,d=r.indexOf(\"b|\")>-1;!p&&d&&(n=v?n.replace(\"italic \",\"italic bold \"):\"bold \"+n),p&&!d&&(n=n.replace(\"bold \",\"\"))}if(!0===o.italics){var v=t.indexOf(\"i|\")>-1,y=r.indexOf(\"i|\")>-1;!v&&y&&(n=\"italic \"+n),v&&!y&&(n=n.replace(\"italic \",\"\"))}e.font=n}for(h=0;h\",a=\"\",o=i.length,s=a.length,l=\"+\"===e[0]||\"-\"===e[0],c=0,u=-s;c>-1&&-1!==(c=r.indexOf(i,c))&&-1!==(u=r.indexOf(a,c+o))&&!(u<=c);){for(var f=c;f=u)n[f]=null,r=r.substr(0,f)+\" \"+r.substr(f+1);else if(null!==n[f]){var h=n[f].indexOf(e[0]);-1===h?n[f]+=e:l&&(n[f]=n[f].substr(0,h+1)+(1+parseInt(n[f][h+1]))+n[f].substr(h+2))}var p=c+o,d=r.substr(p,u-p).indexOf(i);c=-1!==d?d:u+s}return n}function u(t,e){var r=n(t,128);return e?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function f(t,e,r,n){var i=u(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=0?e[a]:i}))},has___:{value:y((function(e){var n=v(e);return n?r in n:t.indexOf(e)>=0}))},set___:{value:y((function(n,i){var a,o=v(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:y((function(n){var i,a,o=v(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)}))}})};d.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 d||x();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 d),i.set(t,e)),this}:function(t,e){if(a)try{n.set(t,e)}catch(r){i||(i=new d),i.set___(t,e)}else n.set(t,e);return this},Object.create(d.prototype,{get___:{value:y((function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)}))},has___:{value:y((function(t){return n.has(t)||!!i&&i.has___(t)}))},set___:{value:y(e)},delete___:{value:y((function(t){var e=!!n.delete(t);return i&&i.delete___(t)||e}))},permitHostObjects___:{value:y((function(t){if(t!==g)throw new Error(\"bogus call to permitHostObjects___\");a=!0}))}})}t&&\"undefined\"!=typeof Proxy&&(Proxy=void 0),n.prototype=d.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=d)}function g(t){t.permitHostObjects___&&t.permitHostObjects___(g)}function m(t){return!(\"weakmap:\"==t.substr(0,\"weakmap:\".length)&&\"___\"===t.substr(t.length-3))}function v(t){if(t!==Object(t))throw new TypeError(\"Not an object: \"+t);var e=t[l];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return o(t,l,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function y(t){return t.prototype=null,Object.freeze(t)}function x(){h||\"undefined\"==typeof console||(h=!0,console.warn(\"WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future.\"))}}()},{}],314:[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\":315}],315:[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}},{}],316:[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\":314}],317:[function(t,e,r){\"use strict\";var n,i=function(){return function(t,e,r,n,i,a){var o=t[0],s=r[0],l=[0],c=s;n|=0;var u=0,f=s;for(u=0;u=0!=p>=0&&i.push(l[0]+.5+.5*(h+p)/(h-p)),n+=f,++l[0]}}};e.exports=(n={funcName:{funcName:\"zeroCrossings\"}.funcName},function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=[a,o.join()].join(),l=e[s];return l||(e[s]=l=t([a,o])),l(r.shape.slice(0),r.data,r.stride,0|r.offset,n,i)}}(i.bind(void 0,n)))},{}],318:[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\":317}]},{},[6])(6)}))}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}]},{},[27])(27)}));\n", + "\"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||void 0===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)}},{}],278:[function(t,e,r){(function(t){(function(){e.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this)}).call(this,void 0!==n?n:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}],279:[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];(l=o-((r=a+o)-a))&&(t[--n]=r,r=l)}var s=0;for(i=n;i0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=33306690738754716e-32*n;return o>=s||o<=-s?o:f(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],p=r[2]-n[2],d=a*c,g=o*l,m=o*s,v=i*c,y=i*l,x=a*s,b=u*(d-g)+f*(m-v)+p*(y-x),_=7771561172376103e-31*((Math.abs(d)+Math.abs(g))*Math.abs(u)+(Math.abs(m)+Math.abs(v))*Math.abs(f)+(Math.abs(y)+Math.abs(x))*Math.abs(p));return b>_||-b>_?b:h(t,e,r,n)}];function d(t){var e=p[t.length];return e||(e=p[t.length]=u(t.length)),e.apply(void 0,t)}function g(t,e,r,n,i,a,o){return function(e,r,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return n(e,r);case 3:return i(e,r,s);case 4:return a(e,r,s,l);case 5:return o(e,r,s,l,c)}for(var u=new Array(arguments.length),f=0;f0&&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);if(Math.max(c,u)=n?(i=f,(l+=1)=n?(i=f,(l+=1)>1,c=e[2*l+1];if(c===a)return l;a>1,c=e[2*l+1];if(c===a)return l;a>1,c=e[2*l+1];if(c===a)return l;a>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=t.length||0!==a(t[m],s)););}return r}function f(t,e){if(e<0)return[];for(var r=[],i=(1<>>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>1:(t>>1)-1}function x(t){for(var e=v(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n0;){var r=y(t);if(r>=0)if(e0){var t=k[0];return m(0,M-1),M-=1,x(0),t}return-1}function w(t,e){var r=k[t];return c[r]===e?t:(c[r]=-1/0,b(t),_(),c[r]=e,b((M+=1)-1))}function T(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))}}var k=[],A=new Array(a);for(f=0;f>1;f>=0;--f)x(f);for(;;){var S=_();if(S<0||c[S]>r)break;T(S)}var E=[];for(f=0;f=0&&r>=0&&e!==r){var n=A[e],i=A[r];n!==i&&C.push([n,i])}})),i.unique(i.normalize(C)),{positions:E,edges:C}};var n=t(\"robust-orientation\"),i=t(\"simplicial-complex\")},{\"robust-orientation\":284,\"simplicial-complex\":295}],298:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,a,o,s;if(e[0][0]e[1][0]))return i(e,t);r=e[1],a=e[0]}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])){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 lu?s-u:l-u}r=e[1],i=e[0]}t[0][1]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)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\":298,\"binary-search-bounds\":31,\"functional-red-black-tree\":69,\"robust-orientation\":284}],300:[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;l0||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;l0||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;l0||n>0&&c<0)&&r.push(o(i,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},{\"robust-dot-product\":281,\"robust-sum\":289}],301:[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(t){return i(o(t),arguments)}function n(t,r){return e.apply(null,[t].concat(r||[]))}function i(r,n){var i,a,o,s,l,c,u,f,h,p=1,d=r.length,g=\"\";for(a=0;a=0),s.type){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.width?parseInt(s.width):0);break;case\"e\":i=s.precision?parseFloat(i).toExponential(s.precision):parseFloat(i).toExponential();break;case\"f\":i=s.precision?parseFloat(i).toFixed(s.precision):parseFloat(i);break;case\"g\":i=s.precision?String(Number(i.toPrecision(s.precision))):parseFloat(i);break;case\"o\":i=(parseInt(i,10)>>>0).toString(8);break;case\"s\":i=String(i),i=s.precision?i.substring(0,s.precision):i;break;case\"t\":i=String(!!i),i=s.precision?i.substring(0,s.precision):i;break;case\"T\":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=s.precision?i.substring(0,s.precision):i;break;case\"u\":i=parseInt(i,10)>>>0;break;case\"v\":i=i.valueOf(),i=s.precision?i.substring(0,s.precision):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.type)?g+=i:(!t.number.test(s.type)||f&&!s.sign?h=\"\":(h=f?\"+\":\"-\",i=i.toString().replace(t.sign,\"\")),c=s.pad_char?\"0\"===s.pad_char?\"0\":s.pad_char.charAt(1):\" \",u=s.width-(h+i).length,l=s.width&&u>0?c.repeat(u):\"\",g+=s.align?h+i+l:\"0\"===c?h+l+i:l+h+i)}return g}var a=Object.create(null);function o(e){if(a[e])return a[e];for(var r,n=e,i=[],o=0;n;){if(null!==(r=t.text.exec(n)))i.push(r[0]);else if(null!==(r=t.modulo.exec(n)))i.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\");i.push({placeholder:r[0],param_no:r[1],keys:r[2],sign:r[3],pad_char:r[4],align:r[5],width:r[6],precision:r[7],type:r[8]})}n=n.substring(r[0].length)}return a[e]=i}void 0!==r&&(r.sprintf=e,r.vsprintf=n),\"undefined\"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}()},{}],302:[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=i(t,e),n=r.length,a=new Array(n),o=new Array(n),s=0;sn|0},vertex:function(t,e,r,n,i,a,o,s,l,c,u,f,h){var p=(o<<0)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==p&&15!==p)switch(p){case 0:u.push([t-.5,e-.5]);break;case 1:u.push([t-.25-.25*(n+r-2*h)/(r-n),e-.25-.25*(i+r-2*h)/(r-i)]);break;case 2:u.push([t-.75-.25*(-n-r+2*h)/(n-r),e-.25-.25*(a+n-2*h)/(n-a)]);break;case 3:u.push([t-.5,e-.5-.5*(i+r+a+n-4*h)/(r-i+n-a)]);break;case 4:u.push([t-.25-.25*(a+i-2*h)/(i-a),e-.75-.25*(-i-r+2*h)/(i-r)]);break;case 5:u.push([t-.5-.5*(n+r+a+i-4*h)/(r-n+i-a),e-.5]);break;case 6:u.push([t-.5-.25*(-n-r+a+i)/(n-r+i-a),e-.5-.25*(-i-r+a+n)/(i-r+n-a)]);break;case 7:u.push([t-.75-.25*(a+i-2*h)/(i-a),e-.75-.25*(a+n-2*h)/(n-a)]);break;case 8:u.push([t-.75-.25*(-a-i+2*h)/(a-i),e-.75-.25*(-a-n+2*h)/(a-n)]);break;case 9:u.push([t-.5-.25*(n+r+-a-i)/(r-n+a-i),e-.5-.25*(i+r+-a-n)/(r-i+a-n)]);break;case 10:u.push([t-.5-.5*(-n-r-a-i+4*h)/(n-r+a-i),e-.5]);break;case 11:u.push([t-.25-.25*(-a-i+2*h)/(a-i),e-.75-.25*(i+r-2*h)/(r-i)]);break;case 12:u.push([t-.5,e-.5-.5*(-i-r-a-n+4*h)/(i-r+a-n)]);break;case 13:u.push([t-.75-.25*(n+r-2*h)/(r-n),e-.25-.25*(-a-n+2*h)/(a-n)]);break;case 14:u.push([t-.25-.25*(-n-r+2*h)/(n-r),e-.25-.25*(-i-r+2*h)/(i-r)]);break;case 15:u.push([t-.5,e-.5])}},cell:function(t,e,r,n,i,a,o,s,l){i?s.push([t,e]):s.push([e,t])}});return function(t,e){var r=[],i=[];return n(t,r,i,e),{positions:r,cells:i}}}};var o={}},{\"ndarray-extract-contour\":251,\"zero-crossings\":318}],303:[function(t,e,r){(function(r){(function(){\"use strict\";e.exports=function t(e,r,i){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;o0&&(f+=.02);var p=new Float32Array(u),d=0,g=-.5*f;for(h=0;hMath.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],m=Math.cos(d),v=Math.sin(d),y=Math.cos(g),x=Math.sin(g),b=this.computedCenter,_=m*y,w=v*y,T=x,k=-m*x,A=-v*x,M=y,S=this.computedEye,E=this.computedMatrix;for(a=0;a<3;++a){var L=_*r[a]+w*h[a]+T*e[a];E[4*a+1]=k*r[a]+A*h[a]+M*e[a],E[4*a+2]=L,E[4*a+3]=0}var C=E[1],P=E[5],I=E[9],O=E[2],z=E[6],D=E[10],R=P*D-I*z,F=I*O-C*D,B=C*z-P*O,N=c(R,F,B);R/=N,F/=N,B/=N,E[0]=R,E[4]=F,E[8]=B;for(a=0;a<3;++a)S[a]=b[a]+E[2+4*a]*p;for(a=0;a<3;++a){u=0;for(var j=0;j<3;++j)u+=E[a+4*j]*S[j];E[12+a]=-u}E[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,m=(f/=d)*e+o*r,v=(h/=d)*e+s*r;this.center.move(t,g,m,v);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 m=c(s,l,f);s/=m,l/=m,f/=m}var v,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*f,T=c(x-=s*w,b-=l*w,_-=f*w),k=l*(_/=T)-f*(b/=T),A=f*(x/=T)-s*_,M=s*b-l*x,S=c(k,A,M);if(k/=S,A/=S,M/=S,this.center.jump(t,q,G,Y),this.radius.idle(t),this.up.jump(t,s,l,f),this.right.jump(t,x,b,_),2===a){var E=e[1],L=e[5],C=e[9],P=E*x+L*b+C*_,I=E*k+L*A+C*M;v=R<0?-Math.PI/2:Math.PI/2,y=Math.atan2(I,P)}else{var O=e[2],z=e[6],D=e[10],R=O*s+z*l+D*f,F=O*x+z*b+D*_,B=O*k+z*A+D*M;v=Math.asin(u(R)),y=Math.atan2(B,F)}this.angle.jump(t,y,v),this.recalcMatrix(t);var N=e[2],j=e[6],U=e[10],V=this.computedMatrix;i(V,e);var H=V[15],q=V[12]/H,G=V[13]/H,Y=V[14]/H,W=Math.exp(this.computedRadius[0]);this.center.jump(t,q-N*W,G-j*W,Y-U*W)},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],m=d[1],v=d[2],y=i*g+a*m+o*v,x=c(g-=y*i,m-=y*a,v-=y*o);if(!(x<.01&&(x=c(g=a*h-o*f,m=o*l-i*h,v=i*f-a*l))<1e-6)){g/=x,m/=x,v/=x,this.up.set(t,i,a,o),this.right.set(t,g,m,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var b=a*v-o*m,_=o*g-i*v,w=i*m-a*g,T=c(b,_,w),k=i*l+a*f+o*h,A=g*l+m*f+v*h,M=(b/=T)*l+(_/=T)*f+(w/=T)*h,S=Math.asin(u(k)),E=Math.atan2(M,A),L=this.angle._state,C=L[L.length-1],P=L[L.length-2];C%=2*Math.PI;var I=Math.abs(C+2*Math.PI-E),O=Math.abs(C-E),z=Math.abs(C-2*Math.PI-E);I0?r.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function g(t){return new Uint16Array(p(2*t),0,t)}function m(t){return new Uint32Array(p(4*t),0,t)}function v(t){return new Int8Array(p(t),0,t)}function y(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function T(t){return s?new BigUint64Array(p(8*t),0,t):null}function k(t){return l?new BigInt64Array(p(8*t),0,t):null}function A(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=f[e];return r.length>0?r.pop():new a(t)}r.free=function(t){if(a.isBuffer(t))f[n.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|n.log2(e);u[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeBigUint64=r.freeInt8=r.freeInt16=r.freeInt32=r.freeBigInt64=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){h(t.buffer)},r.freeArrayBuffer=h,r.freeBuffer=function(t){f[n.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||\"arraybuffer\"===e)return p(t);switch(e){case\"uint8\":return d(t);case\"uint16\":return g(t);case\"uint32\":return m(t);case\"int8\":return v(t);case\"int16\":return y(t);case\"int32\":return x(t);case\"float\":case\"float32\":return b(t);case\"double\":case\"float64\":return _(t);case\"uint8_clamped\":return w(t);case\"bigint64\":return k(t);case\"biguint64\":return T(t);case\"buffer\":return M(t);case\"data\":case\"dataview\":return A(t);default:return null}return null},r.mallocArrayBuffer=p,r.mallocUint8=d,r.mallocUint16=g,r.mallocUint32=m,r.mallocInt8=v,r.mallocInt16=y,r.mallocInt32=x,r.mallocFloat32=r.mallocFloat=b,r.mallocFloat64=r.mallocDouble=_,r.mallocUint8Clamped=w,r.mallocBigUint64=T,r.mallocBigInt64=k,r.mallocDataView=A,r.mallocBuffer=M,r.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,u[t].length=0,f[t].length=0}}).call(this)}).call(this,void 0!==n?n:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"bit-twiddle\":32,buffer:3,dup:65}],309:[function(t,e,r){\"use strict\";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e0&&(a=n.size),n.lineSpacing&&n.lineSpacing>0&&(o=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts));return r.font=[n.fontStyle,n.fontVariant,n.fontWeight,a+\"px\",n.font].filter((function(t){return t})).join(\" \"),r.textAlign=\"start\",r.textBaseline=\"alphabetic\",r.direction=\"ltr\",h(function(t,e,r,n,a,o){r=r.replace(/\\n/g,\"\"),r=!0===o.breaklines?r.replace(/\\/g,\"\\n\"):r.replace(/\\/g,\" \");var s=\"\",l=[];for(p=0;p-1?parseInt(t[1+i]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(n=n.replace(S(),\"?px \"),m*=Math.pow(.75,l-s),n=n.replace(\"?px \",S())),g+=.25*x*(l-s)}if(!0===o.superscripts){var c=t.indexOf(\"+\"),u=r.indexOf(\"+\"),f=c>-1?parseInt(t[1+c]):0,h=u>-1?parseInt(r[1+u]):0;f!==h&&(n=n.replace(S(),\"?px \"),m*=Math.pow(.75,h-f),n=n.replace(\"?px \",S())),g-=.25*x*(h-f)}if(!0===o.bolds){var p=t.indexOf(\"b|\")>-1,d=r.indexOf(\"b|\")>-1;!p&&d&&(n=v?n.replace(\"italic \",\"italic bold \"):\"bold \"+n),p&&!d&&(n=n.replace(\"bold \",\"\"))}if(!0===o.italics){var v=t.indexOf(\"i|\")>-1,y=r.indexOf(\"i|\")>-1;!v&&y&&(n=\"italic \"+n),v&&!y&&(n=n.replace(\"italic \",\"\"))}e.font=n}for(h=0;h\",a=\"\",o=i.length,s=a.length,l=\"+\"===e[0]||\"-\"===e[0],c=0,u=-s;c>-1&&-1!==(c=r.indexOf(i,c))&&-1!==(u=r.indexOf(a,c+o))&&!(u<=c);){for(var f=c;f=u)n[f]=null,r=r.substr(0,f)+\" \"+r.substr(f+1);else if(null!==n[f]){var h=n[f].indexOf(e[0]);-1===h?n[f]+=e:l&&(n[f]=n[f].substr(0,h+1)+(1+parseInt(n[f][h+1]))+n[f].substr(h+2))}var p=c+o,d=r.substr(p,u-p).indexOf(i);c=-1!==d?d:u+s}return n}function u(t,e){var r=n(t,128);return e?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function f(t,e,r,n){var i=u(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=0?e[a]:i}))},has___:{value:y((function(e){var n=v(e);return n?r in n:t.indexOf(e)>=0}))},set___:{value:y((function(n,i){var a,o=v(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:y((function(n){var i,a,o=v(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)}))}})};d.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 d||x();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 d),i.set(t,e)),this}:function(t,e){if(a)try{n.set(t,e)}catch(r){i||(i=new d),i.set___(t,e)}else n.set(t,e);return this},Object.create(d.prototype,{get___:{value:y((function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)}))},has___:{value:y((function(t){return n.has(t)||!!i&&i.has___(t)}))},set___:{value:y(e)},delete___:{value:y((function(t){var e=!!n.delete(t);return i&&i.delete___(t)||e}))},permitHostObjects___:{value:y((function(t){if(t!==g)throw new Error(\"bogus call to permitHostObjects___\");a=!0}))}})}t&&\"undefined\"!=typeof Proxy&&(Proxy=void 0),n.prototype=d.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=d)}function g(t){t.permitHostObjects___&&t.permitHostObjects___(g)}function m(t){return!(\"weakmap:\"==t.substr(0,\"weakmap:\".length)&&\"___\"===t.substr(t.length-3))}function v(t){if(t!==Object(t))throw new TypeError(\"Not an object: \"+t);var e=t[l];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return o(t,l,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function y(t){return t.prototype=null,Object.freeze(t)}function x(){h||\"undefined\"==typeof console||(h=!0,console.warn(\"WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future.\"))}}()},{}],314:[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\":315}],315:[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}},{}],316:[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\":314}],317:[function(t,e,r){\"use strict\";var n,i=function(){return function(t,e,r,n,i,a){var o=t[0],s=r[0],l=[0],c=s;n|=0;var u=0,f=s;for(u=0;u=0!=p>=0&&i.push(l[0]+.5+.5*(h+p)/(h-p)),n+=f,++l[0]}}};e.exports=(n={funcName:{funcName:\"zeroCrossings\"}.funcName},function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=[a,o.join()].join(),l=e[s];return l||(e[s]=l=t([a,o])),l(r.shape.slice(0),r.data,r.stride,0|r.offset,n,i)}}(i.bind(void 0,n)))},{}],318:[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\":317}]},{},[6])(6)}))}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}]},{},[27])(27)}));\n", " });\n", " require(['plotly'], function(Plotly) {\n", " window._Plotly = Plotly;\n", From fac2c87ee1b3aaa20c9d22310aa61e1faae5fd2c Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 22 Jun 2024 17:55:20 +0200 Subject: [PATCH 03/80] remove unused code and artifacts --- .readthedocs.yaml | 23 - Dockerfile | 18 - pyenzyme/__init__.py | 89 +- pyenzyme/enzymeml/__init__.py | 18 - pyenzyme/enzymeml/core/__init__.py | 19 - pyenzyme/enzymeml/core/abstract_classes.py | 69 - pyenzyme/enzymeml/core/complex.py | 119 -- pyenzyme/enzymeml/core/creator.py | 68 - pyenzyme/enzymeml/core/enzymemlbase.py | 134 -- pyenzyme/enzymeml/core/enzymemldocument.py | 1847 ----------------- pyenzyme/enzymeml/core/enzymereaction.py | 732 ------- pyenzyme/enzymeml/core/exceptions.py | 92 - pyenzyme/enzymeml/core/measurement.py | 475 ----- pyenzyme/enzymeml/core/measurementData.py | 195 -- pyenzyme/enzymeml/core/ontology.py | 89 - pyenzyme/enzymeml/core/protein.py | 259 --- pyenzyme/enzymeml/core/reactant.py | 211 -- pyenzyme/enzymeml/core/replicate.py | 152 -- pyenzyme/enzymeml/core/unitdef.py | 295 --- pyenzyme/enzymeml/core/utils.py | 27 - pyenzyme/enzymeml/core/vessel.py | 110 - pyenzyme/enzymeml/databases/__init__.py | 7 - pyenzyme/enzymeml/databases/dataverse.py | 274 --- pyenzyme/enzymeml/models/__init__.py | 12 - pyenzyme/enzymeml/models/kineticmodel.py | 426 ---- pyenzyme/enzymeml/models/michaelismenten.py | 107 - pyenzyme/enzymeml/tools/__init__.py | 17 - pyenzyme/enzymeml/tools/enzymemlreader.py | 939 --------- pyenzyme/enzymeml/tools/enzymemlwriter.py | 1031 --------- pyenzyme/enzymeml/tools/templatereader.py | 357 ---- pyenzyme/enzymeml/tools/unitcreator.py | 220 -- pyenzyme/enzymeml/tools/unitparser.py | 124 -- pyenzyme/enzymeml/tools/validator.py | 746 ------- pyenzyme/thinlayers/TL_Base.py | 65 - pyenzyme/thinlayers/TL_Copasi.py | 463 ----- pyenzyme/thinlayers/TL_Pysces.py | 375 ---- pyenzyme/thinlayers/TL_Strenda.py | 269 --- pyenzyme/thinlayers/__init__.py | 10 - pyenzyme/utils/__init__.py | 0 pyenzyme/utils/log.py | 73 - pyenzyme/utils/rest_examples.py | 174 -- pyenzyme_server.py | 405 ---- requirements.txt | 23 - setup.py | 64 - tests/enzymeml/__init__.py | 0 tests/enzymeml/core/__init__.py | 0 tests/enzymeml/core/test_abstract_classes.py | 40 - tests/enzymeml/core/test_complex.py | 35 - tests/enzymeml/core/test_creator.py | 31 - tests/enzymeml/core/test_enzymemldocument.py | 286 --- tests/enzymeml/core/test_enzymereaction.py | 402 ---- tests/enzymeml/core/test_measurement.py | 220 -- tests/enzymeml/core/test_measurement_data.py | 80 - tests/enzymeml/core/test_protein.py | 48 - tests/enzymeml/core/test_reactant.py | 44 - tests/enzymeml/core/test_replicate.py | 63 - tests/enzymeml/core/test_vessel.py | 36 - tests/enzymeml/models/__init__.py | 0 tests/enzymeml/models/test_kineticlaw.py | 134 -- tests/enzymeml/tools/__init__.py | 0 tests/enzymeml/tools/test_templatereader.py | 15 - tests/enzymeml/tools/test_unitcreator.py | 250 --- tests/enzymeml/tools/test_validator.py | 198 -- tests/fixtures/EnzymeML_Template_Example.xlsm | Bin 98325 -> 0 bytes tests/fixtures/enzmldoc_object.json | 219 -- tests/fixtures/measurement_data_object.json | 30 - tests/fixtures/measurement_object.json | 82 - tests/fixtures/reaction_object.json | 49 - tests/fixtures/replicate_object.json | 22 - tests/fixtures/template_result.json | 479 ----- tests/fixtures/test_case.omex | Bin 5024 -> 0 bytes tests/fixtures/validator_always_passes.yaml | 710 ------- .../validator_expected_conversion.yaml | 723 ------- tests/fixtures/validator_should_fail.yaml | 712 ------- tests/fixtures/write_xml_string.xml | 144 -- tests/test_tl_copasi.py | 73 - tests/thinlayers/__init__.py | 0 tests/write_test.omex | Bin 4251 -> 0 bytes 78 files changed, 67 insertions(+), 16280 deletions(-) delete mode 100644 .readthedocs.yaml delete mode 100644 Dockerfile delete mode 100644 pyenzyme/enzymeml/__init__.py delete mode 100644 pyenzyme/enzymeml/core/__init__.py delete mode 100644 pyenzyme/enzymeml/core/abstract_classes.py delete mode 100644 pyenzyme/enzymeml/core/complex.py delete mode 100644 pyenzyme/enzymeml/core/creator.py delete mode 100644 pyenzyme/enzymeml/core/enzymemlbase.py delete mode 100644 pyenzyme/enzymeml/core/enzymemldocument.py delete mode 100644 pyenzyme/enzymeml/core/enzymereaction.py delete mode 100644 pyenzyme/enzymeml/core/exceptions.py delete mode 100644 pyenzyme/enzymeml/core/measurement.py delete mode 100644 pyenzyme/enzymeml/core/measurementData.py delete mode 100644 pyenzyme/enzymeml/core/ontology.py delete mode 100644 pyenzyme/enzymeml/core/protein.py delete mode 100644 pyenzyme/enzymeml/core/reactant.py delete mode 100644 pyenzyme/enzymeml/core/replicate.py delete mode 100644 pyenzyme/enzymeml/core/unitdef.py delete mode 100644 pyenzyme/enzymeml/core/utils.py delete mode 100644 pyenzyme/enzymeml/core/vessel.py delete mode 100644 pyenzyme/enzymeml/databases/__init__.py delete mode 100644 pyenzyme/enzymeml/databases/dataverse.py delete mode 100644 pyenzyme/enzymeml/models/__init__.py delete mode 100644 pyenzyme/enzymeml/models/kineticmodel.py delete mode 100644 pyenzyme/enzymeml/models/michaelismenten.py delete mode 100644 pyenzyme/enzymeml/tools/__init__.py delete mode 100644 pyenzyme/enzymeml/tools/enzymemlreader.py delete mode 100644 pyenzyme/enzymeml/tools/enzymemlwriter.py delete mode 100644 pyenzyme/enzymeml/tools/templatereader.py delete mode 100644 pyenzyme/enzymeml/tools/unitcreator.py delete mode 100644 pyenzyme/enzymeml/tools/unitparser.py delete mode 100644 pyenzyme/enzymeml/tools/validator.py delete mode 100644 pyenzyme/thinlayers/TL_Base.py delete mode 100644 pyenzyme/thinlayers/TL_Copasi.py delete mode 100644 pyenzyme/thinlayers/TL_Pysces.py delete mode 100644 pyenzyme/thinlayers/TL_Strenda.py delete mode 100644 pyenzyme/thinlayers/__init__.py delete mode 100644 pyenzyme/utils/__init__.py delete mode 100644 pyenzyme/utils/log.py delete mode 100644 pyenzyme/utils/rest_examples.py delete mode 100644 pyenzyme_server.py delete mode 100644 requirements.txt delete mode 100644 setup.py delete mode 100644 tests/enzymeml/__init__.py delete mode 100644 tests/enzymeml/core/__init__.py delete mode 100644 tests/enzymeml/core/test_abstract_classes.py delete mode 100644 tests/enzymeml/core/test_complex.py delete mode 100644 tests/enzymeml/core/test_creator.py delete mode 100644 tests/enzymeml/core/test_enzymemldocument.py delete mode 100644 tests/enzymeml/core/test_enzymereaction.py delete mode 100644 tests/enzymeml/core/test_measurement.py delete mode 100644 tests/enzymeml/core/test_measurement_data.py delete mode 100644 tests/enzymeml/core/test_protein.py delete mode 100644 tests/enzymeml/core/test_reactant.py delete mode 100644 tests/enzymeml/core/test_replicate.py delete mode 100644 tests/enzymeml/core/test_vessel.py delete mode 100644 tests/enzymeml/models/__init__.py delete mode 100644 tests/enzymeml/models/test_kineticlaw.py delete mode 100644 tests/enzymeml/tools/__init__.py delete mode 100644 tests/enzymeml/tools/test_templatereader.py delete mode 100644 tests/enzymeml/tools/test_unitcreator.py delete mode 100644 tests/enzymeml/tools/test_validator.py delete mode 100644 tests/fixtures/EnzymeML_Template_Example.xlsm delete mode 100644 tests/fixtures/enzmldoc_object.json delete mode 100644 tests/fixtures/measurement_data_object.json delete mode 100644 tests/fixtures/measurement_object.json delete mode 100644 tests/fixtures/reaction_object.json delete mode 100644 tests/fixtures/replicate_object.json delete mode 100644 tests/fixtures/template_result.json delete mode 100644 tests/fixtures/test_case.omex delete mode 100644 tests/fixtures/validator_always_passes.yaml delete mode 100644 tests/fixtures/validator_expected_conversion.yaml delete mode 100644 tests/fixtures/validator_should_fail.yaml delete mode 100644 tests/fixtures/write_xml_string.xml delete mode 100644 tests/test_tl_copasi.py delete mode 100644 tests/thinlayers/__init__.py delete mode 100644 tests/write_test.omex diff --git a/.readthedocs.yaml b/.readthedocs.yaml deleted file mode 100644 index 2824666..0000000 --- a/.readthedocs.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# .readthedocs.yaml -# Read the Docs configuration file -# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details - -# Required -version: 2 - -# Set the version of Python and other tools you might need -build: - os: ubuntu-20.04 - tools: - python: '3.9' - -# Build documentation in the docs/ directory with Sphinx -sphinx: - configuration: docs/conf.py - -# Optionally declare the Python requirements required to build your docs -python: - install: - - requirements: docs/requirements.txt - - method: pip - path: . diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index e223577..0000000 --- a/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM python:3.9 -WORKDIR /app - -COPY . /app - -RUN apt-get update \ - && apt-get install -y --no-install-recommends git \ - && apt-get install -y --no-install-recommends gcc \ - && apt-get install -y --no-install-recommends cmake \ - && apt-get purge -y --auto-remove - - -RUN pip3 install git+https://github.com/EnzymeML/PyEnzyme.git -RUN pip3 install fastapi uvicorn jinja2 - -COPY pyenzyme_server.py /app - -CMD ["uvicorn", "pyenzyme_server:app", "--host", "0.0.0.0", "--port", "80"] \ No newline at end of file diff --git a/pyenzyme/__init__.py b/pyenzyme/__init__.py index fc23d64..5006ef4 100644 --- a/pyenzyme/__init__.py +++ b/pyenzyme/__init__.py @@ -1,22 +1,67 @@ -# File: __init__.py -# Project: pyenzyme -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -from pyenzyme.enzymeml.core import EnzymeMLDocument -from pyenzyme.enzymeml.core import Vessel -from pyenzyme.enzymeml.core import Protein -from pyenzyme.enzymeml.core import Complex -from pyenzyme.enzymeml.core import Reactant -from pyenzyme.enzymeml.core import EnzymeReaction -from pyenzyme.enzymeml.core import Measurement -from pyenzyme.enzymeml.core import Replicate -from pyenzyme.enzymeml.core import Creator -from pyenzyme.enzymeml.models import KineticModel -from pyenzyme.utils.log import setup_custom_logger - -import pyenzyme.enzymeml.models - - -__version__ = "1.1.5" +from __future__ import annotations + +import json +from rich import print +from pathlib import Path + +from .model import * # noqa: F403 +from .sbml import to_sbml # noqa: F401 +from .tabular import to_pandas, read_csv, read_excel # noqa: F401 + +__all__ = [ + "load_enzymeml", + "write_enzymeml", + "to_sbml", + "to_pandas", +] + + +def load_enzymeml(path: str) -> EnzymeMLDocument: # noqa: F405 + with open(path) as f: + return EnzymeMLDocument.model_validate_json(f.read()) # noqa: F405 + + +def write_enzymeml(doc: EnzymeMLDocument, path: Path | str | None = None): # noqa: F405 + data = json.loads(doc.model_dump_json(exclude_none=True, by_alias=True)) + data = json.dumps(sort_by_ld(data), indent=2) + + if path is None: + return data + elif isinstance(path, str): + path = Path(path) + + if path.is_dir(): + path = path / "experiment.json" + + with open(path, "w") as f: + f.write(data) + + print(f"\n EnzymeML document written to [green][bold]{path}[/bold][/green]\n") + + +def sort_by_ld(d: dict) -> dict: + keys = sorted(d.keys(), key=_pattern) + data = {} + + for key in keys: + value = d[key] + + if isinstance(value, dict): + data[key] = sort_by_ld(value) + elif isinstance(value, list) and all(isinstance(v, dict) for v in value): + data[key] = [sort_by_ld(v) for v in value] + else: + data[key] = value + + return data + + +def _pattern(s: str): + if s.startswith("@context"): + return 0 + elif s.startswith("@id"): + return 1 + elif s.startswith("@type"): + return 2 + else: + return 3 diff --git a/pyenzyme/enzymeml/__init__.py b/pyenzyme/enzymeml/__init__.py deleted file mode 100644 index 123f1bb..0000000 --- a/pyenzyme/enzymeml/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# File: __init__.py -# Project: enzymeml -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -from pyenzyme.enzymeml.core import EnzymeMLDocument -from pyenzyme.enzymeml.core import Creator -from pyenzyme.enzymeml.core import Vessel -from pyenzyme.enzymeml.core import Protein -from pyenzyme.enzymeml.core import Complex -from pyenzyme.enzymeml.core import Reactant -from pyenzyme.enzymeml.core import EnzymeReaction -from pyenzyme.enzymeml.core import Measurement -from pyenzyme.enzymeml.core import Replicate -from pyenzyme.enzymeml.core import SBOTerm, DataTypes - -from pyenzyme.enzymeml import models diff --git a/pyenzyme/enzymeml/core/__init__.py b/pyenzyme/enzymeml/core/__init__.py deleted file mode 100644 index 55ee360..0000000 --- a/pyenzyme/enzymeml/core/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# File: __init__.py -# Project: core -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -from pyenzyme.enzymeml.core.creator import Creator -from pyenzyme.enzymeml.core.enzymemldocument import EnzymeMLDocument -from pyenzyme.enzymeml.core.protein import Protein -from pyenzyme.enzymeml.core.complex import Complex -from pyenzyme.enzymeml.core.reactant import Reactant -from pyenzyme.enzymeml.core.replicate import Replicate -from pyenzyme.enzymeml.core.unitdef import UnitDef -from pyenzyme.enzymeml.core.vessel import Vessel -from pyenzyme.enzymeml.core.enzymereaction import EnzymeReaction -from pyenzyme.enzymeml.core.enzymemlbase import EnzymeMLBase -from pyenzyme.enzymeml.core.measurementData import MeasurementData -from pyenzyme.enzymeml.core.measurement import Measurement -from pyenzyme.enzymeml.core.ontology import SBOTerm, DataTypes diff --git a/pyenzyme/enzymeml/core/abstract_classes.py b/pyenzyme/enzymeml/core/abstract_classes.py deleted file mode 100644 index 730a3e7..0000000 --- a/pyenzyme/enzymeml/core/abstract_classes.py +++ /dev/null @@ -1,69 +0,0 @@ -# File: creator.py -# Project: core -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -from pydantic import BaseModel, PrivateAttr, validator -from typing import Optional -from abc import ABC, abstractmethod - -from pyenzyme.enzymeml.core.ontology import SBOTerm - - -class AbstractSpeciesDataclass(BaseModel): - """Abstract dataclass to describe an EnzymeML/SBML species.""" - - name: str - meta_id: Optional[str] - id: Optional[str] - vessel_id: str - init_conc: Optional[float] = None - constant: bool - boundary: bool - unit: Optional[str] = None - ontology: SBOTerm - uri: Optional[str] - creator_id: Optional[str] - - # * Private attributes - _unit_id: Optional[str] = PrivateAttr(default=None) - _enzmldoc = PrivateAttr(default=None) - - -class AbstractSpecies(ABC, AbstractSpeciesDataclass): - """Due to inheritance and type-checking issues, the dataclass has to be mixed in.""" - - # ! Validators - @validator("id") - def set_meta_id(cls, id: Optional[str], values: dict): - """Sets the meta ID when an ID is provided""" - - if id: - # Set Meta ID with ID - values["meta_id"] = f"METAID_{id.upper()}" - - return id - - # ! Getters - def unitdef(self): - """Returns the appropriate unitdef if an enzmldoc is given""" - - if not self._enzmldoc: - return None - if not self.unit: - return None - - return self._enzmldoc._unit_dict[self._unit_id] - - -class AbstractSpeciesFactory(ABC): - """ - Factory that returns a specific species instance. - """ - - enzymeml_part: str - - @abstractmethod - def get_species(self, **kwargs) -> AbstractSpecies: - """Return a new species object""" diff --git a/pyenzyme/enzymeml/core/complex.py b/pyenzyme/enzymeml/core/complex.py deleted file mode 100644 index 836587d..0000000 --- a/pyenzyme/enzymeml/core/complex.py +++ /dev/null @@ -1,119 +0,0 @@ -# File: complex.py -# Project: core -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -import re - -from pydantic import validator, Field -from typing import List, Optional, TYPE_CHECKING -from dataclasses import dataclass - -from pyenzyme.enzymeml.core.enzymemlbase import EnzymeMLBase -from pyenzyme.enzymeml.core.abstract_classes import AbstractSpecies -from pyenzyme.enzymeml.core.exceptions import ParticipantIdentifierError -from pyenzyme.enzymeml.core.ontology import SBOTerm -from pyenzyme.enzymeml.core.utils import ( - type_checking, -) - -if TYPE_CHECKING: # pragma: no cover - static_check_init_args = dataclass -else: - static_check_init_args = type_checking - - -@static_check_init_args -class Complex(EnzymeMLBase, AbstractSpecies): - - name: str = Field( - ..., - description="Name of the complex", - ) - - participants: List[str] = Field( - default_factory=list, - description="Array of IDs the complex contains", - ) - - vessel_id: str = Field( - ..., - description="Identifier of the vessel in which the protein was stored.", - regex=r"v[\d]+", - ) - - init_conc: Optional[float] = Field( - None, description="Initial concentration of the protein.", inclusiveMinimum=0.0 - ) - - unit: Optional[str] = Field( - None, - description="Unit of the proteins intial concentration.", - ) - - constant: bool = Field( - False, - description="Whether the proteins concentration remains constant or not.", - ) - - meta_id: Optional[str] = Field( - None, - description="Unique meta identifier of the protein.", - ) - - id: Optional[str] = Field( - None, description="Unique identifier of the protein.", regex=r"c[\d]+" - ) - - boundary: bool = Field( - False, - description="Whether the protein is under any boundary conditions (SBML Technicality, better leave it to default)", - ) - - ontology: SBOTerm = Field( - SBOTerm.MACROMOLECULAR_COMPLEX, - description="Ontology describing the characteristic of the protein.", - ) - - uri: Optional[str] = Field( - None, - description="URI of the protein.", - ) - - creator_id: Optional[str] = Field( - None, - description="Unique identifier of the author.", - ) - - # ! Validators - @validator("id") - def set_meta_id(cls, id: Optional[str], values: dict): - """Sets the meta ID when an ID is provided""" - - if id: - # Set Meta ID with ID - values["meta_id"] = f"METAID_{id.upper()}" - - return id - - @validator("participants") - def check_reactant_ids(cls, ids: List[str]): - """Checks ID consistency for reactants""" - - for id in ids: - if cls._id_checker(id, r"s[\d]+"): - # Check for reactants - continue - elif cls._id_checker(id, r"p[\d]+"): - # Check for proteins - continue - else: - raise ParticipantIdentifierError(id=id, prefix="s/p") - - return ids - - @staticmethod - def _id_checker(id: str, pattern: str): - """Checks ID pattern""" - return bool(re.match(pattern, id)) diff --git a/pyenzyme/enzymeml/core/creator.py b/pyenzyme/enzymeml/core/creator.py deleted file mode 100644 index 1d76e2b..0000000 --- a/pyenzyme/enzymeml/core/creator.py +++ /dev/null @@ -1,68 +0,0 @@ -# File: creator.py -# Project: core -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -from pydantic import Field, validator, ValidationError -from typing import TYPE_CHECKING, Optional -from dataclasses import dataclass - -from pyenzyme.enzymeml.core.enzymemlbase import EnzymeMLBase -from pyenzyme.enzymeml.core.utils import type_checking, deprecated_getter - -if TYPE_CHECKING: # pragma: no cover - static_check_init_args = dataclass -else: - static_check_init_args = type_checking - - -@static_check_init_args -class Creator(EnzymeMLBase): - - given_name: str = Field( - ..., - description="Given name of the author or contributor.", - ) - - family_name: str = Field( - ..., - description="Family name of the author or contributor.", - ) - - mail: str = Field( - ..., - description="Email address of the author or contributor.", - ) - - id: Optional[str] = Field( - None, description="Unique identifier of the protein.", regex=r"a[\d]+" - ) - - @validator("given_name", "family_name", "mail", pre=True) - def check_empty_strings(cls, value): - if not value: - raise ValueError( - "An empty string has been provided. Please make sure to provide a valid string." - ) - - return value - - @validator("mail") - def check_mail_consistency(cls, mail): - if len(mail.split("@")) != 2: - raise ValueError(f"{mail} is not a valid mail adress.") - - return mail - - @deprecated_getter("family_name") - def getFname(self) -> str: - return self.family_name - - @deprecated_getter("given_name") - def getGname(self) -> str: - return self.given_name - - @deprecated_getter("mail") - def getMail(self) -> str: - return self.mail diff --git a/pyenzyme/enzymeml/core/enzymemlbase.py b/pyenzyme/enzymeml/core/enzymemlbase.py deleted file mode 100644 index 5bc1494..0000000 --- a/pyenzyme/enzymeml/core/enzymemlbase.py +++ /dev/null @@ -1,134 +0,0 @@ -# File: baseclass.py -# Project: core -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -import json -import logging - -from pydantic import BaseModel -from pyenzyme.utils.log import log_change, log_object - - -logger = logging.getLogger("pyenzyme") - - -class EnzymeMLBase(BaseModel): - class Config: - validate_assignment = True - validate_all = True - - def json(self, indent: int = 2, **kwargs): - return super().json( - indent=indent, - exclude_none=True, - exclude={ - "log": ..., - "file_dict": ..., - "protein_dict": {"Protein": {"__all__": {"_unit_id"}}}, - }, - by_alias=True, - **kwargs, - ) - - @classmethod - def fromJSON(cls, json_string): - return cls.parse_obj(json.loads(json_string)) - - def __setattr__(self, name, value): - """Modified attribute setter to document changes in the EnzymeML document""" - - # TODO Refactor this to spearate methods - - # Check if there is a model that is to be added - if name == "model" and value is not None: - if self._enzmldoc: - value = self.set_kinetic_model( - model=value, reaction=self, enzmldoc=self._enzmldoc - ) - - # Check for changing units and assign a new one - if "unit" in name and not name.startswith("_") and hasattr(self, "_enzmldoc"): - if self._enzmldoc and value: - # When the object has already been assigned to a document - # use this to set and add the new unit - - # Create a new UnitDef and get the ID - new_unit_id = self._enzmldoc._convertToUnitDef(value) - value = self._enzmldoc._unit_dict[new_unit_id]._get_unit_name() - - # Set the unit ID to the object - attr_name = f"_{name}_id" - super().__setattr__(attr_name, new_unit_id) - - # Perform logging of the new attribute to history - old_value = getattr(self, name) - - # Whenever a new ID is assigned, make sure the names are compliant with our standards - if "unit_id" in name and hasattr(self, "_enzmldoc"): - if self._enzmldoc: - unit_name = self._enzmldoc._unit_dict[value]._get_unit_name() - attr_name = name.replace("_id", "")[1::] - super().__setattr__(attr_name, unit_name) - - if ( - isinstance(old_value, list) is False - and name.startswith("_") is False - and name != "id" - and old_value - ): - - if type(self).__name__ != "EnzymeMLDocument": - - try: - log_change( - logger, - type(self).__name__, - getattr(self, "id"), - name, - old_value, - value, - ) - - except AttributeError: - log_change( - logger, - type(self).__name__, - self.get_id(), - name, - old_value, - value, - ) - - # Finally, set the new attribute's value - super().__setattr__(name, value) - - @staticmethod - def set_kinetic_model( - model, - reaction, - enzmldoc, - ) -> None: - """Sets the kinetic model of the reaction and in addition converts all units to UnitDefs. - - Args: - model (KineticModel): Kinetic model that has been derived. - enzmldoc (EnzymeMLDocument): The EnzymeMLDocument that holds the reaction. - """ - - # ID consistency - enzmldoc._check_kinetic_model_ids( - model=model, - ) - - # Unit conversion - enzmldoc._convert_kinetic_model_units(model.parameters, enzmldoc=enzmldoc) - - # Log creator object - log_object(logger, model) - logger.debug( - f"Added {type(model).__name__} '{model.name}' to reaction '{reaction.name}'" - ) - - return model diff --git a/pyenzyme/enzymeml/core/enzymemldocument.py b/pyenzyme/enzymeml/core/enzymemldocument.py deleted file mode 100644 index ca022ae..0000000 --- a/pyenzyme/enzymeml/core/enzymemldocument.py +++ /dev/null @@ -1,1847 +0,0 @@ -# File: enzymemldocument.py -# Project: core -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -import os -import re -import ast -import json -import yaml -import sys -import logging -import pandas as pd -import seaborn as sns -import plotly.express as px - -from pydantic import Field, PrivateAttr, validator, validate_arguments -from typing import Dict, List, Tuple, TYPE_CHECKING, Optional, Union -from dataclasses import dataclass -from io import StringIO - -from pyenzyme.enzymeml.core.enzymemlbase import EnzymeMLBase -from pyenzyme.enzymeml.core.abstract_classes import AbstractSpecies - -from pyenzyme.enzymeml.core.reactant import Reactant -from pyenzyme.enzymeml.core.creator import Creator -from pyenzyme.enzymeml.core.protein import Protein -from pyenzyme.enzymeml.core.complex import Complex -from pyenzyme.enzymeml.core.vessel import Vessel -from pyenzyme.enzymeml.core.unitdef import UnitDef -from pyenzyme.enzymeml.core.measurement import Measurement -from pyenzyme.enzymeml.core.measurementData import MeasurementData -from pyenzyme.enzymeml.core.enzymereaction import EnzymeReaction -from pyenzyme.enzymeml.models.kineticmodel import KineticParameter -from pyenzyme.enzymeml.tools.unitcreator import UnitCreator -from pyenzyme.enzymeml.tools.enzymemlwriter import EnzymeMLWriter -from pyenzyme.enzymeml.tools.templatereader import read_template -from pyenzyme.enzymeml.tools.validator import EnzymeMLValidator - -from pyenzyme.enzymeml.core.ontology import EnzymeMLPart, SBOTerm -from pyenzyme.utils.log import setup_custom_logger, log_object -from pyenzyme.enzymeml.core.exceptions import SpeciesNotFoundError -from pyenzyme.enzymeml.core.utils import type_checking, deprecated_getter - - -if TYPE_CHECKING: # pragma: no cover - static_check_init_args = dataclass -else: - static_check_init_args = type_checking - -# Initialize the logger -logger = logging.getLogger("pyenzyme") - - -@static_check_init_args -class EnzymeMLDocument(EnzymeMLBase): - - name: str = Field( - ..., - description="Title of the EnzymeML Document.", - ) - - level: int = Field( - 3, - description="SBML evel of the EnzymeML XML.", - inclusiveMinimum=1, - inclusiveMaximum=3, - ) - - version: int = Field( - 2, - description="SBML version of the EnzymeML XML.", - ) - - pubmedid: Optional[str] = Field( - None, - description="Pubmed ID reference.", - ) - - url: Optional[str] = Field( - None, - description="Arbitrary type of URL that is related to the EnzymeML document.", - ) - - doi: Optional[str] = Field( - None, - description="Digital Object Identifier of the referenced publication or the EnzymeML document.", - ) - - created: Optional[str] = Field( - None, - description="Date the EnzymeML document was created.", - ) - - modified: Optional[str] = Field( - None, - description="Date the EnzymeML document was modified.", - ) - - creator_dict: Dict[str, Creator] = Field( - alias="creators", - default_factory=dict, - description="Dictionary mapping from creator IDs to creator describing objects.", - ) - - vessel_dict: Dict[str, Vessel] = Field( - alias="vessels", - default_factory=dict, - description="Dictionary mapping from vessel IDs to vessel describing objects.", - ) - - protein_dict: Dict[str, Protein] = Field( - alias="proteins", - default_factory=dict, - description="Dictionary mapping from protein IDs to protein describing objects.", - ) - - complex_dict: Dict[str, Complex] = Field( - alias="complexes", - default_factory=dict, - description="Dictionary mapping from complex IDs to complex describing objects.", - ) - - reactant_dict: Dict[str, Reactant] = Field( - alias="reactants", - default_factory=dict, - description="Dictionary mapping from reactant IDs to reactant describing objects.", - ) - - reaction_dict: Dict[str, EnzymeReaction] = Field( - alias="reactions", - default_factory=dict, - description="Dictionary mapping from reaction IDs to reaction describing objects.", - ) - - measurement_dict: Dict[str, Measurement] = Field( - alias="measurements", - default_factory=dict, - description="Dictionary mapping from measurement IDs to measurement describing objects.", - ) - - file_dict: Dict[str, dict] = Field( - alias="files", - default_factory=dict, - description="Dictionary mapping from protein IDs to protein describing objects.", - ) - - global_parameters: Dict[str, KineticParameter] = Field( - alias="global_parameters", - default_factory=dict, - description="Dictionary mapping from parameter IDs to global kinetic parameter describing objects.", - ) - - log: str = Field( - default="", - ) - - # * Private attributes - _unit_dict: Dict[str, UnitDef] = PrivateAttr(default_factory=dict) - - # ! Validators - @validator("log") - def start_logger(cls, logs: str, values: dict): - """Starts a logger instance for the document""" - - # Initialite the log stream - log_stream = StringIO() - log_stream.write(logs) - - # Initialize the global logger - setup_custom_logger("pyenzyme", log_stream) - - return log_stream - - @validator("pubmedid") - def add_identifier(cls, pubmedid: Optional[str]): - """Adds an identifiers.org link in front of the pubmed ID if not given""" - - if pubmedid is None: - return pubmedid - elif pubmedid.startswith("https://identifiers.org/pubmed:"): - return pubmedid - else: - return "https://identifiers.org/pubmed:" + pubmedid - - # ! Imports and exports - @classmethod - def fromTemplate(cls, path: str): - """Reads an EnzymeML spreadsheet template to an EnzymeMLDocument object. - - Args: - path (str): Path to the EnzymeML spreadsheet template. - - Returns: - EnzymeMLDocument: Resulting EnzymeML document. - """ - - return read_template(path, cls) - - @staticmethod - def fromFile(path: str): - """Initializes an EnzymeMLDocument from an OMEX container." - - Args: - path (Path): Path to the OMEX container. - - Returns: - EnzymeMLDocument: The intialized EnzymeML document. - """ - - from pyenzyme.enzymeml.tools.enzymemlreader import EnzymeMLReader - - return EnzymeMLReader().readFromFile(path) - - @classmethod - def fromJSON(cls, json_string: str): - - # First, use PyDantic to get a raw model - enzmldoc = cls.parse_obj(json.loads(json_string)) - - # Recreate to get unitDefs and logs - nu_enzmldoc = cls( - name=enzmldoc.name, - level=enzmldoc.level, - version=enzmldoc.version, - pubmedid=enzmldoc.pubmedid, - url=enzmldoc.url, - doi=enzmldoc.doi, - created=enzmldoc.created, - modified=enzmldoc.modified, - ) - - # Creators - for creator in enzmldoc.creator_dict.values(): - nu_enzmldoc.addCreator(creator) - - # Vessels - for vessel in enzmldoc.vessel_dict.values(): - nu_enzmldoc.addVessel(vessel) - - # Proteins - for protein in enzmldoc.protein_dict.values(): - nu_enzmldoc.addProtein(protein) - - # Reactants - for reactant in enzmldoc.reactant_dict.values(): - nu_enzmldoc.addReactant(reactant) - - # Complexes - for complex in enzmldoc.complex_dict.values(): - nu_enzmldoc._add_complex(complex) - - # Reactions - for reaction in enzmldoc.reaction_dict.values(): - nu_enzmldoc.addReaction(reaction) - - # Measurements - for measurement in enzmldoc.measurement_dict.values(): - nu_measurement = Measurement( - name=measurement.name, - temperature=measurement.temperature, - temperature_unit=measurement.temperature_unit, - ph=measurement.ph, - global_time_unit=measurement.global_time_unit, - ) - - cls._parse_measurement_data( - measurement, "proteins", nu_measurement, nu_enzmldoc - ) - cls._parse_measurement_data( - measurement, "reactants", nu_measurement, nu_enzmldoc - ) - - nu_enzmldoc.addMeasurement(nu_measurement) - - return nu_enzmldoc - - @staticmethod - def _parse_measurement_data(measurement, key, nu_measurement, enzmldoc): - """Parses measurement data for the fromJSON method""" - - for measurement_data in measurement.species_dict[key].values(): - nu_measurement.addData( - init_conc=measurement_data.init_conc, - unit=measurement_data.unit, - protein_id=measurement_data.protein_id, - reactant_id=measurement_data.reactant_id, - ) - - nu_measurement.addReplicates(measurement_data.replicates, enzmldoc=enzmldoc) - - def toFile(self, path: str, name: Optional[str] = None): - """Saves an EnzymeML document to an OMEX container at the specified path - - Args: - path (Path): Path where the document should be saved. - verbose (PositiveInt, optional): Level of verbosity, in order to print a message and the resulting path. Defaults to 1. - """ - - EnzymeMLWriter().toFile(self, path, name) - - def toXMLString(self): - """Generates an EnzymeML XML string""" - - return EnzymeMLWriter().toXMLString(self) - - @validate_arguments - def uploadToDataverse( - self, - dataverse_name: str, - base_url: Optional[str] = None, - api_token: Optional[str] = None, - ): - """Uploads an EnzymeML document to a Dataverse installation of choice. - - It should be noted, that the environment variables 'DATAVERSE_URL' and 'DATAVERSE_API_TOKEN' - should be given approriately before the upload. If not, tje upload cant be done. - - Args: - dataverse_name (str): Name of the dataverse to upload the EnzymeML document. You can find the name in the link of your dataverse (e.g. https://dataverse.installation/dataverse/{dataverseName}) - base_url (str): Base URL of the dataverse to upload. Defaults to None. If None the URL will be drawn from env vars. - api_token (str): API Token of the dataverse to upload. Defaults to None. If None the API Token will be drawn from env vars. - - """ - - try: - from pyenzyme.enzymeml.databases.dataverse import uploadToDataverse - except ModuleNotFoundError: - raise ModuleNotFoundError( - "PyDaRUS has not been found. Please make sure to install 'pyDaRUS' to use the dataverse upload." - ) - - uploadToDataverse( - enzmldoc=self, - dataverse_name=dataverse_name, - base_url=base_url, - api_token=api_token, - ) - - # ! Utility methods - def visualize( - self, - measurement_ids: List[str] = ["all"], - interactive: bool = False, - use_names: bool = False, - sharey: bool = True, - col_wrap: int = 4, - trendline: bool = False, - width: int = 1000, - height: int = 500, - hovermode: str = "closest", - **kwargs, - ): - """Visualizes either all or selected measurements found in the EnzymeML document as FacetGrid or interactive. - - In order to use this method correctly, make sure to pass nothing to 'measurement_ids' when all meassurements - should be visualised. Otherwise pass a list or string for multiple or single measurements respectively. - - - Args: - measurement_ids (List[str], optional): List of measurements that should be plotted or all. Defaults to ["all"]. - interactive (bool, optional): [description]. Whether to return an interatcive or static plot. Defaults to to False. - use_names (bool, optional): Whether names or IDs should be used. Defaults to False. - sharey (bool, optional): Whether all plots in FacetGrid should share the y-axis. Defaults to True. - col_wrap (int, optional): Specifies in FacetGrid at which number of cols to create a new row. Defaults to 4. - trendline (bool, optional): Whether the plot should include a trendline. Defaults to False. - width (int, optional): Interactive plot width. Defaults to 1000. - height (int, optional): Interactive plot height. Defaults to 500. - hovermode (str, optional): Changes behaviour of hovering. Following options are available ['closest', 'x unified', 'x', 'y', 'y unified']. Defaults to 'closest'. - - Returns: - [type]: [description] - """ - - if isinstance(measurement_ids, str): - measurement_ids = [measurement_ids] - - # Allow for custom templates if specified - if interactive: - kwargs["template"] = "plotly_white" - - df = self.toDataFrame(use_names=use_names, measurement_ids=measurement_ids) - - if interactive: - return self._create_interactive_plot( - df=df, - trendline=trendline, - width=width, - height=height, - hovermode=hovermode, - **kwargs, - ) - - return self._create_facet_grid( - df=df, trendline=trendline, col_wrap=col_wrap, sharey=sharey, **kwargs - ) - - def _create_facet_grid( - self, - df: pd.DataFrame, - col_wrap: int, - sharey: bool, - trendline: bool, - **kwargs, - ): - - # Set up the FacetGrid plot - g = sns.FacetGrid( - df, - col="measurement", - hue="species", - col_wrap=col_wrap, - sharey=sharey, - legend_out=True, - **kwargs, - ) - - if trendline: - g.map(sns.lineplot, "time", "value") - g.map(sns.scatterplot, "time", "value") - g.add_legend( - loc="upper right", - bbox_to_anchor=(0.5, -0.01), - fancybox=True, - shadow=True, - ncol=2, - ) - - return g - - def _create_interactive_plot( - self, - df: pd.DataFrame, - trendline: bool, - width: int, - height: int, - hovermode: str, - **kwargs, - ): - """Visualizes all measurements as an interactive plot based on plotly. Best used in Jupyter Notebooks. - - Args: - trendline (bool, optional): Whether or not an average trendline should be drawn. Defaults to False. - width (int, optional): Plot width. Defaults to 1000. - height (int, optional): Plot height. Defaults to 500. - """ - - if trendline: - kwargs.update({"trendline": "lowess", "trendline_options": {"frac": 0.5}}) - - fig = px.scatter( - df, - x="time", - y="value", - animation_frame="measurement", - color="species", - range_y=[-5, df.value.max() + df.value.std()], - width=width, - height=height, - hover_name="species", - **kwargs, - ) - - fig.update_layout( - legend=dict(orientation="h", yanchor="bottom", y=1.02, xanchor="right", x=1) - ) - - fig.update_layout(hovermode=hovermode) - - return fig - - def toDataFrame( - self, - measurement_ids: List[str] = ["all"], - use_names: bool = False, - ) -> pd.DataFrame: - """Transforms exported measurement data to a single DataFrame - - Args: - measurement_ids (List[str], optional): Measurements to include or all of them. Defaults to ["all"]. - use_names (bool, optional): Wether names or IDs should be used. Defaults to False. - - Returns: - pd.DataFrame: Transformed measurement data. - """ - - # First export all the experimental data - data = self.exportMeasurementData() - - # Reformat the dataframe for a FacetGrid plot - df_plot = [] - for measurement_id, measurement in data.items(): - - if measurement_id not in measurement_ids and measurement_ids != ["all"]: - # Drop discarded measurements - continue - - if use_names: - # Turn ID to name if specified - measurement_id = self.measurement_dict[measurement_id].name - - # Get the dataframe from the data export - exp_data = measurement["data"] - - # Rename to names if specified - columns = [] - for column in exp_data.columns: - if use_names and column not in ["time", "data_unit", "time_unit"]: - columns.append(self.getAny(column).name) - else: - columns.append(column) - - # Reset columns - exp_data.columns = columns - - # Reduce DataFrame to three columns to hue indicidual species - exp_data = pd.melt(exp_data, id_vars=["time"], var_name="species") - exp_data["measurement"] = [measurement_id] * exp_data.shape[0] - - df_plot.append(exp_data) - - # Finally, concatenate all indivdidual datasets - df_plot = pd.concat(df_plot) - - return df_plot - - def unifyMeasurementUnits( - self, kind: str, scale: int, measurement_ids: Union[str, List[str]] = "all" - ) -> None: - """Rescales and unifies the units of either all measurements or those that are provided to the given kind and scale. - - Args: - kind (str): The unit kind from which to rescale. Currently supported: 'mole', 'gram', 'litre'. - scale (int): Decade scale to which the values will be rescaled. - measurement_ids (Union[str, List[str]], optional): Measurements that will be rescaled. Defaults to "all". - """ - - # Transform single strings to list - if isinstance(measurement_ids, str): - measurement_ids = [measurement_ids] - - for measurement_id, measurement in self.measurement_dict.items(): - if measurement_id in measurement_ids or measurement_ids == ["all"]: - measurement.unifyUnits(kind=kind, scale=scale, enzmldoc=self) - - def exportMeasurementData( - self, - measurement_ids: Union[str, List[str]] = "all", - species_ids: Union[str, List[str]] = "all", - proteins: bool = True, - reactants: bool = True, - ) -> Dict[str, Dict[str, Union[Tuple, pd.DataFrame]]]: - """Exports either all replicates present in any measurement or the ones specified via 'species_ids' or 'measurement_ids' - - Args: - measurement_ids (Union[str, List[str]], optional): The measurements from which to export the data. Defaults to "all". - species_ids (Union[str, List[str]], optional): The species from which to export the data. Defaults to "all". - - Returns: - Dict[str, Dict[str, Union[tuple, pd.DataFrame]]]: The data corresponding to the specified options. The dictionary will still distinguish between meassuremnts. - """ - - if proteins is False and reactants is False: - raise ValueError( - "Export of data needs at least one of 'protein' and 'reactants' specified. Otherwise no data can be exported." - ) - - if isinstance(measurement_ids, str): - measurement_ids = [measurement_ids] - if isinstance(species_ids, str): - species_ids = [species_ids] - - # Initialize return list - replicate_data = {} - - for measurement_id, measurement in self.measurement_dict.items(): - if measurement_id in measurement_ids or measurement_ids == ["all"]: - data = measurement.exportData(species_ids=species_ids) - - # Initialize the data dict that will be returned - df = {} - init_conc = {} - - if reactants: - df.update(data["reactants"]["data"].to_dict()) - init_conc.update(data["reactants"]["initConc"]) - if proteins: - df.update(data["proteins"]["data"].to_dict()) - init_conc.update(data["proteins"]["initConc"]) - - replicate_data[measurement_id] = { - "data": pd.DataFrame(df), - "initConc": init_conc, - } - - if len(measurement_ids) == 1 and measurement_ids[0] != "all": - # If its only a single measurement, return it directly - return replicate_data - - return replicate_data - - def exportKineticParameters( - self, exclude_constant: bool = False, as_dataframe: bool = True - ): - """Exports all kinetic parameters found in the EnzymeMLDocument - - Args: - reactions (List[str]): Reactions from which the parameters are to be exported. - - Returns: - Dict: Mapping from parameter name to estimated value - """ - - # Export local parameters - params = [ - {"reaction": reaction.id, **param.dict(exclude={"ontology"})} - for reaction in self.reaction_dict.values() - for param in reaction.model.parameters - if reaction.model and not param.is_global - ] - - # Global parameters - params += [ - {"reaction": "global", **param.dict(exclude={"ontology"})} - for param in self.global_parameters.values() - ] - - # Create param report - param_report = pd.DataFrame(params).set_index("reaction", inplace=False) - - if exclude_constant: - return param_report[param_report.constant == False] - - return param_report - - @staticmethod - def _generateID(prefix: str, dictionary: dict) -> str: - """Generates IDs complying to the [s|p|r|m|u|c]?[digit]+ schema. - - Args: - prefix (str): Character denoting the type of species (p: Protein, s: Reactant, u: UnitDef, r: EnzymeReaction, m: Measurement, c: concentration). - dictionary (dict): The dictionary from which the ID is generated and used to determine the number. - - Returns: - str: Unique internal identifier. - """ - - if dictionary.keys(): - # fetch all keys and sort them - number = int(max(list(dictionary.keys()), key=lambda id: int(id[1::]))[1::]) - return prefix + str(number + 1) - - return prefix + str(0) - - def validateDocument(self, yaml_path: str) -> Tuple[Dict, bool]: - """Validates an EnzymeML based on a given YAML file. - - The YAML file should be compliant with PyEnzymes template found on Github - or generated via the EnzymeMLValidator instance. Ultimately, it can also - be derived from a spreadsheet template, which can also be generated via - the EnzymeMLValidator instance. - - Args: - yaml_path (str): Path to the Validation YAML file - - Returns: - Dict: Report on which fields are incompatible - Bool: Whether or not the document is valid to the given YAML - """ - - validator = EnzymeMLValidator(scheme=yaml.safe_load(open(yaml_path))) - - return validator.validate(self) - - def checkUnitConsistency(self, strict: bool = False, return_report: bool = True): - """Validates unit consistency in an EnzymeMLDocument. - - This method will check whether all (initial) concentration units of a species - are consistent throughout the document. Default mode only requires measurements and - replicates to comply to the species unit. - - This can also be set to 'strict', where any species, measurement, - replicate and parameter has to comply in a global fashion. - To summarise, strict mode checks on: - - - Consistent usage of time - - Consistent concentration units for ALL concentrations - - Consistent volumetric unit including vessels - - Strict mode is of greates importance for kinetic modeling, differing scales - can lead to wrong results. However, the code will still run and only warnings - will be given. - - Args: - strict (bool, optional): Enables strict mode. Defaults to False. - return_report (bool, optional): Whether a report should be returned. Defaults to False. - - Returns: - Dict: Report on which units are inconsistent - Bool: Whether the document is consistent in units - """ - - is_consistent, report = EnzymeMLValidator.check_unit_consistency(self, strict) - - if return_report: - return is_consistent, report - else: - return is_consistent - - def __repr__(self): - """ - Magic function return pretty string describing the object. - - Returns: - string: Beautified summarization of object - """ - - return self.printDocument(stdout=False) - - def printDocument( - self, measurements: bool = False, units: bool = False, stdout: bool = True - ) -> Optional[str]: - """Prints the document's content""" - - fin_string: List[str] - - def generate_lines(dictionary: dict) -> None: - """Breaks up a dictionary and generates a human readible line.""" - for element_id, element in dictionary.items(): - fin_string.append(f"\tID: {element_id} \t Name: {element.name}") - - fin_string = [self.name] - - if units: - fin_string.append(">>> Units") - generate_lines(self._unit_dict) - - fin_string.append(">>> Reactants") - generate_lines(self.reactant_dict) - - fin_string.append(">>> Proteins") - generate_lines(self.protein_dict) - - fin_string.append(">>> Complexes") - generate_lines(self.complex_dict) - - fin_string.append(">>> Reactions") - generate_lines(self.reaction_dict) - - if measurements: - fin_string.append(">>> Measurements") - fin_string.append(self.printMeasurements(stdout=False)) - - output = "\n".join(fin_string) - - if stdout: - print(output) - else: - return output - - def printMeasurements(self, stdout: bool = True): - """Prints an overview of all measurements""" - - schemes = [] - for measurement in self.measurement_dict.values(): - schemes.append(measurement.printMeasurementScheme(stdout=stdout)) - - if not stdout: - return "\n".join(schemes) - - def printReactionSchemes(self, by_name: bool = True): - """Prints all reaction equations to inspect the content""" - - if len(self.reaction_dict) == 0: - print(">> No reactions present in this EnzymeML Document.", file=sys.stderr) - return - - output = [] - - for reaction in self.reaction_dict.values(): - - # Get the equation - equation = reaction.get_reaction_scheme(by_name=by_name, enzmldoc=self) - - if self.in_ipynb(): - output.append( - { - "ID": reaction.id, - "Name": reaction.name, - "equation": equation.split("\n")[1].replace("Equation: ", ""), - "kinetic law": equation.split("\n")[2].replace( - "Model: v = ", "" - ), - } - ) - else: - output.append(equation) - - if self.in_ipynb(): - return pd.DataFrame(output).set_index("ID") - else: - print("\n".join(output)) - - @staticmethod - def in_ipynb(): - """Checks whether in an ipynb or not""" - try: - cfg = get_ipython().config - if get_ipython().__class__.__name__ == "ZMQInteractiveShell": - return True - else: - return False - except NameError: - return False - - def generateInitialValueTemplate(self, dir: str = ".") -> None: - """Generates an initial value template as a YAML file, which can be used for modeling. - - Args: - dir (str, optional): Dirpath to the output file. Defaults to ".". - """ - - init_values = { - "global": { - param.name: { - "initial_value": None, - "constant": param.constant, - "upper": None, - "lower": None, - } - for param in self.global_parameters.values() - } - } - - for reaction in self.reaction_dict.values(): - - if reaction.model is None: - continue - - parameters = { - param.name: { - "initial_value": None, - "constant": param.constant, - "upper": None, - "lower": None, - } - for param in reaction.model.parameters - if param.is_global is False - } - - if parameters: - init_values[reaction.id] = parameters - - # Finally, write the template to YAML - out = os.path.join(dir, self.name.replace(" ", "_") + "_init_values.yaml") - - with open(out, "w") as file_handle: - yaml.dump( - init_values, file_handle, default_flow_style=False, sort_keys=False - ) - - def applyModelInitialization(self, path: str, to_values: bool = False) -> None: - """Adds initial values per reaction to the model from a YAML config file. - - This method loads a YAML that previously generated from the function 'generateInitialValueTemplate' - and was filled with values. These are then used to populate the 'initial_value' fields of KineticParameter objects. - - Args: - path (str): Path to the YAML file containing the initial values. - """ - - # Load the YAML file - with open(path, "r") as file_handle: - initial_values = yaml.safe_load(file_handle) - - # Apply all given initial values to the model - for reaction_id, value_dict in initial_values.items(): - - if reaction_id == "global": - for name, options in value_dict.items(): - if to_values: - self.global_parameters[name].value = options.get( - "initial_value" - ) - - self.global_parameters[name].initial_value = options.get( - "initial_value" - ) - self.global_parameters[name].upper = options.get("upper") - self.global_parameters[name].lower = options.get("lower") - self.global_parameters[name].constant = options.get("constant") - - else: - # Get the reaction - reaction = self.getReaction(reaction_id) - reaction.apply_initial_values(value_dict, to_values=to_values) - - # ! Add methods - - @validate_arguments - def addGlobalParameter( - self, - name: str, - value: Optional[float] = None, - initial_value: Optional[float] = None, - unit: Optional[str] = None, - constant: bool = False, - upper: Optional[float] = None, - lower: Optional[float] = None, - stdev: Optional[float] = None, - ontology: Optional[SBOTerm] = None, - ): - """Adds a global parameter to the model that will be referred by KineticModel objects in reaction models. - - Args: - name (str): Name of the estimated parameter. - value (Optional[float], optional): Numerical value of the estimated parameter. Defaults to None. - initial_value (Optional[float], optional): Initial value that was used for the parameter estimation. Defaults to None. - unit (Optional[str], optional): Unit of the estimated parameter. Defaults to None. - stdev (Optional[float], optional): Standard deviation of the estimated parameter. Defaults to None. - ontology (Optional[SBOTerm], optional): Type of the estimated parameter. Defaults to None. - - Returns: - str: Name of the parameter that has been added. - """ - - param = KineticParameter( - name=name, - value=value, - unit=unit, - stdev=stdev, - initial_value=initial_value, - ontology=ontology, - is_global=True, - constant=constant, - upper=upper, - lower=lower, - ) - - if param.unit: - param._unit_id = self._convertToUnitDef(param.unit) - param.unit = self._unit_dict[param._unit_id]._get_unit_name() - - # Assign the current EnzymeMLDocument - param._enzmldoc = self - - # Add the parameter to the parameter_dict - self.global_parameters[param.name] = param - - return param.name - - @validate_arguments - def addCreator(self, creator: Creator, log: bool = True) -> str: - """Adds a creator object to the EnzymeML document. - - Args: - creator (Creator): Creator object to be added to the document. - - Returns: - str: Unique internal identifier of the creator. - """ - - # Generate ID - creator.id = self._generateID(prefix="a", dictionary=self.creator_dict) - - # Add to the document - self.creator_dict[creator.id] = creator - - if log: - # Log creator object - log_object(logger, creator) - logger.debug( - f"Added {type(creator).__name__} ({creator.id}) '{creator.family_name}' to document '{self.name}'" - ) - - return creator.id - - @validate_arguments - def addVessel(self, vessel: Vessel, use_parser: bool = True) -> str: - """Adds a Vessel object to the EnzymeML document. - - Args: - vessel (Vessel): Vessel object to be added to the document. - use_parser (bool, optional): Whether to user the unit parser or not. Defaults to True. - - Returns: - str: Unique internal identifier of the reactant. - """ - - return self._addSpecies( - species=vessel, - prefix="v", - dictionary=self.vessel_dict, - use_parser=use_parser, - ) - - @validate_arguments - def addReactant(self, reactant: Reactant, use_parser: bool = True) -> str: - """Adds a Reactant object to the EnzymeML document. - - Args: - reactant (Reactant): Reactant object to be added to the document. - use_parser (bool, optional): Whether to user the unit parser or not. Defaults to True. - - Returns: - str: Unique internal identifier of the reactant. - """ - - return self._addSpecies( - species=reactant, - prefix="s", - dictionary=self.reactant_dict, - use_parser=use_parser, - ) - - @validate_arguments - def addProtein(self, protein: Protein, use_parser: bool = True) -> str: - """Adds a Protein object to the EnzymeML document. - - Args: - protein (Protein): Protein object to be added to the document. - use_parser (bool, optional): Whether to user the unit parser or not. Defaults to True. - - Returns: - str: Unique internal identifier of the protein. - """ - - return self._addSpecies( - species=protein, - prefix="p", - dictionary=self.protein_dict, - use_parser=use_parser, - ) - - @validate_arguments - def _add_complex(self, complex: Complex, use_parser: bool = True) -> str: - """Adds a Complex object to the EnzymeML document. - - Args: - complex (Complex): Complex object to be added to the document. - use_parser (bool, optional): Whether to user the unit parser or not. Defaults to True. - - Returns: - str: Unique internal identifier of the complex. - """ - - return self._addSpecies( - species=complex, - prefix="c", - dictionary=self.complex_dict, - use_parser=use_parser, - ) - - @validate_arguments - def addComplex( - self, - name: str, - participants: List[str], - vessel_id: str, - init_conc: Optional[float] = None, - unit: Optional[str] = None, - ): - - # First convert all participants given as name to IDs - participants = [self.getAny(participant).id for participant in participants] - - return self._add_complex( - Complex( - name=name, - participants=participants, - vessel_id=vessel_id, - init_conc=init_conc, - unit=unit, - ) - ) - - def _addSpecies( - self, - species: Union[AbstractSpecies, Vessel], - prefix: str, - dictionary: dict, - use_parser: bool = True, - log: bool = True, - ) -> str: - """Helper function to add any specific species to the EnzymeML document. - - Args: - species (AbstractSpecies): Species that is about to be added to the EnzymeML document. - prefix (str): Character that is used to generate a unique internal identifier. - dictionary (dict): The dictionary where the species will be added to. - use_parser (bool, optional): Whether to user the unit parser or not. Defaults to True. - - Returns: - str: The internal identifier of the species. - """ - - # Generate ID - species.id = self._generateID(prefix=prefix, dictionary=dictionary) - species.meta_id = f"METAID_{species.id.upper()}" - - # Update unit to UnitDefID - if species.unit and use_parser: - unit_id = self._convertToUnitDef(species.unit) - species._unit_id = unit_id - species.unit = self._unit_dict[species._unit_id]._get_unit_name() - - elif species.unit and use_parser is False: - species._unit_id = species.unit - species.unit = self.getUnitString(species._unit_id) - species.unit = self._unit_dict[species._unit_id]._get_unit_name() - - # Log creation of the object - log_object(logger, species) - - # Finally, set the current document to the - # object attribute _enzmldoc to allow unit changes - species._enzmldoc = self - - # Add species to dictionary - dictionary[species.id] = species - - # Log the addition - if log: - logger.debug( - f"Added {type(species).__name__} ({species.id}) '{species.name}' to document '{self.name}'" - ) - - return species.id - - def addReaction(self, reaction: EnzymeReaction, use_parser: bool = True) -> str: - """ - Adds EnzymeReaction object to EnzymeMLDocument object. - Automatically assigns ID and converts units. - - Args: - reaction (EnzymeReaction): Object describing reaction - use_parser (bool, optional): If set True, will use - internal unit parser. - Defaults to True. - - Returns: - string: Internal identifier for the reaction. - Use it for other objects! - """ - - # Generate ID - reaction.id = self._generateID("r", self.reaction_dict) - reaction.meta_id = f"METAID_{reaction.id.upper()}" - - if use_parser and reaction.temperature: - # Reset temperature for SBML compliance to Kelvin - reaction.temperature = ( - reaction.temperature + 273.15 - if re.match(r"^c|celsius", reaction.temperature_unit.lower()) - else reaction.temperature - ) - - # Generate internal ID for the unit - reaction._temperature_unit_id = self._convertToUnitDef( - reaction.temperature_unit - ) - elif reaction.temperature: - # Set the temperature unit to the actual string - reaction._temperature_unit_id = reaction.temperature_unit - reaction.temperature_unit = self.getUnitString(reaction.temperature_unit) - - # Set model units and check for consistency - if reaction.model: - # ID consistency - self._check_kinetic_model_ids(model=reaction.model) - - # Reference global parameters - self._reference_global_parameters(model=reaction.model) - - # Unit conversion - self._convert_kinetic_model_units(reaction.model.parameters, enzmldoc=self) - - # Finally add the reaction to the document and assign the doc - reaction._enzmldoc = self - self.reaction_dict[reaction.id] = reaction - - # Log the object - log_object(logger, reaction) - logger.debug( - f"Added {type(reaction).__name__} ({reaction.id}) '{reaction.name}' to document '{self.name}'" - ) - - return reaction.id - - def _check_kinetic_model_ids(self, model) -> None: - """Checks if the given species IDs/names are consistent with the EnzymeML document. Also converts names into IDs, if given in the document. - - Args: - equation (str): The rate law given in the KineticModel - """ - - # Get all the params of the model to distinguis params from names - all_params = [param.name for param in model.parameters] - - for node in ast.walk(ast.parse(model.equation)): - - if isinstance(node, ast.Constant): - # If the equation was generated via the ModelFactory - if isinstance(node.value, str): - name = repr(node.value) - else: - # Numeric constants are ignored now - continue - - elif isinstance(node, ast.Str): - # Python 3.7 compatibility since ast.Constant is ast.Str here - name = node.s - - elif isinstance(node, ast.Name): - # If the equation has been done manually - name = node.id - if name in all_params: - # If its a parameter - continue - else: - continue - - if name not in self.getSpeciesIDs(): - - try: - # Try to get by name and substitute in equation - species_id = self.getAny( - name.replace("'", ""), - ).id - - if not name.startswith("'"): - name = f"'{name}'" - - model.equation = model.equation.replace(name, species_id) - except StopIteration: - # If neither name or ID is found, raise Error - raise SpeciesNotFoundError( - enzymeml_part="Kinetic Model", species_id=name - ) - - elif not bool(re.match(r"'[a-zA-Z\d]*'", name)): - quoted = f"'{name}'" - model.equation = model.equation.replace(quoted, name) - - def _reference_global_parameters(self, model): - """Removes single parameters and references global parameters if names match""" - - nu_parameters = [] - for parameter in model.parameters: - name = parameter.name - if name in self.global_parameters: - nu_parameters.append(self.global_parameters[name]) - else: - nu_parameters.append(parameter) - - model.parameters = nu_parameters - - @staticmethod - def _convert_kinetic_model_units( - parameters: List[KineticParameter], enzmldoc - ) -> None: - """Converts given unit strings to unit IDs and adds them to the model. - - Args: - parameters (List[KineticParameter]): List of all kinetic parameters. - enzmldoc ([type]): Used to convert unit strings to unit IDs. - """ - - for parameter in parameters: - if parameter.unit: - parameter._unit_id = enzmldoc._convertToUnitDef(parameter.unit) - parameter.unit = enzmldoc._unit_dict[ - parameter._unit_id - ]._get_unit_name() - parameter._enzmldoc = enzmldoc - - def addReactions(self, reactions: List[EnzymeReaction]): - """Adds multiple reactions to an EnzymeML document. - - Args: - reactions (List[EnzymeReaction]): List of EnzymeReaction objects - """ - - return {reaction.name: self.addReaction(reaction) for reaction in reactions} - - def addFile(self, filepath=None, file_handle=None, description="Undefined") -> str: - """Adds any arbitrary file to the document. Please note, that if a filepath is given, any file_handle will be ignored. - - Args: - filepath (str, optional): Path to the file that is added to the document. Defaults to None. - file_handle (io.BufferedReader, optional): File handle that will be read to a bytes string. Defaults to None. - - Returns: - str: Internal identifier for the file. - """ - - # Generate a unique identifier for the file - file_id = self._generateID("f", self.file_dict) - - if filepath: - # Open file handle - file_handle = open(filepath, "rb") - elif filepath is None and file_handle is None: - raise ValueError("Please specify either a file path or a file handle") - - # Finally, add the file and close the handler - self.file_dict[file_id] = { - "name": os.path.basename(file_handle.name), - "handler": file_handle, - "description": description, - } - - return file_id - - @validate_arguments - def addMeasurement(self, measurement: Measurement) -> str: - """Adds a measurement to an EnzymeMLDocument and validates consistency with already defined elements of the document. - - Args: - measurement (Measurement): Collection of data and initial concentrations per reaction - - Returns: - measurement_id (String): Assigned measurement identifier. - """ - - # Assign the current EnzymeMLDocument to - # propagate towards sub-elements such - # that unit changes can be done comliant - # to UnitDefinitions - measurement._enzmldoc = self - - # Check consistency - self._checkMeasurementConsistency(measurement) - - # Convert all measurement units to UnitDefs - self._convertMeasurementUnits(measurement) - - # Generate the ID and add it to the dictionary - measurement.id = self._generateID(prefix="m", dictionary=self.measurement_dict) - - # Update measurement ID to all replicates - protein_data = measurement.species_dict["proteins"] - reactant_data = measurement.species_dict["reactants"] - - self._updateReplicateMeasurementIDs(protein_data, measurement.id) - self._updateReplicateMeasurementIDs(reactant_data, measurement.id) - - # Add it to the EnzymeMLDocument - self.measurement_dict[measurement.id] = measurement - - # Log the object - log_object(logger, measurement) - logger.debug( - f"Added {type(measurement).__name__} ({measurement.id}) '{measurement.name}' to document '{self.name}'" - ) - - return measurement.id - - def _convertMeasurementUnits(self, measurement: Measurement) -> None: - """Converts string SI units to UnitDef objects and IDs - - Args: - measurement (Measurement): Object defining a measurement - """ - - # Update global time of the measurement - if measurement.global_time: - measurement._global_time_unit_id = self._convertToUnitDef( - measurement.global_time_unit - ) - - # Set correct string - measurement.global_time_unit = self._unit_dict[ - measurement._global_time_unit_id - ]._get_unit_name() - - # Update temperature unit of the measurement - if measurement.temperature_unit: - measurement._temperature_unit_id = self._convertToUnitDef( - measurement.temperature_unit - ) - - # Set correct string - measurement.temperature_unit = self._unit_dict[ - measurement._temperature_unit_id - ]._get_unit_name() - - def update_dict_units( - measurement_data_dict: Dict[str, MeasurementData], measurement: Measurement - ) -> None: - """Helper function to update units and assignment of the coupled EnzymeMLDocument""" - for measurement_data in measurement_data_dict.values(): - - # Assign the measurements enzmldoc - measurement_data._enzmldoc = measurement._enzmldoc - - measurement_data._unit_id = self._convertToUnitDef( - measurement_data.unit - ) - - global_time = self._convertReplicateUnits(measurement_data) - - if global_time: - measurement.global_time = global_time - - # Perform update - update_dict_units(measurement.species_dict["proteins"], measurement) - update_dict_units(measurement.species_dict["reactants"], measurement) - - def _convertReplicateUnits( - self, measurement_data: MeasurementData - ) -> Optional[List[float]]: - """Converts replicate unit strings to unit definitions. - - Args: - measurement_data (MeasurementData): Object holding measurement data for a species - """ - - # TODO verify globally global time - global_time = None - - for replicate in measurement_data.replicates: - - # Assign the EnzymeML document for compliant changes - # of units when already added to the document - replicate._enzmldoc = measurement_data._enzmldoc - - # Convert unit - time_unit_id = self._convertToUnitDef(replicate.time_unit) - data_unit_id = self._convertToUnitDef(replicate.data_unit) - - # Assign unit IDs - replicate._data_unit_id = data_unit_id - replicate._time_unit_id = time_unit_id - - global_time = replicate.time - - return global_time - - def _updateReplicateMeasurementIDs( - self, measurement_data_dict: Dict[str, MeasurementData], measurement_id: str - ): - """Updates the measurement IDs of replicates.""" - for measurement_data in measurement_data_dict.values(): - measurement_data.measurement_id = measurement_id - replicates = measurement_data.replicates - for replicate in replicates: - replicate.measurement_id = measurement_id - - def _checkMeasurementConsistency(self, measurement: Measurement) -> None: - """Checks if the used species in the measurement are consistent with the EnzymeML document. - - Args: - measurement (MeasurementData): Objech holding measurement data for a species. - """ - - map(self._checkSpecies, measurement.species_dict["reactants"]) - map(self._checkSpecies, measurement.species_dict["proteins"]) - - def _checkSpecies(self, species_id): - """Checks if a species is defined in the EnzymeML document. - - Args: - species_id (str): Unique identifier of the species. - - Raises: - SpeciesNotFoundError: Raised when a species is not defined in the EnzymeML document. - """ - - all_species = {**self.reactant_dict, **self.protein_dict, **self.complex_dict} - - if species_id not in all_species.keys(): - - # Retrieve species for ontology - species = self._getSpecies( - id=species_id, - dictionary=all_species, - element_type="Proteins/Reactants/Complexes", - ) - - # Use the EnzymeMLPart Enum to derive the correct place - sbo_term = SBOTerm(species.__dict__["ontology"]).name - enzymeml_part = EnzymeMLPart.partFromSBOTerm(sbo_term) - - # Raise an error if the species is nowhere present - raise SpeciesNotFoundError( - species_id=species_id, enzymeml_part=enzymeml_part - ) - - def _convertToUnitDef(self, unit: Optional[str]) -> str: - """Reads an SI unit string and converts it into a EnzymeML compatible UnitDef - - Args: - unit (str): String representing the SI unit. - - Returns: - str: Unique identifier of the UnitDef. - """ - - if unit is None: - raise TypeError("No unit given.") - elif unit in self._unit_dict.keys(): - return unit - - return UnitCreator().getUnit(unit, self) - - # ! Getter methods - def getSpeciesIDs(self) -> List[str]: - return list( - {**self.protein_dict, **self.reactant_dict, **self.complex_dict}.keys() - ) - - def getUnitString(self, unit_id: Optional[str]) -> str: - """Return the unit name corresponding to the given unit ID. - - Args: - unit_id (str): Unique internal ID of the unit. - - Raises: - SpeciesNotFoundError: Raised when the requested unit is not found. - - Returns: - str: String representation of the unit. - """ - - if unit_id is None: - raise TypeError("No unit given.") - - try: - return self._unit_dict[unit_id].name - except KeyError: - raise SpeciesNotFoundError(species_id=unit_id, enzymeml_part="Units") - - def getUnitDef(self, id: str) -> UnitDef: - """Returns the unit associated with the given ID. - - Args: - id (str): Unique internal ID of the unit. - - Raises: - SpeciesNotFoundError: Raised when the requested unit is not found. - - Returns: - UnitDef: The corresponding unit object. - """ - - return self._getSpecies( - id=id, - dictionary=self._unit_dict, - element_type="Units", - ) - - def getVessel(self, id: str) -> Vessel: - """Returns the vessel associated with the given ID. - - Args: - id (str): Unique internal ID of the vessel. - - Raises: - SpeciesNotFoundError: Raised when the requested vessel is not found. - - Returns: - Vessel: The corresponding unit object. - """ - - return self._getSpecies( - id=id, - dictionary=self.vessel_dict, - element_type="Vessels", - ) - - def getReaction(self, id: str) -> EnzymeReaction: - """Returns the reaction associated with the given ID. - - Args: - id (str): Unique internal ID of the reaction. - - Raises: - SpeciesNotFoundError: Raised when the requested reaction is not found. - - Returns: - EnzymeReaction: The corresponding reaction object. - """ - - return self._getSpecies( - id=id, - dictionary=self.reaction_dict, - element_type="EnzymeReaction", - ) - - def getMeasurement(self, id: str) -> Measurement: - """Returns the measurement associated with the given ID. - - Args: - id (str): Unique internal ID of the measurement. - - Raises: - SpeciesNotFoundError: Raised when the requested measurement is not found. - - Returns: - Measurement: The corresponding measurement object. - """ - - return self._getSpecies( - id=id, - dictionary=self.measurement_dict, - element_type="Measurement", - ) - - def getReactant(self, id: str) -> Reactant: - """Returns the reactant associated with the given ID. - - Args: - id (str): Unique internal ID of the reactant. - - Raises: - SpeciesNotFoundError: Raised when the requested reactant is not found. - - Returns: - Reactant: The corresponding reactant object. - """ - - return self._getSpecies( - id=id, - dictionary=self.reactant_dict, - element_type="Reactant", - ) - - def getProtein(self, id: str) -> Protein: - """Returns the protein associated with the given ID. - - Args: - id (str): Unique internal ID of the protein. - - Raises: - SpeciesNotFoundError: Raised when the requested protein is not found. - - Returns: - Protein: The corresponding protein object. - """ - - return self._getSpecies( - id=id, - dictionary=self.protein_dict, - element_type="Protein", - ) - - def getFile(self, id: str, by_id: bool = True) -> dict: - """Returns the file associated with the given ID. - - Args: - id (str): Unique internal ID of the file. - - Raises: - SpeciesNotFoundError: Raised when the requested file is not found. - - Returns: - Dict[str, dict]: The corresponding file object. - """ - - if by_id: - return self.file_dict[id] - else: - return next( - filter(lambda file: file["name"] == id, self.file_dict.values()) - ) - - def getAny(self, id: str) -> AbstractSpecies: - """Returns anything associated with the given ID. - - Args: - id (str): Unique internal ID of the object. - - Raises: - SpeciesNotFoundError: Raised when the requested object is not found. - - Returns: - Dict[str, dict]: The corresponding file object. - """ - - all_dicts = { - **self._unit_dict, - **self.vessel_dict, - **self.reactant_dict, - **self.protein_dict, - **self.complex_dict, - **self.reaction_dict, - } - - return self._getSpecies( - id=id, - dictionary=all_dicts, - element_type="Document", - ) - - def _getSpecies( - self, - id: str, - dictionary: dict, - element_type: str, - ): - """Helper function to retrieve any kind of species from the EnzymeML document. - - Args: - id (str): Unique internal ID. - dictionary (dict): Dictionary that stores all objects. - element_type (str): Type of object that is in the dictionary. - - Raises: - SpeciesNotFoundError: Raised when the requested species is not found. - - Returns: - Union[ AbstractSpecies, EnzymeReaction, Measurement ]: The requested object - """ - - for attr in ["id", "name"]: - species = self._search_object(value=id, attr=attr, dictionary=dictionary) - - if species: - return species - - raise SpeciesNotFoundError(species_id=id, enzymeml_part=element_type) - - def _search_object(self, value, attr: str, dictionary: dict): - """Filters a given dictionary for an attributes and returns it if found. - - Args: - value ([type]): Term that is searched for. - attr (str): Corresponding attribute to look for. - dictionary (dict): Dictionary that si searched. - - Returns: - AbstractSpecies: Species from the EnzymeML document. - """ - - try: - # Filter the dict for the desired species - return next( - filter(lambda obj: obj.__dict__[attr] == value, dictionary.values()) - ) - except StopIteration: - return None - - def getReactantList(self) -> List[Reactant]: - """Returns a list of all reactants in the EnzymeML document." - - Returns: - List[Reactant]: List of all reactants in the EnzymeML document. - """ - return self._getSpeciesList(self.reactant_dict) - - def getProteinList(self) -> List[Protein]: - """Returns a list of all proteins in the EnzymeML document." - - Returns: - List[Protein]: List of all proteins in the EnzymeML document. - """ - return self._getSpeciesList(self.protein_dict) - - def getReactionList(self) -> List[EnzymeReaction]: - """Returns a list of all reactions in the EnzymeML document." - - Returns: - List[EnzymeReaction]: List of all reactions in the EnzymeML document. - """ - return self._getSpeciesList(self.reaction_dict) - - def getFilesList(self): - """Returns a list of all files in the EnzymeML document." - - Returns: - List[dict]: List of all files in the EnzymeML document. - """ - return self._getSpeciesList(self.file_dict) - - @staticmethod - def _getSpeciesList(dictionary: dict) -> list: - """Helper function to retrieve lists of dicitonary objects - - Args: - dictionary (dict): Dictionary of corresponding elements - - Returns: - list: Returns all values in the dictionary - """ - return list(dictionary.values()) - - @deprecated_getter("doi") - def getDoi(self) -> Optional[str]: - return self.doi - - @deprecated_getter("pubmedid") - def getPubmedID(self) -> Optional[str]: - return self.pubmedid - - @deprecated_getter("url") - def getUrl(self) -> Optional[str]: - return self.url - - @deprecated_getter("created") - def get_created(self): - return self.created - - @deprecated_getter("modified") - def getModified(self): - return self.modified - - @deprecated_getter("creators") - def getCreator(self): - return self.creator_dict - - @deprecated_getter("name") - def getName(self): - return self.name - - @deprecated_getter("level") - def getLevel(self): - return self.level - - @deprecated_getter("version") - def getVersion(self): - return self.version - - @deprecated_getter("protein_dict") - def getProteinDict(self): - return self.protein_dict - - @deprecated_getter("reactant_dict") - def getReactantDict(self): - return self.reactant_dict - - @deprecated_getter("reaction_dict") - def getReactionDict(self): - return self.reaction_dict - - @deprecated_getter("measurement_dict") - def getMeasurementDict(self): - return self.measurement_dict - - @deprecated_getter("unit_dict") - def getUnitDict(self): - return self._unit_dict - - @deprecated_getter("file_dict") - def getFileDict(self): - return self.file_dict diff --git a/pyenzyme/enzymeml/core/enzymereaction.py b/pyenzyme/enzymeml/core/enzymereaction.py deleted file mode 100644 index a09ffcf..0000000 --- a/pyenzyme/enzymeml/core/enzymereaction.py +++ /dev/null @@ -1,732 +0,0 @@ -# File: enzymereaction.py -# Project: core -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -import logging -import re -import ast - -from typing import List, Dict, Union, Optional, TYPE_CHECKING -from dataclasses import dataclass -from pydantic import ( - BaseModel, - PositiveFloat, - validate_arguments, - Field, - PrivateAttr, - validator, -) - -from pyenzyme.enzymeml.core.enzymemlbase import EnzymeMLBase -from pyenzyme.enzymeml.models.kineticmodel import KineticModel -from pyenzyme.enzymeml.core.ontology import SBOTerm -from pyenzyme.enzymeml.core.exceptions import ( - SpeciesNotFoundError, -) - -from pyenzyme.utils.log import log_object -from pyenzyme.enzymeml.core.utils import type_checking, deprecated_getter - -if TYPE_CHECKING: # pragma: no cover - static_check_init_args = dataclass -else: - static_check_init_args = type_checking - -# Initialize the logger -logger = logging.getLogger("pyenzyme") - - -@static_check_init_args -class ReactionElement(BaseModel): - """Describes an element of a chemical reaction.""" - - species_id: str = Field( - ..., - description="Internal identifier to either a protein or reactant defined in the EnzymeMLDocument.", - ) - - stoichiometry: PositiveFloat = Field( - ..., - description="Positive float number representing the associated stoichiometry.", - ) - - constant: bool = Field( - ..., - description="Whether or not the concentration of this species remains constant.", - ) - - ontology: SBOTerm = Field( - ..., - description="Ontology defining the role of the given species.", - ) - - def get_id(self) -> str: - """Internal usage to get IDs from objects without ID attribute""" - - if self.species_id: - return self.species_id - else: - raise AttributeError("No species ID given.") - - -@static_check_init_args -class EnzymeReaction(EnzymeMLBase): - """ - Describes an enzyme reaction by combining already defined - reactants/proteins of an EnzymeML document. In addition, - this class provides ways to integrate reaction conditions - as well. It is also possible to add a kinetic law to this - object by using the KineticModel class. - """ - - name: str = Field(..., description="Name of the reaction.", template_alias="Name") - - reversible: bool = Field( - ..., - description="Whether the reaction is reversible or irreversible", - template_alias="Reversible", - ) - - temperature: Optional[float] = Field( - None, - description="Numeric value of the temperature of the reaction.", - template_alias="Temperature value", - ) - - temperature_unit: Optional[str] = Field( - None, - description="Unit of the temperature of the reaction.", - regex=r"kelvin|Kelvin|k|K|celsius|Celsius|C|c", - template_alias="Temperature unit", - ) - - ph: Optional[float] = Field( - None, - description="PH value of the reaction.", - template_alias="pH value", - inclusiveMinimum=0, - inclusiveMaximum=14, - ) - - ontology: SBOTerm = Field( - SBOTerm.BIOCHEMICAL_REACTION, - description="Ontology defining the role of the given species.", - ) - - meta_id: Optional[str] = Field( - None, - description="Unique meta identifier for the reaction.", - ) - - id: Optional[str] = Field( - None, - description="Unique identifier of the reaction.", - template_alias="ID", - regex=r"r[\d]+", - ) - - uri: Optional[str] = Field( - None, - description="URI of the reaction.", - ) - - creator_id: Optional[str] = Field( - None, - description="Unique identifier of the author.", - ) - - model: Optional[KineticModel] = Field( - None, - description="Kinetic model decribing the reaction.", - ) - - educts: List[ReactionElement] = Field( - default_factory=list, - description="List of educts containing ReactionElement objects.", - template_alias="Educts", - ) - - products: List[ReactionElement] = Field( - default_factory=list, - description="List of products containing ReactionElement objects.", - template_alias="Products", - ) - - modifiers: List[ReactionElement] = Field( - default_factory=list, - description="List of modifiers (Proteins, snhibitors, stimulators) containing ReactionElement objects.", - template_alias="Modifiers", - ) - - # * Private attributes - _temperature_unit_id: str = PrivateAttr(None) - _enzmldoc = PrivateAttr(default=None) - - # ! Validators - @validator("id") - def set_meta_id(cls, id: Optional[str], values: dict): - """Sets the meta ID when an ID is provided""" - - if id: - # Set Meta ID with ID - values["meta_id"] = f"METAID_{id.upper()}" - - return id - - @validator("temperature_unit") - def convert_temperature_unit(cls, unit, values): - """Converts celsius to kelvin due to SBML limitations""" - - if unit: - if unit.lower() in ["celsius", "c"]: - values["temperature"] = values["temperature"] + 273.15 - return "K" - - return unit - - # ! Getters - def getEduct(self, id: str) -> ReactionElement: - """ - Returns a ReactionElement including information about the following properties: - - - Reactant/Protein Identifier - - Stoichiometry of the element - - Whether or not the element's concentration is constant - - Args: - id (string): Reactant/Protein ID - - Raises: - SpeciesNotFoundError: If species ID is unfindable - - Returns: - ReactionElement: Object including species ID, stoichiometry, constant) - """ - - return self._getReactionElement( - id=id, element_list=self.educts, element_type="Educts" - ) - - def getProduct(self, id: str) -> ReactionElement: - """ - Returns a ReactionElement including information about the following properties: - - - Reactant/Protein Identifier - - Stoichiometry of the element - - Whether or not the element's concentration is constant - - Args: - id (string): Reactant/Protein ID - - Raises: - SpeciesNotFoundError: If species ID is unfindable - - Returns: - ReactionElement: Object including species ID, stoichiometry, constant) - """ - - return self._getReactionElement( - id=id, element_list=self.products, element_type="Products" - ) - - def getModifier(self, id: str) -> ReactionElement: - """ - Returns a ReactionElement including information about the following properties: - - - Reactant/Protein Identifier - - Stoichiometry of the element - - Whether or not the element's concentration is constant - - Args: - id (string): Reactant/Protein ID - - Raises: - SpeciesNotFoundError: If species ID is unfindable - - Returns: - ReactionElement: Object including species ID, stoichiometry, constant) - """ - - return self._getReactionElement( - id=id, element_list=self.modifiers, element_type="Modifiers" - ) - - @validate_arguments - def _getReactionElement( - self, - id: str, - element_list: List[ReactionElement], - element_type: str, - ) -> ReactionElement: - - try: - return next(filter(lambda element: element.species_id == id, element_list)) - except StopIteration: - raise SpeciesNotFoundError(species_id=id, enzymeml_part=element_type) - - # ! Adders - @validate_arguments - def addEduct( - self, - species_id: str, - stoichiometry: PositiveFloat, - enzmldoc, - constant: bool = False, - ontology: SBOTerm = SBOTerm.SUBSTRATE, - ) -> None: - """ - Adds element to EnzymeReaction object. Replicates as well - as initial concentrations are optional. - - Args: - species_id: str (string): Reactant/Protein ID - Needs to be pre-defined! - stoichiometry (float): Stoichiometric coefficient - constant: (bool): Whether constant or not - enzmldoc (EnzymeMLDocument): Checks and adds IDs - - Raises: - SpeciesNotFoundError: If Reactant/Protein hasnt been defined yet - """ - - self._addElement( - species_id=species_id, - stoichiometry=stoichiometry, - constant=constant, - element_list=self.educts, - ontology=ontology, - list_name="educts", - enzmldoc=enzmldoc, - ) - - @validate_arguments - def addProduct( - self, - species_id: str, - stoichiometry: PositiveFloat, - enzmldoc, - constant: bool = False, - ontology: SBOTerm = SBOTerm.PRODUCT, - ) -> None: - """ - Adds element to EnzymeReaction object. Replicates as well - as initial concentrations are optional. - - Args: - species_id: str (string): Reactant/Protein ID - Needs to be pre-defined! - stoichiometry (float): Stoichiometric coefficient - constant: (bool): Whether constant or not - enzmldoc (EnzymeMLDocument): Checks and adds IDs - - Raises: - SpeciesNotFoundError: If Reactant/Protein hasnt been defined yet - """ - - self._addElement( - species_id=species_id, - stoichiometry=stoichiometry, - constant=constant, - element_list=self.products, - ontology=ontology, - list_name="products", - enzmldoc=enzmldoc, - ) - - @validate_arguments - def addModifier( - self, - species_id: str, - stoichiometry: PositiveFloat, - enzmldoc, - constant: bool, - ontology: SBOTerm = SBOTerm.CATALYST, - ) -> None: - """ - Adds element to EnzymeReaction object. Replicates as well - as initial concentrations are optional. - - Args: - species_id: str (string): Reactant/Protein ID - Needs to be pre-defined! - stoichiometry (float): Stoichiometric coefficient - constant: (bool): Whether constant or not - enzmldoc (EnzymeMLDocument): Checks and adds IDs - - Raises: - SpeciesNotFoundError: If Reactant/Protein hasnt been defined yet - """ - - self._addElement( - species_id=species_id, - stoichiometry=stoichiometry, - constant=constant, - element_list=self.modifiers, - ontology=ontology, - list_name="modifiers", - enzmldoc=enzmldoc, - ) - - def _addElement( - self, - species_id: str, - stoichiometry: PositiveFloat, - constant: bool, - element_list: List[ReactionElement], - ontology: SBOTerm, - list_name: str, - enzmldoc, - ) -> None: - - # Check if species is part of document already - all_species = [ - *list(enzmldoc.protein_dict.keys()), - *list(enzmldoc.reactant_dict.keys()), - *list(enzmldoc.complex_dict.keys()), - ] - - if species_id not in all_species: - raise SpeciesNotFoundError( - species_id=species_id, enzymeml_part="EnzymeMLDocument" - ) - - # Add element to the respecticve list - element = ReactionElement( - species_id=species_id, - stoichiometry=stoichiometry, - constant=constant, - ontology=ontology, - ) - element_list.append(element) - - # Log the addition - log_object(logger, element) - logger.debug( - f"Added {type(element).__name__} '{element.species_id}' to reaction '{self.name}' {list_name}" - ) - - def setModel( - self, - model: KineticModel, - enzmldoc, - mapping: Dict[str, str] = {}, - log: bool = True, - ) -> None: - """Sets the kinetic model of the reaction and in addition converts all units to UnitDefs. - - Args: - model (KineticModel): Kinetic model that has been derived. - enzmldoc (EnzymeMLDocument): The EnzymeMLDocument that holds the reaction. - """ - - # ID consistency - enzmldoc._check_kinetic_model_ids( - model=model, - ) - - # Unit conversion - enzmldoc._convert_kinetic_model_units(model.parameters, enzmldoc=enzmldoc) - - # Replace kinetic parameter names to customize names if specified - for param_old, param_new in mapping.items(): - - model.equation = model.equation.replace(param_old, param_new) - - for parameter in model.parameters: - - if enzmldoc.global_parameters.get(param_new): - # Set a global parameter if specified - model.parameters.remove(parameter) - model.parameters.append(enzmldoc.global_parameters[param_new]) - else: - # If still local, just change the name - parameter.name = param_new - - if log: - # Log creator object - log_object(logger, model) - logger.debug( - f"Added {type(model).__name__} '{model.name}' to reaction '{self.name}'" - ) - - self.model = model - - # ! Utilities - def get_reaction_scheme(self, by_name: bool = False, enzmldoc=None): - - if by_name and enzmldoc is None: - raise ValueError( - "Please provide an EnzymeMLDocument if the reaction schem should include names" - ) - - # Determine the appropriate arrow - direction = "<=>" if self.reversible else "->" - - educts = self._summarize_elements(self.educts, by_name, enzmldoc) - products = self._summarize_elements(self.products, by_name, enzmldoc) - modifiers = self._summarize_elements(self.modifiers, by_name, enzmldoc).replace( - " + ", ", " - ) - - if self.model: - equation = ( - "v = " - + self._convert_equation_ids_to_names( - self.model.equation, by_name, enzmldoc - ) - + "\n" - ) - else: - equation = "" - - if modifiers: - return f">{self.name}\nEquation: {educts} {direction} {products}\nModifiers: {modifiers}\n{equation}\n" - else: - return f">{self.name}\nEquation: {educts} {direction} {products}\nModel: {equation}\n" - - def _summarize_elements(self, elements: list, by_name, enzmldoc) -> str: - """Parses all reaction elements of a list to a string""" - - if by_name is False: - return " + ".join( - [ - f"{element.stoichiometry} {element.species_id}" - for element in elements - ] - ) - else: - return " + ".join( - [ - f"{element.stoichiometry} {enzmldoc.getAny(element.species_id).name}" - for element in elements - ] - ) - - def _convert_equation_ids_to_names( - self, equation: str, by_name: bool, enzmldoc - ) -> str: - """Converts species IDs to names for readable elements when printing reaction schemes""" - - if by_name is False: - return equation - - for node in ast.walk(ast.parse(equation)): - if isinstance(node, ast.Name): - try: - name = enzmldoc.getAny(node.id).name - equation = equation.replace(node.id, name) - except SpeciesNotFoundError: - pass - - return equation - - def getStoichiometricCoefficients(self) -> Dict[str, float]: - """Returns the approprate stoichiometric coefficients of all educts and products. - - This function is intended to be used for modeling, where data should be easily accessible. - - Returns: - Dict[str, float]: Mapping from identifier to stiochiometric coefficient. - """ - - return { - **{element.species_id: element.stoichiometry for element in self.educts}, - **{ - element.species_id: (-1) * element.stoichiometry - for element in self.products - }, - } - - def apply_initial_values( - self, config: Dict[str, dict], to_values: bool = False - ) -> None: - """Applies the initial values for all given parameters to the underlying model. - - Args: - kwargs (Dict[str, float]): Mapping from the parameter name to the given initial value. - """ - - if not self.model: - raise ValueError( - f"Reaction {self.name} ({self.id}) has no associated model. Please specify a model to add initial values." - ) - - for param_name, options in config.items(): - - param = self.model.getParameter(param_name) - - if to_values: - param.value = options.get("initial_value") - param.initial_value = options.get("initial_value") - param.upper = options.get("upper") - param.lower = options.get("lower") - param.constant = options.get("constant") - - # ! Initializers - - @classmethod - def fromEquation( - cls, - equation: str, - name: str, - enzmldoc, - modifiers: Union[List[str], str] = [], - temperature: Optional[float] = None, - temperature_unit: Optional[str] = None, - ph: Optional[float] = None, - ): - """Creates an EnzymeReaction object from a reaction equation. - - Please make sure that the equation follows either of the following patterns: - - '1.0 Substrate -> 1.0 Product' (for irreversible) - - or - - '1.0 Substrate <=> 1.0 Product' (for reversible) - - Args: - equation (str): Reaction equation with educt and product sides. - name (str): Name of the reaction. - reversible (bool): If the reaction is reversible or not. Defaults - enzmldoc ([type]): Used to validate species IDs. - """ - - if isinstance(modifiers, str): - # Catch single modifiers - modifiers = [modifiers] - - if "=" in equation: - reversible = True - elif "->" in equation: - reversible = False - else: - raise ValueError( - "Neither '->' nor '<=>' were found in the reaction euqation, but are essential to distinguish educt from product side." - ) - - # Initialize reaction object - reaction = cls( - name=name, - reversible=reversible, - temperature=temperature, - temperature_unit=temperature_unit, - ph=ph, - ) - - for modifier in modifiers: - # Add modifiers - reaction.addModifier( - species_id=enzmldoc.getAny(modifier).id, - constant=True, - stoichiometry=1.0, - enzmldoc=enzmldoc, - ) - - # Parse the reaction equation - reaction._addFromEquation(equation, enzmldoc) - - return reaction - - def _addFromEquation(self, reaction_equation: str, enzmldoc) -> None: - """Parses a reaction equation string and adds it to the model. - - Args: - reaction_equation (str): Strign representing th reaction equation, following the schem r'' - enzmldoc ([type]): [description] - """ - - # Split reaction is educts and products - if "->" in reaction_equation: - educts, products = reaction_equation.split(" -> ") - elif "=" in reaction_equation: - educts, products = reaction_equation.split(" = ") - else: - raise ValueError( - "Neither '->' nor '<=>' were found in the reaction euqation, but are essential to distinguish educt from product side." - ) - - if not educts or not products: - raise ValueError( - "Reaction equation is incomplete. Please make sure both sides contain information." - ) - - # Parse each side of the reaction - self._parse_equation_side(educts, enzmldoc, self.addEduct) - self._parse_equation_side(products, enzmldoc, self.addProduct) - - @staticmethod - def _parse_equation_side(elements: str, enzmldoc, fun): - """Parses a side from a reaction equation.""" - - # Setup Regex - regex = r"(^\d*[.,]\d*)?\s?(.*)" - regex = re.compile(regex) - - for element in elements.split(" + "): - stoichiometry, species = regex.findall(element)[0] - - if len(stoichiometry) == 0: - stoichiometry = 1.0 - - if re.match(r"^[p|s|c]\d*$", species): - species_id = species - else: - species_id = enzmldoc.getAny(species).id - - # Add it to the reaction - fun( - species_id=species_id, - stoichiometry=float(stoichiometry), - enzmldoc=enzmldoc, - constant=False, - ) - - # ! Getters - def unitdef(self): - """Returns the appropriate unitdef if an enzmldoc is given""" - - if not self._enzmldoc: - return None - - return self._enzmldoc._unit_dict[self._temperature_unit_id] - - def getTemperature(self) -> float: - raise NotImplementedError("Temperature is now part of measurements.") - - def getTempunit(self) -> str: - raise NotImplementedError("Temperature unit is now part of measurements.") - - def getPh(self) -> PositiveFloat: - raise NotImplementedError("Ph is now part of measurements.") - - @deprecated_getter("name instead") - def getName(self) -> str: - return self.name - - @deprecated_getter("reveserible") - def getReversible(self) -> bool: - return self.reversible - - @deprecated_getter("id") - def getId(self) -> Optional[str]: - return self.id - - @deprecated_getter("meta_id") - def getMetaid(self) -> Optional[str]: - return self.meta_id - - @deprecated_getter("model") - def getModel(self) -> Optional[KineticModel]: - return self.model - - @deprecated_getter("educts") - def getEducts(self): - return self.educts - - @deprecated_getter("products") - def getProducts(self): - return self.products - - @deprecated_getter("modifier") - def getModifiers(self): - return self.modifiers diff --git a/pyenzyme/enzymeml/core/exceptions.py b/pyenzyme/enzymeml/core/exceptions.py deleted file mode 100644 index 5a20afb..0000000 --- a/pyenzyme/enzymeml/core/exceptions.py +++ /dev/null @@ -1,92 +0,0 @@ -# File: functionalities.py -# Project: core -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -import yaml - -from typing import Union, Optional - - -class SpeciesNotFoundError(Exception): - """Raised when a species hasnt been found in a specific element""" - - def __init__( - self, - species_id: str, - enzymeml_part: str, - message: str = "Species ID has not been found", - ): - self.species_id = species_id - self.enzymeml_part = enzymeml_part - self.message = message - super().__init__(self.message) - - def __str__(self) -> str: - return f"{self.species_id} in {self.enzymeml_part} -> {self.message}" - - -class MeasurementDataSpeciesIdentifierError(Exception): - """Raised when either no ID has been assigned to a measurementData""" - - def __init__(self, both: Optional[list] = None): - - if both: - self.message = f"Both reactant ({both[0]}) and protein ({both[1]}) have been ID assigned to a measurement. Please specifiy either one of those." - else: - self.message = ( - "Neither a reactant not protein has been ID assigned to measurement." - ) - - super().__init__(self.message) - - def __str__(self) -> str: - return self.message - - -class ParticipantIdentifierError(Exception): - """Raised when an ID does not match the expected format""" - - def __init__(self, id: str, prefix: str) -> None: - self.prefix = prefix - self.id = id - - def __str__(self) -> str: - return f"Identifier '{self.id}' does not match the expected format of '{self.prefix}[digits]'." - - -class ECNumberError(Exception): - """Raised when an EC number does not match the pattern convenrtion""" - - def __init__(self, ecnumber: str): - self.ecnumber = ecnumber - - def __str__(self) -> str: - return f"EC number {self.ecnumber} does not match the pattern. Please specifify as X.X.X.X" - - -class DataError(Exception): - """Raised when incomplete data has been assigned to a replicate""" - - pass - - -class ChEBIIdentifierError(Exception): - """Raised when the CHEBI ID is incorrect.""" - - def __init__(self, chebi_id: Union[str, int]) -> None: - self.chebi_id = chebi_id - - def __str__(self) -> str: - return f"ChEBI ID {self.chebi_id} is invalid. Please provide a valid ChEBI ID." - - -class UniProtIdentifierError(Exception): - """Raised when the UniProt ID is incorrect.""" - - def __init__(self, uniprotid: Union[str, int]) -> None: - self.uniprotid = uniprotid - - def __str__(self) -> str: - return f"UniProt ID {self.uniprotid} is invalid. Please provide a valid UniProt ID." diff --git a/pyenzyme/enzymeml/core/measurement.py b/pyenzyme/enzymeml/core/measurement.py deleted file mode 100644 index c72b64e..0000000 --- a/pyenzyme/enzymeml/core/measurement.py +++ /dev/null @@ -1,475 +0,0 @@ -# File: measurement.py -# Project: core -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -import copy -import logging -import pandas as pd - -from typing import List, Dict, Tuple, Optional, TYPE_CHECKING, Union -from dataclasses import dataclass -from pydantic import validate_arguments, Field, PrivateAttr, validator - -from pyenzyme.enzymeml.core.enzymemlbase import EnzymeMLBase -from pyenzyme.enzymeml.core.measurementData import MeasurementData -from pyenzyme.enzymeml.core.replicate import Replicate -from pyenzyme.enzymeml.core.exceptions import SpeciesNotFoundError -from pyenzyme.utils.log import log_object -from pyenzyme.enzymeml.core.utils import type_checking, deprecated_getter - -if TYPE_CHECKING: # pragma: no cover - static_check_init_args = dataclass -else: - static_check_init_args = type_checking - -# Initialize the logger -logger = logging.getLogger("pyenzyme") - - -@static_check_init_args -class Measurement(EnzymeMLBase): - - name: str = Field( - ..., - description="Name of the measurement", - ) - - temperature: Optional[float] = Field( - None, - description="Numeric value of the temperature of the reaction.", - template_alias="Temperature value", - ) - - temperature_unit: Optional[str] = Field( - None, - description="Unit of the temperature of the reaction.", - regex=r"kelvin|Kelvin|k|K|celsius|Celsius|C|c", - ) - - ph: Optional[float] = Field( - None, - description="PH value of the reaction.", - inclusiveMinimum=0, - inclusiveMaximum=14, - ) - - species_dict: Dict[str, Dict[str, MeasurementData]] = Field( - {"proteins": {}, "reactants": {}}, - description="Species of the measurement.", - ) - - global_time: List[float] = Field( - default_factory=list, - description="Global time of the measurement all replicates agree on.", - ) - - global_time_unit: Optional[str] = Field( - None, - description="Unit of the global time.", - ) - - id: Optional[str] = Field( - None, description="Unique identifier of the measurement.", regex=r"m[\d]+" - ) - - uri: Optional[str] = Field( - None, - description="URI of the reaction.", - ) - - creator_id: Optional[str] = Field( - None, - description="Unique identifier of the author.", - ) - - # * Private attributes - _temperature_unit_id: str = PrivateAttr(None) - _global_time_unit_id: str = PrivateAttr(None) - _enzmldoc = PrivateAttr(default=None) - - # ! Validators - @validator("temperature_unit") - def convert_temperature_unit(cls, unit, values): - """Converts celsius to kelvin due to SBML limitations""" - - if unit: - if unit.lower() in ["celsius", "c"]: - values["temperature"] = values["temperature"] + 273.15 - return "K" - - return unit - - # ! Utility methods - def __repr__(self): - return self.printMeasurementScheme(stdout=False) - - def printMeasurementScheme( - self, species_type: str = "all", stdout: bool = True - ) -> Optional[str]: - """Prints the scheme of the measurement and as such an overview of what has been done. - - Args: - species_type (str, optional): Specifies whether only "reactants"/"proteins" should be displayed or all of them. Defaults to "all". - """ - - # Get all measurement data objects - reactants = self.getReactants() - proteins = self.getProteins() - - if species_type == "reactants": - species = list(reactants.values()) - elif species_type == "proteins": - species = list(proteins.values()) - elif species_type == "all": - species = list(reactants.values()) + list(proteins.values()) - else: - raise ValueError( - f"Species type of {species_type} is not supported. Please enter use one of the following: 'reactants', 'proteins' or 'all'." - ) - - # Start printing - output = [] - output.append(f">>> Measurement {self.id}: {self.name}") - - for meas_data in species: - output.append( - f" {meas_data.get_id()} | initial conc: {meas_data.init_conc} {meas_data.unit} \t| #replicates: {len(meas_data.replicates)}" - ) - - output = "\n".join(output) - - if stdout: - print(output) - else: - return output - - def exportData( - self, species_ids: Union[str, List[str]] = "all" - ) -> Dict[str, Dict[str, Union[Dict[str, Tuple[float, str]], pd.DataFrame]]]: - """Returns data stored in the measurement object as DataFrames nested in dictionaries. These are sorted hierarchially by reactions where each holds a DataFrame each for proteins and reactants. - - Returns: - measurements (dict): Follows the hierarchy Reactions > Proteins/Reactants > { initial_concentration, data } - species_ids (Union[str, List[str]]): List of species IDs to extract data from. Defaults to 'all'. - """ - - # Combine Replicate objects for each reaction - proteins = self._combineReplicates( - measurement_species=self.species_dict["proteins"], species_ids=species_ids - ) - reactants = self._combineReplicates( - measurement_species=self.species_dict["reactants"], species_ids=species_ids - ) - - return {"proteins": proteins, "reactants": reactants} - - def _combineReplicates( - self, - measurement_species: Dict[str, MeasurementData], - species_ids: Union[str, List[str]] = "all", - ) -> Dict[str, Union[Dict[str, Tuple[float, str]], pd.DataFrame]]: - """Combines replicates of a certain species to a dataframe. - - Args: - measurement_species (Dict[str, MeasurementData]): The species_dict from the measurement. - - Returns: - Dict[str, Any]: The associated replicat and initconc data. - """ - - if isinstance(species_ids, str): - species_ids = [species_ids] - - columns = {} - initial_concentration = {} - num_replicates = 0 - - # Iterate over measurementData to fill columns - for species_id, data in measurement_species.items(): - - if species_id in species_ids or species_ids == ["all"]: - - # Fetch initial concentration - initial_concentration[species_id] = (data.init_conc, data.unit) - - # Fetch replicate data - if len(data.replicates) > num_replicates: - num_replicates = len(data.replicates) - for replicate in data.replicates: - - if columns.get(species_id): - # For multiple replicates - columns[species_id] += copy.deepcopy(replicate.data) - else: - columns[species_id] = copy.deepcopy(replicate.data) - - # Add global time to columns according to the number of replicates - columns["time"] = self.global_time * num_replicates - - return { - "data": pd.DataFrame(columns) if len(columns) > 1 else pd.DataFrame(), - "initConc": initial_concentration, - } - - @validate_arguments - def addReplicates( - self, replicates: Union[List[Replicate], Replicate], enzmldoc, log: bool = True - ) -> None: - """Adds a replicate to the corresponding measurementData object. This method is meant to be called if the measurement metadata of a reaction/species has already been done and replicate data has to be added afterwards. If not, use addData instead to introduce the species metadata. - - Args: - replicate (List): Objects describing time course data - """ - - # Check if just a single Replicate has been handed - if isinstance(replicates, Replicate): - replicates = [replicates] - - for replicate in replicates: - - # Check for the species type - species_id = replicate.species_id - speciesType = "reactants" if species_id[0] == "s" else "proteins" - speciesData = self.species_dict[speciesType] - - try: - - data = speciesData[species_id] - - replicate._data_unit_id = enzmldoc._convertToUnitDef( - replicate.data_unit - ) - replicate._time_unit_id = enzmldoc._convertToUnitDef( - replicate.time_unit - ) - - data.addReplicate(replicate) - - if len(self.global_time) == 0: - - # Add global time if this is the first replicate to be added - self.global_time = replicate.time - self.global_time_unit = replicate.time_unit - self._global_time_unit_id = replicate._time_unit_id - - # Log Replicate creation - if log: - log_object(logger, replicate) - logger.debug( - f"Added {type(replicate).__name__} '{replicate.id}' to data '{data.get_id()}' of measurement '{self.name}'" - ) - - except KeyError: - raise KeyError( - f"{speciesType[0:-1]} {species_id} is not part of the measurement yet. If a {speciesType[0:-1]} hasnt been yet defined in a measurement object, use the addData method to define metadata first-hand. You can add the replicates in the same function call then." - ) - - @validate_arguments - def addData( - self, - unit: str, - init_conc: float = 0.0, - reactant_id: Optional[str] = None, - protein_id: Optional[str] = None, - replicates: List[Replicate] = [], - log: bool = True, - ) -> None: - """Adds data to the measurement object. - - Args: - init_conc (PositiveFloat): Corresponding initial concentration of species. - unit (str): The SI unit of the measurement. - reactant_id (Optional[str], optional): Identifier of the reactant that was measured. Defaults to None. - protein_id (Optional[str], optional): Identifier of the protein that was measured. Defaults to None. - replicates (List[Replicate], optional): List of replicates that were measured. Defaults to []. - """ - - self._appendReactantData( - reactant_id=reactant_id, - protein_id=protein_id, - init_conc=init_conc, - unit=unit, - replicates=replicates, - log=log, - ) - - def _appendReactantData( - self, - reactant_id: Optional[str], - protein_id: Optional[str], - init_conc: float, - unit: str, - replicates: List[Replicate], - log: bool = True, - ) -> None: - - # Create measurement data class before sorting - measData = MeasurementData( - reactant_id=reactant_id, - protein_id=protein_id, - init_conc=init_conc, - unit=unit, - replicates=replicates, - measurement_id=self.id, - ) - - if reactant_id: - self.species_dict["reactants"][reactant_id] = measData - elif protein_id: - self.species_dict["proteins"][protein_id] = measData - else: - raise ValueError( - "Please enter a reactant or protein ID to add measurement data" - ) - - # Log the new object - if log: - log_object(logger, measData) - logger.debug( - f"Added {type(measData).__name__} '{measData.get_id()}' to measurement '{self.name}'" - ) - - def updateReplicates(self, replicates: List[Replicate]) -> None: - for replicate in replicates: - # Set the measurement name for the replicate - replicate.measurement_id = self.name - - def _setReplicateMeasIDs(self) -> None: - """Sets the measurement IDs for the replicates.""" - for measData in self.species_dict["proteins"].values(): - measData.measurement_id = self.id - - for measData in self.species_dict["reactants"].values(): - measData.measurement_id = self.id - - def unifyUnits(self, kind: str, scale: int, enzmldoc) -> None: - """Rescales all replicates and measurements to match the scale of a unit kind. - - Args: - kind (str): The unit kind from which to rescale. Currently supported: 'mole', 'gram', 'litre'. - scale (int): Decade scale to which the values will be rescaled. - enzmldoc (EnzymeMLDocument): The EnzymeMLDocument to which the new unit will be added. - """ - - if kind not in ["mole", "gram", "litre"]: - raise ValueError( - f"Kind {kind} is not supported. Please use 'mole', 'gram', or 'litre'" - ) - - if abs(scale) % 3 > 0: - if abs(scale) == 1: - pass - else: - raise ValueError( - f"Scale {scale} is not a multiple of 3. Please make sure the scale is a multiple of 3." - ) - - for measurement_data in {**self.getProteins(), **self.getReactants()}.values(): - measurement_data.unifyUnits(kind=kind, scale=scale, enzmldoc=enzmldoc) - - def _has_replicates(self) -> bool: - """Checks whether replicates are present in the measurement. - - This is only used for the to check whether to write time course data or not. - - Returns: - bool: Returns True if there are any replicate otherwise False. - """ - - all_species = { - **self.species_dict["proteins"], - **self.species_dict["reactants"], - } - - for obj in all_species.values(): - if len(obj.replicates) > 0: - return True - - return False - - # ! Getters - def temperature_unitdef(self): - """Returns the appropriate unitdef if an enzmldoc is given""" - - if not self._enzmldoc: - return None - - return self._enzmldoc._unit_dict[self._temperature_unit_id] - - @validate_arguments - def getReactant(self, reactant_id: str) -> MeasurementData: - """Returns a single MeasurementData object for the given reactant_id. - - Args: - reactant_id (String): Unqiue identifier of the reactant - - Returns: - MeasurementData: Object representing the data and initial concentration - """ - return self._getSpecies(reactant_id) - - def getProtein(self, protein_id: str) -> MeasurementData: - """Returns a single MeasurementData object for the given protein_id. - - Args: - protein_id (String): Unqiue identifier of the protein - - Returns: - MeasurementData: Object representing the data and initial concentration - """ - return self._getSpecies(protein_id) - - def getReactants(self) -> Dict[str, MeasurementData]: - """Returns a dict of all participating reactants in the measurement. - - Returns: - dict: Dict of MeasurementData objects representing data - """ - return self.species_dict["reactants"] - - def getProteins(self) -> Dict[str, MeasurementData]: - """Returns a dict of all participating proteins in the measurement. - - Returns: - dict: Dict of MeasurementData objects representing data - """ - return self.species_dict["proteins"] - - def _getAllSpecies(self): - return {**self.species_dict["proteins"], **self.species_dict["reactants"]} - - @validate_arguments - def _getSpecies(self, species_id: str) -> MeasurementData: - all_species = { - **self.species_dict["proteins"], - **self.species_dict["reactants"], - } - - try: - return all_species[species_id] - except KeyError: - raise SpeciesNotFoundError( - species_id=species_id, enzymeml_part="Measurement" - ) - - @deprecated_getter("id") - def getId(self): - return self.id - - @deprecated_getter("global_time_unit") - def getGlobalTimeUnit(self): - return self.global_time_unit - - @deprecated_getter("global_time") - def getGlobalTime(self): - return self.global_time - - @deprecated_getter("name") - def getName(self): - return self.name - - @deprecated_getter("species_dict") - def getSpeciesDict(self): - return self.species_dict diff --git a/pyenzyme/enzymeml/core/measurementData.py b/pyenzyme/enzymeml/core/measurementData.py deleted file mode 100644 index affe014..0000000 --- a/pyenzyme/enzymeml/core/measurementData.py +++ /dev/null @@ -1,195 +0,0 @@ -# File: measurementData.py -# Project: core -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -from pydantic import PositiveFloat, validate_arguments, validator, Field, PrivateAttr -from dataclasses import dataclass -from typing import List, Optional, TYPE_CHECKING -from pyenzyme.enzymeml.core.enzymemlbase import EnzymeMLBase - -from pyenzyme.enzymeml.core.replicate import Replicate -from pyenzyme.enzymeml.core.exceptions import MeasurementDataSpeciesIdentifierError -from pyenzyme.enzymeml.core.unitdef import UnitDef -from pyenzyme.enzymeml.core.utils import type_checking, deprecated_getter - -if TYPE_CHECKING: # pragma: no cover - static_check_init_args = dataclass -else: - static_check_init_args = type_checking - - -@static_check_init_args -class MeasurementData(EnzymeMLBase): - """Helper class to organize elements""" - - init_conc: float = Field( - ..., - description="Initial concentration of the measurement data.", - ) - - unit: str = Field( - ..., - description="The unit of the measurement data.", - ) - - measurement_id: Optional[str] = Field( - None, - description="Unique measurement identifier this dataset belongs to.", - ) - - reactant_id: Optional[str] = Field( - None, - description="The identifier for the described reactant.", - ) - - protein_id: Optional[str] = Field( - None, - description="The identifier for the described protein.", - ) - - replicates: List[Replicate] = Field( - default_factory=list, - description="A list of replicate objects holding raw data of the measurement.", - ) - - # * Private - _unit_id: Optional[str] = PrivateAttr(default=None) - _enzmldoc = PrivateAttr(default=None) - - # ! Validators - - @validator("protein_id") - def check_id_occurences(cls, protein_id: str, values: dict): - reactant_id = values.get("reactant_id") - - if reactant_id is None and protein_id is None: - raise MeasurementDataSpeciesIdentifierError() - - elif reactant_id and protein_id: - raise MeasurementDataSpeciesIdentifierError(both=[reactant_id, protein_id]) - - return protein_id - - # ! Utilities - def unifyUnits(self, kind: str, scale: int, enzmldoc) -> Optional[str]: - """Rescales all replicates data_unit to match the desired scale. - - Args: - replicate (Replicate): Replicate object containing time course data. - kind (str): The kind of unit that will be rescaled. - scale (int): The scale to whih the data will be transformed. - enzmldoc ([type]): The EnzymeML document to which the new unit will be added. - """ - - unit_id = None - - # Transform initial concentration - unitdef: UnitDef = enzmldoc._unit_dict[self._unit_id].copy() - transform_value, new_unit_name, unit_id = self._getTransformation( - unitdef, kind, scale, enzmldoc - ) - - self.init_conc *= transform_value - self._unit_id = unit_id - self.unit = new_unit_name - - # Apply to replicates - for replicate in self.replicates: - self._rescaleReplicateUnits( - replicate=replicate, kind=kind, scale=scale, enzmldoc=enzmldoc - ) - - @staticmethod - def _getTransformation(unitdef: UnitDef, kind: str, scale: int, enzmldoc): - """Calculates the new transformation value and returns new UnitDef""" - - # Calculate transformation value - transform_value = unitdef.calculateTransformValue(kind=kind, scale=scale) - - # Create a new unit that matches the new scale - new_unitdef = UnitDef(**unitdef.dict()) - correction_factor = 1 if scale == 0 else 0 - - for base_unit in new_unitdef.units: - if base_unit.kind == kind: - base_unit.scale = scale + correction_factor - - new_unit_name = new_unitdef._getNewName() - unit_id = enzmldoc._convertToUnitDef(new_unit_name) - - return transform_value, new_unit_name, unit_id - - def _rescaleReplicateUnits( - self, replicate: Replicate, kind: str, scale: int, enzmldoc - ) -> None: - """Rescales a replicates data_unit to match the desired scale. - - Args: - replicate (Replicate): Replicate object containing time course data. - kind (str): The kind of unit that will be rescaled. - scale (int): The scale to whih the data will be transformed. - enzmldoc ([type]): The EnzymeML document to which the new unit will be added. - """ - - data_unit_id = replicate._data_unit_id - unitdef: UnitDef = enzmldoc._unit_dict[data_unit_id].copy() - - # Calculate the scale to transform the unit - transform_value, new_unit_name, unit_id = self._getTransformation( - unitdef, kind, scale, enzmldoc - ) - - # Re-scale and assign the new data of the replicate - replicate.data = [data_point * transform_value for data_point in replicate.data] - replicate._data_unit_id = unit_id - replicate.data_unit = new_unit_name - - @validate_arguments - def addReplicate(self, replicate: Replicate) -> None: - self.replicates.append(replicate) - - @validate_arguments - def setMeasurementIDs(self, id: str) -> None: - for replicate in self.replicates: - replicate.measurement_id = id - - def get_id(self) -> str: - """Internal usage to get IDs from objects without ID attribute""" - - if self.reactant_id: - return self.reactant_id - elif self.protein_id: - return self.protein_id - else: - raise AttributeError("Neither reactant nor protein ID are given.") - - # ! Getters - def unitdef(self): - """Returns the appropriate unitdef if an enzmldoc is given""" - - if not self._enzmldoc: - return None - - return self._enzmldoc._unit_dict[self._unit_id] - - @deprecated_getter("reactant_id") - def getReactantID(self) -> Optional[str]: - return self.reactant_id - - @deprecated_getter("protein_id") - def getProteinID(self) -> Optional[str]: - return self.protein_id - - @deprecated_getter("init_conc") - def getInitConc(self) -> PositiveFloat: - return self.init_conc - - @deprecated_getter("unit") - def getUnit(self) -> str: - return self.unit - - @deprecated_getter("replicates") - def getReplicates(self) -> List[Replicate]: - return self.replicates diff --git a/pyenzyme/enzymeml/core/ontology.py b/pyenzyme/enzymeml/core/ontology.py deleted file mode 100644 index 7ca18b8..0000000 --- a/pyenzyme/enzymeml/core/ontology.py +++ /dev/null @@ -1,89 +0,0 @@ -# File: ontology.py -# Project: core -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - - -from enum import Enum - - -class SBOTerm(str, Enum): - """String enumeration used to assign ontologies derived from SBOTerms.""" - - # Chemical reactions - BIOCHEMICAL_REACTION = "SBO:0000176" - ACID_BASE_REACTION = "SBO:0000208" - CONFORMATIONAL_TRANSITION = "SBO:0000181" - CONVERSION = "SBO:0000182" - DEGRADATION = "SBO:0000179" - DISSOCIATION = "SBO:0000180" - IONISATION = "SBO:0000209" - ISOMERISATION = "SBO:0000377" - NON_COVALENT_BINDING = "SBO:0000177" - REDOX_REACTION = "SBO:0000200" - SPONTANEOUS_REACTION = "SBO:0000672" - - # Chemical entities - PROTEIN = "SBO:0000252" - GENE = "SBO:0000251" - SMALL_MOLECULE = "SBO:0000247" - ION = "SBO:0000327" - RADICAL = "SBO:0000328" - - # Chemical relations - INTERACTOR = "SBO:0000336" - SUBSTRATE = "SBO:0000015" - PRODUCT = "SBO:0000011" - CATALYST = "SBO:0000013" - INHIBITOR = "SBO:0000020" - ESSENTIAL_ACTIVATOR = "SBO:0000461" - NON_ESSENTIAL_ACTIVATOR = "SBO:0000462" - POTENTIATOR = "SBO:0000021" - - # Complexes - MACROMOLECULAR_COMPLEX = "SBO:0000296" - PROTEIN_COMPLEX = "SBO:0000297" - DIMER = "SBO:0000607" - - # Kinetic models - MICHAELIS_MENTEN = "SBO:0000028" - - # Kinetic parameters - K_CAT = "SBO:0000025" - K_M = "SBO:0000027" - V_MAX = "SBO:0000186" - - -class DataTypes(str, Enum): - """String enumeration used to assign replicate type ontologies""" - - CONCENTRATION = "conc" - ABSORPTION = "abs" - FEED = "feed" - BIOMASS = "biomass" - CONVERSION = "conversion" - PEAK_AREA = "peak-area" - - -class EnzymeMLPart(str, Enum): - """Mapping to identify where entities are stored in the EnzymeML model.""" - - # Chemical entities - PROTEIN = "protein_dict" - SMALL_MOLECULE = "reactant_dict" - ION = "reactant_dict" - RADICAL = "reactant_dict" - MACROMOLECULAR_COMPLEX = "complex_dict" - PROTEIN_COMPLEX = "complex_dict" - DIMER = "complex_dict" - - @classmethod - def partFromSBOTerm(cls, sbo_term: str) -> str: - sbo_term = SBOTerm(sbo_term).name - return getattr(cls, sbo_term).value - - @classmethod - def entityFromSBOTerm(cls, sbo_term: str) -> str: - sbo_term = SBOTerm(sbo_term).name - return getattr(cls, sbo_term).name diff --git a/pyenzyme/enzymeml/core/protein.py b/pyenzyme/enzymeml/core/protein.py deleted file mode 100644 index 9cda2b7..0000000 --- a/pyenzyme/enzymeml/core/protein.py +++ /dev/null @@ -1,259 +0,0 @@ -# File: protein.py -# Project: core -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -import re - -from pydantic import validator, Field -from typing import Dict, Optional, TYPE_CHECKING, Any -from dataclasses import dataclass - -from pyenzyme.enzymeml.core.ontology import SBOTerm -from pyenzyme.enzymeml.core.enzymemlbase import EnzymeMLBase -from pyenzyme.enzymeml.core.exceptions import UniProtIdentifierError -from pyenzyme.enzymeml.core.abstract_classes import AbstractSpecies -from pyenzyme.enzymeml.core.utils import type_checking, deprecated_getter - -if TYPE_CHECKING: # pragma: no cover - static_check_init_args = dataclass -else: - static_check_init_args = type_checking - - -@static_check_init_args -class Protein(EnzymeMLBase, AbstractSpecies): - - name: Optional[str] = Field( - None, description="Name of the protein", template_alias="Name" - ) - - sequence: Optional[str] = Field( - None, - description="Amino acid sequence of the protein", - template_alias="Sequence", - ) - - vessel_id: str = Field( - ..., - description="Identifier of the vessel in which the protein was stored.", - template_alias="Vessel", - regex=r"v[\d.]+", - ) - - init_conc: Optional[float] = Field( - default=None, - description="Initial concentration of the protein.", - ) - - unit: Optional[str] = Field( - None, - description="Unit of the proteins intial concentration.", - ) - - constant: bool = Field( - True, - description="Whether the proteins concentration remains constant or not.", - template_alias="Constant", - ) - - id: Optional[str] = Field( - None, - description="Unique identifier of the protein.", - template_alias="ID", - regex=r"p[\d]+", - ) - - meta_id: Optional[str] = Field( - None, - description="Unique meta identifier of the protein.", - ) - - ecnumber: Optional[str] = Field( - None, - description="EC number of the protein.", - template_alias="EC Number", - regex=r"(\d+.)(\d+.)(\d+.)(\d+)", - ) - - organism: Optional[str] = Field( - None, - description="Organism the protein was expressed in.", - template_alias="Source organism", - ) - - organism_tax_id: Optional[str] = Field( - None, - description="Taxonomy identifier of the expression host.", - ) - - boundary: bool = Field( - False, - description="Whether the protein is under any boundary conditions (SBML Technicality, better leave it to default)", - ) - - ontology: SBOTerm = Field( - SBOTerm.PROTEIN, - description="Ontology describing the characteristic of the protein.", - ) - - uri: Optional[str] = Field( - None, - description="URI of the protein.", - ) - - creator_id: Optional[str] = Field( - None, - description="Unique identifier of the author.", - ) - - uniprotid: Optional[str] = Field( - None, - description="Unique identifier referencing a protein entry at UniProt. Use this identifier to initialize the object from the UniProt database.", - template_alias="UniProt ID", - ) - - # ! Validators - @validator("id") - def set_meta_id(cls, id: Optional[str], values: dict): - """Sets the meta ID when an ID is provided""" - - if id: - # Set Meta ID with ID - values["meta_id"] = f"METAID_{id.upper()}" - - return id - - @validator("sequence") - def clean_sequence(cls, sequence): - """Cleans a sequence from whitespaces as well as newlines and transforms uppercase""" - - if sequence: - return re.sub(r"\s+", "", sequence).upper() - else: - return sequence - - # ! Initializers - @classmethod - def fromUniProtID( - cls, - uniprotid: str, - vessel_id: str, - init_conc: Optional[float] = None, - unit: Optional[str] = None, - constant: bool = False, - ) -> "Protein": - """Initializes a protein based on the UniProt database. - - Raises: - UniProtIdentifierError: Raised when the UniProt identifier is invalid. - - Returns: - Protein: The initialiized Protein object. - """ - - # Get UniProt Parameters - parameters = cls._getUniProtParameters(uniprotid=uniprotid) - - return cls( - init_conc=init_conc, - unit=unit, - vessel_id=vessel_id, - constant=constant, - uniprotid=uniprotid, - **parameters, - ) - - @staticmethod - def _getUniProtParameters(uniprotid: str) -> Dict[str, Any]: - import requests - import xml.etree.ElementTree as ET - - # Send request to CHEBI database - endpoint = f"https://www.uniprot.org/uniprot/{uniprotid}.xml" - - # Fetch data - response = requests.get(endpoint) - - # Check if the UniProt ID is correct - if response.status_code == 404: - raise UniProtIdentifierError(uniprotid=uniprotid) - - # Create XML Tree - tree = ET.ElementTree(ET.fromstring(response.text)) - - # Set prefix to match tag - prefix = r"{http://uniprot.org/uniprot}" - - # Define mapping for the used attributes - attribute_mapping = { - prefix + "sequence": "sequence", - prefix + "fullName": "name", - prefix + "ecNumber": "ecnumber", - } - - # Collect parameters - parameters = {} - for elem in tree.iter(): - if elem.tag in attribute_mapping and parameters.get(elem.tag) is None: - parameters[attribute_mapping[elem.tag]] = elem.text - - return parameters - - # ! Getters - @deprecated_getter("organism_tax_id") - def getOrganismTaxId(self): - return self.organism_tax_id - - @deprecated_getter("ecnumber") - def getEcnumber(self): - return self.ecnumber - - @deprecated_getter("uniprotid") - def getUniprotID(self): - return self.uniprotid - - @deprecated_getter("organism") - def getOrganism(self): - return self.organism - - @deprecated_getter("init_conc") - def getInitConc(self): - return self.init_conc - - @deprecated_getter("name") - def getName(self): - return self.name - - @deprecated_getter("id") - def getId(self): - return self.id - - @deprecated_getter("meta_id") - def getMetaid(self): - return self.meta_id - - @deprecated_getter("sequence") - def getSequence(self): - return self.sequence - - @deprecated_getter("ontology") - def getSboterm(self): - return self.ontology - - @deprecated_getter("vessel_id") - def getVessel(self): - return self.vessel_id - - @deprecated_getter("unit") - def getSubstanceUnits(self): - return self.unit - - @deprecated_getter("boundary") - def getBoundary(self): - return self.boundary - - @deprecated_getter("constant") - def getConstant(self): - return self.constant diff --git a/pyenzyme/enzymeml/core/reactant.py b/pyenzyme/enzymeml/core/reactant.py deleted file mode 100644 index ac72f89..0000000 --- a/pyenzyme/enzymeml/core/reactant.py +++ /dev/null @@ -1,211 +0,0 @@ -# File: reactant.py -# Project: core -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -from pydantic import Field -from typing import Dict, TYPE_CHECKING, Optional, Union, Any -from dataclasses import dataclass - -from pyenzyme.enzymeml.core.enzymemlbase import EnzymeMLBase -from pyenzyme.enzymeml.core.abstract_classes import AbstractSpecies -from pyenzyme.enzymeml.core.ontology import SBOTerm -from pyenzyme.enzymeml.core.exceptions import ChEBIIdentifierError -from pyenzyme.enzymeml.core.utils import type_checking, deprecated_getter - -if TYPE_CHECKING: # pragma: no cover - static_check_init_args = dataclass -else: - static_check_init_args = type_checking - - -@static_check_init_args -class Reactant(EnzymeMLBase, AbstractSpecies): - - name: Optional[str] = Field( - None, description="Name of the reactant.", template_alias="Name" - ) - - vessel_id: str = Field( - ..., - description="Identifier of the vessel in which the reactant was stored.", - template_alias="Vessel", - ) - - init_conc: Optional[float] = Field( - None, - description="Initial concentration of the reactant.", - ) - - unit: Optional[str] = Field( - None, - description="Unit of the reactant intial concentration.", - ) - - constant: bool = Field( - False, - description="Whether the reactants concentration remains constant or not.", - template_alias="Constant", - ) - - id: Optional[str] = Field( - None, - description="Unique identifier of the protein.", - template_alias="ID", - regex=r"s[\d]+", - ) - - meta_id: Optional[str] = Field( - None, - description="Unique meta identifier of the protein.", - ) - - smiles: Optional[str] = Field( - None, - description="Simplified Molecular Input Line Entry System (SMILES) encoding of the reactant.", - template_alias="SMILES", - ) - - inchi: Optional[str] = Field( - None, - description="International Chemical Identifier (InChI) encoding of the reactant.", - template_alias="InCHI", - ) - - boundary: bool = Field( - False, - description="Whether the reactant is under any boundary conditions (SBML Technicality, better leave it to default)", - ) - - ontology: SBOTerm = Field( - SBOTerm.SMALL_MOLECULE, - description="Ontology describing the characteristic of the reactant.", - ) - - uri: Optional[str] = Field( - None, - description="URI of the protein.", - ) - - creator_id: Optional[str] = Field( - None, - description="Unique identifier of the author.", - ) - - chebi_id: Optional[str] = Field( - None, - description="Unique identifier of the CHEBI database. Use this identifier to initialize the object from the CHEBI database.", - ) - - # ! Initializers - @classmethod - def fromChebiID( - cls, - chebi_id: str, - vessel_id: str, - constant: bool = False, - init_conc: Optional[float] = None, - unit: Optional[str] = None, - ) -> "Reactant": - """Initializes a reactant based - - Raises: - ChEBIIdentifierError: [description] - - Returns: - [type]: [description] - """ - - # Get Chebi Parameters - parameters = cls._getChEBIParameters(chebi_id=chebi_id) - - return cls( - init_conc=init_conc, - unit=unit, - vessel_id=vessel_id, - constant=constant, - chebi_id=chebi_id, - **parameters, - ) - - @staticmethod - def _getChEBIParameters(chebi_id: Union[str, int]) -> Dict[str, Any]: - import requests - import xml.etree.ElementTree as ET - - # Send request to CHEBI database - endpoint = f"https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId={chebi_id}" - - # Fetch data - response = requests.get(endpoint) - tree = ET.ElementTree(ET.fromstring(response.text)) - - # Set prefix to match tag - prefix = r"{https://www.ebi.ac.uk/webservices/chebi}" - - # Check if the CHEBI ID is correct - if "faultcode" in response.text: - raise ChEBIIdentifierError(chebi_id=chebi_id) - - # Define mapping for the used attributes - attribute_mapping = { - prefix + "inchi": "inchi", - prefix + "smiles": "smiles", - prefix + "chebiAsciiName": "name", - } - - # Collect parameters - parameters = { - attribute_mapping[elem.tag]: elem.text - for elem in tree.iter() - if elem.tag in attribute_mapping - } - - return parameters - - # ! Getters - - @deprecated_getter("inchi") - def getInchi(self): - return self.inchi - - @deprecated_getter("smiles") - def getSmiles(self): - return self.smiles - - @deprecated_getter("init_conc") - def getInitConc(self): - return self.init_conc - - @deprecated_getter("name") - def getName(self): - return self.name - - @deprecated_getter("id") - def getId(self): - return self.id - - @deprecated_getter("meta_id") - def getMetaid(self): - return self.meta_id - - @deprecated_getter("ontology") - def getSboterm(self): - return self.ontology - - @deprecated_getter("vessel_id") - def getVessel(self): - return self.vessel_id - - @deprecated_getter("unit") - def getSubstanceUnits(self): - return self.unit - - @deprecated_getter("boundary") - def getBoundary(self): - return self.boundary - - @deprecated_getter("constant") - def getConstant(self): - return self.constant diff --git a/pyenzyme/enzymeml/core/replicate.py b/pyenzyme/enzymeml/core/replicate.py deleted file mode 100644 index e12d56c..0000000 --- a/pyenzyme/enzymeml/core/replicate.py +++ /dev/null @@ -1,152 +0,0 @@ -# File: replicate.py -# Project: core -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -from pydantic import Field, validator, PrivateAttr -from typing import List, TYPE_CHECKING, Optional -from dataclasses import dataclass - -from pyenzyme.enzymeml.core.enzymemlbase import EnzymeMLBase -from pyenzyme.enzymeml.core.ontology import DataTypes -from pyenzyme.enzymeml.core.exceptions import DataError -from pyenzyme.enzymeml.core.utils import type_checking, deprecated_getter - -if TYPE_CHECKING: # pragma: no cover - static_check_init_args = dataclass -else: - static_check_init_args = type_checking - - -@static_check_init_args -class Replicate(EnzymeMLBase): - - id: str = Field( - ..., - description="Unique identifier of the replicate", - ) - - species_id: str = Field( - ..., - description="Unique identifier of the species that has been measured.", - regex=r"[s|r|p][\d]+", - ) - - measurement_id: Optional[str] = Field( - None, - description="Unique identifier of the measurement that the replicate is part of.", - regex=r"m[\d]+", - ) - - data_type: DataTypes = Field( - DataTypes.CONCENTRATION, - description="Type of data that was measured (e.g. concentration)", - ) - - data_unit: str = Field( - ..., - description="SI unit of the data that was measured.", - ) - - time_unit: str = Field( - ..., - description="Time unit of the replicate.", - ) - - time: List[float] = Field( - None, - description="Time steps of the replicate.", - ) - - data: List[float] = Field( - None, - description="Data that was measured.", - ) - - is_calculated: bool = Field( - False, - description="Whether or not the data has been generated by simulation.", - ) - - uri: Optional[str] = Field( - None, - description="URI of the protein.", - ) - - creator_id: Optional[str] = Field( - None, - description="Unique identifier of the author.", - ) - - # * Private - _time_unit_id: Optional[str] = PrivateAttr(None) - _data_unit_id: Optional[str] = PrivateAttr(None) - _enzmldoc = PrivateAttr(default=None) - - @validator("data") - def check_data_completeness(cls, data: List[float], values: dict): - if values.get("time") is None and data is not None: - # Check if time is given - raise DataError( - "No time values provided for the data yet. \ - Please include time values too, using the 'time' attribute" - ) - elif values.get("time"): - # Check if the data complies with the time values - timesteps = len(values["time"]) - if timesteps != len(data): - raise DataError( - f"The number of steps provided for the data [{len(data)}] does not match the number of timesteps [{timesteps}] for replicate '{values['id']}'" - ) - - return data - - # ! Getters - def data_unitdef(self): - """Returns the appropriate unitdef if an enzmldoc is given""" - - if not self._enzmldoc: - return None - - return self._enzmldoc._unit_dict[self._data_unit_id] - - def time_unitdef(self): - """Returns the appropriate unitdef if an enzmldoc is given""" - - if not self._enzmldoc: - return None - - return self._enzmldoc._unit_dict[self._time_unit_id] - - @deprecated_getter("measurement_id") - def getMeasurement(self): - return self.measurement_id - - @deprecated_getter("is_calculated") - def getIsCalculated(self): - return self.is_calculated - - @deprecated_getter("replicate_id") - def getReplica(self): - return self.id - - @deprecated_getter("species_id") - def getReactant(self): - return self.species_id - - @deprecated_getter("data_type") - def getType(self): - return self.data_type - - @deprecated_getter("data_unit") - def getDataUnit(self): - return self.data_unit - - @deprecated_getter("time_unit") - def getTimeUnit(self): - return self.time_unit - - @deprecated_getter("time' and 'data") - def getData(self, sep=False): - return self.time, self.data diff --git a/pyenzyme/enzymeml/core/unitdef.py b/pyenzyme/enzymeml/core/unitdef.py deleted file mode 100644 index 71cb82c..0000000 --- a/pyenzyme/enzymeml/core/unitdef.py +++ /dev/null @@ -1,295 +0,0 @@ -# File: unitdef.py -# Project: core -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -from pydantic import Field, validator, validate_arguments -from typing import List, TYPE_CHECKING, Optional -from dataclasses import dataclass - -from pyenzyme.enzymeml.core.enzymemlbase import EnzymeMLBase -from pyenzyme.enzymeml.core.utils import type_checking, deprecated_getter - - -if TYPE_CHECKING: # pragma: no cover - static_check_init_args = dataclass -else: - static_check_init_args = type_checking - - -@static_check_init_args -class BaseUnit(EnzymeMLBase): - """Base unit description including kind, exponent, scale and multiplier""" - - kind: str = Field( - ..., - description="Unit kind used to write SBML.", - ) - - exponent: float = Field( - ..., - description="Unit exponent.", - ) - - scale: int = Field( - ..., - description="Unit scale.", - ) - - multiplier: float = Field( - ..., - description="Unit multiplier.", - ) - - def get_id(self) -> str: - """Internal usage to get IDs from objects without ID attribute""" - - if self.kind: - return self.kind - else: - raise AttributeError("No species ID given.") - - def get_name(self) -> str: - """Returns the appropriate name of the unit""" - - # Get mappings - prefix_mapping, kind_mapping = self._setup_mappings() - - # Retrieve values to generate the name - prefix = prefix_mapping[self.scale] - unit = kind_mapping[self.kind] - - # Special case for time - if unit == "s": - if self.multiplier == 60: - unit = "min" - if self.multiplier == 60 * 60: - unit = "hours" - - if abs(self.exponent) != 1: - exponent = f"^{abs(int(self.exponent))}" - else: - exponent = "" - - return f"{prefix}{unit}{exponent}" - - @staticmethod - def _setup_mappings(): - # TODO integrate this to unitcreator - # Create a mappings - prefix_mapping = { - -15: "f", - -12: "p", - -9: "n", - -6: "u", - -3: "m", - -2: "c", - -1: "d", - 1: "", - 3: "k", - } - - kind_mapping = { - "litre": "l", - "gram": "g", - "second": "s", - "kelvin": "K", - "dimensionless": "dimensionless", - "mole": "mole", - } - - return prefix_mapping, kind_mapping - - -@static_check_init_args -class UnitDef(EnzymeMLBase): - - name: Optional[str] = Field( - None, - description="Name of the SI unit.", - ) - - id: Optional[str] = Field( - None, - description="Interal Identifier of the SI unit.", - ) - - meta_id: Optional[str] = Field( - None, - description="Interal meta identifier of the SI unit.", - ) - - units: List[BaseUnit] = Field( - default_factory=list, - description="List of SI baseunits.", - ) - - ontology: Optional[str] = Field( - None, - description="Ontology of the SI unit.", - ) - - # ! Validators - @validator("id") - def set_meta_id(cls, id: Optional[str], values: dict): - """Sets the meta ID when an ID is provided""" - - if id: - # Set Meta ID with ID - values["meta_id"] = f"METAID_{id.upper()}" - - return id - - @validator("meta_id") - def check_meta_id(cls, meta_id: Optional[str], values: dict): - """Checks if the meta ID provided is following the standard""" - - if values.get("meta_id"): - # When the ID init already set the meta ID - return values.get("meta_id") - - return None - - def _get_unit_name(self): - """Generates the unit name based of the given baseunits""" - - nominator, denominator = [], [] - for unit in self.units: - if unit.exponent > 0: - nominator.append(unit.get_name()) - elif unit.exponent < 0: - denominator.append(unit.get_name()) - - # Catch empty nominators - if not nominator: - nominator = "1" - - # Combine each side and construct the SI string - nominator = " ".join(nominator) - denominator = " ".join(denominator) - - if denominator: - return " / ".join([nominator, denominator]) - else: - return nominator - - # ! Adders - @validate_arguments - def addBaseUnit( - self, kind: str, exponent: float, scale: int, multiplier: float - ) -> None: - """Adds a base unit to the units element and sort the units. - - Args: - kind (str): SBML unit kind string. - exponent (float): Exponent of the unit. - scale (float): Scale of the unit. - multiplier (float): Muliplier of the unit. - """ - - # Create baseunit - baseunit = BaseUnit( - kind=kind, exponent=exponent, scale=scale, multiplier=multiplier - ) - - # Merge both and sort them via kind - if baseunit not in self.units: - self.units.append(baseunit) - self.units = sorted(self.units, key=lambda unit: unit.kind) - - # ! Utilities - def calculateTransformValue(self, kind: str, scale: int): - """Calculates the value that is needed to re-scale the given unit to the desired scale. - - Args: - kind (str): The kind of unit that is used as a reference. - scale (int): The desired scale. - - Raises: - ValueError: Raised when the given unit kind is not part of the unitdef. - - Returns: - float: The value that is needed to re-scale the given unit to the desired scale. - """ - - for base_unit in self.units: - if base_unit.kind == kind: - - # correction factor used for the case of scale=1 - correction_factor = -1 if base_unit.scale == 1 else 0 - - return 10 ** ( - base_unit.exponent * (base_unit.scale - scale + correction_factor) - ) - - raise ValueError(f"Unit kind of {kind} is not part of the unit definition") - - def _getNewName(self) -> str: - """Internal function used to derive a units new name. Will be assigned using enzmldoc._convertTounitDef. - - Returns: - str: The new name of the unit definition. - """ - - # Mapping for abbreviations - kind_mapping = { - "mole": "mole", - "second": "s", - "liter": "l", - "litre": "l", - } - - prefix_mapping = { - -15: "f", - -12: "p", - -9: "n", - -6: "u", - -3: "m", - -2: "c", - -1: "d", - 1: "", - 3: "k", - } - - nominator = list(filter(lambda base_unit: base_unit.exponent > 0, self.units)) - - denominator = list(filter(lambda base_unit: base_unit.exponent < 0, self.units)) - - # Create new unit name - def constructName(base_unit: BaseUnit) -> str: - return f"{prefix_mapping[base_unit.scale]}{kind_mapping[base_unit.kind]}" - - nominator_string = " ".join( - [constructName(base_unit) for base_unit in nominator] - ) - denominator_string = " ".join( - [constructName(base_unit) for base_unit in denominator] - ) - - return " / ".join([nominator_string, denominator_string]) - - # ! Getters - @deprecated_getter("units") - def getUnits(self): - return self.units - - @deprecated_getter("name") - def getName(self): - return self.name - - @deprecated_getter("id") - def getId(self): - return self.id - - @deprecated_getter("meta_id") - def getMetaid(self): - return self.meta_id - - @deprecated_getter("ontology") - def getOntology(self): - return self.ontology - - def getFootprint(self): - sorted_units = [base_unit.dict() for base_unit in self.units] - return list(sorted(sorted_units, key=lambda unit: unit["kind"])) diff --git a/pyenzyme/enzymeml/core/utils.py b/pyenzyme/enzymeml/core/utils.py deleted file mode 100644 index 3fb2179..0000000 --- a/pyenzyme/enzymeml/core/utils.py +++ /dev/null @@ -1,27 +0,0 @@ -# File: functionalities.py -# Project: core -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - - -from deprecation import deprecated - - -def type_checking(cls): - """Used to enable pyDantic type checking, since it is not supported yet by Pylance""" - return cls - - -def deprecated_getter(name: str): - """Decorator used to indicate that a deprecated method has been used""" - return deprecated( - details=f"Use the attribute `{name}` instead.", - ) - - -def deprecated_method(name: str): - """Decorator used to indicate that a deprecated method has been used""" - return deprecated( - details=f"Use the method `{name}` instead.", - ) diff --git a/pyenzyme/enzymeml/core/vessel.py b/pyenzyme/enzymeml/core/vessel.py deleted file mode 100644 index 56d3180..0000000 --- a/pyenzyme/enzymeml/core/vessel.py +++ /dev/null @@ -1,110 +0,0 @@ -# File: vessel.py -# Project: core -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -from pydantic import Field, PositiveFloat, validator, PrivateAttr, BaseModel -from typing import TYPE_CHECKING, Optional -from dataclasses import dataclass - -from pyenzyme.enzymeml.core.enzymemlbase import EnzymeMLBase -from pyenzyme.enzymeml.core.utils import type_checking, deprecated_getter - -if TYPE_CHECKING: # pragma: no cover - static_check_init_args = dataclass -else: - static_check_init_args = type_checking - - -@static_check_init_args -class Vessel(EnzymeMLBase): - - name: str = Field( - ..., description="Name of the used vessel.", template_alias="Name" - ) - - volume: Optional[PositiveFloat] = Field( - None, - description="Volumetric value of the vessel.", - template_alias="Volume value", - ) - - unit: Optional[str] = Field( - None, description="Volumetric unit of the vessel.", template_alias="Volume unit" - ) - - constant: bool = Field( - True, - description="Whether the volume of the vessel is constant or not.", - ) - - meta_id: Optional[str] = Field( - None, - description="Unique meta identifier of the vessel.", - ) - - id: Optional[str] = Field( - None, - description="Unique identifier of the vessel.", - template_alias="ID", - regex=r"v[\d]+", - ) - - uri: Optional[str] = Field( - None, - description="URI of the vessel.", - ) - - creator_id: Optional[str] = Field( - None, - description="Unique identifier of the author.", - ) - - # * Private - _unit_id: Optional[str] = PrivateAttr(None) - _enzmldoc = PrivateAttr(default=None) - - # ! Validators - @validator("id") - def set_meta_id(cls, id: Optional[str], values: dict): - """Sets the meta ID when an ID is provided""" - - if id: - # Set Meta ID with ID - values["meta_id"] = f"METAID_{id.upper()}" - - return id - - # ! Getters - def unitdef(self): - """Returns the appropriate unitdef if an enzmldoc is given""" - - if not self._enzmldoc: - return None - - return self._enzmldoc._unit_dict[self._unit_id] - - @deprecated_getter("name") - def getName(self): - return self.name - - @deprecated_getter("id") - def getId(self): - return self.id - - @deprecated_getter("meta_id") - def getMetaid(self): - return self.meta_id - - @deprecated_getter("constant") - def getConstant(self): - return self.constant - - @deprecated_getter("volume") - def getSize(self): - return self.volume - - @deprecated_getter("unit") - def getUnit(self): - return self.unit diff --git a/pyenzyme/enzymeml/databases/__init__.py b/pyenzyme/enzymeml/databases/__init__.py deleted file mode 100644 index 96fbe08..0000000 --- a/pyenzyme/enzymeml/databases/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# File: __init__.py -# Project: databases -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -from .dataverse import uploadToDataverse diff --git a/pyenzyme/enzymeml/databases/dataverse.py b/pyenzyme/enzymeml/databases/dataverse.py deleted file mode 100644 index e18ea80..0000000 --- a/pyenzyme/enzymeml/databases/dataverse.py +++ /dev/null @@ -1,274 +0,0 @@ -# File: dataverse.py -# Project: core -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -import json -import os -import pydantic - -from typing import Dict, Any, Optional - -from pyDaRUS import EnzymeMl, Citation, Dataset -from pyDaRUS.metadatablocks.enzymeML import Constant -from pyDaRUS.metadatablocks.citation import SubjectEnum - - -def uploadToDataverse( - enzmldoc, - dataverse_name: str, - base_url: Optional[str] = None, - api_token: Optional[str] = None, -) -> None: - """Uploads a givene EnzymeMLDocument object to a dataverse installation. - - It should be noted, that the environment variables 'DATAVERSE_URL' and 'DATAVERSE_API_TOKEN' - should be given approriately before the upload. If not, tje upload cant be done. - - Args: - enzmldoc (EnzymeMLDocument): The EnzymeMLDocument to be uploaded. - dataverse_name (str): Name of the dataverse to be uploaded to. - base_url (str): Base URL of the dataverse to upload. Defaults to None. If None the URL will be drawn from env vars. - api_token (str): API Token of the dataverse to upload. Defaults to None. If None the API Token will be drawn from env vars. - """ - - # Fill in all the metadatablocks - enzml_meta = create_enzymeml_metadatablock(enzmldoc) - citation_meta = create_citation_metadatablock(enzmldoc) - - # Initialize a dataset for the upload - dataset = Dataset() - - # Add all metadatablocks - dataset.add_metadatablock(enzml_meta) - dataset.add_metadatablock(citation_meta) - - # Write EnzymeMLDocument to file - archive_name = f"{enzmldoc.name.replace(' ', '_')}_dv_upload" - enzmldoc.toFile(".", name=archive_name) - - try: - dataset.add_file( - dv_path=f"{archive_name}.omex", local_path=f"{archive_name}.omex" - ) - dataset.upload( - dataverse_name=dataverse_name, - DATAVERSE_URL=base_url, - API_TOKEN=api_token, - ) - except Exception as e: - os.remove(f"{archive_name}.omex") - raise e - - # Remove the unsued EnzymeML document - os.remove(f"{archive_name}.omex") - - -def create_enzymeml_metadatablock( - enzmldoc, -): - - # Initialize the EnzymeML metadatablock - enzml_meta = EnzymeMl() - - # Vessels - vessel_mapping = { - "name": "name", - "volume": "size", - "unit": "unit", - "constant": "constant", - } - - for vessel in enzmldoc.vessel_dict.values(): - json_data = json.loads(vessel.json()) - - # Apply corrections to match controlled vocabs - json_data["constant"] = ( - Constant.constant.value - if json_data["constant"] - else Constant.not_constant.value - ) - - add_object(json_data, vessel_mapping, enzml_meta.add_vessels) - - protein_mapping = { - # "id": "identifier", - "name": "name", - "vessel_id": "vessel_reference", - "init_conc": "initial_concentration", - "unit": "unit", - "constant": "constant", - "sequence": "sequence", - "organism": "organism", - "uniprotid": "uniprotid", - "ecnumber": "ecnumber", - "ontology": "sbo_term", - } - - for protein in enzmldoc.protein_dict.values(): - json_data = json.loads(protein.json()) - - # Apply corrections to match controlled vocabs - json_data["constant"] = ( - Constant.constant.value - if json_data["constant"] - else Constant.not_constant.value - ) - - add_object(json_data, protein_mapping, enzml_meta.add_proteins) - - reactant_mapping = { - # "id": "identifier", - "name": "name", - "vessel_id": "vessel_reference", - "init_conc": "initial_concentration", - "unit": "unit", - "constant": "constant", - "inchi": "inchicode", - "smiles": "smilescode", - "ontology": "sbo_term", - } - - for reactant in enzmldoc.reactant_dict.values(): - json_data = json.loads(reactant.json()) - - # Apply corrections to match controlled vocabs - json_data["constant"] = ( - Constant.constant.value - if json_data["constant"] - else Constant.not_constant.value - ) - - add_object(json_data, reactant_mapping, enzml_meta.add_reactants) - - reaction_mapping = { - "name": "name", - "temperature": "temperature_value", - "temperature_unit": "temperature_unit", - "ph": "ph_value", - } - - for reaction in enzmldoc.reaction_dict.values(): - - params: Dict[str, Any] = { - reaction_mapping.get(key): item - for key, item in reaction.dict().items() - if reaction_mapping.get(key) and repr(item) != "nan" and item - } - - # Apply corrections - if params.get("temperature_unit"): - params["temperature_unit"] = ( - "Kelvin" if params["temperature_unit"] == "K" else "Celsius" - ) - - # Extract al elements present in the reaction - educts = [ - enzmldoc.getAny(element.species_id).name for element in reaction.educts - ] - - products = [ - enzmldoc.getAny(element.species_id).name for element in reaction.products - ] - - modifiers = [ - enzmldoc.getAny(element.species_id).name for element in reaction.products - ] - - # Create corresponding string representations - params["educts"] = ", ".join(educts) - params["products"] = ", ".join(products) - params["modifiers"] = ", ".join(modifiers) - params["equation"] = " + ".join(educts) + " -> " + " + ".join(products) - - enzml_meta.add_reactions(**params) - - if reaction.model: - # Report on the model if given - law_params = kinetic_law_params(reaction) - enzml_meta.add_kinetic_law(**law_params) - - for param in reaction.model.parameters: - json_data = json.loads(param.json()) - - enzml_meta.add_kinetic_parameters( - name=f"{json_data['name']}_{reaction.id}", - value=json_data["value"], - unit=json_data["unit"], - sbo_term=json_data.get("ontology"), - ) - - return enzml_meta - - -def add_object(json_data, mapping, add_fun): - - params = { - mapping.get(key): item - for key, item in json_data.items() - if mapping.get(key) and repr(item) != "nan" and item - } - - # TODO fix metadatablock to accept other units than MOLAR - if params.get("unit"): - params["unit"] = params["unit"].replace("mole / l", "M") - - try: - # Add infos to metadatablock - add_fun(**params) - except pydantic.ValidationError as e: - - # TODO find a better way to handle this error - for error in e.errors(): - if error["loc"][0] == "unit": - params.pop("unit") - add_fun(**params) - - return None - - raise e - - -def kinetic_law_params(reaction: "EnzymeReaction") -> Dict[str, str]: # noqa: F821 - """Retrieves the arguments to add a kinetic law to an EnzymeML Metadatablock""" - - kinetic_law_mapping = {"name": "name", "equation": "kinetic_model"} - - # Get the model - model = reaction.model - - params = { - kinetic_law_mapping.get(key): item - for key, item in model.dict().items() - if kinetic_law_mapping.get(key) and repr(item) != "nan" and item - } - - params["reaction_reference"] = reaction.id - - return params - - -def create_citation_metadatablock(enzmldoc: "EnzymeMLDocument"): # noqa: F821 - - # Initialize the Citation metadatablock - citation_meta = Citation( - title=enzmldoc.name, - subject=[ - SubjectEnum.chemistry, - SubjectEnum.medicine___health_and__life__sciences, - ], - ) - - # Add author information - for creator in enzmldoc.creator_dict.values(): - name = f"{creator.given_name} {creator.family_name}" - citation_meta.add_author(name=name) - citation_meta.add_contact(name=name, email=creator.mail) - - # Add descripiton - citation_meta.add_description( - text=f"EnzymeML document reporting on {enzmldoc.name}" - ) - - return citation_meta diff --git a/pyenzyme/enzymeml/models/__init__.py b/pyenzyme/enzymeml/models/__init__.py deleted file mode 100644 index 72d8b74..0000000 --- a/pyenzyme/enzymeml/models/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# File: __init__.py -# Project: models -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -from pyenzyme.enzymeml.models.kineticmodel import KineticModel -from pyenzyme.enzymeml.models.michaelismenten import ( - MichaelisMentenVMax, - MichaelisMentenKCat, -) -from pyenzyme.enzymeml.models.kineticmodel import KineticParameter diff --git a/pyenzyme/enzymeml/models/kineticmodel.py b/pyenzyme/enzymeml/models/kineticmodel.py deleted file mode 100644 index 4a0a735..0000000 --- a/pyenzyme/enzymeml/models/kineticmodel.py +++ /dev/null @@ -1,426 +0,0 @@ -# File: kineticmodel.py -# Project: models -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -import ast -import re -import numexpr - -from typing import Any, List, TYPE_CHECKING, Optional -from pydantic import Field -from dataclasses import dataclass - -from pydantic.fields import PrivateAttr - -from pyenzyme.enzymeml.core.enzymemlbase import EnzymeMLBase -from pyenzyme.enzymeml.core.ontology import SBOTerm -from pyenzyme.enzymeml.core.utils import type_checking, deprecated_getter - -if TYPE_CHECKING: # pragma: no cover - static_check_init_args = dataclass -else: - static_check_init_args = type_checking - - -@static_check_init_args -class KineticParameter(EnzymeMLBase): - - name: str = Field( - ..., - description="Name of the estimated parameter.", - ) - - value: Optional[float] = Field( - None, - description="Numerical value of the estimated parameter.", - ) - - unit: Optional[str] = Field( - None, - description="Unit of the estimated parameter.", - ) - - initial_value: Optional[float] = Field( - None, description="Initial value that was used for the parameter estimation." - ) - - upper: Optional[float] = Field( - None, description="Upper bound of the estimated parameter." - ) - - lower: Optional[float] = Field( - None, description="Lower bound of the estimated parameter." - ) - - is_global: bool = Field( - False, description="Specifies if this parameter is a global parameter." - ) - - stdev: Optional[float] = Field( - None, description="Standard deviation of the estimated parameter." - ) - - constant: bool = Field(False, description="Specifies if this parameter is constant") - - ontology: Optional[SBOTerm] = Field( - None, - description="Type of the estimated parameter.", - ) - - # * Private attributes - _unit_id: Optional[str] = PrivateAttr(None) - _enzmldoc = PrivateAttr(default=None) - - def get_id(self): - """For logging. Dont bother.""" - return self.name - - # ! Utilities - def update(self, **kwargs): - """Adds attributes to this parameter based in kwargs""" - self.__dict__.update(kwargs) - - # ! Getters - def unitdef(self): - """Returns the appropriate unitdef if an enzmldoc is given""" - - if not self._enzmldoc: - return None - - return self._enzmldoc._unit_dict[self._unit_id] - - -@static_check_init_args -class KineticModel(EnzymeMLBase): - - name: str = Field( - ..., - description="Name of the kinetic law.", - ) - - equation: str = Field( - ..., - description="Equation for the kinetic law.", - ) - - parameters: List[KineticParameter] = Field( - default_factory=list, - description="List of estimated parameters.", - ) - - ontology: Optional[SBOTerm] = Field( - None, - description="Type of the estimated parameter.", - ) - - # ! Add methods - def addParameter( - self, - name: str, - value: Optional[float] = None, - unit: Optional[str] = None, - initial_value: Optional[float] = None, - upper: Optional[float] = None, - lower: Optional[float] = None, - is_global: bool = False, - stdev: Optional[float] = None, - constant: bool = False, - ontology: Optional[SBOTerm] = None, - ): - """Adds a parameter to the KineticModel object - - Args: - name (str): Name of the estimated parameter. - value (Optional[float], optional): Numerical value of the estimated parameter.. Defaults to None. - unit (Optional[str], optional): Unit of the estimated parameter.. Defaults to None. - initial_value (Optional[float], optional): Initial value that was used for the parameter estimation. Defaults to None. - upper (Optional[float], optional): Upper bound of the estimated parameter.. Defaults to None. - lower (Optional[float], optional): Lower bound of the estimated parameter.. Defaults to None. - is_global (bool, optional): Specifies if this parameter is a global parameter.. Defaults to False. - stdev (Optional[float], optional): Standard deviation of the estimated parameter.. Defaults to None. - constant (bool, optional): Specifies if this parameter is constant. Defaults to False. - ontology (Optional[SBOTerm], optional): Type of the estimated parameter.. Defaults to None. - """ - - self.parameters.append( - KineticParameter( - name=name, - value=value, - unit=unit, - initial_value=initial_value, - upper=upper, - lower=lower, - is_global=is_global, - stdev=stdev, - constant=constant, - ontology=ontology, - ) - ) - - self.__dict__["_" + self.parameters[-1].name] = self.parameters[-1] - - # ! Initializers - @staticmethod - def createGenerator(name: str, equation: str, **parameters): - """Creates an abstract model generator to generated specific models. - - Args: - name (str): Name of the model. - equation (str): Equation - - Returns: - [type]: [description] - """ - - return ModelFactory(name=name, equation=equation, **parameters) - - @classmethod - def fromEquation(cls, name: str, equation: str, enzmldoc: Optional[Any] = None): - """Creates a Kinetic Model instance from an equation - - Args: - equation (str): Mathematical equation decribing the model. - - Returns: - KineticModel: Resulting kinetic model - """ - - if enzmldoc: - # Convert an equation with names to one with IDs - - class_name = enzmldoc.__class__.__name__ - if class_name != "EnzymeMLDocument": - # Guard clause - raise TypeError( - f"Expected type 'EnzymeMLDocument' for argument 'enzmldoc'. Got '{class_name}' instead." - ) - - # Now perform the actual conversion - equation = cls._convert_names_to_ids(enzmldoc, equation) - - # Create a new instance - cls = cls(name=name, equation=equation) - - # Parse equation and add parameters - used_species = [] - for node in ast.walk(ast.parse(equation)): - if isinstance(node, ast.Name): - name = node.id - regex = re.compile(r"[s|p|c]\d*") - if not bool(regex.match(name)) and "_" + name not in cls.__dict__: - cls.addParameter(name=name) - else: - used_species.append(name) - - if not used_species: - raise TypeError( - "It seems like you have included no species (Protein, Reactant, Complex) in your equation. " - "Are you using names? Please set your 'EnzymeMLDocument' to the argument 'enzmldoc' in order to proceed" - ) - - return cls - - @staticmethod - def _convert_names_to_ids(enzmldoc, equation: str): - """Converts names in an equation to appropriate IDs given in an EnzymeMLDocument""" - - all_species = { - **enzmldoc.protein_dict, - **enzmldoc.reactant_dict, - **enzmldoc.complex_dict, - } - - for id, species in all_species.items(): - equation = equation.replace(species.name, id) - - return equation - - # ! Utilities - - def get_id(self) -> str: - return self.name - - def evaluate(self, **kwargs): - """Calculates the the reaction velocity given the internal parameters and variable concentrations handed as keyword arguments. - - Examples: - - model = KineticModel(...) <- Lets assume this is a Menten Model with already estimated parameters - print(model.evaluate(protein=10.0, substrate=1.0)) - - >> 1.002 <- This is the resulting velocity - - Returns: - float: Corresponding reaction velocity given the internal parameters and variables. - """ - - # Initialize a dictionary which will take care to create an eval string - params = {} - - # Get the values for the parameters - for parameter in self.parameters: - if parameter.value: - params.update({parameter.name: parameter.value}) - - # Now replace the strings in the equation to evaluate it using numexpr - eval_string = self.equation - for key, value in {**kwargs, **params}.items(): - - eval_string = eval_string.replace(key, str(value)) - - return numexpr.evaluate(eval_string).tolist() - - # ! Getters - - def getParameter(self, name: str) -> KineticParameter: - """Returns a parameter of choice from the model. - - Args: - name (str): Name of the parameter. - - Raises: - KeyError: If the parameter does not exist. - - Returns: - KineticParameter: The desired parameter. - """ - - try: - return next(filter(lambda parm: parm.name == name, self.parameters)) - except StopIteration: - raise KeyError(f"Parameter {name} not found in the model.") - - @deprecated_getter("equation") - def getEquation(self): - return self.equation - - @deprecated_getter("parameters") - def getParameters(self): - return self.parameters - - @deprecated_getter("name") - def getName(self): - return self.name - - -class ModelFactory: - - equation: str - parameters: List[str] - name: str - - def __init__( - self, name: str, equation: str, ontology: Optional[SBOTerm] = None, **parameters - ) -> None: - - # Parse the eqation and get all names and variables - self.variables = self.parse_equation(equation) - - # Initialize the model - self.model = KineticModel(name=name, equation=equation, ontology=None) - - for name, options in parameters.items(): - - # Remove parameter from variables - self.variables.remove(name) - - # Get all teh options for the parameter - init_value = options.get("init_value") - value = options.get("value") - unit = options.get("unit") - ontology = options.get("ontology") - stdev = options.get("stdev") - upper = options.get("upper") - lower = options.get("lower") - constant = options.get("constant") - - # Convert constant to bool if not set - if not constant: - constant = False - - parameter = KineticParameter( - name=name, - value=value, - unit=unit, - initial_value=init_value, - stdev=stdev, - ontology=ontology, - upper=upper, - lower=lower, - is_global=False, - constant=constant, - ) - - self.model.parameters.append(parameter) - - def __call__(self, mapping: dict = {}, **variables) -> KineticModel: - """Returns a KineticModel that is suited for the given parameters.""" - - # Copy the internal object and modify it to the needs - model = KineticModel(**self.model.dict()) - - # Replace everything - for stock_variable in self.variables: - - try: - identifier = variables[stock_variable] - - if isinstance(identifier, list): - # Allow multiple species - identifier = [repr(name) for name in identifier] - identifier = f"({' * '.join(identifier)})" - else: - identifier = repr(identifier) - - model.equation = model.equation.replace(stock_variable, identifier) - - except KeyError: - raise KeyError( - f"Variable {stock_variable} has not been given. Please make sure to cover all variables: [{repr(self.variables)}]" - ) - - # Apply mapping - if mapping: - self._apply_mapping(mapping, model) - - return model - - def _apply_mapping(self, mapping: dict, model: KineticModel): - """Applies a mapping that has been given to the model.""" - - for param_old, param_new in mapping.items(): - model.equation = model.equation.replace(param_old, param_new) - - # Variable to control when a parameter has found - found = False - - for index, parameter in enumerate(model.parameters): - if parameter.name == param_old: - - # Copy old and add new parameter - nu_param = parameter.copy() - nu_param.name = param_new - model.parameters.append(nu_param) - - found = True - - # Remove old one - del model.parameters[index] - continue - - if not found: - raise KeyError(f"Parameter {param_old} is not part of the model.") - - @staticmethod - def parse_equation(equation: str): - return list( - set( - [ - node.id - for node in ast.walk(ast.parse(equation)) - if isinstance(node, ast.Name) - ] - ) - ) diff --git a/pyenzyme/enzymeml/models/michaelismenten.py b/pyenzyme/enzymeml/models/michaelismenten.py deleted file mode 100644 index 8ff3858..0000000 --- a/pyenzyme/enzymeml/models/michaelismenten.py +++ /dev/null @@ -1,107 +0,0 @@ -# File: michaelismenten.py -# Project: models -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2021 Institute of Biochemistry and Technical Biochemistry Stuttgart - -from typing import Any, Dict -from pyenzyme.enzymeml.core.ontology import SBOTerm -from pyenzyme.enzymeml.models.kineticmodel import ModelFactory -from pyenzyme.enzymeml.core.exceptions import SpeciesNotFoundError - - -def MichaelisMentenKCat( - substrate: str, - protein: str, - enzmldoc, - k_cat: Dict[str, Any] = {"ontology": SBOTerm.K_CAT}, - k_m: Dict[str, Any] = {"ontology": SBOTerm.K_M}, -): - """Sets up a rate law following the Henri-Michaelis-Menten law. - - v = k_cat * protein * substrate / (k_m + substrate) - - Args: - substrate (str): Identifier or name of the substrate. - protein (str): Identifier or name of the protein. - enzmldoc ([type]): EnzymeML document to which the model will be adopted. - k_cat (Dict[str, Any], optional): Dictionary for parameter config. See KineticParameter class for details. Defaults to {"ontology": SBOTerm.K_CAT}. - k_m (Dict[str, Any], optional): Dictionary for parameter config. See KineticParameter class for details. Defaults to {"ontology": SBOTerm.K_CAT}. - - Returns: - KineticModel: Michaelis-Menten model in K_cat form with the specified parameters. - """ - # Check if the given IDs are part of the EnzymeML document already - if substrate not in enzmldoc.getSpeciesIDs(): - raise SpeciesNotFoundError( - species_id=substrate, enzymeml_part="Reactants/Proteins" - ) - - if protein not in enzmldoc.getSpeciesIDs(): - raise SpeciesNotFoundError( - species_id=protein, enzymeml_part="Reactants/Proteins" - ) - - # Check if ontologies are added, if not add them - if k_m.get("ontology") is None: - k_m["ontology"] = SBOTerm.K_M - - if k_cat.get("ontology") is None: - k_cat["ontology"] = SBOTerm.K_CAT - - # Create the model using a factory - model = ModelFactory( - name="Michaelis-Menten Rate Law", - equation="k_cat * protein * substrate / (k_m + substrate)", - k_cat=k_cat, - k_m=k_m, - ontology=SBOTerm.MICHAELIS_MENTEN, - ) - - return model(protein=protein, substrate=substrate) - - -def MichaelisMentenVMax( - substrate: str, - enzmldoc, - vmax: Dict[str, Any] = {"ontology": SBOTerm.V_MAX}, - k_m: Dict[str, Any] = {"ontology": SBOTerm.K_M}, -): - """Sets up a rate law following the Henri-Michaelis-Menten law. - - v = vmax * substrate / (k_m + substrate) - - Args: - substrate (str): Identifier or name of the substrate. - protein (str): Identifier or name of the protein. - enzmldoc ([type]): EnzymeML document to which the model will be adopted. - k_cat (Dict[str, Any], optional): Dictionary for parameter config. See KineticParameter class for details. Defaults to {"ontology": SBOTerm.K_CAT}. - k_m (Dict[str, Any], optional): Dictionary for parameter config. See KineticParameter class for details. Defaults to {"ontology": SBOTerm.K_CAT}. - - Returns: - KineticModel: Michaelis-Menten model in K_cat form with the specified parameters. - """ - - # Check if the given IDs are part of the EnzymeML document already - if substrate not in enzmldoc.getSpeciesIDs(): - raise SpeciesNotFoundError( - species_id=substrate, enzymeml_part="Reactants/Proteins" - ) - - # Check if ontologies are added, if not add them - if k_m.get("ontology") is None: - k_m["ontology"] = SBOTerm.K_M - - if vmax.get("ontology") is None: - vmax["ontology"] = SBOTerm.V_MAX - - # Create the model using a factory - model = ModelFactory( - name="Michaelis-Menten Rate Law", - equation="vmax * substrate / (k_m + substrate)", - vmax=vmax, - k_m=k_m, - ontology=SBOTerm.MICHAELIS_MENTEN, - ) - - return model(substrate=substrate) diff --git a/pyenzyme/enzymeml/tools/__init__.py b/pyenzyme/enzymeml/tools/__init__.py deleted file mode 100644 index cbd15f1..0000000 --- a/pyenzyme/enzymeml/tools/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -File: __init__.py -Project: tools -Author: Jan Range -License: BSD-2 clause ------ -Last Modified: Tuesday June 22nd 2021 10:15:24 pm -Modified By: Jan Range () ------ -Copyright (c) 2021 Institute of Biochemistry and Technical Biochemistry Stuttgart -""" - -from pyenzyme.enzymeml.tools.enzymemlwriter import EnzymeMLWriter -from pyenzyme.enzymeml.tools.unitparser import UnitParser -from pyenzyme.enzymeml.tools.unitcreator import UnitCreator -from pyenzyme.enzymeml.tools.templatereader import read_template -from pyenzyme.enzymeml.tools.validator import EnzymeMLValidator diff --git a/pyenzyme/enzymeml/tools/enzymemlreader.py b/pyenzyme/enzymeml/tools/enzymemlreader.py deleted file mode 100644 index c02aed6..0000000 --- a/pyenzyme/enzymeml/tools/enzymemlreader.py +++ /dev/null @@ -1,939 +0,0 @@ -# File: enzymemlreader.py -# Project: tools -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -import os -import re -from typing import Dict, List, Tuple, Union, Optional -import libsbml -import xml.etree.ElementTree as ET -import pandas as pd -import tempfile - -from pyenzyme.enzymeml.core.creator import Creator -from pyenzyme.enzymeml.core.enzymemldocument import EnzymeMLDocument -from pyenzyme.enzymeml.core.protein import Protein -from pyenzyme.enzymeml.core.complex import Complex -from pyenzyme.enzymeml.core.reactant import Reactant -from pyenzyme.enzymeml.core.replicate import Replicate -from pyenzyme.enzymeml.core.unitdef import UnitDef -from pyenzyme.enzymeml.core.vessel import Vessel -from pyenzyme.enzymeml.core.measurement import Measurement -from pyenzyme.enzymeml.core.enzymereaction import EnzymeReaction, ReactionElement -from pyenzyme.enzymeml.models.kineticmodel import KineticModel, KineticParameter -from pyenzyme.enzymeml.core.ontology import DataTypes, EnzymeMLPart, SBOTerm -from pyenzyme.enzymeml.core.abstract_classes import ( - AbstractSpeciesFactory, - AbstractSpecies, -) - -from libsbml import SBMLReader -from libcombine import CombineArchive -from io import StringIO - -# ! Factories - - -class ReactantFactory(AbstractSpeciesFactory): - """Returns an un-initialized reactant species object""" - - enzymeml_part: str = "reactant_dict" - - def get_species(self, **kwargs) -> AbstractSpecies: - reactant = Reactant(**kwargs) - reactant._unit_id = kwargs["_unit_id"] - return reactant - - -class ProteinFactory(AbstractSpeciesFactory): - """Returns an un-initialized protein species object""" - - enzymeml_part: str = "protein_dict" - - def get_species(self, **kwargs) -> AbstractSpecies: - protein = Protein(**kwargs) - protein._unit_id = kwargs["_unit_id"] - return protein - - -class ComplexFactory(AbstractSpeciesFactory): - """Returns an un-initialized complex species object""" - - enzymeml_part: str = "complex_dict" - - def get_species(self, **kwargs) -> AbstractSpecies: - complex = Complex(**kwargs) - complex._unit_id = kwargs["_unit_id"] - return complex - - -def species_factory_mapping(sbo_term: str) -> AbstractSpeciesFactory: - """Maps from SBOTerms to the appropriate species using a factory""" - - # Get the enum entity for the mapping - entity = EnzymeMLPart.entityFromSBOTerm(sbo_term) - - factory_mapping = { - "PROTEIN": ProteinFactory(), - "SMALL_MOLECULE": ReactantFactory(), - "ION": ReactantFactory(), - "RADICAL": ReactantFactory(), - "MACROMOLECULAR_COMPLEX": ComplexFactory(), - "PROTEIN_COMPLEX": ComplexFactory(), - "DIMER": ComplexFactory(), - } - - return factory_mapping[entity] - - -class EnzymeMLReader: - def readFromFile(self, path: str) -> EnzymeMLDocument: - """ - Reads EnzymeML document to an object layer EnzymeMLDocument class. - - Args: - path (str): Path to .omex container or - folder destination for plain .xml - """ - - if not path.endswith(".omex"): - raise TypeError( - f"File {os.path.basename(path)} is not a valid OMEX archive" - ) - - # Read omex archive - self.path = path - self.archive = CombineArchive() - self.archive.initializeFromArchive(self.path) - - content = self.archive.extractEntryToString("./experiment.xml") - desc = self.archive.getMetadataForLocation("./experiment.xml") - - # Get previous logs - log = self.archive.extractEntryToString("./history.log") - - # Read experiment file (sbml) - reader = SBMLReader() - document = reader.readSBMLFromString(content) - document.getErrorLog().printErrors() - model = document.getModel() - - # Initialize EnzymeMLDocument object - self.enzmldoc = EnzymeMLDocument( - name=model.getName(), level=model.getLevel(), version=model.getVersion() - ) - - # Add logs to the document - self.enzmldoc.log = log - - # Fetch references - self._getRefs(model, self.enzmldoc) - - # Fetch Creators - self._getCreators(omex_desc=desc, enzmldoc=self.enzmldoc) - - # try: - # # TODO extract VCard - # model_hist = model.getModelHistory() - # enzmldoc.setCreated( - # model_hist.getCreatedDate().getDateAsString() - # ) - - # enzmldoc.setModified( - # model_hist.getModifiedDate().getDateAsString() - # ) - - # Fetch units - unitDict = self._getUnits(model) - self.enzmldoc._unit_dict = unitDict - - # Fetch Vessel - vessel = self._getVessel(model, self.enzmldoc) - self.enzmldoc.vessel_dict = vessel - - # Fetch Species - protein_dict, reactant_dict, complex_dict = self._getSpecies( - model, self.enzmldoc - ) - - self.enzmldoc.reactant_dict = reactant_dict - self.enzmldoc.protein_dict = protein_dict - self.enzmldoc.complex_dict = complex_dict - - # fetch global parameters - self._getGlobalParameters(model, self.enzmldoc) - - # fetch reaction - reaction_dict = self._getReactions(model, self.enzmldoc) - self.enzmldoc.reaction_dict = reaction_dict - - # fetch Measurements - measurement_dict = self._getData(model, self.enzmldoc) - self.enzmldoc.measurement_dict = measurement_dict - - # fetch added files - self._getFiles(self.enzmldoc) - - del self.path - - return self.enzmldoc - - @staticmethod - def _sboterm_to_enum(sbo_term: int) -> Optional[SBOTerm]: - try: - sbo_string: str = libsbml.SBO.intToString(sbo_term) - - if len(sbo_string) == 0: - return None - - return SBOTerm(sbo_string) - - except ValueError: - return None - - def _getRefs(self, model, enzmldoc): - - if len(model.getAnnotationString()) == 0: - return - - root = ET.fromstring(model.getAnnotationString())[0] - - for element in root: - if "doi" in element.tag: - enzmldoc.doi = element.text - elif "pubmedID" in element.tag: - enzmldoc.pubmedid = element.text - elif "url" in element.tag: - enzmldoc.url = element.text - - def _getCreators(self, omex_desc, enzmldoc) -> None: - """Fetches all creators from an Combine archive's metadata. - - Args: - omex_desc (OMEX obj): Combine metadata description. - - Returns: - List[Creator]: Fetched list of creator objects. - """ - - # Get the number of creators to iterate - numCreators = omex_desc.getNumCreators() - - for i in range(numCreators): - # Fetch creator information - creator = omex_desc.getCreator(i) - - enzmldoc.addCreator( - Creator( - family_name=creator.getFamilyName(), - given_name=creator.getGivenName(), - mail=creator.getEmail(), - ), - log=False, - ) - - def _getUnits(self, model: libsbml.Model) -> Dict[str, UnitDef]: - """Fetches all the units present in the SBML model.^ - - Args: - model (libsbml.Model): The SBML model from which the units are fetched. - - Returns: - [type]: [description] - """ - - unitDict = {} - unitdef_list = model.getListOfUnitDefinitions() - - for unit in unitdef_list: - - # Get infos from the SBML model - name = unit.name - id = unit.id - meta_id = unit.meta_id - ontology = None # TODO get unit ontology - - # Create unit definition - unitdef = UnitDef(name=name, id=id, ontology=ontology, meta_id=meta_id) - - for baseunit in unit.getListOfUnits(): - # Construct unit definition with base units - unitdef.addBaseUnit( - kind=baseunit.toXMLNode().getAttrValue("kind"), - exponent=baseunit.getExponentAsDouble(), - scale=baseunit.getScale(), - multiplier=baseunit.getMultiplier(), - ) - - # Finally add the unit definition - unitDict[id] = unitdef - - return unitDict - - def _getVessel( - self, model: libsbml.Model, enzmldoc: "EnzymeMLDocument" - ) -> Dict[str, Vessel]: - """Fetches all the vessels/compartments present in the SBML model. - - Args: - model (libsbml.Model): The SBML model from which the vessels are fetched. - - Returns: - Dict[str, Vessel]: Corresponding vessel dictionary that has been converted. - """ - - vessel_dict = {} - compartments = model.getListOfCompartments() - - for compartment in compartments: - name = compartment.getName() - id = compartment.getId() - - # Set up dictionary for optional attributes - params = {} - - if compartment.isSetVolume(): - params["volume"] = compartment.getSize() - params["_unit_id"] = compartment.getUnits() - params["unit"] = enzmldoc.getUnitString(params["_unit_id"]) - - vessel = Vessel(name=name, id=id, **params) - - vessel._unit_id = params.get("_unit_id") - vessel._enzmldoc = self.enzmldoc - - vessel_dict[vessel.id] = vessel - - return vessel_dict - - def _getSpecies( - self, model: libsbml.Model, enzmldoc: "EnzymeMLDocument" - ) -> Tuple[Dict[str, Protein], Dict[str, Reactant], Dict[str, Complex]]: - - # initialize dictionaries and get species - protein_dict = {} - reactant_dict = {} - complex_dict = {} - species_list = model.getListOfSpecies() - - for species in species_list: - - # Check if init conc is given - init_conc = species.getInitialConcentration() - unit_id = species.getSubstanceUnits() - - if repr(init_conc) == "nan": - # Handle not existent init concs - init_conc = None - - if unit_id: - # Get unit string if given - unit = enzmldoc.getUnitString(unit_id) - else: - unit = None - - # Get SBOTerm, but if there is none, give default - ontology = self._sboterm_to_enum(species.getSBOTerm()) - - # Parse annotations and construct a kwargs dictionary - param_dict = self._parseSpeciesAnnotation(species.getAnnotationString()) - param_dict.update( - { - "id": species.getId(), - "meta_id": species.getMetaId(), - "vessel_id": species.getCompartment(), - "name": species.getName(), - "constant": species.getConstant(), - "ontology": ontology, - "init_conc": init_conc, - "_unit_id": unit_id, - "unit": unit, - # Some attributes need special care - "ecnumber": param_dict.get("e_cnumber"), - "uniprotid": param_dict.get("uniprot_id"), - "participants": param_dict.get("participant"), - } - ) - - # Get species factory from ontology - try: - # Current version uses SBOTerms to distinguish between entities - species_factory = species_factory_mapping(param_dict["ontology"]) - except ValueError: - # Backwards compatibility to old documents that do not incorporate SBOTerms - if param_dict["id"].startswith("s"): - species_factory = species_factory_mapping( - SBOTerm.SMALL_MOLECULE.value - ) - - # Remove ontology to get the default - param_dict.pop("ontology") - - elif param_dict["id"].startswith("p"): - species_factory = species_factory_mapping(SBOTerm.PROTEIN.value) - - # Remove ontology to get the default - param_dict.pop("ontology") - else: - raise ValueError( - f"ID {param_dict['id']} is not supported. Please use either of these 'p|s|c'" - ) - - # Use factory to get the species class - species = species_factory.get_species(**param_dict) - species._enzmldoc = self.enzmldoc - - if species_factory.enzymeml_part == "protein_dict": - protein_dict[species.id] = species - elif species_factory.enzymeml_part == "reactant_dict": - reactant_dict[species.id] = species - elif species_factory.enzymeml_part == "complex_dict": - complex_dict[species.id] = species - - return protein_dict, reactant_dict, complex_dict - - @staticmethod - def _parseSpeciesAnnotation(annotationString): - - if len(annotationString) == 0: - return dict() - - def camel_to_snake(name): - name = re.sub("(.)([A-Z][a-z]+)", r"\1_\2", name) - return re.sub("([a-z0-9])([A-Z])", r"\1_\2", name).lower() - - speciesAnnot = ET.fromstring(annotationString)[0] - - # Initialize annotation dictionary - param_dict = {} - - for enzymeMLAnnot in speciesAnnot: - key = enzymeMLAnnot.tag.split("}")[-1] - key = camel_to_snake(key) - attribute = enzymeMLAnnot.text - - if key in param_dict: - # Take care of list attributes - try: - param_dict[key].append(attribute) - except AttributeError: - param_dict[key] = [param_dict[key], attribute] - - continue - - param_dict[key] = attribute - - return param_dict - - def _getGlobalParameters(self, model: libsbml.Model, enzmldoc): - """Fetches global parameters from the SBML model""" - - parameters = model.getListOfParameters() - - for parameter in parameters: - parameter = self._parse_parameter(parameter, enzmldoc) - parameter.is_global = True - parameter._enzmldoc = self.enzmldoc - - enzmldoc.global_parameters[parameter.name] = parameter - - def _getReactions( - self, model: libsbml.Model, enzmldoc: "EnzymeMLDocument" - ) -> Dict[str, EnzymeReaction]: - - # Get SBML list of reactions - reactionsList = model.getListOfReactions() - - # Initialize reaction dictionary - reaction_dict = {} - - # parse annotations and filter replicates - for reaction in reactionsList: - - # Fetch conditions - if reaction.getAnnotationString(): - reactionAnnot = ET.fromstring(reaction.getAnnotationString())[0] - conditions = self._parseConditions(reactionAnnot, enzmldoc) - else: - conditions = {} - - # Fetch Elements in SpeciesReference - educts = self._getElements( - reaction.getListOfReactants(), ontology=SBOTerm.SUBSTRATE - ) - - products = self._getElements( - reaction.getListOfProducts(), ontology=SBOTerm.PRODUCT - ) - - modifiers = self._getElements( - reaction.getListOfModifiers(), modifiers=True, ontology=SBOTerm.CATALYST - ) - - # Get the ontology - ontology = self._sboterm_to_enum(reaction.getSBOTerm()) - - if ontology is None: - ontology = SBOTerm.BIOCHEMICAL_REACTION - - # Create object - enzyme_reaction = EnzymeReaction( - id=reaction.id, - meta_id="META_" + reaction.id.upper(), - name=reaction.name, - reversible=reaction.reversible, - educts=educts, - products=products, - modifiers=modifiers, - ontology=ontology, - **conditions, - ) - - # Check for kinetic model - if reaction.getKineticLaw(): - # Check if model exists - kinetic_law = reaction.getKineticLaw() - kinetic_model = self._getKineticModel(kinetic_law, enzmldoc) - enzyme_reaction.model = kinetic_model - - # Add global parameters - for name, global_parameter in enzmldoc.global_parameters.items(): - # Keep a reference to the global paremeter - if name in enzyme_reaction.model.equation: - enzyme_reaction.model.parameters.append(global_parameter) - - # Add reaction to reaction_dict - enzyme_reaction._enzmldoc = self.enzmldoc - reaction_dict[enzyme_reaction.id] = enzyme_reaction - - return reaction_dict - - @staticmethod - def _parseConditions( - reactionAnnot: ET.Element, enzmldoc: "EnzymeMLDocument" - ) -> Dict[str, Union[str, float]]: - """Exracts the conditions present in the SBML reaction annotations. - Args: - reactionAnnot (ET.Element): The reaction annotation element. - enzmldoc (EnzymeMLDocument): The EnzymeMLDocument against which the data will be validated. - Returns: - Dict[str, Union[str, float]]: Mapping for the conditions. - """ - - # Get the conditions element - conditions = reactionAnnot[0] - condition_dict = {} - - for condition in conditions: - # Sort all the conditions - if "temperature" in condition.tag: - - # Get temperature conditions - condition_dict["temperature"] = float(condition.attrib["value"]) - - # Parse unit ID to Unit string - condition_dict["_temperature_unit_id"] = condition.attrib["unit"] - condition_dict["temperature_unit"] = enzmldoc.getUnitString( - condition_dict["_temperature_unit_id"] - ) - - elif "ph" in condition.tag: - - # Get the pH value - condition_dict["ph"] = float(condition.attrib["value"]) - - return condition_dict - - def _getElements( - self, - species_refs: List[libsbml.SpeciesReference], - ontology: SBOTerm, - modifiers: bool = False, - ) -> List[ReactionElement]: - """Extracts the speciesReference objects from the associated list and converts them to ReactionElements - - Args: - species_refs (List[libsbml.SpeciesReference]): The species refrences for the reaction <-> Chemical reaction elements. - modifiers (bool, optional): Used to override missing stoichiometry and constant for modifiers. Defaults to False. - - Returns: - List[ReactionElement]: The list of reaction elements. - """ - - reaction_elements = [] - for species_ref in species_refs: - - species_id = species_ref.getSpecies() - stoichiometry = 1.0 if modifiers else species_ref.getStoichiometry() - constant = True if modifiers else species_ref.getConstant() - sbo_term = libsbml.SBO.intToString(species_ref.getSBOTerm()) - - if sbo_term: - ontology = SBOTerm(sbo_term) - - reaction_elements.append( - ReactionElement( - species_id=species_id, - stoichiometry=stoichiometry, - constant=constant, - ontology=ontology, - ) - ) - - return reaction_elements - - def _getKineticModel( - self, kineticLaw: libsbml.KineticLaw, enzmldoc: "EnzymeMLDocument" - ) -> KineticModel: - """Extracts a kinetic rate law from the SBML data model. - - Args: - kineticLaw (libsbml.KineticLaw): The kinetic law to be extracted. - enzmldoc (EnzymeMLDocument): The EnzymeMLDocument to which the kinetic law will be added. - - Returns: - KineticModel: Teh resulting kinetic model. - """ - - # Extract metadata - name = kineticLaw.getName() - equation = kineticLaw.getFormula() - ontology = self._sboterm_to_enum(kineticLaw.getSBOTerm()) - - # Get local parameters - parameters = [] - for local_param in kineticLaw.getListOfLocalParameters(): - - parameter = self._parse_parameter(local_param, enzmldoc) - - if parameter.name in enzmldoc.global_parameters: - parameters.append(enzmldoc.global_parameters[parameter.name]) - else: - parameters.append(parameter) - - return KineticModel( - name=name, equation=equation, parameters=parameters, ontology=ontology - ) - - def _parse_parameter(self, parameter, enzmldoc): - """Parses a paramater and converts it to a KineticParameter instance""" - - # TODO refactor here - - value = parameter.getValue() - unit_id = parameter.getUnits() - - annotation = parameter.getAnnotationString() - param_dict = self._parseSpeciesAnnotation(annotation) - - if unit_id: - param_dict["unit"] = enzmldoc.getUnitString(unit_id) - - if parameter.__class__.__name__ == "LocalParameter": - constant = False - else: - constant = parameter.getConstant() - - if repr(parameter.getValue()) == "nan": - value = None - - nu_param = KineticParameter( - name=parameter.getId(), - value=value, - unit=param_dict.get("unit"), - ontology=self._sboterm_to_enum(parameter.getSBOTerm()), - initial_value=param_dict.get("initial_value"), - upper=param_dict.get("upper_bound"), - lower=param_dict.get("lower_bound"), - stdev=param_dict.get("stdev"), - constant=constant, - ) - - nu_param._enzmldoc = self.enzmldoc - - if unit_id: - nu_param._unit_id = parameter.getUnits() - - return nu_param - - def _getData( - self, model: libsbml.Model, enzmldoc: "EnzymeMLDocument" - ) -> Dict[str, Measurement]: - """Retrieves all available measurements found in the EnzymeML document. - - Args: - model (libsbml.Model): The SBML model from which the measurements are feteched, - - Returns: - Dict[str, Measurement]: Mapping from measurement ID to the associated object. - """ - - # Parse EnzymeML:format annotation - reactions = model.getListOfReactions() - annotation_string = reactions.getAnnotationString() - - # Guard clause for when there is no data - if annotation_string == "": - return {} - - # Parse annotation to an ElementTree - data_annotation = ET.fromstring(annotation_string)[0] - - # Fetch measurements - measurement_dict, measurement_files = self._parseListOfMeasurements( - data_annotation, enzmldoc=enzmldoc - ) - - # Iterate over measurements and assign replicates - for measurement_id, measurement_file in measurement_files.items(): - - # Fetch list of files - files = self._parseListOfFiles(data_annotation) - - # Fetch formats - formats = self._parseListOfFormats(data_annotation) - - # Get file content - fileInfo = files[measurement_file] - file_content = self.archive.extractEntryToString(fileInfo["file"]) - csvFile = pd.read_csv(StringIO(file_content), header=None) - - # Get format data and extract time column - measurement_format = formats[fileInfo["format"]] - time, time_unit_id = [ - (csvFile.iloc[:, int(column["index"])].tolist(), column["unit"]) - for column in measurement_format - if column["type"] == "time" - ][0] - - measurement_dict[measurement_id]._global_time_unit_id = time_unit_id - - # Create replicate objects - for format in measurement_format: - - if format["type"] != "time": - - # Get time course data - data = csvFile.iloc[:, int(format["index"])].tolist() - reactant_id = format["species"] - replicate_id = format["replica"] - data_type = DataTypes(format["type"]) - data_unit_id = format["unit"] - is_calculated = format["isCalculated"] - - replicate = Replicate( - id=replicate_id, - species_id=reactant_id, - data_type=data_type, - measurement_id=measurement_id, - data_unit=enzmldoc._unit_dict[data_unit_id].name, - time_unit=enzmldoc._unit_dict[time_unit_id].name, - data=data, - time=time, - is_calculated=is_calculated, - ) - - replicate._data_unit_id = data_unit_id - replicate._time_unit_id = time_unit_id - replicate._enzmldoc = self.enzmldoc - - measurement_dict[measurement_id].addReplicates( - replicate, log=False, enzmldoc=enzmldoc - ) - - return measurement_dict - - def _parseListOfFiles( - self, data_annotation: ET.Element - ) -> Dict[str, Dict[str, str]]: - """Extracts the list of files that are present in the annotation enzymeml:files. - - Args: - data_annotation (ET.Element): ElementTree object containing the enzymeml:files annotation. - - Returns: - Dict[str, Dict[str, str]]: Dictionary of all files present in the annotation. - """ - - return { - file.attrib["id"]: { - "file": file.attrib["file"], - "format": file.attrib["format"], - "id": file.attrib["id"], - } - for file in self._get_element(data_annotation, "files") - } - - def _parseListOfFormats(self, data_annotation: ET.Element) -> Dict[str, List[dict]]: - """Extracts the list of formats that areb present in the annotation enzymeml:formats. - - Args: - data_annotation (ET.Element): ElementTree object containing the enzymeml:files annotation. - - Returns: - Dict[str, List[dict]]: Dictionary of all the formats present in the annotation. - """ - - return { - format.attrib["id"]: [column.attrib for column in format] - for format in self._get_element(data_annotation, "formats") - } - - def _parseListOfMeasurements( - self, data_annotation: ET.Element, enzmldoc: "EnzymeMLDocument" - ) -> Tuple[Dict[str, Measurement], dict]: - """Extracts teh list of measurements that are present in the annotation enzymeml:measurements. - - Args: - data_annotation (ET.Element): ElementTree object containing the enzymeml:measurements annotation. - - Returns: - tuple[Dict[str, dict], Dict[str, Measurement]]: Two dictionaries returning the measurement objects and files. - """ - - measurements = self._get_element(data_annotation, "listOfMeasurements") - - if measurements is None: - # There was a typo and it should be catched here - measurements = self._get_element(data_annotation, "listOfMasurements") - - measurement_files = { - measurement.attrib["id"]: measurement.attrib["file"] - for measurement in measurements - if measurement.attrib.get("file") - } - measurement_dict = { - measurement.attrib["id"]: self._parseMeasurement( - measurement, enzmldoc=enzmldoc - ) - for measurement in measurements - } - - return (measurement_dict, measurement_files) - - def _parseMeasurement( - self, measurement: ET.Element, enzmldoc: "EnzymeMLDocument" - ) -> Measurement: - """Extracts individual initial concentrations of a measurement. - - Args: - measurement (ET.Element): Measurement XML information - - Returns: - Measurement: Initialized measurement object. - """ - - # Get conditions (temp, ph) - temperature = measurement.attrib.get("temperature_value") - temperature_unit = measurement.attrib.get("temperature_unit") - ph = measurement.attrib.get("ph") - - # Get the unit string of temp if given - if temperature_unit: - temperature_unit = enzmldoc.getUnitString(temperature_unit) - - # initialize Measurement object - measurement_object = Measurement( - name=measurement.attrib["name"], - temperature=temperature, - temperature_unit=temperature_unit, - ph=ph, - ) - - measurement_object.id = measurement.attrib["id"] - temperature_unit_id = measurement.attrib.get("temperature_unit") - measurement_object._temperature_unit_id = temperature_unit_id - measurement_object._enzmldoc = self.enzmldoc - - for init_conc_element in measurement: - - params, unit_id = self._parse_init_conc_element(init_conc_element, enzmldoc) - measurement_object.addData(**params, log=False) - - if params["reactant_id"]: - meas_data = measurement_object.getReactant(params["reactant_id"]) - elif params["protein_id"]: - meas_data = measurement_object.getProtein(params["protein_id"]) - else: - raise ValueError("Neither 'reactant_id' nor 'protein_id' are defined") - - meas_data._unit_id = unit_id - meas_data._enzmldoc = self.enzmldoc - - return measurement_object - - @staticmethod - def _parse_init_conc_element(element: ET.Element, enzmldoc): - """Parses initial concentration data of a measurement. - - Args: - element (ET.Element): Element containing information about the initial concentration and species. - - Raises: - KeyError: If there is neither a protein nor reactant ID. - """ - - value = float(element.attrib["value"]) - - # Convert the unit ID to the corresponding SI string - unit_id = element.attrib["unit"] - unit = enzmldoc._unit_dict[unit_id].name - - reactant_id = None - protein_id = None - - if "reactant" in element.attrib.keys(): - reactant_id = element.attrib["reactant"] - elif "protein" in element.attrib.keys(): - protein_id = element.attrib["protein"] - else: - raise KeyError("Neither reactant or protein ID defined.") - - return { - "init_conc": float(value), - "unit": unit, - "reactant_id": reactant_id, - "protein_id": protein_id, - }, unit_id - - @staticmethod - def _get_element(tree: ET.Element, name: str): - for element in tree.iter("*"): - if name.lower() in element.tag.lower(): - return element - - return None - - def _getFiles(self, enzmldoc): - """Extracts all added files fro the archive. - - Args: - archive (CombineArchive): The OMEX archive to extract files from. - enzmldoc (EnzymeMLDocument): The EnzymeMLDocument to add files to. - """ - - # Iterate over enries and extract files - for file_location in self.archive.getAllLocations(): - file_location = str(file_location) - - if "./files/" in file_location: - - # Convert raw file to file_handle - file_handle = tempfile.NamedTemporaryFile() - file_handle.name = os.path.basename(file_location) - - # Write file to temporary file - path = f"./{file_handle.name}" - self.archive.extractEntry(file_location, path) - - with open(path, "rb") as f: - file_handle.write(f.read()) - file_handle.seek(0) - - # Add the file to the EnzymeMLDocument - enzmldoc.addFile(file_handle=file_handle) - - # Remove the temporary file - os.remove(path) diff --git a/pyenzyme/enzymeml/tools/enzymemlwriter.py b/pyenzyme/enzymeml/tools/enzymemlwriter.py deleted file mode 100644 index 27d5569..0000000 --- a/pyenzyme/enzymeml/tools/enzymemlwriter.py +++ /dev/null @@ -1,1031 +0,0 @@ -# File: enzymemlwriter.py -# Project: tools -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -import pandas as pd -import os -import shutil -import libsbml -import tempfile -import logging -import warnings - -from libsbml import ( - SBMLDocument, - XMLNode, - XMLTriple, - XMLAttributes, - XMLNamespaces, - SBMLWriter, -) - -from typing import Dict, List, Callable, Optional -from libcombine import CombineArchive, OmexDescription, KnownFormats, VCard - -from pyenzyme.enzymeml.core.unitdef import UnitDef -from pyenzyme.enzymeml.core.vessel import Vessel -from pyenzyme.enzymeml.core.abstract_classes import AbstractSpecies -from pyenzyme.enzymeml.core.protein import Protein -from pyenzyme.enzymeml.core.reactant import Reactant -from pyenzyme.enzymeml.core.replicate import Replicate -from pyenzyme.enzymeml.core.measurement import Measurement -from pyenzyme.enzymeml.core.measurementData import MeasurementData -from pyenzyme.enzymeml.core.enzymereaction import EnzymeReaction, ReactionElement -from pyenzyme.enzymeml.models.kineticmodel import KineticModel, KineticParameter - -# Initialize the logger -logger = logging.getLogger("pyenzyme") - - -class EnzymeMLWriter: - def __init__(self): - self.namespace = "http://sbml.org/enzymeml/version2" - - def toFile(self, enzmldoc, path: str, name: Optional[str] = None): - """ - Writes EnzymeMLDocument object to an .omex container - - Args: - enzmldoc (String): Previously created instance of an EnzymeML document - path (String): EnzymeML file is written to this destination - name (String): Name of the target EnzymeML file. Defaults to 'None' and thus uses the doc name. - - """ - - self.path = os.path.normpath(path) - self.enzmldoc = enzmldoc # TODO replace all static enzmldocs with self.enzmldoc - - try: - os.makedirs(os.path.join(self.path, "data")) - except FileExistsError: - pass - - doc = SBMLDocument() - doc.setLevelAndVersion(3, 2) - - model = doc.createModel() - model.setName(enzmldoc.name) - model.setId(enzmldoc.name) - - # Convert the SBML model to EnzymeML - self.convertEnzymeMLToSBML(model, enzmldoc) - - # Add data - paths = self._addData(model, enzmldoc.measurement_dict) - - # Write to EnzymeML - writer = SBMLWriter() - writer.writeSBMLToFile(doc, os.path.join(self.path, "experiment.xml")) - - # Validate the SBML document - self._validate_sbml_doc(document=doc) - - # Write to OMEX - self._createArchive(enzmldoc, paths, name) - - shutil.rmtree(os.path.join(self.path, "data"), ignore_errors=True) - - os.remove(os.path.join(self.path, "experiment.xml")) - - def toXMLString(self, enzmldoc): - """ - Converts EnzymeMLDocument to XML string. - - Args: - EnzymeMLDocument enzmldoc: Previously created instance of an - EnzymeML document - """ - doc = SBMLDocument() - doc.setLevelAndVersion(3, 2) - - model = doc.createModel() - model.setName(enzmldoc.name) - model.setId(enzmldoc.name) - - self.path = None - self.enzmldoc = enzmldoc - - # Convert the SBML model to EnzymeML - self.convertEnzymeMLToSBML(model, enzmldoc) - - # Add data - self._addData(model, enzmldoc.measurement_dict) - - # Write to EnzymeML - writer = SBMLWriter() - return writer.writeToString(doc) - - def toSBML(self, enzmldoc): - """ - Returns libSBML model. - - Args: - EnzymeMLDocument enzmldoc: Previously created instance of an - EnzymeML document - """ - - doc = SBMLDocument() - doc.setLevelAndVersion(3, 2) - - model = doc.createModel() - model.setName(enzmldoc.name) - model.setId(enzmldoc.name) - - # Convert the SBML model to EnzymeML - self.convertEnzymeMLToSBML(model, enzmldoc) - - return doc - - def convertEnzymeMLToSBML(self, model: libsbml.Model, enzmldoc): - """Manages the conversion of EnzymeML to SBML. - - Args: - model (libsbml.Model): The blank SBML model, where the EnzymeML document is converted to. - enzmldoc (EnzymeMLDocument): The EnzymeML document to be converted. - """ - - self._addRefs(model, enzmldoc) - self._addVessel(model, enzmldoc.vessel_dict) - self._addProteins(model, enzmldoc.protein_dict) - self._addComplex(model, enzmldoc.complex_dict) - self._addReactants(model, enzmldoc.reactant_dict) - self._addGlobalParameters(model, enzmldoc.global_parameters) - self._addReactions(model, enzmldoc.reaction_dict) - self._addUnits(model, enzmldoc._unit_dict) - - def _createArchive(self, enzmldoc, listofPaths, name: str = None): - - archive = CombineArchive() - - # add experiment file to archive - archive.addFile( - f"{self.path}/experiment.xml", - "./experiment.xml", - KnownFormats.lookupFormat("sbml"), - True, - ) - - # add logs to teh Archive - history_path = f"{self.path}/history.log" - try: - with open(history_path, "wb") as f: - f.write(enzmldoc.log.getvalue().encode("utf-8", "replace")) - - self.addFileToArchive( - archive=archive, - file_path=history_path, - target_path="./history.log", - format=KnownFormats.lookupFormat("txt"), - description="History of the EnzymeML document", - ) - except Exception as e: - logging.error("couldn't write history") - - # add metadata to the experiment file - location = "./experiment.xml" - description = OmexDescription() - description.setAbout(location) - description.setDescription("EnzymeML model") - description.setCreated(OmexDescription.getCurrentDateAndTime()) - - for creat in enzmldoc.creator_dict.values(): - creator = VCard() - creator.setFamilyName(creat.family_name) - creator.setGivenName(creat.given_name) - creator.setEmail(creat.mail) - description.addCreator(creator) - - archive.addMetadata(".", description) - archive.addMetadata(location, description) - - # Add CSV files to archive - for csvPath, file_path in listofPaths.items(): - - self.addFileToArchive( - archive=archive, - file_path=csvPath, - target_path=file_path, - format=KnownFormats.lookupFormat("csv"), - description="Time course data", - ) - - # Add files from fileDict - tmpFolder = None - if enzmldoc.file_dict: - # create temporary directory for files - tmpFolder = tempfile.mkdtemp() - - for fileDict in enzmldoc.file_dict.values(): - - file_handler = fileDict["handler"] - file_name = fileDict["name"] - fileDescription = fileDict["description"] - tmpPath = os.path.join(tmpFolder, file_name) - - # Write file locally and add it to the document - with open(tmpPath, "wb") as fileHandle: - fileHandle.write(file_handler.read()) - - self.addFileToArchive( - archive=archive, - file_path=tmpPath, - target_path=f"./files/{file_name}", - format=KnownFormats.guessFormat(file_name), - description=fileDescription, - ) - - if name: - out_file = f"{name.replace(' ', '_')}.omex" - else: - out_file = f"{enzmldoc.name.replace(' ', '_')}.omex" - - out_path = os.path.join(self.path, out_file) - - try: - os.remove(out_path) - except FileNotFoundError: - pass - - archive.writeToFile(out_path) - - # Remove temporary directory - if tmpFolder is not None: - shutil.rmtree(tmpFolder, ignore_errors=True) - - # Remove unused - os.remove(f"{self.path}/history.log") - - print(f"\nArchive was written to {out_path}\n") - - @staticmethod - def addFileToArchive(archive, file_path, target_path, format, description): - - # Add file to archive - archive.addFile(file_path, target_path, format, False) - - # Add metadata to the file - omexDesc = OmexDescription() - omexDesc.setAbout(target_path) - omexDesc.setDescription(description) - omexDesc.setCreated(OmexDescription.getCurrentDateAndTime()) - archive.addMetadata(target_path, omexDesc) - - def setupXMLNode(self, name, namespace=True): - # Helper function - # Creates an XML node - # for annotations - node = XMLNode(XMLTriple(name), XMLAttributes(), XMLNamespaces()) - - if namespace is True: - node.addNamespace(self.namespace, "enzymeml") - - return node - - @staticmethod - def appendAttribute(attributeName, value): - # Helper function - # creates XML node - # XYZ - value = XMLNode(value) - attributeNode = XMLNode( - XMLTriple(attributeName), XMLAttributes(), XMLNamespaces() - ) - - attributeNode.addChild(value) - - return attributeNode - - def appendMultiAttributes( - self, attributeName, object, objectMapping, annotationNode - ): - node = self.setupXMLNode(attributeName, namespace=False) - - for key, value in objectMapping.items(): - # "value" --> 10.00 - if hasattr(object, value): - - attribute = getattr(object, value) - if attribute: - node.addAttr(key, str(attribute)) - else: - return 0 - else: - return 0 - - annotationNode.addChild(node) - - def appendOptionalAttribute( - self, attributeName, object, objectName, annotationNode - ): - # Helper function - # Adds elements to annotation node - if object.__dict__.get(objectName): - value = self.appendAttribute( - attributeName, str(getattr(object, objectName)) - ) - annotationNode.addChild(value) - - def _addRefs(self, model: libsbml.Model, enzmldoc): - """Converts EnzymeMLDocument refrences to SBML. - - Args: - model (libsbml.Model): The SBML model the reference is added to. - enzmldoc (EnzymeMLDocument): The EnzymeMLDocument instance that contains the information. - """ - - # Create reference node - referenceAnnotation = self.setupXMLNode("enzymeml:references") - - # Optional attributes - referenceAttributes = { - "enzymeml:doi": "doi", - "enzymeml:pubmedID": "pubmedid", - "enzymeml:url": "url", - } - - for attributeName, objectName in referenceAttributes.items(): - self.appendOptionalAttribute( - attributeName=attributeName, - object=enzmldoc, - objectName=objectName, - annotationNode=referenceAnnotation, - ) - - if referenceAnnotation.getNumChildren() > 0: - model.appendAnnotation(referenceAnnotation) - - def _addUnits(self, model: libsbml.Model, unit_dict: Dict[str, UnitDef]) -> None: - """Converts EnzymeMLDocument units to SBML. - - Args: - model (libsbml.Model): The SBML model the units are added to. - unit_dict (Dict[str, UnitDef]): The EnzymeMLDocument units to be added to the SBML model. - """ - - for unit_id, unit_def in unit_dict.items(): - - unit = model.createUnitDefinition() - unit.setId(unit_id) - unit.setMetaId(unit_def.meta_id) - unit.setName(unit_def.name) - - # TODO Add ontology - # if unit_def.getOntology() != "NONE": - # cvterm = CVTerm() - # cvterm.addResource(unit_def.getOntology()) - # cvterm.setQualifierType(BIOLOGICAL_QUALIFIER) - # cvterm.setBiologicalQualifierType(BQB_IS) - # unit.addCVTerm(cvterm) - - for base_unit in unit_def.units: - - kind = base_unit.kind - exponent = base_unit.exponent - scale = base_unit.scale - multiplier = base_unit.multiplier - - baseUnitDef = unit.createUnit() - - try: - baseUnitDef.setKind(libsbml.UnitKind_forName(kind)) - except TypeError: - baseUnitDef.setKind(kind) - - baseUnitDef.setExponent(exponent) - baseUnitDef.setScale(scale) - baseUnitDef.setMultiplier(multiplier) - - def _addVessel(self, model, vessel_dict: Dict[str, Vessel]) -> None: - """Converts EnzymeMLDocument vessel to SBML. - - Args: - model (libsbml.Model): The SBML model the vessel is added to. - vessel (Vessel): The EnzymeMLDocument vessel to be added to the SBML model. - """ - - for vessel_id, vessel in vessel_dict.items(): - compartment = model.createCompartment() - compartment.setId(vessel_id) - compartment.setName(vessel.name) - compartment.setConstant(vessel.constant) - compartment.setSpatialDimensions(3) - - if vessel.volume: - compartment.setSize(vessel.volume) - compartment.setUnits(vessel._unit_id) - - def _addProteins( - self, model: libsbml.Model, protein_dict: Dict[str, Protein] - ) -> None: - """Converts EnzymeMLDocument proteins to SBML. - - Args: - model (libsbml.Model): The SBML model the proteins are added to. - protein_dict (Dict[str, Protein]): The EnzymeMLDocument proteins to be added to the SBML model. - """ - - # EnzymeML attributes - proteinAttributes = { - "enzymeml:sequence": "sequence", - "enzymeml:ECnumber": "ecnumber", - "enzymeml:uniprotID": "uniprotid", - "enzymeml:organism": "organism", - "enzymeml:organismTaxID": "organism_tax_id", - } - - for protein in protein_dict.values(): - self._addSpecies( - obj=protein, - annotation_name="enzymeml:protein", - model=model, - optional_attributes=proteinAttributes, - ) - - def _addComplex( - self, model: libsbml.Model, complex_dict: Dict[str, Protein] - ) -> None: - """Converts EnzymeMLDocument proteins to SBML. - - Args: - model (libsbml.Model): The SBML model the proteins are added to. - complex_dict (Dict[str, Protein]): The EnzymeMLDocument complex to be added to the SBML model. - """ - - complexAttributes = { - "enzymeml:participant": "participants", - } - - for complex in complex_dict.values(): - self._addSpecies( - obj=complex, - annotation_name="enzymeml:complex", - model=model, - optional_attributes=complexAttributes, - ) - - def _addReactants(self, model: libsbml.Model, reactant_dict: Dict[str, Reactant]): - """Converts EnzymeMLDocument reactants to SBML. - - Args: - model (libsbml.Model): The SBML model the reactants are added to. - reactant_dict (Dict[str, Reactant]): The EnzymeMLDocument reactants to be added to the SBML model. - """ - - # EnzymeML attributes - reactantAttributes = { - "enzymeml:inchi": "inchi", - "enzymeml:smiles": "smiles", - "enzymeml:chebiID": "chebi_id", - } - - for reactant in reactant_dict.values(): - self._addSpecies( - obj=reactant, - annotation_name="enzymeml:reactant", - model=model, - optional_attributes=reactantAttributes, - ) - - def _addGlobalParameters( - self, model: libsbml.Model, global_parameters: Dict[str, KineticParameter] - ): - """Writes global parameters to the SBML document. - - Args: - model (libsbml.Model): SBML model the global parameters are added to. - global_parameters (Dict[str, KineticParameter]): Global parameters that will be added to the SBML document. - """ - - for parameter in global_parameters.values(): - sbml_param = self._write_global_parameter(parameter, model) - - # Create a mapping for the 'enzymeml:parameter' annotation - annotation = self.setupXMLNode("enzymeml:parameter") - optional_parameters = { - "enzymeml:initialValue": "initial_value", - "enzymeml:upperBound": "upper", - "enzymeml:lowerBound": "lower", - } - - for attributeName, objectName in optional_parameters.items(): - - self.appendOptionalAttribute( - attributeName=attributeName, - object=parameter, - objectName=objectName, - annotationNode=annotation, - ) - - if annotation.getNumChildren() > 0: - sbml_param.appendAnnotation(annotation) - - def _write_global_parameter( - self, parameter: KineticParameter, model: libsbml.Model - ): - """Writes a global parameter to a reaction""" - - global_param = model.createParameter() - global_param.setId(parameter.name) - global_param.setConstant(parameter.constant) - - if parameter.value is not None: - global_param.setValue(parameter.value) - - if parameter._unit_id: - global_param.setUnits(parameter._unit_id) - - if parameter.ontology: - global_param.setSBOTerm(parameter.ontology) - - return global_param - - def _addSpecies( - self, - obj: AbstractSpecies, - annotation_name: str, - model: libsbml.Model, - optional_attributes: Dict[str, str], - ) -> None: - """Helper function to create any EnzymeML species from - - Args: - obj (AbstractSpecies): Object containing the species informations. - """ - - species = model.createSpecies() - species.setId(obj.id) - species.setName(obj.name) - species.setMetaId(obj.meta_id) - species.setSBOTerm(obj.ontology) - species.setCompartment(obj.vessel_id) - species.setBoundaryCondition(obj.boundary) - species.setConstant(obj.constant) - species.setHasOnlySubstanceUnits(False) - - if obj.init_conc is not None and obj._unit_id: - species.setSubstanceUnits(obj._unit_id) - species.setInitialConcentration(obj.init_conc) - elif obj.init_conc and not obj._unit_id: - raise ValueError( - f"The object {obj.name} ({obj.id}) has an initial concentration value but no unit. Please specify a unit for a successful export to SBML." - ) - - # Controls if annotation will be added - objAnnotation = self.setupXMLNode(annotation_name) - - # EnzymeML attributes - for attributeName, objectName in optional_attributes.items(): - - # TODO more elegant way to handle complex parts - if isinstance(getattr(obj, objectName), list): - for id in getattr(obj, objectName): - value = self.appendAttribute(attributeName, id) - objAnnotation.addChild(value) - - continue - - self.appendOptionalAttribute( - attributeName=attributeName, - object=obj, - objectName=objectName, - annotationNode=objAnnotation, - ) - - if objAnnotation.getNumChildren() > 0: - species.appendAnnotation(objAnnotation) - - def _addReactions( - self, model: libsbml.Model, reaction_dict: Dict[str, EnzymeReaction] - ): - """Converts EnzymeMLDocument reactions to SBML. - - Args: - model (libsbml.Model): The SBML model the reactions are added to. - reaction_dict (Dict[str, EnzymeReaction]): The EnzymeMLDocument reactions to be added to the SBML model. - """ - - for reaction_id, enzyme_reaction in reaction_dict.items(): - - reaction = model.createReaction() - reaction.setId(reaction_id) - reaction.setMetaId(enzyme_reaction.meta_id) - reaction.setName(enzyme_reaction.name) - reaction.setReversible(enzyme_reaction.reversible) - reaction.setSBOTerm(enzyme_reaction.ontology) - - # Add kinetic model - if enzyme_reaction.model: - self._addModelToReaction( - reaction=reaction, kinetic_model=enzyme_reaction.model - ) - - # Enzymeml attributes - reactionAnnotation = self.setupXMLNode("enzymeml:reaction") - - # Track conditions - conditionsAnnotation = self.setupXMLNode( - "enzymeml:conditions", namespace=False - ) - - conditionsMapping = { - "enzymeml:temperature": { - "value": "temperature", - "unit": "_temperature_unit_id", - }, - "enzymeml:ph": {"value": "ph"}, - } - - for attributeName, objectMapping in conditionsMapping.items(): - self.appendMultiAttributes( - attributeName=attributeName, - object=enzyme_reaction, - objectMapping=objectMapping, - annotationNode=conditionsAnnotation, - ) - - if conditionsAnnotation.getNumChildren() > 0: - reactionAnnotation.addChild(conditionsAnnotation) - reaction.appendAnnotation(reactionAnnotation) - - # Write educts - self.writeElements( - reaction_elements=enzyme_reaction.educts, - createFunction=reaction.createReactant, - ) - - # Write products - self.writeElements( - reaction_elements=enzyme_reaction.products, - createFunction=reaction.createProduct, - ) - - # Write modifiers - self.writeElements( - reaction_elements=enzyme_reaction.modifiers, - createFunction=reaction.createModifier, - ) - - def _addModelToReaction( - self, - reaction: libsbml.Reaction, - kinetic_model: KineticModel, - ) -> None: - """ - Adds kinetic law to SBML reaction. - Only relevant for EnzymeML > SBML conversion. - - Args: - reaction (libsbml.Reaction): SBML reaction class - kinetic_model (KineticModel): PyEnzyme Model object - """ - - # Set up SBML kinetic law node - sbml_law = reaction.createKineticLaw() - - for parameter in kinetic_model.parameters: - - if parameter.is_global: - continue - - param = self._write_local_parameter(parameter, sbml_law) - - # Create a mapping for the 'enzymeml:parameter' annotation - annotation = self.setupXMLNode("enzymeml:parameter") - optional_parameters = { - "enzymeml:initialValue": "initial_value", - "enzymeml:upperBound": "upper", - "enzymeml:lowerBound": "lower", - "enzymeml:stdev": "stdev", - } - - for attributeName, objectName in optional_parameters.items(): - - self.appendOptionalAttribute( - attributeName=attributeName, - object=parameter, - objectName=objectName, - annotationNode=annotation, - ) - - if annotation.getNumChildren() > 0: - param.appendAnnotation(annotation) - - sbml_law.setMath(libsbml.parseL3Formula(kinetic_model.equation)) - sbml_law.setName(kinetic_model.name) - - if kinetic_model.ontology: - sbml_law.setSBOTerm(kinetic_model.ontology) - - def _write_local_parameter( - self, - parameter: KineticParameter, - kinetic_law: libsbml.KineticLaw, - ): - """Writes a local parameter to a reaction""" - - local_param = kinetic_law.createLocalParameter() - local_param.setId(parameter.name) - - if parameter.value is not None: - local_param.setValue(parameter.value) - - if parameter._unit_id: - local_param.setUnits(parameter._unit_id) - - if parameter.ontology: - local_param.setSBOTerm(parameter.ontology) - - return local_param - - def writeElements( - self, reaction_elements: List[ReactionElement], createFunction: Callable - ): - """Writes SpeciesReference elements to the SBML document. - - Args: - reaction_elements (List[ReactionElement]): List of reaction elements containing information on stoichiometry, species_id and ontology. - createFunction (Callable): Function that creates either an educt, product or modifier list to the SBML document. - """ - - for reaction_element in reaction_elements: - - speciesRef = createFunction() - speciesRef.setSpecies(reaction_element.species_id) - speciesRef.setSBOTerm(reaction_element.ontology) - - try: - # Catch modifiers --> No stoich/constant in SBML - speciesRef.setConstant(reaction_element.constant) - speciesRef.setStoichiometry(reaction_element.stoichiometry) - except AttributeError: - pass - - def writeReplicateData(self, replicate: Replicate, format_annot: XMLNode) -> None: - """Writes column information to the enzymeml:format annotation. - - Args: - replicate (Replicate): Replicate holding the time course data. - format_annot (XMLNode): The enzymeml:format annotation node. - """ - - column = self.setupXMLNode("enzymeml:column", namespace=False) - - # Add attributes - column.addAttr("replica", replicate.id) - column.addAttr("species", replicate.species_id) - column.addAttr("type", replicate.data_type) - column.addAttr("unit", replicate._data_unit_id) - column.addAttr("index", str(self.index)) - column.addAttr("isCalculated", str(replicate.is_calculated)) - - # Add colum to format annotation - format_annot.addChild(column) - - def _addData( - self, model: libsbml.Model, measurement_dict: Dict[str, Measurement] - ) -> Dict[str, str]: - """Adds measurement data to the SBML document and writes time course data to DataFrames/CSV. - - Args: - model (libsbml.Model): The SBML model to which the measurements are added. - measurement_dict (Dict[str, Measurement]): The EnzymeMLDocument measurement data. - - Returns: - Dict[str, str]: Mapping from actual CSV paths to the ones added to the OMEX - """ - - # Initialize data lists - data_annotation = self.setupXMLNode("enzymeml:data") - files = self.setupXMLNode("enzymeml:files", namespace=False) - formats = self.setupXMLNode("enzymeml:formats", namespace=False) - measurements = self.setupXMLNode("enzymeml:listOfMeasurements", namespace=False) - paths = {} - - for index, (measurement_id, measurement) in enumerate(measurement_dict.items()): - - # setup format/Measurement ID/node and file ID - format_id = f"format{index}" - file_id = f"file{index}" - - format_annot = self.setupXMLNode("enzymeml:format", namespace=False) - - format_annot.addAttr("id", format_id) - - measurement_annot = self.setupXMLNode( - "enzymeml:measurement", namespace=False - ) - - # Get time and add to format node - data_columns = {} - if measurement._has_replicates(): - # Only write time data if replicates are present - self.writeTimeData( - measurement=measurement, - format_annot=format_annot, - data_columns=data_columns, - ) - - self.writeMeasurementData( - measurement=measurement, - measurement_annot=measurement_annot, - format_annot=format_annot, - data_columns=data_columns, - ) - - # Create DataFrame to save measurement - if data_columns: - file_name = f"{measurement_id}.csv" - file_path = f"./data/{file_name}" - df = pd.DataFrame(data_columns) - - if self.path: - df_path = os.path.join(self.path, "data", file_name) - df.to_csv(df_path, index=False, header=False) - else: - df_path = "Unused" - - paths[df_path] = file_path - - # Add data to data annotation - file_annot = self.setupXMLNode("enzymeml:file", namespace=False) - - file_annot.addAttr("file", file_path) - file_annot.addAttr("format", format_id) - file_annot.addAttr("id", file_id) - - files.addChild(file_annot) - formats.addChild(format_annot) - - measurement_annot.addAttr("file", file_id) - - measurement_annot.addAttr("id", measurement_id) - measurement_annot.addAttr("name", measurement.name) - - # TODO find a sustainable way - if measurement.temperature: - measurement_annot.addAttr( - "temperature_unit", measurement._temperature_unit_id - ) - measurement_annot.addAttr( - "temperature_value", str(measurement.temperature) - ) - - if measurement.ph: - measurement_annot.addAttr("ph", str(measurement.ph)) - - measurements.addChild(measurement_annot) - - # add annotation to listOfReactions - if formats.getNumChildren() > 0: - data_annotation.addChild(formats) - if measurements.getNumChildren() > 0: - data_annotation.addChild(measurements) - if files.getNumChildren() > 0: - data_annotation.addChild(files) - if data_annotation.getNumChildren() > 0: - model.getListOfReactions().appendAnnotation(data_annotation) - - return paths - - def writeTimeData( - self, measurement: Measurement, format_annot: XMLNode, data_columns: dict - ): - time = measurement.global_time - time_unit = measurement._global_time_unit_id - - time_column = XMLNode(XMLTriple("enzymeml:column"), XMLAttributes()) - - time_column.addAttr("type", "time") - time_column.addAttr("unit", time_unit) - time_column.addAttr("index", "0") - - format_annot.addChild(time_column) - - # write initConc annotation and prepare raw data - data_columns.update({f"time/{time_unit}": time}) - self.index = 1 - - def writeMeasurementData( - self, - measurement: Measurement, - measurement_annot: XMLNode, - format_annot: XMLNode, - data_columns: Dict[str, List[float]], - ) -> None: - """Writes measurement metadata as columns to the SBML document annotation enzymeml:column. - - Args: - measurement (Measurement): EnzymeML measurement that is written to SBML. - measurement_annot (XMLNode): The SBML XMLNode the measurement metadata is written to. - format_annot (XMLNode): The SBML XMLNode the column information is written to. - - Returns: - List[List[float]]: The time course data from the replicate objects. - """ - - species_dict = measurement.species_dict - - # Init Conc - # Extract measurementData objects - proteins = species_dict["proteins"] - reactants = species_dict["reactants"] - - # Append initConc data to measurement - self.appendInitConcData( - measurement_annot=measurement_annot, - measurement_data_dict=proteins, - species_type="protein", - ) - self.appendInitConcData( - measurement_annot=measurement_annot, - measurement_data_dict=reactants, - species_type="reactant", - ) - - if measurement._has_replicates(): - # Replicates - self.appendReplicateData( - {**proteins, **reactants}, - format_annot=format_annot, - data_columns=data_columns, - ) - - def appendInitConcData( - self, - measurement_annot: XMLNode, - measurement_data_dict: Dict[str, MeasurementData], - species_type: str, - ): - """Adds individual intial concentration data to the enzymeml:measurement annotation. - - Args: - measurement_annot (XMLNode): The SBML XMLNode for the measurement annotation. - measurement_data_dict (Dict[str, MeasurementData]): The EnzymeMLDocument measurement data. - species_type (str): The type of species in the measurement_data_dict. - """ - - for species_id, measurement_data in measurement_data_dict.items(): - - # Create the initConc annotation - initConcAnnot = self.setupXMLNode("enzymeml:initConc", namespace=False) - - initConcAnnot.addAttr(f"{species_type}", species_id) - initConcAnnot.addAttr("value", str(measurement_data.init_conc)) - - # TODO Check if the unit given in the unit attribute is compliant - # TODO Handle this in the base class by assigning a 'None' to the _unit_id - unit_id_check = self.enzmldoc._convertToUnitDef(measurement_data.unit) - - if measurement_data._unit_id != unit_id_check: - measurement_data._unit_id = unit_id_check - - initConcAnnot.addAttr("unit", measurement_data._unit_id) - - measurement_annot.addChild(initConcAnnot) - - def appendReplicateData( - self, - species: Dict[str, MeasurementData], - format_annot: XMLNode, - data_columns: Dict[str, List[float]], - ) -> Dict[str, List[float]]: - """Extracts all time course data from the replicate objects and adds them to the the enzymeml:format annotation. - - Args: - species (Dict[str, MeasurementData]): Reactant/Protein measurement data. - format_annot (XMLNode): The SBML XMLNode representing the format annotation. - - Returns: - List[List[float]]: The time course data from the replicate objects. - """ - - # Collect all replicates - replicates = [ - replicate for data in species.values() for replicate in data.replicates - ] - - for replicate in replicates: - - # Write data to format_annot - self.writeReplicateData(replicate=replicate, format_annot=format_annot) - - # Extract series data - header_info = "/".join( - [replicate.id, replicate.species_id, replicate.data_type.value] - ) - - data_columns[header_info] = replicate.data - - self.index += 1 - - return data_columns - - def _validate_sbml_doc(self, document): - """Validates an SBML documentument and checks for errors.""" - - document.checkConsistency() - if document.getNumErrors(libsbml.LIBSBML_SEV_ERROR) > 0: - warnings.warn("Invalid SBML document! See warnings:") - warnings.warn(document.getErrorLog().toString()) diff --git a/pyenzyme/enzymeml/tools/templatereader.py b/pyenzyme/enzymeml/tools/templatereader.py deleted file mode 100644 index ac72ecd..0000000 --- a/pyenzyme/enzymeml/tools/templatereader.py +++ /dev/null @@ -1,357 +0,0 @@ -# File: templatereader.py -# Project: tools -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -import numpy as np -import pandas as pd -import re - -from typing import List, Dict - -from pyenzyme.enzymeml.core.ontology import DataTypes -from pyenzyme.enzymeml.core.creator import Creator -from pyenzyme.enzymeml.core.vessel import Vessel -from pyenzyme.enzymeml.core.protein import Protein -from pyenzyme.enzymeml.core.reactant import Reactant -from pyenzyme.enzymeml.core.enzymereaction import EnzymeReaction -from pyenzyme.enzymeml.core.measurement import Measurement -from pyenzyme.enzymeml.core.replicate import Replicate - - -def read_template(path: str, enzmldoc): - """Reads the EnzymeML spreadsheet template to an EnzymeML document. - - Args: - path (str): Path to the EnzymeML spreadsheet template. - - Returns: - EnzymeMLDocument: The resulting EnzymeML document. - """ - - general_info = pd.read_excel(path, sheet_name="General Information", skiprows=1) - - params = dict( - name=general_info.iloc[0, 1], - created=str(general_info.iloc[1, 1]), - doi=None, - pubmedid=general_info.iloc[3, 1], - url=general_info.iloc[4, 1], - ) - - enzmldoc = enzmldoc(**params) - - # User information - user_infos = pd.read_excel( - path, sheet_name="General Information", skiprows=9 - ).dropna() - - for record in user_infos.to_dict(orient="records"): - enzmldoc.addCreator( - Creator( - family_name=record["Family Name"], - given_name=record["Given Name"], - mail=record["Mail"], - ) - ) - - # Vessel - vessels = pd.read_excel(path, sheet_name="Vessels", skiprows=2) - instances = get_instances(vessels, Vessel, enzmldoc) - - for instance in instances: - enzmldoc.addVessel(Vessel(**instance)) - - # Proteins - proteins = pd.read_excel(path, sheet_name="Proteins", skiprows=2) - instances = get_instances(proteins, Protein, enzmldoc) - - for instance in instances: - enzmldoc.addProtein(Protein(**instance)) - - # Reactants - reactants = pd.read_excel(path, sheet_name="Reactants", skiprows=2) - - instances = get_instances(reactants, Reactant, enzmldoc) - - for instance in instances: - enzmldoc.addReactant(Reactant(**instance)) - - # Reactions - reactions = pd.read_excel(path, sheet_name="Reactions", skiprows=2) - - # Merge proteins and modifiers - nu_mods = [ - merge_protein_modifier(protein, modifier) - for modifier, protein in zip( - reactions.Modifiers.values.tolist(), reactions.Proteins.values.tolist() - ) - ] - - # Replace merged modifiers with modifier tag - reactions.Modifiers = nu_mods - - instances = get_instances(reactions, EnzymeReaction, enzmldoc) - - for instance in instances: - - # Get Educts, Products and Modifiers to add to the reaction - educts = parse_reaction_element(instance.get("educts")) - products = parse_reaction_element(instance.get("products")) - modifiers = parse_reaction_element(instance.get("modifiers")) - - instance.pop("educts") - instance.pop("products") - instance.pop("modifiers") - - # Instantiate Reaction - reaction = EnzymeReaction(**instance) - - add_instances(reaction.addModifier, modifiers, enzmldoc) - add_instances(reaction.addEduct, educts, enzmldoc) - add_instances(reaction.addProduct, products, enzmldoc) - - enzmldoc.addReaction(reaction) - - # Measurements - data = pd.read_excel(path, sheet_name="Data", skiprows=2) - - # Reduce dataset to experiment IDs - experiment_ids = set(data["Experiment ID"].dropna()) - - for experiment_id in experiment_ids: - exp_data = data[data["Experiment ID"] == experiment_id] - exp_data.columns = rename_columns(exp_data) - - # Get split index - split_index = get_split_index(exp_data) - - measurement = Measurement(name=experiment_id) - - # Get time - time_values, time_unit = get_time(exp_data, split_index) - - measurement.global_time = time_values - measurement.global_time_unit = time_unit - - # initialize replicate index - replicate_index = 0 - - for i, row in exp_data.iterrows(): - - row_meta = row.iloc[0:split_index].to_dict() - row_values = row.iloc[split_index::].dropna().values.tolist() - - if "Time" in row_meta["Type"]: - continue - - protein_name = row_meta["Protein Name"] - protein_conc = row_meta["Protein Initial concentration"] - protein_unit = row_meta["Protein Unit"] - - measurement.addData( - init_conc=protein_conc, - unit=protein_unit, - protein_id=enzmldoc.getProtein(protein_name.strip()).id, - ) - - reactant_name = row_meta["Reactant Name"] - reactant_conc = row_meta["Reactant Initial concentration"] - reactant_unit = row_meta["Reactant Unit"] - reactant_id = enzmldoc.getReactant(reactant_name.strip()).id - - # Get the type of the measurement - type_mapping = { - "Concentration": DataTypes.CONCENTRATION, - "Absorption": DataTypes.ABSORPTION, - "Conversion [%]": DataTypes.CONVERSION, - "Peak Area": DataTypes.PEAK_AREA, - "Total concentration after addition": DataTypes.CONCENTRATION, - } - - if reactant_id not in measurement.species_dict["reactants"]: - measurement.addData( - init_conc=reactant_conc, unit=reactant_unit, reactant_id=reactant_id - ) - - replicates = None - if row_values: - - if type_mapping[row["Type"]] is DataTypes.CONVERSION: - # Convert percent to rational [0,1] - row_values = list(map(lambda value: value / 100, row_values)) - reactant_unit = "dimensionless" - elif type_mapping[row["Type"]] is DataTypes.PEAK_AREA: - # Add dimensionless unit - if any(value < 0 for value in row_values): - raise ValueError( - "Peak area cant be negative. Data might be corrupted" - ) - - reactant_unit = "dimensionless" - - # Create Replicate - replicate = Replicate( - id=f"replica_{replicate_index}_{reactant_name}_{experiment_id}", - species_id=reactant_id, - data_type=type_mapping[row["Type"]], - data_unit=reactant_unit, - time_unit=time_unit, - time=time_values, - data=row_values, - ) - - replicate_index += 1 - - measurement.addReplicates(replicate, enzmldoc) - - # Finally, add measurement to the document - enzmldoc.addMeasurement(measurement) - - return enzmldoc - - -def get_instances(sheet: pd.DataFrame, obj, enzmldoc) -> list: - mapping = get_template_map(obj) - instances = extract_values(sheet, mapping) - - return [clean_instance(instance, enzmldoc) for instance in instances] - - -def get_template_map(obj) -> dict: - """Extracts the template mappings""" - - return { - field.field_info.extra.get("template_alias"): name - for name, field in obj.__fields__.items() - if field.field_info.extra.get("template_alias") - } - - -def extract_values(sheet: pd.DataFrame, mapping: Dict[str, str]) -> list: - - # Get all valid columns - cols = [col for col in sheet.columns if "Unnamed" not in col] - sheet = sheet[cols] - sheet = sheet.replace(r"^\s*$", np.nan, regex=True) - sheet = sheet.dropna(thresh=len(mapping) - 2) - records = sheet.to_dict(orient="records") - - return [ - { - mapping.get(key): item - for key, item in record.items() - if item and mapping.get(key) and "nan" != repr(item) - } - for record in records - ] - - -def clean_instance(instance: dict, enzmldoc) -> dict: - def get_vessel_name(name: str, enzmldoc): - return enzmldoc.getVessel(name).id - - def get_constant(constant: str, enzmldoc): - if constant == "Constant": - return True - elif constant == "Not constant": - return False - - def get_reversible(reversible: str, enzmldoc): - if reversible == "reversible": - return True - elif reversible == "irreversible": - return False - - def clean_temp_unit(temp_unit: str, enzmldoc): - return temp_unit.replace("°", "") - - def clean_uniprotid(uniprotid: str, enzmldoc): - if repr(uniprotid) == "nan": - return None - else: - uniprotid - - mapping = { - "vessel_id": get_vessel_name, - "constant": get_constant, - "temperature_unit": clean_temp_unit, - "reversible": get_reversible, - "uniprotid": clean_uniprotid, - } - - for key, item in instance.items(): - if key in mapping: - instance[key] = mapping[key](item, enzmldoc) - - return instance - - -def merge_protein_modifier(protein, modifier): - proteins = repr(protein).split(",") - modifier = repr(modifier).split(",") - entities = proteins + modifier - - return ",".join( - [entity.replace("'", "").strip() for entity in entities if entity != "nan"] - ) - - -def rename_columns(columns: List[str]) -> List[str]: - mapping = { - "Unnamed: 4": "Protein Initial concentration", - "Unnamed: 5": "Protein Unit", - "Unnamed: 7": "Reactant Initial concentration", - "Unnamed: 8": "Reactant Unit", - "Protein": "Protein Name", - "Reactant": "Reactant Name", - } - - return [mapping[col] if mapping.get(col) else col for col in columns] - - -def get_split_index(df: pd.DataFrame): - for index, col in enumerate(df.columns): - if "Enter data via transpose" in col: - return index - - -def get_time(data: pd.DataFrame, split_index): - for i, (_, row) in enumerate(data.iterrows()): - if "Time" in row["Type"]: - time_meta = row.iloc[0:split_index].to_dict() - time_unit = get_time_unit(time_meta) - - time_values = row.iloc[split_index::].dropna().values - - return time_values.tolist(), time_unit - - -def get_time_unit(row: dict): - - regex = r"\[([A-Za-z]*)\]" - regex = re.compile(regex) - unit = regex.findall(row["Type"])[0] - - return unit - - -def parse_reaction_element(elements): - if repr(elements) == "nan": - return [] - - return elements - - -def add_instances(fun, elements, enzmldoc) -> None: - all_species = {**enzmldoc.protein_dict, **enzmldoc.reactant_dict} - for id, species in all_species.items(): - - if species.name in elements: - fun( - species_id=id, - stoichiometry=1.0, - constant=False, - enzmldoc=enzmldoc, - ) diff --git a/pyenzyme/enzymeml/tools/unitcreator.py b/pyenzyme/enzymeml/tools/unitcreator.py deleted file mode 100644 index 1cad29d..0000000 --- a/pyenzyme/enzymeml/tools/unitcreator.py +++ /dev/null @@ -1,220 +0,0 @@ -# File: unitcreator.py -# Project: tools -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -import libsbml - -from deepdiff import DeepDiff - -from pyenzyme.enzymeml.core.unitdef import UnitDef -from pyenzyme.enzymeml.tools.unitparser import UnitParser - - -class UnitCreator: - def __init__(self): - - self.__functionDict = { - "M": self.__Molar, - "mole": self.__Mole, - "l": self.__Volume, - "liter": self.__Volume, - "litre": self.__Volume, - "g": self.__Amount, - "gram": self.__Amount, - "s": self.__Seconds, - "sec": self.__Seconds, - "second": self.__Seconds, - "seconds": self.__Seconds, - "min": self.__Minutes, - "mins": self.__Minutes, - "minutes": self.__Minutes, - "h": self.__Hours, - "hour": self.__Hours, - "hours": self.__Hours, - "C": self.__Celsius, - "celsius": self.__Celsius, - "Celsius": self.__Celsius, - "K": self.__Kelvin, - "kelvin": self.__Kelvin, - "Kelvin": self.__Kelvin, - "dimensionless": self.__Dimensionless, - } - - def getUnit(self, unit_string, enzmldoc) -> str: - """ - Args: - String unit_string: Standard short form of unit - """ - if unit_string.count("/") > 1: - splitted = unit_string.split("/") - corrected = splitted[0] + "/" + "".join(splitted[1::]) - raise ValueError( - f"Unit '{unit_string}' contains multiple backlashes. Please stick to using a single backslash instead for units involving two or more base units per side. Use the following to enter your unit '{corrected}'" - ) - - # Generate ID - id = enzmldoc._generateID(prefix="u", dictionary=enzmldoc._unit_dict) - - # Call unit parser to identify units - parser = UnitParser() - units = sorted(parser.parse(unit_string)) - - # Initialize UnitDef - nominator, denominator = [], [] - for prefix, baseunit, exponent in units: - - pre_unit = "".join([prefix, baseunit]) - - if float(exponent) > 0: - if abs(float(exponent)) > 1: - nominator.append(pre_unit + f"^{exponent[1::]}") - if abs(float(exponent)) == 1: - nominator.append(pre_unit) - else: - if abs(float(exponent)) > 1: - denominator.append(pre_unit + f"^{exponent[1::]}") - if abs(float(exponent)) == 1: - denominator.append(pre_unit) - - # Reformat unit string to a convenient format - if not nominator: - nominator = ["1"] - - if denominator: - name = " / ".join([" ".join(nominator), " ".join(denominator)]) - if not denominator: - name = " ".join(nominator) - - # Convert Celsius to Kelvin - No SBML kind for C! - if name.lower() == "c": - name = "K" - - # Initialize UnitDef object - unitdef = UnitDef(name=name, id=id) - - for prefix, baseunit, exponent in units: - self.__functionDict[baseunit](unitdef, prefix, exponent) - - # Check if there is already a similar unit defined - if self.__checkFootprints(enzmldoc, unitdef.getFootprint()) != "NEW": - return self.__checkFootprints(enzmldoc, unitdef.getFootprint()) - - enzmldoc._unit_dict[unitdef.id] = unitdef - - return unitdef.id - - def __checkFootprints(self, enzmldoc, footprint): - - for unit_id, unitdef in enzmldoc._unit_dict.items(): - if DeepDiff(unitdef.getFootprint(), footprint) == {}: - return unit_id - - return "NEW" - - def __Mole(self, unitdef, prefix, exponent): - - kind = libsbml.UnitKind_toString(libsbml.UNIT_KIND_MOLE) - scale = self.__getPrefix(prefix) - multiplier = 1 - - unitdef.addBaseUnit(kind, exponent, scale, multiplier) - - def __Molar(self, unitdef, prefix, exponent): - - self.__Mole(unitdef, prefix, exponent) - - kind = libsbml.UnitKind_toString(libsbml.UNIT_KIND_LITRE) - scale = 1 - multiplier = 1 - - unitdef.addBaseUnit(kind, -1, scale, multiplier) - - def __Volume(self, unitdef, prefix, exponent): - - kind = libsbml.UnitKind_toString(libsbml.UNIT_KIND_LITRE) - scale = self.__getPrefix(prefix) - multiplier = 1 - - unitdef.addBaseUnit(kind, exponent, scale, multiplier) - - def __Amount(self, unitdef, prefix, exponent): - - kind = libsbml.UnitKind_toString(libsbml.UNIT_KIND_GRAM) - scale = self.__getPrefix(prefix) - multiplier = 1 - - unitdef.addBaseUnit(kind, exponent, scale, multiplier) - - def __Seconds(self, unitdef, prefix, exponent): - - kind = libsbml.UnitKind_toString(libsbml.UNIT_KIND_SECOND) - scale = 1 - multiplier = 1 - - unitdef.addBaseUnit(kind, exponent, scale, multiplier) - - def __Minutes(self, unitdef, prefix=None, exponent=1): - - kind = libsbml.UnitKind_toString(libsbml.UNIT_KIND_SECOND) - scale = 1 - multiplier = 60 - - unitdef.addBaseUnit(kind, exponent, scale, multiplier) - - def __Hours(self, unitdef, prefix=None, exponent=1): - - kind = libsbml.UnitKind_toString(libsbml.UNIT_KIND_SECOND) - scale = 1 - multiplier = 60 * 60 - - unitdef.addBaseUnit(kind, exponent, scale, multiplier) - - def __Celsius(self, unitdef, prefix=None, exponent=1): - - kind = libsbml.UnitKind_toString(libsbml.UNIT_KIND_KELVIN) - scale = 1 - multiplier = 1 - - unitdef.addBaseUnit(kind, exponent, scale, multiplier) - - def __Kelvin(self, unitdef, prefix=None, exponent=1): - - kind = libsbml.UnitKind_toString(libsbml.UNIT_KIND_KELVIN) - scale = 1 - multiplier = 1 - - unitdef.addBaseUnit(kind, exponent, scale, multiplier) - - def __Dimensionless(self, unitdef, prefix=None, exponent=1): - - kind = libsbml.UnitKind_toString(libsbml.UNIT_KIND_DIMENSIONLESS) - scale = 1 - multiplier = 1 - exponent = 1 - - unitdef.addBaseUnit(kind, exponent, scale, multiplier) - - def __getPrefix(self, prefix): - - if prefix == "f": - return -15 - elif prefix == "p": - return -12 - elif prefix == "n": - return -9 - elif prefix == "u": - return -6 - elif prefix == "m": - return -3 - elif prefix == "c": - return -2 - elif prefix == "d": - return -1 - elif prefix == "k": - return 3 - elif len(prefix) == 0: - return 1 - else: - raise KeyError(f"Prefix {prefix} is unknown. Please define unit manually") diff --git a/pyenzyme/enzymeml/tools/unitparser.py b/pyenzyme/enzymeml/tools/unitparser.py deleted file mode 100644 index 67b9b94..0000000 --- a/pyenzyme/enzymeml/tools/unitparser.py +++ /dev/null @@ -1,124 +0,0 @@ -# File: unitparser.py -# Project: tools -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -import re - - -class UnitParser(object): - def __init__(self): - - self.__prefixDict = { - "femto": "f", - "pico": "p", - "nano": "n", - "micro": "u", - "milli": "m", - "mili": "m", - "centi": "c", - "deci": "d", - "kilo": "k", - } - - def parse(self, exp_string): - - # reformat string - exp_string = self.__exponentString(exp_string) - - # split by exponents - regex = r"([a-zA-Z]*)([-+][\d]*)" - regex = regex.replace(" ", "") - - unit_tup = re.findall(regex, exp_string) - return [self.__getPrefix(tup[0], tup[-1]) for tup in unit_tup if tup[0]] - - def getExponentString(self, string): - - string = string.split("/") - - if len(string) == 2: - nom = string[0].split(" ")[0:-1] - den = string[1].split(" ")[1::] - - elif len(string) == 1: - nom = string - den = [] - - return "".join( - [self.__reformatString(unit, "+") for unit in nom] - + [self.__reformatString(unit, "-") for unit in den] - ) - - def __reformatString(self, string, pre): - regex = r"(\w*)[-+|\^]?(\d*)" - groups = re.findall(regex, string) - exp_string = "" - - for unit, exponent in groups: - - if len(unit) > 0: - - if len(exponent) == 1: - exp_string += unit + pre + exponent - - elif "+" in exponent or "-" in exponent: - exp_string += unit + exponent - - else: - exp_string += unit + "%s1" % pre - - return exp_string - - def __exponentString(self, string): - - string = [st.strip() for st in string.split("/")] - - if len(string) == 2: - nom = string[0].split(" ") - den = string[1].split(" ") - - elif len(string) == 1: - nom = string - den = [] - - return "".join( - [self.__reformatString(unit, "+") for unit in nom] - + [self.__reformatString(unit, "-") for unit in den] - ) - - def __getPrefix(self, string, exponent): - - regex = "^([a|f|p|n|u|m|c|d|k]?)(C|celsius|K|kelvin|M|molar|mole|g|gram|l|L|litre|liter|[s]?|sec|seconds|second|min|mins|minutes|h|hour|hours|dimensionless)$" - string = string.lower()[0:-1] + string[-1] - - try: - prefix = re.findall(regex, string)[0][0] - - if len(prefix) > 1: - prefix = self.__prefixDict[prefix.lower()] - - unit = re.findall(regex, string)[0][1] - - return (prefix, unit, exponent) - - except IndexError: - - try: - unit = re.findall(regex, string)[0][0] - return (None, unit, exponent) - except IndexError: - supportedUnits = regex.split() - raise KeyError( - f'Could not parse unit, because "{string}" is not supported. PyEnzyme currently supports the following {self.__getSupportUnitString(regex)}' - ) - - @staticmethod - def __getSupportUnitString(regex): - prefixes, units = tuple(regex.split(")(")) - - units = units.replace("[s]?", "s").replace(")$", "").split("|") - prefixes = prefixes.replace("^([", "").replace("]?", "").split("|") - - return f"prefixes [{', '.join(prefixes)}] and units [{', '.join(units)}]" diff --git a/pyenzyme/enzymeml/tools/validator.py b/pyenzyme/enzymeml/tools/validator.py deleted file mode 100644 index ff70a9b..0000000 --- a/pyenzyme/enzymeml/tools/validator.py +++ /dev/null @@ -1,746 +0,0 @@ -# File: validator.py -# Project: core -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -import importlib -import logging -import re -import yaml -import os -import pandas as pd - -from itertools import cycle -from typing import Optional, Dict, Tuple, List - -from pyenzyme.enzymeml.core.unitdef import UnitDef - -# Set up a logger for validation -logger = logging.getLogger("validator") -logger.setLevel(logging.WARNING) - -# create console handler and set level to debug -ch = logging.StreamHandler() -ch.setLevel(logging.WARNING) - -# create formatter -formatter = logging.Formatter("ValidationWarning: %(message)s") - -# add formatter to ch -ch.setFormatter(formatter) - -# add ch to logger -logger.addHandler(ch) - - -class EnzymeMLValidator: - def __init__(self, scheme: Dict): - """Initialize a Validator instance that is capapble to find non-compliances. - - - Args: - scheme (dict): EnzymeML object model for every attribute including options to check upon. - """ - - self.scheme = scheme - - # ! Validation of EnzymeMLDocuments - def validate(self, enzmldoc) -> Tuple[Dict, bool]: - """Validate an EnzymeMLDocument based on a given scheme, let it be YAML or XLSX. - - Args: - enzmldoc (EnzymeMLDocument): EnzymeMLDocument that will be validated and reported on. - return_report (bool): Whether or not an error should raised or only then report should be returned when validation fails. Please note, thsi behaviour should remain - """ - - return self._validate_objects(obj=enzmldoc.dict(), valid=self.scheme) - - @classmethod - def _validate_objects(cls, obj, valid: Dict) -> Tuple[Dict, bool]: - """Validates sub-objects of an EnzymeMLDocument""" - - # Initialize report and control list - report, valid_check = {}, [] - - for attrib, value in obj.items(): - if not valid.get(attrib): - # Skip attributes not supported - continue - - if attrib == "model": - # Model can be None, thus it needs special treatment - obj_report, check = cls._validate_objects(value, valid[attrib]) - - elif isinstance(value, dict): - if attrib == "species_dict": - # Measurements species_dict needs to be flattened - value = {**value["proteins"], **value["reactants"]} - - # Perform validation on dict struct - cls._validate_iterator( - value.items(), attrib, valid, valid_check, report - ) - - elif isinstance(value, list): - if not all(isinstance(x, (float, int, str)) for x in value): - # If its an actual list of objects - cls._validate_iterator( - enumerate(value), attrib, valid, valid_check, report - ) - - else: - # Any primitive file gets validated here - obj_report, check = cls._validate_field(value, valid[attrib], attrib) - - if obj_report: - # Only add if non-empty - report[attrib] = obj_report - - valid_check += [check] - - return report, all(valid_check) - - @classmethod - def _validate_iterator(cls, iterator, attrib, valid, check, global_report): - """Validates an arbitrary data structure if given as an iterator""" - - # Initialize local report - local_report = {} - - for id, obj in iterator: - report, is_valid = cls._validate_objects(obj, valid[attrib]) - - if report: - # Only add if report is non-empty - local_report[id] = report - check += [is_valid] - - # Only add to global report if there are errors - if local_report: - global_report[attrib] = local_report - - @staticmethod - def _validate_field(value, valid, attrib): - """Validates an attribute based on options given from a YAML file""" - - if "id" in attrib: - return {}, True - - report, check = {}, True - enum = valid["enum"] - val_min = valid["range"]["min"] - val_max = valid["range"]["max"] - - if all(val is None for val in enum): - enum = None - - # Check mandatory - if value is None and valid["mandatory"] is True: - check = False - report.update({"mandatory_error": "Mandatory attribute is not given."}) - - # Check enum - if enum and value not in enum: - check = False - report.update( - { - "enum_error": f"Value of '{value}' does not comply with vocabulary {enum}" - } - ) - - # Check value range - if val_max and val_min: - if isinstance(value, (int, float)): - if not val_min <= value <= val_max: - check = False - report.update( - { - "range_error": f"Value of '{value}' is out of range for [{val_min}, {val_max}]" - } - ) - - else: - check = False - report.update( - { - "range_error": f"Value '{value}' of type '{type(value)}' is not numeric." - } - ) - - return report, check - - # ! Template exports - @classmethod - def generateValidationSpreadsheet(cls, path: str = "."): - """Generates an EnzymeML validation spreadsheet based on the current implementation. - - The Validation spreadsheet can be used on database-side to generate an EnzymeML validation - YAML file that can be used by PyEnzyme to validate if a given document fits the minimal - requirements given in said database. - """ - - # Prevent circular imports (Its dirty, I know, but it works) - from pyenzyme.enzymeml.core.enzymemldocument import EnzymeMLDocument - - # Get all specs - validator = cls(scheme={}) - _, data = validator._get_cls_annotations(EnzymeMLDocument, level="document") - - # Generate the document - validator._generate_spreadsheet(data, path) - - @classmethod - def generateValidationYAML(cls, path: Optional[str] = None) -> str: - """Generates an EnzymeML validation YAML file based on the current implementation. - - The Validation YAML can be used by PyEnzyme to validate if a given document fits the minimal - requirements given in said database. - """ - - # Prevent circular imports (Its dirty, I know, but it works) - from pyenzyme.enzymeml.core.enzymemldocument import EnzymeMLDocument - - # Get collection data - cls = cls(scheme={}) - collection, _ = cls._get_cls_annotations(EnzymeMLDocument, level="document") - - if path: - path = os.path.join(path, "EnzymeML_Validation_Template.yaml") - with open(path, "w") as f: - f.write(cls._dump_validation_template_yaml(collection)) - - return cls._dump_validation_template_yaml(collection) - - def _get_cls_annotations(self, cls, level: str) -> Tuple[Dict, List]: - """Parses class definitions to recursively get sub-modules""" - - data = [] - cls_collection = {} - exclude = [ - "unit_dict", - "file_dict", - "log", - "level", - "version", - "meta_id", - "id", - "boundary", - "uri", - "creator_id", - ] - - # Sort annotations to primitive -> sub-structure - def sort_func(annot): - """Sort recursion for clean parsing""" - data_type = repr(annot[1]) - if "pyenzyme" in data_type: - return True - else: - return False - - annotations = sorted(cls.__annotations__.items(), key=sort_func) - - for name, value in annotations: - - if "pyenzyme.enzymeml" in repr(value) and "ontology" not in repr(value): - - annot = repr(value) - regex = r"(pyenzyme.enzymeml.[a-zA-Z]*.[a-zA-Z]*).([a-zA-Z]*)" - regex = re.compile(regex) - module, cls_name = regex.findall(annot)[0] - - sub_class = getattr(importlib.import_module(module), cls_name) - - if name not in exclude: - cls_collection[name], sub_data = self._get_cls_annotations( - sub_class, level=name - ) - data += sub_data - - continue - - if not name.startswith("_") and name not in exclude: - - options = { - "mandatory": True, - "description": cls.__fields__[name].field_info.description, - } - - data_fields = { - "Object": cls.__name__, - "Field": name, - "Mandatory": "True", - "Value Range": "Enter Min to Max value", - "Controlled Vocabulary": "Enter a set of allowed names/values", - "Description": cls.__fields__[name].field_info.description, - "Internal Level (not relevant)": level, - } - - options["range"] = {"min": None, "max": None} - data_fields["Controlled Vocabulary"] = "---" - options["enum"] = [None] - data_fields["Value Range"] = "---" - - cls_collection[name] = options - data.append(data_fields) - - return cls_collection, data - - @staticmethod - def _dump_validation_template_yaml(collection: Dict) -> str: - class MyDumper(yaml.Dumper): - def increase_indent(self, flow=False, indentless=False): - return super(MyDumper, self).increase_indent(flow, False) - - # Generate yaml_string - return yaml.dump( - collection, Dumper=MyDumper, default_flow_style=False, sort_keys=False - ) - - @staticmethod - def _generate_spreadsheet(data, path): - """Generates an EnzymeML validation spreadsheet based on the current implementation. - - The Validation spreadsheet can be used on database-side to generate an EnzymeML validation - YAML file that can be used by PyEnzyme to validate if a given document fits the minimal - requirements given in said database. - - Args: - data (dict): Schema that has been extracted from the EnzymeMLDocument class. - - """ - - # Initialize writer and setup a DataFrame to write to - writer = pd.ExcelWriter(os.path.join(path, "EnzymeML_Validation_Template.xlsx")) - df = pd.DataFrame(data) - df.to_excel(writer, sheet_name="validation", index=False, na_rep="NaN") - - # Create color cycle that will be used to mark different objects - colors = cycle( - [ - "#FFEBEE", - "#F3E5F5", - "#E8EAF6", - "#E3F2FD", - "#E0F7FA", - "#E8F5E9", - "#F9FBE7", - "#FFFDE7", - "#FBE9E7", - ] - ) - - # Process colummns - # Auto-adjust columns' width - for column in df: - column_width = max([len(str(value)) for value in df[column]]) - - if column_width <= 20: - # Keep columns at a min width - column_width = 20 - - col_idx = df.columns.get_loc(column) - writer.sheets["validation"].set_column(col_idx, col_idx, column_width) - - # Process rows - # Set height of first row - workbook = writer.book - style = workbook.add_format() - style.set_align("left") - writer.sheets["validation"].set_row(0, 25, style) - - obj = None - for row_idx, row in df.iterrows(): - - workbook = writer.book - style = workbook.add_format() - style.set_align("center_across") - style.set_text_h_align("left") - - if obj != row["Object"]: - # Object changes - current_color = next(colors) - obj = row["Object"] - - # Set borders to top == bold - style.set_left(1) - style.set_right(1) - style.set_left_color("#9E9E9E") - style.set_right_color("#9E9E9E") - style.set_top(1) - - else: - # Same object, keep normal border pattern - style.set_border(1) - style.set_border_color("#9E9E9E") - - # Set the background color of the row - style.bg_color = current_color - - # Write to row - writer.sheets["validation"].set_row(row_idx + 1, 25, style) - - writer.close() - - # ! Template conversion - @classmethod - def convertSheetToYAML(cls, path: str, filename: Optional[str] = None) -> str: - """Converts a given EnzymeML Validation spreadsheet to a valid EnzymeML validation YAML file. - - The generated file can be hosted in a database where it is publicaly available to - validate EnzymeML documents based on the minimal requirements defined in the YAML file. - It can also serve as a local file to validate to your own requirements. - - If a filename has been given, the YAML file will be written to the same directory - as the spreadsheet template. Otherwise - - Args: - - path (str): Path to the EnzymeML Validation spreadsheet - filename (Optional[str]): Name of the generated YAML file, if specified. Defaults to None. - - Returns: - - str: Generated YAML file string. - - """ - - # Prevent circular imports (Its dirty, I know, but it works) - from pyenzyme.enzymeml.core.enzymemldocument import EnzymeMLDocument - - # Read template and get class structure collection - cls = cls(scheme={}) - template = pd.read_excel(path).to_dict(orient="records") - empty_collection, _ = cls._get_cls_annotations( - EnzymeMLDocument, level="document" - ) - - for entry in template: - - # Get everything from the entry - level = entry["Internal Level (not relevant)"] - field = entry["Field"] - mandatory = entry["Mandatory"] - val_range = entry["Value Range"] - enum = entry["Controlled Vocabulary"] - - # Process given values - if enum in ["Enter a set of allowed names/values", "---"]: - enum = [None] - else: - enum = [val.strip() for val in enum.split(",")] - - if val_range in ["Enter Min to Max value", "---"]: - min, max = None, None - else: - values = [float(val.strip()) for val in val_range.split("-")] - min, max = values[0], values[1] - - # Retrieve fitting object from collection - if level == "document": - # Root level - collection_obj = empty_collection - else: - # Sub-root object - collection_obj = cls._traverse_data(empty_collection, level) - - # Apply changes to the empty collection - field_options = collection_obj[field] - field_options.update( - { - "mandatory": mandatory, - "enum": enum, - "range": {"min": min, "max": max}, - } - ) - - # Get the yaml string - yaml_string = cls._dump_validation_template_yaml(empty_collection) - - if filename: - path = os.path.dirname(os.path.abspath(path)) - yaml_path = os.path.join(path, f"{filename}.yaml") - - with open(yaml_path, "w") as f: - f.write(yaml_string) - - return yaml_string - - @classmethod - def _traverse_data(cls, data, search_term: str) -> Optional[Dict]: - """Traverses a dictionary and returns the object reference""" - - # Adapt to file types - if isinstance(data, dict): - fields = data.items() - elif isinstance(data, list): - fields = enumerate(data) - else: - raise TypeError(f"Invalid data type {type(data)}") - - result = None - - for key, item in fields: - if search_term == key: - return item - elif isinstance(item, (dict, list)): - result = cls._traverse_data(item, search_term) - - if result: - return result - - return None - - # ! Unit checker - @classmethod - def check_unit_consistency(cls, enzmldoc, strict: bool = False): - """Validates unit consistency in an EnzymeMLDocument. - - This method will check whether all (initial) concentration units of a species - are consistent throughout the document. Default mode only requires measurements and - replicates to comply to the species unit. - - This can also be set to 'strict', where any species, measurement, - replicate and parameter has to comply in a global fashion. - To summarise, strict mode checks on: - - - Consistent usage of time - - Consistent concentration units for ALL concentrations - - Consistent volumetric unit including vessels - - Strict mode is of greates importance for kinetic modeling, differing scales - can lead to wrong results. However, the code will still run and only warnings - will be given. - - Args: - strict (bool, optional): _description_. Defaults to False. - - Returns: - Dict: Report on which units are inconsistent - Bool: Whether the document is consistent in units - """ - - # Initialize validator to use - cls = cls(scheme={}) - - # Now create a data structure of units per species for - # Measurements and Replicates - used_units = {} - used_time_units = {} - used_volume_units = {} - report, is_consistent = {}, True - - # Check vessel unit - cls._check_vessels(enzmldoc, used_volume_units) - - # Perform consistency check on parameters - cls._check_parameters(enzmldoc, used_time_units, used_volume_units) - - # Perform consistency check on species/replicates/measurements - cls._check_species( - enzmldoc, report, used_time_units, used_units, used_volume_units - ) - - if strict: - - if len(set(used_units.values())) != 1: - logger.warning( - f"Inconsistent usage of concentration units. All units should be the same, but found {set(used_units.values())}" - ) - - # Append to report - report["conc_units"] = cls._reformat_strict_report(used_units) - - if len(set(used_time_units.values())) != 1: - logger.warning( - f"Inconsistent usage of time units. All units should be the same, but found {set(used_time_units.values())}" - ) - - # Append to report - report["time_units"] = cls._reformat_strict_report(used_time_units) - - if len(set(used_volume_units.values())) != 1: - logger.warning( - f"Inconsistent usage of volume units. All units should be the same, but found {set(used_volume_units.values())}. In order to guarantee modelling platforms based on SBML to work properly, make sure that vessel volume unit is consistent with the one used in concentration. \n\nBest done by editing vessels using 'enzmldoc.getVessel(ID)' and an appropriate 'unit' assigned along with a rescaling." - ) - - # Append to report - report["volume_units"] = cls._reformat_strict_report(used_volume_units) - - if report: - is_consistent = False - - return is_consistent, report - - def _check_vessels(self, enzmldoc, used_volume_units: Dict[str, str]): - """Checks volumetric unit consitency of Vessels""" - - for vessel in enzmldoc.vessel_dict.values(): - vessel_unit = vessel.unitdef() - volume_part = self._get_baseunit_part(vessel_unit, kind="litre") - - if volume_part: - used_volume_units[vessel.id] = volume_part[0].get_name() - - def _check_parameters( - self, - enzmldoc, - used_time_units: Dict[str, str], - used_volume_units: Dict[str, str], - ) -> None: - """Checks time unit consistency of Parameters""" - - # Get all the time units used in parameters - # Export local parameters - params = [ - param - for reaction in enzmldoc.reaction_dict.values() - for param in reaction.model.parameters - if reaction.model and not param.is_global - ] - - # Global parameters - params += [param for param in enzmldoc.global_parameters.values()] - - for param in params: - if param.unit: - - # Get the time unit, if given - time_part = self._get_baseunit_part(param.unitdef(), "second") - - if time_part: - # When there is a time unit, store it - used_time_units[param.name] = time_part[0].get_name() - - # Get the volume unit, if given - volume_part = self._get_baseunit_part(param.unitdef(), "litre") - - if volume_part: - # When there is a time unit, store it - used_volume_units[param.name] = volume_part[0].get_name() - - def _check_species( - self, - enzmldoc, - report: Dict, - used_time_units: Dict[str, str], - used_units: Dict[str, str], - used_volume_units: Dict[str, str], - ): - """Checks consistency for species to measurements""" - - all_species = { - **enzmldoc.protein_dict, - **enzmldoc.reactant_dict, - **enzmldoc.complex_dict, - } - - for id, species in all_species.items(): - - # Get the unit expected from the species - unit = species.unitdef() - - # If there is no unit at the species, take the - # first from a measurement - if unit: - unit_name = unit._get_unit_name() - used_units[id] = unit_name - else: - logger.warning( - f"{species.__class__.__name__} {id} has no unit specified. Using measurement unit as reference now. Use 'strict' to force units at species.", - ) - used_units[id] = "No Unit" - unit_name = None - - # Initialize a dict to report on where units are inconsistent - log_dict = {"measurements": {}, "replicates": {}} - - for measurement in enzmldoc.measurement_dict.values(): - meas_species = measurement._getAllSpecies() - meas_data = meas_species.get(id) - - if meas_data: - - # Get measurement unit - meas_data = meas_species.get(id) - meas_unit = meas_data.unitdef() - meas_unit_name = meas_unit._get_unit_name() - meas_vol_unit = self._get_baseunit_part(meas_unit, "litre") - - if unit is None: - # Use meas unit as the expected one - unit = meas_unit - unit_name = meas_unit._get_unit_name() - - # Add to list of already used units - location = f"{measurement.id}/{meas_data.get_id()}" - used_units[location] = meas_unit_name - used_time_units[location] = measurement.global_time_unit - - # If there is a volumetric unit, add it - if meas_vol_unit: - used_volume_units[location] = meas_vol_unit[0].get_name() - - if unit_name != meas_unit_name: - # Report if there are inconsistencies - log_dict["measurements"][measurement.id] = { - "expected": unit._get_unit_name(), - "given": meas_unit_name, - } - - # Check replicates - for replicate in meas_data.replicates: - - # Get replicate units - repl_unit = replicate.data_unitdef() - repl_unit_name = repl_unit._get_unit_name() - repl_vol_unit = self._get_baseunit_part(repl_unit, "litre") - - # Add to list of already used units - location = ( - f"{measurement.id}/{meas_data.get_id()}/{replicate.id}" - ) - used_units[location] = meas_unit_name - used_time_units[location] = measurement.global_time_unit - - # If there is a volumetric unit, add it - if meas_vol_unit: - used_volume_units[location] = repl_vol_unit[0].get_name() - - if unit_name != repl_unit_name: - # Report if there are inconsistencies - log_dict["replicates"][measurement.id] = { - "expected": unit._get_unit_name(), - "given": repl_unit_name, - } - - # Add to the overall report - if log_dict["measurements"] or log_dict["replicates"]: - report[id] = {key: report for key, report in log_dict.items() if report} - - @staticmethod - def _reformat_strict_report(report: Dict[str, str]): - """Reformats a report for improved redability""" - - # Get all values that occur - values = list(set(report.values())) - nu_report = {} - - # Iterate over all those values and collect those entries that - # posses the said object - for value in values: - nu_report[value] = [loc for loc, unit in report.items() if unit == value] - - return nu_report - - @staticmethod - def _get_baseunit_part(unitdef: UnitDef, kind: str): - """Gets a specific part of a unitdef""" - - return list( - filter( - lambda baseunit: baseunit.kind == kind, - unitdef.units, - ) - ) diff --git a/pyenzyme/thinlayers/TL_Base.py b/pyenzyme/thinlayers/TL_Base.py deleted file mode 100644 index f808619..0000000 --- a/pyenzyme/thinlayers/TL_Base.py +++ /dev/null @@ -1,65 +0,0 @@ -# File: measurementData.py -# Project: thinlayers -# Author: Jan Range, Dr. Frank Bergmann, Prof. Dr. Johann Rohwer -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -from abc import ABC, abstractmethod -from typing import Union, Optional - -from pyenzyme.enzymeml.core.enzymemldocument import EnzymeMLDocument - - -class BaseThinLayer(ABC): - def __init__( - self, - path, - measurement_ids: Union[str, list] = "all", - init_file: Optional[str] = None, - ): - - if isinstance(measurement_ids, str) and measurement_ids != "all": - raise TypeError("Measurements must either be a list of IDs or 'all'") - - # Load the EnzymeML document to gather data - self.filepath = path - self.enzmldoc = EnzymeMLDocument.fromFile(path) - - # If an initialization schema is given, apply it here - if init_file: - self.enzmldoc.applyModelInitialization(init_file, to_values=True) - - # The following will extract the tim course data found in all measurements - self.sbml_xml = self.enzmldoc.toXMLString() - self.data = self.enzmldoc.exportMeasurementData(measurement_ids=measurement_ids) - - # Get all rate laws and store them in a dictionary - self.reaction_data = { - reaction.id: (reaction.model, reaction.getStoichiometricCoefficients()) - for reaction in self.enzmldoc.reaction_dict.values() - if reaction.model - } - - # Store global parameters if given - self.global_parameters = self.enzmldoc.global_parameters - - @abstractmethod - def optimize(self): - """ - The optimize method should only utilize the objects attributes 'data' and 'models' since these - should cover all necessary informations to run the optimization. In addition, the method could - also utilize the XML string if based in SBML. - - Finally, if an optimization has been performed the method should enter all estimated values as - well as optional statistics such as stdev or AKAIKE for instance to each parameter. Since the - models found in 'self.models' are immutable objects and thus references, the estimated parameters - will already be inserted to the model. - - See the example class below to see how the optimization could be implemented. - """ - raise NotImplementedError() - - @abstractmethod - def write(self) -> EnzymeMLDocument: - """Writes the estimated parameters back to a new EnzymeMLDocument""" - raise NotImplementedError() diff --git a/pyenzyme/thinlayers/TL_Copasi.py b/pyenzyme/thinlayers/TL_Copasi.py deleted file mode 100644 index 3c317dc..0000000 --- a/pyenzyme/thinlayers/TL_Copasi.py +++ /dev/null @@ -1,463 +0,0 @@ -# """ -# File: TL_Copasi.py -# Project: ThinLayers -# Author: Jan Range -# Author: Frank Bergmann -# License: BSD-2 clause -# ----- -# Last Modified: Wednesday June 23rd 2021 10:25:11 pm -# Modified By: Jan Range () -# ----- -# Copyright (c) 2021 Institute of Biochemistry and Technical Biochemistry Stuttgart -# """ - -""" -This module contains the COPASI ThinLayer: - -To use it, simply instantiate it using an EnzymeML Document. This will estimate all parameters of the enzyme ml -document (all temporary data will be stored in working_dir). - - >>> tl = ThinLayerCopasi(path='Model4.omex', outdir='./working_dir') - >>> tl.optimize() - - This would return a pandas dataframe with the fit found, to write it into a new document you'd use: - - >>> new_doc = tl.write() - - -In order to change the settings of the parameter estimation, or to change the loaded model we recommend to use -`basico `_. so after initializing the thinlayer, you'd load the model into basico. -For example here is how you'd switch the method to particle swarm: - - >>> from basico import * - >>> tl = ThinLayerCopasi(path='Model4.omex', outdir='./working_dir') - >>> set_current_model(tl.dm) - >>> set_task_settings(T.PARAMETER_ESTIMATION, - ... { - ... 'method': {'name': PE.PARTICLE_SWARM } - ... }) - -If the modle is loaded into basico, you can easily plot the results as well. The COPASI file (.cps) in the working -directory can also be directly used from the COPASI Graphical User Interface. - -""" - -import logging -from typing import Union, Optional - -from pyenzyme.thinlayers import BaseThinLayer -import os -import pandas as pd -from builtins import enumerate - -_COPASI_IMPORT_ERROR = None -try: - import COPASI -except ModuleNotFoundError as e: - _COPASI_IMPORT_ERROR = """ - ThinLayerCopasi is not available. - To use it, please install the following dependencies: - {} - """.format(e) - -log = logging.getLogger(__name__) - - -class ThinLayerCopasi(BaseThinLayer): - - def __init__(self, path, outdir, - measurement_ids: Union[str, list] = "all", - init_file: Optional[str] = None): - """ - Initializes a new instance of the COPASI thin layer, by loading the EnzymeML file - specified in `path` and creating a COPASI file (+ data) in `outdir`. - - :param path: the enzyme ml document to load - :param outdir: the output dir - :param measurement_ids: the measurement ids or all - :param init_file: optional initialization file for fit items - - """ - # check dependencies - if _COPASI_IMPORT_ERROR: - raise RuntimeError(_COPASI_IMPORT_ERROR) - - # initialize base class, let it do the reading - BaseThinLayer.__init__( - self, path, measurement_ids, init_file=init_file) - self.name = self.enzmldoc.name - self.working_dir = os.path.join(os.path.abspath(outdir), self.name) - self.cps_file = os.path.join(self.working_dir, self.name + '.cps') - if not os.path.exists(self.working_dir): - os.makedirs(self.working_dir) - - # now initialize the COPASI document from it - self.dm = COPASI.CRootContainer.addDatamodel() - try: - self.dm.importSBMLFromString(self.sbml_xml) - except COPASI.CCopasiException: - log.error(COPASI.CCopasiMessage.getAllMessageText()) - - # maps - self._init_maps() - - # variables - self.model = self.dm.getModel() - self.task = self.dm.getTask('Parameter Estimation') - self.task.setScheduled(True) - self.task.setUpdateModel(False) - self.task.setMethodType(COPASI.CTaskEnum.Method_LevenbergMarquardt) - self.problem = self.task.getProblem() - self.problem.setCalculateStatistics(True) - self.exp_set = self.problem.getExperimentSet() - - # read in experiments - self._import_experiments() - - # set all parameters as fit items - if init_file is None: - self._set_default_items() - else: - self._set_default_items_from_init_file() - - self.dm.saveModel(self.cps_file, True) - - def _init_maps(self): - """Initializes a map from SBML id to COPASI objects""" - self.sbml_id_map = {} - for item in self.dm.getModel().getMetabolites(): - self.sbml_id_map[item.getSBMLId()] = item - for item in self.dm.getModel().getModelValues(): - self.sbml_id_map[item.getSBMLId()] = item - for item in self.dm.getModel().getReactions(): - self.sbml_id_map[item.getSBMLId()] = item - for item in self.dm.getModel().getCompartments(): - self.sbml_id_map[item.getSBMLId()] = item - - def _get_cn_for_item(self, item): - """Resolves the given item to CN or None - - :param item: dictionary with 'name' and optionally 'reaction_id' - :type item: dict - :return: the CN if found, or None - :rtype: COPASI.CCommonName - """ - reaction = None - if 'reaction_id' in item and item['reaction_id'] in self.sbml_id_map: - reaction = self.sbml_id_map[item['reaction_id']] - - if 'name' in item: - if reaction is not None: - return reaction.getParameterObjects(item['name'])[0].getCN() - - mv = self.model.getModelValue(item['name']) - if mv is not None: - return mv.getInitialValueReference().getCN() - - metab = self.model.getMetabolite(item['name']) - if metab is not None: - return metab.getInitialConcentrationReference().getCN() - - return None - - def _import_experiments(self): - """ Writes all experiments to TSV file and performs mapping in COPASI - - :return: None - """ - for measurement_id, measurement_dict in self.data.items(): - sbml_ids = measurement_dict['data'].columns.to_list() - - data = measurement_dict['data'] - - for k, v in measurement_dict['initConc'].items(): - data = data.join(pd.DataFrame({'init_{0}'.format(k): [v[0]]})) - sbml_ids.append('init_{0}'.format(k)) - # validate value - if k in data.columns: - initial_value = data[data['time'] == 0.0][k] - if not initial_value.empty and float(initial_value) != v[0]: - log.warning(f'The initial value of "{k}" in experiment "{measurement_id}" ' - f'is inconsistent with the specified initial concentration: ' - f'{float(initial_value)} != {v[0]}') - - exp_filename = os.path.abspath(os.path.join( - self.working_dir, measurement_id + '.tsv')) - - data.to_csv(exp_filename, - sep='\t', header=True, index=False) - - exp = COPASI.CExperiment(self.dm) - exp.setObjectName( - '{0}'.format(measurement_id) - ) - exp.setFirstRow(1) - exp.setLastRow(data.shape[0] + 1) - exp.setHeaderRow(1) - exp.setFileName(exp_filename) - exp.setExperimentType(COPASI.CTaskEnum.Task_timeCourse) - exp.setSeparator('\t') - exp.setNumColumns(len(sbml_ids)) - exp = self.exp_set.addExperiment(exp) - info = COPASI.CExperimentFileInfo(self.exp_set) - info.setFileName(exp_filename) - - # Mapping from .tsv file to COPASI bindings - obj_map = exp.getObjectMap() - obj_map.setNumCols(data.shape[1]) - - for i, col in enumerate(sbml_ids): - if col == "time": - role = COPASI.CExperiment.time - obj_map.setRole(i, role) - - elif col in self.sbml_id_map.keys(): - role = COPASI.CExperiment.dependent - obj_map.setRole(i, role) - obj_map.setObjectCN(i, self.sbml_id_map[col] - .getConcentrationReference().getCN().getString()) - - elif col.startswith('init_') and col[5:] in self.sbml_id_map.keys(): - role = COPASI.CExperiment.independent - obj_map.setRole(i, role) - obj_map.setObjectCN(i, self.sbml_id_map[col[5:]] - .getInitialConcentrationReference().getCN().getString()) - - else: - role = COPASI.CExperiment.ignore - obj_map.setRole(i, role) - - def get_fit_parameters(self): - """ Returns all fit items specified as a list of dictionaries of the form - - [ { 'name': 'km', 'start': 0.1, 'lower': 1e-6, 'upper': 1e6, 'reaction_id': 'r1' } ... ] - - :return: list of dictionaries with fit items - :rtype: [{}] - """ - result = [] - for i in range(self.problem.getOptItemSize()): - p = self.problem.getOptItem(i) - assert (isinstance(p, COPASI.COptItem)) - obj = self.dm.getObject(p.getObjectCN()) - if obj is None: - continue - name = obj.getObjectName() if obj.getObjectType( - ) != "Reference" else obj.getObjectParent().getObjectName() - - r = obj.getObjectAncestor('Reaction') - reaction_id = r.getSBMLId() if r else None - - result.append({ - 'name': name, - 'start': p.getStartValue(), - 'lower': p.getLowerBoundValue(), - 'upper': p.getUpperBoundValue(), - 'reaction_id': reaction_id - }) - return result - - def set_fit_parameters(self, fit_parameters): - """Replaces all fit items with the ones specified - - :param fit_parameters: list of dictionaries of the same form as returned by get_fit_parameters - :return: None - """ - assert (isinstance(self.problem, COPASI.CFitProblem)) - assert (isinstance(self.task, COPASI.CFitTask)) - assert (isinstance(self.dm, COPASI.CDataModel)) - - for i in range(self.problem.getOptItemSize()): - self.problem.removeOptItem(0) - - for item in fit_parameters: - if 'name' not in item: - continue - - cn = self._get_cn_for_item(item) - if cn is None: - continue - - fit_item = self.problem.addFitItem(cn) - assert (isinstance(fit_item, COPASI.CFitItem)) - if 'lower' in item: - fit_item.setLowerBound(COPASI.CCommonName(str(item['lower']))) - if 'upper' in item: - fit_item.setUpperBound(COPASI.CCommonName(str(item['upper']))) - if 'start' in item: - fit_item.setStartValue(float(item['start'])) - - def _get_result(self): - """Utility function adding a value column to the fit items - - :return: pandas dataframe with the result of the fit - :rtype: pandas.DataFrame - """ - fit_items = self.get_fit_parameters() - new_values = [val for val in self.problem.getSolutionVariables()] - sd_values = [val for val in self.problem.getVariableStdDeviations()] - if len(fit_items) != len(new_values): - logging.error('No results available yet, run `optimize` first.') - return None - - for i, vals in enumerate(fit_items): - vals['value'] = new_values[i] - vals['std_deviation'] = sd_values[i] - - df = pd.DataFrame(data=fit_items).set_index('name') - return df - - def optimize(self, update_model=False): - """ Carries out the Parameter estimation - - :param update_model: optional argument, indicating whether to - update the model, so another optimization run would start - with the solution found from the first run. - - :return: Pandas DataFrame with the results - - """ - # run optimization - self.task.setUpdateModel(update_model) - if not self.task.initializeRaw(COPASI.CCopasiTask.OUTPUT_UI): - log.error(COPASI.CCopasiMessage.getFirstMessage().getAllMessageText()) - if not self.task.processRaw(True): - log.error(COPASI.CCopasiMessage.getFirstMessage().getAllMessageText()) - self.task.restore() - - return self._get_result() - - def write(self): - """Writes the estimated parameters to a copy of the EnzymeMLDocument""" - - nu_enzmldoc = self.enzmldoc.copy(deep=True) - - assert (isinstance(self.problem, COPASI.CFitProblem)) - results = self.problem.getSolutionVariables() - if self.problem.getOptItemSize() != results.size(): - log.error('The optimization was not run yet, no update can be made') - return nu_enzmldoc - - log.debug('OBJ: {0}'.format(self.problem.getSolutionValue())) - log.debug('RMS: {0}'.format(self.problem.getRMS())) - - for i in range(self.problem.getOptItemSize()): - item = self.problem.getOptItem(i) - obj = self.dm.getObject(item.getObjectCN()) - if obj is None: - continue - - name = obj.getObjectName() if obj.getObjectType( - ) != 'Reference' else obj.getObjectParent().getObjectName() - - value = results.get(i) - - reaction = obj.getObjectAncestor('Reaction') - if reaction is not None: - enz_reaction = nu_enzmldoc.getReaction(reaction.getSBMLId()) - if enz_reaction: - parameter = enz_reaction.model.getParameter(name) - parameter.value = value - else: - p = nu_enzmldoc.global_parameters.get(name) - p.value = value - - return nu_enzmldoc - - def _set_default_items(self): - """ Initializes fit items from the local parameters specified in the reaction_data - - :return: None - """ - for reaction_id, data in self.reaction_data.items(): - r = self.sbml_id_map[reaction_id] - assert (isinstance(r, COPASI.CReaction)) - for p in self.reaction_data[reaction_id][0].parameters: - obj = r.getParameterObjects(p.name)[0].getObject( - COPASI.CCommonName('Reference=Value')) - cn = obj.getCN() - fit_item = self.problem.addFitItem(cn) - assert (isinstance(fit_item, COPASI.CFitItem)) - fit_item.setLowerBound(COPASI.CCommonName(str(1e-6))) - fit_item.setUpperBound(COPASI.CCommonName(str(1e6))) - fit_item.setStartValue(float(p.value)) - - def _set_default_items_from_init_file(self): - """ Use this to create a default template, when an init file was passed to the thin layer - and it has been already applied - - :return: None - """ - assert (isinstance(self.problem, COPASI.CFitProblem)) - - # remove old items - while self.problem.getOptItemSize() > 0: - self.problem.removeOptItem(0) - - for global_param in self.global_parameters.values(): - - if not global_param.lower or not global_param.upper: - # nan values used to indicate that this should not be fitted - continue - - mv = self.dm.getModel().getModelValue(global_param.name) - if not mv: - log.warning( - "No global parameter {0} in the model".format(global_param.name)) - continue - - value = global_param.value if global_param.value else global_param.initial_value - - if not value: - raise ValueError( - f"Neither initial_value nor value given for parameter {global_param.name} in global parameters" - ) - - cn = mv.getInitialValueReference().getCN() - fit_item = self.problem.addFitItem(cn) - assert (isinstance(fit_item, COPASI.CFitItem)) - fit_item.setLowerBound(COPASI.CCommonName(str(global_param.lower))) - fit_item.setUpperBound(COPASI.CCommonName(str(global_param.upper))) - fit_item.setStartValue(float(value)) - - for reaction_id, (model, _) in self.reaction_data.items(): - r = self.sbml_id_map[reaction_id] - assert (isinstance(r, COPASI.CReaction)) - for p in model.parameters: - if p.is_global: - continue - - if not p.lower or not p.upper: - # nan values used to indicate that this should not be fitted - continue - - value = p.value if p.value else p.initial_value - - if not value: - raise ValueError( - f"Neither initial_value nor value given for parameter {p.name} in reaction {reaction_id}" - ) - - obj = r.getParameterObjects(p.name)[0].getObject( - COPASI.CCommonName('Reference=Value')) - cn = obj.getCN() - fit_item = self.problem.addFitItem(cn) - assert (isinstance(fit_item, COPASI.CFitItem)) - fit_item.setLowerBound(COPASI.CCommonName(str(p.lower))) - fit_item.setUpperBound(COPASI.CCommonName(str(p.upper))) - fit_item.setStartValue(float(value)) - - -if __name__ == '__main__': - this_dir = os.path.dirname(__file__) - filename = os.path.join(this_dir + "/../../", - "examples/ThinLayers/COPASI/3IZNOK_Simulated.omex") - assert os.path.exists(filename) - - thin_layer = ThinLayerCopasi( - path=filename, - outdir='./out' - ) - - thin_layer.optimize() - thin_layer.write() diff --git a/pyenzyme/thinlayers/TL_Pysces.py b/pyenzyme/thinlayers/TL_Pysces.py deleted file mode 100644 index c6cd34e..0000000 --- a/pyenzyme/thinlayers/TL_Pysces.py +++ /dev/null @@ -1,375 +0,0 @@ -# File: TL_Pysces.py -# Project: ThinLayers -# Author: Johann Rohwer (j.m.rohwer@gmail.com) -# License: BSD-2 clause -# Copyright (c) 2022 Stellenbosch University - -import numpy as np -import pandas as pd -from matplotlib import pyplot as plt -import os -import math - -from typing import Union, Optional -from pyenzyme.thinlayers.TL_Base import BaseThinLayer -from pyenzyme.enzymeml.core.exceptions import SpeciesNotFoundError - -import io -from contextlib import redirect_stdout - -_PYSCES_IMPORT_ERROR = None -_PYSCES_IMPORT_STREAM = io.StringIO() -try: - with redirect_stdout(_PYSCES_IMPORT_STREAM): - import pysces - import lmfit -except ModuleNotFoundError as e: - _PYSCES_IMPORT_ERROR = """ - ThinLayerPysces is not available. - To use it, please install the following dependencies: - {} - """.format( - e - ) - - -class ThinLayerPysces(BaseThinLayer): - def __init__( - self, - path, - model_dir: str, - measurement_ids: Union[str, list] = "all", - init_file: Optional[str] = None, - ): - # first time a pysces thinlayer is created, print the import messages - global _PYSCES_IMPORT_STREAM - if _PYSCES_IMPORT_STREAM is not None: - print(_PYSCES_IMPORT_STREAM.getvalue()) - _PYSCES_IMPORT_STREAM = None - - # check dependencies - if _PYSCES_IMPORT_ERROR: - raise RuntimeError(_PYSCES_IMPORT_ERROR) - - super().__init__(path, measurement_ids, init_file) - - # Convert model to PSC and get experimental data - self._get_pysces_model(model_dir) - self._get_experimental_data() - - # ! Interface - def optimize(self, method="leastsq"): - """Performs optimization of the given parameters - - Args: - method (str): lmfit optimization algorithm, see https://lmfit.github.io/lmfit-py/fitting.html#choosing-different-fitting-methods - """ - - # Initialize the model parameters - parameters = self._initialize_parameters() - - # Perform optimization - self.minimizer = lmfit.Minimizer(self._calculate_residual, parameters) - - # Set estimated parameters to self - self.parameters = parameters - - return self.minimizer.minimize(method=method) - - def write(self): - """Writes the estimated parameters to a copy of the EnzymeMLDocument""" - - nu_enzmldoc = self.enzmldoc.copy(deep=True) - results = self.minimizer.result.params.valuesdict() - - for name, value in results.items(): - # names contain information about reaction and parameter - # Pattern: rX_name - - splitted = name.split("_") - reaction_id = splitted[0] - parameter_id = "_".join(splitted[1::]) - - # Fetch reaction and parameter - try: - reaction = nu_enzmldoc.getReaction(reaction_id) - except SpeciesNotFoundError: - global_param = nu_enzmldoc.global_parameters.get(name) - global_param.value = value - continue - - if reaction.model: - parameter = reaction.model.getParameter(parameter_id) - parameter.value = value - else: - raise TypeError(f"Reaction {reaction_id} has no model to add values to") - - return nu_enzmldoc - - # ! Helper methods - def _initialize_parameters(self): - """Adds all parameters to an lmfit Parameters instance. - - Raises: - ValueError: Raised when parameter posesses neither an initial value or value attribute - """ - - # Initialize lmfit parameters - parameters = lmfit.Parameters() - - # Add global parameters - for global_param in self.global_parameters.values(): - - # need to also catch zero initial values - if global_param.value is not None: - parameters.add( - f"{global_param.name}", - global_param.value, - vary=not global_param.constant, - min=global_param.lower, - max=global_param.upper, - ) - - elif global_param.initial_value is not None: - parameters.add( - f"{global_param.name}", - global_param.initial_value, - vary=not global_param.constant, - min=global_param.lower, - max=global_param.upper, - ) - - else: # parameter is - raise ValueError( - f"Neither initial_value nor value given for parameter {global_param.name} in global parameters" - ) - - # Consistency check - for reaction_id, (model, _) in self.reaction_data.items(): - - # Apply parameters to lmfit parameters - for parameter in model.parameters: - - if parameter.is_global: - continue - - # need to also catch zero initial values - if parameter.value is not None: - parameters.add( - f"{reaction_id}_{parameter.name}", - parameter.value, - vary=not parameter.constant, - min=parameter.lower, - max=parameter.upper, - ) - elif parameter.initial_value is not None: - parameters.add( - f"{reaction_id}_{parameter.name}", - parameter.initial_value, - vary=not parameter.constant, - min=parameter.lower, - max=parameter.upper, - ) - else: # parameter is - raise ValueError( - f"Neither initial_value nor value given for parameter {parameter.name} in reaction {reaction_id}" - ) - - return parameters - - def _get_experimental_data(self): - """Extract measurement data from the EnzymeML document""" - - # Initialize data structure to store experimental data - raw_data, self.inits = [], [] - - for measurement_data in self.data.values(): - - # Gather data - data: pd.DataFrame = measurement_data["data"] - init_concs: dict = measurement_data["initConc"] - - # Collect raw_data - raw_data.append(data.drop("time", axis=1)) - - # Collect initial concentrations for simulation - init_mapping = { - "time": data.time, - **{species_id: value for species_id, (value, _) in init_concs.items()}, - } - - self.inits.append(init_mapping) - - # Concatenate and clean all DataFrames - self.experimental_data = pd.concat(raw_data) - self.experimental_data.reset_index(drop=True, inplace=True) - self.cols = list(self.experimental_data.columns) - - def _get_pysces_model(self, model_dir: str): - """Converts an EnzymeMLDocument to a PySCeS model.""" - - # Set up the PySCeS directory structure - model_dir = os.path.join(model_dir) - os.makedirs(model_dir, exist_ok=True) - - # Write the raw XMLString to the dir - sbmlfile_name = f"{self.enzmldoc.name.replace(' ', '_')}.xml" - sbmlfile_path = os.path.join(model_dir, sbmlfile_name) - with open(sbmlfile_path, "w") as file: - file.write(self.sbml_xml) - - # First, convert the EnzymeML model to a PySCeS model - pscfile_path = sbmlfile_path + ".psc" - if not ( - (os.path.exists(pscfile_path)) - and (os.path.getmtime(pscfile_path) > os.path.getmtime(self.filepath)) - ): - pysces.interface.convertSBML2PSC(sbmlfile_name, sbmldir=model_dir, pscdir=model_dir) - - # Finally, load the PSC model - self.model = pysces.model(sbmlfile_name, dir=model_dir) - - # work around https://github.com/PySCeS/pysces/issues/79 - if ( - self.model.__KeyWords__["Species_In_Conc"] - and self.model.__KeyWords__["Output_In_Conc"] - ): - for comp in self.model.__compartments__: - self.model.__compartments__[comp]["size"] = 1.0 - setattr(self.model, comp, 1.0) - setattr(self.model, f"{comp}_init", 1.0) - - def _calculate_residual(self, parameters) -> np.ndarray: - """Function that will be optimized""" - - simulated_data = self._simulate_experiment(parameters) - simulated_data = simulated_data.drop( - simulated_data.columns.difference(self.cols), axis=1 - ) - - return np.array(self.experimental_data - simulated_data) - - def _simulate_experiment(self, parameters): - """Performs simulation based on the PySCeS model""" - - self.model.SetQuiet() - self.model.__dict__.update(parameters.valuesdict()) - - # intialize collection - output = [] - - # Now iterate over all initial concentrations and simulate accordingly - for init_concs in self.inits: - for species_id, value in init_concs.items(): - - if type(value) in [float, int] and value == 0: - # Catch initial values with zero and set them ot a small number - value = 1.0e-9 - - if species_id in self.model.species: - # Add if given in the model - setattr(self.model, f"{species_id}_init", value) - elif species_id == "time": - # Add time to the model - time_values, num_reps = self._get_replicate_info(value) - self.model.sim_time = time_values - else: - setattr(self.model, species_id, value) - - # Simulate the experiment and save results - self.model.Simulate(userinit=1) - for i in range(num_reps): - output.append( - [getattr(self.model.sim, species) for species in self.model.species] - ) - - return pd.DataFrame(np.hstack(output).T, columns=self.model.species) - - def _get_replicate_info(self, time): - i = 1 - # get index in time series where 2nd replicate starts - while i < len(time) and time[i] > time[i - 1]: - i += 1 - num_reps = len(time) // i - if num_reps > 1: - for k in range(1, num_reps): - assert np.allclose( - time[:i], time[k * i : k * i + i] - ), "Time points of replicates don't match!" - return (time[:i].values, num_reps) - - def plot_fit(self): - """Plots the simulation and data for the fitted parameters.""" - - # check that optimization has been done - assert hasattr(self, "minimizer") and hasattr( - self.minimizer, "result" - ), "Please run optimize() first." - - measurements = list(self.data.keys()) - num = len(measurements) - numcols = 3 - numrows = math.ceil(num / numcols) - fig, ax = plt.subplots(nrows=numrows, ncols=numcols, figsize=(9, 2.8 * numrows)) - for i in range(num): - if num <= numcols: - theax = ax[i] - else: - theax = ax[i // numcols, i % numcols] - self._plot_measurement(measurements[i], i, ax=theax) - # remove empty axes - if num % numcols != 0: - empty = numcols - num % numcols - for i in range(-empty, 0): - if num <= numcols: - ax[i].set_visible(False) - else: - ax[num // numcols, i].set_visible(False) - fig.tight_layout() - - def _plot_measurement(self, meas_id, i=0, ax=None): - """Plots a single measurement with simulation.""" - time_unit = self.enzmldoc.measurement_dict[meas_id].global_time_unit - conc_unit = self.enzmldoc.reactant_dict[self.cols[0]].unit - if not ax: - fig, ax = plt.subplots() - sim = self._simulate_measurement(meas_id, self.minimizer.result.params, self.model) - sim.plot("Time", self.cols, ax=ax, legend=False) - if i == 0: - ax.figure.legend(loc='upper left', bbox_to_anchor=(1.0, 0.96)) - ax.set_prop_cycle(None) - self.data[meas_id]["data"].plot("time", self.cols, style="^", legend=False, ax=ax) - ax.set_title(meas_id) - ax.set_xlabel(f"Time ({time_unit})") - ax.set_ylabel(f"Concentration ({conc_unit})") - - def _simulate_measurement(self, meas_id, parameters, model): - """Performs simulation based on the PySCeS model""" - - data = self.data[meas_id]["data"] - model.SetQuiet() - model.__dict__.update(parameters.valuesdict()) - - # Now iterate over all initial concentrations and simulate accordingly - init_concs = self._map_inits(meas_id) - for species_id, value in init_concs.items(): - if species_id in model.species: - # Add if given in the model - setattr(model, f"{species_id}_init", value) - else: - setattr(model, species_id, value) - - # Simulate the experiment and save results - end_time = data.time.iloc[-1] - # simulate 200 points for smooth curve - model.doSim(end=end_time, points=200) - result = pd.DataFrame( - np.array([getattr(model.sim, species) for species in self.cols]).T, - columns=self.cols, - ) - result["Time"] = self.model.sim.Time - return result - - def _map_inits(self, meas_id): - init_concs = self.data[meas_id]["initConc"] - return {species_id: value for species_id, (value, _) in init_concs.items()} diff --git a/pyenzyme/thinlayers/TL_Strenda.py b/pyenzyme/thinlayers/TL_Strenda.py deleted file mode 100644 index 169fefa..0000000 --- a/pyenzyme/thinlayers/TL_Strenda.py +++ /dev/null @@ -1,269 +0,0 @@ -# File: TL_Strenda.py -# Project: ThinLayers -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -import xmltodict -import json -import itertools -import numpy as np - -from typing import Dict, List, Tuple, Optional - -from pyenzyme.enzymeml.core.enzymemldocument import EnzymeMLDocument -from pyenzyme.enzymeml.core.measurement import Measurement -from pyenzyme.enzymeml.core.reactant import Reactant -from pyenzyme.enzymeml.core.protein import Protein -from pyenzyme.enzymeml.core.enzymereaction import EnzymeReaction -from pyenzyme.enzymeml.core.vessel import Vessel -from pyenzyme.enzymeml.models.michaelismenten import MichaelisMentenKCat - - -class ThinLayerStrendaML(object): - - """Thin Layer implementation to convert an EnzymeML document into a StrendaML document.""" - - @classmethod - def toEnzymeML(cls, path: str, out_dir: str): - """Reads a STRENDA-DB XML entry and processes it to an EnzymeML document. - - Args: - path (str): Path to the STRENDA-DB XML file. - out_dir (str): Directory to which the resulting EnzymeML file will be written. - """ - - # Initialize Thin layer - cls = cls() - - # Read the STRENDA ML file - metadata = cls._read_strendaml(path) - cls.dataset = metadata["datasets"]["dataset"] - assay_conditions = cls.dataset["assayConditions"] - - # Initialize the ENzymeML document - cls.enzmldoc = EnzymeMLDocument( - name=metadata.get("strendaId"), - doi=metadata.get("doi"), - ) - - # Set up a playeholder vessel - vessel = Vessel(name="Vessel") - cls.vessel_id = cls.enzmldoc.addVessel(vessel) - - # Get the reaction first and build it while parsing species - cls._setup_reaction() - - # Get small compounds and build reaction - small_compounds = assay_conditions["smallCompound"] - init_conc, reactant_ref = cls._parse_small_compounds(small_compounds) - - # Get the protein - protein = metadata["protein"] - cls._parse_protein(protein) - - # Get the Michaelis-Menten-Model - cls._get_kinetic_model(reactant_ref) - - # Use the initial concentrations to construct measurement setups - cls._setup_measurements(init_conc) - - # Finally, add the reaction to the document - cls.enzmldoc.addReaction(cls.reaction) - - cls.enzmldoc.toFile(out_dir) - - def _read_strendaml(self, path: str): - """Reads and extracts the necessary data for the thin layer""" - - # Parse XML string and clean faulty line - xml_string = open(path).read() - xml_string = xml_string.replace( - '', '' - ) - - # Parse XML to JSON and dict - dict_data = xmltodict.parse(xml_string) - json_string = json.dumps(dict_data) - - return json.loads(json_string.replace("@", ""))["experiment"] - - def _setup_reaction(self): - """Sets up a reaction objectm which will later be used to specify the equation and adds it.""" - - # Get the assay conditions, if given - ph, _ = self._get_assay_conditions("pH", self.dataset) - temp_val, temp_unit = self._get_assay_conditions("temperature", self.dataset) - - self.reaction = EnzymeReaction( - name=self.dataset.get("name"), - reversible=False, - temperature=temp_val, - temperature_unit=temp_unit, - ph=ph, - ) - - def _get_assay_conditions( - self, key: str, dataset: dict - ) -> Tuple[Optional[float], Optional[str]]: - """Returns miscellaneous parameters from the 'value' element found in the assayConditions.""" - - for obj in dataset["assayConditions"]["value"]: - if obj["name"] == key: - return (obj.get("value"), obj.get("unit")) - - return None, None - - def _parse_small_compounds(self, small_compounds: List[dict]): - """Parses small compounds to Reactant objects""" - - # Keep track of range measurements and the references - initial_concentrations = [] - reactant_ref = {} - - # Keep a mapping for the different roles to be added to the reaction - role_mapping = { - "Substrate": self.reaction.addEduct, - "Product": self.reaction.addProduct, - } - - for small_compound in small_compounds: - - # Create Reactant and add it to the document - reactant_id = self.enzmldoc.addReactant( - Reactant( - name=small_compound.get("iupac"), - smiles=small_compound.get("smiles"), - inchi=small_compound.get("inchi"), - vessel_id=self.vessel_id, - ) - ) - - # Store substance ID - reactant_reference = small_compound["refId"] - reactant_ref[reactant_reference] = reactant_id - - # Add it to the reaction - role = small_compound["role"] - stoichiometry = float(small_compound["stoichiometry"]) - role_mapping[role]( - species_id=reactant_id, - stoichiometry=stoichiometry, - enzmldoc=self.enzmldoc, - ) - - init_conc = small_compound["value"] - unit = init_conc["unit"].replace("micro", "u") - - if init_conc["type"] == "Concentration": - value = float(init_conc["value"]) - initial_concentrations.append([(reactant_id, value, unit)]) - - elif init_conc["type"] == "ConcentrationRange": - start_value = float(init_conc["startValue"]) - end_value = float(init_conc["endValue"]) + 0.1 - val_range = np.linspace(start_value, end_value, 10) - - initial_concentrations.append( - [(reactant_id, round(val, 4), unit) for val in val_range if val > 0] - ) - - return initial_concentrations, reactant_ref - - def _parse_protein(self, protein: dict): - - # Get and clean some parameters - sequence = protein.get("originalSequence") - uniprotid = protein.get("uniprotidKbAC") - - if sequence == "null": - sequence = None - if uniprotid == "N.A.": - uniprotid = None - - self.protein_id = self.enzmldoc.addProtein( - Protein( - name=protein.get("name"), - vessel_id="v0", - organism=protein.get("organism"), - sequence=sequence, - organism_tax_id=protein.get("texonId"), - uniprotid=uniprotid, - ) - ) - - self.reaction.addModifier( - species_id=self.protein_id, - stoichiometry=1.0, - constant=True, - enzmldoc=self.enzmldoc, - ) - - def _setup_measurements(self, init_conc: List[Tuple[str, float, str]]): - """Sets up individual measurements by permuting given initial concentrations, if multiples of""" - - # Permute all initial concentrations - for index, init_conc_set in enumerate(itertools.product(*init_conc)): - - # Initialize measurement - measurement = Measurement(name=f"measurement_{index+1}") - - # Add protein to measurement - protein_conc, protein_unit = self._get_assay_conditions( - "enzymeConcentration", self.dataset - ) - - measurement.addData( - protein_id="p0", - init_conc=protein_conc, - unit=protein_unit.replace("micro", "u"), - ) - - for species_id, value, unit in init_conc_set: - - species = self.enzmldoc.getAny(species_id) - reactant_id, protein_id = None, None - - if isinstance(species, Protein): - protein_id = species_id - elif isinstance(species, Reactant): - reactant_id = species_id - - # Add the data to the measurement - measurement.addData( - unit=unit, - init_conc=value, - reactant_id=reactant_id, - protein_id=protein_id, - ) - - # Finally, add the measurement to the document - self.enzmldoc.addMeasurement(measurement) - - def _get_kinetic_model(self, reactant_ref: Dict[str, str]): - """Extracts the kinetic model from the dataset""" - - # Get parameters and species ID from data structure - result_set = self.dataset["resultSet"]["kineticParameter"] - species_id = reactant_ref[result_set.get("substanceId")] - parameters = result_set["value"] - - for parameter in parameters: - if parameter["name"] == "kcat": - kcat = {"unit": "1 / s", "value": float(parameter["value"])} - elif parameter["name"] == "km": - km = { - "unit": parameter["unit"].replace("micro", "u"), - "value": float(parameter["value"]), - } - - # Create the model and add it to the reaction - model = MichaelisMentenKCat( - substrate=species_id, - protein="p0", - enzmldoc=self.enzmldoc, - k_m=km, - k_cat=kcat, - ) - - self.reaction.setModel(model, self.enzmldoc) diff --git a/pyenzyme/thinlayers/__init__.py b/pyenzyme/thinlayers/__init__.py deleted file mode 100644 index 933eda1..0000000 --- a/pyenzyme/thinlayers/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -# File: __init__.py -# Project: thinlayers -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -from .TL_Base import BaseThinLayer -from .TL_Strenda import ThinLayerStrendaML -from .TL_Pysces import ThinLayerPysces -from .TL_Copasi import ThinLayerCopasi diff --git a/pyenzyme/utils/__init__.py b/pyenzyme/utils/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/pyenzyme/utils/log.py b/pyenzyme/utils/log.py deleted file mode 100644 index 4b35d01..0000000 --- a/pyenzyme/utils/log.py +++ /dev/null @@ -1,73 +0,0 @@ -# File: log.py -# Project: utils -# Author: Jan Range -# License: BSD-2 clause -# Copyright (c) 2022 Institute of Biochemistry and Technical Biochemistry Stuttgart - -import logging -import sys - -from io import StringIO - - -def setup_custom_logger(name, log_stream: StringIO, level=logging.DEBUG): - - formatter = logging.Formatter(fmt="%(levelname)s - %(message)s") - - handler = logging.StreamHandler(stream=sys.stderr) - handler.setFormatter(formatter) - handler.setLevel(logging.INFO) - - string_formatter = logging.Formatter( - fmt="%(asctime)s - %(message)s", datefmt="%Y-%m-%d,%H:%M" - ) - string_handler = logging.StreamHandler(log_stream) - string_handler.setFormatter(string_formatter) - string_handler.setLevel(logging.NOTSET) - - logger = logging.getLogger(name) - logger.setLevel(level) - logger.propagate = False - logger.addHandler(handler) - logger.addHandler(string_handler) - - return logger - - -def log_change( - logger: logging.Logger, - class_name: str, - id: str, - name: str, - old_value: str, - new_value: str, -): - """Logs change of an object""" - logger.debug( - f"{class_name} '{id}' - {name} was set from '{old_value}' to '{new_value}'" - ) - - -def log_new( - logger: logging.Logger, class_name: str, id: str, name: str, new_value: str -): - """Logs initialization of an object""" - - logger.debug(f"{class_name} '{id}' - '{name}' was set to '{new_value}'") - - -def log_object( - logger: logging.Logger, - obj, -): - """Logs an object when it is added to the EnzymeML document""" - - # Handle objects without an ID - try: - id = obj.id - except AttributeError: - id = obj.get_id() - - for attr_name, value in obj.dict(exclude_none=True).items(): - if isinstance(value, dict) is False and isinstance(value, list) is False: - log_new(logger, type(obj).__name__, id, attr_name, value) diff --git a/pyenzyme/utils/rest_examples.py b/pyenzyme/utils/rest_examples.py deleted file mode 100644 index 4bea61f..0000000 --- a/pyenzyme/utils/rest_examples.py +++ /dev/null @@ -1,174 +0,0 @@ -def create_full_example(): - return { - "name": "Example Document", - "pubmedid": "00000000", - "url": "https://www.some-url.com/", - "doi": "10.1XXX/XXXXXX-XXX-XXXX-X", - "creators": { - "a0": { - "given_name": "Max", - "family_name": "Mustermann", - "mail": "max.mustermann@mustermann.com", - } - }, - "vessels": { - "v0": { - "name": "Tube vessel", - "volume": 0.015, - "unit": "l", - "constant": True, - } - }, - "proteins": { - "p0": { - "name": "Protein", - "vessel_id": "v0", - "init_conc": 5.0, - "constant": True, - "unit": "mmole / l", - "ontology": "SBO:0000252", - "sequence": "HLPMV", - "ecnumber": "1.1.1.1", - "organism": "E.coli", - "organism_tax_id": "27367", - "uniprotid": "P02357", - } - }, - "complexes": { - "c0": { - "name": "Complex", - "vessel_id": "v0", - "init_conc": 10.0, - "constant": False, - "unit": "mmole / l", - "ontology": "SBO:0000296", - "participants": ["s0", "p0"], - } - }, - "reactants": { - "s0": { - "name": "Reactant", - "vessel_id": "v0", - "init_conc": 10.0, - "constant": False, - "unit": "mmole / l", - "ontology": "SBO:0000247", - "smiles": "[H]O[H]", - "inchi": "InChI:HJJH", - "chebi_id": "CHEBI:09823", - }, - "s1": { - "name": "oxonium", - "vessel_id": "v0", - "init_conc": 10.0, - "constant": False, - "unit": "mmole / l", - "ontology": "SBO:0000247", - "smiles": "[H][O+]([H])[H]", - "inchi": "InChI=1S/H2O/h1H2/p+1", - "chebi_id": "CHEBI:29412", - }, - }, - "reactions": { - "r0": { - "name": "string", - "reversible": True, - "temperature": 200, - "temperature_unit": "K", - "ph": 7.0, - "ontology": "SBO:0000176", - "id": "r0", - "meta_id": "METAID_R0", - "model": { - "name": "Kinetic Model", - "equation": "s0 * x", - "parameters": [ - { - "name": "x", - "value": 10.0, - "unit": "1 / s", - "stdev": 0.1, - "initial_value": 10.0, - } - ], - }, - "educts": [ - { - "species_id": "s0", - "stoichiometry": 1.0, - "constant": False, - "ontology": "SBO:0000015", - } - ], - "products": [ - { - "species_id": "s1", - "stoichiometry": 1.0, - "constant": False, - "ontology": "SBO:0000011", - } - ], - "modifiers": [ - { - "species_id": "p0", - "stoichiometry": 1.0, - "constant": True, - "ontology": "SBO:0000013", - } - ], - } - }, - "measurements": { - "m0": { - "name": "SomeMeasurement", - "temperature": 4.0, - "temperature_unit": "K", - "ph": 7.0, - "species_dict": { - "reactants": { - "s0": { - "init_conc": 10.0, - "unit": "mmole / l", - "measurement_id": "m0", - "reactant_id": "s0", - "replicates": [ - { - "id": "repl_s0_0", - "species_id": "s0", - "data_type": "conc", - "data_unit": "mmole / l", - "time_unit": "s", - "time": [1.0, 2.0, 3.0, 4.0], - "data": [1.0, 1.0, 1.0, 1.0], - "is_calculated": False, - } - ], - } - }, - "proteins": { - "p0": { - "init_conc": 10.0, - "unit": "mmole / l", - "measurement_id": "m0", - "protein_id": "p0", - "replicates": [ - { - "id": "repl_p0_0", - "species_id": "p0", - "data_type": "conc", - "data_unit": "mmole / l", - "time_unit": "s", - "time": [1.0, 2.0, 3.0, 4.0], - "data": [1.0, 1.0, 1.0, 1.0], - "is_calculated": False, - } - ], - } - }, - }, - "global_time": [1.0, 2.0, 3.0, 4.0], - "global_time_unit": "s", - "id": "m0", - } - }, - } diff --git a/pyenzyme_server.py b/pyenzyme_server.py deleted file mode 100644 index 6a7d92f..0000000 --- a/pyenzyme_server.py +++ /dev/null @@ -1,405 +0,0 @@ -import os - -from fastapi import FastAPI, UploadFile, File, Request, Body -from starlette.responses import FileResponse, JSONResponse, HTMLResponse -from starlette.background import BackgroundTasks -from fastapi.templating import Jinja2Templates - -from pyenzyme.enzymeml.core.enzymemldocument import EnzymeMLDocument -from pyenzyme.enzymeml.core.measurement import Measurement -from pyenzyme.enzymeml.tools.validator import EnzymeMLValidator -from pyenzyme.utils.rest_examples import create_full_example -from pyenzyme.enzymeml.core.exceptions import ( - MeasurementDataSpeciesIdentifierError, - ECNumberError, - ChEBIIdentifierError, - DataError, - SpeciesNotFoundError, - UniProtIdentifierError, - ParticipantIdentifierError, -) - - -# * Settings -app = FastAPI(title="PyEnzyme REST-API", version="1.2", docs_url="/") - - -templates = Jinja2Templates(directory="static") - - -# * Functions - - -def remove_file(path: str) -> None: - os.unlink(path) - - -# ! Basic operations - - -@app.post( - "/create", - summary="Creates an EnzymeML document based on a JSON body", - description="Please note, in the schema 'aditionalPropsX' represent the individual IDs of the entities. However, these will not be included, since PyEnzyme takes car for that. Thus, feel free to use any string you like. Returns a binary file, which is an OMEX archive", - tags=["Basic operations"], -) -async def create_EnzymeML( - background_tasks: BackgroundTasks, - enzmldoc: EnzymeMLDocument = Body(..., example=create_full_example()), -): - - # Recreate the EnzymeML document - nu_enzmldoc = EnzymeMLDocument.fromJSON(enzmldoc.json()) - - # Write the new EnzymeML file - dirpath = "." - file_name = f"{nu_enzmldoc.name.replace(' ', '_')}.omex" - file_path = os.path.join(dirpath, file_name) - - nu_enzmldoc.toFile(dirpath, name=nu_enzmldoc.name) - - try: - response = FileResponse(file_path, filename=file_name) - - return response - - except Exception as e: - raise - - finally: - background_tasks.add_task(remove_file, path=file_name) - - -def parse_measurement_data(measurement, key, nu_measurement, enzmldoc): - for measurement_data in measurement.species_dict[key].values(): - nu_measurement.addData( - init_conc=measurement_data.init_conc, - unit=measurement_data.unit, - protein_id=measurement_data.protein_id, - reactant_id=measurement_data.reactant_id, - ) - - nu_measurement.addReplicates(measurement_data.replicates, enzmldoc=enzmldoc) - - -@app.post( - "/upload/dataverse", - summary="Uploads an OMEX archive to a dataverse installation.", - description="Use this endpoint as form-data and specify the document to be uploaded via the key 'omex_archive' for a succesfull upload.", - tags=["Databases"], -) -async def upload_to_dataverse( - background_tasks: BackgroundTasks, - dataverse_name: str, - api_token: str, - base_url: str, - omex_archive: UploadFile = File(...), -): - - # Write to file - file_name = omex_archive.filename - content = await omex_archive.read() - with open(file_name, "wb") as file_handle: - file_handle.write(content) - - # Read EnzymeML document - try: - enzmldoc = EnzymeMLDocument.fromFile(file_name) - enzmldoc.uploadToDataverse( - dataverse_name=dataverse_name, base_url=base_url, api_token=api_token - ) - except Exception as e: - return f"{e.__class__.__name__}: {str(e)}" - finally: - background_tasks.add_task(remove_file, path=file_name) - - -@app.post( - "/read", - summary="Reads an EnzymeML document served in an OMEX archive to a JSON representation", - description="Use this endpoint as form-data and specify the document to be uploaded via the key 'omex_archive' for a succesfull request.", - tags=["Basic operations"], -) -async def read_enzymeml( - background_tasks: BackgroundTasks, omex_archive: UploadFile = File(...) -): - - # Write to file - file_name = omex_archive.filename - content = await omex_archive.read() - with open(file_name, "wb") as file_handle: - file_handle.write(content) - - # Read EnzymeML document - try: - enzmldoc = EnzymeMLDocument.fromFile(file_name) - return enzmldoc.dict( - exclude_none=True, - exclude={ - "log": ..., - "unit_dict": ..., - "file_dict": ..., - "protein_dict": {"Protein": {"__all__": {"_unit_id"}}}, - }, - by_alias=True, - ) - except Exception as e: - return f"{e.__class__.__name__}: {str(e)}" - finally: - background_tasks.add_task(remove_file, path=file_name) - - -# ! Modifications - - -@app.post( - "/add_measurement", - summary="Adds a measurement to an existing EnzymeML document", - description="By using this endpoint, you can add successive raw data without having to create a new EnzymeML dcoument. Returns a binary file, which is an OMEX Archive", - tags=["Modifications"], -) -async def add_Measurement( - background_tasks: BackgroundTasks, - measurement: Measurement, - omex_archive: UploadFile = File(...), -): - - # Check if the species_dict keys are correct - for key in measurement.species_dict: - if key not in ["reactants", "proteins"]: - return { - "error": f"Key '{key}' is not valid for species dict. Please use either 'reactants' or 'proteins'" - } - - # Write to file - file_name = omex_archive.filename - content = await omex_archive.read() - with open(file_name, "wb") as file_handle: - file_handle.write(content) - - # Read EnzymeML document - enzmldoc = EnzymeMLDocument.fromFile(file_name) - - # Add the measurement - enzmldoc.addMeasurement(measurement) - - # Write the new EnzymeML file - try: - dirpath = "." - file_name = f"{enzmldoc.name.replace(' ', '_')}.omex" - file_path = os.path.join(dirpath, file_name) - - enzmldoc.toFile(dirpath) - - return FileResponse(file_path, filename=file_name) - - except Exception as e: - return str(e) - - finally: - background_tasks.add_task(remove_file, path=file_name) - - -# ! TEMPLATE - - -@app.get( - "/template/download", - summary="Download the EnzymeML spreadsheet template.", - tags=["EnzymeML spreadsheet"], -) -async def get_enzymeml_template(): - return FileResponse( - "./templates/EnzymeML_Template.xlsm", filename="EnzymeML_Template.xlsm" - ) - - -@app.get( - "/template/upload", - summary="HTML website to upload the EnzymeML spreadsheet template and convert it to EnzymeML.", - tags=["EnzymeML spreadsheet"], - response_class=HTMLResponse, -) -def upload_enzymeml_template(request: Request): - return templates.TemplateResponse("template_upload.html", {"request": request}) - - -@app.post( - "/template/convert", - summary="Converts an EnzymeML spreadsheet template to an EnzymeML document.", - tags=["EnzymeML spreadsheet"], -) -async def convert_template( - background_tasks: BackgroundTasks, enzymeml_template: UploadFile = File(...) -): - - # Write to file - file_name = enzymeml_template.filename - content = await enzymeml_template.read() - with open(file_name, "wb") as file_handle: - file_handle.write(content) - - # Generate the new EnzymeML file - try: - enzmldoc = EnzymeMLDocument.fromTemplate(file_name) - - except Exception as e: - return str(e) - - finally: - background_tasks.add_task(remove_file, path=file_name) - - # Write the new EnzymeML file - try: - dirpath = "." - enzml_name = f"{enzmldoc.name.replace(' ', '_')}.omex" - file_path = os.path.join(dirpath, enzml_name) - - enzmldoc.toFile(dirpath) - - return FileResponse(file_path, filename=enzml_name) - - except Exception as e: - return str(e) - - finally: - background_tasks.add_task(remove_file, path=enzml_name) - - -# ! Validation - - -@app.get( - "/validation/download", - summary="Download the EnzymeML Validation template.", - tags=["EnzymeML Validation"], -) -async def get_validation_template(): - return FileResponse( - "templates/EnzymeML_Validation_Template.xlsx", - filename="EnzymeML_Validation_Template.xlsm", - ) - - -@app.get( - "/validation/upload", - summary="HTML site to upload the EnzymeML Validation template and convert it to a YAML file.", - tags=["EnzymeML Validation"], - response_class=HTMLResponse, -) -def upload_validation_template(request: Request): - return templates.TemplateResponse("validation_upload.html", {"request": request}) - - -@app.post( - "/validation/convert", - summary="Convert the EnzymeML Validation template to a YAML template to use for validation on server site.", - tags=["EnzymeML Validation"], -) -async def convert_validation_template( - background_tasks: BackgroundTasks, validation_template: UploadFile = File(...) -): - - # Write to file - file_name = validation_template.filename - content = await validation_template.read() - with open(file_name, "wb") as file_handle: - file_handle.write(content) - - # Generate the new EnzymeML file - try: - EnzymeMLValidator.convertSheetToYAML( - path=file_name, - filename="validation", - ) - - return FileResponse( - "validation.yaml", filename="EnzymeML_Validation_Template.yaml" - ) - - except Exception as e: - return str(e) - - finally: - background_tasks.add_task(remove_file, path=file_name) - background_tasks.add_task(remove_file, path="validation.yaml") - - -@app.post( - "/validation/", - summary="Vaidates an EnzymeML document based on a given EnzymeML Validation YAML file. Returns a boolean and a report, if validation has failed.", - tags=["EnzymeML Validation"], -) -async def validate_enzymeml( - background_tasks: BackgroundTasks, - omex_archive: UploadFile = File(...), - validation_template: UploadFile = File(...), -): - - # Write EnzymeML to file - omex_name = omex_archive.filename - content = await omex_archive.read() - with open(omex_name, "wb") as file_handle: - file_handle.write(content) - - # Read EnzymeML document - try: - enzmldoc = EnzymeMLDocument.fromFile(omex_name) - except Exception as e: - return f"{e.__class__.__name__}: {str(e)}" - finally: - background_tasks.add_task(remove_file, path=omex_name) - - # Write YAML to file - valid_name = validation_template.filename - content = await validation_template.read() - with open(valid_name, "wb") as file_handle: - file_handle.write(content) - - # Read YAML and validate accordingly - try: - report, is_valid = enzmldoc.validateDocument(yaml_path=valid_name) - - return {"is_valid": is_valid, "report": report} - finally: - background_tasks.add_task(remove_file, path=valid_name) - - -# * Exception handlers - - -@app.exception_handler(MeasurementDataSpeciesIdentifierError) -async def handle_meas_species_id_error( - req: Request, exc: MeasurementDataSpeciesIdentifierError -): - return JSONResponse(status_code=406, content={"message": str(exc)}) - - -@app.exception_handler(ECNumberError) -async def handle_ecnumber_error(req: Request, exc: ECNumberError): - return JSONResponse(status_code=406, content={"message": str(exc)}) - - -@app.exception_handler(ChEBIIdentifierError) -async def handle_chebi_error(req: Request, exc: ChEBIIdentifierError): - return JSONResponse(status_code=406, content={"message": str(exc)}) - - -@app.exception_handler(DataError) -async def handle_data_error(req: Request, exc: DataError): - return JSONResponse(status_code=406, content={"message": str(exc)}) - - -@app.exception_handler(SpeciesNotFoundError) -async def handle_species_error(req: Request, exc: SpeciesNotFoundError): - return JSONResponse(status_code=406, content={"message": str(exc)}) - - -@app.exception_handler(UniProtIdentifierError) -async def handle_uniprotid_error(req: Request, exc: UniProtIdentifierError): - return JSONResponse(status_code=406, content={"message": str(exc)}) - - -@app.exception_handler(ParticipantIdentifierError) -async def handle_participant_error(req: Request, exc: ParticipantIdentifierError): - return JSONResponse(status_code=406, content={"message": str(exc)}) diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 98afcbd..0000000 --- a/requirements.txt +++ /dev/null @@ -1,23 +0,0 @@ -python-libsbml -numpy -pandas -python-libcombine -scipy -texttable -pydataverse -pydantic==1.8.2 -deprecation -deepdiff -python-multipart -fastapi -uvicorn -easyDataverse -pyDaRUS -openpyxl -numexpr -seaborn -plotly -pysces -lmfit -xlsxwriter -jinja2 \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index b72322a..0000000 --- a/setup.py +++ /dev/null @@ -1,64 +0,0 @@ -""" -File: setup.py -Project: PyEnzyme -Author: Jan Range -License: BSD-2 clause ------ -Last Modified: Wednesday June 23rd 2021 9:57:56 pm -Modified By: Jan Range () ------ -Copyright (c) 2021 Institute of Biochemistry and Technical Biochemistry Stuttgart -""" - -import setuptools -from setuptools import setup - -setup( - name="PyEnzyme", - version="1.1.5", - description="Handling of EnzymeML files", - url="https://github.com/EnzymeML/PyEnzyme", - author="Range, Jan", - author_email="jan.range@simtech.uni-stuttgart.de", - license="BSD2 Clause", - packages=setuptools.find_packages(), - install_requires=[ - "python-libsbml", - "numpy", - "pandas", - "python-libcombine", - "scipy", - "texttable", - "pydantic==1.8.2", - "deprecation", - "deepdiff", - "python-multipart", - "openpyxl", - "xlsxwriter", - "numexpr", - "seaborn", - "plotly", - "pyyaml", - "deprecation", - "xmltodict", - "requests", - ], - extras_require={ - "test": ["pytest-cov"], - "copasi": ["python-copasi"], - "pysces": ["pysces", "lmfit"], - "rest": ["fastapi", "uvicorn"], - "modeling": ["python-copasi", "pysces", "lmfit"], - "dataverse": ["pyDaRUS", "easyDataverse", "pydataverse"], - "all": [ - "python-copasi", - "pysces", - "lmfit", - "fastapi", - "uvicorn", - "pyDaRUS", - "easyDataverse", - "pydataverse", - ], - }, -) diff --git a/tests/enzymeml/__init__.py b/tests/enzymeml/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/enzymeml/core/__init__.py b/tests/enzymeml/core/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/enzymeml/core/test_abstract_classes.py b/tests/enzymeml/core/test_abstract_classes.py deleted file mode 100644 index 3b6cec8..0000000 --- a/tests/enzymeml/core/test_abstract_classes.py +++ /dev/null @@ -1,40 +0,0 @@ -from pyenzyme.enzymeml.core.abstract_classes import AbstractSpecies -from pyenzyme.enzymeml.core.ontology import SBOTerm - - -class TestAbstractSpecies: - - def test_content(self): - # Test consistency of inputs - abstract = AbstractSpecies( - name="SomeSpecies", vessel_id="v0", - init_conc=10.0, unit="mmole / l", constant=True, meta_id="undefined", - id="c0", boundary=True, ontology=SBOTerm.MACROMOLECULAR_COMPLEX, uri="URI", creator_id="a0" - ) - - assert abstract.name == "SomeSpecies" - assert abstract.vessel_id == "v0" - assert abstract.init_conc == 10.0 - assert abstract.unit == "mmole / l" - assert abstract.constant is True - assert abstract.meta_id == "METAID_C0" - assert abstract.id == "c0" - assert abstract.boundary is True - assert abstract.ontology == SBOTerm.MACROMOLECULAR_COMPLEX - assert abstract.uri == "URI" - assert abstract.creator_id == "a0" - - def test_defaults(self): - # Test if the defaults are the same - abstract = AbstractSpecies( - name="SomeSpecies", vessel_id="v0", constant=True, boundary=True, ontology=SBOTerm.MACROMOLECULAR_COMPLEX - ) - - assert not abstract.init_conc - assert not abstract.unit - assert abstract.constant is True - assert not abstract.meta_id - assert not abstract.id - assert abstract.boundary is True - assert abstract.ontology == SBOTerm.MACROMOLECULAR_COMPLEX - assert not abstract.uri diff --git a/tests/enzymeml/core/test_complex.py b/tests/enzymeml/core/test_complex.py deleted file mode 100644 index e078889..0000000 --- a/tests/enzymeml/core/test_complex.py +++ /dev/null @@ -1,35 +0,0 @@ -import pytest - -from pyenzyme.enzymeml.core.complex import Complex -from pyenzyme.enzymeml.core.ontology import SBOTerm -from pyenzyme.enzymeml.core.exceptions import ParticipantIdentifierError - - -class TestComplex: - - def test_content(self): - # Test consistency of inputs - complex = Complex( - name="SomeComplex", participants=["s0", "p0"], vessel_id="v0", - init_conc=10.0, unit="mmole / l", constant=True, meta_id="undefined", - id="c0", boundary=True, ontology=SBOTerm.MACROMOLECULAR_COMPLEX, uri="URI", creator_id="a0" - ) - - assert complex.participants == ["s0", "p0"] - - def test_defaults(self): - # Test if the defaults are the same - complex = Complex( - name="SomeComplex", participants=["s0", "p0"], vessel_id="v0" - ) - - assert complex.constant is False - assert complex.boundary is False - assert complex.ontology == SBOTerm.MACROMOLECULAR_COMPLEX - - def test_validator_participants(self): - # Negative test case to see if false IDs are recognized - with pytest.raises(ParticipantIdentifierError) as exc_info: - Complex( - name="SomeComplex", participants=["x0", "1", "a", "&"], vessel_id="v0" - ) diff --git a/tests/enzymeml/core/test_creator.py b/tests/enzymeml/core/test_creator.py deleted file mode 100644 index bd7ae3d..0000000 --- a/tests/enzymeml/core/test_creator.py +++ /dev/null @@ -1,31 +0,0 @@ -import pytest - -from pydantic import ValidationError -from pyenzyme.enzymeml.core.creator import Creator - - -class TestCreator: - - def test_content(self): - # Test positive case - creator = Creator( - given_name="Jan", family_name="Range", mail="jan@somemail.com", id=None - ) - - assert creator.given_name == "Jan" - assert creator.family_name == "Range" - assert creator.mail == "jan@somemail.com" - - def test_empty_strings(self): - # Test empty strings case - with pytest.raises(ValidationError) as exc_info: - Creator( - given_name="", family_name="", mail="", id=None - ) - - def test_wrong_mail(self): - # Test mail consistency - with pytest.raises(ValidationError) as exc_info: - Creator( - given_name="Jan", family_name="Range", mail="someone.com", id=None - ) diff --git a/tests/enzymeml/core/test_enzymemldocument.py b/tests/enzymeml/core/test_enzymemldocument.py deleted file mode 100644 index 44b7a6e..0000000 --- a/tests/enzymeml/core/test_enzymemldocument.py +++ /dev/null @@ -1,286 +0,0 @@ -import os -import pytest - -from pyenzyme.enzymeml.core.enzymemldocument import EnzymeMLDocument -from pyenzyme.enzymeml.core.abstract_classes import AbstractSpecies -from pyenzyme.enzymeml.core.ontology import SBOTerm - - -class TestEnzymeMLDocument: - def test_content(self): - """Tests if content that is inserted is consistent""" - - # Create an instance - enzmldoc = EnzymeMLDocument( - name="Test", - level=3, - version=2, - pubmedid="91245", - url="http://www.example.com", - doi="10.1109/5.771073", - created="01-02-1991", - modified="01-02-1996", - ) - - assert enzmldoc.name == "Test" - assert enzmldoc.level == 3 - assert enzmldoc.version == 2 - assert enzmldoc.pubmedid == "https://identifiers.org/pubmed:91245" - assert enzmldoc.url == "http://www.example.com" - assert enzmldoc.doi == "10.1109/5.771073" - assert enzmldoc.created == "01-02-1991" - assert enzmldoc.modified == "01-02-1996" - assert not enzmldoc.creator_dict - assert not enzmldoc.vessel_dict - assert not enzmldoc.protein_dict - assert not enzmldoc.complex_dict - assert not enzmldoc.reactant_dict - assert not enzmldoc.reaction_dict - assert not enzmldoc._unit_dict - assert not enzmldoc.file_dict - assert not enzmldoc.global_parameters - - def test_defaults(self): - """Tests if all default values are correct""" - - # Create an instance - enzmldoc = EnzymeMLDocument(name="Test") - - assert enzmldoc.name == "Test" - assert enzmldoc.level == 3 - assert enzmldoc.version == 2 - assert not enzmldoc.pubmedid - assert not enzmldoc.url - assert not enzmldoc.doi - assert not enzmldoc.created - assert not enzmldoc.modified - assert not enzmldoc.creator_dict - assert not enzmldoc.vessel_dict - assert not enzmldoc.protein_dict - assert not enzmldoc.complex_dict - assert not enzmldoc.reactant_dict - assert not enzmldoc.reaction_dict - assert not enzmldoc._unit_dict - assert not enzmldoc.file_dict - assert not enzmldoc.global_parameters - - def test_from_file_init(self, enzmldoc): - """Tests initialization from file""" - - # Read the OMEX fixture - result = EnzymeMLDocument.fromFile("./tests/fixtures/test_case.omex") - - # Test if its JSON representation matches - assert result.dict(exclude={"log"}) == enzmldoc.dict(exclude={"log"}) - - def test_from_json_init(self): - """Tests initialization from a JSON string""" - - # Read the expected OMEX output - expected = EnzymeMLDocument.fromFile("./tests/fixtures/test_case.omex") - - # Read the JSON equivalent - result = EnzymeMLDocument.fromJSON( - open("./tests/fixtures/enzmldoc_object.json").read() - ) - - assert expected.dict(exclude={"log"}) == result.dict(exclude={"log"}) - - def test_to_file(self, enzmldoc): - """Tests writing to a file""" - - # Store the expection to later compare - expected = enzmldoc.dict(exclude={"log"}) - - # Write to a file and check existence - enzmldoc.toFile("./tests/", name="write_test") - assert os.path.exists("./tests/write_test.omex") - - # Read the resulting file and compare the content - result = EnzymeMLDocument.fromFile("./tests/write_test.omex") - assert result.dict(exclude={"log"}) == expected - - def test_add_global_params(self): - """Tests the addition of a global parameter""" - - # Initialize an object - enzmldoc = EnzymeMLDocument(name="Test") - - # Add a Parameter - enzmldoc.addGlobalParameter( - name="GlobalParam", - value=100.0, - initial_value=100.0, - unit="mmole / l", - constant=False, - lower=0.0, - upper=200.0, - stdev=0.001, - ) - - assert "GlobalParam" in enzmldoc.global_parameters - - # Get the parameter an check values - param = enzmldoc.global_parameters["GlobalParam"] - - assert param.name == "GlobalParam" - assert param.value == 100.0 - assert param.unit == "mmole / l" - assert param.constant is False - assert param.lower == 0.0 - assert param.upper == 200.0 - assert param.stdev == 0.001 - assert param.is_global is True - - def test_add_species(self): - """Tests the addition of a species""" - - # Initialize object - enzmldoc = EnzymeMLDocument(name="Test") - - # Use the abstract function and an abstract type to test - test_class = type("Species", (AbstractSpecies,), {"unit": "mmole / l"}) - species = test_class( - name="TestSpecies", - vessel_id="v0", - constant=True, - boundary=True, - ontology=SBOTerm.PROTEIN, - ) - - # Finally add the species - enzmldoc._addSpecies(species, prefix="p", dictionary=enzmldoc.protein_dict) - - assert "p0" in enzmldoc.protein_dict - assert species == enzmldoc.protein_dict["p0"] - - def test_unit_change(self, enzmldoc): - """Tests whether units remain consistent when changed at run-time and are reloaded""" - - # Change an arbitrary unit - species = enzmldoc.getReactant("s0") - species.unit = "umole / l" - - # Write to file - enzmldoc.toFile("./tests/tmp/", name="Test_Unit_Change") - - # Read file and check if the unit change is consistent - unit = enzmldoc.getReactant("s0").unit - - assert unit == "umole / l" - - def test_full_data_export(self, enzmldoc): - """Tests whether data is exported correctly""" - - # Test all export of reactant/protein - data = enzmldoc.exportMeasurementData() - - expected_conc = {"s0": (10.0, "mmole / l"), "p0": (10.0, "mmole / l")} - expected_data = { - "s0": {0: 1.0, 1: 1.0, 2: 1.0, 3: 1.0}, - "time": {0: 1.0, 1: 2.0, 2: 3.0, 3: 4.0}, - "p0": {0: 1.0, 1: 1.0, 2: 1.0, 3: 1.0}, - } - - assert "m0" in data - assert data["m0"]["data"].to_dict() == expected_data - assert data["m0"]["initConc"] == expected_conc - - # Test case of no specification - with pytest.raises(ValueError) as exc_info: - enzmldoc.exportMeasurementData(proteins=False, reactants=False) - - def test_protein_data_export(self, enzmldoc): - """Tests whether data is exported correctly""" - - # Test all export of reactant/protein - data = enzmldoc.exportMeasurementData(reactants=False) - - expected_conc = {"p0": (10.0, "mmole / l")} - expected_data = { - "time": {0: 1.0, 1: 2.0, 2: 3.0, 3: 4.0}, - "p0": {0: 1.0, 1: 1.0, 2: 1.0, 3: 1.0}, - } - - assert "m0" in data - assert data["m0"]["data"].to_dict() == expected_data - assert data["m0"]["initConc"] == expected_conc - - def test_reactant_data_export(self, enzmldoc): - """Tests whether data is exported correctly""" - - # Test all export of reactant/protein - data = enzmldoc.exportMeasurementData(proteins=False) - - expected_conc = {"s0": (10.0, "mmole / l")} - expected_data = { - "time": {0: 1.0, 1: 2.0, 2: 3.0, 3: 4.0}, - "s0": {0: 1.0, 1: 1.0, 2: 1.0, 3: 1.0}, - } - - assert "m0" in data - assert data["m0"]["data"].to_dict() == expected_data - assert data["m0"]["initConc"] == expected_conc - - def test_unit_attribute_change(self, enzmldoc): - """Tests whether unit changes in the 'unit' attribute are refelected towards unit dict and unit_id""" - - def check_consistency(unit, unit_id, kind): - # Helper function - assert ( - enzmldoc._unit_dict[unit_id].name == unit - ), f"Unit change for {kind} inconsistent" - - # Test unit change vessel - vessel = enzmldoc.getVessel("v0") - vessel.unit = "l" - - check_consistency("l", vessel._unit_id, "vessel") - - # Test unit change protein - protein = enzmldoc.getProtein("p0") - protein.unit = "mole / l" - - check_consistency("mole / l", protein._unit_id, "protein") - - # Test unit change reactant - reactant = enzmldoc.getReactant("s0") - reactant.unit = "mole / l" - - check_consistency("mole / l", reactant._unit_id, "reactant") - - # Test unit change measurement - measurement = enzmldoc.getMeasurement("m0") - measurement.temperature_unit = "K" - - check_consistency("K", measurement._temperature_unit_id, "measurement") - - # Test measurement data - meas_data = measurement.getReactants()["s0"] - meas_data.unit = "mole / l" - - check_consistency("mole / l", meas_data._unit_id, "measurement data") - - # Test Replicates - replicate = meas_data.replicates[0] - replicate.data_unit = "mole / l" - replicate.time_unit = "hours" - - check_consistency("mole / l", replicate._data_unit_id, "replicate data") - check_consistency("hours", replicate._time_unit_id, "replicate time") - - # Test Kinetic parameters - reaction = enzmldoc.getReaction("r0") - param = reaction.model.parameters[0] - param.unit = "mole / l" - - check_consistency("mole / l", param._unit_id, "kinetic parameter") - - def test_writing_sbml(self, enzmldoc): - """Test whether the XML content is as expected""" - - expected = open( - "./tests/fixtures/write_xml_string.xml", "r", encoding="utf-8" - ).read() - - assert enzmldoc.toXMLString() == expected diff --git a/tests/enzymeml/core/test_enzymereaction.py b/tests/enzymeml/core/test_enzymereaction.py deleted file mode 100644 index 36b7944..0000000 --- a/tests/enzymeml/core/test_enzymereaction.py +++ /dev/null @@ -1,402 +0,0 @@ -import pytest - -from pyenzyme.enzymeml.core.enzymereaction import EnzymeReaction, ReactionElement -from pyenzyme.enzymeml.core.ontology import SBOTerm -from pyenzyme.enzymeml.core.exceptions import SpeciesNotFoundError - - -class TestEnzymeReactionBasic: - def test_content(self): - """Test consistency of inputs""" - - reaction = EnzymeReaction( - name="SomeReaction", - reversible=True, - temperature=100.0, - temperature_unit="C", - ph=7.0, - ontology=SBOTerm.BIOCHEMICAL_REACTION, - id="r0", - meta_id="undefined", - creator_id="a0", - uri="URI", - model=None, - ) - - assert reaction.name == "SomeReaction" - assert reaction.reversible - assert reaction.temperature == 100.0 + 273.15 - assert reaction.temperature_unit == "K" - assert reaction.ph == 7.0 - assert reaction.ontology == SBOTerm.BIOCHEMICAL_REACTION - assert reaction.id == "r0" - assert reaction.meta_id == "METAID_R0" - assert reaction.creator_id == "a0" - assert reaction.uri == "URI" - assert not reaction.model - assert reaction.educts == [] - assert reaction.products == [] - assert reaction.modifiers == [] - - def test_defaults(self): - """Test if the defaults are the same""" - - reaction = EnzymeReaction(name="SomeReaction", reversible=True) - - assert not reaction.temperature - assert not reaction.temperature_unit - assert not reaction.ph - assert not reaction.id - assert not reaction.meta_id - assert not reaction.uri - assert not reaction.creator_id - assert not reaction.model - assert reaction.ontology == SBOTerm.BIOCHEMICAL_REACTION - assert reaction.educts == [] - assert reaction.products == [] - assert reaction.modifiers == [] - - def test_get_element(self, reaction): - """Tests the element getter""" - - # Now apply the get methods - educt = reaction.getEduct("s0") - assert educt.species_id == "s0" - assert educt.stoichiometry == 1.0 - assert educt.constant is False - assert educt.ontology == SBOTerm.SUBSTRATE - - product = reaction.getProduct("s1") - assert product.species_id == "s1" - assert product.stoichiometry == 1.0 - assert product.constant is False - assert product.ontology == SBOTerm.PRODUCT - - modifier = reaction.getModifier("p0") - assert modifier.species_id == "p0" - assert modifier.stoichiometry == 1.0 - assert modifier.constant is True - assert modifier.ontology == SBOTerm.CATALYST - - # Test not existent identifiers - with pytest.raises(SpeciesNotFoundError): - reaction.getEduct("s100") - with pytest.raises(SpeciesNotFoundError): - reaction.getProduct("s100") - with pytest.raises(SpeciesNotFoundError): - reaction.getModifier("s100") - - def test_add_element(self, enzmldoc): - """Tests the add methods""" - - # Fetch the reaction for testing and reset elements - reaction = enzmldoc.reaction_dict["r0"] - reaction.educts = [] - reaction.products = [] - reaction.modifiers = [] - - # Test educt addition - reaction.addEduct( - species_id="s0", stoichiometry=1.0, constant=False, enzmldoc=enzmldoc - ) - - # Fetch the educt - educt = reaction.getEduct("s0") - assert educt.species_id == "s0" - assert educt.stoichiometry == 1.0 - assert educt.constant is False - assert educt.ontology == SBOTerm.SUBSTRATE - - # Test product addition - reaction.addProduct( - species_id="s1", stoichiometry=1.0, constant=False, enzmldoc=enzmldoc - ) - - # Fetch the educt - product = reaction.getProduct("s1") - assert product.species_id == "s1" - assert product.stoichiometry == 1.0 - assert product.constant is False - assert product.ontology == SBOTerm.PRODUCT - - # Test product addition - reaction.addModifier( - species_id="p0", stoichiometry=1.0, constant=False, enzmldoc=enzmldoc - ) - - # Fetch the educt - modifier = reaction.getModifier("p0") - assert modifier.species_id == "p0" - assert modifier.stoichiometry == 1.0 - assert modifier.constant is False - assert modifier.ontology == SBOTerm.CATALYST - - # Test case, ID not in document - with pytest.raises(SpeciesNotFoundError): - reaction.addEduct( - species_id="s100", stoichiometry=1.0, constant=False, enzmldoc=enzmldoc - ) - - with pytest.raises(SpeciesNotFoundError): - reaction.addProduct( - species_id="s100", stoichiometry=1.0, constant=False, enzmldoc=enzmldoc - ) - - with pytest.raises(SpeciesNotFoundError): - reaction.addModifier( - species_id="s100", stoichiometry=1.0, constant=False, enzmldoc=enzmldoc - ) - - def test_from_equation_with_names(self, enzmldoc): - """Tests initialization from equation using names""" - - # Test for irreversible case - reaction = EnzymeReaction.fromEquation( - "2.0 Reactant + Protein -> Complex", - "SomeReaction", - enzmldoc, - temperature=100.0, - temperature_unit="C", - ph=7.0, - ) - - assert reaction.name == "SomeReaction" - assert reaction.temperature == 100 + 273.15 - assert reaction.temperature_unit == "K" - assert reaction.ph == 7.0 - assert reaction.reversible is False - - # Fetch the educt (should be s0) - educt = reaction.getEduct("s0") - assert educt.species_id == "s0" - assert educt.stoichiometry == 2.0 - assert educt.constant is False - assert educt.ontology == SBOTerm.SUBSTRATE - - # Fetch the educt (should be p0) - product = reaction.getEduct("p0") - assert product.species_id == "p0" - assert product.stoichiometry == 1.0 - assert product.constant is False - assert product.ontology == SBOTerm.SUBSTRATE - - # Fetch the product (should be c0) - product = reaction.getProduct("c0") - assert product.species_id == "c0" - assert product.stoichiometry == 1.0 - assert product.constant is False - assert product.ontology == SBOTerm.PRODUCT - - # Test for irreversible case - reaction = EnzymeReaction.fromEquation( - "2.0 Reactant + Protein = Complex", - "SomeReaction", - enzmldoc, - temperature=100.0, - temperature_unit="C", - ph=7.0, - ) - - assert reaction.name == "SomeReaction" - assert reaction.temperature == 100 + 273.15 - assert reaction.temperature_unit == "K" - assert reaction.ph == 7.0 - assert reaction.reversible is True - - # Fetch the educt (should be s0) - educt = reaction.getEduct("s0") - assert educt.species_id == "s0" - assert educt.stoichiometry == 2.0 - assert educt.constant is False - assert educt.ontology == SBOTerm.SUBSTRATE - - # Fetch the educt (should be p0) - product = reaction.getEduct("p0") - assert product.species_id == "p0" - assert product.stoichiometry == 1.0 - assert product.constant is False - assert product.ontology == SBOTerm.SUBSTRATE - - # Fetch the product (should be c0) - product = reaction.getProduct("c0") - assert product.species_id == "c0" - assert product.stoichiometry == 1.0 - assert product.constant is False - assert product.ontology == SBOTerm.PRODUCT - - def test_from_equation_with_ids(self, enzmldoc): - """Tests initialization from equation using names""" - - # Test for irreversible case - reaction = EnzymeReaction.fromEquation( - "2.0 s0 + p0 -> c0", - "SomeReaction", - enzmldoc, - temperature=100.0, - temperature_unit="C", - ph=7.0, - ) - - assert reaction.name == "SomeReaction" - assert reaction.temperature == 100 + 273.15 - assert reaction.temperature_unit == "K" - assert reaction.ph == 7.0 - assert reaction.reversible is False - - # Fetch the educt (should be s0) - educt = reaction.getEduct("s0") - assert educt.species_id == "s0" - assert educt.stoichiometry == 2.0 - assert educt.constant is False - assert educt.ontology == SBOTerm.SUBSTRATE - - # Fetch the educt (should be p0) - product = reaction.getEduct("p0") - assert product.species_id == "p0" - assert product.stoichiometry == 1.0 - assert product.constant is False - assert product.ontology == SBOTerm.SUBSTRATE - - # Fetch the product (should be c0) - product = reaction.getProduct("c0") - assert product.species_id == "c0" - assert product.stoichiometry == 1.0 - assert product.constant is False - assert product.ontology == SBOTerm.PRODUCT - - # Test for irreversible case - reaction = EnzymeReaction.fromEquation( - "2.0 s0 + p0 = c0", - "SomeReaction", - enzmldoc, - temperature=100.0, - temperature_unit="C", - ph=7.0, - ) - - assert reaction.name == "SomeReaction" - assert reaction.temperature == 100 + 273.15 - assert reaction.temperature_unit == "K" - assert reaction.ph == 7.0 - assert reaction.reversible is True - - # Fetch the educt (should be s0) - educt = reaction.getEduct("s0") - assert educt.species_id == "s0" - assert educt.stoichiometry == 2.0 - assert educt.constant is False - assert educt.ontology == SBOTerm.SUBSTRATE - - # Fetch the educt (should be p0) - product = reaction.getEduct("p0") - assert product.species_id == "p0" - assert product.stoichiometry == 1.0 - assert product.constant is False - assert product.ontology == SBOTerm.SUBSTRATE - - # Fetch the product (should be c0) - product = reaction.getProduct("c0") - assert product.species_id == "c0" - assert product.stoichiometry == 1.0 - assert product.constant is False - assert product.ontology == SBOTerm.PRODUCT - - def test_faulty_equation_init(self, enzmldoc): - """Tests faulty instances of equation initialization""" - - # No arrow - with pytest.raises(ValueError): - EnzymeReaction.fromEquation("1.0 s0 + 2.0 p0", "FaultyReaction", enzmldoc) - - # No right side (irrev) - with pytest.raises(ValueError): - EnzymeReaction.fromEquation( - "1.0 s0 + 2.0 p0 -> ", "FaultyReaction", enzmldoc - ) - - # No right side (rev) - with pytest.raises(ValueError): - EnzymeReaction.fromEquation( - "1.0 s0 + 2.0 p0 = ", "FaultyReaction", enzmldoc - ) - - # No right side (irrev) - with pytest.raises(ValueError): - EnzymeReaction.fromEquation( - " -> 1.0 s0 + 2.0 p0", "FaultyReaction", enzmldoc - ) - - # No right side (rev) - with pytest.raises(ValueError): - EnzymeReaction.fromEquation("= 1.0 s0 + 2.0 p0", "FaultyReaction", enzmldoc) - - def test_set_model(self, enzmldoc, correct_model, faulty_model): - """Tests if the model is set correctly.""" - - # Correct case - reaction = enzmldoc.getReaction("r0") - reaction.model = None - - # Set the model and check if the units are set correctly - reaction.setModel(correct_model, enzmldoc) - assert reaction.model.name == "SomeModel" - assert reaction.model.equation == "s0 * x" - - # Check parameters are converted correctly - parameter = reaction.model.parameters[0] - assert parameter.name == "x" - assert parameter.value == 10.0 - assert parameter.unit == "mmole / l" - assert enzmldoc._unit_dict[parameter._unit_id].name == "mmole / l" - - # Faulty case - with pytest.raises(SpeciesNotFoundError): - reaction.setModel(faulty_model, enzmldoc) - - def test_get_stoich_coeffs(self, enzmldoc): - """Tests if the method to return stoich coefficients works""" - - # Get the reaction - reaction = enzmldoc.getReaction("r0") - - # Set the expected example and test against method - correct_coeffs = {"s0": 1.0, "s1": -1.0} - coeffs = reaction.getStoichiometricCoefficients() - assert coeffs == correct_coeffs - - def test_initial_value_application(self, enzmldoc): - """Tests whether initial values are applied correctly""" - - # Correct test case - # Set up initial values and get reaction - init_values = { - "x": {"initial_value": 100.0, "upper": 200.0, "lower": 0, "constant": False} - } - reaction = enzmldoc.getReaction("r0") - - # Apply method and assert - reaction.apply_initial_values(init_values) - assert reaction.model.parameters[0].initial_value == 100.0 - - # Test case with wrong identifier - init_values = {"y": 100.0} - with pytest.raises(KeyError): - reaction.apply_initial_values(init_values) - - # Test case with unset model - reaction.model = None - with pytest.raises(ValueError): - reaction.apply_initial_values(init_values) - - -class TestReactionElement: - def test_content(self): - """Tests consistency of content""" - - element = ReactionElement( - species_id="s0", stoichiometry=1.0, constant=False, ontology=SBOTerm.PRODUCT - ) - - assert element.species_id == "s0" - assert element.constant is False - assert element.ontology == SBOTerm.PRODUCT diff --git a/tests/enzymeml/core/test_measurement.py b/tests/enzymeml/core/test_measurement.py deleted file mode 100644 index 873a2d5..0000000 --- a/tests/enzymeml/core/test_measurement.py +++ /dev/null @@ -1,220 +0,0 @@ -import pytest - -from pyenzyme.enzymeml.core.measurement import Measurement - - -class TestMeasurement: - def test_content(self): - """Tests consistency of content""" - - measurement = Measurement( - name="SomeMeasurement", - temperature=100.0, - temperature_unit="C", - ph=7.0, - global_time=[1, 2, 3, 4], - global_time_unit="s", - id="m0", - uri="URI", - creator_id="a0", - ) - - assert measurement.name == "SomeMeasurement" - assert measurement.temperature == 100.0 + 273.15 - assert measurement.temperature_unit == "K" - assert measurement.ph == 7.0 - assert measurement.global_time == [1, 2, 3, 4] - assert measurement.global_time_unit == "s" - assert measurement.id == "m0" - assert measurement.uri == "URI" - assert measurement.creator_id == "a0" - assert measurement.species_dict == {"proteins": {}, "reactants": {}} - assert not measurement._global_time_unit_id - assert not measurement._temperature_unit_id - - def test_defaults(self): - """Test default values""" - - measurement = Measurement(name="SomeMeasurement") - - assert not measurement.temperature - assert not measurement.temperature_unit - assert not measurement.ph - assert not measurement.global_time - assert not measurement.global_time_unit - assert not measurement.id - assert not measurement.uri - assert not measurement.creator_id - assert measurement.species_dict == {"proteins": {}, "reactants": {}} - - def test_data_export(self, measurement): - """Test correct data export""" - - # Call the export function - data = measurement.exportData() - - # Check structure - assert "proteins" in data.keys() - assert "reactants" in data.keys() - - # Check initial concentrations - init_conc = data["proteins"]["initConc"] - assert init_conc == {"p0": (10.0, "mmole / l")} - - init_conc = data["reactants"]["initConc"] - assert init_conc == {"s0": (10.0, "mmole / l")} - - # Construct expected DataFrame - expected_protein = { - "p0": {0: 1.0, 1: 1.0, 2: 1.0, 3: 1.0}, - "time": {0: 1.0, 1: 2.0, 2: 3.0, 3: 4.0}, - } - expected_reactant = { - "s0": {0: 1.0, 1: 1.0, 2: 1.0, 3: 1.0}, - "time": {0: 1.0, 1: 2.0, 2: 3.0, 3: 4.0}, - } - - assert data["reactants"]["data"].to_dict() == expected_reactant - assert data["proteins"]["data"].to_dict() == expected_protein - - def test_data_export_no_repls(self, measurement): - """Tests export method when no replicates are given""" - - # Remove replicates - measurement.species_dict["proteins"]["p0"].replicates = [] - measurement.species_dict["reactants"]["s0"].replicates = [] - - # Call the export function - data = measurement.exportData() - - # Check initial concentrations - init_conc = data["proteins"]["initConc"] - assert init_conc == {"p0": (10.0, "mmole / l")} - - init_conc = data["reactants"]["initConc"] - assert init_conc == {"s0": (10.0, "mmole / l")} - - assert not data["reactants"]["data"].to_dict() - assert not data["proteins"]["data"].to_dict() - - def test_data_export_specific_species(self, measurement): - """Tests export method when a specific species is given""" - - # Test case with list as argument - data = measurement.exportData(species_ids=["s0"]) - expected_reactant = { - "s0": {0: 1.0, 1: 1.0, 2: 1.0, 3: 1.0}, - "time": {0: 1.0, 1: 2.0, 2: 3.0, 3: 4.0}, - } - - assert data["reactants"]["initConc"] == {"s0": (10.0, "mmole / l")} - assert data["reactants"]["data"].to_dict() == expected_reactant - - assert not data["proteins"]["initConc"] - assert not data["proteins"]["data"].to_dict() - - # Test case with string as argument - data = measurement.exportData(species_ids="s0") - init_conc = data["reactants"]["initConc"] - expected_reactant = { - "s0": {0: 1.0, 1: 1.0, 2: 1.0, 3: 1.0}, - "time": {0: 1.0, 1: 2.0, 2: 3.0, 3: 4.0}, - } - - assert data["reactants"]["initConc"] == {"s0": (10.0, "mmole / l")} - assert data["reactants"]["data"].to_dict() == expected_reactant - - assert not data["proteins"]["initConc"] - assert not data["proteins"]["data"].to_dict() - - def test_add_replicates(self, measurement, replicate, enzmldoc): - """Tests the addition of replicates""" - - # Reset replicates - measurement.species_dict["reactants"]["s0"].replicates = [] - - # Call the addReplicates method to add replicate - measurement.addReplicates(replicate, enzmldoc) - - assert measurement.species_dict["reactants"]["s0"].replicates[0] == replicate - - # Test case with list of replicates - measurement.species_dict["reactants"]["s0"].replicates = [] - replicate2 = replicate.copy() - replicate2.id = "repl_s0_1" - - # Call the addReplicates method to add replicate - measurement.addReplicates([replicate, replicate2], enzmldoc) - - assert measurement.species_dict["reactants"]["s0"].replicates == [ - replicate, - replicate2, - ] - - def test_add_data(self, measurement, replicate): - """Tests the addition of data""" - - # Reset measurement to have no data - measurement.species_dict = {"proteins": {}, "reactants": {}} - - # Add reactant data - measurement.addData( - init_conc=10.0, unit="mmole / l", reactant_id="s0", replicates=[replicate] - ) - - # Extract the entry - assert "s0" in measurement.species_dict["reactants"].keys() - reactant = measurement.species_dict["reactants"]["s0"] - - assert reactant.reactant_id == "s0" - assert reactant.init_conc == 10.0 - assert reactant.unit == "mmole / l" - assert reactant.replicates == [replicate] - - # Add reactant data - replicate.species_id = "p0" - measurement.addData( - init_conc=10.0, unit="mmole / l", protein_id="p0", replicates=[replicate] - ) - - # Extract the entry - assert "p0" in measurement.species_dict["proteins"].keys() - reactant = measurement.species_dict["proteins"]["p0"] - - assert reactant.protein_id == "p0" - assert reactant.init_conc == 10.0 - assert reactant.unit == "mmole / l" - assert reactant.replicates == [replicate] - - def test_unit_unification(self, enzmldoc): - """Tests if unit unification works""" - - # Get the measurement from the EnzymeMLDocument - measurement = enzmldoc.measurement_dict["m0"] - - # Perform unit unification - measurement.unifyUnits(kind="mole", scale=-6, enzmldoc=enzmldoc) - - # Check for reactants - replicate = measurement.species_dict["reactants"]["s0"].replicates[0] - nu_unit_id = replicate._data_unit_id - - assert replicate.data == [1000.0, 1000.0, 1000.0, 1000.0] - assert replicate.time == [1.0, 2.0, 3.0, 4.0] - assert enzmldoc._unit_dict[nu_unit_id].name == "umole / l" - - # Check for proteins - replicate = measurement.species_dict["proteins"]["p0"].replicates[0] - nu_unit_id = replicate._data_unit_id - - assert replicate.data == [1000.0, 1000.0, 1000.0, 1000.0] - assert replicate.time == [1.0, 2.0, 3.0, 4.0] - assert enzmldoc._unit_dict[nu_unit_id].name == "umole / l" - - # Test for not supported unit kinds - with pytest.raises(ValueError): - measurement.unifyUnits(kind="joule", scale=-6, enzmldoc=enzmldoc) - - # Test for not supported unit kinds - with pytest.raises(ValueError): - measurement.unifyUnits(kind="mole", scale=-10, enzmldoc=enzmldoc) diff --git a/tests/enzymeml/core/test_measurement_data.py b/tests/enzymeml/core/test_measurement_data.py deleted file mode 100644 index 19d109d..0000000 --- a/tests/enzymeml/core/test_measurement_data.py +++ /dev/null @@ -1,80 +0,0 @@ -import pytest - -from pyenzyme.enzymeml.core.measurementData import MeasurementData -from pyenzyme.enzymeml.core.exceptions import MeasurementDataSpeciesIdentifierError - - -class TestMeasurementData: - def test_content(self): - """Tests data consistency""" - - # Check for reactant input - data = MeasurementData( - init_conc=10.0, unit="mmole / l", measurement_id="m0", reactant_id="s0" - ) - - assert data.init_conc == 10.0 - assert data.unit == "mmole / l" - assert data.measurement_id == "m0" - assert data.reactant_id == "s0" - assert not data.protein_id - assert not data.replicates - - # Check for protein input - data = MeasurementData( - init_conc=10.0, unit="mmole / l", measurement_id="m0", protein_id="p0" - ) - - assert data.init_conc == 10.0 - assert data.unit == "mmole / l" - assert data.measurement_id == "m0" - assert data.protein_id == "p0" - assert not data.reactant_id - assert not data.replicates - - def test_false_ids(self): - """Tests the cases when either no or both IDs are given""" - - # Check when both are not given - with pytest.raises(MeasurementDataSpeciesIdentifierError): - MeasurementData(init_conc=10.0, unit="mmole / l", measurement_id="m0") - - # Check when both are given at same time - with pytest.raises(MeasurementDataSpeciesIdentifierError): - MeasurementData( - init_conc=10.0, - unit="mmole / l", - measurement_id="m0", - reactant_id="s0", - protein_id="p0", - ) - - def test_unify_units(self, enzmldoc): - """Tests the rescaling of units""" - - # Fetch the measurement data object - measurement = enzmldoc.measurement_dict["m0"] - data = measurement.species_dict["reactants"]["s0"] - - # Apply unifyUnits method and get the replicate - data.unifyUnits(kind="mole", scale=-6, enzmldoc=enzmldoc) - replicate = data.replicates[0] - - assert replicate.data == [1000.0, 1000.0, 1000.0, 1000.0] - assert replicate.data_unit == "umole / l" - assert enzmldoc._unit_dict[replicate._data_unit_id].name == "umole / l" - - assert data.init_conc == 10000.0 - assert data.unit == "umole / l" - - def test_add_replicate(self, measurement, replicate): - """Tests if the added replicate is correct""" - - # Reset objects replicates - data = measurement.species_dict["reactants"]["s0"] - data.replicates = [] - - # Apply method - data.addReplicate(replicate) - - assert data.replicates == [replicate] diff --git a/tests/enzymeml/core/test_protein.py b/tests/enzymeml/core/test_protein.py deleted file mode 100644 index f7cf638..0000000 --- a/tests/enzymeml/core/test_protein.py +++ /dev/null @@ -1,48 +0,0 @@ -from pyenzyme.enzymeml.core.protein import Protein -from pyenzyme.enzymeml.core.ontology import SBOTerm - - -class TestProtein: - - def test_content(self): - # Test consistency of inputs - protein = Protein( - name="SomeProtein", vessel_id="v0", - init_conc=10.0, unit="mmole / l", constant=True, meta_id="undefined", - id="p0", boundary=True, ontology=SBOTerm.MACROMOLECULAR_COMPLEX, uri="URI", creator_id="a0", - sequence="HGTHMLAP", ecnumber="1.1.1.1", organism="SomeOrganism", organism_tax_id="2894792", uniprotid="P0A955" - ) - - assert protein.sequence == "HGTHMLAP" - assert protein.ecnumber == "1.1.1.1" - assert protein.organism == "SomeOrganism" - assert protein.organism_tax_id == "2894792" - - def test_defaults(self): - # Test if the defaults are the same - protein = Protein( - name="SomeProtein", vessel_id="v0" - ) - - assert protein.constant is True - assert protein.boundary is False - assert protein.ontology == SBOTerm.PROTEIN - assert not protein.sequence - assert not protein.ecnumber - assert not protein.organism - assert not protein.organism_tax_id - assert not protein.uniprotid - - def test_uniprot_id_init(self): - - protein = Protein.fromUniProtID( - uniprotid="P0A955", vessel_id="v0", init_conc=10.0, unit="mmole / l" - ) - - assert protein.uniprotid == "P0A955" - assert protein.name == "Phospho-2-keto-3-deoxygluconate aldolase" - assert protein.sequence == "MKNWKTSAESILTTGPVVPVIVVKKLEHAVPMAKALVAGGVRVLEVTLRTECAVDAIRAIAKEVPEAIVGAGTVLNPQQLAEVTEAGAQFAISPGLTEPLLKAATEGTIPLIPGISTVSELMLGMDYGLKEFKFFPAEANGGVKALQAIAGPFSQVRFCPTGGISPANYRDYLALKSVLCIGGSWLVPADALEAGDYDRITKLAREAVEGAKL" - assert protein.ecnumber == "4.1.2.14" - assert protein.init_conc == 10.0 - assert protein.unit == "mmole / l" - assert protein.vessel_id == "v0" diff --git a/tests/enzymeml/core/test_reactant.py b/tests/enzymeml/core/test_reactant.py deleted file mode 100644 index 4b34c5d..0000000 --- a/tests/enzymeml/core/test_reactant.py +++ /dev/null @@ -1,44 +0,0 @@ -from pyenzyme.enzymeml.core.reactant import Reactant -from pyenzyme.enzymeml.core.ontology import SBOTerm - - -class TestReactant: - - def test_content(self): - # Test consistency of inputs - reactant = Reactant( - name="SomeReactant", vessel_id="v0", - init_conc=10.0, unit="mmole / l", constant=True, meta_id="undefined", - id="s0", boundary=True, ontology=SBOTerm.MACROMOLECULAR_COMPLEX, uri="URI", creator_id="a0", - inchi="AnInChICode", smiles="()(()-)", chebi_id="CHEBI:15377" - ) - - assert reactant.inchi == "AnInChICode" - assert reactant.chebi_id == "CHEBI:15377" - assert reactant.smiles == "()(()-)" - - def test_defaults(self): - # Test if the defaults are the same - reactant = Reactant( - name="SomeReactant", vessel_id="v0" - ) - - assert reactant.constant is False - assert reactant.boundary is False - assert reactant.ontology == SBOTerm.SMALL_MOLECULE - assert not reactant.inchi - assert not reactant.smiles - assert not reactant.chebi_id - - # def test_chebi_id_init(self): - - # reactant = Reactant.fromChebiID( - # chebi_id="CHEBI:15377", vessel_id="v0", init_conc=10.0, unit="mmole / l" - # ) - - # assert reactant.chebi_id == "CHEBI:15377" - # assert reactant.name == "water" - # assert reactant.inchi == "InChI=1S/H2O/h1H2" - # assert reactant.smiles == "[H]O[H]" - # assert reactant.init_conc == 10.0 - # assert reactant.unit == "mmole / l" diff --git a/tests/enzymeml/core/test_replicate.py b/tests/enzymeml/core/test_replicate.py deleted file mode 100644 index 4adf383..0000000 --- a/tests/enzymeml/core/test_replicate.py +++ /dev/null @@ -1,63 +0,0 @@ -import pytest - -from pyenzyme.enzymeml.core.replicate import Replicate -from pyenzyme.enzymeml.core.ontology import DataTypes -from pyenzyme.enzymeml.core.exceptions import DataError - - -class TestReplicate: - - def test_content(self): - """Tests consistency of content""" - - replicate = Replicate( - id="repl_s0_1", species_id="s0", measurement_id="m0", - data_type=DataTypes.CONCENTRATION, time_unit="min", time=[1, 2, 3], - data_unit="mmole / l", data=[1, 1, 1], is_calculated=False, uri="URI", creator_id="a0" - ) - - assert replicate.id == "repl_s0_1" - assert replicate.species_id == "s0" - assert replicate.measurement_id == "m0" - assert replicate.data_type == DataTypes.CONCENTRATION - assert replicate.time_unit == "min" - assert replicate.data_unit == "mmole / l" - assert replicate.data == [1, 1, 1] - assert replicate.time == [1, 2, 3] - assert replicate.uri == "URI" - assert replicate.creator_id == "a0" - assert replicate.is_calculated is False - - def test_defaults(self): - """Tests the default arguments""" - - replicate = Replicate( - id="repl_s0_1", species_id="s0", data_unit="mmole", time_unit="min" - ) - - assert replicate.id == "repl_s0_1" - assert replicate.species_id == "s0" - assert replicate.data_type == DataTypes.CONCENTRATION - assert replicate.is_calculated is False - assert not replicate.measurement_id - assert not replicate.data - assert not replicate.time - assert not replicate.uri - assert not replicate.creator_id - - def test_data_completeness(self): - """Tests if correct error messages are thrown at missing data""" - - with pytest.raises(DataError): - Replicate( - id="repl_s0_1", species_id="s0", measurement_id="m0", - data_type=DataTypes.CONCENTRATION, time_unit="min", - data_unit="mmole / l", data=[1, 1, 1], is_calculated=False, uri="URI", creator_id="a0" - ) - - with pytest.raises(DataError): - Replicate( - id="repl_s0_1", species_id="s0", measurement_id="m0", - data_type=DataTypes.CONCENTRATION, time_unit="min", - data_unit="mmole / l", data=[1, 1, 1], time=[1, 2], is_calculated=False, uri="URI", creator_id="a0" - ) diff --git a/tests/enzymeml/core/test_vessel.py b/tests/enzymeml/core/test_vessel.py deleted file mode 100644 index 35eb7d8..0000000 --- a/tests/enzymeml/core/test_vessel.py +++ /dev/null @@ -1,36 +0,0 @@ -from pyenzyme.enzymeml.core.vessel import Vessel - - -class TestVessel: - - def test_content(self): - """Tests consistency of content""" - - vessel = Vessel( - name="SomeVessel", volume=100.0, unit="ml", constant=True, - id="v0", meta_id="undefined", uri="URI", creator_id="a0" - ) - - assert vessel.name == "SomeVessel" - assert vessel.volume == 100.0 - assert vessel.unit == "ml" - assert vessel.constant is True - assert vessel.id == "v0" - assert vessel.meta_id == "METAID_V0" - assert vessel.uri == "URI" - assert vessel.creator_id == "a0" - - def test_defaults(self): - """Tests default values""" - - vessel = Vessel(name="SomeVessel") - - assert vessel.name == "SomeVessel" - assert vessel.constant is True - assert not vessel.volume - assert not vessel.unit - assert not vessel.id - assert not vessel.meta_id - assert not vessel.uri - assert not vessel.creator_id - assert not vessel._unit_id diff --git a/tests/enzymeml/models/__init__.py b/tests/enzymeml/models/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/enzymeml/models/test_kineticlaw.py b/tests/enzymeml/models/test_kineticlaw.py deleted file mode 100644 index 6e6da81..0000000 --- a/tests/enzymeml/models/test_kineticlaw.py +++ /dev/null @@ -1,134 +0,0 @@ -from pyenzyme.enzymeml.models.kineticmodel import KineticModel -from pyenzyme.enzymeml.models.kineticmodel import KineticParameter -from pyenzyme.enzymeml.core.ontology import SBOTerm - - -class TestKineticModel: - def test_content(self): - """Tests consistency of content""" - - # Set up kinetic parameter - param = KineticParameter( - name="kcat", - value=10.0, - unit="1 / s", - initial_value=20.0, - upper=30.0, - lower=0, - is_global=False, - stdev=1.0, - ) - - assert param.name == "kcat" - assert param.value == 10.0 - assert param.unit == "1 / s" - assert param.initial_value == 20.0 - assert param.upper == 30.0 - assert param.lower == 0.0 - assert param.stdev == 1.0 - assert not param.is_global - - # Set up kinetic model - km = KineticModel( - name="Michaelis Menten Model", - equation="p0*kcat*s0 / (km * s0)", - parameters=[param], - ontology=SBOTerm.MICHAELIS_MENTEN, - ) - - assert km.name == "Michaelis Menten Model" - assert km.equation == "p0*kcat*s0 / (km * s0)" - assert km.ontology == SBOTerm.MICHAELIS_MENTEN - - # Add another paramete - km.addParameter( - name="km", - value=10.0, - unit="mmole / l", - initial_value=20.0, - upper=30.0, - lower=0, - is_global=False, - stdev=1.0, - ) - - # Check addition has worked - assert km.getParameter("km").name == "km" - assert km.getParameter("km").value == 10.0 - assert km.getParameter("km").unit == "mmole / l" - assert km.getParameter("km").initial_value == 20.0 - assert km.getParameter("km").upper == 30.0 - assert km.getParameter("km").lower == 0.0 - assert km.getParameter("km").stdev == 1.0 - assert not km.getParameter("km").is_global - - def test_from_equation(self, enzmldoc): - """Tests the model initialization via an equation""" - - # With IDs - model = KineticModel.fromEquation(name="Model", equation="s0 * x + p0 * c0") - - assert len(model.parameters) == 1 - assert model.parameters[0].name == "x" - assert model.name == "Model" - - # With names - model = KineticModel.fromEquation( - name="Model", equation="Reactant * x + Protein * Complex", enzmldoc=enzmldoc - ) - - assert len(model.parameters) == 1 - assert model.parameters[0].name == "x" - assert model.name == "Model" - assert model.equation == "s0 * x + p0 * c0" - - def test_model_generator(self, enzmldoc): - """Tests consistency of the model generator""" - - # Set up a generator - generator = KineticModel.createGenerator( - name="Michaelis Menten Model", - equation="protein*kcat*substrate / (km * substrate)", - kcat={"unit": "1 / s", "value": 10.0}, - km={"unit": "mmole / l", "value": 10.0}, - ) - - # Generate kinetic model - km = generator(protein="p0", substrate="s0") - - assert km.name == "Michaelis Menten Model" - assert km.equation == "'p0'*kcat*'s0' / (km * 's0')" - - # Add model to reaction - reaction = enzmldoc.reaction_dict["r0"] - reaction.setModel(km, enzmldoc) - - assert reaction.model.name == "Michaelis Menten Model" - assert reaction.model.equation == "p0*kcat*s0 / (km * s0)" - - # Add model to reaction - reaction.model = km - - assert reaction.model.name == "Michaelis Menten Model" - assert reaction.model.equation == "p0*kcat*s0 / (km * s0)" - - # Test if the model is actually written to the XML - xml_string = enzmldoc.toXMLString() - expected = """ - - - - - p0 - kcat - s0 - - - - km - s0 - - - """ - - assert expected in xml_string, "Model has not been written to XML" diff --git a/tests/enzymeml/tools/__init__.py b/tests/enzymeml/tools/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/enzymeml/tools/test_templatereader.py b/tests/enzymeml/tools/test_templatereader.py deleted file mode 100644 index d4702d8..0000000 --- a/tests/enzymeml/tools/test_templatereader.py +++ /dev/null @@ -1,15 +0,0 @@ -import json - -from pyenzyme.enzymeml.core.enzymemldocument import EnzymeMLDocument - - -class TestTemplateReader: - def test_template_conversion(self, template_example): - """Tests the conversion of the EnzymeML Spreadsheet template""" - - # Convert the template fixture - enzmldoc = EnzymeMLDocument.fromTemplate( - "./tests/fixtures/EnzymeML_Template_Example.xlsm" - ) - - assert enzmldoc.dict(exclude={"log"}) == template_example.dict(exclude={"log"}) diff --git a/tests/enzymeml/tools/test_unitcreator.py b/tests/enzymeml/tools/test_unitcreator.py deleted file mode 100644 index 7e9c1b7..0000000 --- a/tests/enzymeml/tools/test_unitcreator.py +++ /dev/null @@ -1,250 +0,0 @@ -import libsbml - -from pyenzyme.enzymeml.tools.unitcreator import UnitCreator -from pyenzyme.enzymeml.core.enzymemldocument import EnzymeMLDocument -from pyenzyme.enzymeml.core.unitdef import UnitDef - - -class TestUnitCreator: - def test_primitive_units(self): - """Tests if units are parsed correctly""" - - # ! Mole units - name = "mole" - expec, result = self._setup_test(name, libsbml.UNIT_KIND_MOLE, 1, 1, 1) - assert result == expec, f"wrong {name} unit" - - # ! Volumetric units - name = "l" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_LITRE, 1, 1, 1) - assert res == expec, f"wrong {name} unit" - - name = "liter" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_LITRE, 1, 1, 1) - assert res == expec, f"wrong {name} unit" - - name = "litre" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_LITRE, 1, 1, 1) - assert res == expec, f"wrong {name} unit" - - # ! Weight units - name = "g" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_GRAM, 1, 1, 1) - assert res == expec, f"wrong {name} unit" - - name = "gram" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_GRAM, 1, 1, 1) - assert res == expec, f"wrong {name} unit" - - # ! Time units - name = "s" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_SECOND, 1, 1, 1) - assert res == expec, f"wrong {name} unit" - - name = "sec" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_SECOND, 1, 1, 1) - assert res == expec, f"wrong {name} unit" - - name = "second" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_SECOND, 1, 1, 1) - assert res == expec, f"wrong {name} unit" - - name = "seconds" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_SECOND, 1, 1, 1) - assert res == expec, f"wrong {name} unit" - - name = "min" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_SECOND, 1, 1, 60) - assert res == expec, f"wrong {name} unit" - - name = "mins" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_SECOND, 1, 1, 60) - assert res == expec, f"wrong {name} unit" - - name = "minutes" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_SECOND, 1, 1, 60) - assert res == expec, f"wrong {name} unit" - - name = "h" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_SECOND, 1, 1, 60 * 60) - assert res == expec, f"wrong {name} unit" - - name = "hour" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_SECOND, 1, 1, 60 * 60) - assert res == expec, f"wrong {name} unit" - - name = "hours" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_SECOND, 1, 1, 60 * 60) - assert res == expec, f"wrong {name} unit" - - # ! Temperature units - name = "C" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_KELVIN, 1, 1, 1) - expec["name"] = "K" - assert res == expec, f"wrong {name} unit" - - name = "celsius" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_KELVIN, 1, 1, 1) - expec["name"] = name - assert res == expec, f"wrong {name} unit" - - name = "Celsius" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_KELVIN, 1, 1, 1) - expec["name"] = name.lower() - assert res == expec, f"wrong {name} unit" - - name = "K" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_KELVIN, 1, 1, 1) - expec["name"] = name - assert res == expec, f"wrong {name} unit" - - name = "kelvin" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_KELVIN, 1, 1, 1) - expec["name"] = name - assert res == expec, f"wrong {name} unit" - - name = "Kelvin" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_KELVIN, 1, 1, 1) - expec["name"] = name.lower() - assert res == expec, f"wrong {name} unit" - - # ! Dimensionless unit - name = "dimensionless" - expec, res = self._setup_test(name, libsbml.UNIT_KIND_DIMENSIONLESS, 1, 1, 1) - assert res == expec, f"wrong {name} unit" - - def test_prefix(self): - """Tests correct prefix parsing""" - - expec, res = self._setup_test("fmole", libsbml.UNIT_KIND_MOLE, 1, -15, 1) - assert res == expec - - expec, res = self._setup_test("pmole", libsbml.UNIT_KIND_MOLE, 1, -12, 1) - assert res == expec - - expec, res = self._setup_test("nmole", libsbml.UNIT_KIND_MOLE, 1, -9, 1) - assert res == expec - - expec, res = self._setup_test("umole", libsbml.UNIT_KIND_MOLE, 1, -6, 1) - assert res == expec - - expec, res = self._setup_test("mmole", libsbml.UNIT_KIND_MOLE, 1, -3, 1) - assert res == expec - - expec, res = self._setup_test("cmole", libsbml.UNIT_KIND_MOLE, 1, -2, 1) - assert res == expec - - expec, res = self._setup_test("dmole", libsbml.UNIT_KIND_MOLE, 1, -1, 1) - assert res == expec - - expec, res = self._setup_test("mole", libsbml.UNIT_KIND_MOLE, 1, 1, 1) - assert res == expec - - def test_composite_units(self, creator): - """Tests rational and multiplicative units""" - - # Set up EnzymeMLDocument - enzmldoc = EnzymeMLDocument(name="Test") - - # ! Single rational - # Create result - id = creator.getUnit("mole / l", enzmldoc) - res = enzmldoc._unit_dict[id].dict(exclude={"id", "meta_id", "ontology"}) - - # Create expectation - expec = UnitDef(name="mole / l") - expec.addBaseUnit(libsbml.UnitKind_toString(libsbml.UNIT_KIND_MOLE), 1, 1, 1) - expec.addBaseUnit(libsbml.UnitKind_toString(libsbml.UNIT_KIND_LITRE), -1, 1, 1) - expec = expec.dict(exclude={"id", "meta_id", "ontology"}) - - assert res == expec - - # ! Multiple rationals - # Create result - id = creator.getUnit("mole g / l s", enzmldoc) - res = enzmldoc._unit_dict[id].dict(exclude={"id", "meta_id", "ontology"}) - - # Create expectation - expec = UnitDef(name="g mole / l s") - expec.addBaseUnit(libsbml.UnitKind_toString(libsbml.UNIT_KIND_MOLE), 1, 1, 1) - expec.addBaseUnit(libsbml.UnitKind_toString(libsbml.UNIT_KIND_GRAM), 1, 1, 1) - expec.addBaseUnit(libsbml.UnitKind_toString(libsbml.UNIT_KIND_LITRE), -1, 1, 1) - expec.addBaseUnit(libsbml.UnitKind_toString(libsbml.UNIT_KIND_SECOND), -1, 1, 1) - expec = expec.dict(exclude={"id", "meta_id", "ontology"}) - - assert res == expec - - # ! Potentiated units - # Create result - id = creator.getUnit("mole^2", enzmldoc) - res = enzmldoc._unit_dict[id].dict(exclude={"id", "meta_id", "ontology"}) - - # Create expectation - expec = UnitDef(name="mole^2") - expec.addBaseUnit(libsbml.UnitKind_toString(libsbml.UNIT_KIND_MOLE), 2, 1, 1) - expec = expec.dict(exclude={"id", "meta_id", "ontology"}) - - assert res == expec - - # ! Potentiated rational units - # Create result - id = creator.getUnit("mole^2 / l^4", enzmldoc) - res = enzmldoc._unit_dict[id].dict(exclude={"id", "meta_id", "ontology"}) - - # Create expectation - expec = UnitDef(name="mole^2 / l^4") - expec.addBaseUnit(libsbml.UnitKind_toString(libsbml.UNIT_KIND_MOLE), 2, 1, 1) - expec.addBaseUnit(libsbml.UnitKind_toString(libsbml.UNIT_KIND_LITRE), -4, 1, 1) - expec = expec.dict(exclude={"id", "meta_id", "ontology"}) - - assert res == expec - - # ! Potentiated multiple rational units - # Create result - id = creator.getUnit("mole^2 g^3 / l^4 s", enzmldoc) - res = enzmldoc._unit_dict[id].dict(exclude={"id", "meta_id", "ontology"}) - - # Create expectation - expec = UnitDef(name="g^3 mole^2 / l^4 s") - expec.addBaseUnit(libsbml.UnitKind_toString(libsbml.UNIT_KIND_MOLE), 2, 1, 1) - expec.addBaseUnit(libsbml.UnitKind_toString(libsbml.UNIT_KIND_GRAM), 3, 1, 1) - expec.addBaseUnit(libsbml.UnitKind_toString(libsbml.UNIT_KIND_LITRE), -4, 1, 1) - expec.addBaseUnit(libsbml.UnitKind_toString(libsbml.UNIT_KIND_SECOND), -1, 1, 1) - expec = expec.dict(exclude={"id", "meta_id", "ontology"}) - - assert res == expec - - # ! Helper methods - def _setup_test(self, name, kind, exponent, scale, multiplier): - """Sets up a test case to reduce boilerplate code""" - return ( - self._create_expectation(name, kind, exponent, scale, multiplier), - self._create_result(name), - ) - - @staticmethod - def _create_expectation(name, kind, exponent, scale, multiplier): - """Creates a UnitDef to compare against result of UnitCreator""" - - # Create blank unit definition - unitdef = UnitDef(name=name) - - # Add base unit - unitdef.addBaseUnit( - libsbml.UnitKind_toString(kind), exponent, scale, multiplier - ) - - return unitdef.dict(exclude={"id", "meta_id", "ontology"}) - - @staticmethod - def _create_result(name): - """Sets up UnitCreator process and return the UnitDef""" - - # Initialize blank document and UnitCreator - enzmldoc = EnzymeMLDocument(name="Test") - creator = UnitCreator() - - # Create unit and store ID - id = creator.getUnit(name, enzmldoc) - - return enzmldoc._unit_dict[id].dict(exclude={"id", "meta_id", "ontology"}) diff --git a/tests/enzymeml/tools/test_validator.py b/tests/enzymeml/tools/test_validator.py deleted file mode 100644 index 4030209..0000000 --- a/tests/enzymeml/tools/test_validator.py +++ /dev/null @@ -1,198 +0,0 @@ -import os -import yaml -import pandas as pd - -from pyenzyme.enzymeml.tools.validator import EnzymeMLValidator -from pyenzyme.enzymeml.core.enzymemldocument import EnzymeMLDocument - - -class TestValidation: - def test_positive_validation(self, enzmldoc, always_pass): - """Tests positive validation with a non-restrictive validation YAML""" - - # Set up validator - validator = EnzymeMLValidator(scheme=always_pass) - - # Perform validation - report, check = validator.validate(enzmldoc) - - assert check is True - assert not report, "Report is not empty" - - def test_negative_validation(self, enzmldoc, should_fail): - """Tests negative validation with a restrictive validation YAML""" - - # Set up validator - validator = EnzymeMLValidator(scheme=should_fail) - - # Perform validation and assertit failed - report, check = validator.validate(enzmldoc) - - assert check is False - assert report, "Report is empty" - - def test_creation_to_conversion(self): - """Tests the complete path from EnzymeMLDocument class over Spreadhseet back to dict structure""" - - # Generate sheet - sheet_path = "./tests/fixtures/" - sheet_loc = os.path.join(sheet_path, "EnzymeML_Validation_Template.xlsx") - EnzymeMLValidator.generateValidationSpreadsheet(path=sheet_path) - - assert pd.read_excel(sheet_loc).to_dict() - - # Manually create collection and compare it - # to the one that will be drawn from the sheet - collection = EnzymeMLValidator(scheme={})._get_cls_annotations( - EnzymeMLDocument, level="document" - )[0] - expected = yaml.safe_load( - EnzymeMLValidator._dump_validation_template_yaml(collection) - ) - converted = yaml.safe_load(EnzymeMLValidator.convertSheetToYAML(sheet_loc)) - - assert converted == expected, "Conversion from spreadsheet is inconsistent" - - # Remove everything - os.remove(sheet_loc) - - def test_check_unit_consistency_positive(self, enzmldoc): - """Checks whether unit consistency checkup behaves correctly - Positive case""" - - # Set vessel to "l" to get a positive result - enzmldoc.vessel_dict["v0"].unit = "l" - - # Test default mode - Positive outcome - is_consistent, report = EnzymeMLValidator.check_unit_consistency(enzmldoc) - - assert is_consistent - assert not report - - # Test strict mode - Positive outcome - is_consistent, report = EnzymeMLValidator.check_unit_consistency( - enzmldoc, strict=True - ) - - assert is_consistent - assert not report - - def test_check_unit_consistency_strict_mode_conc(self, enzmldoc): - """Test strict mode and change units for all objects of a species (should fail, default works)""" - - # Manipulate document to force inconsistency - # On species level - enzmldoc.reactant_dict["s0"].unit = "fmole / l" - - # On measurement data level - meas_data = enzmldoc.measurement_dict["m0"].getProtein("s0") - meas_data.unit = "fmole / l" - - # On replicate level - for replicate in meas_data.replicates: - replicate.data_unit = "fmole / l" - - # Perform checkup in default - Should work - is_consistent, report = EnzymeMLValidator.check_unit_consistency( - enzmldoc, strict=False - ) - - assert is_consistent - assert not report - - # Perform checkup in strict - Should fail - is_consistent, report = EnzymeMLValidator.check_unit_consistency( - enzmldoc, strict=True - ) - - assert not is_consistent - assert report == { - "conc_units": { - "fmole / l": ["s0", "m0/s0", "m0/s0/repl_s0_0"], - "mmole / l": ["p0", "m0/p0", "m0/p0/repl_p0_0", "s1", "c0"], - }, - "volume_units": { - "l": ["m0/p0", "m0/p0/repl_p0_0", "m0/s0", "m0/s0/repl_s0_0"], - "ml": ["v0"], - }, - } - - def test_check_unit_consistency_strict_mode_time(self, enzmldoc): - """Test strict mode and change units for a parameter (should fail, default works)""" - - # Change time unit of a parameter - param = enzmldoc.reaction_dict["r0"].model.parameters[0] - param.unit = "1 / min" - - # Perform checkup in default - Should work - is_consistent, report = EnzymeMLValidator.check_unit_consistency( - enzmldoc, strict=False - ) - - assert is_consistent - assert not report - - # Perform checkup in strict - Should fail - is_consistent, report = EnzymeMLValidator.check_unit_consistency( - enzmldoc, strict=True - ) - - assert not is_consistent - assert report == { - "time_units": { - "min": ["x"], - "s": ["m0/p0", "m0/p0/repl_p0_0", "m0/s0", "m0/s0/repl_s0_0"], - }, - "volume_units": { - "l": ["m0/p0", "m0/p0/repl_p0_0", "m0/s0", "m0/s0/repl_s0_0"], - "ml": ["v0"], - }, - } - - def test_check_unit_consistency_default_mode_negative(self, enzmldoc): - """Test default mode and change units for a single species (both should fail)""" - - # Change the unit of a reactant - reactant = enzmldoc.reactant_dict["s0"] - reactant.unit = "fmole / l" - - # Perform checkup in default - Should work - is_consistent, report = EnzymeMLValidator.check_unit_consistency( - enzmldoc, strict=False - ) - - assert not is_consistent - assert report == { - "s0": { - "measurements": {"m0": {"expected": "fmole / l", "given": "mmole / l"}}, - "replicates": {"m0": {"expected": "fmole / l", "given": "mmole / l"}}, - } - } - - # Perform checkup in strict - Should fail - is_consistent, report = EnzymeMLValidator.check_unit_consistency( - enzmldoc, strict=True - ) - - assert not is_consistent - assert report == { - "s0": { - "measurements": {"m0": {"expected": "fmole / l", "given": "mmole / l"}}, - "replicates": {"m0": {"expected": "fmole / l", "given": "mmole / l"}}, - }, - "conc_units": { - "fmole / l": ["s0"], - "mmole / l": [ - "p0", - "m0/p0", - "m0/p0/repl_p0_0", - "m0/s0", - "m0/s0/repl_s0_0", - "s1", - "c0", - ], - }, - "volume_units": { - "l": ["m0/p0", "m0/p0/repl_p0_0", "m0/s0", "m0/s0/repl_s0_0"], - "ml": ["v0"], - }, - } diff --git a/tests/fixtures/EnzymeML_Template_Example.xlsm b/tests/fixtures/EnzymeML_Template_Example.xlsm deleted file mode 100644 index 6e08e445d2368d21f125b7da8b5b1c6f91b1f723..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 98325 zcmeFZ1yo(j(=SL8g1b9GgG+FCx8M-m9fAdiK!Urwy99R)5?q2iCj@tQn@w^h`QQ6} zZ`PW5Z_S$bSnKTS-POCLy6RU|z0cvb)H852FbFUxFfcG8FjHoz_gGKCz^>rIz)-=U zo@xl$SUVV5JLo96yfw1dqI0&ge31qIlp+HRX!L*n{&$wZpz472JOffQ<|ZFhGX_R# zwakYOI|MUV3)~l5kR^RJT?xd{QMS8n2MX_^Sl^bYy?U*6o8@Hu&h)^*uA<1XR+un` ziBcZT%)$IYwtbv0l&DWF1Z-{hXS%!tkc{;-f{^GaIa*23sK*+20E`7x zgQMxDp|uBmz6q0Hxr9`ePC43_dZHZaY7it%qf!1 zO8&6ONZ`mWy*U+_LY!JdBNgu0{(&n#SpjtXh0u%c%NIeo1&+ zVr}&KZRlcFb~h9XG2Z-#341Tg3Jp?mM8v-5tsbKf+jabq$L9wqi_SMrzShlmP5f+2 z_sVU!HV;&w&^j;WgYNmZptexe_Zac$GX7$vL~`}C4=ZbMr7bN&$S3E%-sB5IQ4xIp zxruJm!cuPFPn!6PgL*on-BOMePkWJ(t_u#$`auKYZn8FPjI;_UYY5g$G}hyMfH6Eg zJOg|E8=%xEGmxAD9BBYAU;#kUu`{x?r>A?o{vROu-x)ssUVBNDj9e!JoZo@?t$**u z;0oquO82}VKV zBB^!yj+6jZWkwNTe94R{BH7W@;p&Y(uLw(OE^_=eL<#FABaSB{7AS0X@pJ{ z2O2dO&kutq(fduejQW!PW$BYiLB+jKe&uy+8Qak#$zIcOd0X&&0UXl1V~Oa!_WCBX zrS83!L}ynx%8I5OX65>6cAUg6I);{?PlS`(Q19GnWm9?;h?!9?UyX?MkY${Cy{TqC z8c22NVuS81?mg`D2_`I9dh%~Zf`RBOX$NqK04IzC2KB_*lK!WiIN8`)=-b#>Jo?=~ zZRQE!e1W$Ad;c}Z{;e}qPDzfS3`ef_5%2f~%kRMG9r@Ifl>)JML8y+Vi#f>e0$d9X z#VQC}-kl6%fRwR!UndLpC5Y&SKd11Ogh~8j+2Y!oT=^NP7hIBz(b$dIlCiBNu|*Hs zkUp`wKt{J%9JMN?!1LQe03J0%W|90{w9*z#uOH_MO8~85?@h~6!p=C3rKbv$8adp2hst!yJ_ithbz`y9&jYAnbka>C|d~VX)6|g#J5e?4=ZGA*sPjqXg4$(W3m6 z1ojk$Qufjf6wQK~M17y1Gi^EZqHeff^O_}jI1BiIL(O3;w_#%jsD@FCPB;~f9R(0$ z4%QnaR469)9<;viUQMm`;Ff8kC+CxBG8M&_VzQGoNc{}zv@q3qv%%il=sz>*HB*5l zggMwEhgG>A@Ci+(H@WPjC-7b&hw7t>Xf7Iz^3exq?N@D!5ZX1@{I=gct>_li2rFxQ zMnXL9pZ%N0W{4YbV1t8!vA}?VAp)uhXzZ`LTB2elx5AEe?>TnoPXQ7_+2F}4nQLCi z^hMWiIz(;=l=2{z9eJ0D*ZAORPzRk^BCGXIUc%gM{b(i8q?_li+6s3i@~r?DE8`++ z4>MG8V^ZZ!;FXp3n+h|iK=sh%u*kqG>5o@iyB8qYbk6(o%|^&)U9^X zZ)jv2S@g;)cb$XD;I3L|r&7MXDS?W#G9c-J-osEd-bYgKgcGgP91B|2sxgC(=0cLi zq49228?D(Ko!iE$$2jpHnk#C22ag0h_xh?tKqmXs*ooVeZL{gO84WguT0CB&+a?6= z*KMdYE%QaW=m)}eF)zWa4#eBI+ID72Z^*&tFBsVo`sz4ba;W^DQ4@GZD6{MOmg$zB zjGNMlOIeWle)B-0#i}Pd*>#Y>wX2FQ^`73LuUAeqm(Fe%#9)cdNlQS6YkGNX>|--k z1#hK0>4^UY7F_P#K0O6={xUOENiVJB0Cj$1tgwh_L*`BfgUkCLNLU+UwqsDGCs*?5h~qcOtwy7@*@+C#1tcR<&yuF30X-+l``aW z1I_3*wiwg`#R%$;2x;|_M}nGq4X;?66BEwao>Wvnbc7hZliMxc@VPr#i259d#G^;Q zrD6@%K>$tIR#r(E!CR^XW*P7~Y;FHWkNG`~oSTb|g!Si(liQ~Xx9EI=9Yh{yt%NDX zA+Am(-wWL?P(BJEL53Nu2}G$0EW1s?aS*Jct$E^MxS$A-E6e07`?J~AOh@^oCGbLR zERK;aol}=aTbtfVu6&t&P~Y}A+?=j{t2Eu5xhm0YE)E~MM{DGG!OSR+$Mv>o!_$(8 z&+jN&yEV5)(_3aWQ*U2R@Idu5Hpd*2Y7}o2hc=k1BUDa;>|lHcygi{26Lq?4?{O7H zRUX-K3Am9h(psjfVWzQZIK{RnywcgcZe#cTi;%YqSR0npAV<(B1n0B7cEuVZzA~-Y z<%%76WFO|Qd64$?x)Ambrk*n27!vv_o;fVFw{tnve@`Wi3Ed-t_|WpO2tTpLsJ|MD z=MWl(7-0}7R{NC%^6(JpmdQwXtiS%_`SJQ-#;0~_&eLrhHjl#4S{PB;iqaHbHgs#M zNxyHos1f|dk}=O``(cUBaD!5OAT&XVqO#vLWS5`E5x(pV@^~$@zEJ>`MNDt(O$Fmv znBVr@e7uEx&x@8Kj(Tt{Wo7$`C$PzDaIgjXv}m}OVSU3s&g;(nqx6eo$BSJR##LYI ze40;vdWWirDRlaZR_OVhE4pgW$<^xECtsYgE05UmaY@rTq2A~_j~|ZhXnyfHxbyPU zSw4m57^`pQ7-P7x<7nd^JI_i0EyleO2l4FD;cgeQ7+!F2-vA)-&*0FCdzx*Ze@?LEV>o7mf zZo=I9MA5;Lty-mc0m_@eZ(Y$>>*+_*qKIN-eFP!sjdZ3H@RZ(3I|>s!KAv9M4iGVF zJ=;+dT0#PHx?7!>cTJ-L$)TUX@B{>{VBc`m;X`<@p;H()xx%u%QJJGyKO8N2*2MC; zzgwd31wtpyYw3woX{;nSEY}(oJmaJTw26H<#ute~ceN-QZkd#xh_Z}TvsPT1#k9n6 zf-p|z88H;R?wZqc<+)wW;qv|L95}aMoXO%DhVErZ$?8W{$}}HMYEZ1h(g=Z=f2dp5saA1oFbYk z5jDhl=fIngch~2RlU`>6G$4_&!%OgXTGd$klT#U9-J1 za?YjN@69VBn>9fqOaf{FWL57a9?)`&-Cs*es#T;qlqK7iB^#L~d}*1wR3_y0R#R0= zX5V#v22#(TG-B$=K5F5ikz*>y^Y6#382wVyrSOeUzQYUeE%{7^I-&{u^l}N;6-NVm znij)&_w#AY_*F^0onzvysKhb}Ty%{MJQgVkv*0V8)r`^GA6f_~+QUOh>Z0|$D3Yko zm#@#dlCULnp3d{5-}Cw{<4Djap;aW;+UQu7e`ualOp zv(q!(QqT8qf*X(dqW`;NG)tZC*MEyIC9>2ho>-?swB4F7bNRPRr23 z7I=JFJfjz_ZZ|ke*a%)XN6Mj67O^RCjScqg)mPQ+6@t?6 zc{i6^xZrjc4vOrYn5^%N7B0gfDT|us2@##@MyOlQqMUdi?giNp=>Cr+_YVG zyS+F3D6;SL#d%8VRgvNRh8pt&OUzA9A2n=jl!Hs|x~W9Es(BR1x#=C17Tx$KD-I6j zhuYz?&xoklLU&UkD`b?x>*0j$ryWQ4>;589>#9b_g(>EPbgF1#=3+QvZ^SsoT*dqX zEzNqd5SAj!#gn={<{}GCmymyFZ}mEpeZz+it`EzJ|NJj(amUcGk0P34vVHl+R7p-< zk#mvVkyDYwkxP+!#2TEhhVi&b^dhTCqBPS-6i1s$!Y0C)!>Yp^!cN2BP-n-Gv3uy3 zqSA}&(?~C}?Msr_zGTm3cV|y!4`(lB6J^P?sAH>wyrv`Bt?Bl!q89i^D$GZdw?1PR zc_^>Q@5pb+AB-Z6<}H;B_G7msLd>mkllFak8&_yPitBH#GwD3xI^i5 zENYWC%Dg4>N+R8;=*?+&=A0@EK@EW;!5INOveovGa`)yDeQT`6+gJ1H29sHArTmxyj3`0l9cWw}aKlH#j9QJqA=Y zGHICHMtt;tJO7}aiqB=telx>ZH`^1YKE(TO(B!ky>H*j{2U=5t_HSzgN5niZ5Mif8moqV#o4faR1uPV1) z8Ln7FF-h+v^6EB}og;Vyr;jGSKxxI(0kbtSbp8EnCwhYVIiy>^Og?N3`+t_{!|dJ1xbRwYYcYuRFJy` zNuIuI0#^P^P_qR|oxW=dcJxfpy#+~+zH0_n{#-Dn1<8!QYYukwT(G$X$(Fur0apG( zaG?dsg}!SEcJxB_OF`~dq)7U%Rap5eLCsdAMEb6E z*wHIN_g17#`mRk_`D?+HR+Rj*t}SZYYsvqr=y#y74g*OhtJ7I`bUXs*p5S+2zm|@D z$p8<6>gQuBM+cttqt`ODNoMzeFWcKlPb3Xt_fU>v_7+X(+n~i7Y5!{C`mFb-NZ#X^p)2(f(iy*Y@!iIp3yh3)e;N zfBg9Wu>b$n4eDs}z1*(CVILqLgMuHC!Jvwk%{(jG9d(Ib2I4b=z%1c0akz+>i3W=x zu+B!4FL}h7QJV^OyOzCPpx9k@+gD{G<+|e^c*P~THag(gpejuy-FG!ei=SsvQgZ@nn#VPim+C@wLTDxjGeh}ZA2#;I$7JmQc7zz z-c~=@xGSX+`_?zIQycG`Gi|P|jXAh-xCptwsNY&CmPN zeWdxMZ~0y?X7G0PB@o9#eOycEgq1BLudu7t7LesNsS#im)6zo*t$?ZW`Qly)`#q6kJgfiAe9Vl|A!VC#&7BcqpCoMaR26fo);QpV zmSRxpZL(uQ?;8iJLEgyXbf?j#r7mQi~fvL(|o=weZ@tCCIv8BjY$DdwwuBPXwa~-SI`Hm}sA(Xcvhj zxvdW>j%WhJTql(w45V;RA*MKbZ=FP6S;m1j+djEPf2}CT1o#}RjUwHA%n-cY_!9ks z`_=`|sAZF!6`SVhT&ynXo0pMrLJ$?IIO7(k3a?aLM%${-QS6@nHAaiPK8B0jICx zCC^m6!*ycTN7?9mljp>z>BkoiB|MU(}xNV;>dJ~R$ zO)QsnfHy|YkO9-p&H$F~Qk#$uW`i;}rH;Cd#(sXU$~*?jG+z3<+0 zYWLE713PBDvM-SDJm498^m7{(j;m`2Cdt5Tcq^DU0}ytVkTP^8z+1RFg-?#pb@2>M z9b~Bt<^p%jRlGA?X*5h36eP(C+Er`p9E;y$;EPXKe{%_>rmztoVUXW=+grH`S4uh$ zWhyO~m5~Q=w-Z!%{h54*!@;NMEDxWN@=cD~aZ<8}m?U01d0nw6RbvU`K`NpA`Ysy5 zleA@lJPog0Qg%g!fw7Rt**%^%Sw4HF_)3!To!gPDBNEkiraD~bESM$ZzVL9(_COkU z5_LP$sx^gZczV0z9nO<=Rc)kDANCVbc{Jl}7n~t6ZH&Av5j?MYb>X%?%ek{YlQmtY zj%Vogka7;tj_}A3@LF_+w6O-|^9*RHJ%`<^UAX@0aYQmWH|j{sTc}Q~j*zvp)!$~= zYt_PhUcI#Uvcv4oyvw^;#r6N>d9=GJY0XEay>J3iK48oH`Ucrt7lHww5M<Nxde-@a_dQll1dEw^B4!kK=|bluEPmAM)}GTJ~jU6Rij>-z!uZ?N%N~Glbq#Z@pu=`f(8aYx3-? zL-r$i-uCyl%BbuOaEI+=Nz!Jf)Mv8-wKgHk*f}}NAM_N1LsoI^juNrlinG-HNS{Z- z%fc_}Ky7z-%QuUntc2S4?zh({_vaF|$%s1I2dp=T8{;~U>2p2z!@Y)*;3S^{53k4d z8R+C>VEkk{!-{Wv{r;TN`Z(Cq+OI9`yPuu_3l*aM8hJIo+m4{kyvM|%+k8*xK5I|s zx)6J5{97fy{oFaw(rtZPi;F8)dBx`5Yr;~=%Q6H>JKfqT?=PV~=~XM71XZ2KWKGrI z+f`?XXgTO(Cd?$NUPs|ey3ulc9I>dDubX#BAMs45qHdsx5pR^Ld&?XbcRC&A`i>zs zjI6ImnbuwN08xHn&05j7RxuzfF*rXrOX%GyqJcbImJtUxJpj{O%zX$q;p)V5zO)X> z>bEYLrs-A=>I)RGs&%g&dU=mMOZwz;-_kYh4BYS~*Grwx;+>q_yfI+aa!#>(C%F>y zZujh6>gBFEo$OZ1*hnmC>9Sq951DQJLKOF>>7)iSSq`pTTS=~S99mlz%zOvgtqnC&`G4@=1x6ruyq+mtP{8M|f3Q~8>l8C5!DeJz|FUR(299kCZaqMfmG2N7VGZxid zlbR`G9J%S#fn>IZ8tu{P^Q(D=I+FRBru#wh!`kM}6SDAPChn78q*CLrg(Vl&ldM4x zdnD7)tl03|RLLuTSzW0+jfoCGQW!s1xV#!Rzw;gQo%S{=rK5@2J>A<4PSN~*!w=mO zr6Pe`vYaSazbS1j+j;eo!U9s3g3a=Pg)^ZgXxEp+_VnPZ-|I+okc z?Y%990!m)8s9T3k)2<<012_Sd45AHDPu@G;)_{@A%abrbz5-$3=+u=Sfr z7d3W5n3f6W!c6mtB9RPRXM)5RpJ{PIP8Gn0gxdw|+fA}I~;d#Zgr!jTwya_C^wwnqjx z`T$q-M@or=DBz-&bNymuio)TRQuB+x$!6!_MR#7XEm zD1wko8Up4@^idls3$tU>m*15rMjI**vt!Hmy(>|UHdGO2$F}chSE6cds8Y<19bYgv zqAqQyO3aR3Uw${D32mra%#JF*}ZY-@6l$>Ol2lb{zYDb|+%iff~l_IPnGZAQIMr8pG^3?R+rEyxk|i z-A|{1xQLQWXhq2@)8MC$VenY=ag!jE)`1>Z?Kq8P@BoS{2Z&N;zCeScX^XYgC!fAv zj^`f_zxOx0ot3sV`OzwrPn?3!GK%4Omoo4m88pdn9sKBPQoIA|?>>L&{+D7O*Tv7N zeB7eeyZ-+|Q8b|yInPGpb7u&H2Z=NYYMia(H1xkL0=c^0wdm4sjgHeEd-(W+^P{u> z=S30e2jgqVk3U};|4gS<|465cmg~G3MHF%zQ3)0Fw%cYDl$b7t+rB2PMQ_$pav zI88fUr&P7oKC^V`Vsy-D+0~YXD4N1uv#D5OBlKWji*KS8mrpY$^R~s(+_|H7Tzkbh z-~Q$~MrqM}Wumar_$B0G%%cBjwW->b|BiJF^uYo{j8plf=hyR=138F?nK^59W9U@j zaF5!;_Ab6)=8dE`K6Wzj`W0Q`c7l>7QSeGQa|dU zB^ta`hIzl-hkwNgW^F_TWBfX*7q0>@!xTQOB1(}wwoCJ+$&+%=rVC+crLt{vM;z{# zr-b!&J$X_zsK|;z)n9cRGa{ItSKASNZ|-%}^W|l`u&yZVI8@(ENAf~$vC)Jc-gd|0 zfq37pcZT%oj$xt>KI952WxWVVU=-#I$L|~#RK^$t#Lm1BLG}5F(RD1m zq7-OfHFho1QX*iQ;vJV?qqDZQ&iv+>eVSVYMaWDKf{8S`p8pkw8X3nrL^_K0IdFYtuG-NT)2P10)8S_qrH=4km z^L!v80yD;zV(%8Q8bdWYNSY9SAW z@({m2H*$g^*9@UGh+sYsx3VWeOGbsLq-xf(K&6z{Ke)EkmG9E1zQCR9WWY$PVYVFN zc@>t*uy1W5a>$zW@Lc6SziJ2ZEUaAuKI_w7ovLuRl7)93_s83A0*e#Rpdt?9%pk8y zY9v2`C7Pj2A!kE$Xv&)+N2;YDiBOW>A*@GRdRkVk-PXxZ#%f_LNuR|Sy~Ra8eFsCp zKhSrhvBuV>Hw&LRIzr>tH|9b={GQ^N|?1?{5E;hic!WZTCJi2!jGi1^Kn}98-zOPO^F1}UR_y-v04-oC6|n*SUF&sV!7Jw67<0?DX_s4Ls;aFa zX20}Oudpj0qc5ubpuE8<$)|0ZuUFn(Smh@3T;6xqA`Lx2{M(yuS=roDWNI)lGT|rx z)theCpKrRYY=Af2Js`O`r}A5ZV>~EgrRsoBipt8lZq61duxc{j2U(wU?lm1)64bR~ z6$vxUw1O7z4(K|IWwatOU%%-k&li}^2gjj<9i_3mJ~Nx!Qp|$4fKlm#uxorSQzlBt z2RE(2vqSctNF2!Kg;da%xd zz6Y?B;$bC+;K57KQsE5L@i-;Ik>fgdJ3IHx`y#2NcqXarC*!hw5-Y=`A#Stvn51SH z4|&;{JJFCLz^m@GNwp6zS^bNAz!Bk-LA{bx`sMS76q#KC-K!G^qUv#HQ90@0>R2nN zuWgu5&#Onvk!ILcXtFW}x7e{lOl-I58n{5jL$>@OmIoQk zY*=tl^(D1)OH5Lf-`X_cvppj$n}tr4y0WCKOK1qUtt)v_nOHMp!ZCC&-~mmcw-A8o z{Mmv-gfCpbg4y~hymgFZtDwQj=<6p-T{JXDx7!Hi;k4qT=Nr7E4u=Mu?Wx&#tmPk= zH_YS~2eVG?^PU*p)4^0#OUNtm_o>8kSouk?$r$j#S3JGx6l=JLW3^^(*J303pwIPW z$kxy*P!RW7Jo>Optg&!BHrM!vH&Jt;FqdeNRylyA( zMVQtx(J6oCdwpFKPKZ*mI?N>f*3@A)~pe@4?`5zU^T?5Pb51dRxcyZocjQVc*8<{(9aE zV(MDc^ZM$bEsfj^Gu<=f;l?%TFkjB-X(}wmws7N%PT0b9*(Acw*xUi?(1GHj5xHf_ zwgVVB)VtHItF3Xw<*^4i%zHjQ%(G6A*KPXS4xP2RXmM?s4Z)zPv+n|~n8y*McjQ>i z?T1f8rZuq3>S(N;Tk-=tc07i44ip!iTl@;H(j4H16jwZUaFR9z(~IMokC)B`ATWT2o z#f)H!!0#nk1+xP;s|(Z)G<4C_@zhWe@*};(j@mS#@O$78Vw~d$S{{}UaSGFSwntk@ z&c^zN_XTPrfXJGu+X|v#h@wt8K{>COcB9Rmu8nIvm7J4{FV`>vLHt56h+BtQbE!$Z ze<5`w_nk5*VO>HB!ZxWqu5{hfnOm~MD=Nn&FOpGaMS3N8b*+&@hClBGQ-q7V{Ip|3 zz=4jjYXo{Pj^VS)=T}dUAu6BEe!$}od$GqlN*zg)zHqAa{emWvT|NN6@*%18kJvtOHPo0HB-M8y0Ou9a#e!mwa5l6l;^c&MN?0cjH?(Br_mUyW}*&?&- z+~fY~xc(d4Z`Iil=qHwoCfS=O{FCEr75sPBb3dIeujg7#Ec*l3mE|4>ljG;B@P?3; zkR0#v1m>)=RI}<&`*%cYR|E&-!=K#<+ZwGsTN&$@*VN#M`Vy=4k){x?kF!6bBo(gD zwJ)M160WbYH=@KBPU3ciFqn?8nsog(=hQh~$u4PaQ7H;RTTx=xd>uuoOH)4}Lh3Y^ zId!sbc>L0xiGevhv?)pNgc%+(yyS#g`{Xi<<7K|rEw|@&g=s3?1!2C!!u5i9Z?vYn zCyCd?S~%$b46uyb^YCwQ;n}JK!dDOXM8OAymACgq#Rr6To^?Vk->WNbNf3K(4rWAs-LgABfflS{ zj5)CWLly|~@daXNJPG+@rW~;!I2e*7*K~`zC|wZpB&TfBJ`_fs#c${q8Q!gOuooTU zrI0vsVHQa_)u(a|9a|&FLRQJig_3?{WR`B1KV9Af-oNJP?r;yGS(--p@bM1ya>_70 z(_ub3XISkKt$0b$y6|G^(+Fd@`J_@|lG$B?vR|ZOvQGW>u9q6bi$24PwSIkDmE(Qg|T* z$9m2veP{CRXoe84Al2W~2&lZUh=A{9jiOG(1B_}6xhZEwUR`@$qjlDY46pYq|#a;k=VB9+8SNqGV?%FArb!V3l=P# zJU@zS29`}~0rT?VacOwJ^`i#)G?jcaV~8Enp~1JKtBFKWG)(USxOf2@LDman2w(YR zRy4{8;y-|bQ&=nO4|(7qhX#@hD-uJ$O~WpTLfT05rh>Lh!_J}_f#Xm}B;r15?a}IV zNs7V6NmtY^6XPq8(I7VVFP3DT|GNVc*L-4HF%YH1PG^Y(TUa*5r|>E&;6t;>9@bdR zJKW*0!cH}Q%`P==$2~wUY$ME-#WU)?3A_=&m7X%Zr_3LP_7{hwin;LChbL;bTZBP!pCgRNM#HzK zra3ARh`7P4lnOL=1_W5LY|@HcNc00=bF?QWIgzXvCe@M1lb-El4Z_Y09oL{#d1|3~ zX{3{7`e=QGsZFC%(%x3tIoitgEY%)FnxR+QE`~&!WA3J8$gbYN`Aw%bjX_fZDvdDcB|@cd|&k1I;L9O$205 z*Jc&h)2PhX#?8Zv5pQ9(&`{cH73aS(C6usAsX4lq-Wn(64k}K}$Kr|kluyk43F=_v zN++AkAX{}Yui^D}&(w*~(N~z{o-3UdtHu69ci6xdf7Mgb$uLtnhZmeEzO>-^mTfpC z2IZygt`N}!)#P3Y(<_tObmXh~BUIjO zbjFz`UgpoQI23zY@@*NVXc4imswDeD;car)h|WA!8tNihrr}+j3#s~8Svw+>N4_Lp zw)&@BtCLN3ht;9Gq$#byxhOoJv;CH~$?rf4BY}S6pCdWNs5Y(3^WhAhm0{+qF3E>b zc#M4yIvdZp!?Au9iP**lMpoLc+w8VXDJiOlLwe3wr4^UZ9M|nrD^J>QemSmYSf2ES zdD(`~Oa-b*-ynYqWEIvBa3Kz)r;sD%=R#OO#SaJ*CW_R(j}Y(WgxJ9;F)43thk(Gv zu{12NXeWnA#-Z`$W%3MaY2;dQi^wY5A1;tOQVk^C4iUE7PHYh(Zm3>rjTZ-W8YPhE z6-r>{_r=6UoR$4SPIRE6BiirqQz4BJQMlTM06{~55bVj|XU4a)(0goo+9xU#Zm_b=dn?Z&ux$7G@@6TUwXpoX84AM6c3>3s5tCOjDtt zS9IcD~ey=E(VC;W$&Ag8>_L9PsI zZ-m&vF0m>1Zuf)0{fTmU5K@_{=)$c_Xzt1aIdr}{%1GI=xsfSbFy9NOuMo^u$6noO z<4B0{Ns{>Wij(*SIT>%8M~If75`|(B^ZLKu5WuJy{y>A`HgrORBA+Jm-uU^~-%T7N za5@$f%KIH&{Yy?H{6ImB_FJOh2uHXn7PS#wj}P#0tjsgLx&|L);8ip<@`7SkE@jg$1TEX}HBlROzpC$EUpPubap{qz0|0E*yz{T77f5 z+{Rr)aeXj1GR}NHKQZloSD}+Z2YLQiScDgOY-Rpk#=|SCG08!c`Q;lV+CUXyi!At2 zmDl?ktVoJAf7n%fo#?ZQc20=sfDPX0h@HE*jff23$_d@HWK)=oHO=<85y!L}Qthg( zxqwbwvD#o@fLiDIHPbks9(b>Kw2B^e z0#-Tw8KkgKmb`F(oeL`H%F_@>zKUx^b9YRa)`Dp}rkygUK|}y&G&Y=M)`*cnFw) zhbJ%rf1#-1c`c!7ri33d8A%l8F+n*`2@SQEhKnOEJJ$fv;zl~&r_6nzg7UV%PVHlR z-NE^ludfRxNV`!x=7(yq@Pb5@_ch>l?Z3S@6=x>K5j%a`!jb^hsNEG~`kQjHW?71O z61kGhA@2nu2#aNX)5uO71nd)7_8ztY+4@`^9<}_VdVEjYAwA@X?%j|UOlJ!87$&{s zh~C_g?f`DQoT(MUqMyIjb8X`}^Iy|1CfLm9TK_-{JtwbrHR+Dqqw7g@5rLYZ#%N47T9=B>xkk6s7PLSP0rWi8^dh3 z0j%V#GG1WYg4&Mvnie&dZF{xclR0BcfgMSao0_r7rn;boIRB}n$f3{IT0^ZU8*IFd zZFK`eo4bG23m-dBrA|;0{^-wmt(E0E7moZ1pq4Xfj4Jw%s*2(Wj7_>fS2rOOY9W!S z3b6iEiAK3$x9nAp*TWN@8jBlFh9l#f8+F3?S)~B}DV+sE09uJW%ASQpPyrHtJ>?|8 zOp=638xSW2^PWiC=h5 zBw^gU^SWoyt{*Y-Ie?LwQp+PA)Q#?K%F;LIymt!dH@N{o$|TTWGfV%)`)B3`Kospw zu5j#`7SgZQ3G7kaor2PzKJ@U@D7_Id?D-=N*~69gNgH_ysK6SB!a^*7P&gZ@*fd{w zlj)!9Tup7pzgh<(!PX(Sf@+(Cae8zZg`s=HEChK~0Q3eYH$MO28N{!EA+iAboJ=Wt zJ{n~zQcXUGWCiSnQ5%}_AF0(NBuHWZ4GEeDf9M|F7cIc_3T5awo1vy+)jwRK zk4>m2=FZp!1{CAjp&5O0e>3WBMu{9 zebd+unSlf;m_2*D2C(LzDL}_-&!UfM$uJvB$JZ_C+mePcz1yb zj3VC9I#S;E*U6hq*QARc+#XqA7k9w5j6p2B5a)CdchQxwBD`P3(Nl!)wzvj-E05Mfa z?xqQiFQ38Vnh(yUCNH+)IpwlFq<%l+p`kdj5>Ax(PrvE&3WV~voSUr5RX<34wl5R! zinRe;rTv64wAWUVc}4#s zI{EMdIp&`U8Gyf8xkfn3SDsS;89?1KjN<+c6ayeZSC&8Z3WyQbqce){roKwdOnO>u zl0!&E0>I3Y4`78td{&vel-3W|aHnwQah*Fn&g>psn~$LU>v0kQL?X!p%tbLanMsN@ zzl5%UT~)heoBxFsv-2m9kbF+tBiUPHQy87`XtsKQf3()uv=3@NrtQi5ZB(n$@tZwh zRP+1Rf3w-Lf7&d7#;i6)9A1&Dp?^D~FO>6TKV4zTM*yEVp?~ObWy z2hYkhv!MH!8gSddc;)>GR;@q4%I~prW#DXi;w8?Hq{QHd??qSce>Cm?n{o!dv@hw> z1ie%QT){=(gv7#`$16w0l_ZlN>(#l6+Yn!Vj74eRSIJKQz^kf%!>e;C5x^Ay*!f!$ zGT&TCevM(;A=>hbD7-QHjw^4guke?<5H zic+yQ@W3js0F3zhqo@TGes4qsA-UfGoLYYjqAWK5Tqq>7SPRO(F0=na4;DI#rXDIXNEoL5t8zuw$`S1}aI?4jr4x$5pKkfbz zCp}v1KMdzz!>31g_gm-===0)4eca=D4Itbb+L6ePM^tsfsOo_E_nWb*4oQH+L%n-C{ne)BCB3Xy z)YW-=8ajq~Xc&{5%FNb?=i+_RBOg-An)hU@jCz50rm91>&Bo&<@v%BMxh{S7v4ZE_ z&x&F?w)Cr0RKz;O^OExMcv~C3Dihz-R%?eJ>|<8FmAxq{~(Gr59>}hqd*g2On}Hv-puO&{qne~%w+#XT>8(yL<4s&Dl>l* zm!J#Zd{-Uket>xDIKy1}=KJV4O9I4C$2kZfK>!aRVF2&SH$MvC0VEFK0VE0F0VECJ zUHj%|0X%@@>A0F-=l)M1YlS;IQ;1oQUHhph_ax${lMNj9H~|v;IoR6PNW~H!m7Gi) z_uZ4G`H@|9y?nkk`=4@$gtLB>w2S%m+E$&FO{?XPX8oW&lgE9q!C3S(9)aPybM5?D zaiM0z`&YLX&+Bw*e?I%+2l?+;2itZ!aViD$|G%0XPn=Q%!~V}Cr@*milIL3CKM3z# zzv6fqx5srXuo*7b|CmVn&xd|*X8yDFBa!=`I_>{g1am%dY5|D%|6gP$+58&#vdWE3 z+uh{dTA7aL{m=h=_s6$gXYC$;Jc=&7($n#@A_A;u3XYZ2JjpC?o{LrhK}ma zAE=y7d{qWYlgonMo*J^&wyC|_`RaIu?!IOGwa#jM3HR1*bw)AGRUk54u`D7yYeEcf z_^lMBE9F@HQ&x|~y!of+58+{`7%o)h#9#knw( zn2dLx^~iGu_ue}tGXETj9F|2H{IVUicFaIy@-T_FnrTH6d+qTVVThq2}+xE0=d#0x`ZQHhO zP1|<&_RPKa<^6yA?QX=z#-1mh6Q}BAW@Y}evg)8t736M;_KXc!FGQ#Y^DWSWxoA+X zt8jF(b&Wb}%M*Z0&X)!~;a=x%#;~+KkZU1?QjDF{PlWu!@z`J%?j-N$U@jo;z!s1! zq`HxM(P!Q{J+4V-)iiflC6OelJuX#$A6#s~59~=qs7?K=pGhqq04zve8 zBf#@T7r;^9%aThqM(kM~0I@8?k;xP{z#>nUd|o|i__hKfH`;OmFoK4F7xTG)>IDxb z%O0F@K!N>B9DhFZJmRQUDdV6MX#UNk{+E;M<{UV)aKfgA9OaolZ3NaU1&`Cp1wo7NXUr9= zfylv3HlNHB-Y9eA2mUBZS84#kDaDG_@o62!ejpL*a_e2f;niTLhEa1BL_15$X1dsh~K*`sXktSsFvv4<} zcqhFZ&=Fy}A#xu-e1e9@JqTt8Yyp(}J&TnV05*DOe~=hG#q0YPG8M%)lKyqM=%z?w zntXY+&uQ1A?t}ZX-T0h$6$k;SMW}oLR_37gIK{fXo1MhMU53a}pmQ|CkqsnUvO;St z5vP+hF>RX>36HVh*T_&~Z-v(c0fVLpk5YL{F$nHqvzj_<_+JTk(eq^LO zpmHI47Di+yWYG@r`0xa5>L=WFeK#=mSkO}7&4o2{qWil!{m{=NKk&1V|OhH*%vq2ks0HMTw)Jjor=IuFJ5J;>| zO$Ab{(lPr!b79}e!84Y{V`~{=4kgtMP^4AA7-g)Wb0hmq#4s{4Us~L9?g9wEsjFe; z{+!G+KS#Q+NtoYE%8%Nzq3Il3#a=wBu)ftVt8O}8#P$R-*IkNr4{nK-<}o+T)7EJUtD}x_Z3WSHduaV8k)$V?H&qkB*t*lYcu8?@GS~Wntk!a$N=WF z_pTZ774jSwf0LgvO5K>;Q>Yb|KEN5t8W zyWX6(U26~XP$t>OY4RSMJDKA70@b&(&G8@U9@e$ih!u-oMQMk@r|b?KQe$)_hAJZG zU#4zdU=@)&i!(x!6ei&8;GMzBL3AAVIFaQWTQ5NK;Nv%gAKevVuGGDTCi?E0bjTeR z;1J!aa)Sle_=L=<3nS!*7MxU9MhsHj%(1}DA(EXkbZ6g?(KDb<2rHNCt#t5GRzIZ@ z?yDa-=oJSKZ=s8Ct%H67x{=c}3w#wn$Fe?|iW0_mgYxTMMrd>)M7-p`eEDR+Wtenw zeXbWL5fHc`xn_BUqqw zzaGPZ;pLs_Q1(mS6b8)eK-c4G+&kz$W|Jt*dbPoBLhaM-o71J0BO$uQT?9k&kuC*v znPQW}&4;WM2U%%ZyE&A!=qI6v-<@x*;jiqHB{`4XcW~M_GjVu**md)o4k_$8z3qwd z)#X_o?L9fVbb5F@c)ybwT$)QM%vkc^ZE1dgy*wOfID5F&^?Ok94d2~*TPw_YdT{f7 zIa_*(%3Rag2oYG1SX#NP!0-Oj-ouELl+eIy6?xhtaME`arPapjg>hg~zcyO_V$bvR z{b@&qhHb(2y|K;5^W96YYU=u1v0tb=w-QgR(@6nHJqR7Jkwe7r&)&VUl6|!POUD%x z$Cc9XBIV`MI?80R0oDmgBe3f0_Xz41s@#>uy{42ANcF^Bp$MdY4tfbGE&>aZ zr8s&tCuwF@N|iAf+Fs5aKHT2<^ip$dRr7@T?9$i?_(kN34FvtfjHT&)lSFGpsZ+uH zC<-RYIk0r}5;aRjqvWExB{XQvmCXBdYzFf8FavSR5Z!|nSnF!XDNzDf{yYAsOoTcw z9jUJ>7`rC*v4mYP3S_uB@CpB-O8sPRR3!Yhx-kEJTREzJZ?u*Wu0S^Y~aa8Yb~fNbXXXsn(ZCQM)u?|GAY&|4CBd zj#3PXuAe<0Lx^1$PqylHqDSr!fl>%7PQVC}Luf730aR2;?1xWWpG|okb{_I|y36qo zZH8&yC?(``1Dp-|e(|fmPlYJK!>TQvp56kK!4ZwEA_92`=0ad`!aot5iHWZIB1VP{ z*7M;e$RGC|D-l?xSmkST<5vsgigRH_1>z4faoTl-Ycci`yXB@VRQq9bVHXO7nE9!+ zZf6pTMT`*Ch2Z4bh=`Wmw%WLLi_i-zT4n)-5?H3{Kg7tb{UJsknYK@yi#C`e|C3Vf zGOBNYSx+AmB5W+u7iOY>K_Z9HW<0aYvqF;g z@n#I8ltJHe=WxQnrh=iph_DED7vNm52m;Dzh(dl~BO+Qew?bmjT0~v~ptQsc^+DB`=w4=wJ3vrI&J<6q0CtpsLGC zs)r~v-Mw=RRE@EL=8Po$7?%t(6~hHxSC~yA_!~guKIi>QiQcKjR+oyg){05ih{n{d z4c_6}N!GPS@x%;hCGEQTp(qUFlzrc-r43ghoNWHp;h|PjGeyH6b}kjaMTmh#QsAbd zv=*-je;1m~j7K?01kLT1HcWp)pEv zKbdWRRieU6iSeGvb2cHUxW9awtJN52(VZ_Vxn(p*h&V)qm@j%|kmvJKdj*;zJlwt+ zFCGs{#6<_gBB1YpSAYN)i5&DV$ZY92i7S93lpn>18YP5IlZzY9xvV~zOE;#=#sg(l z^D8x)XU1PdNb1uND}??N&<{3=-)xDYMoFR5)Z&K9K`jSKgXyY&ajhbS*+3Eni4ik~ z{^|NN;RX_CfURPiFfo@fir08%73IbVpRm$LQp!n6XrZ8teulV%RD%B~M(TGlse?aL zL#G*k7h{$-m~Q-6G297y(T|Gxd?5p#w*QVLy$4wlFof!@l+l%xka>DuRq+Ru(ne#< zA5f|jP^~hTheg)&Bf-UXtNbHQL+$9Be{(rY8#zb|nP>dws{P<%{fnzT>|Ge&1&81t zAa=jP?+5&7e%}e{0>QH_aC^&=R^dTP<3^HCC!q&Dn(;&Rd$EQ`jUnmdFt-08GLuTe zm=0j>2&k|q@h3Lqq2mr%q5}QYd(4vjP?~=R{VhnGI$c523opE2$JReh;}LL5p3y3y z+qRvTm;7fnkVVMaWkz>-E6loD4HF}r4uv6#7$iJ`%&p1XqcTG*dC4RFr^+7w2Q-CE zMrytB>|;p(wEws0*#+p*3dDc3UBB~CzC+W9{70UW4Rq=1f2cLf3tj5{f0k#IJYsH< zbN#9I?w<|ZEy$F*jN&s*)qm#&4){V9g8efrk%de-q)%&lm%;zv%p(q!p`>?uISK)9 z(DkK0Mmom%3;JjR#_!5Hv&<6*+)!oa|1jSFAo2>Rz*|JEqZHsTFn{G412YyA8ikD=r{%a=VjACmO-dj^gnx%U(EjBKL~CAoq0R=BTuvRLX`Jk2tWVI z6#aL?+^spLtMc84=_J(S49+NIomnJXO+%cC^xLvTT=?S_0_+fHujp+m5|<9BJ=z)`8o{rDfM0$LgkviJrZ7-uv|DCojvhW5?1adg2P!$kydgR~9{k zC9uR5^&bhwD~plA654-FT!59&w;`}e_!9JDXLOzg-= zvzoGjmzJQv_4e~_FcSvaHM(B(gTHa2io>DNyRwbxL&%uTZy`2g7Qckp5zBiTeekd7 zq!Wjo0=(J)_0+1bs`H;IjWn^jDqs1t;iZ%LH4qW7cmOEq)|$u668IJ-e#T zK?gd}ae#I0aJ;&zERvi1EqLb*^b=o&mAN_asB5?O{ z`Y*3R2PV;RM0M?Gyt^)MNC#$8aAb8IxV?w|SBc&0j<=il4aQ6xhqw>&;CrxIoi(xO zLi(Nv<`rTlDsRkn%0;}iOIk{f>~@%nGYej;Unf1If8%Wx`WvE(7PH?Ti4WQv{G&|F z>{?qst6z@kUisx1?!MLEn5M1#V%TweV&ryP@>={=;sD4W6tnZcDG*D4i=04Z5#4ip zir+aLxzLk%*8e5LX6iQuq5m%mO?$@3okPiA%HTeaLHGZ!jQrok;(wFOIHB;J^|j~X zUv7up|CuCH9o*pqaN<`>R6L=ZCv(T<*)<`N) zIP`Z&LB(ZOSt_*h9?OQuXJ4Y{Atdm$Li_S+rcb@tEQ6gz9m~40Z@ND~MCCNxF{&*$ zA4*{p%+#NW)E2zEVfF%Iv7YS}Z=CfvxL}N8amR?9wq3(V<`mp0!6>VLvGK05Oit;- zH%_7`OF&AIfR_4B)z>tSLtQ+aYL_h3`UE6jmU-?{7PikGedbehVf20!H#)&da;^S= zu!NlVj#PUnBI{N3TvIDyHD8(*3TY6 zHL6TCOtqh+M-Tj*b@+8t<)CK8y_N;9Ue2nJ;P#b38I#mp%e+)5QNNfO1k)77G~Rst zhn$2cefL-k?x?{*k!6i7Qm6|o`^<{Es8qM4^ORjE<`C+VWz%>BygFg=Djj*`WQ zz~^ta{kFo7PdO3Z+aG6Jz=>Kjl~p@ULTa*zm_{ zwD^Z%X@60Xa@=XeTXWI4j1*xQG4pxI2h?b^cUohDXPc)f+u$Ps)Zn1F*)iecX=^fn zV!7(miG7)4T%S<#G7h=(B;la`b8>Ds2sj__&oWSNSzb&o!@b`uWke6%(;nS5f1`(j!F z_*g&+$^-;UC%X>>!F$&E;>xnjxonQ_v;6Uj35GBKf$Vg)DoL_}v06W5t!l9$&DZOy zO?TlYB4td$Haxxcp$BW#(!CDcUB`#RBsXE`MiL`5nV3y5bN5ZY!~ND#xgoN`p0~{h zwdn}T+ug#ZQM6= z+4hb6Zyym}^wpa9eatDZtNlMdB4q#XIpsre#HL}1N+CjA@-39>YX6#4-o#JE`#xIG zFR4+0y02=dhwVMml+lZuLR_a)?b}Lxe_JS$SyQ=i3*F&;AGh1rUe5V>sUtKA4-iRw z(en-1`(-OD;7tf54bAEPrc(kKT3ddGl^IPld*l2l1311h&RR|2(laAQ%UkKdzRT9?c$=_~Sn!Xr)gL_q72s(^-6#Mj{~s=8Z+*1o~h-#%?A>H*n}*Q_2qr4qH=>Q6PijyjbM_JoTQ zMNNY#A@<`D{i54`;Oxn!uN>4w?VtRAbeKmy+&SM`h`Tdyer1p7+a|sCI zDkHSXr0q0RwaVfOWsivr%6{<~@dyar(l zopnM3m(q!ye1JL~1|j7eIj5wmtiR@*R~O$G1b_JFgs`QnD-J7zh+no;?GFL1E{%pX zlS@kFQV|*U)6nfW%B|?CGc>p|ex3qD3F>?JB++oTFPBwd$(3XPOi2%)cf39Ajx@X$ z+UD@KzVF=oc0BFu88}}a9rN+M-Z?*Y=+390SNOcTI9|Fuo$vd4zurCb-K2E9pHe8! z`l_saMCjwO@4arj&)e0CQA))EI{vyZZ}!hSx8#h7)7!obDqp`7Q*~{g{#606P=B*Q zo}ZJ$8Ha4%FU||HFU=Wi$G2yr8xK2|LTu;@s^}F33SL=Im-``eb92vZzCLd6d)GxY zF#<8hX~xcvYJuKK1vIgMxda}`V>@Bzp6oZD?({q=c^dJ&fO97^$|onq~vhjeSYQS%?-_6{PPD)2kPlASzpZ;>Md1$M+XhdpVw~&7Ju;#f&Im2 zTX1i8v-h+H&y9>D%gn>m=IMpqlC^8$k*$%9wC-$6|BN-;`uq#?4`JnZb_e?0UGeMA z3$8QxhMsmjZh2?~i17rN3L1z!tv*LhHr+Ml6)^)fgJ3G=*p2NcXC==ZKiVSxR0ix9 z|4G-4-Y-rPq`x>%J?@oS#{?v%>?fLIA&%Vu&T8 zjAJZz>+5=}hd8(kEoCGM}vZ{=4)i zuNRkqgXkXri@3TOb91f^7je3_JXd|Y0`Au`TX1WfNXTfXTUYU z|80im#ccmBxQ+ES(9csB%+vX#0`iGHn+0Dm_3yo9QJ$E;0c1_`OrtF?Q5@Z&!ruSS z(q;?q7){x3@7#JX1BT6cZ8#TW>{%q7VzJTx06!Kxg_dqaadf&%2WH&r-vWhe(N-(F zgUNxf8te}M&@%6cM@sZo&U5Ym#;ihCGCn)RIqlF^SeJ~@*Yp;I>EBiRl)#m+#fK;A zziT!eZyofbAKW~ys3*2p1eigNeZyXOK%Q8$!U}&md;M!T@P9iB_CytDVgt0vTP*-A z{#U3$H+nDLt^7@-)owljK8!TL!%wZTZO4!!Fn^NxsIUc~vA{-uI`H#f4y1AGuylK) zN4ThqX@Tv4{OuK5w|CkYV1qxykqqUpaP-fq17Ea*=f@HY&!esbJ?|*A=O6vk$$>zB zI$8a~_-KRo<#hhK!cOKDTjuq51@g}+c$@hc-|=_k{l4N|kJ4eVUuVR{*wA< zC_{q&70R0p=AXeQ_g5PS-5xnYPsu*83p-%^hrCN? zpx($oql@CN<_uIfcqauVbLKQS=O*D-;|cAPZj<8aMo%2g_`BBrt3k=$;$0k3HtbRH ze^QF1_}?>bQ~VLJ|02_5;zMT5esB%>?@-t*TymuR8ZS|9 z#c@;qRcoC2EH_u}H-E#E=Q-`i91k-Tk293;kIH{vvp0^rFY^oH|4G2hs{PCVN{xk{_|@{)F&?YI#lQfzs3Awrpog=@SiJmvWoYbcJ$E_h|?ru?6+(|UlqdR(Lj-P8uh8sMmmO$ zzWJ!an1p*39E8XtMz9x@{`7x}n=s!lBQ?%N;HFYFCTJ_!HsGx+!g~2(_5I1usS*F) z#CGc7Yx7z+QLMvEsC9ZQqVR2B@w9LBne z_NM@l(0V9ORgU~;n8^BZm0>`0(U)A&TxueU1U4H=2l^8q zjHBxd%T5gG`sRdH!WxNDRw7Pa{fWE^6JvZUHZl+?$E^ZIUVh4FTb{&eeqh+Pn;1xv z+C%&)^07tYvR#r4D+vu3*a*?Lw!*^uY#)znr_1TKR1eWq=#7IPANSjA!nit8H93KZn>mi7NMc_vvt8dBp;v6efXnhdDagCiO?0y?$ zkpp7g#5rgKIJg1psc6*s3S}6?@eexw26CR>jD*A|w)As%lm{|-a=^sH_elz^(YW}@ zsGn(sQXI}9rjp^AB9|@^HWJ!J<6XLY2`M)EUGS~IZt5-M$z*v5nu7F!>^Qh3MzX*Oi zN*_Cw^QLJ9%YO=BdC{8$rPpwSmAKr(;yq#J;?e8?%YRtLYS*#2_ixVE4Iq+;@A>!` zt5msVWUib5S;RH-!UO~6C`rma+TTjeI3?Yn8>xwM!N4iy5)c3-mPi~)md?b@UnI6e zTWAQ7e4Q>$B-V{7@e^QAzJ$44akuX+s{I~eAGG%oKE{e2thYFvUr}OiUi?^rS5Y?Ct@j~7(bh5YI z3ElRW*O-N(5Y+v0x69Ln6xp2ChqDqsUyqZ?^}U16KzQ-UAXiv?Pd0TJXs5*(_=iK1 zU__#1kZ}G6L1$eNw2NgRdGzuCYxMQKPDZ-T-AC<_`Pa}1Qu|RamT=llJj2?a#u-4> zIj!K3kZYr(?92)2Rq4QJEk{>*1JFjk9KbfDlwq4dS|(e$L^0+*$mHy&C|rXRwKd$& zG#zJgh^GG1d9ERDxI&q9nDM~WaSq>bkp#8S=zs}llWp&8JaI*|OU|~4u_0H0$8mQich`iw-ZeNr+S8o}qae?Y#*Jrxm5r7Vr%TwHOyTN*5rWl=U!N7w->< z>f^NH1yjbgdsD+ss(Ne!x6@`!;)TfWnCu}a!&|YXnm0X1*9ng>x4*k3R$GDVEuMn6m zn+;MN7tdcfJeUO0A(nd(XlKuI(Eb8P-1MALyB-?r>{4X9HNF7auzkUHrV{p%L^SR#$W}XOF$un!L!L58JimTB)5DL_4v^+yDZaaq~UnOVBoH z{43N0hPtIWrWx@}uN;ZKze0?CWl@?R8!sAEk_}=r1mYC&P-Bz7gj{PrXO6l5n3v5d zd8D``tyzvBEheRVj@_xqD7<{``fN?2?JPvbImOxhOFT~$V!u&6qH+l0?Jj}Pmb1t~ zQdZc6iedcZ|SSVr)re*eQi7DFw@#Ld%TZVr(lA#IVF}h~w2WR!up^r5WyGwAYE$$t{Fz z-`5`ys#HiE{ISgp7(u05can8Wg6(n`Ki4Gl`9(8$MVZEOeQt9m4rTCREhJa+qg@fE?B&D!zI(ccr?-k32@WT<-u1vGtv$9J2PR3KLwQAs~_*nLFNO zF$!__@CFfscNc2ELgQtvOCo-ZaP@iWVUg>rqYtt`c+hRN!)7W(BRfUmIu3Fpq$Z+z zwl6tcL8QxA2}PFRA$x8OgfV%z_#UNJ!oe`kYweZaWnvj7PV-rJKoO_j#`CQAwR{=3 zX{?EliAHIzj5J%CPov;^B^93#ZHdCs{P`@=e)C@ZF@bzmVK27KS_3-*%*@pg%}iq7 zF>@(97j~UASC4<^g^+c?hKgz64Dz|hRlw>{sWNzPb@^;q1^vjFrnQS5`rvo)`w&N} zAUM)hbw?0kT@T>2X)voePsS3&tqivPyxk4@pwq9KkS#$9#3$(f7IIX~-7a;La6J}H z_{oxOGP{5{G>qXR`X2IpU#MZ42g{FdAC{B6TU+y+J{j1@9a2B$vTErrrBFvxd)of6 z+4GJ8I9#nz1{<@eQKV)rITav0aK;KUX_)_*=wi*ocJeqlYH!o;9M{}#vfL#=qeK2j zQp?(BIcmyl?6J>0Ka`dQ+SU%hPr=nOfvIH=iLXH$Rafd>KYHK4S&7tvyHs-jqx09f?uP|71dcE7!2X`0=ZpSv(=;{|G0p?BdW*a<-Y+e5>QsHTCBz5Rw-&qK^K{CmngBeN=ZBC*;yN z_zjwX$r{5(7*&Z{xVW~^LCNfrgJMo4ZtQ2q?{?=L%Asy958gF+?0yaPhTH>m(XNTf zH16ZC`$_nLcdMX3G{-7&%}ZbfwU>j5}B4$V|`T$a(31#=g4pe|K z1Q46yYCk2s>-~PZ?H)R0D7n&e7QHq<1j}g^zt0WxIWJTVI{#GeA$J865hOQsTpV3d z1a`$3Wp5>S)LNDztv=G_xo+#(*{HIP5sEq5Z_9!=&Xh@;m~Uz7GExOFzTKObvp%U> zKNBH)j2}7Zj))jfq6zr5m7mLiw8xo%Q0ga<3S%#UQJ&zKwCA+@M)rDA;#IiCkV0gb zuY#=&?MO4zSX_~MGhl}{M`TMh!Oy(a>cfe~wDOnB)2@?35BAwDa?6k9h8JB%#tfqk zY480P1WL5uooVDGFzzTO+vRML1wwrrm)A7rh zKrf2|aLkJbsDT3-gNpg$1wxA*-xUF10-UTno#YzBaKl_4CB4LaT;^nf+ruQ25(`RpxShi?~uc(?+HOUCyJB0 z8-h+pk|sv&!2*$)sVW<4h{5N$$J7hbBWAO*<}Ea*b_^+ZwoHRs^kROH7M!Jud65`~ zA&LGt2gC-bnWxoZdc~}dSb-1Zp=p-2yf9^Ivy>ZZ6XJ)|looUNmgmih(^OkUv2ZGA z*1~dipw@Wor6Wice&kKvwUE7n&LwuMkXwl0h(}p%fnrDXVYn?oba$vkVhx?xT5^IF z`~rIEwRjsc?5g7gU0=`gtFzAGgfmF_XI*P%RYxF^PrCc*P-w~rp&GvG)V2A-vy;6- zoZdn&7i?uXP|?f@4M-Z~&QgC$|4fo)BE8n@%@e3)S&0^NM^=MClXDE9LQ1#y<<>7E=qW+aQ~Z@u2y$rS zvM6C(XkzUB7TB1!WPCRut+GSai?%wOBX$kzE77_Dg_nht33*02kV6AOgh}uH_E}1Y zIWLqYIeQRTfzev|<=z!g?D0;0gU9sE zZX;FMO%=85xCrW%QKz8MCKe`1qp;#k-8#7mK>N8S>K{Ln`12yn4qW_ljnS|cHrmnB zxq2xKAi`+f+C@Pm3wK?dO1nN|HIK)ta`;DExpJtZZU<}W9%sJ9T4H`jDCtAhEmm%j zEv1|kLUWfbeKUl+$#eE^t20yP7jA%S5I3W@k7T^^S<92bWssiHWteQ);mEBitRBh?ej9X- zqdGs|baaf`mOk0s&ho0n_!G+=BlFFZDguWCTvd6ChFyl5E&C2-Iidj+nVy|d z*ogcz^&zjxH!G<)wc@S@XZn67^pn%;jh7>DBVk?-FX$SZQQ((OSF@@wXuXNOLcCsY zpJfWB4geJ@O`at|$oo5e&5^gmUd{_cxQ-8Jr0^qWL#8?#g+J~-@Uy`RE*~y#m}``@ zyYL0}Wc$u@J~@5vZlyEbPqg};m$l80=0F|#;-YEiE9 zW2hAkn7Ww98I_Xu#lnKm8BH6~XT!#WDyB;Bk47im9DBy_9PIO2nd)7sAcQmD^*+Q>vf5T?k*(5 z6j|yrvH~RDzO{V3AmnSP@Nv`XFWqiJF?U!yGBc&^PoT&OGxAw`I=GkNt4*cpHbUz+ z@2=3aq|@YEeYvGqRX~F=M0Q`(KoP$4ZlV4D@hDM2k|}$0NHCqg2Z(R)x_;CFZ~UkK zwEQM#PT9)|R+T*KtiYRfSb8RJL{s1D`oMoAPCe zO2oVF{Llp}47wp=NhR*3XCs90Mvke#5JXnB!My-)MQ|+%nSzJZ&|Hq@46<-GqI5!@u2lN5N zg$fv3tkmev-P=V4XSGII(`CKdN8RwyjC}xf<~QJABO^$7 zkP4BpHEED0DHB(^*GpcgDwMb8Tx~>#WCD8cJi8%!NU9^zQxzkK0|!^d91h~H2v2RF zA&0?>1~A>K;Cq%O`ZD&ZwPU>%rAgLx1e^3DiPYXt3Lhv)#GG!Sp1r*nQOab{7&I)U z10^(L`O%)%NfV_yCZP!RbiPj=t+u?%fP0>4L5M)`L=b}|ZpXnaQ&IEo>Or7sEh{|D z?L6gtKJ7fOo{kt^XWi{*Zl`C$?_;OJTt}JN_-!2R>>i#kyx)y3w9?(n5px64uzV6-e%2$+Brwf`qH;yr)t0zmMiTWH9#XyJZrcb z^)~K`YbW3;n|Huo(cCLD1I+6@~64uVqA%1;S?h49uBH{RZQ&%tHSPhxD=hSPQA z?R>B=mqsX3+Fz$aZ1fs?^zyjMx$Z>k87{O;nVFqtm~fdYVK-cy+3aA}Fr$II*luhV zGH#+er=&ORwN~t2?QQe!fqa=OaYkxj9ar(C3zAW#fJa<;OpU;zi@*yCvCB_A{PJ7M z!LhtXj@=b)j~>P+;YM{fn4W+KvSFM%*sA?6I}bt6Fgm?9`kR{#rL*L}0-yAPJ7{}f zzaSp4oP)XcFhCqM8O|{JcY?8x+}~sy!w=}$Gvhodj@|E=bEU zIb=fCFVxWXT&-3egB#A=z4-Ao)$l`%GuVX);zZkKEIMsqaXh(kGM`pCo8HX%Mcb(~ z8%jxc@Ig9_+OA{5H8S8-urUYYv9eZ5du~SiXMc<7*IV!1YHBZk7Q``7+-?07j;5bY zw}6;Jv&~Tvh(gGaz@{Pk`l=m;da1LZTiHWG1d9Cww!0_S#8Nl9UdH z6O)x4wKA1-sg%}HLt2T9uER~bY!8?dF%xbit@u%0q@K85I}!#QaTw8mKb*BAVZjlH z6;IrV+bBwsJ;BuqSxk#nOEoS$@<0!P=KZ)6H{ zsL0iW3ozQud*3M}gg|h;9}nt8EbQT(@q*;j;7sZL8k7u%7ULJ;DB%vd%NOjUlx-V%H(eu6N=bb&`S-0xU zK&v5EE58Y;{e;!oef|jiL_6ym-|zaZqf;@R(ipzMx`Gc}S~xD^ zxq6XB6X2++!;?Z#l!qapkWPV>ehOJ&N0`!_NMHXTvrIPiYFtw~ScdOMyHvJGjZ@Mm zHJLC82*dBf#mh`u8I~|vhtlt=-=l(3ONd?tdKr+z6f9NlD@iS_w-qAlvb8)*>d)ut zI_nmBLb~kgWh9e#&3hlE4DWy?r?({&X!|LC-Rhi7i{Hl6Hp(w#qU+;c!nlWY!9Zit3xf0kJF(XPv96L`PQukJT5+8k z6kq0sV_8~(l}s+h{lnhvb;%oQl{k+B2S$Sld%p|6$5@4aw6lqSf^1B7(Sk5H2&h0T z_0k=$dnuE<3&1rg6_6GVkoJ=nHg}(k3-bhrY&6Rr{U;qiIKwn5GSkMgAGm123t8g) ztC@Ov(J1RSHKm+0=&7oU=)OM@YaRMka@8skcJ7jbQuVoR1=@;k70gSDTOXlRsp_Dt z)fcU`XgMluX#fxed6OU;#S_M^SlTs^p)x_J?8;e`w`wT|#W={q@^VSB? z_)@v^?uP{@peVdigg9>n2$kLb0x?f%ja`ACl?+RK%zgG>RWU#T82$Ivc!#1NA&wRD8 z!a2?DWi4`VdhQ7o-F^KsVYTxPb2kw7TqvZq`qiq0M=5YpNO5+9J(SyfGBwWfq|o-Y84y6nPQvv$$H^YH!Nfh27^|Jl)}4X5MVV@gi~% z#a}6ViX7e}33%F4JA00GNA6QcdY?Pnif=u6%{h3kM~};L73RfzFM;yvd+tpp)KQ7b zrCY&a19r&tXS0B@*_vaa6RiZP{E!bsK_0GE2pcm6bU$L$t=Jl2Z&WABihD1|na0 z{Gd{JdD4h4DOA)e#q7>2)29tsMVK{vOdu_bVqbW+WVl z0YUiQ{~f`?ws<87X4;&ManofIo+AFpsrH&+2a-`t5U&O{<__$;eX1pSwRvdr$QcOPX z+3*i1mjF>t)!5$*d%8&B}4w0DR<$01N@C6;Ha5Q$AWNlWBwBWHG6NVy$iyFD~9_GX%yi zTTUu>bx-IroQQnyz-;t&#SPgUtwWSJllKad?<7?$i1_4$;S|C8|S4NbC&UzG%UCW zUI$f&f*62)U2WG;wnx@zT`!xVmb&Ir(afguM`HEx87E#KUfFjsb2$E$>1%VzOPju37>h`X;Tfxg-JP6W$5L=>@3Aj9V@r@i|Gp!sH96?fmO zB2c+4t3-7($T+Nzf&*dI2)oFUvMu66q~p(yj8+oG)4d%FcS`j-7e9M?o2k~@-vO`5 ze=3VSI>A*m%xjkU)b0X(BOyg3yO8pjq%=?vZI5I#jBHe4hqot=8ZuBSbHzwMLR-}F z?Z6KI@o2%PQl-Gqvx{eeWX!GU{F}TN*Aha`M zstPm&Ic=VIf^IdJK_+=&44_Fp~<`#I%jc5Uhe39-$6}1>$VZ zO)h7;`FONw<*J+7(nSBp~3gJeu#h1Op8P^DFU7$RDggpuoVOP~c$Tze)Zt?cO^95Fr2pfkc1- zi2#5Q0f7+#-+KY@0RR9&f2;S=QT(w10s(`7f`Nai0sTQxhw!03Fz|=cpdT84PVkyHz`-993Jo0t6N{9LoPv^ynT3^& zor6^A_plFVlWo_P=MC|Nkw^{$bcZ?OFza0S5eV9xx&RAHeHF zZa6g)e{MJh!2hTIxzXw_wrQWA==0rEPFbEcy~tk^ULe_`-)JnWRtDnhSsA=$);f%Y z&u>rVsbT|d$(*+A+)7=Dm_J=OW@g1})K5sI9|)2yVNkp|_q_cw@_5U3Ac}EE>p^k*+1sIiT_MWbGy$3|x549tEMY|IdApH*>3f$CEsW=X0I&Bn8(yjY@WuG<^fxs;V#8R+MBy&i z%2Zt2+q&$VvvbeUH0$orKlb;bJqsPePqZTPuC?kHsYXLy8_A0^OhfDib}nnD&T;I8 zK@nFE=>#uV<$%-WZxDtWvmxC*4CzALp>+R9W(~B@w#X%duF#e)ENINQs2mWG6t3kL zC3B1N;38XF_H4hckj?3`d4taHY-K!P?&5V)?1N55QdLZFcQIqXah0m>#Cc>%ne`h@wUu7mg>p2^2Ks~T1H5bYH#6g6-(J~{BjId;B zH#FWv<%}ET+dLTEt7(_2P%8CAAA7FEmOW)TF&AjdC*n2&4=!f?q6e59+|b{03TNd! z-)}KF(Cr9MOGp^-D9!4VTwz(asI`>)mEXD__41Ez?8xRq-r|8xd>02ntwa?g+c9F6 zSnWP7lYC#`PJPPb5)R^Jg3;mT3+X%kA{Rd!G>Aq{Qx9G5rWW;R+}b-ht`QPvGu8Qp zRbk9Qpe3iKT86+5HKFp6Zgl(h8tSuMVs3Pq8@S!yY49KptqL^Cp_~}(Y}DhG{UGJe zfaSuyz9m$N*B{$trZwr?cgm8+lLUwhZ4eTdx;3YF_s^7E@8;2Yz49~tVZSVF@VD}o zPu)v=|L3mRgJPY;Q`j2VH~rZe+3Yk9;xTY^VO#IhsiI=ywd&JRQu+s_zkYMz(h_)e zqhUMm^UG6rTx7i$ja_;_8k(IdGsVmhS&CgOCk`Tb3Th_p)q3VfmBAVp`i9N7IYh2v z4$VCd@Xg}db1nKCvD@pn_Cm@RcoaiXkD?a7Jy|ZOb+#A7N663i+>SrNo;+gyByfk$ z02r)xQU1GuZTxsyO@PQ|X5ynQHy<_@ACY{-LF`Aiz$!4y_Cxj~n~>3HUg)B)pfQ+8 zt7-MF9uNO~#jdpf+;ry`uHAeC_aqLy-gi7$N%pgCEAAl&(O5oyhK#{UuncH!;~%9` z-P7`i#_o-39{JLt>{;;A-|pIbO}sx_M_abFmox)%!GXYX`$;gg;rI< zWTZxYdG22gv$paA7rv3$`TN0iEI&Z}!$>Kjk7KkU^rXa72MA~$&D92 zPBxBV%TJSiVy!;h$bvI9CeHzMTSXzwV^WJ4=@O`VuL7$ag}UF0xcQxQKm z1id2JVL%xUVv)#nTuAV>n9z?}F5LKbI}2(YT!emjNZIDMcicy;lt+j+5Hm6#PMsYl z{t0Ku(dDbC9K^`fL{Zhmn4YUuHoYx{H|=1WL99{UR2*-qq*C1PBbwy(nw^U`_z9*9 z_oluSHw_rdm61(}(%)SignZ6MoPJ+6jE8ev^u|B_&a27JuGaytGBBWSKK4Gnyt6PT z#l1~Eh31%sl(Owl2to&w$}N^|(Sz-&J{|Ky>3<+!r%)$W8p$g`bdth|s94f7ry z)8s)C&6+S0yw-*kDgYeCciqM;5)U<%&c|i4O0B=uggx~e$$A<ve-1 zH^N`mp169pV=9G=U&)uvfxb(0_|;K54lGqg?J$f#I&JDyfFI&5L)n{va)NEd;n9hi z%4Rg5uVG&cLj!AcEKPf$SzlQZPd#_x>!I<)c{~Tf#RFEgqe_=vqnh;c#(>Y5VkzPr@{25Sn|Do5|GNRj`slf1uz32h11zA?v%!8WDZN^98G*a8Pp7xe6 zrGrw?nNhZAp30Vth~gtW+L9dxAIua|^*)x9c zW65UnzG^ueDfY8{CSCd|*TLy3UNTLY{ccLC(7V5i;4q#asI~mW1x35cJ3MYAEcpv3 z1Gb4Kp~rrBs1&@)?avD`V6|eA%!g1%x(fSsy)azTZbrSe{BBvQ{031 z1-yGa1D*xTZl38Va}?Mrg~LfN-69Ob(xsxfhJSFoq+-=J1)U1i+K=WOPOHyGLR&
xbr{=U_VR+u&Y2Cq#d>u@(@WD<>9d;pKQekAzxsk+Ml+WI%2rN;JB%w_4a zpQ8+G^{4RrKvmgilZ2zr)tHeThdBr*v_5Z2w4?j#h3MGCwR1J?^kgkyBmarK#l}00Pu;E*BX93ze`HNmsWA%*#4oxwLrOFb zBC-$~ohY>FzE!z)K&3V2*Nvd?C!Zvh(-r9Lp{)H`#*;`vSB8cI!A&?IYV69=qevC8 z`1`MR?Idx*Ng)nJvp~P3&`dBx((U7-^a3A|_6X91A`|@*t8g&QxX;+_NRs1hSE!{} zF}!+or!m%p=>#-h;~-oxqm`{CV8|4{#VF!=|J(Ysi6~(aIgJ+Y;lt_86%m?=Vh96_j3}@w6c~x`~5;qj?bIxGpyZfO3v3e*Ot4Ys9>gY3b`dY5$nWjz3*z zhFZB2O)B(4?g6NuNMGP4vVzMK-J$4m!O)d**~}<6)ycKR$|D3_gQjCT&8JCkSi$O& zs~_)YVw6-zhIb24BUhl-%&x5WkU3OuH?FC|#-W4QNmsqZTa1)ZN|jgH&b?J$9c)>; z0<;evhCRVxs6vai8sii@8*A-R;Jlq7#NsWQS33ni&(&<}NtQQC>&ae8>BNVEubVMT ziTQi+C$&i`zW1WFZ^*eDz~E^s_I6BBys*IkTts?2yC-pKvNzwK^ z#K%y$I*|0|EVXE$$CJWAL=lByN2zKn0UFgHMU1!>x4*tPLjb}Q(YGRa%WA$^uSC4{tYhE;!H2DlY`T>lpsyC2&AXjZT5~^?qiF(Y?MV7}Hg=iO!W#W&9t*n_7#<6VVtsLYaPLRh=$GGBGb(?^L5UBv!zi>)hktZ zV$_F+N$Df#$_?A?-wE(zkA`R_t*AqgNIyKKjzv)>{rtBg+)s@3mW0I&RPGgExdu0c z>o;}_uu*W*72qJ8U$S#a)O2V!-5&ZRwp|gG%RxL^a1lM1d@Q$f51e^?TRee=)^iTl z=fqWX-0j9H%1OtJ816drWHPi9s^cwiE;T$6k?kIN;qn`v-_O~u?HmLKKXL#$oWRfm zBj|;8q3&f0++#+$a?L#P)<=gANceq^4iR6od2TCXaH{6C;-B~%%fN&e>oii9b(1z( zP5U-7EzH%o0;Bh)1@JO{>#U8~CI=BQL*gI=(d}bnKU$Z5Cs%qV$KMy8_SPzvmLeO` zu1+}A(c7m4L!m>Ux!iVmM0uB+#?WD$dD5ktSWSdyU=Yz``m;tgA)Iw2A(vGIk!ZXN zn>Pl}sidiIh|AB*M)@URFEpR=^3vWX8O&R5=L!hm#K32!3HoHMfRDptSMjRjE9Q|G z`H%A@I_!R`dzJQV!Y2$mz>=Y@G@-dh{rnxn)~&2n8&Nd}70c?HXzh8V@G+qs_uue|4-PQqOIEa0Gp8pmOd+yCw zj6`$$IL*^KgnYBj4;JnFc06_;amtSWbpv@}vy}v@pCwa)MSdEI+Pz3V=bzjXp@Vd0 zq%ta>fBe{!e&*Oo)$~*E7NvHr<{hsv>9RIkP3`}E7pcN3#8}^d0P~i<*)1m$QF5bn z%4Ervse$_`;^M+VNYpF(0!>M)iubJU^~ax147a0IeK$*aaBmT3NVB;RgI~ zUR~mUud{d!pyJFGS5hIDdKv5kFqvN3mJA%Omjl=C(hpSzo_6<=v!wq?WDB12z1?%B zVb=>pQNZzZAunjj`|7FOu9Xf-XV)6(uSrdBAna;#+XS*tBWfg{5x~w|4}i6eS5w-R@6%j6lX7_zeu5bh7y0dZS^Cn^5IpJV z6H**;c7-tq4{0LQ$3axiM*kt}ocA3J2;48PHmAea=V;frc-PUHZ+0^t(ISjI=Xt4t zie-7klCr&eJ1pepyKK5xlr8SDzcBwqp(qFP<`M z77Kc(m}1r3=Ot5e9Zw*SDw29Y8`GBt)}GRIQs_^6t7(Tp3+UPTn*+=#*Li=eR{DiFTI+ zo?U6efYQijaPVFxS<9>7N_#VO%%CD(Lp0(W^L0p@N0QbV^-}-=J+i`Jv0=;8!%-WS`ME=^7^K? ziCZ;W))jqpJZ~y6@V>J{G^8i&&gDX>$78yH453(obu@~R!w#u^gehc+)0e)d%6z4K z@-?}glHIprA?a-^J?*J+{q3V=byP2j#oxtXfcN3tjsUsb=*bhKX#rV}_SSv)aol;m z>%-o^ql6Tbar1`GxSnZVY2g=zAp;8%9K;`sb9O|2iWISf0A93(^pG#n8w*9iUvIPR zjz9Y~4uuPB!ReFh9Pq7~76sLLb+Zq3mcsW=nPYJf>q)*_o2&>|V3f4&$u%>q_58zm ztsZ}KQWT5tGpH&q0b4>^;4^*v?cxMxZ?f;`YLbj8v$h=Mp z(~v`Vr*d2w}}zs;U~^>O<$`b#e@s@(;$Xx&*Fqf=b)KT1GWA9rLNpzsP)lt;3AD3NGD~(cMzXbD{0m(^=(+rp4Q};iH}}KA zC3^G1_xOf__Yu>7$OLFzNo5+*Em2MFV^7CV4K`Gp_@Wx;NusQHWt&^IyMB>iQ=m=) zBRXgi)^l3-;z|akatJG(130a51hDlSvyySxnq*V=bV0o_VeT950^ih z0opo0jnX>)Jj@rn9-0!N^TJ{c#WY~K43L}%c-%Q~v@qouhR^kxb?Z@l)yJ0=C!BPntY)M~h)wmo~?5F0@^`$5dY8QH7+w4~>}nZq*UnnjyERK4$;z)Kbb*<|zdBER z2*u9w6B^8l_bU5;G_ z!2zvl*T->o_{|cy&Dk<(jNxSNeW_@rE>U-$EsL8XF=r#HT)O|P9Q|4orIdcs_le5=J6V~6g5np8%H2k-H1nSq zZvjku7*xZW5${kM%%JfrqAjUVexT2^Q}wCkoT!7VJHD2MO7axzT?pnq?(@SB69Q0k z(Pc1<2Y5z(FHDS$hi3d8R9r0nwYYwrl_%Ka{<}Th)8KS{6+EkhEMdA2zWylaGl>o@ zaHy%Il`l066i!5!>K|N?IMo0NC{nlG*Y}dn%MLe9Jf-86Vo82rj#ta?%kMhRw?B4N z5l`^yrZqX8LB*hP=(hcSa-Bg#_>`dY($MCFfsy8z50KhE^5L=^Ouxl!Bi1@Tr1fs?p(0 z4`)ZkaS(s$rdA+kd)^E+sj%>I2B3K-vwX3KIEVmi$Xo^N2-B8jV4y?4I0!s%5M{-c z)Y(Q7Ms&MuDv>sYupES{ch@AK(6LX?^cji&!?jyYG^z6SQ?m@X%Go6w=Mn*?lB+Dzq&KI|RJ}+=dXlL>F zXZs)7eQI( z&4xDq!QE|X+BVd{Cqu)Ic4(|>>f&*WF57J29zeTg5;mgNiW*9rOb)?bek4X4^A$An zO}e-FYqOyFeS1j>Wb0T{X0AZR{pe4TS-&?gnrU)2lyuIYjJ z3E9o^0cAPMaSp=dE56{_)sxj~e=%3 zy$2+yfCf}Zq9$#cjsuMvIPUIer)N2cP@fzb+ohdB+Xtq8W>lR}P$dz+rZEc!;k$gn z5}}iqxS0~zE1)cGWPHC0@rbYGe3!A&r`oS0j#rLecsO;MbPyKeMF3EyUg}V55$ZK$$Gps&(GIQ&1Zo8bGW3GnPJW zq#^0nZOjWD&G~dOXn5e<$h@}NwSk!a*H=V$Om87BwX4rcI}_*f8Kdk%9dTSMr4;`P z(!uK0-^OH(K5ptbbz6=->LF13aKi!kW*>_|xbA>>p>3G1eUfV9kLqMv)$rXL2gK$_cRs9P>TJF$nrP&lhR z>cQ>D%Jrr*AJ7kdNE&>ar)etvC$5{8A%7qLaDUMy``CenA&ZqtmMH8SyJ5%}W(S%R z$}QSR2WxdS=-H7Rgzd=h*0sOewvUoy^UwXh;KN;h^U#F#+uwJemibk$+W<2ZX#Zin zGKsjby{gmA4h8IZ_dqR#QdAhpk+@qbp*edr#fy86OD#DbyLQ8G>RCe2&mP25Dht-q zLef!o*FZGW_%Bed5VqciHwJ?q%aunQ70>@_SAj?OQ0c$Tvdu& z#`tTnwEL}1KW13`>D?*kB^xq4On=!~MJT)OQImA+0bcWdHYLw>sUPD{2bH*;#$!zMmTVv3!-L~a`7C`evEghl= zk>H*&tj3pq5o67XmGGtY@)#>c_U8w`zfVz)w1khJ^CqTr&M}|ZVfxTDn6_4|BH%+I zO*~uM^bz_-?8ShpX$&+b8eK6)X%~0AalecZHlk^*x9smCxFaJZ7QCz(a5%R}c8yR7 z=)&B}J$LaNX$Oi**aq-kG1|6+IwxIt3vae*saG__4)0&iQ9g30`G-zU-Qusx;wI(F zB*HBC;4ZliH^MQMq#}(pc zau6~$V0JsJ3=X^N!>%?rjUdLqNSZQob!i($qax9>xq}7HmNyG0#c%QmUg?7u_Eo1m zt|%)H%}Tm2L_M1~9UpL@U}$*Lbz>9aab~}R#ejudbPl2&BM53xZqe1kR^*!*?KGO*zrn-A$#~szqlR|Gca_rDjTzK^$)BS(cCLpM{_4B!TfD~ zphEMw!2Qf4R&(`d2UA6>?iO8Mos2b3nF~LAd43O;z|@0&phZY_-H{fQy^t1oHjvk* zc%&O6DVx<>IhLe$$E=5Od^;p~ACm0#^>A*opsvtXHF*ld68E9CUpGRBqJ)l@gkn;s zZv9#=61e1ND|@t9)<0DCw6+?-a`oxOY?qe-WGt_7}wEs2}4f_|$&CQDvtHWPRxKjJ>GG~r>D_WH0a-go?nr(O+`KJ6aqA+0p}IG4mUehXD66Bm5i6auS_{Or)2X( zgguv{-*IHSwBqQYnNTx!!bbke5!?@n9rR;aqeTj}!a2ql{7bD)pgyT=ZNN^ihxPwT zQ&`NL0D>&t*5iKrPPOh0_%`)q|C0i8fFv;LSg8){btCn%yq5=B^b+Pdh(n~H(it6?@3Ieqh~8&if~mQQP{?`ZL+@9O1ynn@Pcigyhv zF0LC;_}HgBdQo0pUh3Y`5{%5gEj|^vG#!5vA;5dwlf-t}Zie=?Pa=m+8;}*_adbyU z4H)uh0;Z&(UYoVijX=YZ`?gj6m+yuu9#QPXIA3ntb*-GCl>8;*w|Un!(r(9^0fI5^ z8+>t36x!ip$o@)t_tFWvITFzkAQVq&POA2;tGOl#S*gAK#BYl{Lm|f>(!I+rCs9X` zF{m9nqAtjz@EwyPd%<}giGd;&xxKSSs+Dc0gdJYyYka@dF}f;tNKNbjTL%rwZL*I1 z*vqvP^a0Mt6&wTy5jQV>72@`QL-LoJN>>Xu@ww{#y;8f3>f2zDvD*BrK42lGvh2@{ z_fl7G4w+?mCwBk`!}a$hZa?IAqk>mVVehzRcWNZl5!xrmw4X+H3Bv1!f zx~bY+mX#eN@=|UU3A}puQ|?yU$K}uRj-CcWHwooFEygC)oN`Q_ui;vo;HHgub!kkz zYFUzZ{Q1ufhj)H?a9G2FdqRQFrJj%OkTzL&Xy#*GpTb0SX^MYV@mD)c!wc8HXHD-# zYeq4RwwVzmDdG^+_NY;m{E>GOx!lN0TlaGI{GlPO51BRnS;1_ ziB%)LOJzg4l{bu!bp>{H3#D5UAYJ{CNU>zResQ{8-DBcr-|8zvGqrz0>D^qOx^Z6@gb#H3K(kBQF)N&7qz zBbwgCdf5CXP_d5fr1CI4&A)BJvb#~^0Q;jw`PlfWr@&Ht<5nv8Y+^Q8WhKH!rxz#g zYx5(wU**S5ZqYNZ?aJc6@d2iKR>r1HIok`XbD-;*1n??JTIp$QZAIk9!di{%G(M{w z|I&n(3+?B2rk`Y-4!;Gyr<;#uj@KCUExN57QJIZD*k<1CQAY0kfY2A%hPAmpleC;f znk2&mRmh@*6^k8t z^K>XQ96uCox>0$7IZFEe-!cF<9sQqW0Q^?KFJN6Xm2Ipo+XSop^(Hf0l1obHt)suz zf$h8a7=T)XT#Y3i1%}W!USCH?P>by@`WI2x7*MjvBm1%Pi&NGf{!?$1re z-ENkOU^Bo(mH}+JFjCIYHY`snp-N!CkIn?$y*Y^QY#0g7JyBt+>G!Z*3969NI{PLh z$U*oJi1724bOojfw~pS{MF869%I+p3QZS{wJ4Q=DJK-uXqd!^oM7WjT&2?0qz!X@V86K%5;`g2qAB|=0r^aZBh4* zi2_m3nHaMx8T!QEXYeX}Si@Z}UmU!u-M)k4Vlqtc8l&OcE zrLGCz!iVxN?hZKYx`BcA`@oGr>=Ke=4&4#f4Ts^Y+q5~^yP^7}pGcZO2I2az^FHU7u*q z6vfZuu1+08C$@*OYhK!#Ux{1_y|9Zn zLF`CP_v$!k6+1OZI`fZ+i3ep?STfx^I+#bWqT~uNvt=-d^(fF)@n>3Y1>h0)%b;d0 z5wC@vcWr9!O+Q(ZD?ti>J0(z~1D7|0VM=aPgmNd02(Y+m6pI8%pfcFquA;{_^6JdI zkMK#OLGi{J+wK!ezT>*stK>+%W(gjD%wiDp9Ls=R0yrt~Vi6$v;V+v7i%0J6(e@c% z%1u+;r6e;xPcvaV4no`Be6J-ZVU}UE{Ww{91_!?(5!we!i@Q6L8ExPnk{Bf8^aMsL zTD*Z`CHfk;6^s5IJmQtr3WwO2cif%zBmOPfCs`TuIMn-do|)NS1W}QlKypwBM-^{2 zyyv1SH1jAP?|W`_`EWv)g#GUp2cw96yX04rr2FYXFSM^eCnmH#&WC0F>o0DX; z4OIj0oAN2m;w=ihDN40Z3UYJywcg7*TR5OU^WdfK@NdWpMJ19-Uc&Mv2eC9eg$b|F zaJBlYQNF^Ugju=s6)Z;tMnK;^{a(Wpdv+^Y(VUB-!i2>%E?uaj2i#=%(@K`=STRA)dyzZ|_e_f3%OWySTWug8tFH zBtw688{A-C2K%N|^G{sxO=}^ihW&b0ER~XSINr3hgFxG!+$srWv9~T&dX` zJ+X679;G!emb%4d^*4NZeP;d2D;D5Oo=sOWkS??hYG#V*I?mc}LHWyPbDL^6Hs*jj z6lhz)POU%SN-D#&uW+#r(t1y>wdx$N=*vuSesrYcIM0b)d1hV6hpyX0;4`Wm*90M0 znGilMP;6v<;acCrFMUhBPd^=0e5s4PvBs{^0VW(ouaZS!D)6;yX6vK=B+PM7<7(7y zqvHuQuUXb>N+|5ts@A}q3a-5JKWxQ9))1Q)-IMo(&D-3`DNeo_3vsH6D8@=L&qRBY?U zj>8EPwqLIk*{5Pj(r_GEOo8wB^LrM#dhCQ;W-3AgAi~jB*gD+voBqm)u@$*I{GPr^GttHh~0H z!YFz$-emm=OFtuW+ZEa`NF@zBPUbG##{U>7D&RfJ29 zKNH(}!}sTfGn4h73w8C<(kx2q(^8t`v))*s7rt*LMM6nrhzEiP%`CB-b-@REP>tsx zkl7r>D*&J-64u>FTb}bM7Os}G^j%@KYZ=Xovw=%5%D^fHx&}GT^~Ch$?E=Hsh;y#c z30ThvHV1lPRx;C-$3f7yxmbs}p#5n0F-g#m-}yUHliB@&z(SqE(s${9o$K{`8Ou(1 z8ahZ@{Byj+rp5$)c3Lf0);K_{pyATQI{m|r^@b2SNviPJ&fvF%aC`u{2o4kAaAvZ8#z9;yA@VCEt3EQ`BEdAk z;xGsCExiUk#zFMGM#-nCPm=D#Cm$Izn4zh)%E=^bKAj(Vo|&FKnP>vNkX^N}U&0ju zjpgW7d6qeR#w9q7Uj9maro=&bCU>prx6@WwF(2m?*ry1R@Qm65jy}GZ(lq#OzKrO7iD_}*&YVWL+Ji0vXiqVVR2@m&cT1CYw<8^dTQrHniiNHRNnfhY#`DM4*xfVvA_w9W zo(9|w$}1MSMleQh%sqYSoQ`kJl=kX35-rY^ zEcjaYf_+BlyRF-VP1}7Wn#eZXJ1xmn>!3elkP;@BiMf8M`psmAU{$>cY&xfgj3`Q02O`iN=Y7(n$)t<~#ICkA)mZ|xoqKmM+Wmv>z zD|`2kfWSfIIsd;T;?)~TFN=pWK54u8k*r`~lAz3%$JW4+Uk1)+O^&pWyPy@On)%uK zmvu!zHtrF5Zk8qXsXe-$p9*}x08c>AlIz+bBFtYs!@JiUE^e}7&%#NBw0+G4b}~>k z0lGvGAT6vIz(=~fZYZx4yA=M@R$jQb?;m(m^8cfBhc)~6(w!-E6F)&hZ~ZrL|N9Sc zKTjwny;3F}!1dVdq3hN7Rxm^`(Pdrvqv3N$Z;!Ptw-22;P0F>FXYlBCYBCMXuRGkL zUoU*!slT^s4Kt$nv7D$w`-0wg(kZ|{k!zp$aQ#HonEIXs2F`)a68k%LAa1^ zqEBCHZ`546udHn;`qi;FdC5R6iAv-Dv-EqHjobD9oPu8V)kNQ*W-e{)?{ClBG@IA*o05%x1gg@JC<}#7y~pDh6T+%E&Ki$ ze@;a{M*I8nXI~#S?Lm5tM^K-1p}%_^%y|RYMP=d|;*!_U2S!FlKU|kvT0i_rB(#Eyx7r{w}?P^7nqDqiT>>ba23&#;&HQvS=luQn0RQP zBL{IRw++dVhiO4(D^|UQH|@K)2i}s+2PY9ER-A704mt~Vf12yFnj`mI&2|29&TfBa zv7d0@B~3klN1a5K)Vq|8{%V~KT@32m*5>~#P+nX?ml9~+Z#jr7phP~K?TbrN0oy}* zcYc%n@BD`NCl}(Gk%lBPsmNsL!G;O@L@FuUW%U_x6HaTPxF@ez3Iot> zb>avTx{it=E#B=XttS~mmzQt4OQDtsvuHALiSH!-MZI#|J2xHv{%Q__T$acR{T;%H zIFFk72zd>>W~u0)KV^}^k@tb6EC*7)0(i=Ym6=Q>u@lDBIEZV7fDCEHV#5}Ou!Sgk zk;(sKJ^#gT_83JX^x9Km?|z5VV17cg?YTFrLW_4=kw&vW!|Lp8vS$aB_WiZ zq-2vQ(lM+Ly>HT?lI}BUQzM^U1cuy-U%OMAmj7)j9Qo?nPaQVW6nRdUFl^qKRqmGj-EKEkw1uzce8@U+_3#dHa3H-J3t|6qFIPo zg`&Pe)9zAUkZ8teURTTa4!zXTd=ncm-eA4^8M~2Tg%3B3}qk z!!>~AKsrhbJkz*dgj%eHUuUksYEHF=?G@7B;D?6|PAkE0oGG+BE1}SFFeL+fp^8>( zd8oSj+34?i?x*%TcRFfL2#TpHb{lTL_vEtt*8&_< zs;v2TdSphvIazjDGMt@>O2@PSTr5Y29+z~HL3ibap>L3S)|q?$pV}_}y}a9txOn7gq5Q9lQ-6pJ z0C+K<0lP$~G4rl7vWyZ|)~%oqM&!QQkdd6RFs(4t)7G)3ZC&%~&{v@(SWLHQV4QKT z&~i+PR>9b2SjU z9yRX>r@Dqh}ZhTUucx=#qHKGAn1hCfPI)mG30L`VK=V0GN@b93?IM z-yTsYC4Vago=M0K-e&=wfnCX1frBtkDxaGstzcLRYggdP8fE}@10=t*SZZg9z^GlS zbaIv*4hx@b{!=)~cMMB548KE+J5b#9@*eGsKZI^}aeUnqGP@0}@Z$hVkg|1QW4Jn! z^#(qQ$jiF-?_8w1)YiEbX8<&k&zUq(La8vaAbW)@K+&$Vt1Fv-{h?6P;caC20E3rx z*cL_GAcVqzGJPZ$N?l%Kgr@6M6r!V^!cGZ_F89R-YUO1@4l=1|p~Q z2M*(>p`i5sg9#0+yo(Zqn7|(V0>FTWDB(KjNZ3C7FJe*!Ya42dakdMee*i`m|CDBj!;Zz>XB=lI20wmPLWw;{KscesM}ifCHe7 z^OZ_vpPPT;vE{-n58ukB^piB{NEP1QV2%FQz76Bkt479pZSzX;mzAHG^#=XDy7O$& z`#iL>$V-i)WWQ5&17%%ubuIE{Q*k%V-o(D-d+iFtM{av~Xs*<KHYm=Qkq6;m)K3uZAKrp0VUg^WA(jWF**)mOymAS zOW_Y51NZOkXwj zZk>si-L0eC^XR_LuMZDZz6}EU-7Id24HlWNY=_}f6QLr@6um=PTZ!cCLNMp#~f(%Lm`bp@#XA}N>*?e1M$h{g57Q>+IxUM@sYKafh^<6F>t z)>isc;wNXBYOM^_g)jQgKkrKvEV-Wc;Nk22_T8PXTY)IW89!n_T)%FffJxv4YDCW@ zLV^c$%Y&!Vx-YAYezWkCWTUHm&yRyiGvO;)274)Q-~}c}E<6CgleqQw{Z@9hsw5?E zo$Al4l(E{j30xXyO8>>JN!m?eZpyCuK!@(Z#ij5GLAL(_VOu;ASA4BIrUd8vUv(D! zX3VkqaS_m!ZgS(7Lz;eXk&39C;iP((Tx~Ma(W%mQIr!0|gtqJAt$xA)b3<)`gUBlL z-CBQ8;@{zopHQ#dlp5aB7?a(22Jyf&J`bTV=v$U%))QXvj zMy3P!13K;d)>Q%)eB%~t2eeSi&Wwi40}lEz1K$vcW>>yOsXgs+FIx3^PUn`gL?Dvn zTxo4dj_u7O+3rr8zvf1XiDh$DaI?!97B|ddoPiPPCe-fdiEbl|@`Hk&dR6B~L+as{ zTgCj!3G}b-FlBLtCP=KDHXdOwUYA606|Z|=YZMwQb?fs7Z^S{Iz*_gBG3;1Gb_(!V zP7focFrv?e}X4q-XIAe~OcMm<*mSW}SuqtwVJm{t8!|fu?NLKbKwr;?ESF|aN<_WL?{#Las;W2)H(BPR#DWWP>61 z$|`^5#9d#5e#UP_*MAle+LIK zHUlaAlK$yo!iqit?cpG@jacOI7x9I0gY|9f_bBRDWJUPm3hht#L})$;w2a`=L|Sux zOuAmQ|5_P(cTW`dPJ7iQG54;3RB-m|N`3Rrs&|OJ z+XPe}W&GU5HGyxYv>VsKQh7Bjm2ind!zcQG&`1-EG0J&k9oi9{oWC5zSr(JE=d_ZB zIm)z&gE*;yD!(AdE~sDIOosNuCbj1&2r%96&r1l=^Qf$rrCWiSQ>VF>< z3Yrtns0YOL5)WRD7EelbfmZ~7XGRkQBHA9B8GiBfahdOAtd`f7^*|wiGa_fSuc%g7 zBm`UlY8I}HomZRQ#sPEqB*nGtNF35GDw;JQ%)8*!5g zuPFPT^H?%t$jO%eDME){RGNZ=3as;}MGp=_Z)t+SLLjGX>U1@~XoW*UNQOGhC%kFh z5Q3MU`9J$qr6^3VDT{ zZ3=^mm=&ij_$3T*CQ!pQB1<#({NeJ4Q{~h?DQ;Oqhh=_F~WXK!>rKeW~47-~ki}OK|Da3Ogft zD=+&Uy!>O{;B>X&nNODG#?q>6E8wkawN%{^bi95TZs;E%2@D%CR=@VR1J0NoCWUHY zzb2Fk(&k^wS6_~D&vtl?C5U+aRBXFoa}GrvgJbR~7~iDsfSorKmkD<>Ex;H(^Hqx} z{+y#!&FNn-1<eX~{je6K$3gt_fv|r*0DH?TUzn#5)-jv#>F&9} z@@D<-jQoXrq^&Il)_xA+tqrOJ$=ZvW#==PaFb!ywLH(tyz?b^vpPNR~dAZn zo5BE&2R;T*9({9rqX5lf!3iBM%qk$K@z5^hs+JE!AMOQoL=Rz_s*{5O2g<%58P5I{ z9~q+ye&sUDwH>uz(kgE(>UVPOij^fxIL5R*RG2cgfae8Xay?3FCw&oIEOn+!P6&*> z!^sX}ja_r+P?+-jQ==j0MqkIRZh4f<=AF~HtEb{25MMXCvK_0lHn#~s@4>EYIKdSj zr~|A^Fr>`@T!{yLDeX1~+3~d}KDT<5PZ*tX(E|=SdOJ_%o<3&Ag_ie-dwya3?j#-s$ zSjXL4h3oLCR|ID!@gq|$8n!VPng*q>_c+9B6;$>WIh+j;njAqbeI<6Sgi#K$?CF^H zYE-jAc=f^U^vWU^zWdHestZY}&O&E{z;u&K7gg9dVa%XGvJ>ZKNU`5&Nz){+-IJ;= zE)^8nSac2X$un9rk^VZiTI6@&v!?l0#R=19rb;bIo;0)h@_B6y4xp(q@!rEBubumE zqvah0R!K_&u#3RVBN%`NP(mA+Sh$1$@magzq{vzcpKNp|MMphkVo!zYT+cQWx^}xk zxXt9E%7(7MtxtE-YNh&C-Eg`xRvEZYsK(!51nIx*R}rbuAWDU!*H!O-8SofjOB~{6 z*t1_M7rN@Q)3E%iQ5fQHebsESk$0Oqwt87I-+#6|5 z(wq?SdMm0<_7(L@gUS@TynB(4sf_zQawu^EKVsEr>YAh>H#O$`rTMdo>&*48viP3r zq^V+cqC-Z8(wkF11Rckmq?X|HU>*1!jE08}o@|=omGe3XG#sta|B6B!$Jl z$v}fuSy&HHjuyXSL_Zz&OZ9z#^edv{y{;CzT8C8j&D%qsJc0LhozLAod)v7`!Gzh( zYRk$jdrVpyqD(J+ICK0VS(|P;fqw}pVK0((1bpXPi^|Y^&d=sX%1b(XQ{4VUw=Gm% zx9=>TKCJs(*<8~lLg%E(zar=@!A%lkC8Z9Sknh)r$k`ZB4fbpkd;*mR)YfO2jrfBd%IFG%caVeKu1ktHFNRk`!DDPH@S#>0d2)I2Ou$Z6>nZ)ES!GOhtZEQ>60%0#lHZEfr?UU zSod?!DjVPf0OwZu+iSW8yrGH%r>!k&>`dH1e70bZw8=R5D3LPM^qOJNnQ&PZ@WQnj zjl2v{?RDp=%r06ItWjTF>aH08qwH2v-r@%@G?!PUPNepYQs` zJMcMcK+Qpy1L!nB0F6k0yA_MEZEPPC!1x$Z{7AfJhbb&Ugs4@ZhatwDGKPGKLUs>% z2cB+hqBQTvhD!%5{h14xXTUSTN*idS1z%JS;r1ujNl=;nkKcpU{-9H z(smF?3lwZC7I_78)z)gMW|{gG4Ypw;<6)WzgHCe*P&k5c2KMjvB6YgTM3&+JLJ{_EWEcMvOn6 zPYkiiSQ`KVg*|nI9@@i?W zs-(<6;i&q}e{j0{giA{{ui&%5@xT_?tt>Fmc)D?EbMJB)2Ef{^@;mk9DuQ00fAZv# zu3B5`ylIkEiyy#PlUM63r(>CLEptc&r6^8!<6 zVqwJ~+A?1S7EnLIoh1o=j)}>4`Q^2}Qg<7eR3+#g1d|R=5|Dm*BX$Lu#kaGeHfz`t z&38Urpel;lZu{#OaQbp`to;1R(;742fx0iQ;!)M^Qs~|k@bD}FC?bS>K>)~AxTb$i z?R|8&ivKJY|4W%Yym+VeBe9-yh(O@(N=?F(S3}lE<)c+!eRPVuvoA%v0H3}^ zKO>0&Q|?6VPpSdZ-ONQ=du~=tnX30b@eMKIvt)qqD(}#4BL^2jA7-2g*7i8az4xW%pOet>WAcKm8oIPt;?Yx2mFJ_NetN; zmJw$@%J#%`NX=u}1L&TQbIbj@2he+=jlvLaXas(HO<~U4`Ay&jz{HdL9c*QLJT&ro zlQL)oJBmUtP_)^bBv;WCanCaKW3uwgO4Ia@267=1J-&wE*X|3}tHC2Kr&0b?CB`P_ zDfr+^PX1RibUBGJ5K-C-`v*mE(WG*Qe2DP@a#89#2g(_Mp%gv)VOtU07f8tG=WeI2 z*EUUB+7+4&>n=S3`0j%aBfG`_=BW^f14ZcBQ|jC+-ac`FN!CH`Kra82)k ziyfkUQG^^C4K)vuEuV=oFk!l-n_-GNgvjlHKE(%v`C&y!LPE~!;`N3piU2cK{;l$U zBb_~lQ6%hx>FFv1El{7M5x!m0J4H`P&_3GoUh}PJ^vN`EYR4ZYSAs;3W?)y6o2f`- zy;ZSwL`JbQVXxqe;N5z71BfRTOQ11jgu`C29CJ4Onv%B&rQYqHF?2Zs*^!QVT3nDq za_}JYZAqp$HoIP6pVteTkyd)fu|ugYuvj}!T_{f5;4zC^ajhVg6vW-wv?%V4q+wZewt#W3ZA0;t5G8f(?x z>z*friK!3Idj+8vsrW9Q$8T>1E%3%8B&k6nj%kY8<;o%S6Je55XsxRyD!^r55}p&| z`>Ou#Rp^L{v>fEq#m1mqY%yY{#+TtxtV6Vg!-=g)K42c(QHEB9kEAJ%NMm4kgX3-} zrt>$k$6TB@uz8tEB&^j+asp+CkP6X4CzNLqsFYsL%=(cPZP_JKKov|ED#7vi=%h-myZP{wp)so zw>(;A1j0(h|7kGMzuxJ^SvOgl#E6O~m38^og9$&^u8bo@(gyW%XtWND_;iNugol;N zn1@Ope|9=K_t^>gHD2`#O!lXDC9%|vz_xm%_#yie=^Ferq;U9cl@pW7L1na2sC=Ym$6`Zi01Ev1H>$PR=2D5}z!5BT z{B!Vy*ZT|Wnrh1`&$d^8$O+Kwhd8gfb<(jcS-F=VCO;9zAwlX|&~2ABe`z#TY#D*W zCevC!B6daxq~J06R+?I$VFbOiGQguG8cmX9kAG$fLq?KY3s)zR+w=6??ap#v5X?p> z`UMhHhZ^se*u}_WkP$@DwYq}}kTQQy0nLG}jE51UqLOI2#M=AIVDjxsQ15mYVmq;$ znE)#tu+mioYSu3!4D}$*z3Yjc=sOo##hUaNhT`G?R)mO<)HZd zW0goe0n3<>)|!^v5*lQdtetpe2qsP%#j%7zc8K*#i9VL2!_jzgr)Ap8Nf=9}M;jHDwLh1BV*qEX>F5(eUylGjyzyYF8zC*7%bN+94~fT z_=MLl2XGW-X+~Gba2I=+J@c(MkMh-G4XjtskMeGLH1ZMcsj}VI9wHuBBjF%a8kc2{ zKPJApF-RsHO09?@hZK={!zamIf?pBh#ywl1o5&kzhPt}s4E ztw}JFHJnZm#48d#>o9hfLDr+jb=RCMzo07H;ce}2X7@5aNM!!<_8zU#9gxSRkicz{ zxy67S`c2L6ZJOnOp=N{M)SPdWUC%ydo^!*@cNFvoHJ<{h8R_rT%=!m4&r&9-MEpU` zLR-2MV{kxf9_u%$LyFwa?^8rJm`)Nh)yTlZnV5XhQodn%LCppo!Rl zXu|y~njn>49Uo{p4K45-@~%=4;~AroFUdbI z+H&Z{QD`1`WQmyFWQ~o~LD_=PwSBooFxSLrwy6myTgf8S-W{w#K8VP|+>}>vr(0dq**(0&3$VWB`};rFx!T%2J^we<#QG0*uEIO` zHdiQ%LMs^A1HJ^*cZc*j7nY%OwoXJJzoddVQ)vk`e zQ4?>cQ0EW@xh4}2#v7jxd(ZmAUk%;f_uhv0`^)|4XN$7y@X7>eSn|xi+Di|^eQpHS zlSlEp%#25fY1z_PT(#2TYUNw7k|E*<6iGoI8d=RX2kTO@?W)Ja_hB{#rbp<7)Ry5m zu@{SSU;!e$Gj_Sv{i)KWzWSoY%BYW4#VF=)J)#Z?@7}e99LC#qm>53Ay@|@KtBjOi{%4 zuC50z#b3C|tIaMvp71}oDfn;PloI&c&|SDi-@#S}7Rx1v7q1Hs*s1IX6`cOC^+jeI zwKOE;dFmhST!-$10HbW6om>0c&OQFG?A(yQ*|}+&Ks%T3x1CG&k9KZnu{|%Zy`Ef$ zO|Bf&thsNmdgw^|sBS&qrv#DWoYh<)HJxmx#IlIXXQB$SikVmpZc zdJH1(4{9Rp5dG;NBO*z2kEMqU5@3bSUf%Q#n!nPU=z(nWYZs^$)im=DV1{-1Mj)8j zeuD`efoB2~2qwUo>+?Dm(QIUe)p+QjA)B-<=EbIrQMG=P5UJGs&nE7=nSFxfd=tb? z5DjOiL!7xrO4}6!pbAB;Uv|}}W=vW3aF+!^DrufmSn6-67)NAg+gi3=N=wr|Jrmxz z7ccYh{2NR}%Q8SP@gxQO1x%U@Krji0N&IVS>i8=)0SV|ogK4>T((T`X=?@FHK>0uH zyj!51r>I&^u-FO#8s{uuPuN}f1LK1Px_IRo(QucExP%472$;+^w8t>cA9mix-|f6J zFV7IqXgTRd1NY@;pw|eIdSND1oP=b*?eUJb@Rr_}?X#+@sjTH#$Suxz1eWB{#r}=H z_iJ5Nw9>{%s@&#T0d9$3p*x(W2t$lJelJWe>0I4*{V$$_A`R}hwCFd%#@MhCzGk4? znB<8a^;fr1{=%!-Z%y0q3)v7^+Q^pgxsV5$MJs~d%bHUNjJ|XnR`!~`^Q*5WexVh-tzTSY> z!~x_c`QO|$P7rTM*#@jvPy$)+FLAi&WaTZJ&mEQj8TJ^p6DBI3sLu^8r+~hWgD)0! zPxs~0maz4_N!KMj$k=0VD_<`jLXmwyn`DBPRV7X`YFY*_L)lq82%?92; zPeJvnBe#R^=1)O}oq%4W-GA#f`fslR(M0igG|kJ{c7|`s7@?pHecv7VFAP0mwky&K z)JEKmNad*OFJ;WAF_a~KNu_X6G7|m;J!V>GrM2akqEZaYNpfs!7j@hGNdczpndW!5 zYDl9FmOT-DCLPV4K|$#8KxR4tGLstg-X5$$05DzT+?3UCW?Ha)Ms@%IOBDQPFnM4% zivJrs?~l4Ce+CoKX(F5bf9Et&w)YM1pv70DWWn8TbVX)=lEeGb;249(Fhx;0{Z}j{ z>iz{w_(_n*k*POCQ^4XMzg+D1(S*55M9uX|viw!1;R`;75cP5(-IjA$IZd{dB*AFh zOzZw8rrdy&aV;ZY@ehs~9qQ<&UVJCNO{n>{^P>d(-417j$Vis12obB zCoehN)0n0q?V(ZK*P0?+SJOZ{FYTtxt!l#DZBi2b&|y}%*lP`?3v`SEApD{z^SLY3 z*^Gcp2Ip*>;ocGZ0D*&zsLJJR& zmM#qVXeCbL_mv)(n0ma$?{`yTeo&P?!NVav_?>t^yELh(HL7;5dH4A5`%Zd{@S5Ai z8Os$@c+WALK<$J1E@{DWoK=`ttjyci`UOg1HoZV?3<-=!V)LuAG~I{wzNaNaewVC0 zh?V<>gF65nQhYv89{V?HviJvTO8Ch1GcR8E+z$4Itifkoe4CHmV) z#4*nJTY@@6Hjjg1{082;G(Awgs$tXQuwA_QMRpAtZ<4JAcK z25^YTEx|bsR6DISe44HKI(AK3D8Y8RCdOHe)S)I%6lEp<0*L>_!?W=tiQBJ6!G$am zOcd5pP_{O9{M#CkbqgY2R(O zDIQ1Dk_P$JtupoCM)vNq9*GA1akY=s^jxhZ(&HA`t(Aqo7IZ3bUz!52ONh0Y7-(kfjpo?m1 zw}Fgo$=;0JhF8P1aK!2Czf(&m1Vd#N@O7h6d#4vra@B65(Yle)^7VSQj2n@a#l7*i zWl$^}4NQEm`9xTlEYF0SO}0cSJM@?#LMs=a&gaNR@U&Y;ycl6SiILR*c1ER^Stz5bcO=#p!xCp`=S;u$sYz4Mc zoJP;&>c;2Ix70<^Dn4xWwGpK1F+1Lj^NSp3)gO?rHL_jxD!Pz1TkGsx^r8q&kD%(N zuZL7kDI7PP0`R>})LX6|{scQvzgDsX@IARp@1mghCXFXTVtYqvn<2}4k=0uUp$iNA z)2cLFG$QJVCKZ#0mZkwBReb(hY-;5xkn2P$^JY$J5trqjb#kR=tZIIW`(?Nu+Ja4L zcrO%^PgRgeup0?114b^mSs``SC(smYT<2Ph%bWfW9a3>n0Q=Q;EQjGE!UN9>{Jjyt zJ5!&)nJ!RHe+Mqg1#ZeSPpnr&QABkIroj8taC8c~k-nxT-`=AHTd=%N7kpo<_j*1L zOAtP%N&~>1Ji|L0dh`vJ;+XZIf<{>^r}> zen$%i6;ZP8`*e`#s82?-VfHvbur2(MuHDfBtKJ@n-{}=Ib8g)g1eq;smJu++A{be@ zSA{E0=$JE3Bj=c~pf$JW4`Fqy zHet31^kSx}6zR-RL90Inlv{bEm_}l)F%3=?)~2)1u+iSM<|Wx$HNzzA&xcZuSO%^| zp;WojJG@ACXpcmbk};wO2!e^yt&Fz&Lkd$INw5r7MWbMY_>v=~*PNp`wb7pB)z=#h zKM;n*Tze8c@?v<42N5c66~{A<&@Gi^zq7|LrJ~55(%^S2^%N}LSM2}Tby7(m8@6cAR-kx(p$c#Bj?j+1pWhy?| zJ!0%hng&&FuI;c?ZtnKFVdocNc$8czoD}|)dZh|wHD+iCvgz^~nL_x9=SSVbNjUgJ zeW|be$n7*=gTYDXSWcpx%A-VVg3`m3H@=qa$j9h=TH;y3pjd;>ar<2KO!?kpv<}(* z>jLBB)HiZt3ypgeR+<%w38up53DVL#g@Z!x1eHXu%x~D*gPV}M zD4ak$|Iq={qmzcB`msz|Jv#yLWcKs;4bSplI>?SwQ@nS={i1$+ICDW4!ep*;-%`?= za8@vneA+(u$JzQvxa^&##|WBbg&XC?ryfkvXUso~sh z`~Ba}Dx%W-w8(TeeN<*(HFa9fAy`OTiy&;Da|M=*{Nu|KoR|e9>E0>$s1(1ZKD~|q z$FnH^nth|~Ixf5~mtA4LJ4;Q*W%%n~v9z@KY$?4AiG3;7cBpNwrH$-H8V}|(ax014 zvEW1V2=`&7UFy)3lPmC0t<1i_Lf8oRR)nkO0t*fvcLom|fX&15()?a+(+WOoT!$UN z=wkVyJsEhM4tQJ*c)Sb@PzusX?OO%+x29i}6Dv}Xf&=Q617nQxVIw<_0W89-3!oX7YthrxBv z{HpG|RXsM#crJf^1ehaxHb8eS|8dv|K7vehlXeNrVg%Dwsb-3T7Gqi{0>PQruU3c_@t2r~pu!~5NCK}&UKLCnH$-3sz|peQgv z{DRlN6V&TK(O`gBfZw_k^zA?~V1QVH*S{Cc=|C}OfLMXwx)<#3K(S|lScBJp5ZvrQ zaR)A}hu?Y-1nETaXMos(*9Qm^b)tkZKe_Vv? z@2 zzW;yR{7_^Qc!a0_1bp;=+l+mro4Bu$$P4)md}u<+}~Yu_F%R%TS}DcN7;Dq(Y8<@kdL zDxiuxBZbPH&mU999pfxZt?LunkT>yn#x7najgvB`xO#+FqJAhmub0yrR3uZ-%;f2) zm!un28doLXKTIx+<;r(3);=lbYutUS(^jtx8h<5HQK?Efwh8=Lcw8K$X$=rtmvjx- zb5sE_;mLH@>cU7ob+sT~Z#-tRaC>)a#lgjMYC8()XhGi@cCnqwubI*~q8Mbj`Q`IK z=U5!y5xC-I2uiaPhl(F$9a^#j;D}@nW)`K4G?UfZ=I%~3FKqJ~8(CIgF20&Ru9Ub+ zKgs;2Wjm%Aj3sRoj9q^W1xyIN4qIUESapv}x|O)qQ6qNwHT=u3F!PNtNU#U|9Oesz zWd?Zme4Xz*Ip3Kk{LOZSQxp{Xy+0((A%D~{zjdA@WSGD$6!nuPnL_+Qrh#oAfXka_ zLF`^nIDok(9@VIUsOhxAz`Mp7)yJ2~vB(L1C&f;$NGOIR#bhktMgJ8HOT@Xi-&O$U6uwYsrdqXT(4ltgGJpADF+Qd}Bjr8ft z!1rj^JCk+q^E$-r;a_Hvc1~mLo|GacA!&b_X>VhuihaUAh;cyiLLai*-9%Lyhf{$P z!Ffkrmaz#uH-TIKH2)nbMWdecldq_v-kVh8bwR{*!_9{7}B5}W2peuv`h$E4G{DLYInMys3 zYd?6>+_J!`RwRNk;J^9#b7#7fjeGNh69#t1>E61v}1yOA63WKF#N(-V8b9oD9Pp?ZORFpTKV zi&AO}9cw{8VwM}82wv^9hGn9?-P6~9zTq`x^+Rhdu3>P0;}BfI?he@QoVikix>9MK zG9od}shzLoYE&djk%iTQodH)P7rn=ii)x8$NwG9x9()L$*HnjoZLfCU#HOY;i+ zo6s}h=j4QX59bES$1l!KDy5E{Doedw&;e@$ z&+uv8eY(pxwC!08sa&H^9ntn_yO#*@p2uF7kNW%7yKe6uN1N}9kWq5@n1Xxbf>>!9 zsUI?0sEo2Mm`yENTwqxmd>ng*TCgH7=xbql+g$rgawEG0Crx|7`tt%`38(rPqrj2@ zDS<)ZW(fk@!u>s2CvKc}_9{sOlOK3QTk7xD; zyUU+iX2iv)K`z*Co(8pOvx=c_&rNsCyFfKI3aG}CJ@vD?*S+5WLmS0m;gyNN(1vz* ztuTe*{wEj~uB*R>-8=pob}#-**j+yZ0vL98e(G;2N&XK7spGeTG!U}ISQD@G@gk7( z5VZ%f++}T+hLgT675^T0}j`X2LG+uHfo3ay`@(ojeO}}D@cidSCBmZP>_I;!oMm=35O0VqC?GQp&R~t zXr82RHN-6&qHX1&GmT-+BUm0^q~W0O@nRO*tasR?I}KgXr6uS*9ENtWhdZ$%Y|KF` z0!eL8TiN(_v=tZ3FrN@Z6|?8;P7khXu1A=-w%I7m&+vH>^M*0{k z@ID2u^Y~wLg?PfTz((ZIzN>;wI#Pb{j?9204o^@yCG7qP0<}VEy*QG_1Jd&3x0>uL z^a@p9C_I^SJTwNq1d4mRBn~~;pvrh#52Dv$5t?)*`X@D(4S$Dm=y#wHWhmvpRAc`X zcE>-EnKuFoNHZXGPG^M6VE_rdBD;>VvQi{=4cWXCz~ATaSpR=Mhv$!Q;s3rlJX?4{ zb$q}|vmnkOARmA`U@>xM1O2b|Hs;2Lj`Rj*)~DLAdP=`qcprXBe}*Mah3H3N)B>wb zB&{=!1IbO5CJ*Exvz!l-)`N+Sfn|mjt@sSOs^N)f4*6W3_lwu8WU#^j3(}INp%YW{ zWWF;@s;u*vX0f!sao_8`<>1@-sx(`H!U{fMKjS&u>-mE7{qbUCI@{!9+s<2tYD&+z zG5Ni`3!K!LPah79%L3lZ%Um5l6^G@ejzis9KF_w|r1$J-AnvzjF`iqgP=Qp4!&BxgArgJpJJe;!N|c6z!ZJW z_?Z|9Qb0YSQebz%A^C|nK`03*EU`AB!a$I}etMA%;^C%5YwG@t+1sU3#K>n6OzP_N&VYF6!V(s9DQja=i!UznSuRSB^rPMPr{#y$es5>jmDdf|rJ>&MTg_wJit z*9*_ewW63tAG*U^7y7J)X@nQaG4<#GSok@X@jZ}tbX<$2r+Fh#b@-28D`fy!yCm+W zk+B0tWjiTl9^LBJ<`wm-ndn7%1$0Fy~T z-?G1-T~d4mzDK*5a_y#VHUW3={j5iSsh)$MQ=<22q3g+Jf1q z12%P80m=(a3vTYW*A1sfRt=|ym;vqik%O=qq#30dMh$!p6g20f8hkmpX?q1Ut}h}# zi7iw0hnyGo9&5~V%*Av+MifvDKQ=vhTi7Y2Da%fTW_$pcEu<}3HO6q3g zF34!ak2)wN&(EO_W)r-c9lU1%=z3@=2h!yW7k9LH1tK5KbBCRGwB3T#cI4^fl!VB_ zX2caYCXH4?q3H8j+vdM4Gk44$b;#V>>(8#vZkKKWIJRWHPEZBj%jMb_T5%~leb9mm zQKdYSvfq2^pX^SJE4qsfd~VT|`K?G_U8SWZv@+zP!ov9G2HGnswg#UXRWOxQRLa#+ z7a_z_<5ZWvv+GRZRU)%(D>qS1&7h7;O-Oe%d_sw}Y0!=G(|1{x!Y_QZ8vn+w?qyk@ zK_=6Q_@O3g$^6_<3XgahuJC;a)Ax9 z(oo`Np$0lBWMyV_?DdQ;SKM~4d5^Zaq>yR~x4a&@FH*D7_?+4%e6AswjaBDc<>EI& zgAIgOpS=tGecfU^^ep-}5iQFUpS$xEACtF+D!I1??yrQ1Y^;z3ZY3o{75xp%Jq@Sw z+ZwVSyox`W9Ew;!N{^kh!51kL{xFU67MGSfF0X|x!a$<-H~SShrd$M>mDm(@wj({Z zVT~qD(;QkNO@l3KvHD4F^wc!GKDbsc((K4}73Fc^MolPd{!aDfEkI>PhruVH;}6uVO1)*U-xpIRug*(=Y>8?KJePy>k0DtK2{#=G}L zRi#PD!babT%`{lV>yyy367m@GHmR10hI0P5UQvHK@dJlZp9ui98We zpV1Ev>5KB(Ur={t9S!Dl<5k?vLVpwrh?%9W6gkAhXs4i&DxmG-Xctk4lU4>zS8O{^ zU!^dHI9gM~pOGLRMTyBCuA(`anF`q?|J(?3X!}xd$*JA^>|r0LCgu-Fi0W5xr7min z$(q}qlzhX1dOD&F=y$Gr+|~-(ZRI2#2{yy3hf0-|ydP$vL>i`ubqbIsaB6$OYqr@* za4AGQtiS&x->u>zQFi!+D?&hxNC8XLNLP6-uc9j<3s>Z7ueQY@g@yBOM& ztj#JfPzxi&R@4Z?Q;?RHG6se7YRiZWFs=}WTQ%H6QwXiL2<#A8l-Ixb;GA3?4fC8* zEeE#(b;VN1F0;7Tt3!8+sjo|O+R@8PbeiAmt+-h4mUmklWQFD2P<;}(Mt>@+Uq)Ba zxVTf~!N1n`d}+7d7^*25J8o)dPGG+CVMaDQQC{w=?l*l6PW2N`q?0%h|P3VM;bw7FSbp|L#~ZF)zfuJnVprGiF@7woxF zw`ek)hLQbTsyFL7H%QStS{G7jGR^mn}SFf6FC#7_2Q*Z{zp5m{i7T?*1%{wR${7&u+TYQs~)U*Pm zDFSL{%=Q#keuyrQdxY#4c^4gP9znN%)L&^Hcn-GjTY0|r!ES1kpY>vyd-bq)*YrsqgDLM$!$sDZkm){Q#l?TrTa3kYoQb z&oDhV*TyyBA?tlp*WoU&2Qx} zX5AA#VIsYFbl?Egb#s&H6@p->QQ4cjl#ADFzQ%4sq0?ARQErxLJhzt$^`ISvmG>OA zUqMR(tW3+3gE*3}YuVaYi&pGPyiRL_yUJKvwY76l%S1o(Bc>zNk#z{in+2bD@A}NY z8mDG%MDwPMOKxiRYR<+NS8&+7&wu3nL_dQQxV|{V)uf>MssttR#ox(UqbOa9%ydAi zqpU+BGIK3zy{Lh`qHp+X1=Xn??WZ9Jx~uf&Df1_1WVz^j>fMb`z47Vm$_M-b(Sb&z zQR>|IXL7@iVYX>LYf+r5+4sywriAw}w!_wf>O+%A>C7XWs~zC>EU<36`RR z>|F*M)dwt%Mbyp+Rl|WHRkH)epasJf9SVkMT)aCG?q$O%2cN4$o|QtHWR*@~wzIFb zOzsih^)A-X9RzGPLLZ902rRzMEIj`rrjJxI4q1+_w;?rzrVFz-eHCJ%Mw6XZRM=-> zvv_8X3yWpS6%PBMo2W&sI%d6)(L1<5uO~DW$btU$v7e8+xA^;|uoyB^Tw098>@>3f zdLof0!Lgi&(&s0~C=yQ-f5-C8ucTO?i>iEel6`f++?~MO5fASnZV_`#D00L?naOi5 zKr?qW2Cp6cWbGM9USSSNv6yF~fp3^eUP%v0Rheh3Qrbvem}iP(+lfIlNwr9un1gi@ zzl_{P++t2ioSPKr!hacojJ)m0iC>)(=L7jNf)RO}4}3E%?t|tSCxv@dP$+FLMZ$yU z7-xZdZWZvtDaEif%+o#qr!EF`S? zMdjE06EfbRhr%?_7q#}C#YOy{Apj2dG0)ZVfv_g4%e^ILWnI%~x&T~kPZ|gJv7!ale--KfTsY5*_Rwwcj00L(i5JO4b zTkt7FcI&4;d_hO)O4{JJntCudn$QkWjdn4Q`SxO&l^?eT)@WDOGN1XZu zR~Cn%LYzHDZ4B#_6{H)+F69l9CrLNxB2bc4TmxC#ijd<-g&;p^9BzbzH#-d=+E=NO z{(7VRNzT~evDU9wIblJse`s6IXg8YGm0*t@%gimN5A}*$tmw=Vbwj-D?diZK=Z-ce zcNqlI?5ig{+XSkQJ9-6|BC!TJ+hftkFY+HnQc_VYQD0R)sP2Zp%;ys3wZA3s6~>K> ziFVa|y$zLgc`y$oX%k&!i92e+zjv9?@Yn(+hj?OHoEw8XjR%n}nVJ*M&Dw#NxS|!B zFB??!k;$3$1Y27k<;x5EswCmg}m=qcB z&q}ug%E-5OkbXseC%ikjAPg{wt7(Tz({|D&R%NOxLA{oSMna5>t%E~s5NUY+v()s) zG~hC$*Zj@IxR%Q8AB@$-N}b$G{gG9B#0w5Ndc;!(B?=BP{NvSnBpV}3EmsTb>lrMp z#nWtM%vrk5igJV`%Zw-4*iWU$?9ZjsyS&AW{TTX}(=-!X!i0{rI*Av@c~=&fYX)nr zdS^`SIq>0V8jX9zHE-di{LeTm>=mr$=noR9cuTl(seV|&R$67?o5sn^E+b2gF|4hi z-mt1Zac#Cp4sGlIr@tMJT?8yyc0 zHQPl;r)wuemFmrn?2ku)U*fY6vp)jnM{AUEilXc}hjPbL%XYmIRPE%IuaPE|6_Yfv z3dG&2UQGLEs%!U4Xl;%K8m+yV+uYOg+wDEh$0f-aMiZ#QIK7@GB!%2AmF~E{{46JAF|G=xeJdK#!e^@xX;~{&-8Wk%rKdPwRElzHC zZ&~m^m&WinPs8fluW#xumVSRV76aOnAHT(|;Af1=c1Q&Kgk; zNP5V*&E|QRe45xuwBi%(8Q9`CB& z55~_Zz&*dD}DA^DDAc9!d6yKnzDVgnMK$xL#htOi5x#JR)d*ES~ob zdb35aodowjp`Yux1C?|z*SjjepxISy?Y?B2K$%z8S_7D@Cor8Q=Du``xKjViRg^ns zMVQ@OMgD%#{laPnwA~ewQ3*?Jvn%w9@j3Yw(r8XA@w%Uu<`mV&kEl*nC!uz5^_JuP zArI}+bnBR@P?xW=Q_8^0B=jA(Gdox30{RRHl@ZXh+X1kxfdVb#e?kKseC19j$*g#3%S-CnNnL@X|(j;|P)_ zoLbI>!+|(A7u6duMy*eYkBjj5e9=W*_}t8xbgm!f z1>-KcuPA<$MMyK4viX5nU_hm;BNapiF|E-L>p`|UikXBC?T z_P`4AJ3DY2Z;O?kypcE`*r^3C?@4otVqFr}ZNgL>bcGK(AD+Iy{2}U`n+Bz+9K&E- z9${6f&xh(8UH>L%L?jUsk-1$J#@ZleuLI3X(vA*IYr0HNt{TbtB-~BRv5a*P_OxSu z8excn(x}R=Vzfe~@G#5_>?TeKS2anyCCBO35w+L6;6@P^S&EF~d)$fPs;;0|I%GRp ziOBnshC>c;Eo#%dEgWBdAydBZ*xXJx-FGJb2c%<<%bDga&D0o&7T$Snrg+;i|1b9M zc2?R0LnQQ?y>yl=2JF|V)#$8uh7k?9^Tgg=Ic#!pj0~m_Cx+<$c(WaW9P++|6PRge zANsYSan~@!@1~Y@WYR@#FXrxKG}dPGWLKS4gTQMfz2Q@k^P6BC^5Cd;^NSCKJHRU8 z0MA?b*U$`}zcl++{m=W)^v%PQy5CIjJJMb81~sUsDYZwt3W(N4@Piy-gV|({Hov@O zCmL_Pe#XTP$ltLfg2qPP9c3%({<)K;Q}a+*dd0YiVf{G@^Jrbhy$g+GVH>vSBYU{B z;29C}E9(?ba(>XqAo#P*9!i>C+CrXgM>ocrwzea4e(S@Dr%x)xYio@<3z`b#vZOZS zq=XX&?QnH%>DDKo`V#w4DUSL-v=NNl$<|h@#>t|G(oYc^UbH39XOU`0n$Q;JtH#lj zO1R+05G%LvQlIZj+|Mf5_ikdJErC(+QW9dec{nDh?MOZ*`YQ1_ThA50$GCr{-t{IIKlI#m_I91= z!a7Izj{k@@l>Tz)h8)%Gu@x58A~&h~>vGFGvXi0WF|Uie!FBnZ2bs;OWB!TJN`dl4 zgn6`RquO|jOn0Qka_RWyTUUON&ta@GVf%Tx=U(jbIpKNJnr)qESK*nd?VKTeW$W|& z2Q1Z%`&&F*ulrnyDh5ri_m;!sGy<~=^%)lTnWxu~cxyGrXPQaf#JAHl?Pr!ROQfMu z*TgzRGKLZgp#;=aW^eZmJw=Bmmg5PHwY|?hWo+M=s?05&U6Hh@GU!dNRkm)MSGHJE zv7qO90ltx`6W_NV?@70)JFzNhZw#tzCT2=YA9>%?65os)Zj$Lsvc#@B#xOlrkF3~| zBsqTt3SkK`ZPpA~(T?DnX=9ngt*eQh7iy&*(*}-7_c_HbTg4t5$38eMs=-lDBN8OB zzR~#=v6&hecbOW_vrq}z8xin%HG7(Z-+Qh|cTF68HHnRZJ zcwQygv-DYE*Oe;LT*4e1FW!=NX%(p=sxc@3C37)gHXIuMCMYLVf1@{(Ql9j{9S?oJ zIZh;JL@c3=ux=}9+xe~fMWNElZw@zC8OkZVfQL$B&pgeA9xpyY@|!E%m(eg?*-+4+=Sk>*Hx&r_j6mpXtnbC`pt?*!}W+_fejDH zG@B~G;NA*;SJvP|tribS5CMLslGP{q?*{4S!9|;Ii6{x*aU6<+j+N<)$wx}E8R8Y= z_o`Wz(-IOtji?_h(4T3!_26?lA;e3PRKQJ?w_Gp6XwQ_>Z$3Z~voB8m>_EG?$H7wC zc@u1_`+4rX^(L5s0EkmB&7e01wvm$-e}X-eK9imz1PvnheUCt=x7Hf#%@sHGD%&>c z7l5-(q@lSD%DI}2NY{oh>-CcnI2B-Qf=i~qrdemxs-upkQDab_fy)g;H;12%94=TB zKQ_I^LDA-ng@`F-J-R3YDd~nGLd1qG0LKBzBsKz5@21pavBhMB;=mh*8U*9)=FsD| zMT&u!202{S|5MDM1SC=a%PCH`iEpaE3P>9Y5e`(4U9U5!bq>rW$N-3!i#*&o*tg%h z`-kGHtEUUmrV2z+xF!Y{%=*qHB|fSzq7uA#Tyi6A9e!P4&MdSQMko2CluPrr7sICe z+VUm&J?iQ~nfYsHV+^I;NlY91E=s$qN~%xcd5AhTEQgK4bU!PDml6FK3)ma1=;(48 z``P-96Gb8=y*N;;BPy5BC6KM!F4HWsQ*t@DA+?>2&0cdG2}tN8Wgo=UMF&)9@SN0u z1=&81eIBDrv_!8wJW$0HW0Q%PhdS7z{Mn03H$5{fa4Kcz(zTZ}haGuY_DrKL#mVNt z$^MPw)x|iXxJyu8o0#(>ujg!dIZcyb5-l@Lk?Q(1l}zvOmyFNz@y4ILn4KdU)hyU&cWt(;+O%ekI9ZL` zTK%-OnpjlTow_?sLU`Cmco>XOs@3>x`r3JsS$pDQHA10HJsPTd`ZiXr13De7sy)lXg9P4$PtR9LClR=I`lg)sBQbS(FkFYReRRVv2a zdSjOqVMCL(Jh(|wiw@{wlPlr9i`|EmC!tI>GGBihHp{?BrxmO=mY4$;H@v#v@YL^F z9jF{nlOS!|Kzpr=g3-R^RJ$M$pE9>ruXJI5ZxicX$uBM67~5b_68pjULhqpcjG(qd z9Eb?KhF)8Z8NMG0&mfXqOGl<6HyOE^*G&3B-@wKD7KuodNNG`d*20YX8vSVv5RYKM zvkbkq1ikhPI@7v{*igFb2XbpMvU`o_LV~8Dh256n6A7OvR>%t=9X)UDNP9viS9Gcs zL}F2?Y7VVccBTlDm4K>Q4p`~u)eCxJu0Nx<&^YG~W23-y0B=C<#c*J@Hfn7>k8q^) zTLr4oV3?&VL-VNoQ@nx-pNmeqqzd zH&H2V;QW!4BZ(KajD^Cp!erGOYW{hLSB3@d{j-o%`{-BK*umlHmo&n=wkWj;o>JyD z(v4^{CsM^B*dqr->AL8zG zKF!Umn-|W?pxM+R0qll9c)`KfE2Q%YYsc?43v!8UCEY=!`IeH6NIa2$V8s)-moADC z4j6~2JyNg8Hb*>WcYc>|fw8FeYDlZi zEaJnSTT#3o2N)x#r7!Q~JZr7a%WB4vVJ*GXFU)Nm6g|6x!VN6oxz~`qJjm|H8#BAi znGACpf zsfrG-oOc5#4*9ZWea5OxJoM8G#|z04B@sZOnQPUjHjC8M^cn%ht}Zh-muM$jTN~rm zEdA(ijwJFi=t|3JRQaBwRLYXWvqC2NPzE|QIPU75=u;zL1cXn5U+XC(7mTb}zZnE( zhE-z!OgXT2bm5}vme;doU3={)0XHsn(K$a^%Hax{q!np5ioKI83Bq3!zDnzf3i>8zJ3dk$h*l+;(*C>tC z(Pq_7I{-=FR#WOjRaz$H>h&8Vy% z<2(FV+P6=nkB*Q$6Uib;N#|U2xJ*TlMI}J+XjSp@Vkg2C+7ao!7>-^8&Pe`E=*~aR z7;-<=|G!_f!9SM&e$vi=KlvjEg}+Szrv+{U7pTSfBiiEebfx?BONo&)AyYKS-g^`$ zFDU1H34JnIUKWx@*=FS{o}5jwJkxyInP;MIFlx6)=vRWmte+)sL43-rw@qK}tEUnP zE}tV3Ic)#@16VMFw_z3Q&4J4c5i$!^2Jc+p>b@NA8AwOfX1e@ZcEw=(Phf(33|3qc zywf64^%wZEy&-R-It&*MhE3m%Dh-$btBg%ncO`<`u!X$%S`#<3e5aWBFFG&~nmg_Y7#V#*=@owJV*LhoN!^{jOll#yV*n&P=1WSV5=&3Q&~Q>R`XzD zbkTqb(dlaHn)LSp(q8fWb{*<0BP1`v%ToyF8eCl+9O~E`I5@t$+@7BGon1vHnyTJ9 zUtSvCUQQ&NayHJSOl?{pU5{@~S97_#TpZQ~PGq`ex;p+ipKgqe9bb$6%p~jbZMb!& zyuiYi*I3r2_9R?fitx#619cJb&=2!txZf?k;_=c9IQ5VEJ+IqGYq(BkHadVS7;&89 zAxR?HRdeC)nx^Ox2@j=f2fP;=YKnuz&1e$xXBF@-&=Rla&6HthXJJk497F=rx zQn!CfF0PtJLs=q@k(SfIbLia^#^k1!$W&)9kc}fT;vhKKa@7tJ6H@lfgzzHUj?A6j z#LCY!X8J8(QfZ6~oF$7TkTwj8WrmWo#hl_L9_Qz;p5^wEPhQyYl$J!Ow2I#X@vfd@Ic zh>GCpZ_p(4C~t4o;0NV<%n#&yOb+DDLeXE8uaw)X_GkkOG&Uxt%H-I`4rSTL=w#W^ z%w@of4Vz>TzT|_-G0x{hDl>j8fHWTkDaLA&0smqMB8M=a5Bf*p3a(O2F*enFK7?}R z#{x9-QLtjgCK9$Jmj8vjG_x_Af=b4g2#RWLp1Me^AJjTuhoB-rkYJQQ_ZQbaLD{!<&-d`?www(!F z0m$#v{4%K9hR_!`C=QOJ?JtGcU5JtaDB^1VIiK5x<$f)${X8jz00peCH7n`XgLI9n z4fX%y_p=i4*VG$GHv@&-?kmdfVqSx8Gj2vj}Ro03a*IHXIK9+e#)`tnrK3O z!mV4jMJ%1~K*JU&f3?#WP*G?nEA)(y%Biu^&3MkNlMi92Vr33%)Q|>gv_BnxH4slrQrc4vVD%9p2KWj&_!m8ZlCmmFyA4#Jc{9s-FKA$f; zd>tAy{KcDm#QLy2irew;DymNi?B3zjI0SK|IIsjCKDR=VOx8=J-DJO2E)GRsfG{5; zW$Z#-Wv|e6zgFqH#HD{z1ty~y9Q_7?8SI)7v@moNVQ2}zeaI62R~i`oCNio+ zd}}v2(AUBGYzk@I$3`7$t+5HMkS;%%D2|Bm_*tce-U+VqJCx4kmW)eV>Q~}ZV-Tji znb2Zyx9El5_h;`0V-8xh&N|FaAjV+Vzy8dFr-+d$Huepw0@ENy)biI=+)V7Hl%|Jam$`MbUKBTs_c67KXmyLtS+ImuWABbH0{eSkY|-=+3l! z)KS3A1OS(B(Z)Q*&A`Y>gox`@*w!`ZPK8U+z`rt$i=aQSmDTEvn>dwbDnlR6HWMx) zmPruJb5t6&Q4(^(VpLDSA`_jP9J!l4;WUUylW#6~7}E6djWRgs%I!1$WZ{}wyn44Q znT%Rnx<-5nW?u54ul`nOngbRD8f{uE>732=0+@nQo6n1@Nr!ljd{L6FGH0!1T1t>~ zWk$I;Ih@l86=rwGRBuY^IVv_=lAT~0cWW_Tv(3SdJ6?+#a?ho%$DS!VUS%E+D}K6h zyPqiiI7yQqXycU*3J6H{%3qF#Y44IWB}RTQOQ1pSoFmy`lXoRi$0tk;%NLC=l9Ulu zs^(x@g_fn&tr})XI-Rj27M0ASmLZ~?H@>}YJi66I7tbdORWBS-5u7AVfAS`cV$wwD z^2ilcgse2g4%N&CifG0&3;k#yMVHM4*BE>r8s&}BP)7{_`W*$9#P<+uq!;}oQ>455 zsj6V#*nRxh?ERrAdnDlO{gNH=LE{=wpf=kUUu&^=-_YOke?b!3Jbh0%z*Mn_+MjTp5FdyQ5w zPZzJvjir+FR7sQ=j_HPft-P6J4xXF7<%OI*)R{Aa2^>7h3pHx%0tAb7rbHn!i!v*s zU_Qa*wa5eeH@Xgqi|P!C11;#lgx-P-A=GHJ60ye-s09XSSB$L@YACj+qs*njvo5q{ zwb3t9drG+ycg@ml;YK{JNTS${id>;*TauXBAQilNoIMLGUH99tMc5DT=I$#+n>%x~ zz`g3ky|N06MDMw#oY>!VU9aP8@4{GlvFo_kScv!+gmtD}IWb8yaZ zp|S_?_|70t?K9Zi%3G=CfjS`#@B`rAf<6qCXLd}NzF_(+NMW9X5U*YdQWJwSRCy-z zg+V6W49;jqnogI0#-O03B6{mveTy&~PCDpFNEfTUHGLGClM~z8+S7Vw=63yKkJ|0K zY4>W+5f`4TQ}T}!VPn9xea+0at=cfN8t(1M_2CuQkIUn&IVB6lU9NUqT(^s9Hze_a zQ1M35${o2$=iAeX_zPj9HQQ%4M>?0GYkAjeXJx}?%x^lOw3jqT%V)& zqFeJMXW=?^7626AMUw3I{0p7Zf5^Djk`yIPiyF>7n|tke2>9kCCmY?GZ^uVWy4)4^UE0F4xA~*3>gGuiL zTP^GqNw4Vpw$hD`=<2M-#iDCDQsi@l#w&}>2P-$qn(D@|6m0s?eYY#V>5SV37Weg7 ztFXyj7AKLbjMujCj%QnW+7&UDZ7NdM+A8LXp?^L~JJET$=G~9}wN-iWNP|tL7GUEY z2oMEba4`z52)qUQqD>VhsNsBd7QRq^xAP9Qc8P_0#0Ao2 z02^qCR#GQ zUJ*!6?_p()%jdHL?c+WwU&aVVr2}_hu6vIG~PFr@&?z*0N?Fl^FEjPCw7FdHzCv%SL0MOrnLrR`Id>Zkke(a%k%l3>&JZ#Q~=U-5N5i#pGwecB5V`fFCHkhPyG9nfy%dE3@(? z|2yzvFB&`i97%e(I?o=?wPYTgU=1ECAB4v0sI~p(H&kgA9awivKgDtz?R4=pUD%?! zXFY$S((|?Cn(cEHdf+)^-zz=)bBmM64uj!tZ@1K{cb^|E*yQLVeP*j$`^G7Lfit@s z)deiU2`M&`I`tV(I%KNfjVfKR;Vy<>?tc5z4rjTWyZC+=j~ui*`RDO{0oXG6+u}#N zDbd!!Bht6UD9hyBz+L`K49-mZ&ow2jG^|4u<+paJO+54i~HSqjCFW(bb@hVz-+VfudWt2DFovpyvPLQ zot|6N4*;PZa_-I|6P!5q>Nz)k7Dvs8qD!d3hr(wLKu)6eT7x^dpX8oK?X?a^d&v_9 zK+dA}+JLjTpSz2kly_l+LBBf2{T zAP=K!Uh;^j`Q6nUsHtHkeS^L`n8Tc-!yp2#3aI1UGmk~QLxHoT1bIXQMA+#8Z>IH*1P0F4D&34<^kr<%K$2<7Z6E;;s6zMr5JN`H9k*&zSe)7^a}(3mBJKP zR9F#;d;b3`? ze+T{x)Zeo4|KOQsZO6gDtOLW$nwNYcbAB7xv@Wl*|K|%+W<8jHe2M(ea4tVMYhDf~ zkTsJDip+gOTFOxC;O7bsb;ZWJVd4C*UHN~J@yFyzae!yTcAA%BB6I#5Y_u*U*?Vor z|2qpam}k@FX4CCv(_?4Tt7pr`XCuyL)6wVBndj2w=1~6k@rI;%$t}X=w*f_agP)Dp zcI+AFiah*(vM_Az{|FEM8zi(hgxM)=$B}WaD8u5Kmx3Z(|JM~#(B24%G@=XxjpqN` z4-r58=zDlK`RP@sLPo&k59Gg{r$sM~0;PaV^YHxdNrUZ}(j!z!)W z=B~zuH!fDl>H%Pjzgo6c0&fI@vWW2%YrDw6>D#*a4wiQ>F2|?A^fD(`!_iCnsZTo- z`TaB8y>9*8yq{8W-%J{h)McH?l)R^D!N{hhq(#*U8Kx;N$$gJ$j#=h`M*Xb(woWq- zX=)VV(&ean>Wy`yC*6rEMPMRpxkQet0!Q?oco)>lwd;2VN4B1e4pKn+I{|4v_ z!H))%&nV>;7KO?r=`d+g{MC5YLM_T=>y#LZ4FQJlEM=@ewefO;1w@iZ$H~h0SqVXl zy_fb2C`(oEq9$`J@}*)a+Ks}58d={39ldHWwch#IV}wV1@R?jsF1ph{(*i}zlAlZ@ z6qzMd(Cb~tVw_|P8Hv@371ZbY5=ESp)HDW?z?0&wo#x1`DO`rQ+7C|qYUa#3-+Y(0%IR-{vV$NsdP%w5Qg^VI5)HUm*z+B8 zwyiN7^v!~tZom)|%UnO0Zhuhov{gH%r-a-k&|wm}Jl!Ac6P&U4= zIiKbhZKIyTJfGfGk7HNmIx@2$n&*&}7kS10WfW{zzXEx~=tGphpOz1651a@yStrjb zOicYeP3g-}?Gvz<)uPPWIbp9GGOS!yuUb!YryRc+os7jdZ_mt(RRG+>r^(&cslxC= zgleh|xLtOw8jEb8wop8@@r;KJ*!%t84&!xYh|wHLT`w=Ke{HsY-N1*0zbsC@)-%z9 z72FyS^#xua#6Y!KRtQ3#gIo&thz{N0@-S(2cEZ+p6Iq~o(v_&uY`>CF8@)s8mdNoSJ=Skr0}DHJsmH%LhLCp*cnc>wb`rC4$j^p1()AC>PaBt z49I}r8YqFaul~(Zt7fTV{AYH_`wvw2j_QhtX0g`06q5q=@1n0FZ1BCZZI(a;*v#Dz zK!^{fO4{;JVolA&!vfTYk$JGHS;So38h0i&w^R;%XeZxBldi}=7kGmqY(tbRca~xF zfe?~z9!!JCHm*(6)s@NVJyarBR!3FdSMn(GL7Hl*tO(O@?;_H8yFc0Z;j;La%2KT( zjN}q89YhDrF}692m&?ZswPn>Hw;PVHb~hUNo=h3mBh(%VIA?kpW)O9pd-YDLcMl;O zEei=a#IXelUuX*EE`>!(@i0xATE{S{*?XP=_H((<7Rb4pkp^2H-O%sZqeo4Xa zaq~G=f8o195f=28ah7lk)8-XhSw`CnD}?Z@=0***WR&Um>qpCHkX+x17;%I?*_~$i z8=7^l?fv#6AO~cHb_1}60@&Jr+tT-r@jpWX`e0jVkiGUi_K;6aC7qDNvm5;8Wj4Vn zyH25|3ALBzrV|2F@$IK4bs9hA#dos%WAoxR441?}KwEZ951wH4?`Tv)G{Ypdcd-ra z6Z&MUzRrIp8h7{%NlQJPEQArB%sWZa7&1OQ3u*Z<>&T)bN@rW zsDCT{H1);hG_dB|ekrLO@@1 zx)bc{p#-a1--mS6$K309#3;V$=dJY;j$-B`&mq}+EXw*l)m>cfQWjWKAulwsuO%C% zW@DdOSo7Yocl72<`cVbFyy(I>ebpag(=AXroI}T!XMibU>$(TYU^2`ecbEV=zSpi( zeZNn>1@6UkXz8mZb>ypWyB0}utmkEz~ zul~jP7Y6oETLJL{-Sh}R&9HO1*9_}>&3J?Lhh`jDv_3?2Y=@+ZO;U_SB*Y_u&G1^z2CMabGIc8?B zfqieH7ki_dU6?XVy8GN=U#wLT4gV{q8PvGJ7lzJJ#3v-yX#9Huts?L?mC8|iShOo7 zyS_~?rErYarC^=1CXN{hgz>(v2yZQUk@ZaEeOwKAkth1WSms*$?MeG{k^+L{ZLIh7 zzIS~;ZA)|4_u)VFJwLGT_g*ym7WIa6%Vb^V%iqcP?-`zWZ(@V~k@WYO!vAFxf6{!8 z+^@EGHgOCJ+T;|vAQ}I0-{-om|(6q>S~R}kBxU1XcMFEZQ^Vt*6S0C(tDfO z477gsTO*yQYnJ5ixvwfKT zmNnhnHK2<*$xKPDUQ-i2R~mdq4nh*OFr!vlyr6DY9+mPfnlnD-D5652UM%`B6fp45 z4;#JaD|uU%;rqoljAATfcN;%}nsUTEh%TLcQ7=Pq#(0fJH(>4_eSxZ~mmIY`y(gm2lDqu+lOOh9bI(421aIpbr3oq{{hKW`s z)MxaetHSjQ$JJZMSqSonhBz!NE7&bNQYHx?2v)QYe7aIU>NBmLq;kLYciI>K{`L*% z=oj^ISlK?j($D?=CeP|uXmGSOZaZ~vF}84)LSMyuP7KTfTl3$w>>mf?J&bX@LVE&$ z?aX`Taf@tdmOt$cKV-m6H*fn5i8NxSjqbO@jWUs!3-dAvk;1Mj4&#=tf8s#J zeC9hQLhF>j(~I_O16!fPWPFF_R=4TA<2gwNeu@av;--A)do#-N>`bII5#ztyvUEdS3VkN-yUpR#s-`VQ0#j3*!<$RN<5 z+Gbk7yiev<)EegIcWzhw^e3RCsUW~J{_oxrBb)!o9S?qr=(86*V@ewE*5X6v^c&-5 zkB+{i@QwFzl$bBE37wJ~x>SuTf?4|GPrhO2rM%>lY8>4uE*nGx$J`@6SRoC5Wj%%7 zQABbe_2XiZIK;0RRlT8Au%17_to&?mg#8=~96M7$ktMzjd(|c75Gd7B`hpOXox29%D=fARp1DjJRFGrFkS(aCx+40ViB@amqhV2s=~&Bp z5J`6(yyd`WFiP@-iOQo2tz+E$VP+s-#ierxh4s0|ke@K^+a2GP=ofd+rO{ZDt(=*f08=54dtY zeU;YgC)}=z%evfbnNMU8OsRSBT$p!BI7VyGG1%=_k0q#>kW0e+8*(nePw;JFsto96 zJ}PNhdG0+2ar>^zDWT$pmRA*cG>6~2L4@||uA>!; zbSKHcrV;Z%U>8*APQckoG9vAW*-O)9Iz(J)mrRIf<%)k{igByX)&xUfrR=HY!Ro`N zJ`wcZng^EiWrDcW2}m=ow1lT6TIYu#w|YbolUwI+6wmaiW=ao|#4K`*o1rYM@d|N* zO{V!wraJd8w63dM?KcX1ByH*zKL&`HcO%f`h+5nxE_6*46>E+a-NXpPEUwBI5;0G0 z4nc(Kkg+~df+KEi491hCskbgEWJdr2UO6G14ln!u7xmPUU#yYj_; zZUyJ{rd0f`zo5VnO|r>XkN)dV;(mH>2iE}C*zL@~cK!FK^Mby)x;s!8mw~GVA_LC= zCg#)9FxGmfuVG+%r;5f=Gh&`^pL^|zIzyG6#q8#rFlIH-&>jffo`5o0QxTRhP|{wW zni^khe3}j0FHKCs^hxS>3t&HIitZ7@hGE4BXqw3Uu6K&;KM*=z=MSx1w4=I~#Tb6h zDAuc2%{=^mtxGtc9{U_-jQ3^H){+%QEg_?~t>>YBq1&O1tatH^i4F8jDV^ha$_VIHW zjnN*}Vzg&tr1Gz@hi5{4>pWo~hzY-hArI7~CgFNO!@MN)3&ZD;RHi3OmbW@Swp#;0 zJ3j?x3>w8jxaned@K}b4Ac1*ppG)Y3M`Jv&HhGsU@!z|v81BZu4%l6ks30IDe{`3* zrGcrnj-`~2wY7n%o)z_@zv=F?D@OGRElE7@yfwJa?boD)Hr1tlE~kkpywoWsJp3lQ z!z&w=xtx@VCzY5;G#nF?dzGpU>eC9P$|Xp-EfMEO?3=lXm;KMl7Wr716P-ABYt~kO ze8GX^L_{WdA8P4`k+SgZ>?xsbZ*D+buKLI~;^VwV^VJh-EQa3sYtL}g;Y+_8=>SKr zEUVWo7&TWm+$JTW8_#(+oI-Z;ueLGDYo~h`Q35Y5b&saIHiUCTi31}Ai9C2? z04DovkAz~Zr&ysN4f8yFTqu=H2VKAc8zLCtb$r)(@is}3o|Z!_aw1$m+s;fB=Uru8km(VG-QXsyP` zFR|5bE5EkOJ(4B~#Ec|(;`I?38I0#GG&Cpy{=*;c7SQYIVu8H4W$ihXwp)2iD+uP9P3 zUIN-8;?si|4`9YoEpjKp<3_Uvhwny=qb(qz30?7YYPhBimGg&Q?NUQ^wBZ)4?`aoc zX;!hZxB%tF8lA`i--y-E4eVGw*l=Bp7YsEgp2c zmm5pEOhf8>tag1LG(YUSTRqpN+h6gM#}{i%j2pTEzDWPO#cJWmoB@FW&P4(~fBu=q z(%)Mw#Tj7kHB_#IinKJD=j77SD9x}0(lQ1Nvz5#Vq|&8!*Oe!oBY163GBw7m#&K#|azW&EJL$a5vU-gduB&gaCR@MV|YM|v+K<30kFjGW4OD1Gqp<6O;YVJG(I zaSdi`cT6MpGrNJBwdA9^wOKZLTX%+dlISNV`kt~D2p`e){hvFpexUeDBHX>UVN?OF z;vHi_>=#I9(%UWgX*ss(lC(xvFovyZD_Z5z^ z2)njKdi{(aAdk1jM#v9H)JxaxZ}7EP^`(2pMkW2@LskNDV}(qoOCVOf z8x2?-IcRW(_eJxe04vsx6t<1%&}wPvisO~F$rPxJ4bnx+<%XPf;$#HTL!S)G)6f}Q zvhrOjWqZ-FV951(_1>KnQ7tgrvV-EBmdlCjv~FNmO`RE+ay-clpempe@)_R1e!)E@ zoSp_P6Re3N(erX~R+FAay2^^{CJv6-AR8bA?vW>jlZqj~F;RMhtTKcWaih+6W*IfY;N zjBY?Gx4S!jDdU99NYzocYenM*;C+-<6d*!1RVfFDS12dBj$f~_O>yGG$3RYa$ru=* z>4Ifn99OgK)_uQ-f_gI!x+mgJCUEFC{!(RAcc9BVy!Eeoh1i-8E7Z~ zJ(y8pLcjR|pn#KI(A%WTQD9_1r8KKxSofERO0Rg6p99n&R z5%3-BsM?LF+aL3b%(q(&D7H{u4Wo$TX8TN=+0nBl3P)VjYT4rsbntSF3T?Cps1Eh$ zkTY*O!Y&&riwFf1CtCTzDzTCh>CE{P73=jfWD)7-`fymG@mXDu?o2r*Dsey>A zb9PXF{WQA|xU{iiS!G)YQIzbEWK3*Z&VsB&*>=NQ{)9^#UE54|Dl}9g-Au}1X}#owU%#N zgO)>aliwIYxA|aFxH9J5ZV1tsWR-g_SGwD%^3h7Rs=(SXHTnqzgcU;#PBA~y&WhU- z)z%HVpP5GYLc@Y^^5dcU{2M9~<+Z3iL>)7}ClpAidO3YFkx$*6*82){;k9#1#r$1nwnLSdtF9MN$4hx#>KzW>qd!E|+ znSpa5;cPa-In#RFLSEZG8F+WFxRh~%4qJoh93AYPC!4Imz` zxr@&0m4Xy5B>9Afapm=XFW5CqXA% zD8aK1BiTNE?eZ$j(A^T*3}_M~u@KAsU7A!%T_4{#I~q3lWtc`IcG6j2qjIi8U!xm* zsPalYJuSrq-!&rP>92MK7iG(ZrXEG0M)uTR-#?A1!Ib;RrC5lH0-9F}6OwKxr*PVC zjf;?0-5jsFuEh=MlWqm6bl2P@x1Qc21bw2m;)sje8eaLJnq#!9mSsQ6urf87RPlT8b^%&o-JJqz>*B=T0{}*fq0*PZexjBMFz+QzP3B zTnzbBQS(Hxow@k1Nf5tdNwm-RXoqBbI9Bos)2la-*?#YcpP) z?&A(wx~)aKVXbK()o)E6?rNazd`p?E|J=P@qEpH2tulcSw9|gP7 zE)R@qTrW(BPHo}I;3QwaI3hn^J<&Hux=2~3+~%U{9BN;OW%V%m)E7D%X^#Vm)44>` z|Bf9`tfThWq6m(}h;w9x?IY9Jn$5)=iq*F2@q1&-TP?A~3KxQ8VBXyJBmCqoT5wu$ zJT7oJbN7^)7@ym%pw8vnP*7L57Jk!nn3T1e*Zsi<&gz^I2g?4j{&DUP|H$C?&4`^l z_T#}j+Zs*8-uwW*hyO8%0tKT2c@6>z0u3Ao6M*P5K!3ylj*2f3KtP@W zOMcyy-kAa40Zpydq#ew4tW@sC$`ZoA0#wS-ygCL_i2y+Pewnnr3E3ch~+cPO5+wD<<$#jKGQMcVqj9 zjTBe{#Q7QFF%u^2<6LXN1vmljf6U=|AT|Y-{z?4va-8?h+Q%s6DqbIAf!7Xod5jYH z;;+ktb@fGwb=@))JX__rwc&aB5M@=(khV!+O9!hft>4o>$d*7`aoI@I_3doRsn z0892l;WZ$@TUihgpo0FioqOB^SXnz5>sb9xFI(j?btHibNe+z4c>WV12ncN8AEf#k zmO9!}*1*pkdcQ?@>|l8S35mH!(6-dDyZBzE_s0E30AjU64|XXA0&@5N*Or=1xJNP3(KgVa zHZal9)1iHBXs)C8n2+K?KBJ$P^m*U|cI&r%+`FV6qx^OA$nE}$@=JR^xX>R1B56g= z{GKhjyfqpiJG~qdZOx^4r#Zyc*O4N}U6YzpgU#nEbE#@u&M6ejXx${wDzG{|4~B z$$$IQe4NVVK|p_od%(xN_uE_c@f6qxlvu9cqWoll9>yS#qZJ=e=p-Mb{Lz2+Pvi%` z{^Qnq9F+F}m?-r(fDexH$AFLH+#UeqrT+%-ubcmIaM%N270`qC>$u}5k^fpj9>-ff z09MHU4d7qj0gpqN9stYa{s!=`t?}cipa;Mb`M&}D>!;u2K${1^Vuil}{I5Kp(Uk51 z|7DAQu_Ax1hktDb(3JlM@UQjo*O-R~fk8mfR6s!9d u-aY8gu7k(Kk3UO45ThFW6OQgbQcDO!07rB{Zw&BX7I56Fc=w(J@;?Ag89j9X diff --git a/tests/fixtures/enzmldoc_object.json b/tests/fixtures/enzmldoc_object.json deleted file mode 100644 index c064269..0000000 --- a/tests/fixtures/enzmldoc_object.json +++ /dev/null @@ -1,219 +0,0 @@ -{ - "name": "Test", - "level": 3, - "version": "2", - "pubmedid": "PubMedID", - "url": "URL", - "doi": "DOI", - "creators": { - "a0": { - "given_name": "Jan", - "family_name": "Range", - "mail": "jan.range@simtech.uni-stuttgart.de", - "id": "a0" - } - }, - "vessels": { - "v0": { - "name": "Vessel", - "volume": 10.0, - "unit": "ml", - "constant": true, - "id": "v0", - "meta_id": "METAID_V0" - } - }, - "proteins": { - "p0": { - "name": "Protein", - "id": "p0", - "vessel_id": "v0", - "meta_id": "METAID_P0", - "init_conc": 10.0, - "constant": true, - "boundary": false, - "unit": "mmole / l", - "ontology": "SBO:0000252", - "sequence": "HLPMV", - "ecnumber": "1.1.1.1", - "organism": "E.coli", - "organism_tax_id": "27367", - "uniprotid": "P02357" - } - }, - "complexes": { - "c0": { - "name": "Complex", - "id": "c0", - "vessel_id": "v0", - "meta_id": "METAID_C0", - "init_conc": 10.0, - "constant": false, - "boundary": false, - "unit": "mmole / l", - "ontology": "SBO:0000296", - "participants": [ - "s0", "p0" - ] - } - }, - "reactants": { - "s0": { - "name": "Reactant", - "id": "s0", - "vessel_id": "v0", - "meta_id": "METAID_S0", - "init_conc": 10.0, - "constant": false, - "boundary": false, - "unit": "mmole / l", - "ontology": "SBO:0000247", - "smiles": "[H]O[H]", - "inchi": "InChI:HJJH", - "chebi_id": "CHEBI:09823" - }, - "s1": { - "name": "Reactant2", - "id": "s1", - "vessel_id": "v0", - "meta_id": "METAID_S0", - "init_conc": 10.0, - "constant": false, - "boundary": false, - "unit": "mmole / l", - "ontology": "SBO:0000247", - "smiles": "[H]O[H]", - "inchi": "InChI:HJJH", - "chebi_id": "CHEBI:09823" - } - }, - "reactions": { - "r0": { - "name": "string", - "reversible": true, - "temperature": 200, - "temperature_unit": "K", - "ph": 7.0, - "ontology": "SBO:0000176", - "id": "r0", - "meta_id": "METAID_R0", - "model": { - "name": "Menten", - "equation": "s0 * x", - "parameters": [ - { - "name": "x", - "value": 10.0, - "unit": "1 / s", - "stdev": 0.1, - "initial_value": 10.0, - "upper": 11.0, - "lower": 9.0 - } - ] - }, - "educts": [ - { - "species_id": "s0", - "stoichiometry": 1.0, - "constant": false, - "ontology": "SBO:0000015" - } - ], - "products": [ - { - "species_id": "s1", - "stoichiometry": 1.0, - "constant": false, - "ontology": "SBO:0000011" - } - ], - "modifiers": [ - { - "species_id": "p0", - "stoichiometry": 1.0, - "constant": true, - "ontology": "SBO:0000013" - } - ] - } - }, - "measurements": { - "m0": { - "name": "SomeMeasurement", - "temperature": 4.0, - "temperature_unit": "K", - "ph": 7.0, - "species_dict": { - "reactants": { - "s0": { - "init_conc": 10.0, - "unit": "mmole / l", - "measurement_id": "m0", - "reactant_id": "s0", - "replicates": [ - { - "id": "repl_s0_0", - "species_id": "s0", - "data_type": "conc", - "data_unit": "mmole / l", - "time_unit": "s", - "time": [ - 1.0, - 2.0, - 3.0, - 4.0 - ], - "data": [ - 1.0, - 1.0, - 1.0, - 1.0 - ], - "is_calculated": false - } - ] - } - }, - "proteins": { - "p0": { - "init_conc": 10.0, - "unit": "mmole / l", - "measurement_id": "m0", - "protein_id": "p0", - "replicates": [ - { - "id": "repl_p0_0", - "species_id": "p0", - "data_type": "conc", - "data_unit": "mmole / l", - "time_unit": "s", - "time": [ - 1.0, - 2.0, - 3.0, - 4.0 - ], - "data": [ - 1.0, - 1.0, - 1.0, - 1.0 - ], - "is_calculated": false - } - ] - } - } - }, - "global_time": [ - 1.0, - 2.0, - 3.0, - 4.0 - ], - "global_time_unit": "s", - "id": "m0" - } - } -} \ No newline at end of file diff --git a/tests/fixtures/measurement_data_object.json b/tests/fixtures/measurement_data_object.json deleted file mode 100644 index 3f1d0c8..0000000 --- a/tests/fixtures/measurement_data_object.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "init_conc": 10.0, - "unit": "mmole / l", - "measurement_id": "m0", - "reactant_id": "s0", - "replicates": [ - { - "id": "repl_s0_0", - "species_id": "s0", - "data_type": "conc", - "data_unit": "mmole / l", - "time_unit": "s", - "time": [ - 1.0, - 2.0, - 3.0, - 4.0 - ], - "data": [ - 1.0, - 1.0, - 1.0, - 1.0 - ], - "is_calculated": false, - "uri": "URI", - "creator_id": "a0" - } - ] -} \ No newline at end of file diff --git a/tests/fixtures/measurement_object.json b/tests/fixtures/measurement_object.json deleted file mode 100644 index 98a30e4..0000000 --- a/tests/fixtures/measurement_object.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "name": "SomeMeasurement", - "temperature": 4.0, - "temperature_unit": "C", - "ph": 7.0, - "species_dict": { - "reactants": { - "s0": { - "init_conc": 10.0, - "unit": "mmole / l", - "measurement_id": "m0", - "reactant_id": "s0", - "replicates": [ - { - "id": "repl_s0_0", - "species_id": "s0", - "data_type": "conc", - "data_unit": "mmole / l", - "time_unit": "s", - "time": [ - 1.0, - 2.0, - 3.0, - 4.0 - ], - "data": [ - 1.0, - 1.0, - 1.0, - 1.0 - ], - "is_calculated": false, - "uri": "URI", - "creator_id": "a0" - } - ] - } - }, - "proteins": { - "p0": { - "init_conc": 10.0, - "unit": "mmole / l", - "measurement_id": "m0", - "protein_id": "p0", - "replicates": [ - { - "id": "repl_p0_0", - "species_id": "p0", - "data_type": "conc", - "data_unit": "mmole / l", - "time_unit": "s", - "time": [ - 1.0, - 2.0, - 3.0, - 4.0 - ], - "data": [ - 1.0, - 1.0, - 1.0, - 1.0 - ], - "is_calculated": false, - "uri": "URI", - "creator_id": "a0" - } - ] - } - } - }, - "global_time": [ - 1.0, - 2.0, - 3.0, - 4.0 - ], - "global_time_unit": "s", - "id": "m0", - "uri": "URI", - "creator_id": "a0" -} \ No newline at end of file diff --git a/tests/fixtures/reaction_object.json b/tests/fixtures/reaction_object.json deleted file mode 100644 index be32b0a..0000000 --- a/tests/fixtures/reaction_object.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "SomeReaction", - "reversible": true, - "temperature": 200, - "temperature_unit": "C", - "ph": 7.0, - "ontology": "SBO:0000176", - "id": "r0", - "meta_id": "METAID_R0", - "uri": "URI", - "creator_id": "a0", - "model": { - "name": "Menten", - "equation": "s0 * x", - "parameters": [ - { - "name": "x", - "value": 10.0, - "unit": "1 / s", - "stdev": 0.1, - "initial_value": 10.0 - } - ] - }, - "educts": [ - { - "species_id": "s0", - "stoichiometry": 1.0, - "constant": false, - "ontology": "SBO:0000015" - } - ], - "products": [ - { - "species_id": "s1", - "stoichiometry": 1.0, - "constant": false, - "ontology": "SBO:0000011" - } - ], - "modifiers": [ - { - "species_id": "p0", - "stoichiometry": 1.0, - "constant": true, - "ontology": "SBO:0000013" - } - ] -} diff --git a/tests/fixtures/replicate_object.json b/tests/fixtures/replicate_object.json deleted file mode 100644 index 4e995be..0000000 --- a/tests/fixtures/replicate_object.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "repl_s0_0", - "species_id": "s0", - "data_type": "conc", - "data_unit": "mmole / l", - "time_unit": "s", - "time": [ - 1.0, - 2.0, - 3.0, - 4.0 - ], - "data": [ - 1.0, - 1.0, - 1.0, - 1.0 - ], - "is_calculated": false, - "uri": "URI", - "creator_id": "a0" -} \ No newline at end of file diff --git a/tests/fixtures/template_result.json b/tests/fixtures/template_result.json deleted file mode 100644 index 86bffa7..0000000 --- a/tests/fixtures/template_result.json +++ /dev/null @@ -1,479 +0,0 @@ -{ - "name": "Pyruvate Decarboxylation", - "level": 3, - "version": 2, - "pubmedid": "https://identifiers.org/pubmed:pmid1234", - "url": "http://www.someurl.com", - "created": "2021-03-17 00:00:00", - "creators": { - "a0": { - "given_name": "Jan", - "family_name": "Range", - "mail": "jan.range@simtech.uni-stuttgart.de", - "id": "a0" - } - }, - "vessels": { - "v0": { - "name": "Eppendorf Tube", - "volume": 1000.0, - "unit": "ul", - "constant": true, - "meta_id": "METAID_V0", - "id": "v0" - } - }, - "proteins": { - "p0": { - "name": "Pyruvate decarboxylase isozyme 1", - "meta_id": "METAID_P0", - "id": "p0", - "vessel_id": "v0", - "constant": true, - "boundary": false, - "ontology": "SBO:0000252", - "sequence": "MSEITLGKYLFERLKQVNVNTVFGLPGDFNLSLLDKIYEVEGMRWAGNANELNAAYAADGYARIKGMSCIITTFGVGELSALNGIAGSYAEHVGVLHVVGVPSISAQAKQLLLHHTLGNGDFTVFHRMSANISETTAMITDIATAPAEIDRCIRTTYVTQRPVYLGLPANLVDLNVPAKLLQTPIDMSLKPNDAESEKEVIDTILALVKDAKNPVILADACCSRHDVKAETKKLIDLTQFPAFVTPMGKGSIDEQHPRYGGVYVGTLSKPEVKEAVESADLILSVGALLSDFNTGSFSYSYKTKNIVEFHSDHMKIRNATFPGVQMKFVLQKLLTTIADAAKGYKPVAVPARTPANAAVPASTPLKQEWMWNQLGNFLQEGDVVIAETGTSAFGINQTTFPNNTYGISQVLWGSIGFTTGATLGAAFAAEEIDPKKRVILFIGDGSLQLTVQEISTMIRWGLKPYLFVLNNDGYTIEKLIHGPKAQYNEIQGWDHLSLLPTFGAKDYETHRVATTGEWDKLTQDKSFNDNSKIRMIEIMLPVFDAPQNLVEQAKLTAATNAKQ", - "ecnumber": "4.1.1.1", - "organism": "Saccharomyces cerevisiae" - } - }, - "complexes": {}, - "reactants": { - "s0": { - "name": "Pyruvate", - "meta_id": "METAID_S0", - "id": "s0", - "vessel_id": "v0", - "constant": false, - "boundary": false, - "ontology": "SBO:0000247", - "smiles": "CC(=O)C(=O)[O-]", - "inchi": "InChI=1S/C3H4O3/c1-2(4)3(5)6/h1H3,(H,5,6)/p-1" - }, - "s1": { - "name": "Acetaldehyde", - "meta_id": "METAID_S1", - "id": "s1", - "vessel_id": "v0", - "constant": false, - "boundary": false, - "ontology": "SBO:0000247", - "smiles": "CC=O" - }, - "s2": { - "name": "CO2", - "meta_id": "METAID_S2", - "id": "s2", - "vessel_id": "v0", - "constant": false, - "boundary": false, - "ontology": "SBO:0000247", - "inchi": "InChI=1S/CO2/c2-1-3" - } - }, - "reactions": { - "r0": { - "name": "Pyruvate decarboxylation", - "reversible": true, - "temperature": 309.15, - "temperature_unit": "K", - "ph": 6.5, - "ontology": "SBO:0000176", - "meta_id": "METAID_R0", - "id": "r0", - "educts": [ - { - "species_id": "s0", - "stoichiometry": 1.0, - "constant": false, - "ontology": "SBO:0000015" - } - ], - "products": [ - { - "species_id": "s1", - "stoichiometry": 1.0, - "constant": false, - "ontology": "SBO:0000011" - }, - { - "species_id": "s2", - "stoichiometry": 1.0, - "constant": false, - "ontology": "SBO:0000011" - } - ], - "modifiers": [ - { - "species_id": "p0", - "stoichiometry": 1.0, - "constant": false, - "ontology": "SBO:0000013" - }, - { - "species_id": "s0", - "stoichiometry": 1.0, - "constant": false, - "ontology": "SBO:0000013" - } - ] - } - }, - "measurements": { - "m0": { - "name": "1.0", - "species_dict": { - "proteins": { - "p0": { - "init_conc": 100.0, - "unit": "umole / l", - "measurement_id": "m0", - "protein_id": "p0", - "replicates": [] - } - }, - "reactants": { - "s0": { - "init_conc": 1000.0, - "unit": "mmole / l", - "measurement_id": "m0", - "reactant_id": "s0", - "replicates": [ - { - "id": "replica_0_Pyruvate_1.0", - "species_id": "s0", - "measurement_id": "m0", - "data_type": "abs", - "data_unit": "mmole / l", - "time_unit": "sec", - "time": [ - 0.0, - 60.0, - 120.0, - 180.0, - 240.0, - 300.0, - 360.0, - 420.0, - 480.0, - 540.0 - ], - "data": [ - 0.1, - 0.0409737291, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - "is_calculated": false - }, - { - "id": "replica_1_Pyruvate_1.0", - "species_id": "s0", - "measurement_id": "m0", - "data_type": "conc", - "data_unit": "mmole / l", - "time_unit": "sec", - "time": [ - 0.0, - 60.0, - 120.0, - 180.0, - 240.0, - 300.0, - 360.0, - 420.0, - 480.0, - 540.0 - ], - "data": [ - 100.0, - 40.9737291, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - "is_calculated": false - } - ] - }, - "s2": { - "init_conc": 0.0, - "unit": "mmole / l", - "measurement_id": "m0", - "reactant_id": "s2", - "replicates": [] - }, - "s1": { - "init_conc": 0.0, - "unit": "mmole / l", - "measurement_id": "m0", - "reactant_id": "s1", - "replicates": [] - } - } - }, - "global_time": [ - 0.0, - 60.0, - 120.0, - 180.0, - 240.0, - 300.0, - 360.0, - 420.0, - 480.0, - 540.0 - ], - "global_time_unit": "sec", - "id": "m0" - }, - "m1": { - "name": "2.0", - "species_dict": { - "proteins": { - "p0": { - "init_conc": 100.0, - "unit": "umole / l", - "measurement_id": "m1", - "protein_id": "p0", - "replicates": [] - } - }, - "reactants": { - "s0": { - "init_conc": 1000.0, - "unit": "mmole / l", - "measurement_id": "m1", - "reactant_id": "s0", - "replicates": [ - { - "id": "replica_0_Pyruvate_2.0", - "species_id": "s0", - "measurement_id": "m1", - "data_type": "abs", - "data_unit": "mmole / l", - "time_unit": "sec", - "time": [ - 0.0, - 60.0, - 120.0, - 180.0, - 240.0, - 300.0, - 360.0, - 420.0, - 480.0, - 540.0 - ], - "data": [ - 1.0, - 0.9400679484, - 0.8801403665, - 0.8202178834, - 0.7603012714999999, - 0.7003914925, - 0.6404897662, - 0.5805976704, - 0.5207172976000001, - 0.4608515054 - ], - "is_calculated": false - }, - { - "id": "replica_1_Pyruvate_2.0", - "species_id": "s0", - "measurement_id": "m1", - "data_type": "conc", - "data_unit": "mmole / l", - "time_unit": "sec", - "time": [ - 0.0, - 60.0, - 120.0, - 180.0, - 240.0, - 300.0, - 360.0, - 420.0, - 480.0, - 540.0 - ], - "data": [ - 1000.0, - 940.0679484, - 880.1403665, - 820.2178834, - 760.3012715, - 700.3914925, - 640.4897662, - 580.5976704, - 520.7172976, - 460.8515054 - ], - "is_calculated": false - } - ] - }, - "s2": { - "init_conc": 0.0, - "unit": "mmole / l", - "measurement_id": "m1", - "reactant_id": "s2", - "replicates": [] - }, - "s1": { - "init_conc": 0.0, - "unit": "mmole / l", - "measurement_id": "m1", - "reactant_id": "s1", - "replicates": [] - } - } - }, - "global_time": [ - 0.0, - 60.0, - 120.0, - 180.0, - 240.0, - 300.0, - 360.0, - 420.0, - 480.0, - 540.0 - ], - "global_time_unit": "sec", - "id": "m1" - }, - "m2": { - "name": "3.0", - "species_dict": { - "proteins": { - "p0": { - "init_conc": 1.0, - "unit": "umole / l", - "measurement_id": "m2", - "protein_id": "p0", - "replicates": [] - } - }, - "reactants": { - "s0": { - "init_conc": 1000.0, - "unit": "mmole / l", - "measurement_id": "m2", - "reactant_id": "s0", - "replicates": [ - { - "id": "replica_0_Pyruvate_3.0", - "species_id": "s0", - "measurement_id": "m2", - "data_type": "abs", - "data_unit": "mmole / l", - "time_unit": "sec", - "time": [ - 0.0, - 60.0, - 120.0, - 180.0, - 240.0, - 300.0, - 360.0, - 420.0, - 480.0, - 540.0 - ], - "data": [ - 1.0, - 0.9400679484, - 0.8801403665, - 0.8202178834, - 0.7603012714999999, - 0.7003914925, - 0.6404897662, - 0.5805976704, - 0.5207172976000001, - 0.4608515054 - ], - "is_calculated": false - }, - { - "id": "replica_1_Pyruvate_3.0", - "species_id": "s0", - "measurement_id": "m2", - "data_type": "conc", - "data_unit": "mmole / l", - "time_unit": "sec", - "time": [ - 0.0, - 60.0, - 120.0, - 180.0, - 240.0, - 300.0, - 360.0, - 420.0, - 480.0, - 540.0 - ], - "data": [ - 1000.0, - 940.0679484, - 880.1403665, - 820.2178834, - 760.3012715, - 700.3914925, - 640.4897662, - 580.5976704, - 520.7172976, - 460.8515054 - ], - "is_calculated": false - } - ] - }, - "s2": { - "init_conc": 0.0, - "unit": "mmole / l", - "measurement_id": "m2", - "reactant_id": "s2", - "replicates": [] - }, - "s1": { - "init_conc": 0.0, - "unit": "mmole / l", - "measurement_id": "m2", - "reactant_id": "s1", - "replicates": [] - } - } - }, - "global_time": [ - 0.0, - 60.0, - 120.0, - 180.0, - 240.0, - 300.0, - 360.0, - 420.0, - 480.0, - 540.0 - ], - "global_time_unit": "sec", - "id": "m2" - } - }, - "global_parameters": {} -} \ No newline at end of file diff --git a/tests/fixtures/test_case.omex b/tests/fixtures/test_case.omex deleted file mode 100644 index 1f67bf2ca8424b112b4e2942fc9940e155d72bc5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5024 zcmeI0S5Q-1`^H0ufPjE>1f)v~gr=Z}-laoA??z>u1m8Av(p-`tKmS-3zMr{Tu=P&Q$)G0m#+LRo-xK${ ztm0lppP*56bv|is6Drz4W0i63BuTI7lo+Xdv1r@Y4<~TBJhkTU z2mpBPC?<1KL z?pV5-YH(R)y{<5PsBKIwQr}!RY8Mqh?SfjYjZB!hHWEkCRknJ_vry=(F;5c?eN`;d zm5J-Yo&dVjaI&&^uy>Q2<(%*AE*sI<(%6RG_M71isYI$2oi>Hlz1t|AaFX3VFK9IP z+Fjh6>>MlXh2#RPdm=Mg3dcj>y`2rk91J17ctW&Qx5w=Epyj4Uc_)Kz6zJUNIlCS! z(PrG~k1j1K>w5O08N__qeqLGQ+JqTyoZfduP1=}B&+n9mGbOxAeaWw;lMfpzd;|}Q z9LMA>8SPbKfLVYb17i%SftkRIp#7(G?Nm=!wW`SPae$OYZ4Ii46h9CjfQ(x#-%&h! z5zV&1BB*N8pkr-ZQ}%RbRf4m&vtxN~M&2YCPi%0;%*$EvXwvoePmw<_HGn;|If~Ws%w0R(_utR?R;XBRxiBTcpU5MSmjik1sK)Rq ztU#J@f$#w3_}A7GiSYniw&`-}MmZi!70>Y~uxeESVwr&V%Mft%dG}dtcgmPfF~QuX zqWRpDlvjvuZ|lv;zVXD^1f*NLK?N_j*%{8{ZGu_p38?HGo2ddoS>3&bQpg;I;GDE{ z`p|CV6y|QDnciG&cfJO-%Mwj*Zsn$qzYu@@L2L3bEg+$bn8GxFsk3wb6kX%N|Cdfx zQ3pqetWKch#ThX0fPxE;A*GX8ibIRI>$APN0RDMzVR;!?R%QE9QPUiaWe_ris6K?~ z!hYaMkkGf*UJ2$Rux=;bQk#R?Q*ReV#wPFq@|~Xnd$9CZu9(Zk{Awo$wi$U2=MJ)<4Y!`H$ml%%0ss|@}$AGyO6K>rf zBYvI_Gp{iW67`zr(Qqe8CcwX$T$p>OUcM?MS!of^-~(-4cazfqImd%huoBaN4SjM< z%a>y#=_aPp(EzPgTdsRXuGMeggcsil9nsdt@z-TDwzG5@ev1cgXiwl~S3{N_pr1(%#e+AN-blcmWQr2QKL3R^s$C13yL^!88K0_^qsDA^_ zhYwR0d|muvVJP-aSEf37!H0$FIXd&BTUF()G%4c8f@hICt-ZZmF4(%ovAwpb+uW%2 zO?o*67u(Gagvv6AnWekqwy~kSbVq4KE*FS_O&CAbFnUe&b_--S;(eO6atZyr;fEe4 z-bKx`+*>Q{?)-XvbH)mA1YQh=3>(h=Bi!wL)W*0v=?>Kk!Nm?Hyl1&`iSRM$%2fZ^ zh+Jt(xPHqKi6GmYZ!cT-_|gWFz?)xa_Vqx^2hhF~#TvmQI{)o)m~pBh2jZdLgh9^h zBW43n&|7yVrc)xVKQh3JcjH+gE&w3N0ss(SW`G0C!_&pxPXO*>U!8__FA<{(`*K2s zS(t&D$dEd_k2N)o^ycn-XHUm?-i;=SM3N@FVaMcanp;LQbijCOdu^;h7iH~6b5=6p zZM(RcnIWlvv3Ppj|Ekeg#||Z4Kc+oi9Wo!`U%1{KeKb1<^^0`SBt|v2V=e?3$D1t_ zM{1~p2?i!`ZCXJOHmCm*%I=fBsLWGO^aT&zxu<=1!XHtP#R;;`7YLNnW?SrO%6|6|8> za_Ft8u`?gP)4+vg(;SJ0AC`Q>4VZHYj!5VLT9DHW(zeP#Tq?4f@?B*WH*faK6Vt7C zbBM;N?<<35l2g>M$~lO|EMLJ;h&u`uMrm)T`H~|@;=L^?CC^^qK{4)KM(iyk3fL1o z75{s{4$9Pm~O|TY)q~nq(rQ+aKvC z&(dGf+4bGANNkJ)^w_)!tF%bll}hWgfm=rV-ISMMG693@0`%8#CW=QuuKbeMf}hoU zhy_n^k7QHmiyxn@#=5MM(MS2pZT>L6KZh}!!OYA6URAL2PAi8U4}MEU^LifZ`c4O* zwZikf5wOswl1HteBN?VsfQ_I0ZZOuaT$+sFak+wMFTuur^*~U{sRiG0D|A1&Vws?u z^)FhrKv34{eA+TW_AD46|3m&3*mkZdS7B7N{?#~b#YH%;AYzTs4vn;kS&O$9tyT%3j4634|lo}(DpB;URPoz*dR zE$7Dc;<$sxLu}=(GS#fopT7zBI;MSA-xjEO=aYz8c)qW01xSspv0N0T?<=l8qs#gw zpbQha;Ssw@q1K+oIsDaJvWHY%T7Ml97*f`V2QT1Qaik$rc`tvvUX^I~PJR1lQ`)y& zwI7kp-jNyPmbG*#2!euGj=jp539RR-OSlP`@#br#Drp>mb`r*pVmoiE3WpbH|y zNy&9^NaADGbqD`|s8HFqK!w#V#@t(Wk5)5#$Uh)Uq8htTx#%kXL|FkK* zvGrFJm-Ym@Tt98f#?sSL&m3M%CSDQbPRLQ=7gk3beVWRe9f zJzQ2M*CVNuVz;w*4+>^PDy-_g5kc9?*Jo)mCaHX^RcG6;ORIY<94RT+nX>Rm*aL2~ zF_d-do$zZytd08b8(FC(RQ18FfKxzFOEnS1B|p~@vOzHH&L{LH)`OYAfzdsTUS`F(=y#O!CE{6pc5d@%u6^d2 zoMytHT^RX~^TUd=Yum;1d7CLRr8^8FWb~zP&U3K8bdj|r0JEG-V7a~;wvlqRH%(-D z%CvSA%k*|463YU3Br5B@Gl6}TiU!qT*N+Q^b&V5g218qIR+1AMrjxqz_2^<*-R4)9 zR*I*nYoRm^Gef05m}7!J`-0bJ=Spq%s-uZ*``Bd)+(W4 zgh$+SD;!5&FS*{sNn8PlKZT!w?yjwZz2Z~)I(tediOxh*(kE9uDD-GlB~(<6(h&QR zwlq;6S>p?lPmj;u(lY27nHDx*IqI*=!creeQs2x6D?tljz!2<$3NEXFPchlnPT9MQ zDho-l?J_jkDwR49i|71v#zRbx5?xXp4Q=R`HmTZha$tXQA8_R0WA?Mvj3=JK{chL^ zlBE19Axt>i$F|ovT{N`Ck+OLV(fSSs!oKonhoRaS9=d)1oxvZ&C5+5T-#kK$7S9P? zHXj>8@HoyxdpKXCGjzVc6qcQJ@gqK9!t*g)FsqfEyddLa){}?)S+w89{72D*|0n1F zuAEKi&f4iOrM!4m&ftIKEacJ#A`kTm3@sqdN&vq`D$BP46qu&*3W`VhtH~&MD%jAh z`OP0V^9vNB3r}X70(_!YDoT5>5d77uYa%vDITS`I53`4A;FJUF!kK*0m`?P!Fkhpo zNeB`DOGm4xrJHTe)DJ74!>ANmBwTO$-YRc$KNiyZ9usqyhcRRN{Namny}ZjmKXB%=dmKzOlQ)LEE-`&^y%A-w z2~Tui73|ue;f%tX%jIrfl22zD=m_AJ+z8UECF{Wpx>;iVZ=|7+Hk z&M-S$kG}^Jog?=g+d<^`^E1t|4zU8TR2{gzYK^z*=e!#UPyn zp@2aTq3H*PWf4N+316`|9;xl{yA5!yEbexyJ>U8`)Ne<8Q?leZDekG8jj{%MxAkE9 zlcq+YVX*maxo*FYcXlN^**1H%>ozay8~Y1N6+9Md#(hPpZcxwbZb% z0f7I1YI9jFz@_H?@A-3vbCtb%+y4pu!{XxqareIpUd`WMU&@@hW(A_Ffs`j`ACEv~Y^fAyzL{$eYy{l@-nnpfGY2l*HKfb2K+?_+(H jy(-^dY$Ew3` - - - - - DOI - https://identifiers.org/pubmed:PubMedID - URL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - HLPMV - 1.1.1.1 - P02357 - E.coli - 27367 - - - - - - - s0 - p0 - - - - - - - InChI:HJJH - [H]O[H] - CHEBI:09823 - - - - - - - InChI:HJJH - [H]O[H] - CHEBI:09823 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - s0 - x - - - - - - - 10.0 - 11.0 - 9.0 - 0.1 - - - - - - - - - diff --git a/tests/test_tl_copasi.py b/tests/test_tl_copasi.py deleted file mode 100644 index ca35bf0..0000000 --- a/tests/test_tl_copasi.py +++ /dev/null @@ -1,73 +0,0 @@ -import unittest -import COPASI -import os - -from pyenzyme.thinlayers import ThinLayerCopasi - -this_dir = os.path.abspath(os.path.dirname(__file__)) -temp_dir = os.path.join(this_dir, 'tmp') -if not os.path.exists(temp_dir): - os.mkdir(temp_dir) - - -class TestTlCopasi(unittest.TestCase): - - example_file = os.path.join(this_dir, '..', 'examples', 'ThinLayers', 'COPASI', '3IZNOK_Simulated.omex') - - def test_copasi_version(self): - self.assertGreaterEqual(int(COPASI.CVersion.VERSION.getVersionDevel()), 214, "Need newer COPASI version") - - def test_example_file_exists(self): - self.assertTrue(os.path.exists(self.example_file)) - - def test_example(self): - thin_layer = ThinLayerCopasi(path=self.example_file, outdir=temp_dir) - self.assertEqual(thin_layer.reaction_data['r0'][0].parameters[0].name, 'k_cat') - self.assertEqual(thin_layer.reaction_data['r0'][0].parameters[0].value, 0.015) - self.assertEqual(thin_layer.reaction_data['r0'][0].parameters[1].name, 'k_m') - self.assertEqual(thin_layer.reaction_data['r0'][0].parameters[1].value, 0.01) - thin_layer.optimize() - new_doc = thin_layer.write() - - -class TestTlCopasiENO(unittest.TestCase): - example_file = os.path.join(this_dir, '..', 'examples', 'ThinLayers', 'COPASI', 'PGM-ENO.omex') - - def test_copasi_version(self): - self.assertGreaterEqual(int(COPASI.CVersion.VERSION.getVersionDevel()), 214, "Need newer COPASI version") - - def test_example_file_exists(self): - self.assertTrue(os.path.exists(self.example_file)) - - def test_example(self): - thin_layer = ThinLayerCopasi(path=self.example_file, outdir=temp_dir) - fit_items = thin_layer.get_fit_parameters() - initial_values = [val['start'] for val in fit_items] - result = thin_layer.optimize().reset_index().to_dict(orient='records') - new_values = [val['value'] for val in result] - self.assertNotEqual(initial_values, new_values) - - -class TestModel4(unittest.TestCase): - example_file = os.path.join(this_dir, '..', 'examples', 'ThinLayers', 'COPASI', 'Model_4.omex') - init_file = os.path.join(this_dir, '..', 'examples', 'ThinLayers', 'COPASI', 'Model_4_init.yaml') - - def test_copasi_version(self): - self.assertGreaterEqual(int(COPASI.CVersion.VERSION.getVersionDevel()), 214, "Need newer COPASI version") - - def test_example_file_exists(self): - self.assertTrue(os.path.exists(self.example_file)) - self.assertTrue(os.path.exists(self.init_file)) - - def test_example(self): - thin_layer = ThinLayerCopasi(path=self.example_file, outdir=temp_dir, init_file=self.init_file) - thin_layer.enzmldoc.toFile('test') - fit_items = thin_layer.get_fit_parameters() - initial_values = [val['start'] for val in fit_items] - thin_layer.task.setMethodType(COPASI.CTaskEnum.Method_LevenbergMarquardt) - thin_layer.optimize() - new_values = [val for val in thin_layer.problem.getSolutionVariables()] - self.assertNotEqual(initial_values, new_values) - new_doc = thin_layer.write() - new_doc.toFile('Test') - self.assertIsNotNone(new_doc) diff --git a/tests/thinlayers/__init__.py b/tests/thinlayers/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/write_test.omex b/tests/write_test.omex deleted file mode 100644 index 25b1ecf54572d47af5a41bb50b3e2596c74f81ce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4251 zcmeH~WmHt{-o{5|hLDhO2q|fX92y@$L8N1(1Yv+-oI#|!kw#E@Xrvn{>5y)amad0x zq@@p@bDs4aUF)3B?}vBqwLk2&*Kewm!%?_iMuZUb-t(ar%HsuF~yUw{C> zS1JI25C8z6oUBkbCgvy$J8ma)vuz!7)kTqeSA9kA_CKyQ_-2j(x@yqR)+efT zD$f-7EiM^lV=j+`Lq4|3&sgZ>xen62BN03972^*z-r~I|Q^+Z86=h|AP%YW-NYlGu zCo^6der|QW{Jr&(j0XRdEUQVQU3N$6o!PuI4-b#H=(OU2Ws=)>HhrVXld_6|_ruh+ zDx!~U&MlBEcIkIIC|TC=)dPBEcEnej?I{$BJ)&)5y(kocB*k(BjrY)V2Be7tk|C=i z*apxSAp{WlZNxU5ITvorVV~8kqmWj**^@d(Rie}zWa4ccV;o-A(sVBl!P1%Nc|4R9 z&s)WwMJn1qpv_aB!(~GyKCMq#x-926RSFn;zF&i&QfqEIy6_^l_Fu*F@On3v7c^QG zY3TKegk|-lK`%*M8~|KO_A@{+rK0PoX6h)vz5Hn0Y{?F7LIQLsT2d1b>9nIIR-F|JjBfp zyEtoyi6Lv4dI=eS0eT=RlWma6+XaQTw=IHWnTMoYOY zbWxxS#!d1)We_av!`zL6!)T$avEJ#FWL(nyIKAQaaWUrJk-I~#v0O8M=8@b|;ts=N z+rRw+2ALb(HtpEqqb8mH(fVy}Mta&4D51P-o%CV4wtwsnU41i=OT(-3MPX-1@iYJ= z1pI`5H*Jw@gOAi%=fiy*eWlD*sK>x-dY-$jMU?JeHs7thvtc6{E;HoEG&Mm zK?-C{-u(D^xD>Ox`zFdfnELv8CpQ^fZ$^nW_)6oh5T_VjDMQ?X7@o^=Wl0&>TpQ0f z>`BVo*&m4OmXZk$(?S1oPeN#Oe2!8!oaDDYP zr|g5!-S*LvsDf;|`?`zq1vW2Wb!XVcngn%Tg(Wubp>|QX=%HPW$?wk57WhqsrlmBa zRQv*A;;5^>_|tS`l(W9^6*yg6=4vkXOz*tDW11AqBWKsu{=TQFZLEk~#sl+OJx~$H zFXO^t?_BUAmRSW?i1R(UlR^sk15e*$1Hy~p$YM)ADaCEK+=1QqyiHooSny`wYyOqT zO|cvEBai6T`PIApM*Rk(0gJOAuw0DS9-s~cRKvz8*qFJy@@X$s@TQb~!ML`qrXYNB zt4{);Zsu$W=_+g&@$t{H zNR@HL@qB$^t8UL3#Wr@7IhAi=9*{7vO=o%#PouZw>u&pS4aF6w@Wk>9;Wvq`B2=rU z;$i|WlDEQ0el0-&w{nn6SK~cXt?)tDj(jDmEWg^gU{B`h6Zp`&nw{>KV7>m2bZ%=J zoZM=+XGkk5I}Lh<#?8;89m&84lhCS={-7VM7kEky-pPliGc^vT5q%>)^U(%@v|py0 z8a!&7v_I&Y;V0v^SkY8V@wj9wrKlN>?vxcbkw*)k@?1vjG_9`(3VX3HcP!=gIABnR z_Q9#2EBEae+L>&sh`2jiA-X!!Pg)BDQ(4_Df^#VJGNEb0Y}lXDNXM4hDytTYvA_x|-d8}Z}I3fFTRrP6w=3R3Bx(^ql55R&Igx$Kb<>334 z>e`-|0>jGE6Q5TEU;HbT=U&I;XtC$uJ@_tlb%*^CMYLB4;T0C_m!KcdCQtLg0swgE z0f4(VLI2vs*3Qz#ncK|LxI7kan=VA=zkAM6)iPzGM?X=OkiX+HY#mXvDbH8EZbw0> zV)jTbEy61D>I@G#OCQ9Tt=JsUcrjBtc zl&}--BGm500gjy}$jN%!kU384Hc#(*BQE(<<ej__n)c1UfV$A#O0pxgd&mL*{T!O>*YpEAQkGS_sYwO{8k6=V~~;j>O{w~#O_PEu&>8s*sX zNvRoba1Bpjik$n581y&y4dfu!XJEVn@4mPN_Bo2h$8M(%%j?PWNKc#a?=J{B`G$=5 zHs7534n1wPsR1Ec4QsC33Z9zbC^8lNp{L52#G(aCW#9?c!$Yse@SBP8xpxa_J2#zn z=%}XVy0PdyH-UT)%Uq$A(^yI&Y_%$I&KZlxCPIl;jK_L#eaouB%HGWv?i3Wn3z6Q~ zf~eSP_e2cyzAh4-d6tea)U~GqRiLsFyf8;@w8(?pbM-L$$T{-2Zo_ZKwWX&r3L6jy z+h4ye96NY@Xa|qVGg7X+-{cW~F`J$2eL%YviYBeLRN}zeYB~vMI@z2*XX_#L-X-#+ zo5y$Q>fp+gmry&g*uN}UI!AV$bVTfiGS59GIK9%|zua3o&t{st{vLgc>C9H8luZAS z$=~wy;Ee0-4uZPF+j6|z>TT8S%pD)v$|TSMu?jlC4GB|RQ2xU8J!>}FQQh)=Z7yBP zBJ@m_pAA zacnu_-ieY{q$Rh6M7x+Y;^|)MJv(k05zkz8+r{WUci*vw6Q@q7(^H>h`j{DDYeai2 z%U*QrHbyHjnIRV+8e&VaY?6ib57J0jHXDjH*;`x|tB?E6_q9W&M%(yn;|>{@`nk<} z&o**2n}xe`*IYx<&U%IV zZ&xFe_Ew)eYq5M1BM#n|7U3lorLwq`KgxvY%v?va z1d;w-!$NeC20@=x`h3A3F_Zxn(HjQ8#uV_|dOFEXJn`N&dZIob>JW2 zAAtHAax*ejKuM;s0to=WqRY!|k6dp70GK-f0R9bXjPQN1WSyBJB?I)KBgdD^m_HWW&U+BxVlt2)A=EC z=-6!`Md@xk3LJSd(dy3RlX0J2h$uTf5IL+C;BY_E4~oJmepyhb*} zajYaotO%uvq=>YHh?fgG59v`Tk?S*8=PRR>WTN&cNU#fO^;0(MRm2^ogJKu3@yR5^SCtAkDKp7*ZRz&dlX-zv3hd&+S$VVM6=db{&8tH( zX`T~}7c%6>Uj?hbbEJ|OXu93AcXth5O?)sF7XviNlp(7uJBi6m;&uYfJnECZJXm?0 zu6uAQS-V02Q@nMv_Wxd#Z#D;T6E^?8eyz>Fv%k+?KcRoI>o?W=KPIu?!Qa#HZ!iq+ zmu&nU{5=c*277M6zfAYja{r6`Y0$q(tD8{$i~N^ee`kL`HGi|@H@`Cfk23^Q1cH8k P1>M~GH(S9<^z-c>lyA9w From 5dad7336a3cc35a7af8cb7b2318b7694041332c0 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 22 Jun 2024 17:55:50 +0200 Subject: [PATCH 04/80] add migrated lib --- pyenzyme/equations/__init__.py | 2 + pyenzyme/equations/_chem.py | 167 +++ pyenzyme/equations/_math.py | 189 +++ pyenzyme/logging.py | 45 + pyenzyme/model.py | 2373 ++++++++++++++++++++++++++++++++ pyenzyme/rdf.py | 34 + pyenzyme/sbml/__init__.py | 3 + pyenzyme/sbml/mappings.toml | 31 + pyenzyme/sbml/serializer.py | 460 +++++++ pyenzyme/sbml/validation.py | 157 +++ pyenzyme/tabular.py | 323 +++++ pyenzyme/tools.py | 128 ++ pyenzyme/units/__init__.py | 1 + pyenzyme/units/ontomaps.toml | 40 + pyenzyme/units/predefined.py | 146 ++ pyenzyme/units/units.py | 367 +++++ pyenzyme/xmlutils.py | 78 ++ 17 files changed, 4544 insertions(+) create mode 100644 pyenzyme/equations/__init__.py create mode 100644 pyenzyme/equations/_chem.py create mode 100644 pyenzyme/equations/_math.py create mode 100644 pyenzyme/logging.py create mode 100644 pyenzyme/model.py create mode 100644 pyenzyme/rdf.py create mode 100644 pyenzyme/sbml/__init__.py create mode 100644 pyenzyme/sbml/mappings.toml create mode 100644 pyenzyme/sbml/serializer.py create mode 100644 pyenzyme/sbml/validation.py create mode 100644 pyenzyme/tabular.py create mode 100644 pyenzyme/tools.py create mode 100644 pyenzyme/units/__init__.py create mode 100644 pyenzyme/units/ontomaps.toml create mode 100644 pyenzyme/units/predefined.py create mode 100644 pyenzyme/units/units.py create mode 100644 pyenzyme/xmlutils.py diff --git a/pyenzyme/equations/__init__.py b/pyenzyme/equations/__init__.py new file mode 100644 index 0000000..21bae2f --- /dev/null +++ b/pyenzyme/equations/__init__.py @@ -0,0 +1,2 @@ +from ._math import build_equation, build_equations # noqa: F401 +from ._chem import build_reaction, build_reactions # noqa: F401 diff --git a/pyenzyme/equations/_chem.py b/pyenzyme/equations/_chem.py new file mode 100644 index 0000000..0c3b74d --- /dev/null +++ b/pyenzyme/equations/_chem.py @@ -0,0 +1,167 @@ +import re +from enum import Enum + +from pyenzyme.model import Equation, ReactionElement, Reaction + +ELEMENT_PATTERN = r"(\d*)\s?([A-Za-z\d]+)" + + +class EquationSide(Enum): + LEFT = -1 + RIGHT = 1 + + +class EqDirection(Enum): + """Enum for the type of reaction. + + Returns true if the reaction is reversible, false otherwise. + + Attributes: + IRREVERSIBLE: A reaction that only goes in one direction. + REVERSIBLE: A reaction that can go in both directions. + """ + + IRREVERSIBLE = False + REVERSIBLE = True + + +def build_reactions( + *equations: str, + modifiers: dict[str, list[str]] = {}, +) -> list[Reaction]: + """Builds a list of reaction objects from a list of string representations. + + Args: + *equations (list[str]): A list of string representations of the reactions + + Returns: + list[Reaction]: A list of reaction objects + + Example: + >> reactions("2A --> B", "A + B <=> C") + + Raises: + ValueError: If the reaction direction is not valid + AssertionError: If the species is not set + """ + + reactions = [ + build_reaction( + id=f"r{i}", + name=f"Reaction {i}", + scheme=equation, + ) # type: ignore + for i, equation in enumerate(equations, start=1) + ] + + for id, modifier in modifiers.items(): + try: + reaction = next(r for r in reactions if r.id == id) + except StopIteration: + raise ValueError(f"Reaction with id {id} not found in list of reactions") + + reaction.modifiers = modifier + + return reactions + + +def build_reaction( + name: str, + scheme: str, + id: str | None = None, + kinetic_law: Equation | None = None, + modifiers: list[str] = [], +): + """Builds a reaction object from a string representation. + + Args: + id (str): The id of the reaction + name (str): The name of the reaction + scheme (str): The equation of the reaction + modifiers (list[str], optional): A list of modifiers for the reaction. Defaults to []. + + Returns: + Reaction: A reaction object + + Example: + + >> reaction("R1", "Reaction 1", "2A --> B") # Irrversible reaction + >> reaction("R2", "Reaction 2", "A + B <=> C") # Reversible reaction + >> reaction("R2", "Reaction 2", "A + B <-> C") # Reversible reaction + + Raises: + ValueError: If the reaction direction is not valid + AssertionError: If the species is not set + + """ + + if not id: + id = name + + left, right, reversible = _extract_left_right(scheme) + + # Initialize and build the reaction object + reaction = Reaction( + name=name, + id=id, + reversible=reversible, + modifiers=modifiers, + ) + reaction.species += _extract_elements(left, EquationSide.LEFT) + reaction.species += _extract_elements(right, EquationSide.RIGHT) + + return reaction + + +def _extract_left_right(reaction: str) -> tuple[str, str, bool]: + """Extracts the left and right side of a reaction string. + + Args: + reaction (str): The reaction string + + Returns: + tuple[str, str, bool]: A tuple containing the left side, right side, and the reaction direction + """ + + if "->" in reaction: + direction = EqDirection.IRREVERSIBLE + sep = "->" + elif "<=>" in reaction: + direction = EqDirection.REVERSIBLE + sep = "<=>" + else: + raise ValueError( + "No valid reaction direction found in equation. Use ->, <->, or <=>." + ) + + left, right = reaction.split(sep, 1) + + return left.strip(), right.strip(), direction.value + + +def _extract_elements(side_string: str, side: EquationSide) -> list[ReactionElement]: + """Extracts the elements from a reaction string.""" + elements = [] + for element in side_string.split("+"): + element = re.search(ELEMENT_PATTERN, element.strip()) + stoich, species = element.groups() # type: ignore + + elements.append(_create_reaction_element(stoich, species, side)) + + return elements + + +def _create_reaction_element( + stoich: str | float, + species: str, + side: EquationSide, +) -> ReactionElement: + assert species, "Species must be set" + + if stoich == "": + stoich = 1.0 + + return ReactionElement( + stoichiometry=float(stoich) * side.value, + species_id=species, + ) diff --git a/pyenzyme/equations/_math.py b/pyenzyme/equations/_math.py new file mode 100644 index 0000000..ec7f723 --- /dev/null +++ b/pyenzyme/equations/_math.py @@ -0,0 +1,189 @@ +import re +import rich +from loguru import logger +from pyenzyme.logging import add_logger +from pyenzyme.model import ( + EnzymeMLDocument, + Equation, + EqVariable, + EqParameter, + EquationType, + UnitDefinition, +) +from sympy import sympify + +INIT_ASSIGNMENT_PATTERN = r"^[A-Za-z][A-Za-z\_]*" +DERIVATIVE_PATTERN = r"([A-Za-z0-9\_]+)\'\(t\)" +VARIABLE_PATTERN = r"([A-Za-z0-9\_]+)\'?\(t\)" +PARAMETER_PATTERN = r"([A-Za-z0-9\_]+)" +REPLACE_PATTERN = r"\(t\)|\'" +ELEMENTAL_FUNCTIONS = ["exp", "log", "sin", "cos", "tan", "sqrt", "abs"] + + +def build_equations( + *equations: str, + units: list[UnitDefinition], + enzmldoc: EnzymeMLDocument | None = None, + unit_mapping: dict[str, UnitDefinition] = {}, +) -> list[Equation]: + """Builds a list of Equation objects from a list of string representations. + + Args: + *equations (list[str]): A list of string representations of the ODEs + + Returns: + list[ODE]: A list of ODE objects + + Example: + >> build_equations("s1'(t) = 2 * s2(t)", "s2'(t) = 3 * s1(t)") + """ + + assert all(isinstance(eq, str) for eq in equations), "All equations must be strings" + assert all( + isinstance(unit, UnitDefinition) for unit in units + ), "All units must be UnitDefinition objects" + assert len(equations) == len( + units + ), "The number of equations must match the number of units" + + return [build_equation(eq, unit, enzmldoc) for eq, unit in zip(equations, units)] # type: ignore + + +def build_equation( + equation: str, + unit: UnitDefinition, + enzmldoc: EnzymeMLDocument | None = None, + unit_mapping: dict[str, UnitDefinition] = {}, +) -> Equation: + """Builds an equation object from a string + + This function takes an equation string and converts it into an ODE object. + The equation string should be in the form of "s1'(t) = 2 * s2(t)" where + there is a left and right side of the equation. + + Args: + equation (str): The equation to be converted into an ODE object + enzmldoc (EnzymeMLDocument): The EnzymeMLDocument used to transfer parameters to + + Returns: + ODE: The ODE object + + Example: + + >> eq = "s1'(t) = 2 * s2(t)" + >> ode = ode(eq) + + """ + + left, right = _extract_sides(equation) + variables = set(re.findall(VARIABLE_PATTERN, right)) + + if bool(re.match(DERIVATIVE_PATTERN, left)): + equation_type = EquationType.ODE + elif bool(re.match(VARIABLE_PATTERN, left)): + equation_type = EquationType.ASSIGNMENT + elif bool(re.match(INIT_ASSIGNMENT_PATTERN, left)): + equation_type = EquationType.INITIAL_ASSIGNMENT + elif left.strip() == "": + equation_type = EquationType.RATE_LAW + else: + rich.print( + "\n".join( + [ + "There are three types equations that follow a certain pattern:\n", + " [bold]1. ODE: y'(t) = 2 * x(t)[/bold]", + " [bold]2. Assignment: y(t) = 2 * x(t)[/bold]", + " [bold]3. Initial Assignment: y = 2 * x(t)[/bold]", + "\nPlease make sure your equation follows one of these patterns.\n", + ] + ) + ) + raise ValueError("Equation type not recognized") + + right = sympify(_clean_and_trim(right)) + left = _clean_and_trim(left) + parameters = {str(symbol) for symbol in right.free_symbols} - variables + + if equation_type == EquationType.ASSIGNMENT: + parameters = parameters.union({left}) + + eq = Equation( + species_id=left, + equation=str(right), + variables=[_create_variable(name) for name in variables], + parameters=[_create_parameter(name) for name in parameters], + equation_type=equation_type, + unit=unit, + ) + + if enzmldoc: + [_add_to_parameters(enzmldoc, param.name, param.id) for param in eq.parameters] + _add_units_to_parameters(enzmldoc, unit_mapping) + + return eq + + +def _extract_sides(equation: str) -> tuple[str, str]: + left, right, *_ = equation.split("=") + + if right == "": + raise ValueError("Equation must contain a right-hand side") + if left == "": + raise ValueError("Equation must contain a left-hand side") + + return left, right + + +def _clean_and_trim(eq: str) -> str: + vars = re.findall(VARIABLE_PATTERN, eq) + for var in vars: + var = var.replace("'", "") + if var not in ELEMENTAL_FUNCTIONS: + eq = re.sub(rf"{var}\'?\(t\)", var, eq) + + return eq.strip() + + +def _create_parameter(name: str) -> EqParameter: + return EqParameter(id=name, name=name, symbol=name) + + +def _create_variable(name: str) -> EqVariable: + return EqVariable(id=name, name=name, symbol=name) + + +def _add_to_parameters(enzmldoc: EnzymeMLDocument, name: str, id: str): + """Adds a parameter to the EnzymeMLDocument""" + + add_logger("ENZML") + + if enzmldoc.filter_parameters(name=name): + logger.info(f"Parameter {name} already exists in EnzymeMLDocument. Skipping...") + + return + + enzmldoc.add_to_parameters(name=name, id=name) # type: ignore + + +def _add_units_to_parameters( + doc: EnzymeMLDocument, + unit_mapping: dict[str, UnitDefinition], +): + """Adds units to the parameters in the EnzymeMLDocument""" + + add_logger("ENZML") + + has_error = False + + for param, unit in unit_mapping.items(): + if unit.__class__.__name__ != "UnitDefinition": + logger.error(f"Unit {unit} is not a UnitDefinition object. Skipping...") + has_error = True + continue + + doc.filter_parameters(name=param)[0].unit = unit + + if has_error: + raise ValueError( + "Assigning units to parameters failed. Check the logs for more info." + ) diff --git a/pyenzyme/logging.py b/pyenzyme/logging.py new file mode 100644 index 0000000..781ef20 --- /dev/null +++ b/pyenzyme/logging.py @@ -0,0 +1,45 @@ +import sys +from loguru import logger + + +def add_logger( + name: str, + channel=sys.stderr, +) -> None: + """Initialize the logger with the given name and module. + + Args: + name (str): The name of the logger. + channel (str, optional): The channel to log to. Defaults to sys.stderr. + + Returns: + None + + Example: + Will create a logger with the name "SBML" and log to the file "file.log": + + >> add_logger("SBML", "test", "file.log") + + Will create a logger with the name "SBML" and log to the standard error channel: + + >> add_logger("SBML", "test") + + Will create a logger with the name "SBML" and log to the standard output channel: + + >> import sys + >> add_logger("SBML", "test", sys.stdout) + + """ + format = ( + " %s\t{module: >10}\t{level}: {message}" % name + ) + + if isinstance(channel, str): + format = "{time:YYYY-MM-DD HH:mm:ss} %s {level}: {message}" % name + + logger.remove() + logger.add( + channel, + colorize=True, + format=format, + ) diff --git a/pyenzyme/model.py b/pyenzyme/model.py new file mode 100644 index 0000000..a255378 --- /dev/null +++ b/pyenzyme/model.py @@ -0,0 +1,2373 @@ +## This is a generated file. Do not modify it manually! + +from __future__ import annotations +from pydantic import BaseModel, Field, ConfigDict +from typing import Optional, Generic, TypeVar +from enum import Enum +from uuid import uuid4 + +# Filter Wrapper definition used to filter a list of objects +# based on their attributes +Cls = TypeVar("Cls") + +class FilterWrapper(Generic[Cls]): + """Wrapper class to filter a list of objects based on their attributes""" + + def __init__(self, collection: list[Cls], **kwargs): + self.collection = collection + self.kwargs = kwargs + + def filter(self) -> list[Cls]: + for key, value in self.kwargs.items(): + self.collection = [ + item for item in self.collection if self._fetch_attr(key, item) == value + ] + return self.collection + + def _fetch_attr(self, name: str, item: Cls): + try: + return getattr(item, name) + except AttributeError: + raise AttributeError(f"{item} does not have attribute {name}") + + +# JSON-LD Helper Functions +def add_namespace(obj, prefix: str | None, iri: str | None): + """Adds a namespace to the JSON-LD context + + Args: + prefix (str): The prefix to add + iri (str): The IRI to add + """ + if prefix is None and iri is None: + return + elif prefix and iri is None: + raise ValueError("If prefix is provided, iri must also be provided") + elif iri and prefix is None: + raise ValueError("If iri is provided, prefix must also be provided") + + obj.ld_context[prefix] = iri # type: ignore + +def validate_prefix(term: str | dict, prefix: str): + """Validates that a term is prefixed with a given prefix + + Args: + term (str): The term to validate + prefix (str): The prefix to validate against + + Returns: + bool: True if the term is prefixed with the prefix, False otherwise + """ + + if isinstance(term, dict) and not term["@id"].startswith(prefix + ":"): + raise ValueError(f"Term {term} is not prefixed with {prefix}") + elif isinstance(term, str) and not term.startswith(prefix + ":"): + raise ValueError(f"Term {term} is not prefixed with {prefix}") + +# Model Definitions + +class EnzymeMLDocument(BaseModel): + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + + name: str + references: list[str] = Field(default_factory=list) + created: Optional[str] = Field(default=None) + modified: Optional[str] = Field(default=None) + creators: list[Creator] = Field(default_factory=list) + vessels: list[Vessel] = Field(default_factory=list) + proteins: list[Protein] = Field(default_factory=list) + complexes: list[Complex] = Field(default_factory=list) + small_molecules: list[SmallMolecule] = Field(default_factory=list) + reactions: list[Reaction] = Field(default_factory=list) + measurements: list[Measurement] = Field(default_factory=list) + equations: list[Equation] = Field(default_factory=list) + parameters: list[Parameter] = Field(default_factory=list) + + # JSON-LD fields + ld_id: str = Field( + alias="@id", + default_factory=lambda: "enzml:EnzymeMLDocument/" + str(uuid4()) + ) + ld_type: list[str] = Field( + alias="@type", + default_factory = lambda: [ + "enzml:EnzymeMLDocument", + ], + ) + ld_context: dict[str, str | dict] = Field( + alias="@context", + default_factory = lambda: { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "name": "schema:title", + "references": { + "@id": "schema:citation", + "@type": "@id", + }, + "created": "schema:dateCreated", + "modified": "schema:dateModified", + "creators": "schema:creator", + } + ) + + def filter_creators(self, **kwargs) -> list[Creator]: + """Filters the creators attribute based on the given kwargs + + Args: + **kwargs: The attributes to filter by. + + Returns: + list[Creator]: The filtered list of Creator objects + """ + + return FilterWrapper[Creator](self.creators, **kwargs).filter() + + def filter_vessels(self, **kwargs) -> list[Vessel]: + """Filters the vessels attribute based on the given kwargs + + Args: + **kwargs: The attributes to filter by. + + Returns: + list[Vessel]: The filtered list of Vessel objects + """ + + return FilterWrapper[Vessel](self.vessels, **kwargs).filter() + + def filter_proteins(self, **kwargs) -> list[Protein]: + """Filters the proteins attribute based on the given kwargs + + Args: + **kwargs: The attributes to filter by. + + Returns: + list[Protein]: The filtered list of Protein objects + """ + + return FilterWrapper[Protein](self.proteins, **kwargs).filter() + + def filter_complexes(self, **kwargs) -> list[Complex]: + """Filters the complexes attribute based on the given kwargs + + Args: + **kwargs: The attributes to filter by. + + Returns: + list[Complex]: The filtered list of Complex objects + """ + + return FilterWrapper[Complex](self.complexes, **kwargs).filter() + + def filter_small_molecules(self, **kwargs) -> list[SmallMolecule]: + """Filters the small_molecules attribute based on the given kwargs + + Args: + **kwargs: The attributes to filter by. + + Returns: + list[SmallMolecule]: The filtered list of SmallMolecule objects + """ + + return FilterWrapper[SmallMolecule](self.small_molecules, **kwargs).filter() + + def filter_reactions(self, **kwargs) -> list[Reaction]: + """Filters the reactions attribute based on the given kwargs + + Args: + **kwargs: The attributes to filter by. + + Returns: + list[Reaction]: The filtered list of Reaction objects + """ + + return FilterWrapper[Reaction](self.reactions, **kwargs).filter() + + def filter_measurements(self, **kwargs) -> list[Measurement]: + """Filters the measurements attribute based on the given kwargs + + Args: + **kwargs: The attributes to filter by. + + Returns: + list[Measurement]: The filtered list of Measurement objects + """ + + return FilterWrapper[Measurement](self.measurements, **kwargs).filter() + + def filter_equations(self, **kwargs) -> list[Equation]: + """Filters the equations attribute based on the given kwargs + + Args: + **kwargs: The attributes to filter by. + + Returns: + list[Equation]: The filtered list of Equation objects + """ + + return FilterWrapper[Equation](self.equations, **kwargs).filter() + + def filter_parameters(self, **kwargs) -> list[Parameter]: + """Filters the parameters attribute based on the given kwargs + + Args: + **kwargs: The attributes to filter by. + + Returns: + list[Parameter]: The filtered list of Parameter objects + """ + + return FilterWrapper[Parameter](self.parameters, **kwargs).filter() + + + def set_attr_term( + self, + attr: str, + term: str | dict, + prefix: str | None = None, + iri: str | None = None + ): + """Sets the term for a given attribute in the JSON-LD object + + Example: + # Using an IRI term + >> obj.set_attr_term("name", "http://schema.org/givenName") + + # Using a prefix and term + >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") + + # Using a dictionary term + >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) + + Args: + attr (str): The attribute to set the term for + term (str | dict): The term to set for the attribute + + Raises: + AssertionError: If the attribute is not found in the model + """ + + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_context[attr] = term + + def add_type_term( + self, + term: str, + prefix: str | None = None, + iri: str | None = None + ): + """Adds a term to the @type field of the JSON-LD object + + Example: + # Using a term + >> obj.add_type_term("https://schema.org/Person") + + # Using a prefixed term + >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") + + Args: + term (str): The term to add to the @type field + prefix (str, optional): The prefix to use for the term. Defaults to None. + iri (str, optional): The IRI to use for the term prefix. Defaults to None. + + Raises: + ValueError: If prefix is provided but iri is not + ValueError: If iri is provided but prefix is not + """ + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_type.append(term) + + + def add_to_creators( + self, + given_name: str, + family_name: str, + mail: str, + **kwargs, + ): + params = { + "given_name": given_name, + "family_name": family_name, + "mail": mail + } + + if "id" in kwargs: + params["id"] = kwargs["id"] + + self.creators.append( + Creator(**params) + ) + + return self.creators[-1] + + + def add_to_vessels( + self, + id: str, + name: str, + volume: float, + unit: UnitDefinition, + constant: bool= True, + **kwargs, + ): + params = { + "id": id, + "name": name, + "volume": volume, + "unit": unit, + "constant": constant + } + + if "id" in kwargs: + params["id"] = kwargs["id"] + + self.vessels.append( + Vessel(**params) + ) + + return self.vessels[-1] + + + def add_to_proteins( + self, + id: str, + name: str, + constant: bool= False, + sequence: Optional[str]= None, + vessel_id: Optional[str]= None, + ecnumber: Optional[str]= None, + organism: Optional[str]= None, + organism_tax_id: Optional[str]= None, + references: list[str]= [], + **kwargs, + ): + params = { + "id": id, + "name": name, + "constant": constant, + "sequence": sequence, + "vessel_id": vessel_id, + "ecnumber": ecnumber, + "organism": organism, + "organism_tax_id": organism_tax_id, + "references": references + } + + if "id" in kwargs: + params["id"] = kwargs["id"] + + self.proteins.append( + Protein(**params) + ) + + return self.proteins[-1] + + + def add_to_complexes( + self, + id: str, + participants: list[str]= [], + **kwargs, + ): + params = { + "id": id, + "participants": participants + } + + if "id" in kwargs: + params["id"] = kwargs["id"] + + self.complexes.append( + Complex(**params) + ) + + return self.complexes[-1] + + + def add_to_small_molecules( + self, + id: str, + name: str, + constant: bool= False, + vessel_id: Optional[str]= None, + canonical_smiles: Optional[str]= None, + inchikey: Optional[str]= None, + references: list[str]= [], + **kwargs, + ): + params = { + "id": id, + "name": name, + "constant": constant, + "vessel_id": vessel_id, + "canonical_smiles": canonical_smiles, + "inchikey": inchikey, + "references": references + } + + if "id" in kwargs: + params["id"] = kwargs["id"] + + self.small_molecules.append( + SmallMolecule(**params) + ) + + return self.small_molecules[-1] + + + def add_to_reactions( + self, + id: str, + name: str, + reversible: bool= False, + kinetic_law: Optional[Equation]= None, + species: list[ReactionElement]= [], + modifiers: list[str]= [], + **kwargs, + ): + params = { + "id": id, + "name": name, + "reversible": reversible, + "kinetic_law": kinetic_law, + "species": species, + "modifiers": modifiers + } + + if "id" in kwargs: + params["id"] = kwargs["id"] + + self.reactions.append( + Reaction(**params) + ) + + return self.reactions[-1] + + + def add_to_measurements( + self, + id: str, + name: str, + species: list[MeasurementData]= [], + group_id: Optional[str]= None, + ph: Optional[float]= None, + temperature: Optional[float]= None, + temperature_unit: Optional[UnitDefinition]= None, + **kwargs, + ): + params = { + "id": id, + "name": name, + "species": species, + "group_id": group_id, + "ph": ph, + "temperature": temperature, + "temperature_unit": temperature_unit + } + + if "id" in kwargs: + params["id"] = kwargs["id"] + + self.measurements.append( + Measurement(**params) + ) + + return self.measurements[-1] + + + def add_to_equations( + self, + unit: UnitDefinition, + equation_type: EquationType, + equation: str, + species_id: Optional[str]= None, + id: Optional[str]= None, + variables: list[EqVariable]= [], + parameters: list[EqParameter]= [], + **kwargs, + ): + params = { + "unit": unit, + "equation_type": equation_type, + "equation": equation, + "species_id": species_id, + "id": id, + "variables": variables, + "parameters": parameters + } + + if "id" in kwargs: + params["id"] = kwargs["id"] + + self.equations.append( + Equation(**params) + ) + + return self.equations[-1] + + + def add_to_parameters( + self, + id: str, + name: str, + value: Optional[float]= None, + unit: Optional[UnitDefinition]= None, + initial_value: Optional[float]= None, + upper: Optional[float]= None, + lower: Optional[float]= None, + stderr: Optional[float]= None, + constant: Optional[bool]= True, + **kwargs, + ): + params = { + "id": id, + "name": name, + "value": value, + "unit": unit, + "initial_value": initial_value, + "upper": upper, + "lower": lower, + "stderr": stderr, + "constant": constant + } + + if "id" in kwargs: + params["id"] = kwargs["id"] + + self.parameters.append( + Parameter(**params) + ) + + return self.parameters[-1] + +class Creator(BaseModel): + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + + given_name: str + family_name: str + mail: str + + # JSON-LD fields + ld_id: str = Field( + alias="@id", + default_factory=lambda: "enzml:Creator/" + str(uuid4()) + ) + ld_type: list[str] = Field( + alias="@type", + default_factory = lambda: [ + "enzml:Creator","schema:person" + ], + ) + ld_context: dict[str, str | dict] = Field( + alias="@context", + default_factory = lambda: { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "given_name": "schema:givenName", + "family_name": "schema:familyName", + "mail": "schema:email", + } + ) + + + def set_attr_term( + self, + attr: str, + term: str | dict, + prefix: str | None = None, + iri: str | None = None + ): + """Sets the term for a given attribute in the JSON-LD object + + Example: + # Using an IRI term + >> obj.set_attr_term("name", "http://schema.org/givenName") + + # Using a prefix and term + >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") + + # Using a dictionary term + >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) + + Args: + attr (str): The attribute to set the term for + term (str | dict): The term to set for the attribute + + Raises: + AssertionError: If the attribute is not found in the model + """ + + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_context[attr] = term + + def add_type_term( + self, + term: str, + prefix: str | None = None, + iri: str | None = None + ): + """Adds a term to the @type field of the JSON-LD object + + Example: + # Using a term + >> obj.add_type_term("https://schema.org/Person") + + # Using a prefixed term + >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") + + Args: + term (str): The term to add to the @type field + prefix (str, optional): The prefix to use for the term. Defaults to None. + iri (str, optional): The IRI to use for the term prefix. Defaults to None. + + Raises: + ValueError: If prefix is provided but iri is not + ValueError: If iri is provided but prefix is not + """ + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_type.append(term) + + +class Vessel(BaseModel): + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + + id: str + name: str + volume: float + unit: UnitDefinition + constant: bool = True + + # JSON-LD fields + ld_id: str = Field( + alias="@id", + default_factory=lambda: "enzml:Vessel/" + str(uuid4()) + ) + ld_type: list[str] = Field( + alias="@type", + default_factory = lambda: [ + "enzml:Vessel","OBO:OBI_0400081" + ], + ) + ld_context: dict[str, str | dict] = Field( + alias="@context", + default_factory = lambda: { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id", + }, + "name": "schema:name", + "volume": "OBO:OBI_0002139", + } + ) + + + def set_attr_term( + self, + attr: str, + term: str | dict, + prefix: str | None = None, + iri: str | None = None + ): + """Sets the term for a given attribute in the JSON-LD object + + Example: + # Using an IRI term + >> obj.set_attr_term("name", "http://schema.org/givenName") + + # Using a prefix and term + >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") + + # Using a dictionary term + >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) + + Args: + attr (str): The attribute to set the term for + term (str | dict): The term to set for the attribute + + Raises: + AssertionError: If the attribute is not found in the model + """ + + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_context[attr] = term + + def add_type_term( + self, + term: str, + prefix: str | None = None, + iri: str | None = None + ): + """Adds a term to the @type field of the JSON-LD object + + Example: + # Using a term + >> obj.add_type_term("https://schema.org/Person") + + # Using a prefixed term + >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") + + Args: + term (str): The term to add to the @type field + prefix (str, optional): The prefix to use for the term. Defaults to None. + iri (str, optional): The IRI to use for the term prefix. Defaults to None. + + Raises: + ValueError: If prefix is provided but iri is not + ValueError: If iri is provided but prefix is not + """ + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_type.append(term) + + +class Protein(BaseModel): + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + + id: str + name: str + constant: bool = False + sequence: Optional[str] = Field(default=None) + vessel_id: Optional[str] = Field(default=None) + ecnumber: Optional[str] = Field(default=None) + organism: Optional[str] = Field(default=None) + organism_tax_id: Optional[str] = Field(default=None) + references: list[str] = Field(default_factory=list) + + # JSON-LD fields + ld_id: str = Field( + alias="@id", + default_factory=lambda: "enzml:Protein/" + str(uuid4()) + ) + ld_type: list[str] = Field( + alias="@type", + default_factory = lambda: [ + "enzml:Protein","schema:Protein" + ], + ) + ld_context: dict[str, str | dict] = Field( + alias="@context", + default_factory = lambda: { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@type": "@id", + }, + "name": "schema:name", + "sequence": "OBO:GSSO_007262", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id", + }, + "organism": "OBO:OBI_0100026", + "organism_tax_id": { + "@type": "@id", + }, + "references": { + "@id": "schema:citation", + "@type": "@id", + }, + } + ) + + + def set_attr_term( + self, + attr: str, + term: str | dict, + prefix: str | None = None, + iri: str | None = None + ): + """Sets the term for a given attribute in the JSON-LD object + + Example: + # Using an IRI term + >> obj.set_attr_term("name", "http://schema.org/givenName") + + # Using a prefix and term + >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") + + # Using a dictionary term + >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) + + Args: + attr (str): The attribute to set the term for + term (str | dict): The term to set for the attribute + + Raises: + AssertionError: If the attribute is not found in the model + """ + + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_context[attr] = term + + def add_type_term( + self, + term: str, + prefix: str | None = None, + iri: str | None = None + ): + """Adds a term to the @type field of the JSON-LD object + + Example: + # Using a term + >> obj.add_type_term("https://schema.org/Person") + + # Using a prefixed term + >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") + + Args: + term (str): The term to add to the @type field + prefix (str, optional): The prefix to use for the term. Defaults to None. + iri (str, optional): The IRI to use for the term prefix. Defaults to None. + + Raises: + ValueError: If prefix is provided but iri is not + ValueError: If iri is provided but prefix is not + """ + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_type.append(term) + + +class Complex(BaseModel): + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + + id: str + participants: list[str] = Field(default_factory=list) + + # JSON-LD fields + ld_id: str = Field( + alias="@id", + default_factory=lambda: "enzml:Complex/" + str(uuid4()) + ) + ld_type: list[str] = Field( + alias="@type", + default_factory = lambda: [ + "enzml:Complex", + ], + ) + ld_context: dict[str, str | dict] = Field( + alias="@context", + default_factory = lambda: { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id", + }, + "participants": { + "@type": "@id", + }, + } + ) + + + def set_attr_term( + self, + attr: str, + term: str | dict, + prefix: str | None = None, + iri: str | None = None + ): + """Sets the term for a given attribute in the JSON-LD object + + Example: + # Using an IRI term + >> obj.set_attr_term("name", "http://schema.org/givenName") + + # Using a prefix and term + >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") + + # Using a dictionary term + >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) + + Args: + attr (str): The attribute to set the term for + term (str | dict): The term to set for the attribute + + Raises: + AssertionError: If the attribute is not found in the model + """ + + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_context[attr] = term + + def add_type_term( + self, + term: str, + prefix: str | None = None, + iri: str | None = None + ): + """Adds a term to the @type field of the JSON-LD object + + Example: + # Using a term + >> obj.add_type_term("https://schema.org/Person") + + # Using a prefixed term + >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") + + Args: + term (str): The term to add to the @type field + prefix (str, optional): The prefix to use for the term. Defaults to None. + iri (str, optional): The IRI to use for the term prefix. Defaults to None. + + Raises: + ValueError: If prefix is provided but iri is not + ValueError: If iri is provided but prefix is not + """ + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_type.append(term) + + +class SmallMolecule(BaseModel): + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + + id: str + name: str + constant: bool = False + vessel_id: Optional[str] = Field(default=None) + canonical_smiles: Optional[str] = Field(default=None) + inchikey: Optional[str] = Field(default=None) + references: list[str] = Field(default_factory=list) + + # JSON-LD fields + ld_id: str = Field( + alias="@id", + default_factory=lambda: "enzml:SmallMolecule/" + str(uuid4()) + ) + ld_type: list[str] = Field( + alias="@type", + default_factory = lambda: [ + "enzml:SmallMolecule", + ], + ) + ld_context: dict[str, str | dict] = Field( + alias="@context", + default_factory = lambda: { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id", + }, + "name": "schema:name", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id", + }, + "references": { + "@id": "schema:citation", + "@type": "@id", + }, + } + ) + + + def set_attr_term( + self, + attr: str, + term: str | dict, + prefix: str | None = None, + iri: str | None = None + ): + """Sets the term for a given attribute in the JSON-LD object + + Example: + # Using an IRI term + >> obj.set_attr_term("name", "http://schema.org/givenName") + + # Using a prefix and term + >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") + + # Using a dictionary term + >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) + + Args: + attr (str): The attribute to set the term for + term (str | dict): The term to set for the attribute + + Raises: + AssertionError: If the attribute is not found in the model + """ + + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_context[attr] = term + + def add_type_term( + self, + term: str, + prefix: str | None = None, + iri: str | None = None + ): + """Adds a term to the @type field of the JSON-LD object + + Example: + # Using a term + >> obj.add_type_term("https://schema.org/Person") + + # Using a prefixed term + >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") + + Args: + term (str): The term to add to the @type field + prefix (str, optional): The prefix to use for the term. Defaults to None. + iri (str, optional): The IRI to use for the term prefix. Defaults to None. + + Raises: + ValueError: If prefix is provided but iri is not + ValueError: If iri is provided but prefix is not + """ + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_type.append(term) + + +class Reaction(BaseModel): + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + + id: str + name: str + reversible: bool = False + kinetic_law: Optional[Equation] = Field(default=None) + species: list[ReactionElement] = Field(default_factory=list) + modifiers: list[str] = Field(default_factory=list) + + # JSON-LD fields + ld_id: str = Field( + alias="@id", + default_factory=lambda: "enzml:Reaction/" + str(uuid4()) + ) + ld_type: list[str] = Field( + alias="@type", + default_factory = lambda: [ + "enzml:Reaction", + ], + ) + ld_context: dict[str, str | dict] = Field( + alias="@context", + default_factory = lambda: { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id", + }, + "modifiers": { + "@type": "@id", + }, + } + ) + + def filter_species(self, **kwargs) -> list[ReactionElement]: + """Filters the species attribute based on the given kwargs + + Args: + **kwargs: The attributes to filter by. + + Returns: + list[ReactionElement]: The filtered list of ReactionElement objects + """ + + return FilterWrapper[ReactionElement](self.species, **kwargs).filter() + + + def set_attr_term( + self, + attr: str, + term: str | dict, + prefix: str | None = None, + iri: str | None = None + ): + """Sets the term for a given attribute in the JSON-LD object + + Example: + # Using an IRI term + >> obj.set_attr_term("name", "http://schema.org/givenName") + + # Using a prefix and term + >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") + + # Using a dictionary term + >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) + + Args: + attr (str): The attribute to set the term for + term (str | dict): The term to set for the attribute + + Raises: + AssertionError: If the attribute is not found in the model + """ + + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_context[attr] = term + + def add_type_term( + self, + term: str, + prefix: str | None = None, + iri: str | None = None + ): + """Adds a term to the @type field of the JSON-LD object + + Example: + # Using a term + >> obj.add_type_term("https://schema.org/Person") + + # Using a prefixed term + >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") + + Args: + term (str): The term to add to the @type field + prefix (str, optional): The prefix to use for the term. Defaults to None. + iri (str, optional): The IRI to use for the term prefix. Defaults to None. + + Raises: + ValueError: If prefix is provided but iri is not + ValueError: If iri is provided but prefix is not + """ + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_type.append(term) + + + def add_to_species( + self, + species_id: str, + stoichiometry: float, + **kwargs, + ): + params = { + "species_id": species_id, + "stoichiometry": stoichiometry + } + + if "id" in kwargs: + params["id"] = kwargs["id"] + + self.species.append( + ReactionElement(**params) + ) + + return self.species[-1] + + +class ReactionElement(BaseModel): + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + + species_id: str + stoichiometry: float + + # JSON-LD fields + ld_id: str = Field( + alias="@id", + default_factory=lambda: "enzml:ReactionElement/" + str(uuid4()) + ) + ld_type: list[str] = Field( + alias="@type", + default_factory = lambda: [ + "enzml:ReactionElement", + ], + ) + ld_context: dict[str, str | dict] = Field( + alias="@context", + default_factory = lambda: { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id", + }, + } + ) + + + def set_attr_term( + self, + attr: str, + term: str | dict, + prefix: str | None = None, + iri: str | None = None + ): + """Sets the term for a given attribute in the JSON-LD object + + Example: + # Using an IRI term + >> obj.set_attr_term("name", "http://schema.org/givenName") + + # Using a prefix and term + >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") + + # Using a dictionary term + >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) + + Args: + attr (str): The attribute to set the term for + term (str | dict): The term to set for the attribute + + Raises: + AssertionError: If the attribute is not found in the model + """ + + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_context[attr] = term + + def add_type_term( + self, + term: str, + prefix: str | None = None, + iri: str | None = None + ): + """Adds a term to the @type field of the JSON-LD object + + Example: + # Using a term + >> obj.add_type_term("https://schema.org/Person") + + # Using a prefixed term + >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") + + Args: + term (str): The term to add to the @type field + prefix (str, optional): The prefix to use for the term. Defaults to None. + iri (str, optional): The IRI to use for the term prefix. Defaults to None. + + Raises: + ValueError: If prefix is provided but iri is not + ValueError: If iri is provided but prefix is not + """ + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_type.append(term) + + +class Equation(BaseModel): + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + + unit: UnitDefinition + equation_type: EquationType + equation: str + species_id: Optional[str] = Field(default=None) + id: Optional[str] = Field(default=None) + variables: list[EqVariable] = Field(default_factory=list) + parameters: list[EqParameter] = Field(default_factory=list) + + # JSON-LD fields + ld_id: str = Field( + alias="@id", + default_factory=lambda: "enzml:Equation/" + str(uuid4()) + ) + ld_type: list[str] = Field( + alias="@type", + default_factory = lambda: [ + "enzml:Equation", + ], + ) + ld_context: dict[str, str | dict] = Field( + alias="@context", + default_factory = lambda: { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id", + }, + "id": { + "@type": "@id", + }, + } + ) + + def filter_variables(self, **kwargs) -> list[EqVariable]: + """Filters the variables attribute based on the given kwargs + + Args: + **kwargs: The attributes to filter by. + + Returns: + list[EqVariable]: The filtered list of EqVariable objects + """ + + return FilterWrapper[EqVariable](self.variables, **kwargs).filter() + + def filter_parameters(self, **kwargs) -> list[EqParameter]: + """Filters the parameters attribute based on the given kwargs + + Args: + **kwargs: The attributes to filter by. + + Returns: + list[EqParameter]: The filtered list of EqParameter objects + """ + + return FilterWrapper[EqParameter](self.parameters, **kwargs).filter() + + + def set_attr_term( + self, + attr: str, + term: str | dict, + prefix: str | None = None, + iri: str | None = None + ): + """Sets the term for a given attribute in the JSON-LD object + + Example: + # Using an IRI term + >> obj.set_attr_term("name", "http://schema.org/givenName") + + # Using a prefix and term + >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") + + # Using a dictionary term + >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) + + Args: + attr (str): The attribute to set the term for + term (str | dict): The term to set for the attribute + + Raises: + AssertionError: If the attribute is not found in the model + """ + + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_context[attr] = term + + def add_type_term( + self, + term: str, + prefix: str | None = None, + iri: str | None = None + ): + """Adds a term to the @type field of the JSON-LD object + + Example: + # Using a term + >> obj.add_type_term("https://schema.org/Person") + + # Using a prefixed term + >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") + + Args: + term (str): The term to add to the @type field + prefix (str, optional): The prefix to use for the term. Defaults to None. + iri (str, optional): The IRI to use for the term prefix. Defaults to None. + + Raises: + ValueError: If prefix is provided but iri is not + ValueError: If iri is provided but prefix is not + """ + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_type.append(term) + + + def add_to_variables( + self, + id: str, + name: str, + symbol: Optional[str]= None, + **kwargs, + ): + params = { + "id": id, + "name": name, + "symbol": symbol + } + + if "id" in kwargs: + params["id"] = kwargs["id"] + + self.variables.append( + EqVariable(**params) + ) + + return self.variables[-1] + + + def add_to_parameters( + self, + id: str, + name: str, + symbol: Optional[str]= None, + value: Optional[float]= None, + **kwargs, + ): + params = { + "id": id, + "name": name, + "symbol": symbol, + "value": value + } + + if "id" in kwargs: + params["id"] = kwargs["id"] + + self.parameters.append( + EqParameter(**params) + ) + + return self.parameters[-1] + +class Parameter(BaseModel): + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + + id: str + name: str + value: Optional[float] = Field(default=None) + unit: Optional[UnitDefinition] = Field(default=None) + initial_value: Optional[float] = Field(default=None) + upper: Optional[float] = Field(default=None) + lower: Optional[float] = Field(default=None) + stderr: Optional[float] = Field(default=None) + constant: bool = True + + # JSON-LD fields + ld_id: str = Field( + alias="@id", + default_factory=lambda: "enzml:Parameter/" + str(uuid4()) + ) + ld_type: list[str] = Field( + alias="@type", + default_factory = lambda: [ + "enzml:Parameter", + ], + ) + ld_context: dict[str, str | dict] = Field( + alias="@context", + default_factory = lambda: { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id", + }, + } + ) + + + def set_attr_term( + self, + attr: str, + term: str | dict, + prefix: str | None = None, + iri: str | None = None + ): + """Sets the term for a given attribute in the JSON-LD object + + Example: + # Using an IRI term + >> obj.set_attr_term("name", "http://schema.org/givenName") + + # Using a prefix and term + >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") + + # Using a dictionary term + >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) + + Args: + attr (str): The attribute to set the term for + term (str | dict): The term to set for the attribute + + Raises: + AssertionError: If the attribute is not found in the model + """ + + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_context[attr] = term + + def add_type_term( + self, + term: str, + prefix: str | None = None, + iri: str | None = None + ): + """Adds a term to the @type field of the JSON-LD object + + Example: + # Using a term + >> obj.add_type_term("https://schema.org/Person") + + # Using a prefixed term + >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") + + Args: + term (str): The term to add to the @type field + prefix (str, optional): The prefix to use for the term. Defaults to None. + iri (str, optional): The IRI to use for the term prefix. Defaults to None. + + Raises: + ValueError: If prefix is provided but iri is not + ValueError: If iri is provided but prefix is not + """ + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_type.append(term) + + +class Measurement(BaseModel): + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + + id: str + name: str + species: list[MeasurementData] = Field(default_factory=list) + group_id: Optional[str] = Field(default=None) + ph: Optional[float] = Field(default=None) + temperature: Optional[float] = Field(default=None) + temperature_unit: Optional[UnitDefinition] = Field(default=None) + + # JSON-LD fields + ld_id: str = Field( + alias="@id", + default_factory=lambda: "enzml:Measurement/" + str(uuid4()) + ) + ld_type: list[str] = Field( + alias="@type", + default_factory = lambda: [ + "enzml:Measurement", + ], + ) + ld_context: dict[str, str | dict] = Field( + alias="@context", + default_factory = lambda: { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id", + }, + "group_id": { + "@type": "@id", + }, + } + ) + + def filter_species(self, **kwargs) -> list[MeasurementData]: + """Filters the species attribute based on the given kwargs + + Args: + **kwargs: The attributes to filter by. + + Returns: + list[MeasurementData]: The filtered list of MeasurementData objects + """ + + return FilterWrapper[MeasurementData](self.species, **kwargs).filter() + + + def set_attr_term( + self, + attr: str, + term: str | dict, + prefix: str | None = None, + iri: str | None = None + ): + """Sets the term for a given attribute in the JSON-LD object + + Example: + # Using an IRI term + >> obj.set_attr_term("name", "http://schema.org/givenName") + + # Using a prefix and term + >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") + + # Using a dictionary term + >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) + + Args: + attr (str): The attribute to set the term for + term (str | dict): The term to set for the attribute + + Raises: + AssertionError: If the attribute is not found in the model + """ + + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_context[attr] = term + + def add_type_term( + self, + term: str, + prefix: str | None = None, + iri: str | None = None + ): + """Adds a term to the @type field of the JSON-LD object + + Example: + # Using a term + >> obj.add_type_term("https://schema.org/Person") + + # Using a prefixed term + >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") + + Args: + term (str): The term to add to the @type field + prefix (str, optional): The prefix to use for the term. Defaults to None. + iri (str, optional): The IRI to use for the term prefix. Defaults to None. + + Raises: + ValueError: If prefix is provided but iri is not + ValueError: If iri is provided but prefix is not + """ + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_type.append(term) + + + def add_to_species( + self, + species_id: str, + init_conc: float, + data_type: DataTypes, + data_unit: UnitDefinition, + time_unit: UnitDefinition, + time: list[float]= [], + data: list[float]= [], + is_calculated: bool= False, + **kwargs, + ): + params = { + "species_id": species_id, + "init_conc": init_conc, + "data_type": data_type, + "data_unit": data_unit, + "time_unit": time_unit, + "time": time, + "data": data, + "is_calculated": is_calculated + } + + if "id" in kwargs: + params["id"] = kwargs["id"] + + self.species.append( + MeasurementData(**params) + ) + + return self.species[-1] + + +class MeasurementData(BaseModel): + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + + species_id: str + init_conc: float + data_type: DataTypes + data_unit: UnitDefinition + time_unit: UnitDefinition + time: list[float] = Field(default_factory=list) + data: list[float] = Field(default_factory=list) + is_calculated: bool = False + + # JSON-LD fields + ld_id: str = Field( + alias="@id", + default_factory=lambda: "enzml:MeasurementData/" + str(uuid4()) + ) + ld_type: list[str] = Field( + alias="@type", + default_factory = lambda: [ + "enzml:MeasurementData", + ], + ) + ld_context: dict[str, str | dict] = Field( + alias="@context", + default_factory = lambda: { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id", + }, + } + ) + + + def set_attr_term( + self, + attr: str, + term: str | dict, + prefix: str | None = None, + iri: str | None = None + ): + """Sets the term for a given attribute in the JSON-LD object + + Example: + # Using an IRI term + >> obj.set_attr_term("name", "http://schema.org/givenName") + + # Using a prefix and term + >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") + + # Using a dictionary term + >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) + + Args: + attr (str): The attribute to set the term for + term (str | dict): The term to set for the attribute + + Raises: + AssertionError: If the attribute is not found in the model + """ + + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_context[attr] = term + + def add_type_term( + self, + term: str, + prefix: str | None = None, + iri: str | None = None + ): + """Adds a term to the @type field of the JSON-LD object + + Example: + # Using a term + >> obj.add_type_term("https://schema.org/Person") + + # Using a prefixed term + >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") + + Args: + term (str): The term to add to the @type field + prefix (str, optional): The prefix to use for the term. Defaults to None. + iri (str, optional): The IRI to use for the term prefix. Defaults to None. + + Raises: + ValueError: If prefix is provided but iri is not + ValueError: If iri is provided but prefix is not + """ + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_type.append(term) + + +class UnitDefinition(BaseModel): + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + + id: Optional[str] = Field(default=None) + name: Optional[str] = Field(default=None) + base_units: list[BaseUnit] = Field(default_factory=list) + + # JSON-LD fields + ld_id: str = Field( + alias="@id", + default_factory=lambda: "enzml:UnitDefinition/" + str(uuid4()) + ) + ld_type: list[str] = Field( + alias="@type", + default_factory = lambda: [ + "enzml:UnitDefinition", + ], + ) + ld_context: dict[str, str | dict] = Field( + alias="@context", + default_factory = lambda: { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + } + ) + + def filter_base_units(self, **kwargs) -> list[BaseUnit]: + """Filters the base_units attribute based on the given kwargs + + Args: + **kwargs: The attributes to filter by. + + Returns: + list[BaseUnit]: The filtered list of BaseUnit objects + """ + + return FilterWrapper[BaseUnit](self.base_units, **kwargs).filter() + + + def set_attr_term( + self, + attr: str, + term: str | dict, + prefix: str | None = None, + iri: str | None = None + ): + """Sets the term for a given attribute in the JSON-LD object + + Example: + # Using an IRI term + >> obj.set_attr_term("name", "http://schema.org/givenName") + + # Using a prefix and term + >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") + + # Using a dictionary term + >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) + + Args: + attr (str): The attribute to set the term for + term (str | dict): The term to set for the attribute + + Raises: + AssertionError: If the attribute is not found in the model + """ + + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_context[attr] = term + + def add_type_term( + self, + term: str, + prefix: str | None = None, + iri: str | None = None + ): + """Adds a term to the @type field of the JSON-LD object + + Example: + # Using a term + >> obj.add_type_term("https://schema.org/Person") + + # Using a prefixed term + >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") + + Args: + term (str): The term to add to the @type field + prefix (str, optional): The prefix to use for the term. Defaults to None. + iri (str, optional): The IRI to use for the term prefix. Defaults to None. + + Raises: + ValueError: If prefix is provided but iri is not + ValueError: If iri is provided but prefix is not + """ + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_type.append(term) + + + def add_to_base_units( + self, + kind: UnitType, + exponent: int, + multiplier: Optional[float]= None, + scale: Optional[float]= None, + **kwargs, + ): + params = { + "kind": kind, + "exponent": exponent, + "multiplier": multiplier, + "scale": scale + } + + if "id" in kwargs: + params["id"] = kwargs["id"] + + self.base_units.append( + BaseUnit(**params) + ) + + return self.base_units[-1] + +class BaseUnit(BaseModel): + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + + kind: UnitType + exponent: int + multiplier: Optional[float] = Field(default=None) + scale: Optional[float] = Field(default=None) + + # JSON-LD fields + ld_id: str = Field( + alias="@id", + default_factory=lambda: "enzml:BaseUnit/" + str(uuid4()) + ) + ld_type: list[str] = Field( + alias="@type", + default_factory = lambda: [ + "enzml:BaseUnit", + ], + ) + ld_context: dict[str, str | dict] = Field( + alias="@context", + default_factory = lambda: { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + } + ) + + + def set_attr_term( + self, + attr: str, + term: str | dict, + prefix: str | None = None, + iri: str | None = None + ): + """Sets the term for a given attribute in the JSON-LD object + + Example: + # Using an IRI term + >> obj.set_attr_term("name", "http://schema.org/givenName") + + # Using a prefix and term + >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") + + # Using a dictionary term + >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) + + Args: + attr (str): The attribute to set the term for + term (str | dict): The term to set for the attribute + + Raises: + AssertionError: If the attribute is not found in the model + """ + + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_context[attr] = term + + def add_type_term( + self, + term: str, + prefix: str | None = None, + iri: str | None = None + ): + """Adds a term to the @type field of the JSON-LD object + + Example: + # Using a term + >> obj.add_type_term("https://schema.org/Person") + + # Using a prefixed term + >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") + + Args: + term (str): The term to add to the @type field + prefix (str, optional): The prefix to use for the term. Defaults to None. + iri (str, optional): The IRI to use for the term prefix. Defaults to None. + + Raises: + ValueError: If prefix is provided but iri is not + ValueError: If iri is provided but prefix is not + """ + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_type.append(term) + + +class EqVariable(BaseModel): + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + + id: str + name: str + symbol: Optional[str] = Field(default=None) + + # JSON-LD fields + ld_id: str = Field( + alias="@id", + default_factory=lambda: "enzml:EqVariable/" + str(uuid4()) + ) + ld_type: list[str] = Field( + alias="@type", + default_factory = lambda: [ + "enzml:EqVariable", + ], + ) + ld_context: dict[str, str | dict] = Field( + alias="@context", + default_factory = lambda: { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@type": "@id", + }, + } + ) + + + def set_attr_term( + self, + attr: str, + term: str | dict, + prefix: str | None = None, + iri: str | None = None + ): + """Sets the term for a given attribute in the JSON-LD object + + Example: + # Using an IRI term + >> obj.set_attr_term("name", "http://schema.org/givenName") + + # Using a prefix and term + >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") + + # Using a dictionary term + >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) + + Args: + attr (str): The attribute to set the term for + term (str | dict): The term to set for the attribute + + Raises: + AssertionError: If the attribute is not found in the model + """ + + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_context[attr] = term + + def add_type_term( + self, + term: str, + prefix: str | None = None, + iri: str | None = None + ): + """Adds a term to the @type field of the JSON-LD object + + Example: + # Using a term + >> obj.add_type_term("https://schema.org/Person") + + # Using a prefixed term + >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") + + Args: + term (str): The term to add to the @type field + prefix (str, optional): The prefix to use for the term. Defaults to None. + iri (str, optional): The IRI to use for the term prefix. Defaults to None. + + Raises: + ValueError: If prefix is provided but iri is not + ValueError: If iri is provided but prefix is not + """ + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_type.append(term) + + +class EqParameter(BaseModel): + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + + id: str + name: str + symbol: Optional[str] = Field(default=None) + value: Optional[float] = Field(default=None) + + # JSON-LD fields + ld_id: str = Field( + alias="@id", + default_factory=lambda: "enzml:EqParameter/" + str(uuid4()) + ) + ld_type: list[str] = Field( + alias="@type", + default_factory = lambda: [ + "enzml:EqParameter", + ], + ) + ld_context: dict[str, str | dict] = Field( + alias="@context", + default_factory = lambda: { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@type": "@id", + }, + } + ) + + + def set_attr_term( + self, + attr: str, + term: str | dict, + prefix: str | None = None, + iri: str | None = None + ): + """Sets the term for a given attribute in the JSON-LD object + + Example: + # Using an IRI term + >> obj.set_attr_term("name", "http://schema.org/givenName") + + # Using a prefix and term + >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") + + # Using a dictionary term + >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) + + Args: + attr (str): The attribute to set the term for + term (str | dict): The term to set for the attribute + + Raises: + AssertionError: If the attribute is not found in the model + """ + + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_context[attr] = term + + def add_type_term( + self, + term: str, + prefix: str | None = None, + iri: str | None = None + ): + """Adds a term to the @type field of the JSON-LD object + + Example: + # Using a term + >> obj.add_type_term("https://schema.org/Person") + + # Using a prefixed term + >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") + + Args: + term (str): The term to add to the @type field + prefix (str, optional): The prefix to use for the term. Defaults to None. + iri (str, optional): The IRI to use for the term prefix. Defaults to None. + + Raises: + ValueError: If prefix is provided but iri is not + ValueError: If iri is provided but prefix is not + """ + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_type.append(term) + + +class DataTypes(Enum): + ABSORPTION = "abs" + BIOMASS = "biomass" + CONCENTRATION = "conc" + CONVERSION = "conversion" + FEED = "feed" + PEAK_AREA = "peak-area" + +class EquationType(Enum): + ASSIGNMENT = "assignment" + INITIAL_ASSIGNMENT = "initialAssignment" + ODE = "ode" + RATE_LAW = "rateLaw" + +class UnitType(Enum): + AMPERE = "ampere" + AVOGADRO = "avogadro" + BECQUEREL = "becquerel" + CANDELA = "candela" + COULOMB = "coulomb" + DIMENSIONLESS = "dimensionless" + FARAD = "farad" + GRAM = "gram" + GRAY = "gray" + HENRY = "henry" + HERTZ = "hertz" + ITEM = "item" + JOULE = "joule" + KATAL = "katal" + KELVIN = "kelvin" + KILOGRAM = "kilogram" + LITRE = "litre" + LUMEN = "lumen" + LUX = "lux" + METRE = "metre" + MOLE = "mole" + NEWTON = "newton" + OHM = "ohm" + PASCAL = "pascal" + RADIAN = "radian" + SECOND = "second" + SIEMENS = "siemens" + SIEVERT = "sievert" + STERADIAN = "steradian" + TESLA = "tesla" + VOLT = "volt" + WATT = "watt" + WEBER = "weber" \ No newline at end of file diff --git a/pyenzyme/rdf.py b/pyenzyme/rdf.py new file mode 100644 index 0000000..d608b3e --- /dev/null +++ b/pyenzyme/rdf.py @@ -0,0 +1,34 @@ +import rdflib + + +def to_rdf_xml(*objs, keep_header: bool = False): + """Converts a JSON-LD string to RDF/XML format. + + Args: + json_ld (str): The JSON-LD string to convert. + keep_header (bool, optional): Whether to keep the XML header. Defaults to False. + Returns: + str: The RDF/XML string. + """ + + graph = rdflib.Graph() + + for obj in objs: + if not hasattr(obj, "ld_id"): + obj.ld_id = f"http://enzymeml.org/v2/{obj.__class__.__name__}/{obj.ld_id}" + to_exclude = { + key + for key, value in obj.ld_context.items() + if isinstance(value, dict) and value.get("@type", None) == "@id" + } + graph.parse( + data=obj.model_dump_json(by_alias=True, exclude=to_exclude), + format="json-ld", + ) + + rdf_xml = graph.serialize(format="xml") + + if not keep_header: + return "\n".join(rdf_xml.split("\n")[1:]) + else: + return rdf_xml diff --git a/pyenzyme/sbml/__init__.py b/pyenzyme/sbml/__init__.py new file mode 100644 index 0000000..2ae543c --- /dev/null +++ b/pyenzyme/sbml/__init__.py @@ -0,0 +1,3 @@ +from .serializer import to_sbml + +__all__ = ["to_sbml"] diff --git a/pyenzyme/sbml/mappings.toml b/pyenzyme/sbml/mappings.toml new file mode 100644 index 0000000..771a68b --- /dev/null +++ b/pyenzyme/sbml/mappings.toml @@ -0,0 +1,31 @@ +[smallMolecule] + +inchiKey = "inchikey" +smiles = "canonical_smiles" + +[protein] + +ecnumber = "ecnumber" +organism = "organism" +organismTaxId = "organism_tax_id" +sequence = "sequence" + +[conditions] + +ph = { "@value" = "ph" } +temperature = { "@value" = "temperature", "@unit" = "temperature_unit" } + +[parameter] + +lowerBound = "lower" +upperBound = "upper" +stdDeviation = "stderr" + +[measurement] + +"@id" = "id" +"@name" = "name" + +[initConc] + +initConc = { "@species" = "species_id", "@value" = "init_conc", "@unit" = "data_unit" } diff --git a/pyenzyme/sbml/serializer.py b/pyenzyme/sbml/serializer.py new file mode 100644 index 0000000..5588712 --- /dev/null +++ b/pyenzyme/sbml/serializer.py @@ -0,0 +1,460 @@ +from pathlib import Path +import libsbml +from loguru import logger +import pandas as pd +import xml.etree.ElementTree as ET +from typing import Callable +from pydantic import BaseModel + +import pyenzyme.model as pe +from pyenzyme.sbml.validation import validate_sbml_export +from pyenzyme.tabular import to_pandas +import pyenzyme.tools as tools + +from pyenzyme import xmlutils as _xml +from pyenzyme import rdf +from pyenzyme.units.units import UnitDefinition +from pyenzyme.logging import add_logger + +MAPPINGS = tools.read_static_file("pyenzyme.sbml", "mappings.toml") +NSMAP = {"enzymeml": "https://www.enzymeml.org/v2"} + + +def to_sbml( + enzmldoc: pe.EnzymeMLDocument, + out: Path | str | None = None, + verbose: bool = False, +) -> tuple[str, pd.DataFrame] | None: + """This function converts an EnzymeML document to an SBML document. + + The systems biology markup language (SBML) is a machine-readable format for + representing models of biochemical reaction networks. This function converts + an EnzymeML document to an SBML document. Prior to serialization the EnzymeML + document is validated for SBML export. + + Example: + >> import pyenzyme as pe + >> doc = pe.EnzymeMLDocument() + >> [add entities to doc] + >> pe.to_sbml(doc, "example.xml") + + Args: + enzmldoc (pe.EnzymeMLDocument): The EnzymeML document to convert. + out (Path | str | None, optional): The output file to write the SBML document to. Defaults to None. + + Returns: + tuple[str, pd.DataFrame] | None: The SBML document as a string and a DataFrame with the RDF triples. + + Raises: + ValueError: If the EnzymeML document is not valid for SBML export. + """ + + add_logger(name="SBML") + + if not validate_sbml_export(enzmldoc): + raise ValueError("EnzymeML document is not valid for SBML export") + + global print_warnings + global units + global model + global doc + + doc = enzmldoc.copy() + sbmldoc = libsbml.SBMLDocument() + model = sbmldoc.createModel() + units = tools.find_unique(enzmldoc, pe.UnitDefinition) + print_warnings = verbose + + _xml.register_namespaces(nsmap=NSMAP) + + # Add entities + [_add_unit_definitions(unit, i) for i, unit in enumerate(units)] + [_add_vessel(vessel) for vessel in doc.vessels] + [_add_protein(protein) for protein in doc.proteins] + [_add_small_mol(small_mol) for small_mol in doc.small_molecules] + [_add_parameter(param) for param in doc.parameters] + [_add_equation(equation) for equation in doc.equations] + [_add_reaction(reaction, i) for i, reaction in enumerate(doc.reactions)] + + if doc.measurements: + _add_measurements(doc.measurements) + + if out is None: + return libsbml.writeSBMLToString(sbmldoc), to_pandas(doc) + + if isinstance(out, str): + out = Path(out) + + if out.is_dir(): + out = out / "enzymeml_doc.xml" + else: + out = out.with_suffix(".xml") + + _validate_sbml(sbmldoc) + + libsbml.writeSBML(sbmldoc, str(out)) + + if doc.measurements: + to_pandas(doc).to_csv(out.with_name("data.tsv"), sep="\t", index=False) + + logger.info(f"SBML document written to {out}") + + +def _add_unit_definitions(unit: UnitDefinition, index: int): + """Add unit definitions to the SBML model.""" + + sbml_unitdef = model.createUnitDefinition() + sbml_unitdef.setName(unit.name) + sbml_unitdef.setId(f"u{index}") + sbml_unitdef.setAnnotation(rdf.to_rdf_xml(unit)) + + for base_unit in unit.base_units: + sbml_unit = sbml_unitdef.createUnit() + sbml_unit.setKind(_get_sbml_kind(base_unit.kind)) + sbml_unit.setExponent(base_unit.exponent) + + if base_unit.scale: + sbml_unit.setScale(int(base_unit.scale)) + if base_unit.multiplier: + sbml_unit.setMultiplier(base_unit.multiplier) + + +def _add_vessel(vessel: pe.Vessel): + """Add vessels to the SBML model.""" + + compartment = model.createCompartment() + compartment.setId(vessel.id) + compartment.setName(vessel.name) + compartment.setConstant(True) + compartment.setSize(vessel.volume) + compartment.setAnnotation(rdf.to_rdf_xml(vessel)) + + if vessel.unit in units: + compartment.setUnits(_get_unit(vessel.unit, units)) + else: + raise ValueError(f"Unit {vessel.unit} not found in units") + + +def _add_small_mol(small_mol: pe.SmallMolecule): + """Add small molecules to the SBML model.""" + + species = model.createSpecies() + species.setId(small_mol.id) + species.setName(small_mol.name) + species.setCompartment(small_mol.vessel_id) + species.setConstant(small_mol.constant) + species.appendAnnotation(rdf.to_rdf_xml(small_mol)) + + init_conc = _get_first_meas_init_conc(small_mol) + + if init_conc is not None: + species.setInitialConcentration(init_conc) + species.setHasOnlySubstanceUnits(False) + + root = ET.Element("enzymeml") + annot = _xml.serialize_to_pretty_xml_string( + _extract_create_annot("smallMolecule", small_mol, root) + ) + + if annot is not None: + species.appendAnnotation(annot) + + +def _add_protein(protein: pe.Protein): + """Add proteins to the SBML model.""" + + species = model.createSpecies() + species.setId(protein.id) + species.setName(protein.name) + species.setConstant(protein.constant) + species.setCompartment(protein.vessel_id) + species.appendAnnotation(rdf.to_rdf_xml(protein)) + + init_conc = _get_first_meas_init_conc(protein) + + if init_conc is not None: + species.setInitialConcentration(init_conc) + species.setHasOnlySubstanceUnits(False) + + annot = _xml.serialize_to_pretty_xml_string( + _extract_create_annot("protein", protein) + ) + + if annot is not None: + species.appendAnnotation(annot) + + +def _get_first_meas_init_conc(species: pe.SmallMolecule | pe.Protein): + """Extracts the initial concentration of a species from the first measurement + + SBML requires the initial concentration to be set for species that are measured, + even if there are multiple measurements. This function extracts the initial + concentration from the first measurement of the species to fulfill this requirement. + """ + + if not doc.measurements: + return None + + measurement = doc.measurements[0] + meas_species = measurement.filter_species(species_id=species.id) + + if meas_species: + return meas_species[0].init_conc + else: + return None + + +def _add_reaction(reaction: pe.Reaction, index: int): + """Add reactions to the SBML model.""" + + sbml_reaction = model.createReaction() + sbml_reaction.setName(reaction.name) + sbml_reaction.setId(f"r{index}") + sbml_reaction.setReversible(reaction.reversible) + + for species in reaction.species: + assert species.stoichiometry, f"Stoichiometry of species {species} is not set" + + species_ref = _get_create_fun( + species.stoichiometry, + sbml_reaction, + species.species_id, + )() + + species_ref.setSpecies(species.species_id) + species_ref.setStoichiometry(abs(species.stoichiometry)) + + for modifier in reaction.modifiers: + modifier_ref = sbml_reaction.createModifier() + modifier_ref.setSpecies(modifier) + + if reaction.kinetic_law: + _add_rate_law(reaction.kinetic_law, sbml_reaction) + + +def _add_rate_law(equation: pe.Equation, reac: libsbml.Reaction): + """Add rate laws to the SBML Reaction.""" + + law = reac.createKineticLaw() + law.setMath(libsbml.parseL3Formula(equation.equation)) + + for parameter in equation.parameters: + param = law.createParameter() + param.setId(parameter.id) + + +def _get_create_fun( + stoichiometry: float, + reaction: libsbml.Reaction, + species: str, +) -> Callable[[], libsbml.SpeciesReference]: + """Helper function to retrieve the appropriate create function""" + if stoichiometry > 0: + return reaction.createProduct + elif stoichiometry < 0: + return reaction.createReactant + + raise ValueError(f"Stoichiometry of species {species} is 0") + + +def _add_parameter(parameter: pe.Parameter): + """Add parameters to the SBML model.""" + + sbml_param = model.createParameter() + sbml_param.setId(parameter.id) + sbml_param.setName(parameter.name) + sbml_param.setConstant(parameter.constant) + sbml_param.appendAnnotation(rdf.to_rdf_xml(parameter)) + + if parameter.value: + sbml_param.setValue(parameter.value) + if parameter.unit: + sbml_param.setUnits(_get_unit(parameter.unit, units)) + + annot = _xml.serialize_to_pretty_xml_string( + _extract_create_annot("parameter", parameter) + ) + + if annot is not None: + sbml_param.appendAnnotation(annot) + + +def _add_equation(equation: pe.Equation): + """Add equations to the SBML model.""" + + if equation.equation_type == pe.EquationType.ODE: + sbml_rule = model.createRateRule() + sbml_rule.setVariable(equation.species_id) + sbml_rule.setUnits(_get_unit(equation.unit, units)) + elif equation.equation_type == pe.EquationType.ASSIGNMENT: + sbml_rule = model.createAssignmentRule() + sbml_rule.setVariable(equation.species_id) + sbml_rule.setUnits(_get_unit(equation.unit, units)) + elif equation.equation_type == pe.EquationType.INITIAL_ASSIGNMENT: + sbml_rule = model.createInitialAssignment() + sbml_rule.setSymbol(equation.species_id) + else: + raise ValueError(f"Equation type {equation.equation_type} not supported") + + sbml_rule.setMath(libsbml.parseL3Formula(equation.equation)) + + +def _add_measurements(measurements: list[pe.Measurement]): + """Adds measurements to the SBML model.""" + + annotation = ET.Element(f"{{{NSMAP['enzymeml']}}}data") + annotation.attrib["file"] = "data.csv" + + for measurement in measurements: + meas_element = _extract_create_annot("measurement", measurement) + meas_element.attrib["timeUnit"] = _get_unit( # type: ignore + measurement.species[0].time_unit, + units, + ) + + assert meas_element is not None, "Measurement element is None" + + conditions = _create_condition_element( + ph=measurement.ph, + temperature=measurement.temperature, + temperature_unit=measurement.temperature_unit, # type: ignore + ) + + if conditions: + meas_element.append(conditions) + + for species in measurement.species: + _extract_create_annot("initConc", species, meas_element) + + annotation.append(meas_element) + + annot = _xml.serialize_to_pretty_xml_string(annotation) + + if annot is not None: + model.appendAnnotation(annot) + + +def _create_condition_element( + ph: float | None, + temperature: float | None, + temperature_unit: UnitDefinition | None, +): + """Set the conditions of the reaction in the SBML model.""" + + element = ET.Element(f"{{{NSMAP['enzymeml']}}}conditions") + mappings = { + "ph": {"@value": ph}, + "temperature": {"@value": temperature, "@unit": temperature_unit}, + } + + _xml.map_to_xml( + root=element, + mappings=mappings, + namespace=NSMAP["enzymeml"], + ) + + return element + + +def _extract_create_annot( + name: str, + obj: BaseModel, + element: ET.Element | None = None, +) -> ET.Element | None: + """Extracts the data from the object and creates an annotation element. + + This function makes use of the "mappings.toml" file which orchestrates + the mapping of the data from the object to the XML element. + + Args: + name (str): The name of the object. + obj (BaseModel): The object to extract the data from. + element (ET.Element, optional): The element to append the annotation to. Defaults to None. + + Returns: + ET.Element: The annotation element. + """ + mappings = _extract(obj, MAPPINGS[name]) + + if element is None: + element = ET.Element(f"{{{NSMAP['enzymeml']}}}{name}") + + _xml.map_to_xml( + root=element, + mappings=mappings, + namespace=NSMAP["enzymeml"], + ) + + if len(element) == 0 and not element.attrib: + return None + + return element + + +def _extract(obj: BaseModel, mapping: dict) -> dict: + """Based on the mapping, extract the data from the object and return it as a dictionary. + + Args: + obj (BaseModel): The object to extract the data from. + mapping (dict): The mapping to use for extraction. + + Returns: + dict: The extracted data. + """ + + data = {} + + for trgt_key, enzml_key in mapping.items(): + if isinstance(enzml_key, dict): + data[trgt_key] = _extract(obj, enzml_key) + elif "unit" in enzml_key: + value = getattr(obj, enzml_key) + data[trgt_key] = _get_unit(value, units) + else: + data[trgt_key] = getattr(obj, enzml_key) + + return data + + +def _get_sbml_kind(unit_type: pe.UnitType): + try: + return getattr(libsbml, f"UNIT_KIND_{unit_type.name}") + except AttributeError: + raise ValueError(f"Unit type {unit_type} not found in libsbml") + + +def _get_unit(unit: pe.UnitDefinition, units: list[pe.UnitDefinition]) -> str | None: + """Helper function to get the unit from the list of units.""" + try: + index = units.index(unit) + except ValueError: + return None + + return f"u{index}" + + +def _validate_sbml(sbmldoc: libsbml.SBMLDocument) -> None: + """Validate the SBML document using the libSBML function.""" + sbml_errors = sbmldoc.checkConsistency() + valid = True + + if sbml_errors and not print_warnings: + logger.warning( + "The SBML document has warnings that should be checked. Set the `warnings` argument to true to see them." + ) + + for error in range(sbml_errors): + severity = sbmldoc.getError(error).getSeverity() + + if severity == libsbml.LIBSBML_SEV_ERROR: + valid = False + logger.error( + sbmldoc.getError(error).getMessage().strip().replace("\n", " ") + ) + elif severity == libsbml.LIBSBML_SEV_WARNING and print_warnings: + logger.warning( + sbmldoc.getError(error).getMessage().strip().replace("\n", " ") + ) + + if not valid: + raise ValueError("SBML model is not valid") diff --git a/pyenzyme/sbml/validation.py b/pyenzyme/sbml/validation.py new file mode 100644 index 0000000..c98dbc0 --- /dev/null +++ b/pyenzyme/sbml/validation.py @@ -0,0 +1,157 @@ +from loguru import logger + +import pyenzyme.model as pe +import pyenzyme.tools as tools + + +def validate_sbml_export(doc: pe.EnzymeMLDocument) -> bool: + """This function validates the SBML export of an EnzymeML document. + + Args: + doc (pe.EnzymeMLDocument): The EnzymeML document to validate. + channel (str, optional): The channel to log to. Defaults to sys.stderr. + + Returns: + bool: True if the document is valid, False otherwise. + """ + + result = all( + [ + _check_consistent_vessel_ids(doc), + _check_equation_either_rule_or_reaction(doc), + _check_units_exist(doc), + _check_assigned_params_are_not_constant(doc), + ] + ) + + return result + + +def _check_consistent_vessel_ids(doc: pe.EnzymeMLDocument) -> bool: + """This validator checks whether all species have a vessel id that exists in the document. + + SBML documents require that all species have a vessel id that exists in the document and + this validator checks for that. Otherwise an error message will be logged and the validity + set to False. + """ + + vessel_ids = {v.id for v in doc.vessels} + all_species = doc.small_molecules + doc.proteins + result = [] + + for species in all_species: + if species.vessel_id is None: + logger.error( + f"Species '{species.id}' of type '{type(species).__name__}' does not have a vessel id." + ) + result.append(False) + elif species.vessel_id not in vessel_ids: + logger.error( + f"Species '{species.id}' of type '{type(species).__name__}' has a vessel id that does not exist in the document." + ) + result.append(False) + else: + result.append(True) + + return all(result) + + +def _check_equation_either_rule_or_reaction(doc: pe.EnzymeMLDocument) -> bool: + """This validator checks whether there are either rules or reactions in the document. + + SBML documents require that there are either rules or reactions in the document. For instance, + there cannot be a rate equation and reaction element at the same time, since the latter is + used to derive the former. This validator checks for that and logs an error message if the + document is invalid. + """ + + species_w_rate = { + eq.species_id for eq in doc.equations if eq.equation_type == pe.EquationType.ODE + } + + all_reaction_elements = tools.extract(obj=doc, target=pe.ReactionElement) + result, validated = [], set() + + for element in all_reaction_elements: + if element.species_id in species_w_rate and element.species_id not in validated: + logger.error( + f"Species '{element.species_id}' is part of a reaction and has a rate equation. This is not allowed in SBML." + ) + validated.add(element.species_id) + result.append(False) + else: + result.append(True) + + return all(result) + + +def _check_units_exist(doc: pe.EnzymeMLDocument): + """This validator checks whether all units in the document are defined in the SBML standard.""" + + mandatory_unit_objects = [ + *tools.extract(obj=doc, target=pe.MeasurementData), + *tools.extract(obj=doc, target=pe.Equation), + ] + + optional_unit_objects = [ + *tools.extract(obj=doc, target=pe.Parameter), + ] + + result = [] + + for unit_obj in mandatory_unit_objects: + units = tools.extract(obj=unit_obj, target=pe.UnitDefinition) + + if len(units) == 0: + logger.error( + f"Object of type '{type(unit_obj).__name__}' with id '{unit_obj.id}' does not have a unit defined." + ) + result.append(False) + + for unit_obj in optional_unit_objects: + units = tools.extract(obj=unit_obj, target=pe.UnitDefinition) + + if len(units) == 0: + logger.warning( + f"{type(unit_obj).__name__} with id '{unit_obj.id}' should ideally have a unit defined." + ) + + result.append(True) + + return all(result) + + +def _check_assigned_params_are_not_constant(doc: pe.EnzymeMLDocument): + """This validator checks whether all assigned parameters are not constant. + + If a parameter is assigned a value through an assignment rule, it should not be constant. + This validator checks for that and logs a warning if a parameter is constant but has + an assignment rule and sets the parameter to non-constant. + """ + + assignments = doc.filter_equations(equation_type=pe.EquationType.ASSIGNMENT) + result = [] + + for assignment in assignments: + params = doc.filter_parameters(id=assignment.species_id) + + if len(params) == 0: + logger.error( + f"Assignment '{assignment.species_id}' does not have a parameter defined." + ) + result.append(False) + elif len(params) > 1: + logger.error( + f"Assignment '{assignment.species_id}' has multiple parameters defined." + ) + result.append(False) + + if params[0].constant: + params[0].constant = False + logger.warning( + f"Parameter '{params[0].id}' has an assignment rule, but is set to constant. The parameter is now set to non-constant." + ) + + result.append(True) + + return all(result) diff --git a/pyenzyme/tabular.py b/pyenzyme/tabular.py new file mode 100644 index 0000000..d799c8c --- /dev/null +++ b/pyenzyme/tabular.py @@ -0,0 +1,323 @@ +import pandas as pd +import pathlib as pl + +from .model import ( + DataTypes, + Measurement, + EnzymeMLDocument, + MeasurementData, + UnitDefinition, +) + + +def to_pandas( + enzmldoc: EnzymeMLDocument, + ignore: list[str] = [], +) -> pd.DataFrame: + """This function converts an EnzymeMLDocument object to a pandas DataFrame. + + The resulting DataFrame contains the following columns: + + - time: The time values of the measurement. + - id: The ID of the measurement. + - [species]: The species data of the measurement per column. + + Args: + enzmldoc (EnzymeMLDocument): The EnzymeMLDocument object to convert. + ignore (list[str], optional): A list of measurement IDs to ignore. Defaults to []. + + Returns: + pd.DataFrame: The EnzymeMLDocument object as a pandas DataFrame. + + Raises: + ValueError: If the input is not an EnzymeMLDocument object. + ValueError: If the measurements are not of type Measurement. + ValueError: If the measurement does not contain species data. + """ + + assert isinstance( + enzmldoc, EnzymeMLDocument + ), "The input must be an EnzymeMLDocument object" + + dfs = [] + for meas in enzmldoc.measurements: + if meas.id in ignore: + continue + + if not isinstance(meas, Measurement): + raise ValueError("The measurements must be of type Measurement") + if meas.species is None: + raise ValueError("The measurement must contain species data") + + df = _measurement_to_pandas(meas) + df["id"] = [meas.id] * len(df) + dfs.append(df) + + return pd.concat(dfs, ignore_index=True).reset_index(drop=True) + + +def read_excel( + path: pl.Path | str, + data_unit: UnitDefinition, + time_unit: UnitDefinition, + data_type: DataTypes = DataTypes.CONCENTRATION, + sep: str = ";", +): + """Reads a CSV file from the specified path into a measurement. + + This function expects the CSV file to have the following structure: + + - time: The time points of the measurements. Should start at 0. + - id: The ID of the measurement. Only needed in case of multiple measurements. + - [species_id]: Per column, the data of a species. + + If there is no 'id' column, the function assumes that there is only one measurement + in the file. If there is an 'id' column, the function assumes that there are multiple + measurements in the file. Hence, if you want to have multiple measurements in the same + file, you need to have an 'id' column. Otherwise it will return a single measurement. + + Args: + path (str, pathlib.Path): The path to the CSV file. + data_unit (UnitDefinition): The unit of the data. + time_unit (UnitDefinition): The unit of the time. + data_type (DataTypes): The type of the data. Default is DataTypes.CONCENTRATION. + sep (str): The separator of the CSV file. Default is ';'. + + Returns: + list[Measurement]: A list of measurements. + + Raises: + FileNotFoundError: If the file does not exist. + ValueError: If the path is not a file. + """ + + if isinstance(path, str): + path = pl.Path(path) + + if not path.exists(): + raise FileNotFoundError(f"The file '{path}' does not exist.") + elif not path.is_file(): + raise ValueError(f"The path '{path}' is not a file.") + + df = pd.read_excel(path) + + return from_pandas( + df=df, + id=path.stem, + data_unit=data_unit, + time_unit=time_unit, + data_type=data_type, + ) + + +def read_csv( + path: pl.Path | str, + data_unit: UnitDefinition, + time_unit: UnitDefinition, + data_type: DataTypes = DataTypes.CONCENTRATION, + sep: str = ";", +): + """Reads a CSV file from the specified path into a measurement. + + This function expects the CSV file to have the following structure: + + - time: The time points of the measurements. Should start at 0. + - id: The ID of the measurement. Only needed in case of multiple measurements. + - [species_id]: Per column, the data of a species. + + If there is no 'id' column, the function assumes that there is only one measurement + in the file. If there is an 'id' column, the function assumes that there are multiple + measurements in the file. Hence, if you want to have multiple measurements in the same + file, you need to have an 'id' column. Otherwise it will return a single measurement. + + Args: + path (str, pathlib.Path): The path to the CSV file. + data_unit (UnitDefinition): The unit of the data. + time_unit (UnitDefinition): The unit of the time. + data_type (DataTypes): The type of the data. Default is DataTypes.CONCENTRATION. + sep (str): The separator of the CSV file. Default is ';'. + + Returns: + list[Measurement]: A list of measurements. + + Raises: + FileNotFoundError: If the file does not exist. + ValueError: If the path is not a file. + """ + + if isinstance(path, str): + path = pl.Path(path) + + if not path.exists(): + raise FileNotFoundError(f"The file '{path}' does not exist.") + elif not path.is_file(): + raise ValueError(f"The path '{path}' is not a file.") + + df = pd.read_csv(path, sep=sep) + + return from_pandas( + df=df, + id=path.stem, + data_unit=data_unit, + time_unit=time_unit, + data_type=data_type, + ) + + +def from_pandas( + df: pd.DataFrame, + id: str, + data_unit: UnitDefinition, + time_unit: UnitDefinition, + data_type: DataTypes = DataTypes.CONCENTRATION, +) -> list[Measurement]: + """Parse a pandas DataFrame into a list of measurements. + + This function expects the DataFrame to have the following structure: + + - time: The time points of the measurements. Should start at 0. + - id: The ID of the measurement. Only needed in case of multiple measurements. + - [species_id]: Per column, the data of a species. + + If there is no 'id' column, the function assumes that there is only one measurement + in the file. If there is an 'id' column, the function assumes that there are multiple + measurements in the file. Hence, if you want to have multiple measurements in the same + file, you need to have an 'id' column. Otherwise it will return a single measurement. + + Args: + df (pd.DataFrame): The DataFrame to parse. + data_unit (UnitDefinition): The unit of the data. + time_unit (UnitDefinition): The unit of the time. + data_type (DataTypes): The type of the data. Default is DataTypes.CONCENTRATION. + + Returns: + list[Measurement]: A list of measurements. + + Raises: + FileNotFoundError: If the file does not exist. + ValueError: If the path is not a file. + """ + + _validate_data(df) + + if "id" in df: + return _process_multiple_measurements( + df=df, + data_unit=data_unit, + time_unit=time_unit, + data_type=data_type, + ) + else: + return [ + _create_single_measurement( + df=df, + id=id, + data_unit=data_unit, + time_unit=time_unit, + data_type=data_type, + ) + ] + + +def _create_single_measurement( + df: pd.DataFrame, + id: str, + data_unit: UnitDefinition, + time_unit: UnitDefinition, + data_type: DataTypes, +) -> Measurement: + data = df.to_dict(orient="list") + time = data.pop("time") + meas_data = [] + + for species_id, species_data in data.items(): + if species_id == "id": + continue + + meas_data.append( + MeasurementData( + species_id=species_id, + data=species_data, + time=time, + data_unit=data_unit, + time_unit=time_unit, + init_conc=species_data[0], + data_type=data_type, + ) + ) + + return Measurement(name=id, id=id, species=meas_data) + + +def _process_multiple_measurements( + df: pd.DataFrame, + data_unit: UnitDefinition, + time_unit: UnitDefinition, + data_type: DataTypes, +) -> list[Measurement]: + ids = df["id"].unique() + measurements = [] + + for id in ids: + sub_df = df[df["id"] == id] + measurements.append( + _create_single_measurement( + df=sub_df, # type: ignore + id=id, + data_unit=data_unit, + time_unit=time_unit, + data_type=data_type, + ) + ) + + return measurements + + +def _validate_data(data: pd.DataFrame) -> None: + """Validates the data from a CSV file""" + + assert "time" in data, "The CSV file must contain a 'time' column" + assert data["time"][0] == 0, "The time column must start at 0" + + for col in data.columns: + if col == "id": + continue + assert ( + data[col].dtype == "float64" or data[col].dtype == "int64" + ), f"The column '{col}' must contain only numerical values" + + +def _measurement_to_pandas(measurement: Measurement) -> pd.DataFrame: + """Converts a Measurement object to a pandas DataFrame""" + + _validate_measurement(measurement) + + data = {"time": measurement.species[0].time} + for species in measurement.species: + data[species.species_id] = species.data + return pd.DataFrame(data) + + +def _validate_measurement(meas: Measurement) -> None: + """Validates a Measurement object""" + + # Check if the length of time is consistent + + try: + times = pd.DataFrame( + {species.species_id + "_time": species.time for species in meas.species} + ) + except ValueError: + time_lengths = { + species.species_id: len(species.time) for species in meas.species + } + raise ValueError( + f"Export to pandas not possible, the time lengths are inconsistent. Got different time arrays per species: {time_lengths}" + ) + + # Check if the time arrays are the same + all_columns_same = bool(times.apply(lambda col: col.equals(times.iloc[:, 0])).all()) + if not all_columns_same: + raise ValueError( + f"Export to pandas not possible, the time arrays are inconsistent. Got different time arrays per species: \n\n {times.T} \n\n" + ) diff --git a/pyenzyme/tools.py b/pyenzyme/tools.py new file mode 100644 index 0000000..6a82de7 --- /dev/null +++ b/pyenzyme/tools.py @@ -0,0 +1,128 @@ +from enum import Enum +import toml +import functools as ft +import importlib.resources as pkg_resources + + +def read_static_file(path, filename: str): + """Reads a static file from the specified library path. + + Args: + path (Module): Import path of the library. + filename (str): The name of the file to read. + + Returns: + dict: The contents of the file as a dictionary. + """ + + source = pkg_resources.files(path).joinpath(filename) + with pkg_resources.as_file(source) as file: + return toml.load(file) + + +def find_unique(obj, target): + """Composite function that extracts all instances of a specified target type from a given object. + + Args: + obj (Any): The object from which to extract instances of the target type. + target (type): The target type to extract from the object. + + Returns: + list: A list of unique instances of the target type. + """ + if _is_basetype(obj): + return [] + + return chain(obj, ft.partial(extract, target=target), unique) + + +def chain(obj, *funs): + return ft.reduce(lambda x, f: f(x), funs, obj) + + +def unique(args): + """Returns a list of unique elements from a given list. + + Args: + args (list): The list of elements to extract unique elements from. + + Returns: + list: A list of unique elements. + """ + + unique = [] + for arg in args: + if arg not in unique: + unique.append(arg) + + return unique + + +def extract(obj, target) -> list: + """ + Recursively extracts all instances of a specified target type from a given object's attributes. + + This function traverses through the attributes of the given object and collects all instances + of the specified target type. It handles nested objects and lists by performing a depth-first search. + + Args: + obj (Any): The object from which to extract instances of the target type. + target (type): The type of the instances to extract. + + Returns: + list: A list of instances of the target type extracted from the object. + + Example: + >>> from dataclasses import dataclass, field + >>> @dataclass + >>> class Example: + >>> a: int + >>> b: list = field(default_factory=list) + >>> + >>> obj = Example(1, [Example(2), Example(3, [Example(4), 5])]) + >>> target_type = int + >>> extracted = extract_type(obj, target_type) + >>> print(extracted) + [1, 2, 3, 4, 5] + """ + + result = [] + + if isinstance(obj, target) or _is_subclass(obj, target): + result.append(obj) + + for name, value in obj.__dict__.items(): + if not _is_basetype(value) and not isinstance(value, Enum): + result += extract(value, target) + elif isinstance(value, list) and not all(_is_basetype(item) for item in value): + for item in value: + result += extract(item, target) + + return result + + +def _is_subclass(obj, target): + """Checks if an object is a subclass of a target type.""" + + if not hasattr(obj, "__class__"): + return False + + return issubclass(obj.__class__, target) + + +def _is_basetype(obj): + """Checks if an object is a basic type.""" + return isinstance( + obj, + ( + int, + float, + str, + bool, + bytes, + complex, + list, + dict, + type(None), + ), + ) diff --git a/pyenzyme/units/__init__.py b/pyenzyme/units/__init__.py new file mode 100644 index 0000000..2590388 --- /dev/null +++ b/pyenzyme/units/__init__.py @@ -0,0 +1 @@ +from .predefined import * # noqa: F403 diff --git a/pyenzyme/units/ontomaps.toml b/pyenzyme/units/ontomaps.toml new file mode 100644 index 0000000..0a2f551 --- /dev/null +++ b/pyenzyme/units/ontomaps.toml @@ -0,0 +1,40 @@ +[substance] + +mol = "OBO:UO_0000013" +mmol = "OBO:UO_0000040" +umol = "OBO:UO_0000039" +nmol = "OBO:UO_0000041" + +[molarity] + +M = "OBO:UO_0000062" +mM = "OBO:UO_0000063" +uM = "OBO:UO_0000064" +nM = "OBO:UO_0000025" + +[time] + +s = "OBO:UO_0000010" +min = "OBO:UO_0000031" +hour = "OBO:UO_0000032" +day = "OBO:UO_0000033" + +[temperature] + +K = "OBO:UO_0000012" +C = "OBO:UO_0000027" + +[mass] + +kg = "OBO:UO_0000009" +g = "OBO:UO_0000021" +mg = "OBO:UO_0000022" +ug = "OBO:UO_0000023" +ng = "OBO:UO_0000024" + +[volume] + +litre = "OBO:UO_0000099" +ml = "OBO:UO_0000098" +ul = "OBO:UO_0000101" +nl = "OBO:UO_0000102" diff --git a/pyenzyme/units/predefined.py b/pyenzyme/units/predefined.py new file mode 100644 index 0000000..b0531d2 --- /dev/null +++ b/pyenzyme/units/predefined.py @@ -0,0 +1,146 @@ +from pyenzyme.model import UnitType +from pyenzyme.tools import read_static_file + +from .units import BaseUnit, UnitDefinition, Prefix + +BaseUnit.model_rebuild() +UnitDefinition.model_rebuild() + +ONTOMAPS = read_static_file("pyenzyme.units", "ontomaps.toml") + + +class Unit: + @staticmethod + def mol(): + return BaseUnit(kind=UnitType.MOLE, exponent=1, scale=1) + + @staticmethod + def litre(): + return BaseUnit(kind=UnitType.LITRE, exponent=1, scale=1) + + @staticmethod + def second(): + return BaseUnit(kind=UnitType.SECOND, exponent=1, scale=1) + + @staticmethod + def minute(): + return BaseUnit(kind=UnitType.SECOND, exponent=1, scale=1, multiplier=60) + + @staticmethod + def hour(): + hour = 60 * 60 + return BaseUnit(kind=UnitType.SECOND, exponent=1, scale=1, multiplier=hour) + + @staticmethod + def day(): + day = 60**2 * 24 + return BaseUnit(kind=UnitType.SECOND, exponent=1, scale=1, multiplier=day) + + @staticmethod + def gram(): + return BaseUnit(kind=UnitType.GRAM, exponent=1, scale=1) + + @staticmethod + def kelvin(): + return BaseUnit(kind=UnitType.KELVIN, exponent=1, scale=1) + + @staticmethod + def dimensionless(): + return BaseUnit(kind=UnitType.DIMENSIONLESS, exponent=1, scale=1) + + +###### Single Prefixes ###### + +k = Prefix.k +m = Prefix.m +u = Prefix.u +n = Prefix.n + +##### Predefined units ##### + +# Dimensionless +dimensionless = UnitDefinition(base_units=[Unit.dimensionless()]) + +# Molarity +M = Unit.mol() / Unit.litre() +mM = m * Unit.mol() / Unit.litre() +uM = u * Unit.mol() / Unit.litre() +nM = n * Unit.mol() / Unit.litre() + +## Ontology +M.ld_id = ONTOMAPS["molarity"]["M"] +mM.ld_id = ONTOMAPS["molarity"]["mM"] +uM.ld_id = ONTOMAPS["molarity"]["uM"] +nM.ld_id = ONTOMAPS["molarity"]["nM"] + +# Substance +mol = UnitDefinition(base_units=[Unit.mol()])._get_name() +mmol = UnitDefinition(base_units=[m * Unit.mol()])._get_name() +umol = UnitDefinition(base_units=[u * Unit.mol()])._get_name() +nmol = UnitDefinition(base_units=[n * Unit.mol()])._get_name() + +## Ontology +mol.ld_id = ONTOMAPS["substance"]["mol"] +mmol.ld_id = ONTOMAPS["substance"]["mmol"] +umol.ld_id = ONTOMAPS["substance"]["umol"] +nmol.ld_id = ONTOMAPS["substance"]["nmol"] + +# Mass +gram = UnitDefinition(base_units=[Unit.gram()])._get_name() +g = UnitDefinition(base_units=[Unit.gram()])._get_name() +mg = UnitDefinition(base_units=[m * Unit.gram()])._get_name() +ug = UnitDefinition(base_units=[u * Unit.gram()])._get_name() +ng = UnitDefinition(base_units=[n * Unit.gram()])._get_name() +kg = UnitDefinition(base_units=[k * Unit.gram()])._get_name() + +## Ontology +g.ld_id = ONTOMAPS["mass"]["g"] +gram.ld_id = ONTOMAPS["mass"]["g"] +mg.ld_id = ONTOMAPS["mass"]["mg"] +ug.ld_id = ONTOMAPS["mass"]["ug"] +ng.ld_id = ONTOMAPS["mass"]["ng"] + +# Volume +litre = UnitDefinition(base_units=[Unit.litre()])._get_name() +l = UnitDefinition(base_units=[Unit.litre()])._get_name() # noqa: E741 +ml = UnitDefinition(base_units=[m * Unit.litre()])._get_name() +ul = UnitDefinition(base_units=[u * Unit.litre()])._get_name() +nl = UnitDefinition(base_units=[n * Unit.litre()])._get_name() + +## Ontology + +l.ld_id = ONTOMAPS["volume"]["litre"] +litre.ld_id = ONTOMAPS["volume"]["litre"] +ml.ld_id = ONTOMAPS["volume"]["ml"] +ul.ld_id = ONTOMAPS["volume"]["ul"] +nl.ld_id = ONTOMAPS["volume"]["nl"] + +# Time +second = UnitDefinition(base_units=[Unit.second()])._get_name() +s = UnitDefinition(base_units=[Unit.second()])._get_name() +minute = UnitDefinition(base_units=[Unit.minute()])._get_name() +min = UnitDefinition(base_units=[Unit.minute()])._get_name() +hour = UnitDefinition(base_units=[Unit.hour()])._get_name() +h = UnitDefinition(base_units=[Unit.hour()])._get_name() +day = UnitDefinition(base_units=[Unit.day()])._get_name() +d = UnitDefinition(base_units=[Unit.day()])._get_name() + +## Ontology +s.ld_id = ONTOMAPS["time"]["s"] +second.ld_id = ONTOMAPS["time"]["s"] +minute.ld_id = ONTOMAPS["time"]["min"] +min.ld_id = ONTOMAPS["time"]["min"] +hour.ld_id = ONTOMAPS["time"]["hour"] +h.ld_id = ONTOMAPS["time"]["hour"] +day.ld_id = ONTOMAPS["time"]["day"] +d.ld_id = ONTOMAPS["time"]["day"] + +# Temperature + +kelvin = UnitDefinition(base_units=[Unit.kelvin()])._get_name() +K = UnitDefinition(base_units=[Unit.kelvin()])._get_name() + +## Ontology + +K.ld_id = ONTOMAPS["temperature"]["K"] +kelvin.ld_id = ONTOMAPS["temperature"]["K"] diff --git a/pyenzyme/units/units.py b/pyenzyme/units/units.py new file mode 100644 index 0000000..e1902c2 --- /dev/null +++ b/pyenzyme/units/units.py @@ -0,0 +1,367 @@ +from enum import Enum +from functools import partial + +from pydantic import model_validator +from pyenzyme.model import ( + UnitDefinition as _UnitDefinition, + BaseUnit as _BaseUnit, + UnitType, +) + +UNIT_OF_MEAS_TYPE = "OBO:UO_0000000" +NAME_MAPS = { + UnitType.LITRE: "l", + UnitType.MOLE: "mol", + UnitType.SECOND: "s", + UnitType.GRAM: "g", + UnitType.KELVIN: "K", +} + + +def _is_unit(other: object) -> bool: + """Check if the given object is an instance of 'unit'. + + Args: + other (object): The object to check. + + Returns: + bool: True if the object is an instance of 'unit', False otherwise. + """ + return other.__class__.__name__ == "unit" + + +def set_scale(unit: _BaseUnit, scale: int) -> _BaseUnit: + """Set the scale of a unit. + + Args: + unit (_BaseUnit): The unit to set the scale for. + scale (int): The scale value to set. + + Returns: + _BaseUnit: The unit with the updated scale. + """ + unit.scale = scale + return unit + + +class Prefix(Enum): + """Enumeration for unit prefixes with corresponding scales.""" + + k = partial(set_scale, scale=3) + m = partial(set_scale, scale=-3) + u = partial(set_scale, scale=-6) + n = partial(set_scale, scale=-9) + + def __mul__(self, other: _BaseUnit) -> _BaseUnit: + """Multiply prefix with a BaseUnit. + + When multiplying a prefix with a BaseUnit, the scale of the BaseUnit is updated. + + Args: + other (_BaseUnit): The other operand, which should be a BaseUnit. + + Returns: + _BaseUnit: The resulting unit with the prefix applied. + + Raises: + TypeError: If the other operand is not a BaseUnit. + """ + if isinstance(other, _BaseUnit): + return self.value(other) + + raise TypeError( + f"unsupported operand type(s) for *: 'Prefix' and '{type(other)}'" + ) + + +class UnitDefinition(_UnitDefinition): + """Extended UnitDefinition class with additional operations.""" + + @model_validator(mode="after") + def set_name_and_type(self): + """Initialize the UnitDefinition object.""" + self._get_name() + self.ld_type = [UNIT_OF_MEAS_TYPE] + return self + + def __rtruediv__(self, other: object) -> "UnitDefinition": + """Right division operation to handle unit division. + + If the other operand is a UnitDefinition, the base units are appended to the current unit. + If the other operand is a BaseUnit, the base unit is appended to the current unit. + + Args: + other (object): The numerator in the division. + + Returns: + UnitDefinition: The resulting unit after division. + + Raises: + TypeError: If the other operand type is unsupported. + """ + for base in self.base_units: + base.exponent = -abs(base.exponent) + + if isinstance(other, UnitDefinition): + self.base_units.extend(other.base_units) + elif isinstance(other, _BaseUnit): + self.base_units.append(other) + + self._get_name() + + return self + + def __truediv__(self, other: object) -> "UnitDefinition": + """Division operation to handle unit division. + + If the other operand is a UnitDefinition, the base units are appended to the current unit. + If the other operand is a BaseUnit, the base unit is appended to the current unit. + + Args: + other (object): The numerator in the + + Returns: + UnitDefinition: The resulting unit after division. + + Raises: + TypeError: If the other operand type is unsupported. + + """ + + if isinstance(other, UnitDefinition): + for base in other.base_units: + base.exponent = -abs(base.exponent) + self.base_units.extend(other.base_units) + elif isinstance(other, _BaseUnit): + other.exponent = -abs(other.exponent) + self.base_units.append(other) + + self._get_name() + + return self + + def __mul__(self, other: object) -> "UnitDefinition": + """Multiplication operation to handle unit multiplication. + + Args: + other (object): The multiplier in the multiplication. + + Returns: + UnitDefinition: The resulting unit after multiplication. + + Raises: + TypeError: If the other operand type is unsupported. + """ + if isinstance(other, (int, float)): + for base in self.base_units: + if base.multiplier: + base.multiplier *= other + else: + base.multiplier = other + + self._get_name() + + return self + + raise TypeError( + f"unsupported operand type(s) for *: 'UnitDefinition' and '{type(other)}'" + ) + + def _get_name(self): + """Get the name of the unit based on the base units.""" + self.name = str(self) + + return self + + def __str__(self) -> str: + """String representation of the UnitDefinition. + + Returns: + str: The string representation of the unit. + + Raises: + ValueError: If no base units are found. + """ + + numerator = [ + self._map_prefix(base.scale) + + self._map_name(base.kind) + + self._exponent(base.exponent) + for base in self.base_units + if base.exponent > 0 + ] + denominator = [ + self._map_prefix(base.scale) + + self._map_name(base.kind) + + self._exponent(base.exponent) + for base in self.base_units + if base.exponent < 0 + ] + + numerator_str = " ".join(numerator) if numerator else "" + denominator_str = " ".join(denominator) if denominator else "" + + if numerator_str and denominator_str: + return f"{numerator_str} / {denominator_str}" + elif numerator_str: + return numerator_str + elif denominator_str: + return f"1 / {denominator_str}" + + raise ValueError("No base units found") + + @staticmethod + def _map_prefix(scale: int | None) -> str: + """Map a scale to its corresponding prefix. + + Args: + scale (int): The scale value to map. + + Returns: + str: The corresponding prefix. + """ + + if scale is None: + return "" + + mapping = { + 3: "k", + -3: "m", + -6: "u", + -9: "n", + } + + return mapping.get(scale, "") + + @staticmethod + def _map_name(kind: UnitType) -> str: + return NAME_MAPS.get(kind, kind.name.capitalize()) + + @staticmethod + def _exponent(exponent: int) -> str: + """Format the exponent for display. + + Args: + exponent (int): The exponent value to format. + + Returns: + str: The formatted exponent string. + """ + if abs(exponent) == 1: + return "" + + return f"^{abs(exponent)}" + + +class BaseUnit(_BaseUnit): + """Extended BaseUnit class with additional operations.""" + + def __rtruediv__(self, other: object) -> "UnitDefinition | BaseUnit": + """Right division operation to handle unit division. + + Args: + other (object): The numerator in the division. + + Returns: + UnitDefinition: The resulting unit after division. + + Raises: + TypeError: If the other operand type is unsupported. + """ + if isinstance(other, UnitDefinition): + self.exponent = -self.exponent + other.base_units.append(self) + + other._get_name() + + return other + elif isinstance(other, (int, float)): + self.exponent = -self.exponent + return self + + raise TypeError( + f"unsupported operand type(s) for /: 'BaseUnit' and '{type(other)}'" + ) + + def __truediv__(self, other: object) -> "UnitDefinition": + """Division operation to handle unit division. + + Args: + other (object): The denominator in the division. + + Returns: + UnitDefinition: The resulting unit after division. + + Raises: + TypeError: If the other operand type is unsupported. + """ + if isinstance(other, BaseUnit): + other.exponent = -other.exponent + return UnitDefinition(base_units=[self, other])._get_name() + elif isinstance(other, UnitDefinition): + for base_unit in other.base_units: + base_unit.exponent = -base_unit.exponent + other.base_units.append(self) + other._get_name() + + return other + + raise TypeError( + f"unsupported operand type(s) for /: 'BaseUnit' and '{type(other)}'" + ) + + def __pow__(self, other: int) -> "_BaseUnit": + """Exponentiation operation to handle unit exponentiation. + + Args: + other (int): The exponent value. + + Returns: + _BaseUnit: The resulting unit after exponentiation. + + Raises: + TypeError: If the exponent is not an integer. + """ + if isinstance(other, int): + self.exponent = other + return self + + raise TypeError( + f"unsupported operand type(s) for **: 'BaseUnit' and '{type(other)}'" + ) + + def __mul__(self, other: object) -> object: + """Multiplication operation to handle unit multiplication. + + Args: + other (object): The multiplier in the multiplication. + + Returns: + object: The resulting unit after multiplication. + + Raises: + TypeError: If the other operand type is unsupported. + """ + if isinstance(other, BaseUnit): + if self.exponent < 0 or other.exponent < 0: + self.exponent = abs(self.exponent) + other.exponent = abs(other.exponent) + + return UnitDefinition(base_units=[self, other])._get_name() + elif isinstance(other, UnitDefinition): + other.base_units.append(self) + other._get_name() + + return other + elif isinstance(other, Prefix): + return other * self + elif isinstance(other, (int, float)): + if self.multiplier: + self.multiplier *= other + else: + self.multiplier = other + return self + + raise TypeError( + f"unsupported operand type(s) for *: 'BaseUnit' and '{type(other)}'" + ) diff --git a/pyenzyme/xmlutils.py b/pyenzyme/xmlutils.py new file mode 100644 index 0000000..bbcfad8 --- /dev/null +++ b/pyenzyme/xmlutils.py @@ -0,0 +1,78 @@ +import xml.etree.ElementTree as ET +import xml.dom.minidom as minidom + + +def map_to_xml(root: ET.Element, mappings: dict, namespace: str): + """ + Maps a dictionary to XML elements and appends them to the root element. + + Args: + root (ET.Element): The root element to which sub-elements are appended. + mappings (dict): The dictionary containing the key-value mappings to convert to XML. + """ + + for key, value in mappings.items(): + if value is None: + continue + if key.startswith("@"): + root.attrib[key[1:]] = str(value) + continue + + subelement = ET.Element(f"{{{namespace}}}{key}") + + if isinstance(value, dict): + process_dict_value(subelement, value) + elif key.startswith("@"): + subelement.attrib[key[1:]] = str(value) + else: + subelement.text = str(value) + + if not _is_empty(subelement): + root.append(subelement) + + +def _is_empty(element: ET.Element): + """Checks if an element and its sub elements are empty.""" + + return all( + [ + len(element.attrib) == 0, + element.text is None or element.text.strip() == "", + all(_is_empty(child) for child in element), + ] + ) + + +def process_dict_value(subelement: ET.Element, value: dict): + """ + Processes a dictionary value and adds it as attributes or text to a subelement. + + Args: + subelement (ET.Element): The subelement to which attributes or text are added. + value (dict): The dictionary containing the subkey-subvalue mappings. + """ + for subkey, subvalue in value.items(): + if not subvalue: + continue + + if subkey.startswith("@"): + subelement.attrib[subkey[1:]] = str(subvalue) + else: + subelement.text = str(subvalue) + + +def serialize_to_pretty_xml_string(element: ET.Element | None) -> str | None: + """Serialize the ElementTree element to a pretty-printed byte string.""" + + if element is None: + return None + + rough_string = ET.tostring(element, "utf-8", xml_declaration=False) + reparsed = minidom.parseString(rough_string) + + return "\n".join(reparsed.toprettyxml(indent="\t").split("\n")[1:]).strip() + + +def register_namespaces(nsmap: dict): + for prefix, uri in nsmap.items(): + ET.register_namespace(prefix, uri) From 14f25a52b335b3ecd52c03455a370341f136896f Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 22 Jun 2024 17:56:09 +0200 Subject: [PATCH 05/80] migrate to pyproject --- pyproject.toml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..7ce9dee --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,33 @@ +[tool.poetry] +name = "pyenzyme" +version = "2.0.0" +description = "" +authors = ["Jan Range "] +license = "MIT" +readme = "README.md" +include = ["pyenzyme/units/ontomaps.toml", "pyenzyme/sbml/mappings.toml"] + +[tool.poetry.dependencies] +python = "^3.10" +python-libsbml = "^5.20.2" +toml = "^0.10.2" +rich = "^13.7.1" +pandas = "^2.2.2" +pydantic = "^2.7.4" +loguru = "^0.7.2" +rdflib = "7.0.0" +sympy = "^1.12.1" + +[tool.poetry.group.neo4j.dependencies] +neo4j = "^5.21.0" + +[tool.poetry.group.excel.dependencies] +openpyxl = "^3.1.4" + +[tool.poetry.group.tests.dependencies] +openpyxl = "^3.1.4" +pytest = "^8.2.2" + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" From 63016176390749f2936409940a9335bfecdd495b Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 22 Jun 2024 17:56:36 +0200 Subject: [PATCH 06/80] linting and testing workflows --- .github/workflows/lint.yml | 8 ++++++++ .github/workflows/unit-tests.yaml | 27 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/unit-tests.yaml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..b268138 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,8 @@ +name: Ruff +on: [push, pull_request] +jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: chartboost/ruff-action@v1 diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml new file mode 100644 index 0000000..7cfb984 --- /dev/null +++ b/.github/workflows/unit-tests.yaml @@ -0,0 +1,27 @@ +name: Unit Tests + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: ["3.10", "3.11", "3.12"] + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + python3 -m pip install pytest-cov openpyxl + pip3 install -e . + - name: Test with pytest + run: | + python3 -m pytest -v From 0c979c54952684287bb235e485af02a0892a1c35 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 22 Jun 2024 17:56:58 +0200 Subject: [PATCH 07/80] update fixtures --- tests/conftest.py | 75 +++++------------------------------------------ 1 file changed, 7 insertions(+), 68 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 57c547e..34f3d1b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,77 +1,16 @@ import pytest -import json -import yaml - -from pyenzyme.enzymeml.core.enzymemldocument import EnzymeMLDocument -from pyenzyme.enzymeml.core.measurement import Measurement -from pyenzyme.enzymeml.core.measurementData import MeasurementData -from pyenzyme.enzymeml.core.replicate import Replicate -from pyenzyme.enzymeml.core.enzymereaction import EnzymeReaction -from pyenzyme.enzymeml.tools.unitcreator import UnitCreator -from pyenzyme.enzymeml.models.kineticmodel import KineticModel, KineticParameter +import pyenzyme as pe @pytest.fixture -def enzmldoc(): - return EnzymeMLDocument.fromJSON( - open("./tests/fixtures/enzmldoc_object.json").read() +def measurement_valid(): + return pe.EnzymeMLDocument.model_validate_json( + open("tests/fixtures/tabular/measurement_valid.json").read() ) @pytest.fixture -def reaction(): - return EnzymeReaction.fromJSON(open("./tests/fixtures/reaction_object.json").read()) - - -@pytest.fixture -def measurement(): - return Measurement.fromJSON(open("./tests/fixtures/measurement_object.json").read()) - - -@pytest.fixture -def measurement_data(): - return MeasurementData.fromJSON( - open("./tests/fixtures/measurement_data_object.json").read() +def measurement_invalid(): + return pe.EnzymeMLDocument.model_validate_json( + open("tests/fixtures/tabular/measurement_invalid.json").read() ) - - -@pytest.fixture -def replicate(): - return Replicate.fromJSON(open("./tests/fixtures/replicate_object.json").read()) - - -@pytest.fixture -def correct_model(): - parameters = [KineticParameter(name="x", value=10.0, unit="mmole / l")] - return KineticModel(name="SomeModel", equation="s0 * x", parameters=parameters) - - -@pytest.fixture -def faulty_model(): - parameters = [KineticParameter(name="x", value=10.0, unit="mmole / l")] - return KineticModel(name="SomeModel", equation="s10 * x", parameters=parameters) - - -@pytest.fixture -def always_pass(): - return yaml.safe_load(open("./tests/fixtures/validator_always_passes.yaml")) - - -@pytest.fixture -def should_fail(): - return yaml.safe_load(open("./tests/fixtures/validator_should_fail.yaml")) - - -@pytest.fixture -def template_example(): - return EnzymeMLDocument.fromJSON(open("tests/fixtures/template_result.json").read()) - - -@pytest.fixture -def creator(): - return UnitCreator() - - -@pytest.fixture -def blank_enzmldoc(): - return EnzymeMLDocument(name="Test") From 28697dff969f4f48746e99378b6159b9d4905fa8 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 22 Jun 2024 17:57:54 +0200 Subject: [PATCH 08/80] ignore mac things --- .gitignore | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index bde4b7b..9a74808 100644 --- a/.gitignore +++ b/.gitignore @@ -138,8 +138,11 @@ dmypy.json cython_debug/ pyenzyme/Examples/getJSONValid.py -# test dirs +# test dirs tests/tmp # PyCharm IDE -.idea/ \ No newline at end of file +.idea/ + +# Mac OS +.DS_Store From a924ce60723b0808774d2b9092f47151cb7c8ab9 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 22 Jun 2024 17:58:02 +0200 Subject: [PATCH 09/80] fix typos --- templates/EnzymeML_Validation_Template.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/EnzymeML_Validation_Template.yaml b/templates/EnzymeML_Validation_Template.yaml index a9a04df..9937caa 100644 --- a/templates/EnzymeML_Validation_Template.yaml +++ b/templates/EnzymeML_Validation_Template.yaml @@ -140,7 +140,7 @@ protein_dict: - null unit: mandatory: true - description: Unit of the proteins intial concentration. + description: Unit of the proteins initial concentration. range: min: null max: null @@ -230,7 +230,7 @@ complex_dict: - null unit: mandatory: true - description: Unit of the proteins intial concentration. + description: Unit of the proteins initial concentration. range: min: null max: null @@ -279,7 +279,7 @@ reactant_dict: - null unit: mandatory: true - description: Unit of the reactant intial concentration. + description: Unit of the reactant initial concentration. range: min: null max: null From 984847e6b852224a28ef14f273022fe1054f1451 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 22 Jun 2024 17:58:07 +0200 Subject: [PATCH 10/80] update readme --- README.md | 62 +++++-------------------------------------------------- 1 file changed, 5 insertions(+), 57 deletions(-) diff --git a/README.md b/README.md index c3f2184..93716b6 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ -

+

PyEnzyme is the interface to the data model EnzymeML and offers a convenient way to document and model research data. Lightweight syntax for rapid development of data management solution in enzymology and biocatalysis.

### 🧬 Features @@ -17,7 +17,7 @@ PyEnzyme is the interface to the data model EnzymeML and offers a conveni - **Visualize** experimental results for inspection and publication. ## ⚡️ Quick start -Get started with PyEnzyme by running the following command +Get started with PyEnzyme by running the following command ``` # Using PyPI @@ -53,71 +53,19 @@ python -m pip install "pyenzyme[dataverse]" python -m pip install "pyenzyme[all]" ``` -### 🚀 PyEnzyme's REST-API - -If you want to deploy PyEnzyme as a server and use our REST-API to access PyEnzyme from any HTTP-capable programming language, use our official [docker image](https://hub.docker.com/r/enzymeml/pyenzyme/tags) or simply copy and past the following. - -```bash -docker pull enzymeml/pyenzyme:latest -docker run -p 8000:8000 enzymeml/pyenzyme:latest -``` -See the [API documentation](https://api.enzymeml.org) for details on our endpoints. You can also use our self-hosted PyEnzyme instance if you have no server space - Use https://api.enzymeml.org as base URL to the endpoints. - ## ⚙️ Example code This example will demonstrate how to create a simple EnzymeML document using PyEnzyme and how to use initializers from official databases **Chebi** and **UniProt** to gather metadata. For more examples, please visit our [documentation](https://pyenzyme.readthedocs.io/en/latest/index.html#) (Work in progress) ```python -import pyenzyme as pe - -# Initialize your document -enzmldoc = pe.EnzymeMLDocument(name="MyDoc") - -# Create a vessel and add it to the document -vessel = pe.Vessel(name="Falcon Tube", volume=10.0, unit="ml") -vessel_id = enzmldoc.addVessel(vessel) - -# Set up reactants and proteins from databases -protein = pe.Protein.fromUniProtID( - uniprotid="P07327", vessel_id=vessel_id, - init_conc=10.0, unit="fmole / l" -) - -substrate = pe.Reactant.fromChebiID( - chebi_id="CHEBI:16236", vessel_id=vessel_id, - init_conc=200.0, unit="mmole / l" -) - -product = pe.Reactant.fromChebiID( - chebi_id="CHEBI:15343", vessel_id=vessel_id, - init_conc=0.0, unit="mmole / l" -) - -# ... and add each to the document -protein_id = enzmldoc.addProtein(protein) -substrate_id = enzmldoc.addReactant(substrate) -product_id = enzmldoc.addReactant(product) - -# Build the reaction -reaction = pe.EnzymeReaction.fromEquation( - equation="ethanol -> acetaldehyde", - modifiers=[protein_id], - name="Alocohol dehydrogenation", - enzmldoc=enzmldoc -) - -# ... and add it to the document -reaction_id = enzmldoc.addReaction(reaction) - -# Finally, save the document to an OMEX archive -enzmldoc.toFile(".", name="ADH Experiment") +# To be added for V2 ``` (Code should run as it is) ## 📖 Documentation and more examples -Explore all the features of **PyEnzyme** in our [documentation](https://pyenzyme.readthedocs.io/en/latest/index.html#) and take part in [Discussions](https://github.com/EnzymeML/PyEnzyme/discussions) and/or [Issues](https://github.com/EnzymeML/PyEnzyme/issues). +Explore all the features of **PyEnzyme** in our [documentation](https://pyenzyme.readthedocs.io/en/latest/index.html#) and take part in [Discussions](https://github.com/EnzymeML/PyEnzyme/discussions) and/or [Issues](https://github.com/EnzymeML/PyEnzyme/issues). ## ⚠️ License -`PyEnzyme` is free and open-source software licensed under the [BSD 2-Clause License](https://github.com/EnzymeML/PyEnzyme/blob/main/LICENSE). +`PyEnzyme` is free and open-source software licensed under the [BSD 2-Clause License](https://github.com/EnzymeML/PyEnzyme/blob/main/LICENSE). From 51ad12f552f9e083b28d8ff176f524241c5b79cb Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 22 Jun 2024 17:58:21 +0200 Subject: [PATCH 11/80] add new tests --- tests/__init__.py | 1 + tests/fixtures/tabular/data.csv | 23 + tests/fixtures/tabular/data.xlsx | Bin 0 -> 9432 bytes tests/fixtures/tabular/data_invalid.csv | 23 + tests/fixtures/tabular/data_invalid.xlsx | Bin 0 -> 9383 bytes tests/fixtures/tabular/data_invalid_chars.csv | 23 + tests/fixtures/tabular/measurement_export.csv | 0 .../fixtures/tabular/measurement_invalid.json | 208 +++++++ tests/fixtures/tabular/measurement_valid.json | 523 ++++++++++++++++++ tests/integration/__init__.py | 0 tests/unit/__init__.py | 1 + tests/unit/test_equations.py | 256 +++++++++ tests/unit/test_tabular.py | 147 +++++ 13 files changed, 1205 insertions(+) create mode 100644 tests/fixtures/tabular/data.csv create mode 100644 tests/fixtures/tabular/data.xlsx create mode 100644 tests/fixtures/tabular/data_invalid.csv create mode 100644 tests/fixtures/tabular/data_invalid.xlsx create mode 100644 tests/fixtures/tabular/data_invalid_chars.csv create mode 100644 tests/fixtures/tabular/measurement_export.csv create mode 100644 tests/fixtures/tabular/measurement_invalid.json create mode 100644 tests/fixtures/tabular/measurement_valid.json create mode 100644 tests/integration/__init__.py create mode 100644 tests/unit/__init__.py create mode 100644 tests/unit/test_equations.py create mode 100644 tests/unit/test_tabular.py diff --git a/tests/__init__.py b/tests/__init__.py index e69de29..8b13789 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1 @@ + diff --git a/tests/fixtures/tabular/data.csv b/tests/fixtures/tabular/data.csv new file mode 100644 index 0000000..aac51d8 --- /dev/null +++ b/tests/fixtures/tabular/data.csv @@ -0,0 +1,23 @@ +time;s0;s1;id +0.0;0.0;10.0;m0 +1.0;1.0;9.0;m0 +2.0;2.0;8.0;m0 +3.0;3.0;7.0;m0 +4.0;4.0;6.0;m0 +5.0;5.0;5.0;m0 +6.0;6.0;4.0;m0 +7.0;7.0;3.0;m0 +8.0;8.0;2.0;m0 +9.0;9.0;1.0;m0 +10.0;10.0;0.0;m0 +0.0;0.0;10.0;m1 +1.0;1.0;9.0;m1 +2.0;2.0;8.0;m1 +3.0;3.0;7.0;m1 +4.0;4.0;6.0;m1 +5.0;5.0;5.0;m1 +6.0;6.0;4.0;m1 +7.0;7.0;3.0;m1 +8.0;8.0;2.0;m1 +9.0;9.0;1.0;m1 +10.0;10.0;0.0;m1 diff --git a/tests/fixtures/tabular/data.xlsx b/tests/fixtures/tabular/data.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..bfec157607e1e824fb2eda8ea0520793fd3a68bc GIT binary patch literal 9432 zcmeHtg;yNe_I2YBtkGaW0|bWz5AN=e;K6CEad+3?5S-uymq2iLcY?cXaQ}5?=6y4h zneQ)nuX?SjRn@iks$2K$bM85(6r^Ebu>tS^L;wIl2GBoBGu43t0HR<404x9^w5BlF z%HGJzURTA%+Q?3u(b>|1Gz%8`RVDx$a{vFf|Kc}L95*1>!3-3=lDHS%V31m<6hLG< z^zFfZxw6d)64eoAGLJ9NfZB^AF zOrx(i++AB}!|_4Ul}?fb^rDt~A|5p=lHyZhGd zV02T{@8~pP*X#8oJOJ?Y1Org`n=HSoGE?Te z*@DRlY-_F$2AltkTg9r{;A~E84_(j`%v#zUl>j0wz98wG)L}ut;apmNG_u?YF0;8z ztPIW0yj##er$@Q8=p1@#d54 zF=LGkc*?3F7U8@qiaIH7{sQTKWNLKj6(WY(U1nbqqKk8$?bO17=b%dZhkc3)+z$xo zuvB4y=#3j@Gk(cp@o?|x`-&-WvJ|pKT=#wJ+_p>F zu{N<(FlCFP#6C}I;uWZ9Je4jXXbUe-zhjBMw>0FfPCH{8ar!4y*SND1R@<5^?ZO1o z4JbZVON&V6=>*d70u`BQm5QVSoSl=EnKHA|o^%{&Y%BWN?yfhp&?p|9f?PE!Gcz&scv{_pjl=klieXNqb%fjVltGQ|%?xJE9?}Pz6c1+e>*iV3$&a`kc$(J2JntL%fGkUY& zUxg{)B&(b9MH0oxl=Igdyd+SU+sH}achnw8``$NrA*K^|%}a3}s^nD${k556uNgPt z+$Wxr!a87I^IgyL?$@LFy+x_#H-tKarb#}x4l{(eu=5_E@{)S1sdG$MATfe(XWJN_ zJP~p}#f?2Z;i2>e*O`s?D*^y{6@Wfq~-SGi0(mU%7wcP+2mPJ>^_Is<>By|QcgGx@1LTU{yuG@zj*^icDstEB# zVKo^D^=Tw(kzqv-?PSW}e#ZANx!(lUJ`J5)AubU7aCalB$fTZ6&6Xrn6##e{XmvN(PV2Oc^bfZ$p>7`G{=G?k|MTsAjokuQmUN;`dYBtR5@Y>97^hH0!(+^Z{c;EUf zAC&l3*Vd9I(-?0))d|mE!e{upkc^$-BT4e0x&X#@Cdufo+e9xBe>C13%eoAkw`Jd= zY!Veo6Mtdjbq};B4eAvq@uG>b+ssO8P(5C?7rN`GX_@~)KX86*ywTS)wG5f*f0~R6 zX0DAiBtaR#008hHcl_b#?M#h~?CqF-JFxup_^Gjyk=e|^fMbdwFM(#PDhF;svXWP< z$>|fO(^V{@IX|mZj$J#*3MI}Z>X;PekhbGtS3TJLw{DU@bJ$u15NfGGL1y&*O zvmg5=IKvVvJQJv~V#0!QE4>px&hoq3W=r+~?%uG6&&FMrx8t~%eDtmKT}Q9;*wk1e zBOQgc!9Hy3RFoi0QROe6MmJ=74|!20YJ7!3*K$6WCc$uhJj2J_V-3i%r*77v-w#XC z>lAs(&By}yBNQ-SrMFmAR}?4g+~JvoBZ!B+^L28K#=ql`lCm~W1wFv_o%5WPJaDBc zcbDa8J~`>Fg=@@)tpb)6`g+7dNlJ@1P!l|X>`m=~BSvRwrq6zW)4HdG)w=ZV@81U$ zv8Du^*|H&%RH@ddn~WH-7CpvpW??wD`xUhcX-280CQ3@}*s{Ry)O!25y+cT!;unCv z@+N0N3Ur_Dwg?Jfnhgc+cEiEM*f3p|!_y%DU=u4lIxcuU`AV>i;CMewht2pl1=Vcp zgXIRv*fpBy=`twO=0x%CLb`=u*(h#!w+_56f51LBl8)xS!Mf+g!&bYFf2J zvWi;YN^i`d6O~|F4wcqW6XC(FGsv}X5y`rXoi;mXKNjYYytjk+Uf zXsIlzhpk?>hU8CplwS2SF>C2!37T=< z1@iO+tTk$mJDO=h#B@I#8qsQBugBjdD7}Y3Th?H!n28Xy%EqMwnjrH+>Di|RCGJ9gXbK5Nt2K{N%hK$ z3JA^Wq8;Q4gRJhPpS+s-(_s$k~F*n3XTANF*D1o{tPaLTqq{v zXED#cT_YAIMlQgF@WK7$L%O2%kngegYNt8vlMj6w_uzVbbq86;{b3RIA1lz>nNdW% zD1RV~s$oMbO$3BMh3Fzq%90nn;KB`V$@k{AomgyIEggtPV$&Yc7o*}uLnC0m?cedf zZao*E2|@bOJixcoCoQ2e_(I%4p^P3+l8jM@%WFQ(a^Kis{y|=o`MKKWE_(P5LL9nQ z$Gx8e(wW(XVO@N1!2{vHIUu>NFL~b(AgLJn&nn4p4#?ir$kK@ExBYLv=Rjj9lCT!1 z1)=vzU{HH{aK}xLYc!wZ^2l{HUVB4AGA>YO*jhlTfest$+4iKg4>V{@+Gol2RVciv zH+eW(0d?dWt+XrnmDYqg zeDg(m46LW7HHHCPt-g91vOAKiff}kui+Ti$EKl4D-Xxy}{Z6>^6}y=@iaoW|o)12j zi3ZL0uHg}wh$wTe5762lrY}AOah1)O@M>AYGC^rU(~-X z$uwSL*u4GR^P+AGcd}%(wpS4FNlSBb3o~H(K*{(1YAiJE1}#_-JK6TZfKF z-5DknPj=X8Y)GwPad1qt*SAWTx^cqdwnPt&NdbsDzca2(@0@knr4gQC!vgOO|GL=J zcaobDnaA(?FgH}1HRrXF^WkS~YOVHi5_l+ookjH8r|z|D@0FP9EjXEt;ixUY4Vh6D zhbDx~DLO$N&$FShZQT~<$BgH??x$-vEu$FPVzkOeeJ|Dw)f4VkkG<}fb-jWf?~Yp@ zPBt?ZoYlKqZnuwhJ?<9e3xjgiKCNwLw76beykmO$5p?`?nk(!kzXHPN`^*x(U%We5+#YU$y{3?M%WfjM@YML z3^3pve4h&JneY%RG@3Es#?tx`Ae5mv*)s`>K}yr`Q9*n$j(1<_hynXfvxdtv^ft9F z-Bp6o;w3%uAkhZ3zq)Z_J5pJ zoR?xINc1Hvb;|@*1kG$=Rd!1Glcu;TcwPAr<&s-(q8z-M>9~s zB?cLa?iv@_PG3G6yhpkQJCg)|FliAH=DQEPt&YWecm5K-GP+eMPMCD>`}MV7Vy1w)f-6ZbNU zVF3^kJ$2m4>Y{yS=Nqt+$S;3<)>cnkyXLg(bh#PdVXi&Qw@_AIi@&C7E0vjgKvgS?*TvQC<%-ZGmRlMI z4$0Bh<;`30m8==?jnupydW^|PQqWfozeAmM?(fzsk}}#crX!iWXP-o!&;4$;2pp~C zAX7{pq*AntGPQ))6&5;9Z6d*afe==s)?zdDk;Z#&n(kyNV#Ts)pKTAHVm8{3*rW6z zuFiE``!MxtZ`Y&Sa1+tHq)S`giFKwaGCzY6`76gswP-shB{E%#|7kqv#1IzT;bNa~ zwdh5=Vzsv~x2hDD&faCrhRv#Rh`wr`CQ`ZypAh#3PI{EG_!Nkn7G%tM=!!hc5jemZ zuo8W{h+IWU)G!#=t9C!1lb|BO*7>@h-l|e=E8`O_IWXI1W@4lT6(Ql%%b4i>*71kj z7~~7zyWD7)vUweJC9$AZ)L8*Q4Ra6#mx~E z_(ir=`$D>dw~320GiH``S$vM6S)g1TZT7|Q=N+mym_=Ek8pV|h9=zL*?0sm^Q|eSp zO_zxUII-%Jtm}(B#j%cjX3B1nF9Zv3S+8a-HD9JCIM0ux+s<``&-GAUJA0(IbMAkAHP?sK?a2+rcE+&dbm6wd5< z<}U6`(Kd-?7nEcTBLd1eCT#+_6+7g&~Y;6DYZRw5T0^g zc7Fi+e=H*z74h0w@uBch<9xQK$3&z8-;t?a7}Q~$yZGgT)~}ok#Z93)WqoOzxSn|> zlb`5gPel1R5uo(wiXdL6g}s1vKHHNMP3+<``by)yR-0z{a9th4%J@nB6~(`18rYf7 zW0oL^sSPC9qy8S~?d)AFjO>1<7uBkk;5laCBOmCg?Z*`>6A=EDq^cB!>Rz6t{djY7 zCsdJVh=p)R-osT|ETC|%$$^lhl`kX1?TC0eT8rH`n|CUZCTZ=2yfwIAC|<@&>3)~* zDi04|+EDUa3~LvH*@@BRrL6ve&%{)MQW!ue85>+uvfT_0Wx(mwDoB>%ER4hLY*z!j zE1OG6turDWi3>8H!s%f;A=)Y4qXm=R>b-Ldz+|hi7~-r7!bPS~90YSHfhxBIz9RMH z2*`4dVVIq>NSJ%zikAz~Wz)JreQW+gt2VlAZ}K=u-Gz@7r5l9Z?Fr=VYZ@yPA-GFE zN{U4{k<86uD^Pd~Qs#lqDuq2mC?qyI`Y5ovL?=D?yqcPb9^3+ zIOn1@rG|g*V_HJIC@BiN9&}XPv>>(g78xFzlW946_f?vo>=WS+X4EG2e9jTS%QJL} z8XElG5F1ZgyA9fBf%HCCriBSy778uR{F4guNF@{TITv>US7NckcwK(To`lTO(^83} zU&MXV64Gd-IZNoVwX24vA2d`ut~At zbRvI#StG-O0#ChTgA{T;fL1ooc~7Ph#Ov+Qb!+#2Qib}SWbvc-@<5JUEk>car**_A z|7ikUIbqz2B$Qks=?n^u&R0K$#L@S>WYtS7R!Qz;9s&$0c7ibZ`3|v#3>P$LlV5Xi zzT3EYam$>#JftUBP?I(+?NiLt%?ssRH#XbV2Vp(;W4|00SZ`yR10}4LafCTlZORh6 zOnhLu=%yfWt8%V5Upu|fuNyQG#Mbg69PDZN^zo1rA*ADU!TQtZdifga7Vi1XGZ~lty=K|0QRkye0eBp-nt!*_(!q-$KruTX{V6Z!6v^96t@qhwB{61ZHymv&G-E6$FY(2(pM!=Tr|Nqmk!;ZFk- zDF$LLg(h^4srKI`I!v2@H5j-gEr@6ocD2b5&m1O^4Pi4PsfJDMJ|#l7j#C!5K}NZd z5P^xQ!YJgIU4-K7Q1Aon(#vJRJ~_X@(|c+hrNPQCSWvu^6JDT6snQ`@M9_@r&I4r` zPj{W%VBOcaI3IlpjJI&=0^s1A_~U2FC9S3RuY~ktzUE1)AuKL*AZ$6%hP&V5WJ?cA zpT*g!XoVpOIfs+$-#@stY7i48$bYBDgFfL*$Ruei8`I@>cUg94+386d2>V3MD8Zcq zl=mj@Fj>yJ{@2!CRc%~ZGQ{x6AsH|5uZE{*ZT&yHgBaW&TWU<3)%?%?7R)7D;88@X z)vG`OHN_l4*Y_0w8&?xUZd@wqz)pg`bQAFSb2`iH!m7h+!oG~#n~<1#-WtYz7Ait_ zvV<@#!yVazVt#D>cb*Nm~?)t*w;*q%1ya#8Ol{_nx35-I~<>yZ)V=Qnk>FUpe01P zjJyY>_kJ1PLPq1FdT&f2SiQ2v*=L4)Ubr2q7|1JvoQ`L0ni9j}sGU`CyhhBB+vIj5 z>#rzzlpM#BO7f}avP$P8Dv=gD8ax&%a$;&OWzep8laItxtIlwRcp#E%JB?oC@G7f= z9OqK1$-`862J2NTAlur zDHrAcJ;Xn1)xWa*T4MT>g$h#jh79G`g43@Azb;+>BtXaijo{CP?61&YgZ-aSJfh#B zzlQ!_8U7wk|HK0THxPz@#MWQofA@)hh1-(+1^$PJRFH;)%q{@%4D$1a*rX8o&$Isn DEn$(- literal 0 HcmV?d00001 diff --git a/tests/fixtures/tabular/data_invalid.csv b/tests/fixtures/tabular/data_invalid.csv new file mode 100644 index 0000000..2199d4a --- /dev/null +++ b/tests/fixtures/tabular/data_invalid.csv @@ -0,0 +1,23 @@ +s0;s1;id +0.0;10.0;m0 +1.0;9.0;m0 +2.0;8.0;m0 +3.0;7.0;m0 +4.0;6.0;m0 +5.0;5.0;m0 +6.0;4.0;m0 +7.0;3.0;m0 +8.0;2.0;m0 +9.0;1.0;m0 +10.0;0.0;m0 +0.0;10.0;m1 +1.0;9.0;m1 +2.0;8.0;m1 +3.0;7.0;m1 +4.0;6.0;m1 +5.0;5.0;m1 +6.0;4.0;m1 +7.0;3.0;m1 +8.0;2.0;m1 +9.0;1.0;m1 +10.0;0.0;m1 diff --git a/tests/fixtures/tabular/data_invalid.xlsx b/tests/fixtures/tabular/data_invalid.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..1fb2882ee198a5126a48fa4aa5935fa2fa25b00a GIT binary patch literal 9383 zcmeHN1zTI&whd6MxE80lI|V|4;_ggr4EFEiH727w;4!*4M~^YAQrYq2MmJULIsEb44+8Uw=mKdPce`VV$# z7!dQaeHz%O>3l|*;Gm;@l#5F&%t2^q7;TmTNV9M1Rpl066OpYTvcSU^^4rK-7|_I8 z>2EL>y)lMeW)F#LM~95BAbjlLB~#!gsw<5+E7R$ZvtsJ>()04@q>qU_Q@&~C z!Lu-A(aje2rwEw-0#LS!Y{0MNw4LzodxcjZKXTmj9CAyuhC|Y~LTu8S9UEt&NI+@B zyjnPrEv^LQWeo5s9vo`s>ry%}Ch@W@nnK)sB60PIdx7=6^|VVAbEu1g+B@`Mb@2O3 z&;7|Q-N3_>l<&Tr4+sFj<0BkE`7gBmputXc2Aym2P}ZS9X=&(SYVF9z`m_Bn9sh$l z_@}>Kk)WW|%Z?gyBz+e;csU1&!xWWs6_Nf(q3+`+vxM;>x`3J((n&{xsZJCKC*|Aj zb2q#Q5s2O$q_|k;u873OeM!~mS{aghWABW}Nb8UyXO4gm;r9GCh zytyP#ZfJ!{a^^(57IT92H4!pSAxQ|n;5&bveg*AiqpK>IIZ?HP%8;5S-rU{9i45QQ zl%nrwufl-x`_u361|5yezgBq-T2q`~6KSYf06{fI*$(`a?uI7TU8mw1ojCViEQ*b-%TR^-J4q1Uf?ZPJ0Dv>7lwm-7 z#?6||73^ST1O{9E)U65)U2p*(u8$$;5pF$e;TwK{tR%Hxqw32t&UY@`piMvIWd~j3 zbd$2{BTsqJ1x2ZHYjdjgy|q)<@#~nDyP9&@gZS_mUgz9IlnSc~#f+%=4B^K%SyZKY zewn?f6ooNZ?+O0<-u=rJ)~0ATE#9#}1c39io#3R(SmjjwihPK~OdXNS4@q_P9(8Nw z`KOZgRd3`qX*fAtR3zLh$uYg`(IpeN1x!^EFYwB@V8m+@WOG;W+72We7zGil^4Igg z(G8_Kep;sqBlmzZD~(-4n_bCCXJp%>u!4gp0<3q)A^jvu0hPQ`8UlC<^P4|lbEo{z zh#!$9gW8^UAKIXfi`B)yiPhUW?vrgkGTF+mSu$r2@Fk4)Ye1;H!fbQR2h!OV34I)O zA38*zp0il=d7nJ2UTQ^iV3KJ+R41I%)$q0MHA+5sTafK->YHau&fG7Dt~D(PM?i+d zcu4L+7*04D`2EA!L0BmX;pwuC7M95T0ypR7>BKe9B;cOTr|chPqaXys-@qE?6_zT^ zLs*i7KSy#-PHm%SO8HLdOnUTAYT=Pu%C)Y96;*Tf?SgM3MA|>x_F~F}NrXCdBnqxl z$;^ApzI%8-;meN95bz)=5HH_zHAMd zgfxrQteoy&-_d#95tcpX5ngsMDb3Ni4Sa3%#E(z6{OD<5KE^Z2vL3*DYj2ru*-FZD z^h`|#SFVg?M{pxVodffvYJlpf zi$i;gy8K5 z;*GSGDP9K@VI1G<)OjhsoSg2aSiMfzUpo2r1vbJ(6uXyJ&3bgZ%7#zH2#ABtVnpXo zTfQ{0;tq1RaLbs=TUBSla5VfdWPjd}Mvfoz&O^iHfm8Jzu;U&alGAmYkOj(I$^tcC zxz)D@Sp* zdJ3g(D^%x*07x)U3jeRv{h7%BmOU8gDioRs{Q4CuTE@~ z`x<)~NJ9+_i?kG6K4&Y$jIH`wpXJ!#z#;BOV*@UiFVNTFaL&7#N+PhIc;Hwcy@Usk zosPjF868xT1xUf;VDInll^>v>r#s@b2qg?MXXEmHyP~Hd3@s?46hCX34&k;OXLshb zbetp|hNk_IhE2blAhrFg`A<#J?YF9f|poSugcN|F0ABsgy6zx$|hwB{swJIv6z_=9=m z?8t0$XkcyyI?{iiGFSL%13C*CxG7ZudMHAVQT8+$oA{R@iYBrCg@siuww?V zJiB;>)c*2ECCF$!X?6Cax9-Ia^T>vlcwJk9gYnnLLagsge>=>PR zK`lCk)ENtGRoE={5Bog8`}2BKvn0NWkLgS^B8p0@J2O8{i$8ULskDL-5E0#WSnyae zj{;5we6uz3*s&|-&~%KgcInjv`_FGk>D2O}7Rx(+o#LXXzhsx6k%qCNav|dP4bf6w z+PJGqZvQyh(2Q8z0y(@9CV)`oC&=E+AQg&7?wigKjxYsx#HtL#19kK`goY%{_E+dZ z3>Ef8Cpgsgr=v|5+t%aF%?Y;mE5YHaW^dU-QM|-HkrOj`G}o>3YW)!Ta`u$iCw0uF zZv1;EW%zJtLsY=dbuFr<3_r@Zy*Xw#`PVWWN;&gu6?aOhkvi*W7*%1xw8iE0OzS~) zTSlmpU}VJ0D%$MVuY~=N{V1_$#DtiP8+*H-SqFzXZTQ0s1*dw_3zug4gtMO=9+hy; z(sx%89qmOL0L^YPXz*N>3C^WHcSxx8%}yR?{a6`WV;WT0t9>bPB<5Ck(||z7{(*0l zTJqiNU&H*XNlMYT4P?g*s>ZhW>*3#g{iM`|HGp0v{XE%8pX&g^k6Dmc7M8hnJ?GB8PU%&eaUv zS(yYMJLe^mSN0ge8)@Do1=}2#d}blFnZ&3sqVhx7xLKYvim(mzi*28K@vwQG;8%$8 zFi%E!_?gy&8C%uGQz<-_I*%19N<72NR@BcVvD%TRHZEiuN?!iD*2HQ@o1)3&QE9>) z>nPpHqV#x{&x^b>~U~qi5*eqrM|k~ zQ#6MNWtj0MQ;Z2fGb*bV8&lpoSul6=N{V>)bZC zw&m1@5JtT(Mj%B98g<||2o%HqK@qoYIsp9)Cx(4U5mOK)UH8%Fx@Q-12 zim65KVMi7BrTKw4sfi1#IujfY6K;q!t3X*o3d9fVEcWAfn1QsfRgJ_WztEpBlB5+x zM<-&x8Q$@`>N*o<2uCjK7!g_>l9N^+C6#hku4X2XpqESw!(uSy3}0baO@d)A#t5MVu^5ZA{sIwZ9U` zzRp-IaT8uA;^3q3sQ%~C9nZJG$ztA%Lyxs&{Y`0^q!5E~J7Lw2Ot>&lw`b-2VL?-J z{>vWp5eOE32rZkj9B-%;9>WA2B-7U-BHAB>6O3HhxMq(8AHKB@TrS5sUM7~O<)Khg zZ^_J~9A1%84n<9X>h?X9Xg6dR#Z=c!VhEL_=XG(udpjI$#2&80;l-ytk5k%&IrNBE z{Vwu>(VRVMi!?joiI1)wmN9&jk#-h}7qW-3CYpDrb~J~AK+-C~tdI`#PL$gvkEIl< z6P@g?KOv5}4#U?^;}dYvaaO=Lu=;O4pT7wKc4o#gZBc|229URAgCE*<+dpb}#i4L~ zkZPpncEsE{CJ_Ul)3L~H!%nw{oM(n!C+pXplUVwajB2Jsr0XWyDYt7!zIQ8z zzM&7dN1gY_TRBT^+Wnn3+ee1pw-BY$&_d0$^{t#vkMr}_Y>z)ej~-77#XOZ(L4-ni z9Pv9rdietaA&A^XHP?xy&F}iCdu9{5uy$NZ$Vvxcvnx0p*KYcF*3@9M`{COj^F6Br`)2BQ*#w2{usXm*6tB(8(%QrK@KP9Wb#X zzcKWN_sAt+2A_fNGBF2cyd_Ib=Z*Ps^nL`3=BUgL%z_e-vvmB`kw~Wr?&@5yp1js= z1o}kWWVU2`NV8f~Goy@>Y|;g3o3+KhemcOKj6+gi*Bx6Ep+`OO*+{cL`aP@?8}fz) zH=Sy$2^q56a>5L`k+ij96M4O}HC1r_Hfxqt+9{{Q-~=L8j2fMJy140n@edMF+yb>K zy<=nBYD{kopROST*H?vo4wrj4-8j;Arm_-#JBFG)Ya_Qoi+lEC_-V~`@=AT0E(gfF zQ85pepx_HE3RJ^&AjQs5F*<^Gwhj-Q^sBJvupG(8t74Y_D%Fxgh5&%u`>f3FNn z7r2Fgko8->f?6TKXnWUUQK3%eu{kgI&eG@S6)a4$k(>o;1GT6PP? z8B%L(OhU#K8C!}Lt%WMrjfEx}UyeN_L15clQ+6R3o!_KAFA1<<>dCShLC!ui8RLN#cT+o202Y!NkuBHRC(* zK>5NOGQtHES2l=Fbw!g#pqMFZMM_;;msD{@o|(_dNMUomU*`My{OV|-5Vfv}u>yFH%eJ618W!Hy{EPi7rBxYM!yABBeLnmtSmjsWVgD7N;>B<_k1mhbb6? zU{^@qrA{-egd~}j-f?I@=kMJ0 z$SZdo#fUw%^`r6Q5oD{Vsm!fktcQ259g(Pq|A;rf@WtxBjHNC43rW3g@Yv`4$i~)% z%#u9=$Y=#=ir@#C-hNfP4^|R<56=j6w)fe2N801etJIf4y?8pv3+Fz2ydLKwUkKFi zT#VIA=XZSyAv<%7?UDufQAGZ)_Cs^v1o1wJP~Coei&`vVo#lJ|rr)*0CyW=-z|~Bk z%Hh;mY|d@P>mD;GrkZ?G+;?-;pUPj8@9FMaHWGD&-dyd{&|b4bNZC1KU=0w}Q@J5y zV|kmbm3=k$6-mrMbj>sgpz83FDA}Nsr-Xa4z=scA@;nb?we3!?TQ_RFrG;g6`ndIy z>eqtfcPAA$_gTU+ba!bF6??S*6?#V}cWYC}pL>J`4IA(RJLZEB=&}39B{v%;0=7pQ;uox=lZPmxy65Q~3TxiSkR3ngDEm)ss`iQZm!S7~!>LCb`jP4Rj>TSQqv0 zmGwX-BK#$KJIo143+{SznuKTm7L{ZW8Hpzwp@$XiOR~!^Q4nDH*jD1d(`N-LJQDw4 zM{CzE=9>t-IK`l9WFQ<2xA$Rm++=(j!t8%(QJMm@R_^S0HLI+ITsf2c{`@xhQZiAD z;8P%q4>7ykXW7)rGAaM8lq?20zDj0X{ra)b_c|KAmpa-g6F@mxNgi43LlfZg&a*g0 z5ujm<%Y&X^w=E;JE9J9`MtKfY1iBr2vI|`jpK|kkDH;!7f>U4MHkQl#} zk@t#CSfy4zcF~isPEwd^h?7=jU=&NA&!aLJdb!PWC69v$dRi#gy!4DUTzvP;Wr zRcfT`x9Q4Ll2q@=6ZS%qnT6PmHT6W@$Xcs^)*fMEr4nKA467<=^ zMZ06)|5i&yKEZ;M#N|G_TQWKMl(PGRPUcFA=I+$j^n&!CR=n2doYdt|0^CC1xc?%8 z#ajnc6E!CXkgfSIKA6OaJni{e;t6m?s&4|J;KftxBV`L?U@lA{q{|%0OMt-=&s0;7 zyve-OUKv#%@;OMG9b@i4UD1VMizg*44>@5A+&5VAT(2Pl(WvmA-vFW zoOyeeSqK9%U4fM4t4clM26h1#(F)R%bDt=3E~KNq z0b)7kbsX=B{%X91!f;=m)Z5>=ZVFx&CxCLY4NLVkyoWa11~4MiT&JdWN;y}MuYrDI z!oijv%q+0b?{|)^hbz6HV*9k=d|5e)bS1!u6&anhPr(@Pbj^avn&9yb-fC1FQ$-h7 zw?Ho`I}a5WX^WZu5w69NUHbd0fxT|V%k5x;cYMibo;duZ>xy3kFxGdL zfk2|gMui1!a;i=kHn9*_A_| zJkpwR$qoj&JxKxzUE^=@Lc8zpGq1iWsX84x^C+SICgz`K-dj7n|4uw;m;LL=Oz5^< z{8_GoyFd>)jLx*B4-wW>c~9)2RSU59FgM}HryPz;}JUO%2 z(yD7MU22C&Pn2c_Wf$hH)(V2Pyv}*U?v!$vc3r2N|2*ZQSPx7Erl2@VHi4Z*MgoV6 zetyZ(IvGo0yXUn+kc!M>J-{2=`-z6VVLOZkZnGGBklTX;`=Lz`p zE|h3nc5U8O46XL_I~LT=HPFou5BK`PS6g>&_2~&mIl7(ymq}q@S)h{e&yR%sd;I== z{)Y!dl;!>!;IGB&e*=G>Q=ugJQz`p*;O_;!KcH>UD*12az2CuqEhYQ`1ps`X{sR9$ zg@xba{O&LR5vdOK|9-^Z+~(h-{O&LP5#j{Ug8{)b)n;#UHEK-=V)N z{U6X>s2BDV`n&G`9^tQY`Uf5W7$5-v{wA)!!~dES{|px){}cRQ8B$pe9y+=Jz*FeU L@27rK{=E7h(H3o= literal 0 HcmV?d00001 diff --git a/tests/fixtures/tabular/data_invalid_chars.csv b/tests/fixtures/tabular/data_invalid_chars.csv new file mode 100644 index 0000000..2e89614 --- /dev/null +++ b/tests/fixtures/tabular/data_invalid_chars.csv @@ -0,0 +1,23 @@ +s0;s1;id +0.0;10.0;m0 +1.0;m1;m0 +2.0;8.0;m0 +3.0;7.0;m0 +m0;6.0;m0 +5.0;5.0;m0 +6.0;4.0;m0 +7.0;3.0;m0 +8.0;2.0;m0 +9.0;1.0;m0 +10.0;0.0;m0 +0.0;10.0;m1 +1.0;9.0;m1 +2.0;8.0;m1 +3.0;7.0;m1 +4.0;6.0;m1 +5.0;5.0;m1 +6.0;4.0;m1 +7.0;3.0;m1 +8.0;2.0;m1 +9.0;1.0;m1 +10.0;0.0;m1 diff --git a/tests/fixtures/tabular/measurement_export.csv b/tests/fixtures/tabular/measurement_export.csv new file mode 100644 index 0000000..e69de29 diff --git a/tests/fixtures/tabular/measurement_invalid.json b/tests/fixtures/tabular/measurement_invalid.json new file mode 100644 index 0000000..204c460 --- /dev/null +++ b/tests/fixtures/tabular/measurement_invalid.json @@ -0,0 +1,208 @@ +{ + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "name": "schema:title", + "references": { + "@id": "schema:citation", + "@type": "@id" + }, + "created": "schema:dateCreated", + "modified": "schema:dateModified", + "creators": "schema:creator" + }, + "@id": "enzml:EnzymeMLDocument/32912026-6dad-4c20-97c4-d0924c8a60d7", + "@type": ["enzml:EnzymeMLDocument"], + "name": "Test", + "references": [], + "creators": [], + "vessels": [], + "proteins": [], + "complexes": [], + "small_molecules": [], + "reactions": [], + "measurements": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "group_id": { + "@type": "@id" + } + }, + "@id": "enzml:Measurement/83505f32-65c8-44eb-a54e-07540deb6182", + "@type": ["enzml:Measurement"], + "id": "m1", + "name": "Measurement 2", + "species": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/e802b437-075e-4c91-bba6-5c178d7f93a1", + "@type": ["enzml:MeasurementData"], + "species_id": "s1", + "init_conc": 0.0, + "data_type": "conc", + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": ["OBO:UO_0000000"], + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/e1ec421c-95c3-4eb0-aa7d-fd8c8f181816", + "@type": ["enzml:BaseUnit"], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/f84a3b44-1548-4280-a4ef-6ead5fc9fd48", + "@type": ["enzml:BaseUnit"], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": ["OBO:UO_0000000"], + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/7974d9a4-3fa1-4c6f-91f4-d22a0af85655", + "@type": ["enzml:BaseUnit"], + "kind": "second", + "exponent": 1, + "scale": 1.0 + } + ] + }, + "time": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 8.0], + "data": [ + 0.0, 0.2, 0.4, 0.6000000000000001, 0.8, 1.0, 1.2000000000000002, + 1.4000000000000001, 1.6, 1.8 + ], + "is_calculated": false + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/00e58e3d-60ac-4501-813f-b6386398a8c1", + "@type": ["enzml:MeasurementData"], + "species_id": "s2", + "init_conc": 100.0, + "data_type": "conc", + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": ["OBO:UO_0000000"], + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/e1ec421c-95c3-4eb0-aa7d-fd8c8f181816", + "@type": ["enzml:BaseUnit"], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/f84a3b44-1548-4280-a4ef-6ead5fc9fd48", + "@type": ["enzml:BaseUnit"], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": ["OBO:UO_0000000"], + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/7974d9a4-3fa1-4c6f-91f4-d22a0af85655", + "@type": ["enzml:BaseUnit"], + "kind": "second", + "exponent": 1, + "scale": 1.0 + } + ] + }, + "time": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0], + "data": [100.0, 99.0, 98.0, 97.0, 96.0, 95.0, 94.0, 93.0, 92.0, 91.0], + "is_calculated": false + } + ] + } + ], + "equations": [], + "parameters": [] +} diff --git a/tests/fixtures/tabular/measurement_valid.json b/tests/fixtures/tabular/measurement_valid.json new file mode 100644 index 0000000..ed462a2 --- /dev/null +++ b/tests/fixtures/tabular/measurement_valid.json @@ -0,0 +1,523 @@ +{ + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "name": "schema:title", + "references": { + "@id": "schema:citation", + "@type": "@id" + }, + "created": "schema:dateCreated", + "modified": "schema:dateModified", + "creators": "schema:creator" + }, + "@id": "enzml:EnzymeMLDocument/84fdaf73-0c33-4eb6-adc7-7f17b1523b4a", + "@type": [ + "enzml:EnzymeMLDocument" + ], + "name": "Test", + "references": [], + "creators": [], + "vessels": [], + "proteins": [], + "complexes": [], + "small_molecules": [], + "reactions": [], + "measurements": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "group_id": { + "@type": "@id" + } + }, + "@id": "enzml:Measurement/111038ce-6e37-44da-a715-611c9b869bc9", + "@type": [ + "enzml:Measurement" + ], + "id": "m0", + "name": "Measurement 1", + "species": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/8b78f5b5-25aa-4793-8a57-c0d791303f07", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s1", + "init_conc": 0.0, + "data_type": "conc", + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/b943545d-894b-445c-a745-c1215180ec8d", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/c85ac147-42ac-40d6-bc03-172be2f0d7ad", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/8aec2395-2071-48e9-85ed-120847dfe64a", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": 1, + "scale": 1.0 + } + ] + }, + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0 + ], + "data": [ + 0.0, + 0.1, + 0.2, + 0.30000000000000004, + 0.4, + 0.5, + 0.6000000000000001, + 0.7000000000000001, + 0.8, + 0.9 + ], + "is_calculated": false + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/e2fd62b6-88d6-4d87-b8df-a3747677c2eb", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s2", + "init_conc": 10.0, + "data_type": "conc", + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/b943545d-894b-445c-a745-c1215180ec8d", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/c85ac147-42ac-40d6-bc03-172be2f0d7ad", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/8aec2395-2071-48e9-85ed-120847dfe64a", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": 1, + "scale": 1.0 + } + ] + }, + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0 + ], + "data": [ + 10.0, + 9.0, + 8.0, + 7.0, + 6.0, + 5.0, + 4.0, + 3.0, + 2.0, + 1.0 + ], + "is_calculated": false + } + ] + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "group_id": { + "@type": "@id" + } + }, + "@id": "enzml:Measurement/996cb565-edf0-4b4c-871b-d9a288831c88", + "@type": [ + "enzml:Measurement" + ], + "id": "m1", + "name": "Measurement 2", + "species": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/3c413494-54e7-4ba4-aeee-0382d778e0c9", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s1", + "init_conc": 0.0, + "data_type": "conc", + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/b943545d-894b-445c-a745-c1215180ec8d", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/c85ac147-42ac-40d6-bc03-172be2f0d7ad", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/8aec2395-2071-48e9-85ed-120847dfe64a", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": 1, + "scale": 1.0 + } + ] + }, + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0 + ], + "data": [ + 0.0, + 0.2, + 0.4, + 0.6000000000000001, + 0.8, + 1.0, + 1.2000000000000002, + 1.4000000000000001, + 1.6, + 1.8 + ], + "is_calculated": false + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/7af21a16-9cab-49e2-9250-278a4a57c91f", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s2", + "init_conc": 100.0, + "data_type": "conc", + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/b943545d-894b-445c-a745-c1215180ec8d", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/c85ac147-42ac-40d6-bc03-172be2f0d7ad", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/8aec2395-2071-48e9-85ed-120847dfe64a", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": 1, + "scale": 1.0 + } + ] + }, + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0 + ], + "data": [ + 100.0, + 99.0, + 98.0, + 97.0, + 96.0, + 95.0, + 94.0, + 93.0, + 92.0, + 91.0 + ], + "is_calculated": false + } + ] + } + ], + "equations": [], + "parameters": [] +} \ No newline at end of file diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/tests/unit/__init__.py @@ -0,0 +1 @@ + diff --git a/tests/unit/test_equations.py b/tests/unit/test_equations.py new file mode 100644 index 0000000..3556555 --- /dev/null +++ b/tests/unit/test_equations.py @@ -0,0 +1,256 @@ +import pytest + +from pyenzyme.equations._math import build_equation, build_equations +from pyenzyme.equations._chem import build_reaction, build_reactions +from pyenzyme.units import M, second +from pyenzyme.model import EquationType + + +class TestMathEquations: + def test_parse_equation(self): + # Arrange + equation = "s1'(t) = kcat * p0(t) * s0(t)" + + # Act + equation = build_equation(equation, unit=M / second) + + # Assert + expected_vars = ["p0", "s0"] + expected_params = ["kcat"] + + assert ( + equation.species_id == "s1" + ), f"Species ID is not correct. Got {equation.species_id}" + assert ( + equation.equation == "kcat*p0*s0" + ), "Equation is not correct. Got {equation.equation.equation}" + assert equation.parameters[0].name == "kcat", "Parameter name is not correct" + assert ( + equation.parameters[0].symbol == "kcat" + ), "Parameter symbol is not correct" + + for var in equation.variables: + assert var.name in expected_vars + assert var.symbol in expected_vars + + for param in equation.parameters: + assert param.name in expected_params + assert param.symbol in expected_params + + def test_invalid_equation_no_left(self): + # Arrange + equation = "kcat * p0(t) * s0(t)" + + # Act + with pytest.raises(ValueError): + equation = build_equation(equation, unit=M / second) + + def test_invalid_equation_no_right(self): + # Arrange + equation = "s1'(t) =" + + # Act + with pytest.raises(ValueError): + equation = build_equation(equation, unit=M / second) + + def test_invalid_equation_no_equals(self): + # Arrange + equation = "s1'(t) kcat * p0(t) * s0(t)" + + # Act + with pytest.raises(ValueError): + equation = build_equation(equation, unit=M / second) + + def test_equation_with_funs(self): + # Arrange + equation = "s1'(t) = kcat * exp(p0(t) * t)" + + # Act + equation = build_equation(equation, unit=M / second) + + # Assert + assert ( + equation.species_id == "s1" + ), f"Species ID is not correct. Got {equation.species_id}" + assert ( + equation.equation == "kcat*exp(p0*t)" + ), f"Equation is not correct. Got {equation.equation}" + + def test_equation_with_fun_only_t(self): + # Arrange + equation = "s1'(t) = kcat * exp(t)" + + # Act + equation = build_equation(equation, unit=M / second) + + # Assert + assert ( + equation.species_id == "s1" + ), f"Species ID is not correct. Got {equation.species_id}" + assert ( + equation.equation == "kcat*exp(t)" + ), f"Equation is not correct. Got {equation.equation}" + + def test_multiple_equations(self): + # Arrange + equations = [ + "s1'(t) = kcat * E_tot * s0(t)", + "E_tot = p0(t) + p1(t)", + ] + + # Act + units = [M / second, M] + equations = build_equations(*equations, units=units) + + # Assert + assert len(equations) == 2, f"Expected 2 equations. Got {len(equations)}" + + def test_init_assigment_equation(self): + # Arrange + equation = "E_tot = p0 + p1" + + # Act + equation = build_equation(equation, unit=M) + + # Assert + assert ( + equation.species_id == "E_tot" + ), f"Species ID is not correct. Got {equation.species_id}" + assert ( + equation.equation == "p0 + p1" + ), f"Equation is not correct. Got {equation.equation}" + assert ( + equation.equation_type == EquationType.INITIAL_ASSIGNMENT + ), f"Equation type is not correct. Got {equation.equation_type}" + + def test_assigment_equation(self): + # Arrange + equation = "E_tot(t) = p0 + p1" + + # Act + equation = build_equation(equation, unit=M) + + # Assert + assert ( + equation.species_id == "E_tot" + ), f"Species ID is not correct. Got {equation.species_id}" + assert ( + equation.equation == "p0 + p1" + ), f"Equation is not correct. Got {equation.equation}" + assert ( + equation.equation_type == EquationType.ASSIGNMENT + ), f"Equation type is not correct. Got {equation.equation_type}" + + +class TestChemEqautions: + def test_build_irrev_reaction(self): + # Arrange + reaction_str = "2 s1 + s2 -> 2 s3 + s4" + + # Act + reac = build_reaction( + id="R1", + name="Reaction 1", + scheme=reaction_str, + ) + + # Assert + expected = [ + (-2.0, "s1"), + (-1.0, "s2"), + (2.0, "s3"), + (1.0, "s4"), + ] + + assert reac.id == "R1", f"Reaction ID is not correct. Got {reac.id}" + assert ( + reac.name == "Reaction 1" + ), f"Reaction name is not correct. Got {reac.name}" + + for stoich, species in expected: + element = next( + filter(lambda x: x.species_id == species, reac.species), None + ) + + if not element: + assert False, f"Species {species} not found in reaction" + + assert ( + element.stoichiometry == stoich + ), f"Stoichiometry for {species} is not correct. Got {element.stoichiometry}" + + assert ( + element.species_id == species + ), f"Species ID for {species} is not correct. Got {element.species_id}" + + def test_build_rev_reaction(self): + # Arrange + reaction_str = "s1 + s2 <=> s3 + s4" + + # Act + reac = build_reaction( + id="R1", + name="Reaction 1", + scheme=reaction_str, + ) + + # Assert + assert reac.reversible is True, "Reaction is not reversible" + + def test_build_w_modifiers(self): + # Arrange + reaction_str = "s1 + s2 -> s3 + s4" + + # Act + reac = build_reaction( + id="R1", + name="Reaction 1", + scheme=reaction_str, + modifiers=["s5", "s6"], + ) + + # Assert + assert ( + len(reac.modifiers) == 2 + ), f"Expected 2 modifiers. Got {len(reac.modifiers)}" + + def test_build_invalid_reaction(self): + # Arrange + reaction_str = "s1 + s2 + s3" + + # Act + with pytest.raises(ValueError): + build_reaction("R1", "Reaction 1", reaction_str) + + def test_build_multiple_reactions(self): + # Arrange + reactions = [ + "s1 + s2 -> s3 + s4", + "s2 -> s5", + ] + + # Act + reacs = build_reactions(*reactions) + + # Assert + assert len(reacs) == 2, f"Expected 2 reactions. Got {len(reacs)}" + + def test_build_multiple_reactions_w_modifiers(self): + # Arrange + reactions = [ + "s1 + s2 -> s3 + s4", + "s2 -> s5", + ] + + # Act + modifiers = {"r1": ["p0"]} + reacs = build_reactions(*reactions, modifiers=modifiers) + + # Assert + assert len(reacs) == 2, f"Expected 2 reactions. Got {len(reacs)}" + + r0 = reacs[0] + assert len(r0.modifiers) == 1, f"Expected 1 modifier. Got {len(r0.modifiers)}" + + r1 = reacs[1] + assert len(r1.modifiers) == 0, f"Expected 0 modifiers. Got {len(r1.modifiers)}" diff --git a/tests/unit/test_tabular.py b/tests/unit/test_tabular.py new file mode 100644 index 0000000..821faa3 --- /dev/null +++ b/tests/unit/test_tabular.py @@ -0,0 +1,147 @@ +import pytest +import pandas as pd +import pyenzyme as pe + +from pyenzyme.units import mM, s +from pyenzyme.tabular import _measurement_to_pandas, to_pandas + + +class TestTabularExport: + def test_single_measurement(self, measurement_valid): + """Test that a single measurement can be converted to a pandas DataFrame""" + + # Act + df = _measurement_to_pandas(measurement_valid.measurements[0]) + + # Assert + assert isinstance(df, pd.DataFrame), f"Expected a DataFrame. Got {type(df)}" + + def test_invalid_measurement(self, measurement_invalid): + """Test that an invalid measurement raises a ValueError""" + + # Act + with pytest.raises(ValueError): + _measurement_to_pandas(measurement_invalid.measurements[0]) + + def test_multiple_measurements(self, measurement_valid): + """Test that multiple measurements can be converted to a pandas DataFrame""" + + # Act + df = to_pandas(measurement_valid) + + # Assert + total_time_len = sum( + [len(m.species[0].time) for m in measurement_valid.measurements] + ) + + assert ( + df.shape[0] == total_time_len + ), f"Expected {total_time_len} rows. Got {df.shape[0]}" + assert df.shape[1] == 4, f"Expected 4 columns. Got {df.shape[1]}" + assert isinstance(df, pd.DataFrame), f"Expected a DataFrame. Got {type(df)}" + assert ( + df["id"].nunique() == 2 + ), f"Expected 2 unique IDs. Got {df['id'].nunique()}" + + for measurement in measurement_valid.measurements: + df_sub = df[df["id"] == measurement.id] + assert df_sub.shape[0] == len( + measurement.species[0].time + ), f"Expected {len(measurement.species[0].time)} rows. Got {df_sub.shape[0]}" + + for species in measurement.species: + assert ( + species.species_id in df.columns + ), f"Expected column for {species}" + + +class TestTabularImport: + def test_csv_import(self): + """Test that a CSV file can be imported to a pandas DataFrame""" + # Act + meas = pe.read_csv("tests/fixtures/tabular/data.csv", data_unit=mM, time_unit=s) + + # Assert + assert len(meas) == 2, f"Expected 2 measurements. Got {len(meas)}" + + for m in meas: + assert len(m.species) == 2, f"Expected 2 species. Got {len(m.species)}" + assert ( + len(m.species[0].time) == 11 + ), f"Expected 10 time points. Got {len(m.species[0].time)}" + assert ( + len(m.species[1].time) == 11 + ), f"Expected 10 time points. Got {len(m.species[1].time)}" + assert ( + m.species[0].data_unit == mM + ), f"Expected mM. Got {m.species[0].data_unit}" + assert ( + m.species[0].time_unit == s + ), f"Expected s. Got {m.species[0].time_unit}" + assert ( + m.species[1].data_unit == mM + ), f"Expected mM. Got {m.species[1].data_unit}" + assert ( + m.species[1].time_unit == s + ), f"Expected s. Got {m.species[1].time_unit}" + + def test_excel_import(self): + """Test that a Excel file can be imported to a pandas DataFrame""" + # Act + meas = pe.read_excel( + "tests/fixtures/tabular/data.xlsx", data_unit=mM, time_unit=s + ) + + # Assert + assert len(meas) == 2, f"Expected 2 measurements. Got {len(meas)}" + + for m in meas: + assert len(m.species) == 2, f"Expected 2 species. Got {len(m.species)}" + assert ( + len(m.species[0].time) == 11 + ), f"Expected 10 time points. Got {len(m.species[0].time)}" + assert ( + len(m.species[1].time) == 11 + ), f"Expected 10 time points. Got {len(m.species[1].time)}" + assert ( + m.species[0].data_unit == mM + ), f"Expected mM. Got {m.species[0].data_unit}" + assert ( + m.species[0].time_unit == s + ), f"Expected s. Got {m.species[0].time_unit}" + assert ( + m.species[1].data_unit == mM + ), f"Expected mM. Got {m.species[1].data_unit}" + assert ( + m.species[1].time_unit == s + ), f"Expected s. Got {m.species[1].time_unit}" + + def test_invalid_types(self): + """Test that an invalid CSV raises a ValueError""" + # Act + with pytest.raises(AssertionError): + pe.read_csv( + "tests/fixtures/tabular/data_invalid_chars.csv", + data_unit=mM, + time_unit=s, + ) + + def test_invalid_csv(self): + """Test that an invalid CSV raises a ValueError""" + # Act + with pytest.raises(AssertionError): + pe.read_csv( + "tests/fixtures/tabular/data_invalid.csv", + data_unit=mM, + time_unit=s, + ) + + def test_invalid_excel(self): + """Test that an invalid Excel raises a ValueError""" + # Act + with pytest.raises(AssertionError): + pe.read_excel( + "tests/fixtures/tabular/data_invalid.xlsx", + data_unit=mM, + time_unit=s, + ) From 7622a8ad8f8ed283301f264935485bb3ea82431d Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 22 Jun 2024 18:03:29 +0200 Subject: [PATCH 12/80] only lint `pyenzyme` and `tests` --- .github/workflows/lint.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b268138..07613b1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,3 +6,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: chartboost/ruff-action@v1 + with: + src: "./pyenzyme" + - uses: chartboost/ruff-action@v1 + with: + src: "./tests" From ab29d57ceb50430e4ee2b90fff5496ba7aeb7787 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 22 Jun 2024 18:14:27 +0200 Subject: [PATCH 13/80] add dev examples --- dev-examples/Readme.md | 12 + dev-examples/odes/data.tsv | 23 + dev-examples/odes/enzymeml.json | 1075 +++++++++++++++++++++++++ dev-examples/odes/sbml.xml | 184 +++++ dev-examples/reactions/data.tsv | 23 + dev-examples/reactions/enzymeml.json | 957 ++++++++++++++++++++++ dev-examples/reactions/sbml.xml | 144 ++++ dev-examples/sbml_export_odes.py | 43 + dev-examples/sbml_export_reactions.py | 44 + 9 files changed, 2505 insertions(+) create mode 100644 dev-examples/Readme.md create mode 100644 dev-examples/odes/data.tsv create mode 100644 dev-examples/odes/enzymeml.json create mode 100644 dev-examples/odes/sbml.xml create mode 100644 dev-examples/reactions/data.tsv create mode 100644 dev-examples/reactions/enzymeml.json create mode 100644 dev-examples/reactions/sbml.xml create mode 100644 dev-examples/sbml_export_odes.py create mode 100644 dev-examples/sbml_export_reactions.py diff --git a/dev-examples/Readme.md b/dev-examples/Readme.md new file mode 100644 index 0000000..c9c3843 --- /dev/null +++ b/dev-examples/Readme.md @@ -0,0 +1,12 @@ +# Dev Examples + +These examples are intended to be used during development towards 2.0.0 and will be removed in the final release. + +## How to run the examples + +Dev examples should be run from the root directory of the repository and will produce outputs to the dev-example folder. + +```bash +# From the root directory +python ./dev-examples/*.py +``` diff --git a/dev-examples/odes/data.tsv b/dev-examples/odes/data.tsv new file mode 100644 index 0000000..f99de1f --- /dev/null +++ b/dev-examples/odes/data.tsv @@ -0,0 +1,23 @@ +time s0 s1 id +0.0 0.0 10.0 m0 +1.0 1.0 9.0 m0 +2.0 2.0 8.0 m0 +3.0 3.0 7.0 m0 +4.0 4.0 6.0 m0 +5.0 5.0 5.0 m0 +6.0 6.0 4.0 m0 +7.0 7.0 3.0 m0 +8.0 8.0 2.0 m0 +9.0 9.0 1.0 m0 +10.0 10.0 0.0 m0 +0.0 0.0 10.0 m1 +1.0 1.0 9.0 m1 +2.0 2.0 8.0 m1 +3.0 3.0 7.0 m1 +4.0 4.0 6.0 m1 +5.0 5.0 5.0 m1 +6.0 6.0 4.0 m1 +7.0 7.0 3.0 m1 +8.0 8.0 2.0 m1 +9.0 9.0 1.0 m1 +10.0 10.0 0.0 m1 diff --git a/dev-examples/odes/enzymeml.json b/dev-examples/odes/enzymeml.json new file mode 100644 index 0000000..4493f3c --- /dev/null +++ b/dev-examples/odes/enzymeml.json @@ -0,0 +1,1075 @@ +{ + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "name": "schema:title", + "references": { + "@id": "schema:citation", + "@type": "@id" + }, + "created": "schema:dateCreated", + "modified": "schema:dateModified", + "creators": "schema:creator" + }, + "@id": "enzml:EnzymeMLDocument/35cadae4-2145-46f6-8f9c-a3a8c53829c8", + "@type": [ + "enzml:EnzymeMLDocument" + ], + "name": "Test", + "references": [], + "creators": [], + "vessels": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "volume": "OBO:OBI_0002139" + }, + "@id": "enzml:Vessel/ac7ebad5-c66d-43d9-9f5d-479bba9a2c8a", + "@type": [ + "enzml:Vessel", + "OBO:OBI_0400081" + ], + "id": "v0", + "name": "Vessel 1", + "volume": 10.0, + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000098", + "@type": [ + "OBO:UO_0000000" + ], + "name": "ml", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/df5d030e-305f-4876-95f5-6126133a0681", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": 1, + "scale": -3.0 + } + ] + }, + "constant": true + } + ], + "proteins": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@type": "@id" + }, + "name": "schema:name", + "sequence": "OBO:GSSO_007262", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "organism": "OBO:OBI_0100026", + "organism_tax_id": { + "@type": "@id" + }, + "references": { + "@id": "schema:citation", + "@type": "@id" + } + }, + "@id": "enzml:Protein/1c3d0644-1ce3-4afe-8f71-d24869188913", + "@type": [ + "enzml:Protein", + "schema:Protein" + ], + "id": "p0", + "name": "Enzyme", + "constant": false, + "sequence": "MTEY", + "vessel_id": "v0", + "references": [] + } + ], + "complexes": [], + "small_molecules": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "references": { + "@id": "schema:citation", + "@type": "@id" + } + }, + "@id": "enzml:SmallMolecule/2d122f45-3a5a-478c-8a54-11cac6d29c31", + "@type": [ + "enzml:SmallMolecule" + ], + "id": "s0", + "name": "Substrate", + "constant": false, + "vessel_id": "v0", + "references": [] + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "references": { + "@id": "schema:citation", + "@type": "@id" + } + }, + "@id": "enzml:SmallMolecule/56c68bf7-99be-40a7-9bd4-bf23a6b99b93", + "@type": [ + "enzml:SmallMolecule" + ], + "id": "s1", + "name": "Product", + "constant": false, + "vessel_id": "v0", + "references": [] + } + ], + "reactions": [], + "measurements": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "group_id": { + "@type": "@id" + } + }, + "@id": "enzml:Measurement/d2b94875-b8d2-4248-81b8-28d15eaebd67", + "@type": [ + "enzml:Measurement" + ], + "id": "m0", + "name": "m0", + "species": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/9fa84251-7159-4e5e-9564-f041a1030edb", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s0", + "init_conc": 0.0, + "data_type": "conc", + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "name": "mmol / l s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/0ff9ce48-32c0-468e-a544-b5ef6d6b33b6", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/734baec0-49d4-44a9-9721-2939a6e329a8", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "data": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "is_calculated": false + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/49066465-14a1-44bf-8740-f9b33fc1e3b2", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s1", + "init_conc": 10.0, + "data_type": "conc", + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "name": "mmol / l s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/0ff9ce48-32c0-468e-a544-b5ef6d6b33b6", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/734baec0-49d4-44a9-9721-2939a6e329a8", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "data": [ + 10.0, + 9.0, + 8.0, + 7.0, + 6.0, + 5.0, + 4.0, + 3.0, + 2.0, + 1.0, + 0.0 + ], + "is_calculated": false + } + ], + "ph": 7.0, + "temperature": 298.15, + "temperature_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000012", + "@type": [ + "OBO:UO_0000000" + ], + "name": "K", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/6af90bd2-1124-4908-a486-7c850350248c", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "kelvin", + "exponent": 1, + "scale": 1.0 + } + ] + } + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "group_id": { + "@type": "@id" + } + }, + "@id": "enzml:Measurement/a826bebe-669b-47d4-9dd2-727e1a25fa29", + "@type": [ + "enzml:Measurement" + ], + "id": "m1", + "name": "m1", + "species": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/fe8e5554-6363-45b0-b372-6847968cbb22", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s0", + "init_conc": 0.0, + "data_type": "conc", + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "name": "mmol / l s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/0ff9ce48-32c0-468e-a544-b5ef6d6b33b6", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/734baec0-49d4-44a9-9721-2939a6e329a8", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "data": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "is_calculated": false + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/a0ea2291-588b-44dc-b875-856eb3739ab8", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s1", + "init_conc": 10.0, + "data_type": "conc", + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "name": "mmol / l s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/0ff9ce48-32c0-468e-a544-b5ef6d6b33b6", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/734baec0-49d4-44a9-9721-2939a6e329a8", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "data": [ + 10.0, + 9.0, + 8.0, + 7.0, + 6.0, + 5.0, + 4.0, + 3.0, + 2.0, + 1.0, + 0.0 + ], + "is_calculated": false + } + ], + "ph": 7.0, + "temperature": 298.15, + "temperature_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000012", + "@type": [ + "OBO:UO_0000000" + ], + "name": "K", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/6af90bd2-1124-4908-a486-7c850350248c", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "kelvin", + "exponent": 1, + "scale": 1.0 + } + ] + } + } + ], + "equations": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + }, + "id": { + "@type": "@id" + } + }, + "@id": "enzml:Equation/7fd44774-3008-44db-9de9-59504652c44b", + "@type": [ + "enzml:Equation" + ], + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "name": "mmol / l s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/0ff9ce48-32c0-468e-a544-b5ef6d6b33b6", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/734baec0-49d4-44a9-9721-2939a6e329a8", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "equation_type": "ode", + "equation": "E_tot*kcat*s0/(K_m + s0)", + "species_id": "s1", + "variables": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@type": "@id" + } + }, + "@id": "enzml:EqVariable/77d04fd3-3ee4-4f0d-9c8d-ca9265ab515e", + "@type": [ + "enzml:EqVariable" + ], + "id": "s0", + "name": "s0", + "symbol": "s0" + } + ], + "parameters": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@type": "@id" + } + }, + "@id": "enzml:EqParameter/ee99a464-e1ce-4158-b857-fccdfadda000", + "@type": [ + "enzml:EqParameter" + ], + "id": "E_tot", + "name": "E_tot", + "symbol": "E_tot" + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@type": "@id" + } + }, + "@id": "enzml:EqParameter/3d89b7c9-1814-48fd-9461-4a1f50364440", + "@type": [ + "enzml:EqParameter" + ], + "id": "K_m", + "name": "K_m", + "symbol": "K_m" + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@type": "@id" + } + }, + "@id": "enzml:EqParameter/b8aa5a96-720a-468c-95c4-874a48b12f70", + "@type": [ + "enzml:EqParameter" + ], + "id": "kcat", + "name": "kcat", + "symbol": "kcat" + } + ] + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + }, + "id": { + "@type": "@id" + } + }, + "@id": "enzml:Equation/126f21be-e799-4211-bb90-3c5d6e8bc4b6", + "@type": [ + "enzml:Equation" + ], + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "name": "mmol / l s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/0ff9ce48-32c0-468e-a544-b5ef6d6b33b6", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/734baec0-49d4-44a9-9721-2939a6e329a8", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "equation_type": "initialAssignment", + "equation": "100", + "species_id": "E_tot", + "variables": [], + "parameters": [] + } + ], + "parameters": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + } + }, + "@id": "enzml:Parameter/24132890-1b53-4d3e-9060-1efc1cf0e8dd", + "@type": [ + "enzml:Parameter" + ], + "id": "E_tot", + "name": "E_tot", + "constant": true + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + } + }, + "@id": "enzml:Parameter/f07b469e-ecc9-4717-8d42-2e16997ef701", + "@type": [ + "enzml:Parameter" + ], + "id": "K_m", + "name": "K_m", + "constant": true + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + } + }, + "@id": "enzml:Parameter/4c3869a7-c11b-4cb7-8301-215be7708558", + "@type": [ + "enzml:Parameter" + ], + "id": "kcat", + "name": "kcat", + "constant": true + } + ] +} \ No newline at end of file diff --git a/dev-examples/odes/sbml.xml b/dev-examples/odes/sbml.xml new file mode 100644 index 0000000..6dd17c4 --- /dev/null +++ b/dev-examples/odes/sbml.xml @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Vessel 1 + 10.0 + + + + + + + + + + + + + Enzyme + MTEY + + + + + + MTEY + + + + + + + + Substrate + + + + + + + + + + Product + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + + + + + + + + + + + E_tot + kcat + s0 + + + + K_m + s0 + + + + + + + diff --git a/dev-examples/reactions/data.tsv b/dev-examples/reactions/data.tsv new file mode 100644 index 0000000..f99de1f --- /dev/null +++ b/dev-examples/reactions/data.tsv @@ -0,0 +1,23 @@ +time s0 s1 id +0.0 0.0 10.0 m0 +1.0 1.0 9.0 m0 +2.0 2.0 8.0 m0 +3.0 3.0 7.0 m0 +4.0 4.0 6.0 m0 +5.0 5.0 5.0 m0 +6.0 6.0 4.0 m0 +7.0 7.0 3.0 m0 +8.0 8.0 2.0 m0 +9.0 9.0 1.0 m0 +10.0 10.0 0.0 m0 +0.0 0.0 10.0 m1 +1.0 1.0 9.0 m1 +2.0 2.0 8.0 m1 +3.0 3.0 7.0 m1 +4.0 4.0 6.0 m1 +5.0 5.0 5.0 m1 +6.0 6.0 4.0 m1 +7.0 7.0 3.0 m1 +8.0 8.0 2.0 m1 +9.0 9.0 1.0 m1 +10.0 10.0 0.0 m1 diff --git a/dev-examples/reactions/enzymeml.json b/dev-examples/reactions/enzymeml.json new file mode 100644 index 0000000..7581d1f --- /dev/null +++ b/dev-examples/reactions/enzymeml.json @@ -0,0 +1,957 @@ +{ + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "name": "schema:title", + "references": { + "@id": "schema:citation", + "@type": "@id" + }, + "created": "schema:dateCreated", + "modified": "schema:dateModified", + "creators": "schema:creator" + }, + "@id": "enzml:EnzymeMLDocument/706dc08f-91d9-476f-bc39-14e26ae43bd4", + "@type": [ + "enzml:EnzymeMLDocument" + ], + "name": "Test", + "references": [], + "creators": [], + "vessels": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "volume": "OBO:OBI_0002139" + }, + "@id": "enzml:Vessel/f8628df7-14e3-42b8-a77d-7c4f92f1166c", + "@type": [ + "enzml:Vessel", + "OBO:OBI_0400081" + ], + "id": "v0", + "name": "Vessel 1", + "volume": 10.0, + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000098", + "@type": [ + "OBO:UO_0000000" + ], + "name": "ml", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/fbb3c11b-a165-4792-8070-dc241f31da60", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": 1, + "scale": -3.0 + } + ] + }, + "constant": true + } + ], + "proteins": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@type": "@id" + }, + "name": "schema:name", + "sequence": "OBO:GSSO_007262", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "organism": "OBO:OBI_0100026", + "organism_tax_id": { + "@type": "@id" + }, + "references": { + "@id": "schema:citation", + "@type": "@id" + } + }, + "@id": "enzml:Protein/86214cf8-977c-4fd0-8c1a-b142c32eaa74", + "@type": [ + "enzml:Protein", + "schema:Protein" + ], + "id": "p0", + "name": "Enzyme", + "constant": false, + "sequence": "MTEY", + "vessel_id": "v0", + "references": [] + } + ], + "complexes": [], + "small_molecules": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "references": { + "@id": "schema:citation", + "@type": "@id" + } + }, + "@id": "enzml:SmallMolecule/da9af365-0490-4495-b410-98183fe493ca", + "@type": [ + "enzml:SmallMolecule" + ], + "id": "s0", + "name": "Substrate", + "constant": false, + "vessel_id": "v0", + "references": [] + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "references": { + "@id": "schema:citation", + "@type": "@id" + } + }, + "@id": "enzml:SmallMolecule/378ca858-97b7-4eed-9187-2fe73959885f", + "@type": [ + "enzml:SmallMolecule" + ], + "id": "s1", + "name": "Product", + "constant": false, + "vessel_id": "v0", + "references": [] + } + ], + "reactions": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "modifiers": { + "@type": "@id" + } + }, + "@id": "enzml:Reaction/e29a838b-542f-4772-8936-087670816036", + "@type": [ + "enzml:Reaction" + ], + "id": "Reaction 1", + "name": "Reaction 1", + "reversible": false, + "kinetic_law": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + }, + "id": { + "@type": "@id" + } + }, + "@id": "enzml:Equation/6394e9d8-13ae-4b38-bbfb-c8d18ca9ab4e", + "@type": [ + "enzml:Equation" + ], + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "name": "mmol / l s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/64d34694-8942-4ed5-b922-3c928695ec43", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/6a9cc7e3-8777-4438-9a1e-d613cd5ee13a", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/d5995db5-1a95-4cc6-9513-b8a1770cdef9", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "equation_type": "assignment", + "equation": "kcat*p0*s0/(K_m + s0)", + "species_id": "v", + "variables": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@type": "@id" + } + }, + "@id": "enzml:EqVariable/30e94d78-a980-4066-8a91-11de93015927", + "@type": [ + "enzml:EqVariable" + ], + "id": "p0", + "name": "p0", + "symbol": "p0" + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@type": "@id" + } + }, + "@id": "enzml:EqVariable/a57075b6-3179-42ae-b99d-0c41de223f22", + "@type": [ + "enzml:EqVariable" + ], + "id": "s0", + "name": "s0", + "symbol": "s0" + } + ], + "parameters": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@type": "@id" + } + }, + "@id": "enzml:EqParameter/a186518c-17b3-4fde-ac7d-94bda76c6be9", + "@type": [ + "enzml:EqParameter" + ], + "id": "K_m", + "name": "K_m", + "symbol": "K_m" + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@type": "@id" + } + }, + "@id": "enzml:EqParameter/1cccb9f1-4edf-4cda-9e6b-04ffc4679795", + "@type": [ + "enzml:EqParameter" + ], + "id": "v", + "name": "v", + "symbol": "v" + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@type": "@id" + } + }, + "@id": "enzml:EqParameter/059857c2-eff4-42ff-96c6-5e3a2438f128", + "@type": [ + "enzml:EqParameter" + ], + "id": "kcat", + "name": "kcat", + "symbol": "kcat" + } + ] + }, + "species": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:ReactionElement/73385fe9-1d7a-4758-8053-c45382c1ad34", + "@type": [ + "enzml:ReactionElement" + ], + "species_id": "s0", + "stoichiometry": -1.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:ReactionElement/db834938-bd23-4e8e-a0a5-ea6f478b7041", + "@type": [ + "enzml:ReactionElement" + ], + "species_id": "s1", + "stoichiometry": 1.0 + } + ], + "modifiers": [ + "p0" + ] + } + ], + "measurements": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "group_id": { + "@type": "@id" + } + }, + "@id": "enzml:Measurement/b4a44b04-8957-4fd5-9867-d3836bb087d9", + "@type": [ + "enzml:Measurement" + ], + "id": "m0", + "name": "m0", + "species": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/1a8e21e6-77b0-41cb-840e-6240ac2ba7a5", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s0", + "init_conc": 0.0, + "data_type": "conc", + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "name": "mmol / l s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/64d34694-8942-4ed5-b922-3c928695ec43", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/6a9cc7e3-8777-4438-9a1e-d613cd5ee13a", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/d5995db5-1a95-4cc6-9513-b8a1770cdef9", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/d5995db5-1a95-4cc6-9513-b8a1770cdef9", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "data": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "is_calculated": false + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/cb8a53e7-0606-4d07-97bf-d5c544740560", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s1", + "init_conc": 10.0, + "data_type": "conc", + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "name": "mmol / l s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/64d34694-8942-4ed5-b922-3c928695ec43", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/6a9cc7e3-8777-4438-9a1e-d613cd5ee13a", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/d5995db5-1a95-4cc6-9513-b8a1770cdef9", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/d5995db5-1a95-4cc6-9513-b8a1770cdef9", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "data": [ + 10.0, + 9.0, + 8.0, + 7.0, + 6.0, + 5.0, + 4.0, + 3.0, + 2.0, + 1.0, + 0.0 + ], + "is_calculated": false + } + ] + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "group_id": { + "@type": "@id" + } + }, + "@id": "enzml:Measurement/537b7ad5-d1da-4a3f-8823-ce844cb4fd15", + "@type": [ + "enzml:Measurement" + ], + "id": "m1", + "name": "m1", + "species": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/f9765d6e-ba42-4717-ad70-ba50347040ea", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s0", + "init_conc": 0.0, + "data_type": "conc", + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "name": "mmol / l s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/64d34694-8942-4ed5-b922-3c928695ec43", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/6a9cc7e3-8777-4438-9a1e-d613cd5ee13a", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/d5995db5-1a95-4cc6-9513-b8a1770cdef9", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/d5995db5-1a95-4cc6-9513-b8a1770cdef9", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "data": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "is_calculated": false + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/0a6e65ad-b5a8-4ed8-a75d-c61d12db521e", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s1", + "init_conc": 10.0, + "data_type": "conc", + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "name": "mmol / l s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/64d34694-8942-4ed5-b922-3c928695ec43", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/6a9cc7e3-8777-4438-9a1e-d613cd5ee13a", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/d5995db5-1a95-4cc6-9513-b8a1770cdef9", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/d5995db5-1a95-4cc6-9513-b8a1770cdef9", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "data": [ + 10.0, + 9.0, + 8.0, + 7.0, + 6.0, + 5.0, + 4.0, + 3.0, + 2.0, + 1.0, + 0.0 + ], + "is_calculated": false + } + ] + } + ], + "equations": [], + "parameters": [] +} \ No newline at end of file diff --git a/dev-examples/reactions/sbml.xml b/dev-examples/reactions/sbml.xml new file mode 100644 index 0000000..602dddb --- /dev/null +++ b/dev-examples/reactions/sbml.xml @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Vessel 1 + 10.0 + + + + + + + + + + + + + Enzyme + MTEY + + + + + + MTEY + + + + + + + + Substrate + + + + + + + + + + Product + + + + + + + + + + + + + + + + + + + + + + + + kcat + p0 + s0 + + + + K_m + s0 + + + + + + + + + + + + + diff --git a/dev-examples/sbml_export_odes.py b/dev-examples/sbml_export_odes.py new file mode 100644 index 0000000..339caaf --- /dev/null +++ b/dev-examples/sbml_export_odes.py @@ -0,0 +1,43 @@ +import pyenzyme as pe +import pyenzyme.equations as peq + +from pyenzyme.sbml.serializer import to_sbml +from pyenzyme.units import mM, s, ml, K + +doc = pe.EnzymeMLDocument(name="Test") + +# Add Vessels +vessel = doc.add_to_vessels(name="Vessel 1", volume=10.0, unit=ml, id="v0") + +# Add Species +substrate = doc.add_to_small_molecules(id="s0", name="Substrate", vessel_id=vessel.id) +product = doc.add_to_small_molecules(id="s1", name="Product", vessel_id=vessel.id) + +# Add Enzyme +enzyme = doc.add_to_proteins( + id="p0", + name="Enzyme", + sequence="MTEY", + vessel_id=vessel.id, +) + +doc.equations += peq.build_equations( + "s1'(t) = kcat * E_tot * s0(t) / (K_m + s0(t))", + "E_tot = 100", + units=[mM / s, mM], + enzmldoc=doc, +) + +doc.measurements += pe.read_excel( + "tests/fixtures/tabular/data.xlsx", + data_unit=mM, + time_unit=s, +) + +for meas in doc.measurements: + meas.temperature = 298.15 + meas.temperature_unit = K + meas.ph = 7.0 + +to_sbml(doc, "./dev-examples/odes/sbml.xml") +pe.write_enzymeml(doc=doc, path="./dev-examples/odes/enzymeml.json") diff --git a/dev-examples/sbml_export_reactions.py b/dev-examples/sbml_export_reactions.py new file mode 100644 index 0000000..53d6157 --- /dev/null +++ b/dev-examples/sbml_export_reactions.py @@ -0,0 +1,44 @@ +import pyenzyme as pe +import pyenzyme.equations as peq + +from pyenzyme.sbml.serializer import to_sbml +from pyenzyme.units import mM, s, ml + +doc = pe.EnzymeMLDocument(name="Test") + +# Add Vessels +vessel = doc.add_to_vessels(name="Vessel 1", volume=10.0, unit=ml, id="v0") + +# Add Species +substrate = doc.add_to_small_molecules(id="s0", name="Substrate", vessel_id=vessel.id) +product = doc.add_to_small_molecules(id="s1", name="Product", vessel_id=vessel.id) + +# Add Enzyme +enzyme = doc.add_to_proteins( + id="p0", + name="Enzyme", + sequence="MTEY", + vessel_id=vessel.id, +) + +# Set reactions +reaction = peq.build_reaction( + scheme="s0 -> s1", + name="Reaction 1", + modifiers=[enzyme.id], +) +reaction.kinetic_law = peq.build_equation( + "v(t) = kcat * p0(t) * s0(t) / ( K_m + s0(t) )", + unit=mM / s, +) + +doc.reactions += [reaction] + +doc.measurements += pe.read_excel( + "tests/fixtures/tabular/data.xlsx", + data_unit=mM, + time_unit=s, +) + +to_sbml(doc, "./dev-examples/reactions/sbml.xml") +pe.write_enzymeml(doc=doc, path="./dev-examples/reactions/enzymeml.json") From 415ec1e438a08a78daf1c32f182336a71eb79cd6 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Tue, 25 Jun 2024 10:27:18 +0200 Subject: [PATCH 14/80] use `serialization_alias` for ld fields --- pyenzyme/model.py | 785 ++++++++++++++++++++-------------------------- 1 file changed, 337 insertions(+), 448 deletions(-) diff --git a/pyenzyme/model.py b/pyenzyme/model.py index a255378..334b18d 100644 --- a/pyenzyme/model.py +++ b/pyenzyme/model.py @@ -5,11 +5,13 @@ from typing import Optional, Generic, TypeVar from enum import Enum from uuid import uuid4 +from datetime import date, datetime # Filter Wrapper definition used to filter a list of objects # based on their attributes Cls = TypeVar("Cls") + class FilterWrapper(Generic[Cls]): """Wrapper class to filter a list of objects based on their attributes""" @@ -46,7 +48,8 @@ def add_namespace(obj, prefix: str | None, iri: str | None): elif iri and prefix is None: raise ValueError("If iri is provided, prefix must also be provided") - obj.ld_context[prefix] = iri # type: ignore + obj.ld_context[prefix] = iri # type: ignore + def validate_prefix(term: str | dict, prefix: str): """Validates that a term is prefixed with a given prefix @@ -64,13 +67,14 @@ def validate_prefix(term: str | dict, prefix: str): elif isinstance(term, str) and not term.startswith(prefix + ":"): raise ValueError(f"Term {term} is not prefixed with {prefix}") + # Model Definitions -class EnzymeMLDocument(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore +class EnzymeMLDocument(BaseModel): + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore name: str references: list[str] = Field(default_factory=list) @@ -88,18 +92,18 @@ class EnzymeMLDocument(BaseModel): # JSON-LD fields ld_id: str = Field( - alias="@id", - default_factory=lambda: "enzml:EnzymeMLDocument/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:EnzymeMLDocument/" + str(uuid4()), ) ld_type: list[str] = Field( - alias="@type", - default_factory = lambda: [ + serialization_alias="@type", + default_factory=lambda: [ "enzml:EnzymeMLDocument", ], ) ld_context: dict[str, str | dict] = Field( - alias="@context", - default_factory = lambda: { + serialization_alias="@context", + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", @@ -111,7 +115,7 @@ class EnzymeMLDocument(BaseModel): "created": "schema:dateCreated", "modified": "schema:dateModified", "creators": "schema:creator", - } + }, ) def filter_creators(self, **kwargs) -> list[Creator]: @@ -222,13 +226,12 @@ def filter_parameters(self, **kwargs) -> list[Parameter]: return FilterWrapper[Parameter](self.parameters, **kwargs).filter() - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -239,7 +242,7 @@ def set_attr_term( # Using a prefix and term >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") - # Using a dictionary term + # Usinng a dictionary term >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) Args: @@ -250,7 +253,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -259,10 +264,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -289,7 +291,6 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) - def add_to_creators( self, given_name: str, @@ -297,29 +298,22 @@ def add_to_creators( mail: str, **kwargs, ): - params = { - "given_name": given_name, - "family_name": family_name, - "mail": mail - } + params = {"given_name": given_name, "family_name": family_name, "mail": mail} if "id" in kwargs: params["id"] = kwargs["id"] - self.creators.append( - Creator(**params) - ) + self.creators.append(Creator(**params)) return self.creators[-1] - def add_to_vessels( self, id: str, name: str, volume: float, unit: UnitDefinition, - constant: bool= True, + constant: bool = True, **kwargs, ): params = { @@ -327,30 +321,27 @@ def add_to_vessels( "name": name, "volume": volume, "unit": unit, - "constant": constant + "constant": constant, } if "id" in kwargs: params["id"] = kwargs["id"] - self.vessels.append( - Vessel(**params) - ) + self.vessels.append(Vessel(**params)) return self.vessels[-1] - def add_to_proteins( self, id: str, name: str, - constant: bool= False, - sequence: Optional[str]= None, - vessel_id: Optional[str]= None, - ecnumber: Optional[str]= None, - organism: Optional[str]= None, - organism_tax_id: Optional[str]= None, - references: list[str]= [], + constant: bool = False, + sequence: Optional[str] = None, + vessel_id: Optional[str] = None, + ecnumber: Optional[str] = None, + organism: Optional[str] = None, + organism_tax_id: Optional[str] = None, + references: list[str] = [], **kwargs, ): params = { @@ -362,49 +353,40 @@ def add_to_proteins( "ecnumber": ecnumber, "organism": organism, "organism_tax_id": organism_tax_id, - "references": references + "references": references, } if "id" in kwargs: params["id"] = kwargs["id"] - self.proteins.append( - Protein(**params) - ) + self.proteins.append(Protein(**params)) return self.proteins[-1] - def add_to_complexes( self, id: str, - participants: list[str]= [], + participants: list[str] = [], **kwargs, ): - params = { - "id": id, - "participants": participants - } + params = {"id": id, "participants": participants} if "id" in kwargs: params["id"] = kwargs["id"] - self.complexes.append( - Complex(**params) - ) + self.complexes.append(Complex(**params)) return self.complexes[-1] - def add_to_small_molecules( self, id: str, name: str, - constant: bool= False, - vessel_id: Optional[str]= None, - canonical_smiles: Optional[str]= None, - inchikey: Optional[str]= None, - references: list[str]= [], + constant: bool = False, + vessel_id: Optional[str] = None, + canonical_smiles: Optional[str] = None, + inchikey: Optional[str] = None, + references: list[str] = [], **kwargs, ): params = { @@ -414,27 +396,24 @@ def add_to_small_molecules( "vessel_id": vessel_id, "canonical_smiles": canonical_smiles, "inchikey": inchikey, - "references": references + "references": references, } if "id" in kwargs: params["id"] = kwargs["id"] - self.small_molecules.append( - SmallMolecule(**params) - ) + self.small_molecules.append(SmallMolecule(**params)) return self.small_molecules[-1] - def add_to_reactions( self, id: str, name: str, - reversible: bool= False, - kinetic_law: Optional[Equation]= None, - species: list[ReactionElement]= [], - modifiers: list[str]= [], + reversible: bool = False, + kinetic_law: Optional[Equation] = None, + species: list[ReactionElement] = [], + modifiers: list[str] = [], **kwargs, ): params = { @@ -443,28 +422,25 @@ def add_to_reactions( "reversible": reversible, "kinetic_law": kinetic_law, "species": species, - "modifiers": modifiers + "modifiers": modifiers, } if "id" in kwargs: params["id"] = kwargs["id"] - self.reactions.append( - Reaction(**params) - ) + self.reactions.append(Reaction(**params)) return self.reactions[-1] - def add_to_measurements( self, id: str, name: str, - species: list[MeasurementData]= [], - group_id: Optional[str]= None, - ph: Optional[float]= None, - temperature: Optional[float]= None, - temperature_unit: Optional[UnitDefinition]= None, + species: list[MeasurementData] = [], + group_id: Optional[str] = None, + ph: Optional[float] = None, + temperature: Optional[float] = None, + temperature_unit: Optional[UnitDefinition] = None, **kwargs, ): params = { @@ -474,28 +450,24 @@ def add_to_measurements( "group_id": group_id, "ph": ph, "temperature": temperature, - "temperature_unit": temperature_unit + "temperature_unit": temperature_unit, } if "id" in kwargs: params["id"] = kwargs["id"] - self.measurements.append( - Measurement(**params) - ) + self.measurements.append(Measurement(**params)) return self.measurements[-1] - def add_to_equations( self, unit: UnitDefinition, equation_type: EquationType, equation: str, - species_id: Optional[str]= None, - id: Optional[str]= None, - variables: list[EqVariable]= [], - parameters: list[EqParameter]= [], + species_id: Optional[str] = None, + variables: list[EqVariable] = [], + parameters: list[EqParameter] = [], **kwargs, ): params = { @@ -503,32 +475,28 @@ def add_to_equations( "equation_type": equation_type, "equation": equation, "species_id": species_id, - "id": id, "variables": variables, - "parameters": parameters + "parameters": parameters, } if "id" in kwargs: params["id"] = kwargs["id"] - self.equations.append( - Equation(**params) - ) + self.equations.append(Equation(**params)) return self.equations[-1] - def add_to_parameters( self, id: str, name: str, - value: Optional[float]= None, - unit: Optional[UnitDefinition]= None, - initial_value: Optional[float]= None, - upper: Optional[float]= None, - lower: Optional[float]= None, - stderr: Optional[float]= None, - constant: Optional[bool]= True, + value: Optional[float] = None, + unit: Optional[UnitDefinition] = None, + initial_value: Optional[float] = None, + upper: Optional[float] = None, + lower: Optional[float] = None, + stderr: Optional[float] = None, + constant: Optional[bool] = True, **kwargs, ): params = { @@ -540,23 +508,21 @@ def add_to_parameters( "upper": upper, "lower": lower, "stderr": stderr, - "constant": constant + "constant": constant, } if "id" in kwargs: params["id"] = kwargs["id"] - self.parameters.append( - Parameter(**params) - ) + self.parameters.append(Parameter(**params)) return self.parameters[-1] -class Creator(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore +class Creator(BaseModel): + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore given_name: str family_name: str @@ -564,34 +530,31 @@ class Creator(BaseModel): # JSON-LD fields ld_id: str = Field( - alias="@id", - default_factory=lambda: "enzml:Creator/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:Creator/" + str(uuid4()), ) ld_type: list[str] = Field( - alias="@type", - default_factory = lambda: [ - "enzml:Creator","schema:person" - ], + serialization_alias="@type", + default_factory=lambda: ["enzml:Creator", "schema:person"], ) ld_context: dict[str, str | dict] = Field( - alias="@context", - default_factory = lambda: { + serialization_alias="@context", + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", "given_name": "schema:givenName", "family_name": "schema:familyName", "mail": "schema:email", - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -602,7 +565,7 @@ def set_attr_term( # Using a prefix and term >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") - # Using a dictionary term + # Usinng a dictionary term >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) Args: @@ -613,7 +576,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -622,10 +587,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -654,10 +616,9 @@ def add_type_term( class Vessel(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore id: str name: str @@ -667,18 +628,16 @@ class Vessel(BaseModel): # JSON-LD fields ld_id: str = Field( - alias="@id", - default_factory=lambda: "enzml:Vessel/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:Vessel/" + str(uuid4()), ) ld_type: list[str] = Field( - alias="@type", - default_factory = lambda: [ - "enzml:Vessel","OBO:OBI_0400081" - ], + serialization_alias="@type", + default_factory=lambda: ["enzml:Vessel", "OBO:OBI_0400081"], ) ld_context: dict[str, str | dict] = Field( - alias="@context", - default_factory = lambda: { + serialization_alias="@context", + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", @@ -688,16 +647,15 @@ class Vessel(BaseModel): }, "name": "schema:name", "volume": "OBO:OBI_0002139", - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -708,7 +666,7 @@ def set_attr_term( # Using a prefix and term >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") - # Using a dictionary term + # Usinng a dictionary term >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) Args: @@ -719,7 +677,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -728,10 +688,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -760,10 +717,9 @@ def add_type_term( class Protein(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore id: str name: str @@ -777,18 +733,16 @@ class Protein(BaseModel): # JSON-LD fields ld_id: str = Field( - alias="@id", - default_factory=lambda: "enzml:Protein/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:Protein/" + str(uuid4()), ) ld_type: list[str] = Field( - alias="@type", - default_factory = lambda: [ - "enzml:Protein","schema:Protein" - ], + serialization_alias="@type", + default_factory=lambda: ["enzml:Protein", "schema:Protein"], ) ld_context: dict[str, str | dict] = Field( - alias="@context", - default_factory = lambda: { + serialization_alias="@context", + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", @@ -809,16 +763,15 @@ class Protein(BaseModel): "@id": "schema:citation", "@type": "@id", }, - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -829,7 +782,7 @@ def set_attr_term( # Using a prefix and term >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") - # Using a dictionary term + # Usinng a dictionary term >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) Args: @@ -840,7 +793,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -849,10 +804,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -881,28 +833,27 @@ def add_type_term( class Complex(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore id: str participants: list[str] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( - alias="@id", - default_factory=lambda: "enzml:Complex/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:Complex/" + str(uuid4()), ) ld_type: list[str] = Field( - alias="@type", - default_factory = lambda: [ + serialization_alias="@type", + default_factory=lambda: [ "enzml:Complex", ], ) ld_context: dict[str, str | dict] = Field( - alias="@context", - default_factory = lambda: { + serialization_alias="@context", + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", @@ -913,16 +864,15 @@ class Complex(BaseModel): "participants": { "@type": "@id", }, - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -933,7 +883,7 @@ def set_attr_term( # Using a prefix and term >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") - # Using a dictionary term + # Usinng a dictionary term >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) Args: @@ -944,7 +894,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -953,10 +905,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -985,10 +934,9 @@ def add_type_term( class SmallMolecule(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore id: str name: str @@ -1000,18 +948,18 @@ class SmallMolecule(BaseModel): # JSON-LD fields ld_id: str = Field( - alias="@id", - default_factory=lambda: "enzml:SmallMolecule/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:SmallMolecule/" + str(uuid4()), ) ld_type: list[str] = Field( - alias="@type", - default_factory = lambda: [ + serialization_alias="@type", + default_factory=lambda: [ "enzml:SmallMolecule", ], ) ld_context: dict[str, str | dict] = Field( - alias="@context", - default_factory = lambda: { + serialization_alias="@context", + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", @@ -1028,16 +976,15 @@ class SmallMolecule(BaseModel): "@id": "schema:citation", "@type": "@id", }, - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -1048,7 +995,7 @@ def set_attr_term( # Using a prefix and term >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") - # Using a dictionary term + # Usinng a dictionary term >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) Args: @@ -1059,7 +1006,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1068,10 +1017,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1100,10 +1046,9 @@ def add_type_term( class Reaction(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore id: str name: str @@ -1114,18 +1059,18 @@ class Reaction(BaseModel): # JSON-LD fields ld_id: str = Field( - alias="@id", - default_factory=lambda: "enzml:Reaction/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:Reaction/" + str(uuid4()), ) ld_type: list[str] = Field( - alias="@type", - default_factory = lambda: [ + serialization_alias="@type", + default_factory=lambda: [ "enzml:Reaction", ], ) ld_context: dict[str, str | dict] = Field( - alias="@context", - default_factory = lambda: { + serialization_alias="@context", + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", @@ -1136,7 +1081,7 @@ class Reaction(BaseModel): "modifiers": { "@type": "@id", }, - } + }, ) def filter_species(self, **kwargs) -> list[ReactionElement]: @@ -1151,13 +1096,12 @@ def filter_species(self, **kwargs) -> list[ReactionElement]: return FilterWrapper[ReactionElement](self.species, **kwargs).filter() - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -1168,7 +1112,7 @@ def set_attr_term( # Using a prefix and term >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") - # Using a dictionary term + # Usinng a dictionary term >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) Args: @@ -1179,7 +1123,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1188,10 +1134,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1218,67 +1161,59 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) - def add_to_species( self, species_id: str, stoichiometry: float, **kwargs, ): - params = { - "species_id": species_id, - "stoichiometry": stoichiometry - } + params = {"species_id": species_id, "stoichiometry": stoichiometry} if "id" in kwargs: params["id"] = kwargs["id"] - self.species.append( - ReactionElement(**params) - ) + self.species.append(ReactionElement(**params)) return self.species[-1] class ReactionElement(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore species_id: str stoichiometry: float # JSON-LD fields ld_id: str = Field( - alias="@id", - default_factory=lambda: "enzml:ReactionElement/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:ReactionElement/" + str(uuid4()), ) ld_type: list[str] = Field( - alias="@type", - default_factory = lambda: [ + serialization_alias="@type", + default_factory=lambda: [ "enzml:ReactionElement", ], ) ld_context: dict[str, str | dict] = Field( - alias="@context", - default_factory = lambda: { + serialization_alias="@context", + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", "species_id": { "@type": "@id", }, - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -1289,7 +1224,7 @@ def set_attr_term( # Using a prefix and term >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") - # Using a dictionary term + # Usinng a dictionary term >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) Args: @@ -1300,7 +1235,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1309,10 +1246,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1341,43 +1275,38 @@ def add_type_term( class Equation(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore unit: UnitDefinition equation_type: EquationType equation: str species_id: Optional[str] = Field(default=None) - id: Optional[str] = Field(default=None) variables: list[EqVariable] = Field(default_factory=list) parameters: list[EqParameter] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( - alias="@id", - default_factory=lambda: "enzml:Equation/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:Equation/" + str(uuid4()), ) ld_type: list[str] = Field( - alias="@type", - default_factory = lambda: [ + serialization_alias="@type", + default_factory=lambda: [ "enzml:Equation", ], ) ld_context: dict[str, str | dict] = Field( - alias="@context", - default_factory = lambda: { + serialization_alias="@context", + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", "species_id": { "@type": "@id", }, - "id": { - "@type": "@id", - }, - } + }, ) def filter_variables(self, **kwargs) -> list[EqVariable]: @@ -1404,13 +1333,12 @@ def filter_parameters(self, **kwargs) -> list[EqParameter]: return FilterWrapper[EqParameter](self.parameters, **kwargs).filter() - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -1421,7 +1349,7 @@ def set_attr_term( # Using a prefix and term >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") - # Using a dictionary term + # Usinng a dictionary term >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) Args: @@ -1432,7 +1360,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1441,10 +1371,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1471,59 +1398,44 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) - def add_to_variables( self, id: str, name: str, - symbol: Optional[str]= None, + symbol: Optional[str] = None, **kwargs, ): - params = { - "id": id, - "name": name, - "symbol": symbol - } + params = {"id": id, "name": name, "symbol": symbol} if "id" in kwargs: params["id"] = kwargs["id"] - self.variables.append( - EqVariable(**params) - ) + self.variables.append(EqVariable(**params)) return self.variables[-1] - def add_to_parameters( self, id: str, name: str, - symbol: Optional[str]= None, - value: Optional[float]= None, + symbol: Optional[str] = None, + value: Optional[float] = None, **kwargs, ): - params = { - "id": id, - "name": name, - "symbol": symbol, - "value": value - } + params = {"id": id, "name": name, "symbol": symbol, "value": value} if "id" in kwargs: params["id"] = kwargs["id"] - self.parameters.append( - EqParameter(**params) - ) + self.parameters.append(EqParameter(**params)) return self.parameters[-1] -class Parameter(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore +class Parameter(BaseModel): + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore id: str name: str @@ -1537,18 +1449,18 @@ class Parameter(BaseModel): # JSON-LD fields ld_id: str = Field( - alias="@id", - default_factory=lambda: "enzml:Parameter/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:Parameter/" + str(uuid4()), ) ld_type: list[str] = Field( - alias="@type", - default_factory = lambda: [ + serialization_alias="@type", + default_factory=lambda: [ "enzml:Parameter", ], ) ld_context: dict[str, str | dict] = Field( - alias="@context", - default_factory = lambda: { + serialization_alias="@context", + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", @@ -1556,16 +1468,15 @@ class Parameter(BaseModel): "@id": "schema:identifier", "@type": "@id", }, - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -1576,7 +1487,7 @@ def set_attr_term( # Using a prefix and term >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") - # Using a dictionary term + # Usinng a dictionary term >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) Args: @@ -1587,7 +1498,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1596,10 +1509,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1628,10 +1538,9 @@ def add_type_term( class Measurement(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore id: str name: str @@ -1643,18 +1552,18 @@ class Measurement(BaseModel): # JSON-LD fields ld_id: str = Field( - alias="@id", - default_factory=lambda: "enzml:Measurement/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:Measurement/" + str(uuid4()), ) ld_type: list[str] = Field( - alias="@type", - default_factory = lambda: [ + serialization_alias="@type", + default_factory=lambda: [ "enzml:Measurement", ], ) ld_context: dict[str, str | dict] = Field( - alias="@context", - default_factory = lambda: { + serialization_alias="@context", + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", @@ -1665,7 +1574,7 @@ class Measurement(BaseModel): "group_id": { "@type": "@id", }, - } + }, ) def filter_species(self, **kwargs) -> list[MeasurementData]: @@ -1680,13 +1589,12 @@ def filter_species(self, **kwargs) -> list[MeasurementData]: return FilterWrapper[MeasurementData](self.species, **kwargs).filter() - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -1697,7 +1605,7 @@ def set_attr_term( # Using a prefix and term >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") - # Using a dictionary term + # Usinng a dictionary term >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) Args: @@ -1708,7 +1616,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1717,10 +1627,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1747,7 +1654,6 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) - def add_to_species( self, species_id: str, @@ -1755,9 +1661,9 @@ def add_to_species( data_type: DataTypes, data_unit: UnitDefinition, time_unit: UnitDefinition, - time: list[float]= [], - data: list[float]= [], - is_calculated: bool= False, + time: list[float] = [], + data: list[float] = [], + is_calculated: bool = False, **kwargs, ): params = { @@ -1768,24 +1674,21 @@ def add_to_species( "time_unit": time_unit, "time": time, "data": data, - "is_calculated": is_calculated + "is_calculated": is_calculated, } if "id" in kwargs: params["id"] = kwargs["id"] - self.species.append( - MeasurementData(**params) - ) + self.species.append(MeasurementData(**params)) return self.species[-1] class MeasurementData(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore species_id: str init_conc: float @@ -1798,34 +1701,33 @@ class MeasurementData(BaseModel): # JSON-LD fields ld_id: str = Field( - alias="@id", - default_factory=lambda: "enzml:MeasurementData/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:MeasurementData/" + str(uuid4()), ) ld_type: list[str] = Field( - alias="@type", - default_factory = lambda: [ + serialization_alias="@type", + default_factory=lambda: [ "enzml:MeasurementData", ], ) ld_context: dict[str, str | dict] = Field( - alias="@context", - default_factory = lambda: { + serialization_alias="@context", + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", "species_id": { "@type": "@id", }, - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -1836,7 +1738,7 @@ def set_attr_term( # Using a prefix and term >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") - # Using a dictionary term + # Usinng a dictionary term >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) Args: @@ -1847,7 +1749,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1856,10 +1760,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1888,10 +1789,9 @@ def add_type_term( class UnitDefinition(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore id: Optional[str] = Field(default=None) name: Optional[str] = Field(default=None) @@ -1899,22 +1799,22 @@ class UnitDefinition(BaseModel): # JSON-LD fields ld_id: str = Field( - alias="@id", - default_factory=lambda: "enzml:UnitDefinition/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:UnitDefinition/" + str(uuid4()), ) ld_type: list[str] = Field( - alias="@type", - default_factory = lambda: [ + serialization_alias="@type", + default_factory=lambda: [ "enzml:UnitDefinition", ], ) ld_context: dict[str, str | dict] = Field( - alias="@context", - default_factory = lambda: { + serialization_alias="@context", + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", - } + }, ) def filter_base_units(self, **kwargs) -> list[BaseUnit]: @@ -1929,13 +1829,12 @@ def filter_base_units(self, **kwargs) -> list[BaseUnit]: return FilterWrapper[BaseUnit](self.base_units, **kwargs).filter() - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -1946,7 +1845,7 @@ def set_attr_term( # Using a prefix and term >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") - # Using a dictionary term + # Usinng a dictionary term >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) Args: @@ -1957,7 +1856,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1966,10 +1867,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1996,36 +1894,33 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) - def add_to_base_units( self, kind: UnitType, exponent: int, - multiplier: Optional[float]= None, - scale: Optional[float]= None, + multiplier: Optional[float] = None, + scale: Optional[float] = None, **kwargs, ): params = { "kind": kind, "exponent": exponent, "multiplier": multiplier, - "scale": scale + "scale": scale, } if "id" in kwargs: params["id"] = kwargs["id"] - self.base_units.append( - BaseUnit(**params) - ) + self.base_units.append(BaseUnit(**params)) return self.base_units[-1] -class BaseUnit(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore +class BaseUnit(BaseModel): + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore kind: UnitType exponent: int @@ -2034,31 +1929,30 @@ class BaseUnit(BaseModel): # JSON-LD fields ld_id: str = Field( - alias="@id", - default_factory=lambda: "enzml:BaseUnit/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:BaseUnit/" + str(uuid4()), ) ld_type: list[str] = Field( - alias="@type", - default_factory = lambda: [ + serialization_alias="@type", + default_factory=lambda: [ "enzml:BaseUnit", ], ) ld_context: dict[str, str | dict] = Field( - alias="@context", - default_factory = lambda: { + serialization_alias="@context", + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -2069,7 +1963,7 @@ def set_attr_term( # Using a prefix and term >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") - # Using a dictionary term + # Usinng a dictionary term >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) Args: @@ -2080,7 +1974,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -2089,10 +1985,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -2121,10 +2014,9 @@ def add_type_term( class EqVariable(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore id: str name: str @@ -2132,34 +2024,33 @@ class EqVariable(BaseModel): # JSON-LD fields ld_id: str = Field( - alias="@id", - default_factory=lambda: "enzml:EqVariable/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:EqVariable/" + str(uuid4()), ) ld_type: list[str] = Field( - alias="@type", - default_factory = lambda: [ + serialization_alias="@type", + default_factory=lambda: [ "enzml:EqVariable", ], ) ld_context: dict[str, str | dict] = Field( - alias="@context", - default_factory = lambda: { + serialization_alias="@context", + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", "id": { "@type": "@id", }, - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -2170,7 +2061,7 @@ def set_attr_term( # Using a prefix and term >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") - # Using a dictionary term + # Usinng a dictionary term >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) Args: @@ -2181,7 +2072,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -2190,10 +2083,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -2222,10 +2112,9 @@ def add_type_term( class EqParameter(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore id: str name: str @@ -2234,34 +2123,33 @@ class EqParameter(BaseModel): # JSON-LD fields ld_id: str = Field( - alias="@id", - default_factory=lambda: "enzml:EqParameter/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:EqParameter/" + str(uuid4()), ) ld_type: list[str] = Field( - alias="@type", - default_factory = lambda: [ + serialization_alias="@type", + default_factory=lambda: [ "enzml:EqParameter", ], ) ld_context: dict[str, str | dict] = Field( - alias="@context", - default_factory = lambda: { + serialization_alias="@context", + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", "id": { "@type": "@id", }, - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -2272,7 +2160,7 @@ def set_attr_term( # Using a prefix and term >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") - # Using a dictionary term + # Usinng a dictionary term >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) Args: @@ -2283,7 +2171,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -2292,10 +2182,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -2331,12 +2218,14 @@ class DataTypes(Enum): FEED = "feed" PEAK_AREA = "peak-area" + class EquationType(Enum): ASSIGNMENT = "assignment" INITIAL_ASSIGNMENT = "initialAssignment" ODE = "ode" RATE_LAW = "rateLaw" + class UnitType(Enum): AMPERE = "ampere" AVOGADRO = "avogadro" @@ -2370,4 +2259,4 @@ class UnitType(Enum): TESLA = "tesla" VOLT = "volt" WATT = "watt" - WEBER = "weber" \ No newline at end of file + WEBER = "weber" From c2e52e3bbfba3e92502a0a172ba51bb0c0d0fa9a Mon Sep 17 00:00:00 2001 From: Jan Range Date: Tue, 25 Jun 2024 10:29:04 +0200 Subject: [PATCH 15/80] remove unused imports --- pyenzyme/model.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pyenzyme/model.py b/pyenzyme/model.py index 334b18d..8e5893e 100644 --- a/pyenzyme/model.py +++ b/pyenzyme/model.py @@ -5,7 +5,6 @@ from typing import Optional, Generic, TypeVar from enum import Enum from uuid import uuid4 -from datetime import date, datetime # Filter Wrapper definition used to filter a list of objects # based on their attributes From 0e7f5165e624c6ee47d78a9709153ad61a4ba83d Mon Sep 17 00:00:00 2001 From: haeussma <83341109+haeussma@users.noreply.github.com> Date: Wed, 26 Jun 2024 09:29:07 +0200 Subject: [PATCH 16/80] added pyright and poetry --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 9a74808..38c286c 100644 --- a/.gitignore +++ b/.gitignore @@ -131,6 +131,9 @@ dmypy.json # Pyre type checker .pyre/ +# pyrightconfig +pyrightconfig.json + # pytype static type analyzer .pytype/ @@ -146,3 +149,6 @@ tests/tmp # Mac OS .DS_Store + +# Poetry +poetry.lock From eb19c84eddbd29dc6f50c0307f657d5cd653cf63 Mon Sep 17 00:00:00 2001 From: haeussma <83341109+haeussma@users.noreply.github.com> Date: Wed, 26 Jun 2024 09:30:01 +0200 Subject: [PATCH 17/80] regenerated lib via gen.toml including celsius --- pyenzyme/model.py | 1 + pyenzyme/units/predefined.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/pyenzyme/model.py b/pyenzyme/model.py index 8e5893e..0c35074 100644 --- a/pyenzyme/model.py +++ b/pyenzyme/model.py @@ -2230,6 +2230,7 @@ class UnitType(Enum): AVOGADRO = "avogadro" BECQUEREL = "becquerel" CANDELA = "candela" + CELSIUS = "celsius" COULOMB = "coulomb" DIMENSIONLESS = "dimensionless" FARAD = "farad" diff --git a/pyenzyme/units/predefined.py b/pyenzyme/units/predefined.py index b0531d2..729de81 100644 --- a/pyenzyme/units/predefined.py +++ b/pyenzyme/units/predefined.py @@ -44,6 +44,10 @@ def gram(): def kelvin(): return BaseUnit(kind=UnitType.KELVIN, exponent=1, scale=1) + @staticmethod + def celsius(): + return BaseUnit(kind=UnitType.CELSIUS, exponent=1, scale=1) + @staticmethod def dimensionless(): return BaseUnit(kind=UnitType.DIMENSIONLESS, exponent=1, scale=1) @@ -139,6 +143,7 @@ def dimensionless(): kelvin = UnitDefinition(base_units=[Unit.kelvin()])._get_name() K = UnitDefinition(base_units=[Unit.kelvin()])._get_name() +celsius = UnitDefinition(base_units=[Unit.celsius()])._get_name() ## Ontology From bf0ff6dbc4a1e340eb689ed72933a1d7cc4a3b8b Mon Sep 17 00:00:00 2001 From: haeussma <83341109+haeussma@users.noreply.github.com> Date: Wed, 26 Jun 2024 10:45:39 +0200 Subject: [PATCH 18/80] replaced content with newly generated model --- pyenzyme/model.py | 648 +++++++++++++++++++++++++++------------------- 1 file changed, 376 insertions(+), 272 deletions(-) diff --git a/pyenzyme/model.py b/pyenzyme/model.py index 0c35074..d784817 100644 --- a/pyenzyme/model.py +++ b/pyenzyme/model.py @@ -1,11 +1,13 @@ ## This is a generated file. Do not modify it manually! from __future__ import annotations -from pydantic import BaseModel, Field, ConfigDict -from typing import Optional, Generic, TypeVar + from enum import Enum +from typing import Generic, Optional, TypeVar from uuid import uuid4 +from pydantic import BaseModel, ConfigDict, Field + # Filter Wrapper definition used to filter a list of objects # based on their attributes Cls = TypeVar("Cls") @@ -85,35 +87,32 @@ class EnzymeMLDocument(BaseModel): complexes: list[Complex] = Field(default_factory=list) small_molecules: list[SmallMolecule] = Field(default_factory=list) reactions: list[Reaction] = Field(default_factory=list) + conditions: Optional[ReactionConditions] = Field(default=None) measurements: list[Measurement] = Field(default_factory=list) - equations: list[Equation] = Field(default_factory=list) + equations: list[ODE] = Field(default_factory=list) parameters: list[Parameter] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:EnzymeMLDocument/" + str(uuid4()), + default_factory=lambda: "md:EnzymeMLDocument/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "enzml:EnzymeMLDocument", + "md:EnzymeMLDocument", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", + "md": "http://mdmodel.net/", "schema": "https://schema.org/", - "name": "schema:title", + "OBO": "http://purl.obolibrary.org/obo/", + "name": "schema:name", "references": { - "@id": "schema:citation", "@type": "@id", }, - "created": "schema:dateCreated", - "modified": "schema:dateModified", - "creators": "schema:creator", }, ) @@ -201,17 +200,17 @@ def filter_measurements(self, **kwargs) -> list[Measurement]: return FilterWrapper[Measurement](self.measurements, **kwargs).filter() - def filter_equations(self, **kwargs) -> list[Equation]: + def filter_equations(self, **kwargs) -> list[ODE]: """Filters the equations attribute based on the given kwargs Args: **kwargs: The attributes to filter by. Returns: - list[Equation]: The filtered list of Equation objects + list[ODE]: The filtered list of ODE objects """ - return FilterWrapper[Equation](self.equations, **kwargs).filter() + return FilterWrapper[ODE](self.equations, **kwargs).filter() def filter_parameters(self, **kwargs) -> list[Parameter]: """Filters the parameters attribute based on the given kwargs @@ -308,19 +307,19 @@ def add_to_creators( def add_to_vessels( self, - id: str, name: str, volume: float, unit: UnitDefinition, - constant: bool = True, + constant: bool, + creator_id: Optional[str] = None, **kwargs, ): params = { - "id": id, "name": name, "volume": volume, "unit": unit, "constant": constant, + "creator_id": creator_id, } if "id" in kwargs: @@ -332,10 +331,9 @@ def add_to_vessels( def add_to_proteins( self, - id: str, name: str, + sequence: str, constant: bool = False, - sequence: Optional[str] = None, vessel_id: Optional[str] = None, ecnumber: Optional[str] = None, organism: Optional[str] = None, @@ -344,10 +342,9 @@ def add_to_proteins( **kwargs, ): params = { - "id": id, "name": name, - "constant": constant, "sequence": sequence, + "constant": constant, "vessel_id": vessel_id, "ecnumber": ecnumber, "organism": organism, @@ -364,11 +361,10 @@ def add_to_proteins( def add_to_complexes( self, - id: str, participants: list[str] = [], **kwargs, ): - params = {"id": id, "participants": participants} + params = {"participants": participants} if "id" in kwargs: params["id"] = kwargs["id"] @@ -379,7 +375,6 @@ def add_to_complexes( def add_to_small_molecules( self, - id: str, name: str, constant: bool = False, vessel_id: Optional[str] = None, @@ -389,7 +384,6 @@ def add_to_small_molecules( **kwargs, ): params = { - "id": id, "name": name, "constant": constant, "vessel_id": vessel_id, @@ -407,19 +401,17 @@ def add_to_small_molecules( def add_to_reactions( self, - id: str, name: str, reversible: bool = False, - kinetic_law: Optional[Equation] = None, + rate_law: Optional[Equation] = None, species: list[ReactionElement] = [], modifiers: list[str] = [], **kwargs, ): params = { - "id": id, "name": name, "reversible": reversible, - "kinetic_law": kinetic_law, + "rate_law": rate_law, "species": species, "modifiers": modifiers, } @@ -433,24 +425,12 @@ def add_to_reactions( def add_to_measurements( self, - id: str, name: str, species: list[MeasurementData] = [], group_id: Optional[str] = None, - ph: Optional[float] = None, - temperature: Optional[float] = None, - temperature_unit: Optional[UnitDefinition] = None, **kwargs, ): - params = { - "id": id, - "name": name, - "species": species, - "group_id": group_id, - "ph": ph, - "temperature": temperature, - "temperature_unit": temperature_unit, - } + params = {"name": name, "species": species, "group_id": group_id} if "id" in kwargs: params["id"] = kwargs["id"] @@ -461,53 +441,40 @@ def add_to_measurements( def add_to_equations( self, - unit: UnitDefinition, - equation_type: EquationType, - equation: str, - species_id: Optional[str] = None, - variables: list[EqVariable] = [], - parameters: list[EqParameter] = [], + species_id: str, + equation: Equation, **kwargs, ): - params = { - "unit": unit, - "equation_type": equation_type, - "equation": equation, - "species_id": species_id, - "variables": variables, - "parameters": parameters, - } + params = {"species_id": species_id, "equation": equation} if "id" in kwargs: params["id"] = kwargs["id"] - self.equations.append(Equation(**params)) + self.equations.append(ODE(**params)) return self.equations[-1] def add_to_parameters( self, - id: str, name: str, - value: Optional[float] = None, - unit: Optional[UnitDefinition] = None, + value: float, + unit: UnitDefinition, + constant: bool, initial_value: Optional[float] = None, upper: Optional[float] = None, lower: Optional[float] = None, stderr: Optional[float] = None, - constant: Optional[bool] = True, **kwargs, ): params = { - "id": id, "name": name, "value": value, "unit": unit, + "constant": constant, "initial_value": initial_value, "upper": upper, "lower": lower, "stderr": stderr, - "constant": constant, } if "id" in kwargs: @@ -529,19 +496,18 @@ class Creator(BaseModel): # JSON-LD fields ld_id: str = Field( - serialization_alias="@id", - default_factory=lambda: "enzml:Creator/" + str(uuid4()), + serialization_alias="@id", default_factory=lambda: "md:Creator/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: ["enzml:Creator", "schema:person"], + default_factory=lambda: ["md:Creator", "schema:creator"], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", + "md": "http://mdmodel.net/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "given_name": "schema:givenName", "family_name": "schema:familyName", "mail": "schema:email", @@ -619,33 +585,32 @@ class Vessel(BaseModel): validate_assigment=True, ) # type: ignore - id: str name: str volume: float unit: UnitDefinition - constant: bool = True + constant: bool + creator_id: Optional[str] = Field(default=None) # JSON-LD fields ld_id: str = Field( - serialization_alias="@id", - default_factory=lambda: "enzml:Vessel/" + str(uuid4()), + serialization_alias="@id", default_factory=lambda: "md:Vessel/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: ["enzml:Vessel", "OBO:OBI_0400081"], + default_factory=lambda: ["md:Vessel", "OBO:OBI_0400081"], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", + "md": "http://mdmodel.net/", "schema": "https://schema.org/", - "id": { + "OBO": "http://purl.obolibrary.org/obo/", + "name": "schema:name", + "volume": "OBO:OBI_0002139", + "creator_id": { "@id": "schema:identifier", "@type": "@id", }, - "name": "schema:name", - "volume": "OBO:OBI_0002139", }, ) @@ -720,10 +685,9 @@ class Protein(BaseModel): validate_assigment=True, ) # type: ignore - id: str name: str + sequence: str constant: bool = False - sequence: Optional[str] = Field(default=None) vessel_id: Optional[str] = Field(default=None) ecnumber: Optional[str] = Field(default=None) organism: Optional[str] = Field(default=None) @@ -732,22 +696,18 @@ class Protein(BaseModel): # JSON-LD fields ld_id: str = Field( - serialization_alias="@id", - default_factory=lambda: "enzml:Protein/" + str(uuid4()), + serialization_alias="@id", default_factory=lambda: "md:Protein/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: ["enzml:Protein", "schema:Protein"], + default_factory=lambda: ["md:Protein", "schema:Protein"], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", + "md": "http://mdmodel.net/", "schema": "https://schema.org/", - "id": { - "@type": "@id", - }, + "OBO": "http://purl.obolibrary.org/obo/", "name": "schema:name", "sequence": "OBO:GSSO_007262", "vessel_id": { @@ -759,7 +719,6 @@ class Protein(BaseModel): "@type": "@id", }, "references": { - "@id": "schema:citation", "@type": "@id", }, }, @@ -836,30 +795,24 @@ class Complex(BaseModel): validate_assigment=True, ) # type: ignore - id: str participants: list[str] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( - serialization_alias="@id", - default_factory=lambda: "enzml:Complex/" + str(uuid4()), + serialization_alias="@id", default_factory=lambda: "md:Complex/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "enzml:Complex", + "md:Complex", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", + "md": "http://mdmodel.net/", "schema": "https://schema.org/", - "id": { - "@id": "schema:identifier", - "@type": "@id", - }, + "OBO": "http://purl.obolibrary.org/obo/", "participants": { "@type": "@id", }, @@ -937,7 +890,6 @@ class SmallMolecule(BaseModel): validate_assigment=True, ) # type: ignore - id: str name: str constant: bool = False vessel_id: Optional[str] = Field(default=None) @@ -948,31 +900,26 @@ class SmallMolecule(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:SmallMolecule/" + str(uuid4()), + default_factory=lambda: "md:SmallMolecule/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "enzml:SmallMolecule", + "md:SmallMolecule", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", + "md": "http://mdmodel.net/", "schema": "https://schema.org/", - "id": { - "@id": "schema:identifier", - "@type": "@id", - }, + "OBO": "http://purl.obolibrary.org/obo/", "name": "schema:name", "vessel_id": { "@id": "schema:identifier", "@type": "@id", }, "references": { - "@id": "schema:citation", "@type": "@id", }, }, @@ -1049,34 +996,28 @@ class Reaction(BaseModel): validate_assigment=True, ) # type: ignore - id: str name: str reversible: bool = False - kinetic_law: Optional[Equation] = Field(default=None) + rate_law: Optional[Equation] = Field(default=None) species: list[ReactionElement] = Field(default_factory=list) modifiers: list[str] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( - serialization_alias="@id", - default_factory=lambda: "enzml:Reaction/" + str(uuid4()), + serialization_alias="@id", default_factory=lambda: "md:Reaction/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "enzml:Reaction", + "md:Reaction", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", + "md": "http://mdmodel.net/", "schema": "https://schema.org/", - "id": { - "@id": "schema:identifier", - "@type": "@id", - }, + "OBO": "http://purl.obolibrary.org/obo/", "modifiers": { "@type": "@id", }, @@ -1163,7 +1104,7 @@ def add_type_term( def add_to_species( self, species_id: str, - stoichiometry: float, + stoichiometry: Optional[float] = None, **kwargs, ): params = {"species_id": species_id, "stoichiometry": stoichiometry} @@ -1182,25 +1123,25 @@ class ReactionElement(BaseModel): ) # type: ignore species_id: str - stoichiometry: float + stoichiometry: Optional[float] = Field(default=None) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:ReactionElement/" + str(uuid4()), + default_factory=lambda: "md:ReactionElement/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "enzml:ReactionElement", + "md:ReactionElement", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", + "md": "http://mdmodel.net/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id", }, @@ -1273,64 +1214,130 @@ def add_type_term( self.ld_type.append(term) -class Equation(BaseModel): +class ReactionConditions(BaseModel): model_config: ConfigDict = ConfigDict( # type: ignore validate_assigment=True, ) # type: ignore - unit: UnitDefinition - equation_type: EquationType - equation: str - species_id: Optional[str] = Field(default=None) - variables: list[EqVariable] = Field(default_factory=list) - parameters: list[EqParameter] = Field(default_factory=list) + temperature: Optional[float] = Field(default=None) + temperature_unit: Optional[UnitDefinition] = Field(default=None) + ph: Optional[float] = Field(default=None) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Equation/" + str(uuid4()), + default_factory=lambda: "md:ReactionConditions/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "enzml:Equation", + "md:ReactionConditions", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", + "md": "http://mdmodel.net/", "schema": "https://schema.org/", - "species_id": { - "@type": "@id", - }, + "OBO": "http://purl.obolibrary.org/obo/", }, ) - def filter_variables(self, **kwargs) -> list[EqVariable]: - """Filters the variables attribute based on the given kwargs + def set_attr_term( + self, + attr: str, + term: str | dict, + prefix: str | None = None, + iri: str | None = None, + ): + """Sets the term for a given attribute in the JSON-LD object + + Example: + # Using an IRI term + >> obj.set_attr_term("name", "http://schema.org/givenName") + + # Using a prefix and term + >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") + + # Usinng a dictionary term + >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) Args: - **kwargs: The attributes to filter by. + attr (str): The attribute to set the term for + term (str | dict): The term to set for the attribute - Returns: - list[EqVariable]: The filtered list of EqVariable objects + Raises: + AssertionError: If the attribute is not found in the model """ - return FilterWrapper[EqVariable](self.variables, **kwargs).filter() + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" - def filter_parameters(self, **kwargs) -> list[EqParameter]: - """Filters the parameters attribute based on the given kwargs + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_context[attr] = term + + def add_type_term( + self, term: str, prefix: str | None = None, iri: str | None = None + ): + """Adds a term to the @type field of the JSON-LD object + + Example: + # Using a term + >> obj.add_type_term("https://schema.org/Person") + + # Using a prefixed term + >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") Args: - **kwargs: The attributes to filter by. + term (str): The term to add to the @type field + prefix (str, optional): The prefix to use for the term. Defaults to None. + iri (str, optional): The IRI to use for the term prefix. Defaults to None. - Returns: - list[EqParameter]: The filtered list of EqParameter objects + Raises: + ValueError: If prefix is provided but iri is not + ValueError: If iri is provided but prefix is not """ - return FilterWrapper[EqParameter](self.parameters, **kwargs).filter() + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_type.append(term) + + +class ODE(BaseModel): + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore + + species_id: str + equation: Equation + + # JSON-LD fields + ld_id: str = Field( + serialization_alias="@id", default_factory=lambda: "md:ODE/" + str(uuid4()) + ) + ld_type: list[str] = Field( + serialization_alias="@type", + default_factory=lambda: [ + "md:ODE", + ], + ) + ld_context: dict[str, str | dict] = Field( + serialization_alias="@context", + default_factory=lambda: { + "md": "http://mdmodel.net/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", + "species_id": { + "@type": "@id", + }, + }, + ) def set_attr_term( self, @@ -1397,76 +1404,38 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) - def add_to_variables( - self, - id: str, - name: str, - symbol: Optional[str] = None, - **kwargs, - ): - params = {"id": id, "name": name, "symbol": symbol} - - if "id" in kwargs: - params["id"] = kwargs["id"] - - self.variables.append(EqVariable(**params)) - - return self.variables[-1] - - def add_to_parameters( - self, - id: str, - name: str, - symbol: Optional[str] = None, - value: Optional[float] = None, - **kwargs, - ): - params = {"id": id, "name": name, "symbol": symbol, "value": value} - - if "id" in kwargs: - params["id"] = kwargs["id"] - - self.parameters.append(EqParameter(**params)) - - return self.parameters[-1] - class Parameter(BaseModel): model_config: ConfigDict = ConfigDict( # type: ignore validate_assigment=True, ) # type: ignore - id: str name: str - value: Optional[float] = Field(default=None) - unit: Optional[UnitDefinition] = Field(default=None) + value: float + unit: UnitDefinition + constant: bool initial_value: Optional[float] = Field(default=None) upper: Optional[float] = Field(default=None) lower: Optional[float] = Field(default=None) stderr: Optional[float] = Field(default=None) - constant: bool = True # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Parameter/" + str(uuid4()), + default_factory=lambda: "md:Parameter/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "enzml:Parameter", + "md:Parameter", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", + "md": "http://mdmodel.net/", "schema": "https://schema.org/", - "id": { - "@id": "schema:identifier", - "@type": "@id", - }, + "OBO": "http://purl.obolibrary.org/obo/", }, ) @@ -1541,35 +1510,27 @@ class Measurement(BaseModel): validate_assigment=True, ) # type: ignore - id: str name: str species: list[MeasurementData] = Field(default_factory=list) group_id: Optional[str] = Field(default=None) - ph: Optional[float] = Field(default=None) - temperature: Optional[float] = Field(default=None) - temperature_unit: Optional[UnitDefinition] = Field(default=None) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Measurement/" + str(uuid4()), + default_factory=lambda: "md:Measurement/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "enzml:Measurement", + "md:Measurement", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", + "md": "http://mdmodel.net/", "schema": "https://schema.org/", - "id": { - "@id": "schema:identifier", - "@type": "@id", - }, + "OBO": "http://purl.obolibrary.org/obo/", "group_id": { "@type": "@id", }, @@ -1701,20 +1662,20 @@ class MeasurementData(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:MeasurementData/" + str(uuid4()), + default_factory=lambda: "md:MeasurementData/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "enzml:MeasurementData", + "md:MeasurementData", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", + "md": "http://mdmodel.net/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id", }, @@ -1787,46 +1748,57 @@ def add_type_term( self.ld_type.append(term) -class UnitDefinition(BaseModel): +class Equation(BaseModel): model_config: ConfigDict = ConfigDict( # type: ignore validate_assigment=True, ) # type: ignore - id: Optional[str] = Field(default=None) - name: Optional[str] = Field(default=None) - base_units: list[BaseUnit] = Field(default_factory=list) + equation: str + variables: list[EqVariable] = Field(default_factory=list) + parameters: list[EqParameter] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( - serialization_alias="@id", - default_factory=lambda: "enzml:UnitDefinition/" + str(uuid4()), + serialization_alias="@id", default_factory=lambda: "md:Equation/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "enzml:UnitDefinition", + "md:Equation", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", + "md": "http://mdmodel.net/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", }, ) - def filter_base_units(self, **kwargs) -> list[BaseUnit]: - """Filters the base_units attribute based on the given kwargs + def filter_variables(self, **kwargs) -> list[EqVariable]: + """Filters the variables attribute based on the given kwargs Args: **kwargs: The attributes to filter by. Returns: - list[BaseUnit]: The filtered list of BaseUnit objects + list[EqVariable]: The filtered list of EqVariable objects """ - return FilterWrapper[BaseUnit](self.base_units, **kwargs).filter() + return FilterWrapper[EqVariable](self.variables, **kwargs).filter() + + def filter_parameters(self, **kwargs) -> list[EqParameter]: + """Filters the parameters attribute based on the given kwargs + + Args: + **kwargs: The attributes to filter by. + + Returns: + list[EqParameter]: The filtered list of EqParameter objects + """ + + return FilterWrapper[EqParameter](self.parameters, **kwargs).filter() def set_attr_term( self, @@ -1893,56 +1865,69 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) - def add_to_base_units( + def add_to_variables( self, - kind: UnitType, - exponent: int, - multiplier: Optional[float] = None, - scale: Optional[float] = None, + id: str, + name: str, + symbol: Optional[str] = None, **kwargs, ): - params = { - "kind": kind, - "exponent": exponent, - "multiplier": multiplier, - "scale": scale, - } + params = {"id": id, "name": name, "symbol": symbol} if "id" in kwargs: params["id"] = kwargs["id"] - self.base_units.append(BaseUnit(**params)) + self.variables.append(EqVariable(**params)) - return self.base_units[-1] + return self.variables[-1] + + def add_to_parameters( + self, + id: str, + name: str, + symbol: Optional[str] = None, + value: Optional[float] = None, + **kwargs, + ): + params = {"id": id, "name": name, "symbol": symbol, "value": value} + if "id" in kwargs: + params["id"] = kwargs["id"] -class BaseUnit(BaseModel): + self.parameters.append(EqParameter(**params)) + + return self.parameters[-1] + + +class EqVariable(BaseModel): model_config: ConfigDict = ConfigDict( # type: ignore validate_assigment=True, ) # type: ignore - kind: UnitType - exponent: int - multiplier: Optional[float] = Field(default=None) - scale: Optional[float] = Field(default=None) + id: str + name: str + symbol: Optional[str] = Field(default=None) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:BaseUnit/" + str(uuid4()), + default_factory=lambda: "md:EqVariable/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "enzml:BaseUnit", + "md:EqVariable", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", + "md": "http://mdmodel.net/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", + "id": { + "@type": "@id", + }, }, ) @@ -2012,7 +1997,7 @@ def add_type_term( self.ld_type.append(term) -class EqVariable(BaseModel): +class EqParameter(BaseModel): model_config: ConfigDict = ConfigDict( # type: ignore validate_assigment=True, ) # type: ignore @@ -2020,24 +2005,25 @@ class EqVariable(BaseModel): id: str name: str symbol: Optional[str] = Field(default=None) + value: Optional[float] = Field(default=None) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:EqVariable/" + str(uuid4()), + default_factory=lambda: "md:EqParameter/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "enzml:EqVariable", + "md:EqParameter", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", + "md": "http://mdmodel.net/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@type": "@id", }, @@ -2110,36 +2096,161 @@ def add_type_term( self.ld_type.append(term) -class EqParameter(BaseModel): +class UnitDefinition(BaseModel): model_config: ConfigDict = ConfigDict( # type: ignore validate_assigment=True, ) # type: ignore - id: str - name: str - symbol: Optional[str] = Field(default=None) - value: Optional[float] = Field(default=None) + id: Optional[str] = Field(default=None) + name: Optional[str] = Field(default=None) + base_units: list[BaseUnit] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:EqParameter/" + str(uuid4()), + default_factory=lambda: "md:UnitDefinition/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "enzml:EqParameter", + "md:UnitDefinition", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "enzml": "http://www.enzymeml.org/v2/", + "md": "http://mdmodel.net/", + "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + }, + ) + + def filter_base_units(self, **kwargs) -> list[BaseUnit]: + """Filters the base_units attribute based on the given kwargs + + Args: + **kwargs: The attributes to filter by. + + Returns: + list[BaseUnit]: The filtered list of BaseUnit objects + """ + + return FilterWrapper[BaseUnit](self.base_units, **kwargs).filter() + + def set_attr_term( + self, + attr: str, + term: str | dict, + prefix: str | None = None, + iri: str | None = None, + ): + """Sets the term for a given attribute in the JSON-LD object + + Example: + # Using an IRI term + >> obj.set_attr_term("name", "http://schema.org/givenName") + + # Using a prefix and term + >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") + + # Usinng a dictionary term + >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) + + Args: + attr (str): The attribute to set the term for + term (str | dict): The term to set for the attribute + + Raises: + AssertionError: If the attribute is not found in the model + """ + + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_context[attr] = term + + def add_type_term( + self, term: str, prefix: str | None = None, iri: str | None = None + ): + """Adds a term to the @type field of the JSON-LD object + + Example: + # Using a term + >> obj.add_type_term("https://schema.org/Person") + + # Using a prefixed term + >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") + + Args: + term (str): The term to add to the @type field + prefix (str, optional): The prefix to use for the term. Defaults to None. + iri (str, optional): The IRI to use for the term prefix. Defaults to None. + + Raises: + ValueError: If prefix is provided but iri is not + ValueError: If iri is provided but prefix is not + """ + + if prefix: + validate_prefix(term, prefix) + + add_namespace(self, prefix, iri) + self.ld_type.append(term) + + def add_to_base_units( + self, + kind: UnitType, + exponent: int, + multiplier: Optional[float] = None, + scale: Optional[float] = None, + **kwargs, + ): + params = { + "kind": kind, + "exponent": exponent, + "multiplier": multiplier, + "scale": scale, + } + + if "id" in kwargs: + params["id"] = kwargs["id"] + + self.base_units.append(BaseUnit(**params)) + + return self.base_units[-1] + + +class BaseUnit(BaseModel): + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore + + kind: UnitType + exponent: int + multiplier: Optional[float] = Field(default=None) + scale: Optional[float] = Field(default=None) + + # JSON-LD fields + ld_id: str = Field( + serialization_alias="@id", default_factory=lambda: "md:BaseUnit/" + str(uuid4()) + ) + ld_type: list[str] = Field( + serialization_alias="@type", + default_factory=lambda: [ + "md:BaseUnit", + ], + ) + ld_context: dict[str, str | dict] = Field( + serialization_alias="@context", + default_factory=lambda: { + "md": "http://mdmodel.net/", "schema": "https://schema.org/", - "id": { - "@type": "@id", - }, + "OBO": "http://purl.obolibrary.org/obo/", }, ) @@ -2218,13 +2329,6 @@ class DataTypes(Enum): PEAK_AREA = "peak-area" -class EquationType(Enum): - ASSIGNMENT = "assignment" - INITIAL_ASSIGNMENT = "initialAssignment" - ODE = "ode" - RATE_LAW = "rateLaw" - - class UnitType(Enum): AMPERE = "ampere" AVOGADRO = "avogadro" From cf1618c48001bd147150466b2f8d52e434d9eebd Mon Sep 17 00:00:00 2001 From: haeussma <83341109+haeussma@users.noreply.github.com> Date: Wed, 26 Jun 2024 11:35:41 +0200 Subject: [PATCH 19/80] replaced mode, added celsius as unit --- pyenzyme/model.py | 613 +++++++++++++++-------------------- pyenzyme/units/predefined.py | 1 + 2 files changed, 257 insertions(+), 357 deletions(-) diff --git a/pyenzyme/model.py b/pyenzyme/model.py index d784817..23362aa 100644 --- a/pyenzyme/model.py +++ b/pyenzyme/model.py @@ -2,6 +2,7 @@ from __future__ import annotations +from datetime import date, datetime from enum import Enum from typing import Generic, Optional, TypeVar from uuid import uuid4 @@ -87,32 +88,35 @@ class EnzymeMLDocument(BaseModel): complexes: list[Complex] = Field(default_factory=list) small_molecules: list[SmallMolecule] = Field(default_factory=list) reactions: list[Reaction] = Field(default_factory=list) - conditions: Optional[ReactionConditions] = Field(default=None) measurements: list[Measurement] = Field(default_factory=list) - equations: list[ODE] = Field(default_factory=list) + equations: list[Equation] = Field(default_factory=list) parameters: list[Parameter] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "md:EnzymeMLDocument/" + str(uuid4()), + default_factory=lambda: "enzml:EnzymeMLDocument/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "md:EnzymeMLDocument", + "enzml:EnzymeMLDocument", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "md": "http://mdmodel.net/", + "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", - "name": "schema:name", + "name": "schema:title", "references": { + "@id": "schema:citation", "@type": "@id", }, + "created": "schema:dateCreated", + "modified": "schema:dateModified", + "creators": "schema:creator", }, ) @@ -200,17 +204,17 @@ def filter_measurements(self, **kwargs) -> list[Measurement]: return FilterWrapper[Measurement](self.measurements, **kwargs).filter() - def filter_equations(self, **kwargs) -> list[ODE]: + def filter_equations(self, **kwargs) -> list[Equation]: """Filters the equations attribute based on the given kwargs Args: **kwargs: The attributes to filter by. Returns: - list[ODE]: The filtered list of ODE objects + list[Equation]: The filtered list of Equation objects """ - return FilterWrapper[ODE](self.equations, **kwargs).filter() + return FilterWrapper[Equation](self.equations, **kwargs).filter() def filter_parameters(self, **kwargs) -> list[Parameter]: """Filters the parameters attribute based on the given kwargs @@ -307,19 +311,19 @@ def add_to_creators( def add_to_vessels( self, + id: str, name: str, volume: float, unit: UnitDefinition, - constant: bool, - creator_id: Optional[str] = None, + constant: bool = True, **kwargs, ): params = { + "id": id, "name": name, "volume": volume, "unit": unit, "constant": constant, - "creator_id": creator_id, } if "id" in kwargs: @@ -331,9 +335,10 @@ def add_to_vessels( def add_to_proteins( self, + id: str, name: str, - sequence: str, constant: bool = False, + sequence: Optional[str] = None, vessel_id: Optional[str] = None, ecnumber: Optional[str] = None, organism: Optional[str] = None, @@ -342,9 +347,10 @@ def add_to_proteins( **kwargs, ): params = { + "id": id, "name": name, - "sequence": sequence, "constant": constant, + "sequence": sequence, "vessel_id": vessel_id, "ecnumber": ecnumber, "organism": organism, @@ -361,10 +367,11 @@ def add_to_proteins( def add_to_complexes( self, + id: str, participants: list[str] = [], **kwargs, ): - params = {"participants": participants} + params = {"id": id, "participants": participants} if "id" in kwargs: params["id"] = kwargs["id"] @@ -375,6 +382,7 @@ def add_to_complexes( def add_to_small_molecules( self, + id: str, name: str, constant: bool = False, vessel_id: Optional[str] = None, @@ -384,6 +392,7 @@ def add_to_small_molecules( **kwargs, ): params = { + "id": id, "name": name, "constant": constant, "vessel_id": vessel_id, @@ -401,17 +410,19 @@ def add_to_small_molecules( def add_to_reactions( self, + id: str, name: str, reversible: bool = False, - rate_law: Optional[Equation] = None, + kinetic_law: Optional[Equation] = None, species: list[ReactionElement] = [], modifiers: list[str] = [], **kwargs, ): params = { + "id": id, "name": name, "reversible": reversible, - "rate_law": rate_law, + "kinetic_law": kinetic_law, "species": species, "modifiers": modifiers, } @@ -425,12 +436,24 @@ def add_to_reactions( def add_to_measurements( self, + id: str, name: str, species: list[MeasurementData] = [], group_id: Optional[str] = None, + ph: Optional[float] = None, + temperature: Optional[float] = None, + temperature_unit: Optional[UnitDefinition] = None, **kwargs, ): - params = {"name": name, "species": species, "group_id": group_id} + params = { + "id": id, + "name": name, + "species": species, + "group_id": group_id, + "ph": ph, + "temperature": temperature, + "temperature_unit": temperature_unit, + } if "id" in kwargs: params["id"] = kwargs["id"] @@ -441,40 +464,53 @@ def add_to_measurements( def add_to_equations( self, - species_id: str, - equation: Equation, + unit: UnitDefinition, + equation_type: EquationType, + equation: str, + species_id: Optional[str] = None, + variables: list[EqVariable] = [], + parameters: list[EqParameter] = [], **kwargs, ): - params = {"species_id": species_id, "equation": equation} + params = { + "unit": unit, + "equation_type": equation_type, + "equation": equation, + "species_id": species_id, + "variables": variables, + "parameters": parameters, + } if "id" in kwargs: params["id"] = kwargs["id"] - self.equations.append(ODE(**params)) + self.equations.append(Equation(**params)) return self.equations[-1] def add_to_parameters( self, + id: str, name: str, - value: float, - unit: UnitDefinition, - constant: bool, + value: Optional[float] = None, + unit: Optional[UnitDefinition] = None, initial_value: Optional[float] = None, upper: Optional[float] = None, lower: Optional[float] = None, stderr: Optional[float] = None, + constant: Optional[bool] = True, **kwargs, ): params = { + "id": id, "name": name, "value": value, "unit": unit, - "constant": constant, "initial_value": initial_value, "upper": upper, "lower": lower, "stderr": stderr, + "constant": constant, } if "id" in kwargs: @@ -496,16 +532,17 @@ class Creator(BaseModel): # JSON-LD fields ld_id: str = Field( - serialization_alias="@id", default_factory=lambda: "md:Creator/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:Creator/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: ["md:Creator", "schema:creator"], + default_factory=lambda: ["enzml:Creator", "schema:person"], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "md": "http://mdmodel.net/", + "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", "given_name": "schema:givenName", @@ -585,32 +622,33 @@ class Vessel(BaseModel): validate_assigment=True, ) # type: ignore + id: str name: str volume: float unit: UnitDefinition - constant: bool - creator_id: Optional[str] = Field(default=None) + constant: bool = True # JSON-LD fields ld_id: str = Field( - serialization_alias="@id", default_factory=lambda: "md:Vessel/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:Vessel/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: ["md:Vessel", "OBO:OBI_0400081"], + default_factory=lambda: ["enzml:Vessel", "OBO:OBI_0400081"], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "md": "http://mdmodel.net/", + "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", - "name": "schema:name", - "volume": "OBO:OBI_0002139", - "creator_id": { + "id": { "@id": "schema:identifier", "@type": "@id", }, + "name": "schema:name", + "volume": "OBO:OBI_0002139", }, ) @@ -685,9 +723,10 @@ class Protein(BaseModel): validate_assigment=True, ) # type: ignore + id: str name: str - sequence: str constant: bool = False + sequence: Optional[str] = Field(default=None) vessel_id: Optional[str] = Field(default=None) ecnumber: Optional[str] = Field(default=None) organism: Optional[str] = Field(default=None) @@ -696,18 +735,22 @@ class Protein(BaseModel): # JSON-LD fields ld_id: str = Field( - serialization_alias="@id", default_factory=lambda: "md:Protein/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:Protein/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: ["md:Protein", "schema:Protein"], + default_factory=lambda: ["enzml:Protein", "schema:Protein"], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "md": "http://mdmodel.net/", + "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "id": { + "@type": "@id", + }, "name": "schema:name", "sequence": "OBO:GSSO_007262", "vessel_id": { @@ -719,6 +762,7 @@ class Protein(BaseModel): "@type": "@id", }, "references": { + "@id": "schema:citation", "@type": "@id", }, }, @@ -795,24 +839,30 @@ class Complex(BaseModel): validate_assigment=True, ) # type: ignore + id: str participants: list[str] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( - serialization_alias="@id", default_factory=lambda: "md:Complex/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:Complex/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "md:Complex", + "enzml:Complex", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "md": "http://mdmodel.net/", + "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "id": { + "@id": "schema:identifier", + "@type": "@id", + }, "participants": { "@type": "@id", }, @@ -890,6 +940,7 @@ class SmallMolecule(BaseModel): validate_assigment=True, ) # type: ignore + id: str name: str constant: bool = False vessel_id: Optional[str] = Field(default=None) @@ -900,26 +951,31 @@ class SmallMolecule(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "md:SmallMolecule/" + str(uuid4()), + default_factory=lambda: "enzml:SmallMolecule/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "md:SmallMolecule", + "enzml:SmallMolecule", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "md": "http://mdmodel.net/", + "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "id": { + "@id": "schema:identifier", + "@type": "@id", + }, "name": "schema:name", "vessel_id": { "@id": "schema:identifier", "@type": "@id", }, "references": { + "@id": "schema:citation", "@type": "@id", }, }, @@ -996,28 +1052,34 @@ class Reaction(BaseModel): validate_assigment=True, ) # type: ignore + id: str name: str reversible: bool = False - rate_law: Optional[Equation] = Field(default=None) + kinetic_law: Optional[Equation] = Field(default=None) species: list[ReactionElement] = Field(default_factory=list) modifiers: list[str] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( - serialization_alias="@id", default_factory=lambda: "md:Reaction/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:Reaction/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "md:Reaction", + "enzml:Reaction", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "md": "http://mdmodel.net/", + "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "id": { + "@id": "schema:identifier", + "@type": "@id", + }, "modifiers": { "@type": "@id", }, @@ -1104,7 +1166,7 @@ def add_type_term( def add_to_species( self, species_id: str, - stoichiometry: Optional[float] = None, + stoichiometry: float, **kwargs, ): params = {"species_id": species_id, "stoichiometry": stoichiometry} @@ -1123,23 +1185,23 @@ class ReactionElement(BaseModel): ) # type: ignore species_id: str - stoichiometry: Optional[float] = Field(default=None) + stoichiometry: float # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "md:ReactionElement/" + str(uuid4()), + default_factory=lambda: "enzml:ReactionElement/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "md:ReactionElement", + "enzml:ReactionElement", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "md": "http://mdmodel.net/", + "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", "species_id": { @@ -1214,130 +1276,64 @@ def add_type_term( self.ld_type.append(term) -class ReactionConditions(BaseModel): +class Equation(BaseModel): model_config: ConfigDict = ConfigDict( # type: ignore validate_assigment=True, ) # type: ignore - temperature: Optional[float] = Field(default=None) - temperature_unit: Optional[UnitDefinition] = Field(default=None) - ph: Optional[float] = Field(default=None) + unit: UnitDefinition + equation_type: EquationType + equation: str + species_id: Optional[str] = Field(default=None) + variables: list[EqVariable] = Field(default_factory=list) + parameters: list[EqParameter] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "md:ReactionConditions/" + str(uuid4()), + default_factory=lambda: "enzml:Equation/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "md:ReactionConditions", + "enzml:Equation", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "md": "http://mdmodel.net/", + "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "species_id": { + "@type": "@id", + }, }, ) - def set_attr_term( - self, - attr: str, - term: str | dict, - prefix: str | None = None, - iri: str | None = None, - ): - """Sets the term for a given attribute in the JSON-LD object - - Example: - # Using an IRI term - >> obj.set_attr_term("name", "http://schema.org/givenName") - - # Using a prefix and term - >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") - - # Usinng a dictionary term - >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) + def filter_variables(self, **kwargs) -> list[EqVariable]: + """Filters the variables attribute based on the given kwargs Args: - attr (str): The attribute to set the term for - term (str | dict): The term to set for the attribute + **kwargs: The attributes to filter by. - Raises: - AssertionError: If the attribute is not found in the model + Returns: + list[EqVariable]: The filtered list of EqVariable objects """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" - - if prefix: - validate_prefix(term, prefix) - - add_namespace(self, prefix, iri) - self.ld_context[attr] = term - - def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None - ): - """Adds a term to the @type field of the JSON-LD object - - Example: - # Using a term - >> obj.add_type_term("https://schema.org/Person") + return FilterWrapper[EqVariable](self.variables, **kwargs).filter() - # Using a prefixed term - >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") + def filter_parameters(self, **kwargs) -> list[EqParameter]: + """Filters the parameters attribute based on the given kwargs Args: - term (str): The term to add to the @type field - prefix (str, optional): The prefix to use for the term. Defaults to None. - iri (str, optional): The IRI to use for the term prefix. Defaults to None. + **kwargs: The attributes to filter by. - Raises: - ValueError: If prefix is provided but iri is not - ValueError: If iri is provided but prefix is not + Returns: + list[EqParameter]: The filtered list of EqParameter objects """ - if prefix: - validate_prefix(term, prefix) - - add_namespace(self, prefix, iri) - self.ld_type.append(term) - - -class ODE(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore - - species_id: str - equation: Equation - - # JSON-LD fields - ld_id: str = Field( - serialization_alias="@id", default_factory=lambda: "md:ODE/" + str(uuid4()) - ) - ld_type: list[str] = Field( - serialization_alias="@type", - default_factory=lambda: [ - "md:ODE", - ], - ) - ld_context: dict[str, str | dict] = Field( - serialization_alias="@context", - default_factory=lambda: { - "md": "http://mdmodel.net/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/", - "species_id": { - "@type": "@id", - }, - }, - ) + return FilterWrapper[EqParameter](self.parameters, **kwargs).filter() def set_attr_term( self, @@ -1404,38 +1400,76 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) + def add_to_variables( + self, + id: str, + name: str, + symbol: Optional[str] = None, + **kwargs, + ): + params = {"id": id, "name": name, "symbol": symbol} + + if "id" in kwargs: + params["id"] = kwargs["id"] + + self.variables.append(EqVariable(**params)) + + return self.variables[-1] + + def add_to_parameters( + self, + id: str, + name: str, + symbol: Optional[str] = None, + value: Optional[float] = None, + **kwargs, + ): + params = {"id": id, "name": name, "symbol": symbol, "value": value} + + if "id" in kwargs: + params["id"] = kwargs["id"] + + self.parameters.append(EqParameter(**params)) + + return self.parameters[-1] + class Parameter(BaseModel): model_config: ConfigDict = ConfigDict( # type: ignore validate_assigment=True, ) # type: ignore + id: str name: str - value: float - unit: UnitDefinition - constant: bool + value: Optional[float] = Field(default=None) + unit: Optional[UnitDefinition] = Field(default=None) initial_value: Optional[float] = Field(default=None) upper: Optional[float] = Field(default=None) lower: Optional[float] = Field(default=None) stderr: Optional[float] = Field(default=None) + constant: bool = True # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "md:Parameter/" + str(uuid4()), + default_factory=lambda: "enzml:Parameter/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "md:Parameter", + "enzml:Parameter", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "md": "http://mdmodel.net/", + "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "id": { + "@id": "schema:identifier", + "@type": "@id", + }, }, ) @@ -1510,27 +1544,35 @@ class Measurement(BaseModel): validate_assigment=True, ) # type: ignore + id: str name: str species: list[MeasurementData] = Field(default_factory=list) group_id: Optional[str] = Field(default=None) + ph: Optional[float] = Field(default=None) + temperature: Optional[float] = Field(default=None) + temperature_unit: Optional[UnitDefinition] = Field(default=None) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "md:Measurement/" + str(uuid4()), + default_factory=lambda: "enzml:Measurement/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "md:Measurement", + "enzml:Measurement", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "md": "http://mdmodel.net/", + "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "id": { + "@id": "schema:identifier", + "@type": "@id", + }, "group_id": { "@type": "@id", }, @@ -1662,18 +1704,18 @@ class MeasurementData(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "md:MeasurementData/" + str(uuid4()), + default_factory=lambda: "enzml:MeasurementData/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "md:MeasurementData", + "enzml:MeasurementData", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "md": "http://mdmodel.net/", + "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", "species_id": { @@ -1748,57 +1790,46 @@ def add_type_term( self.ld_type.append(term) -class Equation(BaseModel): +class UnitDefinition(BaseModel): model_config: ConfigDict = ConfigDict( # type: ignore validate_assigment=True, ) # type: ignore - equation: str - variables: list[EqVariable] = Field(default_factory=list) - parameters: list[EqParameter] = Field(default_factory=list) + id: Optional[str] = Field(default=None) + name: Optional[str] = Field(default=None) + base_units: list[BaseUnit] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( - serialization_alias="@id", default_factory=lambda: "md:Equation/" + str(uuid4()) + serialization_alias="@id", + default_factory=lambda: "enzml:UnitDefinition/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "md:Equation", + "enzml:UnitDefinition", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "md": "http://mdmodel.net/", + "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", }, ) - def filter_variables(self, **kwargs) -> list[EqVariable]: - """Filters the variables attribute based on the given kwargs - - Args: - **kwargs: The attributes to filter by. - - Returns: - list[EqVariable]: The filtered list of EqVariable objects - """ - - return FilterWrapper[EqVariable](self.variables, **kwargs).filter() - - def filter_parameters(self, **kwargs) -> list[EqParameter]: - """Filters the parameters attribute based on the given kwargs + def filter_base_units(self, **kwargs) -> list[BaseUnit]: + """Filters the base_units attribute based on the given kwargs Args: **kwargs: The attributes to filter by. Returns: - list[EqParameter]: The filtered list of EqParameter objects + list[BaseUnit]: The filtered list of BaseUnit objects """ - return FilterWrapper[EqParameter](self.parameters, **kwargs).filter() + return FilterWrapper[BaseUnit](self.base_units, **kwargs).filter() def set_attr_term( self, @@ -1865,69 +1896,56 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) - def add_to_variables( - self, - id: str, - name: str, - symbol: Optional[str] = None, - **kwargs, - ): - params = {"id": id, "name": name, "symbol": symbol} - - if "id" in kwargs: - params["id"] = kwargs["id"] - - self.variables.append(EqVariable(**params)) - - return self.variables[-1] - - def add_to_parameters( + def add_to_base_units( self, - id: str, - name: str, - symbol: Optional[str] = None, - value: Optional[float] = None, + kind: UnitType, + exponent: int, + multiplier: Optional[float] = None, + scale: Optional[float] = None, **kwargs, ): - params = {"id": id, "name": name, "symbol": symbol, "value": value} + params = { + "kind": kind, + "exponent": exponent, + "multiplier": multiplier, + "scale": scale, + } if "id" in kwargs: params["id"] = kwargs["id"] - self.parameters.append(EqParameter(**params)) + self.base_units.append(BaseUnit(**params)) - return self.parameters[-1] + return self.base_units[-1] -class EqVariable(BaseModel): +class BaseUnit(BaseModel): model_config: ConfigDict = ConfigDict( # type: ignore validate_assigment=True, ) # type: ignore - id: str - name: str - symbol: Optional[str] = Field(default=None) + kind: UnitType + exponent: int + multiplier: Optional[float] = Field(default=None) + scale: Optional[float] = Field(default=None) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "md:EqVariable/" + str(uuid4()), + default_factory=lambda: "enzml:BaseUnit/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "md:EqVariable", + "enzml:BaseUnit", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "md": "http://mdmodel.net/", + "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", - "id": { - "@type": "@id", - }, }, ) @@ -1997,7 +2015,7 @@ def add_type_term( self.ld_type.append(term) -class EqParameter(BaseModel): +class EqVariable(BaseModel): model_config: ConfigDict = ConfigDict( # type: ignore validate_assigment=True, ) # type: ignore @@ -2005,23 +2023,22 @@ class EqParameter(BaseModel): id: str name: str symbol: Optional[str] = Field(default=None) - value: Optional[float] = Field(default=None) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "md:EqParameter/" + str(uuid4()), + default_factory=lambda: "enzml:EqVariable/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "md:EqParameter", + "enzml:EqVariable", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "md": "http://mdmodel.net/", + "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", "id": { @@ -2096,161 +2113,36 @@ def add_type_term( self.ld_type.append(term) -class UnitDefinition(BaseModel): +class EqParameter(BaseModel): model_config: ConfigDict = ConfigDict( # type: ignore validate_assigment=True, ) # type: ignore - id: Optional[str] = Field(default=None) - name: Optional[str] = Field(default=None) - base_units: list[BaseUnit] = Field(default_factory=list) + id: str + name: str + symbol: Optional[str] = Field(default=None) + value: Optional[float] = Field(default=None) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "md:UnitDefinition/" + str(uuid4()), - ) - ld_type: list[str] = Field( - serialization_alias="@type", - default_factory=lambda: [ - "md:UnitDefinition", - ], - ) - ld_context: dict[str, str | dict] = Field( - serialization_alias="@context", - default_factory=lambda: { - "md": "http://mdmodel.net/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/", - }, - ) - - def filter_base_units(self, **kwargs) -> list[BaseUnit]: - """Filters the base_units attribute based on the given kwargs - - Args: - **kwargs: The attributes to filter by. - - Returns: - list[BaseUnit]: The filtered list of BaseUnit objects - """ - - return FilterWrapper[BaseUnit](self.base_units, **kwargs).filter() - - def set_attr_term( - self, - attr: str, - term: str | dict, - prefix: str | None = None, - iri: str | None = None, - ): - """Sets the term for a given attribute in the JSON-LD object - - Example: - # Using an IRI term - >> obj.set_attr_term("name", "http://schema.org/givenName") - - # Using a prefix and term - >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") - - # Usinng a dictionary term - >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) - - Args: - attr (str): The attribute to set the term for - term (str | dict): The term to set for the attribute - - Raises: - AssertionError: If the attribute is not found in the model - """ - - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" - - if prefix: - validate_prefix(term, prefix) - - add_namespace(self, prefix, iri) - self.ld_context[attr] = term - - def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None - ): - """Adds a term to the @type field of the JSON-LD object - - Example: - # Using a term - >> obj.add_type_term("https://schema.org/Person") - - # Using a prefixed term - >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") - - Args: - term (str): The term to add to the @type field - prefix (str, optional): The prefix to use for the term. Defaults to None. - iri (str, optional): The IRI to use for the term prefix. Defaults to None. - - Raises: - ValueError: If prefix is provided but iri is not - ValueError: If iri is provided but prefix is not - """ - - if prefix: - validate_prefix(term, prefix) - - add_namespace(self, prefix, iri) - self.ld_type.append(term) - - def add_to_base_units( - self, - kind: UnitType, - exponent: int, - multiplier: Optional[float] = None, - scale: Optional[float] = None, - **kwargs, - ): - params = { - "kind": kind, - "exponent": exponent, - "multiplier": multiplier, - "scale": scale, - } - - if "id" in kwargs: - params["id"] = kwargs["id"] - - self.base_units.append(BaseUnit(**params)) - - return self.base_units[-1] - - -class BaseUnit(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore - - kind: UnitType - exponent: int - multiplier: Optional[float] = Field(default=None) - scale: Optional[float] = Field(default=None) - - # JSON-LD fields - ld_id: str = Field( - serialization_alias="@id", default_factory=lambda: "md:BaseUnit/" + str(uuid4()) + default_factory=lambda: "enzml:EqParameter/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", default_factory=lambda: [ - "md:BaseUnit", + "enzml:EqParameter", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", default_factory=lambda: { - "md": "http://mdmodel.net/", + "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "id": { + "@type": "@id", + }, }, ) @@ -2329,6 +2221,13 @@ class DataTypes(Enum): PEAK_AREA = "peak-area" +class EquationType(Enum): + ASSIGNMENT = "assignment" + INITIAL_ASSIGNMENT = "initialAssignment" + ODE = "ode" + RATE_LAW = "rateLaw" + + class UnitType(Enum): AMPERE = "ampere" AVOGADRO = "avogadro" diff --git a/pyenzyme/units/predefined.py b/pyenzyme/units/predefined.py index 729de81..2591f3a 100644 --- a/pyenzyme/units/predefined.py +++ b/pyenzyme/units/predefined.py @@ -144,6 +144,7 @@ def dimensionless(): kelvin = UnitDefinition(base_units=[Unit.kelvin()])._get_name() K = UnitDefinition(base_units=[Unit.kelvin()])._get_name() celsius = UnitDefinition(base_units=[Unit.celsius()])._get_name() +C = UnitDefinition(base_units=[Unit.celsius()])._get_name() ## Ontology From b2bb4f1b552283b3a34297468c2a6264a2f74b48 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Wed, 26 Jun 2024 12:56:54 +0200 Subject: [PATCH 20/80] remove unused import --- pyenzyme/model.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pyenzyme/model.py b/pyenzyme/model.py index 23362aa..b1205c8 100644 --- a/pyenzyme/model.py +++ b/pyenzyme/model.py @@ -2,7 +2,6 @@ from __future__ import annotations -from datetime import date, datetime from enum import Enum from typing import Generic, Optional, TypeVar from uuid import uuid4 From 065d66cc40253f3523a87e6be23d1c0cccca244d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20H=C3=A4u=C3=9Fler?= Date: Fri, 16 Aug 2024 14:36:54 +0200 Subject: [PATCH 21/80] updated pandas dependency version range --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7ce9dee..6799849 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ python = "^3.10" python-libsbml = "^5.20.2" toml = "^0.10.2" rich = "^13.7.1" -pandas = "^2.2.2" +pandas = ">=2.0,<2.2.2" pydantic = "^2.7.4" loguru = "^0.7.2" rdflib = "7.0.0" From 981ddcbe2902b90c6cc210357cc924f3ead68715 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Fri, 16 Aug 2024 16:02:59 +0200 Subject: [PATCH 22/80] update dev examples --- dev-examples/odes/enzymeml.json | 743 ++++++++---------- dev-examples/odes/ode_example.omex | Bin 0 -> 2426 bytes dev-examples/odes/sbml.xml | 111 ++- dev-examples/reactions/enzymeml.json | 609 +++++++------- dev-examples/reactions/reactions_example.omex | Bin 0 -> 2208 bytes dev-examples/reactions/sbml.xml | 96 ++- dev-examples/sbml_export_odes.py | 42 +- dev-examples/sbml_export_reactions.py | 22 +- dev-examples/sbml_import_odes.py | 9 + dev-examples/sbml_import_reactions.py | 9 + 10 files changed, 889 insertions(+), 752 deletions(-) create mode 100644 dev-examples/odes/ode_example.omex create mode 100644 dev-examples/reactions/reactions_example.omex create mode 100644 dev-examples/sbml_import_odes.py create mode 100644 dev-examples/sbml_import_reactions.py diff --git a/dev-examples/odes/enzymeml.json b/dev-examples/odes/enzymeml.json index 4493f3c..e0237a0 100644 --- a/dev-examples/odes/enzymeml.json +++ b/dev-examples/odes/enzymeml.json @@ -1,8 +1,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "name": "schema:title", "references": { "@id": "schema:citation", @@ -12,7 +12,7 @@ "modified": "schema:dateModified", "creators": "schema:creator" }, - "@id": "enzml:EnzymeMLDocument/35cadae4-2145-46f6-8f9c-a3a8c53829c8", + "@id": "enzml:EnzymeMLDocument/39303f02-65a0-490b-8e1d-02162fb04199", "@type": [ "enzml:EnzymeMLDocument" ], @@ -23,8 +23,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -32,7 +32,7 @@ "name": "schema:name", "volume": "OBO:OBI_0002139" }, - "@id": "enzml:Vessel/ac7ebad5-c66d-43d9-9f5d-479bba9a2c8a", + "@id": "enzml:Vessel/371d000b-8c93-4abc-822b-cdc223778079", "@type": [ "enzml:Vessel", "OBO:OBI_0400081" @@ -43,22 +43,23 @@ "unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000098", "@type": [ "OBO:UO_0000000" ], + "id": "u0", "name": "ml", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/df5d030e-305f-4876-95f5-6126133a0681", + "@id": "enzml:BaseUnit/448808be-98aa-4393-9141-0e13050fe90a", "@type": [ "enzml:BaseUnit" ], @@ -75,8 +76,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@type": "@id" }, @@ -95,7 +96,7 @@ "@type": "@id" } }, - "@id": "enzml:Protein/1c3d0644-1ce3-4afe-8f71-d24869188913", + "@id": "enzml:Protein/5715b8c8-ac93-4e13-a101-3497c37dc260", "@type": [ "enzml:Protein", "schema:Protein" @@ -105,16 +106,46 @@ "constant": false, "sequence": "MTEY", "vessel_id": "v0", + "ecnumber": "1.1.1.1", + "organism": "E.coli", + "organism_tax_id": "12345", "references": [] } ], - "complexes": [], - "small_molecules": [ + "complexes": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "participants": { + "@type": "@id" + } + }, + "@id": "enzml:Complex/a3f08a33-46d9-4ede-87b3-72b652279876", + "@type": [ + "enzml:Complex" + ], + "id": "c0", + "name": "Enzyme-Substrate Complex", + "constant": false, + "participants": [ + "p0", + "s0" + ] + } + ], + "small_molecules": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -129,7 +160,7 @@ "@type": "@id" } }, - "@id": "enzml:SmallMolecule/2d122f45-3a5a-478c-8a54-11cac6d29c31", + "@id": "enzml:SmallMolecule/b2d02c26-70fa-4401-b32f-76ff44b6e59a", "@type": [ "enzml:SmallMolecule" ], @@ -137,13 +168,15 @@ "name": "Substrate", "constant": false, "vessel_id": "v0", + "canonical_smiles": "CC(=O)O", + "inchikey": "QTBSBXVTEAMEQO-UHFFFAOYSA-N", "references": [] }, { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -158,7 +191,7 @@ "@type": "@id" } }, - "@id": "enzml:SmallMolecule/56c68bf7-99be-40a7-9bd4-bf23a6b99b93", + "@id": "enzml:SmallMolecule/32b0f5f4-219d-4918-84c9-de6912f3acb6", "@type": [ "enzml:SmallMolecule" ], @@ -166,6 +199,8 @@ "name": "Product", "constant": false, "vessel_id": "v0", + "canonical_smiles": "CC(=O)O", + "inchikey": "QTBSBXVTEAMEQO-UHFFFAOYSA-N", "references": [] } ], @@ -174,8 +209,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -184,48 +219,48 @@ "@type": "@id" } }, - "@id": "enzml:Measurement/d2b94875-b8d2-4248-81b8-28d15eaebd67", + "@id": "enzml:Measurement/fbaacff6-d90f-48e6-b16c-98c77c00d5f9", "@type": [ "enzml:Measurement" ], "id": "m0", "name": "m0", - "species": [ + "species_data": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/9fa84251-7159-4e5e-9564-f041a1030edb", + "@id": "enzml:MeasurementData/bab6a019-2090-4f60-b20c-0a39d5dd2401", "@type": [ "enzml:MeasurementData" ], "species_id": "s0", - "init_conc": 0.0, - "data_type": "conc", + "initial": 0.0, "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000063", "@type": [ "OBO:UO_0000000" ], - "name": "mmol / l s", + "id": "u2", + "name": "mmol / l", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/0ff9ce48-32c0-468e-a544-b5ef6d6b33b6", + "@id": "enzml:BaseUnit/477cca4f-ec95-45a1-8c05-4578beb60b30", "@type": [ "enzml:BaseUnit" ], @@ -236,62 +271,50 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/734baec0-49d4-44a9-9721-2939a6e329a8", + "@id": "enzml:BaseUnit/a045cb18-b5a9-44b1-88e2-1bb1374601d5", "@type": [ "enzml:BaseUnit" ], "kind": "litre", "exponent": -1, "scale": 1.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "second", - "exponent": -1, - "scale": 1.0 } ] }, "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000010", "@type": [ "OBO:UO_0000000" ], + "id": "u1", "name": "s", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", + "@id": "enzml:BaseUnit/c6ff977b-6f75-46fd-ac15-3a8c3ab4e8bd", "@type": [ "enzml:BaseUnit" ], "kind": "second", - "exponent": -1, + "exponent": 1, "scale": 1.0 } ] }, - "time": [ + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "data": [ 0.0, 1.0, 2.0, @@ -304,7 +327,7 @@ 9.0, 10.0 ], - "data": [ + "time": [ 0.0, 1.0, 2.0, @@ -317,43 +340,43 @@ 9.0, 10.0 ], - "is_calculated": false + "is_simulated": false }, { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/49066465-14a1-44bf-8740-f9b33fc1e3b2", + "@id": "enzml:MeasurementData/7da88045-0b0d-44a5-afe5-ef9a6002df93", "@type": [ "enzml:MeasurementData" ], "species_id": "s1", - "init_conc": 10.0, - "data_type": "conc", + "initial": 10.0, "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000063", "@type": [ "OBO:UO_0000000" ], - "name": "mmol / l s", + "id": "u2", + "name": "mmol / l", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/0ff9ce48-32c0-468e-a544-b5ef6d6b33b6", + "@id": "enzml:BaseUnit/477cca4f-ec95-45a1-8c05-4578beb60b30", "@type": [ "enzml:BaseUnit" ], @@ -364,74 +387,49 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/734baec0-49d4-44a9-9721-2939a6e329a8", + "@id": "enzml:BaseUnit/a045cb18-b5a9-44b1-88e2-1bb1374601d5", "@type": [ "enzml:BaseUnit" ], "kind": "litre", "exponent": -1, "scale": 1.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "second", - "exponent": -1, - "scale": 1.0 } ] }, "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000010", "@type": [ "OBO:UO_0000000" ], + "id": "u1", "name": "s", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", + "@id": "enzml:BaseUnit/c6ff977b-6f75-46fd-ac15-3a8c3ab4e8bd", "@type": [ "enzml:BaseUnit" ], "kind": "second", - "exponent": -1, + "exponent": 1, "scale": 1.0 } ] }, - "time": [ - 0.0, - 1.0, - 2.0, - 3.0, - 4.0, - 5.0, - 6.0, - 7.0, - 8.0, - 9.0, - 10.0 - ], + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", "data": [ 10.0, 9.0, @@ -445,7 +443,20 @@ 1.0, 0.0 ], - "is_calculated": false + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "is_simulated": false } ], "ph": 7.0, @@ -453,22 +464,23 @@ "temperature_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000012", "@type": [ "OBO:UO_0000000" ], + "id": "u3", "name": "K", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/6af90bd2-1124-4908-a486-7c850350248c", + "@id": "enzml:BaseUnit/109807ff-d2fa-4eeb-a0ee-3de4930871f5", "@type": [ "enzml:BaseUnit" ], @@ -482,8 +494,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -492,48 +504,48 @@ "@type": "@id" } }, - "@id": "enzml:Measurement/a826bebe-669b-47d4-9dd2-727e1a25fa29", + "@id": "enzml:Measurement/a1773c19-270a-40e2-848c-d74cd98fa03c", "@type": [ "enzml:Measurement" ], "id": "m1", "name": "m1", - "species": [ + "species_data": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/fe8e5554-6363-45b0-b372-6847968cbb22", + "@id": "enzml:MeasurementData/a5a649d1-6bdb-4a1e-a9fb-d49ec9c3efac", "@type": [ "enzml:MeasurementData" ], "species_id": "s0", - "init_conc": 0.0, - "data_type": "conc", + "initial": 0.0, "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000063", "@type": [ "OBO:UO_0000000" ], - "name": "mmol / l s", + "id": "u2", + "name": "mmol / l", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/0ff9ce48-32c0-468e-a544-b5ef6d6b33b6", + "@id": "enzml:BaseUnit/477cca4f-ec95-45a1-8c05-4578beb60b30", "@type": [ "enzml:BaseUnit" ], @@ -544,62 +556,50 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/734baec0-49d4-44a9-9721-2939a6e329a8", + "@id": "enzml:BaseUnit/a045cb18-b5a9-44b1-88e2-1bb1374601d5", "@type": [ "enzml:BaseUnit" ], "kind": "litre", "exponent": -1, "scale": 1.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "second", - "exponent": -1, - "scale": 1.0 } ] }, "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000010", "@type": [ "OBO:UO_0000000" ], + "id": "u1", "name": "s", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", + "@id": "enzml:BaseUnit/c6ff977b-6f75-46fd-ac15-3a8c3ab4e8bd", "@type": [ "enzml:BaseUnit" ], "kind": "second", - "exponent": -1, + "exponent": 1, "scale": 1.0 } ] }, - "time": [ + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "data": [ 0.0, 1.0, 2.0, @@ -612,7 +612,7 @@ 9.0, 10.0 ], - "data": [ + "time": [ 0.0, 1.0, 2.0, @@ -625,43 +625,43 @@ 9.0, 10.0 ], - "is_calculated": false + "is_simulated": false }, { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/a0ea2291-588b-44dc-b875-856eb3739ab8", + "@id": "enzml:MeasurementData/bb46ba43-287b-49d8-bc16-51cd806cc7ed", "@type": [ "enzml:MeasurementData" ], "species_id": "s1", - "init_conc": 10.0, - "data_type": "conc", + "initial": 10.0, "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000063", "@type": [ "OBO:UO_0000000" ], - "name": "mmol / l s", + "id": "u2", + "name": "mmol / l", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/0ff9ce48-32c0-468e-a544-b5ef6d6b33b6", + "@id": "enzml:BaseUnit/477cca4f-ec95-45a1-8c05-4578beb60b30", "@type": [ "enzml:BaseUnit" ], @@ -672,74 +672,49 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/734baec0-49d4-44a9-9721-2939a6e329a8", + "@id": "enzml:BaseUnit/a045cb18-b5a9-44b1-88e2-1bb1374601d5", "@type": [ "enzml:BaseUnit" ], "kind": "litre", "exponent": -1, "scale": 1.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "second", - "exponent": -1, - "scale": 1.0 } ] }, "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000010", "@type": [ "OBO:UO_0000000" ], + "id": "u1", "name": "s", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", + "@id": "enzml:BaseUnit/c6ff977b-6f75-46fd-ac15-3a8c3ab4e8bd", "@type": [ "enzml:BaseUnit" ], "kind": "second", - "exponent": -1, + "exponent": 1, "scale": 1.0 } ] }, - "time": [ - 0.0, - 1.0, - 2.0, - 3.0, - 4.0, - 5.0, - 6.0, - 7.0, - 8.0, - 9.0, - 10.0 - ], + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", "data": [ 10.0, 9.0, @@ -753,7 +728,20 @@ 1.0, 0.0 ], - "is_calculated": false + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "is_simulated": false } ], "ph": 7.0, @@ -761,22 +749,23 @@ "temperature_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000012", "@type": [ "OBO:UO_0000000" ], + "id": "u3", "name": "K", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/6af90bd2-1124-4908-a486-7c850350248c", + "@id": "enzml:BaseUnit/109807ff-d2fa-4eeb-a0ee-3de4930871f5", "@type": [ "enzml:BaseUnit" ], @@ -792,91 +781,30 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id" - }, - "id": { - "@type": "@id" } }, - "@id": "enzml:Equation/7fd44774-3008-44db-9de9-59504652c44b", + "@id": "enzml:Equation/1f92428c-cb1a-4d9f-a8cb-3414e7e87049", "@type": [ "enzml:Equation" ], - "unit": { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "OBO:UO_0000063", - "@type": [ - "OBO:UO_0000000" - ], - "name": "mmol / l s", - "base_units": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/0ff9ce48-32c0-468e-a544-b5ef6d6b33b6", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "mole", - "exponent": 1, - "scale": -3.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/734baec0-49d4-44a9-9721-2939a6e329a8", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "litre", - "exponent": -1, - "scale": 1.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "second", - "exponent": -1, - "scale": 1.0 - } - ] - }, - "equation_type": "ode", "equation": "E_tot*kcat*s0/(K_m + s0)", + "equation_type": "ode", "species_id": "s1", "variables": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", - "id": { - "@type": "@id" - } + "OBO": "http://purl.obolibrary.org/obo/", + "id": "schema:identifier" }, - "@id": "enzml:EqVariable/77d04fd3-3ee4-4f0d-9c8d-ca9265ab515e", + "@id": "enzml:Variable/6a1e9596-a851-467f-aac8-b12595a94856", "@type": [ - "enzml:EqVariable" + "enzml:Variable" ], "id": "s0", "name": "s0", @@ -887,189 +815,204 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { + "@id": "schema:identifier", "@type": "@id" } }, - "@id": "enzml:EqParameter/ee99a464-e1ce-4158-b857-fccdfadda000", + "@id": "enzml:Parameter/49b1a46d-7cc6-436c-b57f-d17a44d980b9", "@type": [ - "enzml:EqParameter" + "enzml:Parameter" ], - "id": "E_tot", - "name": "E_tot", - "symbol": "E_tot" + "id": "K_m", + "name": "K_m", + "symbol": "K_m", + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u2", + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "enzml:BaseUnit/477cca4f-ec95-45a1-8c05-4578beb60b30", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "enzml:BaseUnit/a045cb18-b5a9-44b1-88e2-1bb1374601d5", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "upper": 100.0, + "lower": 0.0, + "stderr": 0.1, + "constant": true }, { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { + "@id": "schema:identifier", "@type": "@id" } }, - "@id": "enzml:EqParameter/3d89b7c9-1814-48fd-9461-4a1f50364440", + "@id": "enzml:Parameter/71b45227-a2a7-4e0c-a273-9ef99dbcab1a", "@type": [ - "enzml:EqParameter" + "enzml:Parameter" ], - "id": "K_m", - "name": "K_m", - "symbol": "K_m" + "id": "E_tot", + "name": "E_tot", + "symbol": "E_tot", + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u2", + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "enzml:BaseUnit/477cca4f-ec95-45a1-8c05-4578beb60b30", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "enzml:BaseUnit/a045cb18-b5a9-44b1-88e2-1bb1374601d5", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "upper": 100.0, + "lower": 0.0, + "stderr": 0.1, + "constant": true }, { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { + "@id": "schema:identifier", "@type": "@id" } }, - "@id": "enzml:EqParameter/b8aa5a96-720a-468c-95c4-874a48b12f70", + "@id": "enzml:Parameter/f4bdcef7-8883-4cf2-b1b5-6ccacd9b1e37", "@type": [ - "enzml:EqParameter" + "enzml:Parameter" ], "id": "kcat", "name": "kcat", - "symbol": "kcat" - } - ] - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/", - "species_id": { - "@type": "@id" - }, - "id": { - "@type": "@id" - } - }, - "@id": "enzml:Equation/126f21be-e799-4211-bb90-3c5d6e8bc4b6", - "@type": [ - "enzml:Equation" - ], - "unit": { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "OBO:UO_0000063", - "@type": [ - "OBO:UO_0000000" - ], - "name": "mmol / l s", - "base_units": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/0ff9ce48-32c0-468e-a544-b5ef6d6b33b6", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "mole", - "exponent": 1, - "scale": -3.0 - }, - { + "symbol": "kcat", + "unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/734baec0-49d4-44a9-9721-2939a6e329a8", + "@id": "OBO:UO_0000010", "@type": [ - "enzml:BaseUnit" + "OBO:UO_0000000" ], - "kind": "litre", - "exponent": -1, - "scale": 1.0 + "id": "u4", + "name": "1 / s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "enzml:BaseUnit/c6ff977b-6f75-46fd-ac15-3a8c3ab4e8bd", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/07e17ced-79f5-4ef8-bf2b-01e5217e58b2", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "second", - "exponent": -1, - "scale": 1.0 - } - ] - }, - "equation_type": "initialAssignment", - "equation": "100", - "species_id": "E_tot", - "variables": [], - "parameters": [] - } - ], - "parameters": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/", - "id": { - "@id": "schema:identifier", - "@type": "@id" + "upper": 100.0, + "lower": 0.0, + "stderr": 0.1, + "constant": true } - }, - "@id": "enzml:Parameter/24132890-1b53-4d3e-9060-1efc1cf0e8dd", - "@type": [ - "enzml:Parameter" - ], - "id": "E_tot", - "name": "E_tot", - "constant": true + ] }, { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", - "id": { - "@id": "schema:identifier", - "@type": "@id" - } - }, - "@id": "enzml:Parameter/f07b469e-ecc9-4717-8d42-2e16997ef701", - "@type": [ - "enzml:Parameter" - ], - "id": "K_m", - "name": "K_m", - "constant": true - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/", - "id": { - "@id": "schema:identifier", + "species_id": { "@type": "@id" } }, - "@id": "enzml:Parameter/4c3869a7-c11b-4cb7-8301-215be7708558", + "@id": "enzml:Equation/e0c67659-dcfc-401b-a48d-0599f685aa91", "@type": [ - "enzml:Parameter" + "enzml:Equation" ], - "id": "kcat", - "name": "kcat", - "constant": true + "equation": "100", + "equation_type": "initialAssignment", + "species_id": "E_tot", + "variables": [], + "parameters": [] } ] } \ No newline at end of file diff --git a/dev-examples/odes/ode_example.omex b/dev-examples/odes/ode_example.omex new file mode 100644 index 0000000000000000000000000000000000000000..4c9da3c7147983275b7a4449a3fd693dbbb3088d GIT binary patch literal 2426 zcmZ{mc{J308^(VkB{X(f@+dUQzJ;t|im{B*$XFX?tTV*erh3qfY}t~+Bq~X=kA3XB zNt*1kjV<)dXi$$HTVB2Id6%bi-tYa#b?!f|bMEiwpX;)>ggRDi^J=9sTiL9T6Q6p;1s^)yYS}8 zl7O2540KzNiccRh!$ewrF>C*+NOPAkGT(v1(_L%6zt_DvOB=emfNT0koE4%mS z<$2H6P^P9o*g}xzVVr@k-ub=AwQX$`J8OwcQx(4_aK_6r*jHR%9%ah7=2LOcfZFN-w3wo zkPeDhxhF3zgTI6%)oz3e#lREn46D3ntz~xuMN?bpVeo`wkj%FoCAY*xeS#zu7%};>aTWx-Qfn=#iK{S1pWW5h&uYP-N4!u)kIGCGbiAS*g*Qmc zaw^(Cz7;9N8l) z!o>;}CBcpc-_BZsb8e2Rt$UBxbgTMRFXy}$srvRr-z`}bkDI@>lba0d^KN4~J!f2^ z$wYfj*1Rw|Y|?re2o-&`A`;C^np&r%hFYDl@y=F|{qjH%?W3giUO*}&ySKoGkk;U$ z-(s%}rX$w9oKI%uBixxTE+)uyxlD`_+?BInaG;X6Wl+`{R;upSp@j`UR$xx|>3upk zgfI&WlDK>-%&;d_Q7zG|`0y4|9uxy!C7Pd*NwmVgL8#j7HYt9r+f+|Y1O%*Zv--j<==z0Z>=9Dn8-hvfrX zBWv{y6vFyASfWX8U-3{Mp6A*_K8v04t5AWh!zo=_ zAKe_7_ioOIiWJf?&6i=`m8`3t3)v-K>NYJLy0CfH%y1<2CC;C?oAH3}p@2r;YEeohbO?LQ0>c1qfD!bsWf7dF+B0h=$RxuvtVbp_{z= z1tbFkhki;snI<55I?M!Gp$50QA$z_ViJh1U4O1DX@3`8!p)3FRc|>M#dP zJH9<}H!tprju3I9kz`9oSYmft7aQeD}>1Z=URv!-1ztR(Rq0-mmao&`%7N0Ap0vv$q{Um ze-I%#k#%A=wM(Q;Xbk~#AsA7{5(9i|xOto_qtGacIuDfJhavvZ^GwhD&({h!T?(%X zzbLs?S$xsxS#*Pj9F_1ma3uZ8+H~zR!zJO2ku2Wbz4%#wXoqh|g1eshysnh0niOFA z8*28OHK>jh&(l$@G*a=&HT~L%V3?Esh|R>|*1eS&*;u#;Wnov-%f5$H=qTwR6W%sK znp$z{i5@mMgL9IGU>{*iO1125(L`$uQhdDaFKVqOl+j*Lhu787*6QI4;Wp;WYRrMF zwWx=n1Zg#{M`Ub>4%z!$I{V3R-mmi%llpZg{EJxf{dliKedO@Z$p%Ly`#%%ex{o&K z4+~D;foyS`;U7&0YhvUji8k4HE{8e9b$xU+l9Hlt!rvq8%o?xfZO_4(Of zPi?h){l2O)cM};g3+YIA37k!o^LJkFeijl1ma0H5runaSl{(wkufQB-QX~^h9IMQ6 z>9&h;qC~4n!fdtQ8$1TQR{S#L{gqC8bmXhjy|l7X^g`cI&tE)U74&|(>xBa4&*X?M z^O^#lou&wk@qM?!uR(uNpAWLk-NAI5~Z%Rd^`r1 zCtrU?Vu`Mk^8Lq=zo+A&ZAg{>K`Oej{j3fE;Nc$Zt{jXDbxpo_JW85}gSK{J z2m;wkk&wAm|9mg+{*?bMGru~2P5XcO0N~|a?t>rxC;NZ3{fgngwzCIR{td;}^6){C008!b MDLBxkpTvNF0GZ-hegFUf literal 0 HcmV?d00001 diff --git a/dev-examples/odes/sbml.xml b/dev-examples/odes/sbml.xml index 6dd17c4..c6e4e0f 100644 --- a/dev-examples/odes/sbml.xml +++ b/dev-examples/odes/sbml.xml @@ -1,23 +1,23 @@ - + - - + + - + - - + + - + - + - - + + @@ -34,7 +34,7 @@ - + @@ -45,10 +45,9 @@ - - + @@ -57,7 +56,7 @@ - + @@ -72,12 +71,24 @@ + + + + + + + + + + + + - + Vessel 1 10.0 @@ -88,68 +99,109 @@ - + - + Enzyme MTEY + E.coli + 1.1.1.1 + E.coli + 12345 MTEY - + + + + + Enzyme-Substrate Complex + + + + + p0 + s0 + + + + - + Substrate + + QTBSBXVTEAMEQO-UHFFFAOYSA-N + CC(=O)O + - + - + Product + + QTBSBXVTEAMEQO-UHFFFAOYSA-N + CC(=O)O + - + - + + + 0.0 + 100.0 + 0.1 + - + - + + + 0.0 + 100.0 + 0.1 + - + - + + + 0.0 + 100.0 + 0.1 + @@ -162,6 +214,11 @@ + + + + + diff --git a/dev-examples/reactions/enzymeml.json b/dev-examples/reactions/enzymeml.json index 7581d1f..841b2fd 100644 --- a/dev-examples/reactions/enzymeml.json +++ b/dev-examples/reactions/enzymeml.json @@ -1,8 +1,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "name": "schema:title", "references": { "@id": "schema:citation", @@ -12,7 +12,7 @@ "modified": "schema:dateModified", "creators": "schema:creator" }, - "@id": "enzml:EnzymeMLDocument/706dc08f-91d9-476f-bc39-14e26ae43bd4", + "@id": "enzml:EnzymeMLDocument/4cc6b230-1ca7-4b01-acfe-34ca8a8c8b03", "@type": [ "enzml:EnzymeMLDocument" ], @@ -23,8 +23,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -32,7 +32,7 @@ "name": "schema:name", "volume": "OBO:OBI_0002139" }, - "@id": "enzml:Vessel/f8628df7-14e3-42b8-a77d-7c4f92f1166c", + "@id": "enzml:Vessel/040a3842-d40e-44e8-a32d-19d830c8572c", "@type": [ "enzml:Vessel", "OBO:OBI_0400081" @@ -43,22 +43,23 @@ "unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000098", "@type": [ "OBO:UO_0000000" ], + "id": "u0", "name": "ml", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/fbb3c11b-a165-4792-8070-dc241f31da60", + "@id": "enzml:BaseUnit/dfeb036d-92c6-4067-8eb9-36370cff8244", "@type": [ "enzml:BaseUnit" ], @@ -75,8 +76,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@type": "@id" }, @@ -95,7 +96,7 @@ "@type": "@id" } }, - "@id": "enzml:Protein/86214cf8-977c-4fd0-8c1a-b142c32eaa74", + "@id": "enzml:Protein/d24ac8cf-2118-4bc4-b32f-8dbe37a00aa4", "@type": [ "enzml:Protein", "schema:Protein" @@ -113,8 +114,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -129,7 +130,7 @@ "@type": "@id" } }, - "@id": "enzml:SmallMolecule/da9af365-0490-4495-b410-98183fe493ca", + "@id": "enzml:SmallMolecule/4430bc12-a97a-4a8c-a753-59d62b8d5be1", "@type": [ "enzml:SmallMolecule" ], @@ -142,8 +143,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -158,7 +159,7 @@ "@type": "@id" } }, - "@id": "enzml:SmallMolecule/378ca858-97b7-4eed-9187-2fe73959885f", + "@id": "enzml:SmallMolecule/54498f68-5ca7-4515-a8a0-20bff1da321d", "@type": [ "enzml:SmallMolecule" ], @@ -173,8 +174,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -183,101 +184,39 @@ "@type": "@id" } }, - "@id": "enzml:Reaction/e29a838b-542f-4772-8936-087670816036", + "@id": "enzml:Reaction/bdbaa018-4f0c-44a8-a67b-ae88e294dd20", "@type": [ "enzml:Reaction" ], - "id": "Reaction 1", + "id": "r0", "name": "Reaction 1", "reversible": false, "kinetic_law": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id" - }, - "id": { - "@type": "@id" } }, - "@id": "enzml:Equation/6394e9d8-13ae-4b38-bbfb-c8d18ca9ab4e", + "@id": "enzml:Equation/add0038a-e325-454e-8ff6-a7ab5ece87fe", "@type": [ "enzml:Equation" ], - "unit": { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "OBO:UO_0000063", - "@type": [ - "OBO:UO_0000000" - ], - "name": "mmol / l s", - "base_units": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/64d34694-8942-4ed5-b922-3c928695ec43", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "mole", - "exponent": 1, - "scale": -3.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/6a9cc7e3-8777-4438-9a1e-d613cd5ee13a", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "litre", - "exponent": -1, - "scale": 1.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/d5995db5-1a95-4cc6-9513-b8a1770cdef9", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "second", - "exponent": -1, - "scale": 1.0 - } - ] - }, - "equation_type": "assignment", "equation": "kcat*p0*s0/(K_m + s0)", - "species_id": "v", + "equation_type": "rateLaw", "variables": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", - "id": { - "@type": "@id" - } + "OBO": "http://purl.obolibrary.org/obo/", + "id": "schema:identifier" }, - "@id": "enzml:EqVariable/30e94d78-a980-4066-8a91-11de93015927", + "@id": "enzml:Variable/c53d54fe-9297-4f3c-980b-25bea0734058", "@type": [ - "enzml:EqVariable" + "enzml:Variable" ], "id": "p0", "name": "p0", @@ -286,15 +225,13 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", - "id": { - "@type": "@id" - } + "OBO": "http://purl.obolibrary.org/obo/", + "id": "schema:identifier" }, - "@id": "enzml:EqVariable/a57075b6-3179-42ae-b99d-0c41de223f22", + "@id": "enzml:Variable/e0be55cb-1f6e-4933-a400-d2ef9db25329", "@type": [ - "enzml:EqVariable" + "enzml:Variable" ], "id": "s0", "name": "s0", @@ -305,53 +242,118 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { + "@id": "schema:identifier", "@type": "@id" } }, - "@id": "enzml:EqParameter/a186518c-17b3-4fde-ac7d-94bda76c6be9", + "@id": "enzml:Parameter/1e6d62f9-49b9-4aad-be74-490c6e9d6f7a", "@type": [ - "enzml:EqParameter" + "enzml:Parameter" ], "id": "K_m", "name": "K_m", - "symbol": "K_m" - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/", - "id": { - "@type": "@id" - } + "symbol": "K_m", + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u1", + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "enzml:BaseUnit/38393576-f6dd-4f90-8528-3a75ea49d1d4", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "enzml:BaseUnit/31c7d1bf-d71b-4b66-8a47-93d3e7711d47", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] }, - "@id": "enzml:EqParameter/1cccb9f1-4edf-4cda-9e6b-04ffc4679795", - "@type": [ - "enzml:EqParameter" - ], - "id": "v", - "name": "v", - "symbol": "v" + "upper": 100.0, + "lower": 0.0, + "stderr": 0.1, + "constant": true }, { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { + "@id": "schema:identifier", "@type": "@id" } }, - "@id": "enzml:EqParameter/059857c2-eff4-42ff-96c6-5e3a2438f128", + "@id": "enzml:Parameter/c39f3e34-c4da-4a47-b82a-43d9ba2be5bf", "@type": [ - "enzml:EqParameter" + "enzml:Parameter" ], "id": "kcat", "name": "kcat", - "symbol": "kcat" + "symbol": "kcat", + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u2", + "name": "1 / s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "enzml:BaseUnit/ffb7a3e9-4bb5-4d6c-858c-3ab6d953f9a4", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "upper": 100.0, + "lower": 0.0, + "stderr": 0.1, + "constant": true } ] }, @@ -359,13 +361,13 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id" } }, - "@id": "enzml:ReactionElement/73385fe9-1d7a-4758-8053-c45382c1ad34", + "@id": "enzml:ReactionElement/cb145bd9-0333-435e-ab2b-eb0f3f6bb9c0", "@type": [ "enzml:ReactionElement" ], @@ -375,13 +377,13 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id" } }, - "@id": "enzml:ReactionElement/db834938-bd23-4e8e-a0a5-ea6f478b7041", + "@id": "enzml:ReactionElement/ac29c50c-2818-400a-ae93-49a09f381ecb", "@type": [ "enzml:ReactionElement" ], @@ -398,8 +400,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -408,48 +410,48 @@ "@type": "@id" } }, - "@id": "enzml:Measurement/b4a44b04-8957-4fd5-9867-d3836bb087d9", + "@id": "enzml:Measurement/391ac5d7-b284-4f58-845f-10b65ec65c29", "@type": [ "enzml:Measurement" ], "id": "m0", "name": "m0", - "species": [ + "species_data": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/1a8e21e6-77b0-41cb-840e-6240ac2ba7a5", + "@id": "enzml:MeasurementData/644d3f4c-eab7-49c4-9e0a-e4c4267bfcdb", "@type": [ "enzml:MeasurementData" ], "species_id": "s0", - "init_conc": 0.0, - "data_type": "conc", + "initial": 0.0, "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000063", "@type": [ "OBO:UO_0000000" ], - "name": "mmol / l s", + "id": "u1", + "name": "mmol / l", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/64d34694-8942-4ed5-b922-3c928695ec43", + "@id": "enzml:BaseUnit/38393576-f6dd-4f90-8528-3a75ea49d1d4", "@type": [ "enzml:BaseUnit" ], @@ -460,62 +462,50 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/6a9cc7e3-8777-4438-9a1e-d613cd5ee13a", + "@id": "enzml:BaseUnit/31c7d1bf-d71b-4b66-8a47-93d3e7711d47", "@type": [ "enzml:BaseUnit" ], "kind": "litre", "exponent": -1, "scale": 1.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/d5995db5-1a95-4cc6-9513-b8a1770cdef9", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "second", - "exponent": -1, - "scale": 1.0 } ] }, "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000010", "@type": [ "OBO:UO_0000000" ], + "id": "u3", "name": "s", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/d5995db5-1a95-4cc6-9513-b8a1770cdef9", + "@id": "enzml:BaseUnit/ffb7a3e9-4bb5-4d6c-858c-3ab6d953f9a4", "@type": [ "enzml:BaseUnit" ], "kind": "second", - "exponent": -1, + "exponent": 1, "scale": 1.0 } ] }, - "time": [ + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "data": [ 0.0, 1.0, 2.0, @@ -528,7 +518,7 @@ 9.0, 10.0 ], - "data": [ + "time": [ 0.0, 1.0, 2.0, @@ -541,43 +531,43 @@ 9.0, 10.0 ], - "is_calculated": false + "is_simulated": false }, { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/cb8a53e7-0606-4d07-97bf-d5c544740560", + "@id": "enzml:MeasurementData/3eda7daf-6707-448f-bee3-c1d194459b9b", "@type": [ "enzml:MeasurementData" ], "species_id": "s1", - "init_conc": 10.0, - "data_type": "conc", + "initial": 10.0, "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000063", "@type": [ "OBO:UO_0000000" ], - "name": "mmol / l s", + "id": "u1", + "name": "mmol / l", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/64d34694-8942-4ed5-b922-3c928695ec43", + "@id": "enzml:BaseUnit/38393576-f6dd-4f90-8528-3a75ea49d1d4", "@type": [ "enzml:BaseUnit" ], @@ -588,74 +578,49 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/6a9cc7e3-8777-4438-9a1e-d613cd5ee13a", + "@id": "enzml:BaseUnit/31c7d1bf-d71b-4b66-8a47-93d3e7711d47", "@type": [ "enzml:BaseUnit" ], "kind": "litre", "exponent": -1, "scale": 1.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/d5995db5-1a95-4cc6-9513-b8a1770cdef9", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "second", - "exponent": -1, - "scale": 1.0 } ] }, "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000010", "@type": [ "OBO:UO_0000000" ], + "id": "u3", "name": "s", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/d5995db5-1a95-4cc6-9513-b8a1770cdef9", + "@id": "enzml:BaseUnit/ffb7a3e9-4bb5-4d6c-858c-3ab6d953f9a4", "@type": [ "enzml:BaseUnit" ], "kind": "second", - "exponent": -1, + "exponent": 1, "scale": 1.0 } ] }, - "time": [ - 0.0, - 1.0, - 2.0, - 3.0, - 4.0, - 5.0, - 6.0, - 7.0, - 8.0, - 9.0, - 10.0 - ], + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", "data": [ 10.0, 9.0, @@ -669,15 +634,59 @@ 1.0, 0.0 ], - "is_calculated": false + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "is_simulated": false } - ] + ], + "ph": 7.0, + "temperature": 298.15, + "temperature_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "OBO:UO_0000012", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u4", + "name": "K", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "enzml:BaseUnit/839c0ac5-eec5-40ec-9c76-e25d735f065d", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "kelvin", + "exponent": 1, + "scale": 1.0 + } + ] + } }, { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -686,48 +695,48 @@ "@type": "@id" } }, - "@id": "enzml:Measurement/537b7ad5-d1da-4a3f-8823-ce844cb4fd15", + "@id": "enzml:Measurement/5b279983-6b56-4c70-a807-282808973cc4", "@type": [ "enzml:Measurement" ], "id": "m1", "name": "m1", - "species": [ + "species_data": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/f9765d6e-ba42-4717-ad70-ba50347040ea", + "@id": "enzml:MeasurementData/45637267-987f-4b11-a89f-e26643eaff60", "@type": [ "enzml:MeasurementData" ], "species_id": "s0", - "init_conc": 0.0, - "data_type": "conc", + "initial": 0.0, "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000063", "@type": [ "OBO:UO_0000000" ], - "name": "mmol / l s", + "id": "u1", + "name": "mmol / l", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/64d34694-8942-4ed5-b922-3c928695ec43", + "@id": "enzml:BaseUnit/38393576-f6dd-4f90-8528-3a75ea49d1d4", "@type": [ "enzml:BaseUnit" ], @@ -738,62 +747,50 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/6a9cc7e3-8777-4438-9a1e-d613cd5ee13a", + "@id": "enzml:BaseUnit/31c7d1bf-d71b-4b66-8a47-93d3e7711d47", "@type": [ "enzml:BaseUnit" ], "kind": "litre", "exponent": -1, "scale": 1.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/d5995db5-1a95-4cc6-9513-b8a1770cdef9", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "second", - "exponent": -1, - "scale": 1.0 } ] }, "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000010", "@type": [ "OBO:UO_0000000" ], + "id": "u3", "name": "s", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/d5995db5-1a95-4cc6-9513-b8a1770cdef9", + "@id": "enzml:BaseUnit/ffb7a3e9-4bb5-4d6c-858c-3ab6d953f9a4", "@type": [ "enzml:BaseUnit" ], "kind": "second", - "exponent": -1, + "exponent": 1, "scale": 1.0 } ] }, - "time": [ + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "data": [ 0.0, 1.0, 2.0, @@ -806,7 +803,7 @@ 9.0, 10.0 ], - "data": [ + "time": [ 0.0, 1.0, 2.0, @@ -819,43 +816,43 @@ 9.0, 10.0 ], - "is_calculated": false + "is_simulated": false }, { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/0a6e65ad-b5a8-4ed8-a75d-c61d12db521e", + "@id": "enzml:MeasurementData/42f843c5-4042-4f22-a076-5626b86444c7", "@type": [ "enzml:MeasurementData" ], "species_id": "s1", - "init_conc": 10.0, - "data_type": "conc", + "initial": 10.0, "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000063", "@type": [ "OBO:UO_0000000" ], - "name": "mmol / l s", + "id": "u1", + "name": "mmol / l", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/64d34694-8942-4ed5-b922-3c928695ec43", + "@id": "enzml:BaseUnit/38393576-f6dd-4f90-8528-3a75ea49d1d4", "@type": [ "enzml:BaseUnit" ], @@ -866,74 +863,49 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/6a9cc7e3-8777-4438-9a1e-d613cd5ee13a", + "@id": "enzml:BaseUnit/31c7d1bf-d71b-4b66-8a47-93d3e7711d47", "@type": [ "enzml:BaseUnit" ], "kind": "litre", "exponent": -1, "scale": 1.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/d5995db5-1a95-4cc6-9513-b8a1770cdef9", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "second", - "exponent": -1, - "scale": 1.0 } ] }, "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000010", "@type": [ "OBO:UO_0000000" ], + "id": "u3", "name": "s", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/d5995db5-1a95-4cc6-9513-b8a1770cdef9", + "@id": "enzml:BaseUnit/ffb7a3e9-4bb5-4d6c-858c-3ab6d953f9a4", "@type": [ "enzml:BaseUnit" ], "kind": "second", - "exponent": -1, + "exponent": 1, "scale": 1.0 } ] }, - "time": [ - 0.0, - 1.0, - 2.0, - 3.0, - 4.0, - 5.0, - 6.0, - 7.0, - 8.0, - 9.0, - 10.0 - ], + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", "data": [ 10.0, 9.0, @@ -947,11 +919,54 @@ 1.0, 0.0 ], - "is_calculated": false + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "is_simulated": false } - ] + ], + "ph": 7.0, + "temperature": 298.15, + "temperature_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "OBO:UO_0000012", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u4", + "name": "K", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "enzml:BaseUnit/839c0ac5-eec5-40ec-9c76-e25d735f065d", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "kelvin", + "exponent": 1, + "scale": 1.0 + } + ] + } } ], - "equations": [], - "parameters": [] + "equations": [] } \ No newline at end of file diff --git a/dev-examples/reactions/reactions_example.omex b/dev-examples/reactions/reactions_example.omex new file mode 100644 index 0000000000000000000000000000000000000000..3ae590985893f7b06387ac93a0979f94814f6daf GIT binary patch literal 2208 zcmZ{lc{CL49>=Ftmc(F)F+|yB!id2jWP8cjw-{s%6GmgK*~v08_LMEMGqy6RRHS*w zn1+xEFJ&1^Wfv(_uI@eOzW42%`#gVq&+k0vd(QLw{PVFwu^j;c000gEJRayY&t|tf zb1+#Q1^~DZGSCBy@wtKzQH%%-sLnOFq$qKxtnCTrteH=zSWT3Uov@hTy(SQD_{v!D zsr}bAdOT+~fHUmjcbzOZ`brp4Pr+{N1GBrS^N;tEVpP!qw=GWbQHTVQV?8mJW5SHFcV-zxEYPuQ@7 znRifzJG^3chC(p04BWFAo2_F(yGdGFT%&1`NME=PbhAY>H4z=Lb9J_% zc!B@2wk2+s;+zO)O88SyoHbWa? z!pFVg(%F+gZ=;xM4N~ci7}bAagxtN)i4!h~%e!B(qs zD>n!C#Bld?oP)?9lQW!czl;X@SD0Uco;6dNND^zMr8QxT+zpkU1I6XbJ}BG!_k-OQ zWoA_F!gb5K_M>CIOnjlue|Q}dMaGF$|5c=^@kgka7|{;`l5gTE*akPcNjMT6x;t{2 z<&3Mc68Q=-e2vGK^XgVk$okVaO?;iv$IQjQZW<|CXzwpCvJ46pzB!)_eJ>iBG8iy% ztbr%Qbw(T1K@k4lY`8^yN9Y&~OMseQ%oUZIyeI10I8x*d9ni!=fa=MgWG)T3b@zWJ z!F~piD%+T_l2Q`t9I*{Flcd@Zb1gBmH1OLkMa&<;y^+L0@(eWb^!uDN_A?S@-r?W1 z31`HkGbNoWIMQ86!hx;ae)tPoom!Mm=?GzV{_MM6>z2gZplI>bB+o8(2$GnfY%E{$% zk`Su$^{i3?RG|8!gXlOHzPxb>{MphBsvFBS(VO+`m?F#_4Jv{>$=CDHMyW(2>I&8h zqLQTd1;=2@RXG5&73YTf+6H>FP*ogrei!&2`Q`4q7|o<^u|wS z#xa1CBPE=^aG0A`Idmm+T4y$PPY&4VpHeCcwE$8vRcjKZD(v4wcQCh>qGzdv3`TA; zvJY8axoi?kjH+ai%4)7+OX&S=Q3>U&GN4XO6qn4K(4_y5@G z8L6n|V`VRi2)C_Y-;6!|qZ3Vd?p{;2c$2a8HST1FpXsUBX~Fh1>x$VaJ~5h2d1#Dn z-TB3$Ys;CbtT<(eq|0tA{8Z;8)O^g?`nu9gpOYREEr7lCB)>ZQ1Ws}4l*cu3{P8nG z(5|rg6OXbLE8X+5lAmqVjIDF|=-g@OlKGov0_J6C} z3lyuOjp35MiPx^NMIUaD$QSr&aKmMwOh_nZ}Q|z)o5s0HD(B|q*SxTF0-P4H0-4?mH1i6+6 zvFeoDgncdp=Fcy11!)cGHysO2n(5BPpbt|5k6GyYOInDnmvwl1`&HvhW3+m?nTf6z z8zF%Zlqc4wL*z*-c+fe}gQ^&_eq-E2VEb*srfZM*#zik$-^5Fs4sa>bI<-b*aN%7J zhf1PO_udGIvQtAKtD14n4c+6NW@LB1ex4LjQ9MXYT5Sk}joq#EGdLvnSZxJfXP%kU zC#oN&wNC9*n@3OQhST?5V;2`V??`pmJOX7k5>oe2kmde)mKO)tF)+}{#1qf=$k4k= z+dBN=n;D1IOg#oo-YhYIdEqikyWl9BK6@I6s>YzP<`mzn8^ab}P0>_A!rC1nS&N^7 zOxB#+KOJ&-*NBWgaL46CzXS^aczc9+D2Cv}Tr>4};w89`46F+e8yW3ni6bLk?$gwo zWR^UhmIB>ZV@ok6V3Qxc$`>EJ=#ds__b>7qda#_?R&WLHLY9Avdwadoan>96jy1Xb zm`0-Br - + - + + + + + - + + + + + @@ -26,7 +34,7 @@ - + @@ -37,10 +45,21 @@ + + + + + + + + + + + - + @@ -52,12 +71,24 @@ + + + + + + + + + + + + - + Vessel 1 10.0 @@ -68,10 +99,10 @@ - + - + Enzyme MTEY @@ -83,20 +114,20 @@ - + - + Substrate - + - + Product @@ -104,6 +135,36 @@ + + + + + + + + + + 0.0 + 100.0 + 0.1 + + + + + + + + + + + + 0.0 + 100.0 + 0.1 + + + + @@ -116,6 +177,12 @@ + + + + + + @@ -132,11 +199,6 @@ - - - - - diff --git a/dev-examples/sbml_export_odes.py b/dev-examples/sbml_export_odes.py index 339caaf..034e9d0 100644 --- a/dev-examples/sbml_export_odes.py +++ b/dev-examples/sbml_export_odes.py @@ -1,17 +1,34 @@ import pyenzyme as pe import pyenzyme.equations as peq - from pyenzyme.sbml.serializer import to_sbml +from pyenzyme.tools import get_all_parameters from pyenzyme.units import mM, s, ml, K doc = pe.EnzymeMLDocument(name="Test") +ml.id = "u0" +s.id = "u1" +mM.id = "u2" +K.id = "u3" + # Add Vessels vessel = doc.add_to_vessels(name="Vessel 1", volume=10.0, unit=ml, id="v0") # Add Species -substrate = doc.add_to_small_molecules(id="s0", name="Substrate", vessel_id=vessel.id) -product = doc.add_to_small_molecules(id="s1", name="Product", vessel_id=vessel.id) +substrate = doc.add_to_small_molecules( + id="s0", + name="Substrate", + vessel_id=vessel.id, + canonical_smiles="CC(=O)O", + inchikey="QTBSBXVTEAMEQO-UHFFFAOYSA-N", +) +product = doc.add_to_small_molecules( + id="s1", + name="Product", + vessel_id=vessel.id, + canonical_smiles="CC(=O)O", + inchikey="QTBSBXVTEAMEQO-UHFFFAOYSA-N", +) # Add Enzyme enzyme = doc.add_to_proteins( @@ -19,13 +36,21 @@ name="Enzyme", sequence="MTEY", vessel_id=vessel.id, + ecnumber="1.1.1.1", + organism="E.coli", + organism_tax_id="12345", +) + +enzyme_complex = doc.add_to_complexes( + id="c0", + name="Enzyme-Substrate Complex", + participants=[enzyme.id, substrate.id], ) doc.equations += peq.build_equations( "s1'(t) = kcat * E_tot * s0(t) / (K_m + s0(t))", "E_tot = 100", - units=[mM / s, mM], - enzmldoc=doc, + unit_mapping={"kcat": 1 / s, "K_m": mM, "E_tot": mM}, ) doc.measurements += pe.read_excel( @@ -34,10 +59,15 @@ time_unit=s, ) +for parameter in get_all_parameters(doc): + parameter.lower = 0.0 + parameter.upper = 100.0 + parameter.stderr = 0.1 + for meas in doc.measurements: meas.temperature = 298.15 meas.temperature_unit = K meas.ph = 7.0 -to_sbml(doc, "./dev-examples/odes/sbml.xml") +to_sbml(doc, out="./dev-examples/odes/ode_example.omex") pe.write_enzymeml(doc=doc, path="./dev-examples/odes/enzymeml.json") diff --git a/dev-examples/sbml_export_reactions.py b/dev-examples/sbml_export_reactions.py index 53d6157..030aa9d 100644 --- a/dev-examples/sbml_export_reactions.py +++ b/dev-examples/sbml_export_reactions.py @@ -1,8 +1,8 @@ import pyenzyme as pe import pyenzyme.equations as peq - from pyenzyme.sbml.serializer import to_sbml -from pyenzyme.units import mM, s, ml +from pyenzyme.tools import get_all_parameters +from pyenzyme.units import mM, s, ml, K doc = pe.EnzymeMLDocument(name="Test") @@ -25,11 +25,13 @@ reaction = peq.build_reaction( scheme="s0 -> s1", name="Reaction 1", + id="r0", modifiers=[enzyme.id], ) + reaction.kinetic_law = peq.build_equation( - "v(t) = kcat * p0(t) * s0(t) / ( K_m + s0(t) )", - unit=mM / s, + "kcat * p0(t) * s0(t) / ( K_m + s0(t) )", + unit_mapping={"kcat": 1 / s, "K_m": mM}, ) doc.reactions += [reaction] @@ -40,5 +42,15 @@ time_unit=s, ) -to_sbml(doc, "./dev-examples/reactions/sbml.xml") +for parameter in get_all_parameters(doc): + parameter.lower = 0.0 + parameter.upper = 100.0 + parameter.stderr = 0.1 + +for meas in doc.measurements: + meas.temperature = 298.15 + meas.temperature_unit = K + meas.ph = 7.0 + +to_sbml(doc, out="./dev-examples/reactions/reactions_example.omex") pe.write_enzymeml(doc=doc, path="./dev-examples/reactions/enzymeml.json") diff --git a/dev-examples/sbml_import_odes.py b/dev-examples/sbml_import_odes.py new file mode 100644 index 0000000..a78dfcf --- /dev/null +++ b/dev-examples/sbml_import_odes.py @@ -0,0 +1,9 @@ +from pathlib import Path + +import rich + +from pyenzyme.sbml import read_sbml + +doc = read_sbml(Path("./dev-examples/odes/ode_example.omex")) + +rich.print(doc) diff --git a/dev-examples/sbml_import_reactions.py b/dev-examples/sbml_import_reactions.py new file mode 100644 index 0000000..8c47df7 --- /dev/null +++ b/dev-examples/sbml_import_reactions.py @@ -0,0 +1,9 @@ +from pathlib import Path + +import rich + +from pyenzyme.sbml import read_sbml + +doc = read_sbml(Path("./dev-examples/reactions/reactions_example.omex")) + +rich.print(doc) From ef42fa79c0d76de2409c77fc67cbe80794fc2b8d Mon Sep 17 00:00:00 2001 From: Jan Range Date: Fri, 16 Aug 2024 16:03:31 +0200 Subject: [PATCH 23/80] implement sbml omex parser --- pyenzyme/sbml/omex.py | 73 ++++++ pyenzyme/sbml/parser.py | 512 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 585 insertions(+) create mode 100644 pyenzyme/sbml/omex.py create mode 100644 pyenzyme/sbml/parser.py diff --git a/pyenzyme/sbml/omex.py b/pyenzyme/sbml/omex.py new file mode 100644 index 0000000..1f86734 --- /dev/null +++ b/pyenzyme/sbml/omex.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +import tempfile +from pathlib import Path + +import pandas as pd +from pymetadata.omex import EntryFormat, ManifestEntry, Omex + + +def create_sbml_omex( + sbml_doc: str, + data: pd.DataFrame | None, + out: Path, +) -> None: + """ + Create an OMEX archive with the given SBML and data files. + + Args: + sbml_doc (str): The SBML document to include in the archive. + data (pd.DataFrame | None): The data to include in the archive. + out (Path): The path to save the OMEX archive. + + Returns: + Omex: The created OMEX archive + + """ + + with tempfile.TemporaryDirectory() as temp_dir: + omex = Omex() + + sbml_path = f"{temp_dir}/model.xml" + with open(sbml_path, "w") as f: + f.write(sbml_doc) + omex.add_entry( + entry_path=Path(sbml_path), + entry=ManifestEntry( + location="./model.xml", + format=EntryFormat.SBML, + master=True, + ), + ) + + if data is not None: + data_path = f"{temp_dir}/data.tsv" + data.to_csv(data_path, sep="\t", index=False) + omex.add_entry( + entry_path=Path(data_path), + entry=ManifestEntry( + location="./data.tsv", + format=EntryFormat.TSV, + ), + ) + + omex.to_omex(out) + + +def read_sbml_omex(path: Path) -> tuple[Path, Path | None]: + """ + Read an OMEX archive and return the SBML and data file paths. + + Args: + path (Path): The path to the OMEX archive. + + Returns: + tuple[Path, Path | None]: The SBML file path and the data file path, if available. + + """ + + omex = Omex.from_omex(path) + sbml_file = omex.get_path("./model.xml") + data = omex.get_path("./data.tsv") + + return sbml_file, data diff --git a/pyenzyme/sbml/parser.py b/pyenzyme/sbml/parser.py new file mode 100644 index 0000000..815797e --- /dev/null +++ b/pyenzyme/sbml/parser.py @@ -0,0 +1,512 @@ +from __future__ import annotations + +import math +import re +import xml.etree.ElementTree as ET +from pathlib import Path +from typing import IO + +import libsbml as sbml # type: ignore +from loguru import logger # type: ignore + +import pyenzyme as pe +from pyenzyme import tools +from pyenzyme.logging import add_logger +from pyenzyme.units import M, s +from . import read_sbml_omex +from .ldutils import parse_sbml_rdf_annotation + +MAPPINGS = tools.read_static_file("pyenzyme.sbml", "mappings.toml") +ENZYMEML_NS = "https://www.enzymeml.org/v2" + + +def read_sbml(path: Path | str): + add_logger(name="SBML") + + # Create globals to use in the functions + global units + global parameters + global path_prefix + global tsv_path + + # Read the OMEX archive and extract the SBML and TSV paths + sbml_path, tsv_path = read_sbml_omex(path) + + # Read the SBML file and init an EnzymeML document + model = _init_and_read_sbml(open(sbml_path)) + enzmldoc = pe.EnzymeMLDocument(name=model.getName()) + + # Extract units to map these to the EnzymeML entities + units = { # type: ignore + unit.getId(): _parse_unit(unit) for unit in model.getListOfUnitDefinitions() + } + + # Extract and sort species + species = [_parse_species(species) for species in model.getListOfSpecies()] + enzmldoc.small_molecules = [s for s in species if isinstance(s, pe.SmallMolecule)] + enzmldoc.proteins = [s for s in species if isinstance(s, pe.Protein)] + enzmldoc.complexes = [s for s in species if isinstance(s, pe.Complex)] + + # Extract vessels + enzmldoc.vessels = [_parse_vessel(comp) for comp in model.getListOfCompartments()] + + # Extract equations from rules and initial assignments + parameters = [_parse_parameter(param) for param in model.getListOfParameters()] # type: ignore + enzmldoc.equations += [ + _parse_equation(rule, pe.EquationType.INITIAL_ASSIGNMENT) + for rule in model.getListOfInitialAssignments() + ] + + enzmldoc.equations += [ + _parse_equation(rule, pe.EquationType.ODE) + for rule in model.getListOfRules() + if rule.isRate() + ] + + enzmldoc.reactions = [ + _parse_reaction(reaction) for reaction in model.getListOfReactions() + ] + + enzmldoc.measurements = _parse_measurements(model) + + return enzmldoc + + +def _init_and_read_sbml(handler: IO): + """Initialize the SBML reader and read the SBML document.""" + + reader = sbml.SBMLReader() + sbmldoc = reader.readSBMLFromString(handler.read()) + if not sbmldoc: + logger.error("Could not read SBML document") + raise ValueError("Could not read SBML document") + + # Get the model + model = sbmldoc.getModel() + if not model: + logger.error("Could not get model from SBML file") + raise ValueError("Could not get model from SBML file") + + return model + + +def _parse_unit(unit: sbml.UnitDefinition): + """Parse a unit definition from an SBML model into an EnzymeML unit definition.""" + enzml_unit = pe.UnitDefinition( + id=unit.getId(), + name=unit.getName(), + ) + + parse_sbml_rdf_annotation(unit, enzml_unit) + + for base_unit in unit.getListOfUnits(): + multiplier = base_unit.getMultiplier() + kind = sbml.UnitKind_toString(base_unit.getKind()) + + if math.isnan(multiplier): + multiplier = None + + enzml_unit.add_to_base_units( + kind=kind, + exponent=base_unit.getExponent(), + scale=base_unit.getScale(), + multiplier=multiplier, + ) + + return enzml_unit + + +def _parse_species(species: sbml.Species): + """Parse a species from an SBML model into EnzymeML small molecule or protein.""" + sbo_term = species.getSBOTermID() + + if sbo_term == "SBO:0000247": + return _parse_small_molecule(species) + elif sbo_term == "SBO:0000252": + return _parse_protein(species) + elif sbo_term == "SBO:0000296": + return _parse_complex(species) + else: + logger.error( + f"Unknown SBO term for species '{species.getId()}': {sbo_term}. Unable to parse species." + ) + + +def _parse_small_molecule(species: sbml.Species): + """Parse a species from an SBML model into an EnzymeML small molecule.""" + + annots = _parse_enzymeml_annotations("smallMolecule", species.getAnnotationString()) + small_molecule = pe.SmallMolecule( + id=species.getId(), + name=species.getName(), + vessel_id=species.getCompartment(), + constant=species.getConstant(), + **annots, + ) + + parse_sbml_rdf_annotation(species, small_molecule) + + return small_molecule + + +def _parse_protein(species: sbml.Species): + """Parse a species from an SBML model into an EnzymeML small molecule.""" + + annots = _parse_enzymeml_annotations("protein", species.getAnnotationString()) + protein = pe.Protein( + id=species.getId(), + name=species.getName(), + vessel_id=species.getCompartment(), + constant=species.getConstant(), + **annots, + ) + + parse_sbml_rdf_annotation(species, protein) + + return protein + + +def _parse_complex(species: sbml.Species): + """Parse a species from an SBML model into an EnzymeML complex.""" + + annots = _parse_enzymeml_annotations("complex", species.getAnnotationString()) + complex_ = pe.Complex( + id=species.getId(), + name=species.getName(), + **annots, + ) + + parse_sbml_rdf_annotation(species, complex_) + + return complex_ + + +def _parse_vessel(compartment: sbml.Compartment): + """Parse a compartment from an SBML model into an EnzymeML vessel.""" + + vessel = pe.Vessel( + id=compartment.getId(), + name=compartment.getName(), + volume=_check_nan(compartment.getSize()), + unit=units[compartment.getUnits()], # type: ignore + ) + + parse_sbml_rdf_annotation(compartment, vessel) + + return vessel + + +def _parse_parameter(parameter: sbml.Parameter): + """Parse a parameter from an SBML model into an EnzymeML parameter.""" + annots = _parse_enzymeml_annotations("parameter", parameter.getAnnotationString()) + parameter = pe.Parameter( + id=parameter.getId(), + name=parameter.getName(), + symbol=parameter.getId(), + value=_check_nan(parameter.getValue()), + constant=parameter.getConstant(), + unit=units.get(parameter.getUnits()), # type: ignore + **annots, + ) + + return parameter + + +def _parse_equation(rule: sbml.Rule, rule_type: pe.EquationType): + """Parse a rule from an SBML model into an EnzymeML equation.""" + + match rule_type: + case pe.EquationType.INITIAL_ASSIGNMENT: + equation = sbml.formulaToString(rule.getMath()) + species_id = rule.getSymbol() + case pe.EquationType.ODE: + equation = rule.getFormula() + species_id = rule.getVariable() + case pe.EquationType.RATE_LAW: + equation = rule.getMath() + species_id = None + case _: + raise ValueError(f"Unknown rule type: {rule_type}") + + annots = _parse_enzymeml_annotations("variables", rule.getAnnotationString()) + equation = pe.Equation( + equation_type=rule_type, + equation=equation, + species_id=species_id, + parameters=_extract_parameters(equation), + variables=[pe.Variable(**annot) for annot in annots.get("variables", [])], + ) + + return equation + + +def _parse_reaction(reaction: sbml.Reaction): + """Parse a reaction from an SBML model into an EnzymeML reaction.""" + + # Get the reactants and products + products = [_parse_element(product, 1) for product in reaction.getListOfProducts()] + reactants = [ + _parse_element(reactant, -1) for reactant in reaction.getListOfReactants() + ] + + # Get the modifiers + modifiers = [modifier.getSpecies() for modifier in reaction.getListOfModifiers()] + + # Get the kinetic law + kinetic_law = _parse_kinetic_law(reaction) + + # Create the EnzymeML reaction + reaction = pe.Reaction( + id=reaction.getId(), + name=reaction.getName(), + reactants=reactants, + products=products, + modifiers=modifiers, + kinetic_law=kinetic_law, + ) + + return reaction + + +def _parse_element(species, direction: int): + return pe.ReactionElement( + species_id=species.getSpecies(), + stoichiometry=species.getStoichiometry() * direction, + ) + + +def _parse_kinetic_law(reaction): + kinetic_law = reaction.getKineticLaw() + + if not kinetic_law: + return None + + formula = kinetic_law.getFormula() + kinetic_law = pe.Equation( + equation=formula, + equation_type=pe.EquationType.RATE_LAW, + unit=M, # We need to set a default unit here, because SBML does not provide units for kinetic laws + ) + + kinetic_law.parameters = _extract_parameters(formula) + + return kinetic_law + + +def _extract_parameters(equation: str) -> list[pe.Parameter]: + """Extract the parameters from an equation.""" + + params = [] + for param in parameters: + if any( + _contains_param(equation, getattr(param, attr)) + for attr in ["id", "symbol", "name"] + ): + params.append(param) + + return params + + +def _contains_param(formula: str, param: str) -> bool: + return bool(re.search(rf"\b{param}\b", formula)) + + +def _parse_measurements(model: sbml.Model): + # Extract metadata from the model + meas_metadata, file_path = _get_meas_metadata(model) + meas_metadata = _extract_measurement_metadata(meas_metadata) + + # Read the CSV file into measurement objects + # We need to set defaults for the units here, + # but we will overwrite them with the units from the EnzymeML annotations + measurements = pe.read_csv( + tsv_path, + data_unit=M, + time_unit=s, + ) + + for meas_id, metadata in meas_metadata.items(): + _assign_units_and_initials(meas_id, measurements, metadata) + + return measurements + + +def _assign_units_and_initials(meas_id, measurements, metadata): + measurement = [m for m in measurements if m.id == meas_id][0] + conditions = metadata.get("condition", {}) + init_concs = metadata.get("speciesData", []) + measurement.temperature = conditions.get("temperature") + measurement.temperature_unit = conditions.get("temperature_unit") + + for init_conc in init_concs: + species_id = _get_species_id(init_conc) + meas_data = _get_species_data(measurement, species_id) + + meas_data.initial = init_conc.get("initial", 0.0) + meas_data.time_unit = init_conc["time_unit"] + meas_data.data_unit = init_conc["data_unit"] + + +def _get_species_id(init_conc): + species_id = init_conc.get("species_id") + assert species_id, "No species ID found in the EnzymeML data annotation" + return species_id + + +def _get_species_data(measurement, species_id): + try: + return [d for d in measurement.species_data if d.species_id == species_id][0] + except IndexError: + raise ValueError(f"No species data found for species ID {species_id}") + + +def _get_meas_metadata(model): + root = ET.fromstring(model.getAnnotationString()) + data = root.find(f"{{{ENZYMEML_NS}}}data") + meas_metadata = data.findall(f"{{{ENZYMEML_NS}}}measurement") + file_path = data.attrib.get("file") + + assert file_path, "No file path found in the EnzymeML data annotation" + + return meas_metadata, file_path + + +def _extract_measurement_metadata(meas_metadata): + measurements = {} + + for meas_meta in meas_metadata: + meas_id = meas_meta.attrib.get("id") + data = _process_measurement(meas_meta) + measurements[meas_id] = data + + return measurements + + +def _process_measurement(meas_meta): + data = {} + time_unit = units.get(meas_meta.attrib.get("timeUnit")) + + assert ( + time_unit + ), f"Time unit not found for measurement {meas_meta.attrib.get('id')}" + + species_data = _parse_enzymeml_annotations("speciesData", meas_meta).get( + "speciesData", [] + ) + conditions = _parse_enzymeml_annotations("conditions", meas_meta).get( + "conditions", [] + ) + + if conditions: + data["condition"] = _assign_temp_unit(conditions[0]) + if species_data: + data["speciesData"] = _assign_meas_units(species_data, time_unit) + + return data + + +def _assign_temp_unit(conditions): + if temp_unit := conditions.get("temperature_unit"): + conditions["temperature_unit"] = units.get(temp_unit) + + return conditions + + +def _assign_meas_units(species_data, time_unit): + for data in species_data: + data["data_unit"] = units.get(data["data_unit"]) + data["time_unit"] = time_unit + data["data_type"] = pe.DataTypes.__members__.get(data["data_type"]) + + return species_data + + +def _parse_enzymeml_annotations( + root_key: str, annotation: str | ET.Element | None +) -> dict: + """Parse the RDF annotation of an SBML object.""" + + if not annotation: + return {} + + mappings = MAPPINGS[root_key] + + match annotation: + case str(): + root = ET.fromstring(annotation).find(f".//{{{ENZYMEML_NS}}}{root_key}") + case _ if isinstance(annotation, ET.Element): + root = annotation + case _: + raise ValueError(f"Unknown annotation type: {type(annotation)}") + + if not root: + return {} + + return _map_values(mappings, root, root_key) + + +def _map_values(mappings, root, root_key=None): + """Map the values from the XML root to the EnzymeML entities.""" + + data = {} + for xml_key, enzml_key in mappings.items(): + match enzml_key: + case dict(): + if value := _process_nested_keys( + enzml_key=enzml_key, + root=root, + xml_key=xml_key, + ): + data[root_key] = value + + case str(): + if value := _process_simple( + root=root, + xml_key=xml_key, + ): + data[enzml_key] = value + case _: + raise ValueError(f"Unknown value type for key '{enzml_key}'") + + return data + + +def _process_simple( + root: ET.Element, + xml_key: str, +): + if xml_key.startswith("@"): + value = root.attrib.get(xml_key[1:]) + else: + value = root.findall(f"{{{ENZYMEML_NS}}}{xml_key}") + + if len(value) == 1: + value = value[0].text + elif len(value) > 1: + value = [v.text for v in value] + return value + + +def _process_nested_keys( + enzml_key: dict, + root: ET.Element, + xml_key: str, +): + value = root.findall(f".//{{{ENZYMEML_NS}}}{xml_key}") + if len(value) == 1: + value = [_map_values(enzml_key, value[0])] + elif len(value) > 1: + value = [_map_values(enzml_key, v) for v in value] + else: + return None + + return value + + +def _check_nan(value: float): + """Check if a value is NaN.""" + + if math.isnan(value): + return None + + return value From 16f4e89c56197cdda2116925449935db9ca70704 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Fri, 16 Aug 2024 16:04:02 +0200 Subject: [PATCH 24/80] adjust serializer to model change --- pyenzyme/sbml/serializer.py | 194 +++++++++++++++++++++++++----------- 1 file changed, 136 insertions(+), 58 deletions(-) diff --git a/pyenzyme/sbml/serializer.py b/pyenzyme/sbml/serializer.py index 5588712..a2c87e2 100644 --- a/pyenzyme/sbml/serializer.py +++ b/pyenzyme/sbml/serializer.py @@ -1,20 +1,23 @@ +from __future__ import annotations + +import xml.etree.ElementTree as ET from pathlib import Path +from typing import Callable, List + import libsbml -from loguru import logger import pandas as pd -import xml.etree.ElementTree as ET -from typing import Callable +from loguru import logger from pydantic import BaseModel import pyenzyme.model as pe -from pyenzyme.sbml.validation import validate_sbml_export -from pyenzyme.tabular import to_pandas import pyenzyme.tools as tools - -from pyenzyme import xmlutils as _xml from pyenzyme import rdf -from pyenzyme.units.units import UnitDefinition +from pyenzyme import xmlutils as _xml from pyenzyme.logging import add_logger +from pyenzyme.sbml import create_sbml_omex +from pyenzyme.sbml.validation import validate_sbml_export +from pyenzyme.tabular import to_pandas +from pyenzyme.units.units import UnitDefinition MAPPINGS = tools.read_static_file("pyenzyme.sbml", "mappings.toml") NSMAP = {"enzymeml": "https://www.enzymeml.org/v2"} @@ -41,6 +44,7 @@ def to_sbml( Args: enzmldoc (pe.EnzymeMLDocument): The EnzymeML document to convert. out (Path | str | None, optional): The output file to write the SBML document to. Defaults to None. + verbose (bool, optional): Whether to print warnings during SBML validation. Defaults to False. Returns: tuple[str, pd.DataFrame] | None: The SBML document as a string and a DataFrame with the RDF triples. @@ -59,20 +63,22 @@ def to_sbml( global model global doc - doc = enzmldoc.copy() + doc = enzmldoc sbmldoc = libsbml.SBMLDocument() model = sbmldoc.createModel() - units = tools.find_unique(enzmldoc, pe.UnitDefinition) + model.setName(doc.name) + units = _assign_ids_to_units(tools.find_unique(doc, UnitDefinition)) + print_warnings = verbose _xml.register_namespaces(nsmap=NSMAP) # Add entities - [_add_unit_definitions(unit, i) for i, unit in enumerate(units)] + [_add_unit_definitions(unit) for unit in units] [_add_vessel(vessel) for vessel in doc.vessels] [_add_protein(protein) for protein in doc.proteins] + [_add_complex(complex_) for complex_ in doc.complexes] [_add_small_mol(small_mol) for small_mol in doc.small_molecules] - [_add_parameter(param) for param in doc.parameters] [_add_equation(equation) for equation in doc.equations] [_add_reaction(reaction, i) for i, reaction in enumerate(doc.reactions)] @@ -86,26 +92,27 @@ def to_sbml( out = Path(out) if out.is_dir(): - out = out / "enzymeml_doc.xml" + out = out / "enzymeml_doc.omex" else: - out = out.with_suffix(".xml") + out = out.with_suffix(".omex") _validate_sbml(sbmldoc) + create_sbml_omex( + sbml_doc=libsbml.writeSBMLToString(sbmldoc), + data=to_pandas(doc), + out=out, + ) - libsbml.writeSBML(sbmldoc, str(out)) - - if doc.measurements: - to_pandas(doc).to_csv(out.with_name("data.tsv"), sep="\t", index=False) - - logger.info(f"SBML document written to {out}") + logger.info(f"OMEX archive written to {out}") -def _add_unit_definitions(unit: UnitDefinition, index: int): +def _add_unit_definitions(unit: UnitDefinition): """Add unit definitions to the SBML model.""" sbml_unitdef = model.createUnitDefinition() + + sbml_unitdef.setId(unit.id) sbml_unitdef.setName(unit.name) - sbml_unitdef.setId(f"u{index}") sbml_unitdef.setAnnotation(rdf.to_rdf_xml(unit)) for base_unit in unit.base_units: @@ -130,7 +137,7 @@ def _add_vessel(vessel: pe.Vessel): compartment.setAnnotation(rdf.to_rdf_xml(vessel)) if vessel.unit in units: - compartment.setUnits(_get_unit(vessel.unit, units)) + compartment.setUnits(_get_unit_id(vessel.unit)) else: raise ValueError(f"Unit {vessel.unit} not found in units") @@ -143,6 +150,7 @@ def _add_small_mol(small_mol: pe.SmallMolecule): species.setName(small_mol.name) species.setCompartment(small_mol.vessel_id) species.setConstant(small_mol.constant) + species.setSBOTerm("SBO:0000247") # Simple chemical species.appendAnnotation(rdf.to_rdf_xml(small_mol)) init_conc = _get_first_meas_init_conc(small_mol) @@ -151,9 +159,8 @@ def _add_small_mol(small_mol: pe.SmallMolecule): species.setInitialConcentration(init_conc) species.setHasOnlySubstanceUnits(False) - root = ET.Element("enzymeml") annot = _xml.serialize_to_pretty_xml_string( - _extract_create_annot("smallMolecule", small_mol, root) + _extract_create_annot("smallMolecule", small_mol) ) if annot is not None: @@ -168,6 +175,7 @@ def _add_protein(protein: pe.Protein): species.setName(protein.name) species.setConstant(protein.constant) species.setCompartment(protein.vessel_id) + species.setSBOTerm("SBO:0000252") # Protein species.appendAnnotation(rdf.to_rdf_xml(protein)) init_conc = _get_first_meas_init_conc(protein) @@ -184,6 +192,24 @@ def _add_protein(protein: pe.Protein): species.appendAnnotation(annot) +def _add_complex(complex_: pe.Complex): + """Add complexes to the SBML model.""" + + species = model.createSpecies() + species.setId(complex_.id) + species.setName(complex_.name) + species.setConstant(True) + species.setSBOTerm("SBO:0000296") # Complex + species.appendAnnotation(rdf.to_rdf_xml(complex_)) + + annot = _xml.serialize_to_pretty_xml_string( + _extract_create_annot("complex", complex_) + ) + + if annot is not None: + species.appendAnnotation(annot) + + def _get_first_meas_init_conc(species: pe.SmallMolecule | pe.Protein): """Extracts the initial concentration of a species from the first measurement @@ -196,10 +222,10 @@ def _get_first_meas_init_conc(species: pe.SmallMolecule | pe.Protein): return None measurement = doc.measurements[0] - meas_species = measurement.filter_species(species_id=species.id) + meas_species = measurement.filter_species_data(species_id=species.id) if meas_species: - return meas_species[0].init_conc + return meas_species[0].initial else: return None @@ -209,7 +235,7 @@ def _add_reaction(reaction: pe.Reaction, index: int): sbml_reaction = model.createReaction() sbml_reaction.setName(reaction.name) - sbml_reaction.setId(f"r{index}") + sbml_reaction.setId(reaction.id) sbml_reaction.setReversible(reaction.reversible) for species in reaction.species: @@ -239,8 +265,15 @@ def _add_rate_law(equation: pe.Equation, reac: libsbml.Reaction): law.setMath(libsbml.parseL3Formula(equation.equation)) for parameter in equation.parameters: - param = law.createParameter() - param.setId(parameter.id) + if not model.getParameter(parameter.id): + _add_parameter(pe.Parameter(**parameter.model_dump())) + + if annot := _create_equation_annot(equation): + law.setAnnotation(_xml.serialize_to_pretty_xml_string(annot)) + + +def _create_equation_annot(equation: pe.Equation) -> ET.Element | None: + return _extract_create_annot("variables", equation.variables) def _get_create_fun( @@ -269,7 +302,7 @@ def _add_parameter(parameter: pe.Parameter): if parameter.value: sbml_param.setValue(parameter.value) if parameter.unit: - sbml_param.setUnits(_get_unit(parameter.unit, units)) + sbml_param.setUnits(_get_unit_id(parameter.unit)) annot = _xml.serialize_to_pretty_xml_string( _extract_create_annot("parameter", parameter) @@ -283,33 +316,37 @@ def _add_equation(equation: pe.Equation): """Add equations to the SBML model.""" if equation.equation_type == pe.EquationType.ODE: - sbml_rule = model.createRateRule() + sbml_rule = model.createRateRule() # type: ignore sbml_rule.setVariable(equation.species_id) - sbml_rule.setUnits(_get_unit(equation.unit, units)) elif equation.equation_type == pe.EquationType.ASSIGNMENT: - sbml_rule = model.createAssignmentRule() + sbml_rule = model.createAssignmentRule() # type: ignore sbml_rule.setVariable(equation.species_id) - sbml_rule.setUnits(_get_unit(equation.unit, units)) elif equation.equation_type == pe.EquationType.INITIAL_ASSIGNMENT: - sbml_rule = model.createInitialAssignment() + sbml_rule = model.createInitialAssignment() # type: ignore sbml_rule.setSymbol(equation.species_id) else: raise ValueError(f"Equation type {equation.equation_type} not supported") sbml_rule.setMath(libsbml.parseL3Formula(equation.equation)) + for parameter in equation.parameters: + if not model.getParameter(parameter.id): # type: ignore + _add_parameter(parameter) + + if annot := _create_equation_annot(equation): + sbml_rule.setAnnotation(_xml.serialize_to_pretty_xml_string(annot)) + def _add_measurements(measurements: list[pe.Measurement]): """Adds measurements to the SBML model.""" annotation = ET.Element(f"{{{NSMAP['enzymeml']}}}data") - annotation.attrib["file"] = "data.csv" + annotation.attrib["file"] = "data.tsv" for measurement in measurements: meas_element = _extract_create_annot("measurement", measurement) - meas_element.attrib["timeUnit"] = _get_unit( # type: ignore - measurement.species[0].time_unit, - units, + meas_element.attrib["timeUnit"] = _get_unit_id( # type: ignore + measurement.species_data[0].time_unit ) assert meas_element is not None, "Measurement element is None" @@ -317,14 +354,14 @@ def _add_measurements(measurements: list[pe.Measurement]): conditions = _create_condition_element( ph=measurement.ph, temperature=measurement.temperature, - temperature_unit=measurement.temperature_unit, # type: ignore + temperature_unit=_get_unit_id(measurement.temperature_unit), # type: ignore ) if conditions: meas_element.append(conditions) - for species in measurement.species: - _extract_create_annot("initConc", species, meas_element) + for species in measurement.species_data: + _extract_create_annot("speciesData", species, meas_element) annotation.append(meas_element) @@ -358,7 +395,7 @@ def _create_condition_element( def _extract_create_annot( name: str, - obj: BaseModel, + obj: BaseModel | list[BaseModel], element: ET.Element | None = None, ) -> ET.Element | None: """Extracts the data from the object and creates an annotation element. @@ -374,16 +411,30 @@ def _extract_create_annot( Returns: ET.Element: The annotation element. """ - mappings = _extract(obj, MAPPINGS[name]) - if element is None: element = ET.Element(f"{{{NSMAP['enzymeml']}}}{name}") - _xml.map_to_xml( - root=element, - mappings=mappings, - namespace=NSMAP["enzymeml"], - ) + if isinstance(obj, list): + mappings = [ + _extract(item, MAPPINGS[name]) + for item in obj + if item.dict(exclude_unset=True) + ] + + for mapping in mappings: + _xml.map_to_xml( + root=element, + mappings=mapping, + namespace=NSMAP["enzymeml"], + ) + else: + mappings = _extract(obj, MAPPINGS[name]) + + _xml.map_to_xml( + root=element, + mappings=mappings, + namespace=NSMAP["enzymeml"], + ) if len(element) == 0 and not element.attrib: return None @@ -409,7 +460,13 @@ def _extract(obj: BaseModel, mapping: dict) -> dict: data[trgt_key] = _extract(obj, enzml_key) elif "unit" in enzml_key: value = getattr(obj, enzml_key) - data[trgt_key] = _get_unit(value, units) + data[trgt_key] = _get_unit_id(value) + elif isinstance(getattr(obj, enzml_key), list) and all( + isinstance(item, BaseModel) for item in getattr(obj, enzml_key) + ): + data[trgt_key] = [ + _extract(item, MAPPINGS[enzml_key]) for item in getattr(obj, enzml_key) + ] else: data[trgt_key] = getattr(obj, enzml_key) @@ -423,14 +480,13 @@ def _get_sbml_kind(unit_type: pe.UnitType): raise ValueError(f"Unit type {unit_type} not found in libsbml") -def _get_unit(unit: pe.UnitDefinition, units: list[pe.UnitDefinition]) -> str | None: +def _get_unit_id(unit: pe.UnitDefinition) -> str: """Helper function to get the unit from the list of units.""" - try: - index = units.index(unit) - except ValueError: - return None - return f"u{index}" + if unit.id is None: + raise ValueError(f"Unit {unit.name} does not have an ID") + + return unit.id def _validate_sbml(sbmldoc: libsbml.SBMLDocument) -> None: @@ -458,3 +514,25 @@ def _validate_sbml(sbmldoc: libsbml.SBMLDocument) -> None: if not valid: raise ValueError("SBML model is not valid") + + +def _assign_ids_to_units(doc_units: List[UnitDefinition]) -> List[UnitDefinition]: + ids = [unit.id for unit in doc_units if unit.id] + + for unit in doc_units: + if unit.id is None: + new_id = next(_id_generator(ids)) + unit.id = new_id + + return doc_units + + +def _id_generator(ids: list[str]): + """Generator for creating unique IDs that are not in unit_ids.""" + i = 0 + while True: + potential_id = f"u{i}" + if potential_id not in ids: + ids.append(potential_id) + yield potential_id + i += 1 From 81dde6d8233e5b7655ea181eeadab425240aa911 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Fri, 16 Aug 2024 16:04:19 +0200 Subject: [PATCH 25/80] adjust and extend mappings to model changes --- pyenzyme/sbml/mappings.toml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pyenzyme/sbml/mappings.toml b/pyenzyme/sbml/mappings.toml index 771a68b..73f0fc1 100644 --- a/pyenzyme/sbml/mappings.toml +++ b/pyenzyme/sbml/mappings.toml @@ -10,6 +10,9 @@ organism = "organism" organismTaxId = "organism_tax_id" sequence = "sequence" +[complex] +participants = "participants" + [conditions] ph = { "@value" = "ph" } @@ -26,6 +29,10 @@ stdDeviation = "stderr" "@id" = "id" "@name" = "name" -[initConc] +[speciesData] + +speciesData = { "@species" = "species_id", "@value" = "initial", "@unit" = "data_unit", "@type" = "data_type" } + +[variables] -initConc = { "@species" = "species_id", "@value" = "init_conc", "@unit" = "data_unit" } +variable = { "@id" = "id", "@name" = "name", "@symbol" = "symbol" } From 6b290534c176f2b926c2437dcb18bb3ac28b541e Mon Sep 17 00:00:00 2001 From: Jan Range Date: Fri, 16 Aug 2024 16:04:39 +0200 Subject: [PATCH 26/80] format strings in multiple lines --- pyenzyme/sbml/validation.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pyenzyme/sbml/validation.py b/pyenzyme/sbml/validation.py index c98dbc0..d3b8361 100644 --- a/pyenzyme/sbml/validation.py +++ b/pyenzyme/sbml/validation.py @@ -9,7 +9,6 @@ def validate_sbml_export(doc: pe.EnzymeMLDocument) -> bool: Args: doc (pe.EnzymeMLDocument): The EnzymeML document to validate. - channel (str, optional): The channel to log to. Defaults to sys.stderr. Returns: bool: True if the document is valid, False otherwise. @@ -31,7 +30,7 @@ def _check_consistent_vessel_ids(doc: pe.EnzymeMLDocument) -> bool: """This validator checks whether all species have a vessel id that exists in the document. SBML documents require that all species have a vessel id that exists in the document and - this validator checks for that. Otherwise an error message will be logged and the validity + this validator checks for that. Otherwise, an error message will be logged and the validity set to False. """ @@ -47,7 +46,8 @@ def _check_consistent_vessel_ids(doc: pe.EnzymeMLDocument) -> bool: result.append(False) elif species.vessel_id not in vessel_ids: logger.error( - f"Species '{species.id}' of type '{type(species).__name__}' has a vessel id that does not exist in the document." + f"Species '{species.id}' of type '{type(species).__name__}' has a vessel id that does not exist in " + f"the document." ) result.append(False) else: @@ -75,7 +75,8 @@ def _check_equation_either_rule_or_reaction(doc: pe.EnzymeMLDocument) -> bool: for element in all_reaction_elements: if element.species_id in species_w_rate and element.species_id not in validated: logger.error( - f"Species '{element.species_id}' is part of a reaction and has a rate equation. This is not allowed in SBML." + f"Species '{element.species_id}' is part of a reaction and has a rate equation. This is not allowed " + f"in SBML." ) validated.add(element.species_id) result.append(False) @@ -90,7 +91,6 @@ def _check_units_exist(doc: pe.EnzymeMLDocument): mandatory_unit_objects = [ *tools.extract(obj=doc, target=pe.MeasurementData), - *tools.extract(obj=doc, target=pe.Equation), ] optional_unit_objects = [ @@ -149,7 +149,8 @@ def _check_assigned_params_are_not_constant(doc: pe.EnzymeMLDocument): if params[0].constant: params[0].constant = False logger.warning( - f"Parameter '{params[0].id}' has an assignment rule, but is set to constant. The parameter is now set to non-constant." + f"Parameter '{params[0].id}' has an assignment rule, but is set to constant. The parameter is now set " + f"to non-constant." ) result.append(True) From 7be7ace3cf4dcabeb72c1f14f0a9a301818a7ac4 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Fri, 16 Aug 2024 16:04:46 +0200 Subject: [PATCH 27/80] model update --- pyenzyme/model.py | 1010 ++++++++++++++++++++++----------------------- 1 file changed, 493 insertions(+), 517 deletions(-) diff --git a/pyenzyme/model.py b/pyenzyme/model.py index b1205c8..a8280e6 100644 --- a/pyenzyme/model.py +++ b/pyenzyme/model.py @@ -1,18 +1,16 @@ ## This is a generated file. Do not modify it manually! from __future__ import annotations - +from pydantic import BaseModel, Field, ConfigDict +from typing import Optional, Generic, TypeVar from enum import Enum -from typing import Generic, Optional, TypeVar from uuid import uuid4 - -from pydantic import BaseModel, ConfigDict, Field +from datetime import date, datetime # Filter Wrapper definition used to filter a list of objects # based on their attributes Cls = TypeVar("Cls") - class FilterWrapper(Generic[Cls]): """Wrapper class to filter a list of objects based on their attributes""" @@ -49,8 +47,7 @@ def add_namespace(obj, prefix: str | None, iri: str | None): elif iri and prefix is None: raise ValueError("If iri is provided, prefix must also be provided") - obj.ld_context[prefix] = iri # type: ignore - + obj.ld_context[prefix] = iri # type: ignore def validate_prefix(term: str | dict, prefix: str): """Validates that a term is prefixed with a given prefix @@ -68,14 +65,13 @@ def validate_prefix(term: str | dict, prefix: str): elif isinstance(term, str) and not term.startswith(prefix + ":"): raise ValueError(f"Term {term} is not prefixed with {prefix}") - # Model Definitions - class EnzymeMLDocument(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore name: str references: list[str] = Field(default_factory=list) @@ -89,22 +85,21 @@ class EnzymeMLDocument(BaseModel): reactions: list[Reaction] = Field(default_factory=list) measurements: list[Measurement] = Field(default_factory=list) equations: list[Equation] = Field(default_factory=list) - parameters: list[Parameter] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:EnzymeMLDocument/" + str(uuid4()), + default_factory=lambda: "enzml:EnzymeMLDocument/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ + default_factory = lambda: [ "enzml:EnzymeMLDocument", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", @@ -116,7 +111,7 @@ class EnzymeMLDocument(BaseModel): "created": "schema:dateCreated", "modified": "schema:dateModified", "creators": "schema:creator", - }, + } ) def filter_creators(self, **kwargs) -> list[Creator]: @@ -215,24 +210,13 @@ def filter_equations(self, **kwargs) -> list[Equation]: return FilterWrapper[Equation](self.equations, **kwargs).filter() - def filter_parameters(self, **kwargs) -> list[Parameter]: - """Filters the parameters attribute based on the given kwargs - - Args: - **kwargs: The attributes to filter by. - - Returns: - list[Parameter]: The filtered list of Parameter objects - """ - - return FilterWrapper[Parameter](self.parameters, **kwargs).filter() def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -254,9 +238,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -265,7 +247,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -292,6 +277,7 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) + def add_to_creators( self, given_name: str, @@ -299,22 +285,29 @@ def add_to_creators( mail: str, **kwargs, ): - params = {"given_name": given_name, "family_name": family_name, "mail": mail} + params = { + "given_name": given_name, + "family_name": family_name, + "mail": mail + } if "id" in kwargs: params["id"] = kwargs["id"] - self.creators.append(Creator(**params)) + self.creators.append( + Creator(**params) + ) return self.creators[-1] + def add_to_vessels( self, id: str, name: str, volume: float, unit: UnitDefinition, - constant: bool = True, + constant: bool= True, **kwargs, ): params = { @@ -322,27 +315,30 @@ def add_to_vessels( "name": name, "volume": volume, "unit": unit, - "constant": constant, + "constant": constant } if "id" in kwargs: params["id"] = kwargs["id"] - self.vessels.append(Vessel(**params)) + self.vessels.append( + Vessel(**params) + ) return self.vessels[-1] + def add_to_proteins( self, id: str, name: str, - constant: bool = False, - sequence: Optional[str] = None, - vessel_id: Optional[str] = None, - ecnumber: Optional[str] = None, - organism: Optional[str] = None, - organism_tax_id: Optional[str] = None, - references: list[str] = [], + constant: bool= False, + sequence: Optional[str]= None, + vessel_id: Optional[str]= None, + ecnumber: Optional[str]= None, + organism: Optional[str]= None, + organism_tax_id: Optional[str]= None, + references: list[str]= [], **kwargs, ): params = { @@ -354,40 +350,54 @@ def add_to_proteins( "ecnumber": ecnumber, "organism": organism, "organism_tax_id": organism_tax_id, - "references": references, + "references": references } if "id" in kwargs: params["id"] = kwargs["id"] - self.proteins.append(Protein(**params)) + self.proteins.append( + Protein(**params) + ) return self.proteins[-1] + def add_to_complexes( self, id: str, - participants: list[str] = [], + name: str, + constant: bool= False, + participants: list[str]= [], **kwargs, ): - params = {"id": id, "participants": participants} + params = { + "id": id, + "name": name, + "constant": constant, + "participants": participants + } if "id" in kwargs: params["id"] = kwargs["id"] - self.complexes.append(Complex(**params)) + self.complexes.append( + Complex(**params) + ) return self.complexes[-1] + def add_to_small_molecules( self, id: str, name: str, - constant: bool = False, - vessel_id: Optional[str] = None, - canonical_smiles: Optional[str] = None, - inchikey: Optional[str] = None, - references: list[str] = [], + constant: bool= False, + vessel_id: Optional[str]= None, + canonical_smiles: Optional[str]= None, + inchi: Optional[str]= None, + inchikey: Optional[str]= None, + references: list[str]= [], **kwargs, ): params = { @@ -396,25 +406,29 @@ def add_to_small_molecules( "constant": constant, "vessel_id": vessel_id, "canonical_smiles": canonical_smiles, + "inchi": inchi, "inchikey": inchikey, - "references": references, + "references": references } if "id" in kwargs: params["id"] = kwargs["id"] - self.small_molecules.append(SmallMolecule(**params)) + self.small_molecules.append( + SmallMolecule(**params) + ) return self.small_molecules[-1] + def add_to_reactions( self, id: str, name: str, - reversible: bool = False, - kinetic_law: Optional[Equation] = None, - species: list[ReactionElement] = [], - modifiers: list[str] = [], + reversible: bool= False, + kinetic_law: Optional[Equation]= None, + species: list[ReactionElement]= [], + modifiers: list[str]= [], **kwargs, ): params = { @@ -423,107 +437,81 @@ def add_to_reactions( "reversible": reversible, "kinetic_law": kinetic_law, "species": species, - "modifiers": modifiers, + "modifiers": modifiers } if "id" in kwargs: params["id"] = kwargs["id"] - self.reactions.append(Reaction(**params)) + self.reactions.append( + Reaction(**params) + ) return self.reactions[-1] + def add_to_measurements( self, id: str, name: str, - species: list[MeasurementData] = [], - group_id: Optional[str] = None, - ph: Optional[float] = None, - temperature: Optional[float] = None, - temperature_unit: Optional[UnitDefinition] = None, + species_data: list[MeasurementData]= [], + group_id: Optional[str]= None, + ph: Optional[float]= None, + temperature: Optional[float]= None, + temperature_unit: Optional[UnitDefinition]= None, **kwargs, ): params = { "id": id, "name": name, - "species": species, + "species_data": species_data, "group_id": group_id, "ph": ph, "temperature": temperature, - "temperature_unit": temperature_unit, + "temperature_unit": temperature_unit } if "id" in kwargs: params["id"] = kwargs["id"] - self.measurements.append(Measurement(**params)) + self.measurements.append( + Measurement(**params) + ) return self.measurements[-1] + def add_to_equations( self, - unit: UnitDefinition, - equation_type: EquationType, equation: str, - species_id: Optional[str] = None, - variables: list[EqVariable] = [], - parameters: list[EqParameter] = [], + equation_type: EquationType, + species_id: Optional[str]= None, + variables: list[Variable]= [], + parameters: list[Parameter]= [], **kwargs, ): params = { - "unit": unit, - "equation_type": equation_type, "equation": equation, + "equation_type": equation_type, "species_id": species_id, "variables": variables, - "parameters": parameters, + "parameters": parameters } if "id" in kwargs: params["id"] = kwargs["id"] - self.equations.append(Equation(**params)) + self.equations.append( + Equation(**params) + ) return self.equations[-1] - def add_to_parameters( - self, - id: str, - name: str, - value: Optional[float] = None, - unit: Optional[UnitDefinition] = None, - initial_value: Optional[float] = None, - upper: Optional[float] = None, - lower: Optional[float] = None, - stderr: Optional[float] = None, - constant: Optional[bool] = True, - **kwargs, - ): - params = { - "id": id, - "name": name, - "value": value, - "unit": unit, - "initial_value": initial_value, - "upper": upper, - "lower": lower, - "stderr": stderr, - "constant": constant, - } - - if "id" in kwargs: - params["id"] = kwargs["id"] - - self.parameters.append(Parameter(**params)) - - return self.parameters[-1] - - class Creator(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore given_name: str family_name: str @@ -532,30 +520,33 @@ class Creator(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Creator/" + str(uuid4()), + default_factory=lambda: "enzml:Creator/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: ["enzml:Creator", "schema:person"], + default_factory = lambda: [ + "enzml:Creator","schema:person" + ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", "given_name": "schema:givenName", "family_name": "schema:familyName", "mail": "schema:email", - }, + } ) + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -577,9 +568,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -588,7 +577,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -617,9 +609,10 @@ def add_type_term( class Vessel(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore id: str name: str @@ -630,15 +623,17 @@ class Vessel(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Vessel/" + str(uuid4()), + default_factory=lambda: "enzml:Vessel/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: ["enzml:Vessel", "OBO:OBI_0400081"], + default_factory = lambda: [ + "enzml:Vessel","OBO:OBI_0400081" + ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", @@ -648,15 +643,16 @@ class Vessel(BaseModel): }, "name": "schema:name", "volume": "OBO:OBI_0002139", - }, + } ) + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -678,9 +674,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -689,7 +683,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -718,9 +715,10 @@ def add_type_term( class Protein(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore id: str name: str @@ -735,15 +733,17 @@ class Protein(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Protein/" + str(uuid4()), + default_factory=lambda: "enzml:Protein/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: ["enzml:Protein", "schema:Protein"], + default_factory = lambda: [ + "enzml:Protein","schema:Protein" + ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", @@ -764,15 +764,16 @@ class Protein(BaseModel): "@id": "schema:citation", "@type": "@id", }, - }, + } ) + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -794,9 +795,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -805,7 +804,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -834,27 +836,30 @@ def add_type_term( class Complex(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore id: str + name: str + constant: bool = False participants: list[str] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Complex/" + str(uuid4()), + default_factory=lambda: "enzml:Complex/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ + default_factory = lambda: [ "enzml:Complex", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", @@ -862,18 +867,20 @@ class Complex(BaseModel): "@id": "schema:identifier", "@type": "@id", }, + "name": "schema:name", "participants": { "@type": "@id", }, - }, + } ) + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -895,9 +902,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -906,7 +911,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -935,32 +943,34 @@ def add_type_term( class SmallMolecule(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore id: str name: str constant: bool = False vessel_id: Optional[str] = Field(default=None) canonical_smiles: Optional[str] = Field(default=None) + inchi: Optional[str] = Field(default=None) inchikey: Optional[str] = Field(default=None) references: list[str] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:SmallMolecule/" + str(uuid4()), + default_factory=lambda: "enzml:SmallMolecule/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ + default_factory = lambda: [ "enzml:SmallMolecule", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", @@ -977,15 +987,16 @@ class SmallMolecule(BaseModel): "@id": "schema:citation", "@type": "@id", }, - }, + } ) + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -1007,9 +1018,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1018,7 +1027,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1047,9 +1059,10 @@ def add_type_term( class Reaction(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore id: str name: str @@ -1061,17 +1074,17 @@ class Reaction(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Reaction/" + str(uuid4()), + default_factory=lambda: "enzml:Reaction/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ + default_factory = lambda: [ "enzml:Reaction", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", @@ -1082,7 +1095,7 @@ class Reaction(BaseModel): "modifiers": { "@type": "@id", }, - }, + } ) def filter_species(self, **kwargs) -> list[ReactionElement]: @@ -1097,12 +1110,13 @@ def filter_species(self, **kwargs) -> list[ReactionElement]: return FilterWrapper[ReactionElement](self.species, **kwargs).filter() + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -1124,9 +1138,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1135,7 +1147,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1162,26 +1177,33 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) + def add_to_species( self, species_id: str, stoichiometry: float, **kwargs, ): - params = {"species_id": species_id, "stoichiometry": stoichiometry} + params = { + "species_id": species_id, + "stoichiometry": stoichiometry + } if "id" in kwargs: params["id"] = kwargs["id"] - self.species.append(ReactionElement(**params)) + self.species.append( + ReactionElement(**params) + ) return self.species[-1] class ReactionElement(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore species_id: str stoichiometry: float @@ -1189,32 +1211,33 @@ class ReactionElement(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:ReactionElement/" + str(uuid4()), + default_factory=lambda: "enzml:ReactionElement/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ + default_factory = lambda: [ "enzml:ReactionElement", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id", }, - }, + } ) + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -1236,9 +1259,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1247,7 +1268,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1276,70 +1300,71 @@ def add_type_term( class Equation(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore - unit: UnitDefinition - equation_type: EquationType + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + equation: str + equation_type: EquationType species_id: Optional[str] = Field(default=None) - variables: list[EqVariable] = Field(default_factory=list) - parameters: list[EqParameter] = Field(default_factory=list) + variables: list[Variable] = Field(default_factory=list) + parameters: list[Parameter] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Equation/" + str(uuid4()), + default_factory=lambda: "enzml:Equation/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ + default_factory = lambda: [ "enzml:Equation", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id", }, - }, + } ) - def filter_variables(self, **kwargs) -> list[EqVariable]: + def filter_variables(self, **kwargs) -> list[Variable]: """Filters the variables attribute based on the given kwargs Args: **kwargs: The attributes to filter by. Returns: - list[EqVariable]: The filtered list of EqVariable objects + list[Variable]: The filtered list of Variable objects """ - return FilterWrapper[EqVariable](self.variables, **kwargs).filter() + return FilterWrapper[Variable](self.variables, **kwargs).filter() - def filter_parameters(self, **kwargs) -> list[EqParameter]: + def filter_parameters(self, **kwargs) -> list[Parameter]: """Filters the parameters attribute based on the given kwargs Args: **kwargs: The attributes to filter by. Returns: - list[EqParameter]: The filtered list of EqParameter objects + list[Parameter]: The filtered list of Parameter objects """ - return FilterWrapper[EqParameter](self.parameters, **kwargs).filter() + return FilterWrapper[Parameter](self.parameters, **kwargs).filter() + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -1361,9 +1386,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1372,7 +1395,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1399,85 +1425,104 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) + def add_to_variables( self, id: str, name: str, - symbol: Optional[str] = None, + symbol: str, **kwargs, ): - params = {"id": id, "name": name, "symbol": symbol} + params = { + "id": id, + "name": name, + "symbol": symbol + } if "id" in kwargs: params["id"] = kwargs["id"] - self.variables.append(EqVariable(**params)) + self.variables.append( + Variable(**params) + ) return self.variables[-1] + def add_to_parameters( self, id: str, name: str, - symbol: Optional[str] = None, - value: Optional[float] = None, + symbol: str, + value: Optional[float]= None, + unit: Optional[UnitDefinition]= None, + initial_value: Optional[float]= None, + upper: Optional[float]= None, + lower: Optional[float]= None, + stderr: Optional[float]= None, + constant: Optional[bool]= True, **kwargs, ): - params = {"id": id, "name": name, "symbol": symbol, "value": value} + params = { + "id": id, + "name": name, + "symbol": symbol, + "value": value, + "unit": unit, + "initial_value": initial_value, + "upper": upper, + "lower": lower, + "stderr": stderr, + "constant": constant + } if "id" in kwargs: params["id"] = kwargs["id"] - self.parameters.append(EqParameter(**params)) + self.parameters.append( + Parameter(**params) + ) return self.parameters[-1] +class Variable(BaseModel): -class Parameter(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore id: str name: str - value: Optional[float] = Field(default=None) - unit: Optional[UnitDefinition] = Field(default=None) - initial_value: Optional[float] = Field(default=None) - upper: Optional[float] = Field(default=None) - lower: Optional[float] = Field(default=None) - stderr: Optional[float] = Field(default=None) - constant: bool = True + symbol: str # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Parameter/" + str(uuid4()), + default_factory=lambda: "enzml:Variable/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ - "enzml:Parameter", + default_factory = lambda: [ + "enzml:Variable", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", - "id": { - "@id": "schema:identifier", - "@type": "@id", - }, - }, + "id": "schema:identifier", + } ) + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -1499,9 +1544,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1510,7 +1553,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1538,33 +1584,37 @@ def add_type_term( self.ld_type.append(term) -class Measurement(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore +class Parameter(BaseModel): + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore id: str name: str - species: list[MeasurementData] = Field(default_factory=list) - group_id: Optional[str] = Field(default=None) - ph: Optional[float] = Field(default=None) - temperature: Optional[float] = Field(default=None) - temperature_unit: Optional[UnitDefinition] = Field(default=None) + symbol: str + value: Optional[float] = Field(default=None) + unit: Optional[UnitDefinition] = Field(default=None) + initial_value: Optional[float] = Field(default=None) + upper: Optional[float] = Field(default=None) + lower: Optional[float] = Field(default=None) + stderr: Optional[float] = Field(default=None) + constant: bool = True # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Measurement/" + str(uuid4()), + default_factory=lambda: "enzml:Parameter/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ - "enzml:Measurement", + default_factory = lambda: [ + "enzml:Parameter", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", @@ -1572,30 +1622,16 @@ class Measurement(BaseModel): "@id": "schema:identifier", "@type": "@id", }, - "group_id": { - "@type": "@id", - }, - }, + } ) - def filter_species(self, **kwargs) -> list[MeasurementData]: - """Filters the species attribute based on the given kwargs - - Args: - **kwargs: The attributes to filter by. - - Returns: - list[MeasurementData]: The filtered list of MeasurementData objects - """ - - return FilterWrapper[MeasurementData](self.species, **kwargs).filter() def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -1617,9 +1653,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1628,7 +1662,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1655,187 +1692,67 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) - def add_to_species( - self, - species_id: str, - init_conc: float, - data_type: DataTypes, - data_unit: UnitDefinition, - time_unit: UnitDefinition, - time: list[float] = [], - data: list[float] = [], - is_calculated: bool = False, - **kwargs, - ): - params = { - "species_id": species_id, - "init_conc": init_conc, - "data_type": data_type, - "data_unit": data_unit, - "time_unit": time_unit, - "time": time, - "data": data, - "is_calculated": is_calculated, - } - - if "id" in kwargs: - params["id"] = kwargs["id"] - - self.species.append(MeasurementData(**params)) - - return self.species[-1] +class Measurement(BaseModel): -class MeasurementData(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore - species_id: str - init_conc: float - data_type: DataTypes - data_unit: UnitDefinition - time_unit: UnitDefinition - time: list[float] = Field(default_factory=list) - data: list[float] = Field(default_factory=list) - is_calculated: bool = False + id: str + name: str + species_data: list[MeasurementData] = Field(default_factory=list) + group_id: Optional[str] = Field(default=None) + ph: Optional[float] = Field(default=None) + temperature: Optional[float] = Field(default=None) + temperature_unit: Optional[UnitDefinition] = Field(default=None) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:MeasurementData/" + str(uuid4()), + default_factory=lambda: "enzml:Measurement/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ - "enzml:MeasurementData", + default_factory = lambda: [ + "enzml:Measurement", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", - "species_id": { + "id": { + "@id": "schema:identifier", "@type": "@id", }, - }, - ) - - def set_attr_term( - self, - attr: str, - term: str | dict, - prefix: str | None = None, - iri: str | None = None, - ): - """Sets the term for a given attribute in the JSON-LD object - - Example: - # Using an IRI term - >> obj.set_attr_term("name", "http://schema.org/givenName") - - # Using a prefix and term - >> obj.set_attr_term("name", "schema:givenName", "schema", "http://schema.org") - - # Usinng a dictionary term - >> obj.set_attr_term("name", {"@id": "http://schema.org/givenName", "@type": "@id"}) - - Args: - attr (str): The attribute to set the term for - term (str | dict): The term to set for the attribute - - Raises: - AssertionError: If the attribute is not found in the model - """ - - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" - - if prefix: - validate_prefix(term, prefix) - - add_namespace(self, prefix, iri) - self.ld_context[attr] = term - - def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None - ): - """Adds a term to the @type field of the JSON-LD object - - Example: - # Using a term - >> obj.add_type_term("https://schema.org/Person") - - # Using a prefixed term - >> obj.add_type_term("schema:Person", "schema", "https://schema.org/Person") - - Args: - term (str): The term to add to the @type field - prefix (str, optional): The prefix to use for the term. Defaults to None. - iri (str, optional): The IRI to use for the term prefix. Defaults to None. - - Raises: - ValueError: If prefix is provided but iri is not - ValueError: If iri is provided but prefix is not - """ - - if prefix: - validate_prefix(term, prefix) - - add_namespace(self, prefix, iri) - self.ld_type.append(term) - - -class UnitDefinition(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore - - id: Optional[str] = Field(default=None) - name: Optional[str] = Field(default=None) - base_units: list[BaseUnit] = Field(default_factory=list) - - # JSON-LD fields - ld_id: str = Field( - serialization_alias="@id", - default_factory=lambda: "enzml:UnitDefinition/" + str(uuid4()), - ) - ld_type: list[str] = Field( - serialization_alias="@type", - default_factory=lambda: [ - "enzml:UnitDefinition", - ], - ) - ld_context: dict[str, str | dict] = Field( - serialization_alias="@context", - default_factory=lambda: { - "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/", - }, + "group_id": { + "@type": "@id", + }, + } ) - def filter_base_units(self, **kwargs) -> list[BaseUnit]: - """Filters the base_units attribute based on the given kwargs + def filter_species_data(self, **kwargs) -> list[MeasurementData]: + """Filters the species_data attribute based on the given kwargs Args: **kwargs: The attributes to filter by. Returns: - list[BaseUnit]: The filtered list of BaseUnit objects + list[MeasurementData]: The filtered list of MeasurementData objects """ - return FilterWrapper[BaseUnit](self.base_units, **kwargs).filter() + return FilterWrapper[MeasurementData](self.species_data, **kwargs).filter() + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -1857,9 +1774,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1868,7 +1783,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1895,65 +1813,88 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) - def add_to_base_units( + + def add_to_species_data( self, - kind: UnitType, - exponent: int, - multiplier: Optional[float] = None, - scale: Optional[float] = None, + species_id: str, + initial: float, + data_unit: UnitDefinition, + time_unit: UnitDefinition, + data_type: DataTypes, + prepared: Optional[float]= None, + data: list[float]= [], + time: list[float]= [], + is_simulated: bool= False, **kwargs, ): params = { - "kind": kind, - "exponent": exponent, - "multiplier": multiplier, - "scale": scale, + "species_id": species_id, + "initial": initial, + "data_unit": data_unit, + "time_unit": time_unit, + "data_type": data_type, + "prepared": prepared, + "data": data, + "time": time, + "is_simulated": is_simulated } if "id" in kwargs: params["id"] = kwargs["id"] - self.base_units.append(BaseUnit(**params)) + self.species_data.append( + MeasurementData(**params) + ) - return self.base_units[-1] + return self.species_data[-1] -class BaseUnit(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore +class MeasurementData(BaseModel): - kind: UnitType - exponent: int - multiplier: Optional[float] = Field(default=None) - scale: Optional[float] = Field(default=None) + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + + species_id: str + initial: float + data_unit: UnitDefinition + time_unit: UnitDefinition + data_type: DataTypes + prepared: Optional[float] = Field(default=None) + data: list[float] = Field(default_factory=list) + time: list[float] = Field(default_factory=list) + is_simulated: bool = False # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:BaseUnit/" + str(uuid4()), + default_factory=lambda: "enzml:MeasurementData/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ - "enzml:BaseUnit", + default_factory = lambda: [ + "enzml:MeasurementData", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", - }, + "species_id": { + "@type": "@id", + }, + } ) + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -1975,9 +1916,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1986,7 +1925,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -2014,44 +1956,55 @@ def add_type_term( self.ld_type.append(term) -class EqVariable(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore +class UnitDefinition(BaseModel): - id: str - name: str - symbol: Optional[str] = Field(default=None) + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + + id: Optional[str] = Field(default=None) + name: Optional[str] = Field(default=None) + base_units: list[BaseUnit] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:EqVariable/" + str(uuid4()), + default_factory=lambda: "enzml:UnitDefinition/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ - "enzml:EqVariable", + default_factory = lambda: [ + "enzml:UnitDefinition", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", - "id": { - "@type": "@id", - }, - }, + } ) + def filter_base_units(self, **kwargs) -> list[BaseUnit]: + """Filters the base_units attribute based on the given kwargs + + Args: + **kwargs: The attributes to filter by. + + Returns: + list[BaseUnit]: The filtered list of BaseUnit objects + """ + + return FilterWrapper[BaseUnit](self.base_units, **kwargs).filter() + + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -2073,9 +2026,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -2084,7 +2035,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -2112,45 +2066,68 @@ def add_type_term( self.ld_type.append(term) -class EqParameter(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + def add_to_base_units( + self, + kind: UnitType, + exponent: int, + multiplier: Optional[float]= None, + scale: Optional[float]= None, + **kwargs, + ): + params = { + "kind": kind, + "exponent": exponent, + "multiplier": multiplier, + "scale": scale + } - id: str - name: str - symbol: Optional[str] = Field(default=None) - value: Optional[float] = Field(default=None) + if "id" in kwargs: + params["id"] = kwargs["id"] + + self.base_units.append( + BaseUnit(**params) + ) + + return self.base_units[-1] + +class BaseUnit(BaseModel): + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore + + kind: UnitType + exponent: int + multiplier: Optional[float] = Field(default=None) + scale: Optional[float] = Field(default=None) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:EqParameter/" + str(uuid4()), + default_factory=lambda: "enzml:BaseUnit/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ - "enzml:EqParameter", + default_factory = lambda: [ + "enzml:BaseUnit", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", - "id": { - "@type": "@id", - }, - }, + } ) + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -2172,9 +2149,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -2183,7 +2158,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -2211,21 +2189,19 @@ def add_type_term( self.ld_type.append(term) -class DataTypes(Enum): - ABSORPTION = "abs" - BIOMASS = "biomass" - CONCENTRATION = "conc" - CONVERSION = "conversion" - FEED = "feed" - PEAK_AREA = "peak-area" - - class EquationType(Enum): ASSIGNMENT = "assignment" INITIAL_ASSIGNMENT = "initialAssignment" ODE = "ode" RATE_LAW = "rateLaw" +class DataTypes(Enum): + ABSORBANCE = "http://purl.allotrope.org/ontologies/quality#AFQ_0000061" + CONCENTRATION = "http://purl.obolibrary.org/obo/PATO_0000033" + CONVERSION = "http://purl.allotrope.org/ontologies/quality#AFQ_0000226" + FLUORESCENCE = "http://purl.obolibrary.org/obo/PATO_0000018" + PEAK_AREA = "http://purl.allotrope.org/ontologies/result#AFR_0001073" + TRANSMITTANCE = "http://purl.allotrope.org/ontologies/result#AFR_0002261" class UnitType(Enum): AMPERE = "ampere" @@ -2261,4 +2237,4 @@ class UnitType(Enum): TESLA = "tesla" VOLT = "volt" WATT = "watt" - WEBER = "weber" + WEBER = "weber" \ No newline at end of file From 4890eb23e4a458b68887357456bb0e05880284c8 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Fri, 16 Aug 2024 16:04:59 +0200 Subject: [PATCH 28/80] utilities to parse RDF --- pyenzyme/sbml/ldutils.py | 86 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 pyenzyme/sbml/ldutils.py diff --git a/pyenzyme/sbml/ldutils.py b/pyenzyme/sbml/ldutils.py new file mode 100644 index 0000000..4425e00 --- /dev/null +++ b/pyenzyme/sbml/ldutils.py @@ -0,0 +1,86 @@ +import rdflib +import json +import xml.etree.ElementTree as ET + + +def parse_sbml_rdf_annotation(sbml_obj, enzml_obj): + """Parse the RDF annotation of an SBML object.""" + + annotation = sbml_obj.getAnnotationString() + + if not annotation: + return None + + json_ld_header = _rdf_annotation_to_json_ld(annotation) + _map_json_ld_to_obj(enzml_obj, json_ld_header) + + +def _rdf_annotation_to_json_ld(annotation: str): + """Convert an SBML annotation to JSON-LD.""" + + # Parse the RDF annotation and extract the root + # RDF element to create an RDF graph + root = ET.fromstring(annotation) + rdf_element = root.find("{http://www.w3.org/1999/02/22-rdf-syntax-ns#}RDF") + + if rdf_element is None: + return None + + # Create a new RDF graph and parse the annotation + g = rdflib.Graph() + g.parse(data=ET.tostring(rdf_element), format="xml") + + return json.loads(g.serialize(format="json-ld")) + + +def _map_json_ld_to_obj(obj, header: list | None): + """Map JSON-LD header to an object.""" + + if header is None: + return + + for key, value in header[0].items(): + if key == "@context": + obj.ld_context.update(value) + elif key == "@id": + obj.ld_id = value + elif key == "@type": + obj.ld_type += value + + _sync_context_prefixes(obj) + + +def _sync_context_prefixes(obj): + """Sync the context prefixes of an object.""" + + inverse_prefixes = { + value: key + for key, value in obj.ld_context.items() + if isinstance(value, str) + } + + # Convert context + for key, value in obj.ld_context.items(): + if not isinstance(value, str): + continue + if value in inverse_prefixes: + # Skip if the prefix is already in the context + continue + + for iri, prefix in inverse_prefixes.items(): + value = value.replace(iri, f"{prefix}:") + + # Convert types + for i, type_ in enumerate(obj.ld_type): + for iri, prefix in inverse_prefixes.items(): + + if type_.startswith(iri): + obj.ld_type[i] = type_.replace(iri, f"{prefix}:") + break + + # Unique types + obj.ld_type = list(set(obj.ld_type)) + + # Convert ID + for iri, prefix in inverse_prefixes.items(): + obj.ld_id = obj.ld_id.replace(iri, f"{prefix}:") From 4fcdb6ddccc06545977eac0e3f6d112ed9d927d7 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Fri, 16 Aug 2024 16:05:19 +0200 Subject: [PATCH 29/80] remove redundant `unit` arg --- pyenzyme/equations/_math.py | 62 ++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/pyenzyme/equations/_math.py b/pyenzyme/equations/_math.py index ec7f723..9c3f264 100644 --- a/pyenzyme/equations/_math.py +++ b/pyenzyme/equations/_math.py @@ -1,16 +1,18 @@ import re + import rich from loguru import logger +from sympy import sympify + from pyenzyme.logging import add_logger from pyenzyme.model import ( EnzymeMLDocument, Equation, - EqVariable, - EqParameter, EquationType, UnitDefinition, + Variable, + Parameter, ) -from sympy import sympify INIT_ASSIGNMENT_PATTERN = r"^[A-Za-z][A-Za-z\_]*" DERIVATIVE_PATTERN = r"([A-Za-z0-9\_]+)\'\(t\)" @@ -22,14 +24,13 @@ def build_equations( *equations: str, - units: list[UnitDefinition], - enzmldoc: EnzymeMLDocument | None = None, - unit_mapping: dict[str, UnitDefinition] = {}, + unit_mapping: dict[str, UnitDefinition] | None = None, ) -> list[Equation]: """Builds a list of Equation objects from a list of string representations. Args: *equations (list[str]): A list of string representations of the ODEs + unit_mapping: A dictionary mapping parameter names to their respective Returns: list[ODE]: A list of ODE objects @@ -38,22 +39,17 @@ def build_equations( >> build_equations("s1'(t) = 2 * s2(t)", "s2'(t) = 3 * s1(t)") """ + if unit_mapping is None: + unit_mapping = {} + assert all(isinstance(eq, str) for eq in equations), "All equations must be strings" - assert all( - isinstance(unit, UnitDefinition) for unit in units - ), "All units must be UnitDefinition objects" - assert len(equations) == len( - units - ), "The number of equations must match the number of units" - return [build_equation(eq, unit, enzmldoc) for eq, unit in zip(equations, units)] # type: ignore + return [build_equation(eq, unit_mapping) for eq in equations] # type: ignore def build_equation( equation: str, - unit: UnitDefinition, - enzmldoc: EnzymeMLDocument | None = None, - unit_mapping: dict[str, UnitDefinition] = {}, + unit_mapping: dict[str, UnitDefinition] | None = None, ) -> Equation: """Builds an equation object from a string @@ -63,7 +59,7 @@ def build_equation( Args: equation (str): The equation to be converted into an ODE object - enzmldoc (EnzymeMLDocument): The EnzymeMLDocument used to transfer parameters to + unit_mapping: A dictionary mapping parameter names to their respective units Returns: ODE: The ODE object @@ -75,6 +71,9 @@ def build_equation( """ + if unit_mapping is None: + unit_mapping = {} + left, right = _extract_sides(equation) variables = set(re.findall(VARIABLE_PATTERN, right)) @@ -102,28 +101,35 @@ def build_equation( right = sympify(_clean_and_trim(right)) left = _clean_and_trim(left) - parameters = {str(symbol) for symbol in right.free_symbols} - variables + parameters = {str(symbol) for symbol in right.free_symbols} - variables # type: ignore if equation_type == EquationType.ASSIGNMENT: parameters = parameters.union({left}) eq = Equation( - species_id=left, + species_id=left if left else None, equation=str(right), variables=[_create_variable(name) for name in variables], - parameters=[_create_parameter(name) for name in parameters], equation_type=equation_type, - unit=unit, + parameters=[ + _create_parameter(name, unit_mapping.get(name)) for name in parameters + ], ) - if enzmldoc: - [_add_to_parameters(enzmldoc, param.name, param.id) for param in eq.parameters] - _add_units_to_parameters(enzmldoc, unit_mapping) + # Left out for now, but could be re-used by decision upon change to include + # parameters on the top-level document. + # if enzmldoc: + # [_add_to_parameters(enzmldoc, param.name, param.id) for param in eq.parameters] + # _add_units_to_parameters(enzmldoc, unit_mapping) return eq def _extract_sides(equation: str) -> tuple[str, str]: + if "=" not in equation: + # Will be handled as a kinetic law + return "", equation + left, right, *_ = equation.split("=") if right == "": @@ -144,12 +150,12 @@ def _clean_and_trim(eq: str) -> str: return eq.strip() -def _create_parameter(name: str) -> EqParameter: - return EqParameter(id=name, name=name, symbol=name) +def _create_parameter(name: str, unit: UnitDefinition | None) -> Parameter: + return Parameter(id=name, name=name, symbol=name, unit=unit) -def _create_variable(name: str) -> EqVariable: - return EqVariable(id=name, name=name, symbol=name) +def _create_variable(name: str) -> Variable: + return Variable(id=name, name=name, symbol=name) def _add_to_parameters(enzmldoc: EnzymeMLDocument, name: str, id: str): From abe69446d5a3f584ea049a88beeac0ff2de8410a Mon Sep 17 00:00:00 2001 From: Jan Range Date: Fri, 16 Aug 2024 16:05:35 +0200 Subject: [PATCH 30/80] export vital sbml functions --- pyenzyme/sbml/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pyenzyme/sbml/__init__.py b/pyenzyme/sbml/__init__.py index 2ae543c..ab163b1 100644 --- a/pyenzyme/sbml/__init__.py +++ b/pyenzyme/sbml/__init__.py @@ -1,3 +1,10 @@ +from .omex import create_sbml_omex, read_sbml_omex +from .parser import read_sbml from .serializer import to_sbml -__all__ = ["to_sbml"] +__all__ = [ + "to_sbml", + "read_sbml", + "create_sbml_omex", + "read_sbml_omex", +] From 73503773ba298edfbb981fdd1e1747f345ae881b Mon Sep 17 00:00:00 2001 From: Jan Range Date: Fri, 16 Aug 2024 16:05:46 +0200 Subject: [PATCH 31/80] adjust to model changes --- pyenzyme/tabular.py | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/pyenzyme/tabular.py b/pyenzyme/tabular.py index d799c8c..16e77df 100644 --- a/pyenzyme/tabular.py +++ b/pyenzyme/tabular.py @@ -1,6 +1,10 @@ -import pandas as pd +from __future__ import annotations + import pathlib as pl +import pandas as pd +from loguru import logger # type: ignore + from .model import ( DataTypes, Measurement, @@ -12,7 +16,7 @@ def to_pandas( enzmldoc: EnzymeMLDocument, - ignore: list[str] = [], + ignore: list[str] | None = None, ) -> pd.DataFrame: """This function converts an EnzymeMLDocument object to a pandas DataFrame. @@ -35,6 +39,9 @@ def to_pandas( ValueError: If the measurement does not contain species data. """ + if ignore is None: + ignore = [] + assert isinstance( enzmldoc, EnzymeMLDocument ), "The input must be an EnzymeMLDocument object" @@ -46,7 +53,7 @@ def to_pandas( if not isinstance(meas, Measurement): raise ValueError("The measurements must be of type Measurement") - if meas.species is None: + if meas.species_data is None: raise ValueError("The measurement must contain species data") df = _measurement_to_pandas(meas) @@ -115,7 +122,7 @@ def read_csv( data_unit: UnitDefinition, time_unit: UnitDefinition, data_type: DataTypes = DataTypes.CONCENTRATION, - sep: str = ";", + sep: str = "\t", ): """Reads a CSV file from the specified path into a measurement. @@ -241,12 +248,12 @@ def _create_single_measurement( time=time, data_unit=data_unit, time_unit=time_unit, - init_conc=species_data[0], + initial=species_data[0], data_type=data_type, ) ) - return Measurement(name=id, id=id, species=meas_data) + return Measurement(name=id, id=id, species_data=meas_data) def _process_multiple_measurements( @@ -292,8 +299,8 @@ def _measurement_to_pandas(measurement: Measurement) -> pd.DataFrame: _validate_measurement(measurement) - data = {"time": measurement.species[0].time} - for species in measurement.species: + data = {"time": measurement.species_data[0].time} + for species in measurement.species_data: data[species.species_id] = species.data return pd.DataFrame(data) @@ -305,11 +312,14 @@ def _validate_measurement(meas: Measurement) -> None: try: times = pd.DataFrame( - {species.species_id + "_time": species.time for species in meas.species} + { + species.species_id + "_time": species.time + for species in meas.species_data + } ) except ValueError: time_lengths = { - species.species_id: len(species.time) for species in meas.species + species.species_id: len(species.time) for species in meas.species_data } raise ValueError( f"Export to pandas not possible, the time lengths are inconsistent. Got different time arrays per species: {time_lengths}" From 877cd41cb35ce20e5008fe1fa9c76d2867c982fb Mon Sep 17 00:00:00 2001 From: Jan Range Date: Fri, 16 Aug 2024 16:05:58 +0200 Subject: [PATCH 32/80] add parameter fetcher --- pyenzyme/tools.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/pyenzyme/tools.py b/pyenzyme/tools.py index 6a82de7..dcea60f 100644 --- a/pyenzyme/tools.py +++ b/pyenzyme/tools.py @@ -1,7 +1,22 @@ -from enum import Enum -import toml import functools as ft import importlib.resources as pkg_resources +from enum import Enum + +import toml + +import pyenzyme as pe + + +def get_all_parameters(enzmldoc): + """Extracts all parameters from an EnzymeMLDocument. + + Args: + enzmldoc (EnzymeMLDocument): The EnzymeMLDocument to extract parameters from. + + Returns: + list[Parameter]: A list of all parameters in the EnzymeMLDocument. + """ + return find_unique(enzmldoc, target=pe.Parameter) def read_static_file(path, filename: str): From 0e41499a87c788d55dfdddf0ba0c23b441ab4ab3 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Fri, 16 Aug 2024 16:06:18 +0200 Subject: [PATCH 33/80] refactor and extend to nested and multiple types --- pyenzyme/xmlutils.py | 74 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 64 insertions(+), 10 deletions(-) diff --git a/pyenzyme/xmlutils.py b/pyenzyme/xmlutils.py index bbcfad8..fb23f55 100644 --- a/pyenzyme/xmlutils.py +++ b/pyenzyme/xmlutils.py @@ -1,38 +1,83 @@ -import xml.etree.ElementTree as ET import xml.dom.minidom as minidom +import xml.etree.ElementTree as ET +from enum import Enum +from typing import Any -def map_to_xml(root: ET.Element, mappings: dict, namespace: str): +def map_to_xml( + root: ET.Element, + mappings: dict, + namespace: str, +): """ Maps a dictionary to XML elements and appends them to the root element. Args: root (ET.Element): The root element to which sub-elements are appended. mappings (dict): The dictionary containing the key-value mappings to convert to XML. + namespace (str): The namespace of the XML elements. """ for key, value in mappings.items(): if value is None: continue if key.startswith("@"): - root.attrib[key[1:]] = str(value) + root.attrib[key[1:]] = _convert_types(value) continue subelement = ET.Element(f"{{{namespace}}}{key}") if isinstance(value, dict): process_dict_value(subelement, value) + elif isinstance(value, list): + process_multiple_element(key, namespace, root, value) elif key.startswith("@"): - subelement.attrib[key[1:]] = str(value) + subelement.attrib[key[1:]] = _convert_types(value) else: - subelement.text = str(value) + subelement.text = _convert_types(value) if not _is_empty(subelement): root.append(subelement) +def _convert_types(value): + if isinstance(value, float) and value == 0.0: + return "0.0" + if isinstance(value, Enum): + return str(value.name) + + return str(value) + + +def process_multiple_element( + key: str, + namespace: str, + root: ET.Element, + value: Any, +): + """Processes a list value and adds it as a list of elements to the root element. + + Args: + key (str): The key of the list element. + namespace (str): The namespace of the list element. + root (ET.Element): The root element to which the list elements are appended. + value (list): The list of values to be added as elements. + """ + for i, item in enumerate(value): + list_element = ET.Element(f"{{{namespace}}}{key}") + list_element.text = _convert_types(item) + root.append(list_element) + + def _is_empty(element: ET.Element): - """Checks if an element and its sub elements are empty.""" + """Checks if an element and its sub elements are empty. + + Args: + element (ET.Element): The element to check. + + Returns: + bool: True if the element is empty, False otherwise. + """ return all( [ @@ -43,7 +88,10 @@ def _is_empty(element: ET.Element): ) -def process_dict_value(subelement: ET.Element, value: dict): +def process_dict_value( + subelement: ET.Element, + value: dict, +): """ Processes a dictionary value and adds it as attributes or text to a subelement. @@ -56,9 +104,9 @@ def process_dict_value(subelement: ET.Element, value: dict): continue if subkey.startswith("@"): - subelement.attrib[subkey[1:]] = str(subvalue) + subelement.attrib[subkey[1:]] = _convert_types(subvalue) else: - subelement.text = str(subvalue) + subelement.text = _convert_types(subvalue) def serialize_to_pretty_xml_string(element: ET.Element | None) -> str | None: @@ -67,7 +115,13 @@ def serialize_to_pretty_xml_string(element: ET.Element | None) -> str | None: if element is None: return None - rough_string = ET.tostring(element, "utf-8", xml_declaration=False) + rough_string = ET.tostring( + element, + encoding="unicode", + method="xml", + xml_declaration=False, + ) + reparsed = minidom.parseString(rough_string) return "\n".join(reparsed.toprettyxml(indent="\t").split("\n")[1:]).strip() From b15e149e9ba43586a6efde75828839ad48737433 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Fri, 16 Aug 2024 16:06:58 +0200 Subject: [PATCH 34/80] rename to prevent mutability issues --- pyenzyme/units/units.py | 83 +++++++++++++++++++++++++++-------------- 1 file changed, 54 insertions(+), 29 deletions(-) diff --git a/pyenzyme/units/units.py b/pyenzyme/units/units.py index e1902c2..917beea 100644 --- a/pyenzyme/units/units.py +++ b/pyenzyme/units/units.py @@ -1,7 +1,9 @@ +from copy import deepcopy from enum import Enum from functools import partial from pydantic import model_validator + from pyenzyme.model import ( UnitDefinition as _UnitDefinition, BaseUnit as _BaseUnit, @@ -99,17 +101,21 @@ def __rtruediv__(self, other: object) -> "UnitDefinition": Raises: TypeError: If the other operand type is unsupported. """ - for base in self.base_units: + + unit_def = deepcopy(self) + unit_def.id = None + + for base in unit_def.base_units: base.exponent = -abs(base.exponent) if isinstance(other, UnitDefinition): - self.base_units.extend(other.base_units) + unit_def.base_units.extend(other.base_units) elif isinstance(other, _BaseUnit): - self.base_units.append(other) + unit_def.base_units.append(other) - self._get_name() + unit_def._get_name() - return self + return unit_def def __truediv__(self, other: object) -> "UnitDefinition": """Division operation to handle unit division. @@ -128,17 +134,20 @@ def __truediv__(self, other: object) -> "UnitDefinition": """ + unit_def = deepcopy(self) + unit_def.id = None + if isinstance(other, UnitDefinition): for base in other.base_units: base.exponent = -abs(base.exponent) - self.base_units.extend(other.base_units) + unit_def.base_units.extend(other.base_units) elif isinstance(other, _BaseUnit): other.exponent = -abs(other.exponent) - self.base_units.append(other) + unit_def.base_units.append(other) - self._get_name() + unit_def._get_name() - return self + return unit_def def __mul__(self, other: object) -> "UnitDefinition": """Multiplication operation to handle unit multiplication. @@ -152,16 +161,20 @@ def __mul__(self, other: object) -> "UnitDefinition": Raises: TypeError: If the other operand type is unsupported. """ + + unit_def = deepcopy(self) + unit_def.id = None + if isinstance(other, (int, float)): - for base in self.base_units: + for base in unit_def.base_units: if base.multiplier: base.multiplier *= other else: base.multiplier = other - self._get_name() + unit_def._get_name() - return self + return unit_def raise TypeError( f"unsupported operand type(s) for *: 'UnitDefinition' and '{type(other)}'" @@ -268,16 +281,19 @@ def __rtruediv__(self, other: object) -> "UnitDefinition | BaseUnit": Raises: TypeError: If the other operand type is unsupported. """ + + base_unit = deepcopy(self) + if isinstance(other, UnitDefinition): - self.exponent = -self.exponent - other.base_units.append(self) + base_unit.exponent = -base_unit.exponent + other.base_units.append(base_unit) other._get_name() return other elif isinstance(other, (int, float)): - self.exponent = -self.exponent - return self + base_unit.exponent = -base_unit.exponent + return base_unit raise TypeError( f"unsupported operand type(s) for /: 'BaseUnit' and '{type(other)}'" @@ -295,13 +311,16 @@ def __truediv__(self, other: object) -> "UnitDefinition": Raises: TypeError: If the other operand type is unsupported. """ + + this_bu = deepcopy(self) + if isinstance(other, BaseUnit): other.exponent = -other.exponent - return UnitDefinition(base_units=[self, other])._get_name() + return UnitDefinition(base_units=[this_bu, other])._get_name() elif isinstance(other, UnitDefinition): for base_unit in other.base_units: base_unit.exponent = -base_unit.exponent - other.base_units.append(self) + other.base_units.append(this_bu) other._get_name() return other @@ -322,9 +341,12 @@ def __pow__(self, other: int) -> "_BaseUnit": Raises: TypeError: If the exponent is not an integer. """ + + this_bu = deepcopy(self) + if isinstance(other, int): - self.exponent = other - return self + this_bu.exponent = other + return this_bu raise TypeError( f"unsupported operand type(s) for **: 'BaseUnit' and '{type(other)}'" @@ -342,25 +364,28 @@ def __mul__(self, other: object) -> object: Raises: TypeError: If the other operand type is unsupported. """ + + this_bu = deepcopy(self) + if isinstance(other, BaseUnit): - if self.exponent < 0 or other.exponent < 0: - self.exponent = abs(self.exponent) + if this_bu.exponent < 0 or other.exponent < 0: + this_bu.exponent = abs(this_bu.exponent) other.exponent = abs(other.exponent) - return UnitDefinition(base_units=[self, other])._get_name() + return UnitDefinition(base_units=[this_bu, other])._get_name() elif isinstance(other, UnitDefinition): - other.base_units.append(self) + other.base_units.append(this_bu) other._get_name() return other elif isinstance(other, Prefix): - return other * self + return other * this_bu elif isinstance(other, (int, float)): - if self.multiplier: - self.multiplier *= other + if this_bu.multiplier: + this_bu.multiplier *= other else: - self.multiplier = other - return self + this_bu.multiplier = other + return this_bu raise TypeError( f"unsupported operand type(s) for *: 'BaseUnit' and '{type(other)}'" From 6acea114aab7486010ee38bb88420a592189d41c Mon Sep 17 00:00:00 2001 From: Jan Range Date: Fri, 16 Aug 2024 16:07:10 +0200 Subject: [PATCH 35/80] add `pymetadata` dep for OMEX support --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 6799849..681febd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,6 +17,7 @@ pydantic = "^2.7.4" loguru = "^0.7.2" rdflib = "7.0.0" sympy = "^1.12.1" +pymetadata = "^0.4.4" [tool.poetry.group.neo4j.dependencies] neo4j = "^5.21.0" From d687c4367b171a337a9d6c193d9265732ef279ac Mon Sep 17 00:00:00 2001 From: Jan Range Date: Fri, 16 Aug 2024 16:08:15 +0200 Subject: [PATCH 36/80] update tests --- tests/fixtures/sbml/ode_example_enzml.json | 1118 +++++++++++++++++ tests/fixtures/sbml/ode_example_sbml.xml | 268 ++++ .../fixtures/sbml/reaction_example_enzml.json | 1029 +++++++++++++++ tests/fixtures/sbml/reaction_example_sbml.xml | 231 ++++ tests/fixtures/tabular/measurement_valid.json | 20 +- tests/unit/test_equations.py | 28 +- tests/unit/test_tabular.py | 65 +- 7 files changed, 2703 insertions(+), 56 deletions(-) create mode 100644 tests/fixtures/sbml/ode_example_enzml.json create mode 100644 tests/fixtures/sbml/ode_example_sbml.xml create mode 100644 tests/fixtures/sbml/reaction_example_enzml.json create mode 100644 tests/fixtures/sbml/reaction_example_sbml.xml diff --git a/tests/fixtures/sbml/ode_example_enzml.json b/tests/fixtures/sbml/ode_example_enzml.json new file mode 100644 index 0000000..57a2b6e --- /dev/null +++ b/tests/fixtures/sbml/ode_example_enzml.json @@ -0,0 +1,1118 @@ +{ + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "name": "schema:title", + "references": { + "@id": "schema:citation", + "@type": "@id" + }, + "created": "schema:dateCreated", + "modified": "schema:dateModified", + "creators": "schema:creator" + }, + "@id": "enzml:EnzymeMLDocument/44649453-a157-4cb7-be07-8fb09a82f4ca", + "@type": [ + "enzml:EnzymeMLDocument" + ], + "name": "Test", + "references": [], + "creators": [], + "vessels": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "volume": "OBO:OBI_0002139" + }, + "@id": "enzml:Vessel/02063116-73f1-4ba1-b166-8fe835e55659", + "@type": [ + "enzml:Vessel", + "OBO:OBI_0400081" + ], + "id": "v0", + "name": "Vessel 1", + "volume": 10.0, + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000098", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u0", + "name": "ml", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/efd21ea0-af02-4920-9036-9c8337cf0421", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": 1, + "scale": -3.0 + } + ] + }, + "constant": true + } + ], + "proteins": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@type": "@id" + }, + "name": "schema:name", + "sequence": "OBO:GSSO_007262", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "organism": "OBO:OBI_0100026", + "organism_tax_id": { + "@type": "@id" + }, + "references": { + "@id": "schema:citation", + "@type": "@id" + } + }, + "@id": "enzml:Protein/cf3097ad-5833-4ff8-99f1-784cd5f673ca", + "@type": [ + "enzml:Protein", + "schema:Protein" + ], + "id": "p0", + "name": "Enzyme", + "constant": false, + "sequence": "MTEY", + "vessel_id": "v0", + "ecnumber": "1.1.1.1", + "organism": "E.coli", + "organism_tax_id": "12345", + "references": [] + } + ], + "complexes": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "participants": { + "@type": "@id" + } + }, + "@id": "enzml:Complex/fa79ccd6-acbe-47e4-a8d1-795eb18346db", + "@type": [ + "enzml:Complex" + ], + "id": "c0", + "name": "Enzyme-Substrate Complex", + "constant": false, + "participants": [ + "p0", + "s0" + ] + } + ], + "small_molecules": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "references": { + "@id": "schema:citation", + "@type": "@id" + } + }, + "@id": "enzml:SmallMolecule/5375d6fb-6246-43b0-bc81-d47e3e72493f", + "@type": [ + "enzml:SmallMolecule" + ], + "id": "s0", + "name": "Substrate", + "constant": false, + "vessel_id": "v0", + "canonical_smiles": "CC(=O)O", + "inchikey": "QTBSBXVTEAMEQO-UHFFFAOYSA-N", + "references": [] + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "references": { + "@id": "schema:citation", + "@type": "@id" + } + }, + "@id": "enzml:SmallMolecule/c7318d93-2a0f-44c0-9ebe-a79fc27bf01e", + "@type": [ + "enzml:SmallMolecule" + ], + "id": "s1", + "name": "Product", + "constant": false, + "vessel_id": "v0", + "canonical_smiles": "CC(=O)O", + "inchikey": "QTBSBXVTEAMEQO-UHFFFAOYSA-N", + "references": [] + } + ], + "reactions": [], + "measurements": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "group_id": { + "@type": "@id" + } + }, + "@id": "enzml:Measurement/ef303c49-7554-4367-9f44-cb6e9838c1be", + "@type": [ + "enzml:Measurement" + ], + "id": "m0", + "name": "m0", + "species_data": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/3beaeb28-72a4-4398-ae34-c9208c03aa0b", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s0", + "initial": 0.0, + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u2", + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/cff3e0ad-ce88-479a-8c01-b06e012e3195", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/df1eed89-6a35-483e-a187-b981d9ee0405", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u1", + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/634613e6-a06f-42e9-9e11-b32c3e6f6f09", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "data": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "is_simulated": false + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/00c0dabc-47cc-40d5-a4d5-7809880aad52", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s1", + "initial": 10.0, + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u2", + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/cff3e0ad-ce88-479a-8c01-b06e012e3195", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/df1eed89-6a35-483e-a187-b981d9ee0405", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u1", + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/634613e6-a06f-42e9-9e11-b32c3e6f6f09", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "data": [ + 10.0, + 9.0, + 8.0, + 7.0, + 6.0, + 5.0, + 4.0, + 3.0, + 2.0, + 1.0, + 0.0 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "is_simulated": false + } + ], + "ph": 7.0, + "temperature": 298.15, + "temperature_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000012", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u3", + "name": "K", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/83915bc7-e2b4-450f-b363-20eb027d1f3d", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "kelvin", + "exponent": 1, + "scale": 1.0 + } + ] + } + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "group_id": { + "@type": "@id" + } + }, + "@id": "enzml:Measurement/28bb1de1-4cd9-45e2-b160-3a2dd5ce3e34", + "@type": [ + "enzml:Measurement" + ], + "id": "m1", + "name": "m1", + "species_data": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/24b00355-6bad-4771-a0e5-e65c7560b3a9", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s0", + "initial": 0.0, + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u2", + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/cff3e0ad-ce88-479a-8c01-b06e012e3195", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/df1eed89-6a35-483e-a187-b981d9ee0405", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u1", + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/634613e6-a06f-42e9-9e11-b32c3e6f6f09", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "data": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "is_simulated": false + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/405dfbaf-cc21-41d4-836d-fdadc1d0c1b3", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s1", + "initial": 10.0, + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u2", + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/cff3e0ad-ce88-479a-8c01-b06e012e3195", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/df1eed89-6a35-483e-a187-b981d9ee0405", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u1", + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/634613e6-a06f-42e9-9e11-b32c3e6f6f09", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "data": [ + 10.0, + 9.0, + 8.0, + 7.0, + 6.0, + 5.0, + 4.0, + 3.0, + 2.0, + 1.0, + 0.0 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "is_simulated": false + } + ], + "ph": 7.0, + "temperature": 298.15, + "temperature_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000012", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u3", + "name": "K", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/83915bc7-e2b4-450f-b363-20eb027d1f3d", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "kelvin", + "exponent": 1, + "scale": 1.0 + } + ] + } + } + ], + "equations": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:Equation/87c7fc6d-6933-42be-a33a-c8eecb5901b7", + "@type": [ + "enzml:Equation" + ], + "equation": "E_tot*kcat*s0/(K_m + s0)", + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u4", + "name": "mmol / l s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/cff3e0ad-ce88-479a-8c01-b06e012e3195", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/df1eed89-6a35-483e-a187-b981d9ee0405", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/634613e6-a06f-42e9-9e11-b32c3e6f6f09", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "equation_type": "ode", + "species_id": "s1", + "variables": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + }, + "@id": "enzml:Variable/49c819d7-0f8a-4d2e-9a82-09cf62d48aad", + "@type": [ + "enzml:Variable" + ], + "id": "s0", + "name": "s0", + "symbol": "s0" + } + ], + "parameters": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + } + }, + "@id": "enzml:Parameter/404206dc-7e11-432e-b1a8-871b822325ef", + "@type": [ + "enzml:Parameter" + ], + "id": "kcat", + "name": "kcat", + "symbol": "kcat", + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u5", + "name": "1 / s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/634613e6-a06f-42e9-9e11-b32c3e6f6f09", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "upper": 100.0, + "lower": 0.0, + "stderr": 0.1, + "constant": true + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + } + }, + "@id": "enzml:Parameter/a5b7ca60-4945-4cfe-9eb9-6c97dfdaa770", + "@type": [ + "enzml:Parameter" + ], + "id": "K_m", + "name": "K_m", + "symbol": "K_m", + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u2", + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/cff3e0ad-ce88-479a-8c01-b06e012e3195", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/df1eed89-6a35-483e-a187-b981d9ee0405", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "upper": 100.0, + "lower": 0.0, + "stderr": 0.1, + "constant": true + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + } + }, + "@id": "enzml:Parameter/26b501d3-7200-4813-ac11-b62f0f665054", + "@type": [ + "enzml:Parameter" + ], + "id": "E_tot", + "name": "E_tot", + "symbol": "E_tot", + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u2", + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/cff3e0ad-ce88-479a-8c01-b06e012e3195", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/df1eed89-6a35-483e-a187-b981d9ee0405", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "upper": 100.0, + "lower": 0.0, + "stderr": 0.1, + "constant": true + } + ] + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:Equation/3991effb-6394-4b6d-baa8-a06462e2101f", + "@type": [ + "enzml:Equation" + ], + "equation": "100", + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u2", + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/cff3e0ad-ce88-479a-8c01-b06e012e3195", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/df1eed89-6a35-483e-a187-b981d9ee0405", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "equation_type": "initialAssignment", + "species_id": "E_tot", + "variables": [], + "parameters": [] + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/sbml/ode_example_sbml.xml b/tests/fixtures/sbml/ode_example_sbml.xml new file mode 100644 index 0000000..7d4ca6b --- /dev/null +++ b/tests/fixtures/sbml/ode_example_sbml.xml @@ -0,0 +1,268 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Vessel 1 + 10.0 + + + + + + + + + + + + + + Enzyme + MTEY + E.coli + + + + + + 1.1.1.1 + E.coli + 12345 + MTEY + + + + + + + + Enzyme-Substrate Complex + + + + + p0 + s0 + + + + + + + + Substrate + + + + + QTBSBXVTEAMEQO-UHFFFAOYSA-N + CC(=O)O + + + + + + + + Product + + + + + QTBSBXVTEAMEQO-UHFFFAOYSA-N + CC(=O)O + + + + + + + + + + + + + + 0.0 + 100.0 + 0.1 + + + + + + + + + + + + 0.0 + 100.0 + 0.1 + + + + + + + + + + + + 0.0 + 100.0 + 0.1 + + + + + + + + 100 + + + + + + + + + + + + + + + + E_tot + kcat + s0 + + + + K_m + s0 + + + + + + + diff --git a/tests/fixtures/sbml/reaction_example_enzml.json b/tests/fixtures/sbml/reaction_example_enzml.json new file mode 100644 index 0000000..7e01e7f --- /dev/null +++ b/tests/fixtures/sbml/reaction_example_enzml.json @@ -0,0 +1,1029 @@ +{ + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "name": "schema:title", + "references": { + "@id": "schema:citation", + "@type": "@id" + }, + "created": "schema:dateCreated", + "modified": "schema:dateModified", + "creators": "schema:creator" + }, + "@id": "enzml:EnzymeMLDocument/b8426986-8c86-43f9-a03e-efbc1577d70a", + "@type": [ + "enzml:EnzymeMLDocument" + ], + "name": "Test", + "references": [], + "creators": [], + "vessels": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "volume": "OBO:OBI_0002139" + }, + "@id": "enzml:Vessel/e594aa18-c317-4e87-b68f-ca7337c910d0", + "@type": [ + "enzml:Vessel", + "OBO:OBI_0400081" + ], + "id": "v0", + "name": "Vessel 1", + "volume": 10.0, + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000098", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u0", + "name": "ml", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/26d67db7-127b-4bf5-8578-dfc75ec003d8", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": 1, + "scale": -3.0 + } + ] + }, + "constant": true + } + ], + "proteins": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@type": "@id" + }, + "name": "schema:name", + "sequence": "OBO:GSSO_007262", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "organism": "OBO:OBI_0100026", + "organism_tax_id": { + "@type": "@id" + }, + "references": { + "@id": "schema:citation", + "@type": "@id" + } + }, + "@id": "enzml:Protein/de66507f-620a-42ee-9162-7401630cc4bc", + "@type": [ + "enzml:Protein", + "schema:Protein" + ], + "id": "p0", + "name": "Enzyme", + "constant": false, + "sequence": "MTEY", + "vessel_id": "v0", + "references": [] + } + ], + "complexes": [], + "small_molecules": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "references": { + "@id": "schema:citation", + "@type": "@id" + } + }, + "@id": "enzml:SmallMolecule/210850a2-7071-4594-9762-d0520bd2ded6", + "@type": [ + "enzml:SmallMolecule" + ], + "id": "s0", + "name": "Substrate", + "constant": false, + "vessel_id": "v0", + "references": [] + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "references": { + "@id": "schema:citation", + "@type": "@id" + } + }, + "@id": "enzml:SmallMolecule/5f11bcce-405f-4b0e-9a58-7e812c80fcc5", + "@type": [ + "enzml:SmallMolecule" + ], + "id": "s1", + "name": "Product", + "constant": false, + "vessel_id": "v0", + "references": [] + } + ], + "reactions": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "modifiers": { + "@type": "@id" + } + }, + "@id": "enzml:Reaction/e236d1d1-c83a-45bb-859a-51bd15cee184", + "@type": [ + "enzml:Reaction" + ], + "id": "r0", + "name": "Reaction 1", + "reversible": false, + "kinetic_law": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:Equation/deb8cae4-181a-47de-b5c5-282fdabd69d6", + "@type": [ + "enzml:Equation" + ], + "equation": "kcat*p0*s0/(K_m + s0)", + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u1", + "name": "mmol / l s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/801b612f-9b16-4030-bc53-20e00d9e525b", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/8c63ea70-d26e-45e4-beef-651da82864d0", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/ec7aa14e-db13-4b05-ac2a-19973ff83e5a", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "equation_type": "rateLaw", + "variables": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + }, + "@id": "enzml:Variable/2805b7f6-e844-422f-ac91-d7a9fbb3c98e", + "@type": [ + "enzml:Variable" + ], + "id": "p0", + "name": "p0", + "symbol": "p0" + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + }, + "@id": "enzml:Variable/9ee004f8-07ca-45b6-a1e8-4583c4e86fe7", + "@type": [ + "enzml:Variable" + ], + "id": "s0", + "name": "s0", + "symbol": "s0" + } + ], + "parameters": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + } + }, + "@id": "enzml:Parameter/6b315b1b-26df-41a6-8a4f-1fc508e92a61", + "@type": [ + "enzml:Parameter" + ], + "id": "K_m", + "name": "K_m", + "symbol": "K_m", + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u2", + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/801b612f-9b16-4030-bc53-20e00d9e525b", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/8c63ea70-d26e-45e4-beef-651da82864d0", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "upper": 100.0, + "lower": 0.0, + "stderr": 0.1, + "constant": true + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + } + }, + "@id": "enzml:Parameter/6619c640-3bbc-4b9d-b1e5-22665776bdaf", + "@type": [ + "enzml:Parameter" + ], + "id": "kcat", + "name": "kcat", + "symbol": "kcat", + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u3", + "name": "1 / s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/ec7aa14e-db13-4b05-ac2a-19973ff83e5a", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "upper": 100.0, + "lower": 0.0, + "stderr": 0.1, + "constant": true + } + ] + }, + "species": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:ReactionElement/d709628a-f70c-48bf-b2ae-33fe2a13b310", + "@type": [ + "enzml:ReactionElement" + ], + "species_id": "s0", + "stoichiometry": -1.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:ReactionElement/5286412a-e094-4a49-8cb9-e9e8e6c0ade4", + "@type": [ + "enzml:ReactionElement" + ], + "species_id": "s1", + "stoichiometry": 1.0 + } + ], + "modifiers": [ + "p0" + ] + } + ], + "measurements": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "group_id": { + "@type": "@id" + } + }, + "@id": "enzml:Measurement/f4a6a78a-50eb-4850-b0e8-80b4155b75f2", + "@type": [ + "enzml:Measurement" + ], + "id": "m0", + "name": "m0", + "species_data": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/9d071dc1-70a5-4c78-bbe0-5fd5e8fad74f", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s0", + "initial": 0.0, + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u2", + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/801b612f-9b16-4030-bc53-20e00d9e525b", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/8c63ea70-d26e-45e4-beef-651da82864d0", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u4", + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/ec7aa14e-db13-4b05-ac2a-19973ff83e5a", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "data": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "is_simulated": false + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/0970bcda-cb12-4049-a1e1-9b8c2a59c425", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s1", + "initial": 10.0, + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u2", + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/801b612f-9b16-4030-bc53-20e00d9e525b", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/8c63ea70-d26e-45e4-beef-651da82864d0", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u4", + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/ec7aa14e-db13-4b05-ac2a-19973ff83e5a", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "data": [ + 10.0, + 9.0, + 8.0, + 7.0, + 6.0, + 5.0, + 4.0, + 3.0, + 2.0, + 1.0, + 0.0 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "is_simulated": false + } + ], + "ph": 7.0, + "temperature": 298.15, + "temperature_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000012", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u5", + "name": "K", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/ff8443f5-375d-4fbe-b199-598194298fb4", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "kelvin", + "exponent": 1, + "scale": 1.0 + } + ] + } + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "group_id": { + "@type": "@id" + } + }, + "@id": "enzml:Measurement/a1fda09a-634e-4482-8d66-069b0e615ef5", + "@type": [ + "enzml:Measurement" + ], + "id": "m1", + "name": "m1", + "species_data": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/8c1fce82-7dbe-499e-b20d-6b0bb4887ed8", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s0", + "initial": 0.0, + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u2", + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/801b612f-9b16-4030-bc53-20e00d9e525b", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/8c63ea70-d26e-45e4-beef-651da82864d0", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u4", + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/ec7aa14e-db13-4b05-ac2a-19973ff83e5a", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "data": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "is_simulated": false + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:MeasurementData/ab6e6d77-58fe-4da1-a310-9224f573f0da", + "@type": [ + "enzml:MeasurementData" + ], + "species_id": "s1", + "initial": 10.0, + "data_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u2", + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/801b612f-9b16-4030-bc53-20e00d9e525b", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/8c63ea70-d26e-45e4-beef-651da82864d0", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u4", + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/ec7aa14e-db13-4b05-ac2a-19973ff83e5a", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "data": [ + 10.0, + 9.0, + 8.0, + 7.0, + 6.0, + 5.0, + 4.0, + 3.0, + 2.0, + 1.0, + 0.0 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "is_simulated": false + } + ], + "ph": 7.0, + "temperature": 298.15, + "temperature_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000012", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u5", + "name": "K", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/ff8443f5-375d-4fbe-b199-598194298fb4", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "kelvin", + "exponent": 1, + "scale": 1.0 + } + ] + } + } + ], + "equations": [] +} \ No newline at end of file diff --git a/tests/fixtures/sbml/reaction_example_sbml.xml b/tests/fixtures/sbml/reaction_example_sbml.xml new file mode 100644 index 0000000..d346fc5 --- /dev/null +++ b/tests/fixtures/sbml/reaction_example_sbml.xml @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Vessel 1 + 10.0 + + + + + + + + + + + + + + Enzyme + MTEY + + + + + + MTEY + + + + + + + + Substrate + + + + + + + + + + Product + + + + + + + + + + + + + + + + 0.0 + 100.0 + 0.1 + + + + + + + + + + + + 0.0 + 100.0 + 0.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + kcat + p0 + s0 + + + + K_m + s0 + + + + + + + + diff --git a/tests/fixtures/tabular/measurement_valid.json b/tests/fixtures/tabular/measurement_valid.json index ed462a2..926018d 100644 --- a/tests/fixtures/tabular/measurement_valid.json +++ b/tests/fixtures/tabular/measurement_valid.json @@ -44,7 +44,7 @@ ], "id": "m0", "name": "Measurement 1", - "species": [ + "species_data": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", @@ -59,8 +59,8 @@ "enzml:MeasurementData" ], "species_id": "s1", - "init_conc": 0.0, - "data_type": "conc", + "initial": 0.0, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", @@ -171,8 +171,8 @@ "enzml:MeasurementData" ], "species_id": "s2", - "init_conc": 10.0, - "data_type": "conc", + "initial": 10.0, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", @@ -290,7 +290,7 @@ ], "id": "m1", "name": "Measurement 2", - "species": [ + "species_data": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", @@ -305,8 +305,8 @@ "enzml:MeasurementData" ], "species_id": "s1", - "init_conc": 0.0, - "data_type": "conc", + "initial": 0.0, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", @@ -417,8 +417,8 @@ "enzml:MeasurementData" ], "species_id": "s2", - "init_conc": 100.0, - "data_type": "conc", + "initial": 100.0, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", diff --git a/tests/unit/test_equations.py b/tests/unit/test_equations.py index 3556555..c135621 100644 --- a/tests/unit/test_equations.py +++ b/tests/unit/test_equations.py @@ -1,9 +1,9 @@ import pytest -from pyenzyme.equations._math import build_equation, build_equations from pyenzyme.equations._chem import build_reaction, build_reactions -from pyenzyme.units import M, second +from pyenzyme.equations._math import build_equation, build_equations from pyenzyme.model import EquationType +from pyenzyme.units import M, second class TestMathEquations: @@ -12,7 +12,7 @@ def test_parse_equation(self): equation = "s1'(t) = kcat * p0(t) * s0(t)" # Act - equation = build_equation(equation, unit=M / second) + equation = build_equation(equation) # Assert expected_vars = ["p0", "s0"] @@ -37,21 +37,13 @@ def test_parse_equation(self): assert param.name in expected_params assert param.symbol in expected_params - def test_invalid_equation_no_left(self): - # Arrange - equation = "kcat * p0(t) * s0(t)" - - # Act - with pytest.raises(ValueError): - equation = build_equation(equation, unit=M / second) - def test_invalid_equation_no_right(self): # Arrange equation = "s1'(t) =" # Act with pytest.raises(ValueError): - equation = build_equation(equation, unit=M / second) + equation = build_equation(equation) def test_invalid_equation_no_equals(self): # Arrange @@ -59,14 +51,14 @@ def test_invalid_equation_no_equals(self): # Act with pytest.raises(ValueError): - equation = build_equation(equation, unit=M / second) + equation = build_equation(equation) def test_equation_with_funs(self): # Arrange equation = "s1'(t) = kcat * exp(p0(t) * t)" # Act - equation = build_equation(equation, unit=M / second) + equation = build_equation(equation) # Assert assert ( @@ -81,7 +73,7 @@ def test_equation_with_fun_only_t(self): equation = "s1'(t) = kcat * exp(t)" # Act - equation = build_equation(equation, unit=M / second) + equation = build_equation(equation) # Assert assert ( @@ -100,7 +92,7 @@ def test_multiple_equations(self): # Act units = [M / second, M] - equations = build_equations(*equations, units=units) + equations = build_equations(*equations) # Assert assert len(equations) == 2, f"Expected 2 equations. Got {len(equations)}" @@ -110,7 +102,7 @@ def test_init_assigment_equation(self): equation = "E_tot = p0 + p1" # Act - equation = build_equation(equation, unit=M) + equation = build_equation(equation) # Assert assert ( @@ -128,7 +120,7 @@ def test_assigment_equation(self): equation = "E_tot(t) = p0 + p1" # Act - equation = build_equation(equation, unit=M) + equation = build_equation(equation) # Assert assert ( diff --git a/tests/unit/test_tabular.py b/tests/unit/test_tabular.py index 821faa3..6a3bced 100644 --- a/tests/unit/test_tabular.py +++ b/tests/unit/test_tabular.py @@ -1,9 +1,9 @@ -import pytest import pandas as pd -import pyenzyme as pe +import pytest -from pyenzyme.units import mM, s +import pyenzyme as pe from pyenzyme.tabular import _measurement_to_pandas, to_pandas +from pyenzyme.units import mM, s class TestTabularExport: @@ -31,7 +31,7 @@ def test_multiple_measurements(self, measurement_valid): # Assert total_time_len = sum( - [len(m.species[0].time) for m in measurement_valid.measurements] + [len(m.species_data[0].time) for m in measurement_valid.measurements] ) assert ( @@ -46,10 +46,10 @@ def test_multiple_measurements(self, measurement_valid): for measurement in measurement_valid.measurements: df_sub = df[df["id"] == measurement.id] assert df_sub.shape[0] == len( - measurement.species[0].time - ), f"Expected {len(measurement.species[0].time)} rows. Got {df_sub.shape[0]}" + measurement.species_data[0].time + ), f"Expected {len(measurement.species_data[0].time)} rows. Got {df_sub.shape[0]}" - for species in measurement.species: + for species in measurement.species_data: assert ( species.species_id in df.columns ), f"Expected column for {species}" @@ -59,31 +59,38 @@ class TestTabularImport: def test_csv_import(self): """Test that a CSV file can be imported to a pandas DataFrame""" # Act - meas = pe.read_csv("tests/fixtures/tabular/data.csv", data_unit=mM, time_unit=s) + meas = pe.read_csv( + "tests/fixtures/tabular/data.csv", + data_unit=mM, + time_unit=s, + sep=";", + ) # Assert assert len(meas) == 2, f"Expected 2 measurements. Got {len(meas)}" for m in meas: - assert len(m.species) == 2, f"Expected 2 species. Got {len(m.species)}" assert ( - len(m.species[0].time) == 11 - ), f"Expected 10 time points. Got {len(m.species[0].time)}" + len(m.species_data) == 2 + ), f"Expected 2 species. Got {len(m.species_data)}" assert ( - len(m.species[1].time) == 11 - ), f"Expected 10 time points. Got {len(m.species[1].time)}" + len(m.species_data[0].time) == 11 + ), f"Expected 10 time points. Got {len(m.species_data[0].time)}" assert ( - m.species[0].data_unit == mM - ), f"Expected mM. Got {m.species[0].data_unit}" + len(m.species_data[1].time) == 11 + ), f"Expected 10 time points. Got {len(m.species_data[1].time)}" assert ( - m.species[0].time_unit == s - ), f"Expected s. Got {m.species[0].time_unit}" + m.species_data[0].data_unit == mM + ), f"Expected mM. Got {m.species_data[0].data_unit}" assert ( - m.species[1].data_unit == mM - ), f"Expected mM. Got {m.species[1].data_unit}" + m.species_data[0].time_unit == s + ), f"Expected s. Got {m.species_data[0].time_unit}" assert ( - m.species[1].time_unit == s - ), f"Expected s. Got {m.species[1].time_unit}" + m.species_data[1].data_unit == mM + ), f"Expected mM. Got {m.species_data[1].data_unit}" + assert ( + m.species_data[1].time_unit == s + ), f"Expected s. Got {m.species_data[1].time_unit}" def test_excel_import(self): """Test that a Excel file can be imported to a pandas DataFrame""" @@ -96,24 +103,26 @@ def test_excel_import(self): assert len(meas) == 2, f"Expected 2 measurements. Got {len(meas)}" for m in meas: - assert len(m.species) == 2, f"Expected 2 species. Got {len(m.species)}" assert ( - len(m.species[0].time) == 11 + len(m.species_data) == 2 + ), f"Expected 2 species. Got {len(m.species_data)}" + assert ( + len(m.species_data[0].time) == 11 ), f"Expected 10 time points. Got {len(m.species[0].time)}" assert ( - len(m.species[1].time) == 11 + len(m.species_data[1].time) == 11 ), f"Expected 10 time points. Got {len(m.species[1].time)}" assert ( - m.species[0].data_unit == mM + m.species_data[0].data_unit == mM ), f"Expected mM. Got {m.species[0].data_unit}" assert ( - m.species[0].time_unit == s + m.species_data[0].time_unit == s ), f"Expected s. Got {m.species[0].time_unit}" assert ( - m.species[1].data_unit == mM + m.species_data[1].data_unit == mM ), f"Expected mM. Got {m.species[1].data_unit}" assert ( - m.species[1].time_unit == s + m.species_data[1].time_unit == s ), f"Expected s. Got {m.species[1].time_unit}" def test_invalid_types(self): From 734f84959d5bcebfc907e9c8b98cdf8ac6fc072a Mon Sep 17 00:00:00 2001 From: Jan Range Date: Fri, 16 Aug 2024 16:09:26 +0200 Subject: [PATCH 37/80] remove unused imports --- pyenzyme/model.py | 1 - pyenzyme/tabular.py | 1 - 2 files changed, 2 deletions(-) diff --git a/pyenzyme/model.py b/pyenzyme/model.py index a8280e6..8a8d847 100644 --- a/pyenzyme/model.py +++ b/pyenzyme/model.py @@ -5,7 +5,6 @@ from typing import Optional, Generic, TypeVar from enum import Enum from uuid import uuid4 -from datetime import date, datetime # Filter Wrapper definition used to filter a list of objects # based on their attributes diff --git a/pyenzyme/tabular.py b/pyenzyme/tabular.py index 16e77df..a712ca9 100644 --- a/pyenzyme/tabular.py +++ b/pyenzyme/tabular.py @@ -3,7 +3,6 @@ import pathlib as pl import pandas as pd -from loguru import logger # type: ignore from .model import ( DataTypes, From df6c1afc58a8e148bed464db769fde205e5f2c8c Mon Sep 17 00:00:00 2001 From: Jan Range Date: Fri, 16 Aug 2024 16:21:53 +0200 Subject: [PATCH 38/80] remove unused `units` --- tests/unit/test_equations.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/unit/test_equations.py b/tests/unit/test_equations.py index c135621..4a1496c 100644 --- a/tests/unit/test_equations.py +++ b/tests/unit/test_equations.py @@ -3,7 +3,6 @@ from pyenzyme.equations._chem import build_reaction, build_reactions from pyenzyme.equations._math import build_equation, build_equations from pyenzyme.model import EquationType -from pyenzyme.units import M, second class TestMathEquations: @@ -91,7 +90,6 @@ def test_multiple_equations(self): ] # Act - units = [M / second, M] equations = build_equations(*equations) # Assert From 835e2c39dbe939bd45e59f8be11c55f4b9e695ee Mon Sep 17 00:00:00 2001 From: Jan Range Date: Mon, 19 Aug 2024 21:25:20 +0200 Subject: [PATCH 39/80] update dev example --- dev-examples/odes/enzymeml.json | 537 +++++++++--------- dev-examples/odes/ode_example.omex | Bin 2426 -> 0 bytes dev-examples/odes/odes_example.omex | Bin 0 -> 2425 bytes .../odes/{sbml.xml => odes_example.xml} | 20 +- dev-examples/reactions/enzymeml.json | 460 +++++++-------- dev-examples/reactions/reactions_example.omex | Bin 2208 -> 2213 bytes .../{sbml.xml => reactions_example.xml} | 52 +- dev-examples/sbml_export_odes.py | 12 +- dev-examples/sbml_export_reactions.py | 12 +- dev-examples/sbml_import_odes.py | 9 +- dev-examples/sbml_import_reactions.py | 9 +- 11 files changed, 566 insertions(+), 545 deletions(-) delete mode 100644 dev-examples/odes/ode_example.omex create mode 100644 dev-examples/odes/odes_example.omex rename dev-examples/odes/{sbml.xml => odes_example.xml} (96%) rename dev-examples/reactions/{sbml.xml => reactions_example.xml} (87%) diff --git a/dev-examples/odes/enzymeml.json b/dev-examples/odes/enzymeml.json index e0237a0..aa587a1 100644 --- a/dev-examples/odes/enzymeml.json +++ b/dev-examples/odes/enzymeml.json @@ -1,8 +1,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "name": "schema:title", "references": { "@id": "schema:citation", @@ -12,7 +12,7 @@ "modified": "schema:dateModified", "creators": "schema:creator" }, - "@id": "enzml:EnzymeMLDocument/39303f02-65a0-490b-8e1d-02162fb04199", + "@id": "enzml:EnzymeMLDocument/0e46ba63-85a2-4030-ae03-9cffa8f347cd", "@type": [ "enzml:EnzymeMLDocument" ], @@ -23,8 +23,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -32,7 +32,7 @@ "name": "schema:name", "volume": "OBO:OBI_0002139" }, - "@id": "enzml:Vessel/371d000b-8c93-4abc-822b-cdc223778079", + "@id": "enzml:Vessel/fedbf6f5-4515-4868-830f-1b41033de3b8", "@type": [ "enzml:Vessel", "OBO:OBI_0400081" @@ -43,8 +43,8 @@ "unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000098", "@type": [ @@ -56,10 +56,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/448808be-98aa-4393-9141-0e13050fe90a", + "@id": "enzml:BaseUnit/9f6745b1-66d0-4180-b1ac-c10cc8e87c96", "@type": [ "enzml:BaseUnit" ], @@ -76,8 +76,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@type": "@id" }, @@ -96,7 +96,7 @@ "@type": "@id" } }, - "@id": "enzml:Protein/5715b8c8-ac93-4e13-a101-3497c37dc260", + "@id": "enzml:Protein/d8bc713a-bcf5-4c24-981b-16a7baa1cc0b", "@type": [ "enzml:Protein", "schema:Protein" @@ -116,8 +116,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -127,7 +127,7 @@ "@type": "@id" } }, - "@id": "enzml:Complex/a3f08a33-46d9-4ede-87b3-72b652279876", + "@id": "enzml:Complex/ef2c11f9-4278-487e-94cc-fc94fb622a47", "@type": [ "enzml:Complex" ], @@ -144,8 +144,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -160,7 +160,7 @@ "@type": "@id" } }, - "@id": "enzml:SmallMolecule/b2d02c26-70fa-4401-b32f-76ff44b6e59a", + "@id": "enzml:SmallMolecule/58414ec1-a6f1-42dc-94e5-1380c63b20a2", "@type": [ "enzml:SmallMolecule" ], @@ -175,8 +175,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -191,7 +191,7 @@ "@type": "@id" } }, - "@id": "enzml:SmallMolecule/32b0f5f4-219d-4918-84c9-de6912f3acb6", + "@id": "enzml:SmallMolecule/9c87ae6f-44b4-44db-bd5a-e4f7b99ddd19", "@type": [ "enzml:SmallMolecule" ], @@ -209,8 +209,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -219,7 +219,7 @@ "@type": "@id" } }, - "@id": "enzml:Measurement/fbaacff6-d90f-48e6-b16c-98c77c00d5f9", + "@id": "enzml:Measurement/0426ea51-df1f-43d8-9e12-a21f95fc9c2f", "@type": [ "enzml:Measurement" ], @@ -229,13 +229,13 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/bab6a019-2090-4f60-b20c-0a39d5dd2401", + "@id": "enzml:MeasurementData/f8664861-2026-4a5b-97a0-35bae4e99892", "@type": [ "enzml:MeasurementData" ], @@ -244,8 +244,8 @@ "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000063", "@type": [ @@ -257,10 +257,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/477cca4f-ec95-45a1-8c05-4578beb60b30", + "@id": "enzml:BaseUnit/1e8d1272-168b-497c-a82f-9adaf7042d23", "@type": [ "enzml:BaseUnit" ], @@ -271,10 +271,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/a045cb18-b5a9-44b1-88e2-1bb1374601d5", + "@id": "enzml:BaseUnit/7ded7917-83b4-4507-a055-ab1d19b5341b", "@type": [ "enzml:BaseUnit" ], @@ -287,8 +287,8 @@ "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000010", "@type": [ @@ -300,10 +300,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/c6ff977b-6f75-46fd-ac15-3a8c3ab4e8bd", + "@id": "enzml:BaseUnit/a2d6d606-d789-40e4-8246-0a2af736575f", "@type": [ "enzml:BaseUnit" ], @@ -345,13 +345,13 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/7da88045-0b0d-44a5-afe5-ef9a6002df93", + "@id": "enzml:MeasurementData/ba922ab1-567e-4cdd-a015-cb00baf1dc9a", "@type": [ "enzml:MeasurementData" ], @@ -360,8 +360,8 @@ "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000063", "@type": [ @@ -373,10 +373,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/477cca4f-ec95-45a1-8c05-4578beb60b30", + "@id": "enzml:BaseUnit/1e8d1272-168b-497c-a82f-9adaf7042d23", "@type": [ "enzml:BaseUnit" ], @@ -387,10 +387,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/a045cb18-b5a9-44b1-88e2-1bb1374601d5", + "@id": "enzml:BaseUnit/7ded7917-83b4-4507-a055-ab1d19b5341b", "@type": [ "enzml:BaseUnit" ], @@ -403,8 +403,8 @@ "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000010", "@type": [ @@ -416,10 +416,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/c6ff977b-6f75-46fd-ac15-3a8c3ab4e8bd", + "@id": "enzml:BaseUnit/a2d6d606-d789-40e4-8246-0a2af736575f", "@type": [ "enzml:BaseUnit" ], @@ -464,8 +464,8 @@ "temperature_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000012", "@type": [ @@ -477,10 +477,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/109807ff-d2fa-4eeb-a0ee-3de4930871f5", + "@id": "enzml:BaseUnit/1a31c8a4-6212-4810-804f-59c5cffd10c5", "@type": [ "enzml:BaseUnit" ], @@ -494,8 +494,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -504,7 +504,7 @@ "@type": "@id" } }, - "@id": "enzml:Measurement/a1773c19-270a-40e2-848c-d74cd98fa03c", + "@id": "enzml:Measurement/d81322ba-5094-446e-b224-4795ff25615a", "@type": [ "enzml:Measurement" ], @@ -514,13 +514,13 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/a5a649d1-6bdb-4a1e-a9fb-d49ec9c3efac", + "@id": "enzml:MeasurementData/2c021e30-5731-4893-baf4-f337b46a51ca", "@type": [ "enzml:MeasurementData" ], @@ -529,8 +529,8 @@ "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000063", "@type": [ @@ -542,10 +542,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/477cca4f-ec95-45a1-8c05-4578beb60b30", + "@id": "enzml:BaseUnit/1e8d1272-168b-497c-a82f-9adaf7042d23", "@type": [ "enzml:BaseUnit" ], @@ -556,10 +556,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/a045cb18-b5a9-44b1-88e2-1bb1374601d5", + "@id": "enzml:BaseUnit/7ded7917-83b4-4507-a055-ab1d19b5341b", "@type": [ "enzml:BaseUnit" ], @@ -572,8 +572,8 @@ "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000010", "@type": [ @@ -585,10 +585,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/c6ff977b-6f75-46fd-ac15-3a8c3ab4e8bd", + "@id": "enzml:BaseUnit/a2d6d606-d789-40e4-8246-0a2af736575f", "@type": [ "enzml:BaseUnit" ], @@ -630,13 +630,13 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/bb46ba43-287b-49d8-bc16-51cd806cc7ed", + "@id": "enzml:MeasurementData/458293b5-22ca-41c2-9b25-0f98c05ce480", "@type": [ "enzml:MeasurementData" ], @@ -645,8 +645,8 @@ "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000063", "@type": [ @@ -658,10 +658,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/477cca4f-ec95-45a1-8c05-4578beb60b30", + "@id": "enzml:BaseUnit/1e8d1272-168b-497c-a82f-9adaf7042d23", "@type": [ "enzml:BaseUnit" ], @@ -672,10 +672,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/a045cb18-b5a9-44b1-88e2-1bb1374601d5", + "@id": "enzml:BaseUnit/7ded7917-83b4-4507-a055-ab1d19b5341b", "@type": [ "enzml:BaseUnit" ], @@ -688,8 +688,8 @@ "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000010", "@type": [ @@ -701,10 +701,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/c6ff977b-6f75-46fd-ac15-3a8c3ab4e8bd", + "@id": "enzml:BaseUnit/a2d6d606-d789-40e4-8246-0a2af736575f", "@type": [ "enzml:BaseUnit" ], @@ -749,8 +749,8 @@ "temperature_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000012", "@type": [ @@ -762,10 +762,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/109807ff-d2fa-4eeb-a0ee-3de4930871f5", + "@id": "enzml:BaseUnit/1a31c8a4-6212-4810-804f-59c5cffd10c5", "@type": [ "enzml:BaseUnit" ], @@ -781,13 +781,13 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "species_id": { "@type": "@id" } }, - "@id": "enzml:Equation/1f92428c-cb1a-4d9f-a8cb-3414e7e87049", + "@id": "enzml:Equation/07b5e8fb-729c-4e1d-892e-46be9e9e6d56", "@type": [ "enzml:Equation" ], @@ -798,11 +798,11 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": "schema:identifier" }, - "@id": "enzml:Variable/6a1e9596-a851-467f-aac8-b12595a94856", + "@id": "enzml:Variable/edde9e7a-ce67-4af4-8788-0f96716d0e85", "@type": [ "enzml:Variable" ], @@ -810,209 +810,208 @@ "name": "s0", "symbol": "s0" } + ] + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:Equation/77814fb8-a848-4759-8354-32a9f7a19a49", + "@type": [ + "enzml:Equation" ], - "parameters": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/", - "id": { - "@id": "schema:identifier", - "@type": "@id" - } - }, - "@id": "enzml:Parameter/49b1a46d-7cc6-436c-b57f-d17a44d980b9", - "@type": [ - "enzml:Parameter" - ], - "id": "K_m", - "name": "K_m", - "symbol": "K_m", - "unit": { + "equation": "100", + "equation_type": "initialAssignment", + "species_id": "E_tot", + "variables": [] + } + ], + "parameters": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + } + }, + "@id": "enzml:Parameter/8bd75c32-151d-4a05-9e36-be114db34334", + "@type": [ + "enzml:Parameter" + ], + "id": "E_tot", + "name": "E_tot", + "symbol": "E_tot", + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u2", + "name": "mmol / l", + "base_units": [ + { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "OBO:UO_0000063", + "@id": "enzml:BaseUnit/1e8d1272-168b-497c-a82f-9adaf7042d23", "@type": [ - "OBO:UO_0000000" + "enzml:BaseUnit" ], - "id": "u2", - "name": "mmol / l", - "base_units": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" - }, - "@id": "enzml:BaseUnit/477cca4f-ec95-45a1-8c05-4578beb60b30", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "mole", - "exponent": 1, - "scale": -3.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" - }, - "@id": "enzml:BaseUnit/a045cb18-b5a9-44b1-88e2-1bb1374601d5", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "litre", - "exponent": -1, - "scale": 1.0 - } - ] - }, - "upper": 100.0, - "lower": 0.0, - "stderr": 0.1, - "constant": true - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/", - "id": { - "@id": "schema:identifier", - "@type": "@id" - } + "kind": "mole", + "exponent": 1, + "scale": -3.0 }, - "@id": "enzml:Parameter/71b45227-a2a7-4e0c-a273-9ef99dbcab1a", - "@type": [ - "enzml:Parameter" - ], - "id": "E_tot", - "name": "E_tot", - "symbol": "E_tot", - "unit": { + { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "OBO:UO_0000063", + "@id": "enzml:BaseUnit/7ded7917-83b4-4507-a055-ab1d19b5341b", "@type": [ - "OBO:UO_0000000" + "enzml:BaseUnit" ], - "id": "u2", - "name": "mmol / l", - "base_units": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" - }, - "@id": "enzml:BaseUnit/477cca4f-ec95-45a1-8c05-4578beb60b30", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "mole", - "exponent": 1, - "scale": -3.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" - }, - "@id": "enzml:BaseUnit/a045cb18-b5a9-44b1-88e2-1bb1374601d5", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "litre", - "exponent": -1, - "scale": 1.0 - } - ] - }, - "upper": 100.0, - "lower": 0.0, - "stderr": 0.1, - "constant": true + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "upper": 100.0, + "lower": 0.0, + "stderr": 0.1, + "constant": true + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + } + }, + "@id": "enzml:Parameter/e63b8e5b-56a5-4b8e-98be-18e829b179f1", + "@type": [ + "enzml:Parameter" + ], + "id": "K_m", + "name": "K_m", + "symbol": "K_m", + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/", - "id": { - "@id": "schema:identifier", - "@type": "@id" - } - }, - "@id": "enzml:Parameter/f4bdcef7-8883-4cf2-b1b5-6ccacd9b1e37", - "@type": [ - "enzml:Parameter" - ], - "id": "kcat", - "name": "kcat", - "symbol": "kcat", - "unit": { + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u2", + "name": "mmol / l", + "base_units": [ + { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "OBO:UO_0000010", + "@id": "enzml:BaseUnit/1e8d1272-168b-497c-a82f-9adaf7042d23", "@type": [ - "OBO:UO_0000000" + "enzml:BaseUnit" ], - "id": "u4", - "name": "1 / s", - "base_units": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" - }, - "@id": "enzml:BaseUnit/c6ff977b-6f75-46fd-ac15-3a8c3ab4e8bd", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "second", - "exponent": -1, - "scale": 1.0 - } - ] + "kind": "mole", + "exponent": 1, + "scale": -3.0 }, - "upper": 100.0, - "lower": 0.0, - "stderr": 0.1, - "constant": true - } - ] + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/7ded7917-83b4-4507-a055-ab1d19b5341b", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "upper": 100.0, + "lower": 0.0, + "stderr": 0.1, + "constant": true }, { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", - "species_id": { + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", "@type": "@id" } }, - "@id": "enzml:Equation/e0c67659-dcfc-401b-a48d-0599f685aa91", + "@id": "enzml:Parameter/158b36f9-74bd-4148-b3f8-5a2a77ea5571", "@type": [ - "enzml:Equation" + "enzml:Parameter" ], - "equation": "100", - "equation_type": "initialAssignment", - "species_id": "E_tot", - "variables": [], - "parameters": [] + "id": "kcat", + "name": "kcat", + "symbol": "kcat", + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u4", + "name": "1 / s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/a2d6d606-d789-40e4-8246-0a2af736575f", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "upper": 100.0, + "lower": 0.0, + "stderr": 0.1, + "constant": true } ] } \ No newline at end of file diff --git a/dev-examples/odes/ode_example.omex b/dev-examples/odes/ode_example.omex deleted file mode 100644 index 4c9da3c7147983275b7a4449a3fd693dbbb3088d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2426 zcmZ{mc{J308^(VkB{X(f@+dUQzJ;t|im{B*$XFX?tTV*erh3qfY}t~+Bq~X=kA3XB zNt*1kjV<)dXi$$HTVB2Id6%bi-tYa#b?!f|bMEiwpX;)>ggRDi^J=9sTiL9T6Q6p;1s^)yYS}8 zl7O2540KzNiccRh!$ewrF>C*+NOPAkGT(v1(_L%6zt_DvOB=emfNT0koE4%mS z<$2H6P^P9o*g}xzVVr@k-ub=AwQX$`J8OwcQx(4_aK_6r*jHR%9%ah7=2LOcfZFN-w3wo zkPeDhxhF3zgTI6%)oz3e#lREn46D3ntz~xuMN?bpVeo`wkj%FoCAY*xeS#zu7%};>aTWx-Qfn=#iK{S1pWW5h&uYP-N4!u)kIGCGbiAS*g*Qmc zaw^(Cz7;9N8l) z!o>;}CBcpc-_BZsb8e2Rt$UBxbgTMRFXy}$srvRr-z`}bkDI@>lba0d^KN4~J!f2^ z$wYfj*1Rw|Y|?re2o-&`A`;C^np&r%hFYDl@y=F|{qjH%?W3giUO*}&ySKoGkk;U$ z-(s%}rX$w9oKI%uBixxTE+)uyxlD`_+?BInaG;X6Wl+`{R;upSp@j`UR$xx|>3upk zgfI&WlDK>-%&;d_Q7zG|`0y4|9uxy!C7Pd*NwmVgL8#j7HYt9r+f+|Y1O%*Zv--j<==z0Z>=9Dn8-hvfrX zBWv{y6vFyASfWX8U-3{Mp6A*_K8v04t5AWh!zo=_ zAKe_7_ioOIiWJf?&6i=`m8`3t3)v-K>NYJLy0CfH%y1<2CC;C?oAH3}p@2r;YEeohbO?LQ0>c1qfD!bsWf7dF+B0h=$RxuvtVbp_{z= z1tbFkhki;snI<55I?M!Gp$50QA$z_ViJh1U4O1DX@3`8!p)3FRc|>M#dP zJH9<}H!tprju3I9kz`9oSYmft7aQeD}>1Z=URv!-1ztR(Rq0-mmao&`%7N0Ap0vv$q{Um ze-I%#k#%A=wM(Q;Xbk~#AsA7{5(9i|xOto_qtGacIuDfJhavvZ^GwhD&({h!T?(%X zzbLs?S$xsxS#*Pj9F_1ma3uZ8+H~zR!zJO2ku2Wbz4%#wXoqh|g1eshysnh0niOFA z8*28OHK>jh&(l$@G*a=&HT~L%V3?Esh|R>|*1eS&*;u#;Wnov-%f5$H=qTwR6W%sK znp$z{i5@mMgL9IGU>{*iO1125(L`$uQhdDaFKVqOl+j*Lhu787*6QI4;Wp;WYRrMF zwWx=n1Zg#{M`Ub>4%z!$I{V3R-mmi%llpZg{EJxf{dliKedO@Z$p%Ly`#%%ex{o&K z4+~D;foyS`;U7&0YhvUji8k4HE{8e9b$xU+l9Hlt!rvq8%o?xfZO_4(Of zPi?h){l2O)cM};g3+YIA37k!o^LJkFeijl1ma0H5runaSl{(wkufQB-QX~^h9IMQ6 z>9&h;qC~4n!fdtQ8$1TQR{S#L{gqC8bmXhjy|l7X^g`cI&tE)U74&|(>xBa4&*X?M z^O^#lou&wk@qM?!uR(uNpAWLk-NAI5~Z%Rd^`r1 zCtrU?Vu`Mk^8Lq=zo+A&ZAg{>K`Oej{j3fE;Nc$Zt{jXDbxpo_JW85}gSK{J z2m;wkk&wAm|9mg+{*?bMGru~2P5XcO0N~|a?t>rxC;NZ3{fgngwzCIR{td;}^6){C008!b MDLBxkpTvNF0GZ-hegFUf diff --git a/dev-examples/odes/odes_example.omex b/dev-examples/odes/odes_example.omex new file mode 100644 index 0000000000000000000000000000000000000000..3b46bafbba626a6f9480f942ae68acaa0067f882 GIT binary patch literal 2425 zcmZ{mS5VXI7RCP*X;PGcgcchubTDENq!}wsJGUHX?zbP-?1we8zu(JRI5Z!>6aWB10H++}{E-jO zeZRBecmY6kNB!Lce7!u0!P-~-{fbkqu}^hHV^@Djr>t5}$Ku$zqhc7g#1&8|;>9WH zR{L+OJyF8<0pXB_KTVR)^(==ZnQP%k=iheHI(RI5yygdMVxC5hjCVFp)f>Ly#`h#Y zqg+%96dX7-*seEeBWcQg@rtgH)EBsx0K;Bb9Hro4*+&W!R)sztLp2zvmN`pv*tUXl zZ!^${O$kLjVxPKVA~?e=GhcHqD6Z1J(k4=h8)IZ7G7^6c?yX}2{Ze&2F52bl=EV=? z*>jSAoWM$ifqJf`4I=z*Ip{^7dx8@%1({05eWj+6KCx}QK1ogG6(QTjIo_S!nPAX1&1cjsGH9yi0JEzMezn)#s zQxc2mR_>6ZL?zD3y8BMPVB3JLps3APl$*y=)>voFcyCNuLe-_ls@{ntIhENCWmOy< zxzIy3N!OX%ur)~6NU<*DG1o*R&7R;XD@gHXX_1C!_9(s}**C#T-qm{TP~cP{`u3B@ zV^a!y&!LI4-mbGzY$xYqn#$&9B-4WY%h$8~HwvI==fdd8JY&3pTFw2w^U+Xu)|2Ru z8%VET2PXrkvrYWpg$JQ%v<{|3p22rMP;w3BdfnNfjWce7if> zeAOvN^d##2n1Ki+8EkcEn74gdQ=>@ip+U#DCzV6hf+;%CH$;9$6+>ywP@Le-==5Zs zhm6x+z769Ii|ybYN}tt8jBgKUXj%f3+AV%g5D{m?PM6+L-O7n&>>^Pu6glnhAFg7P zSB-?e^cAAV&X*0@NIg?KZK>XJKUOA*-qgFOz&YZcn4WKOjC*+C=3UVY=>(N?{OA;% zskJ`Gttv|aV?a^fek@4-0`5@ZaYO5{Nt3rn$n?z`(hKZd2N#r@$kWzZZEoynB!n}z|3#6+=`=|>^~#UaJa6}2 zsh$Q6i@FhB@l+=Zh+FLO7^3H+Zs#5YE#xoY{RH@ERY?Qhs^@lF!3ZO7Bt&lg`0xNS z7aO2k=6A#R0qT-*B1+M9xcjOa$%SQdyIW9Er_xCN5WJT+PRV2R<+gm>A<{@znXA4C zboWJo9A?m)Q^-CNDtdH6*Rfao`bfOnEFBBZU{q2w;ANd zgb|&x3eu2=5;teRz9wuu5R?1JD?Q^2wipnIHK_i+WpsdPpeq1r6dPE$B&RRH=1=lu zPwcmXV3tHu6;mZ;4ux8vYV>T*cqkckIQerg*Li1;`DKsMzD$P8wjLIWGgcL<5VobZ zo(J`Vyk_@X<~%6`r!nH*D~`llTWo9R-@Q8TnZhGO*r0w}QAN{yqr$h1Il}$nlngSD zSoA@&2#FvvJp+`O0emLk`O!ixL$>C-H7tkrm69o~v(lGDCWTvl;;R;nf{ty$jdCE7 zo5n_laMMjVPx^LVULNF32S$Qv8MAj|jbvnF7SVr;N@Z9*V5s)dNJxP@$ zKjegme#z~UQra8ZP{Sk1a=+??y=Xq8$gLFuj?up-U5CXI#+GTGKh9h_3m({g%k8)EX)w5b!zoXd4wC>IQ8UH-g_&~OoW`AsE~eN zXGJ;#p;J|x9iU>T0{6DOc7+LU7h&sE_%xxx0e1@V^>Z9W;P8Y^&*1hzw)o{!>m!YR#t^ddr7&7y<7HrH;r`*0iuw@>Shg0ht1 zOxJ-J!k)I+M_H_pnY@Sf{nzd^moE*xZ8*mnYVixd#s&A{6n;$nIZ;gfoT|O(m^e$D zX+<`MPu^Q_dJ%yxz&eK9ZEovGFVo J+V+bW@E0S1R{Q_} literal 0 HcmV?d00001 diff --git a/dev-examples/odes/sbml.xml b/dev-examples/odes/odes_example.xml similarity index 96% rename from dev-examples/odes/sbml.xml rename to dev-examples/odes/odes_example.xml index c6e4e0f..73381af 100644 --- a/dev-examples/odes/sbml.xml +++ b/dev-examples/odes/odes_example.xml @@ -88,7 +88,7 @@ - + Vessel 1 10.0 @@ -102,7 +102,7 @@ - + Enzyme MTEY E.coli @@ -121,7 +121,7 @@ - + Enzyme-Substrate Complex @@ -135,7 +135,7 @@ - + Substrate @@ -149,7 +149,7 @@ - + Product @@ -162,10 +162,10 @@ - + - + @@ -176,10 +176,10 @@ - + - + @@ -193,7 +193,7 @@ - + diff --git a/dev-examples/reactions/enzymeml.json b/dev-examples/reactions/enzymeml.json index 841b2fd..fa61615 100644 --- a/dev-examples/reactions/enzymeml.json +++ b/dev-examples/reactions/enzymeml.json @@ -1,8 +1,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "name": "schema:title", "references": { "@id": "schema:citation", @@ -12,7 +12,7 @@ "modified": "schema:dateModified", "creators": "schema:creator" }, - "@id": "enzml:EnzymeMLDocument/4cc6b230-1ca7-4b01-acfe-34ca8a8c8b03", + "@id": "enzml:EnzymeMLDocument/ade60195-1a49-4643-9a7f-a3f4569e080f", "@type": [ "enzml:EnzymeMLDocument" ], @@ -23,8 +23,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -32,7 +32,7 @@ "name": "schema:name", "volume": "OBO:OBI_0002139" }, - "@id": "enzml:Vessel/040a3842-d40e-44e8-a32d-19d830c8572c", + "@id": "enzml:Vessel/dca62013-0979-400d-9390-6d3fc9992b3b", "@type": [ "enzml:Vessel", "OBO:OBI_0400081" @@ -43,8 +43,8 @@ "unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000098", "@type": [ @@ -56,10 +56,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/dfeb036d-92c6-4067-8eb9-36370cff8244", + "@id": "enzml:BaseUnit/48e1f6d3-a632-49ab-9373-ced5416b3ee8", "@type": [ "enzml:BaseUnit" ], @@ -76,8 +76,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@type": "@id" }, @@ -96,7 +96,7 @@ "@type": "@id" } }, - "@id": "enzml:Protein/d24ac8cf-2118-4bc4-b32f-8dbe37a00aa4", + "@id": "enzml:Protein/da73d1bd-7ba7-4a21-916a-83804274eb57", "@type": [ "enzml:Protein", "schema:Protein" @@ -114,8 +114,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -130,7 +130,7 @@ "@type": "@id" } }, - "@id": "enzml:SmallMolecule/4430bc12-a97a-4a8c-a753-59d62b8d5be1", + "@id": "enzml:SmallMolecule/2d890949-ba88-418d-8b83-9a689073638b", "@type": [ "enzml:SmallMolecule" ], @@ -143,8 +143,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -159,7 +159,7 @@ "@type": "@id" } }, - "@id": "enzml:SmallMolecule/54498f68-5ca7-4515-a8a0-20bff1da321d", + "@id": "enzml:SmallMolecule/5c1da8cc-8b2d-4cfd-bbab-9cc7ce0c716f", "@type": [ "enzml:SmallMolecule" ], @@ -174,8 +174,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -184,7 +184,7 @@ "@type": "@id" } }, - "@id": "enzml:Reaction/bdbaa018-4f0c-44a8-a67b-ae88e294dd20", + "@id": "enzml:Reaction/d4de1855-14c4-4704-9b13-139c0ecf38ae", "@type": [ "enzml:Reaction" ], @@ -194,13 +194,13 @@ "kinetic_law": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "species_id": { "@type": "@id" } }, - "@id": "enzml:Equation/add0038a-e325-454e-8ff6-a7ab5ece87fe", + "@id": "enzml:Equation/9689876c-204c-4840-9703-5521c06767aa", "@type": [ "enzml:Equation" ], @@ -210,150 +210,32 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", - "id": "schema:identifier" - }, - "@id": "enzml:Variable/c53d54fe-9297-4f3c-980b-25bea0734058", - "@type": [ - "enzml:Variable" - ], - "id": "p0", - "name": "p0", - "symbol": "p0" - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/", "id": "schema:identifier" }, - "@id": "enzml:Variable/e0be55cb-1f6e-4933-a400-d2ef9db25329", + "@id": "enzml:Variable/5f07e8be-4726-49cb-b6cd-6569dcdf12d0", "@type": [ "enzml:Variable" ], "id": "s0", "name": "s0", "symbol": "s0" - } - ], - "parameters": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/", - "id": { - "@id": "schema:identifier", - "@type": "@id" - } - }, - "@id": "enzml:Parameter/1e6d62f9-49b9-4aad-be74-490c6e9d6f7a", - "@type": [ - "enzml:Parameter" - ], - "id": "K_m", - "name": "K_m", - "symbol": "K_m", - "unit": { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" - }, - "@id": "OBO:UO_0000063", - "@type": [ - "OBO:UO_0000000" - ], - "id": "u1", - "name": "mmol / l", - "base_units": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" - }, - "@id": "enzml:BaseUnit/38393576-f6dd-4f90-8528-3a75ea49d1d4", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "mole", - "exponent": 1, - "scale": -3.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" - }, - "@id": "enzml:BaseUnit/31c7d1bf-d71b-4b66-8a47-93d3e7711d47", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "litre", - "exponent": -1, - "scale": 1.0 - } - ] - }, - "upper": 100.0, - "lower": 0.0, - "stderr": 0.1, - "constant": true }, { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", - "id": { - "@id": "schema:identifier", - "@type": "@id" - } + "schema": "https://schema.org/", + "id": "schema:identifier" }, - "@id": "enzml:Parameter/c39f3e34-c4da-4a47-b82a-43d9ba2be5bf", + "@id": "enzml:Variable/aedb0ffd-b477-4b67-9d35-aa9439acf7bd", "@type": [ - "enzml:Parameter" + "enzml:Variable" ], - "id": "kcat", - "name": "kcat", - "symbol": "kcat", - "unit": { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" - }, - "@id": "OBO:UO_0000010", - "@type": [ - "OBO:UO_0000000" - ], - "id": "u2", - "name": "1 / s", - "base_units": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" - }, - "@id": "enzml:BaseUnit/ffb7a3e9-4bb5-4d6c-858c-3ab6d953f9a4", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "second", - "exponent": -1, - "scale": 1.0 - } - ] - }, - "upper": 100.0, - "lower": 0.0, - "stderr": 0.1, - "constant": true + "id": "p0", + "name": "p0", + "symbol": "p0" } ] }, @@ -361,13 +243,13 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "species_id": { "@type": "@id" } }, - "@id": "enzml:ReactionElement/cb145bd9-0333-435e-ab2b-eb0f3f6bb9c0", + "@id": "enzml:ReactionElement/87493c81-5b1b-48de-b4fb-0767eb92d6dc", "@type": [ "enzml:ReactionElement" ], @@ -377,13 +259,13 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "species_id": { "@type": "@id" } }, - "@id": "enzml:ReactionElement/ac29c50c-2818-400a-ae93-49a09f381ecb", + "@id": "enzml:ReactionElement/e7136ffc-32f0-4f42-a9d8-12178e80a1c4", "@type": [ "enzml:ReactionElement" ], @@ -400,8 +282,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -410,7 +292,7 @@ "@type": "@id" } }, - "@id": "enzml:Measurement/391ac5d7-b284-4f58-845f-10b65ec65c29", + "@id": "enzml:Measurement/15937ee7-49ee-4db5-a52a-3f2eb816a24d", "@type": [ "enzml:Measurement" ], @@ -420,13 +302,13 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/644d3f4c-eab7-49c4-9e0a-e4c4267bfcdb", + "@id": "enzml:MeasurementData/716ac22f-a04a-477f-9a79-90d39024b2b7", "@type": [ "enzml:MeasurementData" ], @@ -435,8 +317,8 @@ "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000063", "@type": [ @@ -448,10 +330,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/38393576-f6dd-4f90-8528-3a75ea49d1d4", + "@id": "enzml:BaseUnit/59cd6067-66c0-4ab7-9b9b-c4d66bd6990e", "@type": [ "enzml:BaseUnit" ], @@ -462,10 +344,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/31c7d1bf-d71b-4b66-8a47-93d3e7711d47", + "@id": "enzml:BaseUnit/d21d0a9e-c232-493b-8cd6-fa919d767854", "@type": [ "enzml:BaseUnit" ], @@ -478,23 +360,23 @@ "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000010", "@type": [ "OBO:UO_0000000" ], - "id": "u3", + "id": "u2", "name": "s", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/ffb7a3e9-4bb5-4d6c-858c-3ab6d953f9a4", + "@id": "enzml:BaseUnit/e904e3f6-02be-4ba1-b206-4cdcb6baf65e", "@type": [ "enzml:BaseUnit" ], @@ -536,13 +418,13 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/3eda7daf-6707-448f-bee3-c1d194459b9b", + "@id": "enzml:MeasurementData/e670be98-5438-450f-8c23-4db3234d353d", "@type": [ "enzml:MeasurementData" ], @@ -551,8 +433,8 @@ "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000063", "@type": [ @@ -564,10 +446,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/38393576-f6dd-4f90-8528-3a75ea49d1d4", + "@id": "enzml:BaseUnit/59cd6067-66c0-4ab7-9b9b-c4d66bd6990e", "@type": [ "enzml:BaseUnit" ], @@ -578,10 +460,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/31c7d1bf-d71b-4b66-8a47-93d3e7711d47", + "@id": "enzml:BaseUnit/d21d0a9e-c232-493b-8cd6-fa919d767854", "@type": [ "enzml:BaseUnit" ], @@ -594,23 +476,23 @@ "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000010", "@type": [ "OBO:UO_0000000" ], - "id": "u3", + "id": "u2", "name": "s", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/ffb7a3e9-4bb5-4d6c-858c-3ab6d953f9a4", + "@id": "enzml:BaseUnit/e904e3f6-02be-4ba1-b206-4cdcb6baf65e", "@type": [ "enzml:BaseUnit" ], @@ -655,23 +537,23 @@ "temperature_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000012", "@type": [ "OBO:UO_0000000" ], - "id": "u4", + "id": "u3", "name": "K", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/839c0ac5-eec5-40ec-9c76-e25d735f065d", + "@id": "enzml:BaseUnit/ab4850f1-0470-4a6b-ba15-ab2edde18918", "@type": [ "enzml:BaseUnit" ], @@ -685,8 +567,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -695,7 +577,7 @@ "@type": "@id" } }, - "@id": "enzml:Measurement/5b279983-6b56-4c70-a807-282808973cc4", + "@id": "enzml:Measurement/3210b5eb-ff4f-4c0b-85a2-c6669a5fea0b", "@type": [ "enzml:Measurement" ], @@ -705,13 +587,13 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/45637267-987f-4b11-a89f-e26643eaff60", + "@id": "enzml:MeasurementData/bdc0afb1-cfed-4c2e-8a42-93ac613638a9", "@type": [ "enzml:MeasurementData" ], @@ -720,8 +602,8 @@ "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000063", "@type": [ @@ -733,10 +615,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/38393576-f6dd-4f90-8528-3a75ea49d1d4", + "@id": "enzml:BaseUnit/59cd6067-66c0-4ab7-9b9b-c4d66bd6990e", "@type": [ "enzml:BaseUnit" ], @@ -747,10 +629,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/31c7d1bf-d71b-4b66-8a47-93d3e7711d47", + "@id": "enzml:BaseUnit/d21d0a9e-c232-493b-8cd6-fa919d767854", "@type": [ "enzml:BaseUnit" ], @@ -763,23 +645,23 @@ "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000010", "@type": [ "OBO:UO_0000000" ], - "id": "u3", + "id": "u2", "name": "s", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/ffb7a3e9-4bb5-4d6c-858c-3ab6d953f9a4", + "@id": "enzml:BaseUnit/e904e3f6-02be-4ba1-b206-4cdcb6baf65e", "@type": [ "enzml:BaseUnit" ], @@ -821,13 +703,13 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/42f843c5-4042-4f22-a076-5626b86444c7", + "@id": "enzml:MeasurementData/8b5da426-824b-40e5-8574-8b390f02ec5a", "@type": [ "enzml:MeasurementData" ], @@ -836,8 +718,8 @@ "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000063", "@type": [ @@ -849,10 +731,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/38393576-f6dd-4f90-8528-3a75ea49d1d4", + "@id": "enzml:BaseUnit/59cd6067-66c0-4ab7-9b9b-c4d66bd6990e", "@type": [ "enzml:BaseUnit" ], @@ -863,10 +745,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/31c7d1bf-d71b-4b66-8a47-93d3e7711d47", + "@id": "enzml:BaseUnit/d21d0a9e-c232-493b-8cd6-fa919d767854", "@type": [ "enzml:BaseUnit" ], @@ -879,23 +761,23 @@ "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000010", "@type": [ "OBO:UO_0000000" ], - "id": "u3", + "id": "u2", "name": "s", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/ffb7a3e9-4bb5-4d6c-858c-3ab6d953f9a4", + "@id": "enzml:BaseUnit/e904e3f6-02be-4ba1-b206-4cdcb6baf65e", "@type": [ "enzml:BaseUnit" ], @@ -940,23 +822,23 @@ "temperature_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, "@id": "OBO:UO_0000012", "@type": [ "OBO:UO_0000000" ], - "id": "u4", + "id": "u3", "name": "K", "base_units": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", - "OBO": "http://purl.obolibrary.org/obo/" + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/839c0ac5-eec5-40ec-9c76-e25d735f065d", + "@id": "enzml:BaseUnit/ab4850f1-0470-4a6b-ba15-ab2edde18918", "@type": [ "enzml:BaseUnit" ], @@ -968,5 +850,123 @@ } } ], - "equations": [] + "equations": [], + "parameters": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + } + }, + "@id": "enzml:Parameter/48cdca34-78ee-4169-a143-18d602d59b33", + "@type": [ + "enzml:Parameter" + ], + "id": "kcat", + "name": "kcat", + "symbol": "kcat", + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u4", + "name": "1 / s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/e904e3f6-02be-4ba1-b206-4cdcb6baf65e", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "upper": 100.0, + "lower": 0.0, + "stderr": 0.1, + "constant": true + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + } + }, + "@id": "enzml:Parameter/ce20d881-741f-4f48-ad4e-e62daf7c9bf5", + "@type": [ + "enzml:Parameter" + ], + "id": "K_m", + "name": "K_m", + "symbol": "K_m", + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u1", + "name": "mmol / l", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/59cd6067-66c0-4ab7-9b9b-c4d66bd6990e", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/d21d0a9e-c232-493b-8cd6-fa919d767854", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "upper": 100.0, + "lower": 0.0, + "stderr": 0.1, + "constant": true + } + ] } \ No newline at end of file diff --git a/dev-examples/reactions/reactions_example.omex b/dev-examples/reactions/reactions_example.omex index 3ae590985893f7b06387ac93a0979f94814f6daf..a9ef6122f2561df78fd9976ebb3a1ac0366431c0 100644 GIT binary patch delta 1699 zcmV;U23+}|5v36gP)h>@6aWAK2mtk}6R`~l0SWc06ItiSuUsON9sw4A+iu%95Pi>A z2QcRPt6aD(?9q{$n)1xs9#WXQBVH5p^^X$|x?(Xi6 zrT93_zZ&wvh{%#ej!|iUvkjEyMAwvbqC5I#8(W_qY1%kWF^RMU#$=*j5yq8N$YGMC z9C9(W6bKPXzOP~uN2eHaSQ>I#%Sww_Wl}9wW-V=9ThK`8m+Ou>Tk5sSrqY-|R^%im z3D+o|=&|rZX_kEAG$z*xp=8Wt{Tf(S+5Gp<4V`JMiPU4K@ zkPB<-`F7wRTPM0!lqNXs#baZK5gXksBZv}qEa*H^xOvt|DE3Y-kxZdECzzN}S`x>E-#mDqDzOt<-hrs0?8RL137+VcS5=0Bn_T z_zfiNmEMWE)OJo7%4wzylD}b?7JRKWD{_%_!Ze~`4)c{#FMb-=voEIn7x*2Wl~(C& zr7kBdEpkNm)@b&@X>{yt!>@8lGm=BjYlNl^PZ<>LmL?*97!l<%yOVEOnuy>F4Cxv} zQ07|Tw81iCk)o)_d`RL$PZc1BD8 zSp-(=7`h=b+#G+)-)imQARRb68>Nd3jNr&NEeDu^7Xa5ZF$kQ%1S9M$kTB8?ov@GK z(wbB0>}l=mvC))vR|ua8zrB|bwk;=6M#>XJc^c_|JIEH)G5)^zI9EDf;j{=vTQZf0 znX%DPb|AsFd!tLNpXRDEPB_!_tzSXbvC)8jn?!x0R1BJzN5i#>>Zqu(FufvqJkjUE zsWQ9RC!)cUbjsFrdaJx8d9zktvTZ}81&rALlu4iSloOg57>M%-l{JTZRp%iFc z-;^p3x+dIq$HU0K1xXO8eAt%{U++{V?4l^!n{cjI5{|72H!niQbI6A{r|Kh&&Qf7v zA}6V9S21t{*(`}xYAqCl*JZ&gnfYL<{<4Dx1|WpK4_wQ~ zzz=-~1aKq$=n&U%4d3AqzwVdx_y zfM#Rhq6G$F2tyDc>VW_4^sFk3^sCxWMxX5lLwj0BE@m5ZP&D+V~_0orA9s@7?iH zEABc>k5O}@^p50j(jviA)yfYIY*|`lSv|ut+lw1R+iE?>=VVDsq?pH6v)ng_wv_zZ z2fO&to7h45hcEH^9!oyf7`L80#u2f9P3-#?@LX#F+=c4{h+P86$i{Htp&(qGykPtp zV!Y1!-3(tP{!0Q;`>%g_B~gUP*FA4NQQq3*M14;X%4?-w@6gZ-lg?dLRgW&og5#UtvsE0Xk$N`vRIs_Y$QlZ=fqT>b z3$@9yCG*CR-wb>)vq`zWaUrIt|1Lgu^90PYXw`caOqUds{wog77IOJ91TzK(5S?nW zfs(gGbjx^V-Z#pIM}<2EE#GE2VHOoz4HU)iu`C!6jtv>1CI|XR7ZssOIPEmn%2z^> z{ElgQG*(|hO^<#6P)h>@6aWAK2mtk}6O&vAlLPgt6O-}>HwpEs6ItiSuUsONG6*go t^{NwD0{TU?ZU6uPUI73A2mk;80000000000q=8hEe+U}}=m!7*004X7E;s-H delta 1716 zcmV;l221&+5ugzbP)h>@6aWAK2mmjD5U~vi0SPaF5LpYyTC*LK9sw4AS#R4o5Pr|E z5Y%Uxx*SV^>|&d=i(;F)h?B+cQ$bNwLqyk#lvDTDFR9BqeKg6U$tDkhG$e<^neQ78 zX*qAdhk>-lDJ5|Iy zPvZ0&5Dy^0YaAG$)TRS}6sK60a_L+)jiO#=0>aCOCzR zTT}JdZEK=UWhpC6Fx!J2u*Zn4Zkk|3Fuf2SET88xRcp-}U+N~|GoCL$pTGZnef8V* z$K~hFbbGXM9i`ctIypvlV;zlX926|A4wm*BtY08ljaI?BlGLEfY9}C+EqxKJ3+$7q z?F}bu$@55OTUrKxO&<62MJ`S~|Lp4GLzyl3TPt1NJruf$82qk8 z^o`t!y3lrkDN0F_8zkPL8)vN6nq(=@I&K^gH-+gYSI=L;&GM@%{%otGv(ze_ovTYR zjk6TtgEgvsaDtAVZTOWgX-0C$d5zGt;VFV5-I0g~BOpwFWOw{Mi6b6-jv-m12#Q>* z7;Uf&Xmdb2zB|LdC3qMI5|Ex_@K24G6nq|sgJQo2GRk(G_PCJIE68XZFZ3DWMN?lA zUMLp(-G38$qYC|N*nhpSKUvhxD(Zhc$EfQsDe8APSd-{+qu%V=s}@V6&f_qFDHEmW zRvX$1bD*q$>l*S;OesHp3fst!yap~RU|JNK9J!Q1VLeMTd^D(*@0NRmCI2h{%W)Ll z;t+0+zr}k#_IQjAoSi}8BA}WoG%QnBJX6JrX<|!(hVChv?OBG3tm#ZgeE=8MoC#+y zDqlOGDeaEnKI4A-C=je`hMgNJP7uXur0*b|GY9;Cb@^$P>wM$Inaj(Pg*ePOprh7vtAHLoxP1r|KdNAS4SwT2j6K<8cl%k@Cs%=n5w@l{Z=6if=hmXXhm6ofoU45i!@z<_6#Z}w2%U4Q$v~B z-l^_d-qgj~ZW7kM-_6708PziMX|{!*z+8O+!^!Gph#ibL?GtFG^B9xtafZ#U#h*FSf_RW(Sf)F{i3FEHhcVmRG`GpR&55dZiZ*2g@5 z@mQ7X+JnpWr#}M@?w{4_fQCkIM`7h zWTZV&ceT>tR_=~L%f~ECf^5_@KwjcKmIVVs2Z#tYInYNs-x11$(@tZpe8m-s@0b=R zPW~0t;^bdYO9KQH00008055uYc2G+N1^@s600RI60H*)| K0OJP$0002;SSeQk diff --git a/dev-examples/reactions/sbml.xml b/dev-examples/reactions/reactions_example.xml similarity index 87% rename from dev-examples/reactions/sbml.xml rename to dev-examples/reactions/reactions_example.xml index a2e7c74..529898c 100644 --- a/dev-examples/reactions/sbml.xml +++ b/dev-examples/reactions/reactions_example.xml @@ -2,22 +2,22 @@ - - + + - + - - + + - + - + - - + + @@ -47,7 +47,7 @@ - + @@ -56,31 +56,31 @@ - + - + - + - + - + - + - + @@ -88,7 +88,7 @@ - + Vessel 1 10.0 @@ -102,7 +102,7 @@ - + Enzyme MTEY @@ -117,7 +117,7 @@ - + Substrate @@ -127,7 +127,7 @@ - + Product @@ -136,10 +136,10 @@ - + - + @@ -150,10 +150,10 @@ - + - + @@ -179,8 +179,8 @@ - + diff --git a/dev-examples/sbml_export_odes.py b/dev-examples/sbml_export_odes.py index 034e9d0..11e3b57 100644 --- a/dev-examples/sbml_export_odes.py +++ b/dev-examples/sbml_export_odes.py @@ -51,6 +51,7 @@ "s1'(t) = kcat * E_tot * s0(t) / (K_m + s0(t))", "E_tot = 100", unit_mapping={"kcat": 1 / s, "K_m": mM, "E_tot": mM}, + enzmldoc=doc, ) doc.measurements += pe.read_excel( @@ -69,5 +70,12 @@ meas.temperature_unit = K meas.ph = 7.0 -to_sbml(doc, out="./dev-examples/odes/ode_example.omex") -pe.write_enzymeml(doc=doc, path="./dev-examples/odes/enzymeml.json") +# Write sbml doc to file +with open("./dev-examples/odes/odes_example.xml", "w") as file: + file.write(to_sbml(doc)[0]) + +# Write to omex file +doc.to_sbml("./dev-examples/odes/odes_example.omex") + +# Write to EnzymeML JSON file +pe.write_enzymeml(self=doc, path="./dev-examples/odes/enzymeml.json") diff --git a/dev-examples/sbml_export_reactions.py b/dev-examples/sbml_export_reactions.py index 030aa9d..fc4c3c3 100644 --- a/dev-examples/sbml_export_reactions.py +++ b/dev-examples/sbml_export_reactions.py @@ -32,6 +32,7 @@ reaction.kinetic_law = peq.build_equation( "kcat * p0(t) * s0(t) / ( K_m + s0(t) )", unit_mapping={"kcat": 1 / s, "K_m": mM}, + enzmldoc=doc, ) doc.reactions += [reaction] @@ -52,5 +53,12 @@ meas.temperature_unit = K meas.ph = 7.0 -to_sbml(doc, out="./dev-examples/reactions/reactions_example.omex") -pe.write_enzymeml(doc=doc, path="./dev-examples/reactions/enzymeml.json") +# Write sbml doc to file +with open("./dev-examples/reactions/reactions_example.xml", "w") as file: + file.write(to_sbml(doc)[0]) + +# Write to omex file +doc.to_sbml("./dev-examples/reactions/reactions_example.omex") + +# Write to EnzymeML JSON file +pe.write_enzymeml(self=doc, path="./dev-examples/reactions/enzymeml.json") diff --git a/dev-examples/sbml_import_odes.py b/dev-examples/sbml_import_odes.py index a78dfcf..e2aeacc 100644 --- a/dev-examples/sbml_import_odes.py +++ b/dev-examples/sbml_import_odes.py @@ -2,8 +2,11 @@ import rich -from pyenzyme.sbml import read_sbml +import pyenzyme as pe +from pyenzyme.tools import to_dict_wo_json_ld -doc = read_sbml(Path("./dev-examples/odes/ode_example.omex")) +doc = pe.EnzymeMLDocument.from_sbml( + path=Path("./dev-examples/reactions/reactions_example.omex") +) -rich.print(doc) +rich.print(to_dict_wo_json_ld(doc)) diff --git a/dev-examples/sbml_import_reactions.py b/dev-examples/sbml_import_reactions.py index 8c47df7..e2aeacc 100644 --- a/dev-examples/sbml_import_reactions.py +++ b/dev-examples/sbml_import_reactions.py @@ -2,8 +2,11 @@ import rich -from pyenzyme.sbml import read_sbml +import pyenzyme as pe +from pyenzyme.tools import to_dict_wo_json_ld -doc = read_sbml(Path("./dev-examples/reactions/reactions_example.omex")) +doc = pe.EnzymeMLDocument.from_sbml( + path=Path("./dev-examples/reactions/reactions_example.omex") +) -rich.print(doc) +rich.print(to_dict_wo_json_ld(doc)) From 978e100ef734f5a6d06361aeba2268d736f0c36c Mon Sep 17 00:00:00 2001 From: Jan Range Date: Mon, 19 Aug 2024 21:25:39 +0200 Subject: [PATCH 40/80] attach readers and writers to model class --- pyenzyme/__init__.py | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/pyenzyme/__init__.py b/pyenzyme/__init__.py index 5006ef4..2dee72e 100644 --- a/pyenzyme/__init__.py +++ b/pyenzyme/__init__.py @@ -1,28 +1,32 @@ from __future__ import annotations import json -from rich import print from pathlib import Path +from rich import print + from .model import * # noqa: F403 -from .sbml import to_sbml # noqa: F401 +from .sbml import to_sbml, read_sbml # noqa: F401 from .tabular import to_pandas, read_csv, read_excel # noqa: F401 __all__ = [ - "load_enzymeml", + "read_enzymeml", "write_enzymeml", "to_sbml", "to_pandas", ] -def load_enzymeml(path: str) -> EnzymeMLDocument: # noqa: F405 +def read_enzymeml(cls, path: str) -> EnzymeMLDocument: # noqa: F405 with open(path) as f: - return EnzymeMLDocument.model_validate_json(f.read()) # noqa: F405 + return cls.model_validate_json(f.read()) # noqa: F405 -def write_enzymeml(doc: EnzymeMLDocument, path: Path | str | None = None): # noqa: F405 - data = json.loads(doc.model_dump_json(exclude_none=True, by_alias=True)) +def write_enzymeml( + self: EnzymeMLDocument, # noqa: F405 + path: Path | str | None = None, # noqa: F405 +): # noqa: F405 + data = json.loads(self.model_dump_json(exclude_none=True, by_alias=True)) data = json.dumps(sort_by_ld(data), indent=2) if path is None: @@ -39,6 +43,13 @@ def write_enzymeml(doc: EnzymeMLDocument, path: Path | str | None = None): # no print(f"\n EnzymeML document written to [green][bold]{path}[/bold][/green]\n") +# Add these methods to the EnzymeMLDocument class +EnzymeMLDocument.read = classmethod(read_enzymeml) # noqa: F405 +EnzymeMLDocument.write = write_enzymeml # noqa: F405 +EnzymeMLDocument.from_sbml = classmethod(read_sbml) # noqa: F405 +EnzymeMLDocument.to_sbml = to_sbml # noqa: F405 + + def sort_by_ld(d: dict) -> dict: keys = sorted(d.keys(), key=_pattern) data = {} From ec497a5f436afb48d5553be8e33abdb92377c0e2 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Mon, 19 Aug 2024 21:26:00 +0200 Subject: [PATCH 41/80] add parameters to enzmldoc --- pyenzyme/equations/_math.py | 67 +++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 36 deletions(-) diff --git a/pyenzyme/equations/_math.py b/pyenzyme/equations/_math.py index 9c3f264..5108368 100644 --- a/pyenzyme/equations/_math.py +++ b/pyenzyme/equations/_math.py @@ -25,12 +25,14 @@ def build_equations( *equations: str, unit_mapping: dict[str, UnitDefinition] | None = None, + enzmldoc: EnzymeMLDocument, ) -> list[Equation]: """Builds a list of Equation objects from a list of string representations. Args: *equations (list[str]): A list of string representations of the ODEs unit_mapping: A dictionary mapping parameter names to their respective + enzmldoc (EnzymeMLDocument): The EnzymeMLDocument to add the parameters to Returns: list[ODE]: A list of ODE objects @@ -44,11 +46,19 @@ def build_equations( assert all(isinstance(eq, str) for eq in equations), "All equations must be strings" - return [build_equation(eq, unit_mapping) for eq in equations] # type: ignore + return [ + build_equation( + equation=eq, + unit_mapping=unit_mapping, + enzmldoc=enzmldoc, + ) + for eq in equations + ] # type: ignore def build_equation( equation: str, + enzmldoc: EnzymeMLDocument, unit_mapping: dict[str, UnitDefinition] | None = None, ) -> Equation: """Builds an equation object from a string @@ -60,6 +70,7 @@ def build_equation( Args: equation (str): The equation to be converted into an ODE object unit_mapping: A dictionary mapping parameter names to their respective units + enzmldoc (EnzymeMLDocument): The EnzymeMLDocument to add the parameters to Returns: ODE: The ODE object @@ -111,16 +122,16 @@ def build_equation( equation=str(right), variables=[_create_variable(name) for name in variables], equation_type=equation_type, - parameters=[ - _create_parameter(name, unit_mapping.get(name)) for name in parameters - ], ) - # Left out for now, but could be re-used by decision upon change to include - # parameters on the top-level document. - # if enzmldoc: - # [_add_to_parameters(enzmldoc, param.name, param.id) for param in eq.parameters] - # _add_units_to_parameters(enzmldoc, unit_mapping) + [ + _add_to_parameters( + enzmldoc, + param, + unit_mapping.get(param), + ) + for param in parameters + ] return eq @@ -158,38 +169,22 @@ def _create_variable(name: str) -> Variable: return Variable(id=name, name=name, symbol=name) -def _add_to_parameters(enzmldoc: EnzymeMLDocument, name: str, id: str): +def _add_to_parameters( + enzmldoc: EnzymeMLDocument, + name: str, + unit: UnitDefinition, +): """Adds a parameter to the EnzymeMLDocument""" add_logger("ENZML") if enzmldoc.filter_parameters(name=name): logger.info(f"Parameter {name} already exists in EnzymeMLDocument. Skipping...") - return - enzmldoc.add_to_parameters(name=name, id=name) # type: ignore - - -def _add_units_to_parameters( - doc: EnzymeMLDocument, - unit_mapping: dict[str, UnitDefinition], -): - """Adds units to the parameters in the EnzymeMLDocument""" - - add_logger("ENZML") - - has_error = False - - for param, unit in unit_mapping.items(): - if unit.__class__.__name__ != "UnitDefinition": - logger.error(f"Unit {unit} is not a UnitDefinition object. Skipping...") - has_error = True - continue - - doc.filter_parameters(name=param)[0].unit = unit - - if has_error: - raise ValueError( - "Assigning units to parameters failed. Check the logs for more info." - ) + enzmldoc.add_to_parameters( + name=name, + id=name, + symbol=name, + unit=unit, + ) # type: ignore From 165eeec06105e61bf07d602b477ef905e38a2a95 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Mon, 19 Aug 2024 21:26:07 +0200 Subject: [PATCH 42/80] move params to root --- pyenzyme/model.py | 714 ++++++++++++++++++++-------------------------- 1 file changed, 311 insertions(+), 403 deletions(-) diff --git a/pyenzyme/model.py b/pyenzyme/model.py index 8a8d847..7a48ec1 100644 --- a/pyenzyme/model.py +++ b/pyenzyme/model.py @@ -1,15 +1,18 @@ ## This is a generated file. Do not modify it manually! from __future__ import annotations -from pydantic import BaseModel, Field, ConfigDict -from typing import Optional, Generic, TypeVar + from enum import Enum +from typing import Optional, Generic, TypeVar from uuid import uuid4 +from pydantic import BaseModel, Field, ConfigDict + # Filter Wrapper definition used to filter a list of objects # based on their attributes Cls = TypeVar("Cls") + class FilterWrapper(Generic[Cls]): """Wrapper class to filter a list of objects based on their attributes""" @@ -46,7 +49,8 @@ def add_namespace(obj, prefix: str | None, iri: str | None): elif iri and prefix is None: raise ValueError("If iri is provided, prefix must also be provided") - obj.ld_context[prefix] = iri # type: ignore + obj.ld_context[prefix] = iri # type: ignore + def validate_prefix(term: str | dict, prefix: str): """Validates that a term is prefixed with a given prefix @@ -64,13 +68,14 @@ def validate_prefix(term: str | dict, prefix: str): elif isinstance(term, str) and not term.startswith(prefix + ":"): raise ValueError(f"Term {term} is not prefixed with {prefix}") + # Model Definitions -class EnzymeMLDocument(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore +class EnzymeMLDocument(BaseModel): + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore name: str references: list[str] = Field(default_factory=list) @@ -84,24 +89,25 @@ class EnzymeMLDocument(BaseModel): reactions: list[Reaction] = Field(default_factory=list) measurements: list[Measurement] = Field(default_factory=list) equations: list[Equation] = Field(default_factory=list) + parameters: list[Parameter] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:EnzymeMLDocument/" + str(uuid4()) + default_factory=lambda: "enzml:EnzymeMLDocument/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory = lambda: [ + default_factory=lambda: [ "enzml:EnzymeMLDocument", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory = lambda: { + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "name": "schema:title", "references": { "@id": "schema:citation", @@ -110,7 +116,7 @@ class EnzymeMLDocument(BaseModel): "created": "schema:dateCreated", "modified": "schema:dateModified", "creators": "schema:creator", - } + }, ) def filter_creators(self, **kwargs) -> list[Creator]: @@ -209,13 +215,24 @@ def filter_equations(self, **kwargs) -> list[Equation]: return FilterWrapper[Equation](self.equations, **kwargs).filter() + def filter_parameters(self, **kwargs) -> list[Parameter]: + """Filters the parameters attribute based on the given kwargs + + Args: + **kwargs: The attributes to filter by. + + Returns: + list[Parameter]: The filtered list of Parameter objects + """ + + return FilterWrapper[Parameter](self.parameters, **kwargs).filter() def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -237,7 +254,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -246,10 +265,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -276,7 +292,6 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) - def add_to_creators( self, given_name: str, @@ -284,29 +299,22 @@ def add_to_creators( mail: str, **kwargs, ): - params = { - "given_name": given_name, - "family_name": family_name, - "mail": mail - } + params = {"given_name": given_name, "family_name": family_name, "mail": mail} if "id" in kwargs: params["id"] = kwargs["id"] - self.creators.append( - Creator(**params) - ) + self.creators.append(Creator(**params)) return self.creators[-1] - def add_to_vessels( self, id: str, name: str, volume: float, unit: UnitDefinition, - constant: bool= True, + constant: bool = True, **kwargs, ): params = { @@ -314,30 +322,27 @@ def add_to_vessels( "name": name, "volume": volume, "unit": unit, - "constant": constant + "constant": constant, } if "id" in kwargs: params["id"] = kwargs["id"] - self.vessels.append( - Vessel(**params) - ) + self.vessels.append(Vessel(**params)) return self.vessels[-1] - def add_to_proteins( self, id: str, name: str, - constant: bool= False, - sequence: Optional[str]= None, - vessel_id: Optional[str]= None, - ecnumber: Optional[str]= None, - organism: Optional[str]= None, - organism_tax_id: Optional[str]= None, - references: list[str]= [], + constant: bool = False, + sequence: Optional[str] = None, + vessel_id: Optional[str] = None, + ecnumber: Optional[str] = None, + organism: Optional[str] = None, + organism_tax_id: Optional[str] = None, + references: list[str] = [], **kwargs, ): params = { @@ -349,54 +354,48 @@ def add_to_proteins( "ecnumber": ecnumber, "organism": organism, "organism_tax_id": organism_tax_id, - "references": references + "references": references, } if "id" in kwargs: params["id"] = kwargs["id"] - self.proteins.append( - Protein(**params) - ) + self.proteins.append(Protein(**params)) return self.proteins[-1] - def add_to_complexes( self, id: str, name: str, - constant: bool= False, - participants: list[str]= [], + constant: bool = False, + participants: list[str] = [], **kwargs, ): params = { "id": id, "name": name, "constant": constant, - "participants": participants + "participants": participants, } if "id" in kwargs: params["id"] = kwargs["id"] - self.complexes.append( - Complex(**params) - ) + self.complexes.append(Complex(**params)) return self.complexes[-1] - def add_to_small_molecules( self, id: str, name: str, - constant: bool= False, - vessel_id: Optional[str]= None, - canonical_smiles: Optional[str]= None, - inchi: Optional[str]= None, - inchikey: Optional[str]= None, - references: list[str]= [], + constant: bool = False, + vessel_id: Optional[str] = None, + canonical_smiles: Optional[str] = None, + inchi: Optional[str] = None, + inchikey: Optional[str] = None, + references: list[str] = [], **kwargs, ): params = { @@ -407,27 +406,24 @@ def add_to_small_molecules( "canonical_smiles": canonical_smiles, "inchi": inchi, "inchikey": inchikey, - "references": references + "references": references, } if "id" in kwargs: params["id"] = kwargs["id"] - self.small_molecules.append( - SmallMolecule(**params) - ) + self.small_molecules.append(SmallMolecule(**params)) return self.small_molecules[-1] - def add_to_reactions( self, id: str, name: str, - reversible: bool= False, - kinetic_law: Optional[Equation]= None, - species: list[ReactionElement]= [], - modifiers: list[str]= [], + reversible: bool = False, + kinetic_law: Optional[Equation] = None, + species: list[ReactionElement] = [], + modifiers: list[str] = [], **kwargs, ): params = { @@ -436,28 +432,25 @@ def add_to_reactions( "reversible": reversible, "kinetic_law": kinetic_law, "species": species, - "modifiers": modifiers + "modifiers": modifiers, } if "id" in kwargs: params["id"] = kwargs["id"] - self.reactions.append( - Reaction(**params) - ) + self.reactions.append(Reaction(**params)) return self.reactions[-1] - def add_to_measurements( self, id: str, name: str, - species_data: list[MeasurementData]= [], - group_id: Optional[str]= None, - ph: Optional[float]= None, - temperature: Optional[float]= None, - temperature_unit: Optional[UnitDefinition]= None, + species_data: list[MeasurementData] = [], + group_id: Optional[str] = None, + ph: Optional[float] = None, + temperature: Optional[float] = None, + temperature_unit: Optional[UnitDefinition] = None, **kwargs, ): params = { @@ -467,26 +460,22 @@ def add_to_measurements( "group_id": group_id, "ph": ph, "temperature": temperature, - "temperature_unit": temperature_unit + "temperature_unit": temperature_unit, } if "id" in kwargs: params["id"] = kwargs["id"] - self.measurements.append( - Measurement(**params) - ) + self.measurements.append(Measurement(**params)) return self.measurements[-1] - def add_to_equations( self, equation: str, equation_type: EquationType, - species_id: Optional[str]= None, - variables: list[Variable]= [], - parameters: list[Parameter]= [], + species_id: Optional[str] = None, + variables: list[Variable] = [], **kwargs, ): params = { @@ -494,23 +483,54 @@ def add_to_equations( "equation_type": equation_type, "species_id": species_id, "variables": variables, - "parameters": parameters } if "id" in kwargs: params["id"] = kwargs["id"] - self.equations.append( - Equation(**params) - ) + self.equations.append(Equation(**params)) return self.equations[-1] -class Creator(BaseModel): + def add_to_parameters( + self, + id: str, + name: str, + symbol: str, + value: Optional[float] = None, + unit: Optional[UnitDefinition] = None, + initial_value: Optional[float] = None, + upper: Optional[float] = None, + lower: Optional[float] = None, + stderr: Optional[float] = None, + constant: Optional[bool] = True, + **kwargs, + ): + params = { + "id": id, + "name": name, + "symbol": symbol, + "value": value, + "unit": unit, + "initial_value": initial_value, + "upper": upper, + "lower": lower, + "stderr": stderr, + "constant": constant, + } + + if "id" in kwargs: + params["id"] = kwargs["id"] - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + self.parameters.append(Parameter(**params)) + + return self.parameters[-1] + + +class Creator(BaseModel): + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore given_name: str family_name: str @@ -519,33 +539,30 @@ class Creator(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Creator/" + str(uuid4()) + default_factory=lambda: "enzml:Creator/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory = lambda: [ - "enzml:Creator","schema:person" - ], + default_factory=lambda: ["enzml:Creator", "schema:person"], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory = lambda: { + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "given_name": "schema:givenName", "family_name": "schema:familyName", "mail": "schema:email", - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -567,7 +584,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -576,10 +595,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -608,10 +624,9 @@ def add_type_term( class Vessel(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore id: str name: str @@ -622,36 +637,33 @@ class Vessel(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Vessel/" + str(uuid4()) + default_factory=lambda: "enzml:Vessel/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory = lambda: [ - "enzml:Vessel","OBO:OBI_0400081" - ], + default_factory=lambda: ["enzml:Vessel", "OBO:OBI_0400081"], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory = lambda: { + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@id": "schema:identifier", "@type": "@id", }, "name": "schema:name", "volume": "OBO:OBI_0002139", - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -673,7 +685,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -682,10 +696,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -714,10 +725,9 @@ def add_type_term( class Protein(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore id: str name: str @@ -732,20 +742,18 @@ class Protein(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Protein/" + str(uuid4()) + default_factory=lambda: "enzml:Protein/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory = lambda: [ - "enzml:Protein","schema:Protein" - ], + default_factory=lambda: ["enzml:Protein", "schema:Protein"], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory = lambda: { + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@type": "@id", }, @@ -763,16 +771,15 @@ class Protein(BaseModel): "@id": "schema:citation", "@type": "@id", }, - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -794,7 +801,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -803,10 +812,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -835,10 +841,9 @@ def add_type_term( class Complex(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore id: str name: str @@ -848,20 +853,20 @@ class Complex(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Complex/" + str(uuid4()) + default_factory=lambda: "enzml:Complex/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory = lambda: [ + default_factory=lambda: [ "enzml:Complex", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory = lambda: { + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@id": "schema:identifier", "@type": "@id", @@ -870,16 +875,15 @@ class Complex(BaseModel): "participants": { "@type": "@id", }, - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -901,7 +905,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -910,10 +916,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -942,10 +945,9 @@ def add_type_term( class SmallMolecule(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore id: str name: str @@ -959,20 +961,20 @@ class SmallMolecule(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:SmallMolecule/" + str(uuid4()) + default_factory=lambda: "enzml:SmallMolecule/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory = lambda: [ + default_factory=lambda: [ "enzml:SmallMolecule", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory = lambda: { + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@id": "schema:identifier", "@type": "@id", @@ -986,16 +988,15 @@ class SmallMolecule(BaseModel): "@id": "schema:citation", "@type": "@id", }, - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -1017,7 +1018,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1026,10 +1029,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1058,10 +1058,9 @@ def add_type_term( class Reaction(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore id: str name: str @@ -1073,20 +1072,20 @@ class Reaction(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Reaction/" + str(uuid4()) + default_factory=lambda: "enzml:Reaction/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory = lambda: [ + default_factory=lambda: [ "enzml:Reaction", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory = lambda: { + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@id": "schema:identifier", "@type": "@id", @@ -1094,7 +1093,7 @@ class Reaction(BaseModel): "modifiers": { "@type": "@id", }, - } + }, ) def filter_species(self, **kwargs) -> list[ReactionElement]: @@ -1109,13 +1108,12 @@ def filter_species(self, **kwargs) -> list[ReactionElement]: return FilterWrapper[ReactionElement](self.species, **kwargs).filter() - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -1137,7 +1135,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1146,10 +1146,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1176,33 +1173,26 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) - def add_to_species( self, species_id: str, stoichiometry: float, **kwargs, ): - params = { - "species_id": species_id, - "stoichiometry": stoichiometry - } + params = {"species_id": species_id, "stoichiometry": stoichiometry} if "id" in kwargs: params["id"] = kwargs["id"] - self.species.append( - ReactionElement(**params) - ) + self.species.append(ReactionElement(**params)) return self.species[-1] class ReactionElement(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore species_id: str stoichiometry: float @@ -1210,33 +1200,32 @@ class ReactionElement(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:ReactionElement/" + str(uuid4()) + default_factory=lambda: "enzml:ReactionElement/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory = lambda: [ + default_factory=lambda: [ "enzml:ReactionElement", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory = lambda: { + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "species_id": { "@type": "@id", }, - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -1258,7 +1247,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1267,10 +1258,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1299,38 +1287,36 @@ def add_type_term( class Equation(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore equation: str equation_type: EquationType species_id: Optional[str] = Field(default=None) variables: list[Variable] = Field(default_factory=list) - parameters: list[Parameter] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Equation/" + str(uuid4()) + default_factory=lambda: "enzml:Equation/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory = lambda: [ + default_factory=lambda: [ "enzml:Equation", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory = lambda: { + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "species_id": { "@type": "@id", }, - } + }, ) def filter_variables(self, **kwargs) -> list[Variable]: @@ -1345,25 +1331,12 @@ def filter_variables(self, **kwargs) -> list[Variable]: return FilterWrapper[Variable](self.variables, **kwargs).filter() - def filter_parameters(self, **kwargs) -> list[Parameter]: - """Filters the parameters attribute based on the given kwargs - - Args: - **kwargs: The attributes to filter by. - - Returns: - list[Parameter]: The filtered list of Parameter objects - """ - - return FilterWrapper[Parameter](self.parameters, **kwargs).filter() - - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -1385,7 +1358,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1394,10 +1369,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1424,7 +1396,6 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) - def add_to_variables( self, id: str, @@ -1432,63 +1403,20 @@ def add_to_variables( symbol: str, **kwargs, ): - params = { - "id": id, - "name": name, - "symbol": symbol - } + params = {"id": id, "name": name, "symbol": symbol} if "id" in kwargs: params["id"] = kwargs["id"] - self.variables.append( - Variable(**params) - ) + self.variables.append(Variable(**params)) return self.variables[-1] - def add_to_parameters( - self, - id: str, - name: str, - symbol: str, - value: Optional[float]= None, - unit: Optional[UnitDefinition]= None, - initial_value: Optional[float]= None, - upper: Optional[float]= None, - lower: Optional[float]= None, - stderr: Optional[float]= None, - constant: Optional[bool]= True, - **kwargs, - ): - params = { - "id": id, - "name": name, - "symbol": symbol, - "value": value, - "unit": unit, - "initial_value": initial_value, - "upper": upper, - "lower": lower, - "stderr": stderr, - "constant": constant - } - - if "id" in kwargs: - params["id"] = kwargs["id"] - - self.parameters.append( - Parameter(**params) - ) - - return self.parameters[-1] - class Variable(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore id: str name: str @@ -1497,31 +1425,30 @@ class Variable(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Variable/" + str(uuid4()) + default_factory=lambda: "enzml:Variable/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory = lambda: [ + default_factory=lambda: [ "enzml:Variable", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory = lambda: { + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": "schema:identifier", - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -1543,7 +1470,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1552,10 +1481,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1584,10 +1510,9 @@ def add_type_term( class Parameter(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore id: str name: str @@ -1603,34 +1528,33 @@ class Parameter(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Parameter/" + str(uuid4()) + default_factory=lambda: "enzml:Parameter/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory = lambda: [ + default_factory=lambda: [ "enzml:Parameter", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory = lambda: { + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@id": "schema:identifier", "@type": "@id", }, - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -1652,7 +1576,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1661,10 +1587,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1693,10 +1616,9 @@ def add_type_term( class Measurement(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore id: str name: str @@ -1709,20 +1631,20 @@ class Measurement(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Measurement/" + str(uuid4()) + default_factory=lambda: "enzml:Measurement/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory = lambda: [ + default_factory=lambda: [ "enzml:Measurement", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory = lambda: { + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "id": { "@id": "schema:identifier", "@type": "@id", @@ -1730,7 +1652,7 @@ class Measurement(BaseModel): "group_id": { "@type": "@id", }, - } + }, ) def filter_species_data(self, **kwargs) -> list[MeasurementData]: @@ -1745,13 +1667,12 @@ def filter_species_data(self, **kwargs) -> list[MeasurementData]: return FilterWrapper[MeasurementData](self.species_data, **kwargs).filter() - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -1773,7 +1694,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1782,10 +1705,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1812,7 +1732,6 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) - def add_to_species_data( self, species_id: str, @@ -1820,10 +1739,10 @@ def add_to_species_data( data_unit: UnitDefinition, time_unit: UnitDefinition, data_type: DataTypes, - prepared: Optional[float]= None, - data: list[float]= [], - time: list[float]= [], - is_simulated: bool= False, + prepared: Optional[float] = None, + data: list[float] = [], + time: list[float] = [], + is_simulated: bool = False, **kwargs, ): params = { @@ -1835,24 +1754,21 @@ def add_to_species_data( "prepared": prepared, "data": data, "time": time, - "is_simulated": is_simulated + "is_simulated": is_simulated, } if "id" in kwargs: params["id"] = kwargs["id"] - self.species_data.append( - MeasurementData(**params) - ) + self.species_data.append(MeasurementData(**params)) return self.species_data[-1] class MeasurementData(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore species_id: str initial: float @@ -1867,33 +1783,32 @@ class MeasurementData(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:MeasurementData/" + str(uuid4()) + default_factory=lambda: "enzml:MeasurementData/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory = lambda: [ + default_factory=lambda: [ "enzml:MeasurementData", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory = lambda: { + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", "species_id": { "@type": "@id", }, - } + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -1915,7 +1830,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1924,10 +1841,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1956,10 +1870,9 @@ def add_type_term( class UnitDefinition(BaseModel): - - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore id: Optional[str] = Field(default=None) name: Optional[str] = Field(default=None) @@ -1968,21 +1881,21 @@ class UnitDefinition(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:UnitDefinition/" + str(uuid4()) + default_factory=lambda: "enzml:UnitDefinition/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory = lambda: [ + default_factory=lambda: [ "enzml:UnitDefinition", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory = lambda: { + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", - } + "schema": "https://schema.org/", + }, ) def filter_base_units(self, **kwargs) -> list[BaseUnit]: @@ -1997,13 +1910,12 @@ def filter_base_units(self, **kwargs) -> list[BaseUnit]: return FilterWrapper[BaseUnit](self.base_units, **kwargs).filter() - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -2025,7 +1937,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -2034,10 +1948,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -2064,36 +1975,33 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) - def add_to_base_units( self, kind: UnitType, exponent: int, - multiplier: Optional[float]= None, - scale: Optional[float]= None, + multiplier: Optional[float] = None, + scale: Optional[float] = None, **kwargs, ): params = { "kind": kind, "exponent": exponent, "multiplier": multiplier, - "scale": scale + "scale": scale, } if "id" in kwargs: params["id"] = kwargs["id"] - self.base_units.append( - BaseUnit(**params) - ) + self.base_units.append(BaseUnit(**params)) return self.base_units[-1] -class BaseUnit(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment = True, - ) # type: ignore +class BaseUnit(BaseModel): + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment=True, + ) # type: ignore kind: UnitType exponent: int @@ -2103,30 +2011,29 @@ class BaseUnit(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:BaseUnit/" + str(uuid4()) + default_factory=lambda: "enzml:BaseUnit/" + str(uuid4()), ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory = lambda: [ + default_factory=lambda: [ "enzml:BaseUnit", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory = lambda: { + default_factory=lambda: { "enzml": "http://www.enzymeml.org/v2/", - "schema": "https://schema.org/", "OBO": "http://purl.obolibrary.org/obo/", - } + "schema": "https://schema.org/", + }, ) - def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None + iri: str | None = None, ): """Sets the term for a given attribute in the JSON-LD object @@ -2148,7 +2055,9 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" + assert ( + attr in self.model_fields + ), f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -2157,10 +2066,7 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, - term: str, - prefix: str | None = None, - iri: str | None = None + self, term: str, prefix: str | None = None, iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -2194,6 +2100,7 @@ class EquationType(Enum): ODE = "ode" RATE_LAW = "rateLaw" + class DataTypes(Enum): ABSORBANCE = "http://purl.allotrope.org/ontologies/quality#AFQ_0000061" CONCENTRATION = "http://purl.obolibrary.org/obo/PATO_0000033" @@ -2202,6 +2109,7 @@ class DataTypes(Enum): PEAK_AREA = "http://purl.allotrope.org/ontologies/result#AFR_0001073" TRANSMITTANCE = "http://purl.allotrope.org/ontologies/result#AFR_0002261" + class UnitType(Enum): AMPERE = "ampere" AVOGADRO = "avogadro" @@ -2236,4 +2144,4 @@ class UnitType(Enum): TESLA = "tesla" VOLT = "volt" WATT = "watt" - WEBER = "weber" \ No newline at end of file + WEBER = "weber" From c2c68c31647a624d2df0cdfc2ac49efc898039c5 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Mon, 19 Aug 2024 21:26:38 +0200 Subject: [PATCH 43/80] adapt to parameter loc and cast `str` to `float` --- pyenzyme/sbml/parser.py | 70 +++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/pyenzyme/sbml/parser.py b/pyenzyme/sbml/parser.py index 815797e..4a67b63 100644 --- a/pyenzyme/sbml/parser.py +++ b/pyenzyme/sbml/parser.py @@ -1,12 +1,12 @@ from __future__ import annotations import math -import re import xml.etree.ElementTree as ET from pathlib import Path from typing import IO import libsbml as sbml # type: ignore +import rich from loguru import logger # type: ignore import pyenzyme as pe @@ -20,12 +20,21 @@ ENZYMEML_NS = "https://www.enzymeml.org/v2" -def read_sbml(path: Path | str): +def read_sbml(cls, path: Path | str): + """ + Reads an SBML file and initializes an EnzymeML document. + + Args: + cls: The class to instantiate the EnzymeML document. + path (Path | str): The path to the OMEX archive containing the SBML file. + + Returns: + An initialized EnzymeML document with extracted units, species, vessels, equations, parameters, reactions, and measurements. + """ add_logger(name="SBML") # Create globals to use in the functions global units - global parameters global path_prefix global tsv_path @@ -34,7 +43,7 @@ def read_sbml(path: Path | str): # Read the SBML file and init an EnzymeML document model = _init_and_read_sbml(open(sbml_path)) - enzmldoc = pe.EnzymeMLDocument(name=model.getName()) + enzmldoc = cls(name=model.getName()) # Extract units to map these to the EnzymeML entities units = { # type: ignore @@ -50,8 +59,8 @@ def read_sbml(path: Path | str): # Extract vessels enzmldoc.vessels = [_parse_vessel(comp) for comp in model.getListOfCompartments()] - # Extract equations from rules and initial assignments - parameters = [_parse_parameter(param) for param in model.getListOfParameters()] # type: ignore + # Extract equations and parameters + enzmldoc.parameters = [_parse_parameter(param) for param in model.getListOfParameters()] # type: ignore enzmldoc.equations += [ _parse_equation(rule, pe.EquationType.INITIAL_ASSIGNMENT) for rule in model.getListOfInitialAssignments() @@ -233,7 +242,6 @@ def _parse_equation(rule: sbml.Rule, rule_type: pe.EquationType): equation_type=rule_type, equation=equation, species_id=species_id, - parameters=_extract_parameters(equation), variables=[pe.Variable(**annot) for annot in annots.get("variables", [])], ) @@ -259,12 +267,13 @@ def _parse_reaction(reaction: sbml.Reaction): reaction = pe.Reaction( id=reaction.getId(), name=reaction.getName(), - reactants=reactants, - products=products, + species=reactants + products, modifiers=modifiers, kinetic_law=kinetic_law, ) + rich.print(reaction) + return reaction @@ -281,36 +290,17 @@ def _parse_kinetic_law(reaction): if not kinetic_law: return None - formula = kinetic_law.getFormula() + annots = _parse_enzymeml_annotations("variables", kinetic_law.getAnnotationString()) kinetic_law = pe.Equation( - equation=formula, + equation=kinetic_law.getFormula(), equation_type=pe.EquationType.RATE_LAW, unit=M, # We need to set a default unit here, because SBML does not provide units for kinetic laws + variables=[pe.Variable(**annot) for annot in annots.get("variables", [])], ) - kinetic_law.parameters = _extract_parameters(formula) - return kinetic_law -def _extract_parameters(equation: str) -> list[pe.Parameter]: - """Extract the parameters from an equation.""" - - params = [] - for param in parameters: - if any( - _contains_param(equation, getattr(param, attr)) - for attr in ["id", "symbol", "name"] - ): - params.append(param) - - return params - - -def _contains_param(formula: str, param: str) -> bool: - return bool(re.search(rf"\b{param}\b", formula)) - - def _parse_measurements(model: sbml.Model): # Extract metadata from the model meas_metadata, file_path = _get_meas_metadata(model) @@ -335,18 +325,26 @@ def _assign_units_and_initials(meas_id, measurements, metadata): measurement = [m for m in measurements if m.id == meas_id][0] conditions = metadata.get("condition", {}) init_concs = metadata.get("speciesData", []) - measurement.temperature = conditions.get("temperature") + measurement.ph = _cast(conditions.get("ph"), float) + measurement.temperature = _cast(conditions.get("temperature"), float) measurement.temperature_unit = conditions.get("temperature_unit") for init_conc in init_concs: species_id = _get_species_id(init_conc) meas_data = _get_species_data(measurement, species_id) - meas_data.initial = init_conc.get("initial", 0.0) + meas_data.initial = float(init_conc.get("initial", 0.0)) meas_data.time_unit = init_conc["time_unit"] meas_data.data_unit = init_conc["data_unit"] +def _cast(value, data_type): + if value is None: + return None + + return data_type(value) + + def _get_species_id(init_conc): species_id = init_conc.get("species_id") assert species_id, "No species ID found in the EnzymeML data annotation" @@ -457,7 +455,11 @@ def _map_values(mappings, root, root_key=None): root=root, xml_key=xml_key, ): - data[root_key] = value + if root_key in data and len(value) == 1: + # Special case for conditions + data[root_key][0].update(value[0]) + else: + data[root_key] = value case str(): if value := _process_simple( From f1eeaf4a5ee651fb50a659add4bf1d8834459a8a Mon Sep 17 00:00:00 2001 From: Jan Range Date: Mon, 19 Aug 2024 21:26:47 +0200 Subject: [PATCH 44/80] adapt parameter change --- pyenzyme/sbml/serializer.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/pyenzyme/sbml/serializer.py b/pyenzyme/sbml/serializer.py index a2c87e2..71251f8 100644 --- a/pyenzyme/sbml/serializer.py +++ b/pyenzyme/sbml/serializer.py @@ -39,7 +39,7 @@ def to_sbml( >> import pyenzyme as pe >> doc = pe.EnzymeMLDocument() >> [add entities to doc] - >> pe.to_sbml(doc, "example.xml") + >> to_sbml(doc, "example.xml") Args: enzmldoc (pe.EnzymeMLDocument): The EnzymeML document to convert. @@ -85,6 +85,9 @@ def to_sbml( if doc.measurements: _add_measurements(doc.measurements) + for parameter in enzmldoc.parameters: + _add_parameter(parameter) + if out is None: return libsbml.writeSBMLToString(sbmldoc), to_pandas(doc) @@ -264,10 +267,6 @@ def _add_rate_law(equation: pe.Equation, reac: libsbml.Reaction): law = reac.createKineticLaw() law.setMath(libsbml.parseL3Formula(equation.equation)) - for parameter in equation.parameters: - if not model.getParameter(parameter.id): - _add_parameter(pe.Parameter(**parameter.model_dump())) - if annot := _create_equation_annot(equation): law.setAnnotation(_xml.serialize_to_pretty_xml_string(annot)) @@ -329,10 +328,6 @@ def _add_equation(equation: pe.Equation): sbml_rule.setMath(libsbml.parseL3Formula(equation.equation)) - for parameter in equation.parameters: - if not model.getParameter(parameter.id): # type: ignore - _add_parameter(parameter) - if annot := _create_equation_annot(equation): sbml_rule.setAnnotation(_xml.serialize_to_pretty_xml_string(annot)) From 754787212bf8cce32c1e7d0ef4d48d605f5fa765 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Mon, 19 Aug 2024 21:26:57 +0200 Subject: [PATCH 45/80] cast to float --- pyenzyme/tabular.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyenzyme/tabular.py b/pyenzyme/tabular.py index a712ca9..a8e5e55 100644 --- a/pyenzyme/tabular.py +++ b/pyenzyme/tabular.py @@ -192,6 +192,7 @@ def from_pandas( Args: df (pd.DataFrame): The DataFrame to parse. + id (str): The ID of the measurement. data_unit (UnitDefinition): The unit of the data. time_unit (UnitDefinition): The unit of the time. data_type (DataTypes): The type of the data. Default is DataTypes.CONCENTRATION. @@ -247,7 +248,7 @@ def _create_single_measurement( time=time, data_unit=data_unit, time_unit=time_unit, - initial=species_data[0], + initial=float(species_data[0]), data_type=data_type, ) ) From 958b321889f27a12cc7627d26bd5741067d3dd9f Mon Sep 17 00:00:00 2001 From: Jan Range Date: Mon, 19 Aug 2024 21:27:09 +0200 Subject: [PATCH 46/80] add utility to strip ld keys --- pyenzyme/tools.py | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/pyenzyme/tools.py b/pyenzyme/tools.py index dcea60f..ee644ce 100644 --- a/pyenzyme/tools.py +++ b/pyenzyme/tools.py @@ -7,6 +7,56 @@ import pyenzyme as pe +def to_dict_wo_json_ld(enzmldoc: pe.EnzymeMLDocument): + """Serialized to dict and strips JSON-LD fields from an EnzymeMLDocument. + + Please note, this function is intended for internal use only and should not be called directly. + For developers, if you intend to write tests and check the contents of an EnzymeMLDocument, + it is recommended to use this method instead of `model_dump()` to avoid JSON-LD fields, + since these contain IDs that are not deterministic and may cause tests to fail. + + Args: + enzmldoc (EnzymeMLDocument): The EnzymeMLDocument to strip JSON-LD fields from. + + Returns: + dict: The EnzymeMLDocument with JSON-LD fields removed. + """ + + doc = enzmldoc.model_dump() + _recursive_key_removal(doc, "ld_id") + _recursive_key_removal(doc, "ld_type") + _recursive_key_removal(doc, "ld_context") + + return doc + + +def _recursive_key_removal(obj: dict | list, key: str): + """ + Recursively removes all occurrences of a specified key from a dictionary or list of dictionaries. + + Args: + obj (dict | list): The dictionary or list of dictionaries to process. + key (str): The key to remove from the dictionary or dictionaries. + + Example: + >>> data = {'a': 1, 'b': {'a': 2, 'c': 3}, 'd': [{'a': 4}, {'e': 5}]} + >>> _recursive_key_removal(data, 'a') + >>> print(data) + {'b': {'c': 3}, 'd': [{'e': 5}]} + """ + if isinstance(obj, dict): + for k in list(obj.keys()): + if key == k: + del obj[key] + else: + _recursive_key_removal(obj[k], key) + elif isinstance(obj, list): + # Sort the list to ensure that the order of elements is preserved + obj.sort(key=lambda x: str(x)) + for entry in obj: + _recursive_key_removal(entry, key) + + def get_all_parameters(enzmldoc): """Extracts all parameters from an EnzymeMLDocument. From a57a7325a496760a151f4055c1366e900a18c980 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Mon, 19 Aug 2024 21:27:15 +0200 Subject: [PATCH 47/80] update tests --- tests/fixtures/sbml/ode_example_enzml.json | 415 +++++++----------- tests/fixtures/sbml/ode_example_sbml.xml | 46 +- tests/fixtures/sbml/odes_example.omex | Bin 0 -> 2429 bytes .../fixtures/sbml/reaction_example_enzml.json | 389 +++++++--------- tests/fixtures/sbml/reaction_example_sbml.xml | 66 ++- tests/fixtures/sbml/reactions_example.omex | Bin 0 -> 2212 bytes tests/integration/test_sbml.py | 40 ++ tests/unit/test_equations.py | 65 ++- 8 files changed, 456 insertions(+), 565 deletions(-) create mode 100644 tests/fixtures/sbml/odes_example.omex create mode 100644 tests/fixtures/sbml/reactions_example.omex create mode 100644 tests/integration/test_sbml.py diff --git a/tests/fixtures/sbml/ode_example_enzml.json b/tests/fixtures/sbml/ode_example_enzml.json index 57a2b6e..ca2dca0 100644 --- a/tests/fixtures/sbml/ode_example_enzml.json +++ b/tests/fixtures/sbml/ode_example_enzml.json @@ -12,7 +12,7 @@ "modified": "schema:dateModified", "creators": "schema:creator" }, - "@id": "enzml:EnzymeMLDocument/44649453-a157-4cb7-be07-8fb09a82f4ca", + "@id": "enzml:EnzymeMLDocument/833d46aa-58c7-4d42-b341-43f1fe0fece0", "@type": [ "enzml:EnzymeMLDocument" ], @@ -32,7 +32,7 @@ "name": "schema:name", "volume": "OBO:OBI_0002139" }, - "@id": "enzml:Vessel/02063116-73f1-4ba1-b166-8fe835e55659", + "@id": "enzml:Vessel/abc02182-675a-4fd7-b067-9f376f17b874", "@type": [ "enzml:Vessel", "OBO:OBI_0400081" @@ -59,7 +59,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/efd21ea0-af02-4920-9036-9c8337cf0421", + "@id": "enzml:BaseUnit/7ea9c0d4-dcbb-4e59-94f2-7b1779e35b1b", "@type": [ "enzml:BaseUnit" ], @@ -96,7 +96,7 @@ "@type": "@id" } }, - "@id": "enzml:Protein/cf3097ad-5833-4ff8-99f1-784cd5f673ca", + "@id": "enzml:Protein/487be0d2-e325-4f0b-857b-3bd8d54c4003", "@type": [ "enzml:Protein", "schema:Protein" @@ -127,7 +127,7 @@ "@type": "@id" } }, - "@id": "enzml:Complex/fa79ccd6-acbe-47e4-a8d1-795eb18346db", + "@id": "enzml:Complex/2f52086d-d7a8-4a2d-870b-bd6bafd91504", "@type": [ "enzml:Complex" ], @@ -160,7 +160,7 @@ "@type": "@id" } }, - "@id": "enzml:SmallMolecule/5375d6fb-6246-43b0-bc81-d47e3e72493f", + "@id": "enzml:SmallMolecule/551e35d3-ae18-490d-b4a7-003fcd28f446", "@type": [ "enzml:SmallMolecule" ], @@ -191,7 +191,7 @@ "@type": "@id" } }, - "@id": "enzml:SmallMolecule/c7318d93-2a0f-44c0-9ebe-a79fc27bf01e", + "@id": "enzml:SmallMolecule/1a93b3f8-ce94-429d-975b-ff6a837b0424", "@type": [ "enzml:SmallMolecule" ], @@ -219,7 +219,7 @@ "@type": "@id" } }, - "@id": "enzml:Measurement/ef303c49-7554-4367-9f44-cb6e9838c1be", + "@id": "enzml:Measurement/83db3a41-626e-461b-80d2-9618997c6af3", "@type": [ "enzml:Measurement" ], @@ -235,7 +235,7 @@ "@type": "@id" } }, - "@id": "enzml:MeasurementData/3beaeb28-72a4-4398-ae34-c9208c03aa0b", + "@id": "enzml:MeasurementData/a1e71511-2b64-40af-a50f-7ede47b45baa", "@type": [ "enzml:MeasurementData" ], @@ -260,7 +260,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/cff3e0ad-ce88-479a-8c01-b06e012e3195", + "@id": "enzml:BaseUnit/0a98675d-d6e6-4551-8f2a-90483c57936d", "@type": [ "enzml:BaseUnit" ], @@ -274,7 +274,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/df1eed89-6a35-483e-a187-b981d9ee0405", + "@id": "enzml:BaseUnit/335f309c-13e0-4eb8-9765-3945a8683f7f", "@type": [ "enzml:BaseUnit" ], @@ -303,12 +303,12 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/634613e6-a06f-42e9-9e11-b32c3e6f6f09", + "@id": "enzml:BaseUnit/4e3a6a14-ca74-4c8a-b00f-45a3cfea6e11", "@type": [ "enzml:BaseUnit" ], "kind": "second", - "exponent": -1, + "exponent": 1, "scale": 1.0 } ] @@ -351,7 +351,7 @@ "@type": "@id" } }, - "@id": "enzml:MeasurementData/00c0dabc-47cc-40d5-a4d5-7809880aad52", + "@id": "enzml:MeasurementData/9de1a9fe-ede0-4e0b-a8cc-84e8dce6cb57", "@type": [ "enzml:MeasurementData" ], @@ -376,7 +376,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/cff3e0ad-ce88-479a-8c01-b06e012e3195", + "@id": "enzml:BaseUnit/0a98675d-d6e6-4551-8f2a-90483c57936d", "@type": [ "enzml:BaseUnit" ], @@ -390,7 +390,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/df1eed89-6a35-483e-a187-b981d9ee0405", + "@id": "enzml:BaseUnit/335f309c-13e0-4eb8-9765-3945a8683f7f", "@type": [ "enzml:BaseUnit" ], @@ -419,12 +419,12 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/634613e6-a06f-42e9-9e11-b32c3e6f6f09", + "@id": "enzml:BaseUnit/4e3a6a14-ca74-4c8a-b00f-45a3cfea6e11", "@type": [ "enzml:BaseUnit" ], "kind": "second", - "exponent": -1, + "exponent": 1, "scale": 1.0 } ] @@ -480,7 +480,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/83915bc7-e2b4-450f-b363-20eb027d1f3d", + "@id": "enzml:BaseUnit/31d5028b-2d30-4053-87e7-00b42a40b165", "@type": [ "enzml:BaseUnit" ], @@ -504,7 +504,7 @@ "@type": "@id" } }, - "@id": "enzml:Measurement/28bb1de1-4cd9-45e2-b160-3a2dd5ce3e34", + "@id": "enzml:Measurement/f7603279-9db3-4039-b501-97fee1f05c4b", "@type": [ "enzml:Measurement" ], @@ -520,7 +520,7 @@ "@type": "@id" } }, - "@id": "enzml:MeasurementData/24b00355-6bad-4771-a0e5-e65c7560b3a9", + "@id": "enzml:MeasurementData/f8d7f530-1f92-4cd7-b460-54b9cb03678b", "@type": [ "enzml:MeasurementData" ], @@ -545,7 +545,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/cff3e0ad-ce88-479a-8c01-b06e012e3195", + "@id": "enzml:BaseUnit/0a98675d-d6e6-4551-8f2a-90483c57936d", "@type": [ "enzml:BaseUnit" ], @@ -559,7 +559,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/df1eed89-6a35-483e-a187-b981d9ee0405", + "@id": "enzml:BaseUnit/335f309c-13e0-4eb8-9765-3945a8683f7f", "@type": [ "enzml:BaseUnit" ], @@ -588,12 +588,12 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/634613e6-a06f-42e9-9e11-b32c3e6f6f09", + "@id": "enzml:BaseUnit/4e3a6a14-ca74-4c8a-b00f-45a3cfea6e11", "@type": [ "enzml:BaseUnit" ], "kind": "second", - "exponent": -1, + "exponent": 1, "scale": 1.0 } ] @@ -636,7 +636,7 @@ "@type": "@id" } }, - "@id": "enzml:MeasurementData/405dfbaf-cc21-41d4-836d-fdadc1d0c1b3", + "@id": "enzml:MeasurementData/828564ec-ec24-42c2-98b2-115fdc1f2a3c", "@type": [ "enzml:MeasurementData" ], @@ -661,7 +661,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/cff3e0ad-ce88-479a-8c01-b06e012e3195", + "@id": "enzml:BaseUnit/0a98675d-d6e6-4551-8f2a-90483c57936d", "@type": [ "enzml:BaseUnit" ], @@ -675,7 +675,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/df1eed89-6a35-483e-a187-b981d9ee0405", + "@id": "enzml:BaseUnit/335f309c-13e0-4eb8-9765-3945a8683f7f", "@type": [ "enzml:BaseUnit" ], @@ -704,12 +704,12 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/634613e6-a06f-42e9-9e11-b32c3e6f6f09", + "@id": "enzml:BaseUnit/4e3a6a14-ca74-4c8a-b00f-45a3cfea6e11", "@type": [ "enzml:BaseUnit" ], "kind": "second", - "exponent": -1, + "exponent": 1, "scale": 1.0 } ] @@ -765,7 +765,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/83915bc7-e2b4-450f-b363-20eb027d1f3d", + "@id": "enzml:BaseUnit/31d5028b-2d30-4053-87e7-00b42a40b165", "@type": [ "enzml:BaseUnit" ], @@ -787,23 +787,80 @@ "@type": "@id" } }, - "@id": "enzml:Equation/87c7fc6d-6933-42be-a33a-c8eecb5901b7", + "@id": "enzml:Equation/69aec529-07bc-447a-8169-a20dc623c81a", "@type": [ "enzml:Equation" ], - "equation": "E_tot*kcat*s0/(K_m + s0)", + "equation": "E_tot * kcat * s0 / (K_m + s0)", + "equation_type": "ode", + "species_id": "s1", + "variables": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + }, + "@id": "enzml:Variable/b4d171e6-c5ee-416b-859f-6560c5f18b5d", + "@type": [ + "enzml:Variable" + ], + "id": "s0", + "name": "s0", + "symbol": "s0" + } + ] + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + }, + "@id": "enzml:Equation/e1e66a46-8111-4003-9eeb-f163081c2e96", + "@type": [ + "enzml:Equation" + ], + "equation": "100", + "equation_type": "initialAssignment", + "species_id": "E_tot", + "variables": [] + } + ], + "parameters": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + } + }, + "@id": "enzml:Parameter/2872b6d6-191f-4bc4-a36a-130eb4534837", + "@type": [ + "enzml:Parameter" + ], + "id": "kcat", + "name": "kcat", + "symbol": "kcat", "unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "OBO:UO_0000063", + "@id": "OBO:UO_0000010", "@type": [ "OBO:UO_0000000" ], "id": "u4", - "name": "mmol / l s", + "name": "1 / s", "base_units": [ { "@context": { @@ -811,35 +868,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/cff3e0ad-ce88-479a-8c01-b06e012e3195", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "mole", - "exponent": 1, - "scale": -3.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/df1eed89-6a35-483e-a187-b981d9ee0405", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "litre", - "exponent": -1, - "scale": 1.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/634613e6-a06f-42e9-9e11-b32c3e6f6f09", + "@id": "enzml:BaseUnit/4e3a6a14-ca74-4c8a-b00f-45a3cfea6e11", "@type": [ "enzml:BaseUnit" ], @@ -849,223 +878,93 @@ } ] }, - "equation_type": "ode", - "species_id": "s1", - "variables": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/", - "id": "schema:identifier" - }, - "@id": "enzml:Variable/49c819d7-0f8a-4d2e-9a82-09cf62d48aad", - "@type": [ - "enzml:Variable" - ], - "id": "s0", - "name": "s0", - "symbol": "s0" + "upper": 100.0, + "lower": 0.0, + "stderr": 0.1, + "constant": true + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" } + }, + "@id": "enzml:Parameter/31e315d7-8e87-4ef9-9ca4-1e9e08f2ded7", + "@type": [ + "enzml:Parameter" ], - "parameters": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/", - "id": { - "@id": "schema:identifier", - "@type": "@id" - } - }, - "@id": "enzml:Parameter/404206dc-7e11-432e-b1a8-871b822325ef", - "@type": [ - "enzml:Parameter" - ], - "id": "kcat", - "name": "kcat", - "symbol": "kcat", - "unit": { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "OBO:UO_0000010", - "@type": [ - "OBO:UO_0000000" - ], - "id": "u5", - "name": "1 / s", - "base_units": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/634613e6-a06f-42e9-9e11-b32c3e6f6f09", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "second", - "exponent": -1, - "scale": 1.0 - } - ] - }, - "upper": 100.0, - "lower": 0.0, - "stderr": 0.1, - "constant": true + "id": "K_m", + "name": "K_m", + "symbol": "K_m", + "unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/", - "id": { - "@id": "schema:identifier", - "@type": "@id" - } - }, - "@id": "enzml:Parameter/a5b7ca60-4945-4cfe-9eb9-6c97dfdaa770", - "@type": [ - "enzml:Parameter" - ], - "id": "K_m", - "name": "K_m", - "symbol": "K_m", - "unit": { + "@id": "OBO:UO_0000063", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u2", + "name": "mmol / l", + "base_units": [ + { "@context": { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "OBO:UO_0000063", + "@id": "enzml:BaseUnit/0a98675d-d6e6-4551-8f2a-90483c57936d", "@type": [ - "OBO:UO_0000000" + "enzml:BaseUnit" ], - "id": "u2", - "name": "mmol / l", - "base_units": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/cff3e0ad-ce88-479a-8c01-b06e012e3195", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "mole", - "exponent": 1, - "scale": -3.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/df1eed89-6a35-483e-a187-b981d9ee0405", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "litre", - "exponent": -1, - "scale": 1.0 - } - ] - }, - "upper": 100.0, - "lower": 0.0, - "stderr": 0.1, - "constant": true - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/", - "id": { - "@id": "schema:identifier", - "@type": "@id" - } + "kind": "mole", + "exponent": 1, + "scale": -3.0 }, - "@id": "enzml:Parameter/26b501d3-7200-4813-ac11-b62f0f665054", - "@type": [ - "enzml:Parameter" - ], - "id": "E_tot", - "name": "E_tot", - "symbol": "E_tot", - "unit": { + { "@context": { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "OBO:UO_0000063", + "@id": "enzml:BaseUnit/335f309c-13e0-4eb8-9765-3945a8683f7f", "@type": [ - "OBO:UO_0000000" + "enzml:BaseUnit" ], - "id": "u2", - "name": "mmol / l", - "base_units": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/cff3e0ad-ce88-479a-8c01-b06e012e3195", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "mole", - "exponent": 1, - "scale": -3.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/df1eed89-6a35-483e-a187-b981d9ee0405", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "litre", - "exponent": -1, - "scale": 1.0 - } - ] - }, - "upper": 100.0, - "lower": 0.0, - "stderr": 0.1, - "constant": true - } - ] + "kind": "litre", + "exponent": -1, + "scale": 1.0 + } + ] + }, + "upper": 100.0, + "lower": 0.0, + "stderr": 0.1, + "constant": true }, { "@context": { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", - "species_id": { + "id": { + "@id": "schema:identifier", "@type": "@id" } }, - "@id": "enzml:Equation/3991effb-6394-4b6d-baa8-a06462e2101f", + "@id": "enzml:Parameter/d49325e0-8483-469a-9d6d-1bcadac2bb98", "@type": [ - "enzml:Equation" + "enzml:Parameter" ], - "equation": "100", + "id": "E_tot", + "name": "E_tot", + "symbol": "E_tot", "unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", @@ -1085,7 +984,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/cff3e0ad-ce88-479a-8c01-b06e012e3195", + "@id": "enzml:BaseUnit/0a98675d-d6e6-4551-8f2a-90483c57936d", "@type": [ "enzml:BaseUnit" ], @@ -1099,7 +998,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/df1eed89-6a35-483e-a187-b981d9ee0405", + "@id": "enzml:BaseUnit/335f309c-13e0-4eb8-9765-3945a8683f7f", "@type": [ "enzml:BaseUnit" ], @@ -1109,10 +1008,10 @@ } ] }, - "equation_type": "initialAssignment", - "species_id": "E_tot", - "variables": [], - "parameters": [] + "upper": 100.0, + "lower": 0.0, + "stderr": 0.1, + "constant": true } ] } \ No newline at end of file diff --git a/tests/fixtures/sbml/ode_example_sbml.xml b/tests/fixtures/sbml/ode_example_sbml.xml index 7d4ca6b..dc3baf8 100644 --- a/tests/fixtures/sbml/ode_example_sbml.xml +++ b/tests/fixtures/sbml/ode_example_sbml.xml @@ -2,22 +2,22 @@ - + - - + + - - + + @@ -56,7 +56,7 @@ - + @@ -71,21 +71,7 @@ - - - - - - - - - - - - - - - + @@ -104,7 +90,7 @@ + rdf:about="http://www.enzymeml.org/v2/Vessel/abc02182-675a-4fd7-b067-9f376f17b874"> Vessel 1 10.0 @@ -121,7 +107,7 @@ + rdf:about="http://www.enzymeml.org/v2/Protein/487be0d2-e325-4f0b-857b-3bd8d54c4003"> Enzyme MTEY E.coli @@ -141,7 +127,7 @@ + rdf:about="http://www.enzymeml.org/v2/Complex/2f52086d-d7a8-4a2d-870b-bd6bafd91504"> Enzyme-Substrate Complex @@ -157,7 +143,7 @@ + rdf:about="http://www.enzymeml.org/v2/SmallMolecule/551e35d3-ae18-490d-b4a7-003fcd28f446"> Substrate @@ -173,7 +159,7 @@ + rdf:about="http://www.enzymeml.org/v2/SmallMolecule/1a93b3f8-ce94-429d-975b-ff6a837b0424"> Product @@ -186,11 +172,11 @@ - + + rdf:about="http://www.enzymeml.org/v2/Parameter/2872b6d6-191f-4bc4-a36a-130eb4534837"> @@ -205,7 +191,7 @@ + rdf:about="http://www.enzymeml.org/v2/Parameter/31e315d7-8e87-4ef9-9ca4-1e9e08f2ded7"> @@ -220,7 +206,7 @@ + rdf:about="http://www.enzymeml.org/v2/Parameter/d49325e0-8483-469a-9d6d-1bcadac2bb98"> diff --git a/tests/fixtures/sbml/odes_example.omex b/tests/fixtures/sbml/odes_example.omex new file mode 100644 index 0000000000000000000000000000000000000000..087704deb80a5f2edbf78637d98194f6b7c3735e GIT binary patch literal 2429 zcmZ{mX*3jk8^(v3>{*8>360$#6xpI0O9+FqM1<+dzAulmjI0@>5n(LZw=k9&>k|?) zlPqB}vXiY$WGjQbdf)RdPv^Y<`@?na57#;O|M%s(%#DE{FaQ8x0ZbL}*)9UD=yS)L zIU@kTajag>-VYFN0f7pkUY;cwQ?qU*j=1%G{-^7vvvKAVxzv+4C%An1Lax6x;BT}3 zzD|x}O$D$9;}3MucgeJ1lpfTIx;)xd{fYrbMl6ri#dJrEO?DAx8ZQsi6UgW{h3*hP z=0Wk1zb;H$@Lr+69cmFq_4{oks+zfep%z-HVpR$f*I8E7Zs0FTRoL=xPQaN@k7gQQ z-{U%KbzMOAY_edcZdShhl7D=Sb&W*?m>#34$u^b{rhZ>hM`o*5BOYlNy63)7iCyA# z)HdS^=Oc$b8@cZJ_|^sFwQf~sJ+U!)LB#y}4Z_lv$F`#R-%to4aX;ux0Dv+S0AT%v z!pGIk^A`u2ovqJ=I(NiiE%)g2DQ3GSi4%k;Ic<8_=IY$SN3zmSZzO!Sv+$q)NtXz+ z#n7nUlj25v!00zFsyTbF<~T~aCiXi|A=C>XZ1IJ|X)uO(@5hFrD&X3(D_3PIfA~xK@|NJ+0GErsC11@8lJ}KQ*nA*e%Grgmw&u_qtRALc- z{7CFEgGiF4$w+%TzFR37o>^Z21A4rkLx)8HkGQ+Q0!hNRykhkmtt#C6DcKc;vpo6a z<*h$uaud@@r9*&g*%IoV&a&L9U?3v)Dl{S;1GpOxIh&L}$;CXtIf=EeTd ztZ~^~;##8ALRDHr)oNMMYR`|#t>%-%;5xYd)9|(g@0Ue$sOp@O(E+$)?hYu2va&(tjhDbT={YGQsh+#T^ZpOxT8)s1aN{lxRtSxuH&LWAWT z&>iH1L4t;|am6IHr5Q9LZG5L4e?3en2W~KU>EK41s&>oU(34}0bL3p{hf-nzab|Fl zsc(;jW8dv@Tr1RdAh|$?K04Wod5Pi=_g_pgXjyx%VuVKsQ-e^$#EE!ZSK>NUEPc|0$E`xz zTq=7WBACR7uo7{widp=WbJNeXtYOkFM-9J$^kNqe8!C&GPSb%{BpFGsW~@31RRBCH zyUHP&oysQ6e{j~P7PN72eeAZ9U2D%WJTj4dsG>x9rO}#`_XsNZ-qXSON^E%Z6^$<~ z?}koFrqj^(;SW$#<)h#FP7Afc%YxP{6DC(f{iepbgS+K@eU;&V?$!E9!$YdG-a@)l zhh7AC`VYosS%yYN>nByN_9l(P)=%?*kDkvB^++HxCT^d*pI$lv#;kl`=>2+%p_c{{ zR3Zy!ODgp+a=GZdirl_+=o+KnqHDCnVNIa3i1OL##>+Bhkj3L;=$zZB)q?e}Oowa; zQ{B$4A@^=8jGvd8y86k{kgO&-j}hENDP~}QcDm$G9+-3Q#ep`*m*&_&VfxlX1=rj$7}Fh33VOONUmh>XuzlD^B6=^mkd?qM zg$#k*a>-7F=N$7yLDaSI*9{_64-oBoCm^$`pc zpJQMdkuTnvHZ5gu-XI`7*%~hzY{}2wvuAE~KktN%18UWBLHh$;9j0*D^wP+Zj{zli z)(M2q{q;P?W99&~)88ey)|2 zDq#7Jn7OKuW^2J}vgo`H8}4&rI5gi~jRu^L2#il#kY;}`ePz&=QipICAW~Rv)e|Ju zT0i)S!OBAQ*@{Wkud6BeQqD?GTq2h-P*XbcJGA^RVxy03;d2AAxz``sqbrHSxiOv% zzl3ur2cDR)A!zYCZzp}b!nkmMX1JVlak0Oz>+-Od=|voeyZ}CWx=9SjBR9`ajAd!9 zTv+?5N0J-JXBenjE5(wZu@1m2M1(DFc)#B5lO3k7`j1|jT!_Pz*;BA%}lC{?!!d*GKjB*k$UM@QU_AbaiBGYZd>KLr;{W{Ce0y!1L_Z<{BI| zE&z4=Qch%vmWJS`8Fe)0Pv*Y|BqJTx=zScFjtsxr0|4Oa9O$eN7!d4`qQ@B}$^jbO z5FCNQ_Ru2gp|6jKm#QVdIJf0;JAIAFePDRn@Q|czRNvVvAw=-Vc6ndFmeP>n7I3Fg zp5jOOv&d$_)o*fsdaapQ)l=7#&w?71X{Yk7vF?Jxk=k8(PG&f%<2A8EY7=N~%)kf+ z{{IGZeAqu - - + + - + - - + + - + - + - - + + @@ -34,7 +34,7 @@ - + @@ -45,35 +45,33 @@ - - + - + - - + - + - + - + - + @@ -85,18 +83,6 @@ - - - - - - - - - - - - @@ -104,7 +90,7 @@ + rdf:about="http://www.enzymeml.org/v2/Vessel/a2ea41db-032c-4a61-a7d5-254137d0bce9"> Vessel 1 10.0 @@ -121,7 +107,7 @@ + rdf:about="http://www.enzymeml.org/v2/Protein/42828d0d-f4ac-489b-acd5-cd74c080f340"> Enzyme MTEY @@ -138,7 +124,7 @@ + rdf:about="http://www.enzymeml.org/v2/SmallMolecule/e794f30d-51ea-4b89-a5d7-555bcd70efe5"> Substrate @@ -150,7 +136,7 @@ + rdf:about="http://www.enzymeml.org/v2/SmallMolecule/4b8a1f78-1874-447a-aee7-a80970bb1301"> Product @@ -159,11 +145,11 @@ - + + rdf:about="http://www.enzymeml.org/v2/Parameter/46faced8-6229-4b7c-b06a-3feb06a11350"> @@ -174,11 +160,11 @@ - + + rdf:about="http://www.enzymeml.org/v2/Parameter/706ce185-8f1d-429e-8c0d-76942326a0df"> @@ -204,8 +190,8 @@ - + diff --git a/tests/fixtures/sbml/reactions_example.omex b/tests/fixtures/sbml/reactions_example.omex new file mode 100644 index 0000000000000000000000000000000000000000..ce6e4e12f4887700d95ac896785b467c6d5771a3 GIT binary patch literal 2212 zcmZ{lc{CJiAIHZs#)LaDh_W;oMH+h}g=`tiFm}e?kbN0TR1Db_BVx!H`%+{q7ll%m zh;A9tof$%n(qhYUF^E_1d(L~`+d1#^{P8`%^PKNF&+qfk2V>5~Eerqvcmd3EsPiW- zyX_AL6NVE2;6KPlyqm715 zM7r!ZmxmI-w*lZQZM(YJ9z%;)vh+{eF+Pv?G<0(q4_*E|)|}Kwpug*BpJ_e&W;=Z- zyT2kp4i6fU8GE8SZ7rm?JxuG6$a;nUo}ppoJyl}TvX)ZjCYEQK$2yZ8yJ9mhlepSm?Syy4LQ9CUW8^aEm zts~C~x$9U#u0w~e=8YKzB|E4l8un>;>BHzsVwYLVX6em~b6ZUOy z+srj6q+4^yG8Zi+q?Jn~zGin<$^t(xW}nO>X;sQ))T&9`Z%M`}ubA$}DSCLsVU*a5 z3;pGY<$w6GV=F0Nbac21i!E#$_f|L# zqbm<&iMb884cENkl`Zns>Q%jyu9q*nl=4Ptr5}~ti0iEhr)s7mMPf`Bpk6A$?a1p@ z$TvbMXC3{+rIUiE#E3SDAzN6&2XPp&y;~Rf z>b7!J{;K%MoX6|w_>Ruq*>AJE=DwXe6OV|)LHCG6>nSG_*`pvJA2kW+k@OdL;#)tF z2lXg{&IeZv44CH+_h=7tWK2$nt&$$6M|PL{Fh1h-JcL<)KrEF<^z4|4Pupzh6nAf4 zzsWNg%`*Q(%jGotKWGqmP3T9<@s#!mizk^?Df%qQ4%63vV#m(UIuD`^SeH+_hE=$#i2;|(u}C~>t~#JTF;hA&QQE&4xcwO0Ha1!x1c}Zz|z4FWsKz;nJwZV zX;C$-fcQ3lGw0iaWRaWC-I19j5V6zUsg7JY)aPy<<`1u$g1-?7j7^ zJ%E2Vv(53eg98O_eN#=|Y&7dksH_sL#g%?L-ph==V#~Nl5Y-HG<``?CeY{o14_8H>{BUXovl~jpK^%1#UZyohD?&G{^Q0`a`jo&X^kkQh2p{oFhQ+5g zOoU6|?|Pjg6{&7l`vfZ1v|L4Sf}xKQ$j7;NH*3D#sh*KB@QUeyG`LG$NacVt!J}Sa;`fBBqZC{?j>!IDN5jqnCBC-bkN&m^rR;>-aZ8z z)KB&F#2#w3FjVD-D)8cL^+^Hbx_JY)lrETK$6f~)m8y@ezGzQ~H5T^}?ql*4`=3@! zh?$2u7&gaJ`L4`P19xVnxj@mhYjMvCxnJ~kS6gVjnll|*7j~o^H-0Z~;b&wWIVH=1cT)acxs-b{O>YP7zGa=x5Sf&4@`^av@V>!6ZxL{Do=Bt|1 zE`-ITxY#dI3uU`w5B=h@;ZlK_eZJXvTS|-=7We#6S)*7{mdMN5ou;$R0%*EC>aQfn z%%>MJ>CR8dAL{$#GjiyA%N`DHA zga?K!;i49r%y{+eh&nkh@CM&>^;XnM2l)i1D7AjtCbmURcS#xFgeHp=moWXPu_vDR2}ihp6K=Iu}d#HS~L#vx;X{%t+yb#$`ght@HtQyzF@ z*0~yHhHWfR^Bf!aPmgeJ8@GlW_`{v!r(^*DZ?8x%L}bJjH=_P;3CH=lN4|@V85^^+ zrLZ<=_&EFYC3T+W;{Ky%7roK;1uTi|Dr$m z*uPKJji2$q+W)ors~7*%0|2US@EvUUUrYX4`xV3AHCxc%P%!4e1LXn$TnD%IAU_|x H0RaC3h8X0l literal 0 HcmV?d00001 diff --git a/tests/integration/test_sbml.py b/tests/integration/test_sbml.py new file mode 100644 index 0000000..f6acb23 --- /dev/null +++ b/tests/integration/test_sbml.py @@ -0,0 +1,40 @@ +from pathlib import Path + +from pyenzyme import EnzymeMLDocument +from pyenzyme.tools import to_dict_wo_json_ld + + +class TestSBML: + def test_parse_sbml_odes(self): + # Arrange + path = Path("tests/fixtures/sbml/odes_example.omex") + + # Act + enzmldoc = EnzymeMLDocument.from_sbml(path) + + # Assert + parsed_doc = to_dict_wo_json_ld(enzmldoc) + expected_doc = to_dict_wo_json_ld( + EnzymeMLDocument.read("tests/fixtures/sbml/ode_example_enzml.json") + ) + + assert ( + parsed_doc == expected_doc + ), "Parsed document does not match expected document" + + def test_parse_sbml_reactions(self): + # Arrange + path = Path("tests/fixtures/sbml/reactions_example.omex") + + # Act + enzmldoc = EnzymeMLDocument.from_sbml(path) + + # Assert + parsed_doc = to_dict_wo_json_ld(enzmldoc) + expected_doc = to_dict_wo_json_ld( + EnzymeMLDocument.read("tests/fixtures/sbml/reaction_example_enzml.json") + ) + + assert ( + parsed_doc == expected_doc + ), "Parsed document does not match expected document" diff --git a/tests/unit/test_equations.py b/tests/unit/test_equations.py index 4a1496c..f0b20ce 100644 --- a/tests/unit/test_equations.py +++ b/tests/unit/test_equations.py @@ -2,16 +2,22 @@ from pyenzyme.equations._chem import build_reaction, build_reactions from pyenzyme.equations._math import build_equation, build_equations -from pyenzyme.model import EquationType +from pyenzyme.model import EquationType, EnzymeMLDocument +from pyenzyme.units import s class TestMathEquations: def test_parse_equation(self): # Arrange + enzmldoc = EnzymeMLDocument(name="Test") equation = "s1'(t) = kcat * p0(t) * s0(t)" # Act - equation = build_equation(equation) + equation = build_equation( + equation=equation, + unit_mapping={"kcat": 1 / s}, + enzmldoc=enzmldoc, + ) # Assert expected_vars = ["p0", "s0"] @@ -23,41 +29,54 @@ def test_parse_equation(self): assert ( equation.equation == "kcat*p0*s0" ), "Equation is not correct. Got {equation.equation.equation}" - assert equation.parameters[0].name == "kcat", "Parameter name is not correct" - assert ( - equation.parameters[0].symbol == "kcat" - ), "Parameter symbol is not correct" for var in equation.variables: assert var.name in expected_vars assert var.symbol in expected_vars - for param in equation.parameters: + for param in enzmldoc.parameters: assert param.name in expected_params assert param.symbol in expected_params + assert param.id in expected_params + assert param.unit is not None def test_invalid_equation_no_right(self): # Arrange + enzmldoc = EnzymeMLDocument(name="Test") equation = "s1'(t) =" # Act with pytest.raises(ValueError): - equation = build_equation(equation) + build_equation( + equation=equation, + unit_mapping={"kcat": 1 / s}, + enzmldoc=enzmldoc, + ) def test_invalid_equation_no_equals(self): # Arrange + enzmldoc = EnzymeMLDocument(name="Test") equation = "s1'(t) kcat * p0(t) * s0(t)" # Act with pytest.raises(ValueError): - equation = build_equation(equation) + build_equation( + equation=equation, + unit_mapping={"kcat": 1 / s}, + enzmldoc=enzmldoc, + ) def test_equation_with_funs(self): # Arrange + enzmldoc = EnzymeMLDocument(name="Test") equation = "s1'(t) = kcat * exp(p0(t) * t)" # Act - equation = build_equation(equation) + equation = build_equation( + equation=equation, + unit_mapping={"kcat": 1 / s}, + enzmldoc=enzmldoc, + ) # Assert assert ( @@ -69,10 +88,15 @@ def test_equation_with_funs(self): def test_equation_with_fun_only_t(self): # Arrange + enzmldoc = EnzymeMLDocument(name="Test") equation = "s1'(t) = kcat * exp(t)" # Act - equation = build_equation(equation) + equation = build_equation( + equation=equation, + unit_mapping={"kcat": 1 / s}, + enzmldoc=enzmldoc, + ) # Assert assert ( @@ -84,23 +108,32 @@ def test_equation_with_fun_only_t(self): def test_multiple_equations(self): # Arrange + enzmldoc = EnzymeMLDocument(name="Test") equations = [ "s1'(t) = kcat * E_tot * s0(t)", "E_tot = p0(t) + p1(t)", ] # Act - equations = build_equations(*equations) + equations = build_equations( + *equations, + unit_mapping={"kcat": 1 / s}, + enzmldoc=enzmldoc, + ) # Assert assert len(equations) == 2, f"Expected 2 equations. Got {len(equations)}" def test_init_assigment_equation(self): # Arrange + enzmldoc = EnzymeMLDocument(name="Test") equation = "E_tot = p0 + p1" # Act - equation = build_equation(equation) + equation = build_equation( + equation, + enzmldoc=enzmldoc, + ) # Assert assert ( @@ -115,10 +148,14 @@ def test_init_assigment_equation(self): def test_assigment_equation(self): # Arrange + enzmldoc = EnzymeMLDocument(name="Test") equation = "E_tot(t) = p0 + p1" # Act - equation = build_equation(equation) + equation = build_equation( + equation=equation, + enzmldoc=enzmldoc, + ) # Assert assert ( From 6330f0c60de833906b1846d0a4314c4223053ea3 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Tue, 20 Aug 2024 08:49:41 +0200 Subject: [PATCH 48/80] add `to_pandas` to `EnzymeMLDocument` --- dev-examples/sbml_import_odes.py | 4 ++++ dev-examples/sbml_import_reactions.py | 4 ++++ pyenzyme/__init__.py | 1 + 3 files changed, 9 insertions(+) diff --git a/dev-examples/sbml_import_odes.py b/dev-examples/sbml_import_odes.py index e2aeacc..f630d6a 100644 --- a/dev-examples/sbml_import_odes.py +++ b/dev-examples/sbml_import_odes.py @@ -10,3 +10,7 @@ ) rich.print(to_dict_wo_json_ld(doc)) + +df = doc.to_pandas(doc) + +rich.print(df) diff --git a/dev-examples/sbml_import_reactions.py b/dev-examples/sbml_import_reactions.py index e2aeacc..f630d6a 100644 --- a/dev-examples/sbml_import_reactions.py +++ b/dev-examples/sbml_import_reactions.py @@ -10,3 +10,7 @@ ) rich.print(to_dict_wo_json_ld(doc)) + +df = doc.to_pandas(doc) + +rich.print(df) diff --git a/pyenzyme/__init__.py b/pyenzyme/__init__.py index 2dee72e..c667f15 100644 --- a/pyenzyme/__init__.py +++ b/pyenzyme/__init__.py @@ -48,6 +48,7 @@ def write_enzymeml( EnzymeMLDocument.write = write_enzymeml # noqa: F405 EnzymeMLDocument.from_sbml = classmethod(read_sbml) # noqa: F405 EnzymeMLDocument.to_sbml = to_sbml # noqa: F405 +EnzymeMLDocument.to_pandas = to_pandas # noqa: F405 def sort_by_ld(d: dict) -> dict: From bf62d867dd1a3d2aeea13899a26207cf93fa1695 Mon Sep 17 00:00:00 2001 From: haeussma <83341109+haeussma@users.noreply.github.com> Date: Tue, 20 Aug 2024 15:01:20 +0200 Subject: [PATCH 49/80] data, time, time_unit in `MeasurementData` not mandatory anymore --- pyenzyme/model.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pyenzyme/model.py b/pyenzyme/model.py index 7a48ec1..314e63b 100644 --- a/pyenzyme/model.py +++ b/pyenzyme/model.py @@ -3,10 +3,10 @@ from __future__ import annotations from enum import Enum -from typing import Optional, Generic, TypeVar +from typing import Generic, Optional, TypeVar from uuid import uuid4 -from pydantic import BaseModel, Field, ConfigDict +from pydantic import BaseModel, ConfigDict, Field # Filter Wrapper definition used to filter a list of objects # based on their attributes @@ -1737,11 +1737,11 @@ def add_to_species_data( species_id: str, initial: float, data_unit: UnitDefinition, - time_unit: UnitDefinition, data_type: DataTypes, prepared: Optional[float] = None, data: list[float] = [], time: list[float] = [], + time_unit: Optional[UnitDefinition] = None, is_simulated: bool = False, **kwargs, ): @@ -1749,11 +1749,11 @@ def add_to_species_data( "species_id": species_id, "initial": initial, "data_unit": data_unit, - "time_unit": time_unit, "data_type": data_type, "prepared": prepared, "data": data, "time": time, + "time_unit": time_unit, "is_simulated": is_simulated, } @@ -1773,11 +1773,11 @@ class MeasurementData(BaseModel): species_id: str initial: float data_unit: UnitDefinition - time_unit: UnitDefinition data_type: DataTypes prepared: Optional[float] = Field(default=None) data: list[float] = Field(default_factory=list) time: list[float] = Field(default_factory=list) + time_unit: Optional[UnitDefinition] = Field(default=None) is_simulated: bool = False # JSON-LD fields From fe3d3bbda9a29470f6adeafc9f2776ce5c0a450d Mon Sep 17 00:00:00 2001 From: "Frank T. Bergmann" Date: Fri, 23 Aug 2024 14:17:49 +0200 Subject: [PATCH 50/80] - can not assume filenames --- pyenzyme/sbml/omex.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/pyenzyme/sbml/omex.py b/pyenzyme/sbml/omex.py index 1f86734..c7aba86 100644 --- a/pyenzyme/sbml/omex.py +++ b/pyenzyme/sbml/omex.py @@ -67,7 +67,24 @@ def read_sbml_omex(path: Path) -> tuple[Path, Path | None]: """ omex = Omex.from_omex(path) - sbml_file = omex.get_path("./model.xml") - data = omex.get_path("./data.tsv") + + # get first sbml entry in manifest + sbml_entry = None + for entry in omex.manifest.entries: + if '/sbml' in entry.format: + sbml_entry = entry.location + if entry.master: + break + sbml_file = omex.get_path(sbml_entry) + + + # we really need to get all of the data entries from the manifest + # but for now just get the first one + data_entry = None + for entry in omex.manifest.entries: + if '/csv' in entry.format or '/tsv' in entry.format: + data_entry = entry.location + break + data = omex.get_path(data_entry) return sbml_file, data From f17303fd60b72fef5f6762a038497e93fd58e251 Mon Sep 17 00:00:00 2001 From: "Frank T. Bergmann" Date: Fri, 23 Aug 2024 14:18:43 +0200 Subject: [PATCH 51/80] - init defaults to add missing attributes - ensure there is a compartment for complexes - set volume unit --- pyenzyme/sbml/serializer.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pyenzyme/sbml/serializer.py b/pyenzyme/sbml/serializer.py index 71251f8..bba0f1c 100644 --- a/pyenzyme/sbml/serializer.py +++ b/pyenzyme/sbml/serializer.py @@ -120,6 +120,7 @@ def _add_unit_definitions(unit: UnitDefinition): for base_unit in unit.base_units: sbml_unit = sbml_unitdef.createUnit() + sbml_unit.initDefaults() sbml_unit.setKind(_get_sbml_kind(base_unit.kind)) sbml_unit.setExponent(base_unit.exponent) @@ -133,6 +134,7 @@ def _add_vessel(vessel: pe.Vessel): """Add vessels to the SBML model.""" compartment = model.createCompartment() + compartment.initDefaults() compartment.setId(vessel.id) compartment.setName(vessel.name) compartment.setConstant(True) @@ -141,6 +143,7 @@ def _add_vessel(vessel: pe.Vessel): if vessel.unit in units: compartment.setUnits(_get_unit_id(vessel.unit)) + model.setVolumeUnits(_get_unit_id(vessel.unit)) else: raise ValueError(f"Unit {vessel.unit} not found in units") @@ -149,6 +152,7 @@ def _add_small_mol(small_mol: pe.SmallMolecule): """Add small molecules to the SBML model.""" species = model.createSpecies() + species.initDefaults() species.setId(small_mol.id) species.setName(small_mol.name) species.setCompartment(small_mol.vessel_id) @@ -174,6 +178,7 @@ def _add_protein(protein: pe.Protein): """Add proteins to the SBML model.""" species = model.createSpecies() + species.initDefaults() species.setId(protein.id) species.setName(protein.name) species.setConstant(protein.constant) @@ -199,8 +204,10 @@ def _add_complex(complex_: pe.Complex): """Add complexes to the SBML model.""" species = model.createSpecies() + species.initDefaults() species.setId(complex_.id) species.setName(complex_.name) + species.setCompartment(model.getCompartment(0).getId()) species.setConstant(True) species.setSBOTerm("SBO:0000296") # Complex species.appendAnnotation(rdf.to_rdf_xml(complex_)) @@ -237,6 +244,7 @@ def _add_reaction(reaction: pe.Reaction, index: int): """Add reactions to the SBML model.""" sbml_reaction = model.createReaction() + sbml_reaction.initDefaults() sbml_reaction.setName(reaction.name) sbml_reaction.setId(reaction.id) sbml_reaction.setReversible(reaction.reversible) @@ -250,6 +258,8 @@ def _add_reaction(reaction: pe.Reaction, index: int): species.species_id, )() + species_ref.initDefaults() + species_ref.setConstant(True) species_ref.setSpecies(species.species_id) species_ref.setStoichiometry(abs(species.stoichiometry)) @@ -300,6 +310,9 @@ def _add_parameter(parameter: pe.Parameter): if parameter.value: sbml_param.setValue(parameter.value) + elif parameter.initial_value: + sbml_param.setValue(parameter.initial_value) + if parameter.unit: sbml_param.setUnits(_get_unit_id(parameter.unit)) From ca68f4f7663f3e456e09090ddfa546fedf338564 Mon Sep 17 00:00:00 2001 From: "Frank T. Bergmann" Date: Fri, 23 Aug 2024 14:24:58 +0200 Subject: [PATCH 52/80] - omex uses /tab-separated-values for tsv --- pyenzyme/sbml/omex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyenzyme/sbml/omex.py b/pyenzyme/sbml/omex.py index c7aba86..e8f28d3 100644 --- a/pyenzyme/sbml/omex.py +++ b/pyenzyme/sbml/omex.py @@ -82,7 +82,7 @@ def read_sbml_omex(path: Path) -> tuple[Path, Path | None]: # but for now just get the first one data_entry = None for entry in omex.manifest.entries: - if '/csv' in entry.format or '/tsv' in entry.format: + if '/csv' in entry.format or '/tsv' in entry.format or '/tab-separated-values' in entry.format: data_entry = entry.location break data = omex.get_path(data_entry) From c895c2632036b478aa6d8fddbac3def28e8b9d20 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 7 Sep 2024 19:45:50 +0200 Subject: [PATCH 53/80] update dev examples --- dev-examples/enzml_legacy_to_v2.json | 2305 ++++++++++++++ dev-examples/legacy/Model_4.omex | Bin 0 -> 13024 bytes dev-examples/legacy/enzml_legacy_to_v2.json | 3185 +++++++++++++++++++ dev-examples/odes/enzymeml.json | 352 +- dev-examples/odes/odes_example.omex | Bin 2425 -> 2427 bytes dev-examples/odes/odes_example.xml | 22 +- dev-examples/odes/odes_example_test.xml | 241 ++ dev-examples/sbml_export_odes.py | 7 +- dev-examples/sbml_import_legacy.py | 8 + dev-examples/sbml_import_odes.py | 8 +- dev-examples/v1.xml | 731 +++++ 11 files changed, 6664 insertions(+), 195 deletions(-) create mode 100644 dev-examples/enzml_legacy_to_v2.json create mode 100644 dev-examples/legacy/Model_4.omex create mode 100644 dev-examples/legacy/enzml_legacy_to_v2.json create mode 100644 dev-examples/odes/odes_example_test.xml create mode 100644 dev-examples/sbml_import_legacy.py create mode 100644 dev-examples/v1.xml diff --git a/dev-examples/enzml_legacy_to_v2.json b/dev-examples/enzml_legacy_to_v2.json new file mode 100644 index 0000000..ac173d6 --- /dev/null +++ b/dev-examples/enzml_legacy_to_v2.json @@ -0,0 +1,2305 @@ +{ + "name": "EnzymeML_Lagerman", + "references": [], + "created": null, + "modified": null, + "creators": [], + "vessels": [ + { + "id": "v0", + "name": "Falcon Tube", + "volume": 5.0, + "unit": { + "id": "u0", + "name": "ml", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "constant": true + } + ], + "proteins": [ + { + "id": "p0", + "name": "E", + "constant": false, + "sequence": "MRRLAACLLATAVAAATSAALAQTSPMTPDITGKPFVAGDAANDYVKREVMIPMRDGVKLHTVIVLPKGARNAPIVLTRTPYDASGRTERLASPHMKDLLSAGDDVFVEGGYIRVFQDVRGKYGSEGDYVMTRPLRGPLNPSEVDHATDAWDTIDWLVKNVKESNGKVGMIGSSYEGFTVVMALTNPHPALKVAAPESPMIDGWMGDDWFNYGAFRQVNFDYFTGQLSKRGKGAGIPRQGHDDYSNFLQAGSAGDFAKAAGLEQLPWWHKLTEHAAYDSFWQEQALDKVMARTPLKVPTMWLQGLWDQEDMWGAIHSYAAMEPRDKSNKLNYLVMGPWRHSQVNSDASSLGALNFDGDTARQFRRDVLRPFFDQYLVDGAPKAATPPVFIYNTGENHWDRLQAWPRSCDKGCAAKSKPLYLQAGGKLSFQAPTAAQPAFEEYVSDPAKPVPFVPRPVDFGDRSMWTTWLVHDQRFVDGRPDVLTFVTEPLTAPLQIAGAPDVHLQASTSGSDSDWVVKLIDVYPDEMAADPKMGGYELPVSMAIFRGRYRESFSTPAPLAANQPLAFQFGLPTANHTFQPGHRVMVQVQSSLFPLYDRNPQTYVPNVFFAKPGDYQKATQRVYVAPGQGSYISLPVR", + "vessel_id": "v0", + "ecnumber": "3.1.1.43", + "organism": "Xanthomonas campestris pv. campestris", + "organism_tax_id": null, + "references": [] + }, + { + "id": "p1", + "name": "EA", + "constant": false, + "sequence": "MRRLAACLLATAVAAATSAALAQTSPMTPDITGKPFVAGDAANDYVKREVMIPMRDGVKLHTVIVLPKGARNAPIVLTRTPYDASGRTERLASPHMKDLLSAGDDVFVEGGYIRVFQDVRGKYGSEGDYVMTRPLRGPLNPSEVDHATDAWDTIDWLVKNVKESNGKVGMIGSSYEGFTVVMALTNPHPALKVAAPESPMIDGWMGDDWFNYGAFRQVNFDYFTGQLSKRGKGAGIPRQGHDDYSNFLQAGSAGDFAKAAGLEQLPWWHKLTEHAAYDSFWQEQALDKVMARTPLKVPTMWLQGLWDQEDMWGAIHSYAAMEPRDKSNKLNYLVMGPWRHSQVNSDASSLGALNFDGDTARQFRRDVLRPFFDQYLVDGAPKAATPPVFIYNTGENHWDRLQAWPRSCDKGCAAKSKPLYLQAGGKLSFQAPTAAQPAFEEYVSDPAKPVPFVPRPVDFGDRSMWTTWLVHDQRFVDGRPDVLTFVTEPLTAPLQIAGAPDVHLQASTSGSDSDWVVKLIDVYPDEMAADPKMGGYELPVSMAIFRGRYRESFSTPAPLAANQPLAFQFGLPTANHTFQPGHRVMVQVQSSLFPLYDRNPQTYVPNVFFAKPGDYQKATQRVYVAPGQGSYISLPVR", + "vessel_id": "v0", + "ecnumber": "3.1.1.43", + "organism": "Xanthomonas campestris pv. campestris", + "organism_tax_id": null, + "references": [] + }, + { + "id": "p2", + "name": "ED", + "constant": false, + "sequence": "MRRLAACLLATAVAAATSAALAQTSPMTPDITGKPFVAGDAANDYVKREVMIPMRDGVKLHTVIVLPKGARNAPIVLTRTPYDASGRTERLASPHMKDLLSAGDDVFVEGGYIRVFQDVRGKYGSEGDYVMTRPLRGPLNPSEVDHATDAWDTIDWLVKNVKESNGKVGMIGSSYEGFTVVMALTNPHPALKVAAPESPMIDGWMGDDWFNYGAFRQVNFDYFTGQLSKRGKGAGIPRQGHDDYSNFLQAGSAGDFAKAAGLEQLPWWHKLTEHAAYDSFWQEQALDKVMARTPLKVPTMWLQGLWDQEDMWGAIHSYAAMEPRDKSNKLNYLVMGPWRHSQVNSDASSLGALNFDGDTARQFRRDVLRPFFDQYLVDGAPKAATPPVFIYNTGENHWDRLQAWPRSCDKGCAAKSKPLYLQAGGKLSFQAPTAAQPAFEEYVSDPAKPVPFVPRPVDFGDRSMWTTWLVHDQRFVDGRPDVLTFVTEPLTAPLQIAGAPDVHLQASTSGSDSDWVVKLIDVYPDEMAADPKMGGYELPVSMAIFRGRYRESFSTPAPLAANQPLAFQFGLPTANHTFQPGHRVMVQVQSSLFPLYDRNPQTYVPNVFFAKPGDYQKATQRVYVAPGQGSYISLPVR", + "vessel_id": "v0", + "ecnumber": "3.1.1.43", + "organism": "Xanthomonas campestris pv. campestris", + "organism_tax_id": null, + "references": [] + } + ], + "complexes": [ + { + "id": "c0", + "name": "E\u00b7PGME", + "constant": false, + "participants": [ + "p0", + "s0" + ] + }, + { + "id": "c1", + "name": "E\u00b77-ADCA", + "constant": false, + "participants": [ + "p0", + "s1" + ] + }, + { + "id": "c2", + "name": "E\u00b7PG", + "constant": false, + "participants": [ + "p0", + "s3" + ] + }, + { + "id": "c3", + "name": "E\u00b7PGME\u00b7PGME", + "constant": false, + "participants": [ + "p0", + "s0", + "s0" + ] + }, + { + "id": "c4", + "name": "EA\u00b77-ADCA", + "constant": false, + "participants": [ + "p1", + "s1" + ] + }, + { + "id": "c5", + "name": "EA\u00b7PGME", + "constant": false, + "participants": [ + "p1", + "s0" + ] + }, + { + "id": "c6", + "name": "E\u00b7CEX", + "constant": false, + "participants": [ + "p0", + "s2" + ] + } + ], + "small_molecules": [ + { + "id": "s0", + "name": "PGME", + "constant": false, + "vessel_id": "v0", + "canonical_smiles": null, + "inchi": null, + "inchikey": null, + "references": [] + }, + { + "id": "s1", + "name": "7-ADCA", + "constant": false, + "vessel_id": "v0", + "canonical_smiles": null, + "inchi": null, + "inchikey": null, + "references": [] + }, + { + "id": "s2", + "name": "CEX", + "constant": false, + "vessel_id": "v0", + "canonical_smiles": null, + "inchi": null, + "inchikey": null, + "references": [] + }, + { + "id": "s3", + "name": "PG", + "constant": false, + "vessel_id": "v0", + "canonical_smiles": null, + "inchi": null, + "inchikey": null, + "references": [] + } + ], + "reactions": [ + { + "id": "r0", + "name": "reaction-1", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_n * c1 - p0 * s1)", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c1", + "name": "c1", + "symbol": "c1" + }, + { + "id": "p0", + "name": "p0", + "symbol": "p0" + }, + { + "id": "s1", + "name": "s1", + "symbol": "s1" + } + ] + }, + "species": [ + { + "species_id": "c1", + "stoichiometry": -1.0 + }, + { + "species_id": "p0", + "stoichiometry": 1.0 + }, + { + "species_id": "s1", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r1", + "name": "reaction-2", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_s * c0 - p0 * s0)", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c0", + "name": "c0", + "symbol": "c0" + }, + { + "id": "p0", + "name": "p0", + "symbol": "p0" + }, + { + "id": "s0", + "name": "s0", + "symbol": "s0" + } + ] + }, + "species": [ + { + "species_id": "c0", + "stoichiometry": -1.0 + }, + { + "species_id": "p0", + "stoichiometry": 1.0 + }, + { + "species_id": "s0", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r10", + "name": "reaction-11", + "reversible": false, + "kinetic_law": { + "equation": "k_4 * c4 - k_4b * c6", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c4", + "name": "c4", + "symbol": "c4" + }, + { + "id": "c6", + "name": "c6", + "symbol": "c6" + } + ] + }, + "species": [ + { + "species_id": "c4", + "stoichiometry": -1.0 + }, + { + "species_id": "c6", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r11", + "name": "reaction-12", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_p * c6 - p0 * s2)", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c6", + "name": "c6", + "symbol": "c6" + }, + { + "id": "p0", + "name": "p0", + "symbol": "p0" + }, + { + "id": "s2", + "name": "s2", + "symbol": "s2" + } + ] + }, + "species": [ + { + "species_id": "c6", + "stoichiometry": -1.0 + }, + { + "species_id": "p0", + "stoichiometry": 1.0 + }, + { + "species_id": "s2", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r12", + "name": "Enzyme deactivation", + "reversible": false, + "kinetic_law": { + "equation": "k_d * p0", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "p0", + "name": "p0", + "symbol": "p0" + } + ] + }, + "species": [ + { + "species_id": "p0", + "stoichiometry": -1.0 + }, + { + "species_id": "p2", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r2", + "name": "reaction-3", + "reversible": false, + "kinetic_law": { + "equation": "k_2 * c0", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c0", + "name": "c0", + "symbol": "c0" + } + ] + }, + "species": [ + { + "species_id": "c0", + "stoichiometry": -1.0 + }, + { + "species_id": "p1", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r3", + "name": "reaction-4", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_si * c3 - c0 * s0)", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c0", + "name": "c0", + "symbol": "c0" + }, + { + "id": "c3", + "name": "c3", + "symbol": "c3" + }, + { + "id": "s0", + "name": "s0", + "symbol": "s0" + } + ] + }, + "species": [ + { + "species_id": "c0", + "stoichiometry": 1.0 + }, + { + "species_id": "c3", + "stoichiometry": -1.0 + }, + { + "species_id": "s0", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r4", + "name": "reaction-5", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_si * c5 - p1 * s0)", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c5", + "name": "c5", + "symbol": "c5" + }, + { + "id": "p1", + "name": "p1", + "symbol": "p1" + }, + { + "id": "s0", + "name": "s0", + "symbol": "s0" + } + ] + }, + "species": [ + { + "species_id": "c5", + "stoichiometry": -1.0 + }, + { + "species_id": "p1", + "stoichiometry": 1.0 + }, + { + "species_id": "s0", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r5", + "name": "reaction-6", + "reversible": false, + "kinetic_law": { + "equation": "k_6 * c5", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c5", + "name": "c5", + "symbol": "c5" + } + ] + }, + "species": [ + { + "species_id": "c5", + "stoichiometry": -1.0 + }, + { + "species_id": "p0", + "stoichiometry": 1.0 + }, + { + "species_id": "s3", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r6", + "name": "reaction-7", + "reversible": false, + "kinetic_law": { + "equation": "k_3 * p1", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "p1", + "name": "p1", + "symbol": "p1" + } + ] + }, + "species": [ + { + "species_id": "p0", + "stoichiometry": 1.0 + }, + { + "species_id": "p1", + "stoichiometry": -1.0 + }, + { + "species_id": "s3", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r7", + "name": "reaction-8", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_pg * c2 - p0 * s3)", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c2", + "name": "c2", + "symbol": "c2" + }, + { + "id": "p0", + "name": "p0", + "symbol": "p0" + }, + { + "id": "s3", + "name": "s3", + "symbol": "s3" + } + ] + }, + "species": [ + { + "species_id": "c2", + "stoichiometry": -1.0 + }, + { + "species_id": "p0", + "stoichiometry": 1.0 + }, + { + "species_id": "s3", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r8", + "name": "reaction-9", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_n * c4 - p1 * s1)", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c4", + "name": "c4", + "symbol": "c4" + }, + { + "id": "p1", + "name": "p1", + "symbol": "p1" + }, + { + "id": "s1", + "name": "s1", + "symbol": "s1" + } + ] + }, + "species": [ + { + "species_id": "c4", + "stoichiometry": -1.0 + }, + { + "species_id": "p1", + "stoichiometry": 1.0 + }, + { + "species_id": "s1", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r9", + "name": "reaction-10", + "reversible": false, + "kinetic_law": { + "equation": "k_5 * c4", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c4", + "name": "c4", + "symbol": "c4" + } + ] + }, + "species": [ + { + "species_id": "c4", + "stoichiometry": -1.0 + }, + { + "species_id": "p0", + "stoichiometry": 1.0 + }, + { + "species_id": "s1", + "stoichiometry": 1.0 + }, + { + "species_id": "s3", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + } + ], + "measurements": [ + { + "id": "m0", + "name": "Cephalexin synthesis 1", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s0", + "initial": 20.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.645, + 12.45, + 16.385, + 20.0, + 5.135, + 9.255 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s1", + "initial": 10.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 10.0, + 10.575, + 5.18, + 5.815, + 5.94, + 7.025, + 7.57, + 8.72, + 8.945, + 9.87 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 0.575, + 1.075, + 1.915, + 2.66, + 3.24, + 3.885, + 4.815, + 4.9, + 5.755 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s3", + "initial": 2.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 11.965, + 17.28, + 19.93, + 2.0, + 21.36, + 22.55, + 23.38, + 3.705, + 5.77, + 8.035 + ], + "time": [], + "time_unit": null, + "is_simulated": false + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null + }, + { + "id": "m1", + "name": "Cephalexin synthesis 2", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s0", + "initial": 20.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 0.0, + 0.0, + 0.0, + 1.32, + 12.67, + 16.5, + 20.0, + 5.91, + 9.915 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s1", + "initial": 20.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 12.625, + 13.14, + 14.2, + 14.82, + 15.445, + 16.255, + 17.02, + 18.5, + 18.58, + 20.0 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 2.0, + 3.205, + 4.1, + 5.09, + 5.63, + 6.385, + 7.17, + 7.855, + 8.225 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s3", + "initial": 1.3, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 1.3, + 13.25, + 16.055, + 17.62, + 19.34, + 2.955, + 20.8, + 4.615, + 6.175, + 8.8 + ], + "time": [], + "time_unit": null, + "is_simulated": false + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null + }, + { + "id": "m2", + "name": "Cephalexin synthesis 3", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s0", + "initial": 20.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.91, + 13.005, + 20.0, + 4.0, + 7.21, + 9.505 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s1", + "initial": 40.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 29.985, + 30.405, + 30.675, + 31.905, + 32.49, + 33.045, + 33.87, + 34.525, + 36.555, + 40.0 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 3.59, + 5.57, + 5.69, + 6.39, + 6.85, + 7.255, + 8.18, + 8.24, + 8.945 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s3", + "initial": 5.1, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 10.13, + 12.93, + 14.565, + 15.8, + 16.98, + 18.15, + 5.1, + 6.365, + 7.59, + 8.59 + ], + "time": [], + "time_unit": null, + "is_simulated": false + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null + }, + { + "id": "m3", + "name": "Cephalexin synthesis 4", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s0", + "initial": 20.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 0.0, + 0.0, + 0.385, + 1.455, + 11.64, + 15.345, + 20.0, + 5.265, + 8.975 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s1", + "initial": 60.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 47.6, + 48.185, + 48.265, + 49.0, + 50.76, + 51.6, + 52.505, + 53.58, + 56.8, + 60.0 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 10.2, + 11.065, + 11.325, + 3.77, + 6.11, + 7.74, + 9.005, + 9.595, + 9.66 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s3", + "initial": 1.9, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 1.9, + 10.61, + 12.0, + 13.075, + 14.24, + 2.94, + 3.99, + 4.935, + 6.305, + 8.87 + ], + "time": [], + "time_unit": null, + "is_simulated": false + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null + }, + { + "id": "m4", + "name": "Cephalexin synthesis 5", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s0", + "initial": 20.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 0.0, + 0.0, + 0.35, + 1.46, + 12.075, + 15.34, + 20.0, + 5.515, + 9.335 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s1", + "initial": 42.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 29.595, + 30.615, + 31.46, + 31.83, + 32.985, + 34.06, + 34.08, + 36.06, + 38.405, + 42.0 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 3.42, + 5.52, + 6.695, + 6.99, + 7.47, + 8.515, + 8.78, + 9.44, + 9.875 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s3", + "initial": 1.5, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 1.5, + 11.49, + 13.08, + 14.505, + 15.63, + 2.815, + 4.105, + 5.085, + 6.69, + 9.535 + ], + "time": [], + "time_unit": null, + "is_simulated": false + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null + }, + { + "id": "m5", + "name": "Cephalexin synthesis 6", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s0", + "initial": 40.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.84, + 1.695, + 10.1, + 21.225, + 27.01, + 3.33, + 31.035, + 34.595, + 40.0, + 5.9 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s1", + "initial": 42.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 22.595, + 23.0, + 23.09, + 24.5, + 24.8, + 29.17, + 32.805, + 34.9, + 37.9, + 42.0 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 11.1, + 15.255, + 15.645, + 15.81, + 16.345, + 16.5, + 3.625, + 6.4, + 8.5 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s3", + "initial": 3.3, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 11.1, + 17.315, + 20.5, + 22.605, + 24.925, + 26.5, + 3.3, + 4.75, + 6.13, + 7.52 + ], + "time": [], + "time_unit": null, + "is_simulated": false + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null + }, + { + "id": "m6", + "name": "Cephalexin synthesis 7", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s0", + "initial": 76.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 19.7, + 24.655, + 30.4, + 38.03, + 46.9, + 60.2, + 65.6, + 69.3, + 73.36, + 76.0 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s1", + "initial": 40.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 18.36, + 19.445, + 20.805, + 22.94, + 25.965, + 31.025, + 34.09, + 36.175, + 38.51, + 40.0 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 10.295, + 15.76, + 18.74, + 20.755, + 21.89, + 22.875, + 3.04, + 5.195, + 7.28 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s3", + "initial": 5.7, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 10.4, + 13.49, + 20.83, + 26.8, + 32.53, + 36.77, + 41.13, + 5.7, + 7.21, + 8.735 + ], + "time": [], + "time_unit": null, + "is_simulated": false + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null + }, + { + "id": "m7", + "name": "Cephalexin synthesis 8", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s0", + "initial": 140.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 124.6, + 125.96, + 126.75, + 128.395, + 130.085, + 132.905, + 134.745, + 136.0, + 138.2, + 140.0 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s1", + "initial": 40.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 32.8, + 33.035, + 33.11, + 33.71, + 34.61, + 36.155, + 36.88, + 37.725, + 38.8, + 40.0 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 1.53, + 2.395, + 3.04, + 3.895, + 4.99, + 5.545, + 5.98, + 6.325, + 6.625 + ], + "time": [], + "time_unit": null, + "is_simulated": false + }, + { + "species_id": "s3", + "initial": 14.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 14.0, + 17.9, + 18.85, + 19.735, + 20.84, + 22.595, + 23.62, + 25.0, + 26.025, + 26.93 + ], + "time": [], + "time_unit": null, + "is_simulated": false + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null + } + ], + "equations": [], + "parameters": [ + { + "id": "K_n", + "name": "", + "symbol": "K_n", + "value": null, + "unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "initial_value": null, + "upper": null, + "lower": null, + "stderr": null, + "constant": false + }, + { + "id": "K_si", + "name": "", + "symbol": "K_si", + "value": null, + "unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "initial_value": null, + "upper": null, + "lower": null, + "stderr": null, + "constant": false + }, + { + "id": "v_r", + "name": "", + "symbol": "v_r", + "value": null, + "unit": { + "id": "u5", + "name": "l / min mmole", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": 1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": -1, + "multiplier": 1.0, + "scale": -3.0 + }, + { + "kind": "UnitType.SECOND", + "exponent": -1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "initial_value": null, + "upper": null, + "lower": null, + "stderr": null, + "constant": true + } + ] +} \ No newline at end of file diff --git a/dev-examples/legacy/Model_4.omex b/dev-examples/legacy/Model_4.omex new file mode 100644 index 0000000000000000000000000000000000000000..3783b00c3a106982ccb4620bb824b07276369267 GIT binary patch literal 13024 zcmeI2bx@UU+wSRZq`RcMJEWvTx)G2@8kFwtF6r)O(cPUA(%p^ZMxXcjRK{<|Uwih< zX3ae;Soe?n;F$Be&X`M15)|we5C{+y(AP-IclP>C0?lwhK)u00KnOrUK!#2q4Q)&; z3@z>GoGi=_wajcY#W5cFT0737mAiG>G3=@O>8LSi#|atgXJ(XxD3~)K#=wWAuEGzm zuj8ASyu7@GqbX$8G@1NzWxq^rbB^vF;U*L#$@f&_6ny?+&zz)n#aCJppbQlBM}kyTS?h=}tEX1Fu8d2%r{RSS+HTas>5RPKWgM ztSh+W!O z8EiJpabD#6DCqT&4qr1eTZ(~eYqX*VXzHnLXr%8GzdvjO;PzAm54M<9KJ1uM)SN8Y z$g3nG7@oFtgZpd+{@wlNNc=*l%48CC$g}uA&paP8LUY6Di(rEW#pW0WBW- z__|h&5T>j)7bOvtsaP%E3v%?cgf0i!M^3VH#Z;6nRYf5`MIpMp?5gc|F6@V5gVOAv zxPvfM)n4j)OE%Zlo$O+$j!n^cQkS}ZV;Mvj6G%82s91`sV8;vNV}pX~Ul~7sNnVn` zpB(g=9Hhy^0GqrsEyit2x+w{yK{x%H!lBri%qi|KK2HItFTb*m?E~u+4Z^7Y&TCV^ z&uSE>XNwL%Cf9b4^mX0Wu_N&!Q0_;pB-~pcg)`q8N=}xvjk_hYhl*9q+v;N?X}({% zlg{fi277YL%m8!KdiPZSpefQyh-Y(Ym%|f|rUs9eP?PYg(^6&;8L)*_)eVyQDUgh? z;QVv(b>BV8yqD&=?oD0kL$)Q0E2}xdaQ}nBQ5gI&G&HV;XL&hUlJ|$cejFBj= zU-00TzV+JNm%MKVMwv+3G!cCC^kvEtMM@KuhBd-eJ)7NRw_E(S)d34Clb1k_8TGCtdNpq3lsc4*Wht_YJvrazM(K@2ZOmQnnPA&jQ9fg&5E0}Kc zDU*0MRF&Sb;0G#gD%W+sjS9N81*D&6a+p&C#m&@ z=@*x2ZSdgI2a=|cp|30THI#4lgV+5`Wg~8j1Ex{t5C(%#mg6_t)2Aa@TDmLW$e=;E zwv0+>LWcT=2(9<2I}%=sn6zCwmvSS0b&$lXG>?x*E6uv%Qm~@f)sn}jphbf(%`}lC zi;RuHCeEvn(2;v36aPvLsh$rIi>ihdTGC%hSMAR$z45sOIFGO!qB4`MA#BdzYuJ2b z4w16*fq3EA2g6XqJ0|LrdpQ-(#KS(Wv+&|RF7kksOb5s$zpaw)OEh5kj6P#==`mLA zI2Pr&TMKmf!ChKXh3R+lo9`^sNmOb%T`6o`;te?)CPm!V$kbFC%{AnN4f9V5(@mLB zJaoszbbMO~CB);kB~foH=M*kVzs=tD=>zW$Qt~#G!P__F!5VuRZfv^wPu~XdO{u9J z1n-rX5Pu&)iv-(1Z#$EAJX%ct2JZ|#W)&22sa0dK8yo;7CYRj!J*zMuF2p`GsrEud z&#*r3c=0|^=vr@0O0$zb1nz_BE%WFZ>}2oYTpeS7QP^p~YqmFBBl~aB>xu92u#gOx zR!o6Ms~Qzo5+6nm9F1C;?;b!7Aep~f)u?PYFyEzqJsxuVaP?XCU{-4Bfvv+kNWS{+ zVcETMZqr>5rVD0aYm_}(z`T{UGFSXdvI*-^l4>V{>jU0x&k+>7Gj*@GRIhi!x*1xW zS>=b>)|`F8v{L`XQhzhX=WR#>kUBJZXppPF||p49I(;Ddmcij-Q_&9>;F z!>Tcs*pj#2!q42J@tJQn{{s{6XcvlT^waslb=}Y_2C>$ng3m&Q=r>C`htStS4o+N_ z*HZ6&8e1}!X&oplyM? z)4-@fZvra0sboN^IlLIIFyClfP^h|4Ilo@kaF0(~0escG2j0})Et^?3yuZG!T@3jW z3AQxRUX>D7CxqB1JZk#BVVld-ivX1W5Mfr6=YhWL@K_| zrWs5ZE20b3m%$F09ve7-V5kA_{>3AOg^GWC3HoH$ilu zs)g~uieBY#{Y?2PKx$q}aJ+KV?D{-2s%Mx{AAya#j4;yCJM|tw?B5U&HhEx1?DW6_ zjp^J@mvhn77yLF^A9jIoll$W5Uihh}c(YpQpe zWbOoo%FLovG%~rFlU{f<5*)O#V2yIAoZ z6_WC_7-%$Qex^@=g`pMF@rJv}1qKMYxW=1k%r0E{jmI?7P4qI$!T2JZ(Uz0EK9=K} z%zDR0{Ys+sYEf_Mr)cY-_LD@F+xo{!e#$#z=9mFnqMs*IiNYLPF2OOH;c;|GqSFY@feyWV=q{Iqo|{0&u* zlXdq(GitDWR=xg*zU3oaPGC3V<=aLV2FIpB0eE1vqkf=L{!zMUtwS3*Hf<6JPO-R{ zbqAaJeSO6=jEqQKO?6+qJL`ft2q)W59yl=5;=J3*oK+$HN3}Q^CfhgetQqXp5pwC< z_3&_8PP>Vi@uZpwAer;f+e16KI9#y8-WYNvxQQXd$quz&{J4j-FM}CxXyaIS&y_2I z#|{C3+6C|RWP8m$p62^+CJ3c?Gwpi2k&1(MA9>v&LHArsD}gQnp$Z3K2eh^aAs?z- zOsW{WddWP4Eur#0ah?$b`|390$994F3kR35Rrs?+yoMK^Xw#n1O=7`(>;3sH$z*n9 zB#RBb$-5*LswmMzvQU|5QL%}g=4?iji3D-%s`zU4q-u52lG;-~K7AbY_q3`u@95$c zgtmRr43b6SBHDu|%!T>#slvc;{a(EBSr8{bS-mo(M5mz0=3@QMK#_*CbWu zX+&9b74In9k8Y|LWTPJY0F*r6oW(CAV~wR^eJ-mOofT%T5H$RC3dS026_r$%7(g`U z<+Clu&$rKG;VJQuQU``s_Y}*H-Gj`H-Ahys z6QzD+u2$eBQZK;wS5`(Qkrwq!EuPW&Ry6}CZVShlu%d}fL%vmK^G-B}Ks6UFtx{Xt zjX)IqAg114-E3TFyP0zA$dGDV3vnk13Q>Rx4rjaJLBtH|Cj|y)-*q9IX4Diivip>p zsj}l3-8n8?uy<98+L=F&-mD-U@CE0R=_>p&q@P`z2x!z^M@$VK90uCZ% z;*PI6P(dEZLfj@%yQ+-b@@HqJN7U@C7BzRi| zX5BZvw;PqZ_a1AcKv|{(vCb9q!@Ucc|3Lq#9tNlxhkDBl&MrSz^3`x&Q8zWfitm9y z?vF;NbBS9;^10E$O9TRfeQtD&O>FI~Y@F%Ltv(!TY1n3Qp|~yUtg`niCUX+fy&XxG zshLqZOl3N6U`wzkjN~WJ)fCGxgG1$!C0ij8tJU9iS>-llG&ejmQ zR9ozH0txMWMw%Zx<(;~YoH>_<#R6twg@T-?DA(lOxt3d=9%`#>bQ^n4Q;B1E0zOX{ zS_GjiJBg)b?^O})@8XOW@Z)AdNXDdXr))tx$3bSRMRW6#F{_Rn`y8YV5F_#+)iG|d zaZTN1appZ)p=g$H5|nkXKId+S+D)E#rz2XpdjO#3(QC1G=jPIk5bjim$1p>rjO%3> z7^)*zlfw?xRFk2H@on&`icCnXbmtIQ*p0BpyvC~Sdqq3-W-DErVOPb^Lo%|s$7X1X zVG&{W1>M|@xpR4^aJBXkrRVlPkwD#X*{}}cs9xzBK)RyBFO~Yoex8F*vk<~b)-&a^ z!|SxKX>*9wGe&qUG!pW$zk>o7wPHDub{)errDHP>&^(r}8WMw|9TmDVeqU_zHEmU3 z; ziF4k`NgfN#6^*ZxUdR&{d_LHfw>NydY%ooH2Uw-MVVXY3vpSJVlcMfYe<((RdT{h#otzR_|$)kRcA-%=6i zmb!RAoW9$f%m;&|CP+Qf+{{Adt~>KIjYWJ{#RNdihCj6LgxI zp#I|~XbKgr(Xr}w1f+~q)&54kK z(S*YS?DV%$kl&FI=Zg!=MFym!AOnjLd%ck<78fe0XHi5mE=UPMdA={?`MxOmLQ&BI zVyv7XgBYqv`89FTf@m@+R)vAC*T9CUaf4Wtih>)MZ^<3#NH$GFVyKxEO8dkcP)H2J zLSncnYu{yMDF}!KUF63^%V&7?MMlaTXfjbv_vODM%~FUAksxED!tKwu3#(TM4Weq$ zj0T*ktqKtrzC+?9o(N2p6t2NWo(>XzM~xz1A}kzBf;>IKtvHgg>fqjM*D&^BT*my# zIJQfkBQ%P9z+ats=o2S=t89Eix*B`1PqLJke)Ct-6#Y8bOof%J=mb@ln$~Zo1do93 zCnRa@4tpWP1v0Ml@H(8GFybT`9 zsFrT6Mp%4mqWXhO-K?y+#RZJ5N!Yf91*hPqrZnhIsiB7oj0-tzsBnn2k|}d^S{{ce z{l`qG3+~@>NzVEi&uVhn6cp7ST69E6&a_OJ+fP;+I|7dfz$-(9&Khk>3gD;SZ6+CF z_cIN!4zffUPVL_cfbN4*nZ;42HITIjMHD=_s$`}uvvcbgVOv9R!$OSKs^jzyKox+g!>eOYj zF=gp}3s!H!PLwMZeSNP?f+|xK30*Is2fm2=G{~%7&~>vkny4Oq=sSD5MXb?5x#cR= zf0saT{9dLhoWAW2bF98K;AzGVxg<}|oior#^?uvw+`DGsus5_}JUpIOde?nFJ?p4Srqz{FhZU*8rbe0Y{F%do z(}$rp9gOjf?(@doF#H4-wfs7z@hp(B1&918r@GWAk{&N2(JPkQI|dWm16KX6h9ZI%1MRPzpB`; zN>FyCLdkPE;3J{Q`x2yD4lL8o#MM59=Xn{CFTM-CmtwNM3EfE&*~!JkIh1V^tIldh zr-E~`;_G^S#2P4sSJaw4%F$Wu>ZT^QKX0!ls^Dm@a(~FvIHxFoe~3C$3LsF^`_4=~ z!~@>}NK+qtwf#kdI^okPxr$7zIe&uWY^8USD}oZ{RMpl8UkjQeEbYY=3xd+Caq%9#l4ZjZ9R{~A*9 zjdDT*Iu zL1iI9SQc;Vs`;jjwHud4W`x;d(Hx%&L1dU37MXxTnT0A?Z?2)YW>n>`k&Qd0X<*sg zycBsCh0|7*AJNxowe`&yY|dd`Y^QoNk*l_@jzE91iq*<}SamH`@$ z>B+h-X3W9mu{8-A@dn)(RWJFy?9o?dRG5iLo*4?VS(O4oQ6x!p;g zhyAP<&oe87ClD6maFqkGkBycFSx|Lqttop=NpEg(DM;{6{N3?j$Fb-0KXJ2k4%d2j zcGCFa+2Cbf$(tp|iQY^WCQ1dEt8AYbL^Q-4T4GP|fX;&*PjWN-0k!isubB74ps;56 zT!~faP7_=AC3s))aKt`y*E$F2iHVU_$xxACqE6J(4t!20Mn&B72(I+3gV;UBha6U$Ij^Ne4Z79{h^rghhkpYc6d-ms5@rZ$~FO^E1lwv z`EQ^ko}r=bF<1T?VMwj68B;jZ*y*t-c@j=4UGwp6RJ3#BU1w1VOYNuQWJv%dE$
+o(6;a7A5dmy(Sn9})5gDqJ6JG&nMq zT}B*K*>0PclhFg?`skxwwy|hSyCMA7dNn+ibB|yY!y3=5P$N2gme9pciyrB6NW0xg zDdYFS|Fl=kcM3lASuyM%ikW`~MA%>`7{jyTDK8{`|1tOX`$Gq~`jXC-70G5?n>^0+ z=45G|g&7PBgq~VppLe>-n&_R#onYQ2gYW<`fl~??KZ8uBM_Q0A+m!+* zMXfc21{UYHMHB-8>ib!m(R+tiO4yTT{ySJCwEz`UZ;w{jY`Hz!&@aQyz5*HBv z3=sAhMwysr(P)2&X8R!;PqrVvjp66|tB1a$SKc8JKJ!I}ay*3kYE3_$?a$RTN1*VP zs2yIh($I9}0Q^w1M&|6z=O}`BRYifVi*O~R7%`|2S8rOxYWo5bzl%6gy*U&`SSxRR zR338PeFvlu%u?k?g}T%{mCUzWPwM@5T+vGrG7d7ZQ^Z^Ws@kVpL5|U1oKIW2nr$bS z(@+n>t?C<(H=)7%1z|hy)|DmT7VEiVxs?X`mCY8#`!m9{-_Saz8(;a( z>!adN5zlet;wNqQY6h|fXCXUSjx=5UC${fssWdqm?%UlJE6Bj3gdU zJ64o(I|!2xQ;nps5+zPe8KnY49~Z zax_koflV2H1S%V}P~I@sLeVf~ zKR{vIml=dtx@p_SGFjSR2uCX6#6jMoa1pbp7=9&tw*_66wxYZ@au4XtAN}?U*9Fq8 z&t$aPDJBx>3SjeqG0=smf9l$)MP!;Z04IU=IFqlq)%pRSG*IFvrJxrNg z8y#?+#fCyFfe@bm#5WtIM(OgcE#<2wq}qx%izPz5*&@Lz?UIVL*6Xfjq_>?;lU*9v zRy)kjt(zrdj;|ICzkgmm(!J&{cay_%0seEDYnSAM{?#?6e_WIP;hN}wT$_t{j<`yw zH6UcAoFmPJw~-y;=AiwDW}43d7nkL1)q=&npf%5&6vHOHyqO>hMlv0!&9+3@TV{`D zd0Gm^L>qn}r`$K5s#iL2npXn~ny}586rDdyo^Fx^5=a#GM$BhxUd;`f``kxG7N*F~ z%xy_;>VuU8a0@8^M)kHj-#`Ggv*+7-IvVd_Afi^yf{?Lc-6bsJg70Gd^SEM!4Vz;V z;tBneVLG$AXIroAC#gtp<#Bw`$-Kp;+;xn*OQQI!Rz`};ya!GNvDn4(S&za`;tmD@ zRQhY$0i;ArQ+9(pe!S7w8sA`C#oD#vS}~3g9G*b;A<^0~{&X$z;xqJLU1R=>Ynajh z2d;61L5UWkHk$(!!*uqk7T2_p4b<_!W)w$cad&FQuFIN1LNJWlvXIM{$s*;M!1#dV zWRM8i9@4b>q&jyLk^3qESX+-6_Nv%(fR;T8Z02og2@K_gv~^KRVFy=;1^Vb!s7UOX zRUIMJO&`a@*?N)1Ejg=MP>jy1*JoK1nm9$4s$l}%rbIJD`d5%Imoe0>i?T;?>Y4ZV z(`{VjdWMlrL+?nM$nGjjVI&q|BS}Np?VAiw|My%Yo-^M%A>v;N{&d{zb{=JZ)Kr`p);{)0bP=+Rzn0m}0V&DKk)IrZzoa(#VV*MxQ(=G92! zPQQqE@CZ4BSm;Inr)!1b(b#`=jqR_oR``21$o)$;xcgf+FxmU)fBl>dP6fl2LUBvr z?3FzEOYkV#ct*!lM4R~pQw*^pz@kX)gpErFDkbxWP_=p6OQur4+xyFZX{O}3LAZ~Y z^fWo8AR*eodVK^ahob}axwnaB(X8{f|B#+zbo^ipi|eTyCs-F+pU87~V-HVdDf6{D zRk(?uCem2m#!2|$x*={zV)YziYiNtB4}>7c+O}SE{Sm5cH^X#~iRj2z9J?p^^|x`S zH+36_adkq=@*m?jk9`}xm!8^g1r1MLi-W&r!Q9D4n44qXsk zluC2B2SA{)=b6vT5Pu7w7q6z^vv6g0HP5&Hg(Erm|yT-L5d zG5q$}mNqfAV;g=bao8{doKJjx>tjRD1G4s{>-3bN&~r9m31OFR$~pDpi>fpGnM0+Y zbExG%IW+cV4*k8-{i9yv{KqxM|6l9=x3w;y*0mPrxz1gCz7YSYbs7E>a#mgfNWRC9 zLDHY*P=~x~k%^tglJMt)GZ=S6kHUmN8Vwwgcgv20s%v}J4O-Z(z76R+7gE~@TS$Zhg zUkYoWFEc1Yl>pb&_L#=K;bvWHg>QA}Fy%k%!;+4k6_uSH#zJ*3VCQJH@lHQEYreOX zhkKMRg*S5bhF;2)FWKUle?mUUEwZnD`(}%-Cs&(c(90QjXietuKZzQWroWE^g=ovP2R z*jS^;h0)#O0QL!U_cg~;iw%l#M)itN@nxoM%VE0ttcl3TN>lagJW5FlV8wZfq}O@J zck#P^M?r6mSnbL>`mlMTkQn*$#Ja8mZPh%V&qj>37n?bmTnb|Aw)iroNP1?>pSS20 z9-~z!AVtN_==Px)T7}yTaM;mu6m%wn`$f%j(SD@ZLUdJz4PUVdIs%J%lEBXq+ozNI zy5&EcmI4s68vR_F5d}g|>l8LdWEC5+61W% zEhLjhOkO#QV&9(%TkZnER_S3GtKMRy*_h%!vM1}q>5encC**MLo-CEq9ebWnsNvs4 zQ(`tE9eP^bCxiOQciTD24wo z_;U{P68t?K{1|-v0wD-~HS<4qx0mG0#{U;7K=_ONXAJO?ecAs0VjYNnV}CZoFWHw( z;4ikA_&4@vOZbv~*$Vw)*GPV2e>O%h*_RE$FBX&RH}+?H@REI57XM;pUjN4aERtWc zFN?!ptPlBb?9Wp1CHt~O`o#h$eq(V}x&o3BoAfPtdA3yyMs|Dk@ literal 0 HcmV?d00001 diff --git a/dev-examples/legacy/enzml_legacy_to_v2.json b/dev-examples/legacy/enzml_legacy_to_v2.json new file mode 100644 index 0000000..f5f0836 --- /dev/null +++ b/dev-examples/legacy/enzml_legacy_to_v2.json @@ -0,0 +1,3185 @@ +{ + "name": "EnzymeML_Lagerman", + "references": [], + "created": null, + "modified": null, + "creators": [], + "vessels": [ + { + "id": "v0", + "name": "Falcon Tube", + "volume": 5.0, + "unit": { + "id": "u0", + "name": "ml", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "constant": true + } + ], + "proteins": [ + { + "id": "p0", + "name": "E", + "constant": false, + "sequence": "MRRLAACLLATAVAAATSAALAQTSPMTPDITGKPFVAGDAANDYVKREVMIPMRDGVKLHTVIVLPKGARNAPIVLTRTPYDASGRTERLASPHMKDLLSAGDDVFVEGGYIRVFQDVRGKYGSEGDYVMTRPLRGPLNPSEVDHATDAWDTIDWLVKNVKESNGKVGMIGSSYEGFTVVMALTNPHPALKVAAPESPMIDGWMGDDWFNYGAFRQVNFDYFTGQLSKRGKGAGIPRQGHDDYSNFLQAGSAGDFAKAAGLEQLPWWHKLTEHAAYDSFWQEQALDKVMARTPLKVPTMWLQGLWDQEDMWGAIHSYAAMEPRDKSNKLNYLVMGPWRHSQVNSDASSLGALNFDGDTARQFRRDVLRPFFDQYLVDGAPKAATPPVFIYNTGENHWDRLQAWPRSCDKGCAAKSKPLYLQAGGKLSFQAPTAAQPAFEEYVSDPAKPVPFVPRPVDFGDRSMWTTWLVHDQRFVDGRPDVLTFVTEPLTAPLQIAGAPDVHLQASTSGSDSDWVVKLIDVYPDEMAADPKMGGYELPVSMAIFRGRYRESFSTPAPLAANQPLAFQFGLPTANHTFQPGHRVMVQVQSSLFPLYDRNPQTYVPNVFFAKPGDYQKATQRVYVAPGQGSYISLPVR", + "vessel_id": "v0", + "ecnumber": "3.1.1.43", + "organism": "Xanthomonas campestris pv. campestris", + "organism_tax_id": null, + "references": [] + }, + { + "id": "p1", + "name": "EA", + "constant": false, + "sequence": "MRRLAACLLATAVAAATSAALAQTSPMTPDITGKPFVAGDAANDYVKREVMIPMRDGVKLHTVIVLPKGARNAPIVLTRTPYDASGRTERLASPHMKDLLSAGDDVFVEGGYIRVFQDVRGKYGSEGDYVMTRPLRGPLNPSEVDHATDAWDTIDWLVKNVKESNGKVGMIGSSYEGFTVVMALTNPHPALKVAAPESPMIDGWMGDDWFNYGAFRQVNFDYFTGQLSKRGKGAGIPRQGHDDYSNFLQAGSAGDFAKAAGLEQLPWWHKLTEHAAYDSFWQEQALDKVMARTPLKVPTMWLQGLWDQEDMWGAIHSYAAMEPRDKSNKLNYLVMGPWRHSQVNSDASSLGALNFDGDTARQFRRDVLRPFFDQYLVDGAPKAATPPVFIYNTGENHWDRLQAWPRSCDKGCAAKSKPLYLQAGGKLSFQAPTAAQPAFEEYVSDPAKPVPFVPRPVDFGDRSMWTTWLVHDQRFVDGRPDVLTFVTEPLTAPLQIAGAPDVHLQASTSGSDSDWVVKLIDVYPDEMAADPKMGGYELPVSMAIFRGRYRESFSTPAPLAANQPLAFQFGLPTANHTFQPGHRVMVQVQSSLFPLYDRNPQTYVPNVFFAKPGDYQKATQRVYVAPGQGSYISLPVR", + "vessel_id": "v0", + "ecnumber": "3.1.1.43", + "organism": "Xanthomonas campestris pv. campestris", + "organism_tax_id": null, + "references": [] + }, + { + "id": "p2", + "name": "ED", + "constant": false, + "sequence": "MRRLAACLLATAVAAATSAALAQTSPMTPDITGKPFVAGDAANDYVKREVMIPMRDGVKLHTVIVLPKGARNAPIVLTRTPYDASGRTERLASPHMKDLLSAGDDVFVEGGYIRVFQDVRGKYGSEGDYVMTRPLRGPLNPSEVDHATDAWDTIDWLVKNVKESNGKVGMIGSSYEGFTVVMALTNPHPALKVAAPESPMIDGWMGDDWFNYGAFRQVNFDYFTGQLSKRGKGAGIPRQGHDDYSNFLQAGSAGDFAKAAGLEQLPWWHKLTEHAAYDSFWQEQALDKVMARTPLKVPTMWLQGLWDQEDMWGAIHSYAAMEPRDKSNKLNYLVMGPWRHSQVNSDASSLGALNFDGDTARQFRRDVLRPFFDQYLVDGAPKAATPPVFIYNTGENHWDRLQAWPRSCDKGCAAKSKPLYLQAGGKLSFQAPTAAQPAFEEYVSDPAKPVPFVPRPVDFGDRSMWTTWLVHDQRFVDGRPDVLTFVTEPLTAPLQIAGAPDVHLQASTSGSDSDWVVKLIDVYPDEMAADPKMGGYELPVSMAIFRGRYRESFSTPAPLAANQPLAFQFGLPTANHTFQPGHRVMVQVQSSLFPLYDRNPQTYVPNVFFAKPGDYQKATQRVYVAPGQGSYISLPVR", + "vessel_id": "v0", + "ecnumber": "3.1.1.43", + "organism": "Xanthomonas campestris pv. campestris", + "organism_tax_id": null, + "references": [] + } + ], + "complexes": [ + { + "id": "c0", + "name": "E\u00b7PGME", + "constant": false, + "participants": [ + "p0", + "s0" + ] + }, + { + "id": "c1", + "name": "E\u00b77-ADCA", + "constant": false, + "participants": [ + "p0", + "s1" + ] + }, + { + "id": "c2", + "name": "E\u00b7PG", + "constant": false, + "participants": [ + "p0", + "s3" + ] + }, + { + "id": "c3", + "name": "E\u00b7PGME\u00b7PGME", + "constant": false, + "participants": [ + "p0", + "s0", + "s0" + ] + }, + { + "id": "c4", + "name": "EA\u00b77-ADCA", + "constant": false, + "participants": [ + "p1", + "s1" + ] + }, + { + "id": "c5", + "name": "EA\u00b7PGME", + "constant": false, + "participants": [ + "p1", + "s0" + ] + }, + { + "id": "c6", + "name": "E\u00b7CEX", + "constant": false, + "participants": [ + "p0", + "s2" + ] + } + ], + "small_molecules": [ + { + "id": "s0", + "name": "PGME", + "constant": false, + "vessel_id": "v0", + "canonical_smiles": null, + "inchi": null, + "inchikey": null, + "references": [] + }, + { + "id": "s1", + "name": "7-ADCA", + "constant": false, + "vessel_id": "v0", + "canonical_smiles": null, + "inchi": null, + "inchikey": null, + "references": [] + }, + { + "id": "s2", + "name": "CEX", + "constant": false, + "vessel_id": "v0", + "canonical_smiles": null, + "inchi": null, + "inchikey": null, + "references": [] + }, + { + "id": "s3", + "name": "PG", + "constant": false, + "vessel_id": "v0", + "canonical_smiles": null, + "inchi": null, + "inchikey": null, + "references": [] + } + ], + "reactions": [ + { + "id": "r0", + "name": "reaction-1", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_n * c1 - p0 * s1)", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c1", + "name": "c1", + "symbol": "c1" + }, + { + "id": "p0", + "name": "p0", + "symbol": "p0" + }, + { + "id": "s1", + "name": "s1", + "symbol": "s1" + } + ] + }, + "species": [ + { + "species_id": "c1", + "stoichiometry": -1.0 + }, + { + "species_id": "p0", + "stoichiometry": 1.0 + }, + { + "species_id": "s1", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r1", + "name": "reaction-2", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_s * c0 - p0 * s0)", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c0", + "name": "c0", + "symbol": "c0" + }, + { + "id": "p0", + "name": "p0", + "symbol": "p0" + }, + { + "id": "s0", + "name": "s0", + "symbol": "s0" + } + ] + }, + "species": [ + { + "species_id": "c0", + "stoichiometry": -1.0 + }, + { + "species_id": "p0", + "stoichiometry": 1.0 + }, + { + "species_id": "s0", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r10", + "name": "reaction-11", + "reversible": false, + "kinetic_law": { + "equation": "k_4 * c4 - k_4b * c6", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c4", + "name": "c4", + "symbol": "c4" + }, + { + "id": "c6", + "name": "c6", + "symbol": "c6" + } + ] + }, + "species": [ + { + "species_id": "c4", + "stoichiometry": -1.0 + }, + { + "species_id": "c6", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r11", + "name": "reaction-12", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_p * c6 - p0 * s2)", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c6", + "name": "c6", + "symbol": "c6" + }, + { + "id": "p0", + "name": "p0", + "symbol": "p0" + }, + { + "id": "s2", + "name": "s2", + "symbol": "s2" + } + ] + }, + "species": [ + { + "species_id": "c6", + "stoichiometry": -1.0 + }, + { + "species_id": "p0", + "stoichiometry": 1.0 + }, + { + "species_id": "s2", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r12", + "name": "Enzyme deactivation", + "reversible": false, + "kinetic_law": { + "equation": "k_d * p0", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "p0", + "name": "p0", + "symbol": "p0" + } + ] + }, + "species": [ + { + "species_id": "p0", + "stoichiometry": -1.0 + }, + { + "species_id": "p2", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r2", + "name": "reaction-3", + "reversible": false, + "kinetic_law": { + "equation": "k_2 * c0", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c0", + "name": "c0", + "symbol": "c0" + } + ] + }, + "species": [ + { + "species_id": "c0", + "stoichiometry": -1.0 + }, + { + "species_id": "p1", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r3", + "name": "reaction-4", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_si * c3 - c0 * s0)", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c0", + "name": "c0", + "symbol": "c0" + }, + { + "id": "c3", + "name": "c3", + "symbol": "c3" + }, + { + "id": "s0", + "name": "s0", + "symbol": "s0" + } + ] + }, + "species": [ + { + "species_id": "c0", + "stoichiometry": 1.0 + }, + { + "species_id": "c3", + "stoichiometry": -1.0 + }, + { + "species_id": "s0", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r4", + "name": "reaction-5", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_si * c5 - p1 * s0)", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c5", + "name": "c5", + "symbol": "c5" + }, + { + "id": "p1", + "name": "p1", + "symbol": "p1" + }, + { + "id": "s0", + "name": "s0", + "symbol": "s0" + } + ] + }, + "species": [ + { + "species_id": "c5", + "stoichiometry": -1.0 + }, + { + "species_id": "p1", + "stoichiometry": 1.0 + }, + { + "species_id": "s0", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r5", + "name": "reaction-6", + "reversible": false, + "kinetic_law": { + "equation": "k_6 * c5", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c5", + "name": "c5", + "symbol": "c5" + } + ] + }, + "species": [ + { + "species_id": "c5", + "stoichiometry": -1.0 + }, + { + "species_id": "p0", + "stoichiometry": 1.0 + }, + { + "species_id": "s3", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r6", + "name": "reaction-7", + "reversible": false, + "kinetic_law": { + "equation": "k_3 * p1", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "p1", + "name": "p1", + "symbol": "p1" + } + ] + }, + "species": [ + { + "species_id": "p0", + "stoichiometry": 1.0 + }, + { + "species_id": "p1", + "stoichiometry": -1.0 + }, + { + "species_id": "s3", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r7", + "name": "reaction-8", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_pg * c2 - p0 * s3)", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c2", + "name": "c2", + "symbol": "c2" + }, + { + "id": "p0", + "name": "p0", + "symbol": "p0" + }, + { + "id": "s3", + "name": "s3", + "symbol": "s3" + } + ] + }, + "species": [ + { + "species_id": "c2", + "stoichiometry": -1.0 + }, + { + "species_id": "p0", + "stoichiometry": 1.0 + }, + { + "species_id": "s3", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r8", + "name": "reaction-9", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_n * c4 - p1 * s1)", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c4", + "name": "c4", + "symbol": "c4" + }, + { + "id": "p1", + "name": "p1", + "symbol": "p1" + }, + { + "id": "s1", + "name": "s1", + "symbol": "s1" + } + ] + }, + "species": [ + { + "species_id": "c4", + "stoichiometry": -1.0 + }, + { + "species_id": "p1", + "stoichiometry": 1.0 + }, + { + "species_id": "s1", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + }, + { + "id": "r9", + "name": "reaction-10", + "reversible": false, + "kinetic_law": { + "equation": "k_5 * c4", + "equation_type": "EquationType.RATE_LAW", + "species_id": null, + "variables": [ + { + "id": "c4", + "name": "c4", + "symbol": "c4" + } + ] + }, + "species": [ + { + "species_id": "c4", + "stoichiometry": -1.0 + }, + { + "species_id": "p0", + "stoichiometry": 1.0 + }, + { + "species_id": "s1", + "stoichiometry": 1.0 + }, + { + "species_id": "s3", + "stoichiometry": 1.0 + } + ], + "modifiers": [] + } + ], + "measurements": [ + { + "id": "m0", + "name": "Cephalexin synthesis 1", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s0", + "initial": 20.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.645, + 12.45, + 16.385, + 20.0, + 5.135, + 9.255 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s1", + "initial": 10.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 10.0, + 10.575, + 5.18, + 5.815, + 5.94, + 7.025, + 7.57, + 8.72, + 8.945, + 9.87 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 0.575, + 1.075, + 1.915, + 2.66, + 3.24, + 3.885, + 4.815, + 4.9, + 5.755 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s3", + "initial": 2.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 11.965, + 17.28, + 19.93, + 2.0, + 21.36, + 22.55, + 23.38, + 3.705, + 5.77, + 8.035 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null + }, + { + "id": "m1", + "name": "Cephalexin synthesis 2", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s0", + "initial": 20.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 0.0, + 0.0, + 0.0, + 1.32, + 12.67, + 16.5, + 20.0, + 5.91, + 9.915 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s1", + "initial": 20.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 12.625, + 13.14, + 14.2, + 14.82, + 15.445, + 16.255, + 17.02, + 18.5, + 18.58, + 20.0 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 2.0, + 3.205, + 4.1, + 5.09, + 5.63, + 6.385, + 7.17, + 7.855, + 8.225 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s3", + "initial": 1.3, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 1.3, + 13.25, + 16.055, + 17.62, + 19.34, + 2.955, + 20.8, + 4.615, + 6.175, + 8.8 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null + }, + { + "id": "m2", + "name": "Cephalexin synthesis 3", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s0", + "initial": 20.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.91, + 13.005, + 20.0, + 4.0, + 7.21, + 9.505 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s1", + "initial": 40.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 29.985, + 30.405, + 30.675, + 31.905, + 32.49, + 33.045, + 33.87, + 34.525, + 36.555, + 40.0 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 3.59, + 5.57, + 5.69, + 6.39, + 6.85, + 7.255, + 8.18, + 8.24, + 8.945 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s3", + "initial": 5.1, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 10.13, + 12.93, + 14.565, + 15.8, + 16.98, + 18.15, + 5.1, + 6.365, + 7.59, + 8.59 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null + }, + { + "id": "m3", + "name": "Cephalexin synthesis 4", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s0", + "initial": 20.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 0.0, + 0.0, + 0.385, + 1.455, + 11.64, + 15.345, + 20.0, + 5.265, + 8.975 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s1", + "initial": 60.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 47.6, + 48.185, + 48.265, + 49.0, + 50.76, + 51.6, + 52.505, + 53.58, + 56.8, + 60.0 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 10.2, + 11.065, + 11.325, + 3.77, + 6.11, + 7.74, + 9.005, + 9.595, + 9.66 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s3", + "initial": 1.9, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 1.9, + 10.61, + 12.0, + 13.075, + 14.24, + 2.94, + 3.99, + 4.935, + 6.305, + 8.87 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null + }, + { + "id": "m4", + "name": "Cephalexin synthesis 5", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s0", + "initial": 20.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 0.0, + 0.0, + 0.35, + 1.46, + 12.075, + 15.34, + 20.0, + 5.515, + 9.335 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s1", + "initial": 42.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 29.595, + 30.615, + 31.46, + 31.83, + 32.985, + 34.06, + 34.08, + 36.06, + 38.405, + 42.0 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 3.42, + 5.52, + 6.695, + 6.99, + 7.47, + 8.515, + 8.78, + 9.44, + 9.875 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s3", + "initial": 1.5, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 1.5, + 11.49, + 13.08, + 14.505, + 15.63, + 2.815, + 4.105, + 5.085, + 6.69, + 9.535 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null + }, + { + "id": "m5", + "name": "Cephalexin synthesis 6", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s0", + "initial": 40.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.84, + 1.695, + 10.1, + 21.225, + 27.01, + 3.33, + 31.035, + 34.595, + 40.0, + 5.9 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s1", + "initial": 42.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 22.595, + 23.0, + 23.09, + 24.5, + 24.8, + 29.17, + 32.805, + 34.9, + 37.9, + 42.0 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 11.1, + 15.255, + 15.645, + 15.81, + 16.345, + 16.5, + 3.625, + 6.4, + 8.5 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s3", + "initial": 3.3, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 11.1, + 17.315, + 20.5, + 22.605, + 24.925, + 26.5, + 3.3, + 4.75, + 6.13, + 7.52 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null + }, + { + "id": "m6", + "name": "Cephalexin synthesis 7", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s0", + "initial": 76.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 19.7, + 24.655, + 30.4, + 38.03, + 46.9, + 60.2, + 65.6, + 69.3, + 73.36, + 76.0 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s1", + "initial": 40.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 18.36, + 19.445, + 20.805, + 22.94, + 25.965, + 31.025, + 34.09, + 36.175, + 38.51, + 40.0 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 10.295, + 15.76, + 18.74, + 20.755, + 21.89, + 22.875, + 3.04, + 5.195, + 7.28 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s3", + "initial": 5.7, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 10.4, + 13.49, + 20.83, + 26.8, + 32.53, + 36.77, + 41.13, + 5.7, + 7.21, + 8.735 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null + }, + { + "id": "m7", + "name": "Cephalexin synthesis 8", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s0", + "initial": 140.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 124.6, + 125.96, + 126.75, + 128.395, + 130.085, + 132.905, + 134.745, + 136.0, + 138.2, + 140.0 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s1", + "initial": 40.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 32.8, + 33.035, + 33.11, + 33.71, + 34.61, + 36.155, + 36.88, + 37.725, + 38.8, + 40.0 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 0.0, + 1.53, + 2.395, + 3.04, + 3.895, + 4.99, + 5.545, + 5.98, + 6.325, + 6.625 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + }, + { + "species_id": "s3", + "initial": 14.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "data_type": "DataTypes.CONCENTRATION", + "prepared": null, + "data": [ + 14.0, + 17.9, + 18.85, + 19.735, + 20.84, + 22.595, + 23.62, + 25.0, + 26.025, + 26.93 + ], + "time": [ + 0.0, + 1.0, + 10.0, + 15.0, + 2.0, + 20.0, + 25.0, + 3.0, + 30.0, + 5.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "UnitType.SECOND", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "is_simulated": false + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null + } + ], + "equations": [], + "parameters": [ + { + "id": "K_n", + "name": "", + "symbol": "K_n", + "value": null, + "unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "initial_value": null, + "upper": null, + "lower": null, + "stderr": null, + "constant": false + }, + { + "id": "K_si", + "name": "", + "symbol": "K_si", + "value": null, + "unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0 + } + ] + }, + "initial_value": null, + "upper": null, + "lower": null, + "stderr": null, + "constant": false + }, + { + "id": "v_r", + "name": "", + "symbol": "v_r", + "value": null, + "unit": { + "id": "u5", + "name": "l / min mmole", + "base_units": [ + { + "kind": "UnitType.LITRE", + "exponent": 1, + "multiplier": 1.0, + "scale": 1.0 + }, + { + "kind": "UnitType.MOLE", + "exponent": -1, + "multiplier": 1.0, + "scale": -3.0 + }, + { + "kind": "UnitType.SECOND", + "exponent": -1, + "multiplier": 60.0, + "scale": 1.0 + } + ] + }, + "initial_value": null, + "upper": null, + "lower": null, + "stderr": null, + "constant": true + } + ] +} \ No newline at end of file diff --git a/dev-examples/odes/enzymeml.json b/dev-examples/odes/enzymeml.json index aa587a1..ac2726a 100644 --- a/dev-examples/odes/enzymeml.json +++ b/dev-examples/odes/enzymeml.json @@ -12,7 +12,7 @@ "modified": "schema:dateModified", "creators": "schema:creator" }, - "@id": "enzml:EnzymeMLDocument/0e46ba63-85a2-4030-ae03-9cffa8f347cd", + "@id": "enzml:EnzymeMLDocument/bb1cafa6-fe2a-4ad1-b482-5f70fcddb14d", "@type": [ "enzml:EnzymeMLDocument" ], @@ -32,7 +32,7 @@ "name": "schema:name", "volume": "OBO:OBI_0002139" }, - "@id": "enzml:Vessel/fedbf6f5-4515-4868-830f-1b41033de3b8", + "@id": "enzml:Vessel/cf0cec45-255b-4aac-80af-8a0ba95f0c8a", "@type": [ "enzml:Vessel", "OBO:OBI_0400081" @@ -59,7 +59,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/9f6745b1-66d0-4180-b1ac-c10cc8e87c96", + "@id": "enzml:BaseUnit/5b814786-75f3-4d74-8d67-e1e898835ea9", "@type": [ "enzml:BaseUnit" ], @@ -96,7 +96,7 @@ "@type": "@id" } }, - "@id": "enzml:Protein/d8bc713a-bcf5-4c24-981b-16a7baa1cc0b", + "@id": "enzml:Protein/cd86e6ac-619a-471f-9c25-7c9de9e69ecd", "@type": [ "enzml:Protein", "schema:Protein" @@ -127,7 +127,7 @@ "@type": "@id" } }, - "@id": "enzml:Complex/ef2c11f9-4278-487e-94cc-fc94fb622a47", + "@id": "enzml:Complex/1a22de61-05d9-42b0-9f59-8d7f12350d82", "@type": [ "enzml:Complex" ], @@ -160,7 +160,7 @@ "@type": "@id" } }, - "@id": "enzml:SmallMolecule/58414ec1-a6f1-42dc-94e5-1380c63b20a2", + "@id": "enzml:SmallMolecule/7ddb6f4f-e481-44b4-a492-c33a11f69d20", "@type": [ "enzml:SmallMolecule" ], @@ -191,7 +191,7 @@ "@type": "@id" } }, - "@id": "enzml:SmallMolecule/9c87ae6f-44b4-44db-bd5a-e4f7b99ddd19", + "@id": "enzml:SmallMolecule/821a5000-8817-494a-bef6-8d6ca7a79063", "@type": [ "enzml:SmallMolecule" ], @@ -219,7 +219,7 @@ "@type": "@id" } }, - "@id": "enzml:Measurement/0426ea51-df1f-43d8-9e12-a21f95fc9c2f", + "@id": "enzml:Measurement/a0bb13f4-09e2-4ef6-88c3-81a45783d52a", "@type": [ "enzml:Measurement" ], @@ -235,7 +235,7 @@ "@type": "@id" } }, - "@id": "enzml:MeasurementData/f8664861-2026-4a5b-97a0-35bae4e99892", + "@id": "enzml:MeasurementData/d2b27968-a75d-4f7b-992f-74bd2601cf83", "@type": [ "enzml:MeasurementData" ], @@ -260,7 +260,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/1e8d1272-168b-497c-a82f-9adaf7042d23", + "@id": "enzml:BaseUnit/5a6b868d-f0e5-46c1-99c6-c6ad46b0bef6", "@type": [ "enzml:BaseUnit" ], @@ -274,7 +274,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/7ded7917-83b4-4507-a055-ab1d19b5341b", + "@id": "enzml:BaseUnit/798cadb6-71d8-4e9d-a8f9-aaa52c85a143", "@type": [ "enzml:BaseUnit" ], @@ -284,6 +284,33 @@ } ] }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "data": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", @@ -303,7 +330,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/a2d6d606-d789-40e4-8246-0a2af736575f", + "@id": "enzml:BaseUnit/0aa687a8-60e2-4586-97b4-ae4c53eb16a3", "@type": [ "enzml:BaseUnit" ], @@ -313,33 +340,6 @@ } ] }, - "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", - "data": [ - 0.0, - 1.0, - 2.0, - 3.0, - 4.0, - 5.0, - 6.0, - 7.0, - 8.0, - 9.0, - 10.0 - ], - "time": [ - 0.0, - 1.0, - 2.0, - 3.0, - 4.0, - 5.0, - 6.0, - 7.0, - 8.0, - 9.0, - 10.0 - ], "is_simulated": false }, { @@ -351,7 +351,7 @@ "@type": "@id" } }, - "@id": "enzml:MeasurementData/ba922ab1-567e-4cdd-a015-cb00baf1dc9a", + "@id": "enzml:MeasurementData/6e9ff229-02f2-45dd-ab30-00092b574a18", "@type": [ "enzml:MeasurementData" ], @@ -376,7 +376,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/1e8d1272-168b-497c-a82f-9adaf7042d23", + "@id": "enzml:BaseUnit/5a6b868d-f0e5-46c1-99c6-c6ad46b0bef6", "@type": [ "enzml:BaseUnit" ], @@ -390,7 +390,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/7ded7917-83b4-4507-a055-ab1d19b5341b", + "@id": "enzml:BaseUnit/798cadb6-71d8-4e9d-a8f9-aaa52c85a143", "@type": [ "enzml:BaseUnit" ], @@ -400,6 +400,33 @@ } ] }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "data": [ + 10.0, + 9.0, + 8.0, + 7.0, + 6.0, + 5.0, + 4.0, + 3.0, + 2.0, + 1.0, + 0.0 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", @@ -419,7 +446,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/a2d6d606-d789-40e4-8246-0a2af736575f", + "@id": "enzml:BaseUnit/0aa687a8-60e2-4586-97b4-ae4c53eb16a3", "@type": [ "enzml:BaseUnit" ], @@ -429,33 +456,6 @@ } ] }, - "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", - "data": [ - 10.0, - 9.0, - 8.0, - 7.0, - 6.0, - 5.0, - 4.0, - 3.0, - 2.0, - 1.0, - 0.0 - ], - "time": [ - 0.0, - 1.0, - 2.0, - 3.0, - 4.0, - 5.0, - 6.0, - 7.0, - 8.0, - 9.0, - 10.0 - ], "is_simulated": false } ], @@ -480,7 +480,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/1a31c8a4-6212-4810-804f-59c5cffd10c5", + "@id": "enzml:BaseUnit/3da5f43e-3bc8-47d2-b646-d964453b6b8c", "@type": [ "enzml:BaseUnit" ], @@ -504,7 +504,7 @@ "@type": "@id" } }, - "@id": "enzml:Measurement/d81322ba-5094-446e-b224-4795ff25615a", + "@id": "enzml:Measurement/1c7c87dc-9faa-49b5-8775-0d55391dcfb3", "@type": [ "enzml:Measurement" ], @@ -520,7 +520,7 @@ "@type": "@id" } }, - "@id": "enzml:MeasurementData/2c021e30-5731-4893-baf4-f337b46a51ca", + "@id": "enzml:MeasurementData/a6e83621-8b3b-4dfe-8ac7-010c8b666330", "@type": [ "enzml:MeasurementData" ], @@ -545,7 +545,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/1e8d1272-168b-497c-a82f-9adaf7042d23", + "@id": "enzml:BaseUnit/5a6b868d-f0e5-46c1-99c6-c6ad46b0bef6", "@type": [ "enzml:BaseUnit" ], @@ -559,7 +559,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/7ded7917-83b4-4507-a055-ab1d19b5341b", + "@id": "enzml:BaseUnit/798cadb6-71d8-4e9d-a8f9-aaa52c85a143", "@type": [ "enzml:BaseUnit" ], @@ -569,6 +569,33 @@ } ] }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "data": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", @@ -588,7 +615,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/a2d6d606-d789-40e4-8246-0a2af736575f", + "@id": "enzml:BaseUnit/0aa687a8-60e2-4586-97b4-ae4c53eb16a3", "@type": [ "enzml:BaseUnit" ], @@ -598,33 +625,6 @@ } ] }, - "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", - "data": [ - 0.0, - 1.0, - 2.0, - 3.0, - 4.0, - 5.0, - 6.0, - 7.0, - 8.0, - 9.0, - 10.0 - ], - "time": [ - 0.0, - 1.0, - 2.0, - 3.0, - 4.0, - 5.0, - 6.0, - 7.0, - 8.0, - 9.0, - 10.0 - ], "is_simulated": false }, { @@ -636,7 +636,7 @@ "@type": "@id" } }, - "@id": "enzml:MeasurementData/458293b5-22ca-41c2-9b25-0f98c05ce480", + "@id": "enzml:MeasurementData/1314c3a8-6422-4192-985c-eb8fa1d99980", "@type": [ "enzml:MeasurementData" ], @@ -661,7 +661,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/1e8d1272-168b-497c-a82f-9adaf7042d23", + "@id": "enzml:BaseUnit/5a6b868d-f0e5-46c1-99c6-c6ad46b0bef6", "@type": [ "enzml:BaseUnit" ], @@ -675,7 +675,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/7ded7917-83b4-4507-a055-ab1d19b5341b", + "@id": "enzml:BaseUnit/798cadb6-71d8-4e9d-a8f9-aaa52c85a143", "@type": [ "enzml:BaseUnit" ], @@ -685,6 +685,33 @@ } ] }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "data": [ + 10.0, + 9.0, + 8.0, + 7.0, + 6.0, + 5.0, + 4.0, + 3.0, + 2.0, + 1.0, + 0.0 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6.0, + 7.0, + 8.0, + 9.0, + 10.0 + ], "time_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", @@ -704,7 +731,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/a2d6d606-d789-40e4-8246-0a2af736575f", + "@id": "enzml:BaseUnit/0aa687a8-60e2-4586-97b4-ae4c53eb16a3", "@type": [ "enzml:BaseUnit" ], @@ -714,33 +741,6 @@ } ] }, - "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", - "data": [ - 10.0, - 9.0, - 8.0, - 7.0, - 6.0, - 5.0, - 4.0, - 3.0, - 2.0, - 1.0, - 0.0 - ], - "time": [ - 0.0, - 1.0, - 2.0, - 3.0, - 4.0, - 5.0, - 6.0, - 7.0, - 8.0, - 9.0, - 10.0 - ], "is_simulated": false } ], @@ -765,7 +765,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/1a31c8a4-6212-4810-804f-59c5cffd10c5", + "@id": "enzml:BaseUnit/3da5f43e-3bc8-47d2-b646-d964453b6b8c", "@type": [ "enzml:BaseUnit" ], @@ -787,7 +787,7 @@ "@type": "@id" } }, - "@id": "enzml:Equation/07b5e8fb-729c-4e1d-892e-46be9e9e6d56", + "@id": "enzml:Equation/a4665d71-b871-4ed3-8a7b-d5e7442b8725", "@type": [ "enzml:Equation" ], @@ -802,7 +802,7 @@ "schema": "https://schema.org/", "id": "schema:identifier" }, - "@id": "enzml:Variable/edde9e7a-ce67-4af4-8788-0f96716d0e85", + "@id": "enzml:Variable/441b9040-316f-49cb-a330-31e97b577f17", "@type": [ "enzml:Variable" ], @@ -821,7 +821,7 @@ "@type": "@id" } }, - "@id": "enzml:Equation/77814fb8-a848-4759-8354-32a9f7a19a49", + "@id": "enzml:Equation/5f294b78-c121-482d-99be-3e46bd61590a", "@type": [ "enzml:Equation" ], @@ -842,25 +842,25 @@ "@type": "@id" } }, - "@id": "enzml:Parameter/8bd75c32-151d-4a05-9e36-be114db34334", + "@id": "enzml:Parameter/8edaa5b7-3744-46b8-ae22-17ed824e4a61", "@type": [ "enzml:Parameter" ], - "id": "E_tot", - "name": "E_tot", - "symbol": "E_tot", + "id": "kcat", + "name": "kcat", + "symbol": "kcat", "unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "OBO:UO_0000063", + "@id": "OBO:UO_0000010", "@type": [ "OBO:UO_0000000" ], - "id": "u2", - "name": "mmol / l", + "id": "u4", + "name": "1 / s", "base_units": [ { "@context": { @@ -868,25 +868,11 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/1e8d1272-168b-497c-a82f-9adaf7042d23", + "@id": "enzml:BaseUnit/0aa687a8-60e2-4586-97b4-ae4c53eb16a3", "@type": [ "enzml:BaseUnit" ], - "kind": "mole", - "exponent": 1, - "scale": -3.0 - }, - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/7ded7917-83b4-4507-a055-ab1d19b5341b", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "litre", + "kind": "second", "exponent": -1, "scale": 1.0 } @@ -907,13 +893,13 @@ "@type": "@id" } }, - "@id": "enzml:Parameter/e63b8e5b-56a5-4b8e-98be-18e829b179f1", + "@id": "enzml:Parameter/8d12e348-6953-44af-b5b4-58691e08b71b", "@type": [ "enzml:Parameter" ], - "id": "K_m", - "name": "K_m", - "symbol": "K_m", + "id": "E_tot", + "name": "E_tot", + "symbol": "E_tot", "unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", @@ -933,7 +919,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/1e8d1272-168b-497c-a82f-9adaf7042d23", + "@id": "enzml:BaseUnit/5a6b868d-f0e5-46c1-99c6-c6ad46b0bef6", "@type": [ "enzml:BaseUnit" ], @@ -947,7 +933,7 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/7ded7917-83b4-4507-a055-ab1d19b5341b", + "@id": "enzml:BaseUnit/798cadb6-71d8-4e9d-a8f9-aaa52c85a143", "@type": [ "enzml:BaseUnit" ], @@ -972,25 +958,25 @@ "@type": "@id" } }, - "@id": "enzml:Parameter/158b36f9-74bd-4148-b3f8-5a2a77ea5571", + "@id": "enzml:Parameter/c95843d7-8798-455d-b48e-e8db56971579", "@type": [ "enzml:Parameter" ], - "id": "kcat", - "name": "kcat", - "symbol": "kcat", + "id": "K_m", + "name": "K_m", + "symbol": "K_m", "unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "OBO:UO_0000010", + "@id": "OBO:UO_0000063", "@type": [ "OBO:UO_0000000" ], - "id": "u4", - "name": "1 / s", + "id": "u2", + "name": "mmol / l", "base_units": [ { "@context": { @@ -998,11 +984,25 @@ "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/" }, - "@id": "enzml:BaseUnit/a2d6d606-d789-40e4-8246-0a2af736575f", + "@id": "enzml:BaseUnit/5a6b868d-f0e5-46c1-99c6-c6ad46b0bef6", "@type": [ "enzml:BaseUnit" ], - "kind": "second", + "kind": "mole", + "exponent": 1, + "scale": -3.0 + }, + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + }, + "@id": "enzml:BaseUnit/798cadb6-71d8-4e9d-a8f9-aaa52c85a143", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "litre", "exponent": -1, "scale": 1.0 } diff --git a/dev-examples/odes/odes_example.omex b/dev-examples/odes/odes_example.omex index 3b46bafbba626a6f9480f942ae68acaa0067f882..bfdc0204c76a21af43b3c0a319e52faff3c509dd 100644 GIT binary patch delta 1915 zcmV->2ZZ?f68jPjP)h>@6aWAK2msP>B(V($0SVG@Bw3l+6@~bd9sw4A+iu%95Pi>A z20+RUs5+qvK>2(TO?^>AdrUSXgFsM zIYVji_BQaPIY}6e!l4X%sw|NZM;;BYhVtd~6xj0H(cXZ$yc_QtvY~vPrt!X_+}zys zgt!+aSBkh$d@?6~Un#YJX$p=KB1^e+DEH;XV>EfRCrN`K@`x{mC?G?5N?4jpxg3RI zl%kY(Ed*Rd!XI}53H*HzrKm7uzmgRevC^bUnwvG(WNAiyu3wDnrED%&Dw|3Jf>@T2 zfP|?;y`da%FBE2ptCR-hGNkEH&R}DBQvr@bj|ziXv%T3PzLw^H$j`V+i~Cqv*DWPM zOcIoGYpVX5WA~sTOIcw;zdd-MY%pS>o5ciE!j6Rp%j==c)LJw5ReBfmCmxM2j!rJ7 zpAM#H4Tne>y%bR||gETDorf`3eCY$5B*G(KNt&0CpFq z=oWnW zTwOv~lqHyKtx;VLPNidKJN!zQG?858yaqJw@D!j(-)YEy!SHD+R(En6M3eF@x2#zt%f~_d`Xd>Blu?jC4tXz*b4g%Ap;iU;BG^v-V@j}j1{Q9 zq*!4@>~*W7Wyh%ZE7adTN7S{Kg!*^l&uREuP}eKeA>SKb`Tq3yzJq1H*>x#fEUh|< zf*2*KNJSTa+VDb{N6Wmy8!bn0 zVa>j9_NempKxs<5Be>7F-_Aq`Yq0O+Mv4les79859i(yUC|}OsPja1ayeM;dS~3#F z%s}ZVdmzEqd!tLNpXO?AoX*X&;jbX;Kxu@2n?%b*DH${=O2b-3St?4*jiw|ChVq0v zRje+W!E7U6&YzCHQYNPY%$=8ArP3cX zdgEbK>fo|Q$3v;pI`%14KInLH-PsVqVHUU~8NpuuYaEKyO>2g7%_yWSr~z1R*)Vd7 zZqK|C)cU%yVsz2EMg=4PWhBI;jG1Nm>f@|`(si4bB)0Veoee_oSWEYKcf(k^M<`EMD)$kmkYpx2Mnc)E2vt}G*L-lNJn?+;UclR$N4<~j7 z$qq@03za(|rP!D#rZEy5U#vFcx7o7IXtvGh)_HF}jolGMw+e!=njkg0D>mUgVMhLc zQN$@6ica}^7~XJ=*f{j>^0A0FUKSZ}u~k2M?|!n>ngq!A&m*7U%qNQFd9FFrXMpH7 z1iJ3(0O^hfaKDcroSBZNsrM7C_WiCI)iQLKykbqoJ7E_M@il!%?nWP{hm*rEpQk4W z=O-V>;PT(o)6;|T*U166XfUGgzHTRf3aHPSaCG$7aQyeUxfK-+t9jO%)-PaNeXz*$ z4==;%)?9ZViOM`!?i%)(siJJo30HI z;ZKDY;W?g8bYwz#7X?`L#GRH;HB7q*aX-2t$zha*-Y7rMS=F#+Xcos+4_>mi1~;14 zaUu1N$($CEqP7aRR@0g~sPe%kJ}hvK=Lr{@ z0oUMJmtmU@B&zLN(0z^bKOxS4-+c?}mv-Xv<-|C43|sGe7O*YH2D)K*z}0O6i0!$C z=~&RPoYxqCfiYfXH{DF8OmNPM^5B3mdKI=`R?%*g#O?w&@~a)7VMu_|>lGhlE`r=v z&Uu&o-}(FYmvA^NKk%YqO0Ia|j3n+`@y4KafF~ZYnB=}5|BOQ26zHj5m4eJfK}wDI|`Fn6_Kv7fE6i|+@If9{f~8`o7V zw!^uOSKeKGr99dj@6aWAK2msP>B$G7=lLOLlB$LYsHwn^kBw3l+ z6@~bd3kfa*(r_e`JP8{jDhL1oWMOn+E_8EtP)h{{000000{{a6rvLx|z6byS003yk BqagqQ delta 1891 zcmV-p2b}o(68RDhP)h>@6aWAK2mtb`6R`~l0SWS|6Is7amzegG9sw4ATXUN_5Pr|E zVCc&^4>E|04H?^=T+hk0iQC%gv`-x&M4~CTgTP7p>yO0EfbH06+)k1vnel)w%WA*< zR=a}X+uOjG<|JV>3P&>Rsj@^u9Jw^S8p)TlQ((z&$9qHO@L_yt$VT#Yn#TKza&vRj z6V1ISxl+W1;*&Y?b)}SlrYSf|h%Du;BUzUhkJ04uo+J%}$R)lMqJWI#8DVMO%G*&G zMkz}9(4v7ik?_Y|Kmvc?MJXy2*{|9PjaaEt)taj{*JR0~K9?`%^-?yME0Im10YNNF zNI=3=qV7lzxD^Vu#8pZIav9QeBxkTOy(s`kp-Y9rtl8fj5noGxbL3}St zK}-^qa&4;dnr-!OTIsTS=u?(XJOS1* z@o3n##xQHO=SXLN3tIY39xum>yg6~b{ZGfIWwhXTtgC*M@@XImYarBq?; zTwFp}lqHyKEm2)|PNkz~+x<$DG?83oyaqIF_Y|N=-)YEy!SHD+qC2^bqmYBoeMpuV zMk3Y%z3nV3qz#oezW2he)vyPVFDcS<1i!DpB=9*7TVcP!Wx!${+^x&hdjflgz5>;k z7L)>=<>uLjB!yL|uDHsDCH^oQA&zb)!NZ^1b1e?@y2KI|%d5p-b6fsnt;w z#3)HcD!Pz=h8K;wx6JDt@-tzKm!Cp6`XkSQiwu|*i6&nJOOa4NO)~OeubLcAHlii} ztOu6!7``R}T9m)VeLnZ$PP(FYRtgg-9&sJ7@0q|bA^)-Z7O-^H1JE&`s_QP%ofWBV zq0PQ9_PDb3P-(VyXKJ z%uwkFdmzEqTcb;?pXO?=oWa$z;IAO-P-(b+n?%b*DH${^O2b-2St?4*iDo1TM)H&! zRYVuf{^) zYdnlf9bDGPcqnyR$3BI~2OTf2I~yW6%mRlbW7y088;2rw*P5wZG72dRY5&*pp-}= zjQQmD(OdPC4I1SF72;_aLeB<MV^1S z8BVw68hj;NK{gv(14Q~BFbv1wKdu8D*F=CA-oUYK*L9(NKiNvtzf$eFQmraPTlHpH zgML5>hchL~f|haBlvD8JTN2W9#$(dTZau{WyJI+sZR&}hIn#FN7f)}l=$&Idc zY)IW>GN*;7sIAhi)wQM)s%)@{5laI*e*W%TP`}O)moLZ12~VjkVmiR=BNG_>8rYUY z0JMmu*$y1o9(?ujKf%YpV^oKK^5VMka^u;1IW#Rt@AImCU^qOIL&E}&?peS@8X61; zGR?uOm%l_Wud+b^qVw@YGoffM;vp3_hyKA`{ZYk${ zNd9yFzWpT}4$BX`Xqb{K?l@zK+g7|WXdU2*M=Tb(q+5Hj>sD1R`cu|_$RmfMP!=uH z93>Pv;>93?TM)d4rkclg;+~bX&UuQss_f6ywO{hpx@>%T`WVbm9Q)n;-KBHtk}m64 zjO4B2yGXWt-j3;5%6&_qPgiz}xV*lXsVn;U`d6sCTCv#A*678vp2t6Tsj2JNl`pp4 zx%O8+TzsWG-W%rMIFI)a{s&M?0|XQR000O8@~RV)Hwcph@~RV)%?LLM@~RVAzfG5z d_LB_>E(7wa6O%p(8v!VjS_vBlya)gQ004z|j+Oub diff --git a/dev-examples/odes/odes_example.xml b/dev-examples/odes/odes_example.xml index 73381af..18db5b6 100644 --- a/dev-examples/odes/odes_example.xml +++ b/dev-examples/odes/odes_example.xml @@ -88,7 +88,7 @@ - + Vessel 1 10.0 @@ -102,7 +102,7 @@ - + Enzyme MTEY E.coli @@ -121,7 +121,7 @@ - + Enzyme-Substrate Complex @@ -135,7 +135,7 @@ - + Substrate @@ -149,7 +149,7 @@ - + Product @@ -162,10 +162,10 @@ - + - + @@ -176,10 +176,10 @@ - + - + @@ -190,10 +190,10 @@ - + - + diff --git a/dev-examples/odes/odes_example_test.xml b/dev-examples/odes/odes_example_test.xml new file mode 100644 index 0000000..aac8bbc --- /dev/null +++ b/dev-examples/odes/odes_example_test.xml @@ -0,0 +1,241 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Vessel 1 + 10.0 + + + + + + + + + + + + + Enzyme + MTEY + E.coli + + + + + + 1.1.1.1 + E.coli + 12345 + MTEY + + + + + + + + Enzyme-Substrate Complex + + + + + p0 + s0 + + + + + + + + Substrate + + + + + QTBSBXVTEAMEQO-UHFFFAOYSA-N + + + + + + + + + Product + + + + + QTBSBXVTEAMEQO-UHFFFAOYSA-N + + + + + + + + + + + + + + + 0.0 + 100.0 + 0.1 + + + + + + + + + + + + 0.0 + 100.0 + 0.1 + + + + + + + + + + + + 0.0 + 100.0 + 0.1 + + + + + + + + 100 + + + + + + + + + + + + + + + + E_tot + kcat + s0 + + + + K_m + s0 + + + + + + + diff --git a/dev-examples/sbml_export_odes.py b/dev-examples/sbml_export_odes.py index 11e3b57..22fd094 100644 --- a/dev-examples/sbml_export_odes.py +++ b/dev-examples/sbml_export_odes.py @@ -1,3 +1,5 @@ +import rich + import pyenzyme as pe import pyenzyme.equations as peq from pyenzyme.sbml.serializer import to_sbml @@ -70,9 +72,12 @@ meas.temperature_unit = K meas.ph = 7.0 +rich.print(to_sbml(doc)[0]) # Write sbml doc to file -with open("./dev-examples/odes/odes_example.xml", "w") as file: +with open("./dev-examples/odes/odes_example_test.xml", "w") as file: file.write(to_sbml(doc)[0]) +exit() + # Write to omex file doc.to_sbml("./dev-examples/odes/odes_example.omex") diff --git a/dev-examples/sbml_import_legacy.py b/dev-examples/sbml_import_legacy.py new file mode 100644 index 0000000..84012f8 --- /dev/null +++ b/dev-examples/sbml_import_legacy.py @@ -0,0 +1,8 @@ +from pathlib import Path + +import pyenzyme as pe + +doc = pe.EnzymeMLDocument.from_sbml(path=Path("./tests/fixtures/sbml/v1_example.omex")) + +with open("./tests/fixtures/sbml/v1_example_enzml.json", "w") as f: + f.write(doc.model_dump_json(indent=2)) diff --git a/dev-examples/sbml_import_odes.py b/dev-examples/sbml_import_odes.py index f630d6a..a652e0a 100644 --- a/dev-examples/sbml_import_odes.py +++ b/dev-examples/sbml_import_odes.py @@ -5,12 +5,6 @@ import pyenzyme as pe from pyenzyme.tools import to_dict_wo_json_ld -doc = pe.EnzymeMLDocument.from_sbml( - path=Path("./dev-examples/reactions/reactions_example.omex") -) +doc = pe.EnzymeMLDocument.from_sbml(path=Path("./dev-examples/odes/odes_example.omex")) rich.print(to_dict_wo_json_ld(doc)) - -df = doc.to_pandas(doc) - -rich.print(df) diff --git a/dev-examples/v1.xml b/dev-examples/v1.xml new file mode 100644 index 0000000..989e87d --- /dev/null +++ b/dev-examples/v1.xml @@ -0,0 +1,731 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MRRLAACLLATAVAAATSAALAQTSPMTPDITGKPFVAGDAANDYVKREVMIPMRDGVKLHTVIVLPKGARNAPIVLTRTPYDASGRTERLASPHMKDLLSAGDDVFVEGGYIRVFQDVRGKYGSEGDYVMTRPLRGPLNPSEVDHATDAWDTIDWLVKNVKESNGKVGMIGSSYEGFTVVMALTNPHPALKVAAPESPMIDGWMGDDWFNYGAFRQVNFDYFTGQLSKRGKGAGIPRQGHDDYSNFLQAGSAGDFAKAAGLEQLPWWHKLTEHAAYDSFWQEQALDKVMARTPLKVPTMWLQGLWDQEDMWGAIHSYAAMEPRDKSNKLNYLVMGPWRHSQVNSDASSLGALNFDGDTARQFRRDVLRPFFDQYLVDGAPKAATPPVFIYNTGENHWDRLQAWPRSCDKGCAAKSKPLYLQAGGKLSFQAPTAAQPAFEEYVSDPAKPVPFVPRPVDFGDRSMWTTWLVHDQRFVDGRPDVLTFVTEPLTAPLQIAGAPDVHLQASTSGSDSDWVVKLIDVYPDEMAADPKMGGYELPVSMAIFRGRYRESFSTPAPLAANQPLAFQFGLPTANHTFQPGHRVMVQVQSSLFPLYDRNPQTYVPNVFFAKPGDYQKATQRVYVAPGQGSYISLPVR + + 3.1.1.43 + B0RS62 + Xanthomonas campestris pv. campestris + + + + + + + + MRRLAACLLATAVAAATSAALAQTSPMTPDITGKPFVAGDAANDYVKREVMIPMRDGVKLHTVIVLPKGARNAPIVLTRTPYDASGRTERLASPHMKDLLSAGDDVFVEGGYIRVFQDVRGKYGSEGDYVMTRPLRGPLNPSEVDHATDAWDTIDWLVKNVKESNGKVGMIGSSYEGFTVVMALTNPHPALKVAAPESPMIDGWMGDDWFNYGAFRQVNFDYFTGQLSKRGKGAGIPRQGHDDYSNFLQAGSAGDFAKAAGLEQLPWWHKLTEHAAYDSFWQEQALDKVMARTPLKVPTMWLQGLWDQEDMWGAIHSYAAMEPRDKSNKLNYLVMGPWRHSQVNSDASSLGALNFDGDTARQFRRDVLRPFFDQYLVDGAPKAATPPVFIYNTGENHWDRLQAWPRSCDKGCAAKSKPLYLQAGGKLSFQAPTAAQPAFEEYVSDPAKPVPFVPRPVDFGDRSMWTTWLVHDQRFVDGRPDVLTFVTEPLTAPLQIAGAPDVHLQASTSGSDSDWVVKLIDVYPDEMAADPKMGGYELPVSMAIFRGRYRESFSTPAPLAANQPLAFQFGLPTANHTFQPGHRVMVQVQSSLFPLYDRNPQTYVPNVFFAKPGDYQKATQRVYVAPGQGSYISLPVR + + 3.1.1.43 + B0RS62 + Xanthomonas campestris pv. campestris + + x + + + + + + + MRRLAACLLATAVAAATSAALAQTSPMTPDITGKPFVAGDAANDYVKREVMIPMRDGVKLHTVIVLPKGARNAPIVLTRTPYDASGRTERLASPHMKDLLSAGDDVFVEGGYIRVFQDVRGKYGSEGDYVMTRPLRGPLNPSEVDHATDAWDTIDWLVKNVKESNGKVGMIGSSYEGFTVVMALTNPHPALKVAAPESPMIDGWMGDDWFNYGAFRQVNFDYFTGQLSKRGKGAGIPRQGHDDYSNFLQAGSAGDFAKAAGLEQLPWWHKLTEHAAYDSFWQEQALDKVMARTPLKVPTMWLQGLWDQEDMWGAIHSYAAMEPRDKSNKLNYLVMGPWRHSQVNSDASSLGALNFDGDTARQFRRDVLRPFFDQYLVDGAPKAATPPVFIYNTGENHWDRLQAWPRSCDKGCAAKSKPLYLQAGGKLSFQAPTAAQPAFEEYVSDPAKPVPFVPRPVDFGDRSMWTTWLVHDQRFVDGRPDVLTFVTEPLTAPLQIAGAPDVHLQASTSGSDSDWVVKLIDVYPDEMAADPKMGGYELPVSMAIFRGRYRESFSTPAPLAANQPLAFQFGLPTANHTFQPGHRVMVQVQSSLFPLYDRNPQTYVPNVFFAKPGDYQKATQRVYVAPGQGSYISLPVR + + 3.1.1.43 + B0RS62 + Xanthomonas campestris pv. campestris + + + + + + + p0 + s0 + + + + + + + p0 + s1 + + + + + + + p0 + s3 + + + + + + + p0 + s0 + s0 + + + + + + + p1 + s1 + + + + + + + p1 + s0 + + + + + + + p0 + s2 + + + + + + + 1S/C9H11NO2/c1-12-9(11)7-10-8-5-3-2-4-6-8/h2-6,10H,7H2,1H3 + O(C([C@@H](C1=CC=CC=C1)N([H])[H])=O)C + + + + + + + + 1S/C8H10N2O3S/c1-3-2-14-7-4(9)6(11)10(7)5(3)8(12)13/h4,7H,2,9H2,1H3,(H,12,13)/t4-,7-/m1/s1 + + CC1=C(N2[C@H](SC1)[C@H](N)C2=O)C(O)=O + + + + + + + + 1S/C16H17N3O4S/c1-8-7-24-15-11(14(21)19(15)12(8)16(22)23)18-13(20)10(17)9-5-3-2-4-6-9/h2-6,10-11,15H,7,17H2,1H3,(H,18,20)(H,22,23)/t10-,11-,15-/m1/s1 + + CC1=C(N2[C@@H]([C@@H](C2=O)NC(=O)[C@@H](C3=CC=CC=C3)N)SC1)C(=O)O + + + + + + + + 1S/C8H9NO2/c9-7(8(10)11)6-4-2-1-3-5-6/h1-5,7H,9H2,(H,10,11) + C1=CC=C(C=C1)[C@H](C(=O)O)N + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + v_r + + + + + K_n + c1 + + + + p0 + s1 + + + + + + + + + + + + + + + + + + + v_r + + + + + K_s + c0 + + + + p0 + s0 + + + + + + + + + + + + + + + + + + + + + k_2 + c0 + + + + + + + + + + + + + + + + + + + + v_r + + + + + K_si + c3 + + + + c0 + s0 + + + + + + + + + + + + + + + + + + + v_r + + + + + K_si + c5 + + + + p1 + s0 + + + + + + + + + + + + + + + + + + + k_6 + c5 + + + + + + + + + + + + + + + + + + + + k_3 + p1 + + + + + + + + + + + + + + + + + + + + v_r + + + + + K_pg + c2 + + + + p0 + s3 + + + + + + + + + + + + + + + + + + + + + + v_r + + + + + K_n + c4 + + + + p1 + s1 + + + + + + + + + + + + + + + + + + + + k_5 + c4 + + + + + + + + + + + + + + + + + + + + + k_4 + c4 + + + + k_4b + c6 + + + + + + + + + + + + + + + + + + + + + + v_r + + + + + K_p + c6 + + + + p0 + s2 + + + + + + + + + + + + + + + + + + + + + k_d + p0 + + + + + + + + + + From 2c9a3cffcbdb33b17b63a783c85adac236ac73f1 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 7 Sep 2024 19:46:06 +0200 Subject: [PATCH 54/80] add default imports --- pyenzyme/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyenzyme/__init__.py b/pyenzyme/__init__.py index c667f15..298edc2 100644 --- a/pyenzyme/__init__.py +++ b/pyenzyme/__init__.py @@ -7,13 +7,16 @@ from .model import * # noqa: F403 from .sbml import to_sbml, read_sbml # noqa: F401 -from .tabular import to_pandas, read_csv, read_excel # noqa: F401 +from .tabular import to_pandas, read_csv, read_excel, from_dataframe # noqa: F401 __all__ = [ "read_enzymeml", "write_enzymeml", "to_sbml", "to_pandas", + "read_csv", + "read_excel", + "from_dataframe", ] From 428a8890dba6e87d15e13bad3162f08dd8e02d53 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 7 Sep 2024 19:46:16 +0200 Subject: [PATCH 55/80] extract all files within omex --- pyenzyme/sbml/omex.py | 106 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 98 insertions(+), 8 deletions(-) diff --git a/pyenzyme/sbml/omex.py b/pyenzyme/sbml/omex.py index 1f86734..72bb9fc 100644 --- a/pyenzyme/sbml/omex.py +++ b/pyenzyme/sbml/omex.py @@ -1,11 +1,86 @@ from __future__ import annotations +import enum import tempfile from pathlib import Path +from typing import TextIO import pandas as pd from pymetadata.omex import EntryFormat, ManifestEntry, Omex +SBML_URI = "http://identifiers.org/combine.specifications/sbml" + + +class FileURI(enum.Enum): + """ + Enum representing supported file URIs for data files. + + Attributes: + CSV (str): URI for CSV files. + TSV (str): URI for TSV files. + """ + + CSV = "http://purl.org/NET/mediatypes/text/csv" + TSV = "https://purl.org/NET/mediatypes/text/tab-separated-values" + + @classmethod + def from_uri(cls, uri: str): + """ + Returns the corresponding FileURI enum member for a given URI. + + Args: + uri (str): The URI to match. + + Returns: + FileURI: The corresponding FileURI enum member. + + Raises: + ValueError: If the URI is not supported. + """ + match uri: + case cls.CSV.value: + return cls.CSV + case cls.TSV.value: + return cls.TSV + case _: + raise ValueError(f"Unsupported file URI: {uri}") + + @classmethod + def is_supported(cls, uri): + """ + Checks if a given URI is supported. + + Args: + uri (str): The URI to check. + + Returns: + bool: True if the URI is supported, False otherwise. + """ + return uri in [e.value for e in cls] + + def to_dataframe(self, path): + """ + Converts the file at the given path to a pandas DataFrame based on the file format. + + Args: + path (str): The path to the file. + + Returns: + pd.DataFrame: The file content as a pandas DataFrame. + + Raises: + ValueError: If the file format is not supported. + """ + match self: + case self.CSV: + # Legacy format has no headers + return pd.read_csv(path, header=None) + case self.TSV: + # V2 format has headers + return pd.read_csv(path, sep="\t") + case _: + raise ValueError(f"Unsupported file format: {self}") + def create_sbml_omex( sbml_doc: str, @@ -54,20 +129,35 @@ def create_sbml_omex( omex.to_omex(out) -def read_sbml_omex(path: Path) -> tuple[Path, Path | None]: +def read_sbml_omex(path: Path) -> tuple[TextIO, dict[str, pd.DataFrame]]: """ - Read an OMEX archive and return the SBML and data file paths. + Reads an OMEX archive and extracts the SBML document and associated data files. Args: path (Path): The path to the OMEX archive. Returns: - tuple[Path, Path | None]: The SBML file path and the data file path, if available. - + tuple[str, dict[str, pd.DataFrame]]: A tuple containing the SBML document as a string and a dictionary + where keys are file locations and values are dataframes of the data files. """ - omex = Omex.from_omex(path) - sbml_file = omex.get_path("./model.xml") - data = omex.get_path("./data.tsv") - return sbml_file, data + try: + master_file = next(part for part in omex.manifest.entries if part.master) + except StopIteration: + raise ValueError("No master file found in OMEX archive") + + assert master_file.format == SBML_URI, "Master file is not SBML" + + meas_data = dict() + + for entry in omex.manifest.entries: + if not FileURI.is_supported(entry.format): + continue + + file_uri = FileURI.from_uri(entry.format) + df = file_uri.to_dataframe(omex.get_path(entry.location)) + + meas_data[entry.location] = df + + return open(omex.get_path(master_file.location)), meas_data From 7a381d8b1518b7a7ea51a9eecdb1eb53f1caa8dc Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 7 Sep 2024 19:46:32 +0200 Subject: [PATCH 56/80] adapt parser and serializer to annotations --- pyenzyme/sbml/parser.py | 448 ++++++++++++++++-------------------- pyenzyme/sbml/serializer.py | 187 +++++---------- 2 files changed, 263 insertions(+), 372 deletions(-) diff --git a/pyenzyme/sbml/parser.py b/pyenzyme/sbml/parser.py index 4a67b63..c1a5bc4 100644 --- a/pyenzyme/sbml/parser.py +++ b/pyenzyme/sbml/parser.py @@ -1,23 +1,20 @@ from __future__ import annotations import math -import xml.etree.ElementTree as ET +import re from pathlib import Path from typing import IO import libsbml as sbml # type: ignore -import rich +import pandas as pd from loguru import logger # type: ignore import pyenzyme as pe -from pyenzyme import tools +from pyenzyme import xmlutils from pyenzyme.logging import add_logger -from pyenzyme.units import M, s from . import read_sbml_omex from .ldutils import parse_sbml_rdf_annotation - -MAPPINGS = tools.read_static_file("pyenzyme.sbml", "mappings.toml") -ENZYMEML_NS = "https://www.enzymeml.org/v2" +from .versions.handler import VersionHandler, SupportedVersions def read_sbml(cls, path: Path | str): @@ -29,20 +26,27 @@ def read_sbml(cls, path: Path | str): path (Path | str): The path to the OMEX archive containing the SBML file. Returns: - An initialized EnzymeML document with extracted units, species, vessels, equations, parameters, reactions, and measurements. + An initialized EnzymeML document with extracted units, species, vessels, + equations, parameters, reactions, and measurements. """ add_logger(name="SBML") # Create globals to use in the functions global units global path_prefix - global tsv_path + global version + global enzmldoc # Read the OMEX archive and extract the SBML and TSV paths - sbml_path, tsv_path = read_sbml_omex(path) + sbml_handler, data = read_sbml_omex(path) + + # Find out which version of the SBML file we are dealing with + namespaces = xmlutils.extract_namespaces(sbml_handler.read()) + version = VersionHandler.from_uri(namespaces) + sbml_handler.seek(0) # Read the SBML file and init an EnzymeML document - model = _init_and_read_sbml(open(sbml_path)) + model = _init_and_read_sbml(sbml_handler) enzmldoc = cls(name=model.getName()) # Extract units to map these to the EnzymeML entities @@ -76,14 +80,28 @@ def read_sbml(cls, path: Path | str): _parse_reaction(reaction) for reaction in model.getListOfReactions() ] - enzmldoc.measurements = _parse_measurements(model) + enzmldoc.measurements = _parse_measurements( + model=model, + list_of_reactions=model.getListOfReactions(), + meas_data=data, + ) return enzmldoc def _init_and_read_sbml(handler: IO): - """Initialize the SBML reader and read the SBML document.""" + """ + Initialize the SBML reader and read the SBML document. + + Args: + handler (IO): The file handler for the SBML document. + + Returns: + The SBML model. + Raises: + ValueError: If the SBML document or model cannot be read. + """ reader = sbml.SBMLReader() sbmldoc = reader.readSBMLFromString(handler.read()) if not sbmldoc: @@ -100,7 +118,15 @@ def _init_and_read_sbml(handler: IO): def _parse_unit(unit: sbml.UnitDefinition): - """Parse a unit definition from an SBML model into an EnzymeML unit definition.""" + """ + Parse a unit definition from an SBML model into an EnzymeML unit definition. + + Args: + unit (sbml.UnitDefinition): The SBML unit definition. + + Returns: + An EnzymeML unit definition. + """ enzml_unit = pe.UnitDefinition( id=unit.getId(), name=unit.getName(), @@ -126,7 +152,15 @@ def _parse_unit(unit: sbml.UnitDefinition): def _parse_species(species: sbml.Species): - """Parse a species from an SBML model into EnzymeML small molecule or protein.""" + """ + Parse a species from an SBML model into EnzymeML small molecule or protein. + + Args: + species (sbml.Species): The SBML species. + + Returns: + An EnzymeML small molecule, protein, or complex. + """ sbo_term = species.getSBOTermID() if sbo_term == "SBO:0000247": @@ -142,9 +176,18 @@ def _parse_species(species: sbml.Species): def _parse_small_molecule(species: sbml.Species): - """Parse a species from an SBML model into an EnzymeML small molecule.""" + """ + Parse a species from an SBML model into an EnzymeML small molecule. + + Args: + species (sbml.Species): The SBML species. + + Returns: + An EnzymeML small molecule. + """ + parsed = version.parse_annotation(annotation=species.getAnnotationString()) + annots = version.extract(parsed, "small_molecule") - annots = _parse_enzymeml_annotations("smallMolecule", species.getAnnotationString()) small_molecule = pe.SmallMolecule( id=species.getId(), name=species.getName(), @@ -159,9 +202,18 @@ def _parse_small_molecule(species: sbml.Species): def _parse_protein(species: sbml.Species): - """Parse a species from an SBML model into an EnzymeML small molecule.""" + """ + Parse a species from an SBML model into an EnzymeML protein. + + Args: + species (sbml.Species): The SBML species. + + Returns: + An EnzymeML protein. + """ + parsed = version.parse_annotation(annotation=species.getAnnotationString()) + annots = version.extract(parsed, "protein") - annots = _parse_enzymeml_annotations("protein", species.getAnnotationString()) protein = pe.Protein( id=species.getId(), name=species.getName(), @@ -176,9 +228,18 @@ def _parse_protein(species: sbml.Species): def _parse_complex(species: sbml.Species): - """Parse a species from an SBML model into an EnzymeML complex.""" + """ + Parse a species from an SBML model into an EnzymeML complex. + + Args: + species (sbml.Species): The SBML species. + + Returns: + An EnzymeML complex. + """ + parsed = version.parse_annotation(annotation=species.getAnnotationString()) + annots = version.extract(parsed, "complex") - annots = _parse_enzymeml_annotations("complex", species.getAnnotationString()) complex_ = pe.Complex( id=species.getId(), name=species.getName(), @@ -191,8 +252,15 @@ def _parse_complex(species: sbml.Species): def _parse_vessel(compartment: sbml.Compartment): - """Parse a compartment from an SBML model into an EnzymeML vessel.""" + """ + Parse a compartment from an SBML model into an EnzymeML vessel. + Args: + compartment (sbml.Compartment): The SBML compartment. + + Returns: + An EnzymeML vessel. + """ vessel = pe.Vessel( id=compartment.getId(), name=compartment.getName(), @@ -206,8 +274,18 @@ def _parse_vessel(compartment: sbml.Compartment): def _parse_parameter(parameter: sbml.Parameter): - """Parse a parameter from an SBML model into an EnzymeML parameter.""" - annots = _parse_enzymeml_annotations("parameter", parameter.getAnnotationString()) + """ + Parse a parameter from an SBML model into an EnzymeML parameter. + + Args: + parameter (sbml.Parameter): The SBML parameter. + + Returns: + An EnzymeML parameter. + """ + parsed = version.parse_annotation(annotation=parameter.getAnnotationString()) + annots = version.extract(parsed, "parameter") + parameter = pe.Parameter( id=parameter.getId(), name=parameter.getName(), @@ -222,8 +300,19 @@ def _parse_parameter(parameter: sbml.Parameter): def _parse_equation(rule: sbml.Rule, rule_type: pe.EquationType): - """Parse a rule from an SBML model into an EnzymeML equation.""" + """ + Parse a rule from an SBML model into an EnzymeML equation. + Args: + rule (sbml.Rule): The SBML rule. + rule_type (pe.EquationType): The type of the equation. + + Returns: + An EnzymeML equation. + + Raises: + ValueError: If the rule type is unknown. + """ match rule_type: case pe.EquationType.INITIAL_ASSIGNMENT: equation = sbml.formulaToString(rule.getMath()) @@ -232,12 +321,17 @@ def _parse_equation(rule: sbml.Rule, rule_type: pe.EquationType): equation = rule.getFormula() species_id = rule.getVariable() case pe.EquationType.RATE_LAW: - equation = rule.getMath() + equation = rule.getFormula() species_id = None case _: raise ValueError(f"Unknown rule type: {rule_type}") - annots = _parse_enzymeml_annotations("variables", rule.getAnnotationString()) + parsed = version.parse_annotation(annotation=rule.getAnnotationString()) + annots = version.extract(parsed, "variables") + + if version.version == SupportedVersions.VERSION1: + _map_v1_variables(annots, equation) + equation = pe.Equation( equation_type=rule_type, equation=equation, @@ -248,9 +342,43 @@ def _parse_equation(rule: sbml.Rule, rule_type: pe.EquationType): return equation +def _map_v1_variables(annots: dict, equation: str): + """ + Map variables for version 1 of the EnzymeML format. + + Args: + annots (dict): The annotations. + equation (str): The equation string. + """ + if "variables" not in annots: + annots["variables"] = [] + + all_species = [ + *[s.id for s in enzmldoc.small_molecules], + *[p.id for p in enzmldoc.proteins], + *[c.id for c in enzmldoc.complexes], + ] + for species in all_species: + if bool(re.search(rf"\b{species}\b", equation)): + annots["variables"].append( + pe.Variable( + id=species, + name=species, + symbol=species, + ).model_dump() + ) + + def _parse_reaction(reaction: sbml.Reaction): - """Parse a reaction from an SBML model into an EnzymeML reaction.""" + """ + Parse a reaction from an SBML model into an EnzymeML reaction. + + Args: + reaction (sbml.Reaction): The SBML reaction. + Returns: + An EnzymeML reaction. + """ # Get the reactants and products products = [_parse_element(product, 1) for product in reaction.getListOfProducts()] reactants = [ @@ -261,7 +389,7 @@ def _parse_reaction(reaction: sbml.Reaction): modifiers = [modifier.getSpecies() for modifier in reaction.getListOfModifiers()] # Get the kinetic law - kinetic_law = _parse_kinetic_law(reaction) + kinetic_law = _parse_equation(reaction.getKineticLaw(), pe.EquationType.RATE_LAW) # Create the EnzymeML reaction reaction = pe.Reaction( @@ -272,242 +400,68 @@ def _parse_reaction(reaction: sbml.Reaction): kinetic_law=kinetic_law, ) - rich.print(reaction) - return reaction def _parse_element(species, direction: int): + """ + Parse a species element from an SBML model into an EnzymeML reaction element. + + Args: + species: The SBML species element. + direction (int): The direction of the reaction (1 for product, -1 for reactant). + + Returns: + An EnzymeML reaction element. + """ return pe.ReactionElement( species_id=species.getSpecies(), stoichiometry=species.getStoichiometry() * direction, ) -def _parse_kinetic_law(reaction): - kinetic_law = reaction.getKineticLaw() - - if not kinetic_law: - return None - - annots = _parse_enzymeml_annotations("variables", kinetic_law.getAnnotationString()) - kinetic_law = pe.Equation( - equation=kinetic_law.getFormula(), - equation_type=pe.EquationType.RATE_LAW, - unit=M, # We need to set a default unit here, because SBML does not provide units for kinetic laws - variables=[pe.Variable(**annot) for annot in annots.get("variables", [])], - ) - - return kinetic_law - - -def _parse_measurements(model: sbml.Model): - # Extract metadata from the model - meas_metadata, file_path = _get_meas_metadata(model) - meas_metadata = _extract_measurement_metadata(meas_metadata) - - # Read the CSV file into measurement objects - # We need to set defaults for the units here, - # but we will overwrite them with the units from the EnzymeML annotations - measurements = pe.read_csv( - tsv_path, - data_unit=M, - time_unit=s, - ) - - for meas_id, metadata in meas_metadata.items(): - _assign_units_and_initials(meas_id, measurements, metadata) - - return measurements - - -def _assign_units_and_initials(meas_id, measurements, metadata): - measurement = [m for m in measurements if m.id == meas_id][0] - conditions = metadata.get("condition", {}) - init_concs = metadata.get("speciesData", []) - measurement.ph = _cast(conditions.get("ph"), float) - measurement.temperature = _cast(conditions.get("temperature"), float) - measurement.temperature_unit = conditions.get("temperature_unit") - - for init_conc in init_concs: - species_id = _get_species_id(init_conc) - meas_data = _get_species_data(measurement, species_id) - - meas_data.initial = float(init_conc.get("initial", 0.0)) - meas_data.time_unit = init_conc["time_unit"] - meas_data.data_unit = init_conc["data_unit"] - - -def _cast(value, data_type): - if value is None: - return None - - return data_type(value) - - -def _get_species_id(init_conc): - species_id = init_conc.get("species_id") - assert species_id, "No species ID found in the EnzymeML data annotation" - return species_id - - -def _get_species_data(measurement, species_id): - try: - return [d for d in measurement.species_data if d.species_id == species_id][0] - except IndexError: - raise ValueError(f"No species data found for species ID {species_id}") - - -def _get_meas_metadata(model): - root = ET.fromstring(model.getAnnotationString()) - data = root.find(f"{{{ENZYMEML_NS}}}data") - meas_metadata = data.findall(f"{{{ENZYMEML_NS}}}measurement") - file_path = data.attrib.get("file") - - assert file_path, "No file path found in the EnzymeML data annotation" - - return meas_metadata, file_path - - -def _extract_measurement_metadata(meas_metadata): - measurements = {} - - for meas_meta in meas_metadata: - meas_id = meas_meta.attrib.get("id") - data = _process_measurement(meas_meta) - measurements[meas_id] = data - - return measurements - - -def _process_measurement(meas_meta): - data = {} - time_unit = units.get(meas_meta.attrib.get("timeUnit")) - - assert ( - time_unit - ), f"Time unit not found for measurement {meas_meta.attrib.get('id')}" - - species_data = _parse_enzymeml_annotations("speciesData", meas_meta).get( - "speciesData", [] - ) - conditions = _parse_enzymeml_annotations("conditions", meas_meta).get( - "conditions", [] - ) - - if conditions: - data["condition"] = _assign_temp_unit(conditions[0]) - if species_data: - data["speciesData"] = _assign_meas_units(species_data, time_unit) - - return data - - -def _assign_temp_unit(conditions): - if temp_unit := conditions.get("temperature_unit"): - conditions["temperature_unit"] = units.get(temp_unit) - - return conditions - - -def _assign_meas_units(species_data, time_unit): - for data in species_data: - data["data_unit"] = units.get(data["data_unit"]) - data["time_unit"] = time_unit - data["data_type"] = pe.DataTypes.__members__.get(data["data_type"]) - - return species_data - - -def _parse_enzymeml_annotations( - root_key: str, annotation: str | ET.Element | None -) -> dict: - """Parse the RDF annotation of an SBML object.""" - - if not annotation: - return {} - - mappings = MAPPINGS[root_key] - - match annotation: - case str(): - root = ET.fromstring(annotation).find(f".//{{{ENZYMEML_NS}}}{root_key}") - case _ if isinstance(annotation, ET.Element): - root = annotation - case _: - raise ValueError(f"Unknown annotation type: {type(annotation)}") - - if not root: - return {} - - return _map_values(mappings, root, root_key) - - -def _map_values(mappings, root, root_key=None): - """Map the values from the XML root to the EnzymeML entities.""" - - data = {} - for xml_key, enzml_key in mappings.items(): - match enzml_key: - case dict(): - if value := _process_nested_keys( - enzml_key=enzml_key, - root=root, - xml_key=xml_key, - ): - if root_key in data and len(value) == 1: - # Special case for conditions - data[root_key][0].update(value[0]) - else: - data[root_key] = value - - case str(): - if value := _process_simple( - root=root, - xml_key=xml_key, - ): - data[enzml_key] = value - case _: - raise ValueError(f"Unknown value type for key '{enzml_key}'") - - return data - - -def _process_simple( - root: ET.Element, - xml_key: str, +def _parse_measurements( + model: sbml.Model, + list_of_reactions: sbml.ListOfReactions, + meas_data: dict[str, pd.DataFrame], ): - if xml_key.startswith("@"): - value = root.attrib.get(xml_key[1:]) - else: - value = root.findall(f"{{{ENZYMEML_NS}}}{xml_key}") - - if len(value) == 1: - value = value[0].text - elif len(value) > 1: - value = [v.text for v in value] - return value + """ + Parse measurements from an SBML model into EnzymeML measurements. + Args: + model (sbml.Model): The SBML model. + list_of_reactions (sbml.ListOfReactions): The list of reactions in the SBML model. + meas_data (dict[str, pd.DataFrame]): The measurement data. -def _process_nested_keys( - enzml_key: dict, - root: ET.Element, - xml_key: str, -): - value = root.findall(f".//{{{ENZYMEML_NS}}}{xml_key}") - if len(value) == 1: - value = [_map_values(enzml_key, value[0])] - elif len(value) > 1: - value = [_map_values(enzml_key, v) for v in value] - else: - return None + Returns: + EnzymeML measurements. - return value + Raises: + ValueError: If the version is unknown. + """ + match version.version: + case SupportedVersions.VERSION1: + parsed = version.parse_annotation(list_of_reactions.getAnnotationString()) + if parsed.data: + return parsed.data.to_measurements(meas_data, units) + case SupportedVersions.VERSION2: + parsed = version.parse_annotation(model.getAnnotationString()) + if parsed.data: + return parsed.data.to_measurements(meas_data, units) + case _: + raise ValueError(f"Unknown version: {version.version}") def _check_nan(value: float): - """Check if a value is NaN.""" + """ + Check if a value is NaN. + Args: + value (float): The value to check. + + Returns: + The value if it is not NaN, otherwise None. + """ if math.isnan(value): return None diff --git a/pyenzyme/sbml/serializer.py b/pyenzyme/sbml/serializer.py index 71251f8..602f1f9 100644 --- a/pyenzyme/sbml/serializer.py +++ b/pyenzyme/sbml/serializer.py @@ -7,7 +7,6 @@ import libsbml import pandas as pd from loguru import logger -from pydantic import BaseModel import pyenzyme.model as pe import pyenzyme.tools as tools @@ -16,6 +15,7 @@ from pyenzyme.logging import add_logger from pyenzyme.sbml import create_sbml_omex from pyenzyme.sbml.validation import validate_sbml_export +from pyenzyme.sbml.versions import v2 from pyenzyme.tabular import to_pandas from pyenzyme.units.units import UnitDefinition @@ -162,12 +162,13 @@ def _add_small_mol(small_mol: pe.SmallMolecule): species.setInitialConcentration(init_conc) species.setHasOnlySubstanceUnits(False) - annot = _xml.serialize_to_pretty_xml_string( - _extract_create_annot("smallMolecule", small_mol) + annot = v2.SmallMoleculeAnnot( + canonical_smiles=small_mol.canonical_smiles, + inchikey=small_mol.inchikey, ) - if annot is not None: - species.appendAnnotation(annot) + if not annot.is_empty(): + species.appendAnnotation(annot.to_xml(encoding="unicode")) def _add_protein(protein: pe.Protein): @@ -187,12 +188,15 @@ def _add_protein(protein: pe.Protein): species.setInitialConcentration(init_conc) species.setHasOnlySubstanceUnits(False) - annot = _xml.serialize_to_pretty_xml_string( - _extract_create_annot("protein", protein) + annot = v2.ProteinAnnot( + ecnumber=protein.ecnumber, + organism=protein.organism, + sequence=protein.sequence, + organism_tax_id=protein.organism_tax_id, ) - if annot is not None: - species.appendAnnotation(annot) + if not annot.is_empty(): + species.appendAnnotation(annot.to_xml(encoding="unicode")) def _add_complex(complex_: pe.Complex): @@ -205,12 +209,10 @@ def _add_complex(complex_: pe.Complex): species.setSBOTerm("SBO:0000296") # Complex species.appendAnnotation(rdf.to_rdf_xml(complex_)) - annot = _xml.serialize_to_pretty_xml_string( - _extract_create_annot("complex", complex_) - ) + annot = v2.ComplexAnnot(participants=complex_.participants) - if annot is not None: - species.appendAnnotation(annot) + if not annot.is_empty(): + species.appendAnnotation(annot.to_xml(encoding="unicode")) def _get_first_meas_init_conc(species: pe.SmallMolecule | pe.Protein): @@ -267,12 +269,12 @@ def _add_rate_law(equation: pe.Equation, reac: libsbml.Reaction): law = reac.createKineticLaw() law.setMath(libsbml.parseL3Formula(equation.equation)) - if annot := _create_equation_annot(equation): - law.setAnnotation(_xml.serialize_to_pretty_xml_string(annot)) - + annot = v2.VariablesAnnot( + variables=[v2.VariableAnnot(**var.model_dump()) for var in equation.variables], + ) -def _create_equation_annot(equation: pe.Equation) -> ET.Element | None: - return _extract_create_annot("variables", equation.variables) + if not annot.is_empty(): + law.setAnnotation(annot.to_xml(encoding="unicode")) def _get_create_fun( @@ -303,12 +305,14 @@ def _add_parameter(parameter: pe.Parameter): if parameter.unit: sbml_param.setUnits(_get_unit_id(parameter.unit)) - annot = _xml.serialize_to_pretty_xml_string( - _extract_create_annot("parameter", parameter) + annot = v2.ParameterAnnot( + lower=parameter.lower, + upper=parameter.upper, + stderr=parameter.stderr, ) - if annot is not None: - sbml_param.appendAnnotation(annot) + if not annot.is_empty(): + sbml_param.appendAnnotation(annot.to_xml(encoding="unicode")) def _add_equation(equation: pe.Equation): @@ -328,42 +332,55 @@ def _add_equation(equation: pe.Equation): sbml_rule.setMath(libsbml.parseL3Formula(equation.equation)) - if annot := _create_equation_annot(equation): - sbml_rule.setAnnotation(_xml.serialize_to_pretty_xml_string(annot)) + annot = v2.VariablesAnnot( + variables=[v2.VariableAnnot(**var.model_dump()) for var in equation.variables], + ) + + if not annot.is_empty(): + sbml_rule.setAnnotation(annot.to_xml(encoding="unicode")) def _add_measurements(measurements: list[pe.Measurement]): """Adds measurements to the SBML model.""" - annotation = ET.Element(f"{{{NSMAP['enzymeml']}}}data") - annotation.attrib["file"] = "data.tsv" + annot = v2.DataAnnot(file="./data.tsv") for measurement in measurements: - meas_element = _extract_create_annot("measurement", measurement) - meas_element.attrib["timeUnit"] = _get_unit_id( # type: ignore - measurement.species_data[0].time_unit + if not measurement.species_data: + continue + + time_unit = _get_unit_id(measurement.species_data[0].time_unit) + conditions = v2.ConditionsAnnot( + ph=v2.PHAnnot( + value=measurement.ph, + ), + temperature=v2.TemperatureAnnot( + value=measurement.temperature, + unit=_get_unit_id(measurement.temperature_unit), + ), ) - assert meas_element is not None, "Measurement element is None" - - conditions = _create_condition_element( - ph=measurement.ph, - temperature=measurement.temperature, - temperature_unit=_get_unit_id(measurement.temperature_unit), # type: ignore + meas_annot = v2.MeasurementAnnot( + id=measurement.id, + time_unit=time_unit, + name=measurement.name, + conditions=conditions, ) - if conditions: - meas_element.append(conditions) - - for species in measurement.species_data: - _extract_create_annot("speciesData", species, meas_element) + for species_data in measurement.species_data: + species_annot = v2.SpeciesDataAnnot( + species_id=species_data.species_id, + initial=species_data.initial, + type=species_data.data_type.name, + unit=_get_unit_id(species_data.data_unit), + ) - annotation.append(meas_element) + meas_annot.species_data.append(species_annot) - annot = _xml.serialize_to_pretty_xml_string(annotation) + annot.measurements.append(meas_annot) - if annot is not None: - model.appendAnnotation(annot) + if not annot.is_empty(): + model.appendAnnotation(annot.to_xml(encoding="unicode")) def _create_condition_element( @@ -388,86 +405,6 @@ def _create_condition_element( return element -def _extract_create_annot( - name: str, - obj: BaseModel | list[BaseModel], - element: ET.Element | None = None, -) -> ET.Element | None: - """Extracts the data from the object and creates an annotation element. - - This function makes use of the "mappings.toml" file which orchestrates - the mapping of the data from the object to the XML element. - - Args: - name (str): The name of the object. - obj (BaseModel): The object to extract the data from. - element (ET.Element, optional): The element to append the annotation to. Defaults to None. - - Returns: - ET.Element: The annotation element. - """ - if element is None: - element = ET.Element(f"{{{NSMAP['enzymeml']}}}{name}") - - if isinstance(obj, list): - mappings = [ - _extract(item, MAPPINGS[name]) - for item in obj - if item.dict(exclude_unset=True) - ] - - for mapping in mappings: - _xml.map_to_xml( - root=element, - mappings=mapping, - namespace=NSMAP["enzymeml"], - ) - else: - mappings = _extract(obj, MAPPINGS[name]) - - _xml.map_to_xml( - root=element, - mappings=mappings, - namespace=NSMAP["enzymeml"], - ) - - if len(element) == 0 and not element.attrib: - return None - - return element - - -def _extract(obj: BaseModel, mapping: dict) -> dict: - """Based on the mapping, extract the data from the object and return it as a dictionary. - - Args: - obj (BaseModel): The object to extract the data from. - mapping (dict): The mapping to use for extraction. - - Returns: - dict: The extracted data. - """ - - data = {} - - for trgt_key, enzml_key in mapping.items(): - if isinstance(enzml_key, dict): - data[trgt_key] = _extract(obj, enzml_key) - elif "unit" in enzml_key: - value = getattr(obj, enzml_key) - data[trgt_key] = _get_unit_id(value) - elif isinstance(getattr(obj, enzml_key), list) and all( - isinstance(item, BaseModel) for item in getattr(obj, enzml_key) - ): - data[trgt_key] = [ - _extract(item, MAPPINGS[enzml_key]) for item in getattr(obj, enzml_key) - ] - else: - data[trgt_key] = getattr(obj, enzml_key) - - return data - - def _get_sbml_kind(unit_type: pe.UnitType): try: return getattr(libsbml, f"UNIT_KIND_{unit_type.name}") From 767c10aa9f09ef757daed4d3171122e4485e3fcc Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 7 Sep 2024 19:46:46 +0200 Subject: [PATCH 57/80] add support for legacy and new version --- pyenzyme/sbml/versions/__init__.py | 15 ++ pyenzyme/sbml/versions/handler.py | 52 ++++ pyenzyme/sbml/versions/v1.py | 414 +++++++++++++++++++++++++++++ pyenzyme/sbml/versions/v2.py | 387 +++++++++++++++++++++++++++ 4 files changed, 868 insertions(+) create mode 100644 pyenzyme/sbml/versions/__init__.py create mode 100644 pyenzyme/sbml/versions/handler.py create mode 100644 pyenzyme/sbml/versions/v1.py create mode 100644 pyenzyme/sbml/versions/v2.py diff --git a/pyenzyme/sbml/versions/__init__.py b/pyenzyme/sbml/versions/__init__.py new file mode 100644 index 0000000..fe80573 --- /dev/null +++ b/pyenzyme/sbml/versions/__init__.py @@ -0,0 +1,15 @@ +from .v2 import ( + DataAnnot, + SpeciesDataAnnot, + ProteinAnnot, + ParameterAnnot, + ComplexAnnot, +) + +__all__ = [ + "DataAnnot", + "SpeciesDataAnnot", + "ProteinAnnot", + "ParameterAnnot", + "ComplexAnnot", +] diff --git a/pyenzyme/sbml/versions/handler.py b/pyenzyme/sbml/versions/handler.py new file mode 100644 index 0000000..e44dfff --- /dev/null +++ b/pyenzyme/sbml/versions/handler.py @@ -0,0 +1,52 @@ +from enum import Enum + +from pydantic import BaseModel + +from pyenzyme.sbml.versions import v1, v2 +from pyenzyme.sbml.versions.v2 import V2Annotation + + +class SupportedVersions(Enum): + VERSION1: str = "http://sbml.org/enzymeml/version2" + VERSION2: str = "https://www.enzymeml.org/v2" + + +class VersionHandler(BaseModel): + version: SupportedVersions + + @classmethod + def from_uri(cls, uris: set[str]): + for uri in uris: + if uri == SupportedVersions.VERSION1.value: + return cls(version=SupportedVersions.VERSION1) + if uri == SupportedVersions.VERSION2.value: + return cls(version=SupportedVersions.VERSION2) + + raise ValueError("No supported version found in URIs") + + def parse_annotation(self, annotation: str) -> v1.V1Annotation | v2.V2Annotation: + if not annotation: + return V2Annotation() + + match self.version: + case SupportedVersions.VERSION1: + return v1.V1Annotation.from_xml(annotation) + case SupportedVersions.VERSION2: + return v2.V2Annotation.from_xml(annotation) + case _: + raise ValueError("Unsupported version") + + @staticmethod + def extract( + value: v1.V1Annotation | v2.V2Annotation, + key: str, + ): + if not hasattr(value, key): + raise AttributeError(f"VersionHandler has no attribute '{key}'") + + value = getattr(value, key) + + if value: + return value.model_dump() + else: + return {} diff --git a/pyenzyme/sbml/versions/v1.py b/pyenzyme/sbml/versions/v1.py new file mode 100644 index 0000000..9ed7c96 --- /dev/null +++ b/pyenzyme/sbml/versions/v1.py @@ -0,0 +1,414 @@ +from __future__ import annotations + +import pandas as pd +from pydantic import computed_field +from pydantic_xml import element, BaseXmlModel, attr, wrapped + +from pyenzyme import Measurement, UnitDefinition, DataTypes +from pyenzyme.sbml.versions.v2 import VariableAnnot + + +class V1Annotation( + BaseXmlModel, + tag="annotation", + search_mode="unordered", +): + small_molecule: ReactantAnnot | None = element( + tag="smallMolecule", + default=None, + nsmap={"enzymeml": "https://www.enzymeml.org/v2"}, + ) + + protein: ProteinAnnot | None = element( + tag="protein", + default=None, + nsmap={"enzymeml": "https://www.enzymeml.org/v2"}, + ) + + complex: ComplexAnnot | None = element( + tag="complex", + default=None, + nsmap={"enzymeml": "https://www.enzymeml.org/v2"}, + ) + + data: DataAnnot | None = element( + tag="data", + default=None, + nsmap={"enzymeml": "https://www.enzymeml.org/v2"}, + ) + + parameter: ParameterAnnot | None = element( + tag="parameter", + default=None, + nsmap={"enzymeml": "https://www.enzymeml.org/v2"}, + ) + + variables: VariableAnnot | None = element( + tag="variables", + default=None, + nsmap={"enzymeml": "https://www.enzymeml.org/v2"}, + ) + + +class ParameterAnnot( + BaseXmlModel, + tag="parameter", + nsmap={"": "https://www.enzymeml.org/v2"}, +): + """ + Represents the annotation for a parameter in the EnzymeML format. + + Attributes: + initial (float | None): The initial value of the parameter. + upper (float | None): The upper bound of the parameter. + lower (float | None): The lower bound of the parameter. + """ + + initial: float | None = element(tag="initialValue", default=None) + upper: float | None = element(tag="upperBound", default=None) + lower: float | None = element(tag="lowerBound", default=None) + + +class ComplexAnnot( + BaseXmlModel, + tag="complex", + nsmap={"": "http://sbml.org/enzymeml/version2"}, +): + """ + Represents the annotation for a complex in the EnzymeML format. + + Attributes: + participants (list[str]): A list of participants in the complex. + """ + + participants: list[str] = element(tag="participant", default_factory=list) + + +class ReactantAnnot( + BaseXmlModel, + tag="reactant", + nsmap={"": "http://sbml.org/enzymeml/version2"}, +): + """ + Represents the annotation for a reactant in the EnzymeML format. + + Attributes: + inchi (str | None): The InChI of the reactant. + smiles (str | None): The SMILES representation of the reactant. + chebi_id (str | None): The ChEBI ID of the reactant. + """ + + inchi: str | None = element(tag="inchi", default=None) + smiles: str | None = element(tag="smiles", default=None) + chebi_id: str | None = element(tag="chebiID", default=None) + + +class ProteinAnnot( + BaseXmlModel, + tag="protein", + nsmap={"": "http://sbml.org/enzymeml/version2"}, +): + """ + Represents the annotation for a protein in the EnzymeML format. + + Attributes: + sequence (str | None): The amino acid sequence of the protein. + ecnumber (str | None): The EC number of the protein. + uniprotid (str | None): The UniProt ID of the protein. + organism (str | None): The organism from which the protein is derived. + organism_tax_id (str | None): The taxonomic ID of the organism. + """ + + sequence: str | None = element(tag="sequence", default=None) + ecnumber: str | None = element(tag="ECnumber", default=None) + uniprotid: str | None = element(tag="uniprotID", default=None) + organism: str | None = element(tag="organism", default=None) + organism_tax_id: str | None = element(tag="organismTaxID", default=None) + + +class DataAnnot( + BaseXmlModel, + tag="data", + nsmap={"": "http://sbml.org/enzymeml/version2"}, +): + """ + Represents the annotation for data in the EnzymeML format. + + Attributes: + formats (list[FormatAnnot]): A list of format annotations. + measurements (list[MeasurementAnnot]): A list of measurement annotations. + files (list[FileAnnot]): A list of file annotations. + """ + + formats: list[FormatAnnot] = wrapped( + "formats", + element( + tag="format", + default_factory=list, + ), + ) + + measurements: list[MeasurementAnnot] = wrapped( + "listOfMeasurements", + element( + tag="measurement", + default_factory=list, + ), + ) + + files: list[FileAnnot] = wrapped( + "files", + element( + tag="file", + default_factory=list, + ), + ) + + def to_measurements( + self, + meas_data: dict[str, pd.DataFrame], + units: dict[str, UnitDefinition], + ) -> list[Measurement]: + """ + Converts the data annotation to version 2 format. + + Args: + meas_data (dict[str, pd.DataFrame]): A dictionary of dataframes. + units (dict[str, UnitDefinition]): A dictionary of unit definitions. + + Returns: + list[Measurement]: A list of measurements. + """ + + # Create a mapping from fileid to filepath + file_map = {file.id: meas_data[file.location] for file in self.files} + + measurements: list[Measurement] = list() + + for meas_v1 in self.measurements: + measurement = Measurement(id=meas_v1.id, name=meas_v1.name) + + for init_conc in meas_v1.init_concs: + measurement.add_to_species_data( + data_unit=units[init_conc.unit], + species_id=init_conc.species_id, + initial=init_conc.value, + data_type=DataTypes.CONCENTRATION, + ) + + # Extract the format information + file = next(f for f in self.files if f.id == meas_v1.file) + file_format = next(f for f in self.formats if f.id == file.format) + + self._map_columns(file_map[meas_v1.file], file_format, measurement, units) + + for species_data in measurement.species_data: + if not species_data.data: + species_data.time = [] + + measurements.append(measurement) + + return measurements + + def _map_columns( + self, + df: pd.DataFrame, + file_format: FormatAnnot, + measurement: Measurement, + units: dict[str, UnitDefinition], + ) -> None: + """ + Maps columns from the dataframe to the measurement. + + Args: + df (pd.DataFrame): The dataframe containing the data. + file_format (FormatAnnot): The format annotation. + measurement (Measurement): The measurement to map the columns to. + units (dict[str, UnitDefinition]): A dictionary of unit definitions. + """ + + for col in file_format.columns: + unit = units[col.unit] + values = df.iloc[:, col.index].values.tolist() + + if col.type == "time": + self._map_time_values(measurement, unit, values) + else: + self._map_species_values(col, measurement, unit, values) + + @staticmethod + def _map_species_values( + col: ColumnAnnot, + measurement: Measurement, + unit: UnitDefinition, + values: list[float], + ): + """ + Maps species values to the measurement. + + Args: + col (ColumnAnnot): The column annotation. + measurement (Measurement): The measurement to map the values to. + unit (UnitDefinition): The unit definition. + values (list[float]): The list of values. + """ + species_data = measurement.filter_species_data(species_id=col.species_id) + + assert len(species_data) == 1, f"Species data not found for {col.species_id}" + + species_data = species_data[0] + species_data.data_unit = unit + species_data.data = values + + @staticmethod + def _map_time_values(measurement, unit, values): + """ + Maps time values to the measurement. + + Args: + measurement (Measurement): The measurement to map the values to. + unit (UnitDefinition): The unit definition. + values (list[float]): The list of time values. + """ + # Map time to all species data + for species_data in measurement.species_data: + species_data.time = values + species_data.time_unit = unit + + +class FormatAnnot( + BaseXmlModel, + tag="format", + nsmap={"": "http://sbml.org/enzymeml/version2"}, +): + """ + Represents the format annotation in the EnzymeML format. + + Attributes: + id (str): The ID of the format. + columns (list[ColumnAnnot]): A list of column annotations. + """ + + id: str = attr(name="id") + columns: list[ColumnAnnot] = element( + tag="column", + default_factory=list, + ) + + +class ColumnAnnot( + BaseXmlModel, + tag="column", + nsmap={"": "http://sbml.org/enzymeml/version2"}, +): + """ + Represents the column annotation in the EnzymeML format. + + Attributes: + species_id (str | None): The ID of the species. + type (str): The type of the column. + unit (str): The unit of the column. + index (int): The index of the column. + replica (str | None): The replica of the column. + is_calculated (bool): Whether the column is calculated. + """ + + species_id: str | None = attr(name="species", default=None) + type: str = attr(name="type") + unit: str = attr(name="unit") + index: int = attr(name="index") + replica: str | None = attr(name="replica", default=None) + is_calculated: bool = attr(name="isCalculated", default=False) + + +class MeasurementAnnot( + BaseXmlModel, + tag="measurement", + nsmap={"": "http://sbml.org/enzymeml/version2"}, +): + """ + Represents the measurement annotation in the EnzymeML format. + + Attributes: + id (str): The ID of the measurement. + name (str): The name of the measurement. + file (str): The file associated with the measurement. + init_concs (list[InitConcAnnot]): A list of initial concentration annotations. + """ + + id: str = attr(name="id") + name: str = attr(name="name") + file: str = attr(name="file") + init_concs: list[InitConcAnnot] = element( + tag="initConc", + default_factory=list, + ) + + +class InitConcAnnot( + BaseXmlModel, + tag="initConc", + nsmap={"": "http://sbml.org/enzymeml/version2"}, +): + """ + Represents the initial concentration annotation in the EnzymeML format. + + Attributes: + protein (str | None): The protein associated with the initial concentration. + reactant (str | None): The reactant associated with the initial concentration. + value (float): The value of the initial concentration. + unit (str): The unit of the initial concentration. + """ + + protein: str | None = attr(name="protein", default=None) + reactant: str | None = attr(name="reactant", default=None) + value: float = attr(name="value", default=0.0) + unit: str = attr(name="unit") + + @computed_field + @property + def species_id(self) -> str: + """ + Computes the species ID based on the protein or reactant. + + Returns: + str: The species ID. + """ + assert bool(self.protein) != bool( + self.reactant + ), "Either protein or reactant must be set" + return self.protein or self.reactant + + +class FileAnnot( + BaseXmlModel, + tag="file", + nsmap={"": "http://sbml.org/enzymeml/version2"}, +): + """ + Represents the file annotation in the EnzymeML format. + + Attributes: + id (str): The ID of the file. + location (str): The file path. + format (str): The format of the file. + """ + + id: str = attr(name="id") + location: str = attr(name="file") + format: str = attr(name="format") + + +# Rebuild all the classes within this file +for cls in [ + DataAnnot, + FormatAnnot, + ColumnAnnot, + MeasurementAnnot, + InitConcAnnot, + ProteinAnnot, + ReactantAnnot, + ParameterAnnot, + V1Annotation, +]: + cls.model_rebuild() diff --git a/pyenzyme/sbml/versions/v2.py b/pyenzyme/sbml/versions/v2.py new file mode 100644 index 0000000..bd180d4 --- /dev/null +++ b/pyenzyme/sbml/versions/v2.py @@ -0,0 +1,387 @@ +""" +This module contains the classes for the EnzymeML version 2 format annotations +used to map the EnzymeML JSON schema to SBML. +""" + +from __future__ import annotations + +import pandas as pd +from pydantic import field_validator +from pydantic_xml import element, attr, BaseXmlModel + +from pyenzyme import UnitDefinition, DataTypes, Measurement + + +class BaseAnnot(BaseXmlModel): + """ + Base class for annotations in the EnzymeML format. + """ + + def is_empty(self): + return all(value is None or value == [] for _, value in self) + + +class V2Annotation( + BaseAnnot, + tag="annotation", + search_mode="unordered", + nsmap={"enzymeml": "https://www.enzymeml.org/v2"}, +): + small_molecule: SmallMoleculeAnnot | None = element( + tag="smallMolecule", + default=None, + ) + + protein: ProteinAnnot | None = element( + tag="protein", + default=None, + ) + + complex: ComplexAnnot | None = element( + tag="complex", + default=None, + ) + + data: DataAnnot | None = element( + tag="data", + default=None, + ) + + parameter: ParameterAnnot | None = element( + tag="parameter", + default=None, + ) + + variables: VariablesAnnot | None = element( + tag="variables", + default=None, + ) + + +class SmallMoleculeAnnot( + BaseAnnot, + tag="smallMolecule", + nsmap={"": "https://www.enzymeml.org/v2"}, + search_mode="unordered", +): + """ + Represents the annotation for a small molecule in the EnzymeML format. + + Attributes: + inchikey (str | None): The InChIKey of the small molecule. + canonical_smiles (str | None): The canonical SMILES representation of the small molecule. + """ + + inchikey: str | None = element(tag="inchiKey", default=None) + canonical_smiles: str | None = element(tag="smiles", default=None) + + +class ProteinAnnot( + BaseAnnot, + tag="protein", + nsmap={"": "https://www.enzymeml.org/v2"}, + search_mode="unordered", +): + """ + Represents the annotation for a protein in the EnzymeML format. + + Attributes: + ecnumber (str | None): The EC number of the protein. + organism (str | None): The organism from which the protein is derived. + organism_tax_id (str | None): The taxonomic ID of the organism. + sequence (str | None): The amino acid sequence of the protein. + """ + + ecnumber: str | None = element(tag="ecnumber", default=None) + organism: str | None = element(tag="organism", default=None) + organism_tax_id: str | None = element(tag="organismTaxId", default=None) + sequence: str | None = element(tag="sequence", default=None) + + +class ComplexAnnot( + BaseAnnot, + tag="complex", + nsmap={"": "https://www.enzymeml.org/v2"}, + search_mode="unordered", +): + """ + Represents the annotation for a complex in the EnzymeML format. + + Attributes: + participants (list[str]): A list of participants in the complex. + """ + + participants: list[str] = element( + tag="participants", + default_factory=list, + ) + + +class DataAnnot( + BaseAnnot, + tag="data", + nsmap={"": "https://www.enzymeml.org/v2"}, + search_mode="unordered", +): + """ + Represents the annotation for data in the EnzymeML format. + + Attributes: + file (str): The file associated with the data. + measurements (list[MeasurementAnnot]): A list of measurements associated with the data. + """ + + file: str = attr(name="file") + measurements: list[MeasurementAnnot] = element( + tag="measurement", + default_factory=list, + ) + + @field_validator("file") + @classmethod + def _check_file_path(cls, value): + if not value.startswith("./"): + return "./" + value + return value + + def to_measurements( + self, + meas_data: dict[str, pd.DataFrame], + units: dict[str, UnitDefinition], + ) -> list[Measurement]: + assert self.file in meas_data, f"Data file '{self.file}' not found in data" + + return [ + meas.to_measurement( + meas_data=meas_data[self.file], + units=units, + ) + for meas in self.measurements + ] + + +class MeasurementAnnot( + BaseAnnot, + tag="measurement", + nsmap={"": "https://www.enzymeml.org/v2"}, + search_mode="unordered", +): + """ + Represents the annotation for a measurement in the EnzymeML format. + + Attributes: + id (str): The ID of the measurement. + name (str | None): The name of the measurement. + time_unit (str): The unit of time. + conditions (ConditionsAnnot | None): The conditions associated with the measurement. + species_data (list[SpeciesDataAnnot]): A list of species data associated with the measurement. + """ + + id: str = attr(name="id") + name: str | None = attr(name="name", default=None) + time_unit: str = attr(name="timeUnit") + conditions: ConditionsAnnot | None = element(tag="conditions", default=None) + species_data: list[SpeciesDataAnnot] = element( + tag="speciesData", + default_factory=list, + ) + + def to_measurement( + self, + meas_data: pd.DataFrame, + units: dict[str, UnitDefinition], + ): + df_sub = meas_data[meas_data.id == self.id] + measurement = Measurement( + id=self.id, + name=self.name, + temperature=self.conditions.temperature.value, + temperature_unit=units.get(self.conditions.temperature.unit), + ph=self.conditions.ph.value, + ) + + if df_sub.empty: + raise ValueError(f"No data found for measurement with ID '{self.id}'") + + for species in self.species_data: + self._map_species_data(df_sub, measurement, species, units) + + return measurement + + def _map_species_data( + self, + df_sub: pd.DataFrame, + measurement: Measurement, + species: SpeciesDataAnnot, + units: dict[str, UnitDefinition], + ): + if species.species_id in df_sub.columns: + data = df_sub[species.species_id].to_list() + time = df_sub["time"].to_list() + else: + data, time = None, None + measurement.add_to_species_data( + data=data, + time=time, + species_id=species.species_id, + data_unit=units[species.unit], + time_unit=units[self.time_unit], + initial=species.initial, + data_type=self._map_data_type(species.type), + ) + + @staticmethod + def _map_data_type(dtype: str): + if data_type := getattr(DataTypes, dtype, None): + return data_type + else: + raise ValueError(f"Data type '{dtype}' not supported") + + +class SpeciesDataAnnot( + BaseAnnot, + tag="speciesData", + nsmap={"": "https://www.enzymeml.org/v2"}, + search_mode="unordered", +): + """ + Represents the annotation for species data in the EnzymeML format. + + Attributes: + species_id (str): The ID of the species. + initial (float): The value associated with the species. + type (str | None): The type of data (default is "CONCENTRATION"). + unit (str): The unit of the value. + """ + + species_id: str = attr(name="species") + initial: float = attr(name="value", default=0.0) + type: str | None = attr(name="type", default="CONCENTRATION") + unit: str = attr(name="unit") + + +class ConditionsAnnot( + BaseAnnot, + tag="conditions", + nsmap={"": "https://www.enzymeml.org/v2"}, + search_mode="unordered", +): + """ + Represents the annotation for conditions in the EnzymeML format. + + Attributes: + ph (PHAnnot | None): The pH conditions. + temperature (TemperatureAnnot | None): The temperature conditions. + """ + + ph: PHAnnot | None = element(tag="ph") + temperature: TemperatureAnnot | None = element(tag="temperature", default=None) + + +class PHAnnot( + BaseAnnot, + tag="ph", + nsmap={"": "https://www.enzymeml.org/v2"}, + search_mode="unordered", +): + """ + Represents the annotation for pH in the EnzymeML format. + + Attributes: + value (float): The pH value. + """ + + value: float = attr(name="value") + + +class TemperatureAnnot( + BaseAnnot, + tag="temperature", + nsmap={"": "https://www.enzymeml.org/v2"}, + search_mode="unordered", +): + """ + Represents the annotation for temperature in the EnzymeML format. + + Attributes: + value (float): The temperature value. + unit (str): The unit of the temperature value. + """ + + value: float = attr(name="value") + unit: str = attr(name="unit") + + +class ParameterAnnot( + BaseAnnot, + tag="parameter", + nsmap={"": "https://www.enzymeml.org/v2"}, + search_mode="unordered", +): + """ + Represents the annotation for a parameter in the EnzymeML format. + + Attributes: + lower (float | None): The lower bound of the parameter. + upper (float | None): The upper bound of the parameter. + stderr (float | None): The standard deviation of the parameter. + """ + + lower: float | None = element(tag="lowerBound", default=None) + upper: float | None = element(tag="upperBound", default=None) + stderr: float | None = element(tag="stdDeviation", default=None) + + +class VariablesAnnot( + BaseAnnot, + tag="variables", + nsmap={"": "https://www.enzymeml.org/v2"}, + search_mode="unordered", +): + """ + Represents the annotation for variables in the EnzymeML format. + + Attributes: + variables (list[Variable]): A list of variables. + """ + + variables: list[VariableAnnot] = element(tag="variable", default_factory=list) + + +class VariableAnnot( + BaseAnnot, + tag="variable", + nsmap={"": "https://www.enzymeml.org/v2"}, + search_mode="unordered", +): + """ + Represents a variable in the EnzymeML format. + + Attributes: + id (str | None): The ID of the variable. + name (str | None): The name of the variable. + symbol (str | None): The symbol of the variable. + """ + + id: str | None = attr(name="id") + name: str | None = attr(name="name") + symbol: str | None = attr(name="symbol") + + +# Rebuild all the classes within this file +for cls in [ + SmallMoleculeAnnot, + ProteinAnnot, + ComplexAnnot, + DataAnnot, + MeasurementAnnot, + SpeciesDataAnnot, + ConditionsAnnot, + PHAnnot, + TemperatureAnnot, + ParameterAnnot, + VariablesAnnot, + VariableAnnot, + V2Annotation, +]: + cls.model_rebuild() From 86974310e9eb82541c8cd45bab9e67800c6e8073 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 7 Sep 2024 19:47:06 +0200 Subject: [PATCH 58/80] rename method and update docs --- pyenzyme/tabular.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/pyenzyme/tabular.py b/pyenzyme/tabular.py index a8e5e55..1185dd3 100644 --- a/pyenzyme/tabular.py +++ b/pyenzyme/tabular.py @@ -107,9 +107,9 @@ def read_excel( df = pd.read_excel(path) - return from_pandas( + return from_dataframe( df=df, - id=path.stem, + meas_id=path.stem, data_unit=data_unit, time_unit=time_unit, data_type=data_type, @@ -161,21 +161,21 @@ def read_csv( df = pd.read_csv(path, sep=sep) - return from_pandas( + return from_dataframe( df=df, - id=path.stem, + meas_id=path.stem, data_unit=data_unit, time_unit=time_unit, data_type=data_type, ) -def from_pandas( +def from_dataframe( df: pd.DataFrame, - id: str, data_unit: UnitDefinition, time_unit: UnitDefinition, data_type: DataTypes = DataTypes.CONCENTRATION, + meas_id: str | None = None, ) -> list[Measurement]: """Parse a pandas DataFrame into a list of measurements. @@ -188,11 +188,11 @@ def from_pandas( If there is no 'id' column, the function assumes that there is only one measurement in the file. If there is an 'id' column, the function assumes that there are multiple measurements in the file. Hence, if you want to have multiple measurements in the same - file, you need to have an 'id' column. Otherwise it will return a single measurement. + file, you need to have an 'id' column. Otherwise, it will return a single measurement. Args: df (pd.DataFrame): The DataFrame to parse. - id (str): The ID of the measurement. + meas_id (str | None): The ID of the measurement. Default is None. data_unit (UnitDefinition): The unit of the data. time_unit (UnitDefinition): The unit of the time. data_type (DataTypes): The type of the data. Default is DataTypes.CONCENTRATION. @@ -215,10 +215,14 @@ def from_pandas( data_type=data_type, ) else: + assert meas_id is not None, ( + "The 'meas_id' argument must be provided " + "when parsing a single measurement" + ) return [ _create_single_measurement( df=df, - id=id, + id=meas_id, data_unit=data_unit, time_unit=time_unit, data_type=data_type, @@ -282,7 +286,6 @@ def _process_multiple_measurements( def _validate_data(data: pd.DataFrame) -> None: """Validates the data from a CSV file""" - assert "time" in data, "The CSV file must contain a 'time' column" assert data["time"][0] == 0, "The time column must start at 0" From 43f76e67a077c0f9bb12c5418aa739b762192878 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 7 Sep 2024 19:47:24 +0200 Subject: [PATCH 59/80] use `float` instead of `int` --- pyenzyme/units/units.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyenzyme/units/units.py b/pyenzyme/units/units.py index 917beea..51645a8 100644 --- a/pyenzyme/units/units.py +++ b/pyenzyme/units/units.py @@ -49,10 +49,10 @@ def set_scale(unit: _BaseUnit, scale: int) -> _BaseUnit: class Prefix(Enum): """Enumeration for unit prefixes with corresponding scales.""" - k = partial(set_scale, scale=3) - m = partial(set_scale, scale=-3) - u = partial(set_scale, scale=-6) - n = partial(set_scale, scale=-9) + k = partial(set_scale, scale=3.0) + m = partial(set_scale, scale=-3.0) + u = partial(set_scale, scale=-6.0) + n = partial(set_scale, scale=-9.0) def __mul__(self, other: _BaseUnit) -> _BaseUnit: """Multiply prefix with a BaseUnit. From 20e73a1db66347b0a09c0e31a92d2091b998c9ba Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 7 Sep 2024 19:47:35 +0200 Subject: [PATCH 60/80] add function to extract the namespaces --- pyenzyme/xmlutils.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/pyenzyme/xmlutils.py b/pyenzyme/xmlutils.py index fb23f55..f4fa58a 100644 --- a/pyenzyme/xmlutils.py +++ b/pyenzyme/xmlutils.py @@ -1,3 +1,4 @@ +import re import xml.dom.minidom as minidom import xml.etree.ElementTree as ET from enum import Enum @@ -130,3 +131,29 @@ def serialize_to_pretty_xml_string(element: ET.Element | None) -> str | None: def register_namespaces(nsmap: dict): for prefix, uri in nsmap.items(): ET.register_namespace(prefix, uri) + + +def extract_namespaces(xml_string: str | None) -> set[str]: + """Extract all namespaces from an ElementTree element. + + Args: + xml_string (str | None): The XML string to extract namespaces from. + + Returns: + set[str]: A set of namespace URIs. + """ + + if xml_string is None: + raise ValueError("No XML string provided") + + pattern = r"\{(.*)\}" + namespaces = set() + + root = ET.fromstring(xml_string) + + for child in root.iter(): + if match := re.match(pattern, child.tag): + uri = match.group(1) + namespaces.add(uri) + + return namespaces From 64b20753de4e823c24c9fa122fca0b7bf4000b02 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 7 Sep 2024 19:47:55 +0200 Subject: [PATCH 61/80] update tests --- tests/fixtures/omex/invalid_no_master.omex | Bin 0 -> 26375 bytes tests/fixtures/omex/valid.omex | Bin 0 -> 2429 bytes tests/fixtures/sbml/ode_example_sbml.xml | 254 - tests/fixtures/sbml/reaction_example_sbml.xml | 217 - tests/fixtures/sbml/v1_example.omex | Bin 0 -> 13024 bytes tests/fixtures/sbml/v1_example_enzml.json | 7061 +++++++++++++++++ tests/fixtures/sbml/v1_meas.csv | 10 + tests/fixtures/tabular/data.csv | 23 - tests/fixtures/tabular/data.tsv | 23 + tests/fixtures/tabular/data_invalid.csv | 23 - tests/fixtures/tabular/data_invalid.tsv | 23 + tests/fixtures/tabular/data_invalid_chars.csv | 23 - tests/fixtures/tabular/data_invalid_chars.tsv | 23 + tests/integration/test_sbml.py | 102 +- tests/unit/test_omex.py | 37 + tests/unit/test_sbml_annot_v1.py | 154 + tests/unit/test_sbml_annot_v2.py | 210 + tests/unit/test_tabular.py | 7 +- 18 files changed, 7642 insertions(+), 548 deletions(-) create mode 100644 tests/fixtures/omex/invalid_no_master.omex create mode 100644 tests/fixtures/omex/valid.omex delete mode 100644 tests/fixtures/sbml/ode_example_sbml.xml delete mode 100644 tests/fixtures/sbml/reaction_example_sbml.xml create mode 100644 tests/fixtures/sbml/v1_example.omex create mode 100644 tests/fixtures/sbml/v1_example_enzml.json create mode 100644 tests/fixtures/sbml/v1_meas.csv delete mode 100644 tests/fixtures/tabular/data.csv create mode 100644 tests/fixtures/tabular/data.tsv delete mode 100644 tests/fixtures/tabular/data_invalid.csv create mode 100644 tests/fixtures/tabular/data_invalid.tsv delete mode 100644 tests/fixtures/tabular/data_invalid_chars.csv create mode 100644 tests/fixtures/tabular/data_invalid_chars.tsv create mode 100644 tests/unit/test_omex.py create mode 100644 tests/unit/test_sbml_annot_v1.py create mode 100644 tests/unit/test_sbml_annot_v2.py diff --git a/tests/fixtures/omex/invalid_no_master.omex b/tests/fixtures/omex/invalid_no_master.omex new file mode 100644 index 0000000000000000000000000000000000000000..6b4651cff5fee42e15a88b810766cdd35bd5bfe6 GIT binary patch literal 26375 zcmeHv1yok+)-Daw-6>$u9RkuF(%mJEq#z-wG)OnnrIdiuAR#F!-QC@Jzt3~r8xN@L z-!sO&j{m+4dW|*LGoQKUTC-khac~H95a6OLBUSnO!@s|vf)IlkTiENE8S86VSZbN; z*w`9a(<;a#fIx#e4H$w0K7rru9N<7eA@)E)K)#+w`s?{%Kw!Q*9~hI2c>*|^Hv@!G^YwK!nN=hhhA}RVvyMcvZgWpBQqo<=Q0yQR1>h^HI zH;Ijk3Zdg}X9hZr$wV$8ZG{8{bv}ElUe(~?5iegg+Axdnb4o;9s-ul8*o+Z*2a|k0 zLVrG;fsQF>L|u}R)oN^FA}hnNxw%s?zM_jax!T>`yRali#gA7uMX zyRUC@O!B+DGT*pYdA?<-{&``k>E3y{zTR<#-s%3?aqjfsAkyN{Fm$?$RfPbB0u}JL zYMdYat!fBt5D+|oYOd&mmPSBMOU~BP+Tg2ZPV4#&2c8WWHUmEYL+5MJZDRF2=sX)~ z-BS1YFkv+iKTt>K_%uq2tRP``3r56-q|`;txz+nWFhmnR3}U%?yU7Y%Ec!R_GUyE2b)K5$4Qxg|z(wi5D4yx4n+beSj4YiWgbUN0kU-m=|jpeg&ae zWmzv7^6M`nI7Vn4-I%Jc32c)C{W0s?pzCRAX=vN|;EH#0@1r%;B&Qf;pIum=oh1?b zaKkfJXbyPq1q+zuW4zlfSOobHSHDeC+ZF7MaF~Z>1g&Az%j-tW(uf5lbs{5Z+YCS` zkh<$hbpTL)=d!(D!>-o#{QeWm2Q9=y_B_PkX$O&;BCd4rore6wN58?x>(0_`ul)vFuT-r3FU(ISc z-mdGILuoBwE=G=qdl-NkuI?*KhB5n9Zs+E2 ztwq2zj^L(i)N*~fa8%c`kbys!%tJ7A@w_#bBJ*~hZTJFZH6z!qRFr?7rYS>{uFb;{ zzkOPG-)avp*&k!n0pVzB9%NmM?jcozGdPfm@=}*lJb2>7-}n@4jB@kpU>m9L`V=0kC|tN7YYeYY&=M^?>5v5v;y=n_Y1Uzj z!%Q?MpbadnuDtb)W4J@ie5@-FWLBDakC(o%Qkpcp7l8Q|kyO_4l53k6))7Zk!px z;k#=`^1cuJ5W~54Xoo;yAvIK-AW%tE^2$iY+Ckv#pe(XoY-$H;zJ2~dGZ<02mCXnB znRA%@rDT(329kAe5!|M@JLBCB{O@PiBH!~($UKRf+wiXN9J{DJ<~7)a1R7pWa2PHu zK(j#YUaxl`Ba{HW-^}o?Qt+qS9YG8T2*I^>XJl*xc>Frjm{~sl%l%DW@BY>_My#hr zP+cbSClMG6*Fmicxh$FcA^AM+Yw*E8LR2-X@SW>N-7h`(H1ASvCO#UFCYCKmA#KUj zjY7b3=aFH$lwl-=I7Rk-(SweCm)xC4*+*)*auxY1=Y1nmN+YUVX8kQ2xl29yXOD6F z`JSttC>3b-FF#eBIbW}~q8*#bKVNp)GT2)0P;xb2vaG45HF5p0=lRUMBJWEfi~RCM z2t!FR2sP4y5xdsg$F6L9r)$S26$_TtQdlcb-XUh>mMO(O+ZobCILbK<*hUw1OIaYu zyKt!uDMV~GzBPKRC_frXz6tJu#*$vT|-KMR`$u%0* z*DlMsUlEz{h)Jy*X1=SiK*x9xTSv`m?xD3lQ)GfWCyTnv?6MzMkF63OBGX9Xz1Zas z>&Q5tVGigSY;_qGeG0)<@Q{3C3m?Q9iIhk@O>0H_(k)Tn@5_Q<3~m;qsug*6UxZmA zP0%n~L|B9oy|;G8N{bagJ-ADt^h;rObaRMZia)&HV%_H_X3??qk&=RhLCj2xBWPYP zU`zGK2$!0SbU*MT1i!783?FGgC`~5uj81MrERy(Aq(4wlkkfkSDCZ4{ge?bl#j-Yo zHIqRfQ5z<`SpfBkN`J{?FI%-wO=Jv;y$EW|DE7z<^s*QR)58ox5A0j^>M-pM6vC*T z*zEDA-&dQdQpo7&r1Z#W2-m&vEYLwjmZ7Y00W;<(HEb*8v~NkrZ(fIJYego(S>d-% zKnJhbM@Enre|INRH@DRD7D%$Y=(&=l0;3OgYISO?@`~De7qdoKfHL`hYd=if=Y~d7 zC33{3S&Fy^))H+AA7D%~3?D(U)V+^(SaHf7m|Mu2PTDCw%N9Jh8#V()cP7E$Qg0$T zC&QUqc~++Rs*rH>JhQ00%(nrL3aWjTLRkIG`L z(Er4$hvh*QA@EF-mKE-Tqh(4mYxnF7>jOw=_~)GGox7@`ULs;nX1dOMwCUmb=j4q` zd%hC&-;AKEpw=Zz$i14MfU8zx56&xAx1+nu}KD+v2T{WnWdt zhIom{ypnu#4+D;xkF3#Ou5ge-K(_iGMod33cJ`o2d{{a@P92_y&$2{Oj6j-FKAC`@ zkD0EZukvCd@qNvBpGFJV&}~8AW?S)E5rL&>H1W`a1dZ4jSX+*yfZY~N)Z2nWEQKlh zW>KVi6=XOgK89FUUmuN9tjU6%!CpMHP%SiIOjdstmQ3%x zRa1nu{A%4C?sDs0Z$@7cB5A+{2mmfXU^RkNH=hi}iQIRPQm`SB=k`AC-3;{PDU0Wy zoU3Fp&ox({m||EsTdu#%hJzdJ^Pn5q8$EfTh30W*Y!r-!0iw~VkR;yhJ*(O-MCDTs zj4&VQmz}12Gmj2tk|)6V9&2O@zqjm5pO^_n{sdC45%I(l zFU&`uNvA>uQ5a#f$R$44jd2qbNahl!Hiig&9L<`EqJU_s-io(K@&ymOW;z!N|M z<_Z1c%3gXHu9J+kC(yRJF+SC-x!6^RplqvE*qe$pplD`5dQT-M8acIhq7zKa7L~m5 z8A3;(-N0|H%28nG`W#5)lg~)9iH^&SB{e>Gsos8XWBDQR2=4Z|3ociIea#6o!@$LUIXF8`#dGLx zLtKfd5-pRdm4zpG67OGPp%QTC%^XbbQ6EP?i1uHsJdws#>54kfV#O{-%GB}M|J-|K ziL*SR>7lj0i*+$lc58M8dVyuXpJ$@nUo-8nZOObVFgH3}56nBmb{SwgP0 z;j|Bt>u$>Ovoy}o%*uJ|i%bzpnZucG!-KVglBr%cH; zvxxX>#4x9<+%OACSguV4dr^uHKCN+c2CjPeaoet1#u8j|J0qgd|8M51J`Wm>|9Cr{36LmX5xRUc9yKh4QMo zo0)-KENz?coyoYml$LYF8)(|qim-uU_+^JPK}%r;&icyZQ-;+3FZl*IY3rkT9Z|aW zTbU^xQAB>&S)pqEX^PLz{KgP8Te_SZmrnXoGc->>D@c=bz|Z%TtY*!J@K@k3JMJ*L z+(O6qSE%(z8DF1YMh*;7lAEXq2N>E;07v!ka(RD3F(HjwW`JWQelqJ|TVR9%%%*b7 z%Ornz%m+>u2T`7-o!s&|!*g9m0Rss|_)M}3R25hi8f|RKI%eateZ^pCQ7c%9ZT)d_ z@g3U{TZTbHkVbVyB8ly%?Jz--=BIu zqG~eZw@XPS7m_miqs2+On)n@-VGshafpxwFV$i-XqL7707DS=(FTy2*NFCMcIc|HhZ*C){6k_kdo^i&y(I7x*W}?`bGVf#v zKp(!Lg|Ez}oP%BDjO^{grj=6aYw(?8)@ToJ;ihSt-j?%YP;ttY3twW_o#epFQej03c*F&f+Q9Aja! z6J;Ty=#p;CpS*qj@oe($wM7Bzk)T7+=XT__3)Y%LkZ zW@QgN&|Hhx1gC=kV%$5jAJp77cVBK~WiY%iLI>r<`a)0hkZWr)9H~b5)zm>Wk!!%v z+$%y?TVvu=LOlBSij4Qg*0|V5!oWBkldPNMEc|_}sCPvBRu@IdOcS?N>ao!u+4gs( zgZ6VWPX}R$#Z9YmgmSQa-nU=fM*b8OBx@)W0onxeXgD(t;fPDRztlU6#z@=67sP$970rBSx3@qJD-EW5;ea_dGkdS#no!l@A)v@MT zs*IQX@jeTDL0EC#(F!f^`N-zk3pb8LJ{W#>j_p6ZeN72`x z9&g?t&%ydX%5$XtU(R#r!=XLZP=<;E<#R0)!_6D1D`)JIeRtqm3>m~j*Y*^z-uRM55-Dmgh)Q5{@B2yhLt8pp@6Hm}$(^rUrP0U`3a$e6)LlK|C9kn?6;J_m%@(!*risqO<`8#t>&$rJ-Zh z_*1^Aw3SUx=?eLDeOjP^Qo5UP-}5BXmN)1RE%iT}(WX*uY2vcJY-3&z-i%ydF3m=r z*7Ql!i7(lD(S+l2XXAY(#&M8G1=VxfQG(TT=zgRe4_ctJ!xA3D|8LseRSNzW*d5c& z?2h;Qyl(Dgf0uSmUbo`9ysr836aS}xyslN+%N(H~#TVr{wMqSm=-P=3MpCJoNyMLv z;6=bhQ6Jo9QZg7Km!H3tpE#+w{Q0!JKC5#a9p4$+wb{6{*dhEC@;2CY{x0~NzY{05 zxbuj^Rm0OSPL9R=F3N_mIhkrWKB3HoOCI?<*~3bA_IG87MYYhzqxdufAGklNmFLHn zOZYgEgud9y@O{rT-t~CfwM{K~Wdl*h6tmA4Ow7 zmuWp6GSuW)4WCi4{z65geTJ=RrY%j5vpvKyT@N|iMYR;JShDRVvN6}XOVZj0YgTN@ z&y$|kr74hY_dzK&Qq7dQ59-^@#Gl$JJ^-)JEy(e9(+?Pw?k3f}XfHFVO)>d0SQo$X z!FFCwMLQXqJt)1l@WG~Oefub-Q38sr*kh}9)V1m;iq=CJNZa#|#VhxW6Ij8Xr=8F4 z1v-oneQ+1LRk@4I_R+0!fKNp%00yQyw^wfc+Mac)x;(}bo z9AvkJhsiI_7{3gCExV6Ib{`>uf`9-O{C8Y&S@jRWKtS&QDz5k;3;)FM06iyLAb_5e zmY~0SPHgGQL2zoi!VCBsk8rRX!gg%-P~l*$W%u}GDaF)xLU-gCc6#bsu|3_rK)^lG z`6Q)utwfEjOvJ==MRTlq=o;9X^ogfHnGlm{Sn1iJZ@*Kt7>pk zen@sFeZCgCZ8imcic8_pM)N8>?Bbk% zVMM;tfn{k=OM#F?pKI~RelBUr`xpuev#H)$)RiPn}c4!#L6i}TI zfEfVE{@V;LH#OWK!eac+^Z&4?;k!3o?6CiM)BPB12Hvt}`uCeI$B4!-V{AB!lr6-f} z*{o63cqKS~%)RTaP|jSlPPhDyH63KaoydCFhMLGgnom<3H4mN zC{>g5?qHTrC?Xc@#Z0J%+r={j%+ZzXf@8(7zOH>j$$~ADD0>rFs#dvaop>J@S5{tI zJ4-ippqK=nkXDkP6y?E+jl#Vm3t+XYG}wB<6?ULD4(lRZrx96$wT@_i0lor_QTO%s zi`jL$_22aTS1I@>Hz4Sr*}=f@Kd`&Okbhuz(LxZUUwk!L#_oU0x5Kd5%7bB`4qla3 zZ0=6b$!p!pECC0PUSN+6%Nn@*+Bg=>mn4W^*lT`R#q}1)j+fFS*j!sv*D;;G$ChHC z)!^K-#S5wrTYYXhx{H3Gq4M+xA*oT%4(RI89>X!pJ`(00#up|oo9pTkiEil)(i+g- zo=3Oqr64<&!Slu>_XI>(T1Jg;LmygBetwhh*}BDx!z!HhHNskLE2q!}L|9}bV|})5 zi$AkF&9_0aN_M6!qy(J*B_dYm<6(``V!wCi09fKD`iMW8m zeY}$V`?7S+ETG3LE7E|_zNxorW4x-ufw526n$J8(h@5E?hdfJwl+sRQQT&yYX}Ks? zVdRE$)LcV$#8jTx;>!|h=*5%qjVRaDzgoEBKQg8k%}w675q>NM>tD`NV>YrhBOnGU z2kjc3X`Vet9UM{!&30?RduP&?x4BsTh0tP72@Mqcz?@p|kk_#rzkhj-jLJk{BFM}3 zxF?QvJ;HnJ{fDOl%R8aI#n z4)(w)3Kq=Q`Axh#YqZ34QLBp>K*!EQt$?mOO}5?o+CKwxTdWWnpkJVluYcP7v;LW@ zMEvR2cY~)b+s&-+KjN&B%klkneOnbaPx-#@+Y0*HxAir?-{M8Ou5XL)@4hXX)*_p% zcJNDmTb2Lr+e$RHq6PGA-TG=AV=`ouO#@K_iGyFHYv@R=MQT> zZigv08tr6Akq;RNcA+AGd77G=r~5FVnSf|?wd-FDp1D3BTEm10$4d3(nJ<4A#?0h$ z9RIM>QR=Cawx#QdF>d6p&-%rBec&_dU1&s981?+Gl6 zHWd<0nux6Euc6IgnI&@Ai!+SNQJ_)D$!=tRomh~c%#nMNuSMn3XryI#NOW(|YD9bG z*}}7yK1B*#!@-E9hdY~)xW29$tflqQLXIO(g-g-Y_tGM(S1?yi7Af`P_HD`vm`oub z=c!v8=71V}d7VB#th^-7KVa4;i`0_$38p4{WBEjt(d{wRW(OVC3&otMaWhG3I_Naz zca)F_i3j1@9xsE!ES-+ju_g;K(Yi-AZb|iZ)XaJH20CcaBqxo2 zbggAu579vq-X>AN?uTbfloNt}hx}!R=63{{AHbPHBC%q-Te2lWh)m!aQ z$}_;3{kh7ZQp8D8OQGJ~X8VJ(n#~ticd&(W%68LR^R-pT*4ZX1{t>t@rsj)ERpO(Y z7SgMfjp@8t;nF%s+RnvVw8+iXPRV82sc5OXyU$hX?V{~j(FGGTI5;1*74!8LQ*|>v z3N{eMZUyU&Ds!);VEWXx>k~r(UYHAi@=;o!&7k%`KRti*qg!et3UzI8(LFf17m;i- z>wJZwU3iGtiBa0mg>)ilK1rUWdSo}7gk9Dt z;b1@~3#DP)fPii>xIkt+Jg2N8^MZ*s*ej7|2R!Rtmv`$vjs=5Py~JR5c&dukn*e3Q z*4EMJD5xh)LG#BRZ1d0H86$+KxHH((FvXFKVrMG!G@~V+forbs8$D|kS=ApU=;dT| z)8kE@Wb@#R-_#3AqMM;%jDKQVb63*%*&v31A#otosZlE>zf`mj*DXYvI^z(Bp!sB6 zeA3?OXbeH2DM5FG82ZYHDI?GzYB-ON`A!FCU!oTQxq@gLDMl$wTP%7R}!#6@76xNLn zyFO_(dd?xME$i+(J@*ygR%skcJtKO!J%ff(&oy zE>J#9p*T%`lqQxP>~gIpg}i;T7gOzZJW7qHGvI}***)MWIMGFrNU||^I4D@N;ec%I z{7#55A^5{SZNUm}VqUPu)?wZ!d)@Qt{R3N$#LST``S&wU^3O?5)nRI)TRcR(5mDli zHHrjLEi~&68{0AUb2eHEHfRI3#uGc4m$T(N<&wR+m(CrxPMi#3sf2693!V5IEJD0Tt~ST8(=?*maZRRYOkF?}s#`lT6Hv))7? zFsEesk#b-;Sm3zAyO$d7nhq+9eqs+?8129xY*zPVpME(yI~bpcK>V;~%W~ndoVBgA zu|aX{Zb{1!ZImhza8&mm95@o_a>N%Pvl<25ZF9@ zvCJtwd9pC#uVsuCTVOTK6+jdr9nO5+u**N@4bz0=QB+Zaa8G?X_RG>>Hnl_Rd)kkb zU#A3}oWt;uxQV!d42JrkH*2^KxtQVrS;ujT(*9t1rfs6iwLRQc(F`;PI+pY_anLOn z(#ji!nWrBl3nayZ*Os^Xb}mS6agJM#wlYS2?rQ~b2S`)mMR&szg6YEj$WO1mD0%o; zD!@9B5!I9m@J`)yl(50bDz{)k4x^kIsZem=!}}1kFUwDMu34tgBkw{@y`5YB%Q^di|#<%FQlyjciK+MdHTu`)lk9>vuji#6qz3F$|IEhtG(?vxh+UlHDPbLDTli-o+dIzj*@ zbe&}i3NgW*MD4Hi_^zQDL;c2dTQS1`ryj?f8b=Afxv?+?MkiB*8Y z?jG0-XC|PjP3i~1avQ7Q72pr;aAx{|KLCzkz$%ad{Gk=jOkPtv6>tOvRspjOm>MH( z0rL)++B*?#(|NE`MJa95Iml8)O>I*H_)?LXb>5tb#Y9v@<}WHE!=LpUPoBosai!-! zc(#diwmY7nb37sQw0JJe#E9E2ceYYF_ijgbg6yyg+yhJDmuuwtpNCx_4po@@RX6qX zxdrcsZNLpDB2+~0lj$JrGK9&^foLH*gyB<}4K3+z*1ln)CqeeAd>Zdr_1-U<_)DGf z0v=I&on_e0IwI7-p(DX6*HZ)CY(yyzxkGKlJAQN8+qm%qb>nzi5}bg8PY#jhwR4mK zhpz2B7<9r35>0!+X1;M+hcA(4ScQ)-kq9_e+(Uu^cNlQSHVfMM9|zK8 z3F1qI+nehom$5qPIshl2 z@_?c|J1%e~W=EZ-Y-H~>SrZr8uvy7LiBuTWbecPlsx4wqnvPXZ0S~TyI1{H7E}=+$ zaHvp&C@Gk6gG^5|o3TD|Ag35E#@#^JG#O!0(8mdu-!d zs)=vfi(cjV+oaJHM(NRv_r02_e*!CwhTIkjiP$SP+Dirc)(z&ZHcn4#;nWFbcWZX3 zmJxZ6b%{}>a2+`ab)tHl;U^5#!OY;USgZ}+!7mYiv`mpA+6*yD66HVDAX_1X16Qcw_-(+Z@qJyrl_;h_x1LO zKtq)kLUFjy;FJW?%F`lTMwD;n&d4~cZ3@Ga{*zA2<+F+eG zj@cC_+bp3KC%2&87gXGdhKGn8TSGpzoNueS3ZJ}{e`qRr_$GlQ2?cWQ9hDS1%^p%? z_H$xb+t-`C%S6N3#XUih3d}{EGWRG7(XEo@wYMp{pzfcy)5kpgT*-TTXN1^&*G~*t zPBz9s(twwrs0x$IKLmvlKKf8TA$ll`Ar(uijZtF(Qgc^F z+JKXl|C*(KQr-1+p7NTR%DaIj)q;>~T$20nzTm!&K+P0$P-+;Cs->VF>~7c& zjUKDp>L!mZN7nGH7JtFgH?s`-Xl${YMfLP?>jKqAh$p|E?*O-g2kG{wev2ShOA^3) za&q;8$0mk3_T7gZ(_tt zl#$w~Lc1rqB^VT!`8v@yPR^I&R*L(A=0c)>X@_YVnaoGsS9?J=t?)att{odRqs@)@ zln(xLmf3umxqv=$37_X9EOCdZFW6Zd&@LD}X;7(Ag)`T zR{8=c1tPniaNyPyHzfQj{C`6De`BAH0{SQEPaMpsHk~=brl|c_=FlGd*kC=l*T+g% zKv&AbC{8aT#w=cpC?z3I)mqF#Pe)JB#Aw^k%xcBh!%Y9ww%g9SxVX!Xx$p^NX@M=h z9V6Ypy9&gQPU4CHdis8&j>|U&FdP3fKfrJk+u#anK@b4g#zr=z3YC@XVof3aI|8?R zP4n!dJzw^V@84E55~@p3gieDRw3mKKNzTHiI`xoYvrzarls_0gw;^#)yn^%zVpeOR z%el20TZ*FdXM1IqDz+`rLOyzpVG3{M zp3|h0HM)}Bk6QU!+rpxomjc=b5ZU#%@eiEARrvqJHvV5M=fnMiaK@Vu&K%Sh2tfxR zyw3xf`(@X2y_NP=d|h$JqQW@S2XmZ`v}WXq^*PCG_9bRQy`|(tw>aM3tN)^h(oi8w zHeioUGEiu2KH}j95eYqfpl7N~r;6yi(E+tY_i0$cHfz~| z-G_9j1JUUVA`2UbwSveUDA^jAo=Hnzxm0Ske>ntU?>>Y;0O>$ll+2o z)|-${9$be4LIMMR(f3gwLLm8~iN-o9iz=qUJG~UkPQL?9d{rZ5QtUpnewIe@p&Ngo z|4MeyqWp}a82so5jtCBg))qz6QIVG9AWeR1$Ja*t-ov_RgnhRM*)s6PmV;K&@hS!y z1Sezfgz^%y(LA)^{=mQ1O=DNy@SGBQp%5b*daHbg=<{$*)T`EKf)1{OBt*a`fjy^& z#47;tK!m?d{8csl>BM9Ff_Rpj5Kr)^1)-Mi>ucVJTPL)Ni=+bE-Y76n*I8Xpxd6#R&9{Dk&M8SHFHYH~fByT@T@`NI2eu9xIsI0pY-e&DVUjmcRi^?8{j?>SD8@apA(sE{t?^St2kG0KHr-z4Qbn%mRrp6na z5LqlLUL^+)&{|7Gan7QN_wk);kLB#+C64Af^m9jVPnT}WhC3TxnaqCw&Sk1N z@J)kK@bpnrkB*9Ov*&B2X`vIr6W+`{I)T>PL=N!~+;mbYZi#+2Ec>$T_e!mx)Nt6x zM^W{8C{G8dI#2D<6>xh^UoPU1mipj0&pfMfi!#TU;NFOBBA`*@iy8TvlM5dXc^v@Y z90=~WIlrobKZ$ctFm!NqfGV!v+3@Q>0AFf(fj?bM(EZh)|HFL_|8@RvI~`u$=nuHl z;kQ-mE)DqcuUy^#VBbS&@xLVjHx9hK`y6oNz;7$f-4sCjRV3GMGk0ye@q0m+caH;Z zX7_CY>MG!uAYCKz=3Coc1_unbF7J~DOmco(#qLW0nO8;qwKdqycB%VMahG=`18%h;a&m>=SoBXHb%lmQxdpEzWVs~4pp8~zQ0oO061giBiPT*c&-&V2vD)dcp zUKM-;n3re4fx+{)1rQ8#9n2pMeg8v@zX`3sCcl6nJxm*9%^YbD=SvHSbmzXJIqvA=)_bnKUh za=vG>n(SJL-@L%p>6_nTlI6~?K>k?p4PaiL0r?&#%iW*CygKahTQKwP-4y0k!8d?; zdD!54n0fbq3iIkz!EeE&qP!{0tAcL;^Kx(d_b{obehTwy6Z>z$OryRj%&UTL0P}Kx z#P=}MXs(0#lSYW&f+@`T3z$C<{1cc!4|lmQ0r)$x+2Pw-;}zz*4(1J8AO4O-fI=?6 zz+R3E*4*O(LVo%Txk)R;Wp562tCw%Y@1Go@53j@Y?d9qwJqZ6P>oT}UZAnGUN{i8zje@eYv`TQQ>A>WSyUM+Fn z;NH7jJp3NuD*ufDUX^+S1}~TIz6Xdd_+x-q>vT5&c-cn32M8l{BY;<>-T>g`Qq}hW zA%%Yo@M=x!w*a02MBTtduS&fEz{@3>?*Sf*{21WX+RJYN+!wtOz^hVk0Pu3%;d_8P zVm}6WwZQOO0Jp_&1n{cV8vwkVWB(rDhQyBnUQMR|7Qh9`8v(p3^#%YhCzQVjI4kvI mfLAlezXfpQ(TxCJm3l2eNI-%O1cU+bfdfbk4FdDCApZxae`x&x literal 0 HcmV?d00001 diff --git a/tests/fixtures/omex/valid.omex b/tests/fixtures/omex/valid.omex new file mode 100644 index 0000000000000000000000000000000000000000..087704deb80a5f2edbf78637d98194f6b7c3735e GIT binary patch literal 2429 zcmZ{mX*3jk8^(v3>{*8>360$#6xpI0O9+FqM1<+dzAulmjI0@>5n(LZw=k9&>k|?) zlPqB}vXiY$WGjQbdf)RdPv^Y<`@?na57#;O|M%s(%#DE{FaQ8x0ZbL}*)9UD=yS)L zIU@kTajag>-VYFN0f7pkUY;cwQ?qU*j=1%G{-^7vvvKAVxzv+4C%An1Lax6x;BT}3 zzD|x}O$D$9;}3MucgeJ1lpfTIx;)xd{fYrbMl6ri#dJrEO?DAx8ZQsi6UgW{h3*hP z=0Wk1zb;H$@Lr+69cmFq_4{oks+zfep%z-HVpR$f*I8E7Zs0FTRoL=xPQaN@k7gQQ z-{U%KbzMOAY_edcZdShhl7D=Sb&W*?m>#34$u^b{rhZ>hM`o*5BOYlNy63)7iCyA# z)HdS^=Oc$b8@cZJ_|^sFwQf~sJ+U!)LB#y}4Z_lv$F`#R-%to4aX;ux0Dv+S0AT%v z!pGIk^A`u2ovqJ=I(NiiE%)g2DQ3GSi4%k;Ic<8_=IY$SN3zmSZzO!Sv+$q)NtXz+ z#n7nUlj25v!00zFsyTbF<~T~aCiXi|A=C>XZ1IJ|X)uO(@5hFrD&X3(D_3PIfA~xK@|NJ+0GErsC11@8lJ}KQ*nA*e%Grgmw&u_qtRALc- z{7CFEgGiF4$w+%TzFR37o>^Z21A4rkLx)8HkGQ+Q0!hNRykhkmtt#C6DcKc;vpo6a z<*h$uaud@@r9*&g*%IoV&a&L9U?3v)Dl{S;1GpOxIh&L}$;CXtIf=EeTd ztZ~^~;##8ALRDHr)oNMMYR`|#t>%-%;5xYd)9|(g@0Ue$sOp@O(E+$)?hYu2va&(tjhDbT={YGQsh+#T^ZpOxT8)s1aN{lxRtSxuH&LWAWT z&>iH1L4t;|am6IHr5Q9LZG5L4e?3en2W~KU>EK41s&>oU(34}0bL3p{hf-nzab|Fl zsc(;jW8dv@Tr1RdAh|$?K04Wod5Pi=_g_pgXjyx%VuVKsQ-e^$#EE!ZSK>NUEPc|0$E`xz zTq=7WBACR7uo7{widp=WbJNeXtYOkFM-9J$^kNqe8!C&GPSb%{BpFGsW~@31RRBCH zyUHP&oysQ6e{j~P7PN72eeAZ9U2D%WJTj4dsG>x9rO}#`_XsNZ-qXSON^E%Z6^$<~ z?}koFrqj^(;SW$#<)h#FP7Afc%YxP{6DC(f{iepbgS+K@eU;&V?$!E9!$YdG-a@)l zhh7AC`VYosS%yYN>nByN_9l(P)=%?*kDkvB^++HxCT^d*pI$lv#;kl`=>2+%p_c{{ zR3Zy!ODgp+a=GZdirl_+=o+KnqHDCnVNIa3i1OL##>+Bhkj3L;=$zZB)q?e}Oowa; zQ{B$4A@^=8jGvd8y86k{kgO&-j}hENDP~}QcDm$G9+-3Q#ep`*m*&_&VfxlX1=rj$7}Fh33VOONUmh>XuzlD^B6=^mkd?qM zg$#k*a>-7F=N$7yLDaSI*9{_64-oBoCm^$`pc zpJQMdkuTnvHZ5gu-XI`7*%~hzY{}2wvuAE~KktN%18UWBLHh$;9j0*D^wP+Zj{zli z)(M2q{q;P?W99&~)88ey)|2 zDq#7Jn7OKuW^2J}vgo`H8}4&rI5gi~jRu^L2#il#kY;}`ePz&=QipICAW~Rv)e|Ju zT0i)S!OBAQ*@{Wkud6BeQqD?GTq2h-P*XbcJGA^RVxy03;d2AAxz``sqbrHSxiOv% zzl3ur2cDR)A!zYCZzp}b!nkmMX1JVlak0Oz>+-Od=|voeyZ}CWx=9SjBR9`ajAd!9 zTv+?5N0J-JXBenjE5(wZu@1m2M1(DFc)#B5lO3k7`j1|jT!_Pz*;BA%}lC{?!!d*GKjB*k$UM@QU_AbaiBGYZd>KLr;{W{Ce0y!1L_Z<{BI| zE&z4=Qch%vmWJS`8Fe)0Pv*Y|BqJTx=zScFjtsxr0|4Oa9O$eN7!d4`qQ@B}$^jbO z5FCNQ_Ru2gp|6jKm#QVdIJf0;JAIAFePDRn@Q|czRNvVvAw=-Vc6ndFmeP>n7I3Fg zp5jOOv&d$_)o*fsdaapQ)l=7#&w?71X{Yk7vF?Jxk=k8(PG&f%<2A8EY7=N~%)kf+ z{{IGZeAqu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Vessel 1 - 10.0 - - - - - - - - - - - - - - Enzyme - MTEY - E.coli - - - - - - 1.1.1.1 - E.coli - 12345 - MTEY - - - - - - - - Enzyme-Substrate Complex - - - - - p0 - s0 - - - - - - - - Substrate - - - - - QTBSBXVTEAMEQO-UHFFFAOYSA-N - CC(=O)O - - - - - - - - Product - - - - - QTBSBXVTEAMEQO-UHFFFAOYSA-N - CC(=O)O - - - - - - - - - - - - - - 0.0 - 100.0 - 0.1 - - - - - - - - - - - - 0.0 - 100.0 - 0.1 - - - - - - - - - - - - 0.0 - 100.0 - 0.1 - - - - - - - - 100 - - - - - - - - - - - - - - - - E_tot - kcat - s0 - - - - K_m - s0 - - - - - - - diff --git a/tests/fixtures/sbml/reaction_example_sbml.xml b/tests/fixtures/sbml/reaction_example_sbml.xml deleted file mode 100644 index 95a3e46..0000000 --- a/tests/fixtures/sbml/reaction_example_sbml.xml +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Vessel 1 - 10.0 - - - - - - - - - - - - - - Enzyme - MTEY - - - - - - MTEY - - - - - - - - Substrate - - - - - - - - - - Product - - - - - - - - - - - - - - - - 0.0 - 100.0 - 0.1 - - - - - - - - - - - - 0.0 - 100.0 - 0.1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - kcat - p0 - s0 - - - - K_m - s0 - - - - - - - - diff --git a/tests/fixtures/sbml/v1_example.omex b/tests/fixtures/sbml/v1_example.omex new file mode 100644 index 0000000000000000000000000000000000000000..3783b00c3a106982ccb4620bb824b07276369267 GIT binary patch literal 13024 zcmeI2bx@UU+wSRZq`RcMJEWvTx)G2@8kFwtF6r)O(cPUA(%p^ZMxXcjRK{<|Uwih< zX3ae;Soe?n;F$Be&X`M15)|we5C{+y(AP-IclP>C0?lwhK)u00KnOrUK!#2q4Q)&; z3@z>GoGi=_wajcY#W5cFT0737mAiG>G3=@O>8LSi#|atgXJ(XxD3~)K#=wWAuEGzm zuj8ASyu7@GqbX$8G@1NzWxq^rbB^vF;U*L#$@f&_6ny?+&zz)n#aCJppbQlBM}kyTS?h=}tEX1Fu8d2%r{RSS+HTas>5RPKWgM ztSh+W!O z8EiJpabD#6DCqT&4qr1eTZ(~eYqX*VXzHnLXr%8GzdvjO;PzAm54M<9KJ1uM)SN8Y z$g3nG7@oFtgZpd+{@wlNNc=*l%48CC$g}uA&paP8LUY6Di(rEW#pW0WBW- z__|h&5T>j)7bOvtsaP%E3v%?cgf0i!M^3VH#Z;6nRYf5`MIpMp?5gc|F6@V5gVOAv zxPvfM)n4j)OE%Zlo$O+$j!n^cQkS}ZV;Mvj6G%82s91`sV8;vNV}pX~Ul~7sNnVn` zpB(g=9Hhy^0GqrsEyit2x+w{yK{x%H!lBri%qi|KK2HItFTb*m?E~u+4Z^7Y&TCV^ z&uSE>XNwL%Cf9b4^mX0Wu_N&!Q0_;pB-~pcg)`q8N=}xvjk_hYhl*9q+v;N?X}({% zlg{fi277YL%m8!KdiPZSpefQyh-Y(Ym%|f|rUs9eP?PYg(^6&;8L)*_)eVyQDUgh? z;QVv(b>BV8yqD&=?oD0kL$)Q0E2}xdaQ}nBQ5gI&G&HV;XL&hUlJ|$cejFBj= zU-00TzV+JNm%MKVMwv+3G!cCC^kvEtMM@KuhBd-eJ)7NRw_E(S)d34Clb1k_8TGCtdNpq3lsc4*Wht_YJvrazM(K@2ZOmQnnPA&jQ9fg&5E0}Kc zDU*0MRF&Sb;0G#gD%W+sjS9N81*D&6a+p&C#m&@ z=@*x2ZSdgI2a=|cp|30THI#4lgV+5`Wg~8j1Ex{t5C(%#mg6_t)2Aa@TDmLW$e=;E zwv0+>LWcT=2(9<2I}%=sn6zCwmvSS0b&$lXG>?x*E6uv%Qm~@f)sn}jphbf(%`}lC zi;RuHCeEvn(2;v36aPvLsh$rIi>ihdTGC%hSMAR$z45sOIFGO!qB4`MA#BdzYuJ2b z4w16*fq3EA2g6XqJ0|LrdpQ-(#KS(Wv+&|RF7kksOb5s$zpaw)OEh5kj6P#==`mLA zI2Pr&TMKmf!ChKXh3R+lo9`^sNmOb%T`6o`;te?)CPm!V$kbFC%{AnN4f9V5(@mLB zJaoszbbMO~CB);kB~foH=M*kVzs=tD=>zW$Qt~#G!P__F!5VuRZfv^wPu~XdO{u9J z1n-rX5Pu&)iv-(1Z#$EAJX%ct2JZ|#W)&22sa0dK8yo;7CYRj!J*zMuF2p`GsrEud z&#*r3c=0|^=vr@0O0$zb1nz_BE%WFZ>}2oYTpeS7QP^p~YqmFBBl~aB>xu92u#gOx zR!o6Ms~Qzo5+6nm9F1C;?;b!7Aep~f)u?PYFyEzqJsxuVaP?XCU{-4Bfvv+kNWS{+ zVcETMZqr>5rVD0aYm_}(z`T{UGFSXdvI*-^l4>V{>jU0x&k+>7Gj*@GRIhi!x*1xW zS>=b>)|`F8v{L`XQhzhX=WR#>kUBJZXppPF||p49I(;Ddmcij-Q_&9>;F z!>Tcs*pj#2!q42J@tJQn{{s{6XcvlT^waslb=}Y_2C>$ng3m&Q=r>C`htStS4o+N_ z*HZ6&8e1}!X&oplyM? z)4-@fZvra0sboN^IlLIIFyClfP^h|4Ilo@kaF0(~0escG2j0})Et^?3yuZG!T@3jW z3AQxRUX>D7CxqB1JZk#BVVld-ivX1W5Mfr6=YhWL@K_| zrWs5ZE20b3m%$F09ve7-V5kA_{>3AOg^GWC3HoH$ilu zs)g~uieBY#{Y?2PKx$q}aJ+KV?D{-2s%Mx{AAya#j4;yCJM|tw?B5U&HhEx1?DW6_ zjp^J@mvhn77yLF^A9jIoll$W5Uihh}c(YpQpe zWbOoo%FLovG%~rFlU{f<5*)O#V2yIAoZ z6_WC_7-%$Qex^@=g`pMF@rJv}1qKMYxW=1k%r0E{jmI?7P4qI$!T2JZ(Uz0EK9=K} z%zDR0{Ys+sYEf_Mr)cY-_LD@F+xo{!e#$#z=9mFnqMs*IiNYLPF2OOH;c;|GqSFY@feyWV=q{Iqo|{0&u* zlXdq(GitDWR=xg*zU3oaPGC3V<=aLV2FIpB0eE1vqkf=L{!zMUtwS3*Hf<6JPO-R{ zbqAaJeSO6=jEqQKO?6+qJL`ft2q)W59yl=5;=J3*oK+$HN3}Q^CfhgetQqXp5pwC< z_3&_8PP>Vi@uZpwAer;f+e16KI9#y8-WYNvxQQXd$quz&{J4j-FM}CxXyaIS&y_2I z#|{C3+6C|RWP8m$p62^+CJ3c?Gwpi2k&1(MA9>v&LHArsD}gQnp$Z3K2eh^aAs?z- zOsW{WddWP4Eur#0ah?$b`|390$994F3kR35Rrs?+yoMK^Xw#n1O=7`(>;3sH$z*n9 zB#RBb$-5*LswmMzvQU|5QL%}g=4?iji3D-%s`zU4q-u52lG;-~K7AbY_q3`u@95$c zgtmRr43b6SBHDu|%!T>#slvc;{a(EBSr8{bS-mo(M5mz0=3@QMK#_*CbWu zX+&9b74In9k8Y|LWTPJY0F*r6oW(CAV~wR^eJ-mOofT%T5H$RC3dS026_r$%7(g`U z<+Clu&$rKG;VJQuQU``s_Y}*H-Gj`H-Ahys z6QzD+u2$eBQZK;wS5`(Qkrwq!EuPW&Ry6}CZVShlu%d}fL%vmK^G-B}Ks6UFtx{Xt zjX)IqAg114-E3TFyP0zA$dGDV3vnk13Q>Rx4rjaJLBtH|Cj|y)-*q9IX4Diivip>p zsj}l3-8n8?uy<98+L=F&-mD-U@CE0R=_>p&q@P`z2x!z^M@$VK90uCZ% z;*PI6P(dEZLfj@%yQ+-b@@HqJN7U@C7BzRi| zX5BZvw;PqZ_a1AcKv|{(vCb9q!@Ucc|3Lq#9tNlxhkDBl&MrSz^3`x&Q8zWfitm9y z?vF;NbBS9;^10E$O9TRfeQtD&O>FI~Y@F%Ltv(!TY1n3Qp|~yUtg`niCUX+fy&XxG zshLqZOl3N6U`wzkjN~WJ)fCGxgG1$!C0ij8tJU9iS>-llG&ejmQ zR9ozH0txMWMw%Zx<(;~YoH>_<#R6twg@T-?DA(lOxt3d=9%`#>bQ^n4Q;B1E0zOX{ zS_GjiJBg)b?^O})@8XOW@Z)AdNXDdXr))tx$3bSRMRW6#F{_Rn`y8YV5F_#+)iG|d zaZTN1appZ)p=g$H5|nkXKId+S+D)E#rz2XpdjO#3(QC1G=jPIk5bjim$1p>rjO%3> z7^)*zlfw?xRFk2H@on&`icCnXbmtIQ*p0BpyvC~Sdqq3-W-DErVOPb^Lo%|s$7X1X zVG&{W1>M|@xpR4^aJBXkrRVlPkwD#X*{}}cs9xzBK)RyBFO~Yoex8F*vk<~b)-&a^ z!|SxKX>*9wGe&qUG!pW$zk>o7wPHDub{)errDHP>&^(r}8WMw|9TmDVeqU_zHEmU3 z; ziF4k`NgfN#6^*ZxUdR&{d_LHfw>NydY%ooH2Uw-MVVXY3vpSJVlcMfYe<((RdT{h#otzR_|$)kRcA-%=6i zmb!RAoW9$f%m;&|CP+Qf+{{Adt~>KIjYWJ{#RNdihCj6LgxI zp#I|~XbKgr(Xr}w1f+~q)&54kK z(S*YS?DV%$kl&FI=Zg!=MFym!AOnjLd%ck<78fe0XHi5mE=UPMdA={?`MxOmLQ&BI zVyv7XgBYqv`89FTf@m@+R)vAC*T9CUaf4Wtih>)MZ^<3#NH$GFVyKxEO8dkcP)H2J zLSncnYu{yMDF}!KUF63^%V&7?MMlaTXfjbv_vODM%~FUAksxED!tKwu3#(TM4Weq$ zj0T*ktqKtrzC+?9o(N2p6t2NWo(>XzM~xz1A}kzBf;>IKtvHgg>fqjM*D&^BT*my# zIJQfkBQ%P9z+ats=o2S=t89Eix*B`1PqLJke)Ct-6#Y8bOof%J=mb@ln$~Zo1do93 zCnRa@4tpWP1v0Ml@H(8GFybT`9 zsFrT6Mp%4mqWXhO-K?y+#RZJ5N!Yf91*hPqrZnhIsiB7oj0-tzsBnn2k|}d^S{{ce z{l`qG3+~@>NzVEi&uVhn6cp7ST69E6&a_OJ+fP;+I|7dfz$-(9&Khk>3gD;SZ6+CF z_cIN!4zffUPVL_cfbN4*nZ;42HITIjMHD=_s$`}uvvcbgVOv9R!$OSKs^jzyKox+g!>eOYj zF=gp}3s!H!PLwMZeSNP?f+|xK30*Is2fm2=G{~%7&~>vkny4Oq=sSD5MXb?5x#cR= zf0saT{9dLhoWAW2bF98K;AzGVxg<}|oior#^?uvw+`DGsus5_}JUpIOde?nFJ?p4Srqz{FhZU*8rbe0Y{F%do z(}$rp9gOjf?(@doF#H4-wfs7z@hp(B1&918r@GWAk{&N2(JPkQI|dWm16KX6h9ZI%1MRPzpB`; zN>FyCLdkPE;3J{Q`x2yD4lL8o#MM59=Xn{CFTM-CmtwNM3EfE&*~!JkIh1V^tIldh zr-E~`;_G^S#2P4sSJaw4%F$Wu>ZT^QKX0!ls^Dm@a(~FvIHxFoe~3C$3LsF^`_4=~ z!~@>}NK+qtwf#kdI^okPxr$7zIe&uWY^8USD}oZ{RMpl8UkjQeEbYY=3xd+Caq%9#l4ZjZ9R{~A*9 zjdDT*Iu zL1iI9SQc;Vs`;jjwHud4W`x;d(Hx%&L1dU37MXxTnT0A?Z?2)YW>n>`k&Qd0X<*sg zycBsCh0|7*AJNxowe`&yY|dd`Y^QoNk*l_@jzE91iq*<}SamH`@$ z>B+h-X3W9mu{8-A@dn)(RWJFy?9o?dRG5iLo*4?VS(O4oQ6x!p;g zhyAP<&oe87ClD6maFqkGkBycFSx|Lqttop=NpEg(DM;{6{N3?j$Fb-0KXJ2k4%d2j zcGCFa+2Cbf$(tp|iQY^WCQ1dEt8AYbL^Q-4T4GP|fX;&*PjWN-0k!isubB74ps;56 zT!~faP7_=AC3s))aKt`y*E$F2iHVU_$xxACqE6J(4t!20Mn&B72(I+3gV;UBha6U$Ij^Ne4Z79{h^rghhkpYc6d-ms5@rZ$~FO^E1lwv z`EQ^ko}r=bF<1T?VMwj68B;jZ*y*t-c@j=4UGwp6RJ3#BU1w1VOYNuQWJv%dE$
+o(6;a7A5dmy(Sn9})5gDqJ6JG&nMq zT}B*K*>0PclhFg?`skxwwy|hSyCMA7dNn+ibB|yY!y3=5P$N2gme9pciyrB6NW0xg zDdYFS|Fl=kcM3lASuyM%ikW`~MA%>`7{jyTDK8{`|1tOX`$Gq~`jXC-70G5?n>^0+ z=45G|g&7PBgq~VppLe>-n&_R#onYQ2gYW<`fl~??KZ8uBM_Q0A+m!+* zMXfc21{UYHMHB-8>ib!m(R+tiO4yTT{ySJCwEz`UZ;w{jY`Hz!&@aQyz5*HBv z3=sAhMwysr(P)2&X8R!;PqrVvjp66|tB1a$SKc8JKJ!I}ay*3kYE3_$?a$RTN1*VP zs2yIh($I9}0Q^w1M&|6z=O}`BRYifVi*O~R7%`|2S8rOxYWo5bzl%6gy*U&`SSxRR zR338PeFvlu%u?k?g}T%{mCUzWPwM@5T+vGrG7d7ZQ^Z^Ws@kVpL5|U1oKIW2nr$bS z(@+n>t?C<(H=)7%1z|hy)|DmT7VEiVxs?X`mCY8#`!m9{-_Saz8(;a( z>!adN5zlet;wNqQY6h|fXCXUSjx=5UC${fssWdqm?%UlJE6Bj3gdU zJ64o(I|!2xQ;nps5+zPe8KnY49~Z zax_koflV2H1S%V}P~I@sLeVf~ zKR{vIml=dtx@p_SGFjSR2uCX6#6jMoa1pbp7=9&tw*_66wxYZ@au4XtAN}?U*9Fq8 z&t$aPDJBx>3SjeqG0=smf9l$)MP!;Z04IU=IFqlq)%pRSG*IFvrJxrNg z8y#?+#fCyFfe@bm#5WtIM(OgcE#<2wq}qx%izPz5*&@Lz?UIVL*6Xfjq_>?;lU*9v zRy)kjt(zrdj;|ICzkgmm(!J&{cay_%0seEDYnSAM{?#?6e_WIP;hN}wT$_t{j<`yw zH6UcAoFmPJw~-y;=AiwDW}43d7nkL1)q=&npf%5&6vHOHyqO>hMlv0!&9+3@TV{`D zd0Gm^L>qn}r`$K5s#iL2npXn~ny}586rDdyo^Fx^5=a#GM$BhxUd;`f``kxG7N*F~ z%xy_;>VuU8a0@8^M)kHj-#`Ggv*+7-IvVd_Afi^yf{?Lc-6bsJg70Gd^SEM!4Vz;V z;tBneVLG$AXIroAC#gtp<#Bw`$-Kp;+;xn*OQQI!Rz`};ya!GNvDn4(S&za`;tmD@ zRQhY$0i;ArQ+9(pe!S7w8sA`C#oD#vS}~3g9G*b;A<^0~{&X$z;xqJLU1R=>Ynajh z2d;61L5UWkHk$(!!*uqk7T2_p4b<_!W)w$cad&FQuFIN1LNJWlvXIM{$s*;M!1#dV zWRM8i9@4b>q&jyLk^3qESX+-6_Nv%(fR;T8Z02og2@K_gv~^KRVFy=;1^Vb!s7UOX zRUIMJO&`a@*?N)1Ejg=MP>jy1*JoK1nm9$4s$l}%rbIJD`d5%Imoe0>i?T;?>Y4ZV z(`{VjdWMlrL+?nM$nGjjVI&q|BS}Np?VAiw|My%Yo-^M%A>v;N{&d{zb{=JZ)Kr`p);{)0bP=+Rzn0m}0V&DKk)IrZzoa(#VV*MxQ(=G92! zPQQqE@CZ4BSm;Inr)!1b(b#`=jqR_oR``21$o)$;xcgf+FxmU)fBl>dP6fl2LUBvr z?3FzEOYkV#ct*!lM4R~pQw*^pz@kX)gpErFDkbxWP_=p6OQur4+xyFZX{O}3LAZ~Y z^fWo8AR*eodVK^ahob}axwnaB(X8{f|B#+zbo^ipi|eTyCs-F+pU87~V-HVdDf6{D zRk(?uCem2m#!2|$x*={zV)YziYiNtB4}>7c+O}SE{Sm5cH^X#~iRj2z9J?p^^|x`S zH+36_adkq=@*m?jk9`}xm!8^g1r1MLi-W&r!Q9D4n44qXsk zluC2B2SA{)=b6vT5Pu7w7q6z^vv6g0HP5&Hg(Erm|yT-L5d zG5q$}mNqfAV;g=bao8{doKJjx>tjRD1G4s{>-3bN&~r9m31OFR$~pDpi>fpGnM0+Y zbExG%IW+cV4*k8-{i9yv{KqxM|6l9=x3w;y*0mPrxz1gCz7YSYbs7E>a#mgfNWRC9 zLDHY*P=~x~k%^tglJMt)GZ=S6kHUmN8Vwwgcgv20s%v}J4O-Z(z76R+7gE~@TS$Zhg zUkYoWFEc1Yl>pb&_L#=K;bvWHg>QA}Fy%k%!;+4k6_uSH#zJ*3VCQJH@lHQEYreOX zhkKMRg*S5bhF;2)FWKUle?mUUEwZnD`(}%-Cs&(c(90QjXietuKZzQWroWE^g=ovP2R z*jS^;h0)#O0QL!U_cg~;iw%l#M)itN@nxoM%VE0ttcl3TN>lagJW5FlV8wZfq}O@J zck#P^M?r6mSnbL>`mlMTkQn*$#Ja8mZPh%V&qj>37n?bmTnb|Aw)iroNP1?>pSS20 z9-~z!AVtN_==Px)T7}yTaM;mu6m%wn`$f%j(SD@ZLUdJz4PUVdIs%J%lEBXq+ozNI zy5&EcmI4s68vR_F5d}g|>l8LdWEC5+61W% zEhLjhOkO#QV&9(%TkZnER_S3GtKMRy*_h%!vM1}q>5encC**MLo-CEq9ebWnsNvs4 zQ(`tE9eP^bCxiOQciTD24wo z_;U{P68t?K{1|-v0wD-~HS<4qx0mG0#{U;7K=_ONXAJO?ecAs0VjYNnV}CZoFWHw( z;4ikA_&4@vOZbv~*$Vw)*GPV2e>O%h*_RE$FBX&RH}+?H@REI57XM;pUjN4aERtWc zFN?!ptPlBb?9Wp1CHt~O`o#h$eq(V}x&o3BoAfPtdA3yyMs|Dk@ literal 0 HcmV?d00001 diff --git a/tests/fixtures/sbml/v1_example_enzml.json b/tests/fixtures/sbml/v1_example_enzml.json new file mode 100644 index 0000000..58f51ec --- /dev/null +++ b/tests/fixtures/sbml/v1_example_enzml.json @@ -0,0 +1,7061 @@ +{ + "name": "EnzymeML_Lagerman", + "references": [], + "created": null, + "modified": null, + "creators": [], + "vessels": [ + { + "id": "v0", + "name": "Falcon Tube", + "volume": 5.0, + "unit": { + "id": "u0", + "name": "ml", + "base_units": [ + { + "kind": "litre", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/1dc4d70c-b72b-4f9b-9b23-6c034e300b76", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/dcc02304-4131-4e6c-bca5-d377846b19c0", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "constant": true, + "ld_id": "enzml:Vessel/266359b2-760e-425d-b57b-04581a8f00e2", + "ld_type": [ + "enzml:Vessel", + "OBO:OBI_0400081" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "volume": "OBO:OBI_0002139" + } + } + ], + "proteins": [ + { + "id": "p0", + "name": "E", + "constant": false, + "sequence": "MRRLAACLLATAVAAATSAALAQTSPMTPDITGKPFVAGDAANDYVKREVMIPMRDGVKLHTVIVLPKGARNAPIVLTRTPYDASGRTERLASPHMKDLLSAGDDVFVEGGYIRVFQDVRGKYGSEGDYVMTRPLRGPLNPSEVDHATDAWDTIDWLVKNVKESNGKVGMIGSSYEGFTVVMALTNPHPALKVAAPESPMIDGWMGDDWFNYGAFRQVNFDYFTGQLSKRGKGAGIPRQGHDDYSNFLQAGSAGDFAKAAGLEQLPWWHKLTEHAAYDSFWQEQALDKVMARTPLKVPTMWLQGLWDQEDMWGAIHSYAAMEPRDKSNKLNYLVMGPWRHSQVNSDASSLGALNFDGDTARQFRRDVLRPFFDQYLVDGAPKAATPPVFIYNTGENHWDRLQAWPRSCDKGCAAKSKPLYLQAGGKLSFQAPTAAQPAFEEYVSDPAKPVPFVPRPVDFGDRSMWTTWLVHDQRFVDGRPDVLTFVTEPLTAPLQIAGAPDVHLQASTSGSDSDWVVKLIDVYPDEMAADPKMGGYELPVSMAIFRGRYRESFSTPAPLAANQPLAFQFGLPTANHTFQPGHRVMVQVQSSLFPLYDRNPQTYVPNVFFAKPGDYQKATQRVYVAPGQGSYISLPVR", + "vessel_id": "v0", + "ecnumber": "3.1.1.43", + "organism": "Xanthomonas campestris pv. campestris", + "organism_tax_id": null, + "references": [], + "ld_id": "enzml:Protein/0c8f6457-d592-432a-9198-d3f62b78abf9", + "ld_type": [ + "enzml:Protein", + "schema:Protein" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@type": "@id" + }, + "name": "schema:name", + "sequence": "OBO:GSSO_007262", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "organism": "OBO:OBI_0100026", + "organism_tax_id": { + "@type": "@id" + }, + "references": { + "@id": "schema:citation", + "@type": "@id" + } + } + }, + { + "id": "p1", + "name": "EA", + "constant": false, + "sequence": "MRRLAACLLATAVAAATSAALAQTSPMTPDITGKPFVAGDAANDYVKREVMIPMRDGVKLHTVIVLPKGARNAPIVLTRTPYDASGRTERLASPHMKDLLSAGDDVFVEGGYIRVFQDVRGKYGSEGDYVMTRPLRGPLNPSEVDHATDAWDTIDWLVKNVKESNGKVGMIGSSYEGFTVVMALTNPHPALKVAAPESPMIDGWMGDDWFNYGAFRQVNFDYFTGQLSKRGKGAGIPRQGHDDYSNFLQAGSAGDFAKAAGLEQLPWWHKLTEHAAYDSFWQEQALDKVMARTPLKVPTMWLQGLWDQEDMWGAIHSYAAMEPRDKSNKLNYLVMGPWRHSQVNSDASSLGALNFDGDTARQFRRDVLRPFFDQYLVDGAPKAATPPVFIYNTGENHWDRLQAWPRSCDKGCAAKSKPLYLQAGGKLSFQAPTAAQPAFEEYVSDPAKPVPFVPRPVDFGDRSMWTTWLVHDQRFVDGRPDVLTFVTEPLTAPLQIAGAPDVHLQASTSGSDSDWVVKLIDVYPDEMAADPKMGGYELPVSMAIFRGRYRESFSTPAPLAANQPLAFQFGLPTANHTFQPGHRVMVQVQSSLFPLYDRNPQTYVPNVFFAKPGDYQKATQRVYVAPGQGSYISLPVR", + "vessel_id": "v0", + "ecnumber": "3.1.1.43", + "organism": "Xanthomonas campestris pv. campestris", + "organism_tax_id": null, + "references": [], + "ld_id": "enzml:Protein/f4e0ac2d-4d76-4e06-b565-ecad5184ebb3", + "ld_type": [ + "enzml:Protein", + "schema:Protein" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@type": "@id" + }, + "name": "schema:name", + "sequence": "OBO:GSSO_007262", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "organism": "OBO:OBI_0100026", + "organism_tax_id": { + "@type": "@id" + }, + "references": { + "@id": "schema:citation", + "@type": "@id" + } + } + }, + { + "id": "p2", + "name": "ED", + "constant": false, + "sequence": "MRRLAACLLATAVAAATSAALAQTSPMTPDITGKPFVAGDAANDYVKREVMIPMRDGVKLHTVIVLPKGARNAPIVLTRTPYDASGRTERLASPHMKDLLSAGDDVFVEGGYIRVFQDVRGKYGSEGDYVMTRPLRGPLNPSEVDHATDAWDTIDWLVKNVKESNGKVGMIGSSYEGFTVVMALTNPHPALKVAAPESPMIDGWMGDDWFNYGAFRQVNFDYFTGQLSKRGKGAGIPRQGHDDYSNFLQAGSAGDFAKAAGLEQLPWWHKLTEHAAYDSFWQEQALDKVMARTPLKVPTMWLQGLWDQEDMWGAIHSYAAMEPRDKSNKLNYLVMGPWRHSQVNSDASSLGALNFDGDTARQFRRDVLRPFFDQYLVDGAPKAATPPVFIYNTGENHWDRLQAWPRSCDKGCAAKSKPLYLQAGGKLSFQAPTAAQPAFEEYVSDPAKPVPFVPRPVDFGDRSMWTTWLVHDQRFVDGRPDVLTFVTEPLTAPLQIAGAPDVHLQASTSGSDSDWVVKLIDVYPDEMAADPKMGGYELPVSMAIFRGRYRESFSTPAPLAANQPLAFQFGLPTANHTFQPGHRVMVQVQSSLFPLYDRNPQTYVPNVFFAKPGDYQKATQRVYVAPGQGSYISLPVR", + "vessel_id": "v0", + "ecnumber": "3.1.1.43", + "organism": "Xanthomonas campestris pv. campestris", + "organism_tax_id": null, + "references": [], + "ld_id": "enzml:Protein/9ea218b0-3a74-4c4a-8780-44e8f983a652", + "ld_type": [ + "enzml:Protein", + "schema:Protein" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@type": "@id" + }, + "name": "schema:name", + "sequence": "OBO:GSSO_007262", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "organism": "OBO:OBI_0100026", + "organism_tax_id": { + "@type": "@id" + }, + "references": { + "@id": "schema:citation", + "@type": "@id" + } + } + } + ], + "complexes": [ + { + "id": "c0", + "name": "E·PGME", + "constant": false, + "participants": [ + "p0", + "s0" + ], + "ld_id": "enzml:Complex/04dc9a6c-447e-4ca2-9750-571b61887db1", + "ld_type": [ + "enzml:Complex" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "participants": { + "@type": "@id" + } + } + }, + { + "id": "c1", + "name": "E·7-ADCA", + "constant": false, + "participants": [ + "p0", + "s1" + ], + "ld_id": "enzml:Complex/ec23025d-01c8-4772-8903-4caa3a127b37", + "ld_type": [ + "enzml:Complex" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "participants": { + "@type": "@id" + } + } + }, + { + "id": "c2", + "name": "E·PG", + "constant": false, + "participants": [ + "p0", + "s3" + ], + "ld_id": "enzml:Complex/c1b6711c-3850-48cc-a0d0-35c05f331f76", + "ld_type": [ + "enzml:Complex" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "participants": { + "@type": "@id" + } + } + }, + { + "id": "c3", + "name": "E·PGME·PGME", + "constant": false, + "participants": [ + "p0", + "s0", + "s0" + ], + "ld_id": "enzml:Complex/012f50d8-71cb-413b-ac3a-4edcc42f79bb", + "ld_type": [ + "enzml:Complex" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "participants": { + "@type": "@id" + } + } + }, + { + "id": "c4", + "name": "EA·7-ADCA", + "constant": false, + "participants": [ + "p1", + "s1" + ], + "ld_id": "enzml:Complex/e6da379c-e1f4-4df3-8696-0cadab750c3b", + "ld_type": [ + "enzml:Complex" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "participants": { + "@type": "@id" + } + } + }, + { + "id": "c5", + "name": "EA·PGME", + "constant": false, + "participants": [ + "p1", + "s0" + ], + "ld_id": "enzml:Complex/88430636-3e99-471c-8af2-11bf030d7439", + "ld_type": [ + "enzml:Complex" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "participants": { + "@type": "@id" + } + } + }, + { + "id": "c6", + "name": "E·CEX", + "constant": false, + "participants": [ + "p0", + "s2" + ], + "ld_id": "enzml:Complex/be53e866-6ac7-4e8b-a577-d9971ea6284c", + "ld_type": [ + "enzml:Complex" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "participants": { + "@type": "@id" + } + } + } + ], + "small_molecules": [ + { + "id": "s0", + "name": "PGME", + "constant": false, + "vessel_id": "v0", + "canonical_smiles": null, + "inchi": null, + "inchikey": null, + "references": [], + "ld_id": "enzml:SmallMolecule/da10c14f-f0f7-4bdc-830c-159a136eab59", + "ld_type": [ + "enzml:SmallMolecule" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "references": { + "@id": "schema:citation", + "@type": "@id" + } + } + }, + { + "id": "s1", + "name": "7-ADCA", + "constant": false, + "vessel_id": "v0", + "canonical_smiles": null, + "inchi": null, + "inchikey": null, + "references": [], + "ld_id": "enzml:SmallMolecule/39027e8d-aaa2-4696-b61b-efa6d21b29cb", + "ld_type": [ + "enzml:SmallMolecule" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "references": { + "@id": "schema:citation", + "@type": "@id" + } + } + }, + { + "id": "s2", + "name": "CEX", + "constant": false, + "vessel_id": "v0", + "canonical_smiles": null, + "inchi": null, + "inchikey": null, + "references": [], + "ld_id": "enzml:SmallMolecule/2171bf8e-38b0-4703-90b2-d65b16e6c5cb", + "ld_type": [ + "enzml:SmallMolecule" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "references": { + "@id": "schema:citation", + "@type": "@id" + } + } + }, + { + "id": "s3", + "name": "PG", + "constant": false, + "vessel_id": "v0", + "canonical_smiles": null, + "inchi": null, + "inchikey": null, + "references": [], + "ld_id": "enzml:SmallMolecule/6a1c5ef7-0e4b-49ce-a9cf-6c4d98cd62c2", + "ld_type": [ + "enzml:SmallMolecule" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "name": "schema:name", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "references": { + "@id": "schema:citation", + "@type": "@id" + } + } + } + ], + "reactions": [ + { + "id": "r0", + "name": "reaction-1", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_n * c1 - p0 * s1)", + "equation_type": "rateLaw", + "species_id": null, + "variables": [ + { + "id": "s1", + "name": "s1", + "symbol": "s1", + "ld_id": "enzml:Variable/739854e3-9f43-4da9-a5e8-a5abe69e041d", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + }, + { + "id": "p0", + "name": "p0", + "symbol": "p0", + "ld_id": "enzml:Variable/eb1236c7-2a4e-402b-9326-5962c94bd918", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + }, + { + "id": "c1", + "name": "c1", + "symbol": "c1", + "ld_id": "enzml:Variable/858a59d8-e3bc-470b-afb2-b6a1fe2c9471", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + } + ], + "ld_id": "enzml:Equation/0bb0b6c6-f36e-411f-bcf2-e1028f142e18", + "ld_type": [ + "enzml:Equation" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + "species": [ + { + "species_id": "c1", + "stoichiometry": -1.0, + "ld_id": "enzml:ReactionElement/dfb2ccaf-1bfb-4afa-be7a-0bd0b373dc92", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "p0", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/31d53986-5823-42b3-8809-3f3533c42209", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s1", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/39eee1ea-216d-4e81-adeb-bd073bfe04e6", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "modifiers": [], + "ld_id": "enzml:Reaction/ad7703fd-d470-41c0-b1e6-6ec02cd09173", + "ld_type": [ + "enzml:Reaction" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "modifiers": { + "@type": "@id" + } + } + }, + { + "id": "r1", + "name": "reaction-2", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_s * c0 - p0 * s0)", + "equation_type": "rateLaw", + "species_id": null, + "variables": [ + { + "id": "s0", + "name": "s0", + "symbol": "s0", + "ld_id": "enzml:Variable/587eb821-1540-4d2c-9ae3-c2367f4ea763", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + }, + { + "id": "p0", + "name": "p0", + "symbol": "p0", + "ld_id": "enzml:Variable/fd9c9847-72fe-4ddf-90e3-780a3d09828e", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + }, + { + "id": "c0", + "name": "c0", + "symbol": "c0", + "ld_id": "enzml:Variable/ed0c575e-27fb-412a-b760-7d7fb4880eae", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + } + ], + "ld_id": "enzml:Equation/ab92e387-ea2c-4253-a6d9-85b34812d0c6", + "ld_type": [ + "enzml:Equation" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + "species": [ + { + "species_id": "c0", + "stoichiometry": -1.0, + "ld_id": "enzml:ReactionElement/1a3814b3-d75f-4968-ba3e-52ed353ddaec", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "p0", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/082bf7c5-5e12-4269-8ec4-7aaabcefc521", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s0", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/692e114d-1b20-49cb-a31c-1ef4e6372eff", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "modifiers": [], + "ld_id": "enzml:Reaction/37bbd6ed-7155-45f5-926d-b7a05aef90b3", + "ld_type": [ + "enzml:Reaction" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "modifiers": { + "@type": "@id" + } + } + }, + { + "id": "r2", + "name": "reaction-3", + "reversible": false, + "kinetic_law": { + "equation": "k_2 * c0", + "equation_type": "rateLaw", + "species_id": null, + "variables": [ + { + "id": "c0", + "name": "c0", + "symbol": "c0", + "ld_id": "enzml:Variable/10944940-0e0f-403a-945f-6bb30559a814", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + } + ], + "ld_id": "enzml:Equation/581555de-e7d7-44b0-bff7-b70daa80b332", + "ld_type": [ + "enzml:Equation" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + "species": [ + { + "species_id": "c0", + "stoichiometry": -1.0, + "ld_id": "enzml:ReactionElement/a09375f5-eed6-4d0e-8f8c-c267d2c03215", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "p1", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/1f59badb-fe24-4dcc-918c-a8eee5e0b4b6", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "modifiers": [], + "ld_id": "enzml:Reaction/69e17d53-c2cd-45c6-b130-dc57129d91cb", + "ld_type": [ + "enzml:Reaction" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "modifiers": { + "@type": "@id" + } + } + }, + { + "id": "r3", + "name": "reaction-4", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_si * c3 - c0 * s0)", + "equation_type": "rateLaw", + "species_id": null, + "variables": [ + { + "id": "s0", + "name": "s0", + "symbol": "s0", + "ld_id": "enzml:Variable/0fa9e816-49cb-4eb9-bfc5-07da81097332", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + }, + { + "id": "c0", + "name": "c0", + "symbol": "c0", + "ld_id": "enzml:Variable/84314cc0-78ff-4212-992c-e4db6dddc998", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + }, + { + "id": "c3", + "name": "c3", + "symbol": "c3", + "ld_id": "enzml:Variable/d5abbf0a-a681-4689-89cb-b68368d869f8", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + } + ], + "ld_id": "enzml:Equation/6ae4ba9f-38d9-4272-bdb3-5cfe0862ad9c", + "ld_type": [ + "enzml:Equation" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + "species": [ + { + "species_id": "c3", + "stoichiometry": -1.0, + "ld_id": "enzml:ReactionElement/b6bddf0b-f321-4b35-a761-b8fec864c048", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "c0", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/8b9ddc6d-d565-4841-90e7-7542bb53ed42", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s0", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/dfe74eb2-04ef-4294-ace3-d7213384600b", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "modifiers": [], + "ld_id": "enzml:Reaction/5e987412-a689-4c9e-8b6b-60af17a23812", + "ld_type": [ + "enzml:Reaction" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "modifiers": { + "@type": "@id" + } + } + }, + { + "id": "r4", + "name": "reaction-5", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_si * c5 - p1 * s0)", + "equation_type": "rateLaw", + "species_id": null, + "variables": [ + { + "id": "s0", + "name": "s0", + "symbol": "s0", + "ld_id": "enzml:Variable/e042e7c7-cb4f-431e-a14a-6f85ac960ee5", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + }, + { + "id": "p1", + "name": "p1", + "symbol": "p1", + "ld_id": "enzml:Variable/9023171c-8a33-41c6-a6bd-25547c314eea", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + }, + { + "id": "c5", + "name": "c5", + "symbol": "c5", + "ld_id": "enzml:Variable/4d57d5b4-abe1-47a2-9c31-5af6d6bcfd95", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + } + ], + "ld_id": "enzml:Equation/3a45c7c9-4f9a-4a5b-98d2-a51a95fd1a06", + "ld_type": [ + "enzml:Equation" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + "species": [ + { + "species_id": "c5", + "stoichiometry": -1.0, + "ld_id": "enzml:ReactionElement/c07692cc-4cb3-48cc-8489-21913669ad82", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "p1", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/b98e8799-3f18-4cb3-93a7-8cc4101334ee", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s0", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/fffcbb7c-6aab-4b3c-92d3-46f691193aee", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "modifiers": [], + "ld_id": "enzml:Reaction/f8ab8dcd-2181-462f-9041-178c7a4d7595", + "ld_type": [ + "enzml:Reaction" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "modifiers": { + "@type": "@id" + } + } + }, + { + "id": "r5", + "name": "reaction-6", + "reversible": false, + "kinetic_law": { + "equation": "k_6 * c5", + "equation_type": "rateLaw", + "species_id": null, + "variables": [ + { + "id": "c5", + "name": "c5", + "symbol": "c5", + "ld_id": "enzml:Variable/876c0dc2-78cd-47a7-ae25-5a932fad5d4b", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + } + ], + "ld_id": "enzml:Equation/818a14f2-dec4-4553-a436-c5631b32621e", + "ld_type": [ + "enzml:Equation" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + "species": [ + { + "species_id": "c5", + "stoichiometry": -1.0, + "ld_id": "enzml:ReactionElement/ba109129-99fc-4593-a1e1-6c3d92bc7af8", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "p0", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/16755967-7f44-40f1-a196-3a207e5ac8f6", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s3", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/9c11fb57-4937-428d-b0b9-72f2e5269ad0", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "modifiers": [], + "ld_id": "enzml:Reaction/081e432a-2f0a-41dc-aa2f-23d233b433a1", + "ld_type": [ + "enzml:Reaction" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "modifiers": { + "@type": "@id" + } + } + }, + { + "id": "r6", + "name": "reaction-7", + "reversible": false, + "kinetic_law": { + "equation": "k_3 * p1", + "equation_type": "rateLaw", + "species_id": null, + "variables": [ + { + "id": "p1", + "name": "p1", + "symbol": "p1", + "ld_id": "enzml:Variable/04730435-555c-4f24-9999-9e2b36998f04", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + } + ], + "ld_id": "enzml:Equation/3f23e40e-a947-4a4b-b8d1-02c190151160", + "ld_type": [ + "enzml:Equation" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + "species": [ + { + "species_id": "p1", + "stoichiometry": -1.0, + "ld_id": "enzml:ReactionElement/7bb7bcdc-a911-452b-95b1-ef43f28f3993", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "p0", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/fa525dc5-6ff0-488f-90cd-0ef71023af74", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s3", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/9bc34f27-56b6-4cff-ad34-0ce70d1eccb8", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "modifiers": [], + "ld_id": "enzml:Reaction/602ceba1-4e27-46f2-9802-8b4b9319f260", + "ld_type": [ + "enzml:Reaction" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "modifiers": { + "@type": "@id" + } + } + }, + { + "id": "r7", + "name": "reaction-8", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_pg * c2 - p0 * s3)", + "equation_type": "rateLaw", + "species_id": null, + "variables": [ + { + "id": "s3", + "name": "s3", + "symbol": "s3", + "ld_id": "enzml:Variable/44e37914-169e-4200-8926-632e88ffd247", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + }, + { + "id": "p0", + "name": "p0", + "symbol": "p0", + "ld_id": "enzml:Variable/f7b58e64-8d46-4942-ab23-ab3f4305faa7", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + }, + { + "id": "c2", + "name": "c2", + "symbol": "c2", + "ld_id": "enzml:Variable/f97b7788-9c93-476a-8eb5-9ec40c272719", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + } + ], + "ld_id": "enzml:Equation/fa541202-09fb-4d17-a6b8-0f8b2bede914", + "ld_type": [ + "enzml:Equation" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + "species": [ + { + "species_id": "c2", + "stoichiometry": -1.0, + "ld_id": "enzml:ReactionElement/2c693223-bebb-40af-a4a9-eab4773e4f1e", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "p0", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/f1f8512c-51df-4aec-8fb6-aedc4045a36c", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s3", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/26c8ee81-5611-46bb-8799-cb43945e3292", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "modifiers": [], + "ld_id": "enzml:Reaction/fd6c3dcb-8c61-495a-83d4-e7150639a0c6", + "ld_type": [ + "enzml:Reaction" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "modifiers": { + "@type": "@id" + } + } + }, + { + "id": "r8", + "name": "reaction-9", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_n * c4 - p1 * s1)", + "equation_type": "rateLaw", + "species_id": null, + "variables": [ + { + "id": "s1", + "name": "s1", + "symbol": "s1", + "ld_id": "enzml:Variable/2202f03a-ee75-498c-982d-c5bcc1da8cff", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + }, + { + "id": "p1", + "name": "p1", + "symbol": "p1", + "ld_id": "enzml:Variable/1b9c358d-954e-43df-b2a8-80e0cd550c58", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + }, + { + "id": "c4", + "name": "c4", + "symbol": "c4", + "ld_id": "enzml:Variable/e27f20ee-409b-4693-bb8b-ea01a6c7af38", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + } + ], + "ld_id": "enzml:Equation/eda8119b-d63b-41cb-b15f-e2dc30bf42fc", + "ld_type": [ + "enzml:Equation" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + "species": [ + { + "species_id": "c4", + "stoichiometry": -1.0, + "ld_id": "enzml:ReactionElement/8108956a-09e9-4a8f-a4f9-9c998e91b41b", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "p1", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/c33b4482-44fb-4c3d-9a48-b5991ae8a84d", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s1", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/8ea9e0a9-40a3-4bfb-aa50-7a68b14b9f12", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "modifiers": [], + "ld_id": "enzml:Reaction/7cf61023-4805-49d4-b638-c8d0c3c68906", + "ld_type": [ + "enzml:Reaction" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "modifiers": { + "@type": "@id" + } + } + }, + { + "id": "r9", + "name": "reaction-10", + "reversible": false, + "kinetic_law": { + "equation": "k_5 * c4", + "equation_type": "rateLaw", + "species_id": null, + "variables": [ + { + "id": "c4", + "name": "c4", + "symbol": "c4", + "ld_id": "enzml:Variable/5f485dc8-80a6-4686-8410-f87feaf42cdd", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + } + ], + "ld_id": "enzml:Equation/aa63b319-cacd-4672-83f6-aa88dfb65cc9", + "ld_type": [ + "enzml:Equation" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + "species": [ + { + "species_id": "c4", + "stoichiometry": -1.0, + "ld_id": "enzml:ReactionElement/6aaac849-3a44-4de9-9abf-0ba43e55a341", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "p0", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/0306a459-db92-444e-ab20-91bab2330d87", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s3", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/3ae8e061-16f5-4a6b-a1f3-7a5b3097dd02", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s1", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/606d0318-559d-4eac-a58d-aa83047fd003", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "modifiers": [], + "ld_id": "enzml:Reaction/b303087f-9836-49ca-a639-e998bd104bca", + "ld_type": [ + "enzml:Reaction" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "modifiers": { + "@type": "@id" + } + } + }, + { + "id": "r10", + "name": "reaction-11", + "reversible": false, + "kinetic_law": { + "equation": "k_4 * c4 - k_4b * c6", + "equation_type": "rateLaw", + "species_id": null, + "variables": [ + { + "id": "c4", + "name": "c4", + "symbol": "c4", + "ld_id": "enzml:Variable/913b6251-0542-43ea-95cb-c9acd3ae7945", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + }, + { + "id": "c6", + "name": "c6", + "symbol": "c6", + "ld_id": "enzml:Variable/27ac35a3-67bc-4f22-a3b1-455fce39990a", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + } + ], + "ld_id": "enzml:Equation/1273bdb2-9ae8-43b2-9cd0-fc09911b7531", + "ld_type": [ + "enzml:Equation" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + "species": [ + { + "species_id": "c4", + "stoichiometry": -1.0, + "ld_id": "enzml:ReactionElement/d36e29f8-73d3-457c-b74f-e958b65bac91", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "c6", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/3685b3dd-7d08-4afb-b4da-f8ce9d9586e5", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "modifiers": [], + "ld_id": "enzml:Reaction/7d0a1b58-d335-4e89-bb13-ffe767a744b2", + "ld_type": [ + "enzml:Reaction" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "modifiers": { + "@type": "@id" + } + } + }, + { + "id": "r11", + "name": "reaction-12", + "reversible": false, + "kinetic_law": { + "equation": "v_r * (K_p * c6 - p0 * s2)", + "equation_type": "rateLaw", + "species_id": null, + "variables": [ + { + "id": "s2", + "name": "s2", + "symbol": "s2", + "ld_id": "enzml:Variable/6397908f-d77e-4ca9-8e27-2e226c80f7e6", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + }, + { + "id": "p0", + "name": "p0", + "symbol": "p0", + "ld_id": "enzml:Variable/e7cfc02e-b610-4ccb-89ee-daacabed739c", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + }, + { + "id": "c6", + "name": "c6", + "symbol": "c6", + "ld_id": "enzml:Variable/cc5537e8-d4f1-432e-aea1-220d7e328583", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + } + ], + "ld_id": "enzml:Equation/5e2d619b-3bac-4438-8858-248073d0f22a", + "ld_type": [ + "enzml:Equation" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + "species": [ + { + "species_id": "c6", + "stoichiometry": -1.0, + "ld_id": "enzml:ReactionElement/8135c188-7e32-45bb-bf50-591af5ce5ef3", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "p0", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/132367c9-242f-4211-9ce7-231e1e92ca3d", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s2", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/9e815893-abfd-441a-aeef-fcb3f5a18c60", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "modifiers": [], + "ld_id": "enzml:Reaction/eb2da850-710c-4791-b913-b98551c03cf5", + "ld_type": [ + "enzml:Reaction" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "modifiers": { + "@type": "@id" + } + } + }, + { + "id": "r12", + "name": "Enzyme deactivation", + "reversible": false, + "kinetic_law": { + "equation": "k_d * p0", + "equation_type": "rateLaw", + "species_id": null, + "variables": [ + { + "id": "p0", + "name": "p0", + "symbol": "p0", + "ld_id": "enzml:Variable/3907e514-45bc-414d-ab8f-f8e3ed6aa807", + "ld_type": [ + "enzml:Variable" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": "schema:identifier" + } + } + ], + "ld_id": "enzml:Equation/c787eb21-d16e-4a99-94b3-d5dfc5d2e18e", + "ld_type": [ + "enzml:Equation" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + "species": [ + { + "species_id": "p0", + "stoichiometry": -1.0, + "ld_id": "enzml:ReactionElement/323a7387-5a3d-46b3-80b4-df49857846b7", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "p2", + "stoichiometry": 1.0, + "ld_id": "enzml:ReactionElement/0d3e8f7f-8905-413e-9828-9b996d53c42f", + "ld_type": [ + "enzml:ReactionElement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "modifiers": [], + "ld_id": "enzml:Reaction/68d342aa-8baa-4b09-af57-7295b9c220b1", + "ld_type": [ + "enzml:Reaction" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "modifiers": { + "@type": "@id" + } + } + } + ], + "measurements": [ + { + "id": "m0", + "name": "Cephalexin synthesis 1", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [], + "time": [], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/7009a5a0-2a4b-48a9-a2fe-a15c1996ea56", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s0", + "initial": 20.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 20.0, + 16.385, + 12.45, + 9.255, + 5.135, + 0.645, + 0.0, + 0.0, + 0.0, + 0.0 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/e238f7a1-f650-4831-b76f-b598d00befd2", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s1", + "initial": 10.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 10.0, + 8.72, + 7.025, + 5.94, + 5.18, + 5.815, + 7.57, + 8.945, + 9.87, + 10.575 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/73f0b816-f4b8-40a9-be0b-caa5e2b921ed", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 0.0, + 2.66, + 3.885, + 4.815, + 5.755, + 4.9, + 3.24, + 1.915, + 1.075, + 0.575 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/a6b0996b-4e99-4690-ae0b-acf39b8a5db5", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s3", + "initial": 2.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 2.0, + 3.705, + 5.77, + 8.035, + 11.965, + 17.28, + 19.93, + 21.36, + 22.55, + 23.38 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/90aed427-8218-4060-9325-78fb30421400", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null, + "ld_id": "enzml:Measurement/9ebfc686-1d8c-45d2-8b71-2894c1864a31", + "ld_type": [ + "enzml:Measurement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "group_id": { + "@type": "@id" + } + } + }, + { + "id": "m1", + "name": "Cephalexin synthesis 2", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [], + "time": [], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/83295774-8ef6-469b-9c27-6d842d8f1dc3", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s0", + "initial": 20.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 20.0, + 16.5, + 12.67, + 9.915, + 5.91, + 1.32, + 0.0, + 0.0, + 0.0, + 0.0 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/152d4556-e4bd-45e5-8a38-76f523919be8", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s1", + "initial": 20.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 20.0, + 18.58, + 16.255, + 14.82, + 13.14, + 12.625, + 14.2, + 15.445, + 17.02, + 18.5 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/290b82f1-24a2-4cf1-b2a1-9bb588bacc91", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 0.0, + 3.205, + 5.09, + 6.385, + 7.855, + 8.225, + 7.17, + 5.63, + 4.1, + 2.0 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/18ff80a2-e47f-42e1-8f52-e7cde6229b52", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s3", + "initial": 1.3, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 1.3, + 2.955, + 4.615, + 6.175, + 8.8, + 13.25, + 16.055, + 17.62, + 19.34, + 20.8 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/17fa4903-a91e-4632-b2f6-ba4177242f6e", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null, + "ld_id": "enzml:Measurement/b50a9826-a122-4049-a0d9-72608f5d7ded", + "ld_type": [ + "enzml:Measurement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "group_id": { + "@type": "@id" + } + } + }, + { + "id": "m2", + "name": "Cephalexin synthesis 3", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [], + "time": [], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/56257632-5d0f-42e6-8456-a87960012aec", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s0", + "initial": 20.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 20.0, + 13.005, + 9.505, + 7.21, + 4.0, + 0.91, + 0.0, + 0.0, + 0.0, + 0.0 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/5a92b627-c258-4a51-b80d-b7f61d7f9c61", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s1", + "initial": 40.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 40.0, + 36.555, + 33.87, + 32.49, + 30.405, + 29.985, + 30.675, + 31.905, + 33.045, + 34.525 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/df66132e-b397-4fb3-889c-320832a9fa6a", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 0.0, + 3.59, + 5.57, + 6.85, + 8.24, + 8.945, + 8.18, + 7.255, + 6.39, + 5.69 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/7d7176db-024d-44f5-ac8d-372b1e542190", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s3", + "initial": 5.1, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 5.1, + 6.365, + 7.59, + 8.59, + 10.13, + 12.93, + 14.565, + 15.8, + 16.98, + 18.15 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/bb3ac242-6fc3-4361-8201-6f4eba0c701f", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null, + "ld_id": "enzml:Measurement/c40885bd-e6d2-4a0d-8501-61153b889548", + "ld_type": [ + "enzml:Measurement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "group_id": { + "@type": "@id" + } + } + }, + { + "id": "m3", + "name": "Cephalexin synthesis 4", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [], + "time": [], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/80dd2dbc-e8c1-4a85-8c69-2aa08002d3d6", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s0", + "initial": 20.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 20.0, + 15.345, + 11.64, + 8.975, + 5.265, + 1.455, + 0.385, + 0.0, + 0.0, + 0.0 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/0fec1211-63d2-4acd-9045-6aff130b3b21", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s1", + "initial": 60.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 60.0, + 56.8, + 53.58, + 51.6, + 48.265, + 47.6, + 48.185, + 49.0, + 50.76, + 52.505 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/32f593a6-10bb-4a84-bc50-da5bf395abcf", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 0.0, + 3.77, + 6.11, + 7.74, + 9.595, + 11.325, + 11.065, + 10.2, + 9.66, + 9.005 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/de7c2009-3843-4ab0-8c14-ee552bda055e", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s3", + "initial": 1.9, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 1.9, + 2.94, + 3.99, + 4.935, + 6.305, + 8.87, + 10.61, + 12.0, + 13.075, + 14.24 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/4ecae298-da27-4ff0-84d8-e6b9e787a3e7", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null, + "ld_id": "enzml:Measurement/423ff165-ffe4-4b22-8fb2-2530979019e9", + "ld_type": [ + "enzml:Measurement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "group_id": { + "@type": "@id" + } + } + }, + { + "id": "m4", + "name": "Cephalexin synthesis 5", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [], + "time": [], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/72a24c01-0d02-4ff9-9681-674af209cbcc", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s0", + "initial": 20.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 20.0, + 15.34, + 12.075, + 9.335, + 5.515, + 1.46, + 0.35, + 0.0, + 0.0, + 0.0 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/1740dfd5-ef69-4224-85a0-c95c9098581f", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s1", + "initial": 42.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 42.0, + 38.405, + 36.06, + 34.06, + 31.46, + 29.595, + 30.615, + 31.83, + 32.985, + 34.08 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/e1877dba-f18c-424e-8c08-865b0bf52fa9", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 0.0, + 3.42, + 5.52, + 6.99, + 8.78, + 9.875, + 9.44, + 8.515, + 7.47, + 6.695 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/4bd64269-b76c-40cf-8821-7cd5eccac941", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s3", + "initial": 1.5, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 1.5, + 2.815, + 4.105, + 5.085, + 6.69, + 9.535, + 11.49, + 13.08, + 14.505, + 15.63 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/4aa004f6-4c76-445d-b062-307a19de3d34", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null, + "ld_id": "enzml:Measurement/55659a52-9b19-44f8-b147-c1a8eefb89cd", + "ld_type": [ + "enzml:Measurement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "group_id": { + "@type": "@id" + } + } + }, + { + "id": "m5", + "name": "Cephalexin synthesis 6", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [], + "time": [], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/7f4330d7-f4a0-423d-b356-fd2fc75d05b8", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s0", + "initial": 40.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 40.0, + 34.595, + 31.035, + 27.01, + 21.225, + 10.1, + 5.9, + 3.33, + 1.695, + 0.84 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/f42ad110-bb4a-4b0c-9ad7-317902ae3d5e", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s1", + "initial": 42.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 42.0, + 37.9, + 34.9, + 32.805, + 29.17, + 24.5, + 23.0, + 22.595, + 23.09, + 24.8 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/2892fc0b-1a08-49be-aa90-5b5117db3d4c", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 0.0, + 3.625, + 6.4, + 8.5, + 11.1, + 15.645, + 16.5, + 16.345, + 15.81, + 15.255 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/bee20633-5c19-452a-afc5-88a7cd63171f", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s3", + "initial": 3.3, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 3.3, + 4.75, + 6.13, + 7.52, + 11.1, + 17.315, + 20.5, + 22.605, + 24.925, + 26.5 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/63d39151-22f7-43b0-a41e-b6e68521c660", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null, + "ld_id": "enzml:Measurement/1fbe8205-3b8e-4a12-815d-6a500cf0a0b9", + "ld_type": [ + "enzml:Measurement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "group_id": { + "@type": "@id" + } + } + }, + { + "id": "m6", + "name": "Cephalexin synthesis 7", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [], + "time": [], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/008a3aef-87fb-4223-8e15-485f996a5e2a", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s0", + "initial": 76.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 76.0, + 73.36, + 69.3, + 65.6, + 60.2, + 46.9, + 38.03, + 30.4, + 24.655, + 19.7 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/abe795da-2bcf-4169-9b1b-00dce5c89c0b", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s1", + "initial": 40.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 40.0, + 38.51, + 36.175, + 34.09, + 31.025, + 25.965, + 22.94, + 20.805, + 19.445, + 18.36 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/1d135c06-0d7f-4985-9f66-0bb0ed319ea3", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 0.0, + 3.04, + 5.195, + 7.28, + 10.295, + 15.76, + 18.74, + 20.755, + 21.89, + 22.875 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/f0529f66-fd91-408d-ad89-d0bb6269e96b", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s3", + "initial": 5.7, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 5.7, + 7.21, + 8.735, + 10.4, + 13.49, + 20.83, + 26.8, + 32.53, + 36.77, + 41.13 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/75f005dc-f784-408b-a0d3-faac8bd56dd2", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null, + "ld_id": "enzml:Measurement/2b22ecf8-694c-4b8b-a0b8-cfa93985d10a", + "ld_type": [ + "enzml:Measurement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "group_id": { + "@type": "@id" + } + } + }, + { + "id": "m7", + "name": "Cephalexin synthesis 8", + "species_data": [ + { + "species_id": "p0", + "initial": 0.0002, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [], + "time": [], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/1194146a-2472-4a47-a965-6d6b067159a4", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s0", + "initial": 140.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 140.0, + 138.2, + 136.0, + 134.745, + 132.905, + 130.085, + 128.395, + 126.75, + 125.96, + 124.6 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/6df936ba-e921-4371-99f3-e413440e8cad", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s1", + "initial": 40.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 40.0, + 38.8, + 37.725, + 36.88, + 36.155, + 34.61, + 33.71, + 33.11, + 33.035, + 32.8 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/34b13ea7-1ddf-4cfe-9085-0868afb7cafd", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s2", + "initial": 0.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 0.0, + 1.53, + 2.395, + 3.04, + 3.895, + 4.99, + 5.545, + 5.98, + 6.325, + 6.625 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/2dacfe72-5369-47fe-90c6-0ca5e02a8eaa", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + }, + { + "species_id": "s3", + "initial": 14.0, + "data_unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", + "prepared": null, + "data": [ + 14.0, + 17.9, + 18.85, + 19.735, + 20.84, + 22.595, + 23.62, + 25.0, + 26.025, + 26.93 + ], + "time": [ + 0.0, + 1.0, + 2.0, + 3.0, + 5.0, + 10.0, + 15.0, + 20.0, + 25.0, + 30.0 + ], + "time_unit": { + "id": "u4", + "name": "min", + "base_units": [ + { + "kind": "second", + "exponent": 1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f850b08a-70ca-4c1d-9d22-8cb605114900", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/b4539155-9de0-459a-b21e-a6b6a8b5cbc6", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "is_simulated": false, + "ld_id": "enzml:MeasurementData/0721b007-fbc7-479c-8809-e4cee68146ec", + "ld_type": [ + "enzml:MeasurementData" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "species_id": { + "@type": "@id" + } + } + } + ], + "group_id": null, + "ph": null, + "temperature": null, + "temperature_unit": null, + "ld_id": "enzml:Measurement/68d6418c-d141-47bc-874c-7f074314398f", + "ld_type": [ + "enzml:Measurement" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + }, + "group_id": { + "@type": "@id" + } + } + } + ], + "equations": [], + "parameters": [ + { + "id": "v_r", + "name": "", + "symbol": "v_r", + "value": null, + "unit": { + "id": "u5", + "name": "l / min mmole", + "base_units": [ + { + "kind": "litre", + "exponent": 1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/3d69db1d-0c29-42d6-8db8-869e82a0872b", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": -1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/65742653-abe1-48cf-bdb8-870e5eb72651", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "second", + "exponent": -1, + "multiplier": 60.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/f7629b8a-811f-4902-81c5-b894cbd747d5", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/696269f4-fe9c-4a0e-ba37-eb178a9929aa", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "initial_value": null, + "upper": null, + "lower": null, + "stderr": null, + "constant": true, + "ld_id": "enzml:Parameter/9d70fdd3-6710-4a37-a78e-528eaeef0227", + "ld_type": [ + "enzml:Parameter" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + } + } + }, + { + "id": "K_si", + "name": "", + "symbol": "K_si", + "value": null, + "unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "initial_value": null, + "upper": null, + "lower": null, + "stderr": null, + "constant": false, + "ld_id": "enzml:Parameter/4ce00cc7-df14-4e0e-84f6-255a9f32413a", + "ld_type": [ + "enzml:Parameter" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + } + } + }, + { + "id": "K_n", + "name": "", + "symbol": "K_n", + "value": null, + "unit": { + "id": "u1", + "name": "mmole / l", + "base_units": [ + { + "kind": "litre", + "exponent": -1, + "multiplier": 1.0, + "scale": 1.0, + "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + { + "kind": "mole", + "exponent": 1, + "multiplier": 1.0, + "scale": -3.0, + "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", + "ld_type": [ + "enzml:BaseUnit" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + } + ], + "ld_id": "enzml:UnitDefinition/69bc380e-93ec-47a8-bb61-cfe6337b43e4", + "ld_type": [ + "enzml:UnitDefinition" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/" + } + }, + "initial_value": null, + "upper": null, + "lower": null, + "stderr": null, + "constant": false, + "ld_id": "enzml:Parameter/1565e70f-f664-495c-bf37-ea2fab1d08c1", + "ld_type": [ + "enzml:Parameter" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "id": { + "@id": "schema:identifier", + "@type": "@id" + } + } + } + ], + "ld_id": "enzml:EnzymeMLDocument/4495780f-dfcb-4842-81d6-94868b704720", + "ld_type": [ + "enzml:EnzymeMLDocument" + ], + "ld_context": { + "enzml": "http://www.enzymeml.org/v2/", + "OBO": "http://purl.obolibrary.org/obo/", + "schema": "https://schema.org/", + "name": "schema:title", + "references": { + "@id": "schema:citation", + "@type": "@id" + }, + "created": "schema:dateCreated", + "modified": "schema:dateModified", + "creators": "schema:creator" + } +} \ No newline at end of file diff --git a/tests/fixtures/sbml/v1_meas.csv b/tests/fixtures/sbml/v1_meas.csv new file mode 100644 index 0000000..e3a821c --- /dev/null +++ b/tests/fixtures/sbml/v1_meas.csv @@ -0,0 +1,10 @@ +0.0,20.0,10.0,0.0,2.0 +1.0,16.385,8.72,2.66,3.705 +2.0,12.45,7.025,3.885,5.77 +3.0,9.255,5.94,4.815,8.035 +5.0,5.135,5.18,5.755,11.965 +10.0,0.645,5.815,4.9,17.28 +15.0,0.0,7.57,3.24,19.93 +20.0,0.0,8.945,1.915,21.36 +25.0,0.0,9.87,1.075,22.55 +30.0,0.0,10.575,0.575,23.38 diff --git a/tests/fixtures/tabular/data.csv b/tests/fixtures/tabular/data.csv deleted file mode 100644 index aac51d8..0000000 --- a/tests/fixtures/tabular/data.csv +++ /dev/null @@ -1,23 +0,0 @@ -time;s0;s1;id -0.0;0.0;10.0;m0 -1.0;1.0;9.0;m0 -2.0;2.0;8.0;m0 -3.0;3.0;7.0;m0 -4.0;4.0;6.0;m0 -5.0;5.0;5.0;m0 -6.0;6.0;4.0;m0 -7.0;7.0;3.0;m0 -8.0;8.0;2.0;m0 -9.0;9.0;1.0;m0 -10.0;10.0;0.0;m0 -0.0;0.0;10.0;m1 -1.0;1.0;9.0;m1 -2.0;2.0;8.0;m1 -3.0;3.0;7.0;m1 -4.0;4.0;6.0;m1 -5.0;5.0;5.0;m1 -6.0;6.0;4.0;m1 -7.0;7.0;3.0;m1 -8.0;8.0;2.0;m1 -9.0;9.0;1.0;m1 -10.0;10.0;0.0;m1 diff --git a/tests/fixtures/tabular/data.tsv b/tests/fixtures/tabular/data.tsv new file mode 100644 index 0000000..f99de1f --- /dev/null +++ b/tests/fixtures/tabular/data.tsv @@ -0,0 +1,23 @@ +time s0 s1 id +0.0 0.0 10.0 m0 +1.0 1.0 9.0 m0 +2.0 2.0 8.0 m0 +3.0 3.0 7.0 m0 +4.0 4.0 6.0 m0 +5.0 5.0 5.0 m0 +6.0 6.0 4.0 m0 +7.0 7.0 3.0 m0 +8.0 8.0 2.0 m0 +9.0 9.0 1.0 m0 +10.0 10.0 0.0 m0 +0.0 0.0 10.0 m1 +1.0 1.0 9.0 m1 +2.0 2.0 8.0 m1 +3.0 3.0 7.0 m1 +4.0 4.0 6.0 m1 +5.0 5.0 5.0 m1 +6.0 6.0 4.0 m1 +7.0 7.0 3.0 m1 +8.0 8.0 2.0 m1 +9.0 9.0 1.0 m1 +10.0 10.0 0.0 m1 diff --git a/tests/fixtures/tabular/data_invalid.csv b/tests/fixtures/tabular/data_invalid.csv deleted file mode 100644 index 2199d4a..0000000 --- a/tests/fixtures/tabular/data_invalid.csv +++ /dev/null @@ -1,23 +0,0 @@ -s0;s1;id -0.0;10.0;m0 -1.0;9.0;m0 -2.0;8.0;m0 -3.0;7.0;m0 -4.0;6.0;m0 -5.0;5.0;m0 -6.0;4.0;m0 -7.0;3.0;m0 -8.0;2.0;m0 -9.0;1.0;m0 -10.0;0.0;m0 -0.0;10.0;m1 -1.0;9.0;m1 -2.0;8.0;m1 -3.0;7.0;m1 -4.0;6.0;m1 -5.0;5.0;m1 -6.0;4.0;m1 -7.0;3.0;m1 -8.0;2.0;m1 -9.0;1.0;m1 -10.0;0.0;m1 diff --git a/tests/fixtures/tabular/data_invalid.tsv b/tests/fixtures/tabular/data_invalid.tsv new file mode 100644 index 0000000..395f2a6 --- /dev/null +++ b/tests/fixtures/tabular/data_invalid.tsv @@ -0,0 +1,23 @@ +s0 s1 id +0.0 10.0 m0 +1.0 9.0 m0 +2.0 8.0 m0 +3.0 7.0 m0 +4.0 6.0 m0 +5.0 5.0 m0 +6.0 4.0 m0 +7.0 3.0 m0 +8.0 2.0 m0 +9.0 1.0 m0 +10.0 0.0 m0 +0.0 10.0 m1 +1.0 9.0 m1 +2.0 8.0 m1 +3.0 7.0 m1 +4.0 6.0 m1 +5.0 5.0 m1 +6.0 4.0 m1 +7.0 3.0 m1 +8.0 2.0 m1 +9.0 1.0 m1 +10.0 0.0 m1 diff --git a/tests/fixtures/tabular/data_invalid_chars.csv b/tests/fixtures/tabular/data_invalid_chars.csv deleted file mode 100644 index 2e89614..0000000 --- a/tests/fixtures/tabular/data_invalid_chars.csv +++ /dev/null @@ -1,23 +0,0 @@ -s0;s1;id -0.0;10.0;m0 -1.0;m1;m0 -2.0;8.0;m0 -3.0;7.0;m0 -m0;6.0;m0 -5.0;5.0;m0 -6.0;4.0;m0 -7.0;3.0;m0 -8.0;2.0;m0 -9.0;1.0;m0 -10.0;0.0;m0 -0.0;10.0;m1 -1.0;9.0;m1 -2.0;8.0;m1 -3.0;7.0;m1 -4.0;6.0;m1 -5.0;5.0;m1 -6.0;4.0;m1 -7.0;3.0;m1 -8.0;2.0;m1 -9.0;1.0;m1 -10.0;0.0;m1 diff --git a/tests/fixtures/tabular/data_invalid_chars.tsv b/tests/fixtures/tabular/data_invalid_chars.tsv new file mode 100644 index 0000000..67c6b37 --- /dev/null +++ b/tests/fixtures/tabular/data_invalid_chars.tsv @@ -0,0 +1,23 @@ +s0 s1 id +0.0 10.0 m0 +1.0 m1 m0 +2.0 8.0 m0 +3.0 7.0 m0 +m0 6.0 m0 +5.0 5.0 m0 +6.0 4.0 m0 +7.0 3.0 m0 +8.0 2.0 m0 +9.0 1.0 m0 +10.0 0.0 m0 +0.0 10.0 m1 +1.0 9.0 m1 +2.0 8.0 m1 +3.0 7.0 m1 +4.0 6.0 m1 +5.0 5.0 m1 +6.0 4.0 m1 +7.0 3.0 m1 +8.0 2.0 m1 +9.0 1.0 m1 +10.0 0.0 m1 diff --git a/tests/integration/test_sbml.py b/tests/integration/test_sbml.py index f6acb23..63d9141 100644 --- a/tests/integration/test_sbml.py +++ b/tests/integration/test_sbml.py @@ -1,7 +1,11 @@ +import tempfile from pathlib import Path +import pyenzyme as pe +import pyenzyme.equations as peq from pyenzyme import EnzymeMLDocument -from pyenzyme.tools import to_dict_wo_json_ld +from pyenzyme.tools import to_dict_wo_json_ld, get_all_parameters +from pyenzyme.units import mM, s, K, ml class TestSBML: @@ -22,9 +26,9 @@ def test_parse_sbml_odes(self): parsed_doc == expected_doc ), "Parsed document does not match expected document" - def test_parse_sbml_reactions(self): + def test_v1_import(self): # Arrange - path = Path("tests/fixtures/sbml/reactions_example.omex") + path = Path("tests/fixtures/sbml/v1_example.omex") # Act enzmldoc = EnzymeMLDocument.from_sbml(path) @@ -32,9 +36,99 @@ def test_parse_sbml_reactions(self): # Assert parsed_doc = to_dict_wo_json_ld(enzmldoc) expected_doc = to_dict_wo_json_ld( - EnzymeMLDocument.read("tests/fixtures/sbml/reaction_example_enzml.json") + EnzymeMLDocument.read("tests/fixtures/sbml/v1_example_enzml.json") ) assert ( parsed_doc == expected_doc ), "Parsed document does not match expected document" + + def test_end_to_end(self): + # Arrange + + doc = pe.EnzymeMLDocument(name="Test") + + ml.id = "u0" + s.id = "u1" + mM.id = "u2" + K.id = "u3" + + # Add Vessels + vessel = doc.add_to_vessels(name="Vessel 1", volume=10.0, unit=ml, id="v0") + + # Add Species + substrate = doc.add_to_small_molecules( + id="s0", + name="Substrate", + vessel_id=vessel.id, + canonical_smiles="CC(=O)O", + inchikey="QTBSBXVTEAMEQO-UHFFFAOYSA-N", + ) + + doc.add_to_small_molecules( + id="s1", + name="Product", + vessel_id=vessel.id, + canonical_smiles="CC(=O)O", + inchikey="QTBSBXVTEAMEQO-UHFFFAOYSA-N", + ) + + # Add Enzyme + enzyme = doc.add_to_proteins( + id="p0", + name="Enzyme", + sequence="MTEY", + vessel_id=vessel.id, + ecnumber="1.1.1.1", + organism="E.coli", + organism_tax_id="12345", + ) + + doc.add_to_complexes( + id="c0", + name="Enzyme-Substrate Complex", + participants=[enzyme.id, substrate.id], + ) + + doc.equations += peq.build_equations( + "s1'(t) = kcat * E_tot * s0(t) / (K_m + s0(t))", + "E_tot = 100", + unit_mapping={"kcat": 1 / s, "K_m": mM, "E_tot": mM}, + enzmldoc=doc, + ) + + doc.measurements += pe.read_excel( + "tests/fixtures/tabular/data.xlsx", + data_unit=mM, + time_unit=s, + ) + + for parameter in get_all_parameters(doc): + parameter.lower = 0.0 + parameter.upper = 100.0 + parameter.stderr = 0.1 + + for meas in doc.measurements: + meas.temperature = 298.15 + meas.temperature_unit = K + meas.ph = 7.0 + + with tempfile.TemporaryDirectory() as dirname: + path = Path(dirname) / "test.omex" + doc.to_sbml(path) + + # Act + enzmldoc = EnzymeMLDocument.from_sbml(path) + + # Assert + parsed_doc = to_dict_wo_json_ld(enzmldoc) + expected_doc = to_dict_wo_json_ld(doc) + + # Remove spaces of equation + for eq in parsed_doc["equations"]: + eq["equation"] = eq["equation"].replace(" * ", "*") + eq["equation"] = eq["equation"].replace(" / ", "/") + + assert ( + parsed_doc == expected_doc + ), "Parsed document does not match expected document" diff --git a/tests/unit/test_omex.py b/tests/unit/test_omex.py new file mode 100644 index 0000000..31bddad --- /dev/null +++ b/tests/unit/test_omex.py @@ -0,0 +1,37 @@ +from pathlib import Path + +import pandas as pd +import pytest + +from pyenzyme.sbml import read_sbml_omex + + +class TestOmex: + def test_valid_omex(self): + # Arrange + path = Path("./tests/fixtures/omex/valid.omex") + + # Arrange + sbml_file, data = read_sbml_omex(path=path) + + # Assert + expected_data = pd.read_csv("./tests/fixtures/tabular/data.tsv", sep="\t") + + assert sbml_file is not None, "SBML file is None" + assert data is not None, "Data is None" + assert len(data) > 0, "Data is empty" + assert isinstance(data, dict), "Data is not a dict" + + assert "./data.tsv" in data, "Key 'something' not found in data" + assert data["./data.tsv"] is not None, "Data is None" + assert data["./data.tsv"].equals( + expected_data + ), "Data is not equal to expected data" + + def test_invalid_omex_no_master(self): + # Arrange + path = Path("./tests/fixtures/omex/invalid_no_master.omex") + + # Act + with pytest.raises(ValueError): + sbml_file, data = read_sbml_omex(path=path) diff --git a/tests/unit/test_sbml_annot_v1.py b/tests/unit/test_sbml_annot_v1.py new file mode 100644 index 0000000..2380b67 --- /dev/null +++ b/tests/unit/test_sbml_annot_v1.py @@ -0,0 +1,154 @@ +import pandas as pd + +from pyenzyme.sbml.versions.v1 import ( + DataAnnot, + ReactantAnnot, + ComplexAnnot, + ProteinAnnot, +) +from pyenzyme.units import M + + +class TestSBMLAnnotV1: + def test_reactant_annotation(self): + # Arrange + xml_string = """ + + SomeInChI + SomeSmiles + 29111 + + """ + + # Act + obj = ReactantAnnot.from_xml(xml_string) + + # Assert + assert obj.inchi == "SomeInChI", "InChI is different" + assert obj.smiles == "SomeSmiles", "SMILES is different" + assert obj.chebi_id == "29111", "Chebi ID is different" + + def test_complex_annotation(self): + # Arrange + xml_string = """ + + s0 + s1 + + """ + + # Act + obj = ComplexAnnot.from_xml(xml_string) + + # Assert + assert len(obj.participants) == 2, "Expected 2 participants" + assert obj.participants[0] == "s0", "Expected participant 's0'" + assert obj.participants[1] == "s1", "Expected participant 's1'" + + def test_protein_annotation(self): + # Arrange + xml_string = """ + + HLV + 3.1.1.43 + B0RS62 + SomeOrganism + 12345 + + """ + + # Act + obj = ProteinAnnot.from_xml(xml_string) + + # Assert + assert obj.uniprotid == "B0RS62", "UniProt ID is different" + assert obj.sequence == "HLV", "Sequence is different" + assert obj.ecnumber == "3.1.1.43", "EC number is different" + assert obj.organism == "SomeOrganism", "Organism is different" + assert obj.organism_tax_id == "12345", "Organism tax ID is different" + + def test_data_annotation(self): + # Arrange + xml_string = """ + + + + + + + + + + + + + + + + + + + + + + + + """ + + data = pd.read_csv( + "./tests/fixtures/sbml/v1_meas.csv", + header=None, + ) + + # Act + obj = DataAnnot.from_xml(xml_string) + measurements = obj.to_measurements( + meas_data={"./data/m0.csv": data}, + units={ + "u1": M, + "u2": M, + "u3": M, + "u4": M, + }, + ) + + # Assert + assert len(obj.formats) == 1, "Expected 1 format" + assert len(obj.measurements) == 1, "Expected 1 measurement" + assert len(obj.files) == 1, "Expected 1 file" + + # Assert transformed data + meas = measurements[0] + expected_species = { + "s0": 20.0, + "s1": 10.0, + "s2": 0.0, + "s3": 2.0, + "p0": 0.0002, + } + + assert meas.id == "m0", "Expected id 'm0'" + assert ( + meas.name == "Cephalexin synthesis 1" + ), "Expected name 'Cephalexin synthesis 1'" + + for species, initial in expected_species.items(): + species_data = meas.filter_species_data(species_id=species) + + assert len(species_data) == 1, f"Expected 1 species data for {species}" + + species_data = species_data[0] + + assert ( + species_data.initial == initial + ), f"Expected initial concentration {initial} for {species}" + + if species == "p0": + assert len(species_data.data) == 0, f"Expected no values for {species}" + else: + assert len(species_data.time) == 10, "Expected 10 time points" + assert len(species_data.data) == 10, f"Expected 10 values for {species}" diff --git a/tests/unit/test_sbml_annot_v2.py b/tests/unit/test_sbml_annot_v2.py new file mode 100644 index 0000000..1d7aebe --- /dev/null +++ b/tests/unit/test_sbml_annot_v2.py @@ -0,0 +1,210 @@ +from pyenzyme.sbml.versions.v2 import ( + DataAnnot, + MeasurementAnnot, + ConditionsAnnot, + SpeciesDataAnnot, + TemperatureAnnot, + PHAnnot, + SmallMoleculeAnnot, + ProteinAnnot, + ParameterAnnot, + VariablesAnnot, + VariableAnnot, +) + + +class TestSBMLAnnotsV2: + def test_equation_variables(self): + # Arrange + xml_string = """ + + + + + """ + + # Act + variables = VariablesAnnot.from_xml(xml_string) + + # Assert + expected = VariablesAnnot( + variables=[ + VariableAnnot( + id="s0", + name="s0", + symbol="s0", + ), + VariableAnnot( + id="s1", + name="s1", + symbol="s1", + ), + ], + ) + + assert ( + variables.model_dump() == expected.model_dump() + ), "Variables annotation was not parsed correctly" + + def test_parameter_annot(self): + # Arrange + xml_string = """ + + 0.0 + 100.0 + 0.1 + + """ + + # Act + parameter = ParameterAnnot.from_xml(xml_string) + + # Assert + expected = ParameterAnnot( + lower=0.0, + upper=100.0, + stderr=0.1, + ) + + assert ( + parameter.model_dump() == expected.model_dump() + ), "Parameter annotation was not parsed correctly" + + def test_protein_annot(self): + # Arrange + xml_string = """ + + 1.1.1.1 + E.coli + 12345 + MTEY + + """ + + # Act + protein = ProteinAnnot.from_xml(xml_string) + + # Assert + expected = ProteinAnnot( + ecnumber="1.1.1.1", + organism="E.coli", + organism_tax_id="12345", + sequence="MTEY", + ) + + assert ( + protein.model_dump() == expected.model_dump() + ), "Protein annotation was not parsed correctly" + + def test_small_mol_annot(self): + # Arrange + xml_string = """ + + QTBSBXVTEAMEQO-UHFFFAOYSA-N + CC(=O)O + + """ + + # Act + small_molecule = SmallMoleculeAnnot.from_xml(xml_string) + + # Assert + expected = SmallMoleculeAnnot( + inchikey="QTBSBXVTEAMEQO-UHFFFAOYSA-N", + canonical_smiles="CC(=O)O", + ) + + assert ( + small_molecule.model_dump() == expected.model_dump() + ), "Small molecule annotation was not parsed correctly" + + def test_data_annot(self): + # Arrange + xml_string = """ + + + + + + + + + + + + + + + + + + + """ + + # Act + data = DataAnnot.from_xml(xml_string) + + # Assert + expected = DataAnnot( + file="data.tsv", + measurements=[ + MeasurementAnnot( + id="m0", + name="m0", + time_unit="u1", + conditions=ConditionsAnnot( + ph=PHAnnot( + value=7.0, + ), + temperature=TemperatureAnnot( + value=298.15, + unit="u3", + ), + ), + species_data=[ + SpeciesDataAnnot( + species_id="s0", + unit="u2", + type="CONCENTRATION", + ), + SpeciesDataAnnot( + species_id="s1", + initial=10.0, + unit="u2", + type="CONCENTRATION", + ), + ], + ), + MeasurementAnnot( + id="m1", + name="m1", + time_unit="u1", + conditions=ConditionsAnnot( + ph=PHAnnot( + value=7.0, + ), + temperature=TemperatureAnnot( + value=298.15, + unit="u3", + ), + ), + species_data=[ + SpeciesDataAnnot( + species_id="s0", + unit="u2", + type="CONCENTRATION", + ), + SpeciesDataAnnot( + species_id="s1", + initial=10.0, + unit="u2", + type="CONCENTRATION", + ), + ], + ), + ], + ) + + assert ( + data.model_dump() == expected.model_dump() + ), "Data annotation was not parsed correctly" diff --git a/tests/unit/test_tabular.py b/tests/unit/test_tabular.py index 6a3bced..1b08bff 100644 --- a/tests/unit/test_tabular.py +++ b/tests/unit/test_tabular.py @@ -60,10 +60,9 @@ def test_csv_import(self): """Test that a CSV file can be imported to a pandas DataFrame""" # Act meas = pe.read_csv( - "tests/fixtures/tabular/data.csv", + "tests/fixtures/tabular/data.tsv", data_unit=mM, time_unit=s, - sep=";", ) # Assert @@ -130,7 +129,7 @@ def test_invalid_types(self): # Act with pytest.raises(AssertionError): pe.read_csv( - "tests/fixtures/tabular/data_invalid_chars.csv", + "tests/fixtures/tabular/data_invalid_chars.tsv", data_unit=mM, time_unit=s, ) @@ -140,7 +139,7 @@ def test_invalid_csv(self): # Act with pytest.raises(AssertionError): pe.read_csv( - "tests/fixtures/tabular/data_invalid.csv", + "tests/fixtures/tabular/data_invalid.tsv", data_unit=mM, time_unit=s, ) From 19f928186cc98fb3417f1f9cad44e65162739543 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 7 Sep 2024 19:48:09 +0200 Subject: [PATCH 62/80] add `pydantic-xml` dep --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 681febd..1245b09 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ python-libsbml = "^5.20.2" toml = "^0.10.2" rich = "^13.7.1" pandas = ">=2.0,<2.2.2" -pydantic = "^2.7.4" +pydantic-xml = "^2.12.1" loguru = "^0.7.2" rdflib = "7.0.0" sympy = "^1.12.1" From 8e234dd23660400aee68658dd615a6d6c8af0e42 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 7 Sep 2024 19:48:22 +0200 Subject: [PATCH 63/80] add testing section --- README.md | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 93716b6..fd62835 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ PyEnzyme is the interface to the data model EnzymeML and offers a conveni - **Visualize** experimental results for inspection and publication. ## ⚡️ Quick start + Get started with PyEnzyme by running the following command ``` @@ -25,6 +26,7 @@ python -m pip install pyenzyme ``` Or build by source + ``` git clone https://github.com/EnzymeML/PyEnzyme.git cd PyEnzyme @@ -32,7 +34,10 @@ python3 setup.py install ``` ### ⚙️ Package Options -PyEnzyme comes with many flavors, choose whether you want only the base installation, the modeling package or all of it using the following options. + +PyEnzyme comes with many flavors, choose whether you want only the base installation, the modeling package or all of it +using the following options. + ``` # COPASI - modeling python -m pip install "pyenzyme[copasi]" @@ -55,17 +60,37 @@ python -m pip install "pyenzyme[all]" ## ⚙️ Example code -This example will demonstrate how to create a simple EnzymeML document using PyEnzyme and how to use initializers from official databases **Chebi** and **UniProt** to gather metadata. For more examples, please visit our [documentation](https://pyenzyme.readthedocs.io/en/latest/index.html#) (Work in progress) +This example will demonstrate how to create a simple EnzymeML document using PyEnzyme and how to use initializers from +official databases **Chebi** and **UniProt** to gather metadata. For more examples, please visit +our [documentation](https://pyenzyme.readthedocs.io/en/latest/index.html#) (Work in progress) ```python # To be added for V2 ``` + (Code should run as it is) ## 📖 Documentation and more examples -Explore all the features of **PyEnzyme** in our [documentation](https://pyenzyme.readthedocs.io/en/latest/index.html#) and take part in [Discussions](https://github.com/EnzymeML/PyEnzyme/discussions) and/or [Issues](https://github.com/EnzymeML/PyEnzyme/issues). +Explore all the features of **PyEnzyme** in our [documentation](https://pyenzyme.readthedocs.io/en/latest/index.html#) +and take part in [Discussions](https://github.com/EnzymeML/PyEnzyme/discussions) +and/or [Issues](https://github.com/EnzymeML/PyEnzyme/issues). + +## 🧪 Testing + +In order to run tests there are two different ways. First you can utilize `pytest` directly by running the following: + +```bash +python -m pytest -vv +``` + +Or you can the provided Dockerfile to run the tests in a containerized environment. + +```bash +docker build -t pyenzyme . +``` ## ⚠️ License -`PyEnzyme` is free and open-source software licensed under the [BSD 2-Clause License](https://github.com/EnzymeML/PyEnzyme/blob/main/LICENSE). +`PyEnzyme` is free and open-source software licensed under +the [BSD 2-Clause License](https://github.com/EnzymeML/PyEnzyme/blob/main/LICENSE). From 93713f058138a344071705c8ce5bf10396e60652 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 7 Sep 2024 19:48:37 +0200 Subject: [PATCH 64/80] add container test --- Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6c7549c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM python:3.11.9-slim-bullseye + +RUN apt-get update +RUN pip install poetry + +WORKDIR /app +COPY . /app + +RUN poetry install --with tests + +ENTRYPOINT ["poetry", "run", "pytest", "-vv"] \ No newline at end of file From 7830cd83fffa39d6f9477e0cbe3e9c0ebf060cca Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 7 Sep 2024 20:19:54 +0200 Subject: [PATCH 65/80] check fragments instead of complete uris --- pyenzyme/sbml/omex.py | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/pyenzyme/sbml/omex.py b/pyenzyme/sbml/omex.py index 72bb9fc..5db9af5 100644 --- a/pyenzyme/sbml/omex.py +++ b/pyenzyme/sbml/omex.py @@ -20,8 +20,9 @@ class FileURI(enum.Enum): TSV (str): URI for TSV files. """ - CSV = "http://purl.org/NET/mediatypes/text/csv" - TSV = "https://purl.org/NET/mediatypes/text/tab-separated-values" + CSV = "/csv" + TSV_LONG = "/tab-separated-values" + TSV = "/tsv" @classmethod def from_uri(cls, uri: str): @@ -37,13 +38,12 @@ def from_uri(cls, uri: str): Raises: ValueError: If the URI is not supported. """ - match uri: - case cls.CSV.value: - return cls.CSV - case cls.TSV.value: - return cls.TSV - case _: - raise ValueError(f"Unsupported file URI: {uri}") + + for entry in cls: + if entry.value in uri: + return entry + + raise ValueError(f"Unsupported file URI: {uri}") @classmethod def is_supported(cls, uri): @@ -56,7 +56,7 @@ def is_supported(cls, uri): Returns: bool: True if the URI is supported, False otherwise. """ - return uri in [e.value for e in cls] + return any([e.value in uri for e in cls]) def to_dataframe(self, path): """ @@ -78,6 +78,9 @@ def to_dataframe(self, path): case self.TSV: # V2 format has headers return pd.read_csv(path, sep="\t") + case self.TSV_LONG: + # V2 format has headers + return pd.read_csv(path, sep="\t") case _: raise ValueError(f"Unsupported file format: {self}") @@ -143,7 +146,11 @@ def read_sbml_omex(path: Path) -> tuple[TextIO, dict[str, pd.DataFrame]]: omex = Omex.from_omex(path) try: - master_file = next(part for part in omex.manifest.entries if part.master) + master_file = next( + part + for part in omex.manifest.entries + if part.master and "/sbml" in part.format + ) except StopIteration: raise ValueError("No master file found in OMEX archive") From 64cd2103b3d575fd5c225e1492a2b8979657a0b6 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sat, 7 Sep 2024 20:23:07 +0200 Subject: [PATCH 66/80] if multiplier is `1` set it to `None` --- pyenzyme/sbml/parser.py | 2 + tests/fixtures/sbml/v1_example_enzml.json | 174 +++++++++++----------- 2 files changed, 89 insertions(+), 87 deletions(-) diff --git a/pyenzyme/sbml/parser.py b/pyenzyme/sbml/parser.py index c1a5bc4..b000300 100644 --- a/pyenzyme/sbml/parser.py +++ b/pyenzyme/sbml/parser.py @@ -140,6 +140,8 @@ def _parse_unit(unit: sbml.UnitDefinition): if math.isnan(multiplier): multiplier = None + elif multiplier == 1.0: + multiplier = None enzml_unit.add_to_base_units( kind=kind, diff --git a/tests/fixtures/sbml/v1_example_enzml.json b/tests/fixtures/sbml/v1_example_enzml.json index 58f51ec..772e07a 100644 --- a/tests/fixtures/sbml/v1_example_enzml.json +++ b/tests/fixtures/sbml/v1_example_enzml.json @@ -16,7 +16,7 @@ { "kind": "litre", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/1dc4d70c-b72b-4f9b-9b23-6c034e300b76", "ld_type": [ @@ -2077,7 +2077,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -2092,7 +2092,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -2173,7 +2173,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -2188,7 +2188,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -2291,7 +2291,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -2306,7 +2306,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -2409,7 +2409,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -2424,7 +2424,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -2527,7 +2527,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -2542,7 +2542,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -2671,7 +2671,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -2686,7 +2686,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -2767,7 +2767,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -2782,7 +2782,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -2885,7 +2885,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -2900,7 +2900,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -3003,7 +3003,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -3018,7 +3018,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -3121,7 +3121,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -3136,7 +3136,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -3265,7 +3265,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -3280,7 +3280,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -3361,7 +3361,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -3376,7 +3376,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -3479,7 +3479,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -3494,7 +3494,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -3597,7 +3597,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -3612,7 +3612,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -3715,7 +3715,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -3730,7 +3730,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -3859,7 +3859,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -3874,7 +3874,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -3955,7 +3955,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -3970,7 +3970,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -4073,7 +4073,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -4088,7 +4088,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -4191,7 +4191,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -4206,7 +4206,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -4309,7 +4309,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -4324,7 +4324,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -4453,7 +4453,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -4468,7 +4468,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -4549,7 +4549,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -4564,7 +4564,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -4667,7 +4667,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -4682,7 +4682,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -4785,7 +4785,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -4800,7 +4800,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -4903,7 +4903,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -4918,7 +4918,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -5047,7 +5047,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -5062,7 +5062,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -5143,7 +5143,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -5158,7 +5158,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -5261,7 +5261,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -5276,7 +5276,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -5379,7 +5379,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -5394,7 +5394,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -5497,7 +5497,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -5512,7 +5512,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -5641,7 +5641,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -5656,7 +5656,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -5737,7 +5737,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -5752,7 +5752,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -5855,7 +5855,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -5870,7 +5870,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -5973,7 +5973,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -5988,7 +5988,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -6091,7 +6091,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -6106,7 +6106,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -6235,7 +6235,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -6250,7 +6250,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -6331,7 +6331,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -6346,7 +6346,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -6449,7 +6449,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -6464,7 +6464,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -6567,7 +6567,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -6582,7 +6582,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -6685,7 +6685,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -6700,7 +6700,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -6830,7 +6830,7 @@ { "kind": "litre", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/3d69db1d-0c29-42d6-8db8-869e82a0872b", "ld_type": [ @@ -6845,7 +6845,7 @@ { "kind": "mole", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/65742653-abe1-48cf-bdb8-870e5eb72651", "ld_type": [ @@ -6914,7 +6914,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -6929,7 +6929,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ @@ -6983,7 +6983,7 @@ { "kind": "litre", "exponent": -1, - "multiplier": 1.0, + "multiplier": null, "scale": 1.0, "ld_id": "enzml:BaseUnit/189b3a40-6d06-46db-9aef-55d155524e46", "ld_type": [ @@ -6998,7 +6998,7 @@ { "kind": "mole", "exponent": 1, - "multiplier": 1.0, + "multiplier": null, "scale": -3.0, "ld_id": "enzml:BaseUnit/9e7ff171-3d2e-4496-bb5d-4b6eff88703c", "ld_type": [ From 1e3bee51c8dc99949b7d629e811e69729185507a Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sun, 8 Sep 2024 00:02:38 +0200 Subject: [PATCH 67/80] add run command --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index fd62835..d3ce498 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,7 @@ Or you can the provided Dockerfile to run the tests in a containerized environme ```bash docker build -t pyenzyme . +docker run pyenzyme ``` ## ⚠️ License From 2b702a27aa605eb89b18de0a51290da808f1d93e Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sun, 8 Sep 2024 11:49:27 +0200 Subject: [PATCH 68/80] add `vessel_id` to `Complex` - Added to SBML serializer - Added to SBML validation --- pyenzyme/model.py | 652 +++++++++++++++++++++--------------- pyenzyme/sbml/serializer.py | 2 +- pyenzyme/sbml/validation.py | 2 +- 3 files changed, 377 insertions(+), 279 deletions(-) diff --git a/pyenzyme/model.py b/pyenzyme/model.py index 314e63b..7b056e6 100644 --- a/pyenzyme/model.py +++ b/pyenzyme/model.py @@ -1,18 +1,16 @@ ## This is a generated file. Do not modify it manually! from __future__ import annotations - +from pydantic import BaseModel, Field, ConfigDict +from typing import Optional, Generic, TypeVar from enum import Enum -from typing import Generic, Optional, TypeVar from uuid import uuid4 - -from pydantic import BaseModel, ConfigDict, Field +from datetime import date, datetime # Filter Wrapper definition used to filter a list of objects # based on their attributes Cls = TypeVar("Cls") - class FilterWrapper(Generic[Cls]): """Wrapper class to filter a list of objects based on their attributes""" @@ -49,8 +47,7 @@ def add_namespace(obj, prefix: str | None, iri: str | None): elif iri and prefix is None: raise ValueError("If iri is provided, prefix must also be provided") - obj.ld_context[prefix] = iri # type: ignore - + obj.ld_context[prefix] = iri # type: ignore def validate_prefix(term: str | dict, prefix: str): """Validates that a term is prefixed with a given prefix @@ -68,14 +65,13 @@ def validate_prefix(term: str | dict, prefix: str): elif isinstance(term, str) and not term.startswith(prefix + ":"): raise ValueError(f"Term {term} is not prefixed with {prefix}") - # Model Definitions - class EnzymeMLDocument(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore name: str references: list[str] = Field(default_factory=list) @@ -94,20 +90,20 @@ class EnzymeMLDocument(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:EnzymeMLDocument/" + str(uuid4()), + default_factory=lambda: "enzml:EnzymeMLDocument/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ + default_factory = lambda: [ "enzml:EnzymeMLDocument", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "name": "schema:title", "references": { "@id": "schema:citation", @@ -116,7 +112,7 @@ class EnzymeMLDocument(BaseModel): "created": "schema:dateCreated", "modified": "schema:dateModified", "creators": "schema:creator", - }, + } ) def filter_creators(self, **kwargs) -> list[Creator]: @@ -227,12 +223,13 @@ def filter_parameters(self, **kwargs) -> list[Parameter]: return FilterWrapper[Parameter](self.parameters, **kwargs).filter() + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -254,9 +251,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -265,7 +260,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -292,6 +290,7 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) + def add_to_creators( self, given_name: str, @@ -299,22 +298,29 @@ def add_to_creators( mail: str, **kwargs, ): - params = {"given_name": given_name, "family_name": family_name, "mail": mail} + params = { + "given_name": given_name, + "family_name": family_name, + "mail": mail + } if "id" in kwargs: params["id"] = kwargs["id"] - self.creators.append(Creator(**params)) + self.creators.append( + Creator(**params) + ) return self.creators[-1] + def add_to_vessels( self, id: str, name: str, volume: float, unit: UnitDefinition, - constant: bool = True, + constant: bool= True, **kwargs, ): params = { @@ -322,27 +328,30 @@ def add_to_vessels( "name": name, "volume": volume, "unit": unit, - "constant": constant, + "constant": constant } if "id" in kwargs: params["id"] = kwargs["id"] - self.vessels.append(Vessel(**params)) + self.vessels.append( + Vessel(**params) + ) return self.vessels[-1] + def add_to_proteins( self, id: str, name: str, - constant: bool = False, - sequence: Optional[str] = None, - vessel_id: Optional[str] = None, - ecnumber: Optional[str] = None, - organism: Optional[str] = None, - organism_tax_id: Optional[str] = None, - references: list[str] = [], + constant: bool= False, + sequence: Optional[str]= None, + vessel_id: Optional[str]= None, + ecnumber: Optional[str]= None, + organism: Optional[str]= None, + organism_tax_id: Optional[str]= None, + references: list[str]= [], **kwargs, ): params = { @@ -354,48 +363,56 @@ def add_to_proteins( "ecnumber": ecnumber, "organism": organism, "organism_tax_id": organism_tax_id, - "references": references, + "references": references } if "id" in kwargs: params["id"] = kwargs["id"] - self.proteins.append(Protein(**params)) + self.proteins.append( + Protein(**params) + ) return self.proteins[-1] + def add_to_complexes( self, id: str, name: str, - constant: bool = False, - participants: list[str] = [], + constant: bool= False, + vessel_id: Optional[str]= None, + participants: list[str]= [], **kwargs, ): params = { "id": id, "name": name, "constant": constant, - "participants": participants, + "vessel_id": vessel_id, + "participants": participants } if "id" in kwargs: params["id"] = kwargs["id"] - self.complexes.append(Complex(**params)) + self.complexes.append( + Complex(**params) + ) return self.complexes[-1] + def add_to_small_molecules( self, id: str, name: str, - constant: bool = False, - vessel_id: Optional[str] = None, - canonical_smiles: Optional[str] = None, - inchi: Optional[str] = None, - inchikey: Optional[str] = None, - references: list[str] = [], + constant: bool= False, + vessel_id: Optional[str]= None, + canonical_smiles: Optional[str]= None, + inchi: Optional[str]= None, + inchikey: Optional[str]= None, + references: list[str]= [], **kwargs, ): params = { @@ -406,24 +423,27 @@ def add_to_small_molecules( "canonical_smiles": canonical_smiles, "inchi": inchi, "inchikey": inchikey, - "references": references, + "references": references } if "id" in kwargs: params["id"] = kwargs["id"] - self.small_molecules.append(SmallMolecule(**params)) + self.small_molecules.append( + SmallMolecule(**params) + ) return self.small_molecules[-1] + def add_to_reactions( self, id: str, name: str, - reversible: bool = False, - kinetic_law: Optional[Equation] = None, - species: list[ReactionElement] = [], - modifiers: list[str] = [], + reversible: bool= False, + kinetic_law: Optional[Equation]= None, + species: list[ReactionElement]= [], + modifiers: list[str]= [], **kwargs, ): params = { @@ -432,25 +452,28 @@ def add_to_reactions( "reversible": reversible, "kinetic_law": kinetic_law, "species": species, - "modifiers": modifiers, + "modifiers": modifiers } if "id" in kwargs: params["id"] = kwargs["id"] - self.reactions.append(Reaction(**params)) + self.reactions.append( + Reaction(**params) + ) return self.reactions[-1] + def add_to_measurements( self, id: str, name: str, - species_data: list[MeasurementData] = [], - group_id: Optional[str] = None, - ph: Optional[float] = None, - temperature: Optional[float] = None, - temperature_unit: Optional[UnitDefinition] = None, + species_data: list[MeasurementData]= [], + group_id: Optional[str]= None, + ph: Optional[float]= None, + temperature: Optional[float]= None, + temperature_unit: Optional[UnitDefinition]= None, **kwargs, ): params = { @@ -460,50 +483,56 @@ def add_to_measurements( "group_id": group_id, "ph": ph, "temperature": temperature, - "temperature_unit": temperature_unit, + "temperature_unit": temperature_unit } if "id" in kwargs: params["id"] = kwargs["id"] - self.measurements.append(Measurement(**params)) + self.measurements.append( + Measurement(**params) + ) return self.measurements[-1] + def add_to_equations( self, equation: str, equation_type: EquationType, - species_id: Optional[str] = None, - variables: list[Variable] = [], + species_id: Optional[str]= None, + variables: list[Variable]= [], **kwargs, ): params = { "equation": equation, "equation_type": equation_type, "species_id": species_id, - "variables": variables, + "variables": variables } if "id" in kwargs: params["id"] = kwargs["id"] - self.equations.append(Equation(**params)) + self.equations.append( + Equation(**params) + ) return self.equations[-1] + def add_to_parameters( self, id: str, name: str, symbol: str, - value: Optional[float] = None, - unit: Optional[UnitDefinition] = None, - initial_value: Optional[float] = None, - upper: Optional[float] = None, - lower: Optional[float] = None, - stderr: Optional[float] = None, - constant: Optional[bool] = True, + value: Optional[float]= None, + unit: Optional[UnitDefinition]= None, + initial_value: Optional[float]= None, + upper: Optional[float]= None, + lower: Optional[float]= None, + stderr: Optional[float]= None, + constant: Optional[bool]= True, **kwargs, ): params = { @@ -516,21 +545,23 @@ def add_to_parameters( "upper": upper, "lower": lower, "stderr": stderr, - "constant": constant, + "constant": constant } if "id" in kwargs: params["id"] = kwargs["id"] - self.parameters.append(Parameter(**params)) + self.parameters.append( + Parameter(**params) + ) return self.parameters[-1] - class Creator(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore given_name: str family_name: str @@ -539,30 +570,33 @@ class Creator(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Creator/" + str(uuid4()), + default_factory=lambda: "enzml:Creator/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: ["enzml:Creator", "schema:person"], + default_factory = lambda: [ + "enzml:Creator","schema:person" + ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "given_name": "schema:givenName", "family_name": "schema:familyName", "mail": "schema:email", - }, + } ) + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -584,9 +618,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -595,7 +627,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -624,9 +659,10 @@ def add_type_term( class Vessel(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore id: str name: str @@ -637,33 +673,36 @@ class Vessel(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Vessel/" + str(uuid4()), + default_factory=lambda: "enzml:Vessel/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: ["enzml:Vessel", "OBO:OBI_0400081"], + default_factory = lambda: [ + "enzml:Vessel","OBO:OBI_0400081" + ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id", }, "name": "schema:name", "volume": "OBO:OBI_0002139", - }, + } ) + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -685,9 +724,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -696,7 +733,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -725,9 +765,10 @@ def add_type_term( class Protein(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore id: str name: str @@ -742,18 +783,20 @@ class Protein(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Protein/" + str(uuid4()), + default_factory=lambda: "enzml:Protein/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: ["enzml:Protein", "schema:Protein"], + default_factory = lambda: [ + "enzml:Protein","schema:Protein" + ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@type": "@id", }, @@ -771,15 +814,16 @@ class Protein(BaseModel): "@id": "schema:citation", "@type": "@id", }, - }, + } ) + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -801,9 +845,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -812,7 +854,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -841,49 +886,56 @@ def add_type_term( class Complex(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore id: str name: str constant: bool = False + vessel_id: Optional[str] = Field(default=None) participants: list[str] = Field(default_factory=list) # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Complex/" + str(uuid4()), + default_factory=lambda: "enzml:Complex/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ + default_factory = lambda: [ "enzml:Complex", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id", }, "name": "schema:name", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id", + }, "participants": { "@type": "@id", }, - }, + } ) + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -905,9 +957,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -916,7 +966,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -945,9 +998,10 @@ def add_type_term( class SmallMolecule(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore id: str name: str @@ -961,20 +1015,20 @@ class SmallMolecule(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:SmallMolecule/" + str(uuid4()), + default_factory=lambda: "enzml:SmallMolecule/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ + default_factory = lambda: [ "enzml:SmallMolecule", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id", @@ -988,15 +1042,16 @@ class SmallMolecule(BaseModel): "@id": "schema:citation", "@type": "@id", }, - }, + } ) + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -1018,9 +1073,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1029,7 +1082,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1058,9 +1114,10 @@ def add_type_term( class Reaction(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore id: str name: str @@ -1072,20 +1129,20 @@ class Reaction(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Reaction/" + str(uuid4()), + default_factory=lambda: "enzml:Reaction/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ + default_factory = lambda: [ "enzml:Reaction", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id", @@ -1093,7 +1150,7 @@ class Reaction(BaseModel): "modifiers": { "@type": "@id", }, - }, + } ) def filter_species(self, **kwargs) -> list[ReactionElement]: @@ -1108,12 +1165,13 @@ def filter_species(self, **kwargs) -> list[ReactionElement]: return FilterWrapper[ReactionElement](self.species, **kwargs).filter() + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -1135,9 +1193,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1146,7 +1202,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1173,26 +1232,33 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) + def add_to_species( self, species_id: str, stoichiometry: float, **kwargs, ): - params = {"species_id": species_id, "stoichiometry": stoichiometry} + params = { + "species_id": species_id, + "stoichiometry": stoichiometry + } if "id" in kwargs: params["id"] = kwargs["id"] - self.species.append(ReactionElement(**params)) + self.species.append( + ReactionElement(**params) + ) return self.species[-1] class ReactionElement(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore species_id: str stoichiometry: float @@ -1200,32 +1266,33 @@ class ReactionElement(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:ReactionElement/" + str(uuid4()), + default_factory=lambda: "enzml:ReactionElement/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ + default_factory = lambda: [ "enzml:ReactionElement", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id", }, - }, + } ) + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -1247,9 +1314,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1258,7 +1323,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1287,9 +1355,10 @@ def add_type_term( class Equation(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore equation: str equation_type: EquationType @@ -1299,24 +1368,24 @@ class Equation(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Equation/" + str(uuid4()), + default_factory=lambda: "enzml:Equation/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ + default_factory = lambda: [ "enzml:Equation", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id", }, - }, + } ) def filter_variables(self, **kwargs) -> list[Variable]: @@ -1331,12 +1400,13 @@ def filter_variables(self, **kwargs) -> list[Variable]: return FilterWrapper[Variable](self.variables, **kwargs).filter() + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -1358,9 +1428,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1369,7 +1437,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1396,6 +1467,7 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) + def add_to_variables( self, id: str, @@ -1403,20 +1475,26 @@ def add_to_variables( symbol: str, **kwargs, ): - params = {"id": id, "name": name, "symbol": symbol} + params = { + "id": id, + "name": name, + "symbol": symbol + } if "id" in kwargs: params["id"] = kwargs["id"] - self.variables.append(Variable(**params)) + self.variables.append( + Variable(**params) + ) return self.variables[-1] - class Variable(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore id: str name: str @@ -1425,30 +1503,31 @@ class Variable(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Variable/" + str(uuid4()), + default_factory=lambda: "enzml:Variable/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ + default_factory = lambda: [ "enzml:Variable", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": "schema:identifier", - }, + } ) + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -1470,9 +1549,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1481,7 +1558,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1510,9 +1590,10 @@ def add_type_term( class Parameter(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore id: str name: str @@ -1528,33 +1609,34 @@ class Parameter(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Parameter/" + str(uuid4()), + default_factory=lambda: "enzml:Parameter/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ + default_factory = lambda: [ "enzml:Parameter", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id", }, - }, + } ) + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -1576,9 +1658,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1587,7 +1667,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1616,9 +1699,10 @@ def add_type_term( class Measurement(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore id: str name: str @@ -1631,20 +1715,20 @@ class Measurement(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:Measurement/" + str(uuid4()), + default_factory=lambda: "enzml:Measurement/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ + default_factory = lambda: [ "enzml:Measurement", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id", @@ -1652,7 +1736,7 @@ class Measurement(BaseModel): "group_id": { "@type": "@id", }, - }, + } ) def filter_species_data(self, **kwargs) -> list[MeasurementData]: @@ -1667,12 +1751,13 @@ def filter_species_data(self, **kwargs) -> list[MeasurementData]: return FilterWrapper[MeasurementData](self.species_data, **kwargs).filter() + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -1694,9 +1779,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1705,7 +1788,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1732,17 +1818,18 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) + def add_to_species_data( self, species_id: str, initial: float, data_unit: UnitDefinition, data_type: DataTypes, - prepared: Optional[float] = None, - data: list[float] = [], - time: list[float] = [], - time_unit: Optional[UnitDefinition] = None, - is_simulated: bool = False, + prepared: Optional[float]= None, + data: list[float]= [], + time: list[float]= [], + time_unit: Optional[UnitDefinition]= None, + is_simulated: bool= False, **kwargs, ): params = { @@ -1754,21 +1841,24 @@ def add_to_species_data( "data": data, "time": time, "time_unit": time_unit, - "is_simulated": is_simulated, + "is_simulated": is_simulated } if "id" in kwargs: params["id"] = kwargs["id"] - self.species_data.append(MeasurementData(**params)) + self.species_data.append( + MeasurementData(**params) + ) return self.species_data[-1] class MeasurementData(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore species_id: str initial: float @@ -1783,32 +1873,33 @@ class MeasurementData(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:MeasurementData/" + str(uuid4()), + default_factory=lambda: "enzml:MeasurementData/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ + default_factory = lambda: [ "enzml:MeasurementData", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id", }, - }, + } ) + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -1830,9 +1921,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1841,7 +1930,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1870,9 +1962,10 @@ def add_type_term( class UnitDefinition(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore id: Optional[str] = Field(default=None) name: Optional[str] = Field(default=None) @@ -1881,21 +1974,21 @@ class UnitDefinition(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:UnitDefinition/" + str(uuid4()), + default_factory=lambda: "enzml:UnitDefinition/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ + default_factory = lambda: [ "enzml:UnitDefinition", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", - }, + "OBO": "http://purl.obolibrary.org/obo/", + } ) def filter_base_units(self, **kwargs) -> list[BaseUnit]: @@ -1910,12 +2003,13 @@ def filter_base_units(self, **kwargs) -> list[BaseUnit]: return FilterWrapper[BaseUnit](self.base_units, **kwargs).filter() + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -1937,9 +2031,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -1948,7 +2040,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -1975,33 +2070,36 @@ def add_type_term( add_namespace(self, prefix, iri) self.ld_type.append(term) + def add_to_base_units( self, kind: UnitType, exponent: int, - multiplier: Optional[float] = None, - scale: Optional[float] = None, + multiplier: Optional[float]= None, + scale: Optional[float]= None, **kwargs, ): params = { "kind": kind, "exponent": exponent, "multiplier": multiplier, - "scale": scale, + "scale": scale } if "id" in kwargs: params["id"] = kwargs["id"] - self.base_units.append(BaseUnit(**params)) + self.base_units.append( + BaseUnit(**params) + ) return self.base_units[-1] - class BaseUnit(BaseModel): - model_config: ConfigDict = ConfigDict( # type: ignore - validate_assigment=True, - ) # type: ignore + + model_config: ConfigDict = ConfigDict( # type: ignore + validate_assigment = True, + ) # type: ignore kind: UnitType exponent: int @@ -2011,29 +2109,30 @@ class BaseUnit(BaseModel): # JSON-LD fields ld_id: str = Field( serialization_alias="@id", - default_factory=lambda: "enzml:BaseUnit/" + str(uuid4()), + default_factory=lambda: "enzml:BaseUnit/" + str(uuid4()) ) ld_type: list[str] = Field( serialization_alias="@type", - default_factory=lambda: [ + default_factory = lambda: [ "enzml:BaseUnit", ], ) ld_context: dict[str, str | dict] = Field( serialization_alias="@context", - default_factory=lambda: { + default_factory = lambda: { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", - }, + "OBO": "http://purl.obolibrary.org/obo/", + } ) + def set_attr_term( self, attr: str, term: str | dict, prefix: str | None = None, - iri: str | None = None, + iri: str | None = None ): """Sets the term for a given attribute in the JSON-LD object @@ -2055,9 +2154,7 @@ def set_attr_term( AssertionError: If the attribute is not found in the model """ - assert ( - attr in self.model_fields - ), f"Attribute {attr} not found in {self.__class__.__name__}" + assert attr in self.model_fields, f"Attribute {attr} not found in {self.__class__.__name__}" if prefix: validate_prefix(term, prefix) @@ -2066,7 +2163,10 @@ def set_attr_term( self.ld_context[attr] = term def add_type_term( - self, term: str, prefix: str | None = None, iri: str | None = None + self, + term: str, + prefix: str | None = None, + iri: str | None = None ): """Adds a term to the @type field of the JSON-LD object @@ -2100,7 +2200,6 @@ class EquationType(Enum): ODE = "ode" RATE_LAW = "rateLaw" - class DataTypes(Enum): ABSORBANCE = "http://purl.allotrope.org/ontologies/quality#AFQ_0000061" CONCENTRATION = "http://purl.obolibrary.org/obo/PATO_0000033" @@ -2109,7 +2208,6 @@ class DataTypes(Enum): PEAK_AREA = "http://purl.allotrope.org/ontologies/result#AFR_0001073" TRANSMITTANCE = "http://purl.allotrope.org/ontologies/result#AFR_0002261" - class UnitType(Enum): AMPERE = "ampere" AVOGADRO = "avogadro" @@ -2144,4 +2242,4 @@ class UnitType(Enum): TESLA = "tesla" VOLT = "volt" WATT = "watt" - WEBER = "weber" + WEBER = "weber" \ No newline at end of file diff --git a/pyenzyme/sbml/serializer.py b/pyenzyme/sbml/serializer.py index 5c08c41..de3e9b2 100644 --- a/pyenzyme/sbml/serializer.py +++ b/pyenzyme/sbml/serializer.py @@ -211,7 +211,7 @@ def _add_complex(complex_: pe.Complex): species.initDefaults() species.setId(complex_.id) species.setName(complex_.name) - species.setCompartment(model.getCompartment(0).getId()) + species.setCompartment(complex_.vessel_id) species.setConstant(True) species.setSBOTerm("SBO:0000296") # Complex species.appendAnnotation(rdf.to_rdf_xml(complex_)) diff --git a/pyenzyme/sbml/validation.py b/pyenzyme/sbml/validation.py index d3b8361..b651fc4 100644 --- a/pyenzyme/sbml/validation.py +++ b/pyenzyme/sbml/validation.py @@ -35,7 +35,7 @@ def _check_consistent_vessel_ids(doc: pe.EnzymeMLDocument) -> bool: """ vessel_ids = {v.id for v in doc.vessels} - all_species = doc.small_molecules + doc.proteins + all_species = doc.small_molecules + doc.proteins + doc.complexes result = [] for species in all_species: From 5d351a535d1c1daf14ae4159cfbc140dfedcfb67 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sun, 8 Sep 2024 11:56:06 +0200 Subject: [PATCH 69/80] update dev examples --- dev-examples/odes/odes_example_test.xml | 44 ++++++++++++------------- dev-examples/sbml_export_odes.py | 8 ++--- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/dev-examples/odes/odes_example_test.xml b/dev-examples/odes/odes_example_test.xml index aac8bbc..d9768e9 100644 --- a/dev-examples/odes/odes_example_test.xml +++ b/dev-examples/odes/odes_example_test.xml @@ -1,6 +1,6 @@ - + @@ -31,7 +31,7 @@ - + @@ -43,8 +43,8 @@ - - + + @@ -56,7 +56,7 @@ - + @@ -68,7 +68,7 @@ - + @@ -80,15 +80,15 @@ - + - + - + Vessel 1 10.0 @@ -99,10 +99,10 @@ - + - + Enzyme MTEY E.coli @@ -118,10 +118,10 @@ - + - + Enzyme-Substrate Complex @@ -132,31 +132,31 @@ - + - + Substrate QTBSBXVTEAMEQO-UHFFFAOYSA-N - + CC(=O)O - + - + Product QTBSBXVTEAMEQO-UHFFFAOYSA-N - + CC(=O)O @@ -165,7 +165,7 @@ - + @@ -179,7 +179,7 @@ - + @@ -193,7 +193,7 @@ - + diff --git a/dev-examples/sbml_export_odes.py b/dev-examples/sbml_export_odes.py index 22fd094..1054d28 100644 --- a/dev-examples/sbml_export_odes.py +++ b/dev-examples/sbml_export_odes.py @@ -47,6 +47,7 @@ id="c0", name="Enzyme-Substrate Complex", participants=[enzyme.id, substrate.id], + vessel_id=vessel.id, ) doc.equations += peq.build_equations( @@ -73,14 +74,13 @@ meas.ph = 7.0 rich.print(to_sbml(doc)[0]) + # Write sbml doc to file with open("./dev-examples/odes/odes_example_test.xml", "w") as file: file.write(to_sbml(doc)[0]) -exit() - # Write to omex file -doc.to_sbml("./dev-examples/odes/odes_example.omex") +doc.to_sbml("./tests/fixtures/sbml/odes_example.omex") # Write to EnzymeML JSON file -pe.write_enzymeml(self=doc, path="./dev-examples/odes/enzymeml.json") +pe.write_enzymeml(self=doc, path="./tests/fixtures/sbml/ode_example_enzml.json") From 55eac11f435c78bd46a81e438e2f7926fdcc161c Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sun, 8 Sep 2024 11:56:24 +0200 Subject: [PATCH 70/80] extract compartment for `Complex` --- pyenzyme/sbml/parser.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyenzyme/sbml/parser.py b/pyenzyme/sbml/parser.py index b000300..2a18e1f 100644 --- a/pyenzyme/sbml/parser.py +++ b/pyenzyme/sbml/parser.py @@ -245,6 +245,7 @@ def _parse_complex(species: sbml.Species): complex_ = pe.Complex( id=species.getId(), name=species.getName(), + vessel_id=species.getCompartment(), **annots, ) From f530e1eb5b6d871a94a96caa12f7ff909f1f1b4e Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sun, 8 Sep 2024 11:56:31 +0200 Subject: [PATCH 71/80] update tests --- tests/fixtures/sbml/ode_example_enzml.json | 447 +++++++++++---------- tests/fixtures/sbml/odes_example.omex | Bin 2429 -> 2452 bytes tests/fixtures/sbml/v1_example_enzml.json | 7 + tests/integration/test_sbml.py | 6 + 4 files changed, 239 insertions(+), 221 deletions(-) diff --git a/tests/fixtures/sbml/ode_example_enzml.json b/tests/fixtures/sbml/ode_example_enzml.json index ca2dca0..05a5ec9 100644 --- a/tests/fixtures/sbml/ode_example_enzml.json +++ b/tests/fixtures/sbml/ode_example_enzml.json @@ -1,8 +1,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "name": "schema:title", "references": { "@id": "schema:citation", @@ -12,7 +12,7 @@ "modified": "schema:dateModified", "creators": "schema:creator" }, - "@id": "enzml:EnzymeMLDocument/833d46aa-58c7-4d42-b341-43f1fe0fece0", + "@id": "enzml:EnzymeMLDocument/c051b03b-83c2-4671-ac9b-87f0dea9137a", "@type": [ "enzml:EnzymeMLDocument" ], @@ -23,8 +23,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -32,7 +32,7 @@ "name": "schema:name", "volume": "OBO:OBI_0002139" }, - "@id": "enzml:Vessel/abc02182-675a-4fd7-b067-9f376f17b874", + "@id": "enzml:Vessel/a8c3e187-b735-49df-b76a-684916d91c25", "@type": [ "enzml:Vessel", "OBO:OBI_0400081" @@ -43,8 +43,8 @@ "unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000098", "@type": [ @@ -56,10 +56,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/7ea9c0d4-dcbb-4e59-94f2-7b1779e35b1b", + "@id": "enzml:BaseUnit/ad727ef5-a949-4b31-b73a-db00c5804be7", "@type": [ "enzml:BaseUnit" ], @@ -76,8 +76,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@type": "@id" }, @@ -96,7 +96,7 @@ "@type": "@id" } }, - "@id": "enzml:Protein/487be0d2-e325-4f0b-857b-3bd8d54c4003", + "@id": "enzml:Protein/e4d6270e-788f-4773-b507-1f85396fa674", "@type": [ "enzml:Protein", "schema:Protein" @@ -116,24 +116,29 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" }, "name": "schema:name", + "vessel_id": { + "@id": "schema:identifier", + "@type": "@id" + }, "participants": { "@type": "@id" } }, - "@id": "enzml:Complex/2f52086d-d7a8-4a2d-870b-bd6bafd91504", + "@id": "enzml:Complex/be1a42ec-01ea-4f63-b557-1fde75f57ef7", "@type": [ "enzml:Complex" ], "id": "c0", "name": "Enzyme-Substrate Complex", "constant": false, + "vessel_id": "v0", "participants": [ "p0", "s0" @@ -144,8 +149,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -160,7 +165,7 @@ "@type": "@id" } }, - "@id": "enzml:SmallMolecule/551e35d3-ae18-490d-b4a7-003fcd28f446", + "@id": "enzml:SmallMolecule/8162f8a5-884e-40b5-9a2a-7f04ace5c21e", "@type": [ "enzml:SmallMolecule" ], @@ -175,8 +180,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -191,7 +196,7 @@ "@type": "@id" } }, - "@id": "enzml:SmallMolecule/1a93b3f8-ce94-429d-975b-ff6a837b0424", + "@id": "enzml:SmallMolecule/fe089160-e9c5-4862-ba88-1a437f29134f", "@type": [ "enzml:SmallMolecule" ], @@ -209,8 +214,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -219,7 +224,7 @@ "@type": "@id" } }, - "@id": "enzml:Measurement/83db3a41-626e-461b-80d2-9618997c6af3", + "@id": "enzml:Measurement/7766fd7f-cd7d-4ff1-8e83-9527cb45a005", "@type": [ "enzml:Measurement" ], @@ -229,13 +234,13 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/a1e71511-2b64-40af-a50f-7ede47b45baa", + "@id": "enzml:MeasurementData/b55b4581-9600-425e-b315-19a28e782a26", "@type": [ "enzml:MeasurementData" ], @@ -244,8 +249,8 @@ "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000063", "@type": [ @@ -257,10 +262,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/0a98675d-d6e6-4551-8f2a-90483c57936d", + "@id": "enzml:BaseUnit/41bc70c0-6cd0-49d3-a659-f195b6d8bdf9", "@type": [ "enzml:BaseUnit" ], @@ -271,10 +276,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/335f309c-13e0-4eb8-9765-3945a8683f7f", + "@id": "enzml:BaseUnit/61182f56-73ee-47cd-ac22-4ce7ad6da66a", "@type": [ "enzml:BaseUnit" ], @@ -284,35 +289,6 @@ } ] }, - "time_unit": { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "OBO:UO_0000010", - "@type": [ - "OBO:UO_0000000" - ], - "id": "u1", - "name": "s", - "base_units": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/4e3a6a14-ca74-4c8a-b00f-45a3cfea6e11", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "second", - "exponent": 1, - "scale": 1.0 - } - ] - }, "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", "data": [ 0.0, @@ -340,18 +316,47 @@ 9.0, 10.0 ], + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u1", + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "enzml:BaseUnit/e9698180-23e9-4660-adcc-38dbf74c0ad5", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": 1, + "scale": 1.0 + } + ] + }, "is_simulated": false }, { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/9de1a9fe-ede0-4e0b-a8cc-84e8dce6cb57", + "@id": "enzml:MeasurementData/715d7d38-843b-42f8-82b7-4a8d086a4fd2", "@type": [ "enzml:MeasurementData" ], @@ -360,8 +365,8 @@ "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000063", "@type": [ @@ -373,10 +378,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/0a98675d-d6e6-4551-8f2a-90483c57936d", + "@id": "enzml:BaseUnit/41bc70c0-6cd0-49d3-a659-f195b6d8bdf9", "@type": [ "enzml:BaseUnit" ], @@ -387,10 +392,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/335f309c-13e0-4eb8-9765-3945a8683f7f", + "@id": "enzml:BaseUnit/61182f56-73ee-47cd-ac22-4ce7ad6da66a", "@type": [ "enzml:BaseUnit" ], @@ -400,35 +405,6 @@ } ] }, - "time_unit": { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "OBO:UO_0000010", - "@type": [ - "OBO:UO_0000000" - ], - "id": "u1", - "name": "s", - "base_units": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/4e3a6a14-ca74-4c8a-b00f-45a3cfea6e11", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "second", - "exponent": 1, - "scale": 1.0 - } - ] - }, "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", "data": [ 10.0, @@ -456,6 +432,35 @@ 9.0, 10.0 ], + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u1", + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "enzml:BaseUnit/e9698180-23e9-4660-adcc-38dbf74c0ad5", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": 1, + "scale": 1.0 + } + ] + }, "is_simulated": false } ], @@ -464,8 +469,8 @@ "temperature_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000012", "@type": [ @@ -477,10 +482,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/31d5028b-2d30-4053-87e7-00b42a40b165", + "@id": "enzml:BaseUnit/d593a318-0adf-4c28-b768-a60643e77209", "@type": [ "enzml:BaseUnit" ], @@ -494,8 +499,8 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" @@ -504,7 +509,7 @@ "@type": "@id" } }, - "@id": "enzml:Measurement/f7603279-9db3-4039-b501-97fee1f05c4b", + "@id": "enzml:Measurement/a5492722-fe9e-42e4-b870-cfa625e58efc", "@type": [ "enzml:Measurement" ], @@ -514,13 +519,13 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/f8d7f530-1f92-4cd7-b460-54b9cb03678b", + "@id": "enzml:MeasurementData/edd44ccc-1c8d-483b-a731-c9bf71c16fd0", "@type": [ "enzml:MeasurementData" ], @@ -529,8 +534,8 @@ "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000063", "@type": [ @@ -542,10 +547,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/0a98675d-d6e6-4551-8f2a-90483c57936d", + "@id": "enzml:BaseUnit/41bc70c0-6cd0-49d3-a659-f195b6d8bdf9", "@type": [ "enzml:BaseUnit" ], @@ -556,10 +561,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/335f309c-13e0-4eb8-9765-3945a8683f7f", + "@id": "enzml:BaseUnit/61182f56-73ee-47cd-ac22-4ce7ad6da66a", "@type": [ "enzml:BaseUnit" ], @@ -569,35 +574,6 @@ } ] }, - "time_unit": { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "OBO:UO_0000010", - "@type": [ - "OBO:UO_0000000" - ], - "id": "u1", - "name": "s", - "base_units": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/4e3a6a14-ca74-4c8a-b00f-45a3cfea6e11", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "second", - "exponent": 1, - "scale": 1.0 - } - ] - }, "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", "data": [ 0.0, @@ -625,18 +601,47 @@ 9.0, 10.0 ], + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u1", + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "enzml:BaseUnit/e9698180-23e9-4660-adcc-38dbf74c0ad5", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": 1, + "scale": 1.0 + } + ] + }, "is_simulated": false }, { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id" } }, - "@id": "enzml:MeasurementData/828564ec-ec24-42c2-98b2-115fdc1f2a3c", + "@id": "enzml:MeasurementData/350a22b8-dfad-43d8-b222-ce66d399e683", "@type": [ "enzml:MeasurementData" ], @@ -645,8 +650,8 @@ "data_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000063", "@type": [ @@ -658,10 +663,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/0a98675d-d6e6-4551-8f2a-90483c57936d", + "@id": "enzml:BaseUnit/41bc70c0-6cd0-49d3-a659-f195b6d8bdf9", "@type": [ "enzml:BaseUnit" ], @@ -672,10 +677,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/335f309c-13e0-4eb8-9765-3945a8683f7f", + "@id": "enzml:BaseUnit/61182f56-73ee-47cd-ac22-4ce7ad6da66a", "@type": [ "enzml:BaseUnit" ], @@ -685,35 +690,6 @@ } ] }, - "time_unit": { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "OBO:UO_0000010", - "@type": [ - "OBO:UO_0000000" - ], - "id": "u1", - "name": "s", - "base_units": [ - { - "@context": { - "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" - }, - "@id": "enzml:BaseUnit/4e3a6a14-ca74-4c8a-b00f-45a3cfea6e11", - "@type": [ - "enzml:BaseUnit" - ], - "kind": "second", - "exponent": 1, - "scale": 1.0 - } - ] - }, "data_type": "http://purl.obolibrary.org/obo/PATO_0000033", "data": [ 10.0, @@ -741,6 +717,35 @@ 9.0, 10.0 ], + "time_unit": { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "OBO:UO_0000010", + "@type": [ + "OBO:UO_0000000" + ], + "id": "u1", + "name": "s", + "base_units": [ + { + "@context": { + "enzml": "http://www.enzymeml.org/v2/", + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" + }, + "@id": "enzml:BaseUnit/e9698180-23e9-4660-adcc-38dbf74c0ad5", + "@type": [ + "enzml:BaseUnit" + ], + "kind": "second", + "exponent": 1, + "scale": 1.0 + } + ] + }, "is_simulated": false } ], @@ -749,8 +754,8 @@ "temperature_unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000012", "@type": [ @@ -762,10 +767,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/31d5028b-2d30-4053-87e7-00b42a40b165", + "@id": "enzml:BaseUnit/d593a318-0adf-4c28-b768-a60643e77209", "@type": [ "enzml:BaseUnit" ], @@ -781,28 +786,28 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id" } }, - "@id": "enzml:Equation/69aec529-07bc-447a-8169-a20dc623c81a", + "@id": "enzml:Equation/99d3756a-898a-4d1f-9da8-0ddf4a78ef19", "@type": [ "enzml:Equation" ], - "equation": "E_tot * kcat * s0 / (K_m + s0)", + "equation": "E_tot*kcat*s0/(K_m + s0)", "equation_type": "ode", "species_id": "s1", "variables": [ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": "schema:identifier" }, - "@id": "enzml:Variable/b4d171e6-c5ee-416b-859f-6560c5f18b5d", + "@id": "enzml:Variable/2104c1ec-afc6-45c8-be1a-3e384b925cc6", "@type": [ "enzml:Variable" ], @@ -815,13 +820,13 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "species_id": { "@type": "@id" } }, - "@id": "enzml:Equation/e1e66a46-8111-4003-9eeb-f163081c2e96", + "@id": "enzml:Equation/9674a3b0-0f65-4617-abe0-db1dc1ad0a28", "@type": [ "enzml:Equation" ], @@ -835,14 +840,14 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" } }, - "@id": "enzml:Parameter/2872b6d6-191f-4bc4-a36a-130eb4534837", + "@id": "enzml:Parameter/b53a61b4-dc01-4756-b196-de11ca49f32e", "@type": [ "enzml:Parameter" ], @@ -852,8 +857,8 @@ "unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000010", "@type": [ @@ -865,10 +870,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/4e3a6a14-ca74-4c8a-b00f-45a3cfea6e11", + "@id": "enzml:BaseUnit/e9698180-23e9-4660-adcc-38dbf74c0ad5", "@type": [ "enzml:BaseUnit" ], @@ -886,14 +891,14 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" } }, - "@id": "enzml:Parameter/31e315d7-8e87-4ef9-9ca4-1e9e08f2ded7", + "@id": "enzml:Parameter/262c575a-86af-4a68-afae-86d0a2487449", "@type": [ "enzml:Parameter" ], @@ -903,8 +908,8 @@ "unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000063", "@type": [ @@ -916,10 +921,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/0a98675d-d6e6-4551-8f2a-90483c57936d", + "@id": "enzml:BaseUnit/41bc70c0-6cd0-49d3-a659-f195b6d8bdf9", "@type": [ "enzml:BaseUnit" ], @@ -930,10 +935,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/335f309c-13e0-4eb8-9765-3945a8683f7f", + "@id": "enzml:BaseUnit/61182f56-73ee-47cd-ac22-4ce7ad6da66a", "@type": [ "enzml:BaseUnit" ], @@ -951,14 +956,14 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/", "id": { "@id": "schema:identifier", "@type": "@id" } }, - "@id": "enzml:Parameter/d49325e0-8483-469a-9d6d-1bcadac2bb98", + "@id": "enzml:Parameter/288ed9be-7df3-462f-84c1-bbbcc437d7a7", "@type": [ "enzml:Parameter" ], @@ -968,8 +973,8 @@ "unit": { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, "@id": "OBO:UO_0000063", "@type": [ @@ -981,10 +986,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/0a98675d-d6e6-4551-8f2a-90483c57936d", + "@id": "enzml:BaseUnit/41bc70c0-6cd0-49d3-a659-f195b6d8bdf9", "@type": [ "enzml:BaseUnit" ], @@ -995,10 +1000,10 @@ { "@context": { "enzml": "http://www.enzymeml.org/v2/", - "OBO": "http://purl.obolibrary.org/obo/", - "schema": "https://schema.org/" + "schema": "https://schema.org/", + "OBO": "http://purl.obolibrary.org/obo/" }, - "@id": "enzml:BaseUnit/335f309c-13e0-4eb8-9765-3945a8683f7f", + "@id": "enzml:BaseUnit/61182f56-73ee-47cd-ac22-4ce7ad6da66a", "@type": [ "enzml:BaseUnit" ], diff --git a/tests/fixtures/sbml/odes_example.omex b/tests/fixtures/sbml/odes_example.omex index 087704deb80a5f2edbf78637d98194f6b7c3735e..22e08a3380cd065bc53dccec35a2cc6a0d3682d0 100644 GIT binary patch delta 1940 zcmV;F2W$BK5|k4SP)h>@6aWAK2mqp9D6tI)0e_-iC|T?C8e|a%008(a000R9003=o zWMynFcx`O$T3K_{I1qm4SGdf}?t@~>x2c)g3ORNu2(vH)1y7VL%S45*wd_fuC&i_C!%8 zNfxqLNlC({>XL~PG_tr#*t?XMFi)k|YM@BcG%HC7V;cd8LQ;}VheYcUOaHw{SnJiw zP?dQacmU0Y*esu!Nb)$yq^4n6gtdd~Xlis!}!cn8Ps>ZTCzQku%DfIFvzXucxX2 zpIfuK%wu_x!{x#J^}*5W<=g$`i}~w*B4aesZiBcth;L_cqHToss(|A@;P^4%_kSJm zNe%jzL)w@`lbDNg9?5_ovWTa{RZpscyv|m&rboOHAq-_wlrKDm zWW>Cb)s>y+SqeD^#Hfm(L>4;)wKl2ZlIJmJg?utV$`0cbZJ6#WQDF2aNU~Vbl%Ej` zj`=HL0rGGcC|m<5v^ImkDWLjIK>UPA!uqd-B*EkcxEo8~76fJof|oxd2!D)U2?SqQ zyyEGP0D;wk0K>lWSPdRtHMsvhVN-SM9NId0kR>@ON_nlz&#It3r5SVE=)Doc=I!=Yc2 zEbmEnR7XqlrZ?VjP*i~=6762&G>6kuBIap)u^2s!NG#wfATtdiSO;DA-9K5=vJw0* zdHHvdm5iqvvqHykb%tEei;(5ICJJobML61wJE)n%vj>ZnSUMaQ3&(~FI)N7^RkV`?T9(b%Oy5$OGNnwsyFn>%egHfboMvxUbvS8S< zV1&%IBim(>dy|5(otmpl$n8npW&G<2NgGRdAf!YZr#vTepUmM*F%Vp#E3VLO_GNJB z{s?5b4S_^Ypgui27*n69NetkpAS*~ifCslxKUgj;5)#KJ5F1*>O!Kf~L>{q`=UEI{ zdSD};7zDYIZhsNVY-(V3HKY1m-8Y2>j@|>2#HPJF(21w?l)q#bvp37ge z8Z_ikR*}i>V{#Q|LTB$3Ow`JOsO#=|+Z+O@Ax8nq6(G9=Y|yxYc!?gXXer zIR7REV5P_-Hi9q-SpYHJx1f~j1|viNt@MgXg2PLidCL>51>husvD9Kbj$FN zt$34aU4QmW1Ie&)>3qKqzFUeTP`><>^gm9>%MOypPY+3GidPg9yx*!XE{M}nW;kCaTeoa0|p2y?UXvkMQWMcyE(3Bta@q~%( z_es8#&y*TBGP8W=V|kdo{Hf4)JcIS`aCf(3d0buM7n~Tre%>w77_%MDhEVOX2dTqFyLj>+>395eEPO_$!kX a2`K}jUMQ152^#@JlUxZK2G@6aWAK2msxo6R`~l0e{`06ImI8u=x50001&A000R9003=o zWMynFcx`O$T3K(~I1ql%uMpIi-3MB?B?Y#NoV!7rxUHR{eJUuCN{H%OQF7w``XzN) zlI_@T+#*R61A)Y2G@SXq;S8n0+xx&5W;mfF3WuW7lSKiCZiGm9GZe3<=fD!*jt&OY zVSmHe(2x$r+cb?2CF$<&uE(2uQF0^k3(3bb>}ygfO_kgz!J?424n<8|JVq5q2ZAsN zB7}V*gaICkQ%uvmm9@h#j8d4gp+y60!r_m3fCK*!!4wvX99C_GMzmC^YR%P}siNQ! zpULO*dMTZWmB^;h07IH3IKW{l5Hu76W`Bi3Eq;}f0AGhB9g3OKnBElNMj;|xVcP6( zj)-rC8T2zI(quN4)(uN>5aR@<>8GRV#rUf8xDC=2u~J)+d%K8ktfS$Lt(>LQ&Qe~T^?wAM z)#&A{D@iSNSv~LxO~)R0)+zQ#*tW(XYqjT|&K9)vn>=2Q7kP7nyu(kY=Vi2DcdgKM zr{xhsv29zDRY_F=8v*D%OyNBU=^L@*buR4`Q#T=Tt`NV6PL!p!)Hq96)Nvx8I0;PV zxp;OfU5~%X{Li*JGE1r4*txg_(|;&ST)eeJc^RBiN6$9=N|Q7_xypDA*RRQc=u);=YIPC?F-%gPiY}zNi^d!+vpR?Tj45U1C)bVq$aCN#1Exiy z$reFV$kk7i4DXDp@$q=0x5S@CU^$Pvw>W@{^0&Cp=k5;D6}7Wem`H+-E31m7g1%`$ zpnJ#!j@&na?P+G;Q%uJ)^?zjq7upZ`BaZRVQ+*+JBweW&%3x6Vc(5HVWlRhL- zib*Kxmg!&_sQ_!L!KfrVz%on+Xb!TFp}PzZ+QU>T?7W#s|4b%)GceV@I=Y;meJvQ# zY+Xw~g?qR^I_tU2&7mZJOQ6>SRM z3%f|@-ja8CK7aZ+J)RtY`8+*4x;*mJg*Ne z&2(g4-LRXLrhlc{bER5Uh_>p@vIhMC6XwnoCktA}Rew`X!S60iD-ssh)v1mC`%}UF z6o=LNB-Juir;qwTu@w*Kj;jNx^&wC+89Tb6>5L%aJ_@kviF+-dYB%iz;(m08ljA50 z(I`L9S=F&-Y8J=U2v)MTCO5j)aUn&gct#4O$gRSy)wQM$s%)@{4@(0(D1Y}Ys9$FA z%L?P_vwz39#&RviKqj!TWda?0Hn3f&0|nbywmcPK^osF60^?`j(x?vQ<;}~%Inr%S zHLwgU7PW!iw;`|*E8-Q$g$TN;3C=}P9vo3hZo>AGqnfX5%P zSmcs!?ZvKJRk`R-StE}e@Isll2s4-v=ywQH(*bT9C%q;<|y_*G?pDzE*L zuhwPb%hSjB492nF&EFB35rn&}Uon!k^6w()@_D;UMnaA)?tQYdo9Ec;d#SvlkF9@& zx-zR3i~VekUM%l<{BxI@y11^e*oJeBS2mn~r93(qSs8+``1%F_05UC;D+wt;-Jug%0{TU?ZU6uPUI73A2mk;8 v0000000000q=765003lRbYU)Zb9PWm1qJ{B000930|2K0006)U000008!)*8 diff --git a/tests/fixtures/sbml/v1_example_enzml.json b/tests/fixtures/sbml/v1_example_enzml.json index 772e07a..37f76df 100644 --- a/tests/fixtures/sbml/v1_example_enzml.json +++ b/tests/fixtures/sbml/v1_example_enzml.json @@ -179,6 +179,7 @@ "id": "c0", "name": "E·PGME", "constant": false, + "vessel_id": "v0", "participants": [ "p0", "s0" @@ -205,6 +206,7 @@ "id": "c1", "name": "E·7-ADCA", "constant": false, + "vessel_id": "v0", "participants": [ "p0", "s1" @@ -231,6 +233,7 @@ "id": "c2", "name": "E·PG", "constant": false, + "vessel_id": "v0", "participants": [ "p0", "s3" @@ -257,6 +260,7 @@ "id": "c3", "name": "E·PGME·PGME", "constant": false, + "vessel_id": "v0", "participants": [ "p0", "s0", @@ -284,6 +288,7 @@ "id": "c4", "name": "EA·7-ADCA", "constant": false, + "vessel_id": "v0", "participants": [ "p1", "s1" @@ -310,6 +315,7 @@ "id": "c5", "name": "EA·PGME", "constant": false, + "vessel_id": "v0", "participants": [ "p1", "s0" @@ -336,6 +342,7 @@ "id": "c6", "name": "E·CEX", "constant": false, + "vessel_id": "v0", "participants": [ "p0", "s2" diff --git a/tests/integration/test_sbml.py b/tests/integration/test_sbml.py index 63d9141..c747519 100644 --- a/tests/integration/test_sbml.py +++ b/tests/integration/test_sbml.py @@ -22,6 +22,11 @@ def test_parse_sbml_odes(self): EnzymeMLDocument.read("tests/fixtures/sbml/ode_example_enzml.json") ) + # Remove spaces of equation + for eq in parsed_doc["equations"]: + eq["equation"] = eq["equation"].replace(" * ", "*") + eq["equation"] = eq["equation"].replace(" / ", "/") + assert ( parsed_doc == expected_doc ), "Parsed document does not match expected document" @@ -88,6 +93,7 @@ def test_end_to_end(self): id="c0", name="Enzyme-Substrate Complex", participants=[enzyme.id, substrate.id], + vessel_id=vessel.id, ) doc.equations += peq.build_equations( From 2c10d5415c654426395f01cafb1c22c0e092626e Mon Sep 17 00:00:00 2001 From: Jan Range Date: Sun, 8 Sep 2024 11:57:52 +0200 Subject: [PATCH 72/80] remove unused import --- pyenzyme/model.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pyenzyme/model.py b/pyenzyme/model.py index 7b056e6..f196a80 100644 --- a/pyenzyme/model.py +++ b/pyenzyme/model.py @@ -5,7 +5,6 @@ from typing import Optional, Generic, TypeVar from enum import Enum from uuid import uuid4 -from datetime import date, datetime # Filter Wrapper definition used to filter a list of objects # based on their attributes From 91b999382cf507978e5882aa9f607233e7c11f82 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Tue, 24 Sep 2024 01:58:56 +0200 Subject: [PATCH 73/80] add suite class --- pyenzyme/__init__.py | 1 + pyenzyme/suite.py | 72 ++++++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 1 + 3 files changed, 74 insertions(+) create mode 100644 pyenzyme/suite.py diff --git a/pyenzyme/__init__.py b/pyenzyme/__init__.py index 298edc2..6396014 100644 --- a/pyenzyme/__init__.py +++ b/pyenzyme/__init__.py @@ -7,6 +7,7 @@ from .model import * # noqa: F403 from .sbml import to_sbml, read_sbml # noqa: F401 +from .suite import EnzymeMLSuite # noqa: F401 from .tabular import to_pandas, read_csv, read_excel, from_dataframe # noqa: F401 __all__ = [ diff --git a/pyenzyme/suite.py b/pyenzyme/suite.py new file mode 100644 index 0000000..c4182d0 --- /dev/null +++ b/pyenzyme/suite.py @@ -0,0 +1,72 @@ +import json + +import httpx +import rich + +import pyenzyme as pe + + +class EnzymeMLSuite: + """ + A suite for interacting with the EnzymeML service. + + Attributes: + client (httpx.Client): The HTTP client for making requests to the EnzymeML service. + """ + + def __init__(self): + """ + Initializes the EnzymeMLSuite with a base URL for the EnzymeML service. + """ + self.client = httpx.Client(base_url="http://localhost:13452") + + def get_current(self) -> pe.EnzymeMLDocument: + """ + Retrieves the current EnzymeML document from the service. + + Returns: + EnzymeMLDocument: The current EnzymeML document. + + Raises: + httpx.HTTPStatusError: If the request to the service fails. + """ + + try: + response = self.client.get("/docs/:current") + except httpx.ConnectError: + raise ConnectionError( + "Could not connect to the EnzymeML suite. Make sure it is running." + ) + + response.raise_for_status() + + content = response.json()["data"]["content"] + + if not isinstance(content["references"], list): + content["references"] = [] + + return pe.EnzymeMLDocument.model_validate(content) + + def update_current(self, doc: pe.EnzymeMLDocument): + """ + Updates the current EnzymeML document on the service. + + Args: + doc (EnzymeMLDocument): The EnzymeML document to update. + + Raises: + httpx.HTTPStatusError: If the request to the service fails. + """ + try: + response = self.client.put( + "/docs/:current", + json=json.loads(doc.model_dump_json()), + ) + except httpx.ConnectError: + raise ConnectionError( + "Could not connect to the EnzymeML suite. Make sure it is running." + ) + + response.raise_for_status() + + rich.print("[bold green]Document updated successfully![/]") diff --git a/pyproject.toml b/pyproject.toml index 1245b09..ba6841c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,7 @@ loguru = "^0.7.2" rdflib = "7.0.0" sympy = "^1.12.1" pymetadata = "^0.4.4" +httpx = "^0.27.2" [tool.poetry.group.neo4j.dependencies] neo4j = "^5.21.0" From de446b61a05012ae8494b8c11efb6081cc4cc824 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Tue, 24 Sep 2024 12:22:28 +0200 Subject: [PATCH 74/80] fix units not recognized --- pyenzyme/sbml/serializer.py | 15 ++++++++++++++- pyenzyme/tabular.py | 5 ++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/pyenzyme/sbml/serializer.py b/pyenzyme/sbml/serializer.py index de3e9b2..5e440eb 100644 --- a/pyenzyme/sbml/serializer.py +++ b/pyenzyme/sbml/serializer.py @@ -67,7 +67,10 @@ def to_sbml( sbmldoc = libsbml.SBMLDocument() model = sbmldoc.createModel() model.setName(doc.name) - units = _assign_ids_to_units(tools.find_unique(doc, UnitDefinition)) + units = _assign_ids_to_units(tools.find_unique(doc, pe.UnitDefinition)) + + # Add units that have been defined by the custom UnitDefinition + convert_unit_classes(doc, units) print_warnings = verbose @@ -109,6 +112,16 @@ def to_sbml( logger.info(f"OMEX archive written to {out}") +def convert_unit_classes(doc: pe.EnzymeMLDocument, custom_units: list[UnitDefinition]): + custom_units.extend( + [ + pe.UnitDefinition(**unit.model_dump()) + for unit in _assign_ids_to_units(tools.find_unique(doc, pe.UnitDefinition)) + if unit.id not in [unit.id for unit in custom_units] + ] + ) + + def _add_unit_definitions(unit: UnitDefinition): """Add unit definitions to the SBML model.""" diff --git a/pyenzyme/tabular.py b/pyenzyme/tabular.py index 1185dd3..32c1e4e 100644 --- a/pyenzyme/tabular.py +++ b/pyenzyme/tabular.py @@ -59,7 +59,10 @@ def to_pandas( df["id"] = [meas.id] * len(df) dfs.append(df) - return pd.concat(dfs, ignore_index=True).reset_index(drop=True) + if dfs: + return pd.concat(dfs, ignore_index=True).reset_index(drop=True) + else: + return pd.DataFrame() def read_excel( From 4efc6d12115d6e3e3195e1c2d740585ff9e865e8 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Tue, 24 Sep 2024 13:34:14 +0200 Subject: [PATCH 75/80] Return `None` if `unit` is `None` --- pyenzyme/sbml/serializer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyenzyme/sbml/serializer.py b/pyenzyme/sbml/serializer.py index 5e440eb..dd5a5d1 100644 --- a/pyenzyme/sbml/serializer.py +++ b/pyenzyme/sbml/serializer.py @@ -438,9 +438,12 @@ def _get_sbml_kind(unit_type: pe.UnitType): raise ValueError(f"Unit type {unit_type} not found in libsbml") -def _get_unit_id(unit: pe.UnitDefinition) -> str: +def _get_unit_id(unit: pe.UnitDefinition) -> str | None: """Helper function to get the unit from the list of units.""" + if unit is None: + return None + if unit.id is None: raise ValueError(f"Unit {unit.name} does not have an ID") From a0282d4643fea3126413b8fe14969d98ce98108e Mon Sep 17 00:00:00 2001 From: Jan Range Date: Tue, 24 Sep 2024 13:45:55 +0200 Subject: [PATCH 76/80] set temp unit and value optional --- pyenzyme/sbml/versions/v2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyenzyme/sbml/versions/v2.py b/pyenzyme/sbml/versions/v2.py index bd180d4..ce82bfc 100644 --- a/pyenzyme/sbml/versions/v2.py +++ b/pyenzyme/sbml/versions/v2.py @@ -308,8 +308,8 @@ class TemperatureAnnot( unit (str): The unit of the temperature value. """ - value: float = attr(name="value") - unit: str = attr(name="unit") + value: float | None = attr(name="value", default=None) + unit: str | None = attr(name="unit", default=None) class ParameterAnnot( From d1fa04eafe7babcacb13ea89aa64e58816ee78b6 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Wed, 25 Sep 2024 13:57:01 +0200 Subject: [PATCH 77/80] fix unit ids not retrieved corectly --- pyenzyme/sbml/serializer.py | 23 +++++++++++++++++++---- pyenzyme/sbml/versions/v2.py | 4 ++-- pyenzyme/tabular.py | 16 +++++++++++++--- 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/pyenzyme/sbml/serializer.py b/pyenzyme/sbml/serializer.py index dd5a5d1..dd56d76 100644 --- a/pyenzyme/sbml/serializer.py +++ b/pyenzyme/sbml/serializer.py @@ -4,6 +4,7 @@ from pathlib import Path from typing import Callable, List +import rich import libsbml import pandas as pd from loguru import logger @@ -18,6 +19,7 @@ from pyenzyme.sbml.versions import v2 from pyenzyme.tabular import to_pandas from pyenzyme.units.units import UnitDefinition +from pyenzyme.tools import to_dict_wo_json_ld MAPPINGS = tools.read_static_file("pyenzyme.sbml", "mappings.toml") NSMAP = {"enzymeml": "https://www.enzymeml.org/v2"} @@ -438,20 +440,33 @@ def _get_sbml_kind(unit_type: pe.UnitType): raise ValueError(f"Unit type {unit_type} not found in libsbml") -def _get_unit_id(unit: pe.UnitDefinition) -> str | None: +def _get_unit_id(unit: pe.UnitDefinition | None) -> str | None: """Helper function to get the unit from the list of units.""" if unit is None: return None - if unit.id is None: - raise ValueError(f"Unit {unit.name} does not have an ID") + for unit2 in units: + if _same_unit(unit, unit2): + return unit2.id - return unit.id + raise ValueError(f"Unit {unit.name} not found in the list of units") + +def _same_unit(unit1: pe.UnitDefinition, unit2: pe.UnitDefinition) -> bool: + """Check if two units are the same.""" + + unit1 = to_dict_wo_json_ld(unit1) + unit2 = to_dict_wo_json_ld(unit2) + + del unit1["id"] + del unit2["id"] + + return unit1 == unit2 def _validate_sbml(sbmldoc: libsbml.SBMLDocument) -> None: """Validate the SBML document using the libSBML function.""" + sbml_errors = sbmldoc.checkConsistency() valid = True diff --git a/pyenzyme/sbml/versions/v2.py b/pyenzyme/sbml/versions/v2.py index ce82bfc..db71ee1 100644 --- a/pyenzyme/sbml/versions/v2.py +++ b/pyenzyme/sbml/versions/v2.py @@ -179,7 +179,7 @@ class MeasurementAnnot( id: str = attr(name="id") name: str | None = attr(name="name", default=None) - time_unit: str = attr(name="timeUnit") + time_unit: str | None = attr(name="timeUnit") conditions: ConditionsAnnot | None = element(tag="conditions", default=None) species_data: list[SpeciesDataAnnot] = element( tag="speciesData", @@ -291,7 +291,7 @@ class PHAnnot( value (float): The pH value. """ - value: float = attr(name="value") + value: float | None = attr(name="value") class TemperatureAnnot( diff --git a/pyenzyme/tabular.py b/pyenzyme/tabular.py index 32c1e4e..1c5ad19 100644 --- a/pyenzyme/tabular.py +++ b/pyenzyme/tabular.py @@ -16,7 +16,7 @@ def to_pandas( enzmldoc: EnzymeMLDocument, ignore: list[str] | None = None, -) -> pd.DataFrame: +) -> pd.DataFrame | None: """This function converts an EnzymeMLDocument object to a pandas DataFrame. The resulting DataFrame contains the following columns: @@ -38,6 +38,9 @@ def to_pandas( ValueError: If the measurement does not contain species data. """ + if not enzmldoc.measurements: + return None + if ignore is None: ignore = [] @@ -305,11 +308,17 @@ def _measurement_to_pandas(measurement: Measurement) -> pd.DataFrame: _validate_measurement(measurement) - data = {"time": measurement.species_data[0].time} + data = {"time": _get_time_array(measurement)} for species in measurement.species_data: - data[species.species_id] = species.data + if len(species.data) > 0: + data[species.species_id] = species.data + return pd.DataFrame(data) +def _get_time_array(measurement: Measurement): + for meas_data in measurement.species_data: + if len(meas_data.time) > 0: + return meas_data.time def _validate_measurement(meas: Measurement) -> None: """Validates a Measurement object""" @@ -321,6 +330,7 @@ def _validate_measurement(meas: Measurement) -> None: { species.species_id + "_time": species.time for species in meas.species_data + if len(species.time) > 0 } ) except ValueError: From 7e414926c2354bf223fed0bb38e8f511969e72ef Mon Sep 17 00:00:00 2001 From: Jan Range Date: Wed, 25 Sep 2024 20:11:19 +0200 Subject: [PATCH 78/80] fix unit ids and remove validation error --- pyenzyme/sbml/serializer.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pyenzyme/sbml/serializer.py b/pyenzyme/sbml/serializer.py index dd56d76..282a433 100644 --- a/pyenzyme/sbml/serializer.py +++ b/pyenzyme/sbml/serializer.py @@ -4,7 +4,6 @@ from pathlib import Path from typing import Callable, List -import rich import libsbml import pandas as pd from loguru import logger @@ -18,8 +17,8 @@ from pyenzyme.sbml.validation import validate_sbml_export from pyenzyme.sbml.versions import v2 from pyenzyme.tabular import to_pandas -from pyenzyme.units.units import UnitDefinition from pyenzyme.tools import to_dict_wo_json_ld +from pyenzyme.units.units import UnitDefinition MAPPINGS = tools.read_static_file("pyenzyme.sbml", "mappings.toml") NSMAP = {"enzymeml": "https://www.enzymeml.org/v2"} @@ -156,7 +155,7 @@ def _add_vessel(vessel: pe.Vessel): compartment.setSize(vessel.volume) compartment.setAnnotation(rdf.to_rdf_xml(vessel)) - if vessel.unit in units: + if vessel.unit: compartment.setUnits(_get_unit_id(vessel.unit)) model.setVolumeUnits(_get_unit_id(vessel.unit)) else: @@ -450,9 +449,9 @@ def _get_unit_id(unit: pe.UnitDefinition | None) -> str | None: if _same_unit(unit, unit2): return unit2.id - raise ValueError(f"Unit {unit.name} not found in the list of units") + def _same_unit(unit1: pe.UnitDefinition, unit2: pe.UnitDefinition) -> bool: """Check if two units are the same.""" @@ -464,6 +463,7 @@ def _same_unit(unit1: pe.UnitDefinition, unit2: pe.UnitDefinition) -> bool: return unit1 == unit2 + def _validate_sbml(sbmldoc: libsbml.SBMLDocument) -> None: """Validate the SBML document using the libSBML function.""" @@ -488,19 +488,22 @@ def _validate_sbml(sbmldoc: libsbml.SBMLDocument) -> None: sbmldoc.getError(error).getMessage().strip().replace("\n", " ") ) - if not valid: - raise ValueError("SBML model is not valid") - def _assign_ids_to_units(doc_units: List[UnitDefinition]) -> List[UnitDefinition]: ids = [unit.id for unit in doc_units if unit.id] + unique_units = [] for unit in doc_units: + if any(_same_unit(unit, u) for u in unique_units): + continue + if unit.id is None: new_id = next(_id_generator(ids)) unit.id = new_id - return doc_units + unique_units.append(unit) + + return unique_units def _id_generator(ids: list[str]): From ccf56c4e25bd2574134d61041baf44b7d08a6ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20H=C3=A4u=C3=9Fler?= Date: Wed, 18 Dec 2024 16:27:38 +0100 Subject: [PATCH 79/80] Update pyproject.toml loosened httpx version dependency --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ba6841c..00d2b39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ loguru = "^0.7.2" rdflib = "7.0.0" sympy = "^1.12.1" pymetadata = "^0.4.4" -httpx = "^0.27.2" +httpx = ">=0.27" [tool.poetry.group.neo4j.dependencies] neo4j = "^5.21.0" From c2867839800e46a99905bfe02459cfa09238eb21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20H=C3=A4u=C3=9Fler?= Date: Thu, 19 Dec 2024 11:35:29 +0100 Subject: [PATCH 80/80] Update pyproject.toml included pandas==2.2.2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 00d2b39..a5c5f56 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ python = "^3.10" python-libsbml = "^5.20.2" toml = "^0.10.2" rich = "^13.7.1" -pandas = ">=2.0,<2.2.2" +pandas = ">=2.0,<=2.2.2" pydantic-xml = "^2.12.1" loguru = "^0.7.2" rdflib = "7.0.0"